|
|
!(function(){var _u=Math.pow;(self.webpackChunk=self.webpackChunk||[]).push([[1006],{70557:function(ln,mt,m){"use strict";m.d(mt,{Z:function(){return te}});var v=m(60499),ae=m(59301),W={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"},fe=W,z=m(7657),g=function(C,M){return ae.createElement(z.Z,(0,v.Z)({},C,{ref:M,icon:fe}))},q=ae.forwardRef(g),te=q},40001:function(ln,mt,m){"use strict";m.d(mt,{Z:function(){return te}});var v=m(60499),ae=m(59301),W={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M912 190h-69.9c-9.8 0-19.1 4.5-25.1 12.2L404.7 724.5 207 474a32 32 0 00-25.1-12.2H112c-6.7 0-10.4 7.7-6.3 12.9l273.9 347c12.8 16.2 37.4 16.2 50.3 0l488.4-618.9c4.1-5.1.4-12.8-6.3-12.8z"}}]},name:"check",theme:"outlined"},fe=W,z=m(7657),g=function(C,M){return ae.createElement(z.Z,(0,v.Z)({},C,{ref:M,icon:fe}))},q=ae.forwardRef(g),te=q},84105:function(ln,mt,m){"use strict";m.d(mt,{Z:function(){return te}});var v=m(60499),ae=m(59301),W={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"},fe=W,z=m(7657),g=function(C,M){return ae.createElement(z.Z,(0,v.Z)({},C,{ref:M,icon:fe}))},q=ae.forwardRef(g),te=q},18785:function(ln,mt,m){"use strict";m.d(mt,{Z:function(){return te}});var v=m(60499),ae=m(59301),W={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"},fe=W,z=m(7657),g=function(C,M){return ae.createElement(z.Z,(0,v.Z)({},C,{ref:M,icon:fe}))},q=ae.forwardRef(g),te=q},73331:function(ln,mt,m){"use strict";m.d(mt,{Z:function(){return te}});var v=m(60499),ae=m(59301),W={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"},fe=W,z=m(7657),g=function(C,M){return ae.createElement(z.Z,(0,v.Z)({},C,{ref:M,icon:fe}))},q=ae.forwardRef(g),te=q},15277:function(ln,mt,m){"use strict";m.d(mt,{Z:function(){return te}});var v=m(60499),ae=m(59301),W={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"},fe=W,z=m(7657),g=function(C,M){return ae.createElement(z.Z,(0,v.Z)({},C,{ref:M,icon:fe}))},q=ae.forwardRef(g),te=q},52671:function(ln,mt,m){"use strict";m.d(mt,{Z:function(){return te}});var v=m(60499),ae=m(59301),W={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M854.6 288.6L639.4 73.4c-6-6-14.1-9.4-22.6-9.4H192c-17.7 0-32 14.3-32 32v832c0 17.7 14.3 32 32 32h640c17.7 0 32-14.3 32-32V311.3c0-8.5-3.4-16.7-9.4-22.7zM790.2 326H602V137.8L790.2 326zm1.8 562H232V136h302v216a42 42 0 0042 42h216v494z"}}]},name:"file",theme:"outlined"},fe=W,z=m(7657),g=function(C,M){return ae.createElement(z.Z,(0,v.Z)({},C,{ref:M,icon:fe}))},q=ae.forwardRef(g),te=q},8657:function(ln,mt,m){"use strict";m.d(mt,{Z:function(){return te}});var v=m(60499),ae=m(59301),W={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M928 444H820V330.4c0-17.7-14.3-32-32-32H473L355.7 186.2a8.15 8.15 0 00-5.5-2.2H96c-17.7 0-32 14.3-32 32v592c0 17.7 14.3 32 32 32h698c13 0 24.8-7.9 29.7-20l134-332c1.5-3.8 2.3-7.9 2.3-12 0-17.7-14.3-32-32-32zM136 256h188.5l119.6 114.4H748V444H238c-13 0-24.8 7.9-29.7 20L136 643.2V256zm635.3 512H159l103.3-256h612.4L771.3 768z"}}]},name:"folder-open",theme:"outlined"},fe=W,z=m(7657),g=function(C,M){return ae.createElement(z.Z,(0,v.Z)({},C,{ref:M,icon:fe}))},q=ae.forwardRef(g),te=q},56082:function(ln,mt,m){"use strict";m.d(mt,{Z:function(){return te}});var v=m(60499),ae=m(59301),W={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M300 276.5a56 56 0 1056-97 56 56 0 00-56 97zm0 284a56 56 0 1056-97 56 56 0 00-56 97zM640 228a56 56 0 10112 0 56 56 0 00-112 0zm0 284a56 56 0 10112 0 56 56 0 00-112 0zM300 844.5a56 56 0 1056-97 56 56 0 00-56 97zM640 796a56 56 0 10112 0 56 56 0 00-112 0z"}}]},name:"holder",theme:"outlined"},fe=W,z=m(7657),g=function(C,M){return ae.createElement(z.Z,(0,v.Z)({},C,{ref:M,icon:fe}))},q=ae.forwardRef(g),te=q},33853:function(ln,mt,m){"use strict";m.d(mt,{Z:function(){return te}});var v=m(60499),ae=m(59301),W={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"},fe=W,z=m(7657),g=function(C,M){return ae.createElement(z.Z,(0,v.Z)({},C,{ref:M,icon:fe}))},q=ae.forwardRef(g),te=q},15075:function(ln,mt,m){"use strict";m.d(mt,{Z:function(){return te}});var v=m(60499),ae=m(59301),W={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M328 544h368c4.4 0 8-3.6 8-8v-48c0-4.4-3.6-8-8-8H328c-4.4 0-8 3.6-8 8v48c0 4.4 3.6 8 8 8z"}},{tag:"path",attrs:{d:"M880 112H144c-17.7 0-32 14.3-32 32v736c0 17.7 14.3 32 32 32h736c17.7 0 32-14.3 32-32V144c0-17.7-14.3-32-32-32zm-40 728H184V184h656v656z"}}]},name:"minus-square",theme:"outlined"},fe=W,z=m(7657),g=function(C,M){return ae.createElement(z.Z,(0,v.Z)({},C,{ref:M,icon:fe}))},q=ae.forwardRef(g),te=q},43531:function(ln,mt,m){"use strict";m.d(mt,{Z:function(){return te}});var v=m(60499),ae=m(59301),W={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M328 544h152v152c0 4.4 3.6 8 8 8h48c4.4 0 8-3.6 8-8V544h152c4.4 0 8-3.6 8-8v-48c0-4.4-3.6-8-8-8H544V328c0-4.4-3.6-8-8-8h-48c-4.4 0-8 3.6-8 8v152H328c-4.4 0-8 3.6-8 8v48c0 4.4 3.6 8 8 8z"}},{tag:"path",attrs:{d:"M880 112H144c-17.7 0-32 14.3-32 32v736c0 17.7 14.3 32 32 32h736c17.7 0 32-14.3 32-32V144c0-17.7-14.3-32-32-32zm-40 728H184V184h656v656z"}}]},name:"plus-square",theme:"outlined"},fe=W,z=m(7657),g=function(C,M){return ae.createElement(z.Z,(0,v.Z)({},C,{ref:M,icon:fe}))},q=ae.forwardRef(g),te=q},61485:function(ln,mt,m){"use strict";m.d(mt,{Z:function(){return te}});var v=m(60499),ae=m(59301),W={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M512 64C264.6 64 64 264.6 64 512s200.6 448 448 448 448-200.6 448-448S759.4 64 512 64zm0 820c-205.4 0-372-166.6-372-372s166.6-372 372-372 372 166.6 372 372-166.6 372-372 372z"}},{tag:"path",attrs:{d:"M623.6 316.7C593.6 290.4 554 276 512 276s-81.6 14.5-111.6 40.7C369.2 344 352 380.7 352 420v7.6c0 4.4 3.6 8 8 8h48c4.4 0 8-3.6 8-8V420c0-44.1 43.1-80 96-80s96 35.9 96 80c0 31.1-22 59.6-56.1 72.7-21.2 8.1-39.2 22.3-52.1 40.9-13.1 19-19.9 41.8-19.9 64.9V620c0 4.4 3.6 8 8 8h48c4.4 0 8-3.6 8-8v-22.7a48.3 48.3 0 0130.9-44.8c59-22.7 97.1-74.7 97.1-132.5.1-39.3-17.1-76-48.3-103.3zM472 732a40 40 0 1080 0 40 40 0 10-80 0z"}}]},name:"question-circle",theme:"outlined"},fe=W,z=m(7657),g=function(C,M){return ae.createElement(z.Z,(0,v.Z)({},C,{ref:M,icon:fe}))},q=ae.forwardRef(g),te=q},47472:function(ln,mt,m){"use strict";m.d(mt,{Z:function(){return te}});var v=m(60499),ae=m(59301),W={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"},fe=W,z=m(7657),g=function(C,M){return ae.createElement(z.Z,(0,v.Z)({},C,{ref:M,icon:fe}))},q=ae.forwardRef(g),te=q},68196:function(ln,mt,m){"use strict";m.d(mt,{Z:function(){return je}});var v=m(85899),ae=m(72190),W=m(42244),fe=m(43403),z=m(92310),g=m.n(z),q=m(29301),te=m(76846),o=m(96452),C=m(6089),M=m(80402),y=m(34280),E=m(49658),T=m(59301),k=m(60499),j=m(77900),Z=m(8654);function U(Re){var _e=Re.prefixCls,Y=Re.align,Le=Re.arrow,Ce=Re.arrowPos,B=Le||{},P=B.className,ce=B.content,ve=Ce.x,de=ve===void 0?0:ve,ye=Ce.y,Te=ye===void 0?0:ye,we=T.useRef();if(!Y||!Y.points)return null;var Ie={position:"absolute"};if(Y.autoArrow!==!1){var Ae=Y.points[0],Xe=Y.points[1],gt=Ae[0],ht=Ae[1],nt=Xe[0],Oe=Xe[1];gt===nt||!["t","b"].includes(gt)?Ie.top=Te:gt==="t"?Ie.top=0:Ie.bottom=0,ht===Oe||!["l","r"].includes(ht)?Ie.left=de:ht==="l"?Ie.left=0:Ie.right=0}return T.createElement("div",{ref:we,className:g()("".concat(_e,"-arrow"),P),style:Ie},ce)}function A(Re){var _e=Re.prefixCls,Y=Re.open,Le=Re.zIndex,Ce=Re.mask,B=Re.motion;return Ce?T.createElement(j.default,(0,k.Z)({},B,{motionAppear:!0,visible:Y,removeOnLeave:!0}),function(P){var ce=P.className;return T.createElement("div",{style:{zIndex:Le},className:g()("".concat(_e,"-mask"),ce)})}):null}var K=T.memo(function(Re){var _e=Re.children;return _e},function(Re,_e){return _e.cache}),D=K,O=T.forwardRef(function(Re,_e){var Y=Re.popup,Le=Re.className,Ce=Re.prefixCls,B=Re.style,P=Re.target,ce=Re.onVisibleChanged,ve=Re.open,de=Re.keepDom,ye=Re.fresh,Te=Re.onClick,we=Re.mask,Ie=Re.arrow,Ae=Re.arrowPos,Xe=Re.align,gt=Re.motion,ht=Re.maskMotion,nt=Re.forceRender,Oe=Re.getPopupContainer,qe=Re.autoDestroy,rt=Re.portal,ot=Re.zIndex,Rt=Re.onMouseEnter,S=Re.onMouseLeave,R=Re.onPointerEnter,Ze=Re.onPointerDownCapture,J=Re.ready,be=Re.offsetX,zt=Re.offsetY,ze=Re.offsetR,Qe=Re.offsetB,lt=Re.onAlign,le=Re.onPrepare,pe=Re.stretch,Pe=Re.targetWidth,$e=Re.targetHeight,G=typeof Y=="function"?Y():Y,bt=ve||de,xe=(Oe==null?void 0:Oe.length)>0,Bt=T.useState(!Oe||!xe),en=(0,ae.Z)(Bt,2),dn=en[0],Hn=en[1];if((0,y.Z)(function(){!dn&&xe&&P&&Hn(!0)},[dn,xe,P]),!dn)return null;var wt="auto",Gt={left:"-1000vw",top:"-1000vh",right:wt,bottom:wt};if(J||!ve){var mn,yn=Xe.points,rn=Xe.dynamicInset||((mn=Xe._experimental)===null||mn===void 0?void 0:mn.dynamicInset),En=rn&&yn[0][1]==="r",Zt=rn&&yn[0][0]==="b";En?(Gt.right=ze,Gt.left=wt):(Gt.left=be,Gt.right=wt),Zt?(Gt.bottom=Qe,Gt.top=wt):(Gt.top=zt,Gt.bottom=wt)}var Dt={};return pe&&(pe.includes("height")&&$e?Dt.height=$e:pe.includes("minHeight")&&$e&&(Dt.minHeight=$e),pe.includes("width")&&Pe?Dt.width=Pe:pe.includes("minWidth")&&Pe&&(Dt.minWidth=Pe)),ve||(Dt.pointerEvents="none"),T.createElement(rt,{open:nt||bt,getContainer:Oe&&function(){return Oe(P)},autoDestroy:qe},T.createElement(A,{prefixCls:Ce,open:ve,zIndex:ot,mask:we,motion:ht}),T.createElement(q.Z,{onResize:lt,disabled:!ve},function(Mt){return T.createElement(j.default,(0,k.Z)({motionAppear:!0,motionEnter:!0,motionLeave:!0,removeOnLeave:!1,forceRender:nt,leavedClassName:"".concat(Ce,"-hidden")},gt,{onAppearPrepare:le,onEnterPrepare:le,visible:ve,onVisibleChanged:function(Ln){var ut;gt==null||(ut=gt.onVisibleChanged)===null||ut===void 0||ut.call(gt,Ln),ce(Ln)}}),function(gn,Ln){var ut=gn.className,ct=gn.style,Se=g()(Ce,ut,Le);return T.createElement("div",{ref:(0,Z.sQ)(Mt,_e,Ln),className:Se,style:(0,v.Z)((0,v.Z)((0,v.Z)((0,v.Z)({"--arrow-x":"".concat(Ae.x||0,"px"),"--arrow-y":"".concat(Ae.y||0,"px")},Gt),Dt),ct),{},{boxSizing:"border-box",zIndex:ot},B),onMouseEnter:Rt,onMouseLeave:S,onPointerEnter:R,onClick:Te,onPointerDownCapture:Ze},Ie&&T.createElement(U,{prefixCls:Ce,arrow:Ie,arrowPos:Ae,align:Xe}),T.createElement(D,{cache:!ve&&!ye},G))})}))}),re=O,oe=T.forwardRef(function(Re,_e){var Y=Re.children,Le=Re.getTriggerDOMNode,Ce=(0,Z.Yr)(Y),B=T.useCallback(function(ce){(0,Z.mH)(_e,Le?Le(ce):ce)},[Le]),P=(0,Z.x1)(B,(0,Z.C4)(Y));return Ce?T.cloneElement(Y,{ref:P}):Y}),ie=oe,Ee=T.createContext(null),Me=Ee;function ke(Re){return Re?Array.isArray(Re)?Re:[Re]:[]}function tt(Re,_e,Y,Le){return T.useMemo(function(){var Ce=ke(Y!=null?Y:_e),B=ke(Le!=null?Le:_e),P=new Set(Ce),ce=new Set(B);return Re&&(P.has("hover")&&(P.delete("hover"),P.add("click")),ce.has("hover")&&(ce.delete("hover"),ce.add("click"))),[P,ce]},[Re,_e,Y,Le])}var ue=m(29194);function X(){var Re=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[],_e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:[],Y=arguments.length>2?arguments[2]:void 0;return Y?Re[0]===_e[0]:Re[0]===_e[0]&&Re[1]===_e[1]}function L(Re,_e,Y,Le){for(var Ce=Y.points,B=Object.keys(Re),P=0;P<B.length;P+=1){var ce,ve=B[P];if(X((ce=Re[ve])===null||ce===void 0?void 0:ce.points,Ce,Le))return"".concat(_e,"-placement-").concat(ve)}return""}function se(Re,_e,Y,Le){return _e||(Y?{motionName:"".concat(Re,"-").concat(Y)}:Le?{motionName:Le}:null)}function Q(Re){return Re.ownerDocument.defaultView}function V(Re){for(var _e=[],Y=Re==null?void 0:Re.parentElement,Le=["hidden","scroll","clip","auto"];Y;){var Ce=Q(Y).getComputedStyle(Y),B=Ce.overflowX,P=Ce.overflowY,ce=Ce.overflow;[B,P,ce].some(function(ve){return Le.includes(ve)})&&_e.push(Y),Y=Y.parentElement}return _e}function x(Re){var _e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:1;return Number.isNaN(Re)?_e:Re}function w(Re){return x(parseFloat(Re),0)}function H(Re,_e){var Y=(0,v.Z)({},Re);return(_e||[]).forEach(function(Le){if(!(Le instanceof HTMLBodyElement||Le instanceof HTMLHtmlElement)){var Ce=Q(Le).getComputedStyle(Le),B=Ce.overflow,P=Ce.overflowClipMargin,ce=Ce.borderTopWidth,ve=Ce.borderBottomWidth,de=Ce.borderLeftWidth,ye=Ce.borderRightWidth,Te=Le.getBoundingClientRect(),we=Le.offsetHeight,Ie=Le.clientHeight,Ae=Le.offsetWidth,Xe=Le.clientWidth,gt=w(ce),ht=w(ve),nt=w(de),Oe=w(ye),qe=x(Math.round(Te.width/Ae*1e3)/1e3),rt=x(Math.round(Te.height/we*1e3)/1e3),ot=(Ae-Xe-nt-Oe)*qe,Rt=(we-Ie-gt-ht)*rt,S=gt*rt,R=ht*rt,Ze=nt*qe,J=Oe*qe,be=0,zt=0;if(B==="clip"){var ze=w(P);be=ze*qe,zt=ze*rt}var Qe=Te.x+Ze-be,lt=Te.y+S-zt,le=Qe+Te.width+2*be-Ze-J-ot,pe=lt+Te.height+2*zt-S-R-Rt;Y.left=Math.max(Y.left,Qe),Y.top=Math.max(Y.top,lt),Y.right=Math.min(Y.right,le),Y.bottom=Math.min(Y.bottom,pe)}}),Y}function he(Re){var _e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,Y="".concat(_e),Le=Y.match(/^(.*)\%$/);return Le?Re*(parseFloat(Le[1])/100):parseFloat(Y)}function Ke(Re,_e){var Y=_e||[],Le=(0,ae.Z)(Y,2),Ce=Le[0],B=Le[1];return[he(Re.width,Ce),he(Re.height,B)]}function ft(){var Re=arguments.length>0&&arguments[0]!==void 0?arguments[0]:"";return[Re[0],Re[1]]}function Ue(Re,_e){var Y=_e[0],Le=_e[1],Ce,B;return Y==="t"?B=Re.y:Y==="b"?B=Re.y+Re.height:B=Re.y+Re.height/2,Le==="l"?Ce=Re.x:Le==="r"?Ce=Re.x+Re.width:Ce=Re.x+Re.width/2,{x:Ce,y:B}}function st(Re,_e){var Y={t:"b",b:"t",l:"r",r:"l"};return Re.map(function(Le,Ce){return Ce===_e?Y[Le]||"c":Le}).join("")}function pt(Re,_e,Y,Le,Ce,B,P){var ce=T.useState({ready:!1,offsetX:0,offsetY:0,offsetR:0,offsetB:0,arrowX:0,arrowY:0,scaleX:1,scaleY:1,align:Ce[Le]||{}}),ve=(0,ae.Z)(ce,2),de=ve[0],ye=ve[1],Te=T.useRef(0),we=T.useMemo(function(){return _e?V(_e):[]},[_e]),Ie=T.useRef({}),Ae=function(){Ie.current={}};Re||Ae();var Xe=(0,C.Z)(function(){if(_e&&Y&&Re){let Mr=function(ii,ir){var Er=arguments.length>2&&arguments[2]!==void 0?arguments[2]:yt,kn=bt.x+ii,$n=bt.y+ir,lr=kn+Zt,yr=$n+En,Wr=Math.max(kn,Er.left),Rn=Math.max($n,Er.top),Un=Math.min(lr,Er.right),rr=Math.min(yr,Er.bottom);return Math.max(0,(Un-Wr)*(rr-Rn))},Qr=function(){Or=bt.y+Mn,Cr=Or+En,_n=bt.x+An,wn=_n+Zt};var nt,Oe,qe,rt,ot=_e,Rt=ot.ownerDocument,S=Q(ot),R=S.getComputedStyle(ot),Ze=R.position,J=ot.style.left,be=ot.style.top,zt=ot.style.right,ze=ot.style.bottom,Qe=ot.style.overflow,lt=(0,v.Z)((0,v.Z)({},Ce[Le]),B),le=Rt.createElement("div");(nt=ot.parentElement)===null||nt===void 0||nt.appendChild(le),le.style.left="".concat(ot.offsetLeft,"px"),le.style.top="".concat(ot.offsetTop,"px"),le.style.position=Ze,le.style.height="".concat(ot.offsetHeight,"px"),le.style.width="".concat(ot.offsetWidth,"px"),ot.style.left="0",ot.style.top="0",ot.style.right="auto",ot.style.bottom="auto",ot.style.overflow="hidden";var pe;if(Array.isArray(Y))pe={x:Y[0],y:Y[1],width:0,height:0};else{var Pe,$e,G=Y.getBoundingClientRect();G.x=(Pe=G.x)!==null&&Pe!==void 0?Pe:G.left,G.y=($e=G.y)!==null&&$e!==void 0?$e:G.top,pe={x:G.x,y:G.y,width:G.width,height:G.height}}var bt=ot.getBoundingClientRect(),xe=S.getComputedStyle(ot),Bt=xe.height,en=xe.width;bt.x=(Oe=bt.x)!==null&&Oe!==void 0?Oe:bt.left,bt.y=(qe=bt.y)!==null&&qe!==void 0?qe:bt.top;var dn=Rt.documentElement,Hn=dn.clientWidth,wt=dn.clientHeight,Gt=dn.scrollWidth,mn=dn.scrollHeight,yn=dn.scrollTop,rn=dn.scrollLeft,En=bt.height,Zt=bt.width,Dt=pe.height,Mt=pe.width,gn={left:0,top:0,right:Hn,bottom:wt},Ln={left:-rn,top:-yn,right:Gt-rn,bottom:mn-yn},ut=lt.htmlRegion,ct="visible",Se="visibleFirst";ut!=="scroll"&&ut!==Se&&(ut=ct);var He=ut===Se,it=H(Ln,we),Je=H(gn,we),yt=ut===ct?Je:it,$t=He?Je:yt;ot.style.left="auto",ot.style.top="auto",ot.style.right="0",ot.style.bottom="0";var Jt=ot.getBoundingClientRect();ot.style.left=J,ot.style.top=be,ot.style.right=zt,ot.style.bottom=ze,ot.style.overflow=Qe,(rt=ot.parentElement)===null||rt===void 0||rt.removeChild(le);var nn=x(Math.round(Zt/parseFloat(en)*1e3)/1e3),Ht=x(Math.round(En/parseFloat(Bt)*1e3)/1e3);if(nn===0||Ht===0||(0,te.Sh)(Y)&&!(0,ue.Z)(Y))return;var Qt=lt.offset,pn=lt.targetOffset,qt=Ke(bt,Qt),Ye=(0,ae.Z)(qt,2),vt=Ye[0],Ct=Ye[1],_t=Ke(pe,pn),At=(0,ae.Z)(_t,2),kt=At[0],Wt=At[1];pe.x-=kt,pe.y-=Wt;var Kt=lt.points||[],on=(0,ae.Z)(Kt,2),cn=on[0],Wn=on[1],bn=ft(Wn),fn=ft(cn),In=Ue(pe,bn),On=Ue(bt,fn),Zn=(0,v.Z)({},lt),An=In.x-On.x+vt,Mn=In.y-On.y+Ct,Nn=Mr(An,Mn),jn=Mr(An,Mn,Je),zn=Ue(pe,["t","l"]),Dn=Ue(bt,["t","l"]),Bn=Ue(pe,["b","r"]),Sn=Ue(bt,["b","r"]),cr=lt.overflow||{},Tt=cr.adjustX,Fn=cr.adjustY,Kn=cr.shiftX,Dr=cr.shiftY,gr=function(ir){return typeof ir=="boolean"?ir:ir>=0},Or,Cr,_n,wn;Qr();var jt=gr(Fn),Vt=fn[0]===bn[0];if(jt&&fn[0]==="t"&&(Cr>$t.bottom||Ie.current.bt)){var un=Mn;Vt?un-=En-Dt:un=zn.y-Sn.y-Ct;var Cn=Mr(An,un),Vn=Mr(An,un,Je);Cn>Nn||Cn===Nn&&(!He||Vn>=jn)?(Ie.current.bt=!0,Mn=un,Ct=-Ct,Zn.points=[st(fn,0),st(bn,0)]):Ie.current.bt=!1}if(jt&&fn[0]==="b"&&(Or<$t.top||Ie.current.tb)){var tr=Mn;Vt?tr+=En-Dt:tr=Bn.y-Dn.y-Ct;var tn=Mr(An,tr),Yn=Mr(An,tr,Je);tn>Nn||tn===Nn&&(!He||Yn>=jn)?(Ie.current.tb=!0,Mn=tr,Ct=-Ct,Zn.points=[st(fn,0),st(bn,0)]):Ie.current.tb=!1}var vr=gr(Tt),Lr=fn[1]===bn[1];if(vr&&fn[1]==="l"&&(wn>$t.right||Ie.current.rl)){var Br=An;Lr?Br-=Zt-Mt:Br=zn.x-Sn.x-vt;var jr=Mr(Br,Mn),dr=Mr(Br,Mn,Je);jr>Nn||jr===Nn&&(!He||dr>=jn)?(Ie.current.rl=!0,An=Br,vt=-vt,Zn.points=[st(fn,1),st(bn,1)]):Ie.current.rl=!1}if(vr&&fn[1]==="r"&&(_n<$t.left||Ie.current.lr)){var Zr=An;Lr?Zr+=Zt-Mt:Zr=Bn.x-Dn.x-vt;var fr=Mr(Zr,Mn),Nr=Mr(Zr,Mn,Je);fr>Nn||fr===Nn&&(!He||Nr>=jn)?(Ie.current.lr=!0,An=Zr,vt=-vt,Zn.points=[st(fn,1),st(bn,1)]):Ie.current.lr=!1}Qr();var sr=Kn===!0?0:Kn;typeof sr=="number"&&(_n<Je.left&&(An-=_n-Je.left-vt,pe.x+Mt<Je.left+sr&&(An+=pe.x-Je.left+Mt-sr)),wn>Je.right&&(An-=wn-Je.right-vt,pe.x>Je.right-sr&&(An+=pe.x-Je.right+sr)));var ar=Dr===!0?0:Dr;typeof ar=="number"&&(Or<Je.top&&(Mn-=Or-Je.top-Ct,pe.y+Dt<Je.top+ar&&(Mn+=pe.y-Je.top+Dt-ar)),Cr>Je.bottom&&(Mn-=Cr-Je.bottom-Ct,pe.y>Je.bottom-ar&&(Mn+=pe.y-Je.bottom+ar)));var Ar=bt.x+An,Rr=Ar+Zt,Qn=bt.y+Mn,Kr=Qn+En,Fr=pe.x,Gr=Fr+Mt,Ur=pe.y,Jn=Ur+Dt,Si=Math.max(Ar,Fr),vn=Math.min(Rr,Gr),ni=(Si+vn)/2,yi=ni-Ar,_i=Math.max(Qn,Ur),oi=Math.min(Kr,Jn),pi=(_i+oi)/2,hr=pi-Qn;P==null||P(_e,Zn);var Xr=Jt.right-bt.x-(An+bt.width),gi=Jt.bottom-bt.y-(Mn+bt.height);nn===1&&(An=Math.floor(An),Xr=Math.floor(Xr)),Ht===1&&(Mn=Math.floor(Mn),gi=Math.floor(gi));var xi={ready:!0,offsetX:An/nn,offsetY:Mn/Ht,offsetR:Xr/nn,offsetB:gi/Ht,arrowX:yi/nn,arrowY:hr/Ht,scaleX:nn,scaleY:Ht,align:Zn};ye(xi)}}),gt=function(){Te.current+=1;var Oe=Te.current;Promise.resolve().then(function(){Te.current===Oe&&Xe()})},ht=function(){ye(function(Oe){return(0,v.Z)((0,v.Z)({},Oe),{},{ready:!1})})};return(0,y.Z)(ht,[Le]),(0,y.Z)(function(){Re||ht()},[Re]),[de.ready,de.offsetX,de.offsetY,de.offsetR,de.offsetB,de.arrowX,de.arrowY,de.scaleX,de.scaleY,de.align,gt]}var Et=m(77654);function Ne(Re,_e,Y,Le,Ce){(0,y.Z)(function(){if(Re&&_e&&Y){let Te=function(){Le(),Ce()};var B=_e,P=Y,ce=V(B),ve=V(P),de=Q(P),ye=new Set([de].concat((0,Et.Z)(ce),(0,Et.Z)(ve)));return ye.forEach(function(we){we.addEventListener("scroll",Te,{passive:!0})}),de.addEventListener("resize",Te,{passive:!0}),Le(),function(){ye.forEach(function(we){we.removeEventListener("scroll",Te),de.removeEventListener("resize",Te)})}}},[Re,_e,Y])}var St=m(48736);function at(Re,_e,Y,Le,Ce,B,P,ce){var ve=T.useRef(Re);ve.current=Re;var de=T.useRef(!1);T.useEffect(function(){if(_e&&Le&&(!Ce||B)){var Te=function(){de.current=!1},we=function(qe){var rt;ve.current&&!P(((rt=qe.composedPath)===null||rt===void 0||(rt=rt.call(qe))===null||rt===void 0?void 0:rt[0])||qe.target)&&!de.current&&ce(!1)},Ie=Q(Le);Ie.addEventListener("pointerdown",Te,!0),Ie.addEventListener("mousedown",we,!0),Ie.addEventListener("contextmenu",we,!0);var Ae=(0,o.A)(Y);if(Ae&&(Ae.addEventListener("mousedown",we,!0),Ae.addEventListener("contextmenu",we,!0)),0)var Xe,gt,ht,nt;return function(){Ie.removeEventListener("pointerdown",Te,!0),Ie.removeEventListener("mousedown",we,!0),Ie.removeEventListener("contextmenu",we,!0),Ae&&(Ae.removeEventListener("mousedown",we,!0),Ae.removeEventListener("contextmenu",we,!0))}}},[_e,Y,Le,Ce,B]);function ye(){de.current=!0}return ye}var Nt=["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 Ge(){var Re=arguments.length>0&&arguments[0]!==void 0?arguments[0]:fe.Z,_e=T.forwardRef(function(Y,Le){var Ce=Y.prefixCls,B=Ce===void 0?"rc-trigger-popup":Ce,P=Y.children,ce=Y.action,ve=ce===void 0?"hover":ce,de=Y.showAction,ye=Y.hideAction,Te=Y.popupVisible,we=Y.defaultPopupVisible,Ie=Y.onPopupVisibleChange,Ae=Y.afterPopupVisibleChange,Xe=Y.mouseEnterDelay,gt=Y.mouseLeaveDelay,ht=gt===void 0?.1:gt,nt=Y.focusDelay,Oe=Y.blurDelay,qe=Y.mask,rt=Y.maskClosable,ot=rt===void 0?!0:rt,Rt=Y.getPopupContainer,S=Y.forceRender,R=Y.autoDestroy,Ze=Y.destroyPopupOnHide,J=Y.popup,be=Y.popupClassName,zt=Y.popupStyle,ze=Y.popupPlacement,Qe=Y.builtinPlacements,lt=Qe===void 0?{}:Qe,le=Y.popupAlign,pe=Y.zIndex,Pe=Y.stretch,$e=Y.getPopupClassNameFromAlign,G=Y.fresh,bt=Y.alignPoint,xe=Y.onPopupClick,Bt=Y.onPopupAlign,en=Y.arrow,dn=Y.popupMotion,Hn=Y.maskMotion,wt=Y.popupTransitionName,Gt=Y.popupAnimation,mn=Y.maskTransitionName,yn=Y.maskAnimation,rn=Y.className,En=Y.getTriggerDOMNode,Zt=(0,W.Z)(Y,Nt),Dt=R||Ze||!1,Mt=T.useState(!1),gn=(0,ae.Z)(Mt,2),Ln=gn[0],ut=gn[1];(0,y.Z)(function(){ut((0,E.Z)())},[]);var ct=T.useRef({}),Se=T.useContext(Me),He=T.useMemo(function(){return{registerSubPopup:function(Un,rr){ct.current[Un]=rr,Se==null||Se.registerSubPopup(Un,rr)}}},[Se]),it=(0,M.Z)(),Je=T.useState(null),yt=(0,ae.Z)(Je,2),$t=yt[0],Jt=yt[1],nn=T.useRef(null),Ht=(0,C.Z)(function(Rn){nn.current=Rn,(0,te.Sh)(Rn)&&$t!==Rn&&Jt(Rn),Se==null||Se.registerSubPopup(it,Rn)}),Qt=T.useState(null),pn=(0,ae.Z)(Qt,2),qt=pn[0],Ye=pn[1],vt=T.useRef(null),Ct=(0,C.Z)(function(Rn){(0,te.Sh)(Rn)&&qt!==Rn&&(Ye(Rn),vt.current=Rn)}),_t=T.Children.only(P),At=(_t==null?void 0:_t.props)||{},kt={},Wt=(0,C.Z)(function(Rn){var Un,rr,or=qt;return(or==null?void 0:or.contains(Rn))||((Un=(0,o.A)(or))===null||Un===void 0?void 0:Un.host)===Rn||Rn===or||($t==null?void 0:$t.contains(Rn))||((rr=(0,o.A)($t))===null||rr===void 0?void 0:rr.host)===Rn||Rn===$t||Object.values(ct.current).some(function(Sr){return(Sr==null?void 0:Sr.contains(Rn))||Rn===Sr})}),Kt=se(B,dn,Gt,wt),on=se(B,Hn,yn,mn),cn=T.useState(we||!1),Wn=(0,ae.Z)(cn,2),bn=Wn[0],fn=Wn[1],In=Te!=null?Te:bn,On=(0,C.Z)(function(Rn){Te===void 0&&fn(Rn)});(0,y.Z)(function(){fn(Te||!1)},[Te]);var Zn=T.useRef(In);Zn.current=In;var An=T.useRef([]);An.current=[];var Mn=(0,C.Z)(function(Rn){var Un;On(Rn),((Un=An.current[An.current.length-1])!==null&&Un!==void 0?Un:In)!==Rn&&(An.current.push(Rn),Ie==null||Ie(Rn))}),Nn=T.useRef(),jn=function(){clearTimeout(Nn.current)},zn=function(Un){var rr=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0;jn(),rr===0?Mn(Un):Nn.current=setTimeout(function(){Mn(Un)},rr*1e3)};T.useEffect(function(){return jn},[]);var Dn=T.useState(!1),Bn=(0,ae.Z)(Dn,2),Sn=Bn[0],cr=Bn[1];(0,y.Z)(function(Rn){(!Rn||In)&&cr(!0)},[In]);var Tt=T.useState(null),Fn=(0,ae.Z)(Tt,2),Kn=Fn[0],Dr=Fn[1],gr=T.useState(null),Or=(0,ae.Z)(gr,2),Cr=Or[0],_n=Or[1],wn=function(Un){_n([Un.clientX,Un.clientY])},jt=pt(In,$t,bt&&Cr!==null?Cr:qt,ze,lt,le,Bt),Vt=(0,ae.Z)(jt,11),un=Vt[0],Cn=Vt[1],Vn=Vt[2],tr=Vt[3],tn=Vt[4],Yn=Vt[5],vr=Vt[6],Lr=Vt[7],Br=Vt[8],jr=Vt[9],dr=Vt[10],Zr=tt(Ln,ve,de,ye),fr=(0,ae.Z)(Zr,2),Nr=fr[0],sr=fr[1],ar=Nr.has("click"),Ar=sr.has("click")||sr.has("contextMenu"),Rr=(0,C.Z)(function(){Sn||dr()}),Qn=function(){Zn.current&&bt&&Ar&&zn(!1)};Ne(In,qt,$t,Rr,Qn),(0,y.Z)(function(){Rr()},[Cr,ze]),(0,y.Z)(function(){In&&!(lt!=null&<[ze])&&Rr()},[JSON.stringify(le)]);var Kr=T.useMemo(function(){var Rn=L(lt,B,jr,bt);return g()(Rn,$e==null?void 0:$e(jr))},[jr,$e,lt,B,bt]);T.useImperativeHandle(Le,function(){return{nativeElement:vt.current,popupElement:nn.current,forceAlign:Rr}});var Fr=T.useState(0),Gr=(0,ae.Z)(Fr,2),Ur=Gr[0],Jn=Gr[1],Si=T.useState(0),vn=(0,ae.Z)(Si,2),ni=vn[0],yi=vn[1],_i=function(){if(Pe&&qt){var Un=qt.getBoundingClientRect();Jn(Un.width),yi(Un.height)}},oi=function(){_i(),Rr()},pi=function(Un){cr(!1),dr(),Ae==null||Ae(Un)},hr=function(){return new Promise(function(Un){_i(),Dr(function(){return Un})})};(0,y.Z)(function(){Kn&&(dr(),Kn(),Dr(null))},[Kn]);function Xr(Rn,Un,rr,or){kt[Rn]=function(Sr){var Ei;or==null||or(Sr),zn(Un,rr);for(var ri=arguments.length,di=new Array(ri>1?ri-1:0),li=1;li<ri;li++)di[li-1]=arguments[li];(Ei=At[Rn])===null||Ei===void 0||Ei.call.apply(Ei,[At,Sr].concat(di))}}(ar||Ar)&&(kt.onClick=function(Rn){var Un;Zn.current&&Ar?zn(!1):!Zn.current&&ar&&(wn(Rn),zn(!0));for(var rr=arguments.length,or=new Array(rr>1?rr-1:0),Sr=1;Sr<rr;Sr++)or[Sr-1]=arguments[Sr];(Un=At.onClick)===null||Un===void 0||Un.call.apply(Un,[At,Rn].concat(or))});var gi=at(In,Ar,qt,$t,qe,ot,Wt,zn),xi=Nr.has("hover"),Mr=sr.has("hover"),Qr,ii;xi&&(Xr("onMouseEnter",!0,Xe,function(Rn){wn(Rn)}),Xr("onPointerEnter",!0,Xe,function(Rn){wn(Rn)}),Qr=function(Un){(In||Sn)&&$t!==null&&$t!==void 0&&$t.contains(Un.target)&&zn(!0,Xe)},bt&&(kt.onMouseMove=function(Rn){var Un;(Un=At.onMouseMove)===null||Un===void 0||Un.call(At,Rn)})),Mr&&(Xr("onMouseLeave",!1,ht),Xr("onPointerLeave",!1,ht),ii=function(){zn(!1,ht)}),Nr.has("focus")&&Xr("onFocus",!0,nt),sr.has("focus")&&Xr("onBlur",!1,Oe),Nr.has("contextMenu")&&(kt.onContextMenu=function(Rn){var Un;Zn.current&&sr.has("contextMenu")?zn(!1):(wn(Rn),zn(!0)),Rn.preventDefault();for(var rr=arguments.length,or=new Array(rr>1?rr-1:0),Sr=1;Sr<rr;Sr++)or[Sr-1]=arguments[Sr];(Un=At.onContextMenu)===null||Un===void 0||Un.call.apply(Un,[At,Rn].concat(or))}),rn&&(kt.className=g()(At.className,rn));var ir=T.useRef(!1);ir.current||(ir.current=S||In||Sn);var Er=(0,v.Z)((0,v.Z)({},At),kt),kn={},$n=["onContextMenu","onClick","onMouseDown","onTouchStart","onMouseEnter","onMouseLeave","onFocus","onBlur"];$n.forEach(function(Rn){Zt[Rn]&&(kn[Rn]=function(){for(var Un,rr=arguments.length,or=new Array(rr),Sr=0;Sr<rr;Sr++)or[Sr]=arguments[Sr];(Un=Er[Rn])===null||Un===void 0||Un.call.apply(Un,[Er].concat(or)),Zt[Rn].apply(Zt,or)})});var lr=T.cloneElement(_t,(0,v.Z)((0,v.Z)({},Er),kn)),yr={x:Yn,y:vr},Wr=en?(0,v.Z)({},en!==!0?en:{}):null;return T.createElement(T.Fragment,null,T.createElement(q.Z,{disabled:!In,ref:Ct,onResize:oi},T.createElement(ie,{getTriggerDOMNode:En},lr)),ir.current&&T.createElement(Me.Provider,{value:He},T.createElement(re,{portal:Re,ref:Ht,prefixCls:B,popup:J,className:g()(be,Kr),style:zt,target:qt,onMouseEnter:Qr,onMouseLeave:ii,onPointerEnter:Qr,zIndex:pe,open:In,keepDom:Sn,fresh:G,onClick:xe,onPointerDownCapture:gi,mask:qe,motion:Kt,maskMotion:on,onVisibleChanged:pi,onPrepare:hr,forceRender:S,autoDestroy:Dt,getPopupContainer:Rt,align:jr,arrow:Wr,arrowPos:yr,ready:un,offsetX:Cn,offsetY:Vn,offsetR:tr,offsetB:tn,onAlign:Rr,stretch:Pe,targetWidth:Ur/Lr,targetHeight:ni/Br})))});return _e}var je=Ge(fe.Z)},46214:function(){"use strict"},90736:function(ln,mt,m){"use strict";var v=m(59301),ae=m(4977),W=m(7939),fe=Object.defineProperty,z=Object.defineProperties,g=Object.getOwnPropertyDescriptors,q=Object.getOwnPropertySymbols,te=Object.prototype.hasOwnProperty,o=Object.prototype.propertyIsEnumerable,C=(T,k,j)=>k in T?fe(T,k,{enumerable:!0,configurable:!0,writable:!0,value:j}):T[k]=j,M=(T,k)=>{for(var j in k||(k={}))te.call(k,j)&&C(T,j,k[j]);if(q)for(var j of q(k))o.call(k,j)&&C(T,j,k[j]);return T},y=(T,k)=>z(T,g(k));const E=({img:T,buttonProps:k={},styles:j={},customText:Z,ButtonText:U,ButtonClick:A,Buttonclass:K,ButtonTwo:D,imgStyles:O,loading:re=!1,className:oe=""})=>v.createElement("section",{className:`tc animated fadeIn ${oe}`,style:M({color:"#999",margin:"100px auto",visibility:re?"hidden":"visible"},j)},v.createElement("img",{src:T||ae,style:y(M({},O),{pointerEvents:"none",userSelect:"none"})}),v.createElement("p",{className:"mt20 font14"},Z||"\u6682\u65F6\u8FD8\u6CA1\u6709\u76F8\u5173\u6570\u636E\u54E6!"),U&&v.createElement(W.ZP,M({className:K,onClick:A},k),U),D&&D);mt.Z=E},86974:function(ln,mt,m){"use strict";m.d(mt,{Z:function(){return K}});var v=m(59301),ae={wrp:"wrp___dq7YK",bgBlack:"bgBlack___ARIUV",monaco:"monaco___VnZC3",darkBlue:"darkBlue___UprA9",close:"close___LKoWu",showClose:"showClose___edZQA",embed:"embed___hvpEJ"},W=m(7939),fe=m(70557),z=m(34728),g=m(25399),q=m(76406),te=m(84849),o=m(90736),C=m(14185),M=m(52078),y=m(59301),E=Object.defineProperty,T=Object.getOwnPropertySymbols,k=Object.prototype.hasOwnProperty,j=Object.prototype.propertyIsEnumerable,Z=(D,O,re)=>O in D?E(D,O,{enumerable:!0,configurable:!0,writable:!0,value:re}):D[O]=re,U=(D,O)=>{for(var re in O||(O={}))k.call(O,re)&&Z(D,re,O[re]);if(T)for(var re of T(O))j.call(O,re)&&Z(D,re,O[re]);return D},A=(D,O,re)=>new Promise((oe,ie)=>{var Ee=tt=>{try{ke(re.next(tt))}catch(ue){ie(ue)}},Me=tt=>{try{ke(re.throw(tt))}catch(ue){ie(ue)}},ke=tt=>tt.done?oe(tt.value):Promise.resolve(tt.value).then(Ee,Me);ke((re=re.apply(D,O)).next())}),K=({editOffice:D="view",data:O,issaver:re,onSaver:oe,theme:ie,type:Ee,filename:Me,monacoEditor:ke,className:tt,style:ue,close:X,onClose:L,hasMask:se,disabledDownload:Q,onImgDimensions:V,showNodata:x,recordInfo:w})=>{const[H,he]=(0,v.useState)("https://view.officeapps.live.com/op/view.aspx?src=http://testgs.educoder.net//rails/active_storage/blobs/eyJfcmFpbHMiOnsibWVzc2FnZSI6IkJBaHBCZz09IiwiZXhwIjpudWxsLCJwdXIiOiJibG9iX2lkIn19--03541f6234b93d7ac3b2d84e7eb0e6594a952945/1.ppt"),[Ke,ft]=(0,v.useState)(""),[Ue,st]=(0,v.useState)(),pt=window.ENV==="build"?"/react/build":"",Et=location.host.startsWith("localhost")?C.Z.PROXY_SERVER:C.Z.API_SERVER,St=10*(1024*1024),at=(0,v.useRef)();O!=null&&O.startsWith("/api")&&Ee!=="txt"&&(O=C.Z.API_SERVER+O);const Nt=Le=>Le.substring(Le.lastIndexOf("/")+1).split(".").pop();Me&&ke&&(ke.filename=Me),(0,v.useEffect)(()=>{var Le,Ce;const B=(Ce=(Le=document.cookie)==null?void 0:Le.replace(/\s/g,""))==null?void 0:Ce.split(";");B==null||B.map(P=>{let ce=P.split("=");ce[0]==="_educoder_session"&&ft(ce[1])})},[]),(0,v.useEffect)(()=>{Ee==="office"&&(O.indexOf("bigfilescdn.")>-1||O.indexOf("bigfiles1")>-1?st({url:O,fileType:Nt(O),model:O.indexOf("model=edit")?"edit":"view"}):O.indexOf("coze")>-1?st({url:O,fileType:"doc",model:"view"}):je())},[Ee,O]);function Ge(Le){return A(this,null,function*(){Le.data.type==="pdfdata"&&(oe(Le.data.data),window.removeEventListener("message",Ge,!1)),console.log("mess---:",Le.data)})}const je=()=>A(void 0,null,function*(){console.log("data:",O);let Le=O;O.startsWith("http")||(Le=location.origin+Le);let Ce=new URL(Le).pathname.split("/").pop();const B=yield(0,te.gJ)({attachment_id:Ce});B.url=Et+B.url,st(B)}),Re=()=>{if(O.startsWith("http")||O.startsWith("blob:")){_e();return}(0,q.Sv)(Me||"educoder",O,Me)},_e=()=>{w&&(0,M.fc)({id:w==null?void 0:w.id,watch_type:1,course_id:w==null?void 0:w.course_id}),(0,q.Nd)(Me||"educoder",decodeURIComponent(O))};(0,v.useEffect)(()=>(window.addEventListener("message",Y),()=>{window.removeEventListener("message",Y)}),[]);const Y=Le=>{var Ce;((Ce=Le==null?void 0:Le.data)==null?void 0:Ce.type)==="closePop"&&L()};return y.createElement("div",{style:U({},ue||{}),className:`${se&&ae.bgBlack} ${Ee?ae.wrp:"hide"}`},!!Ee&&X&&y.createElement("div",{id:"closePop",className:ae.close,ref:at},!!V&&y.createElement(g.Z,{title:"\u70B9\u51FB\u5BF9\u56FE\u7247\u8FDB\u884C\u6279\u6CE8",getPopupContainer:()=>at.current},y.createElement("span",{onClick:()=>{L(),V()}},y.createElement("i",{className:"icon-yulanpizhu"}))),!Q&&window.parent===window&&y.createElement(g.Z,{title:"\u70B9\u51FB\u4E0B\u8F7D\u6B64\u6587\u4EF6",getPopupContainer:()=>at.current},y.createElement("span",{onClick:_e},y.createElement("i",{className:"icon-quxiaozhiding"}))),re&&y.createElement(g.Z,{title:"\u4FDD\u5B58pdf\u5E76\u9000\u51FA",getPopupContainer:()=>at.current},y.createElement("span",{className:"",onClick:()=>{const Le=document.getElementById("pdfiframe");window.addEventListener("message",Ge,!1),setTimeout(()=>{Le.contentWindow.postMessage("getData","*")},300)}},y.createElement("i",{className:"icon-baocun"}))),y.createElement(g.Z,{title:"\u5173\u95ED",getPopupContainer:()=>at.current},y.createElement("span",{className:"",onClick:()=>{L()}},y.createElement("i",{className:"icon-guanbi1"})))),y.createElement("div",{className:`${ae[tt]} ${tt} ${ae.monaco} ${Ee==="txt"?"show":"hide"}`},Ee==="txt"&&y.createElement(y.Fragment,null,y.createElement(z.ZP,U({},ke)))),Ee==="audio"&&y.createElement("audio",{controls:!0,src:`${(O==null?void 0:O.indexOf("http://"))>-1||(O==null?void 0:O.indexOf("https://"))>-1?"":"data:audio/mp3;base64,"}${O}`,autoPlay:!0}),Ee==="video"&&y.createElement(y.Fragment,null,(O==null?void 0:O.indexOf("http"))>-1?y.createElement("video",{controls:!0,src:`${O}`,autoPlay:!0}):y.createElement("video",{controls:!0,src:`data:video/mp4;base64,${O}`,autoPlay:!0})),Ee==="office"&&Ue&&y.createElement("iframe",{src:`${pt}/office.html?key=${Ue.key}&url=${btoa(Ue.url)}&callbackUrl=${Et+(Ue.callbackUrl||"")}&fileType=${Ue.fileType}&title=${Ue.title||""}&model=${D}&officeServer=${C.Z.ONLYOFFICE}&disabledDownload=${!!Q}`}),Ee==="html"&&y.createElement("iframe",{src:O+"&disposition=inline"}),Ee==="pdf"&&y.createElement("iframe",{id:"pdfiframe",src:`${pt}/js/pdf/index.html?filename=${Me||"educoder.pdf"}&url=${encodeURIComponent(O)}&disabledDownload=${!!Q}&model=${D}`}),Ee==="image"&&y.createElement("img",{src:`${(O==null?void 0:O.indexOf("http://"))>-1||(O==null?void 0:O.indexOf("https://"))>-1?"":"data:image/png;base64,"}${O}`}),(Ee==="other"||Ee==="download")&&y.createElement(y.Fragment,null,x?y.createElement(o.Z,{customText:"\u5F53\u524D\u6587\u4EF6\u4E0D\u652F\u6301\u9884\u89C8\uFF0C\u53EF\u70B9\u51FB\u4E0B\u8F7D\u67E5\u770B",ButtonTwo:y.createElement(W.ZP,{icon:y.createElement("i",{className:"iconfont icon-xiazai4 font14"}),type:"primary",size:"middle",onClick:Re,disabled:Q},"\u4E0B\u8F7D")}):y.createElement(W.ZP,{type:"primary",size:"middle",onClick:Re,disabled:Q},y.createElement(fe.Z,null),"\u70B9\u51FB\u4E0B\u8F7D")),Ee==="flowChart"&&y.createElement("div",{className:"embed"},y.createElement("iframe",{src:`/drawio/src/main/webapp/viewer.html?id=${O||""}&gapi=0&od=0&db=0&gh=0&gl=0`,width:"100%",height:"100%",frameBorder:"0"})))}},35883:function(ln,mt,m){"use strict";m.d(mt,{z:function(){return ke},Z:function(){return tt}});var v=m(59301),ae=m(46214),W=m(20047),fe=m(64018),z=m(16471),g=m(14185),q=m(76406),te=m(15342),o=m(44104),C=m(7939),M=m(1012),y=m(86974),E=m(59301),k=({html:ue})=>{const X=(0,v.useRef)(null),L=(0,v.useRef)(null),se=`.markdown-body p {
|
|
|
margin: 0 0 16px 0 !important;
|
|
|
line-height: 28px;
|
|
|
white-space: pre-wrap;
|
|
|
}
|
|
|
|
|
|
ol,
|
|
|
ul,
|
|
|
li {
|
|
|
list-style-type: none
|
|
|
}
|
|
|
|
|
|
ol,
|
|
|
ul,
|
|
|
dl {
|
|
|
margin-bottom: 0px;
|
|
|
}
|
|
|
|
|
|
.markdown-body {
|
|
|
-ms-text-size-adjust: 100%;
|
|
|
-webkit-text-size-adjust: 100%;
|
|
|
color: #333;
|
|
|
overflow: hidden;
|
|
|
font-family: "Microsoft YaHei", Helvetica, "Meiryo UI", "Malgun Gothic", "Segoe UI", "Trebuchet MS", "Monaco", monospace, Tahoma, STXihei, "\u534E\u6587\u7EC6\u9ED1", STHeiti, "Helvetica Neue", "Droid Sans", "wenquanyi micro hei", FreeSans, Arimo, Arial, SimSun, "\u5B8B\u4F53", Heiti, "\u9ED1\u4F53", sans-serif;
|
|
|
word-break: break-word;
|
|
|
font-size: 16px;
|
|
|
line-height: 1.6;
|
|
|
white-space: normal;
|
|
|
word-wrap: break-word;
|
|
|
position: relative;
|
|
|
}
|
|
|
|
|
|
.markdown-body ul>li {
|
|
|
list-style-type: disc;
|
|
|
}
|
|
|
|
|
|
.markdown-body ol>li {
|
|
|
list-style-type: decimal;
|
|
|
}
|
|
|
|
|
|
.markdown-body a {
|
|
|
background: transparent;
|
|
|
}
|
|
|
|
|
|
.markdown-body a:active,
|
|
|
.markdown-body a:hover {
|
|
|
outline: 0;
|
|
|
}
|
|
|
|
|
|
.markdown-body strong {
|
|
|
font-weight: bold;
|
|
|
}
|
|
|
|
|
|
.markdown-body h1 {
|
|
|
font-size: 2em;
|
|
|
margin: 0.67em 0;
|
|
|
}
|
|
|
|
|
|
.markdown-body img {
|
|
|
border: 0;
|
|
|
}
|
|
|
|
|
|
.markdown-body hr {
|
|
|
-moz-box-sizing: content-box;
|
|
|
box-sizing: content-box;
|
|
|
height: 0;
|
|
|
}
|
|
|
|
|
|
.markdown-body pre {
|
|
|
overflow: auto;
|
|
|
}
|
|
|
|
|
|
.markdown-body code,
|
|
|
.markdown-body kbd,
|
|
|
.markdown-body pre {
|
|
|
font-family: "Meiryo UI", "YaHei Consolas Hybrid", Consolas, "Malgun Gothic", "Segoe UI", "Trebuchet MS", Helvetica, monospace, monospace;
|
|
|
font-size: 1em;
|
|
|
}
|
|
|
|
|
|
.markdown-body input {
|
|
|
color: inherit;
|
|
|
font: inherit;
|
|
|
margin: 0;
|
|
|
}
|
|
|
|
|
|
.markdown-body html input[disabled] {
|
|
|
cursor: default;
|
|
|
}
|
|
|
|
|
|
.markdown-body input {
|
|
|
line-height: normal;
|
|
|
}
|
|
|
|
|
|
.markdown-body input[type="checkbox"] {
|
|
|
-moz-box-sizing: border-box;
|
|
|
box-sizing: border-box;
|
|
|
padding: 0;
|
|
|
}
|
|
|
|
|
|
.markdown-body table {
|
|
|
border-collapse: collapse;
|
|
|
border-spacing: 0;
|
|
|
}
|
|
|
|
|
|
.markdown-body td,
|
|
|
.markdown-body th {
|
|
|
padding: 0;
|
|
|
}
|
|
|
|
|
|
.markdown-body * {
|
|
|
-moz-box-sizing: border-box;
|
|
|
box-sizing: border-box;
|
|
|
}
|
|
|
|
|
|
.markdown-body input {
|
|
|
font: 13px/1.4 Helvetica, arial, freesans, clean, sans-serif, "Segoe UI Emoji", "Segoe UI Symbol";
|
|
|
}
|
|
|
|
|
|
.markdown-body a {
|
|
|
color: #4183c4;
|
|
|
text-decoration: none;
|
|
|
}
|
|
|
|
|
|
.markdown-body a:hover,
|
|
|
.markdown-body a:active {
|
|
|
text-decoration: underline;
|
|
|
}
|
|
|
|
|
|
.markdown-body hr {
|
|
|
height: 0;
|
|
|
margin: 15px 0;
|
|
|
overflow: hidden;
|
|
|
background: transparent;
|
|
|
border: 0;
|
|
|
border-bottom: 1px solid #ddd;
|
|
|
}
|
|
|
|
|
|
.markdown-body hr:before {
|
|
|
display: table;
|
|
|
content: "";
|
|
|
}
|
|
|
|
|
|
.markdown-body hr:after {
|
|
|
display: table;
|
|
|
clear: both;
|
|
|
content: "";
|
|
|
}
|
|
|
|
|
|
.markdown-body h1,
|
|
|
.markdown-body h2,
|
|
|
.markdown-body h3,
|
|
|
.markdown-body h4,
|
|
|
.markdown-body h5,
|
|
|
.markdown-body h6 {
|
|
|
margin-top: 15px;
|
|
|
margin-bottom: 15px;
|
|
|
line-height: 1.1;
|
|
|
}
|
|
|
|
|
|
.markdown-body h1 {
|
|
|
font-size: 30px;
|
|
|
}
|
|
|
|
|
|
.markdown-body h2 {
|
|
|
font-size: 21px;
|
|
|
}
|
|
|
|
|
|
.markdown-body h3 {
|
|
|
font-size: 16px;
|
|
|
}
|
|
|
|
|
|
.markdown-body h4 {
|
|
|
font-size: 14px;
|
|
|
}
|
|
|
|
|
|
.markdown-body h5 {
|
|
|
font-size: 12px;
|
|
|
}
|
|
|
|
|
|
.markdown-body h6 {
|
|
|
font-size: 11px;
|
|
|
}
|
|
|
|
|
|
.markdown-body blockquote {
|
|
|
margin: 0;
|
|
|
}
|
|
|
|
|
|
.markdown-body ul,
|
|
|
.markdown-body ol {
|
|
|
padding: 0;
|
|
|
margin-top: 0;
|
|
|
margin-bottom: 0;
|
|
|
}
|
|
|
|
|
|
ul.linenums,
|
|
|
ol.linenums {
|
|
|
padding: 16px 0 0 56px !important;
|
|
|
}
|
|
|
|
|
|
.markdown-body ul,
|
|
|
.markdown-body ol {
|
|
|
padding-left: 2em;
|
|
|
}
|
|
|
|
|
|
|
|
|
.markdown-body ol ol,
|
|
|
.markdown-body ul ol {
|
|
|
list-style-type: lower-roman;
|
|
|
}
|
|
|
|
|
|
.markdown-body ul ul ol,
|
|
|
.markdown-body ul ol ol,
|
|
|
.markdown-body ol ul ol,
|
|
|
.markdown-body ol ol ol {
|
|
|
list-style-type: lower-alpha;
|
|
|
}
|
|
|
|
|
|
.markdown-body dd {
|
|
|
margin-left: 0;
|
|
|
}
|
|
|
|
|
|
.markdown-body code {
|
|
|
font-family: Consolas, "Liberation Mono", Menlo, Courier, monospace;
|
|
|
font-size: 12px;
|
|
|
}
|
|
|
|
|
|
.markdown-body pre {
|
|
|
margin-top: 0;
|
|
|
margin-bottom: 0;
|
|
|
font: 12px Consolas, "Liberation Mono", Menlo, Courier, monospace;
|
|
|
}
|
|
|
|
|
|
.markdown-body .octicon {
|
|
|
font: normal normal 16px octicons-anchor;
|
|
|
line-height: 1;
|
|
|
display: inline-block;
|
|
|
text-decoration: none;
|
|
|
-webkit-font-smoothing: antialiased;
|
|
|
-moz-osx-font-smoothing: grayscale;
|
|
|
-webkit-user-select: none;
|
|
|
-moz-user-select: none;
|
|
|
-ms-user-select: none;
|
|
|
user-select: none;
|
|
|
}
|
|
|
|
|
|
.markdown-body .octicon-link:before {
|
|
|
content: '\f05c';
|
|
|
}
|
|
|
|
|
|
.markdown-body>*:first-child {
|
|
|
margin-top: 0 !important;
|
|
|
}
|
|
|
|
|
|
.markdown-body>*:last-child {
|
|
|
margin-bottom: 0 !important;
|
|
|
}
|
|
|
|
|
|
.markdown-body .anchor {
|
|
|
position: absolute;
|
|
|
top: 0;
|
|
|
left: 0;
|
|
|
display: block;
|
|
|
padding-right: 6px;
|
|
|
padding-left: 30px;
|
|
|
margin-left: -30px;
|
|
|
}
|
|
|
|
|
|
.markdown-body .anchor:focus {
|
|
|
outline: none;
|
|
|
}
|
|
|
|
|
|
.markdown-body h1,
|
|
|
.markdown-body h2,
|
|
|
.markdown-body h3,
|
|
|
.markdown-body h4,
|
|
|
.markdown-body h5,
|
|
|
.markdown-body h6 {
|
|
|
position: relative;
|
|
|
margin-top: 1em;
|
|
|
margin-bottom: 16px;
|
|
|
font-weight: bold;
|
|
|
line-height: 1.4;
|
|
|
}
|
|
|
|
|
|
.markdown-body h1 .octicon-link,
|
|
|
.markdown-body h2 .octicon-link,
|
|
|
.markdown-body h3 .octicon-link,
|
|
|
.markdown-body h4 .octicon-link,
|
|
|
.markdown-body h5 .octicon-link,
|
|
|
.markdown-body h6 .octicon-link {
|
|
|
display: none;
|
|
|
color: #000;
|
|
|
vertical-align: middle;
|
|
|
}
|
|
|
|
|
|
.markdown-body h1:hover .anchor,
|
|
|
.markdown-body h2:hover .anchor,
|
|
|
.markdown-body h3:hover .anchor,
|
|
|
.markdown-body h4:hover .anchor,
|
|
|
.markdown-body h5:hover .anchor,
|
|
|
.markdown-body h6:hover .anchor {
|
|
|
padding-left: 8px;
|
|
|
margin-left: -30px;
|
|
|
text-decoration: none;
|
|
|
}
|
|
|
|
|
|
.markdown-body h1:hover .anchor .octicon-link,
|
|
|
.markdown-body h2:hover .anchor .octicon-link,
|
|
|
.markdown-body h3:hover .anchor .octicon-link,
|
|
|
.markdown-body h4:hover .anchor .octicon-link,
|
|
|
.markdown-body h5:hover .anchor .octicon-link,
|
|
|
.markdown-body h6:hover .anchor .octicon-link {
|
|
|
display: inline-block;
|
|
|
}
|
|
|
|
|
|
.markdown-body h1 {
|
|
|
padding-bottom: 0.3em;
|
|
|
font-size: 2.25em;
|
|
|
line-height: 1.2;
|
|
|
border-bottom: 1px solid #eee;
|
|
|
}
|
|
|
|
|
|
.markdown-body h1 .anchor {
|
|
|
line-height: 1;
|
|
|
}
|
|
|
|
|
|
.markdown-body h2 {
|
|
|
padding-bottom: 0.3em;
|
|
|
font-size: 1.75em;
|
|
|
line-height: 1.225;
|
|
|
border-bottom: 1px solid #eee;
|
|
|
}
|
|
|
|
|
|
.markdown-body h2 .anchor {
|
|
|
line-height: 1;
|
|
|
}
|
|
|
|
|
|
.markdown-body h3 {
|
|
|
font-size: 1.5em;
|
|
|
line-height: 1.43;
|
|
|
}
|
|
|
|
|
|
.markdown-body h3 .anchor {
|
|
|
line-height: 1.2;
|
|
|
}
|
|
|
|
|
|
.markdown-body h4 {
|
|
|
font-size: 1.25em;
|
|
|
}
|
|
|
|
|
|
.markdown-body h4 .anchor {
|
|
|
line-height: 1.2;
|
|
|
}
|
|
|
|
|
|
.markdown-body h5 {
|
|
|
font-size: 1em;
|
|
|
}
|
|
|
|
|
|
.markdown-body h5 .anchor {
|
|
|
line-height: 1.1;
|
|
|
}
|
|
|
|
|
|
.markdown-body h6 {
|
|
|
font-size: 1em;
|
|
|
color: #777;
|
|
|
}
|
|
|
|
|
|
.markdown-body h6 .anchor {
|
|
|
line-height: 1.1;
|
|
|
}
|
|
|
|
|
|
.markdown-body p,
|
|
|
.markdown-body blockquote,
|
|
|
.markdown-body ul,
|
|
|
.markdown-body ol,
|
|
|
.markdown-body dl,
|
|
|
.markdown-body table,
|
|
|
.markdown-body pre {
|
|
|
margin-top: 0;
|
|
|
margin-bottom: 16px;
|
|
|
}
|
|
|
|
|
|
.markdown-body ul ul,
|
|
|
.markdown-body ul ol,
|
|
|
.markdown-body ol ol,
|
|
|
.markdown-body ol ul {
|
|
|
margin-top: 0;
|
|
|
margin-bottom: 0;
|
|
|
}
|
|
|
|
|
|
.markdown-body li>p {
|
|
|
margin-top: 16px;
|
|
|
}
|
|
|
|
|
|
.markdown-body dl {
|
|
|
padding: 0;
|
|
|
}
|
|
|
|
|
|
.markdown-body dl dt {
|
|
|
padding: 0;
|
|
|
margin-top: 16px;
|
|
|
font-size: 1em;
|
|
|
font-style: italic;
|
|
|
font-weight: bold;
|
|
|
}
|
|
|
|
|
|
.markdown-body dl dd {
|
|
|
padding: 0 16px;
|
|
|
margin-bottom: 16px;
|
|
|
}
|
|
|
|
|
|
.markdown-body blockquote {
|
|
|
padding: 0 15px;
|
|
|
color: #777;
|
|
|
border-left: 4px solid #ddd;
|
|
|
}
|
|
|
|
|
|
.markdown-body blockquote> :first-child {
|
|
|
margin-top: 0;
|
|
|
}
|
|
|
|
|
|
.markdown-body blockquote> :last-child {
|
|
|
margin-bottom: 0;
|
|
|
}
|
|
|
|
|
|
.markdown-body table {
|
|
|
display: block;
|
|
|
width: 100%;
|
|
|
overflow: auto;
|
|
|
word-break: normal;
|
|
|
word-break: keep-all;
|
|
|
}
|
|
|
|
|
|
.markdown-body table th {
|
|
|
font-weight: bold;
|
|
|
text-align: revert;
|
|
|
}
|
|
|
|
|
|
.markdown-body table th,
|
|
|
.markdown-body table td {
|
|
|
padding: 6px 13px;
|
|
|
border: 1px solid #ddd;
|
|
|
}
|
|
|
|
|
|
.markdown-body table tr {
|
|
|
background-color: #fff;
|
|
|
border-top: 1px solid #ccc;
|
|
|
}
|
|
|
|
|
|
.markdown-body table tr:nth-child(2n) {
|
|
|
background-color: #f8f8f8;
|
|
|
}
|
|
|
|
|
|
.markdown-body img {
|
|
|
max-width: 100%;
|
|
|
-moz-box-sizing: border-box;
|
|
|
box-sizing: border-box;
|
|
|
}
|
|
|
|
|
|
.markdown-body code {
|
|
|
padding: 0;
|
|
|
padding-top: 0.2em;
|
|
|
padding-bottom: 0.2em;
|
|
|
margin: 0;
|
|
|
font-size: 85%;
|
|
|
background-color: rgba(0, 0, 0, 0.04);
|
|
|
border-radius: 3px;
|
|
|
}
|
|
|
|
|
|
.markdown-body code:has(.katex) {
|
|
|
background-color: transparent;
|
|
|
}
|
|
|
|
|
|
.markdown-body code:before,
|
|
|
.markdown-body code:after {
|
|
|
letter-spacing: -0.2em;
|
|
|
content: "\\00a0";
|
|
|
}
|
|
|
|
|
|
.markdown-body pre>code {
|
|
|
padding: 0;
|
|
|
margin: 0;
|
|
|
font-size: 100%;
|
|
|
word-break: normal;
|
|
|
white-space: pre;
|
|
|
background: transparent;
|
|
|
border: 0;
|
|
|
}
|
|
|
|
|
|
.markdown-body .highlight {
|
|
|
margin-bottom: 16px;
|
|
|
}
|
|
|
|
|
|
.markdown-body .highlight pre,
|
|
|
.markdown-body pre {
|
|
|
padding: 16px;
|
|
|
overflow: auto;
|
|
|
font-size: 85%;
|
|
|
line-height: 1.45;
|
|
|
background-color: #f7f7f7;
|
|
|
border-radius: 3px;
|
|
|
}
|
|
|
|
|
|
.markdown-body .highlight pre {
|
|
|
margin-bottom: 0;
|
|
|
word-break: normal;
|
|
|
}
|
|
|
|
|
|
.markdown-body pre {
|
|
|
word-wrap: normal;
|
|
|
}
|
|
|
|
|
|
.markdown-body pre code {
|
|
|
display: inline;
|
|
|
max-width: initial;
|
|
|
padding: 0;
|
|
|
margin: 0;
|
|
|
overflow: initial;
|
|
|
line-height: inherit;
|
|
|
word-wrap: normal;
|
|
|
background-color: transparent;
|
|
|
border: 0;
|
|
|
}
|
|
|
|
|
|
.markdown-body pre code:before,
|
|
|
.markdown-body pre code:after {
|
|
|
content: normal;
|
|
|
}
|
|
|
|
|
|
.markdown-body kbd {
|
|
|
display: inline-block;
|
|
|
padding: 3px 5px;
|
|
|
font-size: 11px;
|
|
|
line-height: 10px;
|
|
|
color: #555;
|
|
|
vertical-align: middle;
|
|
|
background-color: #fcfcfc;
|
|
|
border: solid 1px #ccc;
|
|
|
border-bottom-color: #bbb;
|
|
|
border-radius: 3px;
|
|
|
box-shadow: inset 0 -1px 0 #bbb;
|
|
|
}
|
|
|
|
|
|
.markdown-body .pl-c {
|
|
|
color: #969896;
|
|
|
}
|
|
|
|
|
|
.markdown-body .pl-c1,
|
|
|
.markdown-body .pl-mdh,
|
|
|
.markdown-body .pl-mm,
|
|
|
.markdown-body .pl-mp,
|
|
|
.markdown-body .pl-mr,
|
|
|
.markdown-body .pl-s1 .pl-v,
|
|
|
.markdown-body .pl-s3,
|
|
|
.markdown-body .pl-sc,
|
|
|
.markdown-body .pl-sv {
|
|
|
color: #0086b3;
|
|
|
}
|
|
|
|
|
|
.markdown-body .pl-e,
|
|
|
.markdown-body .pl-en {
|
|
|
color: #795da3;
|
|
|
}
|
|
|
|
|
|
.markdown-body .pl-s1 .pl-s2,
|
|
|
.markdown-body .pl-smi,
|
|
|
.markdown-body .pl-smp,
|
|
|
.markdown-body .pl-stj,
|
|
|
.markdown-body .pl-vo,
|
|
|
.markdown-body .pl-vpf {
|
|
|
color: #333;
|
|
|
}
|
|
|
|
|
|
.markdown-body .pl-ent {
|
|
|
color: #63a35c;
|
|
|
}
|
|
|
|
|
|
.markdown-body .pl-k,
|
|
|
.markdown-body .pl-s,
|
|
|
.markdown-body .pl-st {
|
|
|
color: #a71d5d;
|
|
|
}
|
|
|
|
|
|
.markdown-body .pl-pds,
|
|
|
.markdown-body .pl-s1,
|
|
|
.markdown-body .pl-s1 .pl-pse .pl-s2,
|
|
|
.markdown-body .pl-sr,
|
|
|
.markdown-body .pl-sr .pl-cce,
|
|
|
.markdown-body .pl-sr .pl-sra,
|
|
|
.markdown-body .pl-sr .pl-sre,
|
|
|
.markdown-body .pl-src {
|
|
|
color: #df5000;
|
|
|
}
|
|
|
|
|
|
.markdown-body .pl-mo,
|
|
|
.markdown-body .pl-v {
|
|
|
color: #1d3e81;
|
|
|
}
|
|
|
|
|
|
.markdown-body .pl-id {
|
|
|
color: #b52a1d;
|
|
|
}
|
|
|
|
|
|
.markdown-body .pl-ii {
|
|
|
background-color: #b52a1d;
|
|
|
color: #f8f8f8;
|
|
|
}
|
|
|
|
|
|
.markdown-body .pl-sr .pl-cce {
|
|
|
color: #63a35c;
|
|
|
font-weight: bold;
|
|
|
}
|
|
|
|
|
|
.markdown-body .pl-ml {
|
|
|
color: #693a17;
|
|
|
}
|
|
|
|
|
|
.markdown-body .pl-mh,
|
|
|
.markdown-body .pl-mh .pl-en,
|
|
|
.markdown-body .pl-ms {
|
|
|
color: #1d3e81;
|
|
|
font-weight: bold;
|
|
|
}
|
|
|
|
|
|
.markdown-body .pl-mq {
|
|
|
color: #008080;
|
|
|
}
|
|
|
|
|
|
.markdown-body .pl-mi {
|
|
|
color: #333;
|
|
|
font-style: italic;
|
|
|
}
|
|
|
|
|
|
.markdown-body .pl-mb {
|
|
|
color: #333;
|
|
|
font-weight: bold;
|
|
|
}
|
|
|
|
|
|
.markdown-body .pl-md,
|
|
|
.markdown-body .pl-mdhf {
|
|
|
background-color: #ffecec;
|
|
|
color: #bd2c00;
|
|
|
}
|
|
|
|
|
|
.markdown-body .pl-mdht,
|
|
|
.markdown-body .pl-mi1 {
|
|
|
background-color: #eaffea;
|
|
|
color: #55a532;
|
|
|
}
|
|
|
|
|
|
.markdown-body .pl-mdr {
|
|
|
color: #795da3;
|
|
|
font-weight: bold;
|
|
|
}
|
|
|
|
|
|
.markdown-body kbd {
|
|
|
display: inline-block;
|
|
|
padding: 3px 5px;
|
|
|
font: 11px Consolas, "Liberation Mono", Menlo, Courier, monospace;
|
|
|
line-height: 10px;
|
|
|
color: #555;
|
|
|
vertical-align: middle;
|
|
|
background-color: #fcfcfc;
|
|
|
border: solid 1px #ccc;
|
|
|
border-bottom-color: #bbb;
|
|
|
border-radius: 3px;
|
|
|
box-shadow: inset 0 -1px 0 #bbb;
|
|
|
}
|
|
|
|
|
|
.markdown-body .task-list-item {
|
|
|
list-style-type: none;
|
|
|
}
|
|
|
|
|
|
.markdown-body .task-list-item+.task-list-item {
|
|
|
margin-top: 3px;
|
|
|
}
|
|
|
|
|
|
.markdown-body .task-list-item input {
|
|
|
float: left;
|
|
|
margin: 0.3em 0 0.25em -1.6em;
|
|
|
vertical-align: middle;
|
|
|
}
|
|
|
|
|
|
.markdown-body :checked+.radio-label {
|
|
|
z-index: 1;
|
|
|
position: relative;
|
|
|
border-color: #4183c4;
|
|
|
}
|
|
|
|
|
|
|
|
|
/*! Pretty printing styles. Used with prettify.js. */
|
|
|
/* SPAN elements with the classes below are added by prettyprint. */
|
|
|
.pln {
|
|
|
color: #000
|
|
|
}
|
|
|
|
|
|
/* plain text */
|
|
|
|
|
|
@media screen {
|
|
|
.str {
|
|
|
color: #080
|
|
|
}
|
|
|
|
|
|
/* string content */
|
|
|
.kwd {
|
|
|
color: #008
|
|
|
}
|
|
|
|
|
|
/* a keyword */
|
|
|
.com {
|
|
|
color: #800
|
|
|
}
|
|
|
|
|
|
/* a comment */
|
|
|
.typ {
|
|
|
color: #606
|
|
|
}
|
|
|
|
|
|
/* a type name */
|
|
|
.lit {
|
|
|
color: #066
|
|
|
}
|
|
|
|
|
|
/* a literal value */
|
|
|
/* punctuation, lisp open bracket, lisp close bracket */
|
|
|
.pun,
|
|
|
.opn,
|
|
|
.clo {
|
|
|
color: #660
|
|
|
}
|
|
|
|
|
|
.tag {
|
|
|
color: #008
|
|
|
}
|
|
|
|
|
|
/* a markup tag name */
|
|
|
.atn {
|
|
|
color: #606
|
|
|
}
|
|
|
|
|
|
/* a markup attribute name */
|
|
|
.atv {
|
|
|
color: #080
|
|
|
}
|
|
|
|
|
|
/* a markup attribute value */
|
|
|
.dec,
|
|
|
.var {
|
|
|
color: #606
|
|
|
}
|
|
|
|
|
|
/* a declaration; a variable name */
|
|
|
.fun {
|
|
|
color: red
|
|
|
}
|
|
|
|
|
|
/* a function name */
|
|
|
}
|
|
|
|
|
|
/* Use higher contrast and text-weight for printable form. */
|
|
|
@media print,
|
|
|
projection {
|
|
|
.str {
|
|
|
color: #060
|
|
|
}
|
|
|
|
|
|
.kwd {
|
|
|
color: #006;
|
|
|
font-weight: bold
|
|
|
}
|
|
|
|
|
|
.com {
|
|
|
color: #600;
|
|
|
font-style: italic
|
|
|
}
|
|
|
|
|
|
.typ {
|
|
|
color: #404;
|
|
|
font-weight: bold
|
|
|
}
|
|
|
|
|
|
.lit {
|
|
|
color: #044
|
|
|
}
|
|
|
|
|
|
.pun,
|
|
|
.opn,
|
|
|
.clo {
|
|
|
color: #440
|
|
|
}
|
|
|
|
|
|
.tag {
|
|
|
color: #006;
|
|
|
font-weight: bold
|
|
|
}
|
|
|
|
|
|
.atn {
|
|
|
color: #404
|
|
|
}
|
|
|
|
|
|
.atv {
|
|
|
color: #060
|
|
|
}
|
|
|
}
|
|
|
|
|
|
/* Put a border around prettyprinted code snippets. */
|
|
|
pre.prettyprint {
|
|
|
padding: 2px;
|
|
|
/* border: 1px solid #888 */
|
|
|
}
|
|
|
|
|
|
/* Specify class=linenums on a pre to get line numbering */
|
|
|
ol.linenums {
|
|
|
margin-top: 0;
|
|
|
margin-bottom: 0
|
|
|
}
|
|
|
|
|
|
/* IE indents via margin-left */
|
|
|
li.L0,
|
|
|
li.L1,
|
|
|
li.L2,
|
|
|
li.L3,
|
|
|
li.L5,
|
|
|
li.L6,
|
|
|
li.L7,
|
|
|
li.L8 {
|
|
|
list-style-type: none
|
|
|
}
|
|
|
|
|
|
/* Alternate shading for lines */
|
|
|
li.L1,
|
|
|
li.L3,
|
|
|
li.L5,
|
|
|
li.L7,
|
|
|
li.L9 {
|
|
|
background: #eee
|
|
|
}
|
|
|
|
|
|
.markdown-body p,
|
|
|
.markdown-body blockquote,
|
|
|
.markdown-body ul,
|
|
|
.markdown-body ol,
|
|
|
.markdown-body dl,
|
|
|
.markdown-body table,
|
|
|
.markdown-body pre {
|
|
|
margin-top: 0;
|
|
|
margin-bottom: 16px;
|
|
|
}`;return(0,v.useEffect)(()=>{const Q=X.current.attachShadow({mode:"open"});L.current=document.createElement("div"),L.current.className="markdown-body",L.current.innerHTML=ue,Q.appendChild(L.current);const V=document.createElement("style");return V.textContent=se,Q.appendChild(V),()=>{Q.innerHTML=""}},[]),(0,v.useEffect)(()=>{L.current&&(L.current.innerHTML=ue)},[ue]),E.createElement("div",{ref:X})};function j(ue){const X=["onabort","onanimationend","onanimationiteration","onanimationstart","onauxclick","onblur","oncancel","oncanplay","oncanplaythrough","onchange","onclick","onclose","oncontextmenu","oncopy","oncut","ondblclick","ondrag","ondragend","ondragenter","ondragleave","ondragover","ondragstart","ondrop","ondurationchange","onemptied","onended","onerror","onfocus","onformdata","ongotpointercapture","oninput","oninvalid","onkeydown","onkeypress","onkeyup","onload","onloadeddata","onloadedmetadata","onloadstart","onlostpointercapture","onmousedown","onmousemove","onmouseout","onmouseover","onmouseup","onpaste","onpause","onplay","onplaying","onpointercancel","onpointerdown","onpointerenter","onpointerleave","onpointermove","onpointerout","onpointerover","onpointerup","onprogress","onratechange","onreset","onresize","onscroll","onsecuritypolicyviolation","onseeked","onseeking","onselect","onslotchange","onstalled","onsubmit","onsuspend","ontimeupdate","ontoggle","ontouchcancel","ontouchend","ontouchmove","ontouchstart","ontransitionend","onvolumechange","onwaiting","onwheel"],L=new RegExp(`\\b(${X.join("|")})\\s*=\\s*(?:"[^"]*"|'[^']*'|[^\\s>]*)`,"gi"),se=/<meta\s+http-equiv\s*=\s*["']?refresh["']?[^>]*>/gi;return ue.replace(L,"").replace(se,"").trim()}var Z={mdBody:"mdBody___raKXb",button:"button___Ch5Pc",previewFlowChart:"previewFlowChart___vY1dq"},U=Object.defineProperty,A=Object.getOwnPropertySymbols,K=Object.prototype.hasOwnProperty,D=Object.prototype.propertyIsEnumerable,O=(ue,X,L)=>X in ue?U(ue,X,{enumerable:!0,configurable:!0,writable:!0,value:L}):ue[X]=L,re=(ue,X)=>{for(var L in X||(X={}))K.call(X,L)&&O(ue,L,X[L]);if(A)for(var L of A(X))D.call(X,L)&&O(ue,L,X[L]);return ue};const oe="@\u2581\u2581@",ie="@\u2581@",Ee=/<pre[^>]*>/g;function Me(ue){let X=document.createElement("div");return X.innerHTML=ue,X.childNodes.length===0?"":X.childNodes[0].nodeValue}const ke=(ue,X)=>{ue=ue||"";const L=/(?:https?:\/\/[^\/]+)?\/api\/attachments\/([A-Za-z0-9+/=]+)(\?.*?)?\)|(?:https?:\/\/[^\/]+)?\/api\/attachments\/([A-Za-z0-9+/=]+)(\?.*?)?|(?:https?:\/\/[^\/]+)?\/attachments\/download\/([A-Za-z0-9+/=]+)(\?.*?)?\//g,se=/\"(?:https?:\/\/[^\/]+)?\/api\/attachments\/([A-Za-z0-9+/=]+)(\?.*?)?|\"(?:https?:\/\/[^\/]+)?\/attachments\/download\/([A-Za-z0-9+/=]+)(\?.*?)?\//g,Q=/\(\s+(?:https?:\/\/[^\/]+)?\/files\/uploads\/([A-Za-z0-9+/=]+)(\?.*?)?|\"(?:https?:\/\/[^\/]+)?\/files\/uploads\/([A-Za-z0-9+/=]+)(\?.*?)?\//g,V=/(?:https?:\/\/[^\/]+)?\/attachments\/download\/([A-Za-z0-9+/=]+)(\?.*?)?\//g;return X?ue.replaceAll("https://www.educoder.net","").replaceAll("https://www-cdn.educoder.net","").replaceAll("//api/attachments","/api/attachments").replace(L,(x,w,H,he,Ke,ft,Ue)=>{const st=w||he||ft,pt=H||Ke||Ue||"?";return g.Z.API_SERVER+"/api/attachments/"+st+pt+"&t="+(0,q.Jn)(st,Date.now())+(x.indexOf(")")>-1?")":"&")}).replaceAll('src="(','src="').replaceAll("src='(",'src="'):(ue=ue.replace(V,(x,w,H,he,Ke,ft,Ue)=>{const st=w||he||ft,pt=H||Ke||Ue||"?";return g.Z.API_SERVER+"/attachments/download/"+st+pt+"&t="+(0,q.Jn)(st,Date.now())+(x.indexOf(")")>-1?")":"&")}).replace(L,(x,w,H,he,Ke,ft,Ue)=>{const st=w||he||ft,pt=H||Ke||Ue||"?";return g.Z.API_SERVER+"/api/attachments/"+st+pt+"&t="+(0,q.Jn)(st,Date.now())+(x.indexOf(")")>-1?")":"&")}).replace(se,(x,w,H,he,Ke)=>{const ft=w||he,Ue=H||Ke||"";return'"'+g.Z.API_SERVER+"/api/attachments/"+ft+Ue+ft+Ue+"&t="+(0,q.Jn)(ft,Date.now())}).replace(Q,(x,w,H,he,Ke)=>{const ft=w||he,Ue=H||Ke||"";return"("+g.Z.API_SERVER+"/files/uploads/"+ft+Ue+ft+Ue+"&t="+(0,q.Jn)(ft,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,`
|
|
|
`),ue)};var tt=({value:ue="",edit:X=!1,className:L,showTextOnly:se,showLines:Q,style:V={},stylesPrev:x={},highlightKeywords:w,showProgramFill:H,isProgramFill:he,disabledFill:Ke=!1,programFillValue:ft,openEditor:Ue=()=>{},onFillChange:st=Ne=>{},onFillBlur:pt=()=>{},onFillFocus:Et=()=>{}})=>{let Ne=j(String(ue||""));const St=(0,v.useRef)(),at=(0,v.useRef)(),[Nt,Ge]=(0,v.useState)(""),[je,Re]=(0,v.useState)("office"),[_e,Y]=(0,v.useState)([]),Le=(0,v.useRef)("a"+(0,M.Z)()),Ce={},B=Oe=>/<style[\s\S]*?>/i.test(Oe||""),P=(Oe,qe,rt)=>{const ot=document.createElement(Oe===ie?"input":"textarea");ot.style.width="100%",ot.style.height=Oe===ie?"40px":"151px",ot.rows=5,ot.spellcheck=!1,ot.name="edu-program-fill",ot.placeholder="\u8BF7\u8F93\u5165",ot.dataset.id=qe;const Rt=Object.keys(Ce).length;return Ce[Rt]=ot,`<span class="edu-program-fill-wrap ${Oe===ie?"":"show"}" style="width:${Oe===ie?"600px":"100%"}" title=${rt||""}><span>${ot.outerHTML}<span class="edu-program-fill-score" style="margin:0 6px"></span></span></span>`};function ce(Oe){return Oe=Oe.replace(/!\[.*?\]\(.*?\)/g,""),Oe=Oe.replace(/\[.*?\]\(.*?\)/g,""),Oe=Oe.replace(new RegExp("<iframe.*?<\\/iframe>","gs"),""),Oe=Oe.replace(/<embed.*?>/g,""),Oe=Oe.replace(/<img.*?>/g,""),Oe=Oe.replace(new RegExp("<video.*?>.*?<\\/video>","gs"),""),Oe=Oe.replace(new RegExp("<audio.*?>.*?<\\/audio>","gs"),""),Oe=Oe.replace(new RegExp("<style.*?>.*?<\\/style>","gs"),""),Oe=Oe.replace(new RegExp("<script.*?>.*?<\\/script>","gs"),""),Oe}const ve=Oe=>!se&&B(Ne)?Oe:Oe.replace(/<style.*?>([\s\S]+?)<\/style>/gim,function(qe,rt){let ot=rt.replace(/(\n|\r)/g,"").split("}"),Rt=[];return ot.map(S=>{S!=""&&Rt.push(`.${Le.current} ${S}`)}),`<style>${Rt.join("}")}</style>`}),de=(0,v.useMemo)(()=>{(0,W.Iy)();try{const ot=/\(\s+\/api\/attachments\/|\(\/api\/attachments\//g,Rt=/\"\/api\/attachments\/|\"\/attachments\/download\//g,S=/\(\s+\/files\/uploads\/|\"\/files\/uploads\//g,R=/\(\/attachments\/download\//g;Ne=Ne.replace(R,"("+g.Z.API_SERVER+"/attachments/download/").replace(ot,"("+g.Z.API_SERVER+"/api/attachments/").replace(Rt,'"'+g.Z.API_SERVER+"/api/attachments/").replace(S,'"'+g.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,`
|
|
|
`),St.current.style.display="none"}catch(ot){}if(H){let ot=-1;return Ne=Ne.replaceAll("<","<").replaceAll(">",">").replace(/(@▁▁@|@▁@)/g,function(Rt,S,R){var Ze;return++ot,P(Rt,ot,(Ze=ft==null?void 0:ft[ot])==null?void 0:Ze.value.replaceAll("<","<").replaceAll(">",">"))}),`<pre style="background:#fff;padding:4px">${ve(Ne||"")}</pre>`}let Oe=ve(Ne);Oe=(0,W.ZP)(Oe);const qe=(0,W.ez)();Ne.match(/\[TOC\]/)&&(Oe=Oe.replace("<p>[TOC]</p>",(0,W.Qv)()),(0,W.Iy)()),Oe=Oe.replace(/(__special_katext_id_\d+__)/g,(ot,Rt)=>{const{type:S,expression:R}=qe[Rt];return(0,te.renderToString)(Me(R)||"",{displayMode:S==="block",throwOnError:!1,output:"html"})}),Oe=Oe.replace(/▁/g,"\u2581\u2581\u2581\u2581\u2581"),(0,W.AL)();const rt=document.createElement("div");if(rt.innerHTML=Oe,se)return rt.innerText;if(w){const ot=w.replace(/[.*+?^${}()|[\]\\]/g,"\\$&");return Ie(rt,ot),rt.innerHTML}return setTimeout(()=>gt(),500),rt.innerHTML},[Ne,w]);(0,v.useEffect)(()=>{Ae.current&&Ae.current.querySelectorAll(["input","textarea"]).forEach(qe=>{qe.oninput=ye,qe.onblur=Te,qe.onfocus=we})},[_e]),(0,v.useEffect)(()=>{var Oe,qe,rt,ot,Rt;if(ft!=null&&ft.length)try{const S=Ae.current.querySelectorAll(".edu-program-fill-score"),R=Ae.current.querySelectorAll('[name="edu-program-fill"]');for(const[Ze,J]of R.entries())J.value=((Oe=ft==null?void 0:ft[Ze])==null?void 0:Oe.value)||"",((qe=ft==null?void 0:ft[Ze])==null?void 0:qe.type)==="warning"?J.className="program-fill-warning":((rt=ft==null?void 0:ft[Ze])==null?void 0:rt.type)==="success"?J.className="program-fill-success":J.className="";for(const[Ze,J]of S.entries())J.innerHTML=(ot=ft==null?void 0:ft[Ze])!=null&&ot.score?`${(Rt=ft==null?void 0:ft[Ze])==null?void 0:Rt.score}\u5206`:"";Y(ft)}catch(S){console.log(S,"error")}},[ft]);const ye=Oe=>{_e[Oe.target.dataset.id]=_e[Oe.target.dataset.id]||{},_e[Oe.target.dataset.id].value=Oe.target.value,Y([..._e]),st(_e,Oe.target.dataset.id)},Te=Oe=>{_e[Oe.target.dataset.id]=_e[Oe.target.dataset.id]||{},_e[Oe.target.dataset.id].value=Oe.target.value,Y([..._e]),pt(_e,Oe.target.dataset.id)},we=Oe=>{_e[Oe.target.dataset.id]=_e[Oe.target.dataset.id]||{},_e[Oe.target.dataset.id].value=Oe.target.value,Y([..._e]),Et(_e,Oe.target.dataset.id)};function Ie(Oe,qe){return Oe.childNodes.forEach(rt=>{var ot;if(rt.childNodes.length>0)Ie(rt,qe);else if(rt.nodeName!=="IMG")if(rt.innerHTML)rt.innerHTML=(ot=rt.innerHTML)==null?void 0:ot.replace(new RegExp(qe,"gi"),'<span style="color:#0152d9;background-color:#1890ff33">$&</span>');else{const Rt=document.createElement("span");Rt.innerHTML=rt.textContent.replace(new RegExp(qe,"gi"),'<span style="color:#0152d9;background-color:#1890ff33">$&</span>'),rt.replaceWith(Rt)}})}const Ae=(0,v.useRef)();W.jb.WebkitLineClamp=Q,Q&&(V=re(re({},V),W.jb));function Xe(Oe){let qe=Oe.target;if(qe.tagName.toUpperCase()==="A"){let rt=qe.getAttribute("href");if(rt.indexOf("office")>-1)Oe.preventDefault(),Ge(rt),Re("office");else if(rt.indexOf("application/pdf")>-1)Oe.preventDefault(),Ge(rt),Re("pdf");else if(rt.indexOf("text/html")>-1)Oe.preventDefault(),Ge(rt),Re("html");else if(rt.startsWith("#")){Oe.preventDefault();let ot=document.getElementById(rt.replace("#",""));ot&&ot.scrollIntoView(!0)}}}const gt=()=>{var Oe;const qe=(Oe=Ae.current)==null?void 0:Oe.querySelectorAll("video");qe==null||qe.forEach(rt=>{if(rt.oncontextmenu=()=>!1,rt.src.indexOf(".m3u8")>-1&&!rt.canPlayType("application/vnd.apple.mpegurl")){if(z.ZP.isSupported()){var ot=new z.ZP;ot.loadSource(rt.src),ot.attachMedia(rt)}}})};(0,v.useEffect)(()=>{if(Ae.current&&de&&de.match(Ee)&&window.PR.prettyPrint(),Ae.current)return Ae.current.addEventListener("click",Xe),()=>{var Oe;(Oe=Ae.current)==null||Oe.removeEventListener("click",Xe),(0,W.AL)(),(0,W.Iy)()}},[de,Ae.current,Xe]);const ht=Oe=>{Oe.target.nodeName==="IMG"&&Oe.target.className.indexOf("draw-flowchart")>-1?(St.current.style.zIndex=1,St.current.style.display="flex",St.current.style.width=Oe.target.clientWidth+"px",St.current.style.height=Oe.target.clientHeight+"px",St.current.style.top=Oe.target.offsetTop+"px",St.current.style.left=Oe.target.offsetLeft+"px",Oe.target.id&&(at.current=Oe.target.id)):St.current.style.display="none"},nt=()=>{St.current.style.display="none"};return(0,v.useEffect)(()=>{var Oe;const qe=rt=>{rt.preventDefault(),rt.clipboardData.setData("text",window.getSelection().toString())};return(Oe=Ae.current)==null||Oe.addEventListener("copy",qe),()=>{var rt;(rt=Ae.current)==null||rt.removeEventListener("copy",qe)}},[Ae.current]),v.createElement("div",{style:{position:"relative"},onMouseLeave:nt},se&&v.createElement("div",{ref:Ae,className:`${Z.mdBody} `},de),!se&&!B(de)&&v.createElement("div",{ref:Ae,style:re({},V),onMouseOver:ht,className:`${L||""} ${Ke?"disabled-fill":""} markdown-body ${Z.mdBody} ${Le.current}`,dangerouslySetInnerHTML:{__html:de}}),!se&&B(de)&&v.createElement(k,{html:de}),v.createElement("div",{ref:St,className:`${Z.button} ${X?"":Z.previewFlowChart}`},v.createElement(o.Z,null,v.createElement(C.ZP,{onClick:()=>{X?Ue(at.current):(Ge(at.current),Re("flowChart"))}},X?"\u7F16\u8F91":"\u9884\u89C8"))),v.createElement(y.Z,{close:!0,data:Nt,type:Nt!=null&&Nt.length?je:"",style:re({},x),onClose:()=>Ge("")}))}},34728:function(ln,mt,m){"use strict";m.d(mt,{SV:function(){return St},ZP:function(){return Ne}});var v=m(59301),ae=m(76374);const W={keywords:["print","auto","break","case","char","const","continue","default","do","double","else","enum","extern","float","for","goto","if","int","long","register","return","short","signed","sizeof","static","struct","switch","typedef","union","unsigned","void","volatile","while"]},fe={quickKey:[{label:"main",content:["public static void main(String[] args) {"," $0","}"].join(`
|
|
|
`)},{label:"System.out.println",content:["System.out.println($0)"].join(`
|
|
|
`)},{label:"System.out.print",content:["System.out.print($0)"].join(`
|
|
|
`)}],keywords:["abstract","continue","for","new","switch","assert","default","goto","package","synchronized","boolean","do","if","private","this","break","double","implements","protected","throw","byte","else","import","public","throws","case","enum","instanceof","return","transient","catch","extends","int","short","try","char","final","interface","static","void","class","finally","long","strictfp","volatile","const","float","native","super","while","true","false"]},z={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(`
|
|
|
`)}]},g={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(`
|
|
|
`)}]},q={keywords:["asInstanceOf","catch","class","classOf","def","do","else","extends","finally","for","foreach","forSome","if","import","isInstanceOf","macro","match","new","object","package","return","throw","trait","try","type","until","val","var","while","with","yield","given","enum","then"],quickKey:[{label:"println",content:["println($0)"].join(`
|
|
|
`)}]};var te=m(53184),o=m.n(te),C=(at,Nt,Ge)=>new Promise((je,Re)=>{var _e=Ce=>{try{Le(Ge.next(Ce))}catch(B){Re(B)}},Y=Ce=>{try{Le(Ge.throw(Ce))}catch(B){Re(B)}},Le=Ce=>Ce.done?je(Ce.value):Promise.resolve(Ce.value).then(_e,Y);Le((Ge=Ge.apply(at,Nt)).next())});const M={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"]}},y=(at,Nt,Ge,je)=>{const Re=Nt.getValueInRange({startLineNumber:1,startColumn:1,endLineNumber:Ge.lineNumber,endColumn:Ge.column});return Array.from(new Set(Re.match(/\b\w{2,}\b/g)||[])).map(Y=>({label:Y,kind:at.languages.CompletionItemKind.Text,insertText:Y,range:je}))},E=(at,Nt,Ge,je)=>{at.languages.registerCompletionItemProvider(Nt,{provideCompletionItems(Re,_e){const Y=Re.getWordUntilPosition(_e),Le={startLineNumber:_e.lineNumber,endLineNumber:_e.lineNumber,startColumn:Y.startColumn,endColumn:Y.endColumn},Ce=Re.getLineContent(_e.lineNumber).substring(Y.startColumn-2,Y.endColumn);return{suggestions:[...y(at,Re,_e,Le),...Ge.map(P=>({label:P,kind:at.languages.CompletionItemKind.Keyword,documentation:P,insertText:P,insertTextRules:at.languages.CompletionItemInsertTextRule.InsertAsSnippet,range:Le})),...je.map(P=>({label:P.label,kind:at.languages.CompletionItemKind.Snippet,documentation:P.content,insertText:Ce.startsWith("#")?P.content.replace(/#/,""):P.content,insertTextRules:at.languages.CompletionItemInsertTextRule.InsertAsSnippet,range:Le}))]}}})};var T=at=>{M.languages.forEach(Nt=>{at.languages.registerDocumentFormattingEditProvider(Nt,{provideDocumentFormattingEdits(Ge){return C(this,null,function*(){const je=o()(Ge.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:Ge.getFullModelRange(),text:je}]})}})}),E(at,"java",fe.keywords,fe.quickKey),E(at,"cpp",z.keywords,z.quickKey),E(at,"c",W.keywords,[]),E(at,"python",g.keywords,g.quickKey),E(at,"scala",q.keywords,q.quickKey)};const k="\u8BE5\u4EFB\u52A1\u5173\u5361\u8BBE\u7F6E\u4E86\u7981\u6B62\u590D\u5236\u7C98\u8D34\uFF0C\u8BF7\u624B\u52A8\u8F93\u5165\u4EE3\u7801\u3002";var j=Object.defineProperty,Z=(at,Nt,Ge)=>Nt in at?j(at,Nt,{enumerable:!0,configurable:!0,writable:!0,value:Ge}):at[Nt]=Ge,U=(at,Nt,Ge)=>Z(at,typeof Nt!="symbol"?Nt+"":Nt,Ge);const A=class xu{constructor(Nt,Ge,je){this.placeholder=Nt,this.editor=Ge,this.monaco=je,Ge.onDidChangeModelContent(()=>this.onDidChangeModelContent()),this.onDidChangeModelContent()}onDidChangeModelContent(){this.editor.getValue()===""?this.editor.addContentWidget(this):this.editor.removeContentWidget(this)}getId(){return xu.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)}};U(A,"ID","editor.widget.placeholderHint");var D=A,O=m(96236),re=m(6767),oe=m(25399),ie=m(78267),Ee=m(33156),Me=m(56102),ke=Object.defineProperty,tt=Object.defineProperties,ue=Object.getOwnPropertyDescriptors,X=Object.getOwnPropertySymbols,L=Object.prototype.hasOwnProperty,se=Object.prototype.propertyIsEnumerable,Q=(at,Nt,Ge)=>Nt in at?ke(at,Nt,{enumerable:!0,configurable:!0,writable:!0,value:Ge}):at[Nt]=Ge,V=(at,Nt)=>{for(var Ge in Nt||(Nt={}))L.call(Nt,Ge)&&Q(at,Ge,Nt[Ge]);if(X)for(var Ge of X(Nt))se.call(Nt,Ge)&&Q(at,Ge,Nt[Ge]);return at},x=(at,Nt)=>tt(at,ue(Nt)),w=(at,Nt)=>{var Ge={};for(var je in at)L.call(at,je)&&Nt.indexOf(je)<0&&(Ge[je]=at[je]);if(at!=null&&X)for(var je of X(at))Nt.indexOf(je)<0&&se.call(at,je)&&(Ge[je]=at[je]);return Ge},H=(at,Nt,Ge)=>new Promise((je,Re)=>{var _e=Ce=>{try{Le(Ge.next(Ce))}catch(B){Re(B)}},Y=Ce=>{try{Le(Ge.throw(Ce))}catch(B){Re(B)}},Le=Ce=>Ce.done?je(Ce.value):Promise.resolve(Ce.value).then(_e,Y);Le((Ge=Ge.apply(at,Nt)).next())});function he(at){return/^\d+$/.test(at)?`${at}px`:at}function Ke(){}let ft=!1;const Ue={"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 st(at=[]){let Nt=at;if(Array.isArray(at)){for(let Ge=0;Ge<at.length;Ge++){let je=Ue[at[Ge]];if(je)return je}return Nt[0]}return Ue[Nt]||Nt}let pt=null;const Et=()=>H(void 0,null,function*(){try{yield navigator.clipboard.writeText(" "),console.log("\u5185\u5BB9\u5DF2\u81EA\u52A8\u590D\u5236\u5230\u526A\u8D34\u677F:")}catch(at){console.error("\u81EA\u52A8\u590D\u5236\u5931\u8D25:",at)}});var Ne=at=>{var Nt=at,{width:Ge="100%",height:je="100%",value:Re,language:_e="javascript",style:Y={},options:Le={},overrideServices:Ce={},theme:B="vs-dark",onEditBlur:P,isCopy:ce=!1,onSave:ve,autoHeight:de=!1,forbidCopy:ye=!1,forbidCopyTips:Te,onChange:we=Ke,editorDidMount:Ie=Ke,onFocus:Ae=Ke,onBreakPoint:Xe=Ke,breakPointValue:gt=[],filename:ht="educoder.txt",errorLine:nt,errorContent:Oe="",highlightLine:qe,openBreakPoint:rt=!1,placeholder:ot="",showMiniMap:Rt=!0}=Nt,S=w(Nt,["width","height","value","language","style","options","overrideServices","theme","onEditBlur","isCopy","onSave","autoHeight","forbidCopy","forbidCopyTips","onChange","editorDidMount","onFocus","onBreakPoint","breakPointValue","filename","errorLine","errorContent","highlightLine","openBreakPoint","placeholder","showMiniMap"]);const R=(0,v.useRef)(),Ze=(0,v.useRef)({}),J=(0,v.useRef)(),be=(0,v.useRef)(),zt=(0,v.useRef)([]),ze=(0,v.useRef)(!1),Qe=(0,v.useRef)(),lt=(0,v.useRef)(),le=(0,v.useRef)(!1),[pe,Pe]=(0,v.useState)(!1);function $e(){let Dt;return R.current&&(Dt=new ae.Z(Mt=>{for(let gn of Mt)(gn.target.offsetHeight>0||gn.target.offsetWidth>0)&&Ze.current.instance.layout()}),Dt.observe(R.current)),Dt}function G(){re.ZP.warning({content:decodeURIComponent(Te||k),key:"monaco-editor-tip"})}const bt=()=>{let Dt=Ze.current.instance;if(Re!=null&&Dt&&pe){const Mt=Dt.getModel();Mt&&Re!==Mt.getValue()&&(ft=!0,Mt.setValue(Re),Dt.layout(),ft=!1)}};(0,v.useEffect)(()=>{const Dt=Ee.Z.subscribe("formatDocument",Mt=>{var gn;let Ln=Ze.current.instance;(gn=Ln==null?void 0:Ln.getAction)==null||gn.call(Ln,"editor.action.formatDocument").run()});return window.updateMonacoValue=Mt=>{we(Mt)},Dt},[]),(0,v.useEffect)(()=>{var Dt;let Mt=Ze.current.instance;be.current&&clearTimeout(be.current),be.current=setTimeout(()=>{bt()},500),Re&&(Re!=null&&Re.length)&&((Dt=Mt==null?void 0:Mt.updateOptions)==null||Dt.call(Mt,{lineNumbersMinChars:Math.max(Math.floor(Math.log10(Re.split(/\r\n|\r|\n/g).length))+3,5)}))},[Re,pe,Ze.current]),(0,v.useEffect)(()=>{if(nt&&Ze.current&&Ze.current.instance){let Mt=Ze.current.instance;Mt.changeViewZones(function(gn){var Ln=document.createElement("div");Ln.style.padding="10px 20px",Ln.style.width="calc(100% - 20px)",Ln.className="my-error-line-wrp",Ln.innerHTML=Oe,gn.addZone({afterLineNumber:nt||11,heightInLines:3,domNode:Ln})});var Dt={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}};Mt.addOverlayWidget(Dt),Mt.revealPositionInCenter({lineNumber:20,column:1})}},[nt,Ze.current,pe]);const xe=(Dt="",Mt)=>{if(!Dt||Dt.trim()==="")return!0;const Ln=Ze.current.instance.getModel().getLineTokens(Mt);let ut=!1;for(let ct=0;ct<2;ct++)Ln.getStandardTokenType(ct)===1&&(ut=!0);return ut};(0,v.useEffect)(()=>{var Dt;const Mt=(Dt=Ze.current)==null?void 0:Dt.instance;if(Mt&&pe&&ye){const gn=Mt.onDidBlurEditorWidget(()=>{le.current=!1}),Ln=Mt.onDidFocusEditorText(()=>{le.current=!0});return()=>{gn.dispose(),Ln.dispose()}}},[Ze.current,pe,ye]),(0,v.useEffect)(()=>{var Dt;if((Dt=Ze.current)!=null&&Dt.instance&&pe&&rt){let Mt=Ze.current.instance,gn=Mt.getModel();if(!gn)return;(()=>{var Ht;let Qt=[],pn=[];const qt=gn.getAllDecorations();for(let vt of qt)vt.options.className==="highlighted-line"&&(Qt.push((Ht=vt==null?void 0:vt.range)==null?void 0:Ht.startLineNumber),pn.push(vt==null?void 0:vt.id));if(qe===Qt[0])return;gn.deltaDecorations(pn,[]);const Ye=gn.getLineCount();qe&&qe<=Ye&&(Mt.deltaDecorations([],[{range:new pt.Range(qe,1,qe,gn.getLineMaxColumn(qe)),options:{isWholeLine:!0,className:"highlighted-line"}}]),Mt.revealLineInCenter(qe))})();const ut=(Ht=!1)=>{var Qt;let pn=[],qt=[];const Ye=gn.getAllDecorations();for(let vt of Ye)vt.options.linesDecorationsClassName==="breakpoints-select"&&(pn.push((Qt=vt==null?void 0:vt.range)==null?void 0:Qt.startLineNumber),qt.push(vt==null?void 0:vt.id));if(Ht)return{lines:pn,ids:qt};Xe(pn)},ct=Ht=>H(void 0,null,function*(){let Qt={range:new pt.Range(Ht,1,Ht,1),options:{isWholeLine:!1,linesDecorationsClassName:"breakpoints-select"}};yield gn.deltaDecorations([],[Qt]),ut()}),Se=Ht=>H(void 0,null,function*(){let Qt=[];const pn=Mt.getLineDecorations(Ht);for(let qt of pn)qt.options.linesDecorationsClassName==="breakpoints-select"&&Qt.push(qt.id);yield gn.deltaDecorations(Qt,[]),ut()}),He=Ht=>{let Qt=Mt.getLineDecorations(Ht);for(let pn of Qt)if(pn.options.linesDecorationsClassName==="breakpoints-select")return!0;return!1};if(!(0,ie.isEqual)(gt,ut(!0).lines)){gn.deltaDecorations(ut(!0).ids,[]);const Ht=gt.map(Qt=>({range:new pt.Range(Qt,1,Qt,1),options:{isWholeLine:!1,linesDecorationsClassName:"breakpoints-select"}}));gn.deltaDecorations([],Ht)}const it=Mt.onDidChangeModelContent(Ht=>{let Qt=Mt.getPosition();if(Qt){let pn=Qt.lineNumber;clearTimeout(lt.current),lt.current=setTimeout(()=>{xe(gn.getLineContent(pn),pn)?Se(pn):He(pn)?(Se(pn),ct(pn)):ut()},100)}}),Je=Mt.onMouseDown(Ht=>{var Qt,pn,qt;if(Ht.target.detail&&((qt=(pn=(Qt=Ht.target)==null?void 0:Qt.element)==null?void 0:pn.className)!=null&&qt.includes("line-numbers"))){let Ye=Ht.target.position.lineNumber;if(xe(gn.getLineContent(Ye),Ye))return;He(Ye)?Se(Ye):ct(Ye)}}),yt=Ht=>{let Qt={range:new pt.Range(Ht,1,Ht,1),options:{isWholeLine:!1,linesDecorationsClassName:"breakpoints-fake"}};zt.current=Mt.deltaDecorations(zt.current,[Qt])},$t=()=>{zt.current=Mt.deltaDecorations(zt.current,[])},Jt=Mt.onMouseMove(Ht=>{var Qt,pn,qt;if($t(),Ht.target.detail&&((qt=(pn=(Qt=Ht.target)==null?void 0:Qt.element)==null?void 0:pn.className)!=null&&qt.includes("line-numbers"))){let Ye=Ht.target.position.lineNumber;if(xe(gn.getLineContent(Ye),Ye))return;yt(Ye)}}),nn=Mt.onMouseLeave(()=>{$t()});return()=>{it.dispose(),Je.dispose(),Jt.dispose(),nn.dispose()}}},[Ze.current,pe,gt,qe,rt,_e]),(0,v.useEffect)(()=>{var Dt;(Dt=Ze.current)!=null&&Dt.instance&&rt&&Ze.current.instance.setPosition({lineNumber:0,column:0})},[qe]);function Bt(){let Dt=Ze.current.instance;if(Dt){const Mt=Dt.getSelection(),gn=Ze.current.pastePos||{},Ln=new pt.Range(gn.startLineNumber||Mt.endLineNumber,gn.startColumn||Mt.endColumn,gn.endLineNumber||Mt.endLineNumber,gn.endColumn||Mt.endColumn);setTimeout(()=>{Dt.executeEdits("",[{range:Ln,text:""}])},300)}}function en(Dt){(window.navigator.platform.match("Mac")?Dt.metaKey:Dt.ctrlKey)&&Dt.keyCode==83&&(Dt.preventDefault(),ve())}const dn=()=>{if(de&&Ze.current.instance){const Dt=Ze.current.instance.getContentHeight();En(Dt<je?je:Dt)}else En(je)};function Hn(Dt){var Mt=document.createEvent("MouseEvents");Mt.initMouseEvent("click",!0,!1,window,0,0,0,0,0,!1,!1,!1,!1,0,null),Dt.dispatchEvent(Mt)}const wt=Dt=>{if(!le.current)return;const{keyCode:Mt,ctrlKey:gn,metaKey:Ln,target:ut,type:ct}=Dt;return(ct==="paste"||(Mt===67||Mt===86)&&(Ln||gn))&&ut.nodeName==="TEXTAREA"&&(G(),Dt.preventDefault()),!1};function Gt(Dt,Mt){var gn=window.URL||window.webkitURL||window,Ln=new Blob([Mt]),ut=document.createElementNS("http://www.w3.org/1999/xhtml","a");ut.href=gn.createObjectURL(Ln),ut.download=Dt,Hn(ut)}(0,v.useEffect)(()=>{dn()},[dn]),(0,v.useEffect)(()=>{R.current&&!pe&&Promise.all([m.e(8909),m.e(5977)]).then(m.bind(m,71448)).then(Dt=>{try{pt=Dt,Ze.current.instance=pt.editor.create(R.current,{value:Re,language:st(_e),theme:B,requireConfig:{"vs/nls":{availableLanguages:{"*":"zh-cn"}}},wordWrap:!0,autoIndent:!0,contextmenu:!0,formatOnType:!0,minimap:{enabled:Rt||!1}},Ce);const Mt=Ze.current.instance;let ut=[...O.BH._menuItems].find(it=>it[0]._debugName=="EditorContext")[1],ct=["editor.action.clipboardCopyWithSyntaxHighlightingAction","editor.action.quickCommand","editor.action.clipboardCopyAction","editor.action.clipboardPasteAction","editor.action.clipboardCutAction"],Se=(it,Je)=>{var yt,$t;let Jt=it._first;do Je.includes(($t=(yt=Jt.element)==null?void 0:yt.command)==null?void 0:$t.id)&&it._remove(Jt);while(Jt=Jt.next)};if(Ie(Mt,pt),setTimeout(()=>{dn(),Ze.current.instance.addAction({id:"d123123",label:"Download File",contextMenuGroupId:"9_cutcopypaste",run:()=>{Gt(ht||"educoder.txt",Mt.getValue())}})},500),Ze.current.subscription=Mt.onDidChangeModelContent(it=>{ze.current?clearTimeout(Qe.current):(dn(),we(Mt.getValue(),it)),Qe.current=setTimeout(()=>{ze.current=!1},500)}),window.Monaco||T(pt,st(_e)),ye&&(Se(ut,ct),R.current.classList.add("noCopyPaste"),window.removeEventListener("keydown",wt),window.removeEventListener("paste",wt),window.addEventListener("keydown",wt),window.addEventListener("paste",wt)),window.Monaco=pt,P&&Mt.onDidBlurEditorWidget(()=>{P(Mt.getValue())}),Ae&&Mt.onDidFocusEditorText(()=>{ye&&Et(),Ae(Mt.getValue())}),ye){Et();try{Mt.onDidPaste(it=>{const Je=Mt.getSelection(),yt=Ze.current.pastePos||{},$t=new pt.Range(yt.startLineNumber||Je.endLineNumber,yt.startColumn||Je.endColumn,yt.endLineNumber||Je.endLineNumber,yt.endColumn||Je.endColumn);Mt.executeEdits("",[{range:it.range,text:""}])})}catch(it){}}let He=$e();return ot&&typeof ot=="string"&&new D(ot,Mt,pt),Pe(!0),()=>{const it=Ze.current.instance;it.dispose();const Je=it.getModel();Je&&Je.dispose(),Ze.current.subscription&&Ze.current.subscription.dispose(),He.unobserve(R.current)}}catch(Mt){}})},[]),(0,v.useEffect)(()=>{if(Ze.current.instance&&pe)return document.addEventListener("keydown",en,!1),()=>{document.removeEventListener("keydown",en)}},[ve,pe]),(0,v.useEffect)(()=>{let Dt=Ze.current.instance;if(Dt&&pe){let Mt=st(_e);pt.editor.setModelLanguage(Dt.getModel(),Mt)}},[_e,pe]),(0,v.useEffect)(()=>{Ze.current.instance&&pe&&pt.editor.setTheme(B)},[B,pe]),(0,v.useEffect)(()=>{let Dt=Ze.current.instance;J.current=Le,Dt&&pe&&(Dt.updateOptions(V({},Le)),setTimeout(()=>{Dt.getModel().updateOptions(V({},Le))},200))},[JSON.stringify(Le),pe]),(0,v.useEffect)(()=>{let Dt=Ze.current.instance;Dt&&pe&&Dt.layout()},[Ge,je,pe]);const[mn,yn]=(0,v.useState)(he(Ge)),[rn,En]=(0,v.useState)(he(je)),Zt=x(V({},Y),{width:mn,height:rn,position:"relative"});return v.createElement("div",{className:"my-monaco-editor",ref:R,style:Zt,onFocus:()=>{ye&&Et()}},ce&&v.createElement(Me.CopyToClipboard,{text:Re,onCopy:()=>re.ZP.success("\u590D\u5236\u6210\u529F")},v.createElement(oe.Z,{title:"\u590D\u5236\u4EE3\u7801"},v.createElement("div",{style:{position:"absolute",top:0,right:10,cursor:"pointer",zIndex:10,color:"#165DFF"}},v.createElement("i",{className:"iconfont icon-fuzhi8",style:{fontSize:14}})," \u590D\u5236\u4EE3\u7801"))))};function St({width:at="100%",height:Nt="100%",original:Ge,modified:je,language:Re,options:_e={}}){const Y=(0,v.useRef)(),[Le,Ce]=(0,v.useState)(null);function B(de){let ye;return Y.current&&(ye=new ae.Z(Te=>{for(let we of Te)(we.target.offsetHeight>0||we.target.offsetWidth>0)&&de.layout()}),ye.observe(Y.current)),ye}(0,v.useEffect)(()=>(Y.current&&Promise.all([m.e(8909),m.e(9404)]).then(m.bind(m,2550)).then(de=>{pt=de;const ye=pt.editor.createDiffEditor(Y.current,x(V({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},_e),{wordWrap:!0}));Ce(ye);let Te=B(ye);return()=>{ye.dispose();const we=ye.getModel();we&&we.dispose(),Te.unobserve(Y.current)}}),()=>{window.removeEventListener("keydown",checkPaste),window.removeEventListener("paste",checkPaste)}),[]),(0,v.useEffect)(()=>{Le&&Le.setModel({original:pt.editor.createModel(Ge,Re),modified:pt.editor.createModel(je,Re)})},[Ge,je,Re,Le]);const P=he(at),ce=he(Nt),ve={width:P,height:ce};return v.createElement("div",{className:"my-diff-editor",ref:Y,style:ve})}},67840:function(ln,mt,m){"use strict";m.r(mt),m.d(mt,{default:function(){return Te}});var v=m(59301),ae=m(44283),W=m(91882),fe=m(77019),z=m(5269),g=m(25399),q=m(35883),te=m(15267),o={flex_box_center:"flex_box_center___iOjMJ",flex_space_between:"flex_space_between___aidWN",flex_box_vertical_center:"flex_box_vertical_center___z01Y6",flex_box_center_end:"flex_box_center_end___bizdK",flex_box_column:"flex_box_column___T3eUo",info:"info___PTCcN",bar:"bar___F2ZHD"},C=m(37568),M=m(18287),y=m(28284),E=m(62957),T=m(6767),k=m(37639),j=m(53420),Z=m(49317),U=Object.defineProperty,A=Object.getOwnPropertySymbols,K=Object.prototype.hasOwnProperty,D=Object.prototype.propertyIsEnumerable,O=(we,Ie,Ae)=>Ie in we?U(we,Ie,{enumerable:!0,configurable:!0,writable:!0,value:Ae}):we[Ie]=Ae,re=(we,Ie)=>{for(var Ae in Ie||(Ie={}))K.call(Ie,Ae)&&O(we,Ae,Ie[Ae]);if(A)for(var Ae of A(Ie))D.call(Ie,Ae)&&O(we,Ae,Ie[Ae]);return we},oe=(we,Ie,Ae)=>new Promise((Xe,gt)=>{var ht=qe=>{try{Oe(Ae.next(qe))}catch(rt){gt(rt)}},nt=qe=>{try{Oe(Ae.throw(qe))}catch(rt){gt(rt)}},Oe=qe=>qe.done?Xe(qe.value):Promise.resolve(qe.value).then(ht,nt);Oe((Ae=Ae.apply(we,Ie)).next())});const{TreeNode:ie}=j.default,Ee=({restful:we,loading:Ie,dispatch:Ae})=>{const Xe=(0,ae.useParams)(),gt=(0,ae.useLocation)(),[ht,nt]=(0,v.useState)(!1),[Oe,qe]=(0,v.useState)(),{actionTabs:rt}=we,[ot]=y.default.useForm();return(0,v.useEffect)(()=>{we.actionTabs.key=="\u65B0\u5EFA\u540C\u7EA7\u76EE\u5F55"&&ot.resetFields()},[we.actionTabs.key]),we.actionTabs.key!=="\u65B0\u5EFA\u540C\u7EA7\u76EE\u5F55"?null:v.createElement(E.default,{centered:!0,title:"\u65B0\u5EFA\u76EE\u5F55",open:we.actionTabs.key==="\u65B0\u5EFA\u540C\u7EA7\u76EE\u5F55",okText:"\u786E\u5B9A",cancelText:"\u53D6\u6D88",bodyStyle:{minHeight:150},confirmLoading:ht,onOk:()=>oe(void 0,null,function*(){yield ot.validateFields();const Rt=ot.getFieldValue();nt(!0),(yield(0,Z.ZP)("/api/restfuls.json",{method:"post",body:re({file_type:1},Rt)})).status===0&&(T.ZP.success("\u6DFB\u52A0\u6210\u529F"),Ae({type:"restful/setActionTabs",payload:{}}),Ae({type:"restful/getRestful"})),nt(!1)}),onCancel:()=>{Ae({type:"restful/setActionTabs",payload:{}})}},v.createElement("div",{className:"pl30 pr30"},v.createElement(y.default,{form:ot,initialValues:{name:""}},v.createElement(y.default.Item,{name:"name",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u76EE\u5F55\u540D\u79F0"}]},v.createElement(fe.Z,{className:"mt30"},v.createElement(z.Z,{flex:"80px",className:"font14"},"\u76EE\u5F55\u540D\u79F0\uFF1A"),v.createElement(z.Z,{flex:"1"},v.createElement(C.default,{placeholder:`\u8BF7\u8F93\u5165\u540D\u79F0\uFF0C\u6700\u5927\u9650\u523660\u4E2A\u5B57\u7B26
|
|
|
`,maxLength:60})))))))};var Me=(0,ae.connect)(({restful:we,loading:Ie})=>({restful:we,loading:Ie}))(Ee),ke=Object.defineProperty,tt=Object.getOwnPropertySymbols,ue=Object.prototype.hasOwnProperty,X=Object.prototype.propertyIsEnumerable,L=(we,Ie,Ae)=>Ie in we?ke(we,Ie,{enumerable:!0,configurable:!0,writable:!0,value:Ae}):we[Ie]=Ae,se=(we,Ie)=>{for(var Ae in Ie||(Ie={}))ue.call(Ie,Ae)&&L(we,Ae,Ie[Ae]);if(tt)for(var Ae of tt(Ie))X.call(Ie,Ae)&&L(we,Ae,Ie[Ae]);return we},Q=(we,Ie,Ae)=>new Promise((Xe,gt)=>{var ht=qe=>{try{Oe(Ae.next(qe))}catch(rt){gt(rt)}},nt=qe=>{try{Oe(Ae.throw(qe))}catch(rt){gt(rt)}},Oe=qe=>qe.done?Xe(qe.value):Promise.resolve(qe.value).then(ht,nt);Oe((Ae=Ae.apply(we,Ie)).next())});const{TreeNode:V}=j.default,x=({restful:we,loading:Ie,dispatch:Ae})=>{const Xe=(0,ae.useParams)(),gt=(0,ae.useLocation)(),[ht,nt]=(0,v.useState)(!1),[Oe,qe]=(0,v.useState)(),{actionTabs:rt}=we,[ot]=y.default.useForm();return(0,v.useEffect)(()=>{we.actionTabs.key=="\u91CD\u547D\u540D"&&(ot.resetFields(),ot.setFieldsValue({name:we.actionTabs.data.title}))},[we.actionTabs.key]),we.actionTabs.key!=="\u91CD\u547D\u540D"?null:v.createElement(E.default,{centered:!0,title:"\u91CD\u547D\u540D",open:we.actionTabs.key==="\u91CD\u547D\u540D",okText:"\u786E\u5B9A",cancelText:"\u53D6\u6D88",bodyStyle:{minHeight:150},confirmLoading:ht,onOk:()=>Q(void 0,null,function*(){yield ot.validateFields();const Rt=ot.getFieldValue();nt(!0);let S=`/api/restfuls/${we.actionTabs.data.id}.json`;(yield(0,Z.ZP)(S,{method:"put",body:se({file_type:1},Rt)})).status===0&&(T.ZP.success("\u4FEE\u6539\u6210\u529F"),Ae({type:"restful/setActionTabs",payload:{}}),Ae({type:"restful/getRestful"})),nt(!1)}),onCancel:()=>{Ae({type:"restful/setActionTabs",payload:{}})}},v.createElement("div",{className:"pl30 pr30"},v.createElement(y.default,{form:ot,initialValues:{name:""}},v.createElement(fe.Z,{className:"mt30"},v.createElement(z.Z,{flex:"80px",className:"font14"},"\u76EE\u5F55\u540D\u79F0\uFF1A"),v.createElement(z.Z,{flex:"1"},v.createElement(y.default.Item,{name:"name",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u65B0\u540D\u79F0"}]},v.createElement(C.default,{placeholder:`\u8BF7\u8F93\u5165\u540D\u79F0\uFF0C\u6700\u5927\u9650\u523660\u4E2A\u5B57\u7B26
|
|
|
`,maxLength:60})))))))};var w=(0,ae.connect)(({restful:we,loading:Ie})=>({restful:we,loading:Ie}))(x),H=m(13159),he={flex_box_center:"flex_box_center___EW6x1",flex_space_between:"flex_space_between___aSZFN",flex_box_vertical_center:"flex_box_vertical_center___MsqeW",flex_box_center_end:"flex_box_center_end___YMP0b",flex_box_column:"flex_box_column___KXrxt",tree:"tree___Zx4EL",actions:"actions___zwp8u"},Ke=Object.defineProperty,ft=Object.defineProperties,Ue=Object.getOwnPropertyDescriptors,st=Object.getOwnPropertySymbols,pt=Object.prototype.hasOwnProperty,Et=Object.prototype.propertyIsEnumerable,Ne=(we,Ie,Ae)=>Ie in we?Ke(we,Ie,{enumerable:!0,configurable:!0,writable:!0,value:Ae}):we[Ie]=Ae,St=(we,Ie)=>{for(var Ae in Ie||(Ie={}))pt.call(Ie,Ae)&&Ne(we,Ae,Ie[Ae]);if(st)for(var Ae of st(Ie))Et.call(Ie,Ae)&&Ne(we,Ae,Ie[Ae]);return we},at=(we,Ie)=>ft(we,Ue(Ie)),Nt=(we,Ie,Ae)=>new Promise((Xe,gt)=>{var ht=qe=>{try{Oe(Ae.next(qe))}catch(rt){gt(rt)}},nt=qe=>{try{Oe(Ae.throw(qe))}catch(rt){gt(rt)}},Oe=qe=>qe.done?Xe(qe.value):Promise.resolve(qe.value).then(ht,nt);Oe((Ae=Ae.apply(we,Ie)).next())});const{Search:Ge}=C.default,{DirectoryTree:je}=M.default,Re=({user:we,globalSetting:Ie,loading:Ae,dispatch:Xe,restful:gt})=>{const ht=(0,ae.useParams)(),[nt,Oe]=(0,v.useState)(!0),[qe]=y.default.useForm(),[rt,ot]=(0,v.useState)(""),[Rt]=(0,v.useState)([{id:1,name:"\u65B0\u5EFA\u6587\u4EF6"},{id:2,name:"\u65B0\u5EFA\u540C\u7EA7\u76EE\u5F55"},{id:3,name:"\u91CD\u547D\u540D"},{id:4,name:"\u7F16\u8F91"},{id:5,name:"\u5220\u9664"}]),[S,R]=(0,v.useState)([]),[Ze,J]=(0,v.useState)([]),[be,zt]=(0,v.useState)(!1),[ze,Qe]=(0,v.useState)([]);(0,v.useEffect)(()=>{var bt,xe,Bt,en;if((bt=gt.restful)!=null&&bt.data){Qe([...(xe=gt.restful)==null?void 0:xe.data]);let dn=0,Hn;if((en=(Bt=gt.restful)==null?void 0:Bt.data)==null||en.map(wt=>{var Gt;wt.id==ht.id&&(dn=wt.id),wt.file_type==0&&!Hn&&(Hn=wt.id),(Gt=wt==null?void 0:wt.children)==null||Gt.map(mn=>{Hn||(Hn=mn.id),mn.id==ht.id&&(dn=wt.id)}),!wt.children&&!Hn&&(Hn=wt.id)}),!ht.id&&Hn){ae.history.push(`/ch/rest/${Hn}`);return}dn&&setTimeout(()=>{R([dn]),J([Number(ht.id||Hn)])},200)}},[gt.restful]);const lt=(bt,xe)=>{xe.node.file_type===0?ae.history.push(`/ch/rest/${bt[0]}`):J([...bt]),console.log("Trigger Select",bt,xe)},le=bt=>{R(bt),console.log("Trigger Expand",bt)},pe=bt=>v.createElement("div",null,Rt.map((xe,Bt)=>v.createElement("p",{key:xe.id,className:"current",onClick:()=>{switch(xe.id){case 1:ae.history.push(`/ch/rest/edit/${bt.id}/0`);break;case 2:case 3:Xe({type:"restful/setActionTabs",payload:{key:xe.name,data:bt}});break;case 4:document.location.href=`/ch/rest/edit/${bt.pid||0}/${bt.id}`;break;case 5:E.default.confirm({title:"\u63D0\u793A",content:"\u662F\u5426\u786E\u5B9A\u5220\u9664\uFF1F",onOk:()=>Nt(void 0,null,function*(){const en=yield(0,H.E1)({id:bt.id});(en==null?void 0:en.status)==0&&(T.ZP.success("\u5220\u9664\u6210\u529F"),Xe({type:"restful/getRestful"}))})});break}}},xe.name)).filter(xe=>!!xe).filter(xe=>bt.pid||bt.file_type==0?xe.key>3:xe.key!=4)),Pe=bt=>bt.map(xe=>{var Bt;const en=xe.title.indexOf(rt),dn=xe.title.substr(0,en),Hn=xe.title.substr(en+rt.length),wt=v.createElement("span",null,dn,v.createElement("span",{className:"c-blue"},rt),Hn,(0,te.ag)()&&v.createElement(k.Z,{placement:"right",title:rt,content:()=>pe(xe),trigger:"hover"},v.createElement("span",{className:`iconfont icon-sandian ${he.actions}`})));return rt!==""&&en===-1&&!((Bt=xe.children)!=null&&Bt.length)?null:xe.children&&xe.file_type===1?at(St({},xe),{title:wt,key:xe.key,children:Pe(xe.children)}):at(St({},xe),{title:wt,key:xe.key,isLeaf:!0})}).filter(xe=>!!xe),$e=(bt,xe)=>{let Bt;for(let en=0;en<xe.length;en++){const dn=xe[en];dn.children&&(dn.children.some(Hn=>Hn.key===bt)?Bt=dn.key:$e(bt,dn.children)&&(Bt=$e(bt,dn.children)))}return Bt},G=bt=>{const{value:xe}=bt.target,Bt=ze.map(en=>{var dn;return en!=null&&en.children&&(dn=en==null?void 0:en.children.filter(Hn=>Hn.title.indexOf(xe)>-1))!=null&&dn.length?en.id:null});ot(xe),zt(!0),console.log("expandedKeys:",Bt),R(Bt)};return console.log("loop(treeData):",Pe(ze)),v.createElement("div",{className:he.tree},v.createElement(Ge,{style:{marginBottom:8},placeholder:"\u8F93\u5165\u5173\u952E\u5B57\u68C0\u7D22",onChange:G}),v.createElement(je,{multiple:!0,defaultExpandAll:!0,onSelect:lt,onExpand:le,expandedKeys:S,selectedKeys:Ze,autoExpandParent:be,treeData:Pe(ze)}),v.createElement(Me,null),v.createElement(w,null))};var _e=(0,ae.connect)(({user:we,loading:Ie,globalSetting:Ae,restful:Xe})=>({user:we,globalSetting:Ae,restful:Xe,loading:Ie.models.index}))(Re),Y=Object.defineProperty,Le=Object.getOwnPropertySymbols,Ce=Object.prototype.hasOwnProperty,B=Object.prototype.propertyIsEnumerable,P=(we,Ie,Ae)=>Ie in we?Y(we,Ie,{enumerable:!0,configurable:!0,writable:!0,value:Ae}):we[Ie]=Ae,ce=(we,Ie)=>{for(var Ae in Ie||(Ie={}))Ce.call(Ie,Ae)&&P(we,Ae,Ie[Ae]);if(Le)for(var Ae of Le(Ie))B.call(Ie,Ae)&&P(we,Ae,Ie[Ae]);return we},ve=(we,Ie)=>{var Ae={};for(var Xe in we)Ce.call(we,Xe)&&Ie.indexOf(Xe)<0&&(Ae[Xe]=we[Xe]);if(we!=null&&Le)for(var Xe of Le(we))Ie.indexOf(Xe)<0&&B.call(we,Xe)&&(Ae[Xe]=we[Xe]);return Ae},de=(we,Ie,Ae)=>new Promise((Xe,gt)=>{var ht=qe=>{try{Oe(Ae.next(qe))}catch(rt){gt(rt)}},nt=qe=>{try{Oe(Ae.throw(qe))}catch(rt){gt(rt)}},Oe=qe=>qe.done?Xe(qe.value):Promise.resolve(qe.value).then(ht,nt);Oe((Ae=Ae.apply(we,Ie)).next())});const ye=we=>{var Ie=we,{user:Ae,globalSetting:Xe,loading:gt,dispatch:ht,restful:nt}=Ie,Oe=ve(Ie,["user","globalSetting","loading","dispatch","restful"]),qe,rt;const ot=(0,ae.useParams)(),[Rt,S]=(0,v.useState)(!0),R=()=>de(void 0,null,function*(){ht({type:"restful/getRestful"}),ot.id&&ht({type:"restful/getRestfulDetail",payload:ce({},ot)})});(0,v.useEffect)(()=>{S(!0),R()},[ot.id]);const Ze=()=>{ht({type:"restful/setActionTabs",payload:{key:"\u65B0\u5EFA\u540C\u7EA7\u76EE\u5F55"}})},J=()=>{var be,zt,ze;if((be=nt.restful)!=null&&be.data){let Qe=0;return(ze=(zt=nt.restful)==null?void 0:zt.data)==null||ze.map(lt=>{var le;(le=lt==null?void 0:lt.children)==null||le.map(pe=>{pe.id==ot.id&&(Qe=lt.id)}),!lt.children&&!Qe&&(Qe=lt.id)}),Qe}return 0};return v.createElement("section",null,v.createElement("aside",{className:"edu-container mt20"},v.createElement(W.Z,null,v.createElement(W.Z.Item,null,v.createElement(ae.Link,{to:"/"},"\u9996\u9875")),v.createElement(W.Z.Item,null,v.createElement(ae.Link,{to:"/ch/rest"},"API\u6587\u6863"))),v.createElement("div",{className:"mt20"},v.createElement(fe.Z,{gutter:[20,20]},v.createElement(z.Z,{flex:"300px"},v.createElement(_e,ce({},Oe))),v.createElement(z.Z,{flex:"1"},v.createElement("div",{className:o.info},v.createElement("h1",{style:{fontSize:28,paddingBottom:15,borderBottom:"1px solid #eaeaea",textAlign:"center"}},(qe=nt.restfulDetail)==null?void 0:qe.name),v.createElement(q.Z,{value:(rt=nt.restfulDetail)==null?void 0:rt.description}))))),(0,te.ag)()&&v.createElement("div",{className:o.bar},v.createElement(fe.Z,null,!!J()&&v.createElement(z.Z,null,v.createElement(g.Z,{title:"\u7F16\u8F91\u6587\u4EF6"},v.createElement(ae.Link,{to:`/ch/rest/edit/${J()}/${ot.id}`,className:"icon-zhongmingming current"}))),v.createElement(z.Z,null,v.createElement(g.Z,{title:"\u6DFB\u52A0\u6587\u4EF6"},v.createElement(ae.Link,{to:`/ch/rest/edit/${J()}/0`,className:"icon-tianjiatimu current"}))),v.createElement(z.Z,null,v.createElement(g.Z,{title:"\u65B0\u5EFA\u6587\u4EF6\u5939"},v.createElement("span",{className:"icon-wenjianjia1 current",onClick:Ze})))))))};var Te=(0,ae.connect)(({user:we,loading:Ie,globalSetting:Ae,restful:Xe})=>({user:we,globalSetting:Ae,restful:Xe,loading:Ie.models.index}))(ye)},20047:function(ln,mt,m){"use strict";m.d(mt,{AL:function(){return D},Iy:function(){return M},Qv:function(){return T},ez:function(){return K},jb:function(){return y}});var v=m(32834),ae=m.n(v),W=m(11690),fe=m.n(W);let z=1;function g(Ee,Me){const ke=Ee.match(/^(\s+)(?:```)/);if(ke===null)return Me;const tt=ke[1];return Me.split(`
|
|
|
`).map(ue=>{const X=ue.match(/^\s+/);if(X===null)return ue;const[L]=X;return L.length>=tt.length?ue.slice(tt.length):ue}).join(`
|
|
|
`)}let q=[],te=["<ul>"];const o=new(ae()).Renderer,C=/^ *(#{1,6}) *([^\n]+?) *(?:#+ *)?(?:\n+|$)/;function M(){q.length=0,te=["<ul>"]}const y={overflow:"hidden",WebkitBoxOrient:"vertical",display:"-webkit-box",WebkitLineClamp:2};function E(Ee,Me,ke,tt){if(Me>=Ee.length||Ee[Me].level<=ke)return Me;var ue=Ee[Me];tt.push("<li><a href='#"+z+ue.anchor+"'>"+ue.text+"</a>"),Me++;var X=[];return Me=E(Ee,Me,ue.level,X),X.length>0&&(tt.push("<ul>"),X.forEach(function(L){tt.push(L)}),tt.push("</ul>")),tt.push("</li>"),Me=E(Ee,Me,ke,tt),Me}function T(){return E(q,0,0,te),te.push("</ul>"),te.join("")}const k={heading(Ee){const Me=C.exec(Ee);if(z+=1,Me)return{type:"heading",raw:Me[0],depth:Me[1].length,text:Me[2]}},fences(Ee){const Me=this.rules.block.fences.exec(Ee);if(Me){const ke=Me[0];let tt=g(ke,Me[3]||"");const ue=Me[2]?Me[2].trim():Me[2];if(["latex","katex","math"].indexOf(ue)>=0){const X=U(),L=tt;tt=X,A[X]={type:"block",expression:L}}return{type:"code",raw:ke,lang:ue,text:tt}}}},j=/(?:\${2})([^\n`]+?)(?:\${2})/gi;let Z=0;const U=()=>`__special_katext_id_${Z++}__`;let A={};function K(){return A}function D(){Z=0,A={}}function O(Ee){return Ee=Ee.replace(j,(Me,ke)=>{const tt=U();return A[tt]={type:"inline",expression:ke},tt}),Ee}const re=o.listitem;o.listitem=function(Ee){return re(O(Ee))};const oe=o.paragraph;o.paragraph=function(Ee){return oe(O(Ee))};const ie=o.tablecell;o.tablecell=function(Ee,Me){return ie(O(Ee),Me)},o.code=function(Ee,Me,ke){const tt=(Me||"").match(/\S*/)[0];return tt?["latex","katex","math"].indexOf(tt)>=0?`<p class='editormd-tex'>${Ee}</p>`:`<pre class="prettyprint linenums"><code class="language-${Me}">${ke?Ee:(0,W.escape)(Ee,!0)}</code></pre>
|
|
|
`:'<pre class="prettyprint linenums"><code>'+(ke?Ee:(0,W.escape)(Ee,!0))+"</code></pre>"},o.heading=function(Ee,Me,ke){let tt=this.options.headerPrefix+ke.toLowerCase().replace(/[^\w\\u4e00-\\u9fa5]]+/g,"-");return q.push({anchor:tt,level:Me,text:Ee}),"<h"+Me+' id="'+z+tt+'">'+Ee+"</h"+Me+">"},ae().setOptions({silent:!0,gfm:!0,pedantic:!1}),ae().use({tokenizer:k,renderer:o}),mt.ZP=ae()},29509:function(ln,mt,m){"use strict";m.d(mt,{o2:function(){return z},yT:function(){return g}});var v=m(77654),ae=m(34998);const W=ae.i.map(q=>`${q}-inverse`),fe=["success","processing","error","default","warning"];function z(q){return(arguments.length>1&&arguments[1]!==void 0?arguments[1]:!0)?[].concat((0,v.Z)(W),(0,v.Z)(ae.i)).includes(q):ae.i.includes(q)}function g(q){return fe.includes(q)}},99402:function(ln,mt,m){"use strict";m.d(mt,{T:function(){return ae},n:function(){return v}});function v(W){return["small","middle","large"].includes(W)}function ae(W){return W?typeof W=="number"&&!Number.isNaN(W):!1}},86013:function(ln,mt,m){"use strict";var v=m(59301),ae=m(19248);const W=fe=>{let z;return typeof fe=="object"&&(fe!=null&&fe.clearIcon)?z=fe:fe&&(z={clearIcon:v.createElement(ae.Z,null)}),z};mt.Z=W},54500:function(ln,mt,m){"use strict";m.d(mt,{Z:function(){return v}});const v=ae=>ae?typeof ae=="function"?ae():ae:null},52838:function(ln,mt,m){"use strict";m.d(mt,{Z:function(){return g}});var v=m(37645);function ae(q,te,o,C){if(C===!1)return{adjustX:!1,adjustY:!1};const M=C&&typeof C=="object"?C:{},y={};switch(q){case"top":case"bottom":y.shiftX=te.arrowOffsetHorizontal*2+o,y.shiftY=!0,y.adjustY=!0;break;case"left":case"right":y.shiftY=te.arrowOffsetVertical*2+o,y.shiftX=!0,y.adjustX=!0;break}const E=Object.assign(Object.assign({},y),M);return E.shiftX||(E.adjustX=!0),E.shiftY||(E.adjustY=!0),E}const W={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"]}},fe={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"]}},z=new Set(["topLeft","topRight","bottomLeft","bottomRight","leftTop","leftBottom","rightTop","rightBottom"]);function g(q){const{arrowWidth:te,autoAdjustOverflow:o,arrowPointAtCenter:C,offset:M,borderRadius:y,visibleFirst:E}=q,T=te/2,k={};return Object.keys(W).forEach(j=>{const Z=C&&fe[j]||W[j],U=Object.assign(Object.assign({},Z),{offset:[0,0],dynamicInset:!0});switch(k[j]=U,z.has(j)&&(U.autoArrow=!1),j){case"top":case"topLeft":case"topRight":U.offset[1]=-T-M;break;case"bottom":case"bottomLeft":case"bottomRight":U.offset[1]=T+M;break;case"left":case"leftTop":case"leftBottom":U.offset[0]=-T-M;break;case"right":case"rightTop":case"rightBottom":U.offset[0]=T+M;break}const A=(0,v.wZ)({contentRadius:y,limitVerticalRadius:!0});if(C)switch(j){case"topLeft":case"bottomLeft":U.offset[0]=-A.arrowOffsetHorizontal-T;break;case"topRight":case"bottomRight":U.offset[0]=A.arrowOffsetHorizontal+T;break;case"leftTop":case"rightTop":U.offset[1]=-A.arrowOffsetHorizontal*2+T;break;case"leftBottom":case"rightBottom":U.offset[1]=A.arrowOffsetHorizontal*2-T;break}U.overflow=ae(j,A,te,o),E&&(U.htmlRegion="visibleFirst")}),k}},82855:function(ln,mt,m){"use strict";m.d(mt,{F:function(){return z},Z:function(){return fe}});var v=m(92310),ae=m.n(v);const W=null;function fe(g,q,te){return ae()({[`${g}-status-success`]:q==="success",[`${g}-status-warning`]:q==="warning",[`${g}-status-error`]:q==="error",[`${g}-status-validating`]:q==="validating",[`${g}-has-feedback`]:te})}const z=(g,q)=>q||g},91882:function(ln,mt,m){"use strict";m.d(mt,{Z:function(){return Q}});var v=m(59301),ae=m(92310),W=m.n(ae),fe=m(11592),z=m(26112),g=m(22703),q=m(48755),te=m(84105),o=m(19563);const C=V=>{let{children:x}=V;const{getPrefixCls:w}=v.useContext(q.E_),H=w("breadcrumb");return v.createElement("li",{className:`${H}-separator`,"aria-hidden":"true"},x===""?x:x||"/")};C.__ANT_BREADCRUMB_SEPARATOR=!0;var M=C,y=function(V,x){var w={};for(var H in V)Object.prototype.hasOwnProperty.call(V,H)&&x.indexOf(H)<0&&(w[H]=V[H]);if(V!=null&&typeof Object.getOwnPropertySymbols=="function")for(var he=0,H=Object.getOwnPropertySymbols(V);he<H.length;he++)x.indexOf(H[he])<0&&Object.prototype.propertyIsEnumerable.call(V,H[he])&&(w[H[he]]=V[H[he]]);return w};function E(V,x){if(V.title===void 0||V.title===null)return null;const w=Object.keys(x).join("|");return typeof V.title=="object"?V.title:String(V.title).replace(new RegExp(`:(${w})`,"g"),(H,he)=>x[he]||H)}function T(V,x,w,H){if(w==null)return null;const{className:he,onClick:Ke}=x,ft=y(x,["className","onClick"]),Ue=Object.assign(Object.assign({},(0,z.Z)(ft,{data:!0,aria:!0})),{onClick:Ke});return H!==void 0?v.createElement("a",Object.assign({},Ue,{className:W()(`${V}-link`,he),href:H}),w):v.createElement("span",Object.assign({},Ue,{className:W()(`${V}-link`,he)}),w)}function k(V,x){return(H,he,Ke,ft,Ue)=>{if(x)return x(H,he,Ke,ft);const st=E(H,he);return T(V,H,st,Ue)}}var j=function(V,x){var w={};for(var H in V)Object.prototype.hasOwnProperty.call(V,H)&&x.indexOf(H)<0&&(w[H]=V[H]);if(V!=null&&typeof Object.getOwnPropertySymbols=="function")for(var he=0,H=Object.getOwnPropertySymbols(V);he<H.length;he++)x.indexOf(H[he])<0&&Object.prototype.propertyIsEnumerable.call(V,H[he])&&(w[H[he]]=V[H[he]]);return w};const Z=V=>{const{prefixCls:x,separator:w="/",children:H,menu:he,overlay:Ke,dropdownProps:ft,href:Ue}=V,pt=(Et=>{if(he||Ke){const Ne=Object.assign({},ft);if(he){const St=he||{},{items:at}=St,Nt=j(St,["items"]);Ne.menu=Object.assign(Object.assign({},Nt),{items:at==null?void 0:at.map((Ge,je)=>{var{key:Re,title:_e,label:Y,path:Le}=Ge,Ce=j(Ge,["key","title","label","path"]);let B=Y!=null?Y:_e;return Le&&(B=v.createElement("a",{href:`${Ue}${Le}`},B)),Object.assign(Object.assign({},Ce),{key:Re!=null?Re:je,label:B})})})}else Ke&&(Ne.overlay=Ke);return v.createElement(o.Z,Object.assign({placement:"bottom"},Ne),v.createElement("span",{className:`${x}-overlay-link`},Et,v.createElement(te.Z,null)))}return Et})(H);return pt!=null?v.createElement(v.Fragment,null,v.createElement("li",null,pt),w&&v.createElement(M,null,w)):null},U=V=>{const{prefixCls:x,children:w,href:H}=V,he=j(V,["prefixCls","children","href"]),{getPrefixCls:Ke}=v.useContext(q.E_),ft=Ke("breadcrumb",x);return v.createElement(Z,Object.assign({},he,{prefixCls:ft}),T(ft,he,w,H))};U.__ANT_BREADCRUMB_ITEM=!0;var A=U,K=m(36237),D=m(63356),O=m(16931),re=m(51636);const oe=V=>{const{componentCls:x,iconCls:w,calc:H}=V;return{[x]:Object.assign(Object.assign({},(0,D.Wf)(V)),{color:V.itemColor,fontSize:V.fontSize,[w]:{fontSize:V.iconFontSize},ol:{display:"flex",flexWrap:"wrap",margin:0,padding:0,listStyle:"none"},a:Object.assign({color:V.linkColor,transition:`color ${V.motionDurationMid}`,padding:`0 ${(0,K.unit)(V.paddingXXS)}`,borderRadius:V.borderRadiusSM,height:V.fontHeight,display:"inline-block",marginInline:H(V.marginXXS).mul(-1).equal(),"&:hover":{color:V.linkHoverColor,backgroundColor:V.colorBgTextHover}},(0,D.Qy)(V)),"li:last-child":{color:V.lastItemColor},[`${x}-separator`]:{marginInline:V.separatorMargin,color:V.separatorColor},[`${x}-link`]:{[`
|
|
|
> ${w} + span,
|
|
|
> ${w} + a
|
|
|
`]:{marginInlineStart:V.marginXXS}},[`${x}-overlay-link`]:{borderRadius:V.borderRadiusSM,height:V.fontHeight,display:"inline-block",padding:`0 ${(0,K.unit)(V.paddingXXS)}`,marginInline:H(V.marginXXS).mul(-1).equal(),[`> ${w}`]:{marginInlineStart:V.marginXXS,fontSize:V.fontSizeIcon},"&:hover":{color:V.linkHoverColor,backgroundColor:V.colorBgTextHover,a:{color:V.linkHoverColor}},a:{"&:hover":{backgroundColor:"transparent"}}},[`&${V.componentCls}-rtl`]:{direction:"rtl"}})}},ie=V=>({itemColor:V.colorTextDescription,lastItemColor:V.colorText,iconFontSize:V.fontSize,linkColor:V.colorTextDescription,linkHoverColor:V.colorText,separatorColor:V.colorTextDescription,separatorMargin:V.marginXS});var Ee=(0,O.I$)("Breadcrumb",V=>{const x=(0,re.mergeToken)(V,{});return oe(x)},ie),Me=function(V,x){var w={};for(var H in V)Object.prototype.hasOwnProperty.call(V,H)&&x.indexOf(H)<0&&(w[H]=V[H]);if(V!=null&&typeof Object.getOwnPropertySymbols=="function")for(var he=0,H=Object.getOwnPropertySymbols(V);he<H.length;he++)x.indexOf(H[he])<0&&Object.prototype.propertyIsEnumerable.call(V,H[he])&&(w[H[he]]=V[H[he]]);return w};function ke(V){const{breadcrumbName:x,children:w}=V,H=Me(V,["breadcrumbName","children"]),he=Object.assign({title:x},H);return w&&(he.menu={items:w.map(Ke=>{var{breadcrumbName:ft}=Ke,Ue=Me(Ke,["breadcrumbName"]);return Object.assign(Object.assign({},Ue),{title:ft})})}),he}function tt(V,x){return(0,v.useMemo)(()=>V||(x?x.map(ke):null),[V,x])}var ue=function(V,x){var w={};for(var H in V)Object.prototype.hasOwnProperty.call(V,H)&&x.indexOf(H)<0&&(w[H]=V[H]);if(V!=null&&typeof Object.getOwnPropertySymbols=="function")for(var he=0,H=Object.getOwnPropertySymbols(V);he<H.length;he++)x.indexOf(H[he])<0&&Object.prototype.propertyIsEnumerable.call(V,H[he])&&(w[H[he]]=V[H[he]]);return w};const X=(V,x)=>{if(x===void 0)return x;let w=(x||"").replace(/^\//,"");return Object.keys(V).forEach(H=>{w=w.replace(`:${H}`,V[H])}),w},L=V=>{const{prefixCls:x,separator:w="/",style:H,className:he,rootClassName:Ke,routes:ft,items:Ue,children:st,itemRender:pt,params:Et={}}=V,Ne=ue(V,["prefixCls","separator","style","className","rootClassName","routes","items","children","itemRender","params"]),{getPrefixCls:St,direction:at,breadcrumb:Nt}=v.useContext(q.E_);let Ge;const je=St("breadcrumb",x),[Re,_e,Y]=Ee(je),Le=tt(Ue,ft),Ce=k(je,pt);if(Le&&Le.length>0){const ce=[],ve=Ue||ft;Ge=Le.map((de,ye)=>{const{path:Te,key:we,type:Ie,menu:Ae,overlay:Xe,onClick:gt,className:ht,separator:nt,dropdownProps:Oe}=de,qe=X(Et,Te);qe!==void 0&&ce.push(qe);const rt=we!=null?we:ye;if(Ie==="separator")return v.createElement(M,{key:rt},nt);const ot={},Rt=ye===Le.length-1;Ae?ot.menu=Ae:Xe&&(ot.overlay=Xe);let{href:S}=de;return ce.length&&qe!==void 0&&(S=`#/${ce.join("/")}`),v.createElement(Z,Object.assign({key:rt},ot,(0,z.Z)(de,{data:!0,aria:!0}),{className:ht,dropdownProps:Oe,href:S,separator:Rt?"":w,onClick:gt,prefixCls:je}),Ce(de,Et,ve,ce,S))})}else if(st){const ce=(0,fe.Z)(st).length;Ge=(0,fe.Z)(st).map((ve,de)=>{if(!ve)return ve;const ye=de===ce-1;return(0,g.Tm)(ve,{separator:ye?"":w,key:de})})}const B=W()(je,Nt==null?void 0:Nt.className,{[`${je}-rtl`]:at==="rtl"},he,Ke,_e,Y),P=Object.assign(Object.assign({},Nt==null?void 0:Nt.style),H);return Re(v.createElement("nav",Object.assign({className:B,style:P},Ne),v.createElement("ol",null,Ge)))};L.Item=A,L.Separator=M;var se=L,Q=se},36170:function(ln,mt,m){"use strict";m.d(mt,{C2:function(){return g}});var v=m(36237),ae=m(63356),W=m(51636),fe=m(16931);const z=q=>{const{checkboxCls:te}=q,o=`${te}-wrapper`;return[{[`${te}-group`]:Object.assign(Object.assign({},(0,ae.Wf)(q)),{display:"inline-flex",flexWrap:"wrap",columnGap:q.marginXS,[`> ${q.antCls}-row`]:{flex:1}}),[o]:Object.assign(Object.assign({},(0,ae.Wf)(q)),{display:"inline-flex",alignItems:"baseline",cursor:"pointer","&:after":{display:"inline-block",width:0,overflow:"hidden",content:"'\\a0'"},[`& + ${o}`]:{marginInlineStart:0},[`&${o}-in-form-item`]:{'input[type="checkbox"]':{width:14,height:14}}}),[te]:Object.assign(Object.assign({},(0,ae.Wf)(q)),{position:"relative",whiteSpace:"nowrap",lineHeight:1,cursor:"pointer",borderRadius:q.borderRadiusSM,alignSelf:"center",[`${te}-input`]:{position:"absolute",inset:0,zIndex:1,cursor:"pointer",opacity:0,margin:0,[`&:focus-visible + ${te}-inner`]:Object.assign({},(0,ae.oN)(q))},[`${te}-inner`]:{boxSizing:"border-box",display:"block",width:q.checkboxSize,height:q.checkboxSize,direction:"ltr",backgroundColor:q.colorBgContainer,border:`${(0,v.unit)(q.lineWidth)} ${q.lineType} ${q.colorBorder}`,borderRadius:q.borderRadiusSM,borderCollapse:"separate",transition:`all ${q.motionDurationSlow}`,"&:after":{boxSizing:"border-box",position:"absolute",top:"50%",insetInlineStart:"25%",display:"table",width:q.calc(q.checkboxSize).div(14).mul(5).equal(),height:q.calc(q.checkboxSize).div(14).mul(8).equal(),border:`${(0,v.unit)(q.lineWidthBold)} solid ${q.colorWhite}`,borderTop:0,borderInlineStart:0,transform:"rotate(45deg) scale(0) translate(-50%,-50%)",opacity:0,content:'""',transition:`all ${q.motionDurationFast} ${q.motionEaseInBack}, opacity ${q.motionDurationFast}`}},"& + span":{paddingInlineStart:q.paddingXS,paddingInlineEnd:q.paddingXS}})},{[`
|
|
|
${o}:not(${o}-disabled),
|
|
|
${te}:not(${te}-disabled)
|
|
|
`]:{[`&:hover ${te}-inner`]:{borderColor:q.colorPrimary}},[`${o}:not(${o}-disabled)`]:{[`&:hover ${te}-checked:not(${te}-disabled) ${te}-inner`]:{backgroundColor:q.colorPrimaryHover,borderColor:"transparent"},[`&:hover ${te}-checked:not(${te}-disabled):after`]:{borderColor:q.colorPrimaryHover}}},{[`${te}-checked`]:{[`${te}-inner`]:{backgroundColor:q.colorPrimary,borderColor:q.colorPrimary,"&:after":{opacity:1,transform:"rotate(45deg) scale(1) translate(-50%,-50%)",transition:`all ${q.motionDurationMid} ${q.motionEaseOutBack} ${q.motionDurationFast}`}}},[`
|
|
|
${o}-checked:not(${o}-disabled),
|
|
|
${te}-checked:not(${te}-disabled)
|
|
|
`]:{[`&:hover ${te}-inner`]:{backgroundColor:q.colorPrimaryHover,borderColor:"transparent"}}},{[te]:{"&-indeterminate":{[`${te}-inner`]:{backgroundColor:`${q.colorBgContainer} !important`,borderColor:`${q.colorBorder} !important`,"&:after":{top:"50%",insetInlineStart:"50%",width:q.calc(q.fontSizeLG).div(2).equal(),height:q.calc(q.fontSizeLG).div(2).equal(),backgroundColor:q.colorPrimary,border:0,transform:"translate(-50%, -50%) scale(1)",opacity:1,content:'""'}},[`&:hover ${te}-inner`]:{backgroundColor:`${q.colorBgContainer} !important`,borderColor:`${q.colorPrimary} !important`}}}},{[`${o}-disabled`]:{cursor:"not-allowed"},[`${te}-disabled`]:{[`&, ${te}-input`]:{cursor:"not-allowed",pointerEvents:"none"},[`${te}-inner`]:{background:q.colorBgContainerDisabled,borderColor:q.colorBorder,"&:after":{borderColor:q.colorTextDisabled}},"&:after":{display:"none"},"& + span":{color:q.colorTextDisabled},[`&${te}-indeterminate ${te}-inner::after`]:{background:q.colorTextDisabled}}}]};function g(q,te){const o=(0,W.mergeToken)(te,{checkboxCls:`.${q}`,checkboxSize:te.controlInteractiveSize});return[z(o)]}mt.ZP=(0,fe.I$)("Checkbox",(q,te)=>{let{prefixCls:o}=te;return[g(o,q)]})},38406:function(ln,mt,m){"use strict";var v=m(59301),ae=m(48755),W=m(584);const fe=z=>{const{componentName:g}=z,{getPrefixCls:q}=(0,v.useContext)(ae.E_),te=q("empty");switch(g){case"Table":case"List":return v.createElement(W.Z,{image:W.Z.PRESENTED_IMAGE_SIMPLE});case"Select":case"TreeSelect":case"Cascader":case"Transfer":case"Mentions":return v.createElement(W.Z,{image:W.Z.PRESENTED_IMAGE_SIMPLE,className:`${te}-small`});case"Table.filter":return null;default:return v.createElement(W.Z,null)}};mt.Z=fe},19563:function(ln,mt,m){"use strict";m.d(mt,{Z:function(){return ft}});var v=m(59301),ae=m(33853),W=m(38819),fe=m(92310),z=m.n(fe),g=m(96478),q=m(6089),te=m(18929),o=m(2738),C=m(75030),y=Ue=>typeof Ue!="object"&&typeof Ue!="function"||Ue===null,E=m(52838),T=m(45915),k=m(22703),j=m(32383),Z=m(55743),U=m(48755),A=m(83397),K=m(93041),D=m(78857),O=m(57700),re=m(36237),oe=m(63356),ie=m(46e3),Ee=m(93873),Me=m(34925),ke=m(37645),tt=m(36305),ue=m(16931),X=m(51636),se=Ue=>{const{componentCls:st,menuCls:pt,colorError:Et,colorTextLightSolid:Ne}=Ue,St=`${pt}-item`;return{[`${st}, ${st}-menu-submenu`]:{[`${pt} ${St}`]:{[`&${St}-danger:not(${St}-disabled)`]:{color:Et,"&:hover":{color:Ne,backgroundColor:Et}}}}}};const Q=Ue=>{const{componentCls:st,menuCls:pt,zIndexPopup:Et,dropdownArrowDistance:Ne,sizePopupArrow:St,antCls:at,iconCls:Nt,motionDurationMid:Ge,paddingBlock:je,fontSize:Re,dropdownEdgeChildPadding:_e,colorTextDisabled:Y,fontSizeIcon:Le,controlPaddingHorizontal:Ce,colorBgElevated:B}=Ue;return[{[st]:{position:"absolute",top:-9999,left:{_skip_check_:!0,value:-9999},zIndex:Et,display:"block","&::before":{position:"absolute",insetBlock:Ue.calc(St).div(2).sub(Ne).equal(),zIndex:-9999,opacity:1e-4,content:'""'},"&-menu-vertical":{maxHeight:"100vh",overflowY:"auto"},[`&-trigger${at}-btn`]:{[`& > ${Nt}-down, & > ${at}-btn-icon > ${Nt}-down`]:{fontSize:Le}},[`${st}-wrap`]:{position:"relative",[`${at}-btn > ${Nt}-down`]:{fontSize:Le},[`${Nt}-down::before`]:{transition:`transform ${Ge}`}},[`${st}-wrap-open`]:{[`${Nt}-down::before`]:{transform:"rotate(180deg)"}},"\n &-hidden,\n &-menu-hidden,\n &-menu-submenu-hidden\n ":{display:"none"},[`&${at}-slide-down-enter${at}-slide-down-enter-active${st}-placement-bottomLeft,
|
|
|
&${at}-slide-down-appear${at}-slide-down-appear-active${st}-placement-bottomLeft,
|
|
|
&${at}-slide-down-enter${at}-slide-down-enter-active${st}-placement-bottom,
|
|
|
&${at}-slide-down-appear${at}-slide-down-appear-active${st}-placement-bottom,
|
|
|
&${at}-slide-down-enter${at}-slide-down-enter-active${st}-placement-bottomRight,
|
|
|
&${at}-slide-down-appear${at}-slide-down-appear-active${st}-placement-bottomRight`]:{animationName:ie.fJ},[`&${at}-slide-up-enter${at}-slide-up-enter-active${st}-placement-topLeft,
|
|
|
&${at}-slide-up-appear${at}-slide-up-appear-active${st}-placement-topLeft,
|
|
|
&${at}-slide-up-enter${at}-slide-up-enter-active${st}-placement-top,
|
|
|
&${at}-slide-up-appear${at}-slide-up-appear-active${st}-placement-top,
|
|
|
&${at}-slide-up-enter${at}-slide-up-enter-active${st}-placement-topRight,
|
|
|
&${at}-slide-up-appear${at}-slide-up-appear-active${st}-placement-topRight`]:{animationName:ie.Qt},[`&${at}-slide-down-leave${at}-slide-down-leave-active${st}-placement-bottomLeft,
|
|
|
&${at}-slide-down-leave${at}-slide-down-leave-active${st}-placement-bottom,
|
|
|
&${at}-slide-down-leave${at}-slide-down-leave-active${st}-placement-bottomRight`]:{animationName:ie.Uw},[`&${at}-slide-up-leave${at}-slide-up-leave-active${st}-placement-topLeft,
|
|
|
&${at}-slide-up-leave${at}-slide-up-leave-active${st}-placement-top,
|
|
|
&${at}-slide-up-leave${at}-slide-up-leave-active${st}-placement-topRight`]:{animationName:ie.ly}}},(0,ke.ZP)(Ue,B,{arrowPlacement:{top:!0,bottom:!0}}),{[`${st} ${pt}`]:{position:"relative",margin:0},[`${pt}-submenu-popup`]:{position:"absolute",zIndex:Et,background:"transparent",boxShadow:"none",transformOrigin:"0 0","ul, li":{listStyle:"none",margin:0}},[`${st}, ${st}-menu-submenu`]:Object.assign(Object.assign({},(0,oe.Wf)(Ue)),{[pt]:Object.assign(Object.assign({padding:_e,listStyleType:"none",backgroundColor:B,backgroundClip:"padding-box",borderRadius:Ue.borderRadiusLG,outline:"none",boxShadow:Ue.boxShadowSecondary},(0,oe.Qy)(Ue)),{"&:empty":{padding:0,boxShadow:"none"},[`${pt}-item-group-title`]:{padding:`${(0,re.unit)(je)} ${(0,re.unit)(Ce)}`,color:Ue.colorTextDescription,transition:`all ${Ge}`},[`${pt}-item`]:{position:"relative",display:"flex",alignItems:"center"},[`${pt}-item-icon`]:{minWidth:Re,marginInlineEnd:Ue.marginXS,fontSize:Ue.fontSizeSM},[`${pt}-title-content`]:{flex:"auto","&-with-extra":{display:"inline-flex",alignItems:"center",width:"100%"},"> a":{color:"inherit",transition:`all ${Ge}`,"&:hover":{color:"inherit"},"&::after":{position:"absolute",inset:0,content:'""'}},[`${pt}-item-extra`]:{paddingInlineStart:Ue.padding,marginInlineStart:"auto",fontSize:Ue.fontSizeSM,color:Ue.colorTextDescription}},[`${pt}-item, ${pt}-submenu-title`]:Object.assign(Object.assign({display:"flex",margin:0,padding:`${(0,re.unit)(je)} ${(0,re.unit)(Ce)}`,color:Ue.colorText,fontWeight:"normal",fontSize:Re,lineHeight:Ue.lineHeight,cursor:"pointer",transition:`all ${Ge}`,borderRadius:Ue.borderRadiusSM,"&:hover, &-active":{backgroundColor:Ue.controlItemBgHover}},(0,oe.Qy)(Ue)),{"&-selected":{color:Ue.colorPrimary,backgroundColor:Ue.controlItemBgActive,"&:hover, &-active":{backgroundColor:Ue.controlItemBgActiveHover}},"&-disabled":{color:Y,cursor:"not-allowed","&:hover":{color:Y,backgroundColor:B,cursor:"not-allowed"},a:{pointerEvents:"none"}},"&-divider":{height:1,margin:`${(0,re.unit)(Ue.marginXXS)} 0`,overflow:"hidden",lineHeight:0,backgroundColor:Ue.colorSplit},[`${st}-menu-submenu-expand-icon`]:{position:"absolute",insetInlineEnd:Ue.paddingXS,[`${st}-menu-submenu-arrow-icon`]:{marginInlineEnd:"0 !important",color:Ue.colorTextDescription,fontSize:Le,fontStyle:"normal"}}}),[`${pt}-item-group-list`]:{margin:`0 ${(0,re.unit)(Ue.marginXS)}`,padding:0,listStyle:"none"},[`${pt}-submenu-title`]:{paddingInlineEnd:Ue.calc(Ce).add(Ue.fontSizeSM).equal()},[`${pt}-submenu-vertical`]:{position:"relative"},[`${pt}-submenu${pt}-submenu-disabled ${st}-menu-submenu-title`]:{[`&, ${st}-menu-submenu-arrow-icon`]:{color:Y,backgroundColor:B,cursor:"not-allowed"}},[`${pt}-submenu-selected ${st}-menu-submenu-title`]:{color:Ue.colorPrimary}})})},[(0,ie.oN)(Ue,"slide-up"),(0,ie.oN)(Ue,"slide-down"),(0,Ee.Fm)(Ue,"move-up"),(0,Ee.Fm)(Ue,"move-down"),(0,Me._y)(Ue,"zoom-big")]]},V=Ue=>Object.assign(Object.assign({zIndexPopup:Ue.zIndexPopupBase+50,paddingBlock:(Ue.controlHeight-Ue.fontSize*Ue.lineHeight)/2},(0,ke.wZ)({contentRadius:Ue.borderRadiusLG,limitVerticalRadius:!0})),(0,tt.w)(Ue));var x=(0,ue.I$)("Dropdown",Ue=>{const{marginXXS:st,sizePopupArrow:pt,paddingXXS:Et,componentCls:Ne}=Ue,St=(0,X.mergeToken)(Ue,{menuCls:`${Ne}-menu`,dropdownArrowDistance:Ue.calc(pt).div(2).add(st).equal(),dropdownEdgeChildPadding:Et});return[Q(St),se(St)]},V,{resetStyle:!1});const w=null,H=Ue=>{var st;const{menu:pt,arrow:Et,prefixCls:Ne,children:St,trigger:at,disabled:Nt,dropdownRender:Ge,getPopupContainer:je,overlayClassName:Re,rootClassName:_e,overlayStyle:Y,open:Le,onOpenChange:Ce,visible:B,onVisibleChange:P,mouseEnterDelay:ce=.15,mouseLeaveDelay:ve=.1,autoAdjustOverflow:de=!0,placement:ye="",overlay:Te,transitionName:we}=Ue,{getPopupContainer:Ie,getPrefixCls:Ae,direction:Xe,dropdown:gt}=v.useContext(U.E_),ht=(0,j.ln)("Dropdown"),nt=v.useMemo(()=>{const Bt=Ae();return we!==void 0?we:ye.includes("top")?`${Bt}-slide-down`:`${Bt}-slide-up`},[Ae,ye,we]),Oe=v.useMemo(()=>ye?ye.includes("Center")?ye.slice(0,ye.indexOf("Center")):ye:Xe==="rtl"?"bottomRight":"bottomLeft",[ye,Xe]),qe=Ae("dropdown",Ne),rt=(0,A.Z)(qe),[ot,Rt,S]=x(qe,rt),[,R]=(0,O.ZP)(),Ze=v.Children.only(y(St)?v.createElement("span",null,St):St),J=(0,k.Tm)(Ze,{className:z()(`${qe}-trigger`,{[`${qe}-rtl`]:Xe==="rtl"},Ze.props.className),disabled:(st=Ze.props.disabled)!==null&&st!==void 0?st:Nt}),be=Nt?[]:at,zt=!!(be!=null&&be.includes("contextMenu")),[ze,Qe]=(0,te.Z)(!1,{value:Le!=null?Le:B}),lt=(0,q.Z)(Bt=>{Ce==null||Ce(Bt,{source:"trigger"}),P==null||P(Bt),Qe(Bt)}),le=z()(Re,_e,Rt,S,rt,gt==null?void 0:gt.className,{[`${qe}-rtl`]:Xe==="rtl"}),pe=(0,E.Z)({arrowPointAtCenter:typeof Et=="object"&&Et.pointAtCenter,autoAdjustOverflow:de,offset:R.marginXXS,arrowWidth:Et?R.sizePopupArrow:0,borderRadius:R.borderRadius}),Pe=v.useCallback(()=>{pt!=null&&pt.selectable&&(pt!=null&&pt.multiple)||(Ce==null||Ce(!1,{source:"menu"}),Qe(!1))},[pt==null?void 0:pt.selectable,pt==null?void 0:pt.multiple]),$e=()=>{let Bt;return pt!=null&&pt.items?Bt=v.createElement(K.default,Object.assign({},pt)):typeof Te=="function"?Bt=Te():Bt=Te,Ge&&(Bt=Ge(Bt)),Bt=v.Children.only(typeof Bt=="string"?v.createElement("span",null,Bt):Bt),v.createElement(D.J,{prefixCls:`${qe}-menu`,rootClassName:z()(S,rt),expandIcon:v.createElement("span",{className:`${qe}-menu-submenu-arrow`},Xe==="rtl"?v.createElement(ae.Z,{className:`${qe}-menu-submenu-arrow-icon`}):v.createElement(W.Z,{className:`${qe}-menu-submenu-arrow-icon`})),mode:"vertical",selectable:!1,onClick:Pe,validator:en=>{let{mode:dn}=en}},Bt)},[G,bt]=(0,C.Cn)("Dropdown",Y==null?void 0:Y.zIndex);let xe=v.createElement(g.Z,Object.assign({alignPoint:zt},(0,o.Z)(Ue,["rootClassName"]),{mouseEnterDelay:ce,mouseLeaveDelay:ve,visible:ze,builtinPlacements:pe,arrow:!!Et,overlayClassName:le,prefixCls:qe,getPopupContainer:je||Ie,transitionName:nt,trigger:be,overlay:$e,placement:Oe,onVisibleChange:lt,overlayStyle:Object.assign(Object.assign(Object.assign({},gt==null?void 0:gt.style),Y),{zIndex:G})}),J);return G&&(xe=v.createElement(Z.Z.Provider,{value:bt},xe)),ot(xe)},he=(0,T.Z)(H,"align",void 0,"dropdown",Ue=>Ue),Ke=Ue=>v.createElement(he,Object.assign({},Ue),v.createElement("span",null));H._InternalPanelDoNotUseOrYouWillBeFired=Ke;var ft=H},584:function(ln,mt,m){"use strict";m.d(mt,{Z:function(){return K}});var v=m(59301),ae=m(92310),W=m.n(ae),fe=m(9017),z=m(17835),g=m(57700),te=()=>{const[,D]=(0,g.ZP)(),[O]=(0,fe.Z)("Empty"),oe=new z.FastColor(D.colorBgBase).toHsl().l<.5?{opacity:.65}:{};return v.createElement("svg",{style:oe,width:"184",height:"152",viewBox:"0 0 184 152",xmlns:"http://www.w3.org/2000/svg"},v.createElement("title",null,(O==null?void 0:O.description)||"Empty"),v.createElement("g",{fill:"none",fillRule:"evenodd"},v.createElement("g",{transform:"translate(24 31.67)"},v.createElement("ellipse",{fillOpacity:".8",fill:"#F5F5F7",cx:"67.797",cy:"106.89",rx:"67.797",ry:"12.668"}),v.createElement("path",{d:"M122.034 69.674L98.109 40.229c-1.148-1.386-2.826-2.225-4.593-2.225h-51.44c-1.766 0-3.444.839-4.592 2.225L13.56 69.674v15.383h108.475V69.674z",fill:"#AEB8C2"}),v.createElement("path",{d:"M101.537 86.214L80.63 61.102c-1.001-1.207-2.507-1.867-4.048-1.867H31.724c-1.54 0-3.047.66-4.048 1.867L6.769 86.214v13.792h94.768V86.214z",fill:"url(#linearGradient-1)",transform:"translate(13.56)"}),v.createElement("path",{d:"M33.83 0h67.933a4 4 0 0 1 4 4v93.344a4 4 0 0 1-4 4H33.83a4 4 0 0 1-4-4V4a4 4 0 0 1 4-4z",fill:"#F5F5F7"}),v.createElement("path",{d:"M42.678 9.953h50.237a2 2 0 0 1 2 2V36.91a2 2 0 0 1-2 2H42.678a2 2 0 0 1-2-2V11.953a2 2 0 0 1 2-2zM42.94 49.767h49.713a2.262 2.262 0 1 1 0 4.524H42.94a2.262 2.262 0 0 1 0-4.524zM42.94 61.53h49.713a2.262 2.262 0 1 1 0 4.525H42.94a2.262 2.262 0 0 1 0-4.525zM121.813 105.032c-.775 3.071-3.497 5.36-6.735 5.36H20.515c-3.238 0-5.96-2.29-6.734-5.36a7.309 7.309 0 0 1-.222-1.79V69.675h26.318c2.907 0 5.25 2.448 5.25 5.42v.04c0 2.971 2.37 5.37 5.277 5.37h34.785c2.907 0 5.277-2.421 5.277-5.393V75.1c0-2.972 2.343-5.426 5.25-5.426h26.318v33.569c0 .617-.077 1.216-.221 1.789z",fill:"#DCE0E6"})),v.createElement("path",{d:"M149.121 33.292l-6.83 2.65a1 1 0 0 1-1.317-1.23l1.937-6.207c-2.589-2.944-4.109-6.534-4.109-10.408C138.802 8.102 148.92 0 161.402 0 173.881 0 184 8.102 184 18.097c0 9.995-10.118 18.097-22.599 18.097-4.528 0-8.744-1.066-12.28-2.902z",fill:"#DCE0E6"}),v.createElement("g",{transform:"translate(149.65 15.383)",fill:"#FFF"},v.createElement("ellipse",{cx:"20.654",cy:"3.167",rx:"2.849",ry:"2.815"}),v.createElement("path",{d:"M5.698 5.63H0L2.898.704zM9.259.704h4.985V5.63H9.259z"}))))},C=()=>{const[,D]=(0,g.ZP)(),[O]=(0,fe.Z)("Empty"),{colorFill:re,colorFillTertiary:oe,colorFillQuaternary:ie,colorBgContainer:Ee}=D,{borderColor:Me,shadowColor:ke,contentColor:tt}=(0,v.useMemo)(()=>({borderColor:new z.FastColor(re).onBackground(Ee).toHexString(),shadowColor:new z.FastColor(oe).onBackground(Ee).toHexString(),contentColor:new z.FastColor(ie).onBackground(Ee).toHexString()}),[re,oe,ie,Ee]);return v.createElement("svg",{width:"64",height:"41",viewBox:"0 0 64 41",xmlns:"http://www.w3.org/2000/svg"},v.createElement("title",null,(O==null?void 0:O.description)||"Empty"),v.createElement("g",{transform:"translate(0 1)",fill:"none",fillRule:"evenodd"},v.createElement("ellipse",{fill:ke,cx:"32",cy:"33",rx:"32",ry:"7"}),v.createElement("g",{fillRule:"nonzero",stroke:Me},v.createElement("path",{d:"M55 12.76L44.854 1.258C44.367.474 43.656 0 42.907 0H21.093c-.749 0-1.46.474-1.947 1.257L9 12.761V22h46v-9.24z"}),v.createElement("path",{d:"M41.613 15.931c0-1.605.994-2.93 2.227-2.931H55v18.137C55 33.26 53.68 35 52.05 35h-40.1C10.32 35 9 33.259 9 31.137V13h11.16c1.233 0 2.227 1.323 2.227 2.928v.022c0 1.605 1.005 2.901 2.237 2.901h14.752c1.232 0 2.237-1.308 2.237-2.913v-.007z",fill:tt}))))},M=m(16931),y=m(51636);const E=D=>{const{componentCls:O,margin:re,marginXS:oe,marginXL:ie,fontSize:Ee,lineHeight:Me}=D;return{[O]:{marginInline:oe,fontSize:Ee,lineHeight:Me,textAlign:"center",[`${O}-image`]:{height:D.emptyImgHeight,marginBottom:oe,opacity:D.opacityImage,img:{height:"100%"},svg:{maxWidth:"100%",height:"100%",margin:"auto"}},[`${O}-description`]:{color:D.colorTextDescription},[`${O}-footer`]:{marginTop:re},"&-normal":{marginBlock:ie,color:D.colorTextDescription,[`${O}-description`]:{color:D.colorTextDescription},[`${O}-image`]:{height:D.emptyImgHeightMD}},"&-small":{marginBlock:oe,color:D.colorTextDescription,[`${O}-image`]:{height:D.emptyImgHeightSM}}}}};var T=(0,M.I$)("Empty",D=>{const{componentCls:O,controlHeightLG:re,calc:oe}=D,ie=(0,y.mergeToken)(D,{emptyImgCls:`${O}-img`,emptyImgHeight:oe(re).mul(2.5).equal(),emptyImgHeightMD:re,emptyImgHeightSM:oe(re).mul(.875).equal()});return[E(ie)]}),k=m(48755),j=function(D,O){var re={};for(var oe in D)Object.prototype.hasOwnProperty.call(D,oe)&&O.indexOf(oe)<0&&(re[oe]=D[oe]);if(D!=null&&typeof Object.getOwnPropertySymbols=="function")for(var ie=0,oe=Object.getOwnPropertySymbols(D);ie<oe.length;ie++)O.indexOf(oe[ie])<0&&Object.prototype.propertyIsEnumerable.call(D,oe[ie])&&(re[oe[ie]]=D[oe[ie]]);return re};const Z=v.createElement(te,null),U=v.createElement(C,null),A=D=>{const{className:O,rootClassName:re,prefixCls:oe,image:ie=Z,description:Ee,children:Me,imageStyle:ke,style:tt,classNames:ue,styles:X}=D,L=j(D,["className","rootClassName","prefixCls","image","description","children","imageStyle","style","classNames","styles"]),{getPrefixCls:se,direction:Q,className:V,style:x,classNames:w,styles:H}=(0,k.dj)("empty"),he=se("empty",oe),[Ke,ft,Ue]=T(he),[st]=(0,fe.Z)("Empty"),pt=typeof Ee!="undefined"?Ee:st==null?void 0:st.description,Et=typeof pt=="string"?pt:"empty";let Ne=null;return typeof ie=="string"?Ne=v.createElement("img",{alt:Et,src:ie}):Ne=ie,Ke(v.createElement("div",Object.assign({className:W()(ft,Ue,he,V,{[`${he}-normal`]:ie===U,[`${he}-rtl`]:Q==="rtl"},O,re,w.root,ue==null?void 0:ue.root),style:Object.assign(Object.assign(Object.assign(Object.assign({},H.root),x),X==null?void 0:X.root),tt)},L),v.createElement("div",{className:W()(`${he}-image`,w.image,ue==null?void 0:ue.image),style:Object.assign(Object.assign(Object.assign({},ke),H.image),X==null?void 0:X.image)},Ne),pt&&v.createElement("div",{className:W()(`${he}-description`,w.description,ue==null?void 0:ue.description),style:Object.assign(Object.assign({},H.description),X==null?void 0:X.description)},pt),Me&&v.createElement("div",{className:W()(`${he}-footer`,w.footer,ue==null?void 0:ue.footer),style:Object.assign(Object.assign({},H.footer),X==null?void 0:X.footer)},Me)))};A.PRESENTED_IMAGE_DEFAULT=Z,A.PRESENTED_IMAGE_SIMPLE=U;var K=A},24971:function(ln,mt,m){"use strict";var v=m(59301),ae=m(56553),W=m(48755);const fe=function(z,g){let q=arguments.length>2&&arguments[2]!==void 0?arguments[2]:void 0;var te,o;const{variant:C,[z]:M}=v.useContext(W.E_),y=v.useContext(ae.pg),E=M==null?void 0:M.variant;let T;typeof g!="undefined"?T=g:q===!1?T="borderless":T=(o=(te=y!=null?y:E)!==null&&te!==void 0?te:C)!==null&&o!==void 0?o:"outlined";const k=W.tr.includes(T);return[T,k]};mt.Z=fe},28284:function(ln,mt,m){"use strict";m.d(mt,{default:function(){return ct}});var v=m(56553),ae=m(77654),W=m(59301),fe=m(92310),z=m.n(fe),g=m(77900),q=m(86641),te=m(83397);function o(Se){const[He,it]=W.useState(Se);return W.useEffect(()=>{const Je=setTimeout(()=>{it(Se)},Se.length?0:10);return()=>{clearTimeout(Je)}},[Se]),He}var C=m(36237),M=m(63356),y=m(34925),E=m(34961),T=m(51636),k=m(16931),Z=Se=>{const{componentCls:He}=Se,it=`${He}-show-help`,Je=`${He}-show-help-item`;return{[it]:{transition:`opacity ${Se.motionDurationFast} ${Se.motionEaseInOut}`,"&-appear, &-enter":{opacity:0,"&-active":{opacity:1}},"&-leave":{opacity:1,"&-active":{opacity:0}},[Je]:{overflow:"hidden",transition:`height ${Se.motionDurationFast} ${Se.motionEaseInOut},
|
|
|
opacity ${Se.motionDurationFast} ${Se.motionEaseInOut},
|
|
|
transform ${Se.motionDurationFast} ${Se.motionEaseInOut} !important`,[`&${Je}-appear, &${Je}-enter`]:{transform:"translateY(-5px)",opacity:0,"&-active":{transform:"translateY(0)",opacity:1}},[`&${Je}-leave-active`]:{transform:"translateY(-5px)"}}}}};const U=Se=>({legend:{display:"block",width:"100%",marginBottom:Se.marginLG,padding:0,color:Se.colorTextDescription,fontSize:Se.fontSizeLG,lineHeight:"inherit",border:0,borderBottom:`${(0,C.unit)(Se.lineWidth)} ${Se.lineType} ${Se.colorBorder}`},'input[type="search"]':{boxSizing:"border-box"},'input[type="radio"], input[type="checkbox"]':{lineHeight:"normal"},'input[type="file"]':{display:"block"},'input[type="range"]':{display:"block",width:"100%"},"select[multiple], select[size]":{height:"auto"},"input[type='file']:focus,\n input[type='radio']:focus,\n input[type='checkbox']:focus":{outline:0,boxShadow:`0 0 0 ${(0,C.unit)(Se.controlOutlineWidth)} ${Se.controlOutline}`},output:{display:"block",paddingTop:15,color:Se.colorText,fontSize:Se.fontSize,lineHeight:Se.lineHeight}}),A=(Se,He)=>{const{formItemCls:it}=Se;return{[it]:{[`${it}-label > label`]:{height:He},[`${it}-control-input`]:{minHeight:He}}}},K=Se=>{const{componentCls:He}=Se;return{[Se.componentCls]:Object.assign(Object.assign(Object.assign({},(0,M.Wf)(Se)),U(Se)),{[`${He}-text`]:{display:"inline-block",paddingInlineEnd:Se.paddingSM},"&-small":Object.assign({},A(Se,Se.controlHeightSM)),"&-large":Object.assign({},A(Se,Se.controlHeightLG))})}},D=Se=>{const{formItemCls:He,iconCls:it,rootPrefixCls:Je,antCls:yt,labelRequiredMarkColor:$t,labelColor:Jt,labelFontSize:nn,labelHeight:Ht,labelColonMarginInlineStart:Qt,labelColonMarginInlineEnd:pn,itemMarginBottom:qt}=Se;return{[He]:Object.assign(Object.assign({},(0,M.Wf)(Se)),{marginBottom:qt,verticalAlign:"top","&-with-help":{transition:"none"},[`&-hidden,
|
|
|
&-hidden${yt}-row`]:{display:"none"},"&-has-warning":{[`${He}-split`]:{color:Se.colorError}},"&-has-error":{[`${He}-split`]:{color:Se.colorWarning}},[`${He}-label`]:{flexGrow:0,overflow:"hidden",whiteSpace:"nowrap",textAlign:"end",verticalAlign:"middle","&-left":{textAlign:"start"},"&-wrap":{overflow:"unset",lineHeight:Se.lineHeight,whiteSpace:"unset"},"> label":{position:"relative",display:"inline-flex",alignItems:"center",maxWidth:"100%",height:Ht,color:Jt,fontSize:nn,[`> ${it}`]:{fontSize:Se.fontSize,verticalAlign:"top"},[`&${He}-required`]:{"&::before":{display:"inline-block",marginInlineEnd:Se.marginXXS,color:$t,fontSize:Se.fontSize,fontFamily:"SimSun, sans-serif",lineHeight:1,content:'"*"'},[`&${He}-required-mark-hidden, &${He}-required-mark-optional`]:{"&::before":{display:"none"}}},[`${He}-optional`]:{display:"inline-block",marginInlineStart:Se.marginXXS,color:Se.colorTextDescription,[`&${He}-required-mark-hidden`]:{display:"none"}},[`${He}-tooltip`]:{color:Se.colorTextDescription,cursor:"help",writingMode:"horizontal-tb",marginInlineStart:Se.marginXXS},"&::after":{content:'":"',position:"relative",marginBlock:0,marginInlineStart:Qt,marginInlineEnd:pn},[`&${He}-no-colon::after`]:{content:'"\\a0"'}}},[`${He}-control`]:{"--ant-display":"flex",flexDirection:"column",flexGrow:1,[`&:first-child:not([class^="'${Je}-col-'"]):not([class*="' ${Je}-col-'"])`]:{width:"100%"},"&-input":{position:"relative",display:"flex",alignItems:"center",minHeight:Se.controlHeight,"&-content":{flex:"auto",maxWidth:"100%"}}},[He]:{"&-additional":{display:"flex",flexDirection:"column"},"&-explain, &-extra":{clear:"both",color:Se.colorTextDescription,fontSize:Se.fontSize,lineHeight:Se.lineHeight},"&-explain-connected":{width:"100%"},"&-extra":{minHeight:Se.controlHeightSM,transition:`color ${Se.motionDurationMid} ${Se.motionEaseOut}`},"&-explain":{"&-error":{color:Se.colorError},"&-warning":{color:Se.colorWarning}}},[`&-with-help ${He}-explain`]:{height:"auto",opacity:1},[`${He}-feedback-icon`]:{fontSize:Se.fontSize,textAlign:"center",visibility:"visible",animationName:y.kr,animationDuration:Se.motionDurationMid,animationTimingFunction:Se.motionEaseOutBack,pointerEvents:"none","&-success":{color:Se.colorSuccess},"&-error":{color:Se.colorError},"&-warning":{color:Se.colorWarning},"&-validating":{color:Se.colorPrimary}}})}},O=(Se,He)=>{const{formItemCls:it}=Se;return{[`${He}-horizontal`]:{[`${it}-label`]:{flexGrow:0},[`${it}-control`]:{flex:"1 1 0",minWidth:0},[`${it}-label[class$='-24'], ${it}-label[class*='-24 ']`]:{[`& + ${it}-control`]:{minWidth:"unset"}}}}},re=Se=>{const{componentCls:He,formItemCls:it,inlineItemMarginBottom:Je}=Se;return{[`${He}-inline`]:{display:"flex",flexWrap:"wrap",[it]:{flex:"none",marginInlineEnd:Se.margin,marginBottom:Je,"&-row":{flexWrap:"nowrap"},[`> ${it}-label,
|
|
|
> ${it}-control`]:{display:"inline-block",verticalAlign:"top"},[`> ${it}-label`]:{flex:"none"},[`${He}-text`]:{display:"inline-block"},[`${it}-has-feedback`]:{display:"inline-block"}}}}},oe=Se=>({padding:Se.verticalLabelPadding,margin:Se.verticalLabelMargin,whiteSpace:"initial",textAlign:"start","> label":{margin:0,"&::after":{visibility:"hidden"}}}),ie=Se=>{const{componentCls:He,formItemCls:it,rootPrefixCls:Je}=Se;return{[`${it} ${it}-label`]:oe(Se),[`${He}:not(${He}-inline)`]:{[it]:{flexWrap:"wrap",[`${it}-label, ${it}-control`]:{[`&:not([class*=" ${Je}-col-xs"])`]:{flex:"0 0 100%",maxWidth:"100%"}}}}}},Ee=Se=>{const{componentCls:He,formItemCls:it,antCls:Je}=Se;return{[`${He}-vertical`]:{[`${it}:not(${it}-horizontal)`]:{[`${it}-row`]:{flexDirection:"column"},[`${it}-label > label`]:{height:"auto"},[`${it}-control`]:{width:"100%"},[`${it}-label,
|
|
|
${Je}-col-24${it}-label,
|
|
|
${Je}-col-xl-24${it}-label`]:oe(Se)}},[`@media (max-width: ${(0,C.unit)(Se.screenXSMax)})`]:[ie(Se),{[He]:{[`${it}:not(${it}-horizontal)`]:{[`${Je}-col-xs-24${it}-label`]:oe(Se)}}}],[`@media (max-width: ${(0,C.unit)(Se.screenSMMax)})`]:{[He]:{[`${it}:not(${it}-horizontal)`]:{[`${Je}-col-sm-24${it}-label`]:oe(Se)}}},[`@media (max-width: ${(0,C.unit)(Se.screenMDMax)})`]:{[He]:{[`${it}:not(${it}-horizontal)`]:{[`${Je}-col-md-24${it}-label`]:oe(Se)}}},[`@media (max-width: ${(0,C.unit)(Se.screenLGMax)})`]:{[He]:{[`${it}:not(${it}-horizontal)`]:{[`${Je}-col-lg-24${it}-label`]:oe(Se)}}}}},Me=Se=>{const{formItemCls:He,antCls:it}=Se;return{[`${He}-vertical`]:{[`${He}-row`]:{flexDirection:"column"},[`${He}-label > label`]:{height:"auto"},[`${He}-control`]:{width:"100%"}},[`${He}-vertical ${He}-label,
|
|
|
${it}-col-24${He}-label,
|
|
|
${it}-col-xl-24${He}-label`]:oe(Se),[`@media (max-width: ${(0,C.unit)(Se.screenXSMax)})`]:[ie(Se),{[He]:{[`${it}-col-xs-24${He}-label`]:oe(Se)}}],[`@media (max-width: ${(0,C.unit)(Se.screenSMMax)})`]:{[He]:{[`${it}-col-sm-24${He}-label`]:oe(Se)}},[`@media (max-width: ${(0,C.unit)(Se.screenMDMax)})`]:{[He]:{[`${it}-col-md-24${He}-label`]:oe(Se)}},[`@media (max-width: ${(0,C.unit)(Se.screenLGMax)})`]:{[He]:{[`${it}-col-lg-24${He}-label`]:oe(Se)}}}},ke=Se=>({labelRequiredMarkColor:Se.colorError,labelColor:Se.colorTextHeading,labelFontSize:Se.fontSize,labelHeight:Se.controlHeight,labelColonMarginInlineStart:Se.marginXXS/2,labelColonMarginInlineEnd:Se.marginXS,itemMarginBottom:Se.marginLG,verticalLabelPadding:`0 0 ${Se.paddingXS}px`,verticalLabelMargin:0,inlineItemMarginBottom:0}),tt=(Se,He)=>(0,T.mergeToken)(Se,{formItemCls:`${Se.componentCls}-item`,rootPrefixCls:He});var ue=(0,k.I$)("Form",(Se,He)=>{let{rootPrefixCls:it}=He;const Je=tt(Se,it);return[K(Je),D(Je),Z(Je),O(Je,Je.componentCls),O(Je,Je.formItemCls),re(Je),Ee(Je),Me(Je),(0,E.Z)(Je),y.kr]},ke,{order:-1e3});const X=[];function L(Se,He,it){let Je=arguments.length>3&&arguments[3]!==void 0?arguments[3]:0;return{key:typeof Se=="string"?Se:`${He}-${Je}`,error:Se,errorStatus:it}}var Q=Se=>{let{help:He,helpStatus:it,errors:Je=X,warnings:yt=X,className:$t,fieldId:Jt,onVisibleChanged:nn}=Se;const{prefixCls:Ht}=W.useContext(v.Rk),Qt=`${Ht}-item-explain`,pn=(0,te.Z)(Ht),[qt,Ye,vt]=ue(Ht,pn),Ct=W.useMemo(()=>(0,q.Z)(Ht),[Ht]),_t=o(Je),At=o(yt),kt=W.useMemo(()=>He!=null?[L(He,"help",it)]:[].concat((0,ae.Z)(_t.map((on,cn)=>L(on,"error","error",cn))),(0,ae.Z)(At.map((on,cn)=>L(on,"warning","warning",cn)))),[He,it,_t,At]),Wt=W.useMemo(()=>{const on={};return kt.forEach(cn=>{let{key:Wn}=cn;on[Wn]=(on[Wn]||0)+1}),kt.map((cn,Wn)=>Object.assign(Object.assign({},cn),{key:on[cn.key]>1?`${cn.key}-fallback-${Wn}`:cn.key}))},[kt]),Kt={};return Jt&&(Kt.id=`${Jt}_help`),qt(W.createElement(g.default,{motionDeadline:Ct.motionDeadline,motionName:`${Ht}-show-help`,visible:!!Wt.length,onVisibleChanged:nn},on=>{const{className:cn,style:Wn}=on;return W.createElement("div",Object.assign({},Kt,{className:z()(Qt,cn,vt,pn,$t,Ye),style:Wn}),W.createElement(g.CSSMotionList,Object.assign({keys:Wt},(0,q.Z)(Ht),{motionName:`${Ht}-show-help-item`,component:!1}),bn=>{const{key:fn,error:In,errorStatus:On,className:Zn,style:An}=bn;return W.createElement("div",{key:fn,className:z()(Zn,{[`${Qt}-${On}`]:On}),style:An},In)}))}))},V=m(69180),x=m(48755),w=m(2171),H=m(31756),he=m(23069),Ke=m(76846),ft=m(16722);const Ue=["parentNode"],st="form_item";function pt(Se){return Se===void 0||Se===!1?[]:Array.isArray(Se)?Se:[Se]}function Et(Se,He){if(!Se.length)return;const it=Se.join("_");return He?`${He}_${it}`:Ue.includes(it)?`${st}_${it}`:it}function Ne(Se,He,it,Je,yt,$t){let Jt=Je;return $t!==void 0?Jt=$t:it.validating?Jt="validating":Se.length?Jt="error":He.length?Jt="warning":(it.touched||yt&&it.validated)&&(Jt="success"),Jt}var St=function(Se,He){var it={};for(var Je in Se)Object.prototype.hasOwnProperty.call(Se,Je)&&He.indexOf(Je)<0&&(it[Je]=Se[Je]);if(Se!=null&&typeof Object.getOwnPropertySymbols=="function")for(var yt=0,Je=Object.getOwnPropertySymbols(Se);yt<Je.length;yt++)He.indexOf(Je[yt])<0&&Object.prototype.propertyIsEnumerable.call(Se,Je[yt])&&(it[Je[yt]]=Se[Je[yt]]);return it};function at(Se){return pt(Se).join("_")}function Nt(Se,He){const it=He.getFieldInstance(Se),Je=(0,Ke.bn)(it);if(Je)return Je;const yt=Et(pt(Se),He.__INTERNAL__.name);if(yt)return document.getElementById(yt)}function Ge(Se){const[He]=(0,V.useForm)(),it=W.useRef({}),Je=W.useMemo(()=>Se!=null?Se:Object.assign(Object.assign({},He),{__INTERNAL__:{itemRef:yt=>$t=>{const Jt=at(yt);$t?it.current[Jt]=$t:delete it.current[Jt]}},scrollToField:function(yt){let $t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};const{focus:Jt}=$t,nn=St($t,["focus"]),Ht=Nt(yt,Je);Ht&&((0,ft.Z)(Ht,Object.assign({scrollMode:"if-needed",block:"nearest"},nn)),Jt&&Je.focusField(yt))},focusField:yt=>{var $t,Jt;const nn=Je.getFieldInstance(yt);typeof(nn==null?void 0:nn.focus)=="function"?nn.focus():(Jt=($t=Nt(yt,Je))===null||$t===void 0?void 0:$t.focus)===null||Jt===void 0||Jt.call($t)},getFieldInstance:yt=>{const $t=at(yt);return it.current[$t]}}),[Se,He]);return[Je]}var je=m(98350),Re=function(Se,He){var it={};for(var Je in Se)Object.prototype.hasOwnProperty.call(Se,Je)&&He.indexOf(Je)<0&&(it[Je]=Se[Je]);if(Se!=null&&typeof Object.getOwnPropertySymbols=="function")for(var yt=0,Je=Object.getOwnPropertySymbols(Se);yt<Je.length;yt++)He.indexOf(Je[yt])<0&&Object.prototype.propertyIsEnumerable.call(Se,Je[yt])&&(it[Je[yt]]=Se[Je[yt]]);return it};const _e=(Se,He)=>{const it=W.useContext(w.Z),{getPrefixCls:Je,direction:yt,requiredMark:$t,colon:Jt,scrollToFirstError:nn,className:Ht,style:Qt}=(0,x.dj)("form"),{prefixCls:pn,className:qt,rootClassName:Ye,size:vt,disabled:Ct=it,form:_t,colon:At,labelAlign:kt,labelWrap:Wt,labelCol:Kt,wrapperCol:on,hideRequiredMark:cn,layout:Wn="horizontal",scrollToFirstError:bn,requiredMark:fn,onFinishFailed:In,name:On,style:Zn,feedbackIcons:An,variant:Mn}=Se,Nn=Re(Se,["prefixCls","className","rootClassName","size","disabled","form","colon","labelAlign","labelWrap","labelCol","wrapperCol","hideRequiredMark","layout","scrollToFirstError","requiredMark","onFinishFailed","name","style","feedbackIcons","variant"]),jn=(0,H.Z)(vt),zn=W.useContext(je.Z),Dn=W.useMemo(()=>fn!==void 0?fn:cn?!1:$t!==void 0?$t:!0,[cn,fn,$t]),Bn=At!=null?At:Jt,Sn=Je("form",pn),cr=(0,te.Z)(Sn),[Tt,Fn,Kn]=ue(Sn,cr),Dr=z()(Sn,`${Sn}-${Wn}`,{[`${Sn}-hide-required-mark`]:Dn===!1,[`${Sn}-rtl`]:yt==="rtl",[`${Sn}-${jn}`]:jn},Kn,cr,Fn,Ht,qt,Ye),[gr]=Ge(_t),{__INTERNAL__:Or}=gr;Or.name=On;const Cr=W.useMemo(()=>({name:On,labelAlign:kt,labelCol:Kt,labelWrap:Wt,wrapperCol:on,vertical:Wn==="vertical",colon:Bn,requiredMark:Dn,itemRef:Or.itemRef,form:gr,feedbackIcons:An}),[On,kt,Kt,on,Wn,Bn,Dn,gr,An]),_n=W.useRef(null);W.useImperativeHandle(He,()=>{var Vt;return Object.assign(Object.assign({},gr),{nativeElement:(Vt=_n.current)===null||Vt===void 0?void 0:Vt.nativeElement})});const wn=(Vt,un)=>{if(Vt){let Cn={block:"nearest"};typeof Vt=="object"&&(Cn=Object.assign(Object.assign({},Cn),Vt)),gr.scrollToField(un,Cn)}},jt=Vt=>{if(In==null||In(Vt),Vt.errorFields.length){const un=Vt.errorFields[0].name;if(bn!==void 0){wn(bn,un);return}nn!==void 0&&wn(nn,un)}};return Tt(W.createElement(v.pg.Provider,{value:Mn},W.createElement(w.n,{disabled:Ct},W.createElement(he.Z.Provider,{value:jn},W.createElement(v.RV,{validateMessages:zn},W.createElement(v.q3.Provider,{value:Cr},W.createElement(V.default,Object.assign({id:On},Nn,{name:On,onFinishFailed:jt,form:gr,ref:_n,style:Object.assign(Object.assign({},Qt),Zn),className:Dr}))))))))};var Le=W.forwardRef(_e),Ce=m(41799),B=m(8654),P=m(22703),ce=m(32383),ve=m(11592);function de(Se){if(typeof Se=="function")return Se;const He=(0,ve.Z)(Se);return He.length<=1?He[0]:He}const ye=()=>{const{status:Se,errors:He=[],warnings:it=[]}=W.useContext(v.aM);return{status:Se,errors:He,warnings:it}};ye.Context=v.aM;var Te=ye,we=m(16089);function Ie(Se){const[He,it]=W.useState(Se),Je=W.useRef(null),yt=W.useRef([]),$t=W.useRef(!1);W.useEffect(()=>($t.current=!1,()=>{$t.current=!0,we.Z.cancel(Je.current),Je.current=null}),[]);function Jt(nn){$t.current||(Je.current===null&&(yt.current=[],Je.current=(0,we.Z)(()=>{Je.current=null,it(Ht=>{let Qt=Ht;return yt.current.forEach(pn=>{Qt=pn(Qt)}),Qt})})),yt.current.push(nn))}return[He,Jt]}function Ae(){const{itemRef:Se}=W.useContext(v.q3),He=W.useRef({});function it(Je,yt){const $t=yt&&typeof yt=="object"&&(0,B.C4)(yt),Jt=Je.join("_");return(He.current.name!==Jt||He.current.originRef!==$t)&&(He.current.name=Jt,He.current.originRef=$t,He.current.ref=(0,B.sQ)(Se(Je),$t)),He.current.ref}return it}var Xe=m(29194),gt=m(34280),ht=m(2738),nt=m(65970),Oe=m(70425),qe=m(5472);const rt=Se=>{const{formItemCls:He}=Se;return{"@media screen and (-ms-high-contrast: active), (-ms-high-contrast: none)":{[`${He}-control`]:{display:"flex"}}}};var ot=(0,k.bk)(["Form","item-item"],(Se,He)=>{let{rootPrefixCls:it}=He;const Je=tt(Se,it);return[rt(Je)]}),Rt=function(Se,He){var it={};for(var Je in Se)Object.prototype.hasOwnProperty.call(Se,Je)&&He.indexOf(Je)<0&&(it[Je]=Se[Je]);if(Se!=null&&typeof Object.getOwnPropertySymbols=="function")for(var yt=0,Je=Object.getOwnPropertySymbols(Se);yt<Je.length;yt++)He.indexOf(Je[yt])<0&&Object.prototype.propertyIsEnumerable.call(Se,Je[yt])&&(it[Je[yt]]=Se[Je[yt]]);return it};const S=24;var Ze=Se=>{const{prefixCls:He,status:it,labelCol:Je,wrapperCol:yt,children:$t,errors:Jt,warnings:nn,_internalItemRender:Ht,extra:Qt,help:pn,fieldId:qt,marginBottom:Ye,onErrorVisibleChanged:vt,label:Ct}=Se,_t=`${He}-item`,At=W.useContext(v.q3),kt=W.useMemo(()=>{let Nn=Object.assign({},yt||At.wrapperCol||{});return Ct===null&&!Je&&!yt&&At.labelCol&&[void 0,"xs","sm","md","lg","xl","xxl"].forEach(zn=>{const Dn=zn?[zn]:[],Bn=(0,Oe.U2)(At.labelCol,Dn),Sn=typeof Bn=="object"?Bn:{},cr=(0,Oe.U2)(Nn,Dn),Tt=typeof cr=="object"?cr:{};"span"in Sn&&!("offset"in Tt)&&Sn.span<S&&(Nn=(0,Oe.t8)(Nn,[].concat(Dn,["offset"]),Sn.span))}),Nn},[yt,At]),Wt=z()(`${_t}-control`,kt.className),Kt=W.useMemo(()=>{const{labelCol:Nn,wrapperCol:jn}=At;return Rt(At,["labelCol","wrapperCol"])},[At]),on=W.useRef(null),[cn,Wn]=W.useState(0);(0,gt.Z)(()=>{Qt&&on.current?Wn(on.current.clientHeight):Wn(0)},[Qt]);const bn=W.createElement("div",{className:`${_t}-control-input`},W.createElement("div",{className:`${_t}-control-input-content`},$t)),fn=W.useMemo(()=>({prefixCls:He,status:it}),[He,it]),In=Ye!==null||Jt.length||nn.length?W.createElement(v.Rk.Provider,{value:fn},W.createElement(Q,{fieldId:qt,errors:Jt,warnings:nn,help:pn,helpStatus:it,className:`${_t}-explain-connected`,onVisibleChanged:vt})):null,On={};qt&&(On.id=`${qt}_extra`);const Zn=Qt?W.createElement("div",Object.assign({},On,{className:`${_t}-extra`,ref:on}),Qt):null,An=In||Zn?W.createElement("div",{className:`${_t}-additional`,style:Ye?{minHeight:Ye+cn}:{}},In,Zn):null,Mn=Ht&&Ht.mark==="pro_table_render"&&Ht.render?Ht.render(Se,{input:bn,errorList:In,extra:Zn}):W.createElement(W.Fragment,null,bn,An);return W.createElement(v.q3.Provider,{value:Kt},W.createElement(qe.Z,Object.assign({},kt,{className:Wt}),Mn),W.createElement(ot,{prefixCls:He}))},J=m(61485),be=m(9017),zt=m(85981),ze=m(25399),Qe=function(Se,He){var it={};for(var Je in Se)Object.prototype.hasOwnProperty.call(Se,Je)&&He.indexOf(Je)<0&&(it[Je]=Se[Je]);if(Se!=null&&typeof Object.getOwnPropertySymbols=="function")for(var yt=0,Je=Object.getOwnPropertySymbols(Se);yt<Je.length;yt++)He.indexOf(Je[yt])<0&&Object.prototype.propertyIsEnumerable.call(Se,Je[yt])&&(it[Je[yt]]=Se[Je[yt]]);return it};function lt(Se){return Se?typeof Se=="object"&&!W.isValidElement(Se)?Se:{title:Se}:null}var pe=Se=>{let{prefixCls:He,label:it,htmlFor:Je,labelCol:yt,labelAlign:$t,colon:Jt,required:nn,requiredMark:Ht,tooltip:Qt,vertical:pn}=Se;var qt;const[Ye]=(0,be.Z)("Form"),{labelAlign:vt,labelCol:Ct,labelWrap:_t,colon:At}=W.useContext(v.q3);if(!it)return null;const kt=yt||Ct||{},Wt=$t||vt,Kt=`${He}-item-label`,on=z()(Kt,Wt==="left"&&`${Kt}-left`,kt.className,{[`${Kt}-wrap`]:!!_t});let cn=it;const Wn=Jt===!0||At!==!1&&Jt!==!1;Wn&&!pn&&typeof it=="string"&&it.trim()&&(cn=it.replace(/[:|:]\s*$/,""));const fn=lt(Qt);if(fn){const{icon:Nn=W.createElement(J.Z,null)}=fn,jn=Qe(fn,["icon"]),zn=W.createElement(ze.Z,Object.assign({},jn),W.cloneElement(Nn,{className:`${He}-item-tooltip`,title:"",onClick:Dn=>{Dn.preventDefault()},tabIndex:null}));cn=W.createElement(W.Fragment,null,cn,zn)}const In=Ht==="optional",On=typeof Ht=="function",Zn=Ht===!1;On?cn=Ht(cn,{required:!!nn}):In&&!nn&&(cn=W.createElement(W.Fragment,null,cn,W.createElement("span",{className:`${He}-item-optional`,title:""},(Ye==null?void 0:Ye.optional)||((qt=zt.Z.Form)===null||qt===void 0?void 0:qt.optional))));let An;Zn?An="hidden":(In||On)&&(An="optional");const Mn=z()({[`${He}-item-required`]:nn,[`${He}-item-required-mark-${An}`]:An,[`${He}-item-no-colon`]:!Wn});return W.createElement(qe.Z,Object.assign({},kt,{className:on}),W.createElement("label",{htmlFor:Je,className:Mn,title:typeof it=="string"?it:""},cn))},Pe=m(29679),$e=m(19248),G=m(96512),bt=m(58617);const xe={success:Pe.Z,warning:G.Z,error:$e.Z,validating:bt.Z};function Bt(Se){let{children:He,errors:it,warnings:Je,hasFeedback:yt,validateStatus:$t,prefixCls:Jt,meta:nn,noStyle:Ht}=Se;const Qt=`${Jt}-item`,{feedbackIcons:pn}=W.useContext(v.q3),qt=Ne(it,Je,nn,null,!!yt,$t),{isFormItemInput:Ye,status:vt,hasFeedback:Ct,feedbackIcon:_t}=W.useContext(v.aM),At=W.useMemo(()=>{var kt;let Wt;if(yt){const on=yt!==!0&&yt.icons||pn,cn=qt&&((kt=on==null?void 0:on({status:qt,errors:it,warnings:Je}))===null||kt===void 0?void 0:kt[qt]),Wn=qt&&xe[qt];Wt=cn!==!1&&Wn?W.createElement("span",{className:z()(`${Qt}-feedback-icon`,`${Qt}-feedback-icon-${qt}`)},cn||W.createElement(Wn,null)):null}const Kt={status:qt||"",errors:it,warnings:Je,hasFeedback:!!yt,feedbackIcon:Wt,isFormItemInput:!0};return Ht&&(Kt.status=(qt!=null?qt:vt)||"",Kt.isFormItemInput=Ye,Kt.hasFeedback=!!(yt!=null?yt:Ct),Kt.feedbackIcon=yt!==void 0?Kt.feedbackIcon:_t),Kt},[qt,yt,Ht,Ye,vt]);return W.createElement(v.aM.Provider,{value:At},He)}var en=function(Se,He){var it={};for(var Je in Se)Object.prototype.hasOwnProperty.call(Se,Je)&&He.indexOf(Je)<0&&(it[Je]=Se[Je]);if(Se!=null&&typeof Object.getOwnPropertySymbols=="function")for(var yt=0,Je=Object.getOwnPropertySymbols(Se);yt<Je.length;yt++)He.indexOf(Je[yt])<0&&Object.prototype.propertyIsEnumerable.call(Se,Je[yt])&&(it[Je[yt]]=Se[Je[yt]]);return it};function dn(Se){const{prefixCls:He,className:it,rootClassName:Je,style:yt,help:$t,errors:Jt,warnings:nn,validateStatus:Ht,meta:Qt,hasFeedback:pn,hidden:qt,children:Ye,fieldId:vt,required:Ct,isRequired:_t,onSubItemMetaChange:At,layout:kt}=Se,Wt=en(Se,["prefixCls","className","rootClassName","style","help","errors","warnings","validateStatus","meta","hasFeedback","hidden","children","fieldId","required","isRequired","onSubItemMetaChange","layout"]),Kt=`${He}-item`,{requiredMark:on,vertical:cn}=W.useContext(v.q3),Wn=cn||kt==="vertical",bn=W.useRef(null),fn=o(Jt),In=o(nn),On=$t!=null,Zn=!!(On||Jt.length||nn.length),An=!!bn.current&&(0,Xe.Z)(bn.current),[Mn,Nn]=W.useState(null);(0,gt.Z)(()=>{if(Zn&&bn.current){const Sn=getComputedStyle(bn.current);Nn(parseInt(Sn.marginBottom,10))}},[Zn,An]);const jn=Sn=>{Sn||Nn(null)},Dn=function(){let Sn=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!1;const cr=Sn?fn:Qt.errors,Tt=Sn?In:Qt.warnings;return Ne(cr,Tt,Qt,"",!!pn,Ht)}(),Bn=z()(Kt,it,Je,{[`${Kt}-with-help`]:On||fn.length||In.length,[`${Kt}-has-feedback`]:Dn&&pn,[`${Kt}-has-success`]:Dn==="success",[`${Kt}-has-warning`]:Dn==="warning",[`${Kt}-has-error`]:Dn==="error",[`${Kt}-is-validating`]:Dn==="validating",[`${Kt}-hidden`]:qt,[`${Kt}-${kt}`]:kt});return W.createElement("div",{className:Bn,style:yt,ref:bn},W.createElement(nt.Z,Object.assign({className:`${Kt}-row`},(0,ht.Z)(Wt,["_internalItemRender","colon","dependencies","extra","fieldKey","getValueFromEvent","getValueProps","htmlFor","id","initialValue","isListField","label","labelAlign","labelCol","labelWrap","messageVariables","name","normalize","noStyle","preserve","requiredMark","rules","shouldUpdate","trigger","tooltip","validateFirst","validateTrigger","valuePropName","wrapperCol","validateDebounce"])),W.createElement(pe,Object.assign({htmlFor:vt},Se,{requiredMark:on,required:Ct!=null?Ct:_t,prefixCls:He,vertical:Wn})),W.createElement(Ze,Object.assign({},Se,Qt,{errors:fn,warnings:In,prefixCls:He,status:Dn,help:$t,marginBottom:Mn,onErrorVisibleChanged:jn}),W.createElement(v.qI.Provider,{value:At},W.createElement(Bt,{prefixCls:He,meta:Qt,errors:Qt.errors,warnings:Qt.warnings,hasFeedback:pn,validateStatus:Dn},Ye)))),!!Mn&&W.createElement("div",{className:`${Kt}-margin-offset`,style:{marginBottom:-Mn}}))}const Hn="__SPLIT__",wt=null;function Gt(Se,He){const it=Object.keys(Se),Je=Object.keys(He);return it.length===Je.length&&it.every(yt=>{const $t=Se[yt],Jt=He[yt];return $t===Jt||typeof $t=="function"||typeof Jt=="function"})}const mn=W.memo(Se=>{let{children:He}=Se;return He},(Se,He)=>Gt(Se.control,He.control)&&Se.update===He.update&&Se.childProps.length===He.childProps.length&&Se.childProps.every((it,Je)=>it===He.childProps[Je]));function yn(){return{errors:[],warnings:[],touched:!1,validating:!1,name:[],validated:!1}}function rn(Se){const{name:He,noStyle:it,className:Je,dependencies:yt,prefixCls:$t,shouldUpdate:Jt,rules:nn,children:Ht,required:Qt,label:pn,messageVariables:qt,trigger:Ye="onChange",validateTrigger:vt,hidden:Ct,help:_t,layout:At}=Se,{getPrefixCls:kt}=W.useContext(x.E_),{name:Wt}=W.useContext(v.q3),Kt=de(Ht),on=typeof Kt=="function",cn=W.useContext(v.qI),{validateTrigger:Wn}=W.useContext(V.FieldContext),bn=vt!==void 0?vt:Wn,fn=He!=null,In=kt("form",$t),On=(0,te.Z)(In),[Zn,An,Mn]=ue(In,On),Nn=(0,ce.ln)("Form.Item"),jn=W.useContext(V.ListContext),zn=W.useRef(null),[Dn,Bn]=Ie({}),[Sn,cr]=(0,Ce.Z)(()=>yn()),Tt=_n=>{const wn=jn==null?void 0:jn.getKey(_n.name);if(cr(_n.destroy?yn():_n,!0),it&&_t!==!1&&cn){let jt=_n.name;if(_n.destroy)jt=zn.current||jt;else if(wn!==void 0){const[Vt,un]=wn;jt=[Vt].concat((0,ae.Z)(un)),zn.current=jt}cn(_n,jt)}},Fn=(_n,wn)=>{Bn(jt=>{const Vt=Object.assign({},jt),Cn=[].concat((0,ae.Z)(_n.name.slice(0,-1)),(0,ae.Z)(wn)).join(Hn);return _n.destroy?delete Vt[Cn]:Vt[Cn]=_n,Vt})},[Kn,Dr]=W.useMemo(()=>{const _n=(0,ae.Z)(Sn.errors),wn=(0,ae.Z)(Sn.warnings);return Object.values(Dn).forEach(jt=>{_n.push.apply(_n,(0,ae.Z)(jt.errors||[])),wn.push.apply(wn,(0,ae.Z)(jt.warnings||[]))}),[_n,wn]},[Dn,Sn.errors,Sn.warnings]),gr=Ae();function Or(_n,wn,jt){return it&&!Ct?W.createElement(Bt,{prefixCls:In,hasFeedback:Se.hasFeedback,validateStatus:Se.validateStatus,meta:Sn,errors:Kn,warnings:Dr,noStyle:!0},_n):W.createElement(dn,Object.assign({key:"row"},Se,{className:z()(Je,Mn,On,An),prefixCls:In,fieldId:wn,isRequired:jt,errors:Kn,warnings:Dr,meta:Sn,onSubItemMetaChange:Fn,layout:At}),_n)}if(!fn&&!on&&!yt)return Zn(Or(Kt));let Cr={};return typeof pn=="string"?Cr.label=pn:He&&(Cr.label=String(He)),qt&&(Cr=Object.assign(Object.assign({},Cr),qt)),Zn(W.createElement(V.Field,Object.assign({},Se,{messageVariables:Cr,trigger:Ye,validateTrigger:bn,onMetaChange:Tt}),(_n,wn,jt)=>{const Vt=pt(He).length&&wn?wn.name:[],un=Et(Vt,Wt),Cn=Qt!==void 0?Qt:!!(nn!=null&&nn.some(tn=>{if(tn&&typeof tn=="object"&&tn.required&&!tn.warningOnly)return!0;if(typeof tn=="function"){const Yn=tn(jt);return(Yn==null?void 0:Yn.required)&&!(Yn!=null&&Yn.warningOnly)}return!1})),Vn=Object.assign({},_n);let tr=null;if(Array.isArray(Kt)&&fn)tr=Kt;else if(!(on&&(!(Jt||yt)||fn))){if(!(yt&&!on&&!fn))if(W.isValidElement(Kt)){const tn=Object.assign(Object.assign({},Kt.props),Vn);if(tn.id||(tn.id=un),_t||Kn.length>0||Dr.length>0||Se.extra){const Lr=[];(_t||Kn.length>0)&&Lr.push(`${un}_help`),Se.extra&&Lr.push(`${un}_extra`),tn["aria-describedby"]=Lr.join(" ")}Kn.length>0&&(tn["aria-invalid"]="true"),Cn&&(tn["aria-required"]="true"),(0,B.Yr)(Kt)&&(tn.ref=gr(Vt,Kt)),new Set([].concat((0,ae.Z)(pt(Ye)),(0,ae.Z)(pt(bn)))).forEach(Lr=>{tn[Lr]=function(){for(var Br,jr,dr,Zr,fr,Nr=arguments.length,sr=new Array(Nr),ar=0;ar<Nr;ar++)sr[ar]=arguments[ar];(dr=Vn[Lr])===null||dr===void 0||(Br=dr).call.apply(Br,[Vn].concat(sr)),(fr=(Zr=Kt.props)[Lr])===null||fr===void 0||(jr=fr).call.apply(jr,[Zr].concat(sr))}});const vr=[tn["aria-required"],tn["aria-invalid"],tn["aria-describedby"]];tr=W.createElement(mn,{control:Vn,update:Kt,childProps:vr},(0,P.Tm)(Kt,tn))}else on&&(Jt||yt)&&!fn?tr=Kt(jt):tr=Kt}return Or(tr,un,Cn)}))}const En=rn;En.useStatus=Te;var Zt=En,Dt=function(Se,He){var it={};for(var Je in Se)Object.prototype.hasOwnProperty.call(Se,Je)&&He.indexOf(Je)<0&&(it[Je]=Se[Je]);if(Se!=null&&typeof Object.getOwnPropertySymbols=="function")for(var yt=0,Je=Object.getOwnPropertySymbols(Se);yt<Je.length;yt++)He.indexOf(Je[yt])<0&&Object.prototype.propertyIsEnumerable.call(Se,Je[yt])&&(it[Je[yt]]=Se[Je[yt]]);return it},gn=Se=>{var{prefixCls:He,children:it}=Se,Je=Dt(Se,["prefixCls","children"]);const{getPrefixCls:yt}=W.useContext(x.E_),$t=yt("form",He),Jt=W.useMemo(()=>({prefixCls:$t,status:"error"}),[$t]);return W.createElement(V.List,Object.assign({},Je),(nn,Ht,Qt)=>W.createElement(v.Rk.Provider,{value:Jt},it(nn.map(pn=>Object.assign(Object.assign({},pn),{fieldKey:pn.key})),Ht,{errors:Qt.errors,warnings:Qt.warnings})))};function Ln(){const{form:Se}=W.useContext(v.q3);return Se}const ut=Le;ut.Item=Zt,ut.List=gn,ut.ErrorList=Q,ut.useForm=Ge,ut.useFormInstance=Ln,ut.useWatch=V.useWatch,ut.Provider=v.RV,ut.create=()=>{};var ct=ut},49397:function(ln,mt,m){"use strict";m.d(mt,{Z:function(){return D}});var v=m(59301),ae=m(92310),W=m.n(ae),fe=m(36901),z=m(8654),g=m(62487),q=m(86013),te=m(82855),o=m(48755),C=m(2171),M=m(83397),y=m(31756),E=m(56553),T=m(24971),k=m(70045),j=m(23826),Z=m(53075);function U(O){return!!(O.prefix||O.suffix||O.allowClear||O.showCount)}var A=function(O,re){var oe={};for(var ie in O)Object.prototype.hasOwnProperty.call(O,ie)&&re.indexOf(ie)<0&&(oe[ie]=O[ie]);if(O!=null&&typeof Object.getOwnPropertySymbols=="function")for(var Ee=0,ie=Object.getOwnPropertySymbols(O);Ee<ie.length;Ee++)re.indexOf(ie[Ee])<0&&Object.prototype.propertyIsEnumerable.call(O,ie[Ee])&&(oe[ie[Ee]]=O[ie[Ee]]);return oe},D=(0,v.forwardRef)((O,re)=>{const{prefixCls:oe,bordered:ie=!0,status:Ee,size:Me,disabled:ke,onBlur:tt,onFocus:ue,suffix:X,allowClear:L,addonAfter:se,addonBefore:Q,className:V,style:x,styles:w,rootClassName:H,onChange:he,classNames:Ke,variant:ft}=O,Ue=A(O,["prefixCls","bordered","status","size","disabled","onBlur","onFocus","suffix","allowClear","addonAfter","addonBefore","className","style","styles","rootClassName","onChange","classNames","variant"]),{getPrefixCls:st,direction:pt,allowClear:Et,autoComplete:Ne,className:St,style:at,classNames:Nt,styles:Ge}=(0,o.dj)("input"),je=st("input",oe),Re=(0,v.useRef)(null),_e=(0,M.Z)(je),[Y,Le,Ce]=(0,Z.TI)(je,H),[B]=(0,Z.ZP)(je,_e),{compactSize:P,compactItemClassnames:ce}=(0,k.ri)(je,pt),ve=(0,y.Z)(R=>{var Ze;return(Ze=Me!=null?Me:P)!==null&&Ze!==void 0?Ze:R}),de=v.useContext(C.Z),ye=ke!=null?ke:de,{status:Te,hasFeedback:we,feedbackIcon:Ie}=(0,v.useContext)(E.aM),Ae=(0,te.F)(Te,Ee),Xe=U(O)||!!we,gt=(0,v.useRef)(Xe),ht=(0,j.Z)(Re,!0),nt=R=>{ht(),tt==null||tt(R)},Oe=R=>{ht(),ue==null||ue(R)},qe=R=>{ht(),he==null||he(R)},rt=(we||X)&&v.createElement(v.Fragment,null,X,we&&Ie),ot=(0,q.Z)(L!=null?L:Et),[Rt,S]=(0,T.Z)("input",ft,ie);return Y(B(v.createElement(fe.default,Object.assign({ref:(0,z.sQ)(re,Re),prefixCls:je,autoComplete:Ne},Ue,{disabled:ye,onBlur:nt,onFocus:Oe,style:Object.assign(Object.assign({},at),x),styles:Object.assign(Object.assign({},Ge),w),suffix:rt,allowClear:ot,className:W()(V,H,Ce,_e,ce,St),onChange:qe,addonBefore:Q&&v.createElement(g.Z,{form:!0,space:!0},Q),addonAfter:se&&v.createElement(g.Z,{form:!0,space:!0},se),classNames:Object.assign(Object.assign(Object.assign({},Ke),Nt),{input:W()({[`${je}-sm`]:ve==="small",[`${je}-lg`]:ve==="large",[`${je}-rtl`]:pt==="rtl"},Ke==null?void 0:Ke.input,Nt.input,Le),variant:W()({[`${je}-${Rt}`]:S},(0,te.Z)(je,Ae)),affixWrapper:W()({[`${je}-affix-wrapper-sm`]:ve==="small",[`${je}-affix-wrapper-lg`]:ve==="large",[`${je}-affix-wrapper-rtl`]:pt==="rtl"},Le),wrapper:W()({[`${je}-group-rtl`]:pt==="rtl"},Le),groupWrapper:W()({[`${je}-group-wrapper-sm`]:ve==="small",[`${je}-group-wrapper-lg`]:ve==="large",[`${je}-group-wrapper-rtl`]:pt==="rtl",[`${je}-group-wrapper-${Rt}`]:S},(0,te.Z)(`${je}-group-wrapper`,Ae,we),Le)})}))))})},79809:function(ln,mt,m){"use strict";m.d(mt,{Z:function(){return re}});var v=m(59301),ae=m(92310),W=m.n(ae),fe=m(22711),z=m(86013),g=m(82855),q=m(48755),te=m(2171),o=m(83397),C=m(31756),M=m(56553),y=m(24971),E=m(70045),T=m(30292),k=m(53075),j=m(16931),Z=m(51636),U=m(64910);const A=oe=>{const{componentCls:ie,paddingLG:Ee}=oe,Me=`${ie}-textarea`;return{[`textarea${ie}`]:{maxWidth:"100%",height:"auto",minHeight:oe.controlHeight,lineHeight:oe.lineHeight,verticalAlign:"bottom",transition:`all ${oe.motionDurationSlow}`,resize:"vertical",[`&${ie}-mouse-active`]:{transition:`all ${oe.motionDurationSlow}, height 0s, width 0s`}},[`${ie}-textarea-affix-wrapper-resize-dirty`]:{width:"auto"},[Me]:{position:"relative","&-show-count":{[`> ${ie}`]:{height:"100%"},[`${ie}-data-count`]:{position:"absolute",bottom:oe.calc(oe.fontSize).mul(oe.lineHeight).mul(-1).equal(),insetInlineEnd:0,color:oe.colorTextDescription,whiteSpace:"nowrap",pointerEvents:"none"}},[`
|
|
|
&-allow-clear > ${ie},
|
|
|
&-affix-wrapper${Me}-has-feedback ${ie}
|
|
|
`]:{paddingInlineEnd:Ee},[`&-affix-wrapper${ie}-affix-wrapper`]:{padding:0,[`> textarea${ie}`]:{fontSize:"inherit",border:"none",outline:"none",background:"transparent",minHeight:oe.calc(oe.controlHeight).sub(oe.calc(oe.lineWidth).mul(2)).equal(),"&:focus":{boxShadow:"none !important"}},[`${ie}-suffix`]:{margin:0,"> *:not(:last-child)":{marginInline:0},[`${ie}-clear-icon`]:{position:"absolute",insetInlineEnd:oe.paddingInline,insetBlockStart:oe.paddingXS},[`${Me}-suffix`]:{position:"absolute",top:0,insetInlineEnd:oe.paddingInline,bottom:0,zIndex:1,display:"inline-flex",alignItems:"center",margin:"auto",pointerEvents:"none"}}},[`&-affix-wrapper${ie}-affix-wrapper-sm`]:{[`${ie}-suffix`]:{[`${ie}-clear-icon`]:{insetInlineEnd:oe.paddingInlineSM}}}}}};var K=(0,j.I$)(["Input","TextArea"],oe=>{const ie=(0,Z.mergeToken)(oe,(0,U.e)(oe));return[A(ie)]},U.T,{resetFont:!1}),D=function(oe,ie){var Ee={};for(var Me in oe)Object.prototype.hasOwnProperty.call(oe,Me)&&ie.indexOf(Me)<0&&(Ee[Me]=oe[Me]);if(oe!=null&&typeof Object.getOwnPropertySymbols=="function")for(var ke=0,Me=Object.getOwnPropertySymbols(oe);ke<Me.length;ke++)ie.indexOf(Me[ke])<0&&Object.prototype.propertyIsEnumerable.call(oe,Me[ke])&&(Ee[Me[ke]]=oe[Me[ke]]);return Ee},re=(0,v.forwardRef)((oe,ie)=>{var Ee;const{prefixCls:Me,bordered:ke=!0,size:tt,disabled:ue,status:X,allowClear:L,classNames:se,rootClassName:Q,className:V,style:x,styles:w,variant:H,showCount:he,onMouseDown:Ke,onResize:ft}=oe,Ue=D(oe,["prefixCls","bordered","size","disabled","status","allowClear","classNames","rootClassName","className","style","styles","variant","showCount","onMouseDown","onResize"]),{getPrefixCls:st,direction:pt,allowClear:Et,autoComplete:Ne,className:St,style:at,classNames:Nt,styles:Ge}=(0,q.dj)("textArea"),je=v.useContext(te.Z),Re=ue!=null?ue:je,{status:_e,hasFeedback:Y,feedbackIcon:Le}=v.useContext(M.aM),Ce=(0,g.F)(_e,X),B=v.useRef(null);v.useImperativeHandle(ie,()=>{var S;return{resizableTextArea:(S=B.current)===null||S===void 0?void 0:S.resizableTextArea,focus:R=>{var Ze,J;(0,T.nH)((J=(Ze=B.current)===null||Ze===void 0?void 0:Ze.resizableTextArea)===null||J===void 0?void 0:J.textArea,R)},blur:()=>{var R;return(R=B.current)===null||R===void 0?void 0:R.blur()}}});const P=st("input",Me),ce=(0,o.Z)(P),[ve,de,ye]=(0,k.TI)(P,Q),[Te]=K(P,ce),{compactSize:we,compactItemClassnames:Ie}=(0,E.ri)(P,pt),Ae=(0,C.Z)(S=>{var R;return(R=tt!=null?tt:we)!==null&&R!==void 0?R:S}),[Xe,gt]=(0,y.Z)("textArea",H,ke),ht=(0,z.Z)(L!=null?L:Et),[nt,Oe]=v.useState(!1),[qe,rt]=v.useState(!1),ot=S=>{Oe(!0),Ke==null||Ke(S);const R=()=>{Oe(!1),document.removeEventListener("mouseup",R)};document.addEventListener("mouseup",R)},Rt=S=>{var R,Ze;if(ft==null||ft(S),nt&&typeof getComputedStyle=="function"){const J=(Ze=(R=B.current)===null||R===void 0?void 0:R.nativeElement)===null||Ze===void 0?void 0:Ze.querySelector("textarea");J&&getComputedStyle(J).resize==="both"&&rt(!0)}};return ve(Te(v.createElement(fe.default,Object.assign({autoComplete:Ne},Ue,{style:Object.assign(Object.assign({},at),x),styles:Object.assign(Object.assign({},Ge),w),disabled:Re,allowClear:ht,className:W()(ye,ce,V,Q,Ie,St,qe&&`${P}-textarea-affix-wrapper-resize-dirty`),classNames:Object.assign(Object.assign(Object.assign({},se),Nt),{textarea:W()({[`${P}-sm`]:Ae==="small",[`${P}-lg`]:Ae==="large"},de,se==null?void 0:se.textarea,Nt.textarea,nt&&`${P}-mouse-active`),variant:W()({[`${P}-${Xe}`]:gt},(0,g.Z)(P,Ce)),affixWrapper:W()(`${P}-textarea-affix-wrapper`,{[`${P}-affix-wrapper-rtl`]:pt==="rtl",[`${P}-affix-wrapper-sm`]:Ae==="small",[`${P}-affix-wrapper-lg`]:Ae==="large",[`${P}-textarea-show-count`]:he||((Ee=oe.count)===null||Ee===void 0?void 0:Ee.show)},de)}),prefixCls:P,suffix:Y&&v.createElement("span",{className:`${P}-textarea-suffix`},Le),showCount:he,ref:B,onResize:Rt,onMouseDown:ot}))))})},23826:function(ln,mt,m){"use strict";m.d(mt,{Z:function(){return ae}});var v=m(59301);function ae(W,fe){const z=(0,v.useRef)([]),g=()=>{z.current.push(setTimeout(()=>{var q,te,o,C;!((q=W.current)===null||q===void 0)&&q.input&&((te=W.current)===null||te===void 0?void 0:te.input.getAttribute("type"))==="password"&&(!((o=W.current)===null||o===void 0)&&o.input.hasAttribute("value"))&&((C=W.current)===null||C===void 0||C.input.removeAttribute("value"))}))};return(0,v.useEffect)(()=>(fe&&g(),()=>z.current.forEach(q=>{q&&clearTimeout(q)})),[]),g}},37568:function(ln,mt,m){"use strict";m.d(mt,{default:function(){return Nt}});var v=m(59301),ae=m(92310),W=m.n(ae),fe=m(48755),z=m(56553),g=m(53075),te=Ge=>{const{getPrefixCls:je,direction:Re}=(0,v.useContext)(fe.E_),{prefixCls:_e,className:Y}=Ge,Le=je("input-group",_e),Ce=je("input"),[B,P,ce]=(0,g.ZP)(Ce),ve=W()(Le,ce,{[`${Le}-lg`]:Ge.size==="large",[`${Le}-sm`]:Ge.size==="small",[`${Le}-compact`]:Ge.compact,[`${Le}-rtl`]:Re==="rtl"},P,Y),de=(0,v.useContext)(z.aM),ye=(0,v.useMemo)(()=>Object.assign(Object.assign({},de),{isFormItemInput:!1}),[de]);return B(v.createElement("span",{className:ve,style:Ge.style,onMouseEnter:Ge.onMouseEnter,onMouseLeave:Ge.onMouseLeave,onFocus:Ge.onFocus,onBlur:Ge.onBlur},v.createElement(z.aM.Provider,{value:ye},Ge.children)))},o=m(49397),C=m(77654),M=m(6089),y=m(26112),E=m(82855),T=m(31756),k=m(16931),j=m(51636),Z=m(64910);const U=Ge=>{const{componentCls:je,paddingXS:Re}=Ge;return{[je]:{display:"inline-flex",alignItems:"center",flexWrap:"nowrap",columnGap:Re,"&-rtl":{direction:"rtl"},[`${je}-input`]:{textAlign:"center",paddingInline:Ge.paddingXXS},[`&${je}-sm ${je}-input`]:{paddingInline:Ge.calc(Ge.paddingXXS).div(2).equal()},[`&${je}-lg ${je}-input`]:{paddingInline:Ge.paddingXS}}}};var A=(0,k.I$)(["Input","OTP"],Ge=>{const je=(0,j.mergeToken)(Ge,(0,Z.e)(Ge));return[U(je)]},Z.T),K=m(16089),D=function(Ge,je){var Re={};for(var _e in Ge)Object.prototype.hasOwnProperty.call(Ge,_e)&&je.indexOf(_e)<0&&(Re[_e]=Ge[_e]);if(Ge!=null&&typeof Object.getOwnPropertySymbols=="function")for(var Y=0,_e=Object.getOwnPropertySymbols(Ge);Y<_e.length;Y++)je.indexOf(_e[Y])<0&&Object.prototype.propertyIsEnumerable.call(Ge,_e[Y])&&(Re[_e[Y]]=Ge[_e[Y]]);return Re},re=v.forwardRef((Ge,je)=>{const{value:Re,onChange:_e,onActiveChange:Y,index:Le,mask:Ce}=Ge,B=D(Ge,["value","onChange","onActiveChange","index","mask"]),P=Re&&typeof Ce=="string"?Ce:Re,ce=we=>{_e(Le,we.target.value)},ve=v.useRef(null);v.useImperativeHandle(je,()=>ve.current);const de=()=>{(0,K.Z)(()=>{var we;const Ie=(we=ve.current)===null||we===void 0?void 0:we.input;document.activeElement===Ie&&Ie&&Ie.select()})},ye=we=>{const{key:Ie,ctrlKey:Ae,metaKey:Xe}=we;Ie==="ArrowLeft"?Y(Le-1):Ie==="ArrowRight"?Y(Le+1):Ie==="z"&&(Ae||Xe)&&we.preventDefault(),de()},Te=we=>{we.key==="Backspace"&&!Re&&Y(Le-1),de()};return v.createElement(o.Z,Object.assign({type:Ce===!0?"password":"text"},B,{ref:ve,value:P,onInput:ce,onFocus:de,onKeyDown:ye,onKeyUp:Te,onMouseDown:de,onMouseUp:de}))}),oe=function(Ge,je){var Re={};for(var _e in Ge)Object.prototype.hasOwnProperty.call(Ge,_e)&&je.indexOf(_e)<0&&(Re[_e]=Ge[_e]);if(Ge!=null&&typeof Object.getOwnPropertySymbols=="function")for(var Y=0,_e=Object.getOwnPropertySymbols(Ge);Y<_e.length;Y++)je.indexOf(_e[Y])<0&&Object.prototype.propertyIsEnumerable.call(Ge,_e[Y])&&(Re[_e[Y]]=Ge[_e[Y]]);return Re};function ie(Ge){return(Ge||"").split("")}const Ee=Ge=>{const{index:je,prefixCls:Re,separator:_e}=Ge,Y=typeof _e=="function"?_e(je):_e;return Y?v.createElement("span",{className:`${Re}-separator`},Y):null};var ke=v.forwardRef((Ge,je)=>{const{prefixCls:Re,length:_e=6,size:Y,defaultValue:Le,value:Ce,onChange:B,formatter:P,separator:ce,variant:ve,disabled:de,status:ye,autoFocus:Te,mask:we,type:Ie,onInput:Ae,inputMode:Xe}=Ge,gt=oe(Ge,["prefixCls","length","size","defaultValue","value","onChange","formatter","separator","variant","disabled","status","autoFocus","mask","type","onInput","inputMode"]),{getPrefixCls:ht,direction:nt}=v.useContext(fe.E_),Oe=ht("otp",Re),qe=(0,y.Z)(gt,{aria:!0,data:!0,attr:!0}),[rt,ot,Rt]=A(Oe),S=(0,T.Z)(bt=>Y!=null?Y:bt),R=v.useContext(z.aM),Ze=(0,E.F)(R.status,ye),J=v.useMemo(()=>Object.assign(Object.assign({},R),{status:Ze,hasFeedback:!1,feedbackIcon:null}),[R,Ze]),be=v.useRef(null),zt=v.useRef({});v.useImperativeHandle(je,()=>({focus:()=>{var bt;(bt=zt.current[0])===null||bt===void 0||bt.focus()},blur:()=>{var bt;for(let xe=0;xe<_e;xe+=1)(bt=zt.current[xe])===null||bt===void 0||bt.blur()},nativeElement:be.current}));const ze=bt=>P?P(bt):bt,[Qe,lt]=v.useState(()=>ie(ze(Le||"")));v.useEffect(()=>{Ce!==void 0&<(ie(Ce))},[Ce]);const le=(0,M.Z)(bt=>{lt(bt),Ae&&Ae(bt),B&&bt.length===_e&&bt.every(xe=>xe)&&bt.some((xe,Bt)=>Qe[Bt]!==xe)&&B(bt.join(""))}),pe=(0,M.Z)((bt,xe)=>{let Bt=(0,C.Z)(Qe);for(let dn=0;dn<bt;dn+=1)Bt[dn]||(Bt[dn]="");xe.length<=1?Bt[bt]=xe:Bt=Bt.slice(0,bt).concat(ie(xe)),Bt=Bt.slice(0,_e);for(let dn=Bt.length-1;dn>=0&&!Bt[dn];dn-=1)Bt.pop();const en=ze(Bt.map(dn=>dn||" ").join(""));return Bt=ie(en).map((dn,Hn)=>dn===" "&&!Bt[Hn]?Bt[Hn]:dn),Bt}),Pe=(bt,xe)=>{var Bt;const en=pe(bt,xe),dn=Math.min(bt+xe.length,_e-1);dn!==bt&&en[bt]!==void 0&&((Bt=zt.current[dn])===null||Bt===void 0||Bt.focus()),le(en)},$e=bt=>{var xe;(xe=zt.current[bt])===null||xe===void 0||xe.focus()},G={variant:ve,disabled:de,status:Ze,mask:we,type:Ie,inputMode:Xe};return rt(v.createElement("div",Object.assign({},qe,{ref:be,className:W()(Oe,{[`${Oe}-sm`]:S==="small",[`${Oe}-lg`]:S==="large",[`${Oe}-rtl`]:nt==="rtl"},Rt,ot)}),v.createElement(z.aM.Provider,{value:J},Array.from({length:_e}).map((bt,xe)=>{const Bt=`otp-${xe}`,en=Qe[xe]||"";return v.createElement(v.Fragment,{key:Bt},v.createElement(re,Object.assign({ref:dn=>{zt.current[xe]=dn},index:xe,size:S,htmlSize:1,className:`${Oe}-input`,onChange:Pe,value:en,onActiveChange:$e,autoFocus:xe===0&&Te},G)),xe<_e-1&&v.createElement(Ee,{separator:ce,index:xe,prefixCls:Oe}))}))))}),tt=m(73331),ue=m(15277),X=m(2738),L=m(8654),se=m(2171),Q=m(23826),V=function(Ge,je){var Re={};for(var _e in Ge)Object.prototype.hasOwnProperty.call(Ge,_e)&&je.indexOf(_e)<0&&(Re[_e]=Ge[_e]);if(Ge!=null&&typeof Object.getOwnPropertySymbols=="function")for(var Y=0,_e=Object.getOwnPropertySymbols(Ge);Y<_e.length;Y++)je.indexOf(_e[Y])<0&&Object.prototype.propertyIsEnumerable.call(Ge,_e[Y])&&(Re[_e[Y]]=Ge[_e[Y]]);return Re};const x=Ge=>Ge?v.createElement(ue.Z,null):v.createElement(tt.Z,null),w={click:"onClick",hover:"onMouseOver"};var he=v.forwardRef((Ge,je)=>{const{disabled:Re,action:_e="click",visibilityToggle:Y=!0,iconRender:Le=x}=Ge,Ce=v.useContext(se.Z),B=Re!=null?Re:Ce,P=typeof Y=="object"&&Y.visible!==void 0,[ce,ve]=(0,v.useState)(()=>P?Y.visible:!1),de=(0,v.useRef)(null);v.useEffect(()=>{P&&ve(Y.visible)},[P,Y]);const ye=(0,Q.Z)(de),Te=()=>{var S;if(B)return;ce&&ye();const R=!ce;ve(R),typeof Y=="object"&&((S=Y.onVisibleChange)===null||S===void 0||S.call(Y,R))},we=S=>{const R=w[_e]||"",Ze=Le(ce),J={[R]:Te,className:`${S}-icon`,key:"passwordIcon",onMouseDown:be=>{be.preventDefault()},onMouseUp:be=>{be.preventDefault()}};return v.cloneElement(v.isValidElement(Ze)?Ze:v.createElement("span",null,Ze),J)},{className:Ie,prefixCls:Ae,inputPrefixCls:Xe,size:gt}=Ge,ht=V(Ge,["className","prefixCls","inputPrefixCls","size"]),{getPrefixCls:nt}=v.useContext(fe.E_),Oe=nt("input",Xe),qe=nt("input-password",Ae),rt=Y&&we(qe),ot=W()(qe,Ie,{[`${qe}-${gt}`]:!!gt}),Rt=Object.assign(Object.assign({},(0,X.Z)(ht,["suffix","iconRender","visibilityToggle"])),{type:ce?"text":"password",className:ot,prefixCls:Oe,suffix:rt});return gt&&(Rt.size=gt),v.createElement(o.Z,Object.assign({ref:(0,L.sQ)(je,de)},Rt))}),Ke=m(47472),ft=m(22703),Ue=m(7939),st=m(70045),pt=function(Ge,je){var Re={};for(var _e in Ge)Object.prototype.hasOwnProperty.call(Ge,_e)&&je.indexOf(_e)<0&&(Re[_e]=Ge[_e]);if(Ge!=null&&typeof Object.getOwnPropertySymbols=="function")for(var Y=0,_e=Object.getOwnPropertySymbols(Ge);Y<_e.length;Y++)je.indexOf(_e[Y])<0&&Object.prototype.propertyIsEnumerable.call(Ge,_e[Y])&&(Re[_e[Y]]=Ge[_e[Y]]);return Re},Ne=v.forwardRef((Ge,je)=>{const{prefixCls:Re,inputPrefixCls:_e,className:Y,size:Le,suffix:Ce,enterButton:B=!1,addonAfter:P,loading:ce,disabled:ve,onSearch:de,onChange:ye,onCompositionStart:Te,onCompositionEnd:we}=Ge,Ie=pt(Ge,["prefixCls","inputPrefixCls","className","size","suffix","enterButton","addonAfter","loading","disabled","onSearch","onChange","onCompositionStart","onCompositionEnd"]),{getPrefixCls:Ae,direction:Xe}=v.useContext(fe.E_),gt=v.useRef(!1),ht=Ae("input-search",Re),nt=Ae("input",_e),{compactSize:Oe}=(0,st.ri)(ht,Xe),qe=(0,T.Z)(Pe=>{var $e;return($e=Le!=null?Le:Oe)!==null&&$e!==void 0?$e:Pe}),rt=v.useRef(null),ot=Pe=>{Pe!=null&&Pe.target&&Pe.type==="click"&&de&&de(Pe.target.value,Pe,{source:"clear"}),ye==null||ye(Pe)},Rt=Pe=>{var $e;document.activeElement===(($e=rt.current)===null||$e===void 0?void 0:$e.input)&&Pe.preventDefault()},S=Pe=>{var $e,G;de&&de((G=($e=rt.current)===null||$e===void 0?void 0:$e.input)===null||G===void 0?void 0:G.value,Pe,{source:"input"})},R=Pe=>{gt.current||ce||S(Pe)},Ze=typeof B=="boolean"?v.createElement(Ke.Z,null):null,J=`${ht}-button`;let be;const zt=B||{},ze=zt.type&&zt.type.__ANT_BUTTON===!0;ze||zt.type==="button"?be=(0,ft.Tm)(zt,Object.assign({onMouseDown:Rt,onClick:Pe=>{var $e,G;(G=($e=zt==null?void 0:zt.props)===null||$e===void 0?void 0:$e.onClick)===null||G===void 0||G.call($e,Pe),S(Pe)},key:"enterButton"},ze?{className:J,size:qe}:{})):be=v.createElement(Ue.ZP,{className:J,type:B?"primary":void 0,size:qe,disabled:ve,key:"enterButton",onMouseDown:Rt,onClick:S,loading:ce,icon:Ze},B),P&&(be=[be,(0,ft.Tm)(P,{key:"addonAfter"})]);const Qe=W()(ht,{[`${ht}-rtl`]:Xe==="rtl",[`${ht}-${qe}`]:!!qe,[`${ht}-with-button`]:!!B},Y),lt=Object.assign(Object.assign({},Ie),{className:Qe,prefixCls:nt,type:"search"}),le=Pe=>{gt.current=!0,Te==null||Te(Pe)},pe=Pe=>{gt.current=!1,we==null||we(Pe)};return v.createElement(o.Z,Object.assign({ref:(0,L.sQ)(rt,je),onPressEnter:R},lt,{size:qe,onCompositionStart:le,onCompositionEnd:pe,addonAfter:be,suffix:Ce,onChange:ot,disabled:ve}))}),St=m(79809);const at=o.Z;at.Group=te,at.Search=Ne,at.TextArea=St.Z,at.Password=he,at.OTP=ke;var Nt=at},53075:function(ln,mt,m){"use strict";m.d(mt,{TI:function(){return K},ik:function(){return y},nz:function(){return te},s7:function(){return E},x0:function(){return M}});var v=m(36237),ae=m(63356),W=m(56119),fe=m(16931),z=m(51636),g=m(64910),q=m(39082);const te=D=>({"&::-moz-placeholder":{opacity:1},"&::placeholder":{color:D,userSelect:"none"},"&:placeholder-shown":{textOverflow:"ellipsis"}}),o=D=>({borderColor:D.activeBorderColor,boxShadow:D.activeShadow,outline:0,backgroundColor:D.activeBg}),C=D=>{const{paddingBlockLG:O,lineHeightLG:re,borderRadiusLG:oe,paddingInlineLG:ie}=D;return{padding:`${(0,v.unit)(O)} ${(0,v.unit)(ie)}`,fontSize:D.inputFontSizeLG,lineHeight:re,borderRadius:oe}},M=D=>({padding:`${(0,v.unit)(D.paddingBlockSM)} ${(0,v.unit)(D.paddingInlineSM)}`,fontSize:D.inputFontSizeSM,borderRadius:D.borderRadiusSM}),y=D=>Object.assign(Object.assign({position:"relative",display:"inline-block",width:"100%",minWidth:0,padding:`${(0,v.unit)(D.paddingBlock)} ${(0,v.unit)(D.paddingInline)}`,color:D.colorText,fontSize:D.inputFontSize,lineHeight:D.lineHeight,borderRadius:D.borderRadius,transition:`all ${D.motionDurationMid}`},te(D.colorTextPlaceholder)),{"&-lg":Object.assign({},C(D)),"&-sm":Object.assign({},M(D)),"&-rtl, &-textarea-rtl":{direction:"rtl"}}),E=D=>{const{componentCls:O,antCls:re}=D;return{position:"relative",display:"table",width:"100%",borderCollapse:"separate",borderSpacing:0,"&[class*='col-']":{paddingInlineEnd:D.paddingXS,"&:last-child":{paddingInlineEnd:0}},[`&-lg ${O}, &-lg > ${O}-group-addon`]:Object.assign({},C(D)),[`&-sm ${O}, &-sm > ${O}-group-addon`]:Object.assign({},M(D)),[`&-lg ${re}-select-single ${re}-select-selector`]:{height:D.controlHeightLG},[`&-sm ${re}-select-single ${re}-select-selector`]:{height:D.controlHeightSM},[`> ${O}`]:{display:"table-cell","&:not(:first-child):not(:last-child)":{borderRadius:0}},[`${O}-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 ${(0,v.unit)(D.paddingInline)}`,color:D.colorText,fontWeight:"normal",fontSize:D.inputFontSize,textAlign:"center",borderRadius:D.borderRadius,transition:`all ${D.motionDurationSlow}`,lineHeight:1,[`${re}-select`]:{margin:`${(0,v.unit)(D.calc(D.paddingBlock).add(1).mul(-1).equal())} ${(0,v.unit)(D.calc(D.paddingInline).mul(-1).equal())}`,[`&${re}-select-single:not(${re}-select-customize-input):not(${re}-pagination-size-changer)`]:{[`${re}-select-selector`]:{backgroundColor:"inherit",border:`${(0,v.unit)(D.lineWidth)} ${D.lineType} transparent`,boxShadow:"none"}}},[`${re}-cascader-picker`]:{margin:`-9px ${(0,v.unit)(D.calc(D.paddingInline).mul(-1).equal())}`,backgroundColor:"transparent",[`${re}-cascader-input`]:{textAlign:"start",border:0,boxShadow:"none"}}}},[O]:{width:"100%",marginBottom:0,textAlign:"inherit","&:focus":{zIndex:1,borderInlineEndWidth:1},"&:hover":{zIndex:1,borderInlineEndWidth:1,[`${O}-search-with-button &`]:{zIndex:0}}},[`> ${O}:first-child, ${O}-group-addon:first-child`]:{borderStartEndRadius:0,borderEndEndRadius:0,[`${re}-select ${re}-select-selector`]:{borderStartEndRadius:0,borderEndEndRadius:0}},[`> ${O}-affix-wrapper`]:{[`&:not(:first-child) ${O}`]:{borderStartStartRadius:0,borderEndStartRadius:0},[`&:not(:last-child) ${O}`]:{borderStartEndRadius:0,borderEndEndRadius:0}},[`> ${O}:last-child, ${O}-group-addon:last-child`]:{borderStartStartRadius:0,borderEndStartRadius:0,[`${re}-select ${re}-select-selector`]:{borderStartStartRadius:0,borderEndStartRadius:0}},[`${O}-affix-wrapper`]:{"&:not(:last-child)":{borderStartEndRadius:0,borderEndEndRadius:0,[`${O}-search &`]:{borderStartStartRadius:D.borderRadius,borderEndStartRadius:D.borderRadius}},[`&:not(:first-child), ${O}-search &:not(:first-child)`]:{borderStartStartRadius:0,borderEndStartRadius:0}},[`&${O}-group-compact`]:Object.assign(Object.assign({display:"block"},(0,ae.dF)()),{[`${O}-group-addon, ${O}-group-wrap, > ${O}`]:{"&:not(:first-child):not(:last-child)":{borderInlineEndWidth:D.lineWidth,"&:hover, &:focus":{zIndex:1}}},"& > *":{display:"inline-flex",float:"none",verticalAlign:"top",borderRadius:0},[`
|
|
|
& > ${O}-affix-wrapper,
|
|
|
& > ${O}-number-affix-wrapper,
|
|
|
& > ${re}-picker-range
|
|
|
`]:{display:"inline-flex"},"& > *:not(:last-child)":{marginInlineEnd:D.calc(D.lineWidth).mul(-1).equal(),borderInlineEndWidth:D.lineWidth},[O]:{float:"none"},[`& > ${re}-select > ${re}-select-selector,
|
|
|
& > ${re}-select-auto-complete ${O},
|
|
|
& > ${re}-cascader-picker ${O},
|
|
|
& > ${O}-group-wrapper ${O}`]:{borderInlineEndWidth:D.lineWidth,borderRadius:0,"&:hover, &:focus":{zIndex:1}},[`& > ${re}-select-focused`]:{zIndex:1},[`& > ${re}-select > ${re}-select-arrow`]:{zIndex:1},[`& > *:first-child,
|
|
|
& > ${re}-select:first-child > ${re}-select-selector,
|
|
|
& > ${re}-select-auto-complete:first-child ${O},
|
|
|
& > ${re}-cascader-picker:first-child ${O}`]:{borderStartStartRadius:D.borderRadius,borderEndStartRadius:D.borderRadius},[`& > *:last-child,
|
|
|
& > ${re}-select:last-child > ${re}-select-selector,
|
|
|
& > ${re}-cascader-picker:last-child ${O},
|
|
|
& > ${re}-cascader-picker-focused:last-child ${O}`]:{borderInlineEndWidth:D.lineWidth,borderStartEndRadius:D.borderRadius,borderEndEndRadius:D.borderRadius},[`& > ${re}-select-auto-complete ${O}`]:{verticalAlign:"top"},[`${O}-group-wrapper + ${O}-group-wrapper`]:{marginInlineStart:D.calc(D.lineWidth).mul(-1).equal(),[`${O}-affix-wrapper`]:{borderRadius:0}},[`${O}-group-wrapper:not(:last-child)`]:{[`&${O}-search > ${O}-group`]:{[`& > ${O}-group-addon > ${O}-search-button`]:{borderRadius:0},[`& > ${O}`]:{borderStartStartRadius:D.borderRadius,borderStartEndRadius:0,borderEndEndRadius:0,borderEndStartRadius:D.borderRadius}}}})}},T=D=>{const{componentCls:O,controlHeightSM:re,lineWidth:oe,calc:ie}=D,Me=ie(re).sub(ie(oe).mul(2)).sub(16).div(2).equal();return{[O]:Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({},(0,ae.Wf)(D)),y(D)),(0,q.qG)(D)),(0,q.H8)(D)),(0,q.Mu)(D)),(0,q.vc)(D)),{'&[type="color"]':{height:D.controlHeight,[`&${O}-lg`]:{height:D.controlHeightLG},[`&${O}-sm`]:{height:re,paddingTop:Me,paddingBottom:Me}},'&[type="search"]::-webkit-search-cancel-button, &[type="search"]::-webkit-search-decoration':{appearance:"none"}})}},k=D=>{const{componentCls:O}=D;return{[`${O}-clear-icon`]:{margin:0,padding:0,lineHeight:0,color:D.colorTextQuaternary,fontSize:D.fontSizeIcon,verticalAlign:-1,cursor:"pointer",transition:`color ${D.motionDurationSlow}`,border:"none",outline:"none",backgroundColor:"transparent","&:hover":{color:D.colorTextTertiary},"&:active":{color:D.colorText},"&-hidden":{visibility:"hidden"},"&-has-suffix":{margin:`0 ${(0,v.unit)(D.inputAffixPadding)}`}}}},j=D=>{const{componentCls:O,inputAffixPadding:re,colorTextDescription:oe,motionDurationSlow:ie,colorIcon:Ee,colorIconHover:Me,iconCls:ke}=D,tt=`${O}-affix-wrapper`,ue=`${O}-affix-wrapper-disabled`;return{[tt]:Object.assign(Object.assign(Object.assign(Object.assign({},y(D)),{display:"inline-flex",[`&:not(${O}-disabled):hover`]:{zIndex:1,[`${O}-search-with-button &`]:{zIndex:0}},"&-focused, &:focus":{zIndex:1},[`> input${O}`]:{padding:0},[`> input${O}, > textarea${O}`]:{fontSize:"inherit",border:"none",borderRadius:0,outline:"none",background:"transparent",color:"inherit","&::-ms-reveal":{display:"none"},"&:focus":{boxShadow:"none !important"}},"&::before":{display:"inline-block",width:0,visibility:"hidden",content:'"\\a0"'},[O]:{"&-prefix, &-suffix":{display:"flex",flex:"none",alignItems:"center","> *:not(:last-child)":{marginInlineEnd:D.paddingXS}},"&-show-count-suffix":{color:oe},"&-show-count-has-suffix":{marginInlineEnd:D.paddingXXS},"&-prefix":{marginInlineEnd:re},"&-suffix":{marginInlineStart:re}}}),k(D)),{[`${ke}${O}-password-icon`]:{color:Ee,cursor:"pointer",transition:`all ${ie}`,"&:hover":{color:Me}}}),[`${O}-underlined`]:{borderRadius:0},[ue]:{[`${ke}${O}-password-icon`]:{color:Ee,cursor:"not-allowed","&:hover":{color:Ee}}}}},Z=D=>{const{componentCls:O,borderRadiusLG:re,borderRadiusSM:oe}=D;return{[`${O}-group`]:Object.assign(Object.assign(Object.assign({},(0,ae.Wf)(D)),E(D)),{"&-rtl":{direction:"rtl"},"&-wrapper":Object.assign(Object.assign(Object.assign({display:"inline-block",width:"100%",textAlign:"start",verticalAlign:"top","&-rtl":{direction:"rtl"},"&-lg":{[`${O}-group-addon`]:{borderRadius:re,fontSize:D.inputFontSizeLG}},"&-sm":{[`${O}-group-addon`]:{borderRadius:oe}}},(0,q.ir)(D)),(0,q.S5)(D)),{[`&:not(${O}-compact-first-item):not(${O}-compact-last-item)${O}-compact-item`]:{[`${O}, ${O}-group-addon`]:{borderRadius:0}},[`&:not(${O}-compact-last-item)${O}-compact-first-item`]:{[`${O}, ${O}-group-addon`]:{borderStartEndRadius:0,borderEndEndRadius:0}},[`&:not(${O}-compact-first-item)${O}-compact-last-item`]:{[`${O}, ${O}-group-addon`]:{borderStartStartRadius:0,borderEndStartRadius:0}},[`&:not(${O}-compact-last-item)${O}-compact-item`]:{[`${O}-affix-wrapper`]:{borderStartEndRadius:0,borderEndEndRadius:0}},[`&:not(${O}-compact-first-item)${O}-compact-item`]:{[`${O}-affix-wrapper`]:{borderStartStartRadius:0,borderEndStartRadius:0}}})})}},U=D=>{const{componentCls:O,antCls:re}=D,oe=`${O}-search`;return{[oe]:{[O]:{"&:hover, &:focus":{[`+ ${O}-group-addon ${oe}-button:not(${re}-btn-primary)`]:{borderInlineStartColor:D.colorPrimaryHover}}},[`${O}-affix-wrapper`]:{height:D.controlHeight,borderRadius:0},[`${O}-lg`]:{lineHeight:D.calc(D.lineHeightLG).sub(2e-4).equal()},[`> ${O}-group`]:{[`> ${O}-group-addon:last-child`]:{insetInlineStart:-1,padding:0,border:0,[`${oe}-button`]:{marginInlineEnd:-1,borderStartStartRadius:0,borderEndStartRadius:0,boxShadow:"none"},[`${oe}-button:not(${re}-btn-primary)`]:{color:D.colorTextDescription,"&:hover":{color:D.colorPrimaryHover},"&:active":{color:D.colorPrimaryActive},[`&${re}-btn-loading::before`]:{insetInlineStart:0,insetInlineEnd:0,insetBlockStart:0,insetBlockEnd:0}}}},[`${oe}-button`]:{height:D.controlHeight,"&:hover, &:focus":{zIndex:1}},"&-large":{[`${O}-affix-wrapper, ${oe}-button`]:{height:D.controlHeightLG}},"&-small":{[`${O}-affix-wrapper, ${oe}-button`]:{height:D.controlHeightSM}},"&-rtl":{direction:"rtl"},[`&${O}-compact-item`]:{[`&:not(${O}-compact-last-item)`]:{[`${O}-group-addon`]:{[`${O}-search-button`]:{marginInlineEnd:D.calc(D.lineWidth).mul(-1).equal(),borderRadius:0}}},[`&:not(${O}-compact-first-item)`]:{[`${O},${O}-affix-wrapper`]:{borderRadius:0}},[`> ${O}-group-addon ${O}-search-button,
|
|
|
> ${O},
|
|
|
${O}-affix-wrapper`]:{"&:hover, &:focus, &:active":{zIndex:2}},[`> ${O}-affix-wrapper-focused`]:{zIndex:2}}}}},A=D=>{const{componentCls:O}=D;return{[`${O}-out-of-range`]:{[`&, & input, & textarea, ${O}-show-count-suffix, ${O}-data-count`]:{color:D.colorError}}}},K=(0,fe.I$)(["Input","Shared"],D=>{const O=(0,z.mergeToken)(D,(0,g.e)(D));return[T(O),j(O)]},g.T,{resetFont:!1});mt.ZP=(0,fe.I$)(["Input","Component"],D=>{const O=(0,z.mergeToken)(D,(0,g.e)(D));return[Z(O),U(O),A(O),(0,W.c)(O)]},g.T,{resetFont:!1})},64910:function(ln,mt,m){"use strict";m.d(mt,{T:function(){return W},e:function(){return ae}});var v=m(51636);function ae(fe){return(0,v.mergeToken)(fe,{inputAffixPadding:fe.paddingXXS})}const W=fe=>{const{controlHeight:z,fontSize:g,lineHeight:q,lineWidth:te,controlHeightSM:o,controlHeightLG:C,fontSizeLG:M,lineHeightLG:y,paddingSM:E,controlPaddingHorizontalSM:T,controlPaddingHorizontal:k,colorFillAlter:j,colorPrimaryHover:Z,colorPrimary:U,controlOutlineWidth:A,controlOutline:K,colorErrorOutline:D,colorWarningOutline:O,colorBgContainer:re,inputFontSize:oe,inputFontSizeLG:ie,inputFontSizeSM:Ee}=fe,Me=oe||g,ke=Ee||Me,tt=ie||M,ue=Math.round((z-Me*q)/2*10)/10-te,X=Math.round((o-ke*q)/2*10)/10-te,L=Math.ceil((C-tt*y)/2*10)/10-te;return{paddingBlock:Math.max(ue,0),paddingBlockSM:Math.max(X,0),paddingBlockLG:Math.max(L,0),paddingInline:E-te,paddingInlineSM:T-te,paddingInlineLG:k-te,addonBg:j,activeBorderColor:U,hoverBorderColor:Z,activeShadow:`0 0 0 ${A}px ${K}`,errorActiveShadow:`0 0 0 ${A}px ${D}`,warningActiveShadow:`0 0 0 ${A}px ${O}`,hoverBg:re,activeBg:re,inputFontSize:Me,inputFontSizeLG:tt,inputFontSizeSM:ke}}},39082:function(ln,mt,m){"use strict";m.d(mt,{$U:function(){return z},H8:function(){return E},Mu:function(){return C},S5:function(){return k},Xy:function(){return fe},ir:function(){return o},qG:function(){return q},vc:function(){return U}});var v=m(36237),ae=m(51636);const W=A=>({borderColor:A.hoverBorderColor,backgroundColor:A.hoverBg}),fe=A=>({color:A.colorTextDisabled,backgroundColor:A.colorBgContainerDisabled,borderColor:A.colorBorder,boxShadow:"none",cursor:"not-allowed",opacity:1,"input[disabled], textarea[disabled]":{cursor:"not-allowed"},"&:hover:not([disabled])":Object.assign({},W((0,ae.mergeToken)(A,{hoverBorderColor:A.colorBorder,hoverBg:A.colorBgContainerDisabled})))}),z=(A,K)=>({background:A.colorBgContainer,borderWidth:A.lineWidth,borderStyle:A.lineType,borderColor:K.borderColor,"&:hover":{borderColor:K.hoverBorderColor,backgroundColor:A.hoverBg},"&:focus, &:focus-within":{borderColor:K.activeBorderColor,boxShadow:K.activeShadow,outline:0,backgroundColor:A.activeBg}}),g=(A,K)=>({[`&${A.componentCls}-status-${K.status}:not(${A.componentCls}-disabled)`]:Object.assign(Object.assign({},z(A,K)),{[`${A.componentCls}-prefix, ${A.componentCls}-suffix`]:{color:K.affixColor}}),[`&${A.componentCls}-status-${K.status}${A.componentCls}-disabled`]:{borderColor:K.borderColor}}),q=(A,K)=>({"&-outlined":Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({},z(A,{borderColor:A.colorBorder,hoverBorderColor:A.hoverBorderColor,activeBorderColor:A.activeBorderColor,activeShadow:A.activeShadow})),{[`&${A.componentCls}-disabled, &[disabled]`]:Object.assign({},fe(A))}),g(A,{status:"error",borderColor:A.colorError,hoverBorderColor:A.colorErrorBorderHover,activeBorderColor:A.colorError,activeShadow:A.errorActiveShadow,affixColor:A.colorError})),g(A,{status:"warning",borderColor:A.colorWarning,hoverBorderColor:A.colorWarningBorderHover,activeBorderColor:A.colorWarning,activeShadow:A.warningActiveShadow,affixColor:A.colorWarning})),K)}),te=(A,K)=>({[`&${A.componentCls}-group-wrapper-status-${K.status}`]:{[`${A.componentCls}-group-addon`]:{borderColor:K.addonBorderColor,color:K.addonColor}}}),o=A=>({"&-outlined":Object.assign(Object.assign(Object.assign({[`${A.componentCls}-group`]:{"&-addon":{background:A.addonBg,border:`${(0,v.unit)(A.lineWidth)} ${A.lineType} ${A.colorBorder}`},"&-addon:first-child":{borderInlineEnd:0},"&-addon:last-child":{borderInlineStart:0}}},te(A,{status:"error",addonBorderColor:A.colorError,addonColor:A.colorErrorText})),te(A,{status:"warning",addonBorderColor:A.colorWarning,addonColor:A.colorWarningText})),{[`&${A.componentCls}-group-wrapper-disabled`]:{[`${A.componentCls}-group-addon`]:Object.assign({},fe(A))}})}),C=(A,K)=>{const{componentCls:D}=A;return{"&-borderless":Object.assign({background:"transparent",border:"none","&:focus, &:focus-within":{outline:"none"},[`&${D}-disabled, &[disabled]`]:{color:A.colorTextDisabled,cursor:"not-allowed"},[`&${D}-status-error`]:{"&, & input, & textarea":{color:A.colorError}},[`&${D}-status-warning`]:{"&, & input, & textarea":{color:A.colorWarning}}},K)}},M=(A,K)=>{var D;return{background:K.bg,borderWidth:A.lineWidth,borderStyle:A.lineType,borderColor:"transparent","input&, & input, textarea&, & textarea":{color:(D=K==null?void 0:K.inputColor)!==null&&D!==void 0?D:"unset"},"&:hover":{background:K.hoverBg},"&:focus, &:focus-within":{outline:0,borderColor:K.activeBorderColor,backgroundColor:A.activeBg}}},y=(A,K)=>({[`&${A.componentCls}-status-${K.status}:not(${A.componentCls}-disabled)`]:Object.assign(Object.assign({},M(A,K)),{[`${A.componentCls}-prefix, ${A.componentCls}-suffix`]:{color:K.affixColor}})}),E=(A,K)=>({"&-filled":Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({},M(A,{bg:A.colorFillTertiary,hoverBg:A.colorFillSecondary,activeBorderColor:A.activeBorderColor})),{[`&${A.componentCls}-disabled, &[disabled]`]:Object.assign({},fe(A))}),y(A,{status:"error",bg:A.colorErrorBg,hoverBg:A.colorErrorBgHover,activeBorderColor:A.colorError,inputColor:A.colorErrorText,affixColor:A.colorError})),y(A,{status:"warning",bg:A.colorWarningBg,hoverBg:A.colorWarningBgHover,activeBorderColor:A.colorWarning,inputColor:A.colorWarningText,affixColor:A.colorWarning})),K)}),T=(A,K)=>({[`&${A.componentCls}-group-wrapper-status-${K.status}`]:{[`${A.componentCls}-group-addon`]:{background:K.addonBg,color:K.addonColor}}}),k=A=>({"&-filled":Object.assign(Object.assign(Object.assign({[`${A.componentCls}-group`]:{"&-addon":{background:A.colorFillTertiary},[`${A.componentCls}-filled:not(:focus):not(:focus-within)`]:{"&:not(:first-child)":{borderInlineStart:`${(0,v.unit)(A.lineWidth)} ${A.lineType} ${A.colorSplit}`},"&:not(:last-child)":{borderInlineEnd:`${(0,v.unit)(A.lineWidth)} ${A.lineType} ${A.colorSplit}`}}}},T(A,{status:"error",addonBg:A.colorErrorBg,addonColor:A.colorErrorText})),T(A,{status:"warning",addonBg:A.colorWarningBg,addonColor:A.colorWarningText})),{[`&${A.componentCls}-group-wrapper-disabled`]:{[`${A.componentCls}-group`]:{"&-addon":{background:A.colorFillTertiary,color:A.colorTextDisabled},"&-addon:first-child":{borderInlineStart:`${(0,v.unit)(A.lineWidth)} ${A.lineType} ${A.colorBorder}`,borderTop:`${(0,v.unit)(A.lineWidth)} ${A.lineType} ${A.colorBorder}`,borderBottom:`${(0,v.unit)(A.lineWidth)} ${A.lineType} ${A.colorBorder}`},"&-addon:last-child":{borderInlineEnd:`${(0,v.unit)(A.lineWidth)} ${A.lineType} ${A.colorBorder}`,borderTop:`${(0,v.unit)(A.lineWidth)} ${A.lineType} ${A.colorBorder}`,borderBottom:`${(0,v.unit)(A.lineWidth)} ${A.lineType} ${A.colorBorder}`}}}})}),j=(A,K)=>({background:A.colorBgContainer,borderWidth:`${(0,v.unit)(A.lineWidth)} 0`,borderStyle:`${A.lineType} none`,borderColor:`transparent transparent ${K.borderColor} transparent`,borderRadius:0,"&:hover":{borderColor:`transparent transparent ${K.borderColor} transparent`,backgroundColor:A.hoverBg},"&:focus, &:focus-within":{borderColor:`transparent transparent ${K.borderColor} transparent`,outline:0,backgroundColor:A.activeBg}}),Z=(A,K)=>({[`&${A.componentCls}-status-${K.status}:not(${A.componentCls}-disabled)`]:Object.assign(Object.assign({},j(A,K)),{[`${A.componentCls}-prefix, ${A.componentCls}-suffix`]:{color:K.affixColor}}),[`&${A.componentCls}-status-${K.status}${A.componentCls}-disabled`]:{borderColor:`transparent transparent ${K.borderColor} transparent`}}),U=(A,K)=>({"&-underlined":Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({},j(A,{borderColor:A.colorBorder,hoverBorderColor:A.hoverBorderColor,activeBorderColor:A.activeBorderColor,activeShadow:A.activeShadow})),{[`&${A.componentCls}-disabled, &[disabled]`]:{color:A.colorTextDisabled,boxShadow:"none",cursor:"not-allowed","&:hover":{borderColor:`transparent transparent ${A.colorBorder} transparent`}},"input[disabled], textarea[disabled]":{cursor:"not-allowed"}}),Z(A,{status:"error",borderColor:A.colorError,hoverBorderColor:A.colorErrorBorderHover,activeBorderColor:A.colorError,activeShadow:A.errorActiveShadow,affixColor:A.colorError})),Z(A,{status:"warning",borderColor:A.colorWarning,hoverBorderColor:A.colorWarningBorderHover,activeBorderColor:A.colorWarning,activeShadow:A.warningActiveShadow,affixColor:A.colorWarning})),K)})},24303:function(ln,mt,m){"use strict";m.d(mt,{D:function(){return oe},Z:function(){return Me}});var v=m(59301),ae=m(60499),W={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"},fe=W,z=m(7657),g=function(tt,ue){return v.createElement(z.Z,(0,ae.Z)({},tt,{ref:ue,icon:fe}))},q=v.forwardRef(g),te=q,o=m(33853),C=m(38819),M=m(92310),y=m.n(M),E=m(2738),T=m(48755),k=m(6989),j=m(36237),Z=m(48923),U=m(16931);const A=ke=>{const{componentCls:tt,siderBg:ue,motionDurationMid:X,motionDurationSlow:L,antCls:se,triggerHeight:Q,triggerColor:V,triggerBg:x,headerHeight:w,zeroTriggerWidth:H,zeroTriggerHeight:he,borderRadiusLG:Ke,lightSiderBg:ft,lightTriggerColor:Ue,lightTriggerBg:st,bodyBg:pt}=ke;return{[tt]:{position:"relative",minWidth:0,background:ue,transition:`all ${X}, background 0s`,"&-has-trigger":{paddingBottom:Q},"&-right":{order:1},[`${tt}-children`]:{height:"100%",marginTop:-.1,paddingTop:.1,[`${se}-menu${se}-menu-inline-collapsed`]:{width:"auto"}},[`&-zero-width ${tt}-children`]:{overflow:"hidden"},[`${tt}-trigger`]:{position:"fixed",bottom:0,zIndex:1,height:Q,color:V,lineHeight:(0,j.unit)(Q),textAlign:"center",background:x,cursor:"pointer",transition:`all ${X}`},[`${tt}-zero-width-trigger`]:{position:"absolute",top:w,insetInlineEnd:ke.calc(H).mul(-1).equal(),zIndex:1,width:H,height:he,color:V,fontSize:ke.fontSizeXL,display:"flex",alignItems:"center",justifyContent:"center",background:ue,borderRadius:`0 ${(0,j.unit)(Ke)} ${(0,j.unit)(Ke)} 0`,cursor:"pointer",transition:`background ${L} ease`,"&::after":{position:"absolute",inset:0,background:"transparent",transition:`all ${L}`,content:'""'},"&:hover::after":{background:"rgba(255, 255, 255, 0.2)"},"&-right":{insetInlineStart:ke.calc(H).mul(-1).equal(),borderRadius:`${(0,j.unit)(Ke)} 0 0 ${(0,j.unit)(Ke)}`}},"&-light":{background:ft,[`${tt}-trigger`]:{color:Ue,background:st},[`${tt}-zero-width-trigger`]:{color:Ue,background:st,border:`1px solid ${pt}`,borderInlineStart:0}}}}};var K=(0,U.I$)(["Layout","Sider"],ke=>[A(ke)],Z.eh,{deprecatedTokens:Z.jn}),D=function(ke,tt){var ue={};for(var X in ke)Object.prototype.hasOwnProperty.call(ke,X)&&tt.indexOf(X)<0&&(ue[X]=ke[X]);if(ke!=null&&typeof Object.getOwnPropertySymbols=="function")for(var L=0,X=Object.getOwnPropertySymbols(ke);L<X.length;L++)tt.indexOf(X[L])<0&&Object.prototype.propertyIsEnumerable.call(ke,X[L])&&(ue[X[L]]=ke[X[L]]);return ue};const O={xs:"479.98px",sm:"575.98px",md:"767.98px",lg:"991.98px",xl:"1199.98px",xxl:"1599.98px"},re=ke=>!Number.isNaN(Number.parseFloat(ke))&&isFinite(ke),oe=v.createContext({}),ie=(()=>{let ke=0;return function(){let tt=arguments.length>0&&arguments[0]!==void 0?arguments[0]:"";return ke+=1,`${tt}${ke}`}})();var Me=v.forwardRef((ke,tt)=>{const{prefixCls:ue,className:X,trigger:L,children:se,defaultCollapsed:Q=!1,theme:V="dark",style:x={},collapsible:w=!1,reverseArrow:H=!1,width:he=200,collapsedWidth:Ke=80,zeroWidthTriggerStyle:ft,breakpoint:Ue,onCollapse:st,onBreakpoint:pt}=ke,Et=D(ke,["prefixCls","className","trigger","children","defaultCollapsed","theme","style","collapsible","reverseArrow","width","collapsedWidth","zeroWidthTriggerStyle","breakpoint","onCollapse","onBreakpoint"]),{siderHook:Ne}=(0,v.useContext)(k.V),[St,at]=(0,v.useState)("collapsed"in ke?ke.collapsed:Q),[Nt,Ge]=(0,v.useState)(!1);(0,v.useEffect)(()=>{"collapsed"in ke&&at(ke.collapsed)},[ke.collapsed]);const je=(qe,rt)=>{"collapsed"in ke||at(qe),st==null||st(qe,rt)},{getPrefixCls:Re,direction:_e}=(0,v.useContext)(T.E_),Y=Re("layout-sider",ue),[Le,Ce,B]=K(Y),P=(0,v.useRef)(null);P.current=qe=>{Ge(qe.matches),pt==null||pt(qe.matches),St!==qe.matches&&je(qe.matches,"responsive")},(0,v.useEffect)(()=>{function qe(ot){return P.current(ot)}let rt;if(typeof window!="undefined"){const{matchMedia:ot}=window;if(ot&&Ue&&Ue in O){rt=ot(`screen and (max-width: ${O[Ue]})`);try{rt.addEventListener("change",qe)}catch(Rt){rt.addListener(qe)}qe(rt)}}return()=>{try{rt==null||rt.removeEventListener("change",qe)}catch(ot){rt==null||rt.removeListener(qe)}}},[Ue]),(0,v.useEffect)(()=>{const qe=ie("ant-sider-");return Ne.addSider(qe),()=>Ne.removeSider(qe)},[]);const ce=()=>{je(!St,"clickTrigger")},ve=(0,E.Z)(Et,["collapsed"]),de=St?Ke:he,ye=re(de)?`${de}px`:String(de),Te=parseFloat(String(Ke||0))===0?v.createElement("span",{onClick:ce,className:y()(`${Y}-zero-width-trigger`,`${Y}-zero-width-trigger-${H?"right":"left"}`),style:ft},L||v.createElement(te,null)):null,we=_e==="rtl"==!H,Xe={expanded:we?v.createElement(C.Z,null):v.createElement(o.Z,null),collapsed:we?v.createElement(o.Z,null):v.createElement(C.Z,null)}[St?"collapsed":"expanded"],gt=L!==null?Te||v.createElement("div",{className:`${Y}-trigger`,onClick:ce,style:{width:ye}},L||Xe):null,ht=Object.assign(Object.assign({},x),{flex:`0 0 ${ye}`,maxWidth:ye,minWidth:ye,width:ye}),nt=y()(Y,`${Y}-${V}`,{[`${Y}-collapsed`]:!!St,[`${Y}-has-trigger`]:w&&L!==null&&!Te,[`${Y}-below`]:!!Nt,[`${Y}-zero-width`]:parseFloat(ye)===0},X,Ce,B),Oe=v.useMemo(()=>({siderCollapsed:St}),[St]);return Le(v.createElement(oe.Provider,{value:Oe},v.createElement("aside",Object.assign({className:nt},ve,{style:ht,ref:tt}),v.createElement("div",{className:`${Y}-children`},se),w||Nt&&Te?gt:null)))})},6989:function(ln,mt,m){"use strict";m.d(mt,{V:function(){return ae}});var v=m(59301);const ae=v.createContext({siderHook:{addSider:()=>null,removeSider:()=>null}})},48923:function(ln,mt,m){"use strict";m.d(mt,{eh:function(){return fe},jn:function(){return z}});var v=m(36237),ae=m(16931);const W=g=>{const{antCls:q,componentCls:te,colorText:o,footerBg:C,headerHeight:M,headerPadding:y,headerColor:E,footerPadding:T,fontSize:k,bodyBg:j,headerBg:Z}=g;return{[te]:{display:"flex",flex:"auto",flexDirection:"column",minHeight:0,background:j,"&, *":{boxSizing:"border-box"},[`&${te}-has-sider`]:{flexDirection:"row",[`> ${te}, > ${te}-content`]:{width:0}},[`${te}-header, &${te}-footer`]:{flex:"0 0 auto"},"&-rtl":{direction:"rtl"}},[`${te}-header`]:{height:M,padding:y,color:E,lineHeight:(0,v.unit)(M),background:Z,[`${q}-menu`]:{lineHeight:"inherit"}},[`${te}-footer`]:{padding:T,color:o,fontSize:k,background:C},[`${te}-content`]:{flex:"auto",color:o,minHeight:0}}},fe=g=>{const{colorBgLayout:q,controlHeight:te,controlHeightLG:o,colorText:C,controlHeightSM:M,marginXXS:y,colorTextLightSolid:E,colorBgContainer:T}=g,k=o*1.25;return{colorBgHeader:"#001529",colorBgBody:q,colorBgTrigger:"#002140",bodyBg:q,headerBg:"#001529",headerHeight:te*2,headerPadding:`0 ${k}px`,headerColor:C,footerPadding:`${M}px ${k}px`,footerBg:q,siderBg:"#001529",triggerHeight:o+y*2,triggerBg:"#002140",triggerColor:E,zeroTriggerWidth:o,zeroTriggerHeight:o,lightSiderBg:T,lightTriggerBg:T,lightTriggerColor:C}},z=[["colorBgBody","bodyBg"],["colorBgHeader","headerBg"],["colorBgTrigger","triggerBg"]];mt.ZP=(0,ae.I$)("Layout",g=>[W(g)],fe,{deprecatedTokens:z})},78857:function(ln,mt,m){"use strict";m.d(mt,{J:function(){return g}});var v=m(59301),ae=m(8654),W=m(62487),fe=function(q,te){var o={};for(var C in q)Object.prototype.hasOwnProperty.call(q,C)&&te.indexOf(C)<0&&(o[C]=q[C]);if(q!=null&&typeof Object.getOwnPropertySymbols=="function")for(var M=0,C=Object.getOwnPropertySymbols(q);M<C.length;M++)te.indexOf(C[M])<0&&Object.prototype.propertyIsEnumerable.call(q,C[M])&&(o[C[M]]=q[C[M]]);return o};const z=v.createContext(null),g=v.forwardRef((q,te)=>{const{children:o}=q,C=fe(q,["children"]),M=v.useContext(z),y=v.useMemo(()=>Object.assign(Object.assign({},M),C),[M,C.prefixCls,C.mode,C.selectable,C.rootClassName]),E=(0,ae.t4)(o),T=(0,ae.x1)(te,E?(0,ae.C4)(o):null);return v.createElement(z.Provider,{value:y},v.createElement(W.Z,{space:!0},E?v.cloneElement(o,{ref:T}):o))});mt.Z=z},93041:function(ln,mt,m){"use strict";m.d(mt,{default:function(){return Le}});var v=m(59301),ae=m(28321),W=m(24303),fe=m(18785),z=m(92310),g=m.n(z),q=m(6089),te=m(2738),o=m(86641),C=m(22703),M=m(48755),y=m(83397),T=(0,v.createContext)({prefixCls:"",firstLevel:!0,inlineCollapsed:!1}),k=function(Ce,B){var P={};for(var ce in Ce)Object.prototype.hasOwnProperty.call(Ce,ce)&&B.indexOf(ce)<0&&(P[ce]=Ce[ce]);if(Ce!=null&&typeof Object.getOwnPropertySymbols=="function")for(var ve=0,ce=Object.getOwnPropertySymbols(Ce);ve<ce.length;ve++)B.indexOf(ce[ve])<0&&Object.prototype.propertyIsEnumerable.call(Ce,ce[ve])&&(P[ce[ve]]=Ce[ce[ve]]);return P},Z=Ce=>{const{prefixCls:B,className:P,dashed:ce}=Ce,ve=k(Ce,["prefixCls","className","dashed"]),{getPrefixCls:de}=v.useContext(M.E_),ye=de("menu",B),Te=g()({[`${ye}-item-divider-dashed`]:!!ce},P);return v.createElement(ae.iz,Object.assign({className:Te},ve))},U=m(11592),A=m(25399),D=Ce=>{var B;const{className:P,children:ce,icon:ve,title:de,danger:ye,extra:Te}=Ce,{prefixCls:we,firstLevel:Ie,direction:Ae,disableMenuItemTitleTooltip:Xe,inlineCollapsed:gt}=v.useContext(T),ht=Rt=>{const S=ce==null?void 0:ce[0],R=v.createElement("span",{className:g()(`${we}-title-content`,{[`${we}-title-content-with-extra`]:!!Te||Te===0})},ce);return(!ve||v.isValidElement(ce)&&ce.type==="span")&&ce&&Rt&&Ie&&typeof S=="string"?v.createElement("div",{className:`${we}-inline-collapsed-noicon`},S.charAt(0)):R},{siderCollapsed:nt}=v.useContext(W.D);let Oe=de;typeof de=="undefined"?Oe=Ie?ce:"":de===!1&&(Oe="");const qe={title:Oe};!nt&&!gt&&(qe.title=null,qe.open=!1);const rt=(0,U.Z)(ce).length;let ot=v.createElement(ae.ck,Object.assign({},(0,te.Z)(Ce,["title","icon","danger"]),{className:g()({[`${we}-item-danger`]:ye,[`${we}-item-only-child`]:(ve?rt+1:rt)===1},P),title:typeof de=="string"?de:void 0}),(0,C.Tm)(ve,{className:g()(v.isValidElement(ve)?(B=ve.props)===null||B===void 0?void 0:B.className:"",`${we}-item-icon`)}),ht(gt));return Xe||(ot=v.createElement(A.Z,Object.assign({},qe,{placement:Ae==="rtl"?"left":"right",classNames:{root:`${we}-inline-collapsed-tooltip`}}),ot)),ot},O=m(78857),re=m(36237),oe=m(17835),ie=m(63356),Ee=m(34961),Me=m(46e3),ke=m(34925),tt=m(16931),ue=m(51636),L=Ce=>{const{componentCls:B,motionDurationSlow:P,horizontalLineHeight:ce,colorSplit:ve,lineWidth:de,lineType:ye,itemPaddingInline:Te}=Ce;return{[`${B}-horizontal`]:{lineHeight:ce,border:0,borderBottom:`${(0,re.unit)(de)} ${ye} ${ve}`,boxShadow:"none","&::after":{display:"block",clear:"both",height:0,content:'"\\20"'},[`${B}-item, ${B}-submenu`]:{position:"relative",display:"inline-block",verticalAlign:"bottom",paddingInline:Te},[`> ${B}-item:hover,
|
|
|
> ${B}-item-active,
|
|
|
> ${B}-submenu ${B}-submenu-title:hover`]:{backgroundColor:"transparent"},[`${B}-item, ${B}-submenu-title`]:{transition:[`border-color ${P}`,`background ${P}`].join(",")},[`${B}-submenu-arrow`]:{display:"none"}}}},Q=Ce=>{let{componentCls:B,menuArrowOffset:P,calc:ce}=Ce;return{[`${B}-rtl`]:{direction:"rtl"},[`${B}-submenu-rtl`]:{transformOrigin:"100% 0"},[`${B}-rtl${B}-vertical,
|
|
|
${B}-submenu-rtl ${B}-vertical`]:{[`${B}-submenu-arrow`]:{"&::before":{transform:`rotate(-45deg) translateY(${(0,re.unit)(ce(P).mul(-1).equal())})`},"&::after":{transform:`rotate(45deg) translateY(${(0,re.unit)(P)})`}}}}};const V=Ce=>Object.assign({},(0,ie.oN)(Ce));var w=(Ce,B)=>{const{componentCls:P,itemColor:ce,itemSelectedColor:ve,subMenuItemSelectedColor:de,groupTitleColor:ye,itemBg:Te,subMenuItemBg:we,itemSelectedBg:Ie,activeBarHeight:Ae,activeBarWidth:Xe,activeBarBorderWidth:gt,motionDurationSlow:ht,motionEaseInOut:nt,motionEaseOut:Oe,itemPaddingInline:qe,motionDurationMid:rt,itemHoverColor:ot,lineType:Rt,colorSplit:S,itemDisabledColor:R,dangerItemColor:Ze,dangerItemHoverColor:J,dangerItemSelectedColor:be,dangerItemActiveBg:zt,dangerItemSelectedBg:ze,popupBg:Qe,itemHoverBg:lt,itemActiveBg:le,menuSubMenuBg:pe,horizontalItemSelectedColor:Pe,horizontalItemSelectedBg:$e,horizontalItemBorderRadius:G,horizontalItemHoverBg:bt}=Ce;return{[`${P}-${B}, ${P}-${B} > ${P}`]:{color:ce,background:Te,[`&${P}-root:focus-visible`]:Object.assign({},V(Ce)),[`${P}-item`]:{"&-group-title, &-extra":{color:ye}},[`${P}-submenu-selected > ${P}-submenu-title`]:{color:de},[`${P}-item, ${P}-submenu-title`]:{color:ce,[`&:not(${P}-item-disabled):focus-visible`]:Object.assign({},V(Ce))},[`${P}-item-disabled, ${P}-submenu-disabled`]:{color:`${R} !important`},[`${P}-item:not(${P}-item-selected):not(${P}-submenu-selected)`]:{[`&:hover, > ${P}-submenu-title:hover`]:{color:ot}},[`&:not(${P}-horizontal)`]:{[`${P}-item:not(${P}-item-selected)`]:{"&:hover":{backgroundColor:lt},"&:active":{backgroundColor:le}},[`${P}-submenu-title`]:{"&:hover":{backgroundColor:lt},"&:active":{backgroundColor:le}}},[`${P}-item-danger`]:{color:Ze,[`&${P}-item:hover`]:{[`&:not(${P}-item-selected):not(${P}-submenu-selected)`]:{color:J}},[`&${P}-item:active`]:{background:zt}},[`${P}-item a`]:{"&, &:hover":{color:"inherit"}},[`${P}-item-selected`]:{color:ve,[`&${P}-item-danger`]:{color:be},"a, a:hover":{color:"inherit"}},[`& ${P}-item-selected`]:{backgroundColor:Ie,[`&${P}-item-danger`]:{backgroundColor:ze}},[`&${P}-submenu > ${P}`]:{backgroundColor:pe},[`&${P}-popup > ${P}`]:{backgroundColor:Qe},[`&${P}-submenu-popup > ${P}`]:{backgroundColor:Qe},[`&${P}-horizontal`]:Object.assign(Object.assign({},B==="dark"?{borderBottom:0}:{}),{[`> ${P}-item, > ${P}-submenu`]:{top:gt,marginTop:Ce.calc(gt).mul(-1).equal(),marginBottom:0,borderRadius:G,"&::after":{position:"absolute",insetInline:qe,bottom:0,borderBottom:`${(0,re.unit)(Ae)} solid transparent`,transition:`border-color ${ht} ${nt}`,content:'""'},"&:hover, &-active, &-open":{background:bt,"&::after":{borderBottomWidth:Ae,borderBottomColor:Pe}},"&-selected":{color:Pe,backgroundColor:$e,"&:hover":{backgroundColor:$e},"&::after":{borderBottomWidth:Ae,borderBottomColor:Pe}}}}),[`&${P}-root`]:{[`&${P}-inline, &${P}-vertical`]:{borderInlineEnd:`${(0,re.unit)(gt)} ${Rt} ${S}`}},[`&${P}-inline`]:{[`${P}-sub${P}-inline`]:{background:we},[`${P}-item`]:{position:"relative","&::after":{position:"absolute",insetBlock:0,insetInlineEnd:0,borderInlineEnd:`${(0,re.unit)(Xe)} solid ${ve}`,transform:"scaleY(0.0001)",opacity:0,transition:[`transform ${rt} ${Oe}`,`opacity ${rt} ${Oe}`].join(","),content:'""'},[`&${P}-item-danger`]:{"&::after":{borderInlineEndColor:be}}},[`${P}-selected, ${P}-item-selected`]:{"&::after":{transform:"scaleY(1)",opacity:1,transition:[`transform ${rt} ${nt}`,`opacity ${rt} ${nt}`].join(",")}}}}}};const H=Ce=>{const{componentCls:B,itemHeight:P,itemMarginInline:ce,padding:ve,menuArrowSize:de,marginXS:ye,itemMarginBlock:Te,itemWidth:we,itemPaddingInline:Ie}=Ce,Ae=Ce.calc(de).add(ve).add(ye).equal();return{[`${B}-item`]:{position:"relative",overflow:"hidden"},[`${B}-item, ${B}-submenu-title`]:{height:P,lineHeight:(0,re.unit)(P),paddingInline:Ie,overflow:"hidden",textOverflow:"ellipsis",marginInline:ce,marginBlock:Te,width:we},[`> ${B}-item,
|
|
|
> ${B}-submenu > ${B}-submenu-title`]:{height:P,lineHeight:(0,re.unit)(P)},[`${B}-item-group-list ${B}-submenu-title,
|
|
|
${B}-submenu-title`]:{paddingInlineEnd:Ae}}};var Ke=Ce=>{const{componentCls:B,iconCls:P,itemHeight:ce,colorTextLightSolid:ve,dropdownWidth:de,controlHeightLG:ye,motionEaseOut:Te,paddingXL:we,itemMarginInline:Ie,fontSizeLG:Ae,motionDurationFast:Xe,motionDurationSlow:gt,paddingXS:ht,boxShadowSecondary:nt,collapsedWidth:Oe,collapsedIconSize:qe}=Ce,rt={height:ce,lineHeight:(0,re.unit)(ce),listStylePosition:"inside",listStyleType:"disc"};return[{[B]:{"&-inline, &-vertical":Object.assign({[`&${B}-root`]:{boxShadow:"none"}},H(Ce))},[`${B}-submenu-popup`]:{[`${B}-vertical`]:Object.assign(Object.assign({},H(Ce)),{boxShadow:nt})}},{[`${B}-submenu-popup ${B}-vertical${B}-sub`]:{minWidth:de,maxHeight:`calc(100vh - ${(0,re.unit)(Ce.calc(ye).mul(2.5).equal())})`,padding:"0",overflow:"hidden",borderInlineEnd:0,"&:not([class*='-active'])":{overflowX:"hidden",overflowY:"auto"}}},{[`${B}-inline`]:{width:"100%",[`&${B}-root`]:{[`${B}-item, ${B}-submenu-title`]:{display:"flex",alignItems:"center",transition:[`border-color ${gt}`,`background ${gt}`,`padding ${Xe} ${Te}`].join(","),[`> ${B}-title-content`]:{flex:"auto",minWidth:0,overflow:"hidden",textOverflow:"ellipsis"},"> *":{flex:"none"}}},[`${B}-sub${B}-inline`]:{padding:0,border:0,borderRadius:0,boxShadow:"none",[`& > ${B}-submenu > ${B}-submenu-title`]:rt,[`& ${B}-item-group-title`]:{paddingInlineStart:we}},[`${B}-item`]:rt}},{[`${B}-inline-collapsed`]:{width:Oe,[`&${B}-root`]:{[`${B}-item, ${B}-submenu ${B}-submenu-title`]:{[`> ${B}-inline-collapsed-noicon`]:{fontSize:Ae,textAlign:"center"}}},[`> ${B}-item,
|
|
|
> ${B}-item-group > ${B}-item-group-list > ${B}-item,
|
|
|
> ${B}-item-group > ${B}-item-group-list > ${B}-submenu > ${B}-submenu-title,
|
|
|
> ${B}-submenu > ${B}-submenu-title`]:{insetInlineStart:0,paddingInline:`calc(50% - ${(0,re.unit)(Ce.calc(qe).div(2).equal())} - ${(0,re.unit)(Ie)})`,textOverflow:"clip",[`
|
|
|
${B}-submenu-arrow,
|
|
|
${B}-submenu-expand-icon
|
|
|
`]:{opacity:0},[`${B}-item-icon, ${P}`]:{margin:0,fontSize:qe,lineHeight:(0,re.unit)(ce),"+ span":{display:"inline-block",opacity:0}}},[`${B}-item-icon, ${P}`]:{display:"inline-block"},"&-tooltip":{pointerEvents:"none",[`${B}-item-icon, ${P}`]:{display:"none"},"a, a:hover":{color:ve}},[`${B}-item-group-title`]:Object.assign(Object.assign({},ie.vS),{paddingInline:ht})}}]};const ft=Ce=>{const{componentCls:B,motionDurationSlow:P,motionDurationMid:ce,motionEaseInOut:ve,motionEaseOut:de,iconCls:ye,iconSize:Te,iconMarginInlineEnd:we}=Ce;return{[`${B}-item, ${B}-submenu-title`]:{position:"relative",display:"block",margin:0,whiteSpace:"nowrap",cursor:"pointer",transition:[`border-color ${P}`,`background ${P}`,`padding calc(${P} + 0.1s) ${ve}`].join(","),[`${B}-item-icon, ${ye}`]:{minWidth:Te,fontSize:Te,transition:[`font-size ${ce} ${de}`,`margin ${P} ${ve}`,`color ${P}`].join(","),"+ span":{marginInlineStart:we,opacity:1,transition:[`opacity ${P} ${ve}`,`margin ${P}`,`color ${P}`].join(",")}},[`${B}-item-icon`]:Object.assign({},(0,ie.Ro)()),[`&${B}-item-only-child`]:{[`> ${ye}, > ${B}-item-icon`]:{marginInlineEnd:0}}},[`${B}-item-disabled, ${B}-submenu-disabled`]:{background:"none !important",cursor:"not-allowed","&::after":{borderColor:"transparent !important"},a:{color:"inherit !important",cursor:"not-allowed",pointerEvents:"none"},[`> ${B}-submenu-title`]:{color:"inherit !important",cursor:"not-allowed"}}}},Ue=Ce=>{const{componentCls:B,motionDurationSlow:P,motionEaseInOut:ce,borderRadius:ve,menuArrowSize:de,menuArrowOffset:ye}=Ce;return{[`${B}-submenu`]:{"&-expand-icon, &-arrow":{position:"absolute",top:"50%",insetInlineEnd:Ce.margin,width:de,color:"currentcolor",transform:"translateY(-50%)",transition:`transform ${P} ${ce}, opacity ${P}`},"&-arrow":{"&::before, &::after":{position:"absolute",width:Ce.calc(de).mul(.6).equal(),height:Ce.calc(de).mul(.15).equal(),backgroundColor:"currentcolor",borderRadius:ve,transition:[`background ${P} ${ce}`,`transform ${P} ${ce}`,`top ${P} ${ce}`,`color ${P} ${ce}`].join(","),content:'""'},"&::before":{transform:`rotate(45deg) translateY(${(0,re.unit)(Ce.calc(ye).mul(-1).equal())})`},"&::after":{transform:`rotate(-45deg) translateY(${(0,re.unit)(ye)})`}}}}},st=Ce=>{const{antCls:B,componentCls:P,fontSize:ce,motionDurationSlow:ve,motionDurationMid:de,motionEaseInOut:ye,paddingXS:Te,padding:we,colorSplit:Ie,lineWidth:Ae,zIndexPopup:Xe,borderRadiusLG:gt,subMenuItemBorderRadius:ht,menuArrowSize:nt,menuArrowOffset:Oe,lineType:qe,groupTitleLineHeight:rt,groupTitleFontSize:ot}=Ce;return[{"":{[P]:Object.assign(Object.assign({},(0,ie.dF)()),{"&-hidden":{display:"none"}})},[`${P}-submenu-hidden`]:{display:"none"}},{[P]:Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({},(0,ie.Wf)(Ce)),(0,ie.dF)()),{marginBottom:0,paddingInlineStart:0,fontSize:ce,lineHeight:0,listStyle:"none",outline:"none",transition:`width ${ve} cubic-bezier(0.2, 0, 0, 1) 0s`,"ul, ol":{margin:0,padding:0,listStyle:"none"},"&-overflow":{display:"flex",[`${P}-item`]:{flex:"none"}},[`${P}-item, ${P}-submenu, ${P}-submenu-title`]:{borderRadius:Ce.itemBorderRadius},[`${P}-item-group-title`]:{padding:`${(0,re.unit)(Te)} ${(0,re.unit)(we)}`,fontSize:ot,lineHeight:rt,transition:`all ${ve}`},[`&-horizontal ${P}-submenu`]:{transition:[`border-color ${ve} ${ye}`,`background ${ve} ${ye}`].join(",")},[`${P}-submenu, ${P}-submenu-inline`]:{transition:[`border-color ${ve} ${ye}`,`background ${ve} ${ye}`,`padding ${de} ${ye}`].join(",")},[`${P}-submenu ${P}-sub`]:{cursor:"initial",transition:[`background ${ve} ${ye}`,`padding ${ve} ${ye}`].join(",")},[`${P}-title-content`]:{transition:`color ${ve}`,"&-with-extra":{display:"inline-flex",alignItems:"center",width:"100%"},[`> ${B}-typography-ellipsis-single-line`]:{display:"inline",verticalAlign:"unset"},[`${P}-item-extra`]:{marginInlineStart:"auto",paddingInlineStart:Ce.padding}},[`${P}-item a`]:{"&::before":{position:"absolute",inset:0,backgroundColor:"transparent",content:'""'}},[`${P}-item-divider`]:{overflow:"hidden",lineHeight:0,borderColor:Ie,borderStyle:qe,borderWidth:0,borderTopWidth:Ae,marginBlock:Ae,padding:0,"&-dashed":{borderStyle:"dashed"}}}),ft(Ce)),{[`${P}-item-group`]:{[`${P}-item-group-list`]:{margin:0,padding:0,[`${P}-item, ${P}-submenu-title`]:{paddingInline:`${(0,re.unit)(Ce.calc(ce).mul(2).equal())} ${(0,re.unit)(we)}`}}},"&-submenu":{"&-popup":{position:"absolute",zIndex:Xe,borderRadius:gt,boxShadow:"none",transformOrigin:"0 0",[`&${P}-submenu`]:{background:"transparent"},"&::before":{position:"absolute",inset:0,zIndex:-1,width:"100%",height:"100%",opacity:0,content:'""'},[`> ${P}`]:Object.assign(Object.assign(Object.assign({borderRadius:gt},ft(Ce)),Ue(Ce)),{[`${P}-item, ${P}-submenu > ${P}-submenu-title`]:{borderRadius:ht},[`${P}-submenu-title::after`]:{transition:`transform ${ve} ${ye}`}})},"\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:Ce.paddingXS},"\n &-placement-rightTop,\n &-placement-rightBottom\n ":{paddingInlineStart:Ce.paddingXS},"\n &-placement-topRight,\n &-placement-topLeft\n ":{paddingBottom:Ce.paddingXS},"\n &-placement-bottomRight,\n &-placement-bottomLeft\n ":{paddingTop:Ce.paddingXS}}}),Ue(Ce)),{[`&-inline-collapsed ${P}-submenu-arrow,
|
|
|
&-inline ${P}-submenu-arrow`]:{"&::before":{transform:`rotate(-45deg) translateX(${(0,re.unit)(Oe)})`},"&::after":{transform:`rotate(45deg) translateX(${(0,re.unit)(Ce.calc(Oe).mul(-1).equal())})`}},[`${P}-submenu-open${P}-submenu-inline > ${P}-submenu-title > ${P}-submenu-arrow`]:{transform:`translateY(${(0,re.unit)(Ce.calc(nt).mul(.2).mul(-1).equal())})`,"&::after":{transform:`rotate(-45deg) translateX(${(0,re.unit)(Ce.calc(Oe).mul(-1).equal())})`},"&::before":{transform:`rotate(45deg) translateX(${(0,re.unit)(Oe)})`}}})},{[`${B}-layout-header`]:{[P]:{lineHeight:"inherit"}}}]},pt=Ce=>{var B,P,ce;const{colorPrimary:ve,colorError:de,colorTextDisabled:ye,colorErrorBg:Te,colorText:we,colorTextDescription:Ie,colorBgContainer:Ae,colorFillAlter:Xe,colorFillContent:gt,lineWidth:ht,lineWidthBold:nt,controlItemBgActive:Oe,colorBgTextHover:qe,controlHeightLG:rt,lineHeight:ot,colorBgElevated:Rt,marginXXS:S,padding:R,fontSize:Ze,controlHeightSM:J,fontSizeLG:be,colorTextLightSolid:zt,colorErrorHover:ze}=Ce,Qe=(B=Ce.activeBarWidth)!==null&&B!==void 0?B:0,lt=(P=Ce.activeBarBorderWidth)!==null&&P!==void 0?P:ht,le=(ce=Ce.itemMarginInline)!==null&&ce!==void 0?ce:Ce.marginXXS,pe=new oe.FastColor(zt).setA(.65).toRgbString();return{dropdownWidth:160,zIndexPopup:Ce.zIndexPopupBase+50,radiusItem:Ce.borderRadiusLG,itemBorderRadius:Ce.borderRadiusLG,radiusSubMenuItem:Ce.borderRadiusSM,subMenuItemBorderRadius:Ce.borderRadiusSM,colorItemText:we,itemColor:we,colorItemTextHover:we,itemHoverColor:we,colorItemTextHoverHorizontal:ve,horizontalItemHoverColor:ve,colorGroupTitle:Ie,groupTitleColor:Ie,colorItemTextSelected:ve,itemSelectedColor:ve,subMenuItemSelectedColor:ve,colorItemTextSelectedHorizontal:ve,horizontalItemSelectedColor:ve,colorItemBg:Ae,itemBg:Ae,colorItemBgHover:qe,itemHoverBg:qe,colorItemBgActive:gt,itemActiveBg:Oe,colorSubItemBg:Xe,subMenuItemBg:Xe,colorItemBgSelected:Oe,itemSelectedBg:Oe,colorItemBgSelectedHorizontal:"transparent",horizontalItemSelectedBg:"transparent",colorActiveBarWidth:0,activeBarWidth:Qe,colorActiveBarHeight:nt,activeBarHeight:nt,colorActiveBarBorderSize:ht,activeBarBorderWidth:lt,colorItemTextDisabled:ye,itemDisabledColor:ye,colorDangerItemText:de,dangerItemColor:de,colorDangerItemTextHover:de,dangerItemHoverColor:de,colorDangerItemTextSelected:de,dangerItemSelectedColor:de,colorDangerItemBgActive:Te,dangerItemActiveBg:Te,colorDangerItemBgSelected:Te,dangerItemSelectedBg:Te,itemMarginInline:le,horizontalItemBorderRadius:0,horizontalItemHoverBg:"transparent",itemHeight:rt,groupTitleLineHeight:ot,collapsedWidth:rt*2,popupBg:Rt,itemMarginBlock:S,itemPaddingInline:R,horizontalLineHeight:`${rt*1.15}px`,iconSize:Ze,iconMarginInlineEnd:J-Ze,collapsedIconSize:be,groupTitleFontSize:Ze,darkItemDisabledColor:new oe.FastColor(zt).setA(.25).toRgbString(),darkItemColor:pe,darkDangerItemColor:de,darkItemBg:"#001529",darkPopupBg:"#001529",darkSubMenuItemBg:"#000c17",darkItemSelectedColor:zt,darkItemSelectedBg:ve,darkDangerItemSelectedBg:de,darkItemHoverBg:"transparent",darkGroupTitleColor:pe,darkItemHoverColor:zt,darkDangerItemHoverColor:ze,darkDangerItemSelectedColor:zt,darkDangerItemActiveBg:de,itemWidth:Qe?`calc(100% + ${lt}px)`:`calc(100% - ${le*2}px)`}};var Et=function(Ce){let B=arguments.length>1&&arguments[1]!==void 0?arguments[1]:Ce,P=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!0;return(0,tt.I$)("Menu",ve=>{const{colorBgElevated:de,controlHeightLG:ye,fontSize:Te,darkItemColor:we,darkDangerItemColor:Ie,darkItemBg:Ae,darkSubMenuItemBg:Xe,darkItemSelectedColor:gt,darkItemSelectedBg:ht,darkDangerItemSelectedBg:nt,darkItemHoverBg:Oe,darkGroupTitleColor:qe,darkItemHoverColor:rt,darkItemDisabledColor:ot,darkDangerItemHoverColor:Rt,darkDangerItemSelectedColor:S,darkDangerItemActiveBg:R,popupBg:Ze,darkPopupBg:J}=ve,be=ve.calc(Te).div(7).mul(5).equal(),zt=(0,ue.mergeToken)(ve,{menuArrowSize:be,menuHorizontalHeight:ve.calc(ye).mul(1.15).equal(),menuArrowOffset:ve.calc(be).mul(.25).equal(),menuSubMenuBg:de,calc:ve.calc,popupBg:Ze}),ze=(0,ue.mergeToken)(zt,{itemColor:we,itemHoverColor:rt,groupTitleColor:qe,itemSelectedColor:gt,subMenuItemSelectedColor:gt,itemBg:Ae,popupBg:J,subMenuItemBg:Xe,itemActiveBg:"transparent",itemSelectedBg:ht,activeBarHeight:0,activeBarBorderWidth:0,itemHoverBg:Oe,itemDisabledColor:ot,dangerItemColor:Ie,dangerItemHoverColor:Rt,dangerItemSelectedColor:S,dangerItemActiveBg:R,dangerItemSelectedBg:nt,menuSubMenuBg:Xe,horizontalItemSelectedColor:gt,horizontalItemSelectedBg:ht});return[st(zt),L(zt),Ke(zt),w(zt,"light"),w(ze,"dark"),Q(zt),(0,Ee.Z)(zt),(0,Me.oN)(zt,"slide-up"),(0,Me.oN)(zt,"slide-down"),(0,ke._y)(zt,"zoom-big")]},pt,{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"]],injectStyle:P,unitless:{groupTitleLineHeight:!0}})(Ce,B)},Ne=m(75030),at=Ce=>{var B;const{popupClassName:P,icon:ce,title:ve,theme:de}=Ce,ye=v.useContext(T),{prefixCls:Te,inlineCollapsed:we,theme:Ie}=ye,Ae=(0,ae.Xl)();let Xe;if(!ce)Xe=we&&!Ae.length&&ve&&typeof ve=="string"?v.createElement("div",{className:`${Te}-inline-collapsed-noicon`},ve.charAt(0)):v.createElement("span",{className:`${Te}-title-content`},ve);else{const nt=v.isValidElement(ve)&&ve.type==="span";Xe=v.createElement(v.Fragment,null,(0,C.Tm)(ce,{className:g()(v.isValidElement(ce)?(B=ce.props)===null||B===void 0?void 0:B.className:"",`${Te}-item-icon`)}),nt?ve:v.createElement("span",{className:`${Te}-title-content`},ve))}const gt=v.useMemo(()=>Object.assign(Object.assign({},ye),{firstLevel:!1}),[ye]),[ht]=(0,Ne.Cn)("Menu");return v.createElement(T.Provider,{value:gt},v.createElement(ae.Wd,Object.assign({},(0,te.Z)(Ce,["icon"]),{title:Xe,popupClassName:g()(Te,P,`${Te}-${de||Ie}`),popupStyle:Object.assign({zIndex:ht},Ce.popupStyle)})))},Nt=function(Ce,B){var P={};for(var ce in Ce)Object.prototype.hasOwnProperty.call(Ce,ce)&&B.indexOf(ce)<0&&(P[ce]=Ce[ce]);if(Ce!=null&&typeof Object.getOwnPropertySymbols=="function")for(var ve=0,ce=Object.getOwnPropertySymbols(Ce);ve<ce.length;ve++)B.indexOf(ce[ve])<0&&Object.prototype.propertyIsEnumerable.call(Ce,ce[ve])&&(P[ce[ve]]=Ce[ce[ve]]);return P};function Ge(Ce){return Ce===null||Ce===!1}const je={item:D,submenu:at,divider:Z};var _e=(0,v.forwardRef)((Ce,B)=>{var P;const ce=v.useContext(O.Z),ve=ce||{},{getPrefixCls:de,getPopupContainer:ye,direction:Te,menu:we}=v.useContext(M.E_),Ie=de(),{prefixCls:Ae,className:Xe,style:gt,theme:ht="light",expandIcon:nt,_internalDisableMenuItemTitleTooltip:Oe,inlineCollapsed:qe,siderCollapsed:rt,rootClassName:ot,mode:Rt,selectable:S,onClick:R,overflowedIndicatorPopupClassName:Ze}=Ce,J=Nt(Ce,["prefixCls","className","style","theme","expandIcon","_internalDisableMenuItemTitleTooltip","inlineCollapsed","siderCollapsed","rootClassName","mode","selectable","onClick","overflowedIndicatorPopupClassName"]),be=(0,te.Z)(J,["collapsedWidth"]);(P=ve.validator)===null||P===void 0||P.call(ve,{mode:Rt});const zt=(0,q.Z)(function(){var dn;R==null||R.apply(void 0,arguments),(dn=ve.onClick)===null||dn===void 0||dn.call(ve)}),ze=ve.mode||Rt,Qe=S!=null?S:ve.selectable,lt=qe!=null?qe:rt,le={horizontal:{motionName:`${Ie}-slide-up`},inline:(0,o.Z)(Ie),other:{motionName:`${Ie}-zoom-big`}},pe=de("menu",Ae||ve.prefixCls),Pe=(0,y.Z)(pe),[$e,G,bt]=Et(pe,Pe,!ce),xe=g()(`${pe}-${ht}`,we==null?void 0:we.className,Xe),Bt=v.useMemo(()=>{var dn,Hn;if(typeof nt=="function"||Ge(nt))return nt||null;if(typeof ve.expandIcon=="function"||Ge(ve.expandIcon))return ve.expandIcon||null;if(typeof(we==null?void 0:we.expandIcon)=="function"||Ge(we==null?void 0:we.expandIcon))return(we==null?void 0:we.expandIcon)||null;const wt=(dn=nt!=null?nt:ve==null?void 0:ve.expandIcon)!==null&&dn!==void 0?dn:we==null?void 0:we.expandIcon;return(0,C.Tm)(wt,{className:g()(`${pe}-submenu-expand-icon`,v.isValidElement(wt)?(Hn=wt.props)===null||Hn===void 0?void 0:Hn.className:void 0)})},[nt,ve==null?void 0:ve.expandIcon,we==null?void 0:we.expandIcon,pe]),en=v.useMemo(()=>({prefixCls:pe,inlineCollapsed:lt||!1,direction:Te,firstLevel:!0,theme:ht,mode:ze,disableMenuItemTitleTooltip:Oe}),[pe,lt,Te,Oe,ht]);return $e(v.createElement(O.Z.Provider,{value:null},v.createElement(T.Provider,{value:en},v.createElement(ae.ZP,Object.assign({getPopupContainer:ye,overflowedIndicator:v.createElement(fe.Z,null),overflowedIndicatorPopupClassName:g()(pe,`${pe}-${ht}`,Ze),mode:ze,selectable:Qe,onClick:zt},be,{inlineCollapsed:lt,style:Object.assign(Object.assign({},we==null?void 0:we.style),gt),className:xe,prefixCls:pe,direction:Te,defaultMotions:le,expandIcon:Bt,ref:B,rootClassName:g()(ot,G,ve.rootClassName,bt,Pe),_internalComponents:je})))))});const Y=(0,v.forwardRef)((Ce,B)=>{const P=(0,v.useRef)(null),ce=v.useContext(W.D);return(0,v.useImperativeHandle)(B,()=>({menu:P.current,focus:ve=>{var de;(de=P.current)===null||de===void 0||de.focus(ve)}})),v.createElement(_e,Object.assign({ref:P},Ce,ce))});Y.Item=D,Y.SubMenu=at,Y.Divider=Z,Y.ItemGroup=ae.BW;var Le=Y},69106:function(ln,mt,m){"use strict";m.d(mt,{aV:function(){return o},t5:function(){return C}});var v=m(59301),ae=m(92310),W=m.n(ae),fe=m(29125),z=m(54500),g=m(48755),q=m(85074),te=function(y,E){var T={};for(var k in y)Object.prototype.hasOwnProperty.call(y,k)&&E.indexOf(k)<0&&(T[k]=y[k]);if(y!=null&&typeof Object.getOwnPropertySymbols=="function")for(var j=0,k=Object.getOwnPropertySymbols(y);j<k.length;j++)E.indexOf(k[j])<0&&Object.prototype.propertyIsEnumerable.call(y,k[j])&&(T[k[j]]=y[k[j]]);return T};const o=y=>{let{title:E,content:T,prefixCls:k}=y;return!E&&!T?null:v.createElement(v.Fragment,null,E&&v.createElement("div",{className:`${k}-title`},E),T&&v.createElement("div",{className:`${k}-inner-content`},T))},C=y=>{const{hashId:E,prefixCls:T,className:k,style:j,placement:Z="top",title:U,content:A,children:K}=y,D=(0,z.Z)(U),O=(0,z.Z)(A),re=W()(E,T,`${T}-pure`,`${T}-placement-${Z}`,k);return v.createElement("div",{className:re,style:j},v.createElement("div",{className:`${T}-arrow`}),v.createElement(fe.G,Object.assign({},y,{className:E,prefixCls:T}),K||v.createElement(o,{prefixCls:T,title:D,content:O})))},M=y=>{const{prefixCls:E,className:T}=y,k=te(y,["prefixCls","className"]),{getPrefixCls:j}=v.useContext(g.E_),Z=j("popover",E),[U,A,K]=(0,q.Z)(Z);return U(v.createElement(C,Object.assign({},k,{prefixCls:Z,hashId:A,className:W()(T,K)})))};mt.ZP=M},37639:function(ln,mt,m){"use strict";var v=m(59301),ae=m(92310),W=m.n(ae),fe=m(18929),z=m(10228),g=m(54500),q=m(86641),te=m(22703),o=m(25399),C=m(69106),M=m(48755),y=m(85074),E=function(j,Z){var U={};for(var A in j)Object.prototype.hasOwnProperty.call(j,A)&&Z.indexOf(A)<0&&(U[A]=j[A]);if(j!=null&&typeof Object.getOwnPropertySymbols=="function")for(var K=0,A=Object.getOwnPropertySymbols(j);K<A.length;K++)Z.indexOf(A[K])<0&&Object.prototype.propertyIsEnumerable.call(j,A[K])&&(U[A[K]]=j[A[K]]);return U};const k=v.forwardRef((j,Z)=>{var U,A;const{prefixCls:K,title:D,content:O,overlayClassName:re,placement:oe="top",trigger:ie="hover",children:Ee,mouseEnterDelay:Me=.1,mouseLeaveDelay:ke=.1,onOpenChange:tt,overlayStyle:ue={},styles:X,classNames:L}=j,se=E(j,["prefixCls","title","content","overlayClassName","placement","trigger","children","mouseEnterDelay","mouseLeaveDelay","onOpenChange","overlayStyle","styles","classNames"]),{getPrefixCls:Q,className:V,style:x,classNames:w,styles:H}=(0,M.dj)("popover"),he=Q("popover",K),[Ke,ft,Ue]=(0,y.Z)(he),st=Q(),pt=W()(re,ft,Ue,V,w.root,L==null?void 0:L.root),Et=W()(w.body,L==null?void 0:L.body),[Ne,St]=(0,fe.Z)(!1,{value:(U=j.open)!==null&&U!==void 0?U:j.visible,defaultValue:(A=j.defaultOpen)!==null&&A!==void 0?A:j.defaultVisible}),at=(_e,Y)=>{St(_e,!0),tt==null||tt(_e,Y)},Nt=_e=>{_e.keyCode===z.Z.ESC&&at(!1,_e)},Ge=_e=>{at(_e)},je=(0,g.Z)(D),Re=(0,g.Z)(O);return Ke(v.createElement(o.Z,Object.assign({placement:oe,trigger:ie,mouseEnterDelay:Me,mouseLeaveDelay:ke},se,{prefixCls:he,classNames:{root:pt,body:Et},styles:{root:Object.assign(Object.assign(Object.assign(Object.assign({},H.root),x),ue),X==null?void 0:X.root),body:Object.assign(Object.assign({},H.body),X==null?void 0:X.body)},ref:Z,open:Ne,onOpenChange:Ge,overlay:je||Re?v.createElement(C.aV,{prefixCls:he,title:je,content:Re}):null,transitionName:(0,q.m)(st,"zoom-big",se.transitionName),"data-popover-inject":!0}),(0,te.Tm)(Ee,{onKeyDown:_e=>{var Y,Le;v.isValidElement(Ee)&&((Le=Ee==null?void 0:(Y=Ee.props).onKeyDown)===null||Le===void 0||Le.call(Y,_e)),Nt(_e)}})))});k._InternalPanelDoNotUseOrYouWillBeFired=C.ZP,mt.Z=k},85074:function(ln,mt,m){"use strict";var v=m(63356),ae=m(34925),W=m(37645),fe=m(36305),z=m(34998),g=m(16931),q=m(51636);const te=M=>{const{componentCls:y,popoverColor:E,titleMinWidth:T,fontWeightStrong:k,innerPadding:j,boxShadowSecondary:Z,colorTextHeading:U,borderRadiusLG:A,zIndexPopup:K,titleMarginBottom:D,colorBgElevated:O,popoverBg:re,titleBorderBottom:oe,innerContentPadding:ie,titlePadding:Ee}=M;return[{[y]:Object.assign(Object.assign({},(0,v.Wf)(M)),{position:"absolute",top:0,left:{_skip_check_:!0,value:0},zIndex:K,fontWeight:"normal",whiteSpace:"normal",textAlign:"start",cursor:"auto",userSelect:"text","--valid-offset-x":"var(--arrow-offset-horizontal, var(--arrow-x))",transformOrigin:["var(--valid-offset-x, 50%)","var(--arrow-y, 50%)"].join(" "),"--antd-arrow-background-color":O,width:"max-content",maxWidth:"100vw","&-rtl":{direction:"rtl"},"&-hidden":{display:"none"},[`${y}-content`]:{position:"relative"},[`${y}-inner`]:{backgroundColor:re,backgroundClip:"padding-box",borderRadius:A,boxShadow:Z,padding:j},[`${y}-title`]:{minWidth:T,marginBottom:D,color:U,fontWeight:k,borderBottom:oe,padding:Ee},[`${y}-inner-content`]:{color:E,padding:ie}})},(0,W.ZP)(M,"var(--antd-arrow-background-color)"),{[`${y}-pure`]:{position:"relative",maxWidth:"none",margin:M.sizePopupArrow,display:"inline-block",[`${y}-content`]:{display:"inline-block"}}}]},o=M=>{const{componentCls:y}=M;return{[y]:z.i.map(E=>{const T=M[`${E}6`];return{[`&${y}-${E}`]:{"--antd-arrow-background-color":T,[`${y}-inner`]:{backgroundColor:T},[`${y}-arrow`]:{background:"transparent"}}}})}},C=M=>{const{lineWidth:y,controlHeight:E,fontHeight:T,padding:k,wireframe:j,zIndexPopupBase:Z,borderRadiusLG:U,marginXS:A,lineType:K,colorSplit:D,paddingSM:O}=M,re=E-T,oe=re/2,ie=re/2-y,Ee=k;return Object.assign(Object.assign(Object.assign({titleMinWidth:177,zIndexPopup:Z+30},(0,fe.w)(M)),(0,W.wZ)({contentRadius:U,limitVerticalRadius:!0})),{innerPadding:j?0:12,titleMarginBottom:j?0:A,titlePadding:j?`${oe}px ${Ee}px ${ie}px`:0,titleBorderBottom:j?`${y}px ${K} ${D}`:"none",innerContentPadding:j?`${O}px ${Ee}px`:0})};mt.Z=(0,g.I$)("Popover",M=>{const{colorBgElevated:y,colorText:E}=M,T=(0,q.mergeToken)(M,{popoverBg:y,popoverColor:E});return[te(T),o(T),(0,ae._y)(T,"zoom-big")]},C,{resetStyle:!1,deprecatedTokens:[["width","titleMinWidth"],["minWidth","titleMinWidth"]]})},1722:function(ln,mt){"use strict";const m=ae=>{const fe={overflow:{adjustX:!0,adjustY:!0,shiftY:!0},htmlRegion:ae==="scroll"?"scroll":"visible",dynamicInset:!0};return{bottomLeft:Object.assign(Object.assign({},fe),{points:["tl","bl"],offset:[0,4]}),bottomRight:Object.assign(Object.assign({},fe),{points:["tr","br"],offset:[0,4]}),topLeft:Object.assign(Object.assign({},fe),{points:["bl","tl"],offset:[0,-4]}),topRight:Object.assign(Object.assign({},fe),{points:["br","tr"],offset:[0,-4]})}};function v(ae,W){return ae||m(W)}mt.Z=v},90376:function(ln,mt,m){"use strict";m.d(mt,{Z:function(){return X}});var v=m(63356),ae=m(56119),W=m(16931),fe=m(51636),z=m(46e3),g=m(93873);const q=L=>{const{optionHeight:se,optionFontSize:Q,optionLineHeight:V,optionPadding:x}=L;return{position:"relative",display:"block",minHeight:se,padding:x,color:L.colorText,fontWeight:"normal",fontSize:Q,lineHeight:V,boxSizing:"border-box"}};var o=L=>{const{antCls:se,componentCls:Q}=L,V=`${Q}-item`,x=`&${se}-slide-up-enter${se}-slide-up-enter-active`,w=`&${se}-slide-up-appear${se}-slide-up-appear-active`,H=`&${se}-slide-up-leave${se}-slide-up-leave-active`,he=`${Q}-dropdown-placement-`,Ke=`${V}-option-selected`;return[{[`${Q}-dropdown`]:Object.assign(Object.assign({},(0,v.Wf)(L)),{position:"absolute",top:-9999,zIndex:L.zIndexPopup,boxSizing:"border-box",padding:L.paddingXXS,overflow:"hidden",fontSize:L.fontSize,fontVariant:"initial",backgroundColor:L.colorBgElevated,borderRadius:L.borderRadiusLG,outline:"none",boxShadow:L.boxShadowSecondary,[`
|
|
|
${x}${he}bottomLeft,
|
|
|
${w}${he}bottomLeft
|
|
|
`]:{animationName:z.fJ},[`
|
|
|
${x}${he}topLeft,
|
|
|
${w}${he}topLeft,
|
|
|
${x}${he}topRight,
|
|
|
${w}${he}topRight
|
|
|
`]:{animationName:z.Qt},[`${H}${he}bottomLeft`]:{animationName:z.Uw},[`
|
|
|
${H}${he}topLeft,
|
|
|
${H}${he}topRight
|
|
|
`]:{animationName:z.ly},"&-hidden":{display:"none"},[V]:Object.assign(Object.assign({},q(L)),{cursor:"pointer",transition:`background ${L.motionDurationSlow} ease`,borderRadius:L.borderRadiusSM,"&-group":{color:L.colorTextDescription,fontSize:L.fontSizeSM,cursor:"default"},"&-option":{display:"flex","&-content":Object.assign({flex:"auto"},v.vS),"&-state":{flex:"none",display:"flex",alignItems:"center"},[`&-active:not(${V}-option-disabled)`]:{backgroundColor:L.optionActiveBg},[`&-selected:not(${V}-option-disabled)`]:{color:L.optionSelectedColor,fontWeight:L.optionSelectedFontWeight,backgroundColor:L.optionSelectedBg,[`${V}-option-state`]:{color:L.colorPrimary}},"&-disabled":{[`&${V}-option-selected`]:{backgroundColor:L.colorBgContainerDisabled},color:L.colorTextDisabled,cursor:"not-allowed"},"&-grouped":{paddingInlineStart:L.calc(L.controlPaddingHorizontal).mul(2).equal()}},"&-empty":Object.assign(Object.assign({},q(L)),{color:L.colorTextDisabled})}),[`${Ke}:has(+ ${Ke})`]:{borderEndStartRadius:0,borderEndEndRadius:0,[`& + ${Ke}`]:{borderStartStartRadius:0,borderStartEndRadius:0}},"&-rtl":{direction:"rtl"}})},(0,z.oN)(L,"slide-up"),(0,z.oN)(L,"slide-down"),(0,g.Fm)(L,"move-up"),(0,g.Fm)(L,"move-down")]},C=m(26743),M=m(36237);function y(L,se){const{componentCls:Q,inputPaddingHorizontalBase:V,borderRadius:x}=L,w=L.calc(L.controlHeight).sub(L.calc(L.lineWidth).mul(2)).equal(),H=se?`${Q}-${se}`:"";return{[`${Q}-single${H}`]:{fontSize:L.fontSize,height:L.controlHeight,[`${Q}-selector`]:Object.assign(Object.assign({},(0,v.Wf)(L,!0)),{display:"flex",borderRadius:x,flex:"1 1 auto",[`${Q}-selection-wrap:after`]:{lineHeight:(0,M.unit)(w)},[`${Q}-selection-search`]:{position:"absolute",inset:0,width:"100%","&-input":{width:"100%",WebkitAppearance:"textfield"}},[`
|
|
|
${Q}-selection-item,
|
|
|
${Q}-selection-placeholder
|
|
|
`]:{display:"block",padding:0,lineHeight:(0,M.unit)(w),transition:`all ${L.motionDurationSlow}, visibility 0s`,alignSelf:"center"},[`${Q}-selection-placeholder`]:{transition:"none",pointerEvents:"none"},[["&:after",`${Q}-selection-item:empty:after`,`${Q}-selection-placeholder:empty:after`].join(",")]:{display:"inline-block",width:0,visibility:"hidden",content:'"\\a0"'}}),[`
|
|
|
&${Q}-show-arrow ${Q}-selection-item,
|
|
|
&${Q}-show-arrow ${Q}-selection-search,
|
|
|
&${Q}-show-arrow ${Q}-selection-placeholder
|
|
|
`]:{paddingInlineEnd:L.showArrowPaddingInlineEnd},[`&${Q}-open ${Q}-selection-item`]:{color:L.colorTextPlaceholder},[`&:not(${Q}-customize-input)`]:{[`${Q}-selector`]:{width:"100%",height:"100%",alignItems:"center",padding:`0 ${(0,M.unit)(V)}`,[`${Q}-selection-search-input`]:{height:w,fontSize:L.fontSize},"&:after":{lineHeight:(0,M.unit)(w)}}},[`&${Q}-customize-input`]:{[`${Q}-selector`]:{"&:after":{display:"none"},[`${Q}-selection-search`]:{position:"static",width:"100%"},[`${Q}-selection-placeholder`]:{position:"absolute",insetInlineStart:0,insetInlineEnd:0,padding:`0 ${(0,M.unit)(V)}`,"&:after":{display:"none"}}}}}}}function E(L){const{componentCls:se}=L,Q=L.calc(L.controlPaddingHorizontalSM).sub(L.lineWidth).equal();return[y(L),y((0,fe.mergeToken)(L,{controlHeight:L.controlHeightSM,borderRadius:L.borderRadiusSM}),"sm"),{[`${se}-single${se}-sm`]:{[`&:not(${se}-customize-input)`]:{[`${se}-selector`]:{padding:`0 ${(0,M.unit)(Q)}`},[`&${se}-show-arrow ${se}-selection-search`]:{insetInlineEnd:L.calc(Q).add(L.calc(L.fontSize).mul(1.5)).equal()},[`
|
|
|
&${se}-show-arrow ${se}-selection-item,
|
|
|
&${se}-show-arrow ${se}-selection-placeholder
|
|
|
`]:{paddingInlineEnd:L.calc(L.fontSize).mul(1.5).equal()}}}},y((0,fe.mergeToken)(L,{controlHeight:L.singleItemHeightLG,fontSize:L.fontSizeLG,borderRadius:L.borderRadiusLG}),"lg")]}const T=L=>{const{fontSize:se,lineHeight:Q,lineWidth:V,controlHeight:x,controlHeightSM:w,controlHeightLG:H,paddingXXS:he,controlPaddingHorizontal:Ke,zIndexPopupBase:ft,colorText:Ue,fontWeightStrong:st,controlItemBgActive:pt,controlItemBgHover:Et,colorBgContainer:Ne,colorFillSecondary:St,colorBgContainerDisabled:at,colorTextDisabled:Nt,colorPrimaryHover:Ge,colorPrimary:je,controlOutline:Re}=L,_e=he*2,Y=V*2,Le=Math.min(x-_e,x-Y),Ce=Math.min(w-_e,w-Y),B=Math.min(H-_e,H-Y);return{INTERNAL_FIXED_ITEM_MARGIN:Math.floor(he/2),zIndexPopup:ft+50,optionSelectedColor:Ue,optionSelectedFontWeight:st,optionSelectedBg:pt,optionActiveBg:Et,optionPadding:`${(x-se*Q)/2}px ${Ke}px`,optionFontSize:se,optionLineHeight:Q,optionHeight:x,selectorBg:Ne,clearBg:Ne,singleItemHeightLG:H,multipleItemBg:St,multipleItemBorderColor:"transparent",multipleItemHeight:Le,multipleItemHeightSM:Ce,multipleItemHeightLG:B,multipleSelectorBgDisabled:at,multipleItemColorDisabled:Nt,multipleItemBorderColorDisabled:"transparent",showArrowPaddingInlineEnd:Math.ceil(L.fontSize*1.25),hoverBorderColor:Ge,activeBorderColor:je,activeOutlineColor:Re,selectAffixPadding:he}},k=(L,se)=>{const{componentCls:Q,antCls:V,controlOutlineWidth:x}=L;return{[`&:not(${Q}-customize-input) ${Q}-selector`]:{border:`${(0,M.unit)(L.lineWidth)} ${L.lineType} ${se.borderColor}`,background:L.selectorBg},[`&:not(${Q}-disabled):not(${Q}-customize-input):not(${V}-pagination-size-changer)`]:{[`&:hover ${Q}-selector`]:{borderColor:se.hoverBorderHover},[`${Q}-focused& ${Q}-selector`]:{borderColor:se.activeBorderColor,boxShadow:`0 0 0 ${(0,M.unit)(x)} ${se.activeOutlineColor}`,outline:0},[`${Q}-prefix`]:{color:se.color}}}},j=(L,se)=>({[`&${L.componentCls}-status-${se.status}`]:Object.assign({},k(L,se))}),Z=L=>({"&-outlined":Object.assign(Object.assign(Object.assign(Object.assign({},k(L,{borderColor:L.colorBorder,hoverBorderHover:L.hoverBorderColor,activeBorderColor:L.activeBorderColor,activeOutlineColor:L.activeOutlineColor,color:L.colorText})),j(L,{status:"error",borderColor:L.colorError,hoverBorderHover:L.colorErrorHover,activeBorderColor:L.colorError,activeOutlineColor:L.colorErrorOutline,color:L.colorError})),j(L,{status:"warning",borderColor:L.colorWarning,hoverBorderHover:L.colorWarningHover,activeBorderColor:L.colorWarning,activeOutlineColor:L.colorWarningOutline,color:L.colorWarning})),{[`&${L.componentCls}-disabled`]:{[`&:not(${L.componentCls}-customize-input) ${L.componentCls}-selector`]:{background:L.colorBgContainerDisabled,color:L.colorTextDisabled}},[`&${L.componentCls}-multiple ${L.componentCls}-selection-item`]:{background:L.multipleItemBg,border:`${(0,M.unit)(L.lineWidth)} ${L.lineType} ${L.multipleItemBorderColor}`}})}),U=(L,se)=>{const{componentCls:Q,antCls:V}=L;return{[`&:not(${Q}-customize-input) ${Q}-selector`]:{background:se.bg,border:`${(0,M.unit)(L.lineWidth)} ${L.lineType} transparent`,color:se.color},[`&:not(${Q}-disabled):not(${Q}-customize-input):not(${V}-pagination-size-changer)`]:{[`&:hover ${Q}-selector`]:{background:se.hoverBg},[`${Q}-focused& ${Q}-selector`]:{background:L.selectorBg,borderColor:se.activeBorderColor,outline:0}}}},A=(L,se)=>({[`&${L.componentCls}-status-${se.status}`]:Object.assign({},U(L,se))}),K=L=>({"&-filled":Object.assign(Object.assign(Object.assign(Object.assign({},U(L,{bg:L.colorFillTertiary,hoverBg:L.colorFillSecondary,activeBorderColor:L.activeBorderColor,color:L.colorText})),A(L,{status:"error",bg:L.colorErrorBg,hoverBg:L.colorErrorBgHover,activeBorderColor:L.colorError,color:L.colorError})),A(L,{status:"warning",bg:L.colorWarningBg,hoverBg:L.colorWarningBgHover,activeBorderColor:L.colorWarning,color:L.colorWarning})),{[`&${L.componentCls}-disabled`]:{[`&:not(${L.componentCls}-customize-input) ${L.componentCls}-selector`]:{borderColor:L.colorBorder,background:L.colorBgContainerDisabled,color:L.colorTextDisabled}},[`&${L.componentCls}-multiple ${L.componentCls}-selection-item`]:{background:L.colorBgContainer,border:`${(0,M.unit)(L.lineWidth)} ${L.lineType} ${L.colorSplit}`}})}),D=L=>({"&-borderless":{[`${L.componentCls}-selector`]:{background:"transparent",border:`${(0,M.unit)(L.lineWidth)} ${L.lineType} transparent`},[`&${L.componentCls}-disabled`]:{[`&:not(${L.componentCls}-customize-input) ${L.componentCls}-selector`]:{color:L.colorTextDisabled}},[`&${L.componentCls}-multiple ${L.componentCls}-selection-item`]:{background:L.multipleItemBg,border:`${(0,M.unit)(L.lineWidth)} ${L.lineType} ${L.multipleItemBorderColor}`},[`&${L.componentCls}-status-error`]:{[`${L.componentCls}-prefix, ${L.componentCls}-selection-item`]:{color:L.colorError}},[`&${L.componentCls}-status-warning`]:{[`${L.componentCls}-prefix, ${L.componentCls}-selection-item`]:{color:L.colorWarning}}}}),O=(L,se)=>{const{componentCls:Q,antCls:V}=L;return{[`&:not(${Q}-customize-input) ${Q}-selector`]:{borderWidth:`0 0 ${(0,M.unit)(L.lineWidth)} 0`,borderStyle:`none none ${L.lineType} none`,borderColor:se.borderColor,background:L.selectorBg,borderRadius:0},[`&:not(${Q}-disabled):not(${Q}-customize-input):not(${V}-pagination-size-changer)`]:{[`&:hover ${Q}-selector`]:{borderColor:se.hoverBorderHover},[`${Q}-focused& ${Q}-selector`]:{borderColor:se.activeBorderColor,outline:0},[`${Q}-prefix`]:{color:se.color}}}},re=(L,se)=>({[`&${L.componentCls}-status-${se.status}`]:Object.assign({},O(L,se))}),oe=L=>({"&-underlined":Object.assign(Object.assign(Object.assign(Object.assign({},O(L,{borderColor:L.colorBorder,hoverBorderHover:L.hoverBorderColor,activeBorderColor:L.activeBorderColor,activeOutlineColor:L.activeOutlineColor,color:L.colorText})),re(L,{status:"error",borderColor:L.colorError,hoverBorderHover:L.colorErrorHover,activeBorderColor:L.colorError,activeOutlineColor:L.colorErrorOutline,color:L.colorError})),re(L,{status:"warning",borderColor:L.colorWarning,hoverBorderHover:L.colorWarningHover,activeBorderColor:L.colorWarning,activeOutlineColor:L.colorWarningOutline,color:L.colorWarning})),{[`&${L.componentCls}-disabled`]:{[`&:not(${L.componentCls}-customize-input) ${L.componentCls}-selector`]:{color:L.colorTextDisabled}},[`&${L.componentCls}-multiple ${L.componentCls}-selection-item`]:{background:L.multipleItemBg,border:`${(0,M.unit)(L.lineWidth)} ${L.lineType} ${L.multipleItemBorderColor}`}})});var Ee=L=>({[L.componentCls]:Object.assign(Object.assign(Object.assign(Object.assign({},Z(L)),K(L)),D(L)),oe(L))});const Me=L=>{const{componentCls:se}=L;return{position:"relative",transition:`all ${L.motionDurationMid} ${L.motionEaseInOut}`,input:{cursor:"pointer"},[`${se}-show-search&`]:{cursor:"text",input:{cursor:"auto",color:"inherit",height:"100%"}},[`${se}-disabled&`]:{cursor:"not-allowed",input:{cursor:"not-allowed"}}}},ke=L=>{const{componentCls:se}=L;return{[`${se}-selection-search-input`]:{margin:0,padding:0,background:"transparent",border:"none",outline:"none",appearance:"none",fontFamily:"inherit","&::-webkit-search-cancel-button":{display:"none",appearance:"none"}}}},tt=L=>{const{antCls:se,componentCls:Q,inputPaddingHorizontalBase:V,iconCls:x}=L;return{[Q]:Object.assign(Object.assign({},(0,v.Wf)(L)),{position:"relative",display:"inline-flex",cursor:"pointer",[`&:not(${Q}-customize-input) ${Q}-selector`]:Object.assign(Object.assign({},Me(L)),ke(L)),[`${Q}-selection-item`]:Object.assign(Object.assign({flex:1,fontWeight:"normal",position:"relative",userSelect:"none"},v.vS),{[`> ${se}-typography`]:{display:"inline"}}),[`${Q}-selection-placeholder`]:Object.assign(Object.assign({},v.vS),{flex:1,color:L.colorTextPlaceholder,pointerEvents:"none"}),[`${Q}-arrow`]:Object.assign(Object.assign({},(0,v.Ro)()),{position:"absolute",top:"50%",insetInlineStart:"auto",insetInlineEnd:V,height:L.fontSizeIcon,marginTop:L.calc(L.fontSizeIcon).mul(-1).div(2).equal(),color:L.colorTextQuaternary,fontSize:L.fontSizeIcon,lineHeight:1,textAlign:"center",pointerEvents:"none",display:"flex",alignItems:"center",transition:`opacity ${L.motionDurationSlow} ease`,[x]:{verticalAlign:"top",transition:`transform ${L.motionDurationSlow}`,"> svg":{verticalAlign:"top"},[`&:not(${Q}-suffix)`]:{pointerEvents:"auto"}},[`${Q}-disabled &`]:{cursor:"not-allowed"},"> *:not(:last-child)":{marginInlineEnd:8}}),[`${Q}-selection-wrap`]:{display:"flex",width:"100%",position:"relative",minWidth:0,"&:after":{content:'"\\a0"',width:0,overflow:"hidden"}},[`${Q}-prefix`]:{flex:"none",marginInlineEnd:L.selectAffixPadding},[`${Q}-clear`]:{position:"absolute",top:"50%",insetInlineStart:"auto",insetInlineEnd:V,zIndex:1,display:"inline-block",width:L.fontSizeIcon,height:L.fontSizeIcon,marginTop:L.calc(L.fontSizeIcon).mul(-1).div(2).equal(),color:L.colorTextQuaternary,fontSize:L.fontSizeIcon,fontStyle:"normal",lineHeight:1,textAlign:"center",textTransform:"none",cursor:"pointer",opacity:0,transition:`color ${L.motionDurationMid} ease, opacity ${L.motionDurationSlow} ease`,textRendering:"auto","&:before":{display:"block"},"&:hover":{color:L.colorTextTertiary}},[`&:hover ${Q}-clear`]:{opacity:1,background:L.colorBgBase,borderRadius:"50%"}}),[`${Q}-status`]:{"&-error, &-warning, &-success, &-validating":{[`&${Q}-has-feedback`]:{[`${Q}-clear`]:{insetInlineEnd:L.calc(V).add(L.fontSize).add(L.paddingXS).equal()}}}}}},ue=L=>{const{componentCls:se}=L;return[{[se]:{[`&${se}-in-form-item`]:{width:"100%"}}},tt(L),E(L),(0,C.ZP)(L),o(L),{[`${se}-rtl`]:{direction:"rtl"}},(0,ae.c)(L,{borderElCls:`${se}-selector`,focusElCls:`${se}-focused`})]};var X=(0,W.I$)("Select",(L,se)=>{let{rootPrefixCls:Q}=se;const V=(0,fe.mergeToken)(L,{rootPrefixCls:Q,inputPaddingHorizontalBase:L.calc(L.paddingSM).sub(1).equal(),multipleSelectItemHeight:L.multipleItemHeight,selectHeight:L.controlHeight});return[ue(V),Ee(V)]},T,{unitless:{optionLineHeight:!0,optionSelectedFontWeight:!0}})},26743:function(ln,mt,m){"use strict";m.d(mt,{_z:function(){return g},gp:function(){return fe}});var v=m(36237),ae=m(63356),W=m(51636);const fe=C=>{const{multipleSelectItemHeight:M,paddingXXS:y,lineWidth:E,INTERNAL_FIXED_ITEM_MARGIN:T}=C,k=C.max(C.calc(y).sub(E).equal(),0),j=C.max(C.calc(k).sub(T).equal(),0);return{basePadding:k,containerPadding:j,itemHeight:(0,v.unit)(M),itemLineHeight:(0,v.unit)(C.calc(M).sub(C.calc(C.lineWidth).mul(2)).equal())}},z=C=>{const{multipleSelectItemHeight:M,selectHeight:y,lineWidth:E}=C;return C.calc(y).sub(M).div(2).sub(E).equal()},g=C=>{const{componentCls:M,iconCls:y,borderRadiusSM:E,motionDurationSlow:T,paddingXS:k,multipleItemColorDisabled:j,multipleItemBorderColorDisabled:Z,colorIcon:U,colorIconHover:A,INTERNAL_FIXED_ITEM_MARGIN:K}=C;return{[`${M}-selection-overflow`]:{position:"relative",display:"flex",flex:"auto",flexWrap:"wrap",maxWidth:"100%","&-item":{flex:"none",alignSelf:"center",maxWidth:"100%",display:"inline-flex"},[`${M}-selection-item`]:{display:"flex",alignSelf:"center",flex:"none",boxSizing:"border-box",maxWidth:"100%",marginBlock:K,borderRadius:E,cursor:"default",transition:`font-size ${T}, line-height ${T}, height ${T}`,marginInlineEnd:C.calc(K).mul(2).equal(),paddingInlineStart:k,paddingInlineEnd:C.calc(k).div(2).equal(),[`${M}-disabled&`]:{color:j,borderColor:Z,cursor:"not-allowed"},"&-content":{display:"inline-block",marginInlineEnd:C.calc(k).div(2).equal(),overflow:"hidden",whiteSpace:"pre",textOverflow:"ellipsis"},"&-remove":Object.assign(Object.assign({},(0,ae.Ro)()),{display:"inline-flex",alignItems:"center",color:U,fontWeight:"bold",fontSize:10,lineHeight:"inherit",cursor:"pointer",[`> ${y}`]:{verticalAlign:"-0.2em"},"&:hover":{color:A}})}}}},q=(C,M)=>{const{componentCls:y,INTERNAL_FIXED_ITEM_MARGIN:E}=C,T=`${y}-selection-overflow`,k=C.multipleSelectItemHeight,j=z(C),Z=M?`${y}-${M}`:"",U=fe(C);return{[`${y}-multiple${Z}`]:Object.assign(Object.assign({},g(C)),{[`${y}-selector`]:{display:"flex",alignItems:"center",width:"100%",height:"100%",paddingInline:U.basePadding,paddingBlock:U.containerPadding,borderRadius:C.borderRadius,[`${y}-disabled&`]:{background:C.multipleSelectorBgDisabled,cursor:"not-allowed"},"&:after":{display:"inline-block",width:0,margin:`${(0,v.unit)(E)} 0`,lineHeight:(0,v.unit)(k),visibility:"hidden",content:'"\\a0"'}},[`${y}-selection-item`]:{height:U.itemHeight,lineHeight:(0,v.unit)(U.itemLineHeight)},[`${y}-selection-wrap`]:{alignSelf:"flex-start","&:after":{lineHeight:(0,v.unit)(k),marginBlock:E}},[`${y}-prefix`]:{marginInlineStart:C.calc(C.inputPaddingHorizontalBase).sub(U.basePadding).equal()},[`${T}-item + ${T}-item,
|
|
|
${y}-prefix + ${y}-selection-wrap
|
|
|
`]:{[`${y}-selection-search`]:{marginInlineStart:0},[`${y}-selection-placeholder`]:{insetInlineStart:0}},[`${T}-item-suffix`]:{minHeight:U.itemHeight,marginBlock:E},[`${y}-selection-search`]:{display:"inline-flex",position:"relative",maxWidth:"100%",marginInlineStart:C.calc(C.inputPaddingHorizontalBase).sub(j).equal(),"\n &-input,\n &-mirror\n ":{height:k,fontFamily:C.fontFamily,lineHeight:(0,v.unit)(k),transition:`all ${C.motionDurationSlow}`},"&-input":{width:"100%",minWidth:4.1},"&-mirror":{position:"absolute",top:0,insetInlineStart:0,insetInlineEnd:"auto",zIndex:999,whiteSpace:"pre",visibility:"hidden"}},[`${y}-selection-placeholder`]:{position:"absolute",top:"50%",insetInlineStart:C.calc(C.inputPaddingHorizontalBase).sub(U.basePadding).equal(),insetInlineEnd:C.inputPaddingHorizontalBase,transform:"translateY(-50%)",transition:`all ${C.motionDurationSlow}`}})}};function te(C,M){const{componentCls:y}=C,E=M?`${y}-${M}`:"",T={[`${y}-multiple${E}`]:{fontSize:C.fontSize,[`${y}-selector`]:{[`${y}-show-search&`]:{cursor:"text"}},[`
|
|
|
&${y}-show-arrow ${y}-selector,
|
|
|
&${y}-allow-clear ${y}-selector
|
|
|
`]:{paddingInlineEnd:C.calc(C.fontSizeIcon).add(C.controlPaddingHorizontal).equal()}}};return[q(C,M),T]}const o=C=>{const{componentCls:M}=C,y=(0,W.mergeToken)(C,{selectHeight:C.controlHeightSM,multipleSelectItemHeight:C.multipleItemHeightSM,borderRadius:C.borderRadiusSM,borderRadiusSM:C.borderRadiusXS}),E=(0,W.mergeToken)(C,{fontSize:C.fontSizeLG,selectHeight:C.controlHeightLG,multipleSelectItemHeight:C.multipleItemHeightLG,borderRadius:C.borderRadiusLG,borderRadiusSM:C.borderRadius});return[te(C),te(y,"sm"),{[`${M}-multiple${M}-sm`]:{[`${M}-selection-placeholder`]:{insetInline:C.calc(C.controlPaddingHorizontalSM).sub(C.lineWidth).equal()},[`${M}-selection-search`]:{marginInlineStart:2}}},te(E,"lg")]};mt.ZP=o},68525:function(ln,mt,m){"use strict";m.d(mt,{Z:function(){return te}});var v=m(59301),ae=m(40001),W=m(19248),fe=m(99267),z=m(84105),g=m(58617),q=m(47472);function te(o){let{suffixIcon:C,clearIcon:M,menuItemSelectedIcon:y,removeIcon:E,loading:T,multiple:k,hasFeedback:j,prefixCls:Z,showSuffixIcon:U,feedbackIcon:A,showArrow:K,componentName:D}=o;const O=M!=null?M:v.createElement(W.Z,null),re=Me=>C===null&&!j&&!K?null:v.createElement(v.Fragment,null,U!==!1&&Me,j&&A);let oe=null;if(C!==void 0)oe=re(C);else if(T)oe=re(v.createElement(g.Z,{spin:!0}));else{const Me=`${Z}-suffix`;oe=ke=>{let{open:tt,showSearch:ue}=ke;return re(tt&&ue?v.createElement(q.Z,{className:Me}):v.createElement(z.Z,{className:Me}))}}let ie=null;y!==void 0?ie=y:k?ie=v.createElement(ae.Z,null):ie=null;let Ee=null;return E!==void 0?Ee=E:Ee=v.createElement(fe.Z,null),{clearIcon:O,suffixIcon:oe,itemIcon:ie,removeIcon:Ee}}},90005:function(ln,mt,m){"use strict";m.d(mt,{Z:function(){return v}});function v(ae,W){return W!==void 0?W:ae!==null}},44104:function(ln,mt,m){"use strict";m.d(mt,{Z:function(){return j}});var v=m(59301),ae=m(92310),W=m.n(ae),fe=m(11592),z=m(99402),g=m(48755),q=m(70045);const te=v.createContext({latestIndex:0}),o=te.Provider;var M=Z=>{let{className:U,index:A,children:K,split:D,style:O}=Z;const{latestIndex:re}=v.useContext(te);return K==null?null:v.createElement(v.Fragment,null,v.createElement("div",{className:U,style:O},K),A<re&&D&&v.createElement("span",{className:`${U}-split`},D))},y=m(31547),E=function(Z,U){var A={};for(var K in Z)Object.prototype.hasOwnProperty.call(Z,K)&&U.indexOf(K)<0&&(A[K]=Z[K]);if(Z!=null&&typeof Object.getOwnPropertySymbols=="function")for(var D=0,K=Object.getOwnPropertySymbols(Z);D<K.length;D++)U.indexOf(K[D])<0&&Object.prototype.propertyIsEnumerable.call(Z,K[D])&&(A[K[D]]=Z[K[D]]);return A};const k=v.forwardRef((Z,U)=>{var A;const{getPrefixCls:K,direction:D,size:O,className:re,style:oe,classNames:ie,styles:Ee}=(0,g.dj)("space"),{size:Me=O!=null?O:"small",align:ke,className:tt,rootClassName:ue,children:X,direction:L="horizontal",prefixCls:se,split:Q,style:V,wrap:x=!1,classNames:w,styles:H}=Z,he=E(Z,["size","align","className","rootClassName","children","direction","prefixCls","split","style","wrap","classNames","styles"]),[Ke,ft]=Array.isArray(Me)?Me:[Me,Me],Ue=(0,z.n)(ft),st=(0,z.n)(Ke),pt=(0,z.T)(ft),Et=(0,z.T)(Ke),Ne=(0,fe.Z)(X,{keepEmpty:!0}),St=ke===void 0&&L==="horizontal"?"center":ke,at=K("space",se),[Nt,Ge,je]=(0,y.Z)(at),Re=W()(at,re,Ge,`${at}-${L}`,{[`${at}-rtl`]:D==="rtl",[`${at}-align-${St}`]:St,[`${at}-gap-row-${ft}`]:Ue,[`${at}-gap-col-${Ke}`]:st},tt,ue,je),_e=W()(`${at}-item`,(A=w==null?void 0:w.item)!==null&&A!==void 0?A:ie.item);let Y=0;const Le=Ne.map((P,ce)=>{var ve;P!=null&&(Y=ce);const de=(P==null?void 0:P.key)||`${_e}-${ce}`;return v.createElement(M,{className:_e,key:de,index:ce,split:Q,style:(ve=H==null?void 0:H.item)!==null&&ve!==void 0?ve:Ee.item},P)}),Ce=v.useMemo(()=>({latestIndex:Y}),[Y]);if(Ne.length===0)return null;const B={};return x&&(B.flexWrap="wrap"),!st&&Et&&(B.columnGap=Ke),!Ue&&pt&&(B.rowGap=ft),Nt(v.createElement("div",Object.assign({ref:U,className:Re,style:Object.assign(Object.assign(Object.assign({},B),oe),V)},he),v.createElement(o,{value:Ce},Le)))});k.Compact=q.ZP;var j=k},93873:function(ln,mt,m){"use strict";m.d(mt,{Fm:function(){return y}});var v=m(36237),ae=m(48746);const W=new v.Keyframes("antMoveDownIn",{"0%":{transform:"translate3d(0, 100%, 0)",transformOrigin:"0 0",opacity:0},"100%":{transform:"translate3d(0, 0, 0)",transformOrigin:"0 0",opacity:1}}),fe=new v.Keyframes("antMoveDownOut",{"0%":{transform:"translate3d(0, 0, 0)",transformOrigin:"0 0",opacity:1},"100%":{transform:"translate3d(0, 100%, 0)",transformOrigin:"0 0",opacity:0}}),z=new v.Keyframes("antMoveLeftIn",{"0%":{transform:"translate3d(-100%, 0, 0)",transformOrigin:"0 0",opacity:0},"100%":{transform:"translate3d(0, 0, 0)",transformOrigin:"0 0",opacity:1}}),g=new v.Keyframes("antMoveLeftOut",{"0%":{transform:"translate3d(0, 0, 0)",transformOrigin:"0 0",opacity:1},"100%":{transform:"translate3d(-100%, 0, 0)",transformOrigin:"0 0",opacity:0}}),q=new v.Keyframes("antMoveRightIn",{"0%":{transform:"translate3d(100%, 0, 0)",transformOrigin:"0 0",opacity:0},"100%":{transform:"translate3d(0, 0, 0)",transformOrigin:"0 0",opacity:1}}),te=new v.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 v.Keyframes("antMoveUpIn",{"0%":{transform:"translate3d(0, -100%, 0)",transformOrigin:"0 0",opacity:0},"100%":{transform:"translate3d(0, 0, 0)",transformOrigin:"0 0",opacity:1}}),C=new v.Keyframes("antMoveUpOut",{"0%":{transform:"translate3d(0, 0, 0)",transformOrigin:"0 0",opacity:1},"100%":{transform:"translate3d(0, -100%, 0)",transformOrigin:"0 0",opacity:0}}),M={"move-up":{inKeyframes:o,outKeyframes:C},"move-down":{inKeyframes:W,outKeyframes:fe},"move-left":{inKeyframes:z,outKeyframes:g},"move-right":{inKeyframes:q,outKeyframes:te}},y=(E,T)=>{const{antCls:k}=E,j=`${k}-${T}`,{inKeyframes:Z,outKeyframes:U}=M[T];return[(0,ae.R)(j,Z,U,E.motionDurationMid),{[`
|
|
|
${j}-enter,
|
|
|
${j}-appear
|
|
|
`]:{opacity:0,animationTimingFunction:E.motionEaseOutCirc},[`${j}-leave`]:{animationTimingFunction:E.motionEaseInOutCirc}}]}},46e3:function(ln,mt,m){"use strict";m.d(mt,{Qt:function(){return z},Uw:function(){return fe},fJ:function(){return W},ly:function(){return g},oN:function(){return y}});var v=m(36237),ae=m(48746);const W=new v.Keyframes("antSlideUpIn",{"0%":{transform:"scaleY(0.8)",transformOrigin:"0% 0%",opacity:0},"100%":{transform:"scaleY(1)",transformOrigin:"0% 0%",opacity:1}}),fe=new v.Keyframes("antSlideUpOut",{"0%":{transform:"scaleY(1)",transformOrigin:"0% 0%",opacity:1},"100%":{transform:"scaleY(0.8)",transformOrigin:"0% 0%",opacity:0}}),z=new v.Keyframes("antSlideDownIn",{"0%":{transform:"scaleY(0.8)",transformOrigin:"100% 100%",opacity:0},"100%":{transform:"scaleY(1)",transformOrigin:"100% 100%",opacity:1}}),g=new v.Keyframes("antSlideDownOut",{"0%":{transform:"scaleY(1)",transformOrigin:"100% 100%",opacity:1},"100%":{transform:"scaleY(0.8)",transformOrigin:"100% 100%",opacity:0}}),q=new v.Keyframes("antSlideLeftIn",{"0%":{transform:"scaleX(0.8)",transformOrigin:"0% 0%",opacity:0},"100%":{transform:"scaleX(1)",transformOrigin:"0% 0%",opacity:1}}),te=new v.Keyframes("antSlideLeftOut",{"0%":{transform:"scaleX(1)",transformOrigin:"0% 0%",opacity:1},"100%":{transform:"scaleX(0.8)",transformOrigin:"0% 0%",opacity:0}}),o=new v.Keyframes("antSlideRightIn",{"0%":{transform:"scaleX(0.8)",transformOrigin:"100% 0%",opacity:0},"100%":{transform:"scaleX(1)",transformOrigin:"100% 0%",opacity:1}}),C=new v.Keyframes("antSlideRightOut",{"0%":{transform:"scaleX(1)",transformOrigin:"100% 0%",opacity:1},"100%":{transform:"scaleX(0.8)",transformOrigin:"100% 0%",opacity:0}}),M={"slide-up":{inKeyframes:W,outKeyframes:fe},"slide-down":{inKeyframes:z,outKeyframes:g},"slide-left":{inKeyframes:q,outKeyframes:te},"slide-right":{inKeyframes:o,outKeyframes:C}},y=(E,T)=>{const{antCls:k}=E,j=`${k}-${T}`,{inKeyframes:Z,outKeyframes:U}=M[T];return[(0,ae.R)(j,Z,U,E.motionDurationMid),{[`
|
|
|
${j}-enter,
|
|
|
${j}-appear
|
|
|
`]:{transform:"scale(0)",transformOrigin:"0% 0%",opacity:0,animationTimingFunction:E.motionEaseOutQuint,"&-prepare":{transform:"scale(1)"}},[`${j}-leave`]:{animationTimingFunction:E.motionEaseInQuint}}]}},37645:function(ln,mt,m){"use strict";m.d(mt,{ZP:function(){return g},qN:function(){return W},wZ:function(){return fe}});var v=m(36237),ae=m(36305);const W=8;function fe(q){const{contentRadius:te,limitVerticalRadius:o}=q,C=te>12?te+2:12;return{arrowOffsetHorizontal:C,arrowOffsetVertical:o?W:C}}function z(q,te){return q?te:{}}function g(q,te,o){const{componentCls:C,boxShadowPopoverArrow:M,arrowOffsetVertical:y,arrowOffsetHorizontal:E}=q,{arrowDistance:T=0,arrowPlacement:k={left:!0,right:!0,top:!0,bottom:!0}}=o||{};return{[C]:Object.assign(Object.assign(Object.assign(Object.assign({[`${C}-arrow`]:[Object.assign(Object.assign({position:"absolute",zIndex:1,display:"block"},(0,ae.W)(q,te,M)),{"&:before":{background:te}})]},z(!!k.top,{[[`&-placement-top > ${C}-arrow`,`&-placement-topLeft > ${C}-arrow`,`&-placement-topRight > ${C}-arrow`].join(",")]:{bottom:T,transform:"translateY(100%) rotate(180deg)"},[`&-placement-top > ${C}-arrow`]:{left:{_skip_check_:!0,value:"50%"},transform:"translateX(-50%) translateY(100%) rotate(180deg)"},"&-placement-topLeft":{"--arrow-offset-horizontal":E,[`> ${C}-arrow`]:{left:{_skip_check_:!0,value:E}}},"&-placement-topRight":{"--arrow-offset-horizontal":`calc(100% - ${(0,v.unit)(E)})`,[`> ${C}-arrow`]:{right:{_skip_check_:!0,value:E}}}})),z(!!k.bottom,{[[`&-placement-bottom > ${C}-arrow`,`&-placement-bottomLeft > ${C}-arrow`,`&-placement-bottomRight > ${C}-arrow`].join(",")]:{top:T,transform:"translateY(-100%)"},[`&-placement-bottom > ${C}-arrow`]:{left:{_skip_check_:!0,value:"50%"},transform:"translateX(-50%) translateY(-100%)"},"&-placement-bottomLeft":{"--arrow-offset-horizontal":E,[`> ${C}-arrow`]:{left:{_skip_check_:!0,value:E}}},"&-placement-bottomRight":{"--arrow-offset-horizontal":`calc(100% - ${(0,v.unit)(E)})`,[`> ${C}-arrow`]:{right:{_skip_check_:!0,value:E}}}})),z(!!k.left,{[[`&-placement-left > ${C}-arrow`,`&-placement-leftTop > ${C}-arrow`,`&-placement-leftBottom > ${C}-arrow`].join(",")]:{right:{_skip_check_:!0,value:T},transform:"translateX(100%) rotate(90deg)"},[`&-placement-left > ${C}-arrow`]:{top:{_skip_check_:!0,value:"50%"},transform:"translateY(-50%) translateX(100%) rotate(90deg)"},[`&-placement-leftTop > ${C}-arrow`]:{top:y},[`&-placement-leftBottom > ${C}-arrow`]:{bottom:y}})),z(!!k.right,{[[`&-placement-right > ${C}-arrow`,`&-placement-rightTop > ${C}-arrow`,`&-placement-rightBottom > ${C}-arrow`].join(",")]:{left:{_skip_check_:!0,value:T},transform:"translateX(-100%) rotate(-90deg)"},[`&-placement-right > ${C}-arrow`]:{top:{_skip_check_:!0,value:"50%"},transform:"translateY(-50%) translateX(-100%) rotate(-90deg)"},[`&-placement-rightTop > ${C}-arrow`]:{top:y},[`&-placement-rightBottom > ${C}-arrow`]:{bottom:y}}))}}},36305:function(ln,mt,m){"use strict";m.d(mt,{W:function(){return W},w:function(){return ae}});var v=m(36237);function ae(fe){const{sizePopupArrow:z,borderRadiusXS:g,borderRadiusOuter:q}=fe,te=z/2,o=0,C=te,M=q*1/Math.sqrt(2),y=te-q*(1-1/Math.sqrt(2)),E=te-g*(1/Math.sqrt(2)),T=q*(Math.sqrt(2)-1)+g*(1/Math.sqrt(2)),k=2*te-E,j=T,Z=2*te-M,U=y,A=2*te-o,K=C,D=te*Math.sqrt(2)+q*(Math.sqrt(2)-2),O=q*(Math.sqrt(2)-1),re=`polygon(${O}px 100%, 50% ${O}px, ${2*te-O}px 100%, ${O}px 100%)`,oe=`path('M ${o} ${C} A ${q} ${q} 0 0 0 ${M} ${y} L ${E} ${T} A ${g} ${g} 0 0 1 ${k} ${j} L ${Z} ${U} A ${q} ${q} 0 0 0 ${A} ${K} Z')`;return{arrowShadowWidth:D,arrowPath:oe,arrowPolygon:re}}const W=(fe,z,g)=>{const{sizePopupArrow:q,arrowPolygon:te,arrowPath:o,arrowShadowWidth:C,borderRadiusXS:M,calc:y}=fe;return{pointerEvents:"none",width:q,height:q,overflow:"hidden","&::before":{position:"absolute",bottom:0,insetInlineStart:0,width:q,height:y(q).div(2).equal(),background:z,clipPath:{_multi_value_:!0,value:[te,o]},content:'""'},"&::after":{content:'""',position:"absolute",width:C,height:C,bottom:0,insetInline:0,margin:"auto",borderRadius:{_skip_check_:!0,value:`0 0 ${(0,v.unit)(M)} 0`},transform:"translateY(50%) rotate(-135deg)",boxShadow:g,zIndex:0,background:"transparent"}}}},93427:function(ln,mt,m){"use strict";m.d(mt,{Z:function(){return ae}});var v=m(34998);function ae(W,fe){return v.i.reduce((z,g)=>{const q=W[`${g}1`],te=W[`${g}3`],o=W[`${g}6`],C=W[`${g}7`];return Object.assign(Object.assign({},z),fe(g,{lightColor:q,lightBorderColor:te,darkColor:o,textColor:C}))},{})}},25399:function(ln,mt,m){"use strict";m.d(mt,{Z:function(){return se}});var v=m(59301),ae=m(92310),W=m.n(ae),fe=m(29125),z=m(18929),g=m(62487),q=m(75030),te=m(86641),o=m(52838),C=m(22703),M=m(32383),y=m(55743),E=m(57700),T=m(48755),k=m(36237),j=m(63356),Z=m(34925),U=m(37645),A=m(36305),K=m(93427),D=m(51636),O=m(16931);const re=Q=>{const{calc:V,componentCls:x,tooltipMaxWidth:w,tooltipColor:H,tooltipBg:he,tooltipBorderRadius:Ke,zIndexPopup:ft,controlHeight:Ue,boxShadowSecondary:st,paddingSM:pt,paddingXS:Et,arrowOffsetHorizontal:Ne,sizePopupArrow:St}=Q,at=V(Ke).add(St).add(Ne).equal(),Nt=V(Ke).mul(2).add(St).equal();return[{[x]:Object.assign(Object.assign(Object.assign(Object.assign({},(0,j.Wf)(Q)),{position:"absolute",zIndex:ft,display:"block",width:"max-content",maxWidth:w,visibility:"visible","--valid-offset-x":"var(--arrow-offset-horizontal, var(--arrow-x))",transformOrigin:["var(--valid-offset-x, 50%)","var(--arrow-y, 50%)"].join(" "),"&-hidden":{display:"none"},"--antd-arrow-background-color":he,[`${x}-inner`]:{minWidth:Nt,minHeight:Ue,padding:`${(0,k.unit)(Q.calc(pt).div(2).equal())} ${(0,k.unit)(Et)}`,color:H,textAlign:"start",textDecoration:"none",wordWrap:"break-word",backgroundColor:he,borderRadius:Ke,boxShadow:st,boxSizing:"border-box"},[["&-placement-topLeft","&-placement-topRight","&-placement-bottomLeft","&-placement-bottomRight"].join(",")]:{minWidth:at},[["&-placement-left","&-placement-leftTop","&-placement-leftBottom","&-placement-right","&-placement-rightTop","&-placement-rightBottom"].join(",")]:{[`${x}-inner`]:{borderRadius:Q.min(Ke,U.qN)}},[`${x}-content`]:{position:"relative"}}),(0,K.Z)(Q,(Ge,je)=>{let{darkColor:Re}=je;return{[`&${x}-${Ge}`]:{[`${x}-inner`]:{backgroundColor:Re},[`${x}-arrow`]:{"--antd-arrow-background-color":Re}}}})),{"&-rtl":{direction:"rtl"}})},(0,U.ZP)(Q,"var(--antd-arrow-background-color)"),{[`${x}-pure`]:{position:"relative",maxWidth:"none",margin:Q.sizePopupArrow}}]},oe=Q=>Object.assign(Object.assign({zIndexPopup:Q.zIndexPopupBase+70},(0,U.wZ)({contentRadius:Q.borderRadius,limitVerticalRadius:!0})),(0,A.w)((0,D.mergeToken)(Q,{borderRadiusOuter:Math.min(Q.borderRadiusOuter,4)})));var ie=function(Q){let V=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!0;return(0,O.I$)("Tooltip",w=>{const{borderRadius:H,colorTextLightSolid:he,colorBgSpotlight:Ke}=w,ft=(0,D.mergeToken)(w,{tooltipMaxWidth:250,tooltipColor:he,tooltipBorderRadius:H,tooltipBg:Ke});return[re(ft),(0,Z._y)(w,"zoom-big-fast")]},oe,{resetStyle:!1,injectStyle:V})(Q)},Ee=m(29509);function Me(Q,V){const x=(0,Ee.o2)(V),w=W()({[`${Q}-${V}`]:V&&x}),H={},he={};return V&&!x&&(H.background=V,he["--antd-arrow-background-color"]=V),{className:w,overlayStyle:H,arrowStyle:he}}var tt=Q=>{const{prefixCls:V,className:x,placement:w="top",title:H,color:he,overlayInnerStyle:Ke}=Q,{getPrefixCls:ft}=v.useContext(T.E_),Ue=ft("tooltip",V),[st,pt,Et]=ie(Ue),Ne=Me(Ue,he),St=Ne.arrowStyle,at=Object.assign(Object.assign({},Ke),Ne.overlayStyle),Nt=W()(pt,Et,Ue,`${Ue}-pure`,`${Ue}-placement-${w}`,x,Ne.className);return st(v.createElement("div",{className:Nt,style:St},v.createElement("div",{className:`${Ue}-arrow`}),v.createElement(fe.G,Object.assign({},Q,{className:pt,prefixCls:Ue,overlayInnerStyle:at}),H)))},ue=function(Q,V){var x={};for(var w in Q)Object.prototype.hasOwnProperty.call(Q,w)&&V.indexOf(w)<0&&(x[w]=Q[w]);if(Q!=null&&typeof Object.getOwnPropertySymbols=="function")for(var H=0,w=Object.getOwnPropertySymbols(Q);H<w.length;H++)V.indexOf(w[H])<0&&Object.prototype.propertyIsEnumerable.call(Q,w[H])&&(x[w[H]]=Q[w[H]]);return x};const L=v.forwardRef((Q,V)=>{var x,w;const{prefixCls:H,openClassName:he,getTooltipContainer:Ke,color:ft,overlayInnerStyle:Ue,children:st,afterOpenChange:pt,afterVisibleChange:Et,destroyTooltipOnHide:Ne,arrow:St=!0,title:at,overlay:Nt,builtinPlacements:Ge,arrowPointAtCenter:je=!1,autoAdjustOverflow:Re=!0,motion:_e,getPopupContainer:Y,placement:Le="top",mouseEnterDelay:Ce=.1,mouseLeaveDelay:B=.1,overlayStyle:P,rootClassName:ce,overlayClassName:ve,styles:de,classNames:ye}=Q,Te=ue(Q,["prefixCls","openClassName","getTooltipContainer","color","overlayInnerStyle","children","afterOpenChange","afterVisibleChange","destroyTooltipOnHide","arrow","title","overlay","builtinPlacements","arrowPointAtCenter","autoAdjustOverflow","motion","getPopupContainer","placement","mouseEnterDelay","mouseLeaveDelay","overlayStyle","rootClassName","overlayClassName","styles","classNames"]),we=!!St,[,Ie]=(0,E.ZP)(),{getPopupContainer:Ae,getPrefixCls:Xe,direction:gt,className:ht,style:nt,classNames:Oe,styles:qe}=(0,T.dj)("tooltip"),rt=(0,M.ln)("Tooltip"),ot=v.useRef(null),Rt=()=>{var rn;(rn=ot.current)===null||rn===void 0||rn.forceAlign()};v.useImperativeHandle(V,()=>{var rn,En;return{forceAlign:Rt,forcePopupAlign:()=>{rt.deprecated(!1,"forcePopupAlign","forceAlign"),Rt()},nativeElement:(rn=ot.current)===null||rn===void 0?void 0:rn.nativeElement,popupElement:(En=ot.current)===null||En===void 0?void 0:En.popupElement}});const[S,R]=(0,z.Z)(!1,{value:(x=Q.open)!==null&&x!==void 0?x:Q.visible,defaultValue:(w=Q.defaultOpen)!==null&&w!==void 0?w:Q.defaultVisible}),Ze=!at&&!Nt&&at!==0,J=rn=>{var En,Zt;R(Ze?!1:rn),Ze||((En=Q.onOpenChange)===null||En===void 0||En.call(Q,rn),(Zt=Q.onVisibleChange)===null||Zt===void 0||Zt.call(Q,rn))},be=v.useMemo(()=>{var rn,En;let Zt=je;return typeof St=="object"&&(Zt=(En=(rn=St.pointAtCenter)!==null&&rn!==void 0?rn:St.arrowPointAtCenter)!==null&&En!==void 0?En:je),Ge||(0,o.Z)({arrowPointAtCenter:Zt,autoAdjustOverflow:Re,arrowWidth:we?Ie.sizePopupArrow:0,borderRadius:Ie.borderRadius,offset:Ie.marginXXS,visibleFirst:!0})},[je,St,Ge,Ie]),zt=v.useMemo(()=>at===0?at:Nt||at||"",[Nt,at]),ze=v.createElement(g.Z,{space:!0},typeof zt=="function"?zt():zt),Qe=Xe("tooltip",H),lt=Xe(),le=Q["data-popover-inject"];let pe=S;!("open"in Q)&&!("visible"in Q)&&Ze&&(pe=!1);const Pe=v.isValidElement(st)&&!(0,C.M2)(st)?st:v.createElement("span",null,st),$e=Pe.props,G=!$e.className||typeof $e.className=="string"?W()($e.className,he||`${Qe}-open`):$e.className,[bt,xe,Bt]=ie(Qe,!le),en=Me(Qe,ft),dn=en.arrowStyle,Hn=W()(ve,{[`${Qe}-rtl`]:gt==="rtl"},en.className,ce,xe,Bt,ht,Oe.root,ye==null?void 0:ye.root),wt=W()(Oe.body,ye==null?void 0:ye.body),[Gt,mn]=(0,q.Cn)("Tooltip",Te.zIndex),yn=v.createElement(fe.Z,Object.assign({},Te,{zIndex:Gt,showArrow:we,placement:Le,mouseEnterDelay:Ce,mouseLeaveDelay:B,prefixCls:Qe,classNames:{root:Hn,body:wt},styles:{root:Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({},dn),qe.root),nt),P),de==null?void 0:de.root),body:Object.assign(Object.assign(Object.assign(Object.assign({},qe.body),Ue),de==null?void 0:de.body),en.overlayStyle)},getTooltipContainer:Y||Ke||Ae,ref:ot,builtinPlacements:be,overlay:ze,visible:pe,onVisibleChange:J,afterVisibleChange:pt!=null?pt:Et,arrowContent:v.createElement("span",{className:`${Qe}-arrow-content`}),motion:{motionName:(0,te.m)(lt,"zoom-big-fast",Q.transitionName),motionDeadline:1e3},destroyTooltipOnHide:!!Ne}),pe?(0,C.Tm)(Pe,{className:G}):Pe);return bt(v.createElement(y.Z.Provider,{value:mn},yn))});L._InternalPanelDoNotUseOrYouWillBeFired=tt;var se=L},53420:function(ln,mt,m){"use strict";m.d(mt,{default:function(){return Hn}});var v=m(59301),ae=m(92310),W=m.n(ae),fe=m(60499),z=m(77654),g=m(85899),q=m(72190),te=m(42244),o=m(43749),C=m(37463),M=m(6551),y=m(34643),E=m(18929),T=m(48736),k=function(wt){var Gt=v.useRef({valueLabels:new Map});return v.useMemo(function(){var mn=Gt.current.valueLabels,yn=new Map,rn=wt.map(function(En){var Zt=En.value,Dt=En.label,Mt=Dt!=null?Dt:mn.get(Zt);return yn.set(Zt,Mt),(0,g.Z)((0,g.Z)({},En),{},{label:Mt})});return Gt.current.valueLabels=yn,[rn]},[wt])},j=function(Gt,mn,yn,rn){return v.useMemo(function(){var En=function(Se){return Se.map(function(He){var it=He.value;return it})},Zt=En(Gt),Dt=En(mn),Mt=Zt.filter(function(ct){return!rn[ct]}),gn=Zt,Ln=Dt;if(yn){var ut=(0,y.S)(Zt,!0,rn);gn=ut.checkedKeys,Ln=ut.halfCheckedKeys}return[Array.from(new Set([].concat((0,z.Z)(Mt),(0,z.Z)(gn)))),Ln]},[Gt,mn,yn,rn])},Z=j,U=m(34061),A=function(wt,Gt){return v.useMemo(function(){var mn=(0,U.I8)(wt,{fieldNames:Gt,initWrapper:function(rn){return(0,g.Z)((0,g.Z)({},rn),{},{valueEntities:new Map})},processEntity:function(rn,En){var Zt=rn.node[Gt.value];if(0)var Dt;En.valueEntities.set(Zt,rn)}});return mn},[wt,Gt])},K=m(18642),D=m(11592),O=function(){return null},re=O,oe=["children","value"];function ie(wt){return(0,D.Z)(wt).map(function(Gt){if(!v.isValidElement(Gt)||!Gt.type)return null;var mn=Gt,yn=mn.key,rn=mn.props,En=rn.children,Zt=rn.value,Dt=(0,te.Z)(rn,oe),Mt=(0,g.Z)({key:yn,value:Zt},Dt),gn=ie(En);return gn.length&&(Mt.children=gn),Mt}).filter(function(Gt){return Gt})}function Ee(wt){if(!wt)return wt;var Gt=(0,g.Z)({},wt);return"props"in Gt||Object.defineProperty(Gt,"props",{get:function(){return(0,T.ZP)(!1,"New `rc-tree-select` not support return node instance as argument anymore. Please consider to remove `props` access."),Gt}}),Gt}function Me(wt,Gt,mn,yn,rn,En){var Zt=null,Dt=null;function Mt(){function gn(Ln){var ut=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"0",ct=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1;return Ln.map(function(Se,He){var it="".concat(ut,"-").concat(He),Je=Se[En.value],yt=mn.includes(Je),$t=gn(Se[En.children]||[],it,yt),Jt=v.createElement(re,Se,$t.map(function(Ht){return Ht.node}));if(Gt===Je&&(Zt=Jt),yt){var nn={pos:it,node:Jt,children:$t};return ct||Dt.push(nn),nn}return null}).filter(function(Se){return Se})}Dt||(Dt=[],gn(yn),Dt.sort(function(Ln,ut){var ct=Ln.node.props.value,Se=ut.node.props.value,He=mn.indexOf(ct),it=mn.indexOf(Se);return He-it}))}Object.defineProperty(wt,"triggerNode",{get:function(){return(0,T.ZP)(!1,"`triggerNode` is deprecated. Please consider decoupling data with node."),Mt(),Zt}}),Object.defineProperty(wt,"allCheckedNodes",{get:function(){return(0,T.ZP)(!1,"`allCheckedNodes` is deprecated. Please consider decoupling data with node."),Mt(),rn?Dt:Dt.map(function(Ln){var ut=Ln.node;return ut})}})}var ke=function(Gt,mn,yn){var rn=yn.fieldNames,En=yn.treeNodeFilterProp,Zt=yn.filterTreeNode,Dt=rn.children;return v.useMemo(function(){if(!mn||Zt===!1)return Gt;var Mt=typeof Zt=="function"?Zt:function(Ln,ut){return String(ut[En]).toUpperCase().includes(mn.toUpperCase())},gn=function Ln(ut){var ct=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;return ut.reduce(function(Se,He){var it=He[Dt],Je=ct||Mt(mn,Ee(He)),yt=Ln(it||[],Je);return(Je||yt.length)&&Se.push((0,g.Z)((0,g.Z)({},He),{},(0,K.Z)({isLeaf:void 0},Dt,yt))),Se},[])};return gn(Gt)},[Gt,mn,Dt,En,Zt])},tt=ke;function ue(wt){var Gt=v.useRef();Gt.current=wt;var mn=v.useCallback(function(){return Gt.current.apply(Gt,arguments)},[]);return mn}function X(wt,Gt){var mn=Gt.id,yn=Gt.pId,rn=Gt.rootPId,En=new Map,Zt=[];return wt.forEach(function(Dt){var Mt=Dt[mn],gn=(0,g.Z)((0,g.Z)({},Dt),{},{key:Dt.key||Mt});En.set(Mt,gn)}),En.forEach(function(Dt){var Mt=Dt[yn],gn=En.get(Mt);gn?(gn.children=gn.children||[],gn.children.push(Dt)):(Mt===rn||rn===null)&&Zt.push(Dt)}),Zt}function L(wt,Gt,mn){return v.useMemo(function(){if(wt){if(mn){var yn=(0,g.Z)({id:"id",pId:"pId",rootPId:null},(0,o.Z)(mn)==="object"?mn:{});return X(wt,yn)}return wt}return ie(Gt)},[Gt,mn,wt])}var se=v.createContext(null),Q=se,V=m(72054),x=m(87632),w=m(10228),H=m(80547),he=v.createContext(null),Ke=he,ft=function(Gt){return Array.isArray(Gt)?Gt:Gt!==void 0?[Gt]:[]},Ue=function(Gt){var mn=Gt||{},yn=mn.label,rn=mn.value,En=mn.children;return{_title:yn?[yn]:["title","label"],value:rn||"value",key:rn||"value",children:En||"children"}},st=function(Gt){return!Gt||Gt.disabled||Gt.disableCheckbox||Gt.checkable===!1},pt=function(Gt,mn){var yn=[],rn=function En(Zt){Zt.forEach(function(Dt){var Mt=Dt[mn.children];Mt&&(yn.push(Dt[mn.value]),En(Mt))})};return rn(Gt),yn},Et=function(Gt){return Gt==null},Ne=m(70425),St={width:0,height:0,display:"flex",overflow:"hidden",opacity:0,border:0,padding:0,margin:0},at=function(Gt,mn){var yn=(0,C.lk)(),rn=yn.prefixCls,En=yn.multiple,Zt=yn.searchValue,Dt=yn.toggleOpen,Mt=yn.open,gn=yn.notFoundContent,Ln=v.useContext(Ke),ut=Ln.virtual,ct=Ln.listHeight,Se=Ln.listItemHeight,He=Ln.listItemScrollOffset,it=Ln.treeData,Je=Ln.fieldNames,yt=Ln.onSelect,$t=Ln.dropdownMatchSelectWidth,Jt=Ln.treeExpandAction,nn=Ln.treeTitleRender,Ht=Ln.onPopupScroll,Qt=Ln.leftMaxCount,pn=Ln.leafCountOnly,qt=Ln.valueEntities,Ye=v.useContext(Q),vt=Ye.checkable,Ct=Ye.checkedKeys,_t=Ye.halfCheckedKeys,At=Ye.treeExpandedKeys,kt=Ye.treeDefaultExpandAll,Wt=Ye.treeDefaultExpandedKeys,Kt=Ye.onTreeExpand,on=Ye.treeIcon,cn=Ye.showTreeIcon,Wn=Ye.switcherIcon,bn=Ye.treeLine,fn=Ye.treeNodeFilterProp,In=Ye.loadData,On=Ye.treeLoadedKeys,Zn=Ye.treeMotion,An=Ye.onTreeLoad,Mn=Ye.keyEntities,Nn=v.useRef(),jn=(0,H.Z)(function(){return it},[Mt,it],function(sr,ar){return ar[0]&&sr[1]!==ar[1]}),zn=v.useMemo(function(){return vt?{checked:Ct,halfChecked:_t}:null},[vt,Ct,_t]);v.useEffect(function(){if(Mt&&!En&&Ct.length){var sr;(sr=Nn.current)===null||sr===void 0||sr.scrollTo({key:Ct[0]})}},[Mt]);var Dn=function(ar){ar.preventDefault()},Bn=function(ar,Ar){var Rr=Ar.node;vt&&st(Rr)||(yt(Rr.key,{selected:!Ct.includes(Rr.key)}),En||Dt(!1))},Sn=v.useState(Wt),cr=(0,q.Z)(Sn,2),Tt=cr[0],Fn=cr[1],Kn=v.useState(null),Dr=(0,q.Z)(Kn,2),gr=Dr[0],Or=Dr[1],Cr=v.useMemo(function(){return At?(0,z.Z)(At):Zt?gr:Tt},[Tt,gr,At,Zt]),_n=function(ar){Fn(ar),Or(ar),Kt&&Kt(ar)},wn=String(Zt).toLowerCase(),jt=function(ar){return wn?String(ar[fn]).toLowerCase().includes(wn):!1};v.useEffect(function(){Zt&&Or(pt(it,Je))},[Zt]);var Vt=v.useState(function(){return new Map}),un=(0,q.Z)(Vt,2),Cn=un[0],Vn=un[1];v.useEffect(function(){Qt&&Vn(new Map)},[Qt]);function tr(sr){var ar=sr[Je.value];if(!Cn.has(ar)){var Ar=qt.get(ar),Rr=(Ar.children||[]).length===0;if(Rr)Cn.set(ar,!1);else{var Qn=Ar.children.filter(function(Fr){return!Fr.node.disabled&&!Fr.node.disableCheckbox&&!Ct.includes(Fr.node[Je.value])}),Kr=Qn.length;Cn.set(ar,Kr>Qt)}}return Cn.get(ar)}var tn=(0,Ne.zX)(function(sr){var ar=sr[Je.value];return Ct.includes(ar)||Qt===null?!1:Qt<=0?!0:pn&&Qt?tr(sr):!1}),Yn=function sr(ar){var Ar=(0,V.Z)(ar),Rr;try{for(Ar.s();!(Rr=Ar.n()).done;){var Qn=Rr.value;if(!(Qn.disabled||Qn.selectable===!1)){if(Zt){if(jt(Qn))return Qn}else return Qn;if(Qn[Je.children]){var Kr=sr(Qn[Je.children]);if(Kr)return Kr}}}}catch(Fr){Ar.e(Fr)}finally{Ar.f()}return null},vr=v.useState(null),Lr=(0,q.Z)(vr,2),Br=Lr[0],jr=Lr[1],dr=Mn[Br];v.useEffect(function(){if(Mt){var sr=null,ar=function(){var Rr=Yn(jn);return Rr?Rr[Je.value]:null};!En&&Ct.length&&!Zt?sr=Ct[0]:sr=ar(),jr(sr)}},[Mt,Zt]),v.useImperativeHandle(mn,function(){var sr;return{scrollTo:(sr=Nn.current)===null||sr===void 0?void 0:sr.scrollTo,onKeyDown:function(Ar){var Rr,Qn=Ar.which;switch(Qn){case w.Z.UP:case w.Z.DOWN:case w.Z.LEFT:case w.Z.RIGHT:(Rr=Nn.current)===null||Rr===void 0||Rr.onKeyDown(Ar);break;case w.Z.ENTER:{if(dr){var Kr=tn(dr.node),Fr=(dr==null?void 0:dr.node)||{},Gr=Fr.selectable,Ur=Fr.value,Jn=Fr.disabled;Gr!==!1&&!Jn&&!Kr&&Bn(null,{node:{key:Br},selected:!Ct.includes(Ur)})}break}case w.Z.ESC:Dt(!1)}},onKeyUp:function(){}}});var Zr=(0,H.Z)(function(){return!Zt},[Zt,At||Tt],function(sr,ar){var Ar=(0,q.Z)(sr,1),Rr=Ar[0],Qn=(0,q.Z)(ar,2),Kr=Qn[0],Fr=Qn[1];return Rr!==Kr&&!!(Kr||Fr)}),fr=Zr?In:null;if(jn.length===0)return v.createElement("div",{role:"listbox",className:"".concat(rn,"-empty"),onMouseDown:Dn},gn);var Nr={fieldNames:Je};return On&&(Nr.loadedKeys=On),Cr&&(Nr.expandedKeys=Cr),v.createElement("div",{onMouseDown:Dn},dr&&Mt&&v.createElement("span",{style:St,"aria-live":"assertive"},dr.node.value),v.createElement(x.y6.Provider,{value:{nodeDisabled:tn}},v.createElement(x.ZP,(0,fe.Z)({ref:Nn,focusable:!1,prefixCls:"".concat(rn,"-tree"),treeData:jn,height:ct,itemHeight:Se,itemScrollOffset:He,virtual:ut!==!1&&$t!==!1,multiple:En,icon:on,showIcon:cn,switcherIcon:Wn,showLine:bn,loadData:fr,motion:Zn,activeKey:Br,checkable:vt,checkStrictly:!0,checkedKeys:zn,selectedKeys:vt?[]:Ct,defaultExpandAll:kt,titleRender:nn},Nr,{onActiveChange:jr,onSelect:Bn,onCheck:Bn,onExpand:_n,onLoad:An,filterTreeNode:jt,expandAction:Jt,onScroll:Ht}))))},Nt=v.forwardRef(at),Ge=Nt,je="SHOW_ALL",Re="SHOW_PARENT",_e="SHOW_CHILD";function Y(wt,Gt,mn,yn){var rn=new Set(wt);return Gt===_e?wt.filter(function(En){var Zt=mn[En];return!Zt||!Zt.children||!Zt.children.some(function(Dt){var Mt=Dt.node;return rn.has(Mt[yn.value])})||!Zt.children.every(function(Dt){var Mt=Dt.node;return st(Mt)||rn.has(Mt[yn.value])})}):Gt===Re?wt.filter(function(En){var Zt=mn[En],Dt=Zt?Zt.parent:null;return!Dt||st(Dt.node)||!rn.has(Dt.key)}):wt}function Le(wt){var Gt=wt.searchPlaceholder,mn=wt.treeCheckStrictly,yn=wt.treeCheckable,rn=wt.labelInValue,En=wt.value,Zt=wt.multiple,Dt=wt.showCheckedStrategy,Mt=wt.maxCount;warning(!Gt,"`searchPlaceholder` has been removed."),mn&&rn===!1&&warning(!1,"`treeCheckStrictly` will force set `labelInValue` to `true`."),(rn||mn)&&warning(toArray(En).every(function(gn){return gn&&_typeof(gn)==="object"&&"value"in gn}),"Invalid prop `value` supplied to `TreeSelect`. You should use { label: string, value: string | number } or [{ label: string, value: string | number }] instead."),mn||Zt||yn?warning(!En||Array.isArray(En),"`value` should be an array when `TreeSelect` is checkable or multiple."):warning(!Array.isArray(En),"`value` should not be array when `TreeSelect` is single mode."),Mt&&(Dt==="SHOW_ALL"&&!mn||Dt==="SHOW_PARENT")&&warning(!1,"`maxCount` not work with `showCheckedStrategy=SHOW_ALL` (when `treeCheckStrictly=false`) or `showCheckedStrategy=SHOW_PARENT`.")}var Ce=null,B=["id","prefixCls","value","defaultValue","onChange","onSelect","onDeselect","searchValue","inputValue","onSearch","autoClearSearchValue","filterTreeNode","treeNodeFilterProp","showCheckedStrategy","treeNodeLabelProp","multiple","treeCheckable","treeCheckStrictly","labelInValue","maxCount","fieldNames","treeDataSimpleMode","treeData","children","loadData","treeLoadedKeys","onTreeLoad","treeDefaultExpandAll","treeExpandedKeys","treeDefaultExpandedKeys","onTreeExpand","treeExpandAction","virtual","listHeight","listItemHeight","listItemScrollOffset","onDropdownVisibleChange","dropdownMatchSelectWidth","treeLine","treeIcon","showTreeIcon","switcherIcon","treeMotion","treeTitleRender","onPopupScroll"];function P(wt){return!wt||(0,o.Z)(wt)!=="object"}var ce=v.forwardRef(function(wt,Gt){var mn=wt.id,yn=wt.prefixCls,rn=yn===void 0?"rc-tree-select":yn,En=wt.value,Zt=wt.defaultValue,Dt=wt.onChange,Mt=wt.onSelect,gn=wt.onDeselect,Ln=wt.searchValue,ut=wt.inputValue,ct=wt.onSearch,Se=wt.autoClearSearchValue,He=Se===void 0?!0:Se,it=wt.filterTreeNode,Je=wt.treeNodeFilterProp,yt=Je===void 0?"value":Je,$t=wt.showCheckedStrategy,Jt=wt.treeNodeLabelProp,nn=wt.multiple,Ht=wt.treeCheckable,Qt=wt.treeCheckStrictly,pn=wt.labelInValue,qt=wt.maxCount,Ye=wt.fieldNames,vt=wt.treeDataSimpleMode,Ct=wt.treeData,_t=wt.children,At=wt.loadData,kt=wt.treeLoadedKeys,Wt=wt.onTreeLoad,Kt=wt.treeDefaultExpandAll,on=wt.treeExpandedKeys,cn=wt.treeDefaultExpandedKeys,Wn=wt.onTreeExpand,bn=wt.treeExpandAction,fn=wt.virtual,In=wt.listHeight,On=In===void 0?200:In,Zn=wt.listItemHeight,An=Zn===void 0?20:Zn,Mn=wt.listItemScrollOffset,Nn=Mn===void 0?0:Mn,jn=wt.onDropdownVisibleChange,zn=wt.dropdownMatchSelectWidth,Dn=zn===void 0?!0:zn,Bn=wt.treeLine,Sn=wt.treeIcon,cr=wt.showTreeIcon,Tt=wt.switcherIcon,Fn=wt.treeMotion,Kn=wt.treeTitleRender,Dr=wt.onPopupScroll,gr=(0,te.Z)(wt,B),Or=(0,M.ZP)(mn),Cr=Ht&&!Qt,_n=Ht||Qt,wn=Qt||pn,jt=_n||nn,Vt=(0,E.Z)(Zt,{value:En}),un=(0,q.Z)(Vt,2),Cn=un[0],Vn=un[1],tr=v.useMemo(function(){return Ht?$t||_e:je},[$t,Ht]),tn=v.useMemo(function(){return Ue(Ye)},[JSON.stringify(Ye)]),Yn=(0,E.Z)("",{value:Ln!==void 0?Ln:ut,postState:function($n){return $n||""}}),vr=(0,q.Z)(Yn,2),Lr=vr[0],Br=vr[1],jr=function($n){Br($n),ct==null||ct($n)},dr=L(Ct,_t,vt),Zr=A(dr,tn),fr=Zr.keyEntities,Nr=Zr.valueEntities,sr=v.useCallback(function(kn){var $n=[],lr=[];return kn.forEach(function(yr){Nr.has(yr)?lr.push(yr):$n.push(yr)}),{missingRawValues:$n,existRawValues:lr}},[Nr]),ar=tt(dr,Lr,{fieldNames:tn,treeNodeFilterProp:yt,filterTreeNode:it}),Ar=v.useCallback(function(kn){if(kn){if(Jt)return kn[Jt];for(var $n=tn._title,lr=0;lr<$n.length;lr+=1){var yr=kn[$n[lr]];if(yr!==void 0)return yr}}},[tn,Jt]),Rr=v.useCallback(function(kn){var $n=ft(kn);return $n.map(function(lr){return P(lr)?{value:lr}:lr})},[]),Qn=v.useCallback(function(kn){var $n=Rr(kn);return $n.map(function(lr){var yr=lr.label,Wr=lr.value,Rn=lr.halfChecked,Un,rr=Nr.get(Wr);if(rr){var or;yr=Kn?Kn(rr.node):(or=yr)!==null&&or!==void 0?or:Ar(rr.node),Un=rr.node.disabled}else if(yr===void 0){var Sr=Rr(Cn).find(function(Ei){return Ei.value===Wr});yr=Sr.label}return{label:yr,value:Wr,halfChecked:Rn,disabled:Un}})},[Nr,Ar,Rr,Cn]),Kr=v.useMemo(function(){return Rr(Cn===null?[]:Cn)},[Rr,Cn]),Fr=v.useMemo(function(){var kn=[],$n=[];return Kr.forEach(function(lr){lr.halfChecked?$n.push(lr):kn.push(lr)}),[kn,$n]},[Kr]),Gr=(0,q.Z)(Fr,2),Ur=Gr[0],Jn=Gr[1],Si=v.useMemo(function(){return Ur.map(function(kn){return kn.value})},[Ur]),vn=Z(Ur,Jn,Cr,fr),ni=(0,q.Z)(vn,2),yi=ni[0],_i=ni[1],oi=v.useMemo(function(){var kn=Y(yi,tr,fr,tn),$n=kn.map(function(Rn){var Un,rr;return(Un=(rr=fr[Rn])===null||rr===void 0||(rr=rr.node)===null||rr===void 0?void 0:rr[tn.value])!==null&&Un!==void 0?Un:Rn}),lr=$n.map(function(Rn){var Un=Ur.find(function(or){return or.value===Rn}),rr=pn?Un==null?void 0:Un.label:Kn==null?void 0:Kn(Un);return{value:Rn,label:rr}}),yr=Qn(lr),Wr=yr[0];return!jt&&Wr&&Et(Wr.value)&&Et(Wr.label)?[]:yr.map(function(Rn){var Un;return(0,g.Z)((0,g.Z)({},Rn),{},{label:(Un=Rn.label)!==null&&Un!==void 0?Un:Rn.value})})},[tn,jt,yi,Ur,Qn,tr,fr]),pi=k(oi),hr=(0,q.Z)(pi,1),Xr=hr[0],gi=v.useMemo(function(){return jt&&(tr==="SHOW_CHILD"||Qt||!Ht)?qt:null},[qt,jt,Qt,tr,Ht]),xi=ue(function(kn,$n,lr){var yr=Y(kn,tr,fr,tn);if(!(gi&&yr.length>gi)){var Wr=Qn(kn);if(Vn(Wr),He&&Br(""),Dt){var Rn=kn;Cr&&(Rn=yr.map(function(Pi){var Ui=Nr.get(Pi);return Ui?Ui.node[tn.value]:Pi}));var Un=$n||{triggerValue:void 0,selected:void 0},rr=Un.triggerValue,or=Un.selected,Sr=Rn;if(Qt){var Ei=Jn.filter(function(Pi){return!Rn.includes(Pi.value)});Sr=[].concat((0,z.Z)(Sr),(0,z.Z)(Ei))}var ri=Qn(Sr),di={preValue:Ur,triggerValue:rr},li=!0;(Qt||lr==="selection"&&!or)&&(li=!1),Me(di,rr,kn,dr,li,tn),_n?di.checked=or:di.selected=or;var Vi=wn?ri:ri.map(function(Pi){return Pi.value});Dt(jt?Vi:Vi[0],wn?null:ri.map(function(Pi){return Pi.label}),di)}}}),Mr=v.useCallback(function(kn,$n){var lr,yr=$n.selected,Wr=$n.source,Rn=fr[kn],Un=Rn==null?void 0:Rn.node,rr=(lr=Un==null?void 0:Un[tn.value])!==null&&lr!==void 0?lr:kn;if(!jt)xi([rr],{selected:!0,triggerValue:rr},"option");else{var or=yr?[].concat((0,z.Z)(Si),[rr]):yi.filter(function(Ui){return Ui!==rr});if(Cr){var Sr=sr(or),Ei=Sr.missingRawValues,ri=Sr.existRawValues,di=ri.map(function(Ui){return Nr.get(Ui).key}),li;if(yr){var Vi=(0,y.S)(di,!0,fr);li=Vi.checkedKeys}else{var Pi=(0,y.S)(di,{checked:!1,halfCheckedKeys:_i},fr);li=Pi.checkedKeys}or=[].concat((0,z.Z)(Ei),(0,z.Z)(li.map(function(Ui){return fr[Ui].node[tn.value]})))}xi(or,{selected:yr,triggerValue:rr},Wr||"option")}yr||!jt?Mt==null||Mt(rr,Ee(Un)):gn==null||gn(rr,Ee(Un))},[sr,Nr,fr,tn,jt,Si,xi,Cr,Mt,gn,yi,_i,qt]),Qr=v.useCallback(function(kn){if(jn){var $n={};Object.defineProperty($n,"documentClickClose",{get:function(){return(0,T.ZP)(!1,"Second param of `onDropdownVisibleChange` has been removed."),!1}}),jn(kn,$n)}},[jn]),ii=ue(function(kn,$n){var lr=kn.map(function(yr){return yr.value});if($n.type==="clear"){xi(lr,{},"selection");return}$n.values.length&&Mr($n.values[0].value,{selected:!1,source:"selection"})}),ir=v.useMemo(function(){return{virtual:fn,dropdownMatchSelectWidth:Dn,listHeight:On,listItemHeight:An,listItemScrollOffset:Nn,treeData:ar,fieldNames:tn,onSelect:Mr,treeExpandAction:bn,treeTitleRender:Kn,onPopupScroll:Dr,leftMaxCount:qt===void 0?null:qt-Xr.length,leafCountOnly:tr==="SHOW_CHILD"&&!Qt&&!!Ht,valueEntities:Nr}},[fn,Dn,On,An,Nn,ar,tn,Mr,bn,Kn,Dr,qt,Xr.length,tr,Qt,Ht,Nr]),Er=v.useMemo(function(){return{checkable:_n,loadData:At,treeLoadedKeys:kt,onTreeLoad:Wt,checkedKeys:yi,halfCheckedKeys:_i,treeDefaultExpandAll:Kt,treeExpandedKeys:on,treeDefaultExpandedKeys:cn,onTreeExpand:Wn,treeIcon:Sn,treeMotion:Fn,showTreeIcon:cr,switcherIcon:Tt,treeLine:Bn,treeNodeFilterProp:yt,keyEntities:fr}},[_n,At,kt,Wt,yi,_i,Kt,on,cn,Wn,Sn,Fn,cr,Tt,Bn,yt,fr]);return v.createElement(Ke.Provider,{value:ir},v.createElement(Q.Provider,{value:Er},v.createElement(C.Ac,(0,fe.Z)({ref:Gt},gr,{id:Or,prefixCls:rn,mode:jt?"multiple":void 0,displayValues:Xr,onDisplayValuesChange:ii,searchValue:Lr,onSearch:jr,OptionList:Ge,emptyOptions:!dr.length,onDropdownVisibleChange:Qr,dropdownMatchSelectWidth:Dn}))))}),ve=ce;ve.TreeNode=re,ve.SHOW_ALL=je,ve.SHOW_PARENT=Re,ve.SHOW_CHILD=_e;var de=ve,ye=de,Te=m(2738),we=m(75030),Ie=m(86641),Ae=m(45915),Xe=m(82855),gt=m(48755),ht=m(38406),nt=m(2171),Oe=m(83397),qe=m(31756),rt=m(56553),ot=m(24971),Rt=m(1722),S=m(90376),R=m(68525),Ze=m(90005),J=m(70045),be=m(57700),zt=m(85278),ze=m(36237),Qe=m(36170),lt=m(51636),le=m(16931),pe=m(12425);const Pe=wt=>{const{componentCls:Gt,treePrefixCls:mn,colorBgElevated:yn}=wt,rn=`.${mn}`;return[{[`${Gt}-dropdown`]:[{padding:`${(0,ze.unit)(wt.paddingXS)} ${(0,ze.unit)(wt.calc(wt.paddingXS).div(2).equal())}`},(0,pe.Yk)(mn,(0,lt.mergeToken)(wt,{colorBgContainer:yn}),!1),{[rn]:{borderRadius:0,[`${rn}-list-holder-inner`]:{alignItems:"stretch",[`${rn}-treenode`]:{[`${rn}-node-content-wrapper`]:{flex:"auto"}}}}},(0,Qe.C2)(`${mn}-checkbox`,wt),{"&-rtl":{direction:"rtl",[`${rn}-switcher${rn}-switcher_close`]:{[`${rn}-switcher-icon svg`]:{transform:"rotate(90deg)"}}}}]}]},$e=null;function G(wt,Gt,mn){return(0,le.I$)("TreeSelect",yn=>{const rn=(0,lt.mergeToken)(yn,{treePrefixCls:Gt});return[Pe(rn)]},pe.TM)(wt,mn)}var bt=function(wt,Gt){var mn={};for(var yn in wt)Object.prototype.hasOwnProperty.call(wt,yn)&&Gt.indexOf(yn)<0&&(mn[yn]=wt[yn]);if(wt!=null&&typeof Object.getOwnPropertySymbols=="function")for(var rn=0,yn=Object.getOwnPropertySymbols(wt);rn<yn.length;rn++)Gt.indexOf(yn[rn])<0&&Object.prototype.propertyIsEnumerable.call(wt,yn[rn])&&(mn[yn[rn]]=wt[yn[rn]]);return mn};const xe=(wt,Gt)=>{var mn;const{prefixCls:yn,size:rn,disabled:En,bordered:Zt=!0,className:Dt,rootClassName:Mt,treeCheckable:gn,multiple:Ln,listHeight:ut=256,listItemHeight:ct,placement:Se,notFoundContent:He,switcherIcon:it,treeLine:Je,getPopupContainer:yt,popupClassName:$t,dropdownClassName:Jt,treeIcon:nn=!1,transitionName:Ht,choiceTransitionName:Qt="",status:pn,treeExpandAction:qt,builtinPlacements:Ye,dropdownMatchSelectWidth:vt,popupMatchSelectWidth:Ct,allowClear:_t,variant:At,dropdownStyle:kt,tagRender:Wt,maxCount:Kt,showCheckedStrategy:on,treeCheckStrictly:cn}=wt,Wn=bt(wt,["prefixCls","size","disabled","bordered","className","rootClassName","treeCheckable","multiple","listHeight","listItemHeight","placement","notFoundContent","switcherIcon","treeLine","getPopupContainer","popupClassName","dropdownClassName","treeIcon","transitionName","choiceTransitionName","status","treeExpandAction","builtinPlacements","dropdownMatchSelectWidth","popupMatchSelectWidth","allowClear","variant","dropdownStyle","tagRender","maxCount","showCheckedStrategy","treeCheckStrictly"]),{getPopupContainer:bn,getPrefixCls:fn,renderEmpty:In,direction:On,virtual:Zn,popupMatchSelectWidth:An,popupOverflow:Mn}=v.useContext(gt.E_),[,Nn]=(0,be.ZP)(),jn=ct!=null?ct:(Nn==null?void 0:Nn.controlHeightSM)+(Nn==null?void 0:Nn.paddingXXS),zn=fn(),Dn=fn("select",yn),Bn=fn("select-tree",yn),Sn=fn("tree-select",yn),{compactSize:cr,compactItemClassnames:Tt}=(0,J.ri)(Dn,On),Fn=(0,Oe.Z)(Dn),Kn=(0,Oe.Z)(Sn),[Dr,gr,Or]=(0,S.Z)(Dn,Fn),[Cr]=G(Sn,Bn,Kn),[_n,wn]=(0,ot.Z)("treeSelect",At,Zt),jt=W()($t||Jt,`${Sn}-dropdown`,{[`${Sn}-dropdown-rtl`]:On==="rtl"},Mt,Or,Fn,Kn,gr),Vt=!!(gn||Ln),un=v.useMemo(()=>{if(!(Kt&&(on==="SHOW_ALL"&&!cn||on==="SHOW_PARENT")))return Kt},[Kt,on,cn]),Cn=(0,Ze.Z)(wt.suffixIcon,wt.showArrow),Vn=(mn=Ct!=null?Ct:vt)!==null&&mn!==void 0?mn:An,{status:tr,hasFeedback:tn,isFormItemInput:Yn,feedbackIcon:vr}=v.useContext(rt.aM),Lr=(0,Xe.F)(tr,pn),{suffixIcon:Br,removeIcon:jr,clearIcon:dr}=(0,R.Z)(Object.assign(Object.assign({},Wn),{multiple:Vt,showSuffixIcon:Cn,hasFeedback:tn,feedbackIcon:vr,prefixCls:Dn,componentName:"TreeSelect"})),Zr=_t===!0?{clearIcon:dr}:_t;let fr;He!==void 0?fr=He:fr=(In==null?void 0:In("Select"))||v.createElement(ht.Z,{componentName:"Select"});const Nr=(0,Te.Z)(Wn,["suffixIcon","removeIcon","clearIcon","itemIcon","switcherIcon"]),sr=v.useMemo(()=>Se!==void 0?Se:On==="rtl"?"bottomRight":"bottomLeft",[Se,On]),ar=(0,qe.Z)(Ur=>{var Jn;return(Jn=rn!=null?rn:cr)!==null&&Jn!==void 0?Jn:Ur}),Ar=v.useContext(nt.Z),Rr=En!=null?En:Ar,Qn=W()(!yn&&Sn,{[`${Dn}-lg`]:ar==="large",[`${Dn}-sm`]:ar==="small",[`${Dn}-rtl`]:On==="rtl",[`${Dn}-${_n}`]:wn,[`${Dn}-in-form-item`]:Yn},(0,Xe.Z)(Dn,Lr,tn),Tt,Dt,Mt,Or,Fn,Kn,gr),Kr=Ur=>v.createElement(zt.Z,{prefixCls:Bn,switcherIcon:it,treeNodeProps:Ur,showLine:Je}),[Fr]=(0,we.Cn)("SelectLike",kt==null?void 0:kt.zIndex),Gr=v.createElement(ye,Object.assign({virtual:Zn,disabled:Rr},Nr,{dropdownMatchSelectWidth:Vn,builtinPlacements:(0,Rt.Z)(Ye,Mn),ref:Gt,prefixCls:Dn,className:Qn,listHeight:ut,listItemHeight:jn,treeCheckable:gn&&v.createElement("span",{className:`${Dn}-tree-checkbox-inner`}),treeLine:!!Je,suffixIcon:Br,multiple:Vt,placement:sr,removeIcon:jr,allowClear:Zr,switcherIcon:Kr,showTreeIcon:nn,notFoundContent:fr,getPopupContainer:yt||bn,treeMotion:null,dropdownClassName:jt,dropdownStyle:Object.assign(Object.assign({},kt),{zIndex:Fr}),choiceTransitionName:(0,Ie.m)(zn,"",Qt),transitionName:(0,Ie.m)(zn,"slide-up",Ht),treeExpandAction:qt,tagRender:Vt?Wt:void 0,maxCount:un,showCheckedStrategy:on,treeCheckStrictly:cn}));return Dr(Cr(Gr))},en=v.forwardRef(xe),dn=(0,Ae.Z)(en,"dropdownAlign",wt=>(0,Te.Z)(wt,["visible"]));en.TreeNode=re,en.SHOW_ALL=je,en.SHOW_PARENT=Re,en.SHOW_CHILD=_e,en._InternalPanelDoNotUseOrYouWillBeFired=dn;var Hn=en},18287:function(ln,mt,m){"use strict";m.d(mt,{default:function(){return ft}});var v=m(87632),ae=m(77654),W=m(59301),fe=m(52671),z=m(8657),g=m(60499),q={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M880 298.4H521L403.7 186.2a8.15 8.15 0 00-5.5-2.2H144c-17.7 0-32 14.3-32 32v592c0 17.7 14.3 32 32 32h736c17.7 0 32-14.3 32-32V330.4c0-17.7-14.3-32-32-32zM840 768H184V256h188.5l119.6 114.4H840V768z"}}]},name:"folder",theme:"outlined"},te=q,o=m(7657),C=function(st,pt){return W.createElement(o.Z,(0,g.Z)({},st,{ref:pt,icon:te}))},M=W.forwardRef(C),y=M,E=m(92310),T=m.n(E),k=m(82661),j=m(34061),Z=m(48755),U=m(56082),A=m(86641),K=m(57700),D=m(12425);const O=4;function re(Ue){const{dropPosition:st,dropLevelOffset:pt,prefixCls:Et,indent:Ne,direction:St="ltr"}=Ue,at=St==="ltr"?"left":"right",Nt=St==="ltr"?"right":"left",Ge={[at]:-pt*Ne+O,[Nt]:0};switch(st){case-1:Ge.top=-3;break;case 1:Ge.bottom=-3;break;default:Ge.bottom=-3,Ge[at]=Ne+O;break}return W.createElement("div",{style:Ge,className:`${Et}-drop-indicator`})}var oe=re,ie=m(85278),Me=W.forwardRef((Ue,st)=>{var pt;const{getPrefixCls:Et,direction:Ne,virtual:St,tree:at}=W.useContext(Z.E_),{prefixCls:Nt,className:Ge,showIcon:je=!1,showLine:Re,switcherIcon:_e,switcherLoadingIcon:Y,blockNode:Le=!1,children:Ce,checkable:B=!1,selectable:P=!0,draggable:ce,motion:ve,style:de}=Ue,ye=Et("tree",Nt),Te=Et(),we=ve!=null?ve:Object.assign(Object.assign({},(0,A.Z)(Te)),{motionAppear:!1}),Ie=Object.assign(Object.assign({},Ue),{checkable:B,selectable:P,showIcon:je,motion:we,blockNode:Le,showLine:!!Re,dropIndicatorRender:oe}),[Ae,Xe,gt]=(0,D.ZP)(ye),[,ht]=(0,K.ZP)(),nt=ht.paddingXS/2+(((pt=ht.Tree)===null||pt===void 0?void 0:pt.titleHeight)||ht.controlHeightSM),Oe=W.useMemo(()=>{if(!ce)return!1;let rt={};switch(typeof ce){case"function":rt.nodeDraggable=ce;break;case"object":rt=Object.assign({},ce);break;default:break}return rt.icon!==!1&&(rt.icon=rt.icon||W.createElement(U.Z,null)),rt},[ce]),qe=rt=>W.createElement(ie.Z,{prefixCls:ye,switcherIcon:_e,switcherLoadingIcon:Y,treeNodeProps:rt,showLine:Re});return Ae(W.createElement(v.ZP,Object.assign({itemHeight:nt,ref:st,virtual:St},Ie,{style:Object.assign(Object.assign({},at==null?void 0:at.style),de),prefixCls:ye,className:T()({[`${ye}-icon-hide`]:!je,[`${ye}-block-node`]:Le,[`${ye}-unselectable`]:!P,[`${ye}-rtl`]:Ne==="rtl"},at==null?void 0:at.className,Ge,Xe,gt),direction:Ne,checkable:B&&W.createElement("span",{className:`${ye}-checkbox-inner`}),selectable:P,switcherIcon:qe,draggable:Oe}),Ce))});const ke=0,tt=1,ue=2;function X(Ue,st,pt){const{key:Et,children:Ne}=pt;function St(at){const Nt=at[Et],Ge=at[Ne];st(Nt,at)!==!1&&X(Ge||[],st,pt)}Ue.forEach(St)}function L(Ue){let{treeData:st,expandedKeys:pt,startKey:Et,endKey:Ne,fieldNames:St}=Ue;const at=[];let Nt=ke;if(Et&&Et===Ne)return[Et];if(!Et||!Ne)return[];function Ge(je){return je===Et||je===Ne}return X(st,je=>{if(Nt===ue)return!1;if(Ge(je)){if(at.push(je),Nt===ke)Nt=tt;else if(Nt===tt)return Nt=ue,!1}else Nt===tt&&at.push(je);return pt.includes(je)},(0,j.w$)(St)),at}function se(Ue,st,pt){const Et=(0,ae.Z)(st),Ne=[];return X(Ue,(St,at)=>{const Nt=Et.indexOf(St);return Nt!==-1&&(Ne.push(at),Et.splice(Nt,1)),!!Et.length},(0,j.w$)(pt)),Ne}var Q=function(Ue,st){var pt={};for(var Et in Ue)Object.prototype.hasOwnProperty.call(Ue,Et)&&st.indexOf(Et)<0&&(pt[Et]=Ue[Et]);if(Ue!=null&&typeof Object.getOwnPropertySymbols=="function")for(var Ne=0,Et=Object.getOwnPropertySymbols(Ue);Ne<Et.length;Ne++)st.indexOf(Et[Ne])<0&&Object.prototype.propertyIsEnumerable.call(Ue,Et[Ne])&&(pt[Et[Ne]]=Ue[Et[Ne]]);return pt};function V(Ue){const{isLeaf:st,expanded:pt}=Ue;return st?W.createElement(fe.Z,null):pt?W.createElement(z.Z,null):W.createElement(y,null)}function x(Ue){let{treeData:st,children:pt}=Ue;return st||(0,j.zn)(pt)}const w=(Ue,st)=>{var{defaultExpandAll:pt,defaultExpandParent:Et,defaultExpandedKeys:Ne}=Ue,St=Q(Ue,["defaultExpandAll","defaultExpandParent","defaultExpandedKeys"]);const at=W.useRef(null),Nt=W.useRef(null),Ge=()=>{const{keyEntities:Ae}=(0,j.I8)(x(St));let Xe;return pt?Xe=Object.keys(Ae):Et?Xe=(0,k.r7)(St.expandedKeys||Ne||[],Ae):Xe=St.expandedKeys||Ne||[],Xe},[je,Re]=W.useState(St.selectedKeys||St.defaultSelectedKeys||[]),[_e,Y]=W.useState(()=>Ge());W.useEffect(()=>{"selectedKeys"in St&&Re(St.selectedKeys)},[St.selectedKeys]),W.useEffect(()=>{"expandedKeys"in St&&Y(St.expandedKeys)},[St.expandedKeys]);const Le=(Ae,Xe)=>{var gt;return"expandedKeys"in St||Y(Ae),(gt=St.onExpand)===null||gt===void 0?void 0:gt.call(St,Ae,Xe)},Ce=(Ae,Xe)=>{var gt;const{multiple:ht,fieldNames:nt}=St,{node:Oe,nativeEvent:qe}=Xe,{key:rt=""}=Oe,ot=x(St),Rt=Object.assign(Object.assign({},Xe),{selected:!0}),S=(qe==null?void 0:qe.ctrlKey)||(qe==null?void 0:qe.metaKey),R=qe==null?void 0:qe.shiftKey;let Ze;ht&&S?(Ze=Ae,at.current=rt,Nt.current=Ze,Rt.selectedNodes=se(ot,Ze,nt)):ht&&R?(Ze=Array.from(new Set([].concat((0,ae.Z)(Nt.current||[]),(0,ae.Z)(L({treeData:ot,expandedKeys:_e,startKey:rt,endKey:at.current,fieldNames:nt}))))),Rt.selectedNodes=se(ot,Ze,nt)):(Ze=[rt],at.current=rt,Nt.current=Ze,Rt.selectedNodes=se(ot,Ze,nt)),(gt=St.onSelect)===null||gt===void 0||gt.call(St,Ze,Rt),"selectedKeys"in St||Re(Ze)},{getPrefixCls:B,direction:P}=W.useContext(Z.E_),{prefixCls:ce,className:ve,showIcon:de=!0,expandAction:ye="click"}=St,Te=Q(St,["prefixCls","className","showIcon","expandAction"]),we=B("tree",ce),Ie=T()(`${we}-directory`,{[`${we}-directory-rtl`]:P==="rtl"},ve);return W.createElement(Me,Object.assign({icon:V,ref:st,blockNode:!0},Te,{showIcon:de,expandAction:ye,prefixCls:we,className:Ie,expandedKeys:_e,selectedKeys:je,onSelect:Ce,onExpand:Le}))};var he=W.forwardRef(w);const Ke=Me;Ke.DirectoryTree=he,Ke.TreeNode=v.OF;var ft=Ke},12425:function(ln,mt,m){"use strict";m.d(mt,{ZP:function(){return k},Yk:function(){return y},TM:function(){return E}});var v=m(36237),ae=m(36170),W=m(63356),fe=m(34961),z=m(51636),g=m(16931);const q=j=>{let{treeCls:Z,treeNodeCls:U,directoryNodeSelectedBg:A,directoryNodeSelectedColor:K,motionDurationMid:D,borderRadius:O,controlItemBgHover:re}=j;return{[`${Z}${Z}-directory ${U}`]:{[`${Z}-node-content-wrapper`]:{position:"static",[`> *:not(${Z}-drop-indicator)`]:{position:"relative"},"&:hover":{background:"transparent"},"&:before":{position:"absolute",inset:0,transition:`background-color ${D}`,content:'""',borderRadius:O},"&:hover:before":{background:re}},[`${Z}-switcher, ${Z}-checkbox, ${Z}-draggable-icon`]:{zIndex:1},"&-selected":{[`${Z}-switcher, ${Z}-draggable-icon`]:{color:K},[`${Z}-node-content-wrapper`]:{color:K,background:"transparent","&:before, &:hover:before":{background:A}}}}}},te=new v.Keyframes("ant-tree-node-fx-do-not-use",{"0%":{opacity:0},"100%":{opacity:1}}),o=(j,Z)=>({[`.${j}-switcher-icon`]:{display:"inline-block",fontSize:10,verticalAlign:"baseline",svg:{transition:`transform ${Z.motionDurationSlow}`}}}),C=(j,Z)=>({[`.${j}-drop-indicator`]:{position:"absolute",zIndex:1,height:2,backgroundColor:Z.colorPrimary,borderRadius:1,pointerEvents:"none","&:after":{position:"absolute",top:-3,insetInlineStart:-6,width:8,height:8,backgroundColor:"transparent",border:`${(0,v.unit)(Z.lineWidthBold)} solid ${Z.colorPrimary}`,borderRadius:"50%",content:'""'}}}),M=(j,Z)=>{const{treeCls:U,treeNodeCls:A,treeNodePadding:K,titleHeight:D,indentSize:O,nodeSelectedBg:re,nodeHoverBg:oe,colorTextQuaternary:ie,controlItemBgActiveDisabled:Ee}=Z;return{[U]:Object.assign(Object.assign({},(0,W.Wf)(Z)),{background:Z.colorBgContainer,borderRadius:Z.borderRadius,transition:`background-color ${Z.motionDurationSlow}`,"&-rtl":{direction:"rtl"},[`&${U}-rtl ${U}-switcher_close ${U}-switcher-icon svg`]:{transform:"rotate(90deg)"},[`&-focused:not(:hover):not(${U}-active-focused)`]:Object.assign({},(0,W.oN)(Z)),[`${U}-list-holder-inner`]:{alignItems:"flex-start"},[`&${U}-block-node`]:{[`${U}-list-holder-inner`]:{alignItems:"stretch",[`${U}-node-content-wrapper`]:{flex:"auto"},[`${A}.dragging:after`]:{position:"absolute",inset:0,border:`1px solid ${Z.colorPrimary}`,opacity:0,animationName:te,animationDuration:Z.motionDurationSlow,animationPlayState:"running",animationFillMode:"forwards",content:'""',pointerEvents:"none",borderRadius:Z.borderRadius}}},[A]:{display:"flex",alignItems:"flex-start",marginBottom:K,lineHeight:(0,v.unit)(D),position:"relative","&:before":{content:'""',position:"absolute",zIndex:1,insetInlineStart:0,width:"100%",top:"100%",height:K},[`&-disabled ${U}-node-content-wrapper`]:{color:Z.colorTextDisabled,cursor:"not-allowed","&:hover":{background:"transparent"}},[`${U}-checkbox-disabled + ${U}-node-selected,&${A}-disabled${A}-selected ${U}-node-content-wrapper`]:{backgroundColor:Ee},[`${U}-checkbox-disabled`]:{pointerEvents:"unset"},[`&:not(${A}-disabled)`]:{[`${U}-node-content-wrapper`]:{"&:hover":{color:Z.nodeHoverColor}}},[`&-active ${U}-node-content-wrapper`]:{background:Z.controlItemBgHover},[`&:not(${A}-disabled).filter-node ${U}-title`]:{color:Z.colorPrimary,fontWeight:500},"&-draggable":{cursor:"grab",[`${U}-draggable-icon`]:{flexShrink:0,width:D,textAlign:"center",visibility:"visible",color:ie},[`&${A}-disabled ${U}-draggable-icon`]:{visibility:"hidden"}}},[`${U}-indent`]:{alignSelf:"stretch",whiteSpace:"nowrap",userSelect:"none","&-unit":{display:"inline-block",width:O}},[`${U}-draggable-icon`]:{visibility:"hidden"},[`${U}-switcher, ${U}-checkbox`]:{marginInlineEnd:Z.calc(Z.calc(D).sub(Z.controlInteractiveSize)).div(2).equal()},[`${U}-switcher`]:Object.assign(Object.assign({},o(j,Z)),{position:"relative",flex:"none",alignSelf:"stretch",width:D,textAlign:"center",cursor:"pointer",userSelect:"none",transition:`all ${Z.motionDurationSlow}`,"&-noop":{cursor:"unset"},"&:before":{pointerEvents:"none",content:'""',width:D,height:D,position:"absolute",left:{_skip_check_:!0,value:0},top:0,borderRadius:Z.borderRadius,transition:`all ${Z.motionDurationSlow}`},[`&:not(${U}-switcher-noop):hover:before`]:{backgroundColor:Z.colorBgTextHover},[`&_close ${U}-switcher-icon svg`]:{transform:"rotate(-90deg)"},"&-loading-icon":{color:Z.colorPrimary},"&-leaf-line":{position:"relative",zIndex:1,display:"inline-block",width:"100%",height:"100%","&:before":{position:"absolute",top:0,insetInlineEnd:Z.calc(D).div(2).equal(),bottom:Z.calc(K).mul(-1).equal(),marginInlineStart:-1,borderInlineEnd:`1px solid ${Z.colorBorder}`,content:'""'},"&:after":{position:"absolute",width:Z.calc(Z.calc(D).div(2).equal()).mul(.8).equal(),height:Z.calc(D).div(2).equal(),borderBottom:`1px solid ${Z.colorBorder}`,content:'""'}}}),[`${U}-node-content-wrapper`]:Object.assign(Object.assign({position:"relative",minHeight:D,paddingBlock:0,paddingInline:Z.paddingXS,background:"transparent",borderRadius:Z.borderRadius,cursor:"pointer",transition:`all ${Z.motionDurationMid}, border 0s, line-height 0s, box-shadow 0s`},C(j,Z)),{"&:hover":{backgroundColor:oe},[`&${U}-node-selected`]:{color:Z.nodeSelectedColor,backgroundColor:re},[`${U}-iconEle`]:{display:"inline-block",width:D,height:D,textAlign:"center",verticalAlign:"top","&:empty":{display:"none"}}}),[`${U}-unselectable ${U}-node-content-wrapper:hover`]:{backgroundColor:"transparent"},[`${A}.drop-container > [draggable]`]:{boxShadow:`0 0 0 2px ${Z.colorPrimary}`},"&-show-line":{[`${U}-indent-unit`]:{position:"relative",height:"100%","&:before":{position:"absolute",top:0,insetInlineEnd:Z.calc(D).div(2).equal(),bottom:Z.calc(K).mul(-1).equal(),borderInlineEnd:`1px solid ${Z.colorBorder}`,content:'""'},"&-end:before":{display:"none"}},[`${U}-switcher`]:{background:"transparent","&-line-icon":{verticalAlign:"-0.15em"}}},[`${A}-leaf-last ${U}-switcher-leaf-line:before`]:{top:"auto !important",bottom:"auto !important",height:`${(0,v.unit)(Z.calc(D).div(2).equal())} !important`}})}},y=function(j,Z){let U=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!0;const A=`.${j}`,K=`${A}-treenode`,D=Z.calc(Z.paddingXS).div(2).equal(),O=(0,z.mergeToken)(Z,{treeCls:A,treeNodeCls:K,treeNodePadding:D});return[M(j,O),U&&q(O)].filter(Boolean)},E=j=>{const{controlHeightSM:Z,controlItemBgHover:U,controlItemBgActive:A}=j,K=Z;return{titleHeight:K,indentSize:K,nodeHoverBg:U,nodeHoverColor:j.colorText,nodeSelectedBg:A,nodeSelectedColor:j.colorText}},T=j=>{const{colorTextLightSolid:Z,colorPrimary:U}=j;return Object.assign(Object.assign({},E(j)),{directoryNodeSelectedColor:Z,directoryNodeSelectedBg:U})};var k=(0,g.I$)("Tree",(j,Z)=>{let{prefixCls:U}=Z;return[{[j.componentCls]:(0,ae.C2)(`${U}-checkbox`,j)},y(U,j),(0,fe.Z)(j)]},T)},85278:function(ln,mt,m){"use strict";m.d(mt,{Z:function(){return Z}});var v=m(59301),ae=m(60499),W={icon:{tag:"svg",attrs:{viewBox:"0 0 1024 1024",focusable:"false"},children:[{tag:"path",attrs:{d:"M840.4 300H183.6c-19.7 0-30.7 20.8-18.5 35l328.4 380.8c9.4 10.9 27.5 10.9 37 0L858.9 335c12.2-14.2 1.2-35-18.5-35z"}}]},name:"caret-down",theme:"filled"},fe=W,z=m(7657),g=function(A,K){return v.createElement(z.Z,(0,ae.Z)({},A,{ref:K,icon:fe}))},q=v.forwardRef(g),te=q,o=m(52671),C=m(58617),M=m(15075),y=m(43531),E=m(92310),T=m.n(E),k=m(22703),Z=U=>{const{prefixCls:A,switcherIcon:K,treeNodeProps:D,showLine:O,switcherLoadingIcon:re}=U,{isLeaf:oe,expanded:ie,loading:Ee}=D;if(Ee)return v.isValidElement(re)?re:v.createElement(C.Z,{className:`${A}-switcher-loading-icon`});let Me;if(O&&typeof O=="object"&&(Me=O.showLeafIcon),oe){if(!O)return null;if(typeof Me!="boolean"&&Me){const ue=typeof Me=="function"?Me(D):Me,X=`${A}-switcher-line-custom-icon`;return v.isValidElement(ue)?(0,k.Tm)(ue,{className:T()(ue.props.className||"",X)}):ue}return Me?v.createElement(o.Z,{className:`${A}-switcher-line-icon`}):v.createElement("span",{className:`${A}-switcher-leaf-line`})}const ke=`${A}-switcher-icon`,tt=typeof K=="function"?K(D):K;return v.isValidElement(tt)?(0,k.Tm)(tt,{className:T()(tt.props.className||"",ke)}):tt!==void 0?tt:O?ie?v.createElement(M.Z,{className:`${A}-switcher-line-icon`}):v.createElement(y.Z,{className:`${A}-switcher-line-icon`}):v.createElement(te,{className:ke})}},64018:function(){var ln,mt,m,v=!1,ae,W;window.PR_SHOULD_USE_CONTINUATION=!0;var fe,z;(function(){var g=window,q=["break,continue,do,else,for,if,return,while"],te=[q,"auto,case,char,const,default,double,enum,extern,float,goto,inline,int,long,register,restrict,short,signed,sizeof,static,struct,switch,typedef,union,unsigned,void,volatile"],o=[te,"catch,class,delete,false,import,new,operator,private,protected,public,this,throw,true,try,typeof"],C=[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"],M=[o,"abstract,assert,boolean,byte,extends,finally,final,implements,import,instanceof,interface,null,native,package,strictfp,super,synchronized,throws,transient"],y=[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"],E="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",T=[o,"abstract,async,await,constructor,debugger,enum,eval,export,function,get,implements,instanceof,interface,let,null,set,undefined,var,with,yield,Infinity,NaN"],k="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",j=[q,"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"],Z=[q,"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"],U=[q,"case,done,elif,esac,eval,fi,function,in,local,set,then,until"],A=[C,y,M,T,k,j,Z,U],K=/^(DIR|FILE|array|vector|(de|priority_)?queue|(forward_)?list|stack|(const_)?(reverse_)?iterator|(unordered_)?(multi)?(set|map)|bitset|u?(int|float)\d*)\b/,D="str",O="kwd",re="com",oe="typ",ie="lit",Ee="pun",Me="pln",ke="tag",tt="dec",ue="src",X="atn",L="atv",se="nocode",Q="(?:^^\\.?|[+-]|[!=]=?=?|\\#|%=?|&&?=?|\\(|\\*=?|[+\\-]=|->|\\/=?|::?|<<?=?|>>?>?=?|,|;|\\?|@|\\[|~|{|\\^\\^?=?|\\|\\|?=?|break|case|continue|delete|do|else|finally|instanceof|return|throw|try|typeof)\\s*";function V(_e){for(var Y=0,Le=!1,Ce=!1,B=0,P=_e.length;B<P;++B){var ce=_e[B];if(ce.ignoreCase)Ce=!0;else if(/[a-z]/i.test(ce.source.replace(/\\u[0-9a-f]{4}|\\x[0-9a-f]{2}|\\[^ux]/gi,""))){Le=!0,Ce=!1;break}}var ve={b:8,t:9,n:10,v:11,f:12,r:13};function de(Ae){var Xe=Ae.charCodeAt(0);if(Xe!==92)return Xe;var gt=Ae.charAt(1);return Xe=ve[gt],Xe||("0"<=gt&><="7"?parseInt(Ae.substring(1),8):gt==="u"||gt==="x"?parseInt(Ae.substring(2),16):Ae.charCodeAt(1))}function ye(Ae){if(Ae<32)return(Ae<16?"\\x0":"\\x")+Ae.toString(16);var Xe=String.fromCharCode(Ae);return Xe==="\\"||Xe==="-"||Xe==="]"||Xe==="^"?"\\"+Xe:Xe}function Te(Ae){var Xe=Ae.substring(1,Ae.length-1).match(new RegExp("\\\\u[0-9A-Fa-f]{4}|\\\\x[0-9A-Fa-f]{2}|\\\\[0-3][0-7]{0,2}|\\\\[0-7]{1,2}|\\\\[\\s\\S]|-|[^-\\\\]","g")),gt=[],ht=Xe[0]==="^",nt=["["];ht&&nt.push("^");for(var Oe=ht?1:0,qe=Xe.length;Oe<qe;++Oe){var rt=Xe[Oe];if(/\\[bdsw]/i.test(rt))nt.push(rt);else{var ot=de(rt),Rt;Oe+2<qe&&Xe[Oe+1]==="-"?(Rt=de(Xe[Oe+2]),Oe+=2):Rt=ot,gt.push([ot,Rt]),Rt<65||ot>122||(Rt<65||ot>90||gt.push([Math.max(65,ot)|32,Math.min(Rt,90)|32]),Rt<97||ot>122||gt.push([Math.max(97,ot)&-33,Math.min(Rt,122)&-33]))}}gt.sort(function(J,be){return J[0]-be[0]||be[1]-J[1]});for(var S=[],R=[],Oe=0;Oe<gt.length;++Oe){var Ze=gt[Oe];Ze[0]<=R[1]+1?R[1]=Math.max(R[1],Ze[1]):S.push(R=Ze)}for(var Oe=0;Oe<S.length;++Oe){var Ze=S[Oe];nt.push(ye(Ze[0])),Ze[1]>Ze[0]&&(Ze[1]+1>Ze[0]&&nt.push("-"),nt.push(ye(Ze[1])))}return nt.push("]"),nt.join("")}function we(Ae){for(var Xe=Ae.source.match(new RegExp("(?:\\[(?:[^\\x5C\\x5D]|\\\\[\\s\\S])*\\]|\\\\u[A-Fa-f0-9]{4}|\\\\x[A-Fa-f0-9]{2}|\\\\[0-9]+|\\\\[^ux0-9]|\\(\\?[:!=]|[\\(\\)\\^]|[^\\x5B\\x5C\\(\\)\\^]+)","g")),gt=Xe.length,ht=[],nt=0,Oe=0;nt<gt;++nt){var qe=Xe[nt];if(qe==="(")++Oe;else if(qe.charAt(0)==="\\"){var rt=+qe.substring(1);rt&&(rt<=Oe?ht[rt]=-1:Xe[nt]=ye(rt))}}for(var nt=1;nt<ht.length;++nt)ht[nt]===-1&&(ht[nt]=++Y);for(var nt=0,Oe=0;nt<gt;++nt){var qe=Xe[nt];if(qe==="(")++Oe,ht[Oe]||(Xe[nt]="(?:");else if(qe.charAt(0)==="\\"){var rt=+qe.substring(1);rt&&rt<=Oe&&(Xe[nt]="\\"+ht[rt])}}for(var nt=0;nt<gt;++nt)Xe[nt]==="^"&&Xe[nt+1]!=="^"&&(Xe[nt]="");if(Ae.ignoreCase&&Le)for(var nt=0;nt<gt;++nt){var qe=Xe[nt],ot=qe.charAt(0);qe.length>=2&&ot==="["?Xe[nt]=Te(qe):ot!=="\\"&&(Xe[nt]=qe.replace(/[a-zA-Z]/g,function(R){var Ze=R.charCodeAt(0);return"["+String.fromCharCode(Ze&-33,Ze|32)+"]"}))}return Xe.join("")}for(var Ie=[],B=0,P=_e.length;B<P;++B){var ce=_e[B];if(ce.global||ce.multiline)throw new Error(""+ce);Ie.push("(?:"+we(ce)+")")}return new RegExp(Ie.join("|"),Ce?"gi":"g")}function x(_e,Y){var Le=/(?:^|\s)nocode(?:\s|$)/,Ce=[],B=0,P=[],ce=0;function ve(de){var ye=de.nodeType;if(ye==1){if(Le.test(de.className))return;for(var Te=de.firstChild;Te;Te=Te.nextSibling)ve(Te);var we=de.nodeName.toLowerCase();(we==="br"||we==="li")&&(Ce[ce]=`
|
|
|
`,P[ce<<1]=B++,P[ce++<<1|1]=de)}else if(ye==3||ye==4){var Ie=de.nodeValue;Ie.length&&(Y?Ie=Ie.replace(/\r\n?/g,`
|
|
|
`):Ie=Ie.replace(/[ \t\r\n]+/g," "),Ce[ce]=Ie,P[ce<<1]=B,B+=Ie.length,P[ce++<<1|1]=de)}}return ve(_e),{sourceCode:Ce.join("").replace(/\n$/,""),spans:P}}function w(_e,Y,Le,Ce,B){if(Le){var P={sourceNode:_e,pre:1,langExtension:null,numberLines:null,sourceCode:Le,spans:null,basePos:Y,decorations:null};Ce(P),B.push.apply(B,P.decorations)}}var H=/\S/;function he(_e){for(var Y=void 0,Le=_e.firstChild;Le;Le=Le.nextSibling){var Ce=Le.nodeType;Y=Ce===1?Y?_e:Le:Ce===3&&H.test(Le.nodeValue)?_e:Y}return Y===_e?void 0:Y}function Ke(_e,Y){var Le={},Ce;(function(){for(var ce=_e.concat(Y),ve=[],de={},ye=0,Te=ce.length;ye<Te;++ye){var we=ce[ye],Ie=we[3];if(Ie)for(var Ae=Ie.length;--Ae>=0;)Le[Ie.charAt(Ae)]=we;var Xe=we[1],gt=""+Xe;de.hasOwnProperty(gt)||(ve.push(Xe),de[gt]=null)}ve.push(/[\0-\uffff]/),Ce=V(ve)})();var B=Y.length,P=function(ce){for(var ve=ce.sourceCode,de=ce.basePos,ye=ce.sourceNode,Te=[de,Me],we=0,Ie=ve.match(Ce)||[],Ae={},Xe=0,gt=Ie.length;Xe<gt;++Xe){var ht=Ie[Xe],nt=Ae[ht],Oe=void 0,qe;if(typeof nt=="string")qe=!1;else{var rt=Le[ht.charAt(0)];if(rt)Oe=ht.match(rt[1]),nt=rt[0];else{for(var ot=0;ot<B;++ot)if(rt=Y[ot],Oe=ht.match(rt[1]),Oe){nt=rt[0];break}Oe||(nt=Me)}qe=nt.length>=5&&nt.substring(0,5)==="lang-",qe&&!(Oe&&typeof Oe[1]=="string")&&(qe=!1,nt=ue),qe||(Ae[ht]=nt)}var Rt=we;if(we+=ht.length,!qe)Te.push(de+Rt,nt);else{var S=Oe[1],R=ht.indexOf(S),Ze=R+S.length;Oe[2]&&(Ze=ht.length-Oe[2].length,R=Ze-S.length);var J=nt.substring(5);w(ye,de+Rt,ht.substring(0,R),P,Te),w(ye,de+Rt+R,S,St(J,S),Te),w(ye,de+Rt+Ze,ht.substring(Ze),P,Te)}}ce.decorations=Te};return P}function ft(_e){var Y=[],Le=[];_e.tripleQuotedStrings?Y.push([D,/^(?:\'\'\'(?:[^\'\\]|\\[\s\S]|\'{1,2}(?=[^\']))*(?:\'\'\'|$)|\"\"\"(?:[^\"\\]|\\[\s\S]|\"{1,2}(?=[^\"]))*(?:\"\"\"|$)|\'(?:[^\\\']|\\[\s\S])*(?:\'|$)|\"(?:[^\\\"]|\\[\s\S])*(?:\"|$))/,null,`'"`]):_e.multiLineStrings?Y.push([D,/^(?:\'(?:[^\\\']|\\[\s\S])*(?:\'|$)|\"(?:[^\\\"]|\\[\s\S])*(?:\"|$)|\`(?:[^\\\`]|\\[\s\S])*(?:\`|$))/,null,"'\"`"]):Y.push([D,/^(?:\'(?:[^\\\'\r\n]|\\.)*(?:\'|$)|\"(?:[^\\\"\r\n]|\\.)*(?:\"|$))/,null,`"'`]),_e.verbatimStrings&&Le.push([D,/^@\"(?:[^\"]|\"\")*(?:\"|$)/,null]);var Ce=_e.hashComments;Ce&&(_e.cStyleComments?(Ce>1?Y.push([re,/^#(?:##(?:[^#]|#(?!##))*(?:###|$)|.*)/,null,"#"]):Y.push([re,/^#(?:(?:define|e(?:l|nd)if|else|error|ifn?def|include|line|pragma|undef|warning)\b|[^\r\n]*)/,null,"#"]),Le.push([D,/^<(?:(?:(?:\.\.\/)*|\/?)(?:[\w-]+(?:\/[\w-]+)+)?[\w-]+\.h(?:h|pp|\+\+)?|[a-z]\w*)>/,null])):Y.push([re,/^#[^\r\n]*/,null,"#"])),_e.cStyleComments&&(Le.push([re,/^\/\/[^\r\n]*/,null]),Le.push([re,/^\/\*[\s\S]*?(?:\*\/|$)/,null]));var B=_e.regexLiterals;if(B){var P=B>1?"":`
|
|
|
\r`,ce=P?".":"[\\S\\s]",ve="/(?=[^/*"+P+"])(?:[^/\\x5B\\x5C"+P+"]|\\x5C"+ce+"|\\x5B(?:[^\\x5C\\x5D"+P+"]|\\x5C"+ce+")*(?:\\x5D|$))+/";Le.push(["lang-regex",RegExp("^"+Q+"("+ve+")")])}var de=_e.types;de&&Le.push([oe,de]);var ye=(""+_e.keywords).replace(/^ | $/g,"");ye.length&&Le.push([O,new RegExp("^(?:"+ye.replace(/[\s,]+/g,"|")+")\\b"),null]),Y.push([Me,/^\s+/,null,` \r
|
|
|
\xA0`]);var Te="^.[^\\s\\w.$@'\"`/\\\\]*";return _e.regexLiterals&&(Te+="(?!s*/)"),Le.push([ie,/^@[a-z_$][a-z_$@0-9]*/i,null],[oe,/^(?:[@_]?[A-Z]+[a-z][A-Za-z_$@0-9]*|\w+_t\b)/,null],[Me,/^[a-z_$][a-z_$@0-9]*/i,null],[ie,new RegExp("^(?:0x[a-f0-9]+|(?:\\d(?:_\\d+)*\\d*(?:\\.\\d*)?|\\.\\d\\+)(?:e[+\\-]?\\d+)?)[a-z]*","i"),null,"0123456789"],[Me,/^\\[\s\S]?/,null],[Ee,new RegExp(Te),null]),Ke(Y,Le)}var Ue=ft({keywords:A,hashComments:!0,cStyleComments:!0,multiLineStrings:!0,regexLiterals:!0});function st(_e,Y,Le){for(var Ce=/(?:^|\s)nocode(?:\s|$)/,B=/\r\n?|\n/,P=_e.ownerDocument,ce=P.createElement("li");_e.firstChild;)ce.appendChild(_e.firstChild);var ve=[ce];function de(Xe){var gt=Xe.nodeType;if(gt==1&&!Ce.test(Xe.className))if(Xe.nodeName==="br")ye(Xe),Xe.parentNode&&Xe.parentNode.removeChild(Xe);else for(var ht=Xe.firstChild;ht;ht=ht.nextSibling)de(ht);else if((gt==3||gt==4)&&Le){var nt=Xe.nodeValue,Oe=nt.match(B);if(Oe){var qe=nt.substring(0,Oe.index);Xe.nodeValue=qe;var rt=nt.substring(Oe.index+Oe[0].length);if(rt){var ot=Xe.parentNode;ot.insertBefore(P.createTextNode(rt),Xe.nextSibling)}ye(Xe),qe||Xe.parentNode.removeChild(Xe)}}}function ye(Xe){for(;!Xe.nextSibling;)if(Xe=Xe.parentNode,!Xe)return;function gt(Oe,qe){var rt=qe?Oe.cloneNode(!1):Oe,ot=Oe.parentNode;if(ot){var Rt=gt(ot,1),S=Oe.nextSibling;Rt.appendChild(rt);for(var R=S;R;R=S)S=R.nextSibling,Rt.appendChild(R)}return rt}for(var ht=gt(Xe.nextSibling,0),nt;(nt=ht.parentNode)&&nt.nodeType===1;)ht=nt;ve.push(ht)}for(var Te=0;Te<ve.length;++Te)de(ve[Te]);Y===(Y|0)&&ve[0].setAttribute("value",Y);var we=P.createElement("ol");we.className="linenums";for(var Ie=Math.max(0,Y-1|0)||0,Te=0,Ae=ve.length;Te<Ae;++Te)ce=ve[Te],ce.className="L"+(Te+Ie)%10,ce.firstChild||ce.appendChild(P.createTextNode("\xA0")),we.appendChild(ce);_e.appendChild(we)}function pt(_e){var Y=/\bMSIE\s(\d+)/.exec(navigator.userAgent);Y=Y&&+Y[1]<=8;var Le=/\n/g,Ce=_e.sourceCode,B=Ce.length,P=0,ce=_e.spans,ve=ce.length,de=0,ye=_e.decorations,Te=ye.length,we=0;ye[Te]=B;var Ie,Ae;for(Ae=Ie=0;Ae<Te;)ye[Ae]!==ye[Ae+2]?(ye[Ie++]=ye[Ae++],ye[Ie++]=ye[Ae++]):Ae+=2;for(Te=Ie,Ae=Ie=0;Ae<Te;){for(var Xe=ye[Ae],gt=ye[Ae+1],ht=Ae+2;ht+2<=Te&&ye[ht+1]===gt;)ht+=2;ye[Ie++]=Xe,ye[Ie++]=gt,Ae=ht}Te=ye.length=Ie;var nt=_e.sourceNode,Oe="";nt&&(Oe=nt.style.display,nt.style.display="none");try{for(var qe=null;de<ve;){var rt=ce[de],ot=ce[de+2]||B,Rt=ye[we+2]||B,ht=Math.min(ot,Rt),S=ce[de+1],R;if(S.nodeType!==1&&(R=Ce.substring(P,ht))){Y&&(R=R.replace(Le,"\r")),S.nodeValue=R;var Ze=S.ownerDocument,J=Ze.createElement("span");J.className=ye[we+1];var be=S.parentNode;be.replaceChild(J,S),J.appendChild(S),P<ot&&(ce[de+1]=S=Ze.createTextNode(Ce.substring(ht,ot)),be.insertBefore(S,J.nextSibling))}P=ht,P>=ot&&(de+=2),P>=Rt&&(we+=2)}}finally{nt&&(nt.style.display=Oe)}}var Et={};function Ne(_e,Y){for(var Le=Y.length;--Le>=0;){var Ce=Y[Le];Et.hasOwnProperty(Ce)?g.console&&console.warn("cannot override language handler %s",Ce):Et[Ce]=_e}}function St(_e,Y){return _e&&Et.hasOwnProperty(_e)||(_e=/^\s*</.test(Y)?"default-markup":"default-code"),Et[_e]}Ne(Ue,["default-code"]),Ne(Ke([],[[Me,/^[^<?]+/],[tt,/^<!\w[^>]*(?:>|$)/],[re,/^<\!--[\s\S]*?(?:-\->|$)/],["lang-",/^<\?([\s\S]+?)(?:\?>|$)/],["lang-",/^<%([\s\S]+?)(?:%>|$)/],[Ee,/^(?:<[%?]|[%?]>)/],["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"]),Ne(Ke([[Me,/^[\s]+/,null,` \r
|
|
|
`],[L,/^(?:\"[^\"]*\"?|\'[^\']*\'?)/,null,`"'`]],[[ke,/^^<\/?[a-z](?:[\w.:-]*\w)?|\/?>$/i],[X,/^(?!style[\s=]|on)[a-z](?:[\w:-]*\w)?/i],["lang-uq.val",/^=\s*([^>\'\"\s]*(?:[^>\'\"\s\/]|\/(?=\s)))/],[Ee,/^[=<>\/]+/],["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"]),Ne(Ke([],[[L,/^[\s\S]+/]]),["uq.val"]),Ne(ft({keywords:C,hashComments:!0,cStyleComments:!0,types:K}),["c","cc","cpp","cxx","cyc","m"]),Ne(ft({keywords:"null,true,false"}),["json"]),Ne(ft({keywords:y,hashComments:!0,cStyleComments:!0,verbatimStrings:!0,types:K}),["cs"]),Ne(ft({keywords:M,cStyleComments:!0}),["java"]),Ne(ft({keywords:U,hashComments:!0,multiLineStrings:!0}),["bash","bsh","csh","sh"]),Ne(ft({keywords:j,hashComments:!0,multiLineStrings:!0,tripleQuotedStrings:!0}),["cv","py","python"]),Ne(ft({keywords:k,hashComments:!0,multiLineStrings:!0,regexLiterals:2}),["perl","pl","pm"]),Ne(ft({keywords:Z,hashComments:!0,multiLineStrings:!0,regexLiterals:!0}),["rb","ruby"]),Ne(ft({keywords:T,cStyleComments:!0,regexLiterals:!0}),["javascript","js","ts","typescript"]),Ne(ft({keywords:E,hashComments:3,cStyleComments:!0,multilineStrings:!0,tripleQuotedStrings:!0,regexLiterals:!0}),["coffee"]),Ne(Ke([],[[D,/^[\s\S]+/]]),["regex"]);function at(_e){var Y=_e.langExtension;try{var Le=x(_e.sourceNode,_e.pre),Ce=Le.sourceCode;_e.sourceCode=Ce,_e.spans=Le.spans,_e.basePos=0,St(Y,Ce)(_e),pt(_e)}catch(B){g.console&&console.log(B&&B.stack||B)}}function Nt(_e,Y,Le){var Ce=Le||!1,B=Y||null,P=document.createElement("div");P.innerHTML="<pre>"+_e+"</pre>",P=P.firstChild,Ce&&st(P,Ce,!0);var ce={langExtension:B,numberLines:Ce,sourceNode:P,pre:1,sourceCode:null,basePos:null,spans:null,decorations:null};return at(ce),P.innerHTML}function Ge(_e,Y){var Le=Y||document.body,Ce=Le.ownerDocument||document;function B(rt){return Le.getElementsByTagName(rt)}for(var P=[B("pre"),B("code"),B("xmp")],ce=[],ve=0;ve<P.length;++ve)for(var de=0,ye=P[ve].length;de<ye;++de)ce.push(P[ve][de]);P=null;var Te=Date;Te.now||(Te={now:function(){return+new Date}});var we=0,Ie=/\blang(?:uage)?-([\w.]+)(?!\S)/,Ae=/\bprettyprint\b/,Xe=/\bprettyprinted\b/,gt=/pre|xmp/i,ht=/^code$/i,nt=/^(?:pre|code|xmp)$/i,Oe={};function qe(){for(var rt=g.PR_SHOULD_USE_CONTINUATION?Te.now()+250:1/0;we<ce.length&&Te.now()<rt;we++){for(var ot=ce[we],Rt=Oe,S=ot;S=S.previousSibling;){var R=S.nodeType,Ze=(R===7||R===8)&&S.nodeValue;if(Ze?!/^\??prettify\b/.test(Ze):R!==3||/\S/.test(S.nodeValue))break;if(Ze){Rt={},Ze.replace(/\b(\w+)=([\w:.%+-]+)/g,function(xe,Bt,en){Rt[Bt]=en});break}}var J=ot.className;if((Rt!==Oe||Ae.test(J))&&!Xe.test(J)){for(var be=!1,zt=ot.parentNode;zt;zt=zt.parentNode){var ze=zt.tagName;if(nt.test(ze)&&zt.className&&Ae.test(zt.className)){be=!0;break}}if(!be){ot.className+=" prettyprinted";var Qe=Rt.lang;if(!Qe){Qe=J.match(Ie);var lt;!Qe&&(lt=he(ot))&&ht.test(lt.tagName)&&(Qe=lt.className.match(Ie)),Qe&&(Qe=Qe[1])}var le;if(gt.test(ot.tagName))le=1;else{var pe=ot.currentStyle,Pe=Ce.defaultView,$e=pe?pe.whiteSpace:Pe&&Pe.getComputedStyle?Pe.getComputedStyle(ot,null).getPropertyValue("white-space"):0;le=$e&&$e.substring(0,3)==="pre"}var G=Rt.linenums;(G=G==="true"||+G)||(G=J.match(/\blinenums\b(?::(\d+))?/),G=G?G[1]&&G[1].length?+G[1]:!0:!1),G&&st(ot,G,le);var bt={langExtension:Qe,sourceNode:ot,numberLines:G,pre:le,sourceCode:null,basePos:null,spans:null,decorations:null};at(bt)}}}we<ce.length?g.setTimeout(qe,250):typeof _e=="function"&&_e()}qe()}var je=g.PR={createSimpleLexer:Ke,registerLangHandler:Ne,sourceDecorator:ft,PR_ATTRIB_NAME:X,PR_ATTRIB_VALUE:L,PR_COMMENT:re,PR_DECLARATION:tt,PR_KEYWORD:O,PR_LITERAL:ie,PR_NOCODE:se,PR_PLAIN:Me,PR_PUNCTUATION:Ee,PR_SOURCE:ue,PR_STRING:D,PR_TAG:ke,PR_TYPE:oe,prettyPrintOne:v?g.prettyPrintOne=Nt:fe=Nt,prettyPrint:z=v?g.prettyPrint=Ge:z=Ge},Re=g.define;typeof Re=="function"&&Re.amd&&Re("google-code-prettify",[],function(){return je})})()},25769:function(ln,mt,m){"use strict";var v=m(98040),ae={"text/plain":"Text","text/html":"Url",default:"Text"},W="Copy to clipboard: #{key}, Enter";function fe(g){var q=(/mac os x/i.test(navigator.userAgent)?"\u2318":"Ctrl")+"+C";return g.replace(/#{\s*key\s*}/g,q)}function z(g,q){var te,o,C,M,y,E,T=!1;q||(q={}),te=q.debug||!1;try{C=v(),M=document.createRange(),y=document.getSelection(),E=document.createElement("span"),E.textContent=g,E.ariaHidden="true",E.style.all="unset",E.style.position="fixed",E.style.top=0,E.style.clip="rect(0, 0, 0, 0)",E.style.whiteSpace="pre",E.style.webkitUserSelect="text",E.style.MozUserSelect="text",E.style.msUserSelect="text",E.style.userSelect="text",E.addEventListener("copy",function(j){if(j.stopPropagation(),q.format)if(j.preventDefault(),typeof j.clipboardData=="undefined"){te&&console.warn("unable to use e.clipboardData"),te&&console.warn("trying IE specific stuff"),window.clipboardData.clearData();var Z=ae[q.format]||ae.default;window.clipboardData.setData(Z,g)}else j.clipboardData.clearData(),j.clipboardData.setData(q.format,g);q.onCopy&&(j.preventDefault(),q.onCopy(j.clipboardData))}),document.body.appendChild(E),M.selectNodeContents(E),y.addRange(M);var k=document.execCommand("copy");if(!k)throw new Error("copy command was unsuccessful");T=!0}catch(j){te&&console.error("unable to copy using execCommand: ",j),te&&console.warn("trying IE specific stuff");try{window.clipboardData.setData(q.format||"text",g),q.onCopy&&q.onCopy(window.clipboardData),T=!0}catch(Z){te&&console.error("unable to copy using clipboardData: ",Z),te&&console.error("falling back to prompt"),o=fe("message"in q?q.message:W),window.prompt(o,g)}}finally{y&&(typeof y.removeRange=="function"?y.removeRange(M):y.removeAllRanges()),E&&document.body.removeChild(E),C()}return T}ln.exports=z},53184:function(ln,mt,m){"use strict";var v,ae;function W(fe,z,g){var q=function(te,o){return fe.js_beautify(te,o)};return q.js=fe.js_beautify,q.css=z.css_beautify,q.html=g.html_beautify,q.js_beautify=fe.js_beautify,q.css_beautify=z.css_beautify,q.html_beautify=g.html_beautify,q}v=[m(58553),m(87804),m(40998)],ae=function(fe,z,g){return W(fe,z,g)}.apply(mt,v),ae!==void 0&&(ln.exports=ae)},87804:function(ln,mt){var m,v;(function(){var ae;(function(){"use strict";var fe=[,,function(te){function o(y){this.__parent=y,this.__character_count=0,this.__indent_count=-1,this.__alignment_count=0,this.__wrap_point_index=0,this.__wrap_point_character_count=0,this.__wrap_point_indent_count=-1,this.__wrap_point_alignment_count=0,this.__items=[]}o.prototype.clone_empty=function(){var y=new o(this.__parent);return y.set_indent(this.__indent_count,this.__alignment_count),y},o.prototype.item=function(y){return y<0?this.__items[this.__items.length+y]:this.__items[y]},o.prototype.has_match=function(y){for(var E=this.__items.length-1;E>=0;E--)if(this.__items[E].match(y))return!0;return!1},o.prototype.set_indent=function(y,E){this.is_empty()&&(this.__indent_count=y||0,this.__alignment_count=E||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 y=this.__parent.current_line;return y.set_indent(this.__wrap_point_indent_count,this.__wrap_point_alignment_count),y.__items=this.__items.slice(this.__wrap_point_index),this.__items=this.__items.slice(0,this.__wrap_point_index),y.__character_count+=this.__character_count-this.__wrap_point_character_count,this.__character_count=this.__wrap_point_character_count,y.__items[0]===" "&&(y.__items.splice(0,1),y.__character_count-=1),!0}return!1},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(y){this.__items.push(y);var E=y.lastIndexOf(`
|
|
|
`);E!==-1?this.__character_count=y.length-E:this.__character_count+=y.length},o.prototype.pop=function(){var y=null;return this.is_empty()||(y=this.__items.pop(),this.__character_count-=y.length),y},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 y="";return this.is_empty()?this.__parent.indent_empty_lines&&(y=this.__parent.get_indent_string(this.__indent_count)):(y=this.__parent.get_indent_string(this.__indent_count,this.__alignment_count),y+=this.__items.join("")),y};function C(y,E){this.__cache=[""],this.__indent_size=y.indent_size,this.__indent_string=y.indent_char,y.indent_with_tabs||(this.__indent_string=new Array(y.indent_size+1).join(y.indent_char)),E=E||"",y.indent_level>0&&(E=new Array(y.indent_level+1).join(this.__indent_string)),this.__base_string=E,this.__base_string_length=E.length}C.prototype.get_indent_size=function(y,E){var T=this.__base_string_length;return E=E||0,y<0&&(T=0),T+=y*this.__indent_size,T+=E,T},C.prototype.get_indent_string=function(y,E){var T=this.__base_string;return E=E||0,y<0&&(y=0,T=""),E+=y*this.__indent_size,this.__ensure_cache(E),T+=this.__cache[E],T},C.prototype.__ensure_cache=function(y){for(;y>=this.__cache.length;)this.__add_column()},C.prototype.__add_column=function(){var y=this.__cache.length,E=0,T="";this.__indent_size&&y>=this.__indent_size&&(E=Math.floor(y/this.__indent_size),y-=E*this.__indent_size,T=new Array(E+1).join(this.__indent_string)),y&&(T+=new Array(y+1).join(" ")),this.__cache.push(T)};function M(y,E){this.__indent_cache=new C(y,E),this.raw=!1,this._end_with_newline=y.end_with_newline,this.indent_size=y.indent_size,this.wrap_line_length=y.wrap_line_length,this.indent_empty_lines=y.indent_empty_lines,this.__lines=[],this.previous_line=null,this.current_line=null,this.next_line=new o(this),this.space_before_token=!1,this.non_breaking_space=!1,this.previous_token_wrapped=!1,this.__add_outputline()}M.prototype.__add_outputline=function(){this.previous_line=this.current_line,this.current_line=this.next_line.clone_empty(),this.__lines.push(this.current_line)},M.prototype.get_line_number=function(){return this.__lines.length},M.prototype.get_indent_string=function(y,E){return this.__indent_cache.get_indent_string(y,E)},M.prototype.get_indent_size=function(y,E){return this.__indent_cache.get_indent_size(y,E)},M.prototype.is_empty=function(){return!this.previous_line&&this.current_line.is_empty()},M.prototype.add_new_line=function(y){return this.is_empty()||!y&&this.just_added_newline()?!1:(this.raw||this.__add_outputline(),!0)},M.prototype.get_code=function(y){this.trim(!0);var E=this.current_line.pop();E&&(E[E.length-1]===`
|
|
|
`&&(E=E.replace(/\n+$/g,"")),this.current_line.push(E)),this._end_with_newline&&this.__add_outputline();var T=this.__lines.join(`
|
|
|
`);return y!==`
|
|
|
`&&(T=T.replace(/[\n]/g,y)),T},M.prototype.set_wrap_point=function(){this.current_line._set_wrap_point()},M.prototype.set_indent=function(y,E){return y=y||0,E=E||0,this.next_line.set_indent(y,E),this.__lines.length>1?(this.current_line.set_indent(y,E),!0):(this.current_line.set_indent(),!1)},M.prototype.add_raw_token=function(y){for(var E=0;E<y.newlines;E++)this.__add_outputline();this.current_line.set_indent(-1),this.current_line.push(y.whitespace_before),this.current_line.push(y.text),this.space_before_token=!1,this.non_breaking_space=!1,this.previous_token_wrapped=!1},M.prototype.add_token=function(y){this.__add_space_before_token(),this.current_line.push(y),this.space_before_token=!1,this.non_breaking_space=!1,this.previous_token_wrapped=this.current_line._allow_wrap()},M.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(" "))},M.prototype.remove_indent=function(y){for(var E=this.__lines.length;y<E;)this.__lines[y]._remove_indent(),y++;this.current_line._remove_wrap_indent()},M.prototype.trim=function(y){for(y=y===void 0?!1:y,this.current_line.trim();y&&this.__lines.length>1&&this.current_line.is_empty();)this.__lines.pop(),this.current_line=this.__lines[this.__lines.length-1],this.current_line.trim();this.previous_line=this.__lines.length>1?this.__lines[this.__lines.length-2]:null},M.prototype.just_added_newline=function(){return this.current_line.is_empty()},M.prototype.just_added_blankline=function(){return this.is_empty()||this.current_line.is_empty()&&this.previous_line.is_empty()},M.prototype.ensure_empty_line_above=function(y,E){for(var T=this.__lines.length-2;T>=0;){var k=this.__lines[T];if(k.is_empty())break;if(k.item(0).indexOf(y)!==0&&k.item(-1)!==E){this.__lines.splice(T+1,0,new o(this)),this.previous_line=this.__lines[this.__lines.length-2];break}T--}},te.exports.Output=M},,,,function(te){function o(y,E){this.raw_options=C(y,E),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(y,E){var T=this.raw_options[y],k=E||[];return typeof T=="object"?T!==null&&typeof T.concat=="function"&&(k=T.concat()):typeof T=="string"&&(k=T.split(/[^a-zA-Z0-9_\/\-]+/)),k},o.prototype._get_boolean=function(y,E){var T=this.raw_options[y],k=T===void 0?!!E:!!T;return k},o.prototype._get_characters=function(y,E){var T=this.raw_options[y],k=E||"";return typeof T=="string"&&(k=T.replace(/\\r/,"\r").replace(/\\n/,`
|
|
|
`).replace(/\\t/," ")),k},o.prototype._get_number=function(y,E){var T=this.raw_options[y];E=parseInt(E,10),isNaN(E)&&(E=0);var k=parseInt(T,10);return isNaN(k)&&(k=E),k},o.prototype._get_selection=function(y,E,T){var k=this._get_selection_list(y,E,T);if(k.length!==1)throw new Error("Invalid Option Value: The option '"+y+`' can only be one of the following values:
|
|
|
`+E+`
|
|
|
You passed in: '`+this.raw_options[y]+"'");return k[0]},o.prototype._get_selection_list=function(y,E,T){if(!E||E.length===0)throw new Error("Selection list cannot be empty.");if(T=T||[E[0]],!this._is_valid_selection(T,E))throw new Error("Invalid Default Value!");var k=this._get_array(y,T);if(!this._is_valid_selection(k,E))throw new Error("Invalid Option Value: The option '"+y+`' can contain only the following values:
|
|
|
`+E+`
|
|
|
You passed in: '`+this.raw_options[y]+"'");return k},o.prototype._is_valid_selection=function(y,E){return y.length&&E.length&&!y.some(function(T){return E.indexOf(T)===-1})};function C(y,E){var T={};y=M(y);var k;for(k in y)k!==E&&(T[k]=y[k]);if(E&&y[E])for(k in y[E])T[k]=y[E][k];return T}function M(y){var E={},T;for(T in y){var k=T.replace(/-/g,"_");E[k]=y[T]}return E}te.exports.Options=o,te.exports.normalizeOpts=M,te.exports.mergeOpts=C},,function(te){var o=RegExp.prototype.hasOwnProperty("sticky");function C(M){this.__input=M||"",this.__input_length=this.__input.length,this.__position=0}C.prototype.restart=function(){this.__position=0},C.prototype.back=function(){this.__position>0&&(this.__position-=1)},C.prototype.hasNext=function(){return this.__position<this.__input_length},C.prototype.next=function(){var M=null;return this.hasNext()&&(M=this.__input.charAt(this.__position),this.__position+=1),M},C.prototype.peek=function(M){var y=null;return M=M||0,M+=this.__position,M>=0&&M<this.__input_length&&(y=this.__input.charAt(M)),y},C.prototype.__match=function(M,y){M.lastIndex=y;var E=M.exec(this.__input);return E&&!(o&&M.sticky)&&E.index!==y&&(E=null),E},C.prototype.test=function(M,y){return y=y||0,y+=this.__position,y>=0&&y<this.__input_length?!!this.__match(M,y):!1},C.prototype.testChar=function(M,y){var E=this.peek(y);return M.lastIndex=0,E!==null&&M.test(E)},C.prototype.match=function(M){var y=this.__match(M,this.__position);return y?this.__position+=y[0].length:y=null,y},C.prototype.read=function(M,y,E){var T="",k;return M&&(k=this.match(M),k&&(T+=k[0])),y&&(k||!M)&&(T+=this.readUntil(y,E)),T},C.prototype.readUntil=function(M,y){var E="",T=this.__position;M.lastIndex=this.__position;var k=M.exec(this.__input);return k?(T=k.index,y&&(T+=k[0].length)):T=this.__input_length,E=this.__input.substring(this.__position,T),this.__position=T,E},C.prototype.readUntilAfter=function(M){return this.readUntil(M,!0)},C.prototype.get_regexp=function(M,y){var E=null,T="g";return y&&o&&(T="y"),typeof M=="string"&&M!==""?E=new RegExp(M,T):M&&(E=new RegExp(M.source,T)),E},C.prototype.get_literal_regexp=function(M){return RegExp(M.replace(/[-\/\\^$*+?.()|[\]{}]/g,"\\$&"))},C.prototype.peekUntilAfter=function(M){var y=this.__position,E=this.readUntilAfter(M);return this.__position=y,E},C.prototype.lookBack=function(M){var y=this.__position-1;return y>=M.length&&this.__input.substring(y-M.length,y).toLowerCase()===M},te.exports.InputScanner=C},,,,,function(te){function o(C,M){C=typeof C=="string"?C:C.source,M=typeof M=="string"?M:M.source,this.__directives_block_pattern=new RegExp(C+/ beautify( \w+[:]\w+)+ /.source+M,"g"),this.__directive_pattern=/ (\w+)[:](\w+)/g,this.__directives_end_ignore_pattern=new RegExp(C+/\sbeautify\signore:end\s/.source+M,"g")}o.prototype.get_directives=function(C){if(!C.match(this.__directives_block_pattern))return null;var M={};this.__directive_pattern.lastIndex=0;for(var y=this.__directive_pattern.exec(C);y;)M[y[1]]=y[2],y=this.__directive_pattern.exec(C);return M},o.prototype.readIgnored=function(C){return C.readUntilAfter(this.__directives_end_ignore_pattern)},te.exports.Directives=o},,function(te,o,C){var M=C(16).Beautifier,y=C(17).Options;function E(T,k){var j=new M(T,k);return j.beautify()}te.exports=E,te.exports.defaultOptions=function(){return new y}},function(te,o,C){var M=C(17).Options,y=C(2).Output,E=C(8).InputScanner,T=C(13).Directives,k=new T(/\/\*/,/\*\//),j=/\r\n|[\r\n]/,Z=/\r\n|[\r\n]/g,U=/\s/,A=/(?:\s|\n)+/g,K=/\/\*(?:[\s\S]*?)((?:\*\/)|$)/g,D=/\/\/(?:[^\n\r\u2028\u2029]*)/g;function O(re,oe){this._source_text=re||"",this._options=new M(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"]}O.prototype.eatString=function(re){var oe="";for(this._ch=this._input.next();this._ch;){if(oe+=this._ch,this._ch==="\\")oe+=this._input.next();else if(re.indexOf(this._ch)!==-1||this._ch===`
|
|
|
`)break;this._ch=this._input.next()}return oe},O.prototype.eatWhitespace=function(re){for(var oe=U.test(this._input.peek()),ie=0;U.test(this._input.peek());)this._ch=this._input.next(),re&&this._ch===`
|
|
|
`&&(ie===0||ie<this._options.max_preserve_newlines)&&(ie++,this._output.add_new_line(!0));return oe},O.prototype.foundNestedPseudoClass=function(){for(var re=0,oe=1,ie=this._input.peek(oe);ie;){if(ie==="{")return!0;if(ie==="(")re+=1;else if(ie===")"){if(re===0)return!1;re-=1}else if(ie===";"||ie==="}")return!1;oe++,ie=this._input.peek(oe)}return!1},O.prototype.print_string=function(re){this._output.set_indent(this._indentLevel),this._output.non_breaking_space=!0,this._output.add_token(re)},O.prototype.preserveSingleSpace=function(re){re&&(this._output.space_before_token=!0)},O.prototype.indent=function(){this._indentLevel++},O.prototype.outdent=function(){this._indentLevel>0&&this._indentLevel--},O.prototype.beautify=function(){if(this._options.disabled)return this._source_text;var re=this._source_text,oe=this._options.eol;oe==="auto"&&(oe=`
|
|
|
`,re&&j.test(re||"")&&(oe=re.match(j)[0])),re=re.replace(Z,`
|
|
|
`);var ie=re.match(/^[\t ]*/)[0];this._output=new y(this._options,ie),this._input=new E(re),this._indentLevel=0,this._nestedLevel=0,this._ch=null;for(var Ee=0,Me=!1,ke=!1,tt=!1,ue=!1,X=!1,L=this._ch,se=!1,Q,V,x;Q=this._input.read(A),V=Q!=="",x=L,this._ch=this._input.next(),this._ch==="\\"&&this._input.hasNext()&&(this._ch+=this._input.next()),L=this._ch,this._ch;)if(this._ch==="/"&&this._input.peek()==="*"){this._output.add_new_line(),this._input.back();var w=this._input.read(K),H=k.get_directives(w);H&&H.ignore==="start"&&(w+=k.readIgnored(this._input)),this.print_string(w),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(D)),this.eatWhitespace(!0);else if(this._ch==="$"){this.preserveSingleSpace(V),this.print_string(this._ch);var he=this._input.peekUntilAfter(/[: ,;{}()[\]\/='"]/g);he.match(/[ :]$/)&&(he=this.eatString(": ").replace(/\s+$/,""),this.print_string(he),this._output.space_before_token=!0),Ee===0&&he.indexOf(":")!==-1&&(ke=!0,this.indent())}else if(this._ch==="@")if(this.preserveSingleSpace(V),this._input.peek()==="{")this.print_string(this._ch+this.eatString("}"));else{this.print_string(this._ch);var Ke=this._input.peekUntilAfter(/[: ,;{}()[\]\/='"]/g);Ke.match(/[ :]$/)&&(Ke=this.eatString(": ").replace(/\s+$/,""),this.print_string(Ke),this._output.space_before_token=!0),Ee===0&&Ke.indexOf(":")!==-1?(ke=!0,this.indent()):Ke in this.NESTED_AT_RULE?(this._nestedLevel+=1,Ke in this.CONDITIONAL_GROUP_RULE&&(tt=!0)):Ee===0&&!ke&&(ue=!0)}else if(this._ch==="#"&&this._input.peek()==="{")this.preserveSingleSpace(V),this.print_string(this._ch+this.eatString("}"));else if(this._ch==="{")ke&&(ke=!1,this.outdent()),ue=!1,tt?(tt=!1,Me=this._indentLevel>=this._nestedLevel):Me=this._indentLevel>=this._nestedLevel-1,this._options.newline_between_rules&&Me&&this._output.previous_line&&this._output.previous_line.item(-1)!=="{"&&this._output.ensure_empty_line_above("/",","),this._output.space_before_token=!0,this._options.brace_style==="expand"?(this._output.add_new_line(),this.print_string(this._ch),this.indent(),this._output.set_indent(this._indentLevel)):(x==="("?this._output.space_before_token=!1:x!==","&&this.indent(),this.print_string(this._ch)),this.eatWhitespace(!0),this._output.add_new_line();else if(this._ch==="}")this.outdent(),this._output.add_new_line(),x==="{"&&this._output.trim(!0),ke&&(this.outdent(),ke=!1),this.print_string(this._ch),Me=!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 ft=0;ft<this.NON_SEMICOLON_NEWLINE_PROPERTY.length;ft++)if(this._input.lookBack(this.NON_SEMICOLON_NEWLINE_PROPERTY[ft])){se=!0;break}(Me||tt)&&!(this._input.lookBack("&")||this.foundNestedPseudoClass())&&!this._input.lookBack("(")&&!ue&&Ee===0?(this.print_string(":"),ke||(ke=!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=x==='"'||x==="'";this.preserveSingleSpace(Ue||V),this.print_string(this._ch+this.eatString(this._ch)),this.eatWhitespace(!0)}else if(this._ch===";")se=!1,Ee===0?(ke&&(this.outdent(),ke=!1),ue=!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(),Ee++,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(")")),Ee&&(Ee--,this.outdent()));else{var st=!1;this._input.lookBack("with")&&(st=!0),this.preserveSingleSpace(V||st),this.print_string(this._ch),ke&&x==="$"&&this._options.selector_separator_newline?(this._output.add_new_line(),X=!0):(this.eatWhitespace(),Ee++,this.indent())}else if(this._ch===")")Ee&&(Ee--,this.outdent()),X&&this._input.peek()===";"&&this._options.selector_separator_newline&&(X=!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&&(!ke||X)&&Ee===0&&!ue?this._output.add_new_line():this._output.space_before_token=!0;else if((this._ch===">"||this._ch==="+"||this._ch==="~")&&!ke&&Ee===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&&U.test(this._ch)&&(this._ch=""));else if(this._ch==="]")this.print_string(this._ch);else if(this._ch==="[")this.preserveSingleSpace(V),this.print_string(this._ch);else if(this._ch==="=")this.eatWhitespace(),this.print_string("="),U.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 pt=x==='"'||x==="'";this.preserveSingleSpace(pt||V),this.print_string(this._ch),!this._output.just_added_newline()&&this._input.peek()===`
|
|
|
`&&se&&this._output.add_new_line()}var Et=this._output.get_code(oe);return Et},te.exports.Beautifier=O},function(te,o,C){var M=C(6).Options;function y(E){M.call(this,E,"css"),this.selector_separator_newline=this._get_boolean("selector_separator_newline",!0),this.newline_between_rules=this._get_boolean("newline_between_rules",!0);var T=this._get_boolean("space_around_selector_separator");this.space_around_combinator=this._get_boolean("space_around_combinator")||T;var k=this._get_selection_list("brace_style",["collapse","expand","end-expand","none","preserve-inline"]);this.brace_style="collapse";for(var j=0;j<k.length;j++)k[j]!=="expand"?this.brace_style="collapse":this.brace_style=k[j]}y.prototype=new M,te.exports.Options=y}],z={};function g(te){var o=z[te];if(o!==void 0)return o.exports;var C=z[te]={exports:{}};return fe[te](C,C.exports,g),C.exports}var q=g(15);ae=q})();var W=ae;m=[],v=function(){return{css_beautify:W}}.apply(mt,m),v!==void 0&&(ln.exports=v)})()},40998:function(ln,mt,m){var v,ae;(function(){var W;(function(){"use strict";var q=[,,function(M){function y(k){this.__parent=k,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=[]}y.prototype.clone_empty=function(){var k=new y(this.__parent);return k.set_indent(this.__indent_count,this.__alignment_count),k},y.prototype.item=function(k){return k<0?this.__items[this.__items.length+k]:this.__items[k]},y.prototype.has_match=function(k){for(var j=this.__items.length-1;j>=0;j--)if(this.__items[j].match(k))return!0;return!1},y.prototype.set_indent=function(k,j){this.is_empty()&&(this.__indent_count=k||0,this.__alignment_count=j||0,this.__character_count=this.__parent.get_indent_size(this.__indent_count,this.__alignment_count))},y.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)},y.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},y.prototype._allow_wrap=function(){if(this._should_wrap()){this.__parent.add_new_line();var k=this.__parent.current_line;return k.set_indent(this.__wrap_point_indent_count,this.__wrap_point_alignment_count),k.__items=this.__items.slice(this.__wrap_point_index),this.__items=this.__items.slice(0,this.__wrap_point_index),k.__character_count+=this.__character_count-this.__wrap_point_character_count,this.__character_count=this.__wrap_point_character_count,k.__items[0]===" "&&(k.__items.splice(0,1),k.__character_count-=1),!0}return!1},y.prototype.is_empty=function(){return this.__items.length===0},y.prototype.last=function(){return this.is_empty()?null:this.__items[this.__items.length-1]},y.prototype.push=function(k){this.__items.push(k);var j=k.lastIndexOf(`
|
|
|
`);j!==-1?this.__character_count=k.length-j:this.__character_count+=k.length},y.prototype.pop=function(){var k=null;return this.is_empty()||(k=this.__items.pop(),this.__character_count-=k.length),k},y.prototype._remove_indent=function(){this.__indent_count>0&&(this.__indent_count-=1,this.__character_count-=this.__parent.indent_size)},y.prototype._remove_wrap_indent=function(){this.__wrap_point_indent_count>0&&(this.__wrap_point_indent_count-=1)},y.prototype.trim=function(){for(;this.last()===" ";)this.__items.pop(),this.__character_count-=1},y.prototype.toString=function(){var k="";return this.is_empty()?this.__parent.indent_empty_lines&&(k=this.__parent.get_indent_string(this.__indent_count)):(k=this.__parent.get_indent_string(this.__indent_count,this.__alignment_count),k+=this.__items.join("")),k};function E(k,j){this.__cache=[""],this.__indent_size=k.indent_size,this.__indent_string=k.indent_char,k.indent_with_tabs||(this.__indent_string=new Array(k.indent_size+1).join(k.indent_char)),j=j||"",k.indent_level>0&&(j=new Array(k.indent_level+1).join(this.__indent_string)),this.__base_string=j,this.__base_string_length=j.length}E.prototype.get_indent_size=function(k,j){var Z=this.__base_string_length;return j=j||0,k<0&&(Z=0),Z+=k*this.__indent_size,Z+=j,Z},E.prototype.get_indent_string=function(k,j){var Z=this.__base_string;return j=j||0,k<0&&(k=0,Z=""),j+=k*this.__indent_size,this.__ensure_cache(j),Z+=this.__cache[j],Z},E.prototype.__ensure_cache=function(k){for(;k>=this.__cache.length;)this.__add_column()},E.prototype.__add_column=function(){var k=this.__cache.length,j=0,Z="";this.__indent_size&&k>=this.__indent_size&&(j=Math.floor(k/this.__indent_size),k-=j*this.__indent_size,Z=new Array(j+1).join(this.__indent_string)),k&&(Z+=new Array(k+1).join(" ")),this.__cache.push(Z)};function T(k,j){this.__indent_cache=new E(k,j),this.raw=!1,this._end_with_newline=k.end_with_newline,this.indent_size=k.indent_size,this.wrap_line_length=k.wrap_line_length,this.indent_empty_lines=k.indent_empty_lines,this.__lines=[],this.previous_line=null,this.current_line=null,this.next_line=new y(this),this.space_before_token=!1,this.non_breaking_space=!1,this.previous_token_wrapped=!1,this.__add_outputline()}T.prototype.__add_outputline=function(){this.previous_line=this.current_line,this.current_line=this.next_line.clone_empty(),this.__lines.push(this.current_line)},T.prototype.get_line_number=function(){return this.__lines.length},T.prototype.get_indent_string=function(k,j){return this.__indent_cache.get_indent_string(k,j)},T.prototype.get_indent_size=function(k,j){return this.__indent_cache.get_indent_size(k,j)},T.prototype.is_empty=function(){return!this.previous_line&&this.current_line.is_empty()},T.prototype.add_new_line=function(k){return this.is_empty()||!k&&this.just_added_newline()?!1:(this.raw||this.__add_outputline(),!0)},T.prototype.get_code=function(k){this.trim(!0);var j=this.current_line.pop();j&&(j[j.length-1]===`
|
|
|
`&&(j=j.replace(/\n+$/g,"")),this.current_line.push(j)),this._end_with_newline&&this.__add_outputline();var Z=this.__lines.join(`
|
|
|
`);return k!==`
|
|
|
`&&(Z=Z.replace(/[\n]/g,k)),Z},T.prototype.set_wrap_point=function(){this.current_line._set_wrap_point()},T.prototype.set_indent=function(k,j){return k=k||0,j=j||0,this.next_line.set_indent(k,j),this.__lines.length>1?(this.current_line.set_indent(k,j),!0):(this.current_line.set_indent(),!1)},T.prototype.add_raw_token=function(k){for(var j=0;j<k.newlines;j++)this.__add_outputline();this.current_line.set_indent(-1),this.current_line.push(k.whitespace_before),this.current_line.push(k.text),this.space_before_token=!1,this.non_breaking_space=!1,this.previous_token_wrapped=!1},T.prototype.add_token=function(k){this.__add_space_before_token(),this.current_line.push(k),this.space_before_token=!1,this.non_breaking_space=!1,this.previous_token_wrapped=this.current_line._allow_wrap()},T.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(" "))},T.prototype.remove_indent=function(k){for(var j=this.__lines.length;k<j;)this.__lines[k]._remove_indent(),k++;this.current_line._remove_wrap_indent()},T.prototype.trim=function(k){for(k=k===void 0?!1:k,this.current_line.trim();k&&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},T.prototype.just_added_newline=function(){return this.current_line.is_empty()},T.prototype.just_added_blankline=function(){return this.is_empty()||this.current_line.is_empty()&&this.previous_line.is_empty()},T.prototype.ensure_empty_line_above=function(k,j){for(var Z=this.__lines.length-2;Z>=0;){var U=this.__lines[Z];if(U.is_empty())break;if(U.item(0).indexOf(k)!==0&&U.item(-1)!==j){this.__lines.splice(Z+1,0,new y(this)),this.previous_line=this.__lines[this.__lines.length-2];break}Z--}},M.exports.Output=T},function(M){function y(E,T,k,j){this.type=E,this.text=T,this.comments_before=null,this.newlines=k||0,this.whitespace_before=j||"",this.parent=null,this.next=null,this.previous=null,this.opened=null,this.closed=null,this.directives=null}M.exports.Token=y},,,function(M){function y(k,j){this.raw_options=E(k,j),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"])}y.prototype._get_array=function(k,j){var Z=this.raw_options[k],U=j||[];return typeof Z=="object"?Z!==null&&typeof Z.concat=="function"&&(U=Z.concat()):typeof Z=="string"&&(U=Z.split(/[^a-zA-Z0-9_\/\-]+/)),U},y.prototype._get_boolean=function(k,j){var Z=this.raw_options[k],U=Z===void 0?!!j:!!Z;return U},y.prototype._get_characters=function(k,j){var Z=this.raw_options[k],U=j||"";return typeof Z=="string"&&(U=Z.replace(/\\r/,"\r").replace(/\\n/,`
|
|
|
`).replace(/\\t/," ")),U},y.prototype._get_number=function(k,j){var Z=this.raw_options[k];j=parseInt(j,10),isNaN(j)&&(j=0);var U=parseInt(Z,10);return isNaN(U)&&(U=j),U},y.prototype._get_selection=function(k,j,Z){var U=this._get_selection_list(k,j,Z);if(U.length!==1)throw new Error("Invalid Option Value: The option '"+k+`' can only be one of the following values:
|
|
|
`+j+`
|
|
|
You passed in: '`+this.raw_options[k]+"'");return U[0]},y.prototype._get_selection_list=function(k,j,Z){if(!j||j.length===0)throw new Error("Selection list cannot be empty.");if(Z=Z||[j[0]],!this._is_valid_selection(Z,j))throw new Error("Invalid Default Value!");var U=this._get_array(k,Z);if(!this._is_valid_selection(U,j))throw new Error("Invalid Option Value: The option '"+k+`' can contain only the following values:
|
|
|
`+j+`
|
|
|
You passed in: '`+this.raw_options[k]+"'");return U},y.prototype._is_valid_selection=function(k,j){return k.length&&j.length&&!k.some(function(Z){return j.indexOf(Z)===-1})};function E(k,j){var Z={};k=T(k);var U;for(U in k)U!==j&&(Z[U]=k[U]);if(j&&k[j])for(U in k[j])Z[U]=k[j][U];return Z}function T(k){var j={},Z;for(Z in k){var U=Z.replace(/-/g,"_");j[U]=k[Z]}return j}M.exports.Options=y,M.exports.normalizeOpts=T,M.exports.mergeOpts=E},,function(M){var y=RegExp.prototype.hasOwnProperty("sticky");function E(T){this.__input=T||"",this.__input_length=this.__input.length,this.__position=0}E.prototype.restart=function(){this.__position=0},E.prototype.back=function(){this.__position>0&&(this.__position-=1)},E.prototype.hasNext=function(){return this.__position<this.__input_length},E.prototype.next=function(){var T=null;return this.hasNext()&&(T=this.__input.charAt(this.__position),this.__position+=1),T},E.prototype.peek=function(T){var k=null;return T=T||0,T+=this.__position,T>=0&&T<this.__input_length&&(k=this.__input.charAt(T)),k},E.prototype.__match=function(T,k){T.lastIndex=k;var j=T.exec(this.__input);return j&&!(y&&T.sticky)&&j.index!==k&&(j=null),j},E.prototype.test=function(T,k){return k=k||0,k+=this.__position,k>=0&&k<this.__input_length?!!this.__match(T,k):!1},E.prototype.testChar=function(T,k){var j=this.peek(k);return T.lastIndex=0,j!==null&&T.test(j)},E.prototype.match=function(T){var k=this.__match(T,this.__position);return k?this.__position+=k[0].length:k=null,k},E.prototype.read=function(T,k,j){var Z="",U;return T&&(U=this.match(T),U&&(Z+=U[0])),k&&(U||!T)&&(Z+=this.readUntil(k,j)),Z},E.prototype.readUntil=function(T,k){var j="",Z=this.__position;T.lastIndex=this.__position;var U=T.exec(this.__input);return U?(Z=U.index,k&&(Z+=U[0].length)):Z=this.__input_length,j=this.__input.substring(this.__position,Z),this.__position=Z,j},E.prototype.readUntilAfter=function(T){return this.readUntil(T,!0)},E.prototype.get_regexp=function(T,k){var j=null,Z="g";return k&&y&&(Z="y"),typeof T=="string"&&T!==""?j=new RegExp(T,Z):T&&(j=new RegExp(T.source,Z)),j},E.prototype.get_literal_regexp=function(T){return RegExp(T.replace(/[-\/\\^$*+?.()|[\]{}]/g,"\\$&"))},E.prototype.peekUntilAfter=function(T){var k=this.__position,j=this.readUntilAfter(T);return this.__position=k,j},E.prototype.lookBack=function(T){var k=this.__position-1;return k>=T.length&&this.__input.substring(k-T.length,k).toLowerCase()===T},M.exports.InputScanner=E},function(M,y,E){var T=E(8).InputScanner,k=E(3).Token,j=E(10).TokenStream,Z=E(11).WhitespacePattern,U={START:"TK_START",RAW:"TK_RAW",EOF:"TK_EOF"},A=function(K,D){this._input=new T(K),this._options=D||{},this.__tokens=null,this._patterns={},this._patterns.whitespace=new Z(this._input)};A.prototype.tokenize=function(){this._input.restart(),this.__tokens=new j,this._reset();for(var K,D=new k(U.START,""),O=null,re=[],oe=new j;D.type!==U.EOF;){for(K=this._get_next_token(D,O);this._is_comment(K);)oe.add(K),K=this._get_next_token(D,O);oe.isEmpty()||(K.comments_before=oe,oe=new j),K.parent=O,this._is_opening(K)?(re.push(O),O=K):O&&this._is_closing(K,O)&&(K.opened=O,O.closed=K,O=re.pop(),K.parent=O),K.previous=D,D.next=K,this.__tokens.add(K),D=K}return this.__tokens},A.prototype._is_first_token=function(){return this.__tokens.isEmpty()},A.prototype._reset=function(){},A.prototype._get_next_token=function(K,D){this._readWhitespace();var O=this._input.read(/.+/g);return O?this._create_token(U.RAW,O):this._create_token(U.EOF,"")},A.prototype._is_comment=function(K){return!1},A.prototype._is_opening=function(K){return!1},A.prototype._is_closing=function(K,D){return!1},A.prototype._create_token=function(K,D){var O=new k(K,D,this._patterns.whitespace.newline_count,this._patterns.whitespace.whitespace_before_token);return O},A.prototype._readWhitespace=function(){return this._patterns.whitespace.read()},M.exports.Tokenizer=A,M.exports.TOKEN=U},function(M){function y(E){this.__tokens=[],this.__tokens_length=this.__tokens.length,this.__position=0,this.__parent_token=E}y.prototype.restart=function(){this.__position=0},y.prototype.isEmpty=function(){return this.__tokens_length===0},y.prototype.hasNext=function(){return this.__position<this.__tokens_length},y.prototype.next=function(){var E=null;return this.hasNext()&&(E=this.__tokens[this.__position],this.__position+=1),E},y.prototype.peek=function(E){var T=null;return E=E||0,E+=this.__position,E>=0&&E<this.__tokens_length&&(T=this.__tokens[E]),T},y.prototype.add=function(E){this.__parent_token&&(E.parent=this.__parent_token),this.__tokens.push(E),this.__tokens_length+=1},M.exports.TokenStream=y},function(M,y,E){var T=E(12).Pattern;function k(j,Z){T.call(this,j,Z),Z?this._line_regexp=this._input.get_regexp(Z._line_regexp):this.__set_whitespace_patterns("",""),this.newline_count=0,this.whitespace_before_token=""}k.prototype=new T,k.prototype.__set_whitespace_patterns=function(j,Z){j+="\\t ",Z+="\\n\\r",this._match_pattern=this._input.get_regexp("["+j+Z+"]+",!0),this._newline_regexp=this._input.get_regexp("\\r\\n|["+Z+"]")},k.prototype.read=function(){this.newline_count=0,this.whitespace_before_token="";var j=this._input.read(this._match_pattern);if(j===" ")this.whitespace_before_token=" ";else if(j){var Z=this.__split(this._newline_regexp,j);this.newline_count=Z.length-1,this.whitespace_before_token=Z[this.newline_count]}return j},k.prototype.matching=function(j,Z){var U=this._create();return U.__set_whitespace_patterns(j,Z),U._update(),U},k.prototype._create=function(){return new k(this._input,this)},k.prototype.__split=function(j,Z){j.lastIndex=0;for(var U=0,A=[],K=j.exec(Z);K;)A.push(Z.substring(U,K.index)),U=K.index+K[0].length,K=j.exec(Z);return U<Z.length?A.push(Z.substring(U,Z.length)):A.push(""),A},M.exports.WhitespacePattern=k},function(M){function y(E,T){this._input=E,this._starting_pattern=null,this._match_pattern=null,this._until_pattern=null,this._until_after=!1,T&&(this._starting_pattern=this._input.get_regexp(T._starting_pattern,!0),this._match_pattern=this._input.get_regexp(T._match_pattern,!0),this._until_pattern=this._input.get_regexp(T._until_pattern),this._until_after=T._until_after)}y.prototype.read=function(){var E=this._input.read(this._starting_pattern);return(!this._starting_pattern||E)&&(E+=this._input.read(this._match_pattern,this._until_pattern,this._until_after)),E},y.prototype.read_match=function(){return this._input.match(this._match_pattern)},y.prototype.until_after=function(E){var T=this._create();return T._until_after=!0,T._until_pattern=this._input.get_regexp(E),T._update(),T},y.prototype.until=function(E){var T=this._create();return T._until_after=!1,T._until_pattern=this._input.get_regexp(E),T._update(),T},y.prototype.starting_with=function(E){var T=this._create();return T._starting_pattern=this._input.get_regexp(E,!0),T._update(),T},y.prototype.matching=function(E){var T=this._create();return T._match_pattern=this._input.get_regexp(E,!0),T._update(),T},y.prototype._create=function(){return new y(this._input,this)},y.prototype._update=function(){},M.exports.Pattern=y},function(M){function y(E,T){E=typeof E=="string"?E:E.source,T=typeof T=="string"?T:T.source,this.__directives_block_pattern=new RegExp(E+/ beautify( \w+[:]\w+)+ /.source+T,"g"),this.__directive_pattern=/ (\w+)[:](\w+)/g,this.__directives_end_ignore_pattern=new RegExp(E+/\sbeautify\signore:end\s/.source+T,"g")}y.prototype.get_directives=function(E){if(!E.match(this.__directives_block_pattern))return null;var T={};this.__directive_pattern.lastIndex=0;for(var k=this.__directive_pattern.exec(E);k;)T[k[1]]=k[2],k=this.__directive_pattern.exec(E);return T},y.prototype.readIgnored=function(E){return E.readUntilAfter(this.__directives_end_ignore_pattern)},M.exports.Directives=y},function(M,y,E){var T=E(12).Pattern,k={django:!1,erb:!1,handlebars:!1,php:!1,smarty:!1,angular:!1};function j(Z,U){T.call(this,Z,U),this.__template_pattern=null,this._disabled=Object.assign({},k),this._excluded=Object.assign({},k),U&&(this.__template_pattern=this._input.get_regexp(U.__template_pattern),this._excluded=Object.assign(this._excluded,U._excluded),this._disabled=Object.assign(this._disabled,U._disabled));var A=new T(Z);this.__patterns={handlebars_comment:A.starting_with(/{{!--/).until_after(/--}}/),handlebars_unescaped:A.starting_with(/{{{/).until_after(/}}}/),handlebars:A.starting_with(/{{/).until_after(/}}/),php:A.starting_with(/<\?(?:[= ]|php)/).until_after(/\?>/),erb:A.starting_with(/<%[^%]/).until_after(/[^%]%>/),django:A.starting_with(/{%/).until_after(/%}/),django_value:A.starting_with(/{{/).until_after(/}}/),django_comment:A.starting_with(/{#/).until_after(/#}/),smarty:A.starting_with(/{(?=[^}{\s\n])/).until_after(/[^\s\n]}/),smarty_comment:A.starting_with(/{\*/).until_after(/\*}/),smarty_literal:A.starting_with(/{literal}/).until_after(/{\/literal}/)}}j.prototype=new T,j.prototype._create=function(){return new j(this._input,this)},j.prototype._update=function(){this.__set_templated_pattern()},j.prototype.disable=function(Z){var U=this._create();return U._disabled[Z]=!0,U._update(),U},j.prototype.read_options=function(Z){var U=this._create();for(var A in k)U._disabled[A]=Z.templating.indexOf(A)===-1;return U._update(),U},j.prototype.exclude=function(Z){var U=this._create();return U._excluded[Z]=!0,U._update(),U},j.prototype.read=function(){var Z="";this._match_pattern?Z=this._input.read(this._starting_pattern):Z=this._input.read(this._starting_pattern,this.__template_pattern);for(var U=this._read_template();U;)this._match_pattern?U+=this._input.read(this._match_pattern):U+=this._input.readUntil(this.__template_pattern),Z+=U,U=this._read_template();return this._until_after&&(Z+=this._input.readUntilAfter(this._until_pattern)),Z},j.prototype.__set_templated_pattern=function(){var Z=[];this._disabled.php||Z.push(this.__patterns.php._starting_pattern.source),this._disabled.handlebars||Z.push(this.__patterns.handlebars._starting_pattern.source),this._disabled.angular||Z.push(this.__patterns.handlebars._starting_pattern.source),this._disabled.erb||Z.push(this.__patterns.erb._starting_pattern.source),this._disabled.django||(Z.push(this.__patterns.django._starting_pattern.source),Z.push(this.__patterns.django_value._starting_pattern.source),Z.push(this.__patterns.django_comment._starting_pattern.source)),this._disabled.smarty||Z.push(this.__patterns.smarty._starting_pattern.source),this._until_pattern&&Z.push(this._until_pattern.source),this.__template_pattern=this._input.get_regexp("(?:"+Z.join("|")+")")},j.prototype._read_template=function(){var Z="",U=this._input.peek();if(U==="<"){var A=this._input.peek(1);!this._disabled.php&&!this._excluded.php&&A==="?"&&(Z=Z||this.__patterns.php.read()),!this._disabled.erb&&!this._excluded.erb&&A==="%"&&(Z=Z||this.__patterns.erb.read())}else U==="{"&&(!this._disabled.handlebars&&!this._excluded.handlebars&&(Z=Z||this.__patterns.handlebars_comment.read(),Z=Z||this.__patterns.handlebars_unescaped.read(),Z=Z||this.__patterns.handlebars.read()),this._disabled.django||(!this._excluded.django&&!this._excluded.handlebars&&(Z=Z||this.__patterns.django_value.read()),this._excluded.django||(Z=Z||this.__patterns.django_comment.read(),Z=Z||this.__patterns.django.read())),this._disabled.smarty||this._disabled.django&&this._disabled.handlebars&&(Z=Z||this.__patterns.smarty_comment.read(),Z=Z||this.__patterns.smarty_literal.read(),Z=Z||this.__patterns.smarty.read()));return Z},M.exports.TemplatablePattern=j},,,,function(M,y,E){var T=E(19).Beautifier,k=E(20).Options;function j(Z,U,A,K){var D=new T(Z,U,A,K);return D.beautify()}M.exports=j,M.exports.defaultOptions=function(){return new k}},function(M,y,E){var T=E(20).Options,k=E(2).Output,j=E(21).Tokenizer,Z=E(21).TOKEN,U=/\r\n|[\r\n]/,A=/\r\n|[\r\n]/g,K=function(ue,X){this.indent_level=0,this.alignment_size=0,this.max_preserve_newlines=ue.max_preserve_newlines,this.preserve_newlines=ue.preserve_newlines,this._output=new k(ue,X)};K.prototype.current_line_has_match=function(ue){return this._output.current_line.has_match(ue)},K.prototype.set_space_before_token=function(ue,X){this._output.space_before_token=ue,this._output.non_breaking_space=X},K.prototype.set_wrap_point=function(){this._output.set_indent(this.indent_level,this.alignment_size),this._output.set_wrap_point()},K.prototype.add_raw_token=function(ue){this._output.add_raw_token(ue)},K.prototype.print_preserved_newlines=function(ue){var X=0;ue.type!==Z.TEXT&&ue.previous.type!==Z.TEXT&&(X=ue.newlines?1:0),this.preserve_newlines&&(X=ue.newlines<this.max_preserve_newlines+1?ue.newlines:this.max_preserve_newlines+1);for(var L=0;L<X;L++)this.print_newline(L>0);return X!==0},K.prototype.traverse_whitespace=function(ue){return ue.whitespace_before||ue.newlines?(this.print_preserved_newlines(ue)||(this._output.space_before_token=!0),!0):!1},K.prototype.previous_token_wrapped=function(){return this._output.previous_token_wrapped},K.prototype.print_newline=function(ue){this._output.add_new_line(ue)},K.prototype.print_token=function(ue){ue.text&&(this._output.set_indent(this.indent_level,this.alignment_size),this._output.add_token(ue.text))},K.prototype.indent=function(){this.indent_level++},K.prototype.deindent=function(){this.indent_level>0&&(this.indent_level--,this._output.set_indent(this.indent_level,this.alignment_size))},K.prototype.get_full_indent=function(ue){return ue=this.indent_level+(ue||0),ue<1?"":this._output.get_indent_string(ue)};var D=function(ue){for(var X=null,L=ue.next;L.type!==Z.EOF&&ue.closed!==L;){if(L.type===Z.ATTRIBUTE&&L.text==="type"){L.next&&L.next.type===Z.EQUALS&&L.next.next&&L.next.next.type===Z.VALUE&&(X=L.next.next.text);break}L=L.next}return X},O=function(ue,X){var L=null,se=null;return X.closed?(ue==="script"?L="text/javascript":ue==="style"&&(L="text/css"),L=D(X)||L,L.search("text/css")>-1?se="css":L.search(/module|((text|application|dojo)\/(x-)?(javascript|ecmascript|jscript|livescript|(ld\+)?json|method|aspect))/)>-1?se="javascript":L.search(/(text|application|dojo)\/(x-)?(html)/)>-1?se="html":L.search(/test\/null/)>-1&&(se="null"),se):null};function re(ue,X){return X.indexOf(ue)!==-1}function oe(ue,X,L){this.parent=ue||null,this.tag=X?X.tag_name:"",this.indent_level=L||0,this.parser_token=X||null}function ie(ue){this._printer=ue,this._current_frame=null}ie.prototype.get_parser_token=function(){return this._current_frame?this._current_frame.parser_token:null},ie.prototype.record_tag=function(ue){var X=new oe(this._current_frame,ue,this._printer.indent_level);this._current_frame=X},ie.prototype._try_pop_frame=function(ue){var X=null;return ue&&(X=ue.parser_token,this._printer.indent_level=ue.indent_level,this._current_frame=ue.parent),X},ie.prototype._get_frame=function(ue,X){for(var L=this._current_frame;L&&ue.indexOf(L.tag)===-1;){if(X&&X.indexOf(L.tag)!==-1){L=null;break}L=L.parent}return L},ie.prototype.try_pop=function(ue,X){var L=this._get_frame([ue],X);return this._try_pop_frame(L)},ie.prototype.indent_to_tag=function(ue){var X=this._get_frame(ue);X&&(this._printer.indent_level=X.indent_level)};function Ee(ue,X,L,se){this._source_text=ue||"",X=X||{},this._js_beautify=L,this._css_beautify=se,this._tag_stack=null;var Q=new T(X,"html");this._options=Q,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"}Ee.prototype.beautify=function(){if(this._options.disabled)return this._source_text;var ue=this._source_text,X=this._options.eol;this._options.eol==="auto"&&(X=`
|
|
|
`,ue&&U.test(ue)&&(X=ue.match(U)[0])),ue=ue.replace(A,`
|
|
|
`);var L=ue.match(/^[\t ]*/)[0],se={text:"",type:""},Q=new Me(this._options),V=new K(this._options,L),x=new j(ue,this._options).tokenize();this._tag_stack=new ie(V);for(var w=null,H=x.next();H.type!==Z.EOF;)H.type===Z.TAG_OPEN||H.type===Z.COMMENT?(w=this._handle_tag_open(V,H,Q,se,x),Q=w):H.type===Z.ATTRIBUTE||H.type===Z.EQUALS||H.type===Z.VALUE||H.type===Z.TEXT&&!Q.tag_complete?w=this._handle_inside_tag(V,H,Q,se):H.type===Z.TAG_CLOSE?w=this._handle_tag_close(V,H,Q):H.type===Z.TEXT?w=this._handle_text(V,H,Q):H.type===Z.CONTROL_FLOW_OPEN?w=this._handle_control_flow_open(V,H):H.type===Z.CONTROL_FLOW_CLOSE?w=this._handle_control_flow_close(V,H):V.add_raw_token(H),se=w,H=x.next();var he=V._output.get_code(X);return he},Ee.prototype._handle_control_flow_open=function(ue,X){var L={text:X.text,type:X.type};return ue.set_space_before_token(X.newlines||X.whitespace_before!=="",!0),X.newlines?ue.print_preserved_newlines(X):ue.set_space_before_token(X.newlines||X.whitespace_before!=="",!0),ue.print_token(X),ue.indent(),L},Ee.prototype._handle_control_flow_close=function(ue,X){var L={text:X.text,type:X.type};return ue.deindent(),X.newlines?ue.print_preserved_newlines(X):ue.set_space_before_token(X.newlines||X.whitespace_before!=="",!0),ue.print_token(X),L},Ee.prototype._handle_tag_close=function(ue,X,L){var se={text:X.text,type:X.type};return ue.alignment_size=0,L.tag_complete=!0,ue.set_space_before_token(X.newlines||X.whitespace_before!=="",!0),L.is_unformatted?ue.add_raw_token(X):(L.tag_start_char==="<"&&(ue.set_space_before_token(X.text[0]==="/",!0),this._is_wrap_attributes_force_expand_multiline&&L.has_wrapped_attrs&&ue.print_newline(!1)),ue.print_token(X)),L.indent_content&&!(L.is_unformatted||L.is_content_unformatted)&&(ue.indent(),L.indent_content=!1),!L.is_inline_element&&!(L.is_unformatted||L.is_content_unformatted)&&ue.set_wrap_point(),se},Ee.prototype._handle_inside_tag=function(ue,X,L,se){var Q=L.has_wrapped_attrs,V={text:X.text,type:X.type};return ue.set_space_before_token(X.newlines||X.whitespace_before!=="",!0),L.is_unformatted?ue.add_raw_token(X):L.tag_start_char==="{"&&X.type===Z.TEXT?ue.print_preserved_newlines(X)?(X.newlines=0,ue.add_raw_token(X)):ue.print_token(X):(X.type===Z.ATTRIBUTE?ue.set_space_before_token(!0):(X.type===Z.EQUALS||X.type===Z.VALUE&&X.previous.type===Z.EQUALS)&&ue.set_space_before_token(!1),X.type===Z.ATTRIBUTE&&L.tag_start_char==="<"&&((this._is_wrap_attributes_preserve||this._is_wrap_attributes_preserve_aligned)&&(ue.traverse_whitespace(X),Q=Q||X.newlines!==0),this._is_wrap_attributes_force&&L.attr_count>=this._options.wrap_attributes_min_attrs&&(se.type!==Z.TAG_OPEN||this._is_wrap_attributes_force_expand_multiline)&&(ue.print_newline(!1),Q=!0)),ue.print_token(X),Q=Q||ue.previous_token_wrapped(),L.has_wrapped_attrs=Q),V},Ee.prototype._handle_text=function(ue,X,L){var se={text:X.text,type:"TK_CONTENT"};return L.custom_beautifier_name?this._print_custom_beatifier_text(ue,X,L):L.is_unformatted||L.is_content_unformatted?ue.add_raw_token(X):(ue.traverse_whitespace(X),ue.print_token(X)),se},Ee.prototype._print_custom_beatifier_text=function(ue,X,L){var se=this;if(X.text!==""){var Q=X.text,V,x=1,w="",H="";L.custom_beautifier_name==="javascript"&&typeof this._js_beautify=="function"?V=this._js_beautify:L.custom_beautifier_name==="css"&&typeof this._css_beautify=="function"?V=this._css_beautify:L.custom_beautifier_name==="html"&&(V=function(pt,Et){var Ne=new Ee(pt,Et,se._js_beautify,se._css_beautify);return Ne.beautify()}),this._options.indent_scripts==="keep"?x=0:this._options.indent_scripts==="separate"&&(x=-ue.indent_level);var he=ue.get_full_indent(x);if(Q=Q.replace(/\n[ \t]*$/,""),L.custom_beautifier_name!=="html"&&Q[0]==="<"&&Q.match(/^(<!--|<!\[CDATA\[)/)){var Ke=/^(<!--[^\n]*|<!\[CDATA\[)(\n?)([ \t\n]*)([\s\S]*)(-->|]]>)$/.exec(Q);if(!Ke){ue.add_raw_token(X);return}w=he+Ke[1]+`
|
|
|
`,Q=Ke[4],Ke[5]&&(H=he+Ke[5]),Q=Q.replace(/\n[ \t]*$/,""),(Ke[2]||Ke[3].indexOf(`
|
|
|
`)!==-1)&&(Ke=Ke[3].match(/[ \t]+$/),Ke&&(X.whitespace_before=Ke[0]))}if(Q)if(V){var ft=function(){this.eol=`
|
|
|
`};ft.prototype=this._options.raw_options;var Ue=new ft;Q=V(he+Q,Ue)}else{var st=X.whitespace_before;st&&(Q=Q.replace(new RegExp(`
|
|
|
(`+st+")?","g"),`
|
|
|
`)),Q=he+Q.replace(/\n/g,`
|
|
|
`+he)}w&&(Q?Q=w+Q+`
|
|
|
`+H:Q=w+H),ue.print_newline(!1),Q&&(X.text=Q,X.whitespace_before="",X.newlines=0,ue.add_raw_token(X),ue.print_newline(!0))}},Ee.prototype._handle_tag_open=function(ue,X,L,se,Q){var V=this._get_tag_open_token(X);if((L.is_unformatted||L.is_content_unformatted)&&!L.is_empty_element&&X.type===Z.TAG_OPEN&&!V.is_start_tag?(ue.add_raw_token(X),V.start_tag_token=this._tag_stack.try_pop(V.tag_name)):(ue.traverse_whitespace(X),this._set_tag_position(ue,X,V,L,se),V.is_inline_element||ue.set_wrap_point(),ue.print_token(X)),V.is_start_tag&&this._is_wrap_attributes_force){var x=0,w;do w=Q.peek(x),w.type===Z.ATTRIBUTE&&(V.attr_count+=1),x+=1;while(w.type!==Z.EOF&&w.type!==Z.TAG_CLOSE)}return(this._is_wrap_attributes_force_aligned||this._is_wrap_attributes_aligned_multiple||this._is_wrap_attributes_preserve_aligned)&&(V.alignment_size=X.text.length+1),!V.tag_complete&&!V.is_unformatted&&(ue.alignment_size=V.alignment_size),V};var Me=function(ue,X,L){if(this.parent=X||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="",!L)this.tag_complete=!0;else{var se;this.tag_start_char=L.text[0],this.text=L.text,this.tag_start_char==="<"?(se=L.text.match(/^<([^\s>]*)/),this.tag_check=se?se[1]:""):(se=L.text.match(/^{{~?(?:[\^]|#\*?)?([^\s}]+)/),this.tag_check=se?se[1]:"",(L.text.startsWith("{{#>")||L.text.startsWith("{{~#>"))&&this.tag_check[0]===">"&&(this.tag_check===">"&&L.next!==null?this.tag_check=L.next.text.split(" ")[0]:this.tag_check=L.text.split(">")[1])),this.tag_check=this.tag_check.toLowerCase(),L.type===Z.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||L.closed&&L.closed.text==="/>";var Q=2;this.tag_start_char==="{"&&this.text.length>=3&&this.text.charAt(2)==="~"&&(Q=3),this.is_end_tag=this.is_end_tag||this.tag_start_char==="{"&&(!ue.indent_handlebars||this.text.length<3||/[^#\^]/.test(this.text.charAt(Q)))}};Ee.prototype._get_tag_open_token=function(ue){var X=new Me(this._options,this._tag_stack.get_parser_token(),ue);return X.alignment_size=this._options.wrap_attributes_indent_size,X.is_end_tag=X.is_end_tag||re(X.tag_check,this._options.void_elements),X.is_empty_element=X.tag_complete||X.is_start_tag&&X.is_end_tag,X.is_unformatted=!X.tag_complete&&re(X.tag_check,this._options.unformatted),X.is_content_unformatted=!X.is_empty_element&&re(X.tag_check,this._options.content_unformatted),X.is_inline_element=re(X.tag_name,this._options.inline)||this._options.inline_custom_elements&&X.tag_name.includes("-")||X.tag_start_char==="{",X},Ee.prototype._set_tag_position=function(ue,X,L,se,Q){if(L.is_empty_element||(L.is_end_tag?L.start_tag_token=this._tag_stack.try_pop(L.tag_name):(this._do_optional_end_element(L)&&(L.is_inline_element||ue.print_newline(!1)),this._tag_stack.record_tag(L),(L.tag_name==="script"||L.tag_name==="style")&&!(L.is_unformatted||L.is_content_unformatted)&&(L.custom_beautifier_name=O(L.tag_check,X)))),re(L.tag_check,this._options.extra_liners)&&(ue.print_newline(!1),ue._output.just_added_blankline()||ue.print_newline(!0)),L.is_empty_element){if(L.tag_start_char==="{"&&L.tag_check==="else"){this._tag_stack.indent_to_tag(["if","unless","each"]),L.indent_content=!0;var V=ue.current_line_has_match(/{{#if/);V||ue.print_newline(!1)}L.tag_name==="!--"&&Q.type===Z.TAG_CLOSE&&se.is_end_tag&&L.text.indexOf(`
|
|
|
`)===-1||(L.is_inline_element||L.is_unformatted||ue.print_newline(!1),this._calcluate_parent_multiline(ue,L))}else if(L.is_end_tag){var x=!1;x=L.start_tag_token&&L.start_tag_token.multiline_content,x=x||!L.is_inline_element&&!(se.is_inline_element||se.is_unformatted)&&!(Q.type===Z.TAG_CLOSE&&L.start_tag_token===se)&&Q.type!=="TK_CONTENT",(L.is_content_unformatted||L.is_unformatted)&&(x=!1),x&&ue.print_newline(!1)}else L.indent_content=!L.custom_beautifier_name,L.tag_start_char==="<"&&(L.tag_name==="html"?L.indent_content=this._options.indent_inner_html:L.tag_name==="head"?L.indent_content=this._options.indent_head_inner_html:L.tag_name==="body"&&(L.indent_content=this._options.indent_body_inner_html)),!(L.is_inline_element||L.is_unformatted)&&(Q.type!=="TK_CONTENT"||L.is_content_unformatted)&&ue.print_newline(!1),this._calcluate_parent_multiline(ue,L)},Ee.prototype._calcluate_parent_multiline=function(ue,X){X.parent&&ue._output.just_added_newline()&&!((X.is_inline_element||X.is_unformatted)&&X.parent.is_inline_element)&&(X.parent.multiline_content=!0)};var ke=["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"],tt=["a","audio","del","ins","map","noscript","video"];Ee.prototype._do_optional_end_element=function(ue){var X=null;if(!(ue.is_empty_element||!ue.is_start_tag||!ue.parent)){if(ue.tag_name==="body")X=X||this._tag_stack.try_pop("head");else if(ue.tag_name==="li")X=X||this._tag_stack.try_pop("li",["ol","ul","menu"]);else if(ue.tag_name==="dd"||ue.tag_name==="dt")X=X||this._tag_stack.try_pop("dt",["dl"]),X=X||this._tag_stack.try_pop("dd",["dl"]);else if(ue.parent.tag_name==="p"&&ke.indexOf(ue.tag_name)!==-1){var L=ue.parent.parent;(!L||tt.indexOf(L.tag_name)===-1)&&(X=X||this._tag_stack.try_pop("p"))}else ue.tag_name==="rp"||ue.tag_name==="rt"?(X=X||this._tag_stack.try_pop("rt",["ruby","rtc"]),X=X||this._tag_stack.try_pop("rp",["ruby","rtc"])):ue.tag_name==="optgroup"?X=X||this._tag_stack.try_pop("optgroup",["select"]):ue.tag_name==="option"?X=X||this._tag_stack.try_pop("option",["select","datalist","optgroup"]):ue.tag_name==="colgroup"?X=X||this._tag_stack.try_pop("caption",["table"]):ue.tag_name==="thead"?(X=X||this._tag_stack.try_pop("caption",["table"]),X=X||this._tag_stack.try_pop("colgroup",["table"])):ue.tag_name==="tbody"||ue.tag_name==="tfoot"?(X=X||this._tag_stack.try_pop("caption",["table"]),X=X||this._tag_stack.try_pop("colgroup",["table"]),X=X||this._tag_stack.try_pop("thead",["table"]),X=X||this._tag_stack.try_pop("tbody",["table"])):ue.tag_name==="tr"?(X=X||this._tag_stack.try_pop("caption",["table"]),X=X||this._tag_stack.try_pop("colgroup",["table"]),X=X||this._tag_stack.try_pop("tr",["table","thead","tbody","tfoot"])):(ue.tag_name==="th"||ue.tag_name==="td")&&(X=X||this._tag_stack.try_pop("td",["table","thead","tbody","tfoot","tr"]),X=X||this._tag_stack.try_pop("th",["table","thead","tbody","tfoot","tr"]));return ue.parent=this._tag_stack.get_parser_token(),X}},M.exports.Beautifier=Ee},function(M,y,E){var T=E(6).Options;function k(j){T.call(this,j,"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"])}k.prototype=new T,M.exports.Options=k},function(M,y,E){var T=E(9).Tokenizer,k=E(9).TOKEN,j=E(13).Directives,Z=E(14).TemplatablePattern,U=E(12).Pattern,A={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:k.START,RAW:k.RAW,EOF:k.EOF},K=new j(/<\!--/,/-->/),D=function(O,re){T.call(this,O,re),this._current_tag_name="";var oe=new Z(this._input).read_options(this._options),ie=new U(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:ie.matching(/\@[a-zA-Z]+[^({]*[({]/),handlebars_comment:ie.starting_with(/{{!--/).until_after(/--}}/),handlebars:ie.starting_with(/{{/).until_after(/}}/),handlebars_open:ie.until(/[\n\r\t }]/),handlebars_raw_close:ie.until(/}}/),comment:ie.starting_with(/<!--/).until_after(/-->/),cdata:ie.starting_with(/<!\[CDATA\[/).until_after(/]]>/),conditional_comment:ie.starting_with(/<!\[/).until_after(/]>/),processing:ie.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 Ee=this._input.get_literal_regexp(this._options.unformatted_content_delimiter);this.__patterns.unformatted_content_delimiter=ie.matching(Ee).until_after(Ee)}};D.prototype=new T,D.prototype._is_comment=function(O){return!1},D.prototype._is_opening=function(O){return O.type===A.TAG_OPEN||O.type===A.CONTROL_FLOW_OPEN},D.prototype._is_closing=function(O,re){return O.type===A.TAG_CLOSE&&re&&((O.text===">"||O.text==="/>")&&re.text[0]==="<"||O.text==="}}"&&re.text[0]==="{"&&re.text[1]==="{")||O.type===A.CONTROL_FLOW_CLOSE&&O.text==="}"&&re.text.endsWith("{")},D.prototype._reset=function(){this._current_tag_name=""},D.prototype._get_next_token=function(O,re){var oe=null;this._readWhitespace();var ie=this._input.peek();return ie===null?this._create_token(A.EOF,""):(oe=oe||this._read_open_handlebars(ie,re),oe=oe||this._read_attribute(ie,O,re),oe=oe||this._read_close(ie,re),oe=oe||this._read_script_and_style(ie,O),oe=oe||this._read_control_flows(ie,re),oe=oe||this._read_raw_content(ie,O,re),oe=oe||this._read_content_word(ie,re),oe=oe||this._read_comment_or_cdata(ie),oe=oe||this._read_processing(ie),oe=oe||this._read_open(ie,re),oe=oe||this._create_token(A.UNKNOWN,this._input.next()),oe)},D.prototype._read_comment_or_cdata=function(O){var re=null,oe=null,ie=null;if(O==="<"){var Ee=this._input.peek(1);Ee==="!"&&(oe=this.__patterns.comment.read(),oe?(ie=K.get_directives(oe),ie&&ie.ignore==="start"&&(oe+=K.readIgnored(this._input))):oe=this.__patterns.cdata.read()),oe&&(re=this._create_token(A.COMMENT,oe),re.directives=ie)}return re},D.prototype._read_processing=function(O){var re=null,oe=null,ie=null;if(O==="<"){var Ee=this._input.peek(1);(Ee==="!"||Ee==="?")&&(oe=this.__patterns.conditional_comment.read(),oe=oe||this.__patterns.processing.read()),oe&&(re=this._create_token(A.COMMENT,oe),re.directives=ie)}return re},D.prototype._read_open=function(O,re){var oe=null,ie=null;return(!re||re.type===A.CONTROL_FLOW_OPEN)&&O==="<"&&(oe=this._input.next(),this._input.peek()==="/"&&(oe+=this._input.next()),oe+=this.__patterns.element_name.read(),ie=this._create_token(A.TAG_OPEN,oe)),ie},D.prototype._read_open_handlebars=function(O,re){var oe=null,ie=null;return(!re||re.type===A.CONTROL_FLOW_OPEN)&&(this._options.templating.includes("angular")||this._options.indent_handlebars)&&O==="{"&&this._input.peek(1)==="{"&&(this._options.indent_handlebars&&this._input.peek(2)==="!"?(oe=this.__patterns.handlebars_comment.read(),oe=oe||this.__patterns.handlebars.read(),ie=this._create_token(A.COMMENT,oe)):(oe=this.__patterns.handlebars_open.read(),ie=this._create_token(A.TAG_OPEN,oe))),ie},D.prototype._read_control_flows=function(O,re){var oe="",ie=null;if(!this._options.templating.includes("angular"))return ie;if(O==="@"){if(oe=this.__patterns.angular_control_flow_start.read(),oe==="")return ie;for(var Ee=oe.endsWith("(")?1:0,Me=0;!(oe.endsWith("{")&&Ee===Me);){var ke=this._input.next();if(ke===null)break;ke==="("?Ee++:ke===")"&&Me++,oe+=ke}ie=this._create_token(A.CONTROL_FLOW_OPEN,oe)}else O==="}"&&re&&re.type===A.CONTROL_FLOW_OPEN&&(oe=this._input.next(),ie=this._create_token(A.CONTROL_FLOW_CLOSE,oe));return ie},D.prototype._read_close=function(O,re){var oe=null,ie=null;return re&&re.type===A.TAG_OPEN&&(re.text[0]==="<"&&(O===">"||O==="/"&&this._input.peek(1)===">")?(oe=this._input.next(),O==="/"&&(oe+=this._input.next()),ie=this._create_token(A.TAG_CLOSE,oe)):re.text[0]==="{"&&O==="}"&&this._input.peek(1)==="}"&&(this._input.next(),this._input.next(),ie=this._create_token(A.TAG_CLOSE,"}}"))),ie},D.prototype._read_attribute=function(O,re,oe){var ie=null,Ee="";if(oe&&oe.text[0]==="<")if(O==="=")ie=this._create_token(A.EQUALS,this._input.next());else if(O==='"'||O==="'"){var Me=this._input.next();O==='"'?Me+=this.__patterns.double_quote.read():Me+=this.__patterns.single_quote.read(),ie=this._create_token(A.VALUE,Me)}else Ee=this.__patterns.attribute.read(),Ee&&(re.type===A.EQUALS?ie=this._create_token(A.VALUE,Ee):ie=this._create_token(A.ATTRIBUTE,Ee));return ie},D.prototype._is_content_unformatted=function(O){return this._options.void_elements.indexOf(O)===-1&&(this._options.content_unformatted.indexOf(O)!==-1||this._options.unformatted.indexOf(O)!==-1)},D.prototype._read_raw_content=function(O,re,oe){var ie="";if(oe&&oe.text[0]==="{")ie=this.__patterns.handlebars_raw_close.read();else if(re.type===A.TAG_CLOSE&&re.opened.text[0]==="<"&&re.text[0]!=="/"){var Ee=re.opened.text.substr(1).toLowerCase();this._is_content_unformatted(Ee)&&(ie=this._input.readUntil(new RegExp("</"+Ee+"[\\n\\r\\t ]*?>","ig")))}return ie?this._create_token(A.TEXT,ie):null},D.prototype._read_script_and_style=function(O,re){if(re.type===A.TAG_CLOSE&&re.opened.text[0]==="<"&&re.text[0]!=="/"){var oe=re.opened.text.substr(1).toLowerCase();if(oe==="script"||oe==="style"){var ie=this._read_comment_or_cdata(O);if(ie)return ie.type=A.TEXT,ie;var Ee=this._input.readUntil(new RegExp("</"+oe+"[\\n\\r\\t ]*?>","ig"));if(Ee)return this._create_token(A.TEXT,Ee)}}return null},D.prototype._read_content_word=function(O,re){var oe="";return this._options.unformatted_content_delimiter&&O===this._options.unformatted_content_delimiter[0]&&(oe=this.__patterns.unformatted_content_delimiter.read()),oe||(oe=re&&re.type===A.CONTROL_FLOW_OPEN?this.__patterns.word_control_flow_close_excluded.read():this.__patterns.word.read()),oe?this._create_token(A.TEXT,oe):null},M.exports.Tokenizer=D,M.exports.TOKEN=A}],te={};function o(M){var y=te[M];if(y!==void 0)return y.exports;var E=te[M]={exports:{}};return q[M](E,E.exports,o),E.exports}var C=o(18);W=C})();var fe=W;if(1)v=[m,m(58553),m(87804)],ae=function(q){var te=m(58553),o=m(87804);return{html_beautify:function(C,M){return fe(C,M,te.js_beautify,o.css_beautify)}}}.apply(mt,v),ae!==void 0&&(ln.exports=ae);else var z,g})()},58553:function(ln,mt){var m,v;(function(){var ae;(function(){"use strict";var fe=[function(te,o,C){var M=C(1).Beautifier,y=C(5).Options;function E(T,k){var j=new M(T,k);return j.beautify()}te.exports=E,te.exports.defaultOptions=function(){return new y}},function(te,o,C){var M=C(2).Output,y=C(3).Token,E=C(4),T=C(5).Options,k=C(7).Tokenizer,j=C(7).line_starters,Z=C(7).positionable_operators,U=C(7).TOKEN;function A(w,H){return H.indexOf(w)!==-1}function K(w){return w.replace(/^\s+/g,"")}function D(w){for(var H={},he=0;he<w.length;he++)H[w[he].replace(/-/g,"_")]=w[he];return H}function O(w,H){return w&&w.type===U.RESERVED&&w.text===H}function re(w,H){return w&&w.type===U.RESERVED&&A(w.text,H)}var oe=["case","return","do","if","throw","else","await","break","continue","async"],ie=["before-newline","after-newline","preserve-newline"],Ee=D(ie),Me=[Ee.before_newline,Ee.preserve_newline],ke={BlockStatement:"BlockStatement",Statement:"Statement",ObjectLiteral:"ObjectLiteral",ArrayLiteral:"ArrayLiteral",ForInitializer:"ForInitializer",Conditional:"Conditional",Expression:"Expression"};function tt(w,H){H.multiline_frame||H.mode===ke.ForInitializer||H.mode===ke.Conditional||w.remove_indent(H.start_line_index)}function ue(w){w=w.replace(E.allLineBreaks,`
|
|
|
`);for(var H=[],he=w.indexOf(`
|
|
|
`);he!==-1;)H.push(w.substring(0,he)),w=w.substring(he+1),he=w.indexOf(`
|
|
|
`);return w.length&&H.push(w),H}function X(w){return w===ke.ArrayLiteral}function L(w){return A(w,[ke.Expression,ke.ForInitializer,ke.Conditional])}function se(w,H){for(var he=0;he<w.length;he++){var Ke=w[he].trim();if(Ke.charAt(0)!==H)return!1}return!0}function Q(w,H){for(var he=0,Ke=w.length,ft;he<Ke;he++)if(ft=w[he],ft&&ft.indexOf(H)!==0)return!1;return!0}function V(w,H){H=H||{},this._source_text=w||"",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 T(H)}V.prototype.create_flags=function(w,H){var he=0;w&&(he=w.indentation_level,!this._output.just_added_newline()&&w.line_indent_level>he&&(he=w.line_indent_level));var Ke={mode:H,parent:w,last_token:w?w.last_token:new y(U.START_BLOCK,""),last_word:w?w.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:he,alignment:0,line_indent_level:w?w.line_indent_level:he,start_line_index:this._output.get_line_number(),ternary_depth:0};return Ke},V.prototype._reset=function(w){var H=w.match(/^[\t ]*/)[0];this._last_last_text="",this._output=new M(this._options,H),this._output.raw=this._options.test_output_raw,this._flag_store=[],this.set_mode(ke.BlockStatement);var he=new k(w,this._options);return this._tokens=he.tokenize(),w},V.prototype.beautify=function(){if(this._options.disabled)return this._source_text;var w,H=this._reset(this._source_text),he=this._options.eol;this._options.eol==="auto"&&(he=`
|
|
|
`,H&&E.lineBreak.test(H||"")&&(he=H.match(E.lineBreak)[0]));for(var Ke=this._tokens.next();Ke;)this.handle_token(Ke),this._last_last_text=this._flags.last_token.text,this._flags.last_token=Ke,Ke=this._tokens.next();return w=this._output.get_code(he),w},V.prototype.handle_token=function(w,H){w.type===U.START_EXPR?this.handle_start_expr(w):w.type===U.END_EXPR?this.handle_end_expr(w):w.type===U.START_BLOCK?this.handle_start_block(w):w.type===U.END_BLOCK?this.handle_end_block(w):w.type===U.WORD?this.handle_word(w):w.type===U.RESERVED?this.handle_word(w):w.type===U.SEMICOLON?this.handle_semicolon(w):w.type===U.STRING?this.handle_string(w):w.type===U.EQUALS?this.handle_equals(w):w.type===U.OPERATOR?this.handle_operator(w):w.type===U.COMMA?this.handle_comma(w):w.type===U.BLOCK_COMMENT?this.handle_block_comment(w,H):w.type===U.COMMENT?this.handle_comment(w,H):w.type===U.DOT?this.handle_dot(w):w.type===U.EOF?this.handle_eof(w):w.type===U.UNKNOWN?this.handle_unknown(w,H):this.handle_unknown(w,H)},V.prototype.handle_whitespace_and_comments=function(w,H){var he=w.newlines,Ke=this._options.keep_array_indentation&&X(this._flags.mode);if(w.comments_before)for(var ft=w.comments_before.next();ft;)this.handle_whitespace_and_comments(ft,H),this.handle_token(ft,H),ft=w.comments_before.next();if(Ke)for(var Ue=0;Ue<he;Ue+=1)this.print_newline(Ue>0,H);else if(this._options.max_preserve_newlines&&he>this._options.max_preserve_newlines&&(he=this._options.max_preserve_newlines),this._options.preserve_newlines&&he>1){this.print_newline(!1,H);for(var st=1;st<he;st+=1)this.print_newline(!0,H)}};var x=["async","break","continue","return","throw","yield"];V.prototype.allow_wrap_or_preserved_newline=function(w,H){if(H=H===void 0?!1:H,!this._output.just_added_newline()){var he=this._options.preserve_newlines&&w.newlines||H,Ke=A(this._flags.last_token.text,Z)||A(w.text,Z);if(Ke){var ft=A(this._flags.last_token.text,Z)&&A(this._options.operator_position,Me)||A(w.text,Z);he=he&&ft}if(he)this.print_newline(!1,!0);else if(this._options.wrap_line_length){if(re(this._flags.last_token,x))return;this._output.set_wrap_point()}}},V.prototype.print_newline=function(w,H){if(!H&&this._flags.last_token.text!==";"&&this._flags.last_token.text!==","&&this._flags.last_token.text!=="="&&(this._flags.last_token.type!==U.OPERATOR||this._flags.last_token.text==="--"||this._flags.last_token.text==="++"))for(var he=this._tokens.peek();this._flags.mode===ke.Statement&&!(this._flags.if_block&&O(he,"else"))&&!this._flags.do_block;)this.restore_mode();this._output.add_new_line(w)&&(this._flags.multiline_frame=!0)},V.prototype.print_token_line_indentation=function(w){this._output.just_added_newline()&&(this._options.keep_array_indentation&&w.newlines&&(w.text==="["||X(this._flags.mode))?(this._output.current_line.set_indent(-1),this._output.current_line.push(w.whitespace_before),this._output.space_before_token=!1):this._output.set_indent(this._flags.indentation_level,this._flags.alignment)&&(this._flags.line_indent_level=this._flags.indentation_level))},V.prototype.print_token=function(w){if(this._output.raw){this._output.add_raw_token(w);return}if(this._options.comma_first&&w.previous&&w.previous.type===U.COMMA&&this._output.just_added_newline()&&this._output.previous_line.last()===","){var H=this._output.previous_line.pop();this._output.previous_line.is_empty()&&(this._output.previous_line.push(H),this._output.trim(!0),this._output.current_line.pop(),this._output.trim()),this.print_token_line_indentation(w),this._output.add_token(","),this._output.space_before_token=!0}this.print_token_line_indentation(w),this._output.non_breaking_space=!0,this._output.add_token(w.text),this._output.previous_token_wrapped&&(this._flags.multiline_frame=!0)},V.prototype.indent=function(){this._flags.indentation_level+=1,this._output.set_indent(this._flags.indentation_level,this._flags.alignment)},V.prototype.deindent=function(){this._flags.indentation_level>0&&(!this._flags.parent||this._flags.indentation_level>this._flags.parent.indentation_level)&&(this._flags.indentation_level-=1,this._output.set_indent(this._flags.indentation_level,this._flags.alignment))},V.prototype.set_mode=function(w){this._flags?(this._flag_store.push(this._flags),this._previous_flags=this._flags):this._previous_flags=this.create_flags(null,w),this._flags=this.create_flags(this._previous_flags,w),this._output.set_indent(this._flags.indentation_level,this._flags.alignment)},V.prototype.restore_mode=function(){this._flag_store.length>0&&(this._previous_flags=this._flags,this._flags=this._flag_store.pop(),this._previous_flags.mode===ke.Statement&&tt(this._output,this._previous_flags),this._output.set_indent(this._flags.indentation_level,this._flags.alignment))},V.prototype.start_of_object_property=function(){return this._flags.parent.mode===ke.ObjectLiteral&&this._flags.mode===ke.Statement&&(this._flags.last_token.text===":"&&this._flags.ternary_depth===0||re(this._flags.last_token,["get","set"]))},V.prototype.start_of_statement=function(w){var H=!1;return H=H||re(this._flags.last_token,["var","let","const"])&&w.type===U.WORD,H=H||O(this._flags.last_token,"do"),H=H||!(this._flags.parent.mode===ke.ObjectLiteral&&this._flags.mode===ke.Statement)&&re(this._flags.last_token,x)&&!w.newlines,H=H||O(this._flags.last_token,"else")&&!(O(w,"if")&&!w.comments_before),H=H||this._flags.last_token.type===U.END_EXPR&&(this._previous_flags.mode===ke.ForInitializer||this._previous_flags.mode===ke.Conditional),H=H||this._flags.last_token.type===U.WORD&&this._flags.mode===ke.BlockStatement&&!this._flags.in_case&&!(w.text==="--"||w.text==="++")&&this._last_last_text!=="function"&&w.type!==U.WORD&&w.type!==U.RESERVED,H=H||this._flags.mode===ke.ObjectLiteral&&(this._flags.last_token.text===":"&&this._flags.ternary_depth===0||re(this._flags.last_token,["get","set"])),H?(this.set_mode(ke.Statement),this.indent(),this.handle_whitespace_and_comments(w,!0),this.start_of_object_property()||this.allow_wrap_or_preserved_newline(w,re(w,["do","for","if","while"])),!0):!1},V.prototype.handle_start_expr=function(w){this.start_of_statement(w)||this.handle_whitespace_and_comments(w);var H=ke.Expression;if(w.text==="["){if(this._flags.last_token.type===U.WORD||this._flags.last_token.text===")"){re(this._flags.last_token,j)&&(this._output.space_before_token=!0),this.print_token(w),this.set_mode(H),this.indent(),this._options.space_in_paren&&(this._output.space_before_token=!0);return}H=ke.ArrayLiteral,X(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()),A(this._flags.last_token.type,[U.START_EXPR,U.END_EXPR,U.WORD,U.OPERATOR,U.DOT])||(this._output.space_before_token=!0)}else{if(this._flags.last_token.type===U.RESERVED)this._flags.last_token.text==="for"?(this._output.space_before_token=this._options.space_before_conditional,H=ke.ForInitializer):A(this._flags.last_token.text,["if","while","switch"])?(this._output.space_before_token=this._options.space_before_conditional,H=ke.Conditional):A(this._flags.last_word,["await","async"])?this._output.space_before_token=!0:this._flags.last_token.text==="import"&&w.whitespace_before===""?this._output.space_before_token=!1:(A(this._flags.last_token.text,j)||this._flags.last_token.text==="catch")&&(this._output.space_before_token=!0);else if(this._flags.last_token.type===U.EQUALS||this._flags.last_token.type===U.OPERATOR)this.start_of_object_property()||this.allow_wrap_or_preserved_newline(w);else if(this._flags.last_token.type===U.WORD){this._output.space_before_token=!1;var he=this._tokens.peek(-3);if(this._options.space_after_named_function&&he){var Ke=this._tokens.peek(-4);re(he,["async","function"])||he.text==="*"&&re(Ke,["async","function"])?this._output.space_before_token=!0:this._flags.mode===ke.ObjectLiteral?(he.text==="{"||he.text===","||he.text==="*"&&(Ke.text==="{"||Ke.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(w);(this._flags.last_token.type===U.RESERVED&&(this._flags.last_word==="function"||this._flags.last_word==="typeof")||this._flags.last_token.text==="*"&&(A(this._last_last_text,["function","yield"])||this._flags.mode===ke.ObjectLiteral&&A(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===U.START_BLOCK?this.print_newline():(this._flags.last_token.type===U.END_EXPR||this._flags.last_token.type===U.START_EXPR||this._flags.last_token.type===U.END_BLOCK||this._flags.last_token.text==="."||this._flags.last_token.type===U.COMMA)&&this.allow_wrap_or_preserved_newline(w,w.newlines),this.print_token(w),this.set_mode(H),this._options.space_in_paren&&(this._output.space_before_token=!0),this.indent()},V.prototype.handle_end_expr=function(w){for(;this._flags.mode===ke.Statement;)this.restore_mode();this.handle_whitespace_and_comments(w),this._flags.multiline_frame&&this.allow_wrap_or_preserved_newline(w,w.text==="]"&&X(this._flags.mode)&&!this._options.keep_array_indentation),this._options.space_in_paren&&(this._flags.last_token.type===U.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(w),this.restore_mode(),tt(this._output,this._previous_flags),this._flags.do_while&&this._previous_flags.mode===ke.Conditional&&(this._previous_flags.mode=ke.Expression,this._flags.do_block=!1,this._flags.do_while=!1)},V.prototype.handle_start_block=function(w){this.handle_whitespace_and_comments(w);var H=this._tokens.peek(),he=this._tokens.peek(1);this._flags.last_word==="switch"&&this._flags.last_token.type===U.END_EXPR?(this.set_mode(ke.BlockStatement),this._flags.in_case_statement=!0):this._flags.case_body?this.set_mode(ke.BlockStatement):he&&(A(he.text,[":",","])&&A(H.type,[U.STRING,U.WORD,U.RESERVED])||A(H.text,["get","set","..."])&&A(he.type,[U.WORD,U.RESERVED]))?A(this._last_last_text,["class","interface"])&&!A(he.text,[":",","])?this.set_mode(ke.BlockStatement):this.set_mode(ke.ObjectLiteral):this._flags.last_token.type===U.OPERATOR&&this._flags.last_token.text==="=>"?this.set_mode(ke.BlockStatement):A(this._flags.last_token.type,[U.EQUALS,U.START_EXPR,U.COMMA,U.OPERATOR])||re(this._flags.last_token,["return","throw","import","default"])?this.set_mode(ke.ObjectLiteral):this.set_mode(ke.BlockStatement),this._flags.last_token&&re(this._flags.last_token.previous,["class","extends"])&&(this._flags.class_start_block=!0);var Ke=!H.comments_before&&H.text==="}",ft=Ke&&this._flags.last_word==="function"&&this._flags.last_token.type===U.END_EXPR;if(this._options.brace_preserve_inline){var Ue=0,st=null;this._flags.inline_frame=!0;do if(Ue+=1,st=this._tokens.peek(Ue-1),st.newlines){this._flags.inline_frame=!1;break}while(st.type!==U.EOF&&!(st.type===U.END_BLOCK&&st.opened===w))}(this._options.brace_style==="expand"||this._options.brace_style==="none"&&w.newlines)&&!this._flags.inline_frame?this._flags.last_token.type!==U.OPERATOR&&(ft||this._flags.last_token.type===U.EQUALS||re(this._flags.last_token,oe)&&this._flags.last_token.text!=="else")?this._output.space_before_token=!0:this.print_newline(!1,!0):(X(this._previous_flags.mode)&&(this._flags.last_token.type===U.START_EXPR||this._flags.last_token.type===U.COMMA)&&((this._flags.last_token.type===U.COMMA||this._options.space_in_paren)&&(this._output.space_before_token=!0),(this._flags.last_token.type===U.COMMA||this._flags.last_token.type===U.START_EXPR&&this._flags.inline_frame)&&(this.allow_wrap_or_preserved_newline(w),this._previous_flags.multiline_frame=this._previous_flags.multiline_frame||this._flags.multiline_frame,this._flags.multiline_frame=!1)),this._flags.last_token.type!==U.OPERATOR&&this._flags.last_token.type!==U.START_EXPR&&(A(this._flags.last_token.type,[U.START_BLOCK,U.SEMICOLON])&&!this._flags.inline_frame?this.print_newline():this._output.space_before_token=!0)),this.print_token(w),this.indent(),!Ke&&!(this._options.brace_preserve_inline&&this._flags.inline_frame)&&this.print_newline()},V.prototype.handle_end_block=function(w){for(this.handle_whitespace_and_comments(w);this._flags.mode===ke.Statement;)this.restore_mode();var H=this._flags.last_token.type===U.START_BLOCK;this._flags.inline_frame&&!H?this._output.space_before_token=!0:this._options.brace_style==="expand"?H||this.print_newline():H||(X(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(w)},V.prototype.handle_word=function(w){if(w.type===U.RESERVED){if(A(w.text,["set","get"])&&this._flags.mode!==ke.ObjectLiteral)w.type=U.WORD;else if(w.text==="import"&&A(this._tokens.peek().text,["(","."]))w.type=U.WORD;else if(A(w.text,["as","from"])&&!this._flags.import_block)w.type=U.WORD;else if(this._flags.mode===ke.ObjectLiteral){var H=this._tokens.peek();H.text===":"&&(w.type=U.WORD)}}if(this.start_of_statement(w)?re(this._flags.last_token,["var","let","const"])&&w.type===U.WORD&&(this._flags.declaration_statement=!0):w.newlines&&!L(this._flags.mode)&&(this._flags.last_token.type!==U.OPERATOR||this._flags.last_token.text==="--"||this._flags.last_token.text==="++")&&this._flags.last_token.type!==U.EQUALS&&(this._options.preserve_newlines||!re(this._flags.last_token,["var","let","const","set","get"]))?(this.handle_whitespace_and_comments(w),this.print_newline()):this.handle_whitespace_and_comments(w),this._flags.do_block&&!this._flags.do_while)if(O(w,"while")){this._output.space_before_token=!0,this.print_token(w),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&&O(w,"else"))this._flags.else_block=!0;else{for(;this._flags.mode===ke.Statement;)this.restore_mode();this._flags.if_block=!1,this._flags.else_block=!1}if(this._flags.in_case_statement&&re(w,["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(w),this._flags.in_case=!0;return}if((this._flags.last_token.type===U.COMMA||this._flags.last_token.type===U.START_EXPR||this._flags.last_token.type===U.EQUALS||this._flags.last_token.type===U.OPERATOR)&&!this.start_of_object_property()&&!(A(this._flags.last_token.text,["+","-"])&&this._last_last_text===":"&&this._flags.parent.mode===ke.ObjectLiteral)&&this.allow_wrap_or_preserved_newline(w),O(w,"function")){(A(this._flags.last_token.text,["}",";"])||this._output.just_added_newline()&&!(A(this._flags.last_token.text,["(","[","{",":","=",","])||this._flags.last_token.type===U.OPERATOR))&&!this._output.just_added_blankline()&&!w.comments_before&&(this.print_newline(),this.print_newline(!0)),this._flags.last_token.type===U.RESERVED||this._flags.last_token.type===U.WORD?re(this._flags.last_token,["get","set","new","export"])||re(this._flags.last_token,x)?this._output.space_before_token=!0:O(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===U.OPERATOR||this._flags.last_token.text==="="?this._output.space_before_token=!0:!this._flags.multiline_frame&&(L(this._flags.mode)||X(this._flags.mode))||this.print_newline(),this.print_token(w),this._flags.last_word=w.text;return}var he="NONE";if(this._flags.last_token.type===U.END_BLOCK?this._previous_flags.inline_frame?he="SPACE":re(w,["else","catch","finally","from"])?this._options.brace_style==="expand"||this._options.brace_style==="end-expand"||this._options.brace_style==="none"&&w.newlines?he="NEWLINE":(he="SPACE",this._output.space_before_token=!0):he="NEWLINE":this._flags.last_token.type===U.SEMICOLON&&this._flags.mode===ke.BlockStatement?he="NEWLINE":this._flags.last_token.type===U.SEMICOLON&&L(this._flags.mode)?he="SPACE":this._flags.last_token.type===U.STRING?he="NEWLINE":this._flags.last_token.type===U.RESERVED||this._flags.last_token.type===U.WORD||this._flags.last_token.text==="*"&&(A(this._last_last_text,["function","yield"])||this._flags.mode===ke.ObjectLiteral&&A(this._last_last_text,["{",","]))?he="SPACE":this._flags.last_token.type===U.START_BLOCK?this._flags.inline_frame?he="SPACE":he="NEWLINE":this._flags.last_token.type===U.END_EXPR&&(this._output.space_before_token=!0,he="NEWLINE"),re(w,j)&&this._flags.last_token.text!==")"&&(this._flags.inline_frame||this._flags.last_token.text==="else"||this._flags.last_token.text==="export"?he="SPACE":he="NEWLINE"),re(w,["else","catch","finally"]))if((!(this._flags.last_token.type===U.END_BLOCK&&this._previous_flags.mode===ke.BlockStatement)||this._options.brace_style==="expand"||this._options.brace_style==="end-expand"||this._options.brace_style==="none"&&w.newlines)&&!this._flags.inline_frame)this.print_newline();else{this._output.trim(!0);var Ke=this._output.current_line;Ke.last()!=="}"&&this.print_newline(),this._output.space_before_token=!0}else he==="NEWLINE"?re(this._flags.last_token,oe)?this._output.space_before_token=!0:this._flags.last_token.text==="declare"&&re(w,["var","let","const"])?this._output.space_before_token=!0:this._flags.last_token.type!==U.END_EXPR?(this._flags.last_token.type!==U.START_EXPR||!re(w,["var","let","const"]))&&this._flags.last_token.text!==":"&&(O(w,"if")&&O(w.previous,"else")?this._output.space_before_token=!0:this.print_newline()):re(w,j)&&this._flags.last_token.text!==")"&&this.print_newline():this._flags.multiline_frame&&X(this._flags.mode)&&this._flags.last_token.text===","&&this._last_last_text==="}"?this.print_newline():he==="SPACE"&&(this._output.space_before_token=!0);w.previous&&(w.previous.type===U.WORD||w.previous.type===U.RESERVED)&&(this._output.space_before_token=!0),this.print_token(w),this._flags.last_word=w.text,w.type===U.RESERVED&&(w.text==="do"?this._flags.do_block=!0:w.text==="if"?this._flags.if_block=!0:w.text==="import"?this._flags.import_block=!0:this._flags.import_block&&O(w,"from")&&(this._flags.import_block=!1))},V.prototype.handle_semicolon=function(w){this.start_of_statement(w)?this._output.space_before_token=!1:this.handle_whitespace_and_comments(w);for(var H=this._tokens.peek();this._flags.mode===ke.Statement&&!(this._flags.if_block&&O(H,"else"))&&!this._flags.do_block;)this.restore_mode();this._flags.import_block&&(this._flags.import_block=!1),this.print_token(w)},V.prototype.handle_string=function(w){w.text.startsWith("`")&&w.newlines===0&&w.whitespace_before===""&&(w.previous.text===")"||this._flags.last_token.type===U.WORD)||(this.start_of_statement(w)?this._output.space_before_token=!0:(this.handle_whitespace_and_comments(w),this._flags.last_token.type===U.RESERVED||this._flags.last_token.type===U.WORD||this._flags.inline_frame?this._output.space_before_token=!0:this._flags.last_token.type===U.COMMA||this._flags.last_token.type===U.START_EXPR||this._flags.last_token.type===U.EQUALS||this._flags.last_token.type===U.OPERATOR?this.start_of_object_property()||this.allow_wrap_or_preserved_newline(w):w.text.startsWith("`")&&this._flags.last_token.type===U.END_EXPR&&(w.previous.text==="]"||w.previous.text===")")&&w.newlines===0?this._output.space_before_token=!0:this.print_newline())),this.print_token(w)},V.prototype.handle_equals=function(w){this.start_of_statement(w)||this.handle_whitespace_and_comments(w),this._flags.declaration_statement&&(this._flags.declaration_assignment=!0),this._output.space_before_token=!0,this.print_token(w),this._output.space_before_token=!0},V.prototype.handle_comma=function(w){this.handle_whitespace_and_comments(w,!0),this.print_token(w),this._output.space_before_token=!0,this._flags.declaration_statement?(L(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(w)):this._flags.mode===ke.ObjectLiteral||this._flags.mode===ke.Statement&&this._flags.parent.mode===ke.ObjectLiteral?(this._flags.mode===ke.Statement&&this.restore_mode(),this._flags.inline_frame||this.print_newline()):this._options.comma_first&&this.allow_wrap_or_preserved_newline(w)},V.prototype.handle_operator=function(w){var H=w.text==="*"&&(re(this._flags.last_token,["function","yield"])||A(this._flags.last_token.type,[U.START_BLOCK,U.COMMA,U.END_BLOCK,U.SEMICOLON])),he=A(w.text,["-","+"])&&(A(this._flags.last_token.type,[U.START_BLOCK,U.START_EXPR,U.EQUALS,U.OPERATOR])||A(this._flags.last_token.text,j)||this._flags.last_token.text===",");if(!this.start_of_statement(w)){var Ke=!H;this.handle_whitespace_and_comments(w,Ke)}if(w.text==="*"&&this._flags.last_token.type===U.DOT){this.print_token(w);return}if(w.text==="::"){this.print_token(w);return}if(A(w.text,["-","+"])&&this.start_of_object_property()){this.print_token(w);return}if(this._flags.last_token.type===U.OPERATOR&&A(this._options.operator_position,Me)&&this.allow_wrap_or_preserved_newline(w),w.text===":"&&this._flags.in_case){this.print_token(w),this._flags.in_case=!1,this._flags.case_body=!0,this._tokens.peek().type!==U.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 ft=!0,Ue=!0,st=!1;if(w.text===":"?this._flags.ternary_depth===0?ft=!1:(this._flags.ternary_depth-=1,st=!0):w.text==="?"&&(this._flags.ternary_depth+=1),!he&&!H&&this._options.preserve_newlines&&A(w.text,Z)){var pt=w.text===":",Et=pt&&st,Ne=pt&&!st;switch(this._options.operator_position){case Ee.before_newline:this._output.space_before_token=!Ne,this.print_token(w),(!pt||Et)&&this.allow_wrap_or_preserved_newline(w),this._output.space_before_token=!0;return;case Ee.after_newline:this._output.space_before_token=!0,!pt||Et?this._tokens.peek().newlines?this.print_newline(!1,!0):this.allow_wrap_or_preserved_newline(w):this._output.space_before_token=!1,this.print_token(w),this._output.space_before_token=!0;return;case Ee.preserve_newline:Ne||this.allow_wrap_or_preserved_newline(w),ft=!(this._output.just_added_newline()||Ne),this._output.space_before_token=ft,this.print_token(w),this._output.space_before_token=!0;return}}if(H){this.allow_wrap_or_preserved_newline(w),ft=!1;var St=this._tokens.peek();Ue=St&&A(St.type,[U.WORD,U.RESERVED])}else if(w.text==="...")this.allow_wrap_or_preserved_newline(w),ft=this._flags.last_token.type===U.START_BLOCK,Ue=!1;else if(A(w.text,["--","++","!","~"])||he){if((this._flags.last_token.type===U.COMMA||this._flags.last_token.type===U.START_EXPR)&&this.allow_wrap_or_preserved_newline(w),ft=!1,Ue=!1,w.newlines&&(w.text==="--"||w.text==="++"||w.text==="~")){var at=re(this._flags.last_token,oe)&&w.newlines;at&&(this._previous_flags.if_block||this._previous_flags.else_block)&&this.restore_mode(),this.print_newline(at,!0)}this._flags.last_token.text===";"&&L(this._flags.mode)&&(ft=!0),this._flags.last_token.type===U.RESERVED?ft=!0:this._flags.last_token.type===U.END_EXPR?ft=!(this._flags.last_token.text==="]"&&(w.text==="--"||w.text==="++")):this._flags.last_token.type===U.OPERATOR&&(ft=A(w.text,["--","-","++","+"])&&A(this._flags.last_token.text,["--","-","++","+"]),A(w.text,["+","-"])&&A(this._flags.last_token.text,["--","++"])&&(Ue=!0)),(this._flags.mode===ke.BlockStatement&&!this._flags.inline_frame||this._flags.mode===ke.Statement)&&(this._flags.last_token.text==="{"||this._flags.last_token.text===";")&&this.print_newline()}this._output.space_before_token=this._output.space_before_token||ft,this.print_token(w),this._output.space_before_token=Ue},V.prototype.handle_block_comment=function(w,H){if(this._output.raw){this._output.add_raw_token(w),w.directives&&w.directives.preserve==="end"&&(this._output.raw=this._options.test_output_raw);return}if(w.directives){this.print_newline(!1,H),this.print_token(w),w.directives.preserve==="start"&&(this._output.raw=!0),this.print_newline(!1,!0);return}if(!E.newline.test(w.text)&&!w.newlines){this._output.space_before_token=!0,this.print_token(w),this._output.space_before_token=!0;return}else this.print_block_commment(w,H)},V.prototype.print_block_commment=function(w,H){var he=ue(w.text),Ke,ft=!1,Ue=!1,st=w.whitespace_before,pt=st.length;if(this.print_newline(!1,H),this.print_token_line_indentation(w),this._output.add_token(he[0]),this.print_newline(!1,H),he.length>1){for(he=he.slice(1),ft=se(he,"*"),Ue=Q(he,st),ft&&(this._flags.alignment=1),Ke=0;Ke<he.length;Ke++)ft?(this.print_token_line_indentation(w),this._output.add_token(K(he[Ke]))):Ue&&he[Ke]?(this.print_token_line_indentation(w),this._output.add_token(he[Ke].substring(pt))):(this._output.current_line.set_indent(-1),this._output.add_token(he[Ke])),this.print_newline(!1,H);this._flags.alignment=0}},V.prototype.handle_comment=function(w,H){w.newlines?this.print_newline(!1,H):this._output.trim(!0),this._output.space_before_token=!0,this.print_token(w),this.print_newline(!1,H)},V.prototype.handle_dot=function(w){this.start_of_statement(w)||this.handle_whitespace_and_comments(w,!0),this._flags.last_token.text.match("^[0-9]+$")&&(this._output.space_before_token=!0),re(this._flags.last_token,oe)?this._output.space_before_token=!1:this.allow_wrap_or_preserved_newline(w,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(w)},V.prototype.handle_unknown=function(w,H){this.print_token(w),w.text[w.text.length-1]===`
|
|
|
`&&this.print_newline(!1,H)},V.prototype.handle_eof=function(w){for(;this._flags.mode===ke.Statement;)this.restore_mode();this.handle_whitespace_and_comments(w)},te.exports.Beautifier=V},function(te){function o(y){this.__parent=y,this.__character_count=0,this.__indent_count=-1,this.__alignment_count=0,this.__wrap_point_index=0,this.__wrap_point_character_count=0,this.__wrap_point_indent_count=-1,this.__wrap_point_alignment_count=0,this.__items=[]}o.prototype.clone_empty=function(){var y=new o(this.__parent);return y.set_indent(this.__indent_count,this.__alignment_count),y},o.prototype.item=function(y){return y<0?this.__items[this.__items.length+y]:this.__items[y]},o.prototype.has_match=function(y){for(var E=this.__items.length-1;E>=0;E--)if(this.__items[E].match(y))return!0;return!1},o.prototype.set_indent=function(y,E){this.is_empty()&&(this.__indent_count=y||0,this.__alignment_count=E||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 y=this.__parent.current_line;return y.set_indent(this.__wrap_point_indent_count,this.__wrap_point_alignment_count),y.__items=this.__items.slice(this.__wrap_point_index),this.__items=this.__items.slice(0,this.__wrap_point_index),y.__character_count+=this.__character_count-this.__wrap_point_character_count,this.__character_count=this.__wrap_point_character_count,y.__items[0]===" "&&(y.__items.splice(0,1),y.__character_count-=1),!0}return!1},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(y){this.__items.push(y);var E=y.lastIndexOf(`
|
|
|
`);E!==-1?this.__character_count=y.length-E:this.__character_count+=y.length},o.prototype.pop=function(){var y=null;return this.is_empty()||(y=this.__items.pop(),this.__character_count-=y.length),y},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 y="";return this.is_empty()?this.__parent.indent_empty_lines&&(y=this.__parent.get_indent_string(this.__indent_count)):(y=this.__parent.get_indent_string(this.__indent_count,this.__alignment_count),y+=this.__items.join("")),y};function C(y,E){this.__cache=[""],this.__indent_size=y.indent_size,this.__indent_string=y.indent_char,y.indent_with_tabs||(this.__indent_string=new Array(y.indent_size+1).join(y.indent_char)),E=E||"",y.indent_level>0&&(E=new Array(y.indent_level+1).join(this.__indent_string)),this.__base_string=E,this.__base_string_length=E.length}C.prototype.get_indent_size=function(y,E){var T=this.__base_string_length;return E=E||0,y<0&&(T=0),T+=y*this.__indent_size,T+=E,T},C.prototype.get_indent_string=function(y,E){var T=this.__base_string;return E=E||0,y<0&&(y=0,T=""),E+=y*this.__indent_size,this.__ensure_cache(E),T+=this.__cache[E],T},C.prototype.__ensure_cache=function(y){for(;y>=this.__cache.length;)this.__add_column()},C.prototype.__add_column=function(){var y=this.__cache.length,E=0,T="";this.__indent_size&&y>=this.__indent_size&&(E=Math.floor(y/this.__indent_size),y-=E*this.__indent_size,T=new Array(E+1).join(this.__indent_string)),y&&(T+=new Array(y+1).join(" ")),this.__cache.push(T)};function M(y,E){this.__indent_cache=new C(y,E),this.raw=!1,this._end_with_newline=y.end_with_newline,this.indent_size=y.indent_size,this.wrap_line_length=y.wrap_line_length,this.indent_empty_lines=y.indent_empty_lines,this.__lines=[],this.previous_line=null,this.current_line=null,this.next_line=new o(this),this.space_before_token=!1,this.non_breaking_space=!1,this.previous_token_wrapped=!1,this.__add_outputline()}M.prototype.__add_outputline=function(){this.previous_line=this.current_line,this.current_line=this.next_line.clone_empty(),this.__lines.push(this.current_line)},M.prototype.get_line_number=function(){return this.__lines.length},M.prototype.get_indent_string=function(y,E){return this.__indent_cache.get_indent_string(y,E)},M.prototype.get_indent_size=function(y,E){return this.__indent_cache.get_indent_size(y,E)},M.prototype.is_empty=function(){return!this.previous_line&&this.current_line.is_empty()},M.prototype.add_new_line=function(y){return this.is_empty()||!y&&this.just_added_newline()?!1:(this.raw||this.__add_outputline(),!0)},M.prototype.get_code=function(y){this.trim(!0);var E=this.current_line.pop();E&&(E[E.length-1]===`
|
|
|
`&&(E=E.replace(/\n+$/g,"")),this.current_line.push(E)),this._end_with_newline&&this.__add_outputline();var T=this.__lines.join(`
|
|
|
`);return y!==`
|
|
|
`&&(T=T.replace(/[\n]/g,y)),T},M.prototype.set_wrap_point=function(){this.current_line._set_wrap_point()},M.prototype.set_indent=function(y,E){return y=y||0,E=E||0,this.next_line.set_indent(y,E),this.__lines.length>1?(this.current_line.set_indent(y,E),!0):(this.current_line.set_indent(),!1)},M.prototype.add_raw_token=function(y){for(var E=0;E<y.newlines;E++)this.__add_outputline();this.current_line.set_indent(-1),this.current_line.push(y.whitespace_before),this.current_line.push(y.text),this.space_before_token=!1,this.non_breaking_space=!1,this.previous_token_wrapped=!1},M.prototype.add_token=function(y){this.__add_space_before_token(),this.current_line.push(y),this.space_before_token=!1,this.non_breaking_space=!1,this.previous_token_wrapped=this.current_line._allow_wrap()},M.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(" "))},M.prototype.remove_indent=function(y){for(var E=this.__lines.length;y<E;)this.__lines[y]._remove_indent(),y++;this.current_line._remove_wrap_indent()},M.prototype.trim=function(y){for(y=y===void 0?!1:y,this.current_line.trim();y&&this.__lines.length>1&&this.current_line.is_empty();)this.__lines.pop(),this.current_line=this.__lines[this.__lines.length-1],this.current_line.trim();this.previous_line=this.__lines.length>1?this.__lines[this.__lines.length-2]:null},M.prototype.just_added_newline=function(){return this.current_line.is_empty()},M.prototype.just_added_blankline=function(){return this.is_empty()||this.current_line.is_empty()&&this.previous_line.is_empty()},M.prototype.ensure_empty_line_above=function(y,E){for(var T=this.__lines.length-2;T>=0;){var k=this.__lines[T];if(k.is_empty())break;if(k.item(0).indexOf(y)!==0&&k.item(-1)!==E){this.__lines.splice(T+1,0,new o(this)),this.previous_line=this.__lines[this.__lines.length-2];break}T--}},te.exports.Output=M},function(te){function o(C,M,y,E){this.type=C,this.text=M,this.comments_before=null,this.newlines=y||0,this.whitespace_before=E||"",this.parent=null,this.next=null,this.previous=null,this.opened=null,this.closed=null,this.directives=null}te.exports.Token=o},function(te,o){var C="\\x23\\x24\\x40\\x41-\\x5a\\x5f\\x61-\\x7a",M="\\x24\\x30-\\x39\\x41-\\x5a\\x5f\\x61-\\x7a",y="\\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",E="\\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",T="\\\\u[0-9a-fA-F]{4}|\\\\u\\{[0-9a-fA-F]+\\}",k="(?:"+T+"|["+C+y+"])",j="(?:"+T+"|["+M+y+E+"])*";o.identifier=new RegExp(k+j,"g"),o.identifierStart=new RegExp(k),o.identifierMatch=new RegExp("(?:"+T+"|["+M+y+E+"])+");var Z=/[\u1680\u180e\u2000-\u200a\u202f\u205f\u3000\ufeff]/;o.newline=/[\n\r\u2028\u2029]/,o.lineBreak=new RegExp(`\r
|
|
|
|`+o.newline.source),o.allLineBreaks=new RegExp(o.lineBreak.source,"g")},function(te,o,C){var M=C(6).Options,y=["before-newline","after-newline","preserve-newline"];function E(T){M.call(this,T,"js");var k=this.raw_options.brace_style||null;k==="expand-strict"?this.raw_options.brace_style="expand":k==="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 j=this._get_selection_list("brace_style",["collapse","expand","end-expand","none","preserve-inline"]);this.brace_preserve_inline=!1,this.brace_style="collapse";for(var Z=0;Z<j.length;Z++)j[Z]==="preserve-inline"?this.brace_preserve_inline=!0:this.brace_style=j[Z];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",y),this.test_output_raw=this._get_boolean("test_output_raw"),this.jslint_happy&&(this.space_after_anon_function=!0)}E.prototype=new M,te.exports.Options=E},function(te){function o(y,E){this.raw_options=C(y,E),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(y,E){var T=this.raw_options[y],k=E||[];return typeof T=="object"?T!==null&&typeof T.concat=="function"&&(k=T.concat()):typeof T=="string"&&(k=T.split(/[^a-zA-Z0-9_\/\-]+/)),k},o.prototype._get_boolean=function(y,E){var T=this.raw_options[y],k=T===void 0?!!E:!!T;return k},o.prototype._get_characters=function(y,E){var T=this.raw_options[y],k=E||"";return typeof T=="string"&&(k=T.replace(/\\r/,"\r").replace(/\\n/,`
|
|
|
`).replace(/\\t/," ")),k},o.prototype._get_number=function(y,E){var T=this.raw_options[y];E=parseInt(E,10),isNaN(E)&&(E=0);var k=parseInt(T,10);return isNaN(k)&&(k=E),k},o.prototype._get_selection=function(y,E,T){var k=this._get_selection_list(y,E,T);if(k.length!==1)throw new Error("Invalid Option Value: The option '"+y+`' can only be one of the following values:
|
|
|
`+E+`
|
|
|
You passed in: '`+this.raw_options[y]+"'");return k[0]},o.prototype._get_selection_list=function(y,E,T){if(!E||E.length===0)throw new Error("Selection list cannot be empty.");if(T=T||[E[0]],!this._is_valid_selection(T,E))throw new Error("Invalid Default Value!");var k=this._get_array(y,T);if(!this._is_valid_selection(k,E))throw new Error("Invalid Option Value: The option '"+y+`' can contain only the following values:
|
|
|
`+E+`
|
|
|
You passed in: '`+this.raw_options[y]+"'");return k},o.prototype._is_valid_selection=function(y,E){return y.length&&E.length&&!y.some(function(T){return E.indexOf(T)===-1})};function C(y,E){var T={};y=M(y);var k;for(k in y)k!==E&&(T[k]=y[k]);if(E&&y[E])for(k in y[E])T[k]=y[E][k];return T}function M(y){var E={},T;for(T in y){var k=T.replace(/-/g,"_");E[k]=y[T]}return E}te.exports.Options=o,te.exports.normalizeOpts=M,te.exports.mergeOpts=C},function(te,o,C){var M=C(8).InputScanner,y=C(9).Tokenizer,E=C(9).TOKEN,T=C(13).Directives,k=C(4),j=C(12).Pattern,Z=C(14).TemplatablePattern;function U(se,Q){return Q.indexOf(se)!==-1}var A={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:E.START,RAW:E.RAW,EOF:E.EOF},K=new T(/\/\*/,/\*\//),D=/0[xX][0123456789abcdefABCDEF_]*n?|0[oO][01234567_]*n?|0[bB][01_]*n?|\d[\d_]*n|(?:\.\d[\d_]*|\d[\d_]*\.?[\d_]*)(?:[eE][+-]?[\d_]+)?/,O=/[0-9]/,re=/[^\d\.]/,oe=">>> === !== &&= ??= ||= << && >= ** != == <= >> || ?? |> < / - + > : & % ? ^ | *".split(" "),ie=">>>= ... >>= <<= === >>> !== **= &&= ??= ||= => ^= :: /= << <= == && -= >= >> != -- += ** || ?? ++ %= &= *= |= |> = ! ? > < : / ^ - + * & % ~ |";ie=ie.replace(/[-[\]{}()*+?.,\\^$|#]/g,"\\$&"),ie="\\?\\.(?!\\d) "+ie,ie=ie.replace(/ /g,"|");var Ee=new RegExp(ie),Me="continue,try,throw,return,var,let,const,if,switch,case,default,for,while,break,function,import,export".split(","),ke=Me.concat(["do","in","of","else","get","set","new","catch","finally","typeof","yield","async","await","from","as","class","extends"]),tt=new RegExp("^(?:"+ke.join("|")+")$"),ue,X=function(se,Q){y.call(this,se,Q),this._patterns.whitespace=this._patterns.whitespace.matching(/\u00A0\u1680\u180e\u2000-\u200a\u202f\u205f\u3000\ufeff/.source,/\u2028\u2029/.source);var V=new j(this._input),x=new Z(this._input).read_options(this._options);this.__patterns={template:x,identifier:x.starting_with(k.identifier).matching(k.identifierMatch),number:V.matching(D),punct:V.matching(Ee),comment:V.starting_with(/\/\//).until(/[\n\r\u2028\u2029]/),block_comment:V.starting_with(/\/\*/).until_after(/\*\//),html_comment_start:V.matching(/<!--/),html_comment_end:V.matching(/-->/),include:V.starting_with(/#include/).until_after(k.lineBreak),shebang:V.starting_with(/#!/).until_after(k.lineBreak),xml:V.matching(/[\s\S]*?<(\/?)([-a-zA-Z:0-9_.]+|{[^}]+?}|!\[CDATA\[[^\]]*?\]\]|)(\s*{[^}]+?}|\s+[-a-zA-Z:0-9_.]+|\s+[-a-zA-Z:0-9_.]+\s*=\s*('[^']*'|"[^"]*"|{([^{}]|{[^}]+?})+?}))*\s*(\/?)\s*>/),single_quote:x.until(/['\\\n\r\u2028\u2029]/),double_quote:x.until(/["\\\n\r\u2028\u2029]/),template_text:x.until(/[`\\$]/),template_expression:x.until(/[`}\\]/)}};X.prototype=new y,X.prototype._is_comment=function(se){return se.type===A.COMMENT||se.type===A.BLOCK_COMMENT||se.type===A.UNKNOWN},X.prototype._is_opening=function(se){return se.type===A.START_BLOCK||se.type===A.START_EXPR},X.prototype._is_closing=function(se,Q){return(se.type===A.END_BLOCK||se.type===A.END_EXPR)&&Q&&(se.text==="]"&&Q.text==="["||se.text===")"&&Q.text==="("||se.text==="}"&&Q.text==="{")},X.prototype._reset=function(){ue=!1},X.prototype._get_next_token=function(se,Q){var V=null;this._readWhitespace();var x=this._input.peek();return x===null?this._create_token(A.EOF,""):(V=V||this._read_non_javascript(x),V=V||this._read_string(x),V=V||this._read_pair(x,this._input.peek(1)),V=V||this._read_word(se),V=V||this._read_singles(x),V=V||this._read_comment(x),V=V||this._read_regexp(x,se),V=V||this._read_xml(x,se),V=V||this._read_punctuation(),V=V||this._create_token(A.UNKNOWN,this._input.next()),V)},X.prototype._read_word=function(se){var Q;if(Q=this.__patterns.identifier.read(),Q!=="")return Q=Q.replace(k.allLineBreaks,`
|
|
|
`),!(se.type===A.DOT||se.type===A.RESERVED&&(se.text==="set"||se.text==="get"))&&tt.test(Q)?(Q==="in"||Q==="of")&&(se.type===A.WORD||se.type===A.STRING)?this._create_token(A.OPERATOR,Q):this._create_token(A.RESERVED,Q):this._create_token(A.WORD,Q);if(Q=this.__patterns.number.read(),Q!=="")return this._create_token(A.WORD,Q)},X.prototype._read_singles=function(se){var Q=null;return se==="("||se==="["?Q=this._create_token(A.START_EXPR,se):se===")"||se==="]"?Q=this._create_token(A.END_EXPR,se):se==="{"?Q=this._create_token(A.START_BLOCK,se):se==="}"?Q=this._create_token(A.END_BLOCK,se):se===";"?Q=this._create_token(A.SEMICOLON,se):se==="."&&re.test(this._input.peek(1))?Q=this._create_token(A.DOT,se):se===","&&(Q=this._create_token(A.COMMA,se)),Q&&this._input.next(),Q},X.prototype._read_pair=function(se,Q){var V=null;return se==="#"&&Q==="{"&&(V=this._create_token(A.START_BLOCK,se+Q)),V&&(this._input.next(),this._input.next()),V},X.prototype._read_punctuation=function(){var se=this.__patterns.punct.read();if(se!=="")return se==="="?this._create_token(A.EQUALS,se):se==="?."?this._create_token(A.DOT,se):this._create_token(A.OPERATOR,se)},X.prototype._read_non_javascript=function(se){var Q="";if(se==="#"){if(this._is_first_token()&&(Q=this.__patterns.shebang.read(),Q))return this._create_token(A.UNKNOWN,Q.trim()+`
|
|
|
`);if(Q=this.__patterns.include.read(),Q)return this._create_token(A.UNKNOWN,Q.trim()+`
|
|
|
`);se=this._input.next();var V="#";if(this._input.hasNext()&&this._input.testChar(O)){do se=this._input.next(),V+=se;while(this._input.hasNext()&&se!=="#"&&se!=="=");return se==="#"||(this._input.peek()==="["&&this._input.peek(1)==="]"?(V+="[]",this._input.next(),this._input.next()):this._input.peek()==="{"&&this._input.peek(1)==="}"&&(V+="{}",this._input.next(),this._input.next())),this._create_token(A.WORD,V)}this._input.back()}else if(se==="<"&&this._is_first_token()){if(Q=this.__patterns.html_comment_start.read(),Q){for(;this._input.hasNext()&&!this._input.testChar(k.newline);)Q+=this._input.next();return ue=!0,this._create_token(A.COMMENT,Q)}}else if(ue&&se==="-"&&(Q=this.__patterns.html_comment_end.read(),Q))return ue=!1,this._create_token(A.COMMENT,Q);return null},X.prototype._read_comment=function(se){var Q=null;if(se==="/"){var V="";if(this._input.peek(1)==="*"){V=this.__patterns.block_comment.read();var x=K.get_directives(V);x&&x.ignore==="start"&&(V+=K.readIgnored(this._input)),V=V.replace(k.allLineBreaks,`
|
|
|
`),Q=this._create_token(A.BLOCK_COMMENT,V),Q.directives=x}else this._input.peek(1)==="/"&&(V=this.__patterns.comment.read(),Q=this._create_token(A.COMMENT,V))}return Q},X.prototype._read_string=function(se){if(se==="`"||se==="'"||se==='"'){var Q=this._input.next();return this.has_char_escapes=!1,se==="`"?Q+=this._read_string_recursive("`",!0,"${"):Q+=this._read_string_recursive(se),this.has_char_escapes&&this._options.unescape_strings&&(Q=L(Q)),this._input.peek()===se&&(Q+=this._input.next()),Q=Q.replace(k.allLineBreaks,`
|
|
|
`),this._create_token(A.STRING,Q)}return null},X.prototype._allow_regexp_or_xml=function(se){return se.type===A.RESERVED&&U(se.text,["return","case","throw","else","do","typeof","yield"])||se.type===A.END_EXPR&&se.text===")"&&se.opened.previous.type===A.RESERVED&&U(se.opened.previous.text,["if","while","for"])||U(se.type,[A.COMMENT,A.START_EXPR,A.START_BLOCK,A.START,A.END_BLOCK,A.OPERATOR,A.EQUALS,A.EOF,A.SEMICOLON,A.COMMA])},X.prototype._read_regexp=function(se,Q){if(se==="/"&&this._allow_regexp_or_xml(Q)){for(var V=this._input.next(),x=!1,w=!1;this._input.hasNext()&&(x||w||this._input.peek()!==se)&&!this._input.testChar(k.newline);)V+=this._input.peek(),x?x=!1:(x=this._input.peek()==="\\",this._input.peek()==="["?w=!0:this._input.peek()==="]"&&(w=!1)),this._input.next();return this._input.peek()===se&&(V+=this._input.next(),V+=this._input.read(k.identifier)),this._create_token(A.STRING,V)}return null},X.prototype._read_xml=function(se,Q){if(this._options.e4x&&se==="<"&&this._allow_regexp_or_xml(Q)){var V="",x=this.__patterns.xml.read_match();if(x){for(var w=x[2].replace(/^{\s+/,"{").replace(/\s+}$/,"}"),H=w.indexOf("{")===0,he=0;x;){var Ke=!!x[1],ft=x[2],Ue=!!x[x.length-1]||ft.slice(0,8)==="![CDATA[";if(!Ue&&(ft===w||H&&ft.replace(/^{\s+/,"{").replace(/\s+}$/,"}"))&&(Ke?--he:++he),V+=x[0],he<=0)break;x=this.__patterns.xml.read_match()}return x||(V+=this._input.match(/[\s\S]*/g)[0]),V=V.replace(k.allLineBreaks,`
|
|
|
`),this._create_token(A.STRING,V)}}return null};function L(se){for(var Q="",V=0,x=new M(se),w=null;x.hasNext();)if(w=x.match(/([\s]|[^\\]|\\\\)+/g),w&&(Q+=w[0]),x.peek()==="\\"){if(x.next(),x.peek()==="x")w=x.match(/x([0-9A-Fa-f]{2})/g);else if(x.peek()==="u")w=x.match(/u([0-9A-Fa-f]{4})/g),w||(w=x.match(/u\{([0-9A-Fa-f]+)\}/g));else{Q+="\\",x.hasNext()&&(Q+=x.next());continue}if(!w||(V=parseInt(w[1],16),V>126&&V<=255&&w[0].indexOf("x")===0))return se;V>=0&&V<32||V>1114111?Q+="\\"+w[0]:V===34||V===39||V===92?Q+="\\"+String.fromCharCode(V):Q+=String.fromCharCode(V)}return Q}X.prototype._read_string_recursive=function(se,Q,V){var x,w;se==="'"?w=this.__patterns.single_quote:se==='"'?w=this.__patterns.double_quote:se==="`"?w=this.__patterns.template_text:se==="}"&&(w=this.__patterns.template_expression);for(var H=w.read(),he="";this._input.hasNext();){if(he=this._input.next(),he===se||!Q&&k.newline.test(he)){this._input.back();break}else he==="\\"&&this._input.hasNext()?(x=this._input.peek(),x==="x"||x==="u"?this.has_char_escapes=!0:x==="\r"&&this._input.peek(1)===`
|
|
|
`&&this._input.next(),he+=this._input.next()):V&&(V==="${"&&he==="$"&&this._input.peek()==="{"&&(he+=this._input.next()),V===he&&(se==="`"?he+=this._read_string_recursive("}",Q,"`"):he+=this._read_string_recursive("`",Q,"${"),this._input.hasNext()&&(he+=this._input.next())));he+=w.read(),H+=he}return H},te.exports.Tokenizer=X,te.exports.TOKEN=A,te.exports.positionable_operators=oe.slice(),te.exports.line_starters=Me.slice()},function(te){var o=RegExp.prototype.hasOwnProperty("sticky");function C(M){this.__input=M||"",this.__input_length=this.__input.length,this.__position=0}C.prototype.restart=function(){this.__position=0},C.prototype.back=function(){this.__position>0&&(this.__position-=1)},C.prototype.hasNext=function(){return this.__position<this.__input_length},C.prototype.next=function(){var M=null;return this.hasNext()&&(M=this.__input.charAt(this.__position),this.__position+=1),M},C.prototype.peek=function(M){var y=null;return M=M||0,M+=this.__position,M>=0&&M<this.__input_length&&(y=this.__input.charAt(M)),y},C.prototype.__match=function(M,y){M.lastIndex=y;var E=M.exec(this.__input);return E&&!(o&&M.sticky)&&E.index!==y&&(E=null),E},C.prototype.test=function(M,y){return y=y||0,y+=this.__position,y>=0&&y<this.__input_length?!!this.__match(M,y):!1},C.prototype.testChar=function(M,y){var E=this.peek(y);return M.lastIndex=0,E!==null&&M.test(E)},C.prototype.match=function(M){var y=this.__match(M,this.__position);return y?this.__position+=y[0].length:y=null,y},C.prototype.read=function(M,y,E){var T="",k;return M&&(k=this.match(M),k&&(T+=k[0])),y&&(k||!M)&&(T+=this.readUntil(y,E)),T},C.prototype.readUntil=function(M,y){var E="",T=this.__position;M.lastIndex=this.__position;var k=M.exec(this.__input);return k?(T=k.index,y&&(T+=k[0].length)):T=this.__input_length,E=this.__input.substring(this.__position,T),this.__position=T,E},C.prototype.readUntilAfter=function(M){return this.readUntil(M,!0)},C.prototype.get_regexp=function(M,y){var E=null,T="g";return y&&o&&(T="y"),typeof M=="string"&&M!==""?E=new RegExp(M,T):M&&(E=new RegExp(M.source,T)),E},C.prototype.get_literal_regexp=function(M){return RegExp(M.replace(/[-\/\\^$*+?.()|[\]{}]/g,"\\$&"))},C.prototype.peekUntilAfter=function(M){var y=this.__position,E=this.readUntilAfter(M);return this.__position=y,E},C.prototype.lookBack=function(M){var y=this.__position-1;return y>=M.length&&this.__input.substring(y-M.length,y).toLowerCase()===M},te.exports.InputScanner=C},function(te,o,C){var M=C(8).InputScanner,y=C(3).Token,E=C(10).TokenStream,T=C(11).WhitespacePattern,k={START:"TK_START",RAW:"TK_RAW",EOF:"TK_EOF"},j=function(Z,U){this._input=new M(Z),this._options=U||{},this.__tokens=null,this._patterns={},this._patterns.whitespace=new T(this._input)};j.prototype.tokenize=function(){this._input.restart(),this.__tokens=new E,this._reset();for(var Z,U=new y(k.START,""),A=null,K=[],D=new E;U.type!==k.EOF;){for(Z=this._get_next_token(U,A);this._is_comment(Z);)D.add(Z),Z=this._get_next_token(U,A);D.isEmpty()||(Z.comments_before=D,D=new E),Z.parent=A,this._is_opening(Z)?(K.push(A),A=Z):A&&this._is_closing(Z,A)&&(Z.opened=A,A.closed=Z,A=K.pop(),Z.parent=A),Z.previous=U,U.next=Z,this.__tokens.add(Z),U=Z}return this.__tokens},j.prototype._is_first_token=function(){return this.__tokens.isEmpty()},j.prototype._reset=function(){},j.prototype._get_next_token=function(Z,U){this._readWhitespace();var A=this._input.read(/.+/g);return A?this._create_token(k.RAW,A):this._create_token(k.EOF,"")},j.prototype._is_comment=function(Z){return!1},j.prototype._is_opening=function(Z){return!1},j.prototype._is_closing=function(Z,U){return!1},j.prototype._create_token=function(Z,U){var A=new y(Z,U,this._patterns.whitespace.newline_count,this._patterns.whitespace.whitespace_before_token);return A},j.prototype._readWhitespace=function(){return this._patterns.whitespace.read()},te.exports.Tokenizer=j,te.exports.TOKEN=k},function(te){function o(C){this.__tokens=[],this.__tokens_length=this.__tokens.length,this.__position=0,this.__parent_token=C}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 C=null;return this.hasNext()&&(C=this.__tokens[this.__position],this.__position+=1),C},o.prototype.peek=function(C){var M=null;return C=C||0,C+=this.__position,C>=0&&C<this.__tokens_length&&(M=this.__tokens[C]),M},o.prototype.add=function(C){this.__parent_token&&(C.parent=this.__parent_token),this.__tokens.push(C),this.__tokens_length+=1},te.exports.TokenStream=o},function(te,o,C){var M=C(12).Pattern;function y(E,T){M.call(this,E,T),T?this._line_regexp=this._input.get_regexp(T._line_regexp):this.__set_whitespace_patterns("",""),this.newline_count=0,this.whitespace_before_token=""}y.prototype=new M,y.prototype.__set_whitespace_patterns=function(E,T){E+="\\t ",T+="\\n\\r",this._match_pattern=this._input.get_regexp("["+E+T+"]+",!0),this._newline_regexp=this._input.get_regexp("\\r\\n|["+T+"]")},y.prototype.read=function(){this.newline_count=0,this.whitespace_before_token="";var E=this._input.read(this._match_pattern);if(E===" ")this.whitespace_before_token=" ";else if(E){var T=this.__split(this._newline_regexp,E);this.newline_count=T.length-1,this.whitespace_before_token=T[this.newline_count]}return E},y.prototype.matching=function(E,T){var k=this._create();return k.__set_whitespace_patterns(E,T),k._update(),k},y.prototype._create=function(){return new y(this._input,this)},y.prototype.__split=function(E,T){E.lastIndex=0;for(var k=0,j=[],Z=E.exec(T);Z;)j.push(T.substring(k,Z.index)),k=Z.index+Z[0].length,Z=E.exec(T);return k<T.length?j.push(T.substring(k,T.length)):j.push(""),j},te.exports.WhitespacePattern=y},function(te){function o(C,M){this._input=C,this._starting_pattern=null,this._match_pattern=null,this._until_pattern=null,this._until_after=!1,M&&(this._starting_pattern=this._input.get_regexp(M._starting_pattern,!0),this._match_pattern=this._input.get_regexp(M._match_pattern,!0),this._until_pattern=this._input.get_regexp(M._until_pattern),this._until_after=M._until_after)}o.prototype.read=function(){var C=this._input.read(this._starting_pattern);return(!this._starting_pattern||C)&&(C+=this._input.read(this._match_pattern,this._until_pattern,this._until_after)),C},o.prototype.read_match=function(){return this._input.match(this._match_pattern)},o.prototype.until_after=function(C){var M=this._create();return M._until_after=!0,M._until_pattern=this._input.get_regexp(C),M._update(),M},o.prototype.until=function(C){var M=this._create();return M._until_after=!1,M._until_pattern=this._input.get_regexp(C),M._update(),M},o.prototype.starting_with=function(C){var M=this._create();return M._starting_pattern=this._input.get_regexp(C,!0),M._update(),M},o.prototype.matching=function(C){var M=this._create();return M._match_pattern=this._input.get_regexp(C,!0),M._update(),M},o.prototype._create=function(){return new o(this._input,this)},o.prototype._update=function(){},te.exports.Pattern=o},function(te){function o(C,M){C=typeof C=="string"?C:C.source,M=typeof M=="string"?M:M.source,this.__directives_block_pattern=new RegExp(C+/ beautify( \w+[:]\w+)+ /.source+M,"g"),this.__directive_pattern=/ (\w+)[:](\w+)/g,this.__directives_end_ignore_pattern=new RegExp(C+/\sbeautify\signore:end\s/.source+M,"g")}o.prototype.get_directives=function(C){if(!C.match(this.__directives_block_pattern))return null;var M={};this.__directive_pattern.lastIndex=0;for(var y=this.__directive_pattern.exec(C);y;)M[y[1]]=y[2],y=this.__directive_pattern.exec(C);return M},o.prototype.readIgnored=function(C){return C.readUntilAfter(this.__directives_end_ignore_pattern)},te.exports.Directives=o},function(te,o,C){var M=C(12).Pattern,y={django:!1,erb:!1,handlebars:!1,php:!1,smarty:!1,angular:!1};function E(T,k){M.call(this,T,k),this.__template_pattern=null,this._disabled=Object.assign({},y),this._excluded=Object.assign({},y),k&&(this.__template_pattern=this._input.get_regexp(k.__template_pattern),this._excluded=Object.assign(this._excluded,k._excluded),this._disabled=Object.assign(this._disabled,k._disabled));var j=new M(T);this.__patterns={handlebars_comment:j.starting_with(/{{!--/).until_after(/--}}/),handlebars_unescaped:j.starting_with(/{{{/).until_after(/}}}/),handlebars:j.starting_with(/{{/).until_after(/}}/),php:j.starting_with(/<\?(?:[= ]|php)/).until_after(/\?>/),erb:j.starting_with(/<%[^%]/).until_after(/[^%]%>/),django:j.starting_with(/{%/).until_after(/%}/),django_value:j.starting_with(/{{/).until_after(/}}/),django_comment:j.starting_with(/{#/).until_after(/#}/),smarty:j.starting_with(/{(?=[^}{\s\n])/).until_after(/[^\s\n]}/),smarty_comment:j.starting_with(/{\*/).until_after(/\*}/),smarty_literal:j.starting_with(/{literal}/).until_after(/{\/literal}/)}}E.prototype=new M,E.prototype._create=function(){return new E(this._input,this)},E.prototype._update=function(){this.__set_templated_pattern()},E.prototype.disable=function(T){var k=this._create();return k._disabled[T]=!0,k._update(),k},E.prototype.read_options=function(T){var k=this._create();for(var j in y)k._disabled[j]=T.templating.indexOf(j)===-1;return k._update(),k},E.prototype.exclude=function(T){var k=this._create();return k._excluded[T]=!0,k._update(),k},E.prototype.read=function(){var T="";this._match_pattern?T=this._input.read(this._starting_pattern):T=this._input.read(this._starting_pattern,this.__template_pattern);for(var k=this._read_template();k;)this._match_pattern?k+=this._input.read(this._match_pattern):k+=this._input.readUntil(this.__template_pattern),T+=k,k=this._read_template();return this._until_after&&(T+=this._input.readUntilAfter(this._until_pattern)),T},E.prototype.__set_templated_pattern=function(){var T=[];this._disabled.php||T.push(this.__patterns.php._starting_pattern.source),this._disabled.handlebars||T.push(this.__patterns.handlebars._starting_pattern.source),this._disabled.angular||T.push(this.__patterns.handlebars._starting_pattern.source),this._disabled.erb||T.push(this.__patterns.erb._starting_pattern.source),this._disabled.django||(T.push(this.__patterns.django._starting_pattern.source),T.push(this.__patterns.django_value._starting_pattern.source),T.push(this.__patterns.django_comment._starting_pattern.source)),this._disabled.smarty||T.push(this.__patterns.smarty._starting_pattern.source),this._until_pattern&&T.push(this._until_pattern.source),this.__template_pattern=this._input.get_regexp("(?:"+T.join("|")+")")},E.prototype._read_template=function(){var T="",k=this._input.peek();if(k==="<"){var j=this._input.peek(1);!this._disabled.php&&!this._excluded.php&&j==="?"&&(T=T||this.__patterns.php.read()),!this._disabled.erb&&!this._excluded.erb&&j==="%"&&(T=T||this.__patterns.erb.read())}else k==="{"&&(!this._disabled.handlebars&&!this._excluded.handlebars&&(T=T||this.__patterns.handlebars_comment.read(),T=T||this.__patterns.handlebars_unescaped.read(),T=T||this.__patterns.handlebars.read()),this._disabled.django||(!this._excluded.django&&!this._excluded.handlebars&&(T=T||this.__patterns.django_value.read()),this._excluded.django||(T=T||this.__patterns.django_comment.read(),T=T||this.__patterns.django.read())),this._disabled.smarty||this._disabled.django&&this._disabled.handlebars&&(T=T||this.__patterns.smarty_comment.read(),T=T||this.__patterns.smarty_literal.read(),T=T||this.__patterns.smarty.read()));return T},te.exports.TemplatablePattern=E}],z={};function g(te){var o=z[te];if(o!==void 0)return o.exports;var C=z[te]={exports:{}};return fe[te](C,C.exports,g),C.exports}var q=g(0);ae=q})();var W=ae;m=[],v=function(){return{js_beautify:W}}.apply(mt,m),v!==void 0&&(ln.exports=v)})()},15342:function(ln){(function(m,v){ln.exports=v()})(typeof self!="undefined"?self:this,function(){return function(mt){var m={};function v(ae){if(m[ae])return m[ae].exports;var W=m[ae]={i:ae,l:!1,exports:{}};return mt[ae].call(W.exports,W,W.exports,v),W.l=!0,W.exports}return v.m=mt,v.c=m,v.d=function(ae,W,fe){v.o(ae,W)||Object.defineProperty(ae,W,{enumerable:!0,get:fe})},v.r=function(ae){typeof Symbol!="undefined"&&Symbol.toStringTag&&Object.defineProperty(ae,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(ae,"__esModule",{value:!0})},v.t=function(ae,W){if(W&1&&(ae=v(ae)),W&8||W&4&&typeof ae=="object"&&ae&&ae.__esModule)return ae;var fe=Object.create(null);if(v.r(fe),Object.defineProperty(fe,"default",{enumerable:!0,value:ae}),W&2&&typeof ae!="string")for(var z in ae)v.d(fe,z,function(g){return ae[g]}.bind(null,z));return fe},v.n=function(ae){var W=ae&&ae.__esModule?function(){return ae.default}:function(){return ae};return v.d(W,"a",W),W},v.o=function(ae,W){return Object.prototype.hasOwnProperty.call(ae,W)},v.p="",v(v.s=1)}([function(mt,m,v){},function(mt,m,v){"use strict";v.r(m);var ae=v(0),W=function(){function ne(u,f,h){this.lexer=void 0,this.start=void 0,this.end=void 0,this.lexer=u,this.start=f,this.end=h}return ne.range=function(f,h){return h?!f||!f.loc||!h.loc||f.loc.lexer!==h.loc.lexer?null:new ne(f.loc.lexer,f.loc.start,h.loc.end):f&&f.loc},ne}(),fe=function(){function ne(f,h){this.text=void 0,this.loc=void 0,this.text=f,this.loc=h}var u=ne.prototype;return u.range=function(h,_){return new ne(_,W.range(this,h))},ne}(),z=function ne(u,f){this.position=void 0;var h="KaTeX parse error: "+u,_,N=f&&f.loc;if(N&&N.start<=N.end){var ee=N.lexer.input;_=N.start;var De=N.end;_===ee.length?h+=" at end of input: ":h+=" at position "+(_+1)+": ";var Be=ee.slice(_,De).replace(/[^]/g,"$&\u0332"),dt;_>15?dt="\u2026"+ee.slice(_-15,_):dt=ee.slice(0,_);var It;De+15<ee.length?It=ee.slice(De,De+15)+"\u2026":It=ee.slice(De),h+=dt+Be+It}var Ut=new Error(h);return Ut.name="ParseError",Ut.__proto__=ne.prototype,Ut.position=_,Ut};z.prototype.__proto__=Error.prototype;var g=z,q=function(u,f){return u.indexOf(f)!==-1},te=function(u,f){return u===void 0?f:u},o=/([A-Z])/g,C=function(u){return u.replace(o,"-$1").toLowerCase()},M={"&":"&",">":">","<":"<",'"':""","'":"'"},y=/[&><"']/g;function E(ne){return String(ne).replace(y,function(u){return M[u]})}var T=function ne(u){return u.type==="ordgroup"||u.type==="color"?u.body.length===1?ne(u.body[0]):u:u.type==="font"?ne(u.body):u},k=function(u){var f=T(u);return f.type==="mathord"||f.type==="textord"||f.type==="atom"},j=function(u){if(!u)throw new Error("Expected non-null, but got "+String(u));return u},Z=function(u){var f=/^\s*([^\\/#]*?)(?::|�*58|�*3a)/i.exec(u);return f!=null?f[1]:"_relative"},U={contains:q,deflt:te,escape:E,hyphenate:C,getBaseElem:T,isCharacterBox:k,protocolFromUrl:Z},A=function(){function ne(f){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,f=f||{},this.displayMode=U.deflt(f.displayMode,!1),this.output=U.deflt(f.output,"htmlAndMathml"),this.leqno=U.deflt(f.leqno,!1),this.fleqn=U.deflt(f.fleqn,!1),this.throwOnError=U.deflt(f.throwOnError,!0),this.errorColor=U.deflt(f.errorColor,"#cc0000"),this.macros=f.macros||{},this.minRuleThickness=Math.max(0,U.deflt(f.minRuleThickness,0)),this.colorIsTextColor=U.deflt(f.colorIsTextColor,!1),this.strict=U.deflt(f.strict,"warn"),this.trust=U.deflt(f.trust,!1),this.maxSize=Math.max(0,U.deflt(f.maxSize,1/0)),this.maxExpand=Math.max(0,U.deflt(f.maxExpand,1e3))}var u=ne.prototype;return u.reportNonstrict=function(h,_,N){var ee=this.strict;if(typeof ee=="function"&&(ee=ee(h,_,N)),!(!ee||ee==="ignore")){if(ee===!0||ee==="error")throw new g("LaTeX-incompatible input and strict mode is set to 'error': "+(_+" ["+h+"]"),N);ee==="warn"?typeof console!="undefined"&&console.warn("LaTeX-incompatible input and strict mode is set to 'warn': "+(_+" ["+h+"]")):typeof console!="undefined"&&console.warn("LaTeX-incompatible input and strict mode is set to "+("unrecognized '"+ee+"': "+_+" ["+h+"]"))}},u.useStrictBehavior=function(h,_,N){var ee=this.strict;if(typeof ee=="function")try{ee=ee(h,_,N)}catch(De){ee="error"}return!ee||ee==="ignore"?!1:ee===!0||ee==="error"?!0:ee==="warn"?(typeof console!="undefined"&&console.warn("LaTeX-incompatible input and strict mode is set to 'warn': "+(_+" ["+h+"]")),!1):(typeof console!="undefined"&&console.warn("LaTeX-incompatible input and strict mode is set to "+("unrecognized '"+ee+"': "+_+" ["+h+"]")),!1)},u.isTrusted=function(h){h.url&&!h.protocol&&(h.protocol=U.protocolFromUrl(h.url));var _=typeof this.trust=="function"?this.trust(h):this.trust;return!!_},ne}(),K=function(){function ne(f,h,_){this.id=void 0,this.size=void 0,this.cramped=void 0,this.id=f,this.size=h,this.cramped=_}var u=ne.prototype;return u.sup=function(){return tt[ue[this.id]]},u.sub=function(){return tt[X[this.id]]},u.fracNum=function(){return tt[L[this.id]]},u.fracDen=function(){return tt[se[this.id]]},u.cramp=function(){return tt[Q[this.id]]},u.text=function(){return tt[V[this.id]]},u.isTight=function(){return this.size>=2},ne}(),D=0,O=1,re=2,oe=3,ie=4,Ee=5,Me=6,ke=7,tt=[new K(D,0,!1),new K(O,0,!0),new K(re,1,!1),new K(oe,1,!0),new K(ie,2,!1),new K(Ee,2,!0),new K(Me,3,!1),new K(ke,3,!0)],ue=[ie,Ee,ie,Ee,Me,ke,Me,ke],X=[Ee,Ee,Ee,Ee,ke,ke,ke,ke],L=[re,oe,ie,Ee,Me,ke,Me,ke],se=[oe,oe,Ee,Ee,ke,ke,ke,ke],Q=[O,O,oe,oe,Ee,Ee,ke,ke],V=[D,O,re,oe,re,oe,re,oe],x={DISPLAY:tt[D],TEXT:tt[re],SCRIPT:tt[ie],SCRIPTSCRIPT:tt[Me]},w=[{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 H(ne){for(var u=0;u<w.length;u++)for(var f=w[u],h=0;h<f.blocks.length;h++){var _=f.blocks[h];if(ne>=_[0]&&ne<=_[1])return f.name}return null}var he=[];w.forEach(function(ne){return ne.blocks.forEach(function(u){return he.push.apply(he,u)})});function Ke(ne){for(var u=0;u<he.length;u+=2)if(ne>=he[u]&&ne<=he[u+1])return!0;return!1}var ft=80,Ue=function(u,f){return"M95,"+(622+u+f)+`
|
|
|
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)+" "+f+"h400000v"+(40+u)+"h-400000z"},st=function(u,f){return"M263,"+(601+u+f)+`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)+" "+f+"h400000v"+(40+u)+"h-400000z"},pt=function(u,f){return"M983 "+(10+u+f)+`
|
|
|
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)+" "+f+"h400000v"+(40+u)+"h-400000z"},Et=function(u,f){return"M424,"+(2398+u+f)+`
|
|
|
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)+" "+f+`
|
|
|
h400000v`+(40+u)+"h-400000z"},Ne=function(u,f){return"M473,"+(2713+u+f)+`
|
|
|
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)+" "+f+"h400000v"+(40+u)+"H1017.7z"},St=function(u,f,h){var _=h-54-f-u;return"M702 "+(u+f)+"H400000"+(40+u)+`
|
|
|
H742v`+_+`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 `+f+"H400000v"+(40+u)+"H742z"},at=function(u,f,h){f=1e3*f;var _="";switch(u){case"sqrtMain":_=Ue(f,ft);break;case"sqrtSize1":_=st(f,ft);break;case"sqrtSize2":_=pt(f,ft);break;case"sqrtSize3":_=Et(f,ft);break;case"sqrtSize4":_=Ne(f,ft);break;case"sqrtTall":_=St(f,ft,h)}return _},Nt={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`},Ge=function(){function ne(f){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=f,this.classes=[],this.height=0,this.depth=0,this.maxFontSize=0,this.style={}}var u=ne.prototype;return u.hasClass=function(h){return U.contains(this.classes,h)},u.toNode=function(){for(var h=document.createDocumentFragment(),_=0;_<this.children.length;_++)h.appendChild(this.children[_].toNode());return h},u.toMarkup=function(){for(var h="",_=0;_<this.children.length;_++)h+=this.children[_].toMarkup();return h},u.toText=function(){var h=function(N){return N.toText()};return this.children.map(h).join("")},ne}(),je=function(u){return u.filter(function(f){return f}).join(" ")},Re=function(u,f,h){if(this.classes=u||[],this.attributes={},this.height=0,this.depth=0,this.maxFontSize=0,this.style=h||{},f){f.style.isTight()&&this.classes.push("mtight");var _=f.getColor();_&&(this.style.color=_)}},_e=function(u){var f=document.createElement(u);f.className=je(this.classes);for(var h in this.style)this.style.hasOwnProperty(h)&&(f.style[h]=this.style[h]);for(var _ in this.attributes)this.attributes.hasOwnProperty(_)&&f.setAttribute(_,this.attributes[_]);for(var N=0;N<this.children.length;N++)f.appendChild(this.children[N].toNode());return f},Y=function(u){var f="<"+u;this.classes.length&&(f+=' class="'+U.escape(je(this.classes))+'"');var h="";for(var _ in this.style)this.style.hasOwnProperty(_)&&(h+=U.hyphenate(_)+":"+this.style[_]+";");h&&(f+=' style="'+U.escape(h)+'"');for(var N in this.attributes)this.attributes.hasOwnProperty(N)&&(f+=" "+N+'="'+U.escape(this.attributes[N])+'"');f+=">";for(var ee=0;ee<this.children.length;ee++)f+=this.children[ee].toMarkup();return f+="</"+u+">",f},Le=function(){function ne(f,h,_,N){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,Re.call(this,f,_,N),this.children=h||[]}var u=ne.prototype;return u.setAttribute=function(h,_){this.attributes[h]=_},u.hasClass=function(h){return U.contains(this.classes,h)},u.toNode=function(){return _e.call(this,"span")},u.toMarkup=function(){return Y.call(this,"span")},ne}(),Ce=function(){function ne(f,h,_,N){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,Re.call(this,h,N),this.children=_||[],this.setAttribute("href",f)}var u=ne.prototype;return u.setAttribute=function(h,_){this.attributes[h]=_},u.hasClass=function(h){return U.contains(this.classes,h)},u.toNode=function(){return _e.call(this,"a")},u.toMarkup=function(){return Y.call(this,"a")},ne}(),B=function(){function ne(f,h,_){this.src=void 0,this.alt=void 0,this.classes=void 0,this.height=void 0,this.depth=void 0,this.maxFontSize=void 0,this.style=void 0,this.alt=h,this.src=f,this.classes=["mord"],this.style=_}var u=ne.prototype;return u.hasClass=function(h){return U.contains(this.classes,h)},u.toNode=function(){var h=document.createElement("img");h.src=this.src,h.alt=this.alt,h.className="mord";for(var _ in this.style)this.style.hasOwnProperty(_)&&(h.style[_]=this.style[_]);return h},u.toMarkup=function(){var h="<img src='"+this.src+" 'alt='"+this.alt+"' ",_="";for(var N in this.style)this.style.hasOwnProperty(N)&&(_+=U.hyphenate(N)+":"+this.style[N]+";");return _&&(h+=' style="'+U.escape(_)+'"'),h+="'/>",h},ne}(),P={\u00EE:"\u0131\u0302",\u00EF:"\u0131\u0308",\u00ED:"\u0131\u0301",\u00EC:"\u0131\u0300"},ce=function(){function ne(f,h,_,N,ee,De,Be,dt){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=f,this.height=h||0,this.depth=_||0,this.italic=N||0,this.skew=ee||0,this.width=De||0,this.classes=Be||[],this.style=dt||{},this.maxFontSize=0;var It=H(this.text.charCodeAt(0));It&&this.classes.push(It+"_fallback"),/[îïíì]/.test(this.text)&&(this.text=P[this.text])}var u=ne.prototype;return u.hasClass=function(h){return U.contains(this.classes,h)},u.toNode=function(){var h=document.createTextNode(this.text),_=null;this.italic>0&&(_=document.createElement("span"),_.style.marginRight=this.italic+"em"),this.classes.length>0&&(_=_||document.createElement("span"),_.className=je(this.classes));for(var N in this.style)this.style.hasOwnProperty(N)&&(_=_||document.createElement("span"),_.style[N]=this.style[N]);return _?(_.appendChild(h),_):h},u.toMarkup=function(){var h=!1,_="<span";this.classes.length&&(h=!0,_+=' class="',_+=U.escape(je(this.classes)),_+='"');var N="";this.italic>0&&(N+="margin-right:"+this.italic+"em;");for(var ee in this.style)this.style.hasOwnProperty(ee)&&(N+=U.hyphenate(ee)+":"+this.style[ee]+";");N&&(h=!0,_+=' style="'+U.escape(N)+'"');var De=U.escape(this.text);return h?(_+=">",_+=De,_+="</span>",_):De},ne}(),ve=function(){function ne(f,h){this.children=void 0,this.attributes=void 0,this.children=f||[],this.attributes=h||{}}var u=ne.prototype;return u.toNode=function(){var h="http://www.w3.org/2000/svg",_=document.createElementNS(h,"svg");for(var N in this.attributes)Object.prototype.hasOwnProperty.call(this.attributes,N)&&_.setAttribute(N,this.attributes[N]);for(var ee=0;ee<this.children.length;ee++)_.appendChild(this.children[ee].toNode());return _},u.toMarkup=function(){var h="<svg";for(var _ in this.attributes)Object.prototype.hasOwnProperty.call(this.attributes,_)&&(h+=" "+_+"='"+this.attributes[_]+"'");h+=">";for(var N=0;N<this.children.length;N++)h+=this.children[N].toMarkup();return h+="</svg>",h},ne}(),de=function(){function ne(f,h){this.pathName=void 0,this.alternate=void 0,this.pathName=f,this.alternate=h}var u=ne.prototype;return u.toNode=function(){var h="http://www.w3.org/2000/svg",_=document.createElementNS(h,"path");return this.alternate?_.setAttribute("d",this.alternate):_.setAttribute("d",Nt[this.pathName]),_},u.toMarkup=function(){return this.alternate?"<path d='"+this.alternate+"'/>":"<path d='"+Nt[this.pathName]+"'/>"},ne}(),ye=function(){function ne(f){this.attributes=void 0,this.attributes=f||{}}var u=ne.prototype;return u.toNode=function(){var h="http://www.w3.org/2000/svg",_=document.createElementNS(h,"line");for(var N in this.attributes)Object.prototype.hasOwnProperty.call(this.attributes,N)&&_.setAttribute(N,this.attributes[N]);return _},u.toMarkup=function(){var h="<line";for(var _ in this.attributes)Object.prototype.hasOwnProperty.call(this.attributes,_)&&(h+=" "+_+"='"+this.attributes[_]+"'");return h+="/>",h},ne}();function Te(ne){if(ne instanceof ce)return ne;throw new Error("Expected symbolNode but got "+String(ne)+".")}function we(ne){if(ne instanceof Le)return ne;throw new Error("Expected span<HtmlDomNode> but got "+String(ne)+".")}var Ie={"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]}},Ae={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]},Xe={\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 gt(ne,u){Ie[ne]=u}function ht(ne,u,f){if(!Ie[u])throw new Error("Font metrics not found for font: "+u+".");var h=ne.charCodeAt(0),_=Ie[u][h];if(!_&&ne[0]in Xe&&(h=Xe[ne[0]].charCodeAt(0),_=Ie[u][h]),!_&&f==="text"&&Ke(h)&&(_=Ie[u][77]),_)return{depth:_[0],height:_[1],italic:_[2],skew:_[3],width:_[4]}}var nt={};function Oe(ne){var u;if(ne>=5?u=0:ne>=3?u=1:u=2,!nt[u]){var f=nt[u]={cssEmPerMu:Ae.quad[u]/18};for(var h in Ae)Ae.hasOwnProperty(h)&&(f[h]=Ae[h][u])}return nt[u]}var qe={bin:1,close:1,inner:1,open:1,punct:1,rel:1},rt={"accent-token":1,mathord:1,"op-token":1,spacing:1,textord:1},ot={math:{},text:{}},Rt=ot;function S(ne,u,f,h,_,N){ot[ne][_]={font:u,group:f,replace:h},N&&h&&(ot[ne][h]=ot[ne][_])}var R="math",Ze="text",J="main",be="ams",zt="accent-token",ze="bin",Qe="close",lt="inner",le="mathord",pe="op-token",Pe="open",$e="punct",G="rel",bt="spacing",xe="textord";S(R,J,G,"\u2261","\\equiv",!0),S(R,J,G,"\u227A","\\prec",!0),S(R,J,G,"\u227B","\\succ",!0),S(R,J,G,"\u223C","\\sim",!0),S(R,J,G,"\u22A5","\\perp"),S(R,J,G,"\u2AAF","\\preceq",!0),S(R,J,G,"\u2AB0","\\succeq",!0),S(R,J,G,"\u2243","\\simeq",!0),S(R,J,G,"\u2223","\\mid",!0),S(R,J,G,"\u226A","\\ll",!0),S(R,J,G,"\u226B","\\gg",!0),S(R,J,G,"\u224D","\\asymp",!0),S(R,J,G,"\u2225","\\parallel"),S(R,J,G,"\u22C8","\\bowtie",!0),S(R,J,G,"\u2323","\\smile",!0),S(R,J,G,"\u2291","\\sqsubseteq",!0),S(R,J,G,"\u2292","\\sqsupseteq",!0),S(R,J,G,"\u2250","\\doteq",!0),S(R,J,G,"\u2322","\\frown",!0),S(R,J,G,"\u220B","\\ni",!0),S(R,J,G,"\u221D","\\propto",!0),S(R,J,G,"\u22A2","\\vdash",!0),S(R,J,G,"\u22A3","\\dashv",!0),S(R,J,G,"\u220B","\\owns"),S(R,J,$e,".","\\ldotp"),S(R,J,$e,"\u22C5","\\cdotp"),S(R,J,xe,"#","\\#"),S(Ze,J,xe,"#","\\#"),S(R,J,xe,"&","\\&"),S(Ze,J,xe,"&","\\&"),S(R,J,xe,"\u2135","\\aleph",!0),S(R,J,xe,"\u2200","\\forall",!0),S(R,J,xe,"\u210F","\\hbar",!0),S(R,J,xe,"\u2203","\\exists",!0),S(R,J,xe,"\u2207","\\nabla",!0),S(R,J,xe,"\u266D","\\flat",!0),S(R,J,xe,"\u2113","\\ell",!0),S(R,J,xe,"\u266E","\\natural",!0),S(R,J,xe,"\u2663","\\clubsuit",!0),S(R,J,xe,"\u2118","\\wp",!0),S(R,J,xe,"\u266F","\\sharp",!0),S(R,J,xe,"\u2662","\\diamondsuit",!0),S(R,J,xe,"\u211C","\\Re",!0),S(R,J,xe,"\u2661","\\heartsuit",!0),S(R,J,xe,"\u2111","\\Im",!0),S(R,J,xe,"\u2660","\\spadesuit",!0),S(Ze,J,xe,"\xA7","\\S",!0),S(Ze,J,xe,"\xB6","\\P",!0),S(R,J,xe,"\u2020","\\dag"),S(Ze,J,xe,"\u2020","\\dag"),S(Ze,J,xe,"\u2020","\\textdagger"),S(R,J,xe,"\u2021","\\ddag"),S(Ze,J,xe,"\u2021","\\ddag"),S(Ze,J,xe,"\u2021","\\textdaggerdbl"),S(R,J,Qe,"\u23B1","\\rmoustache",!0),S(R,J,Pe,"\u23B0","\\lmoustache",!0),S(R,J,Qe,"\u27EF","\\rgroup",!0),S(R,J,Pe,"\u27EE","\\lgroup",!0),S(R,J,ze,"\u2213","\\mp",!0),S(R,J,ze,"\u2296","\\ominus",!0),S(R,J,ze,"\u228E","\\uplus",!0),S(R,J,ze,"\u2293","\\sqcap",!0),S(R,J,ze,"\u2217","\\ast"),S(R,J,ze,"\u2294","\\sqcup",!0),S(R,J,ze,"\u25EF","\\bigcirc"),S(R,J,ze,"\u2219","\\bullet"),S(R,J,ze,"\u2021","\\ddagger"),S(R,J,ze,"\u2240","\\wr",!0),S(R,J,ze,"\u2A3F","\\amalg"),S(R,J,ze,"&","\\And"),S(R,J,G,"\u27F5","\\longleftarrow",!0),S(R,J,G,"\u21D0","\\Leftarrow",!0),S(R,J,G,"\u27F8","\\Longleftarrow",!0),S(R,J,G,"\u27F6","\\longrightarrow",!0),S(R,J,G,"\u21D2","\\Rightarrow",!0),S(R,J,G,"\u27F9","\\Longrightarrow",!0),S(R,J,G,"\u2194","\\leftrightarrow",!0),S(R,J,G,"\u27F7","\\longleftrightarrow",!0),S(R,J,G,"\u21D4","\\Leftrightarrow",!0),S(R,J,G,"\u27FA","\\Longleftrightarrow",!0),S(R,J,G,"\u21A6","\\mapsto",!0),S(R,J,G,"\u27FC","\\longmapsto",!0),S(R,J,G,"\u2197","\\nearrow",!0),S(R,J,G,"\u21A9","\\hookleftarrow",!0),S(R,J,G,"\u21AA","\\hookrightarrow",!0),S(R,J,G,"\u2198","\\searrow",!0),S(R,J,G,"\u21BC","\\leftharpoonup",!0),S(R,J,G,"\u21C0","\\rightharpoonup",!0),S(R,J,G,"\u2199","\\swarrow",!0),S(R,J,G,"\u21BD","\\leftharpoondown",!0),S(R,J,G,"\u21C1","\\rightharpoondown",!0),S(R,J,G,"\u2196","\\nwarrow",!0),S(R,J,G,"\u21CC","\\rightleftharpoons",!0),S(R,be,G,"\u226E","\\nless",!0),S(R,be,G,"\uE010","\\@nleqslant"),S(R,be,G,"\uE011","\\@nleqq"),S(R,be,G,"\u2A87","\\lneq",!0),S(R,be,G,"\u2268","\\lneqq",!0),S(R,be,G,"\uE00C","\\@lvertneqq"),S(R,be,G,"\u22E6","\\lnsim",!0),S(R,be,G,"\u2A89","\\lnapprox",!0),S(R,be,G,"\u2280","\\nprec",!0),S(R,be,G,"\u22E0","\\npreceq",!0),S(R,be,G,"\u22E8","\\precnsim",!0),S(R,be,G,"\u2AB9","\\precnapprox",!0),S(R,be,G,"\u2241","\\nsim",!0),S(R,be,G,"\uE006","\\@nshortmid"),S(R,be,G,"\u2224","\\nmid",!0),S(R,be,G,"\u22AC","\\nvdash",!0),S(R,be,G,"\u22AD","\\nvDash",!0),S(R,be,G,"\u22EA","\\ntriangleleft"),S(R,be,G,"\u22EC","\\ntrianglelefteq",!0),S(R,be,G,"\u228A","\\subsetneq",!0),S(R,be,G,"\uE01A","\\@varsubsetneq"),S(R,be,G,"\u2ACB","\\subsetneqq",!0),S(R,be,G,"\uE017","\\@varsubsetneqq"),S(R,be,G,"\u226F","\\ngtr",!0),S(R,be,G,"\uE00F","\\@ngeqslant"),S(R,be,G,"\uE00E","\\@ngeqq"),S(R,be,G,"\u2A88","\\gneq",!0),S(R,be,G,"\u2269","\\gneqq",!0),S(R,be,G,"\uE00D","\\@gvertneqq"),S(R,be,G,"\u22E7","\\gnsim",!0),S(R,be,G,"\u2A8A","\\gnapprox",!0),S(R,be,G,"\u2281","\\nsucc",!0),S(R,be,G,"\u22E1","\\nsucceq",!0),S(R,be,G,"\u22E9","\\succnsim",!0),S(R,be,G,"\u2ABA","\\succnapprox",!0),S(R,be,G,"\u2246","\\ncong",!0),S(R,be,G,"\uE007","\\@nshortparallel"),S(R,be,G,"\u2226","\\nparallel",!0),S(R,be,G,"\u22AF","\\nVDash",!0),S(R,be,G,"\u22EB","\\ntriangleright"),S(R,be,G,"\u22ED","\\ntrianglerighteq",!0),S(R,be,G,"\uE018","\\@nsupseteqq"),S(R,be,G,"\u228B","\\supsetneq",!0),S(R,be,G,"\uE01B","\\@varsupsetneq"),S(R,be,G,"\u2ACC","\\supsetneqq",!0),S(R,be,G,"\uE019","\\@varsupsetneqq"),S(R,be,G,"\u22AE","\\nVdash",!0),S(R,be,G,"\u2AB5","\\precneqq",!0),S(R,be,G,"\u2AB6","\\succneqq",!0),S(R,be,G,"\uE016","\\@nsubseteqq"),S(R,be,ze,"\u22B4","\\unlhd"),S(R,be,ze,"\u22B5","\\unrhd"),S(R,be,G,"\u219A","\\nleftarrow",!0),S(R,be,G,"\u219B","\\nrightarrow",!0),S(R,be,G,"\u21CD","\\nLeftarrow",!0),S(R,be,G,"\u21CF","\\nRightarrow",!0),S(R,be,G,"\u21AE","\\nleftrightarrow",!0),S(R,be,G,"\u21CE","\\nLeftrightarrow",!0),S(R,be,G,"\u25B3","\\vartriangle"),S(R,be,xe,"\u210F","\\hslash"),S(R,be,xe,"\u25BD","\\triangledown"),S(R,be,xe,"\u25CA","\\lozenge"),S(R,be,xe,"\u24C8","\\circledS"),S(R,be,xe,"\xAE","\\circledR"),S(Ze,be,xe,"\xAE","\\circledR"),S(R,be,xe,"\u2221","\\measuredangle",!0),S(R,be,xe,"\u2204","\\nexists"),S(R,be,xe,"\u2127","\\mho"),S(R,be,xe,"\u2132","\\Finv",!0),S(R,be,xe,"\u2141","\\Game",!0),S(R,be,xe,"\u2035","\\backprime"),S(R,be,xe,"\u25B2","\\blacktriangle"),S(R,be,xe,"\u25BC","\\blacktriangledown"),S(R,be,xe,"\u25A0","\\blacksquare"),S(R,be,xe,"\u29EB","\\blacklozenge"),S(R,be,xe,"\u2605","\\bigstar"),S(R,be,xe,"\u2222","\\sphericalangle",!0),S(R,be,xe,"\u2201","\\complement",!0),S(R,be,xe,"\xF0","\\eth",!0),S(R,be,xe,"\u2571","\\diagup"),S(R,be,xe,"\u2572","\\diagdown"),S(R,be,xe,"\u25A1","\\square"),S(R,be,xe,"\u25A1","\\Box"),S(R,be,xe,"\u25CA","\\Diamond"),S(R,be,xe,"\xA5","\\yen",!0),S(Ze,be,xe,"\xA5","\\yen",!0),S(R,be,xe,"\u2713","\\checkmark",!0),S(Ze,be,xe,"\u2713","\\checkmark"),S(R,be,xe,"\u2136","\\beth",!0),S(R,be,xe,"\u2138","\\daleth",!0),S(R,be,xe,"\u2137","\\gimel",!0),S(R,be,xe,"\u03DD","\\digamma",!0),S(R,be,xe,"\u03F0","\\varkappa"),S(R,be,Pe,"\u250C","\\ulcorner",!0),S(R,be,Qe,"\u2510","\\urcorner",!0),S(R,be,Pe,"\u2514","\\llcorner",!0),S(R,be,Qe,"\u2518","\\lrcorner",!0),S(R,be,G,"\u2266","\\leqq",!0),S(R,be,G,"\u2A7D","\\leqslant",!0),S(R,be,G,"\u2A95","\\eqslantless",!0),S(R,be,G,"\u2272","\\lesssim",!0),S(R,be,G,"\u2A85","\\lessapprox",!0),S(R,be,G,"\u224A","\\approxeq",!0),S(R,be,ze,"\u22D6","\\lessdot"),S(R,be,G,"\u22D8","\\lll",!0),S(R,be,G,"\u2276","\\lessgtr",!0),S(R,be,G,"\u22DA","\\lesseqgtr",!0),S(R,be,G,"\u2A8B","\\lesseqqgtr",!0),S(R,be,G,"\u2251","\\doteqdot"),S(R,be,G,"\u2253","\\risingdotseq",!0),S(R,be,G,"\u2252","\\fallingdotseq",!0),S(R,be,G,"\u223D","\\backsim",!0),S(R,be,G,"\u22CD","\\backsimeq",!0),S(R,be,G,"\u2AC5","\\subseteqq",!0),S(R,be,G,"\u22D0","\\Subset",!0),S(R,be,G,"\u228F","\\sqsubset",!0),S(R,be,G,"\u227C","\\preccurlyeq",!0),S(R,be,G,"\u22DE","\\curlyeqprec",!0),S(R,be,G,"\u227E","\\precsim",!0),S(R,be,G,"\u2AB7","\\precapprox",!0),S(R,be,G,"\u22B2","\\vartriangleleft"),S(R,be,G,"\u22B4","\\trianglelefteq"),S(R,be,G,"\u22A8","\\vDash",!0),S(R,be,G,"\u22AA","\\Vvdash",!0),S(R,be,G,"\u2323","\\smallsmile"),S(R,be,G,"\u2322","\\smallfrown"),S(R,be,G,"\u224F","\\bumpeq",!0),S(R,be,G,"\u224E","\\Bumpeq",!0),S(R,be,G,"\u2267","\\geqq",!0),S(R,be,G,"\u2A7E","\\geqslant",!0),S(R,be,G,"\u2A96","\\eqslantgtr",!0),S(R,be,G,"\u2273","\\gtrsim",!0),S(R,be,G,"\u2A86","\\gtrapprox",!0),S(R,be,ze,"\u22D7","\\gtrdot"),S(R,be,G,"\u22D9","\\ggg",!0),S(R,be,G,"\u2277","\\gtrless",!0),S(R,be,G,"\u22DB","\\gtreqless",!0),S(R,be,G,"\u2A8C","\\gtreqqless",!0),S(R,be,G,"\u2256","\\eqcirc",!0),S(R,be,G,"\u2257","\\circeq",!0),S(R,be,G,"\u225C","\\triangleq",!0),S(R,be,G,"\u223C","\\thicksim"),S(R,be,G,"\u2248","\\thickapprox"),S(R,be,G,"\u2AC6","\\supseteqq",!0),S(R,be,G,"\u22D1","\\Supset",!0),S(R,be,G,"\u2290","\\sqsupset",!0),S(R,be,G,"\u227D","\\succcurlyeq",!0),S(R,be,G,"\u22DF","\\curlyeqsucc",!0),S(R,be,G,"\u227F","\\succsim",!0),S(R,be,G,"\u2AB8","\\succapprox",!0),S(R,be,G,"\u22B3","\\vartriangleright"),S(R,be,G,"\u22B5","\\trianglerighteq"),S(R,be,G,"\u22A9","\\Vdash",!0),S(R,be,G,"\u2223","\\shortmid"),S(R,be,G,"\u2225","\\shortparallel"),S(R,be,G,"\u226C","\\between",!0),S(R,be,G,"\u22D4","\\pitchfork",!0),S(R,be,G,"\u221D","\\varpropto"),S(R,be,G,"\u25C0","\\blacktriangleleft"),S(R,be,G,"\u2234","\\therefore",!0),S(R,be,G,"\u220D","\\backepsilon"),S(R,be,G,"\u25B6","\\blacktriangleright"),S(R,be,G,"\u2235","\\because",!0),S(R,be,G,"\u22D8","\\llless"),S(R,be,G,"\u22D9","\\gggtr"),S(R,be,ze,"\u22B2","\\lhd"),S(R,be,ze,"\u22B3","\\rhd"),S(R,be,G,"\u2242","\\eqsim",!0),S(R,J,G,"\u22C8","\\Join"),S(R,be,G,"\u2251","\\Doteq",!0),S(R,be,ze,"\u2214","\\dotplus",!0),S(R,be,ze,"\u2216","\\smallsetminus"),S(R,be,ze,"\u22D2","\\Cap",!0),S(R,be,ze,"\u22D3","\\Cup",!0),S(R,be,ze,"\u2A5E","\\doublebarwedge",!0),S(R,be,ze,"\u229F","\\boxminus",!0),S(R,be,ze,"\u229E","\\boxplus",!0),S(R,be,ze,"\u22C7","\\divideontimes",!0),S(R,be,ze,"\u22C9","\\ltimes",!0),S(R,be,ze,"\u22CA","\\rtimes",!0),S(R,be,ze,"\u22CB","\\leftthreetimes",!0),S(R,be,ze,"\u22CC","\\rightthreetimes",!0),S(R,be,ze,"\u22CF","\\curlywedge",!0),S(R,be,ze,"\u22CE","\\curlyvee",!0),S(R,be,ze,"\u229D","\\circleddash",!0),S(R,be,ze,"\u229B","\\circledast",!0),S(R,be,ze,"\u22C5","\\centerdot"),S(R,be,ze,"\u22BA","\\intercal",!0),S(R,be,ze,"\u22D2","\\doublecap"),S(R,be,ze,"\u22D3","\\doublecup"),S(R,be,ze,"\u22A0","\\boxtimes",!0),S(R,be,G,"\u21E2","\\dashrightarrow",!0),S(R,be,G,"\u21E0","\\dashleftarrow",!0),S(R,be,G,"\u21C7","\\leftleftarrows",!0),S(R,be,G,"\u21C6","\\leftrightarrows",!0),S(R,be,G,"\u21DA","\\Lleftarrow",!0),S(R,be,G,"\u219E","\\twoheadleftarrow",!0),S(R,be,G,"\u21A2","\\leftarrowtail",!0),S(R,be,G,"\u21AB","\\looparrowleft",!0),S(R,be,G,"\u21CB","\\leftrightharpoons",!0),S(R,be,G,"\u21B6","\\curvearrowleft",!0),S(R,be,G,"\u21BA","\\circlearrowleft",!0),S(R,be,G,"\u21B0","\\Lsh",!0),S(R,be,G,"\u21C8","\\upuparrows",!0),S(R,be,G,"\u21BF","\\upharpoonleft",!0),S(R,be,G,"\u21C3","\\downharpoonleft",!0),S(R,be,G,"\u22B8","\\multimap",!0),S(R,be,G,"\u21AD","\\leftrightsquigarrow",!0),S(R,be,G,"\u21C9","\\rightrightarrows",!0),S(R,be,G,"\u21C4","\\rightleftarrows",!0),S(R,be,G,"\u21A0","\\twoheadrightarrow",!0),S(R,be,G,"\u21A3","\\rightarrowtail",!0),S(R,be,G,"\u21AC","\\looparrowright",!0),S(R,be,G,"\u21B7","\\curvearrowright",!0),S(R,be,G,"\u21BB","\\circlearrowright",!0),S(R,be,G,"\u21B1","\\Rsh",!0),S(R,be,G,"\u21CA","\\downdownarrows",!0),S(R,be,G,"\u21BE","\\upharpoonright",!0),S(R,be,G,"\u21C2","\\downharpoonright",!0),S(R,be,G,"\u21DD","\\rightsquigarrow",!0),S(R,be,G,"\u21DD","\\leadsto"),S(R,be,G,"\u21DB","\\Rrightarrow",!0),S(R,be,G,"\u21BE","\\restriction"),S(R,J,xe,"\u2018","`"),S(R,J,xe,"$","\\$"),S(Ze,J,xe,"$","\\$"),S(Ze,J,xe,"$","\\textdollar"),S(R,J,xe,"%","\\%"),S(Ze,J,xe,"%","\\%"),S(R,J,xe,"_","\\_"),S(Ze,J,xe,"_","\\_"),S(Ze,J,xe,"_","\\textunderscore"),S(R,J,xe,"\u2220","\\angle",!0),S(R,J,xe,"\u221E","\\infty",!0),S(R,J,xe,"\u2032","\\prime"),S(R,J,xe,"\u25B3","\\triangle"),S(R,J,xe,"\u0393","\\Gamma",!0),S(R,J,xe,"\u0394","\\Delta",!0),S(R,J,xe,"\u0398","\\Theta",!0),S(R,J,xe,"\u039B","\\Lambda",!0),S(R,J,xe,"\u039E","\\Xi",!0),S(R,J,xe,"\u03A0","\\Pi",!0),S(R,J,xe,"\u03A3","\\Sigma",!0),S(R,J,xe,"\u03A5","\\Upsilon",!0),S(R,J,xe,"\u03A6","\\Phi",!0),S(R,J,xe,"\u03A8","\\Psi",!0),S(R,J,xe,"\u03A9","\\Omega",!0),S(R,J,xe,"A","\u0391"),S(R,J,xe,"B","\u0392"),S(R,J,xe,"E","\u0395"),S(R,J,xe,"Z","\u0396"),S(R,J,xe,"H","\u0397"),S(R,J,xe,"I","\u0399"),S(R,J,xe,"K","\u039A"),S(R,J,xe,"M","\u039C"),S(R,J,xe,"N","\u039D"),S(R,J,xe,"O","\u039F"),S(R,J,xe,"P","\u03A1"),S(R,J,xe,"T","\u03A4"),S(R,J,xe,"X","\u03A7"),S(R,J,xe,"\xAC","\\neg",!0),S(R,J,xe,"\xAC","\\lnot"),S(R,J,xe,"\u22A4","\\top"),S(R,J,xe,"\u22A5","\\bot"),S(R,J,xe,"\u2205","\\emptyset"),S(R,be,xe,"\u2205","\\varnothing"),S(R,J,le,"\u03B1","\\alpha",!0),S(R,J,le,"\u03B2","\\beta",!0),S(R,J,le,"\u03B3","\\gamma",!0),S(R,J,le,"\u03B4","\\delta",!0),S(R,J,le,"\u03F5","\\epsilon",!0),S(R,J,le,"\u03B6","\\zeta",!0),S(R,J,le,"\u03B7","\\eta",!0),S(R,J,le,"\u03B8","\\theta",!0),S(R,J,le,"\u03B9","\\iota",!0),S(R,J,le,"\u03BA","\\kappa",!0),S(R,J,le,"\u03BB","\\lambda",!0),S(R,J,le,"\u03BC","\\mu",!0),S(R,J,le,"\u03BD","\\nu",!0),S(R,J,le,"\u03BE","\\xi",!0),S(R,J,le,"\u03BF","\\omicron",!0),S(R,J,le,"\u03C0","\\pi",!0),S(R,J,le,"\u03C1","\\rho",!0),S(R,J,le,"\u03C3","\\sigma",!0),S(R,J,le,"\u03C4","\\tau",!0),S(R,J,le,"\u03C5","\\upsilon",!0),S(R,J,le,"\u03D5","\\phi",!0),S(R,J,le,"\u03C7","\\chi",!0),S(R,J,le,"\u03C8","\\psi",!0),S(R,J,le,"\u03C9","\\omega",!0),S(R,J,le,"\u03B5","\\varepsilon",!0),S(R,J,le,"\u03D1","\\vartheta",!0),S(R,J,le,"\u03D6","\\varpi",!0),S(R,J,le,"\u03F1","\\varrho",!0),S(R,J,le,"\u03C2","\\varsigma",!0),S(R,J,le,"\u03C6","\\varphi",!0),S(R,J,ze,"\u2217","*"),S(R,J,ze,"+","+"),S(R,J,ze,"\u2212","-"),S(R,J,ze,"\u22C5","\\cdot",!0),S(R,J,ze,"\u2218","\\circ"),S(R,J,ze,"\xF7","\\div",!0),S(R,J,ze,"\xB1","\\pm",!0),S(R,J,ze,"\xD7","\\times",!0),S(R,J,ze,"\u2229","\\cap",!0),S(R,J,ze,"\u222A","\\cup",!0),S(R,J,ze,"\u2216","\\setminus"),S(R,J,ze,"\u2227","\\land"),S(R,J,ze,"\u2228","\\lor"),S(R,J,ze,"\u2227","\\wedge",!0),S(R,J,ze,"\u2228","\\vee",!0),S(R,J,xe,"\u221A","\\surd"),S(R,J,Pe,"(","("),S(R,J,Pe,"[","["),S(R,J,Pe,"\u27E8","\\langle",!0),S(R,J,Pe,"\u2223","\\lvert"),S(R,J,Pe,"\u2225","\\lVert"),S(R,J,Qe,")",")"),S(R,J,Qe,"]","]"),S(R,J,Qe,"?","?"),S(R,J,Qe,"!","!"),S(R,J,Qe,"\u27E9","\\rangle",!0),S(R,J,Qe,"\u2223","\\rvert"),S(R,J,Qe,"\u2225","\\rVert"),S(R,J,G,"=","="),S(R,J,G,"<","<"),S(R,J,G,">",">"),S(R,J,G,":",":"),S(R,J,G,"\u2248","\\approx",!0),S(R,J,G,"\u2245","\\cong",!0),S(R,J,G,"\u2265","\\ge"),S(R,J,G,"\u2265","\\geq",!0),S(R,J,G,"\u2190","\\gets"),S(R,J,G,">","\\gt"),S(R,J,G,"\u2208","\\in",!0),S(R,J,G,"\uE020","\\@not"),S(R,J,G,"\u2282","\\subset",!0),S(R,J,G,"\u2283","\\supset",!0),S(R,J,G,"\u2286","\\subseteq",!0),S(R,J,G,"\u2287","\\supseteq",!0),S(R,be,G,"\u2288","\\nsubseteq",!0),S(R,be,G,"\u2289","\\nsupseteq",!0),S(R,J,G,"\u22A8","\\models"),S(R,J,G,"\u2190","\\leftarrow",!0),S(R,J,G,"\u2264","\\le"),S(R,J,G,"\u2264","\\leq",!0),S(R,J,G,"<","\\lt"),S(R,J,G,"\u2192","\\rightarrow",!0),S(R,J,G,"\u2192","\\to"),S(R,be,G,"\u2271","\\ngeq",!0),S(R,be,G,"\u2270","\\nleq",!0),S(R,J,bt,"\xA0","\\ "),S(R,J,bt,"\xA0","~"),S(R,J,bt,"\xA0","\\space"),S(R,J,bt,"\xA0","\\nobreakspace"),S(Ze,J,bt,"\xA0","\\ "),S(Ze,J,bt,"\xA0","~"),S(Ze,J,bt,"\xA0","\\space"),S(Ze,J,bt,"\xA0","\\nobreakspace"),S(R,J,bt,null,"\\nobreak"),S(R,J,bt,null,"\\allowbreak"),S(R,J,$e,",",","),S(R,J,$e,";",";"),S(R,be,ze,"\u22BC","\\barwedge",!0),S(R,be,ze,"\u22BB","\\veebar",!0),S(R,J,ze,"\u2299","\\odot",!0),S(R,J,ze,"\u2295","\\oplus",!0),S(R,J,ze,"\u2297","\\otimes",!0),S(R,J,xe,"\u2202","\\partial",!0),S(R,J,ze,"\u2298","\\oslash",!0),S(R,be,ze,"\u229A","\\circledcirc",!0),S(R,be,ze,"\u22A1","\\boxdot",!0),S(R,J,ze,"\u25B3","\\bigtriangleup"),S(R,J,ze,"\u25BD","\\bigtriangledown"),S(R,J,ze,"\u2020","\\dagger"),S(R,J,ze,"\u22C4","\\diamond"),S(R,J,ze,"\u22C6","\\star"),S(R,J,ze,"\u25C3","\\triangleleft"),S(R,J,ze,"\u25B9","\\triangleright"),S(R,J,Pe,"{","\\{"),S(Ze,J,xe,"{","\\{"),S(Ze,J,xe,"{","\\textbraceleft"),S(R,J,Qe,"}","\\}"),S(Ze,J,xe,"}","\\}"),S(Ze,J,xe,"}","\\textbraceright"),S(R,J,Pe,"{","\\lbrace"),S(R,J,Qe,"}","\\rbrace"),S(R,J,Pe,"[","\\lbrack"),S(Ze,J,xe,"[","\\lbrack"),S(R,J,Qe,"]","\\rbrack"),S(Ze,J,xe,"]","\\rbrack"),S(R,J,Pe,"(","\\lparen"),S(R,J,Qe,")","\\rparen"),S(Ze,J,xe,"<","\\textless"),S(Ze,J,xe,">","\\textgreater"),S(R,J,Pe,"\u230A","\\lfloor",!0),S(R,J,Qe,"\u230B","\\rfloor",!0),S(R,J,Pe,"\u2308","\\lceil",!0),S(R,J,Qe,"\u2309","\\rceil",!0),S(R,J,xe,"\\","\\backslash"),S(R,J,xe,"\u2223","|"),S(R,J,xe,"\u2223","\\vert"),S(Ze,J,xe,"|","\\textbar"),S(R,J,xe,"\u2225","\\|"),S(R,J,xe,"\u2225","\\Vert"),S(Ze,J,xe,"\u2225","\\textbardbl"),S(Ze,J,xe,"~","\\textasciitilde"),S(Ze,J,xe,"\\","\\textbackslash"),S(Ze,J,xe,"^","\\textasciicircum"),S(R,J,G,"\u2191","\\uparrow",!0),S(R,J,G,"\u21D1","\\Uparrow",!0),S(R,J,G,"\u2193","\\downarrow",!0),S(R,J,G,"\u21D3","\\Downarrow",!0),S(R,J,G,"\u2195","\\updownarrow",!0),S(R,J,G,"\u21D5","\\Updownarrow",!0),S(R,J,pe,"\u2210","\\coprod"),S(R,J,pe,"\u22C1","\\bigvee"),S(R,J,pe,"\u22C0","\\bigwedge"),S(R,J,pe,"\u2A04","\\biguplus"),S(R,J,pe,"\u22C2","\\bigcap"),S(R,J,pe,"\u22C3","\\bigcup"),S(R,J,pe,"\u222B","\\int"),S(R,J,pe,"\u222B","\\intop"),S(R,J,pe,"\u222C","\\iint"),S(R,J,pe,"\u222D","\\iiint"),S(R,J,pe,"\u220F","\\prod"),S(R,J,pe,"\u2211","\\sum"),S(R,J,pe,"\u2A02","\\bigotimes"),S(R,J,pe,"\u2A01","\\bigoplus"),S(R,J,pe,"\u2A00","\\bigodot"),S(R,J,pe,"\u222E","\\oint"),S(R,J,pe,"\u222F","\\oiint"),S(R,J,pe,"\u2230","\\oiiint"),S(R,J,pe,"\u2A06","\\bigsqcup"),S(R,J,pe,"\u222B","\\smallint"),S(Ze,J,lt,"\u2026","\\textellipsis"),S(R,J,lt,"\u2026","\\mathellipsis"),S(Ze,J,lt,"\u2026","\\ldots",!0),S(R,J,lt,"\u2026","\\ldots",!0),S(R,J,lt,"\u22EF","\\@cdots",!0),S(R,J,lt,"\u22F1","\\ddots",!0),S(R,J,xe,"\u22EE","\\varvdots"),S(R,J,zt,"\u02CA","\\acute"),S(R,J,zt,"\u02CB","\\grave"),S(R,J,zt,"\xA8","\\ddot"),S(R,J,zt,"~","\\tilde"),S(R,J,zt,"\u02C9","\\bar"),S(R,J,zt,"\u02D8","\\breve"),S(R,J,zt,"\u02C7","\\check"),S(R,J,zt,"^","\\hat"),S(R,J,zt,"\u20D7","\\vec"),S(R,J,zt,"\u02D9","\\dot"),S(R,J,zt,"\u02DA","\\mathring"),S(R,J,le,"\u0131","\\imath",!0),S(R,J,le,"\u0237","\\jmath",!0),S(Ze,J,xe,"\u0131","\\i",!0),S(Ze,J,xe,"\u0237","\\j",!0),S(Ze,J,xe,"\xDF","\\ss",!0),S(Ze,J,xe,"\xE6","\\ae",!0),S(Ze,J,xe,"\xE6","\\ae",!0),S(Ze,J,xe,"\u0153","\\oe",!0),S(Ze,J,xe,"\xF8","\\o",!0),S(Ze,J,xe,"\xC6","\\AE",!0),S(Ze,J,xe,"\u0152","\\OE",!0),S(Ze,J,xe,"\xD8","\\O",!0),S(Ze,J,zt,"\u02CA","\\'"),S(Ze,J,zt,"\u02CB","\\`"),S(Ze,J,zt,"\u02C6","\\^"),S(Ze,J,zt,"\u02DC","\\~"),S(Ze,J,zt,"\u02C9","\\="),S(Ze,J,zt,"\u02D8","\\u"),S(Ze,J,zt,"\u02D9","\\."),S(Ze,J,zt,"\u02DA","\\r"),S(Ze,J,zt,"\u02C7","\\v"),S(Ze,J,zt,"\xA8",'\\"'),S(Ze,J,zt,"\u02DD","\\H"),S(Ze,J,zt,"\u25EF","\\textcircled");var Bt={"--":!0,"---":!0,"``":!0,"''":!0};S(Ze,J,xe,"\u2013","--"),S(Ze,J,xe,"\u2013","\\textendash"),S(Ze,J,xe,"\u2014","---"),S(Ze,J,xe,"\u2014","\\textemdash"),S(Ze,J,xe,"\u2018","`"),S(Ze,J,xe,"\u2018","\\textquoteleft"),S(Ze,J,xe,"\u2019","'"),S(Ze,J,xe,"\u2019","\\textquoteright"),S(Ze,J,xe,"\u201C","``"),S(Ze,J,xe,"\u201C","\\textquotedblleft"),S(Ze,J,xe,"\u201D","''"),S(Ze,J,xe,"\u201D","\\textquotedblright"),S(R,J,xe,"\xB0","\\degree",!0),S(Ze,J,xe,"\xB0","\\degree"),S(Ze,J,xe,"\xB0","\\textdegree",!0),S(R,J,le,"\xA3","\\pounds"),S(R,J,le,"\xA3","\\mathsterling",!0),S(Ze,J,le,"\xA3","\\pounds"),S(Ze,J,le,"\xA3","\\textsterling",!0),S(R,be,xe,"\u2720","\\maltese"),S(Ze,be,xe,"\u2720","\\maltese"),S(Ze,J,bt,"\xA0","\\ "),S(Ze,J,bt,"\xA0"," "),S(Ze,J,bt,"\xA0","~");for(var en='0123456789/@."',dn=0;dn<en.length;dn++){var Hn=en.charAt(dn);S(R,J,xe,Hn,Hn)}for(var wt='0123456789!@*()-=+[]<>|";:?/.,',Gt=0;Gt<wt.length;Gt++){var mn=wt.charAt(Gt);S(Ze,J,xe,mn,mn)}for(var yn="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz",rn=0;rn<yn.length;rn++){var En=yn.charAt(rn);S(R,J,le,En,En),S(Ze,J,xe,En,En)}S(R,be,xe,"C","\u2102"),S(Ze,be,xe,"C","\u2102"),S(R,be,xe,"H","\u210D"),S(Ze,be,xe,"H","\u210D"),S(R,be,xe,"N","\u2115"),S(Ze,be,xe,"N","\u2115"),S(R,be,xe,"P","\u2119"),S(Ze,be,xe,"P","\u2119"),S(R,be,xe,"Q","\u211A"),S(Ze,be,xe,"Q","\u211A"),S(R,be,xe,"R","\u211D"),S(Ze,be,xe,"R","\u211D"),S(R,be,xe,"Z","\u2124"),S(Ze,be,xe,"Z","\u2124"),S(R,J,le,"h","\u210E"),S(Ze,J,le,"h","\u210E");for(var Zt="",Dt=0;Dt<yn.length;Dt++){var Mt=yn.charAt(Dt);Zt=String.fromCharCode(55349,56320+Dt),S(R,J,le,Mt,Zt),S(Ze,J,xe,Mt,Zt),Zt=String.fromCharCode(55349,56372+Dt),S(R,J,le,Mt,Zt),S(Ze,J,xe,Mt,Zt),Zt=String.fromCharCode(55349,56424+Dt),S(R,J,le,Mt,Zt),S(Ze,J,xe,Mt,Zt),Zt=String.fromCharCode(55349,56580+Dt),S(R,J,le,Mt,Zt),S(Ze,J,xe,Mt,Zt),Zt=String.fromCharCode(55349,56736+Dt),S(R,J,le,Mt,Zt),S(Ze,J,xe,Mt,Zt),Zt=String.fromCharCode(55349,56788+Dt),S(R,J,le,Mt,Zt),S(Ze,J,xe,Mt,Zt),Zt=String.fromCharCode(55349,56840+Dt),S(R,J,le,Mt,Zt),S(Ze,J,xe,Mt,Zt),Zt=String.fromCharCode(55349,56944+Dt),S(R,J,le,Mt,Zt),S(Ze,J,xe,Mt,Zt),Dt<26&&(Zt=String.fromCharCode(55349,56632+Dt),S(R,J,le,Mt,Zt),S(Ze,J,xe,Mt,Zt),Zt=String.fromCharCode(55349,56476+Dt),S(R,J,le,Mt,Zt),S(Ze,J,xe,Mt,Zt))}Zt="\u{1D55C}",S(R,J,le,"k",Zt),S(Ze,J,xe,"k",Zt);for(var gn=0;gn<10;gn++){var Ln=gn.toString();Zt=String.fromCharCode(55349,57294+gn),S(R,J,le,Ln,Zt),S(Ze,J,xe,Ln,Zt),Zt=String.fromCharCode(55349,57314+gn),S(R,J,le,Ln,Zt),S(Ze,J,xe,Ln,Zt),Zt=String.fromCharCode(55349,57324+gn),S(R,J,le,Ln,Zt),S(Ze,J,xe,Ln,Zt),Zt=String.fromCharCode(55349,57334+gn),S(R,J,le,Ln,Zt),S(Ze,J,xe,Ln,Zt)}for(var ut="\xC7\xD0\xDE\xE7\xFE",ct=0;ct<ut.length;ct++){var Se=ut.charAt(ct);S(R,J,le,Se,Se),S(Ze,J,xe,Se,Se)}S(Ze,J,xe,"\xF0","\xF0"),S(Ze,J,xe,"\u2013","\u2013"),S(Ze,J,xe,"\u2014","\u2014"),S(Ze,J,xe,"\u2018","\u2018"),S(Ze,J,xe,"\u2019","\u2019"),S(Ze,J,xe,"\u201C","\u201C"),S(Ze,J,xe,"\u201D","\u201D");var He=[["mathbf","textbf","Main-Bold"],["mathbf","textbf","Main-Bold"],["mathdefault","textit","Math-Italic"],["mathdefault","textit","Math-Italic"],["boldsymbol","boldsymbol","Main-BoldItalic"],["boldsymbol","boldsymbol","Main-BoldItalic"],["mathscr","textscr","Script-Regular"],["","",""],["","",""],["","",""],["mathfrak","textfrak","Fraktur-Regular"],["mathfrak","textfrak","Fraktur-Regular"],["mathbb","textbb","AMS-Regular"],["mathbb","textbb","AMS-Regular"],["","",""],["","",""],["mathsf","textsf","SansSerif-Regular"],["mathsf","textsf","SansSerif-Regular"],["mathboldsf","textboldsf","SansSerif-Bold"],["mathboldsf","textboldsf","SansSerif-Bold"],["mathitsf","textitsf","SansSerif-Italic"],["mathitsf","textitsf","SansSerif-Italic"],["","",""],["","",""],["mathtt","texttt","Typewriter-Regular"],["mathtt","texttt","Typewriter-Regular"]],it=[["mathbf","textbf","Main-Bold"],["","",""],["mathsf","textsf","SansSerif-Regular"],["mathboldsf","textboldsf","SansSerif-Bold"],["mathtt","texttt","Typewriter-Regular"]],Je=function(u,f){var h=u.charCodeAt(0),_=u.charCodeAt(1),N=(h-55296)*1024+(_-56320)+65536,ee=f==="math"?0:1;if(119808<=N&&N<120484){var De=Math.floor((N-119808)/26);return[He[De][2],He[De][ee]]}else if(120782<=N&&N<=120831){var Be=Math.floor((N-120782)/10);return[it[Be][2],it[Be][ee]]}else{if(N===120485||N===120486)return[He[0][2],He[0][ee]];if(120486<N&&N<120782)return["",""];throw new g("Unsupported character: "+u)}},yt=[[1,1,1],[2,1,1],[3,1,1],[4,2,1],[5,2,1],[6,3,1],[7,4,2],[8,6,3],[9,7,6],[10,8,7],[11,10,9]],$t=[.5,.6,.7,.8,.9,1,1.2,1.44,1.728,2.074,2.488],Jt=function(u,f){return f.size<2?u:yt[u-1][f.size-1]},nn=function(){function ne(f){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=f.style,this.color=f.color,this.size=f.size||ne.BASESIZE,this.textSize=f.textSize||this.size,this.phantom=!!f.phantom,this.font=f.font||"",this.fontFamily=f.fontFamily||"",this.fontWeight=f.fontWeight||"",this.fontShape=f.fontShape||"",this.sizeMultiplier=$t[this.size-1],this.maxSize=f.maxSize,this.minRuleThickness=f.minRuleThickness,this._fontMetrics=void 0}var u=ne.prototype;return u.extend=function(h){var _={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 N in h)h.hasOwnProperty(N)&&(_[N]=h[N]);return new ne(_)},u.havingStyle=function(h){return this.style===h?this:this.extend({style:h,size:Jt(this.textSize,h)})},u.havingCrampedStyle=function(){return this.havingStyle(this.style.cramp())},u.havingSize=function(h){return this.size===h&&this.textSize===h?this:this.extend({style:this.style.text(),size:h,textSize:h,sizeMultiplier:$t[h-1]})},u.havingBaseStyle=function(h){h=h||this.style.text();var _=Jt(ne.BASESIZE,h);return this.size===_&&this.textSize===ne.BASESIZE&&this.style===h?this:this.extend({style:h,size:_})},u.havingBaseSizing=function(){var h;switch(this.style.id){case 4:case 5:h=3;break;case 6:case 7:h=1;break;default:h=6}return this.extend({style:this.style.text(),size:h})},u.withColor=function(h){return this.extend({color:h})},u.withPhantom=function(){return this.extend({phantom:!0})},u.withFont=function(h){return this.extend({font:h})},u.withTextFontFamily=function(h){return this.extend({fontFamily:h,font:""})},u.withTextFontWeight=function(h){return this.extend({fontWeight:h,font:""})},u.withTextFontShape=function(h){return this.extend({fontShape:h,font:""})},u.sizingClasses=function(h){return h.size!==this.size?["sizing","reset-size"+h.size,"size"+this.size]:[]},u.baseSizingClasses=function(){return this.size!==ne.BASESIZE?["sizing","reset-size"+this.size,"size"+ne.BASESIZE]:[]},u.fontMetrics=function(){return this._fontMetrics||(this._fontMetrics=Oe(this.size)),this._fontMetrics},u.getColor=function(){return this.phantom?"transparent":this.color},ne}();nn.BASESIZE=6;var Ht=nn,Qt={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},pn={ex:!0,em:!0,mu:!0},qt=function(u){return typeof u!="string"&&(u=u.unit),u in Qt||u in pn||u==="ex"},Ye=function(u,f){var h;if(u.unit in Qt)h=Qt[u.unit]/f.fontMetrics().ptPerEm/f.sizeMultiplier;else if(u.unit==="mu")h=f.fontMetrics().cssEmPerMu;else{var _;if(f.style.isTight()?_=f.havingStyle(f.style.text()):_=f,u.unit==="ex")h=_.fontMetrics().xHeight;else if(u.unit==="em")h=_.fontMetrics().quad;else throw new g("Invalid unit: '"+u.unit+"'");_!==f&&(h*=_.sizeMultiplier/f.sizeMultiplier)}return Math.min(u.number*h,f.maxSize)},vt=["\\imath","\u0131","\\jmath","\u0237","\\pounds","\\mathsterling","\\textsterling","\xA3"],Ct=function(u,f,h){return Rt[h][u]&&Rt[h][u].replace&&(u=Rt[h][u].replace),{value:u,metrics:ht(u,f,h)}},_t=function(u,f,h,_,N){var ee=Ct(u,f,h),De=ee.metrics;u=ee.value;var Be;if(De){var dt=De.italic;(h==="text"||_&&_.font==="mathit")&&(dt=0),Be=new ce(u,De.height,De.depth,dt,De.skew,De.width,N)}else typeof console!="undefined"&&console.warn("No character metrics "+("for '"+u+"' in style '"+f+"' and mode '"+h+"'")),Be=new ce(u,0,0,0,0,0,N);if(_){Be.maxFontSize=_.sizeMultiplier,_.style.isTight()&&Be.classes.push("mtight");var It=_.getColor();It&&(Be.style.color=It)}return Be},At=function(u,f,h,_){return _===void 0&&(_=[]),h.font==="boldsymbol"&&Ct(u,"Main-Bold",f).metrics?_t(u,"Main-Bold",f,h,_.concat(["mathbf"])):u==="\\"||Rt[f][u].font==="main"?_t(u,"Main-Regular",f,h,_):_t(u,"AMS-Regular",f,h,_.concat(["amsrm"]))},kt=function(u,f,h,_){return/[0-9]/.test(u.charAt(0))||U.contains(vt,u)?{fontName:"Main-Italic",fontClass:"mathit"}:{fontName:"Math-Italic",fontClass:"mathdefault"}},Wt=function(u,f,h,_){return U.contains(vt,u)?{fontName:"Main-Italic",fontClass:"mathit"}:/[0-9]/.test(u.charAt(0))?{fontName:"Caligraphic-Regular",fontClass:"mathcal"}:{fontName:"Math-Italic",fontClass:"mathdefault"}},Kt=function(u,f,h,_){return Ct(u,"Math-BoldItalic",f).metrics?{fontName:"Math-BoldItalic",fontClass:"boldsymbol"}:{fontName:"Main-Bold",fontClass:"mathbf"}},on=function(u,f,h){var _=u.mode,N=u.text,ee=["mord"],De=_==="math"||_==="text"&&f.font,Be=De?f.font:f.fontFamily;if(N.charCodeAt(0)===55349){var dt=Je(N,_),It=dt[0],Ut=dt[1];return _t(N,It,_,f,ee.concat(Ut))}else if(Be){var an,Tn;if(Be==="boldsymbol"||Be==="mathnormal"){var Pn=Be==="boldsymbol"?Kt(N,_,f,ee):Wt(N,_,f,ee);an=Pn.fontName,Tn=[Pn.fontClass]}else U.contains(vt,N)?(an="Main-Italic",Tn=["mathit"]):De?(an=Bn[Be].fontName,Tn=[Be]):(an=Dn(Be,f.fontWeight,f.fontShape),Tn=[Be,f.fontWeight,f.fontShape]);if(Ct(N,an,_).metrics)return _t(N,an,_,f,ee.concat(Tn));if(Bt.hasOwnProperty(N)&&an.substr(0,10)==="Typewriter"){for(var Xn=[],br=0;br<N.length;br++)Xn.push(_t(N[br],an,_,f,ee.concat(Tn)));return An(Xn)}}if(h==="mathord"){var xr=kt(N,_,f,ee);return _t(N,xr.fontName,_,f,ee.concat([xr.fontClass]))}else if(h==="textord"){var Pr=Rt[_][N]&&Rt[_][N].font;if(Pr==="ams"){var $r=Dn("amsrm",f.fontWeight,f.fontShape);return _t(N,$r,_,f,ee.concat("amsrm",f.fontWeight,f.fontShape))}else if(Pr==="main"||!Pr){var fi=Dn("textrm",f.fontWeight,f.fontShape);return _t(N,fi,_,f,ee.concat(f.fontWeight,f.fontShape))}else{var si=Dn(Pr,f.fontWeight,f.fontShape);return _t(N,si,_,f,ee.concat(si,f.fontWeight,f.fontShape))}}else throw new Error("unexpected type: "+h+" in makeOrd")},cn=function(u,f){if(je(u.classes)!==je(f.classes)||u.skew!==f.skew||u.maxFontSize!==f.maxFontSize)return!1;for(var h in u.style)if(u.style.hasOwnProperty(h)&&u.style[h]!==f.style[h])return!1;for(var _ in f.style)if(f.style.hasOwnProperty(_)&&u.style[_]!==f.style[_])return!1;return!0},Wn=function(u){for(var f=0;f<u.length-1;f++){var h=u[f],_=u[f+1];h instanceof ce&&_ instanceof ce&&cn(h,_)&&(h.text+=_.text,h.height=Math.max(h.height,_.height),h.depth=Math.max(h.depth,_.depth),h.italic=_.italic,u.splice(f+1,1),f--)}return u},bn=function(u){for(var f=0,h=0,_=0,N=0;N<u.children.length;N++){var ee=u.children[N];ee.height>f&&(f=ee.height),ee.depth>h&&(h=ee.depth),ee.maxFontSize>_&&(_=ee.maxFontSize)}u.height=f,u.depth=h,u.maxFontSize=_},fn=function(u,f,h,_){var N=new Le(u,f,h,_);return bn(N),N},In=function(u,f,h,_){return new Le(u,f,h,_)},On=function(u,f,h){var _=fn([u],[],f);return _.height=Math.max(h||f.fontMetrics().defaultRuleThickness,f.minRuleThickness),_.style.borderBottomWidth=_.height+"em",_.maxFontSize=1,_},Zn=function(u,f,h,_){var N=new Ce(u,f,h,_);return bn(N),N},An=function(u){var f=new Ge(u);return bn(f),f},Mn=function(u,f){return u instanceof Ge?fn([],[u],f):u},Nn=function(u){if(u.positionType==="individualShift"){for(var f=u.children,h=[f[0]],_=-f[0].shift-f[0].elem.depth,N=_,ee=1;ee<f.length;ee++){var De=-f[ee].shift-N-f[ee].elem.depth,Be=De-(f[ee-1].elem.height+f[ee-1].elem.depth);N=N+De,h.push({type:"kern",size:Be}),h.push(f[ee])}return{children:h,depth:_}}var dt;if(u.positionType==="top"){for(var It=u.positionData,Ut=0;Ut<u.children.length;Ut++){var an=u.children[Ut];It-=an.type==="kern"?an.size:an.elem.height+an.elem.depth}dt=It}else if(u.positionType==="bottom")dt=-u.positionData;else{var Tn=u.children[0];if(Tn.type!=="elem")throw new Error('First child must have type "elem".');if(u.positionType==="shift")dt=-Tn.elem.depth-u.positionData;else if(u.positionType==="firstBaseline")dt=-Tn.elem.depth;else throw new Error("Invalid positionType "+u.positionType+".")}return{children:u.children,depth:dt}},jn=function(u,f){for(var h=Nn(u),_=h.children,N=h.depth,ee=0,De=0;De<_.length;De++){var Be=_[De];if(Be.type==="elem"){var dt=Be.elem;ee=Math.max(ee,dt.maxFontSize,dt.height)}}ee+=2;var It=fn(["pstrut"],[]);It.style.height=ee+"em";for(var Ut=[],an=N,Tn=N,Pn=N,Xn=0;Xn<_.length;Xn++){var br=_[Xn];if(br.type==="kern")Pn+=br.size;else{var xr=br.elem,Pr=br.wrapperClasses||[],$r=br.wrapperStyle||{},fi=fn(Pr,[It,xr],void 0,$r);fi.style.top=-ee-Pn-xr.depth+"em",br.marginLeft&&(fi.style.marginLeft=br.marginLeft),br.marginRight&&(fi.style.marginRight=br.marginRight),Ut.push(fi),Pn+=xr.height+xr.depth}an=Math.min(an,Pn),Tn=Math.max(Tn,Pn)}var si=fn(["vlist"],Ut);si.style.height=Tn+"em";var hi;if(an<0){var mi=fn([],[]),ci=fn(["vlist"],[mi]);ci.style.height=-an+"em";var $i=fn(["vlist-s"],[new ce("\u200B")]);hi=[fn(["vlist-r"],[si,$i]),fn(["vlist-r"],[ci])]}else hi=[fn(["vlist-r"],[si])];var bi=fn(["vlist-t"],hi);return hi.length===2&&bi.classes.push("vlist-t2"),bi.height=Tn,bi.depth=-an,bi},zn=function(u,f){var h=fn(["mspace"],[],f),_=Ye(u,f);return h.style.marginRight=_+"em",h},Dn=function(u,f,h){var _="";switch(u){case"amsrm":_="AMS";break;case"textrm":_="Main";break;case"textsf":_="SansSerif";break;case"texttt":_="Typewriter";break;default:_=u}var N;return f==="textbf"&&h==="textit"?N="BoldItalic":f==="textbf"?N="Bold":f==="textit"?N="Italic":N="Regular",_+"-"+N},Bn={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"}},Sn={vec:["vec",.471,.714],oiintSize1:["oiintSize1",.957,.499],oiintSize2:["oiintSize2",1.472,.659],oiiintSize1:["oiiintSize1",1.304,.499],oiiintSize2:["oiiintSize2",1.98,.659]},cr=function(u,f){var h=Sn[u],_=h[0],N=h[1],ee=h[2],De=new de(_),Be=new ve([De],{width:N+"em",height:ee+"em",style:"width:"+N+"em",viewBox:"0 0 "+1e3*N+" "+1e3*ee,preserveAspectRatio:"xMinYMin"}),dt=In(["overlay"],[Be],f);return dt.height=ee,dt.style.height=ee+"em",dt.style.width=N+"em",dt},Tt={fontMap:Bn,makeSymbol:_t,mathsym:At,makeSpan:fn,makeSvgSpan:In,makeLineSpan:On,makeAnchor:Zn,makeFragment:An,wrapFragment:Mn,makeVList:jn,makeOrd:on,makeGlue:zn,staticSvg:cr,svgData:Sn,tryCombineChars:Wn};function Fn(ne,u){var f=Kn(ne,u);if(!f)throw new Error("Expected node of type "+u+", but got "+(ne?"node of type "+ne.type:String(ne)));return f}function Kn(ne,u){return ne&&ne.type===u?ne:null}function Dr(ne,u){var f=gr(ne,u);if(!f)throw new Error('Expected node of type "atom" and family "'+u+'", but got '+(ne?ne.type==="atom"?"atom of family "+ne.family:"node of type "+ne.type:String(ne)));return f}function gr(ne,u){return ne&&ne.type==="atom"&&ne.family===u?ne:null}function Or(ne){var u=Cr(ne);if(!u)throw new Error("Expected node of symbol group type, but got "+(ne?"node of type "+ne.type:String(ne)));return u}function Cr(ne){return ne&&(ne.type==="atom"||rt.hasOwnProperty(ne.type))?ne:null}var _n={number:3,unit:"mu"},wn={number:4,unit:"mu"},jt={number:5,unit:"mu"},Vt={mord:{mop:_n,mbin:wn,mrel:jt,minner:_n},mop:{mord:_n,mop:_n,mrel:jt,minner:_n},mbin:{mord:wn,mop:wn,mopen:wn,minner:wn},mrel:{mord:jt,mop:jt,mopen:jt,minner:jt},mopen:{},mclose:{mop:_n,mbin:wn,mrel:jt,minner:_n},mpunct:{mord:_n,mop:_n,mrel:jt,mopen:_n,mclose:_n,mpunct:_n,minner:_n},minner:{mord:_n,mop:_n,mbin:wn,mrel:jt,mopen:_n,mpunct:_n,minner:_n}},un={mord:{mop:_n},mop:{mord:_n,mop:_n},mbin:{},mrel:{},mopen:{},mclose:{mop:_n},mpunct:{},minner:{mop:_n}},Cn={},Vn={},tr={};function tn(ne){for(var u=ne.type,f=ne.names,h=ne.props,_=ne.handler,N=ne.htmlBuilder,ee=ne.mathmlBuilder,De={type:u,numArgs:h.numArgs,argTypes:h.argTypes,greediness:h.greediness===void 0?1:h.greediness,allowedInText:!!h.allowedInText,allowedInMath:h.allowedInMath===void 0?!0:h.allowedInMath,numOptionalArgs:h.numOptionalArgs||0,infix:!!h.infix,handler:_},Be=0;Be<f.length;++Be)Cn[f[Be]]=De;u&&(N&&(Vn[u]=N),ee&&(tr[u]=ee))}function Yn(ne){var u=ne.type,f=ne.htmlBuilder,h=ne.mathmlBuilder;tn({type:u,names:[],props:{numArgs:0},handler:function(){throw new Error("Should never be called.")},htmlBuilder:f,mathmlBuilder:h})}var vr=function(u){var f=Kn(u,"ordgroup");return f?f.body:[u]},Lr=Tt.makeSpan,Br=["leftmost","mbin","mopen","mrel","mop","mpunct"],jr=["rightmost","mrel","mclose","mpunct"],dr={display:x.DISPLAY,text:x.TEXT,script:x.SCRIPT,scriptscript:x.SCRIPTSCRIPT},Zr={mord:"mord",mop:"mop",mbin:"mbin",mrel:"mrel",mopen:"mopen",mclose:"mclose",mpunct:"mpunct",minner:"minner"},fr=function(u,f,h,_){_===void 0&&(_=[null,null]);for(var N=[],ee=0;ee<u.length;ee++){var De=Qn(u[ee],f);if(De instanceof Ge){var Be=De.children;N.push.apply(N,Be)}else N.push(De)}if(!h)return N;var dt=f;if(u.length===1){var It=Kn(u[0],"sizing")||Kn(u[0],"styling");It&&(It.type==="sizing"?dt=f.havingSize(It.size):It.type==="styling"&&(dt=f.havingStyle(dr[It.style])))}var Ut=Lr([_[0]||"leftmost"],[],f),an=Lr([_[1]||"rightmost"],[],f);return Nr(N,function(Tn,Pn){var Xn=Pn.classes[0],br=Tn.classes[0];Xn==="mbin"&&U.contains(jr,br)?Pn.classes[0]="mord":br==="mbin"&&U.contains(Br,Xn)&&(Tn.classes[0]="mord")},{node:Ut},an),Nr(N,function(Tn,Pn){var Xn=Ar(Pn),br=Ar(Tn),xr=Xn&&br?Tn.hasClass("mtight")?un[Xn][br]:Vt[Xn][br]:null;if(xr)return Tt.makeGlue(xr,dt)},{node:Ut},an),N},Nr=function ne(u,f,h,_){_&&u.push(_);for(var N=0;N<u.length;N++){var ee=u[N],De=sr(ee);if(De){ne(De.children,f,h);continue}if(ee.classes[0]!=="mspace"){var Be=f(ee,h.node);Be&&(h.insertAfter?h.insertAfter(Be):(u.unshift(Be),N++)),h.node=ee,h.insertAfter=function(dt){return function(It){u.splice(dt+1,0,It),N++}}(N)}}_&&u.pop()},sr=function(u){return u instanceof Ge||u instanceof Ce?u:null},ar=function ne(u,f){var h=sr(u);if(h){var _=h.children;if(_.length){if(f==="right")return ne(_[_.length-1],"right");if(f==="left")return ne(_[0],"left")}}return u},Ar=function(u,f){return u?(f&&(u=ar(u,f)),Zr[u.classes[0]]||null):null},Rr=function(u,f){var h=["nulldelimiter"].concat(u.baseSizingClasses());return Lr(f.concat(h))},Qn=function(u,f,h){if(!u)return Lr();if(Vn[u.type]){var _=Vn[u.type](u,f);if(h&&f.size!==h.size){_=Lr(f.sizingClasses(h),[_],f);var N=f.sizeMultiplier/h.sizeMultiplier;_.height*=N,_.depth*=N}return _}else throw new g("Got group of unknown type: '"+u.type+"'")};function Kr(ne,u){var f=Lr(["base"],ne,u),h=Lr(["strut"]);return h.style.height=f.height+f.depth+"em",h.style.verticalAlign=-f.depth+"em",f.children.unshift(h),f}function Fr(ne,u){var f=null;ne.length===1&&ne[0].type==="tag"&&(f=ne[0].tag,ne=ne[0].body);for(var h=fr(ne,u,!0),_=[],N=[],ee=0;ee<h.length;ee++)if(N.push(h[ee]),h[ee].hasClass("mbin")||h[ee].hasClass("mrel")||h[ee].hasClass("allowbreak")){for(var De=!1;ee<h.length-1&&h[ee+1].hasClass("mspace")&&!h[ee+1].hasClass("newline");)ee++,N.push(h[ee]),h[ee].hasClass("nobreak")&&(De=!0);De||(_.push(Kr(N,u)),N=[])}else h[ee].hasClass("newline")&&(N.pop(),N.length>0&&(_.push(Kr(N,u)),N=[]),_.push(h[ee]));N.length>0&&_.push(Kr(N,u));var Be;f&&(Be=Kr(fr(f,u,!0)),Be.classes=["tag"],_.push(Be));var dt=Lr(["katex-html"],_);if(dt.setAttribute("aria-hidden","true"),Be){var It=Be.children[0];It.style.height=dt.height+dt.depth+"em",It.style.verticalAlign=-dt.depth+"em"}return dt}function Gr(ne){return new Ge(ne)}var Ur=function(){function ne(f,h){this.type=void 0,this.attributes=void 0,this.children=void 0,this.type=f,this.attributes={},this.children=h||[]}var u=ne.prototype;return u.setAttribute=function(h,_){this.attributes[h]=_},u.getAttribute=function(h){return this.attributes[h]},u.toNode=function(){var h=document.createElementNS("http://www.w3.org/1998/Math/MathML",this.type);for(var _ in this.attributes)Object.prototype.hasOwnProperty.call(this.attributes,_)&&h.setAttribute(_,this.attributes[_]);for(var N=0;N<this.children.length;N++)h.appendChild(this.children[N].toNode());return h},u.toMarkup=function(){var h="<"+this.type;for(var _ in this.attributes)Object.prototype.hasOwnProperty.call(this.attributes,_)&&(h+=" "+_+'="',h+=U.escape(this.attributes[_]),h+='"');h+=">";for(var N=0;N<this.children.length;N++)h+=this.children[N].toMarkup();return h+="</"+this.type+">",h},u.toText=function(){return this.children.map(function(h){return h.toText()}).join("")},ne}(),Jn=function(){function ne(f){this.text=void 0,this.text=f}var u=ne.prototype;return u.toNode=function(){return document.createTextNode(this.text)},u.toMarkup=function(){return U.escape(this.toText())},u.toText=function(){return this.text},ne}(),Si=function(){function ne(f){this.width=void 0,this.character=void 0,this.width=f,f>=.05555&&f<=.05556?this.character="\u200A":f>=.1666&&f<=.1667?this.character="\u2009":f>=.2222&&f<=.2223?this.character="\u2005":f>=.2777&&f<=.2778?this.character="\u2005\u200A":f>=-.05556&&f<=-.05555?this.character="\u200A\u2063":f>=-.1667&&f<=-.1666?this.character="\u2009\u2063":f>=-.2223&&f<=-.2222?this.character="\u205F\u2063":f>=-.2778&&f<=-.2777?this.character="\u2005\u2063":this.character=null}var u=ne.prototype;return u.toNode=function(){if(this.character)return document.createTextNode(this.character);var h=document.createElementNS("http://www.w3.org/1998/Math/MathML","mspace");return h.setAttribute("width",this.width+"em"),h},u.toMarkup=function(){return this.character?"<mtext>"+this.character+"</mtext>":'<mspace width="'+this.width+'em"/>'},u.toText=function(){return this.character?this.character:" "},ne}(),vn={MathNode:Ur,TextNode:Jn,SpaceNode:Si,newDocumentFragment:Gr},ni=function(u,f,h){return Rt[f][u]&&Rt[f][u].replace&&u.charCodeAt(0)!==55349&&!(Bt.hasOwnProperty(u)&&h&&(h.fontFamily&&h.fontFamily.substr(4,2)==="tt"||h.font&&h.font.substr(4,2)==="tt"))&&(u=Rt[f][u].replace),new vn.TextNode(u)},yi=function(u){return u.length===1?u[0]:new vn.MathNode("mrow",u)},_i=function(u,f){if(f.fontFamily==="texttt")return"monospace";if(f.fontFamily==="textsf")return f.fontShape==="textit"&&f.fontWeight==="textbf"?"sans-serif-bold-italic":f.fontShape==="textit"?"sans-serif-italic":f.fontWeight==="textbf"?"bold-sans-serif":"sans-serif";if(f.fontShape==="textit"&&f.fontWeight==="textbf")return"bold-italic";if(f.fontShape==="textit")return"italic";if(f.fontWeight==="textbf")return"bold";var h=f.font;if(!h||h==="mathnormal")return null;var _=u.mode;if(h==="mathit")return"italic";if(h==="boldsymbol")return"bold-italic";if(h==="mathbf")return"bold";if(h==="mathbb")return"double-struck";if(h==="mathfrak")return"fraktur";if(h==="mathscr"||h==="mathcal")return"script";if(h==="mathsf")return"sans-serif";if(h==="mathtt")return"monospace";var N=u.text;if(U.contains(["\\imath","\\jmath"],N))return null;Rt[_][N]&&Rt[_][N].replace&&(N=Rt[_][N].replace);var ee=Tt.fontMap[h].fontName;return ht(N,ee,_)?Tt.fontMap[h].variant:null},oi=function(u,f,h){if(u.length===1){var _=hr(u[0],f);return h&&_ instanceof Ur&&_.type==="mo"&&(_.setAttribute("lspace","0em"),_.setAttribute("rspace","0em")),[_]}for(var N=[],ee,De=0;De<u.length;De++){var Be=hr(u[De],f);if(Be instanceof Ur&&ee instanceof Ur){if(Be.type==="mtext"&&ee.type==="mtext"&&Be.getAttribute("mathvariant")===ee.getAttribute("mathvariant")){var dt;(dt=ee.children).push.apply(dt,Be.children);continue}else if(Be.type==="mn"&&ee.type==="mn"){var It;(It=ee.children).push.apply(It,Be.children);continue}else if(Be.type==="mi"&&Be.children.length===1&&ee.type==="mn"){var Ut=Be.children[0];if(Ut instanceof Jn&&Ut.text==="."){var an;(an=ee.children).push.apply(an,Be.children);continue}}else if(ee.type==="mi"&&ee.children.length===1){var Tn=ee.children[0];if(Tn instanceof Jn&&Tn.text==="\u0338"&&(Be.type==="mo"||Be.type==="mi"||Be.type==="mn")){var Pn=Be.children[0];Pn instanceof Jn&&Pn.text.length>0&&(Pn.text=Pn.text.slice(0,1)+"\u0338"+Pn.text.slice(1),N.pop())}}}N.push(Be),ee=Be}return N},pi=function(u,f,h){return yi(oi(u,f,h))},hr=function(u,f){if(!u)return new vn.MathNode("mrow");if(tr[u.type]){var h=tr[u.type](u,f);return h}else throw new g("Got group of unknown type: '"+u.type+"'")};function Xr(ne,u,f,h){var _=oi(ne,f),N;_.length===1&&_[0]instanceof Ur&&U.contains(["mrow","mtable"],_[0].type)?N=_[0]:N=new vn.MathNode("mrow",_);var ee=new vn.MathNode("annotation",[new vn.TextNode(u)]);ee.setAttribute("encoding","application/x-tex");var De=new vn.MathNode("semantics",[N,ee]),Be=new vn.MathNode("math",[De]);Be.setAttribute("xmlns","http://www.w3.org/1998/Math/MathML");var dt=h?"katex":"katex-mathml";return Tt.makeSpan([dt],[Be])}var gi=function(u){return new Ht({style:u.displayMode?x.DISPLAY:x.TEXT,maxSize:u.maxSize,minRuleThickness:u.minRuleThickness})},xi=function(u,f){if(f.displayMode){var h=["katex-display"];f.leqno&&h.push("leqno"),f.fleqn&&h.push("fleqn"),u=Tt.makeSpan(h,[u])}return u},Mr=function(u,f,h){var _=gi(h),N;if(h.output==="mathml")return Xr(u,f,_,!0);if(h.output==="html"){var ee=Fr(u,_);N=Tt.makeSpan(["katex"],[ee])}else{var De=Xr(u,f,_,!1),Be=Fr(u,_);N=Tt.makeSpan(["katex"],[De,Be])}return xi(N,h)},Qr=function(u,f,h){var _=gi(h),N=Fr(u,_),ee=Tt.makeSpan(["katex"],[N]);return xi(ee,h)},ii=Mr,ir={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"},Er=function(u){var f=new vn.MathNode("mo",[new vn.TextNode(ir[u.substr(1)])]);return f.setAttribute("stretchy","true"),f},kn={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]},$n=function(u){return u.type==="ordgroup"?u.body.length:1},lr=function(u,f){function h(){var Be=4e5,dt=u.label.substr(1);if(U.contains(["widehat","widecheck","widetilde","utilde"],dt)){var It=u,Ut=$n(It.base),an,Tn,Pn;if(Ut>5)dt==="widehat"||dt==="widecheck"?(an=420,Be=2364,Pn=.42,Tn=dt+"4"):(an=312,Be=2340,Pn=.34,Tn="tilde4");else{var Xn=[1,1,2,2,3,3][Ut];dt==="widehat"||dt==="widecheck"?(Be=[0,1062,2364,2364,2364][Xn],an=[0,239,300,360,420][Xn],Pn=[0,.24,.3,.3,.36,.42][Xn],Tn=dt+Xn):(Be=[0,600,1033,2339,2340][Xn],an=[0,260,286,306,312][Xn],Pn=[0,.26,.286,.3,.306,.34][Xn],Tn="tilde"+Xn)}var br=new de(Tn),xr=new ve([br],{width:"100%",height:Pn+"em",viewBox:"0 0 "+Be+" "+an,preserveAspectRatio:"none"});return{span:Tt.makeSvgSpan([],[xr],f),minWidth:0,height:Pn}}else{var Pr=[],$r=kn[dt],fi=$r[0],si=$r[1],hi=$r[2],mi=hi/1e3,ci=fi.length,$i,bi;if(ci===1){var Lt=$r[3];$i=["hide-tail"],bi=[Lt]}else if(ci===2)$i=["halfarrow-left","halfarrow-right"],bi=["xMinYMin","xMaxYMin"];else if(ci===3)$i=["brace-left","brace-center","brace-right"],bi=["xMinYMin","xMidYMin","xMaxYMin"];else throw new Error(`Correct katexImagesData or update code here to support
|
|
|
`+ci+" children.");for(var Xi=0;Xi<ci;Xi++){var us=new de(fi[Xi]),rs=new ve([us],{width:"400em",height:mi+"em",viewBox:"0 0 "+Be+" "+hi,preserveAspectRatio:bi[Xi]+" slice"}),Ci=Tt.makeSvgSpan([$i[Xi]],[rs],f);if(ci===1)return{span:Ci,minWidth:si,height:mi};Ci.style.height=mi+"em",Pr.push(Ci)}return{span:Tt.makeSpan(["stretchy"],Pr,f),minWidth:si,height:mi}}}var _=h(),N=_.span,ee=_.minWidth,De=_.height;return N.height=De,N.style.height=De+"em",ee>0&&(N.style.minWidth=ee+"em"),N},yr=function(u,f,h,_){var N,ee=u.height+u.depth+2*h;if(/fbox|color/.test(f)){if(N=Tt.makeSpan(["stretchy",f],[],_),f==="fbox"){var De=_.color&&_.getColor();De&&(N.style.borderColor=De)}}else{var Be=[];/^[bx]cancel$/.test(f)&&Be.push(new ye({x1:"0",y1:"0",x2:"100%",y2:"100%","stroke-width":"0.046em"})),/^x?cancel$/.test(f)&&Be.push(new ye({x1:"0",y1:"100%",x2:"100%",y2:"0","stroke-width":"0.046em"}));var dt=new ve(Be,{width:"100%",height:ee+"em"});N=Tt.makeSvgSpan([],[dt],_)}return N.height=ee,N.style.height=ee+"em",N},Wr={encloseSpan:yr,mathMLnode:Er,svgSpan:lr},Rn=function(u,f){var h,_,N=Kn(u,"supsub"),ee;N?(_=Fn(N.base,"accent"),h=_.base,N.base=h,ee=we(Qn(N,f)),N.base=_):(_=Fn(u,"accent"),h=_.base);var De=Qn(h,f.havingCrampedStyle()),Be=_.isShifty&&U.isCharacterBox(h),dt=0;if(Be){var It=U.getBaseElem(h),Ut=Qn(It,f.havingCrampedStyle());dt=Te(Ut).skew}var an=Math.min(De.height,f.fontMetrics().xHeight),Tn;if(_.isStretchy)Tn=Wr.svgSpan(_,f),Tn=Tt.makeVList({positionType:"firstBaseline",children:[{type:"elem",elem:De},{type:"elem",elem:Tn,wrapperClasses:["svg-align"],wrapperStyle:dt>0?{width:"calc(100% - "+2*dt+"em)",marginLeft:2*dt+"em"}:void 0}]},f);else{var Pn,Xn;_.label==="\\vec"?(Pn=Tt.staticSvg("vec",f),Xn=Tt.svgData.vec[1]):(Pn=Tt.makeOrd({mode:_.mode,text:_.label},f,"textord"),Pn=Te(Pn),Pn.italic=0,Xn=Pn.width),Tn=Tt.makeSpan(["accent-body"],[Pn]);var br=_.label==="\\textcircled";br&&(Tn.classes.push("accent-full"),an=De.height);var xr=dt;br||(xr-=Xn/2),Tn.style.left=xr+"em",_.label==="\\textcircled"&&(Tn.style.top=".2em"),Tn=Tt.makeVList({positionType:"firstBaseline",children:[{type:"elem",elem:De},{type:"kern",size:-an},{type:"elem",elem:Tn}]},f)}var Pr=Tt.makeSpan(["mord","accent"],[Tn],f);return ee?(ee.children[0]=Pr,ee.height=Math.max(Pr.height,ee.height),ee.classes[0]="mord",ee):Pr},Un=function(u,f){var h=u.isStretchy?Wr.mathMLnode(u.label):new vn.MathNode("mo",[ni(u.label,u.mode)]),_=new vn.MathNode("mover",[hr(u.base,f),h]);return _.setAttribute("accent","true"),_},rr=new RegExp(["\\acute","\\grave","\\ddot","\\tilde","\\bar","\\breve","\\check","\\hat","\\vec","\\dot","\\mathring"].map(function(ne){return"\\"+ne}).join("|"));tn({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,f){var h=f[0],_=!rr.test(u.funcName),N=!_||u.funcName==="\\widehat"||u.funcName==="\\widetilde"||u.funcName==="\\widecheck";return{type:"accent",mode:u.parser.mode,label:u.funcName,isStretchy:_,isShifty:N,base:h}},htmlBuilder:Rn,mathmlBuilder:Un}),tn({type:"accent",names:["\\'","\\`","\\^","\\~","\\=","\\u","\\.",'\\"',"\\r","\\H","\\v","\\textcircled"],props:{numArgs:1,allowedInText:!0,allowedInMath:!1},handler:function(u,f){var h=f[0];return{type:"accent",mode:u.parser.mode,label:u.funcName,isStretchy:!1,isShifty:!0,base:h}},htmlBuilder:Rn,mathmlBuilder:Un}),tn({type:"accentUnder",names:["\\underleftarrow","\\underrightarrow","\\underleftrightarrow","\\undergroup","\\underlinesegment","\\utilde"],props:{numArgs:1},handler:function(u,f){var h=u.parser,_=u.funcName,N=f[0];return{type:"accentUnder",mode:h.mode,label:_,base:N}},htmlBuilder:function(u,f){var h=Qn(u.base,f),_=Wr.svgSpan(u,f),N=u.label==="\\utilde"?.12:0,ee=Tt.makeVList({positionType:"bottom",positionData:_.height+N,children:[{type:"elem",elem:_,wrapperClasses:["svg-align"]},{type:"kern",size:N},{type:"elem",elem:h}]},f);return Tt.makeSpan(["mord","accentunder"],[ee],f)},mathmlBuilder:function(u,f){var h=Wr.mathMLnode(u.label),_=new vn.MathNode("munder",[hr(u.base,f),h]);return _.setAttribute("accentunder","true"),_}});var or=function(u){var f=new vn.MathNode("mpadded",u?[u]:[]);return f.setAttribute("width","+0.6em"),f.setAttribute("lspace","0.3em"),f};tn({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,f,h){var _=u.parser,N=u.funcName;return{type:"xArrow",mode:_.mode,label:N,body:f[0],below:h[0]}},htmlBuilder:function(u,f){var h=f.style,_=f.havingStyle(h.sup()),N=Tt.wrapFragment(Qn(u.body,_,f),f);N.classes.push("x-arrow-pad");var ee;u.below&&(_=f.havingStyle(h.sub()),ee=Tt.wrapFragment(Qn(u.below,_,f),f),ee.classes.push("x-arrow-pad"));var De=Wr.svgSpan(u,f),Be=-f.fontMetrics().axisHeight+.5*De.height,dt=-f.fontMetrics().axisHeight-.5*De.height-.111;(N.depth>.25||u.label==="\\xleftequilibrium")&&(dt-=N.depth);var It;if(ee){var Ut=-f.fontMetrics().axisHeight+ee.height+.5*De.height+.111;It=Tt.makeVList({positionType:"individualShift",children:[{type:"elem",elem:N,shift:dt},{type:"elem",elem:De,shift:Be},{type:"elem",elem:ee,shift:Ut}]},f)}else It=Tt.makeVList({positionType:"individualShift",children:[{type:"elem",elem:N,shift:dt},{type:"elem",elem:De,shift:Be}]},f);return It.children[0].children[0].children[1].classes.push("svg-align"),Tt.makeSpan(["mrel","x-arrow"],[It],f)},mathmlBuilder:function(u,f){var h=Wr.mathMLnode(u.label),_;if(u.body){var N=or(hr(u.body,f));if(u.below){var ee=or(hr(u.below,f));_=new vn.MathNode("munderover",[h,ee,N])}else _=new vn.MathNode("mover",[h,N])}else if(u.below){var De=or(hr(u.below,f));_=new vn.MathNode("munder",[h,De])}else _=or(),_=new vn.MathNode("mover",[h,_]);return _}}),tn({type:"textord",names:["\\@char"],props:{numArgs:1,allowedInText:!0},handler:function(u,f){for(var h=u.parser,_=Fn(f[0],"ordgroup"),N=_.body,ee="",De=0;De<N.length;De++){var Be=Fn(N[De],"textord");ee+=Be.text}var dt=parseInt(ee);if(isNaN(dt))throw new g("\\@char has non-numeric argument "+ee);return{type:"textord",mode:h.mode,text:String.fromCharCode(dt)}}});var Sr=function(u,f){var h=fr(u.body,f.withColor(u.color),!1);return Tt.makeFragment(h)},Ei=function(u,f){var h=oi(u.body,f.withColor(u.color)),_=new vn.MathNode("mstyle",h);return _.setAttribute("mathcolor",u.color),_};tn({type:"color",names:["\\textcolor"],props:{numArgs:2,allowedInText:!0,greediness:3,argTypes:["color","original"]},handler:function(u,f){var h=u.parser,_=Fn(f[0],"color-token").color,N=f[1];return{type:"color",mode:h.mode,color:_,body:vr(N)}},htmlBuilder:Sr,mathmlBuilder:Ei}),tn({type:"color",names:["\\color"],props:{numArgs:1,allowedInText:!0,greediness:3,argTypes:["color"]},handler:function(u,f){var h=u.parser,_=u.breakOnTokenText,N=Fn(f[0],"color-token").color;h.gullet.macros.set("\\current@color",N);var ee=h.parseExpression(!0,_);return{type:"color",mode:h.mode,color:N,body:ee}},htmlBuilder:Sr,mathmlBuilder:Ei}),tn({type:"cr",names:["\\cr","\\newline"],props:{numArgs:0,numOptionalArgs:1,argTypes:["size"],allowedInText:!0},handler:function(u,f,h){var _=u.parser,N=u.funcName,ee=h[0],De=N==="\\cr",Be=!1;return De||(_.settings.displayMode&&_.settings.useStrictBehavior("newLineInDisplayMode","In LaTeX, \\\\ or \\newline does nothing in display mode")?Be=!1:Be=!0),{type:"cr",mode:_.mode,newLine:Be,newRow:De,size:ee&&Fn(ee,"size").value}},htmlBuilder:function(u,f){if(u.newRow)throw new g("\\cr valid only within a tabular/array environment");var h=Tt.makeSpan(["mspace"],[],f);return u.newLine&&(h.classes.push("newline"),u.size&&(h.style.marginTop=Ye(u.size,f)+"em")),h},mathmlBuilder:function(u,f){var h=new vn.MathNode("mspace");return u.newLine&&(h.setAttribute("linebreak","newline"),u.size&&h.setAttribute("height",Ye(u.size,f)+"em")),h}});var ri=function(u,f,h){var _=Rt.math[u]&&Rt.math[u].replace,N=ht(_||u,f,h);if(!N)throw new Error("Unsupported symbol "+u+" and font size "+f+".");return N},di=function(u,f,h,_){var N=h.havingBaseStyle(f),ee=Tt.makeSpan(_.concat(N.sizingClasses(h)),[u],h),De=N.sizeMultiplier/h.sizeMultiplier;return ee.height*=De,ee.depth*=De,ee.maxFontSize=N.sizeMultiplier,ee},li=function(u,f,h){var _=f.havingBaseStyle(h),N=(1-f.sizeMultiplier/_.sizeMultiplier)*f.fontMetrics().axisHeight;u.classes.push("delimcenter"),u.style.top=N+"em",u.height-=N,u.depth+=N},Vi=function(u,f,h,_,N,ee){var De=Tt.makeSymbol(u,"Main-Regular",N,_),Be=di(De,f,_,ee);return h&&li(Be,_,f),Be},Pi=function(u,f,h,_){return Tt.makeSymbol(u,"Size"+f+"-Regular",h,_)},Ui=function(u,f,h,_,N,ee){var De=Pi(u,f,N,_),Be=di(Tt.makeSpan(["delimsizing","size"+f],[De],_),x.TEXT,_,ee);return h&&li(Be,_,x.TEXT),Be},Di=function(u,f,h){var _;f==="Size1-Regular"?_="delim-size1":_="delim-size4";var N=Tt.makeSpan(["delimsizinginner",_],[Tt.makeSpan([],[Tt.makeSymbol(u,f,h)])]);return{type:"elem",elem:N}},zi={type:"kern",size:-.005},Mi=function(u,f,h,_,N,ee){var De,Be,dt,It;De=dt=It=u,Be=null;var Ut="Size1-Regular";u==="\\uparrow"?dt=It="\u23D0":u==="\\Uparrow"?dt=It="\u2016":u==="\\downarrow"?De=dt="\u23D0":u==="\\Downarrow"?De=dt="\u2016":u==="\\updownarrow"?(De="\\uparrow",dt="\u23D0",It="\\downarrow"):u==="\\Updownarrow"?(De="\\Uparrow",dt="\u2016",It="\\Downarrow"):u==="["||u==="\\lbrack"?(De="\u23A1",dt="\u23A2",It="\u23A3",Ut="Size4-Regular"):u==="]"||u==="\\rbrack"?(De="\u23A4",dt="\u23A5",It="\u23A6",Ut="Size4-Regular"):u==="\\lfloor"||u==="\u230A"?(dt=De="\u23A2",It="\u23A3",Ut="Size4-Regular"):u==="\\lceil"||u==="\u2308"?(De="\u23A1",dt=It="\u23A2",Ut="Size4-Regular"):u==="\\rfloor"||u==="\u230B"?(dt=De="\u23A5",It="\u23A6",Ut="Size4-Regular"):u==="\\rceil"||u==="\u2309"?(De="\u23A4",dt=It="\u23A5",Ut="Size4-Regular"):u==="("||u==="\\lparen"?(De="\u239B",dt="\u239C",It="\u239D",Ut="Size4-Regular"):u===")"||u==="\\rparen"?(De="\u239E",dt="\u239F",It="\u23A0",Ut="Size4-Regular"):u==="\\{"||u==="\\lbrace"?(De="\u23A7",Be="\u23A8",It="\u23A9",dt="\u23AA",Ut="Size4-Regular"):u==="\\}"||u==="\\rbrace"?(De="\u23AB",Be="\u23AC",It="\u23AD",dt="\u23AA",Ut="Size4-Regular"):u==="\\lgroup"||u==="\u27EE"?(De="\u23A7",It="\u23A9",dt="\u23AA",Ut="Size4-Regular"):u==="\\rgroup"||u==="\u27EF"?(De="\u23AB",It="\u23AD",dt="\u23AA",Ut="Size4-Regular"):u==="\\lmoustache"||u==="\u23B0"?(De="\u23A7",It="\u23AD",dt="\u23AA",Ut="Size4-Regular"):(u==="\\rmoustache"||u==="\u23B1")&&(De="\u23AB",It="\u23A9",dt="\u23AA",Ut="Size4-Regular");var an=ri(De,Ut,N),Tn=an.height+an.depth,Pn=ri(dt,Ut,N),Xn=Pn.height+Pn.depth,br=ri(It,Ut,N),xr=br.height+br.depth,Pr=0,$r=1;if(Be!==null){var fi=ri(Be,Ut,N);Pr=fi.height+fi.depth,$r=2}var si=Tn+xr+Pr,hi=Math.max(0,Math.ceil((f-si)/($r*Xn))),mi=si+hi*$r*Xn,ci=_.fontMetrics().axisHeight;h&&(ci*=_.sizeMultiplier);var $i=mi/2-ci,bi=(hi+1)*.005-Xn,Lt=[];if(Lt.push(Di(It,Ut,N)),Be===null)for(var Xi=0;Xi<hi;Xi++)Lt.push(zi),Lt.push(Di(dt,Ut,N));else{for(var us=0;us<hi;us++)Lt.push(zi),Lt.push(Di(dt,Ut,N));Lt.push({type:"kern",size:bi}),Lt.push(Di(dt,Ut,N)),Lt.push(zi),Lt.push(Di(Be,Ut,N));for(var rs=0;rs<hi;rs++)Lt.push(zi),Lt.push(Di(dt,Ut,N))}Lt.push({type:"kern",size:bi}),Lt.push(Di(dt,Ut,N)),Lt.push(zi),Lt.push(Di(De,Ut,N));var Ci=_.havingBaseStyle(x.TEXT),Ss=Tt.makeVList({positionType:"bottom",positionData:$i,children:Lt},Ci);return di(Tt.makeSpan(["delimsizing","mult"],[Ss],Ci),x.TEXT,_,ee)},Ds=80,as=.08,Gi=function(u,f,h,_,N){var ee=at(u,_,h),De=new de(u,ee),Be=new ve([De],{width:"400em",height:f+"em",viewBox:"0 0 400000 "+h,preserveAspectRatio:"xMinYMin slice"});return Tt.makeSvgSpan(["hide-tail"],[Be],N)},bs=function(u,f){var h=f.havingBaseSizing(),_=hs("\\surd",u*h.sizeMultiplier,Is,h),N=h.sizeMultiplier,ee=Math.max(0,f.minRuleThickness-f.fontMetrics().sqrtRuleThickness),De,Be=0,dt=0,It=0,Ut;return _.type==="small"?(It=1e3+1e3*ee+Ds,u<1?N=1:u<1.4&&(N=.7),Be=(1+ee+as)/N,dt=(1+ee)/N,De=Gi("sqrtMain",Be,It,ee,f),De.style.minWidth="0.853em",Ut=.833/N):_.type==="large"?(It=(1e3+Ds)*xs[_.size],dt=(xs[_.size]+ee)/N,Be=(xs[_.size]+ee+as)/N,De=Gi("sqrtSize"+_.size,Be,It,ee,f),De.style.minWidth="1.02em",Ut=1/N):(Be=u+ee+as,dt=u+ee,It=Math.floor(1e3*u+ee)+Ds,De=Gi("sqrtTall",Be,It,ee,f),De.style.minWidth="0.742em",Ut=1.056),De.height=dt,De.style.height=Be+"em",{span:De,advanceWidth:Ut,ruleWidth:(f.fontMetrics().sqrtRuleThickness+ee)*N}},_s=["(","\\lparen",")","\\rparen","[","\\lbrack","]","\\rbrack","\\{","\\lbrace","\\}","\\rbrace","\\lfloor","\\rfloor","\u230A","\u230B","\\lceil","\\rceil","\u2308","\u2309","\\surd"],ks=["\\uparrow","\\downarrow","\\updownarrow","\\Uparrow","\\Downarrow","\\Updownarrow","|","\\|","\\vert","\\Vert","\\lvert","\\rvert","\\lVert","\\rVert","\\lgroup","\\rgroup","\u27EE","\u27EF","\\lmoustache","\\rmoustache","\u23B0","\u23B1"],os=["<",">","\\langle","\\rangle","/","\\backslash","\\lt","\\gt"],xs=[0,1.2,1.8,2.4,3],ki=function(u,f,h,_,N){if(u==="<"||u==="\\lt"||u==="\u27E8"?u="\\langle":(u===">"||u==="\\gt"||u==="\u27E9")&&(u="\\rangle"),U.contains(_s,u)||U.contains(os,u))return Ui(u,f,!1,h,_,N);if(U.contains(ks,u))return Mi(u,xs[f],!1,h,_,N);throw new g("Illegal delimiter: '"+u+"'")},Ns=[{type:"small",style:x.SCRIPTSCRIPT},{type:"small",style:x.SCRIPT},{type:"small",style:x.TEXT},{type:"large",size:1},{type:"large",size:2},{type:"large",size:3},{type:"large",size:4}],Qs=[{type:"small",style:x.SCRIPTSCRIPT},{type:"small",style:x.SCRIPT},{type:"small",style:x.TEXT},{type:"stack"}],Is=[{type:"small",style:x.SCRIPTSCRIPT},{type:"small",style:x.SCRIPT},{type:"small",style:x.TEXT},{type:"large",size:1},{type:"large",size:2},{type:"large",size:3},{type:"large",size:4},{type:"stack"}],Bs=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.")},hs=function(u,f,h,_){for(var N=Math.min(2,3-_.style.size),ee=N;ee<h.length&&h[ee].type!=="stack";ee++){var De=ri(u,Bs(h[ee]),"math"),Be=De.height+De.depth;if(h[ee].type==="small"){var dt=_.havingBaseStyle(h[ee].style);Be*=dt.sizeMultiplier}if(Be>f)return h[ee]}return h[h.length-1]},Yi=function(u,f,h,_,N,ee){u==="<"||u==="\\lt"||u==="\u27E8"?u="\\langle":(u===">"||u==="\\gt"||u==="\u27E9")&&(u="\\rangle");var De;U.contains(os,u)?De=Ns:U.contains(_s,u)?De=Is:De=Qs;var Be=hs(u,f,De,_);return Be.type==="small"?Vi(u,Be.style,h,_,N,ee):Be.type==="large"?Ui(u,Be.size,h,_,N,ee):Mi(u,f,h,_,N,ee)},zr=function(u,f,h,_,N,ee){var De=_.fontMetrics().axisHeight*_.sizeMultiplier,Be=901,dt=5/_.fontMetrics().ptPerEm,It=Math.max(f-De,h+De),Ut=Math.max(It/500*Be,2*It-dt);return Yi(u,Ut,!0,_,N,ee)},Ir={sqrtImage:bs,sizedDelim:ki,customSizedDelim:Yi,leftRightDelim:zr},wi={"\\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}},Ai=["(","\\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 Yr(ne,u){var f=Cr(ne);if(f&&U.contains(Ai,f.text))return f;throw new g("Invalid delimiter: '"+(f?f.text:JSON.stringify(ne))+"' after '"+u.funcName+"'",ne)}tn({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,f){var h=Yr(f[0],u);return{type:"delimsizing",mode:u.parser.mode,size:wi[u.funcName].size,mclass:wi[u.funcName].mclass,delim:h.text}},htmlBuilder:function(u,f){return u.delim==="."?Tt.makeSpan([u.mclass]):Ir.sizedDelim(u.delim,u.size,f,u.mode,[u.mclass])},mathmlBuilder:function(u){var f=[];u.delim!=="."&&f.push(ni(u.delim,u.mode));var h=new vn.MathNode("mo",f);return u.mclass==="mopen"||u.mclass==="mclose"?h.setAttribute("fence","true"):h.setAttribute("fence","false"),h}});function vi(ne){if(!ne.body)throw new Error("Bug: The leftright ParseNode wasn't fully parsed.")}tn({type:"leftright-right",names:["\\right"],props:{numArgs:1},handler:function(u,f){var h=u.parser.gullet.macros.get("\\current@color");if(h&&typeof h!="string")throw new g("\\current@color set to non-string in \\right");return{type:"leftright-right",mode:u.parser.mode,delim:Yr(f[0],u).text,color:h}}}),tn({type:"leftright",names:["\\left"],props:{numArgs:1},handler:function(u,f){var h=Yr(f[0],u),_=u.parser;++_.leftrightDepth;var N=_.parseExpression(!1);--_.leftrightDepth,_.expect("\\right",!1);var ee=Fn(_.parseFunction(),"leftright-right");return{type:"leftright",mode:_.mode,body:N,left:h.text,right:ee.delim,rightColor:ee.color}},htmlBuilder:function(u,f){vi(u);for(var h=fr(u.body,f,!0,["mopen","mclose"]),_=0,N=0,ee=!1,De=0;De<h.length;De++)h[De].isMiddle?ee=!0:(_=Math.max(h[De].height,_),N=Math.max(h[De].depth,N));_*=f.sizeMultiplier,N*=f.sizeMultiplier;var Be;if(u.left==="."?Be=Rr(f,["mopen"]):Be=Ir.leftRightDelim(u.left,_,N,f,u.mode,["mopen"]),h.unshift(Be),ee)for(var dt=1;dt<h.length;dt++){var It=h[dt],Ut=It.isMiddle;Ut&&(h[dt]=Ir.leftRightDelim(Ut.delim,_,N,Ut.options,u.mode,[]))}var an;if(u.right===".")an=Rr(f,["mclose"]);else{var Tn=u.rightColor?f.withColor(u.rightColor):f;an=Ir.leftRightDelim(u.right,_,N,Tn,u.mode,["mclose"])}return h.push(an),Tt.makeSpan(["minner"],h,f)},mathmlBuilder:function(u,f){vi(u);var h=oi(u.body,f);if(u.left!=="."){var _=new vn.MathNode("mo",[ni(u.left,u.mode)]);_.setAttribute("fence","true"),h.unshift(_)}if(u.right!=="."){var N=new vn.MathNode("mo",[ni(u.right,u.mode)]);N.setAttribute("fence","true"),u.rightColor&&N.setAttribute("mathcolor",u.rightColor),h.push(N)}return yi(h)}}),tn({type:"middle",names:["\\middle"],props:{numArgs:1},handler:function(u,f){var h=Yr(f[0],u);if(!u.parser.leftrightDepth)throw new g("\\middle without preceding \\left",h);return{type:"middle",mode:u.parser.mode,delim:h.text}},htmlBuilder:function(u,f){var h;if(u.delim===".")h=Rr(f,[]);else{h=Ir.sizedDelim(u.delim,1,f,u.mode,[]);var _={delim:u.delim,options:f};h.isMiddle=_}return h},mathmlBuilder:function(u,f){var h=u.delim==="\\vert"||u.delim==="|"?ni("|","text"):ni(u.delim,u.mode),_=new vn.MathNode("mo",[h]);return _.setAttribute("fence","true"),_.setAttribute("lspace","0.05em"),_.setAttribute("rspace","0.05em"),_}});var Ri=function(u,f){var h=Tt.wrapFragment(Qn(u.body,f),f),_=u.label.substr(1),N=f.sizeMultiplier,ee,De=0,Be=U.isCharacterBox(u.body);if(_==="sout")ee=Tt.makeSpan(["stretchy","sout"]),ee.height=f.fontMetrics().defaultRuleThickness/N,De=-.5*f.fontMetrics().xHeight;else{/cancel/.test(_)?Be||h.classes.push("cancel-pad"):h.classes.push("boxpad");var dt=0,It=0;/box/.test(_)?(It=Math.max(f.fontMetrics().fboxrule,f.minRuleThickness),dt=f.fontMetrics().fboxsep+(_==="colorbox"?0:It)):dt=Be?.2:0,ee=Wr.encloseSpan(h,_,dt,f),/fbox|boxed|fcolorbox/.test(_)&&(ee.style.borderStyle="solid",ee.style.borderWidth=It+"em"),De=h.depth+dt,u.backgroundColor&&(ee.style.backgroundColor=u.backgroundColor,u.borderColor&&(ee.style.borderColor=u.borderColor))}var Ut;return u.backgroundColor?Ut=Tt.makeVList({positionType:"individualShift",children:[{type:"elem",elem:ee,shift:De},{type:"elem",elem:h,shift:0}]},f):Ut=Tt.makeVList({positionType:"individualShift",children:[{type:"elem",elem:h,shift:0},{type:"elem",elem:ee,shift:De,wrapperClasses:/cancel/.test(_)?["svg-align"]:[]}]},f),/cancel/.test(_)&&(Ut.height=h.height,Ut.depth=h.depth),/cancel/.test(_)&&!Be?Tt.makeSpan(["mord","cancel-lap"],[Ut],f):Tt.makeSpan(["mord"],[Ut],f)},Li=function(u,f){var h=0,_=new vn.MathNode(u.label.indexOf("colorbox")>-1?"mpadded":"menclose",[hr(u.body,f)]);switch(u.label){case"\\cancel":_.setAttribute("notation","updiagonalstrike");break;case"\\bcancel":_.setAttribute("notation","downdiagonalstrike");break;case"\\sout":_.setAttribute("notation","horizontalstrike");break;case"\\fbox":_.setAttribute("notation","box");break;case"\\fcolorbox":case"\\colorbox":if(h=f.fontMetrics().fboxsep*f.fontMetrics().ptPerEm,_.setAttribute("width","+"+2*h+"pt"),_.setAttribute("height","+"+2*h+"pt"),_.setAttribute("lspace",h+"pt"),_.setAttribute("voffset",h+"pt"),u.label==="\\fcolorbox"){var N=Math.max(f.fontMetrics().fboxrule,f.minRuleThickness);_.setAttribute("style","border: "+N+"em solid "+String(u.borderColor))}break;case"\\xcancel":_.setAttribute("notation","updiagonalstrike downdiagonalstrike");break}return u.backgroundColor&&_.setAttribute("mathbackground",u.backgroundColor),_};tn({type:"enclose",names:["\\colorbox"],props:{numArgs:2,allowedInText:!0,greediness:3,argTypes:["color","text"]},handler:function(u,f,h){var _=u.parser,N=u.funcName,ee=Fn(f[0],"color-token").color,De=f[1];return{type:"enclose",mode:_.mode,label:N,backgroundColor:ee,body:De}},htmlBuilder:Ri,mathmlBuilder:Li}),tn({type:"enclose",names:["\\fcolorbox"],props:{numArgs:3,allowedInText:!0,greediness:3,argTypes:["color","color","text"]},handler:function(u,f,h){var _=u.parser,N=u.funcName,ee=Fn(f[0],"color-token").color,De=Fn(f[1],"color-token").color,Be=f[2];return{type:"enclose",mode:_.mode,label:N,backgroundColor:De,borderColor:ee,body:Be}},htmlBuilder:Ri,mathmlBuilder:Li}),tn({type:"enclose",names:["\\fbox"],props:{numArgs:1,argTypes:["hbox"],allowedInText:!0},handler:function(u,f){var h=u.parser;return{type:"enclose",mode:h.mode,label:"\\fbox",body:f[0]}}}),tn({type:"enclose",names:["\\cancel","\\bcancel","\\xcancel","\\sout"],props:{numArgs:1},handler:function(u,f,h){var _=u.parser,N=u.funcName,ee=f[0];return{type:"enclose",mode:_.mode,label:N,body:ee}},htmlBuilder:Ri,mathmlBuilder:Li});var Ji={};function Ii(ne){for(var u=ne.type,f=ne.names,h=ne.props,_=ne.handler,N=ne.htmlBuilder,ee=ne.mathmlBuilder,De={type:u,numArgs:h.numArgs||0,greediness:1,allowedInText:!1,numOptionalArgs:0,handler:_},Be=0;Be<f.length;++Be)Ji[f[Be]]=De;N&&(Vn[u]=N),ee&&(tr[u]=ee)}function qi(ne){var u=[];ne.consumeSpaces();for(var f=ne.fetch().text;f==="\\hline"||f==="\\hdashline";)ne.consume(),u.push(f==="\\hdashline"),ne.consumeSpaces(),f=ne.fetch().text;return u}function ji(ne,u,f){var h=u.hskipBeforeAndAfter,_=u.addJot,N=u.cols,ee=u.arraystretch,De=u.colSeparationType;if(ne.gullet.beginGroup(),ne.gullet.macros.set("\\\\","\\cr"),!ee){var Be=ne.gullet.expandMacroAsText("\\arraystretch");if(Be==null)ee=1;else if(ee=parseFloat(Be),!ee||ee<0)throw new g("Invalid \\arraystretch: "+Be)}ne.gullet.beginGroup();var dt=[],It=[dt],Ut=[],an=[];for(an.push(qi(ne));;){var Tn=ne.parseExpression(!1,"\\cr");ne.gullet.endGroup(),ne.gullet.beginGroup(),Tn={type:"ordgroup",mode:ne.mode,body:Tn},f&&(Tn={type:"styling",mode:ne.mode,style:f,body:[Tn]}),dt.push(Tn);var Pn=ne.fetch().text;if(Pn==="&")ne.consume();else if(Pn==="\\end"){dt.length===1&&Tn.type==="styling"&&Tn.body[0].body.length===0&&It.pop(),an.length<It.length+1&&an.push([]);break}else if(Pn==="\\cr"){var Xn=Fn(ne.parseFunction(),"cr");Ut.push(Xn.size),an.push(qi(ne)),dt=[],It.push(dt)}else throw new g("Expected & or \\\\ or \\cr or \\end",ne.nextToken)}return ne.gullet.endGroup(),ne.gullet.endGroup(),{type:"array",mode:ne.mode,addJot:_,arraystretch:ee,body:It,cols:N,rowGaps:Ut,hskipBeforeAndAfter:h,hLinesBeforeRow:an,colSeparationType:De}}function ts(ne){return ne.substr(0,1)==="d"?"display":"text"}var ns=function(u,f){var h,_,N=u.body.length,ee=u.hLinesBeforeRow,De=0,Be=new Array(N),dt=[],It=Math.max(f.fontMetrics().arrayRuleWidth,f.minRuleThickness),Ut=1/f.fontMetrics().ptPerEm,an=5*Ut;if(u.colSeparationType&&u.colSeparationType==="small"){var Tn=f.havingStyle(x.SCRIPT).sizeMultiplier;an=.2778*(Tn/f.sizeMultiplier)}var Pn=12*Ut,Xn=3*Ut,br=u.arraystretch*Pn,xr=.7*br,Pr=.3*br,$r=0;function fi(aa){for(var ba=0;ba<aa.length;++ba)ba>0&&($r+=.25),dt.push({pos:$r,isDashed:aa[ba]})}for(fi(ee[0]),h=0;h<u.body.length;++h){var si=u.body[h],hi=xr,mi=Pr;De<si.length&&(De=si.length);var ci=new Array(si.length);for(_=0;_<si.length;++_){var $i=Qn(si[_],f);mi<$i.depth&&(mi=$i.depth),hi<$i.height&&(hi=$i.height),ci[_]=$i}var bi=u.rowGaps[h],Lt=0;bi&&(Lt=Ye(bi,f),Lt>0&&(Lt+=Pr,mi<Lt&&(mi=Lt),Lt=0)),u.addJot&&(mi+=Xn),ci.height=hi,ci.depth=mi,$r+=hi,ci.pos=$r,$r+=mi+Lt,Be[h]=ci,fi(ee[h+1])}var Xi=$r/2+f.fontMetrics().axisHeight,us=u.cols||[],rs=[],Ci,Ss;for(_=0,Ss=0;_<De||Ss<us.length;++_,++Ss){for(var cs=us[Ss]||{},lo=!0;cs.type==="separator";){if(lo||(Ci=Tt.makeSpan(["arraycolsep"],[]),Ci.style.width=f.fontMetrics().doubleRuleSep+"em",rs.push(Ci)),cs.separator==="|"||cs.separator===":"){var Bo=cs.separator==="|"?"solid":"dashed",Ws=Tt.makeSpan(["vertical-separator"],[],f);Ws.style.height=$r+"em",Ws.style.borderRightWidth=It+"em",Ws.style.borderRightStyle=Bo,Ws.style.margin="0 -"+It/2+"em",Ws.style.verticalAlign=-($r-Xi)+"em",rs.push(Ws)}else throw new g("Invalid separator type: "+cs.separator);Ss++,cs=us[Ss]||{},lo=!1}if(!(_>=De)){var Vs=void 0;(_>0||u.hskipBeforeAndAfter)&&(Vs=U.deflt(cs.pregap,an),Vs!==0&&(Ci=Tt.makeSpan(["arraycolsep"],[]),Ci.style.width=Vs+"em",rs.push(Ci)));var is=[];for(h=0;h<N;++h){var Gs=Be[h],sa=Gs[_];if(sa){var va=Gs.pos-Xi;sa.depth=Gs.depth,sa.height=Gs.height,is.push({type:"elem",elem:sa,shift:va})}}is=Tt.makeVList({positionType:"individualShift",children:is},f),is=Tt.makeSpan(["col-align-"+(cs.align||"c")],[is]),rs.push(is),(_<De-1||u.hskipBeforeAndAfter)&&(Vs=U.deflt(cs.postgap,an),Vs!==0&&(Ci=Tt.makeSpan(["arraycolsep"],[]),Ci.style.width=Vs+"em",rs.push(Ci)))}}if(Be=Tt.makeSpan(["mtable"],rs),dt.length>0){for(var Qi=Tt.makeLineSpan("hline",f,It),Fo=Tt.makeLineSpan("hdashline",f,It),ya=[{type:"elem",elem:Be,shift:0}];dt.length>0;){var Ba=dt.pop(),uo=Ba.pos-Xi;Ba.isDashed?ya.push({type:"elem",elem:Fo,shift:uo}):ya.push({type:"elem",elem:Qi,shift:uo})}Be=Tt.makeVList({positionType:"individualShift",children:ya},f)}return Tt.makeSpan(["mord"],[Be],f)},Js={c:"center ",l:"left ",r:"right "},qr=function(u,f){var h=new vn.MathNode("mtable",u.body.map(function($r){return new vn.MathNode("mtr",$r.map(function(fi){return new vn.MathNode("mtd",[hr(fi,f)])}))})),_=u.arraystretch===.5?.1:.16+u.arraystretch-1+(u.addJot?.09:0);h.setAttribute("rowspacing",_+"em");var N="",ee="";if(u.cols){var De=u.cols,Be="",dt=!1,It=0,Ut=De.length;De[0].type==="separator"&&(N+="top ",It=1),De[De.length-1].type==="separator"&&(N+="bottom ",Ut-=1);for(var an=It;an<Ut;an++)De[an].type==="align"?(ee+=Js[De[an].align],dt&&(Be+="none "),dt=!0):De[an].type==="separator"&&dt&&(Be+=De[an].separator==="|"?"solid ":"dashed ",dt=!1);h.setAttribute("columnalign",ee.trim()),/[sd]/.test(Be)&&h.setAttribute("columnlines",Be.trim())}if(u.colSeparationType==="align"){for(var Tn=u.cols||[],Pn="",Xn=1;Xn<Tn.length;Xn++)Pn+=Xn%2?"0em ":"1em ";h.setAttribute("columnspacing",Pn.trim())}else u.colSeparationType==="alignat"?h.setAttribute("columnspacing","0em"):u.colSeparationType==="small"?h.setAttribute("columnspacing","0.2778em"):h.setAttribute("columnspacing","1em");var br="",xr=u.hLinesBeforeRow;N+=xr[0].length>0?"left ":"",N+=xr[xr.length-1].length>0?"right ":"";for(var Pr=1;Pr<xr.length-1;Pr++)br+=xr[Pr].length===0?"none ":xr[Pr][0]?"dashed ":"solid ";return/[sd]/.test(br)&&h.setAttribute("rowlines",br.trim()),N!==""&&(h=new vn.MathNode("menclose",[h]),h.setAttribute("notation",N.trim())),u.arraystretch&&u.arraystretch<1&&(h=new vn.MathNode("mstyle",[h]),h.setAttribute("scriptlevel","1")),h},ei=function(u,f){var h=[],_=ji(u.parser,{cols:h,addJot:!0},"display"),N,ee=0,De={type:"ordgroup",mode:u.mode,body:[]},Be=Kn(f[0],"ordgroup");if(Be){for(var dt="",It=0;It<Be.body.length;It++){var Ut=Fn(Be.body[It],"textord");dt+=Ut.text}N=Number(dt),ee=N*2}var an=!ee;_.body.forEach(function(br){for(var xr=1;xr<br.length;xr+=2){var Pr=Fn(br[xr],"styling"),$r=Fn(Pr.body[0],"ordgroup");$r.body.unshift(De)}if(an)ee<br.length&&(ee=br.length);else{var fi=br.length/2;if(N<fi)throw new g("Too many math in a row: "+("expected "+N+", but got "+fi),br[0])}});for(var Tn=0;Tn<ee;++Tn){var Pn="r",Xn=0;Tn%2===1?Pn="l":Tn>0&&an&&(Xn=1),h[Tn]={type:"align",align:Pn,pregap:Xn,postgap:0}}return _.colSeparationType=an?"align":"alignat",_};Ii({type:"array",names:["array","darray"],props:{numArgs:1},handler:function(u,f){var h=Cr(f[0]),_=h?[f[0]]:Fn(f[0],"ordgroup").body,N=_.map(function(De){var Be=Or(De),dt=Be.text;if("lcr".indexOf(dt)!==-1)return{type:"align",align:dt};if(dt==="|")return{type:"separator",separator:"|"};if(dt===":")return{type:"separator",separator:":"};throw new g("Unknown column alignment: "+dt,De)}),ee={cols:N,hskipBeforeAndAfter:!0};return ji(u.parser,ee,ts(u.envName))},htmlBuilder:ns,mathmlBuilder:qr}),Ii({type:"array",names:["matrix","pmatrix","bmatrix","Bmatrix","vmatrix","Vmatrix"],props:{numArgs:0},handler:function(u){var f={matrix:null,pmatrix:["(",")"],bmatrix:["[","]"],Bmatrix:["\\{","\\}"],vmatrix:["|","|"],Vmatrix:["\\Vert","\\Vert"]}[u.envName],h={hskipBeforeAndAfter:!1},_=ji(u.parser,h,ts(u.envName));return f?{type:"leftright",mode:u.mode,body:[_],left:f[0],right:f[1],rightColor:void 0}:_},htmlBuilder:ns,mathmlBuilder:qr}),Ii({type:"array",names:["smallmatrix"],props:{numArgs:0},handler:function(u){var f={arraystretch:.5},h=ji(u.parser,f,"script");return h.colSeparationType="small",h},htmlBuilder:ns,mathmlBuilder:qr}),Ii({type:"array",names:["subarray"],props:{numArgs:1},handler:function(u,f){var h=Cr(f[0]),_=h?[f[0]]:Fn(f[0],"ordgroup").body,N=_.map(function(De){var Be=Or(De),dt=Be.text;if("lc".indexOf(dt)!==-1)return{type:"align",align:dt};throw new g("Unknown column alignment: "+dt,De)});if(N.length>1)throw new g("{subarray} can contain only one column");var ee={cols:N,hskipBeforeAndAfter:!1,arraystretch:.5};if(ee=ji(u.parser,ee,"script"),ee.body[0].length>1)throw new g("{subarray} can contain only one column");return ee},htmlBuilder:ns,mathmlBuilder:qr}),Ii({type:"array",names:["cases","dcases"],props:{numArgs:0},handler:function(u){var f={arraystretch:1.2,cols:[{type:"align",align:"l",pregap:0,postgap:1},{type:"align",align:"l",pregap:0,postgap:0}]},h=ji(u.parser,f,ts(u.envName));return{type:"leftright",mode:u.mode,body:[h],left:"\\{",right:".",rightColor:void 0}},htmlBuilder:ns,mathmlBuilder:qr}),Ii({type:"array",names:["aligned"],props:{numArgs:0},handler:ei,htmlBuilder:ns,mathmlBuilder:qr}),Ii({type:"array",names:["gathered"],props:{numArgs:0},handler:function(u){var f={cols:[{type:"align",align:"c"}],addJot:!0};return ji(u.parser,f,"display")},htmlBuilder:ns,mathmlBuilder:qr}),Ii({type:"array",names:["alignedat"],props:{numArgs:1},handler:ei,htmlBuilder:ns,mathmlBuilder:qr}),tn({type:"text",names:["\\hline","\\hdashline"],props:{numArgs:0,allowedInText:!0,allowedInMath:!0},handler:function(u,f){throw new g(u.funcName+" valid only within array environment")}});var ui=Ji,Oi=ui;tn({type:"environment",names:["\\begin","\\end"],props:{numArgs:1,argTypes:["text"]},handler:function(u,f){var h=u.parser,_=u.funcName,N=f[0];if(N.type!=="ordgroup")throw new g("Invalid environment name",N);for(var ee="",De=0;De<N.body.length;++De)ee+=Fn(N.body[De],"textord").text;if(_==="\\begin"){if(!Oi.hasOwnProperty(ee))throw new g("No such environment: "+ee,N);var Be=Oi[ee],dt=h.parseArguments("\\begin{"+ee+"}",Be),It=dt.args,Ut=dt.optArgs,an={mode:h.mode,envName:ee,parser:h},Tn=Be.handler(an,It,Ut);h.expect("\\end",!1);var Pn=h.nextToken,Xn=Fn(h.parseFunction(),"environment");if(Xn.name!==ee)throw new g("Mismatch: \\begin{"+ee+"} matched by \\end{"+Xn.name+"}",Pn);return Tn}return{type:"environment",mode:h.mode,name:ee,nameGroup:N}}});var Ni=Tt.makeSpan;function Rs(ne,u){var f=fr(ne.body,u,!0);return Ni([ne.mclass],f,u)}function Ls(ne,u){var f,h=oi(ne.body,u);return ne.mclass==="minner"?vn.newDocumentFragment(h):(ne.mclass==="mord"?ne.isCharacterBox?(f=h[0],f.type="mi"):f=new vn.MathNode("mi",h):(ne.isCharacterBox?(f=h[0],f.type="mo"):f=new vn.MathNode("mo",h),ne.mclass==="mbin"?(f.attributes.lspace="0.22em",f.attributes.rspace="0.22em"):ne.mclass==="mpunct"?(f.attributes.lspace="0em",f.attributes.rspace="0.17em"):(ne.mclass==="mopen"||ne.mclass==="mclose")&&(f.attributes.lspace="0em",f.attributes.rspace="0em")),f)}tn({type:"mclass",names:["\\mathord","\\mathbin","\\mathrel","\\mathopen","\\mathclose","\\mathpunct","\\mathinner"],props:{numArgs:1},handler:function(u,f){var h=u.parser,_=u.funcName,N=f[0];return{type:"mclass",mode:h.mode,mclass:"m"+_.substr(5),body:vr(N),isCharacterBox:U.isCharacterBox(N)}},htmlBuilder:Rs,mathmlBuilder:Ls});var ms=function(u){var f=u.type==="ordgroup"&&u.body.length?u.body[0]:u;return f.type==="atom"&&(f.family==="bin"||f.family==="rel")?"m"+f.family:"mord"};tn({type:"mclass",names:["\\@binrel"],props:{numArgs:2},handler:function(u,f){var h=u.parser;return{type:"mclass",mode:h.mode,mclass:ms(f[0]),body:[f[1]],isCharacterBox:U.isCharacterBox(f[1])}}}),tn({type:"mclass",names:["\\stackrel","\\overset","\\underset"],props:{numArgs:2},handler:function(u,f){var h=u.parser,_=u.funcName,N=f[1],ee=f[0],De;_!=="\\stackrel"?De=ms(N):De="mrel";var Be={type:"op",mode:N.mode,limits:!0,alwaysHandleSupSub:!0,parentIsSupSub:!1,symbol:!1,suppressBaseShift:_!=="\\stackrel",body:vr(N)},dt={type:"supsub",mode:ee.mode,base:Be,sup:_==="\\underset"?null:ee,sub:_==="\\underset"?ee:null};return{type:"mclass",mode:h.mode,mclass:De,body:[dt],isCharacterBox:U.isCharacterBox(dt)}},htmlBuilder:Rs,mathmlBuilder:Ls});var qs=function(u,f){var h=u.font,_=f.withFont(h);return Qn(u.body,_)},Fs=function(u,f){var h=u.font,_=f.withFont(h);return hr(u.body,_)},ps={"\\Bbb":"\\mathbb","\\bold":"\\mathbf","\\frak":"\\mathfrak","\\bm":"\\boldsymbol"};tn({type:"font",names:["\\mathrm","\\mathit","\\mathbf","\\mathnormal","\\mathbb","\\mathcal","\\mathfrak","\\mathscr","\\mathsf","\\mathtt","\\Bbb","\\bold","\\frak"],props:{numArgs:1,greediness:2},handler:function(u,f){var h=u.parser,_=u.funcName,N=f[0],ee=_;return ee in ps&&(ee=ps[ee]),{type:"font",mode:h.mode,font:ee.slice(1),body:N}},htmlBuilder:qs,mathmlBuilder:Fs}),tn({type:"mclass",names:["\\boldsymbol","\\bm"],props:{numArgs:1,greediness:2},handler:function(u,f){var h=u.parser,_=f[0],N=U.isCharacterBox(_);return{type:"mclass",mode:h.mode,mclass:ms(_),body:[{type:"font",mode:h.mode,font:"boldsymbol",body:_}],isCharacterBox:N}}}),tn({type:"font",names:["\\rm","\\sf","\\tt","\\bf","\\it"],props:{numArgs:0,allowedInText:!0},handler:function(u,f){var h=u.parser,_=u.funcName,N=u.breakOnTokenText,ee=h.mode,De=h.parseExpression(!0,N),Be="math"+_.slice(1);return{type:"font",mode:ee,font:Be,body:{type:"ordgroup",mode:h.mode,body:De}}},htmlBuilder:qs,mathmlBuilder:Fs});var $s=function(u,f){var h=f;return u==="display"?h=h.id>=x.SCRIPT.id?h.text():x.DISPLAY:u==="text"&&h.size===x.DISPLAY.size?h=x.TEXT:u==="script"?h=x.SCRIPT:u==="scriptscript"&&(h=x.SCRIPTSCRIPT),h},Us=function(u,f){var h=$s(u.size,f.style),_=h.fracNum(),N=h.fracDen(),ee;ee=f.havingStyle(_);var De=Qn(u.numer,ee,f);if(u.continued){var Be=8.5/f.fontMetrics().ptPerEm,dt=3.5/f.fontMetrics().ptPerEm;De.height=De.height<Be?Be:De.height,De.depth=De.depth<dt?dt:De.depth}ee=f.havingStyle(N);var It=Qn(u.denom,ee,f),Ut,an,Tn;u.hasBarLine?(u.barSize?(an=Ye(u.barSize,f),Ut=Tt.makeLineSpan("frac-line",f,an)):Ut=Tt.makeLineSpan("frac-line",f),an=Ut.height,Tn=Ut.height):(Ut=null,an=0,Tn=f.fontMetrics().defaultRuleThickness);var Pn,Xn,br;h.size===x.DISPLAY.size||u.size==="display"?(Pn=f.fontMetrics().num1,an>0?Xn=3*Tn:Xn=7*Tn,br=f.fontMetrics().denom1):(an>0?(Pn=f.fontMetrics().num2,Xn=Tn):(Pn=f.fontMetrics().num3,Xn=3*Tn),br=f.fontMetrics().denom2);var xr;if(Ut){var $r=f.fontMetrics().axisHeight;Pn-De.depth-($r+.5*an)<Xn&&(Pn+=Xn-(Pn-De.depth-($r+.5*an))),$r-.5*an-(It.height-br)<Xn&&(br+=Xn-($r-.5*an-(It.height-br)));var fi=-($r-.5*an);xr=Tt.makeVList({positionType:"individualShift",children:[{type:"elem",elem:It,shift:br},{type:"elem",elem:Ut,shift:fi},{type:"elem",elem:De,shift:-Pn}]},f)}else{var Pr=Pn-De.depth-(It.height-br);Pr<Xn&&(Pn+=.5*(Xn-Pr),br+=.5*(Xn-Pr)),xr=Tt.makeVList({positionType:"individualShift",children:[{type:"elem",elem:It,shift:br},{type:"elem",elem:De,shift:-Pn}]},f)}ee=f.havingStyle(h),xr.height*=ee.sizeMultiplier/f.sizeMultiplier,xr.depth*=ee.sizeMultiplier/f.sizeMultiplier;var si;h.size===x.DISPLAY.size?si=f.fontMetrics().delim1:si=f.fontMetrics().delim2;var hi,mi;return u.leftDelim==null?hi=Rr(f,["mopen"]):hi=Ir.customSizedDelim(u.leftDelim,si,!0,f.havingStyle(h),u.mode,["mopen"]),u.continued?mi=Tt.makeSpan([]):u.rightDelim==null?mi=Rr(f,["mclose"]):mi=Ir.customSizedDelim(u.rightDelim,si,!0,f.havingStyle(h),u.mode,["mclose"]),Tt.makeSpan(["mord"].concat(ee.sizingClasses(f)),[hi,Tt.makeSpan(["mfrac"],[xr]),mi],f)},zs=function(u,f){var h=new vn.MathNode("mfrac",[hr(u.numer,f),hr(u.denom,f)]);if(!u.hasBarLine)h.setAttribute("linethickness","0px");else if(u.barSize){var _=Ye(u.barSize,f);h.setAttribute("linethickness",_+"em")}var N=$s(u.size,f.style);if(N.size!==f.style.size){h=new vn.MathNode("mstyle",[h]);var ee=N.size===x.DISPLAY.size?"true":"false";h.setAttribute("displaystyle",ee),h.setAttribute("scriptlevel","0")}if(u.leftDelim!=null||u.rightDelim!=null){var De=[];if(u.leftDelim!=null){var Be=new vn.MathNode("mo",[new vn.TextNode(u.leftDelim.replace("\\",""))]);Be.setAttribute("fence","true"),De.push(Be)}if(De.push(h),u.rightDelim!=null){var dt=new vn.MathNode("mo",[new vn.TextNode(u.rightDelim.replace("\\",""))]);dt.setAttribute("fence","true"),De.push(dt)}return yi(De)}return h};tn({type:"genfrac",names:["\\cfrac","\\dfrac","\\frac","\\tfrac","\\dbinom","\\binom","\\tbinom","\\\\atopfrac","\\\\bracefrac","\\\\brackfrac"],props:{numArgs:2,greediness:2},handler:function(u,f){var h=u.parser,_=u.funcName,N=f[0],ee=f[1],De,Be=null,dt=null,It="auto";switch(_){case"\\cfrac":case"\\dfrac":case"\\frac":case"\\tfrac":De=!0;break;case"\\\\atopfrac":De=!1;break;case"\\dbinom":case"\\binom":case"\\tbinom":De=!1,Be="(",dt=")";break;case"\\\\bracefrac":De=!1,Be="\\{",dt="\\}";break;case"\\\\brackfrac":De=!1,Be="[",dt="]";break;default:throw new Error("Unrecognized genfrac command")}switch(_){case"\\cfrac":case"\\dfrac":case"\\dbinom":It="display";break;case"\\tfrac":case"\\tbinom":It="text";break}return{type:"genfrac",mode:h.mode,continued:_==="\\cfrac",numer:N,denom:ee,hasBarLine:De,leftDelim:Be,rightDelim:dt,size:It,barSize:null}},htmlBuilder:Us,mathmlBuilder:zs}),tn({type:"infix",names:["\\over","\\choose","\\atop","\\brace","\\brack"],props:{numArgs:0,infix:!0},handler:function(u){var f=u.parser,h=u.funcName,_=u.token,N;switch(h){case"\\over":N="\\frac";break;case"\\choose":N="\\binom";break;case"\\atop":N="\\\\atopfrac";break;case"\\brace":N="\\\\bracefrac";break;case"\\brack":N="\\\\brackfrac";break;default:throw new Error("Unrecognized infix genfrac command")}return{type:"infix",mode:f.mode,replaceWith:N,token:_}}});var Bi=["display","text","script","scriptscript"],Ki=function(u){var f=null;return u.length>0&&(f=u,f=f==="."?null:f),f};tn({type:"genfrac",names:["\\genfrac"],props:{numArgs:6,greediness:6,argTypes:["math","math","size","text","math","math"]},handler:function(u,f){var h=u.parser,_=f[4],N=f[5],ee=Kn(f[0],"atom");ee&&(ee=Dr(f[0],"open"));var De=ee?Ki(ee.text):null,Be=Kn(f[1],"atom");Be&&(Be=Dr(f[1],"close"));var dt=Be?Ki(Be.text):null,It=Fn(f[2],"size"),Ut,an=null;It.isBlank?Ut=!0:(an=It.value,Ut=an.number>0);var Tn="auto",Pn=Kn(f[3],"ordgroup");if(Pn){if(Pn.body.length>0){var Xn=Fn(Pn.body[0],"textord");Tn=Bi[Number(Xn.text)]}}else Pn=Fn(f[3],"textord"),Tn=Bi[Number(Pn.text)];return{type:"genfrac",mode:h.mode,numer:_,denom:N,continued:!1,hasBarLine:Ut,barSize:an,leftDelim:De,rightDelim:dt,size:Tn}},htmlBuilder:Us,mathmlBuilder:zs}),tn({type:"infix",names:["\\above"],props:{numArgs:1,argTypes:["size"],infix:!0},handler:function(u,f){var h=u.parser,_=u.funcName,N=u.token;return{type:"infix",mode:h.mode,replaceWith:"\\\\abovefrac",size:Fn(f[0],"size").value,token:N}}}),tn({type:"genfrac",names:["\\\\abovefrac"],props:{numArgs:3,argTypes:["math","size","math"]},handler:function(u,f){var h=u.parser,_=u.funcName,N=f[0],ee=j(Fn(f[1],"infix").size),De=f[2],Be=ee.number>0;return{type:"genfrac",mode:h.mode,numer:N,denom:De,continued:!1,hasBarLine:Be,barSize:ee,leftDelim:null,rightDelim:null,size:"auto"}},htmlBuilder:Us,mathmlBuilder:zs});var Ha=function(u,f){var h=f.style,_,N,ee=Kn(u,"supsub");ee?(_=ee.sup?Qn(ee.sup,f.havingStyle(h.sup()),f):Qn(ee.sub,f.havingStyle(h.sub()),f),N=Fn(ee.base,"horizBrace")):N=Fn(u,"horizBrace");var De=Qn(N.base,f.havingBaseStyle(x.DISPLAY)),Be=Wr.svgSpan(N,f),dt;if(N.isOver?(dt=Tt.makeVList({positionType:"firstBaseline",children:[{type:"elem",elem:De},{type:"kern",size:.1},{type:"elem",elem:Be}]},f),dt.children[0].children[0].children[1].classes.push("svg-align")):(dt=Tt.makeVList({positionType:"bottom",positionData:De.depth+.1+Be.height,children:[{type:"elem",elem:Be},{type:"kern",size:.1},{type:"elem",elem:De}]},f),dt.children[0].children[0].children[0].classes.push("svg-align")),_){var It=Tt.makeSpan(["mord",N.isOver?"mover":"munder"],[dt],f);N.isOver?dt=Tt.makeVList({positionType:"firstBaseline",children:[{type:"elem",elem:It},{type:"kern",size:.2},{type:"elem",elem:_}]},f):dt=Tt.makeVList({positionType:"bottom",positionData:It.depth+.2+_.height+_.depth,children:[{type:"elem",elem:_},{type:"kern",size:.2},{type:"elem",elem:It}]},f)}return Tt.makeSpan(["mord",N.isOver?"mover":"munder"],[dt],f)},hn=function(u,f){var h=Wr.mathMLnode(u.label);return new vn.MathNode(u.isOver?"mover":"munder",[hr(u.base,f),h])};tn({type:"horizBrace",names:["\\overbrace","\\underbrace"],props:{numArgs:1},handler:function(u,f){var h=u.parser,_=u.funcName;return{type:"horizBrace",mode:h.mode,label:_,isOver:/^\\over/.test(_),base:f[0]}},htmlBuilder:Ha,mathmlBuilder:hn}),tn({type:"href",names:["\\href"],props:{numArgs:2,argTypes:["url","original"],allowedInText:!0},handler:function(u,f){var h=u.parser,_=f[1],N=Fn(f[0],"url").url;return h.settings.isTrusted({command:"\\href",url:N})?{type:"href",mode:h.mode,href:N,body:vr(_)}:h.formatUnsupportedCmd("\\href")},htmlBuilder:function(u,f){var h=fr(u.body,f,!1);return Tt.makeAnchor(u.href,[],h,f)},mathmlBuilder:function(u,f){var h=pi(u.body,f);return h instanceof Ur||(h=new Ur("mrow",[h])),h.setAttribute("href",u.href),h}}),tn({type:"href",names:["\\url"],props:{numArgs:1,argTypes:["url"],allowedInText:!0},handler:function(u,f){var h=u.parser,_=Fn(f[0],"url").url;if(!h.settings.isTrusted({command:"\\url",url:_}))return h.formatUnsupportedCmd("\\url");for(var N=[],ee=0;ee<_.length;ee++){var De=_[ee];De==="~"&&(De="\\textasciitilde"),N.push({type:"textord",mode:"text",text:De})}var Be={type:"text",mode:h.mode,font:"\\texttt",body:N};return{type:"href",mode:h.mode,href:_,body:vr(Be)}}}),tn({type:"htmlmathml",names:["\\html@mathml"],props:{numArgs:2,allowedInText:!0},handler:function(u,f){var h=u.parser;return{type:"htmlmathml",mode:h.mode,html:vr(f[0]),mathml:vr(f[1])}},htmlBuilder:function(u,f){var h=fr(u.html,f,!1);return Tt.makeFragment(h)},mathmlBuilder:function(u,f){return pi(u.mathml,f)}});var ea=function(u){if(/^[-+]? *(\d+(\.\d*)?|\.\d+)$/.test(u))return{number:+u,unit:"bp"};var f=/([-+]?) *(\d+(?:\.\d*)?|\.\d+) *([a-z]{2})/.exec(u);if(!f)throw new g("Invalid size: '"+u+"' in \\includegraphics");var h={number:+(f[1]+f[2]),unit:f[3]};if(!qt(h))throw new g("Invalid unit: '"+h.unit+"' in \\includegraphics.");return h};tn({type:"includegraphics",names:["\\includegraphics"],props:{numArgs:1,numOptionalArgs:1,argTypes:["raw","url"],allowedInText:!1},handler:function(u,f,h){var _=u.parser,N={number:0,unit:"em"},ee={number:.9,unit:"em"},De={number:0,unit:"em"},Be="";if(h[0])for(var dt=Fn(h[0],"raw").string,It=dt.split(","),Ut=0;Ut<It.length;Ut++){var an=It[Ut].split("=");if(an.length===2){var Tn=an[1].trim();switch(an[0].trim()){case"alt":Be=Tn;break;case"width":N=ea(Tn);break;case"height":ee=ea(Tn);break;case"totalheight":De=ea(Tn);break;default:throw new g("Invalid key: '"+an[0]+"' in \\includegraphics.")}}}var Pn=Fn(f[0],"url").url;return Be===""&&(Be=Pn,Be=Be.replace(/^.*[\\/]/,""),Be=Be.substring(0,Be.lastIndexOf("."))),_.settings.isTrusted({command:"\\includegraphics",url:Pn})?{type:"includegraphics",mode:_.mode,alt:Be,width:N,height:ee,totalheight:De,src:Pn}:_.formatUnsupportedCmd("\\includegraphics")},htmlBuilder:function(u,f){var h=Ye(u.height,f),_=0;u.totalheight.number>0&&(_=Ye(u.totalheight,f)-h,_=Number(_.toFixed(2)));var N=0;u.width.number>0&&(N=Ye(u.width,f));var ee={height:h+_+"em"};N>0&&(ee.width=N+"em"),_>0&&(ee.verticalAlign=-_+"em");var De=new B(u.src,u.alt,ee);return De.height=h,De.depth=_,De},mathmlBuilder:function(u,f){var h=new vn.MathNode("mglyph",[]);h.setAttribute("alt",u.alt);var _=Ye(u.height,f),N=0;if(u.totalheight.number>0&&(N=Ye(u.totalheight,f)-_,N=N.toFixed(2),h.setAttribute("valign","-"+N+"em")),h.setAttribute("height",_+N+"em"),u.width.number>0){var ee=Ye(u.width,f);h.setAttribute("width",ee+"em")}return h.setAttribute("src",u.src),h}}),tn({type:"kern",names:["\\kern","\\mkern","\\hskip","\\mskip"],props:{numArgs:1,argTypes:["size"],allowedInText:!0},handler:function(u,f){var h=u.parser,_=u.funcName,N=Fn(f[0],"size");if(h.settings.strict){var ee=_[1]==="m",De=N.value.unit==="mu";ee?(De||h.settings.reportNonstrict("mathVsTextUnits","LaTeX's "+_+" supports only mu units, "+("not "+N.value.unit+" units")),h.mode!=="math"&&h.settings.reportNonstrict("mathVsTextUnits","LaTeX's "+_+" works only in math mode")):De&&h.settings.reportNonstrict("mathVsTextUnits","LaTeX's "+_+" doesn't support mu units")}return{type:"kern",mode:h.mode,dimension:N.value}},htmlBuilder:function(u,f){return Tt.makeGlue(u.dimension,f)},mathmlBuilder:function(u,f){var h=Ye(u.dimension,f);return new vn.SpaceNode(h)}}),tn({type:"lap",names:["\\mathllap","\\mathrlap","\\mathclap"],props:{numArgs:1,allowedInText:!0},handler:function(u,f){var h=u.parser,_=u.funcName,N=f[0];return{type:"lap",mode:h.mode,alignment:_.slice(5),body:N}},htmlBuilder:function(u,f){var h;u.alignment==="clap"?(h=Tt.makeSpan([],[Qn(u.body,f)]),h=Tt.makeSpan(["inner"],[h],f)):h=Tt.makeSpan(["inner"],[Qn(u.body,f)]);var _=Tt.makeSpan(["fix"],[]),N=Tt.makeSpan([u.alignment],[h,_],f),ee=Tt.makeSpan(["strut"]);return ee.style.height=N.height+N.depth+"em",ee.style.verticalAlign=-N.depth+"em",N.children.unshift(ee),N=Tt.makeVList({positionType:"firstBaseline",children:[{type:"elem",elem:N}]},f),Tt.makeSpan(["mord"],[N],f)},mathmlBuilder:function(u,f){var h=new vn.MathNode("mpadded",[hr(u.body,f)]);if(u.alignment!=="rlap"){var _=u.alignment==="llap"?"-1":"-0.5";h.setAttribute("lspace",_+"width")}return h.setAttribute("width","0px"),h}}),tn({type:"styling",names:["\\(","$"],props:{numArgs:0,allowedInText:!0,allowedInMath:!1},handler:function(u,f){var h=u.funcName,_=u.parser,N=_.mode;_.switchMode("math");var ee=h==="\\("?"\\)":"$",De=_.parseExpression(!1,ee);return _.expect(ee),_.switchMode(N),{type:"styling",mode:_.mode,style:"text",body:De}}}),tn({type:"text",names:["\\)","\\]"],props:{numArgs:0,allowedInText:!0,allowedInMath:!1},handler:function(u,f){throw new g("Mismatched "+u.funcName)}});var Ca=function(u,f){switch(f.style.size){case x.DISPLAY.size:return u.display;case x.TEXT.size:return u.text;case x.SCRIPT.size:return u.script;case x.SCRIPTSCRIPT.size:return u.scriptscript;default:return u.text}};tn({type:"mathchoice",names:["\\mathchoice"],props:{numArgs:4},handler:function(u,f){var h=u.parser;return{type:"mathchoice",mode:h.mode,display:vr(f[0]),text:vr(f[1]),script:vr(f[2]),scriptscript:vr(f[3])}},htmlBuilder:function(u,f){var h=Ca(u,f),_=fr(h,f,!1);return Tt.makeFragment(_)},mathmlBuilder:function(u,f){var h=Ca(u,f);return pi(h,f)}});var Ta=function(u,f,h,_,N,ee,De){u=Tt.makeSpan([],[u]);var Be,dt;if(f){var It=Qn(f,_.havingStyle(N.sup()),_);dt={elem:It,kern:Math.max(_.fontMetrics().bigOpSpacing1,_.fontMetrics().bigOpSpacing3-It.depth)}}if(h){var Ut=Qn(h,_.havingStyle(N.sub()),_);Be={elem:Ut,kern:Math.max(_.fontMetrics().bigOpSpacing2,_.fontMetrics().bigOpSpacing4-Ut.height)}}var an;if(dt&&Be){var Tn=_.fontMetrics().bigOpSpacing5+Be.elem.height+Be.elem.depth+Be.kern+u.depth+De;an=Tt.makeVList({positionType:"bottom",positionData:Tn,children:[{type:"kern",size:_.fontMetrics().bigOpSpacing5},{type:"elem",elem:Be.elem,marginLeft:-ee+"em"},{type:"kern",size:Be.kern},{type:"elem",elem:u},{type:"kern",size:dt.kern},{type:"elem",elem:dt.elem,marginLeft:ee+"em"},{type:"kern",size:_.fontMetrics().bigOpSpacing5}]},_)}else if(Be){var Pn=u.height-De;an=Tt.makeVList({positionType:"top",positionData:Pn,children:[{type:"kern",size:_.fontMetrics().bigOpSpacing5},{type:"elem",elem:Be.elem,marginLeft:-ee+"em"},{type:"kern",size:Be.kern},{type:"elem",elem:u}]},_)}else if(dt){var Xn=u.depth+De;an=Tt.makeVList({positionType:"bottom",positionData:Xn,children:[{type:"elem",elem:u},{type:"kern",size:dt.kern},{type:"elem",elem:dt.elem,marginLeft:ee+"em"},{type:"kern",size:_.fontMetrics().bigOpSpacing5}]},_)}else return u;return Tt.makeSpan(["mop","op-limits"],[an],_)},ja=["\\smallint"],Es=function(u,f){var h,_,N=!1,ee,De=Kn(u,"supsub");De?(h=De.sup,_=De.sub,ee=Fn(De.base,"op"),N=!0):ee=Fn(u,"op");var Be=f.style,dt=!1;Be.size===x.DISPLAY.size&&ee.symbol&&!U.contains(ja,ee.name)&&(dt=!0);var It;if(ee.symbol){var Ut=dt?"Size2-Regular":"Size1-Regular",an="";if((ee.name==="\\oiint"||ee.name==="\\oiiint")&&(an=ee.name.substr(1),ee.name=an==="oiint"?"\\iint":"\\iiint"),It=Tt.makeSymbol(ee.name,Ut,"math",f,["mop","op-symbol",dt?"large-op":"small-op"]),an.length>0){var Tn=It.italic,Pn=Tt.staticSvg(an+"Size"+(dt?"2":"1"),f);It=Tt.makeVList({positionType:"individualShift",children:[{type:"elem",elem:It,shift:0},{type:"elem",elem:Pn,shift:dt?.08:0}]},f),ee.name="\\"+an,It.classes.unshift("mop"),It.italic=Tn}}else if(ee.body){var Xn=fr(ee.body,f,!0);Xn.length===1&&Xn[0]instanceof ce?(It=Xn[0],It.classes[0]="mop"):It=Tt.makeSpan(["mop"],Tt.tryCombineChars(Xn),f)}else{for(var br=[],xr=1;xr<ee.name.length;xr++)br.push(Tt.mathsym(ee.name[xr],ee.mode,f));It=Tt.makeSpan(["mop"],br,f)}var Pr=0,$r=0;return(It instanceof ce||ee.name==="\\oiint"||ee.name==="\\oiiint")&&!ee.suppressBaseShift&&(Pr=(It.height-It.depth)/2-f.fontMetrics().axisHeight,$r=It.italic),N?Ta(It,h,_,f,Be,$r,Pr):(Pr&&(It.style.position="relative",It.style.top=Pr+"em"),It)},Ks=function(u,f){var h;if(u.symbol)h=new Ur("mo",[ni(u.name,u.mode)]),U.contains(ja,u.name)&&h.setAttribute("largeop","false");else if(u.body)h=new Ur("mo",oi(u.body,f));else{h=new Ur("mi",[new Jn(u.name.slice(1))]);var _=new Ur("mo",[ni("\u2061","text")]);u.parentIsSupSub?h=new Ur("mo",[h,_]):h=Gr([h,_])}return h},To={"\u220F":"\\prod","\u2210":"\\coprod","\u2211":"\\sum","\u22C0":"\\bigwedge","\u22C1":"\\bigvee","\u22C2":"\\bigcap","\u22C3":"\\bigcup","\u2A00":"\\bigodot","\u2A01":"\\bigoplus","\u2A02":"\\bigotimes","\u2A04":"\\biguplus","\u2A06":"\\bigsqcup"};tn({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,f){var h=u.parser,_=u.funcName,N=_;return N.length===1&&(N=To[N]),{type:"op",mode:h.mode,limits:!0,parentIsSupSub:!1,symbol:!0,name:N}},htmlBuilder:Es,mathmlBuilder:Ks}),tn({type:"op",names:["\\mathop"],props:{numArgs:1},handler:function(u,f){var h=u.parser,_=f[0];return{type:"op",mode:h.mode,limits:!1,parentIsSupSub:!1,symbol:!1,body:vr(_)}},htmlBuilder:Es,mathmlBuilder:Ks});var Ao={"\u222B":"\\int","\u222C":"\\iint","\u222D":"\\iiint","\u222E":"\\oint","\u222F":"\\oiint","\u2230":"\\oiiint"};tn({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 f=u.parser,h=u.funcName;return{type:"op",mode:f.mode,limits:!1,parentIsSupSub:!1,symbol:!1,name:h}},htmlBuilder:Es,mathmlBuilder:Ks}),tn({type:"op",names:["\\det","\\gcd","\\inf","\\lim","\\max","\\min","\\Pr","\\sup"],props:{numArgs:0},handler:function(u){var f=u.parser,h=u.funcName;return{type:"op",mode:f.mode,limits:!0,parentIsSupSub:!1,symbol:!1,name:h}},htmlBuilder:Es,mathmlBuilder:Ks}),tn({type:"op",names:["\\int","\\iint","\\iiint","\\oint","\\oiint","\\oiiint","\u222B","\u222C","\u222D","\u222E","\u222F","\u2230"],props:{numArgs:0},handler:function(u){var f=u.parser,h=u.funcName,_=h;return _.length===1&&(_=Ao[_]),{type:"op",mode:f.mode,limits:!1,parentIsSupSub:!1,symbol:!0,name:_}},htmlBuilder:Es,mathmlBuilder:Ks});var fa=function(u,f){var h,_,N=!1,ee,De=Kn(u,"supsub");De?(h=De.sup,_=De.sub,ee=Fn(De.base,"operatorname"),N=!0):ee=Fn(u,"operatorname");var Be;if(ee.body.length>0){for(var dt=ee.body.map(function(Tn){var Pn=Tn.text;return typeof Pn=="string"?{type:"textord",mode:Tn.mode,text:Pn}:Tn}),It=fr(dt,f.withFont("mathrm"),!0),Ut=0;Ut<It.length;Ut++){var an=It[Ut];an instanceof ce&&(an.text=an.text.replace(/\u2212/,"-").replace(/\u2217/,"*"))}Be=Tt.makeSpan(["mop"],It,f)}else Be=Tt.makeSpan(["mop"],[],f);return N?Ta(Be,h,_,f,f.style,0,0):Be},ta=function(u,f){for(var h=oi(u.body,f.withFont("mathrm")),_=!0,N=0;N<h.length;N++){var ee=h[N];if(!(ee instanceof vn.SpaceNode))if(ee instanceof vn.MathNode)switch(ee.type){case"mi":case"mn":case"ms":case"mspace":case"mtext":break;case"mo":{var De=ee.children[0];ee.children.length===1&&De instanceof vn.TextNode?De.text=De.text.replace(/\u2212/,"-").replace(/\u2217/,"*"):_=!1;break}default:_=!1}else _=!1}if(_){var Be=h.map(function(Ut){return Ut.toText()}).join("");h=[new vn.TextNode(Be)]}var dt=new vn.MathNode("mi",h);dt.setAttribute("mathvariant","normal");var It=new vn.MathNode("mo",[ni("\u2061","text")]);return u.parentIsSupSub?new vn.MathNode("mo",[dt,It]):vn.newDocumentFragment([dt,It])};tn({type:"operatorname",names:["\\operatorname","\\operatorname*"],props:{numArgs:1},handler:function(u,f){var h=u.parser,_=u.funcName,N=f[0];return{type:"operatorname",mode:h.mode,body:vr(N),alwaysHandleSupSub:_==="\\operatorname*",limits:!1,parentIsSupSub:!1}},htmlBuilder:fa,mathmlBuilder:ta}),Yn({type:"ordgroup",htmlBuilder:function(u,f){return u.semisimple?Tt.makeFragment(fr(u.body,f,!1)):Tt.makeSpan(["mord"],fr(u.body,f,!0),f)},mathmlBuilder:function(u,f){return pi(u.body,f,!0)}}),tn({type:"overline",names:["\\overline"],props:{numArgs:1},handler:function(u,f){var h=u.parser,_=f[0];return{type:"overline",mode:h.mode,body:_}},htmlBuilder:function(u,f){var h=Qn(u.body,f.havingCrampedStyle()),_=Tt.makeLineSpan("overline-line",f),N=f.fontMetrics().defaultRuleThickness,ee=Tt.makeVList({positionType:"firstBaseline",children:[{type:"elem",elem:h},{type:"kern",size:3*N},{type:"elem",elem:_},{type:"kern",size:N}]},f);return Tt.makeSpan(["mord","overline"],[ee],f)},mathmlBuilder:function(u,f){var h=new vn.MathNode("mo",[new vn.TextNode("\u203E")]);h.setAttribute("stretchy","true");var _=new vn.MathNode("mover",[hr(u.body,f),h]);return _.setAttribute("accent","true"),_}}),tn({type:"phantom",names:["\\phantom"],props:{numArgs:1,allowedInText:!0},handler:function(u,f){var h=u.parser,_=f[0];return{type:"phantom",mode:h.mode,body:vr(_)}},htmlBuilder:function(u,f){var h=fr(u.body,f.withPhantom(),!1);return Tt.makeFragment(h)},mathmlBuilder:function(u,f){var h=oi(u.body,f);return new vn.MathNode("mphantom",h)}}),tn({type:"hphantom",names:["\\hphantom"],props:{numArgs:1,allowedInText:!0},handler:function(u,f){var h=u.parser,_=f[0];return{type:"hphantom",mode:h.mode,body:_}},htmlBuilder:function(u,f){var h=Tt.makeSpan([],[Qn(u.body,f.withPhantom())]);if(h.height=0,h.depth=0,h.children)for(var _=0;_<h.children.length;_++)h.children[_].height=0,h.children[_].depth=0;return h=Tt.makeVList({positionType:"firstBaseline",children:[{type:"elem",elem:h}]},f),Tt.makeSpan(["mord"],[h],f)},mathmlBuilder:function(u,f){var h=oi(vr(u.body),f),_=new vn.MathNode("mphantom",h),N=new vn.MathNode("mpadded",[_]);return N.setAttribute("height","0px"),N.setAttribute("depth","0px"),N}}),tn({type:"vphantom",names:["\\vphantom"],props:{numArgs:1,allowedInText:!0},handler:function(u,f){var h=u.parser,_=f[0];return{type:"vphantom",mode:h.mode,body:_}},htmlBuilder:function(u,f){var h=Tt.makeSpan(["inner"],[Qn(u.body,f.withPhantom())]),_=Tt.makeSpan(["fix"],[]);return Tt.makeSpan(["mord","rlap"],[h,_],f)},mathmlBuilder:function(u,f){var h=oi(vr(u.body),f),_=new vn.MathNode("mphantom",h),N=new vn.MathNode("mpadded",[_]);return N.setAttribute("width","0px"),N}}),tn({type:"raisebox",names:["\\raisebox"],props:{numArgs:2,argTypes:["size","hbox"],allowedInText:!0},handler:function(u,f){var h=u.parser,_=Fn(f[0],"size").value,N=f[1];return{type:"raisebox",mode:h.mode,dy:_,body:N}},htmlBuilder:function(u,f){var h=Qn(u.body,f),_=Ye(u.dy,f);return Tt.makeVList({positionType:"shift",positionData:-_,children:[{type:"elem",elem:h}]},f)},mathmlBuilder:function(u,f){var h=new vn.MathNode("mpadded",[hr(u.body,f)]),_=u.dy.number+u.dy.unit;return h.setAttribute("voffset",_),h}}),tn({type:"rule",names:["\\rule"],props:{numArgs:2,numOptionalArgs:1,argTypes:["size","size","size"]},handler:function(u,f,h){var _=u.parser,N=h[0],ee=Fn(f[0],"size"),De=Fn(f[1],"size");return{type:"rule",mode:_.mode,shift:N&&Fn(N,"size").value,width:ee.value,height:De.value}},htmlBuilder:function(u,f){var h=Tt.makeSpan(["mord","rule"],[],f),_=Ye(u.width,f),N=Ye(u.height,f),ee=u.shift?Ye(u.shift,f):0;return h.style.borderRightWidth=_+"em",h.style.borderTopWidth=N+"em",h.style.bottom=ee+"em",h.width=_,h.height=N+ee,h.depth=-ee,h.maxFontSize=N*1.125*f.sizeMultiplier,h},mathmlBuilder:function(u,f){var h=Ye(u.width,f),_=Ye(u.height,f),N=u.shift?Ye(u.shift,f):0,ee=f.color&&f.getColor()||"black",De=new vn.MathNode("mspace");De.setAttribute("mathbackground",ee),De.setAttribute("width",h+"em"),De.setAttribute("height",_+"em");var Be=new vn.MathNode("mpadded",[De]);return N>=0?Be.setAttribute("height","+"+N+"em"):(Be.setAttribute("height",N+"em"),Be.setAttribute("depth","+"+-N+"em")),Be.setAttribute("voffset",N+"em"),Be}});function Os(ne,u,f){for(var h=fr(ne,u,!1),_=u.sizeMultiplier/f.sizeMultiplier,N=0;N<h.length;N++){var ee=h[N].classes.indexOf("sizing");ee<0?Array.prototype.push.apply(h[N].classes,u.sizingClasses(f)):h[N].classes[ee+1]==="reset-size"+u.size&&(h[N].classes[ee+1]="reset-size"+f.size),h[N].height*=_,h[N].depth*=_}return Tt.makeFragment(h)}var Za=["\\tiny","\\sixptsize","\\scriptsize","\\footnotesize","\\small","\\normalsize","\\large","\\Large","\\LARGE","\\huge","\\Huge"],Do=function(u,f){var h=f.havingSize(u.size);return Os(u.body,h,f)};tn({type:"sizing",names:Za,props:{numArgs:0,allowedInText:!0},handler:function(u,f){var h=u.breakOnTokenText,_=u.funcName,N=u.parser,ee=N.parseExpression(!1,h);return{type:"sizing",mode:N.mode,size:Za.indexOf(_)+1,body:ee}},htmlBuilder:Do,mathmlBuilder:function(u,f){var h=f.havingSize(u.size),_=oi(u.body,h),N=new vn.MathNode("mstyle",_);return N.setAttribute("mathsize",h.sizeMultiplier+"em"),N}}),tn({type:"smash",names:["\\smash"],props:{numArgs:1,numOptionalArgs:1,allowedInText:!0},handler:function(u,f,h){var _=u.parser,N=!1,ee=!1,De=h[0]&&Fn(h[0],"ordgroup");if(De)for(var Be="",dt=0;dt<De.body.length;++dt){var It=De.body[dt];if(Be=It.text,Be==="t")N=!0;else if(Be==="b")ee=!0;else{N=!1,ee=!1;break}}else N=!0,ee=!0;var Ut=f[0];return{type:"smash",mode:_.mode,body:Ut,smashHeight:N,smashDepth:ee}},htmlBuilder:function(u,f){var h=Tt.makeSpan([],[Qn(u.body,f)]);if(!u.smashHeight&&!u.smashDepth)return h;if(u.smashHeight&&(h.height=0,h.children))for(var _=0;_<h.children.length;_++)h.children[_].height=0;if(u.smashDepth&&(h.depth=0,h.children))for(var N=0;N<h.children.length;N++)h.children[N].depth=0;var ee=Tt.makeVList({positionType:"firstBaseline",children:[{type:"elem",elem:h}]},f);return Tt.makeSpan(["mord"],[ee],f)},mathmlBuilder:function(u,f){var h=new vn.MathNode("mpadded",[hr(u.body,f)]);return u.smashHeight&&h.setAttribute("height","0px"),u.smashDepth&&h.setAttribute("depth","0px"),h}}),tn({type:"sqrt",names:["\\sqrt"],props:{numArgs:1,numOptionalArgs:1},handler:function(u,f,h){var _=u.parser,N=h[0],ee=f[0];return{type:"sqrt",mode:_.mode,body:ee,index:N}},htmlBuilder:function(u,f){var h=Qn(u.body,f.havingCrampedStyle());h.height===0&&(h.height=f.fontMetrics().xHeight),h=Tt.wrapFragment(h,f);var _=f.fontMetrics(),N=_.defaultRuleThickness,ee=N;f.style.id<x.TEXT.id&&(ee=f.fontMetrics().xHeight);var De=N+ee/4,Be=h.height+h.depth+De+N,dt=Ir.sqrtImage(Be,f),It=dt.span,Ut=dt.ruleWidth,an=dt.advanceWidth,Tn=It.height-Ut;Tn>h.height+h.depth+De&&(De=(De+Tn-h.height-h.depth)/2);var Pn=It.height-h.height-De-Ut;h.style.paddingLeft=an+"em";var Xn=Tt.makeVList({positionType:"firstBaseline",children:[{type:"elem",elem:h,wrapperClasses:["svg-align"]},{type:"kern",size:-(h.height+Pn)},{type:"elem",elem:It},{type:"kern",size:Ut}]},f);if(u.index){var br=f.havingStyle(x.SCRIPTSCRIPT),xr=Qn(u.index,br,f),Pr=.6*(Xn.height-Xn.depth),$r=Tt.makeVList({positionType:"shift",positionData:-Pr,children:[{type:"elem",elem:xr}]},f),fi=Tt.makeSpan(["root"],[$r]);return Tt.makeSpan(["mord","sqrt"],[fi,Xn],f)}else return Tt.makeSpan(["mord","sqrt"],[Xn],f)},mathmlBuilder:function(u,f){var h=u.body,_=u.index;return _?new vn.MathNode("mroot",[hr(h,f),hr(_,f)]):new vn.MathNode("msqrt",[hr(h,f)])}});var Wa={display:x.DISPLAY,text:x.TEXT,script:x.SCRIPT,scriptscript:x.SCRIPTSCRIPT};tn({type:"styling",names:["\\displaystyle","\\textstyle","\\scriptstyle","\\scriptscriptstyle"],props:{numArgs:0,allowedInText:!0},handler:function(u,f){var h=u.breakOnTokenText,_=u.funcName,N=u.parser,ee=N.parseExpression(!0,h),De=_.slice(1,_.length-5);return{type:"styling",mode:N.mode,style:De,body:ee}},htmlBuilder:function(u,f){var h=Wa[u.style],_=f.havingStyle(h).withFont("");return Os(u.body,_,f)},mathmlBuilder:function(u,f){var h=Wa[u.style],_=f.havingStyle(h),N=oi(u.body,_),ee=new vn.MathNode("mstyle",N),De={display:["0","true"],text:["0","false"],script:["1","false"],scriptscript:["2","false"]},Be=De[u.style];return ee.setAttribute("scriptlevel",Be[0]),ee.setAttribute("displaystyle",Be[1]),ee}});var Io=function(u,f){var h=u.base;if(h)if(h.type==="op"){var _=h.limits&&(f.style.size===x.DISPLAY.size||h.alwaysHandleSupSub);return _?Es:null}else if(h.type==="operatorname"){var N=h.alwaysHandleSupSub&&(f.style.size===x.DISPLAY.size||h.limits);return N?fa:null}else{if(h.type==="accent")return U.isCharacterBox(h.base)?Rn:null;if(h.type==="horizBrace"){var ee=!u.sub;return ee===h.isOver?Ha:null}else return null}else return null};Yn({type:"supsub",htmlBuilder:function(u,f){var h=Io(u,f);if(h)return h(u,f);var _=u.base,N=u.sup,ee=u.sub,De=Qn(_,f),Be,dt,It=f.fontMetrics(),Ut=0,an=0,Tn=_&&U.isCharacterBox(_);if(N){var Pn=f.havingStyle(f.style.sup());Be=Qn(N,Pn,f),Tn||(Ut=De.height-Pn.fontMetrics().supDrop*Pn.sizeMultiplier/f.sizeMultiplier)}if(ee){var Xn=f.havingStyle(f.style.sub());dt=Qn(ee,Xn,f),Tn||(an=De.depth+Xn.fontMetrics().subDrop*Xn.sizeMultiplier/f.sizeMultiplier)}var br;f.style===x.DISPLAY?br=It.sup1:f.style.cramped?br=It.sup3:br=It.sup2;var xr=f.sizeMultiplier,Pr=.5/It.ptPerEm/xr+"em",$r=null;if(dt){var fi=u.base&&u.base.type==="op"&&u.base.name&&(u.base.name==="\\oiint"||u.base.name==="\\oiiint");(De instanceof ce||fi)&&($r=-De.italic+"em")}var si;if(Be&&dt){Ut=Math.max(Ut,br,Be.depth+.25*It.xHeight),an=Math.max(an,It.sub2);var hi=It.defaultRuleThickness,mi=4*hi;if(Ut-Be.depth-(dt.height-an)<mi){an=mi-(Ut-Be.depth)+dt.height;var ci=.8*It.xHeight-(Ut-Be.depth);ci>0&&(Ut+=ci,an-=ci)}var $i=[{type:"elem",elem:dt,shift:an,marginRight:Pr,marginLeft:$r},{type:"elem",elem:Be,shift:-Ut,marginRight:Pr}];si=Tt.makeVList({positionType:"individualShift",children:$i},f)}else if(dt){an=Math.max(an,It.sub1,dt.height-.8*It.xHeight);var bi=[{type:"elem",elem:dt,marginLeft:$r,marginRight:Pr}];si=Tt.makeVList({positionType:"shift",positionData:an,children:bi},f)}else if(Be)Ut=Math.max(Ut,br,Be.depth+.25*It.xHeight),si=Tt.makeVList({positionType:"shift",positionData:-Ut,children:[{type:"elem",elem:Be,marginRight:Pr}]},f);else throw new Error("supsub must have either sup or sub.");var Lt=Ar(De,"right")||"mord";return Tt.makeSpan([Lt],[De,Tt.makeSpan(["msupsub"],[si])],f)},mathmlBuilder:function(u,f){var h=!1,_,N,ee=Kn(u.base,"horizBrace");ee&&(N=!!u.sup,N===ee.isOver&&(h=!0,_=ee.isOver)),u.base&&(u.base.type==="op"||u.base.type==="operatorname")&&(u.base.parentIsSupSub=!0);var De=[hr(u.base,f)];u.sub&&De.push(hr(u.sub,f)),u.sup&&De.push(hr(u.sup,f));var Be;if(h)Be=_?"mover":"munder";else if(u.sub)if(u.sup){var Ut=u.base;Ut&&Ut.type==="op"&&Ut.limits&&f.style===x.DISPLAY||Ut&&Ut.type==="operatorname"&&Ut.alwaysHandleSupSub&&(f.style===x.DISPLAY||Ut.limits)?Be="munderover":Be="msubsup"}else{var It=u.base;It&&It.type==="op"&&It.limits&&(f.style===x.DISPLAY||It.alwaysHandleSupSub)||It&&It.type==="operatorname"&&It.alwaysHandleSupSub&&(It.limits||f.style===x.DISPLAY)?Be="munder":Be="msub"}else{var dt=u.base;dt&&dt.type==="op"&&dt.limits&&(f.style===x.DISPLAY||dt.alwaysHandleSupSub)||dt&&dt.type==="operatorname"&&dt.alwaysHandleSupSub&&(dt.limits||f.style===x.DISPLAY)?Be="mover":Be="msup"}var an=new vn.MathNode(Be,De);return an}}),Yn({type:"atom",htmlBuilder:function(u,f){return Tt.mathsym(u.text,u.mode,f,["m"+u.family])},mathmlBuilder:function(u,f){var h=new vn.MathNode("mo",[ni(u.text,u.mode)]);if(u.family==="bin"){var _=_i(u,f);_==="bold-italic"&&h.setAttribute("mathvariant",_)}else u.family==="punct"?h.setAttribute("separator","true"):(u.family==="open"||u.family==="close")&&h.setAttribute("stretchy","false");return h}});var Aa={mi:"italic",mn:"normal",mtext:"normal"};Yn({type:"mathord",htmlBuilder:function(u,f){return Tt.makeOrd(u,f,"mathord")},mathmlBuilder:function(u,f){var h=new vn.MathNode("mi",[ni(u.text,u.mode,f)]),_=_i(u,f)||"italic";return _!==Aa[h.type]&&h.setAttribute("mathvariant",_),h}}),Yn({type:"textord",htmlBuilder:function(u,f){return Tt.makeOrd(u,f,"textord")},mathmlBuilder:function(u,f){var h=ni(u.text,u.mode,f),_=_i(u,f)||"normal",N;return u.mode==="text"?N=new vn.MathNode("mtext",[h]):/[0-9]/.test(u.text)?N=new vn.MathNode("mn",[h]):u.text==="\\prime"?N=new vn.MathNode("mo",[h]):N=new vn.MathNode("mi",[h]),_!==Aa[N.type]&&N.setAttribute("mathvariant",_),N}});var na={"\\nobreak":"nobreak","\\allowbreak":"allowbreak"},Hs={" ":{},"\\ ":{},"~":{className:"nobreak"},"\\space":{},"\\nobreakspace":{className:"nobreak"}};Yn({type:"spacing",htmlBuilder:function(u,f){if(Hs.hasOwnProperty(u.text)){var h=Hs[u.text].className||"";if(u.mode==="text"){var _=Tt.makeOrd(u,f,"textord");return _.classes.push(h),_}else return Tt.makeSpan(["mspace",h],[Tt.mathsym(u.text,u.mode,f)],f)}else{if(na.hasOwnProperty(u.text))return Tt.makeSpan(["mspace",na[u.text]],[],f);throw new g('Unknown type of space "'+u.text+'"')}},mathmlBuilder:function(u,f){var h;if(Hs.hasOwnProperty(u.text))h=new vn.MathNode("mtext",[new vn.TextNode("\xA0")]);else{if(na.hasOwnProperty(u.text))return new vn.MathNode("mspace");throw new g('Unknown type of space "'+u.text+'"')}return h}});var js=function(){var u=new vn.MathNode("mtd",[]);return u.setAttribute("width","50%"),u};Yn({type:"tag",mathmlBuilder:function(u,f){var h=new vn.MathNode("mtable",[new vn.MathNode("mtr",[js(),new vn.MathNode("mtd",[pi(u.body,f)]),js(),new vn.MathNode("mtd",[pi(u.tag,f)])])]);return h.setAttribute("width","100%"),h}});var Va={"\\text":void 0,"\\textrm":"textrm","\\textsf":"textsf","\\texttt":"texttt","\\textnormal":"textrm"},Da={"\\textbf":"textbf","\\textmd":"textmd"},Ga={"\\textit":"textit","\\textup":"textup"},ha=function(u,f){var h=u.font;return h?Va[h]?f.withTextFontFamily(Va[h]):Da[h]?f.withTextFontWeight(Da[h]):f.withTextFontShape(Ga[h]):f};tn({type:"text",names:["\\text","\\textrm","\\textsf","\\texttt","\\textnormal","\\textbf","\\textmd","\\textit","\\textup"],props:{numArgs:1,argTypes:["text"],greediness:2,allowedInText:!0},handler:function(u,f){var h=u.parser,_=u.funcName,N=f[0];return{type:"text",mode:h.mode,body:vr(N),font:_}},htmlBuilder:function(u,f){var h=ha(u,f),_=fr(u.body,h,!0);return Tt.makeSpan(["mord","text"],Tt.tryCombineChars(_),h)},mathmlBuilder:function(u,f){var h=ha(u,f);return pi(u.body,h)}}),tn({type:"underline",names:["\\underline"],props:{numArgs:1,allowedInText:!0},handler:function(u,f){var h=u.parser;return{type:"underline",mode:h.mode,body:f[0]}},htmlBuilder:function(u,f){var h=Qn(u.body,f),_=Tt.makeLineSpan("underline-line",f),N=f.fontMetrics().defaultRuleThickness,ee=Tt.makeVList({positionType:"top",positionData:h.height,children:[{type:"kern",size:N},{type:"elem",elem:_},{type:"kern",size:3*N},{type:"elem",elem:h}]},f);return Tt.makeSpan(["mord","underline"],[ee],f)},mathmlBuilder:function(u,f){var h=new vn.MathNode("mo",[new vn.TextNode("\u203E")]);h.setAttribute("stretchy","true");var _=new vn.MathNode("munder",[hr(u.body,f),h]);return _.setAttribute("accentunder","true"),_}}),tn({type:"verb",names:["\\verb"],props:{numArgs:0,allowedInText:!0},handler:function(u,f,h){throw new g("\\verb ended by end of line instead of matching delimiter")},htmlBuilder:function(u,f){for(var h=Ya(u),_=[],N=f.havingStyle(f.style.text()),ee=0;ee<h.length;ee++){var De=h[ee];De==="~"&&(De="\\textasciitilde"),_.push(Tt.makeSymbol(De,"Typewriter-Regular",u.mode,N,["mord","texttt"]))}return Tt.makeSpan(["mord","text"].concat(N.sizingClasses(f)),Tt.tryCombineChars(_),N)},mathmlBuilder:function(u,f){var h=new vn.TextNode(Ya(u)),_=new vn.MathNode("mtext",[h]);return _.setAttribute("mathvariant","monospace"),_}});var Ya=function(u){return u.body.replace(/ /g,u.star?"\u2423":"\xA0")},ma=Cn,ra=ma,Ia=`[ \r
|
|
|
]`,Ra="\\\\[a-zA-Z@]+",Xa="\\\\[^\uD800-\uDFFF]",Ro=""+Ra+Ia+"*",Qa=new RegExp("^("+Ra+")"+Ia+"*$"),La="[\u0300-\u036F]",Lo=new RegExp(La+"+$"),Oa="("+Ia+"+)|([!-\\[\\]-\u2027\u202A-\uD7FF\uF900-\uFFFF]"+(La+"*")+"|[\uD800-\uDBFF][\uDC00-\uDFFF]"+(La+"*")+"|\\\\verb\\*([^]).*?\\3|\\\\verb([^*a-zA-Z]).*?\\4|\\\\operatorname\\*"+("|"+Ro)+("|"+Xa+")"),Ja=function(){function ne(f,h){this.input=void 0,this.settings=void 0,this.tokenRegex=void 0,this.catcodes=void 0,this.input=f,this.settings=h,this.tokenRegex=new RegExp(Oa,"g"),this.catcodes={"%":14}}var u=ne.prototype;return u.setCatcode=function(h,_){this.catcodes[h]=_},u.lex=function(){var h=this.input,_=this.tokenRegex.lastIndex;if(_===h.length)return new fe("EOF",new W(this,_,_));var N=this.tokenRegex.exec(h);if(N===null||N.index!==_)throw new g("Unexpected character: '"+h[_]+"'",new fe(h[_],new W(this,_,_+1)));var ee=N[2]||" ";if(this.catcodes[ee]===14){var De=h.indexOf(`
|
|
|
`,this.tokenRegex.lastIndex);return De===-1?(this.tokenRegex.lastIndex=h.length,this.settings.reportNonstrict("commentAtEnd","% comment has no terminating newline; LaTeX would fail because of commenting the end of math mode (e.g. $)")):this.tokenRegex.lastIndex=De+1,this.lex()}var Be=ee.match(Qa);return Be&&(ee=Be[1]),new fe(ee,new W(this,_,this.tokenRegex.lastIndex))},ne}(),Oo=function(){function ne(f,h){f===void 0&&(f={}),h===void 0&&(h={}),this.current=void 0,this.builtins=void 0,this.undefStack=void 0,this.current=h,this.builtins=f,this.undefStack=[]}var u=ne.prototype;return u.beginGroup=function(){this.undefStack.push({})},u.endGroup=function(){if(this.undefStack.length===0)throw new g("Unbalanced namespace destruction: attempt to pop global namespace; please report this as a bug");var h=this.undefStack.pop();for(var _ in h)h.hasOwnProperty(_)&&(h[_]===void 0?delete this.current[_]:this.current[_]=h[_])},u.has=function(h){return this.current.hasOwnProperty(h)||this.builtins.hasOwnProperty(h)},u.get=function(h){return this.current.hasOwnProperty(h)?this.current[h]:this.builtins[h]},u.set=function(h,_,N){if(N===void 0&&(N=!1),N){for(var ee=0;ee<this.undefStack.length;ee++)delete this.undefStack[ee][h];this.undefStack.length>0&&(this.undefStack[this.undefStack.length-1][h]=_)}else{var De=this.undefStack[this.undefStack.length-1];De&&!De.hasOwnProperty(h)&&(De[h]=this.current[h])}this.current[h]=_},ne}(),qa={},Po=qa;function Ve(ne,u){qa[ne]=u}Ve("\\@firstoftwo",function(ne){var u=ne.consumeArgs(2);return{tokens:u[0],numArgs:0}}),Ve("\\@secondoftwo",function(ne){var u=ne.consumeArgs(2);return{tokens:u[1],numArgs:0}}),Ve("\\@ifnextchar",function(ne){var u=ne.consumeArgs(3),f=ne.future();return u[0].length===1&&u[0][0].text===f.text?{tokens:u[1],numArgs:0}:{tokens:u[2],numArgs:0}}),Ve("\\@ifstar","\\@ifnextchar *{\\@firstoftwo{#1}}"),Ve("\\TextOrMath",function(ne){var u=ne.consumeArgs(2);return ne.mode==="text"?{tokens:u[0],numArgs:0}:{tokens:u[1],numArgs:0}});var eo={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};Ve("\\char",function(ne){var u=ne.popToken(),f,h="";if(u.text==="'")f=8,u=ne.popToken();else if(u.text==='"')f=16,u=ne.popToken();else if(u.text==="`")if(u=ne.popToken(),u.text[0]==="\\")h=u.text.charCodeAt(1);else{if(u.text==="EOF")throw new g("\\char` missing argument");h=u.text.charCodeAt(0)}else f=10;if(f){if(h=eo[u.text],h==null||h>=f)throw new g("Invalid base-"+f+" digit "+u.text);for(var _;(_=eo[ne.future().text])!=null&&_<f;)h*=f,h+=_,ne.popToken()}return"\\@char{"+h+"}"});var Pa=function(u,f){var h=u.consumeArgs(1)[0];if(h.length!==1)throw new g("\\gdef's first argument must be a macro name");var _=h[0].text,N=0;for(h=u.consumeArgs(1)[0];h.length===1&&h[0].text==="#";){if(h=u.consumeArgs(1)[0],h.length!==1)throw new g('Invalid argument number length "'+h.length+'"');if(!/^[1-9]$/.test(h[0].text))throw new g('Invalid argument number "'+h[0].text+'"');if(N++,parseInt(h[0].text)!==N)throw new g('Argument number "'+h[0].text+'" out of order');h=u.consumeArgs(1)[0]}return u.macros.set(_,{tokens:h,numArgs:N},f),""};Ve("\\gdef",function(ne){return Pa(ne,!0)}),Ve("\\def",function(ne){return Pa(ne,!1)}),Ve("\\global",function(ne){var u=ne.consumeArgs(1)[0];if(u.length!==1)throw new g("Invalid command after \\global");var f=u[0].text;if(f==="\\def")return Pa(ne,!0);throw new g("Invalid command '"+f+"' after \\global")});var Ma=function(u,f,h){var _=u.consumeArgs(1)[0];if(_.length!==1)throw new g("\\newcommand's first argument must be a macro name");var N=_[0].text,ee=u.isDefined(N);if(ee&&!f)throw new g("\\newcommand{"+N+"} attempting to redefine "+(N+"; use \\renewcommand"));if(!ee&&!h)throw new g("\\renewcommand{"+N+"} when command "+N+" does not yet exist; use \\newcommand");var De=0;if(_=u.consumeArgs(1)[0],_.length===1&&_[0].text==="["){for(var Be="",dt=u.expandNextToken();dt.text!=="]"&&dt.text!=="EOF";)Be+=dt.text,dt=u.expandNextToken();if(!Be.match(/^\s*[0-9]+\s*$/))throw new g("Invalid number of arguments: "+Be);De=parseInt(Be),_=u.consumeArgs(1)[0]}return u.macros.set(N,{tokens:_,numArgs:De}),""};Ve("\\newcommand",function(ne){return Ma(ne,!1,!0)}),Ve("\\renewcommand",function(ne){return Ma(ne,!0,!1)}),Ve("\\providecommand",function(ne){return Ma(ne,!0,!0)}),Ve("\\bgroup","{"),Ve("\\egroup","}"),Ve("\\lq","`"),Ve("\\rq","'"),Ve("\\aa","\\r a"),Ve("\\AA","\\r A"),Ve("\\textcopyright","\\html@mathml{\\textcircled{c}}{\\char`\xA9}"),Ve("\\copyright","\\TextOrMath{\\textcopyright}{\\text{\\textcopyright}}"),Ve("\\textregistered","\\html@mathml{\\textcircled{\\scriptsize R}}{\\char`\xAE}"),Ve("\u212C","\\mathscr{B}"),Ve("\u2130","\\mathscr{E}"),Ve("\u2131","\\mathscr{F}"),Ve("\u210B","\\mathscr{H}"),Ve("\u2110","\\mathscr{I}"),Ve("\u2112","\\mathscr{L}"),Ve("\u2133","\\mathscr{M}"),Ve("\u211B","\\mathscr{R}"),Ve("\u212D","\\mathfrak{C}"),Ve("\u210C","\\mathfrak{H}"),Ve("\u2128","\\mathfrak{Z}"),Ve("\\Bbbk","\\Bbb{k}"),Ve("\xB7","\\cdotp"),Ve("\\llap","\\mathllap{\\textrm{#1}}"),Ve("\\rlap","\\mathrlap{\\textrm{#1}}"),Ve("\\clap","\\mathclap{\\textrm{#1}}"),Ve("\\not",'\\html@mathml{\\mathrel{\\mathrlap\\@not}}{\\char"338}'),Ve("\\neq","\\html@mathml{\\mathrel{\\not=}}{\\mathrel{\\char`\u2260}}"),Ve("\\ne","\\neq"),Ve("\u2260","\\neq"),Ve("\\notin","\\html@mathml{\\mathrel{{\\in}\\mathllap{/\\mskip1mu}}}{\\mathrel{\\char`\u2209}}"),Ve("\u2209","\\notin"),Ve("\u2258","\\html@mathml{\\mathrel{=\\kern{-1em}\\raisebox{0.4em}{$\\scriptsize\\frown$}}}{\\mathrel{\\char`\u2258}}"),Ve("\u2259","\\html@mathml{\\stackrel{\\tiny\\wedge}{=}}{\\mathrel{\\char`\u2258}}"),Ve("\u225A","\\html@mathml{\\stackrel{\\tiny\\vee}{=}}{\\mathrel{\\char`\u225A}}"),Ve("\u225B","\\html@mathml{\\stackrel{\\scriptsize\\star}{=}}{\\mathrel{\\char`\u225B}}"),Ve("\u225D","\\html@mathml{\\stackrel{\\tiny\\mathrm{def}}{=}}{\\mathrel{\\char`\u225D}}"),Ve("\u225E","\\html@mathml{\\stackrel{\\tiny\\mathrm{m}}{=}}{\\mathrel{\\char`\u225E}}"),Ve("\u225F","\\html@mathml{\\stackrel{\\tiny?}{=}}{\\mathrel{\\char`\u225F}}"),Ve("\u27C2","\\perp"),Ve("\u203C","\\mathclose{!\\mkern-0.8mu!}"),Ve("\u220C","\\notni"),Ve("\u231C","\\ulcorner"),Ve("\u231D","\\urcorner"),Ve("\u231E","\\llcorner"),Ve("\u231F","\\lrcorner"),Ve("\xA9","\\copyright"),Ve("\xAE","\\textregistered"),Ve("\uFE0F","\\textregistered"),Ve("\\vdots","\\mathord{\\varvdots\\rule{0pt}{15pt}}"),Ve("\u22EE","\\vdots"),Ve("\\varGamma","\\mathit{\\Gamma}"),Ve("\\varDelta","\\mathit{\\Delta}"),Ve("\\varTheta","\\mathit{\\Theta}"),Ve("\\varLambda","\\mathit{\\Lambda}"),Ve("\\varXi","\\mathit{\\Xi}"),Ve("\\varPi","\\mathit{\\Pi}"),Ve("\\varSigma","\\mathit{\\Sigma}"),Ve("\\varUpsilon","\\mathit{\\Upsilon}"),Ve("\\varPhi","\\mathit{\\Phi}"),Ve("\\varPsi","\\mathit{\\Psi}"),Ve("\\varOmega","\\mathit{\\Omega}"),Ve("\\substack","\\begin{subarray}{c}#1\\end{subarray}"),Ve("\\colon","\\nobreak\\mskip2mu\\mathpunct{}\\mathchoice{\\mkern-3mu}{\\mkern-3mu}{}{}{:}\\mskip6mu"),Ve("\\boxed","\\fbox{$\\displaystyle{#1}$}"),Ve("\\iff","\\DOTSB\\;\\Longleftrightarrow\\;"),Ve("\\implies","\\DOTSB\\;\\Longrightarrow\\;"),Ve("\\impliedby","\\DOTSB\\;\\Longleftarrow\\;");var to={",":"\\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"};Ve("\\dots",function(ne){var u="\\dotso",f=ne.expandAfterFuture().text;return f in to?u=to[f]:(f.substr(0,4)==="\\not"||f in Rt.math&&U.contains(["bin","rel"],Rt.math[f].group))&&(u="\\dotsb"),u});var Zs={")":!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};Ve("\\dotso",function(ne){var u=ne.future().text;return u in Zs?"\\ldots\\,":"\\ldots"}),Ve("\\dotsc",function(ne){var u=ne.future().text;return u in Zs&&u!==","?"\\ldots\\,":"\\ldots"}),Ve("\\cdots",function(ne){var u=ne.future().text;return u in Zs?"\\@cdots\\,":"\\@cdots"}),Ve("\\dotsb","\\cdots"),Ve("\\dotsm","\\cdots"),Ve("\\dotsi","\\!\\cdots"),Ve("\\dotsx","\\ldots\\,"),Ve("\\DOTSI","\\relax"),Ve("\\DOTSB","\\relax"),Ve("\\DOTSX","\\relax"),Ve("\\tmspace","\\TextOrMath{\\kern#1#3}{\\mskip#1#2}\\relax"),Ve("\\,","\\tmspace+{3mu}{.1667em}"),Ve("\\thinspace","\\,"),Ve("\\>","\\mskip{4mu}"),Ve("\\:","\\tmspace+{4mu}{.2222em}"),Ve("\\medspace","\\:"),Ve("\\;","\\tmspace+{5mu}{.2777em}"),Ve("\\thickspace","\\;"),Ve("\\!","\\tmspace-{3mu}{.1667em}"),Ve("\\negthinspace","\\!"),Ve("\\negmedspace","\\tmspace-{4mu}{.2222em}"),Ve("\\negthickspace","\\tmspace-{5mu}{.277em}"),Ve("\\enspace","\\kern.5em "),Ve("\\enskip","\\hskip.5em\\relax"),Ve("\\quad","\\hskip1em\\relax"),Ve("\\qquad","\\hskip2em\\relax"),Ve("\\tag","\\@ifstar\\tag@literal\\tag@paren"),Ve("\\tag@paren","\\tag@literal{({#1})}"),Ve("\\tag@literal",function(ne){if(ne.macros.get("\\df@tag"))throw new g("Multiple \\tag");return"\\gdef\\df@tag{\\text{#1}}"}),Ve("\\bmod","\\mathchoice{\\mskip1mu}{\\mskip1mu}{\\mskip5mu}{\\mskip5mu}\\mathbin{\\rm mod}\\mathchoice{\\mskip1mu}{\\mskip1mu}{\\mskip5mu}{\\mskip5mu}"),Ve("\\pod","\\allowbreak\\mathchoice{\\mkern18mu}{\\mkern8mu}{\\mkern8mu}{\\mkern8mu}(#1)"),Ve("\\pmod","\\pod{{\\rm mod}\\mkern6mu#1}"),Ve("\\mod","\\allowbreak\\mathchoice{\\mkern18mu}{\\mkern12mu}{\\mkern12mu}{\\mkern12mu}{\\rm mod}\\,\\,#1"),Ve("\\pmb","\\html@mathml{\\@binrel{#1}{\\mathrlap{#1}\\kern0.5px#1}}{\\mathbf{#1}}"),Ve("\\\\","\\newline"),Ve("\\TeX","\\textrm{\\html@mathml{T\\kern-.1667em\\raisebox{-.5ex}{E}\\kern-.125emX}{TeX}}");var no=Ie["Main-Regular"][84][1]-.7*Ie["Main-Regular"][65][1]+"em";Ve("\\LaTeX","\\textrm{\\html@mathml{"+("L\\kern-.36em\\raisebox{"+no+"}{\\scriptstyle A}")+"\\kern-.15em\\TeX}{LaTeX}}"),Ve("\\KaTeX","\\textrm{\\html@mathml{"+("K\\kern-.17em\\raisebox{"+no+"}{\\scriptstyle A}")+"\\kern-.15em\\TeX}{KaTeX}}"),Ve("\\hspace","\\@ifstar\\@hspacer\\@hspace"),Ve("\\@hspace","\\hskip #1\\relax"),Ve("\\@hspacer","\\rule{0pt}{0pt}\\hskip #1\\relax"),Ve("\\ordinarycolon",":"),Ve("\\vcentcolon","\\mathrel{\\mathop\\ordinarycolon}"),Ve("\\dblcolon",'\\html@mathml{\\mathrel{\\vcentcolon\\mathrel{\\mkern-.9mu}\\vcentcolon}}{\\mathop{\\char"2237}}'),Ve("\\coloneqq",'\\html@mathml{\\mathrel{\\vcentcolon\\mathrel{\\mkern-1.2mu}=}}{\\mathop{\\char"2254}}'),Ve("\\Coloneqq",'\\html@mathml{\\mathrel{\\dblcolon\\mathrel{\\mkern-1.2mu}=}}{\\mathop{\\char"2237\\char"3d}}'),Ve("\\coloneq",'\\html@mathml{\\mathrel{\\vcentcolon\\mathrel{\\mkern-1.2mu}\\mathrel{-}}}{\\mathop{\\char"3a\\char"2212}}'),Ve("\\Coloneq",'\\html@mathml{\\mathrel{\\dblcolon\\mathrel{\\mkern-1.2mu}\\mathrel{-}}}{\\mathop{\\char"2237\\char"2212}}'),Ve("\\eqqcolon",'\\html@mathml{\\mathrel{=\\mathrel{\\mkern-1.2mu}\\vcentcolon}}{\\mathop{\\char"2255}}'),Ve("\\Eqqcolon",'\\html@mathml{\\mathrel{=\\mathrel{\\mkern-1.2mu}\\dblcolon}}{\\mathop{\\char"3d\\char"2237}}'),Ve("\\eqcolon",'\\html@mathml{\\mathrel{\\mathrel{-}\\mathrel{\\mkern-1.2mu}\\vcentcolon}}{\\mathop{\\char"2239}}'),Ve("\\Eqcolon",'\\html@mathml{\\mathrel{\\mathrel{-}\\mathrel{\\mkern-1.2mu}\\dblcolon}}{\\mathop{\\char"2212\\char"2237}}'),Ve("\\colonapprox",'\\html@mathml{\\mathrel{\\vcentcolon\\mathrel{\\mkern-1.2mu}\\approx}}{\\mathop{\\char"3a\\char"2248}}'),Ve("\\Colonapprox",'\\html@mathml{\\mathrel{\\dblcolon\\mathrel{\\mkern-1.2mu}\\approx}}{\\mathop{\\char"2237\\char"2248}}'),Ve("\\colonsim",'\\html@mathml{\\mathrel{\\vcentcolon\\mathrel{\\mkern-1.2mu}\\sim}}{\\mathop{\\char"3a\\char"223c}}'),Ve("\\Colonsim",'\\html@mathml{\\mathrel{\\dblcolon\\mathrel{\\mkern-1.2mu}\\sim}}{\\mathop{\\char"2237\\char"223c}}'),Ve("\u2237","\\dblcolon"),Ve("\u2239","\\eqcolon"),Ve("\u2254","\\coloneqq"),Ve("\u2255","\\eqqcolon"),Ve("\u2A74","\\Coloneqq"),Ve("\\ratio","\\vcentcolon"),Ve("\\coloncolon","\\dblcolon"),Ve("\\colonequals","\\coloneqq"),Ve("\\coloncolonequals","\\Coloneqq"),Ve("\\equalscolon","\\eqqcolon"),Ve("\\equalscoloncolon","\\Eqqcolon"),Ve("\\colonminus","\\coloneq"),Ve("\\coloncolonminus","\\Coloneq"),Ve("\\minuscolon","\\eqcolon"),Ve("\\minuscoloncolon","\\Eqcolon"),Ve("\\coloncolonapprox","\\Colonapprox"),Ve("\\coloncolonsim","\\Colonsim"),Ve("\\simcolon","\\mathrel{\\sim\\mathrel{\\mkern-1.2mu}\\vcentcolon}"),Ve("\\simcoloncolon","\\mathrel{\\sim\\mathrel{\\mkern-1.2mu}\\dblcolon}"),Ve("\\approxcolon","\\mathrel{\\approx\\mathrel{\\mkern-1.2mu}\\vcentcolon}"),Ve("\\approxcoloncolon","\\mathrel{\\approx\\mathrel{\\mkern-1.2mu}\\dblcolon}"),Ve("\\notni","\\html@mathml{\\not\\ni}{\\mathrel{\\char`\u220C}}"),Ve("\\limsup","\\DOTSB\\operatorname*{lim\\,sup}"),Ve("\\liminf","\\DOTSB\\operatorname*{lim\\,inf}"),Ve("\\gvertneqq","\\html@mathml{\\@gvertneqq}{\u2269}"),Ve("\\lvertneqq","\\html@mathml{\\@lvertneqq}{\u2268}"),Ve("\\ngeqq","\\html@mathml{\\@ngeqq}{\u2271}"),Ve("\\ngeqslant","\\html@mathml{\\@ngeqslant}{\u2271}"),Ve("\\nleqq","\\html@mathml{\\@nleqq}{\u2270}"),Ve("\\nleqslant","\\html@mathml{\\@nleqslant}{\u2270}"),Ve("\\nshortmid","\\html@mathml{\\@nshortmid}{\u2224}"),Ve("\\nshortparallel","\\html@mathml{\\@nshortparallel}{\u2226}"),Ve("\\nsubseteqq","\\html@mathml{\\@nsubseteqq}{\u2288}"),Ve("\\nsupseteqq","\\html@mathml{\\@nsupseteqq}{\u2289}"),Ve("\\varsubsetneq","\\html@mathml{\\@varsubsetneq}{\u228A}"),Ve("\\varsubsetneqq","\\html@mathml{\\@varsubsetneqq}{\u2ACB}"),Ve("\\varsupsetneq","\\html@mathml{\\@varsupsetneq}{\u228B}"),Ve("\\varsupsetneqq","\\html@mathml{\\@varsupsetneqq}{\u2ACC}"),Ve("\\llbracket","\\html@mathml{\\mathopen{[\\mkern-3.2mu[}}{\\mathopen{\\char`\u27E6}}"),Ve("\\rrbracket","\\html@mathml{\\mathclose{]\\mkern-3.2mu]}}{\\mathclose{\\char`\u27E7}}"),Ve("\u27E6","\\llbracket"),Ve("\u27E7","\\rrbracket"),Ve("\\lBrace","\\html@mathml{\\mathopen{\\{\\mkern-3.2mu[}}{\\mathopen{\\char`\u2983}}"),Ve("\\rBrace","\\html@mathml{\\mathclose{]\\mkern-3.2mu\\}}}{\\mathclose{\\char`\u2984}}"),Ve("\u2983","\\lBrace"),Ve("\u2984","\\rBrace"),Ve("\\darr","\\downarrow"),Ve("\\dArr","\\Downarrow"),Ve("\\Darr","\\Downarrow"),Ve("\\lang","\\langle"),Ve("\\rang","\\rangle"),Ve("\\uarr","\\uparrow"),Ve("\\uArr","\\Uparrow"),Ve("\\Uarr","\\Uparrow"),Ve("\\N","\\mathbb{N}"),Ve("\\R","\\mathbb{R}"),Ve("\\Z","\\mathbb{Z}"),Ve("\\alef","\\aleph"),Ve("\\alefsym","\\aleph"),Ve("\\Alpha","\\mathrm{A}"),Ve("\\Beta","\\mathrm{B}"),Ve("\\bull","\\bullet"),Ve("\\Chi","\\mathrm{X}"),Ve("\\clubs","\\clubsuit"),Ve("\\cnums","\\mathbb{C}"),Ve("\\Complex","\\mathbb{C}"),Ve("\\Dagger","\\ddagger"),Ve("\\diamonds","\\diamondsuit"),Ve("\\empty","\\emptyset"),Ve("\\Epsilon","\\mathrm{E}"),Ve("\\Eta","\\mathrm{H}"),Ve("\\exist","\\exists"),Ve("\\harr","\\leftrightarrow"),Ve("\\hArr","\\Leftrightarrow"),Ve("\\Harr","\\Leftrightarrow"),Ve("\\hearts","\\heartsuit"),Ve("\\image","\\Im"),Ve("\\infin","\\infty"),Ve("\\Iota","\\mathrm{I}"),Ve("\\isin","\\in"),Ve("\\Kappa","\\mathrm{K}"),Ve("\\larr","\\leftarrow"),Ve("\\lArr","\\Leftarrow"),Ve("\\Larr","\\Leftarrow"),Ve("\\lrarr","\\leftrightarrow"),Ve("\\lrArr","\\Leftrightarrow"),Ve("\\Lrarr","\\Leftrightarrow"),Ve("\\Mu","\\mathrm{M}"),Ve("\\natnums","\\mathbb{N}"),Ve("\\Nu","\\mathrm{N}"),Ve("\\Omicron","\\mathrm{O}"),Ve("\\plusmn","\\pm"),Ve("\\rarr","\\rightarrow"),Ve("\\rArr","\\Rightarrow"),Ve("\\Rarr","\\Rightarrow"),Ve("\\real","\\Re"),Ve("\\reals","\\mathbb{R}"),Ve("\\Reals","\\mathbb{R}"),Ve("\\Rho","\\mathrm{P}"),Ve("\\sdot","\\cdot"),Ve("\\sect","\\S"),Ve("\\spades","\\spadesuit"),Ve("\\sub","\\subset"),Ve("\\sube","\\subseteq"),Ve("\\supe","\\supseteq"),Ve("\\Tau","\\mathrm{T}"),Ve("\\thetasym","\\vartheta"),Ve("\\weierp","\\wp"),Ve("\\Zeta","\\mathrm{Z}"),Ve("\\argmin","\\DOTSB\\operatorname*{arg\\,min}"),Ve("\\argmax","\\DOTSB\\operatorname*{arg\\,max}"),Ve("\\plim","\\DOTSB\\mathop{\\operatorname{plim}}\\limits"),Ve("\\blue","\\textcolor{##6495ed}{#1}"),Ve("\\orange","\\textcolor{##ffa500}{#1}"),Ve("\\pink","\\textcolor{##ff00af}{#1}"),Ve("\\red","\\textcolor{##df0030}{#1}"),Ve("\\green","\\textcolor{##28ae7b}{#1}"),Ve("\\gray","\\textcolor{gray}{#1}"),Ve("\\purple","\\textcolor{##9d38bd}{#1}"),Ve("\\blueA","\\textcolor{##ccfaff}{#1}"),Ve("\\blueB","\\textcolor{##80f6ff}{#1}"),Ve("\\blueC","\\textcolor{##63d9ea}{#1}"),Ve("\\blueD","\\textcolor{##11accd}{#1}"),Ve("\\blueE","\\textcolor{##0c7f99}{#1}"),Ve("\\tealA","\\textcolor{##94fff5}{#1}"),Ve("\\tealB","\\textcolor{##26edd5}{#1}"),Ve("\\tealC","\\textcolor{##01d1c1}{#1}"),Ve("\\tealD","\\textcolor{##01a995}{#1}"),Ve("\\tealE","\\textcolor{##208170}{#1}"),Ve("\\greenA","\\textcolor{##b6ffb0}{#1}"),Ve("\\greenB","\\textcolor{##8af281}{#1}"),Ve("\\greenC","\\textcolor{##74cf70}{#1}"),Ve("\\greenD","\\textcolor{##1fab54}{#1}"),Ve("\\greenE","\\textcolor{##0d923f}{#1}"),Ve("\\goldA","\\textcolor{##ffd0a9}{#1}"),Ve("\\goldB","\\textcolor{##ffbb71}{#1}"),Ve("\\goldC","\\textcolor{##ff9c39}{#1}"),Ve("\\goldD","\\textcolor{##e07d10}{#1}"),Ve("\\goldE","\\textcolor{##a75a05}{#1}"),Ve("\\redA","\\textcolor{##fca9a9}{#1}"),Ve("\\redB","\\textcolor{##ff8482}{#1}"),Ve("\\redC","\\textcolor{##f9685d}{#1}"),Ve("\\redD","\\textcolor{##e84d39}{#1}"),Ve("\\redE","\\textcolor{##bc2612}{#1}"),Ve("\\maroonA","\\textcolor{##ffbde0}{#1}"),Ve("\\maroonB","\\textcolor{##ff92c6}{#1}"),Ve("\\maroonC","\\textcolor{##ed5fa6}{#1}"),Ve("\\maroonD","\\textcolor{##ca337c}{#1}"),Ve("\\maroonE","\\textcolor{##9e034e}{#1}"),Ve("\\purpleA","\\textcolor{##ddd7ff}{#1}"),Ve("\\purpleB","\\textcolor{##c6b9fc}{#1}"),Ve("\\purpleC","\\textcolor{##aa87ff}{#1}"),Ve("\\purpleD","\\textcolor{##7854ab}{#1}"),Ve("\\purpleE","\\textcolor{##543b78}{#1}"),Ve("\\mintA","\\textcolor{##f5f9e8}{#1}"),Ve("\\mintB","\\textcolor{##edf2df}{#1}"),Ve("\\mintC","\\textcolor{##e0e5cc}{#1}"),Ve("\\grayA","\\textcolor{##f6f7f7}{#1}"),Ve("\\grayB","\\textcolor{##f0f1f2}{#1}"),Ve("\\grayC","\\textcolor{##e3e5e6}{#1}"),Ve("\\grayD","\\textcolor{##d6d8da}{#1}"),Ve("\\grayE","\\textcolor{##babec2}{#1}"),Ve("\\grayF","\\textcolor{##888d93}{#1}"),Ve("\\grayG","\\textcolor{##626569}{#1}"),Ve("\\grayH","\\textcolor{##3b3e40}{#1}"),Ve("\\grayI","\\textcolor{##21242c}{#1}"),Ve("\\kaBlue","\\textcolor{##314453}{#1}"),Ve("\\kaGreen","\\textcolor{##71B307}{#1}");var ka={"\\relax":!0,"^":!0,_:!0,"\\limits":!0,"\\nolimits":!0},ro=function(){function ne(f,h,_){this.settings=void 0,this.expansionCount=void 0,this.lexer=void 0,this.macros=void 0,this.stack=void 0,this.mode=void 0,this.settings=h,this.expansionCount=0,this.feed(f),this.macros=new Oo(Po,h.macros),this.mode=_,this.stack=[]}var u=ne.prototype;return u.feed=function(h){this.lexer=new Ja(h,this.settings)},u.switchMode=function(h){this.mode=h},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(h){this.stack.push(h)},u.pushTokens=function(h){var _;(_=this.stack).push.apply(_,h)},u.consumeSpaces=function(){for(;;){var h=this.future();if(h.text===" ")this.stack.pop();else break}},u.consumeArgs=function(h){for(var _=[],N=0;N<h;++N){this.consumeSpaces();var ee=this.popToken();if(ee.text==="{"){for(var De=[],Be=1;Be!==0;){var dt=this.popToken();if(De.push(dt),dt.text==="{")++Be;else if(dt.text==="}")--Be;else if(dt.text==="EOF")throw new g("End of input in macro argument",ee)}De.pop(),De.reverse(),_[N]=De}else{if(ee.text==="EOF")throw new g("End of input expecting macro argument");_[N]=[ee]}}return _},u.expandOnce=function(){var h=this.popToken(),_=h.text,N=this._getExpansion(_);if(N==null)return this.pushToken(h),h;if(this.expansionCount++,this.expansionCount>this.settings.maxExpand)throw new g("Too many expansions: infinite loop or need to increase maxExpand setting");var ee=N.tokens;if(N.numArgs){var De=this.consumeArgs(N.numArgs);ee=ee.slice();for(var Be=ee.length-1;Be>=0;--Be){var dt=ee[Be];if(dt.text==="#"){if(Be===0)throw new g("Incomplete placeholder at end of macro body",dt);if(dt=ee[--Be],dt.text==="#")ee.splice(Be+1,1);else if(/^[1-9]$/.test(dt.text)){var It;(It=ee).splice.apply(It,[Be,2].concat(De[+dt.text-1]))}else throw new g("Not a valid argument number",dt)}}}return this.pushTokens(ee),ee},u.expandAfterFuture=function(){return this.expandOnce(),this.future()},u.expandNextToken=function(){for(;;){var h=this.expandOnce();if(h instanceof fe)if(h.text==="\\relax")this.stack.pop();else return this.stack.pop()}throw new Error},u.expandMacro=function(h){if(this.macros.get(h)){var _=[],N=this.stack.length;for(this.pushToken(new fe(h));this.stack.length>N;){var ee=this.expandOnce();ee instanceof fe&&_.push(this.stack.pop())}return _}},u.expandMacroAsText=function(h){var _=this.expandMacro(h);return _&&_.map(function(N){return N.text}).join("")},u._getExpansion=function(h){var _=this.macros.get(h);if(_==null)return _;var N=typeof _=="function"?_(this):_;if(typeof N=="string"){var ee=0;if(N.indexOf("#")!==-1)for(var De=N.replace(/##/g,"");De.indexOf("#"+(ee+1))!==-1;)++ee;for(var Be=new Ja(N,this.settings),dt=[],It=Be.lex();It.text!=="EOF";)dt.push(It),It=Be.lex();dt.reverse();var Ut={tokens:dt,numArgs:ee};return Ut}return N},u.isDefined=function(h){return this.macros.has(h)||ra.hasOwnProperty(h)||Rt.math.hasOwnProperty(h)||Rt.text.hasOwnProperty(h)||ka.hasOwnProperty(h)},ne}(),io={"\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"}},pa={\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"},Fi=function(){function ne(f,h){this.mode=void 0,this.gullet=void 0,this.settings=void 0,this.leftrightDepth=void 0,this.nextToken=void 0,this.mode="math",this.gullet=new ro(f,h,this.mode),this.settings=h,this.leftrightDepth=0}var u=ne.prototype;return u.expect=function(h,_){if(_===void 0&&(_=!0),this.fetch().text!==h)throw new g("Expected '"+h+"', got '"+this.fetch().text+"'",this.fetch());_&&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(h){this.mode=h,this.gullet.switchMode(h)},u.parse=function(){this.gullet.beginGroup(),this.settings.colorIsTextColor&&this.gullet.macros.set("\\color","\\textcolor");var h=this.parseExpression(!1);return this.expect("EOF"),this.gullet.endGroup(),h},u.parseExpression=function(h,_){for(var N=[];;){this.mode==="math"&&this.consumeSpaces();var ee=this.fetch();if(ne.endOfExpression.indexOf(ee.text)!==-1||_&&ee.text===_||h&&ra[ee.text]&&ra[ee.text].infix)break;var De=this.parseAtom(_);if(!De)break;N.push(De)}return this.mode==="text"&&this.formLigatures(N),this.handleInfixNodes(N)},u.handleInfixNodes=function(h){for(var _=-1,N,ee=0;ee<h.length;ee++){var De=Kn(h[ee],"infix");if(De){if(_!==-1)throw new g("only one infix operator per group",De.token);_=ee,N=De.replaceWith}}if(_!==-1&&N){var Be,dt,It=h.slice(0,_),Ut=h.slice(_+1);It.length===1&&It[0].type==="ordgroup"?Be=It[0]:Be={type:"ordgroup",mode:this.mode,body:It},Ut.length===1&&Ut[0].type==="ordgroup"?dt=Ut[0]:dt={type:"ordgroup",mode:this.mode,body:Ut};var an;return N==="\\\\abovefrac"?an=this.callFunction(N,[Be,h[_],dt],[]):an=this.callFunction(N,[Be,dt],[]),[an]}else return h},u.handleSupSubscript=function(h){var _=this.fetch(),N=_.text;this.consume();var ee=this.parseGroup(h,!1,ne.SUPSUB_GREEDINESS,void 0,void 0,!0);if(!ee)throw new g("Expected group after '"+N+"'",_);return ee},u.formatUnsupportedCmd=function(h){for(var _=[],N=0;N<h.length;N++)_.push({type:"textord",mode:"text",text:h[N]});var ee={type:"text",mode:this.mode,body:_},De={type:"color",mode:this.mode,color:this.settings.errorColor,body:[ee]};return De},u.parseAtom=function(h){var _=this.parseGroup("atom",!1,null,h);if(this.mode==="text")return _;for(var N,ee;;){this.consumeSpaces();var De=this.fetch();if(De.text==="\\limits"||De.text==="\\nolimits"){var Be=Kn(_,"op");if(Be){var dt=De.text==="\\limits";Be.limits=dt,Be.alwaysHandleSupSub=!0}else if(Be=Kn(_,"operatorname"),Be&&Be.alwaysHandleSupSub){var It=De.text==="\\limits";Be.limits=It}else throw new g("Limit controls must follow a math operator",De);this.consume()}else if(De.text==="^"){if(N)throw new g("Double superscript",De);N=this.handleSupSubscript("superscript")}else if(De.text==="_"){if(ee)throw new g("Double subscript",De);ee=this.handleSupSubscript("subscript")}else if(De.text==="'"){if(N)throw new g("Double superscript",De);var Ut={type:"textord",mode:this.mode,text:"\\prime"},an=[Ut];for(this.consume();this.fetch().text==="'";)an.push(Ut),this.consume();this.fetch().text==="^"&&an.push(this.handleSupSubscript("superscript")),N={type:"ordgroup",mode:this.mode,body:an}}else break}return N||ee?{type:"supsub",mode:this.mode,base:_,sup:N,sub:ee}:_},u.parseFunction=function(h,_,N){var ee=this.fetch(),De=ee.text,Be=ra[De];if(!Be)return null;if(this.consume(),N!=null&&Be.greediness<=N)throw new g("Got function '"+De+"' with no arguments"+(_?" as "+_:""),ee);if(this.mode==="text"&&!Be.allowedInText)throw new g("Can't use function '"+De+"' in text mode",ee);if(this.mode==="math"&&Be.allowedInMath===!1)throw new g("Can't use function '"+De+"' in math mode",ee);var dt=this.parseArguments(De,Be),It=dt.args,Ut=dt.optArgs;return this.callFunction(De,It,Ut,ee,h)},u.callFunction=function(h,_,N,ee,De){var Be={funcName:h,parser:this,token:ee,breakOnTokenText:De},dt=ra[h];if(dt&&dt.handler)return dt.handler(Be,_,N);throw new g("No function handler for "+h)},u.parseArguments=function(h,_){var N=_.numArgs+_.numOptionalArgs;if(N===0)return{args:[],optArgs:[]};for(var ee=_.greediness,De=[],Be=[],dt=0;dt<N;dt++){var It=_.argTypes&&_.argTypes[dt],Ut=dt<_.numOptionalArgs,an=dt>0&&!Ut||dt===0&&!Ut&&this.mode==="math",Tn=this.parseGroupOfType("argument to '"+h+"'",It,Ut,ee,an);if(!Tn){if(Ut){Be.push(null);continue}throw new g("Expected group after '"+h+"'",this.fetch())}(Ut?Be:De).push(Tn)}return{args:De,optArgs:Be}},u.parseGroupOfType=function(h,_,N,ee,De){switch(_){case"color":return De&&this.consumeSpaces(),this.parseColorGroup(N);case"size":return De&&this.consumeSpaces(),this.parseSizeGroup(N);case"url":return this.parseUrlGroup(N,De);case"math":case"text":return this.parseGroup(h,N,ee,void 0,_,De);case"hbox":{var Be=this.parseGroup(h,N,ee,void 0,"text",De);if(!Be)return Be;var dt={type:"styling",mode:Be.mode,body:[Be],style:"text"};return dt}case"raw":{if(De&&this.consumeSpaces(),N&&this.fetch().text==="{")return null;var It=this.parseStringGroup("raw",N,!0);if(It)return{type:"raw",mode:"text",string:It.text};throw new g("Expected raw group",this.fetch())}case"original":case null:case void 0:return this.parseGroup(h,N,ee,void 0,void 0,De);default:throw new g("Unknown group type as "+h,this.fetch())}},u.consumeSpaces=function(){for(;this.fetch().text===" ";)this.consume()},u.parseStringGroup=function(h,_,N){var ee=_?"[":"{",De=_?"]":"}",Be=this.fetch();if(Be.text!==ee){if(_)return null;if(N&&Be.text!=="EOF"&&/[^{}[\]]/.test(Be.text))return this.consume(),Be}var dt=this.mode;this.mode="text",this.expect(ee);for(var It="",Ut=this.fetch(),an=0,Tn=Ut,Pn;(Pn=this.fetch()).text!==De||N&&an>0;){switch(Pn.text){case"EOF":throw new g("Unexpected end of input in "+h,Ut.range(Tn,It));case ee:an++;break;case De:an--;break}Tn=Pn,It+=Tn.text,this.consume()}return this.expect(De),this.mode=dt,Ut.range(Tn,It)},u.parseRegexGroup=function(h,_){var N=this.mode;this.mode="text";for(var ee=this.fetch(),De=ee,Be="",dt;(dt=this.fetch()).text!=="EOF"&&h.test(Be+dt.text);)De=dt,Be+=De.text,this.consume();if(Be==="")throw new g("Invalid "+_+": '"+ee.text+"'",ee);return this.mode=N,ee.range(De,Be)},u.parseColorGroup=function(h){var _=this.parseStringGroup("color",h);if(!_)return null;var N=/^(#[a-f0-9]{3}|#?[a-f0-9]{6}|[a-z]+)$/i.exec(_.text);if(!N)throw new g("Invalid color: '"+_.text+"'",_);var ee=N[0];return/^[0-9a-f]{6}$/i.test(ee)&&(ee="#"+ee),{type:"color-token",mode:this.mode,color:ee}},u.parseSizeGroup=function(h){var _,N=!1;if(!h&&this.fetch().text!=="{"?_=this.parseRegexGroup(/^[-+]? *(?:$|\d+|\d+\.\d*|\.\d*) *[a-z]{0,2} *$/,"size"):_=this.parseStringGroup("size",h),!_)return null;!h&&_.text.length===0&&(_.text="0pt",N=!0);var ee=/([-+]?) *(\d+(?:\.\d*)?|\.\d+) *([a-z]{2})/.exec(_.text);if(!ee)throw new g("Invalid size: '"+_.text+"'",_);var De={number:+(ee[1]+ee[2]),unit:ee[3]};if(!qt(De))throw new g("Invalid unit: '"+De.unit+"'",_);return{type:"size",mode:this.mode,value:De,isBlank:N}},u.parseUrlGroup=function(h,_){this.gullet.lexer.setCatcode("%",13);var N=this.parseStringGroup("url",h,!0);if(this.gullet.lexer.setCatcode("%",14),!N)return null;var ee=N.text.replace(/\\([#$%&~_^{}])/g,"$1");return{type:"url",mode:this.mode,url:ee}},u.parseGroup=function(h,_,N,ee,De,Be){var dt=this.mode;De&&this.switchMode(De),Be&&this.consumeSpaces();var It=this.fetch(),Ut=It.text,an;if(_?Ut==="[":Ut==="{"||Ut==="\\begingroup"){this.consume();var Tn=ne.endOfGroup[Ut];this.gullet.beginGroup();var Pn=this.parseExpression(!1,Tn),Xn=this.fetch();this.expect(Tn),this.gullet.endGroup(),an={type:"ordgroup",mode:this.mode,loc:W.range(It,Xn),body:Pn,semisimple:Ut==="\\begingroup"||void 0}}else if(_)an=null;else if(an=this.parseFunction(ee,h,N)||this.parseSymbol(),an==null&&Ut[0]==="\\"&&!ka.hasOwnProperty(Ut)){if(this.settings.throwOnError)throw new g("Undefined control sequence: "+Ut,It);an=this.formatUnsupportedCmd(Ut),this.consume()}return De&&this.switchMode(dt),an},u.formLigatures=function(h){for(var _=h.length-1,N=0;N<_;++N){var ee=h[N],De=ee.text;De==="-"&&h[N+1].text==="-"&&(N+1<_&&h[N+2].text==="-"?(h.splice(N,3,{type:"textord",mode:"text",loc:W.range(ee,h[N+2]),text:"---"}),_-=2):(h.splice(N,2,{type:"textord",mode:"text",loc:W.range(ee,h[N+1]),text:"--"}),_-=1)),(De==="'"||De==="`")&&h[N+1].text===De&&(h.splice(N,2,{type:"textord",mode:"text",loc:W.range(ee,h[N+1]),text:De+De}),_-=1)}},u.parseSymbol=function(){var h=this.fetch(),_=h.text;if(/^\\verb[^a-zA-Z]/.test(_)){this.consume();var N=_.slice(5),ee=N.charAt(0)==="*";if(ee&&(N=N.slice(1)),N.length<2||N.charAt(0)!==N.slice(-1))throw new g(`\\verb assertion failed --
|
|
|
please report what input caused this bug`);return N=N.slice(1,-1),{type:"verb",mode:"text",body:N,star:ee}}pa.hasOwnProperty(_[0])&&!Rt[this.mode][_[0]]&&(this.settings.strict&&this.mode==="math"&&this.settings.reportNonstrict("unicodeTextInMathMode",'Accented Unicode text character "'+_[0]+'" used in math mode',h),_=pa[_[0]]+_.substr(1));var De=Lo.exec(_);De&&(_=_.substring(0,De.index),_==="i"?_="\u0131":_==="j"&&(_="\u0237"));var Be;if(Rt[this.mode][_]){this.settings.strict&&this.mode==="math"&&ut.indexOf(_)>=0&&this.settings.reportNonstrict("unicodeTextInMathMode",'Latin-1/Unicode text character "'+_[0]+'" used in math mode',h);var dt=Rt[this.mode][_].group,It=W.range(h),Ut;if(qe.hasOwnProperty(dt)){var an=dt;Ut={type:"atom",mode:this.mode,family:an,loc:It,text:_}}else Ut={type:dt,mode:this.mode,loc:It,text:_};Be=Ut}else if(_.charCodeAt(0)>=128)this.settings.strict&&(Ke(_.charCodeAt(0))?this.mode==="math"&&this.settings.reportNonstrict("unicodeTextInMathMode",'Unicode text character "'+_[0]+'" used in math mode',h):this.settings.reportNonstrict("unknownSymbol",'Unrecognized Unicode character "'+_[0]+'"'+(" ("+_.charCodeAt(0)+")"),h)),Be={type:"textord",mode:"text",loc:W.range(h),text:_};else return null;if(this.consume(),De)for(var Tn=0;Tn<De[0].length;Tn++){var Pn=De[0][Tn];if(!io[Pn])throw new g("Unknown accent ' "+Pn+"'",h);var Xn=io[Pn][this.mode];if(!Xn)throw new g("Accent "+Pn+" unsupported in "+this.mode+" mode",h);Be={type:"accent",mode:this.mode,loc:W.range(h),label:Xn,isStretchy:!1,isShifty:!0,base:Be}}return Be},ne}();Fi.endOfExpression=["}","\\endgroup","\\end","\\right","&"],Fi.endOfGroup={"[":"]","{":"}","\\begingroup":"\\endgroup"},Fi.SUPSUB_GREEDINESS=1;var ls=function(u,f){if(!(typeof u=="string"||u instanceof String))throw new TypeError("KaTeX can only parse string typed expression");var h=new Fi(u,f);delete h.gullet.macros.current["\\df@tag"];var _=h.parse();if(h.gullet.macros.get("\\df@tag")){if(!f.displayMode)throw new g("\\tag works only in display equations");h.gullet.feed("\\df@tag"),_=[{type:"tag",mode:"text",body:_,tag:h.parse()}]}return _},ia=ls,so=function(u,f,h){f.textContent="";var _=Na(u,h).toNode();f.appendChild(_)};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."),so=function(){throw new g("KaTeX doesn't work in quirks mode.")});var ga=function(u,f){var h=Na(u,f).toMarkup();return h},Mo=function(u,f){var h=new A(f);return ia(u,h)},ao=function(u,f,h){if(h.throwOnError||!(u instanceof g))throw u;var _=Tt.makeSpan(["katex-error"],[new ce(f)]);return _.setAttribute("title",u.toString()),_.setAttribute("style","color:"+h.errorColor),_},Na=function(u,f){var h=new A(f);try{var _=ia(u,h);return Mr(_,u,h)}catch(N){return ao(N,u,h)}},ko=function(u,f){var h=new A(f);try{var _=ia(u,h);return Qr(_,u,h)}catch(N){return ao(N,u,h)}},oo={version:"0.11.1",render:so,renderToString:ga,ParseError:g,__parse:Mo,__renderToDomTree:Na,__renderToHTMLTree:ko,__setFontMetrics:gt,__defineSymbol:S,__defineMacro:Ve,__domTree:{Span:Le,Anchor:Ce,SymbolNode:ce,SvgNode:ve,PathNode:de,LineNode:ye}},No=m.default=oo}]).default})},32834:function(ln){(function(mt,m){ln.exports=m()})(this,function(){"use strict";function mt(ze,Qe){for(var lt=0;lt<Qe.length;lt++){var le=Qe[lt];le.enumerable=le.enumerable||!1,le.configurable=!0,"value"in le&&(le.writable=!0),Object.defineProperty(ze,le.key,le)}}function m(ze,Qe,lt){return Qe&&mt(ze.prototype,Qe),lt&&mt(ze,lt),ze}function v(ze,Qe){if(ze){if(typeof ze=="string")return ae(ze,Qe);var lt=Object.prototype.toString.call(ze).slice(8,-1);if(lt==="Object"&&ze.constructor&&(lt=ze.constructor.name),lt==="Map"||lt==="Set")return Array.from(ze);if(lt==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(lt))return ae(ze,Qe)}}function ae(ze,Qe){(Qe==null||Qe>ze.length)&&(Qe=ze.length);for(var lt=0,le=new Array(Qe);lt<Qe;lt++)le[lt]=ze[lt];return le}function W(ze,Qe){var lt=typeof Symbol!="undefined"&&ze[Symbol.iterator]||ze["@@iterator"];if(lt)return(lt=lt.call(ze)).next.bind(lt);if(Array.isArray(ze)||(lt=v(ze))||Qe&&ze&&typeof ze.length=="number"){lt&&(ze=lt);var le=0;return function(){return le>=ze.length?{done:!0}:{done:!1,value:ze[le++]}}}throw new TypeError(`Invalid attempt to iterate non-iterable instance.
|
|
|
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}var fe={exports:{}};function z(){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 g(ze){fe.exports.defaults=ze}fe.exports={defaults:z(),getDefaults:z,changeDefaults:g};var q=/[&<>"']/,te=/[&<>"']/g,o=/[<>"']|&(?!#?\w+;)/,C=/[<>"']|&(?!#?\w+;)/g,M={"&":"&","<":"<",">":">",'"':""","'":"'"},y=function(Qe){return M[Qe]};function E(ze,Qe){if(Qe){if(q.test(ze))return ze.replace(te,y)}else if(o.test(ze))return ze.replace(C,y);return ze}var T=/&(#(?:\d+)|(?:#x[0-9A-Fa-f]+)|(?:\w+));?/ig;function k(ze){return ze.replace(T,function(Qe,lt){return lt=lt.toLowerCase(),lt==="colon"?":":lt.charAt(0)==="#"?lt.charAt(1)==="x"?String.fromCharCode(parseInt(lt.substring(2),16)):String.fromCharCode(+lt.substring(1)):""})}var j=/(^|[^\[])\^/g;function Z(ze,Qe){ze=ze.source||ze,Qe=Qe||"";var lt={replace:function(pe,Pe){return Pe=Pe.source||Pe,Pe=Pe.replace(j,"$1"),ze=ze.replace(pe,Pe),lt},getRegex:function(){return new RegExp(ze,Qe)}};return lt}var U=/[^\w:]/g,A=/^$|^[a-z][a-z0-9+.-]*:|^[?#]/i;function K(ze,Qe,lt){if(ze){var le;try{le=decodeURIComponent(k(lt)).replace(U,"").toLowerCase()}catch(pe){return null}if(le.indexOf("javascript:")===0||le.indexOf("vbscript:")===0||le.indexOf("data:")===0)return null}Qe&&!A.test(lt)&&(lt=ie(Qe,lt));try{lt=encodeURI(lt).replace(/%25/g,"%")}catch(pe){return null}return lt}var D={},O=/^[^:]+:\/*[^/]*$/,re=/^([^:]+:)[\s\S]*$/,oe=/^([^:]+:\/*[^/]*)[\s\S]*$/;function ie(ze,Qe){D[" "+ze]||(O.test(ze)?D[" "+ze]=ze+"/":D[" "+ze]=tt(ze,"/",!0)),ze=D[" "+ze];var lt=ze.indexOf(":")===-1;return Qe.substring(0,2)==="//"?lt?Qe:ze.replace(re,"$1")+Qe:Qe.charAt(0)==="/"?lt?Qe:ze.replace(oe,"$1")+Qe:ze+Qe}var Ee={exec:function(){}};function Me(ze){for(var Qe=1,lt,le;Qe<arguments.length;Qe++){lt=arguments[Qe];for(le in lt)Object.prototype.hasOwnProperty.call(lt,le)&&(ze[le]=lt[le])}return ze}function ke(ze,Qe){var lt=ze.replace(/\|/g,function(Pe,$e,G){for(var bt=!1,xe=$e;--xe>=0&&G[xe]==="\\";)bt=!bt;return bt?"|":" |"}),le=lt.split(/ \|/),pe=0;if(le.length>Qe)le.splice(Qe);else for(;le.length<Qe;)le.push("");for(;pe<le.length;pe++)le[pe]=le[pe].trim().replace(/\\\|/g,"|");return le}function tt(ze,Qe,lt){var le=ze.length;if(le===0)return"";for(var pe=0;pe<le;){var Pe=ze.charAt(le-pe-1);if(Pe===Qe&&!lt)pe++;else if(Pe!==Qe&<)pe++;else break}return ze.substr(0,le-pe)}function ue(ze,Qe){if(ze.indexOf(Qe[1])===-1)return-1;for(var lt=ze.length,le=0,pe=0;pe<lt;pe++)if(ze[pe]==="\\")pe++;else if(ze[pe]===Qe[0])le++;else if(ze[pe]===Qe[1]&&(le--,le<0))return pe;return-1}function X(ze){ze&&ze.sanitize&&!ze.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 L(ze,Qe){if(Qe<1)return"";for(var lt="";Qe>1;)Qe&1&&(lt+=ze),Qe>>=1,ze+=ze;return lt+ze}var se={escape:E,unescape:k,edit:Z,cleanUrl:K,resolveUrl:ie,noopTest:Ee,merge:Me,splitCells:ke,rtrim:tt,findClosingBracket:ue,checkSanitizeDeprecation:X,repeatString:L},Q=fe.exports.defaults,V=se.rtrim,x=se.splitCells,w=se.escape,H=se.findClosingBracket;function he(ze,Qe,lt){var le=Qe.href,pe=Qe.title?w(Qe.title):null,Pe=ze[1].replace(/\\([\[\]])/g,"$1");return ze[0].charAt(0)!=="!"?{type:"link",raw:lt,href:le,title:pe,text:Pe}:{type:"image",raw:lt,href:le,title:pe,text:w(Pe)}}function Ke(ze,Qe){var lt=ze.match(/^(\s+)(?:```)/);if(lt===null)return Qe;var le=lt[1];return Qe.split(`
|
|
|
`).map(function(pe){var Pe=pe.match(/^\s+/);if(Pe===null)return pe;var $e=Pe[0];return $e.length>=le.length?pe.slice(le.length):pe}).join(`
|
|
|
`)}var ft=function(){function ze(lt){this.options=lt||Q}var Qe=ze.prototype;return Qe.space=function(le){var pe=this.rules.block.newline.exec(le);if(pe)return pe[0].length>1?{type:"space",raw:pe[0]}:{raw:`
|
|
|
`}},Qe.code=function(le){var pe=this.rules.block.code.exec(le);if(pe){var Pe=pe[0].replace(/^ {1,4}/gm,"");return{type:"code",raw:pe[0],codeBlockStyle:"indented",text:this.options.pedantic?Pe:V(Pe,`
|
|
|
`)}}},Qe.fences=function(le){var pe=this.rules.block.fences.exec(le);if(pe){var Pe=pe[0],$e=Ke(Pe,pe[3]||"");return{type:"code",raw:Pe,lang:pe[2]?pe[2].trim():pe[2],text:$e}}},Qe.heading=function(le){var pe=this.rules.block.heading.exec(le);if(pe){var Pe=pe[2].trim();if(/#$/.test(Pe)){var $e=V(Pe,"#");(this.options.pedantic||!$e||/ $/.test($e))&&(Pe=$e.trim())}return{type:"heading",raw:pe[0],depth:pe[1].length,text:Pe}}},Qe.nptable=function(le){var pe=this.rules.block.nptable.exec(le);if(pe){var Pe={type:"table",header:x(pe[1].replace(/^ *| *\| *$/g,"")),align:pe[2].replace(/^ *|\| *$/g,"").split(/ *\| */),cells:pe[3]?pe[3].replace(/\n$/,"").split(`
|
|
|
`):[],raw:pe[0]};if(Pe.header.length===Pe.align.length){var $e=Pe.align.length,G;for(G=0;G<$e;G++)/^ *-+: *$/.test(Pe.align[G])?Pe.align[G]="right":/^ *:-+: *$/.test(Pe.align[G])?Pe.align[G]="center":/^ *:-+ *$/.test(Pe.align[G])?Pe.align[G]="left":Pe.align[G]=null;for($e=Pe.cells.length,G=0;G<$e;G++)Pe.cells[G]=x(Pe.cells[G],Pe.header.length);return Pe}}},Qe.hr=function(le){var pe=this.rules.block.hr.exec(le);if(pe)return{type:"hr",raw:pe[0]}},Qe.blockquote=function(le){var pe=this.rules.block.blockquote.exec(le);if(pe){var Pe=pe[0].replace(/^ *> ?/gm,"");return{type:"blockquote",raw:pe[0],text:Pe}}},Qe.list=function(le){var pe=this.rules.block.list.exec(le);if(pe){var Pe=pe[0],$e=pe[2],G=$e.length>1,bt={type:"list",raw:Pe,ordered:G,start:G?+$e.slice(0,-1):"",loose:!1,items:[]},xe=pe[0].match(this.rules.block.item),Bt=!1,en,dn,Hn,wt,Gt,mn,yn,rn,En,Zt=xe.length;Hn=this.rules.block.listItemStart.exec(xe[0]);for(var Dt=0;Dt<Zt;Dt++){if(en=xe[Dt],Pe=en,this.options.pedantic||(En=en.match(new RegExp("\\n\\s*\\n {0,"+(Hn[0].length-1)+"}\\S")),En&&(Gt=en.length-En.index+xe.slice(Dt+1).join(`
|
|
|
`).length,bt.raw=bt.raw.substring(0,bt.raw.length-Gt),en=en.substring(0,En.index),Pe=en,Zt=Dt+1)),Dt!==Zt-1){if(wt=this.rules.block.listItemStart.exec(xe[Dt+1]),this.options.pedantic?wt[1].length>Hn[1].length:wt[1].length>=Hn[0].length||wt[1].length>3){xe.splice(Dt,2,xe[Dt]+(!this.options.pedantic&&wt[1].length<Hn[0].length&&!xe[Dt].match(/\n$/)?"":`
|
|
|
`)+xe[Dt+1]),Dt--,Zt--;continue}else(!this.options.pedantic||this.options.smartLists?wt[2][wt[2].length-1]!==$e[$e.length-1]:G===(wt[2].length===1))&&(Gt=xe.slice(Dt+1).join(`
|
|
|
`).length,bt.raw=bt.raw.substring(0,bt.raw.length-Gt),Dt=Zt-1);Hn=wt}dn=en.length,en=en.replace(/^ *([*+-]|\d+[.)]) ?/,""),~en.indexOf(`
|
|
|
`)&&(dn-=en.length,en=this.options.pedantic?en.replace(/^ {1,4}/gm,""):en.replace(new RegExp("^ {1,"+dn+"}","gm"),"")),en=V(en,`
|
|
|
`),Dt!==Zt-1&&(Pe=Pe+`
|
|
|
`),mn=Bt||/\n\n(?!\s*$)/.test(Pe),Dt!==Zt-1&&(Bt=Pe.slice(-2)===`
|
|
|
|
|
|
`,mn||(mn=Bt)),mn&&(bt.loose=!0),this.options.gfm&&(yn=/^\[[ xX]\] /.test(en),rn=void 0,yn&&(rn=en[1]!==" ",en=en.replace(/^\[[ xX]\] +/,""))),bt.items.push({type:"list_item",raw:Pe,task:yn,checked:rn,loose:mn,text:en})}return bt}},Qe.html=function(le){var pe=this.rules.block.html.exec(le);if(pe)return{type:this.options.sanitize?"paragraph":"html",raw:pe[0],pre:!this.options.sanitizer&&(pe[1]==="pre"||pe[1]==="script"||pe[1]==="style"),text:this.options.sanitize?this.options.sanitizer?this.options.sanitizer(pe[0]):w(pe[0]):pe[0]}},Qe.def=function(le){var pe=this.rules.block.def.exec(le);if(pe){pe[3]&&(pe[3]=pe[3].substring(1,pe[3].length-1));var Pe=pe[1].toLowerCase().replace(/\s+/g," ");return{type:"def",tag:Pe,raw:pe[0],href:pe[2],title:pe[3]}}},Qe.table=function(le){var pe=this.rules.block.table.exec(le);if(pe){var Pe={type:"table",header:x(pe[1].replace(/^ *| *\| *$/g,"")),align:pe[2].replace(/^ *|\| *$/g,"").split(/ *\| */),cells:pe[3]?pe[3].replace(/\n$/,"").split(`
|
|
|
`):[]};if(Pe.header.length===Pe.align.length){Pe.raw=pe[0];var $e=Pe.align.length,G;for(G=0;G<$e;G++)/^ *-+: *$/.test(Pe.align[G])?Pe.align[G]="right":/^ *:-+: *$/.test(Pe.align[G])?Pe.align[G]="center":/^ *:-+ *$/.test(Pe.align[G])?Pe.align[G]="left":Pe.align[G]=null;for($e=Pe.cells.length,G=0;G<$e;G++)Pe.cells[G]=x(Pe.cells[G].replace(/^ *\| *| *\| *$/g,""),Pe.header.length);return Pe}}},Qe.lheading=function(le){var pe=this.rules.block.lheading.exec(le);if(pe)return{type:"heading",raw:pe[0],depth:pe[2].charAt(0)==="="?1:2,text:pe[1]}},Qe.paragraph=function(le){var pe=this.rules.block.paragraph.exec(le);if(pe)return{type:"paragraph",raw:pe[0],text:pe[1].charAt(pe[1].length-1)===`
|
|
|
`?pe[1].slice(0,-1):pe[1]}},Qe.text=function(le){var pe=this.rules.block.text.exec(le);if(pe)return{type:"text",raw:pe[0],text:pe[0]}},Qe.escape=function(le){var pe=this.rules.inline.escape.exec(le);if(pe)return{type:"escape",raw:pe[0],text:w(pe[1])}},Qe.tag=function(le,pe,Pe){var $e=this.rules.inline.tag.exec(le);if($e)return!pe&&/^<a /i.test($e[0])?pe=!0:pe&&/^<\/a>/i.test($e[0])&&(pe=!1),!Pe&&/^<(pre|code|kbd|script)(\s|>)/i.test($e[0])?Pe=!0:Pe&&/^<\/(pre|code|kbd|script)(\s|>)/i.test($e[0])&&(Pe=!1),{type:this.options.sanitize?"text":"html",raw:$e[0],inLink:pe,inRawBlock:Pe,text:this.options.sanitize?this.options.sanitizer?this.options.sanitizer($e[0]):w($e[0]):$e[0]}},Qe.link=function(le){var pe=this.rules.inline.link.exec(le);if(pe){var Pe=pe[2].trim();if(!this.options.pedantic&&/^</.test(Pe)){if(!/>$/.test(Pe))return;var $e=V(Pe.slice(0,-1),"\\");if((Pe.length-$e.length)%2===0)return}else{var G=H(pe[2],"()");if(G>-1){var bt=pe[0].indexOf("!")===0?5:4,xe=bt+pe[1].length+G;pe[2]=pe[2].substring(0,G),pe[0]=pe[0].substring(0,xe).trim(),pe[3]=""}}var Bt=pe[2],en="";if(this.options.pedantic){var dn=/^([^'"]*[^\s])\s+(['"])(.*)\2/.exec(Bt);dn&&(Bt=dn[1],en=dn[3])}else en=pe[3]?pe[3].slice(1,-1):"";return Bt=Bt.trim(),/^</.test(Bt)&&(this.options.pedantic&&!/>$/.test(Pe)?Bt=Bt.slice(1):Bt=Bt.slice(1,-1)),he(pe,{href:Bt&&Bt.replace(this.rules.inline._escapes,"$1"),title:en&&en.replace(this.rules.inline._escapes,"$1")},pe[0])}},Qe.reflink=function(le,pe){var Pe;if((Pe=this.rules.inline.reflink.exec(le))||(Pe=this.rules.inline.nolink.exec(le))){var $e=(Pe[2]||Pe[1]).replace(/\s+/g," ");if($e=pe[$e.toLowerCase()],!$e||!$e.href){var G=Pe[0].charAt(0);return{type:"text",raw:G,text:G}}return he(Pe,$e,Pe[0])}},Qe.emStrong=function(le,pe,Pe){Pe===void 0&&(Pe="");var $e=this.rules.inline.emStrong.lDelim.exec(le);if($e&&!($e[3]&&Pe.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 G=$e[1]||$e[2]||"";if(!G||G&&(Pe===""||this.rules.inline.punctuation.exec(Pe))){var bt=$e[0].length-1,xe,Bt,en=bt,dn=0,Hn=$e[0][0]==="*"?this.rules.inline.emStrong.rDelimAst:this.rules.inline.emStrong.rDelimUnd;for(Hn.lastIndex=0,pe=pe.slice(-1*le.length+bt);($e=Hn.exec(pe))!=null;)if(xe=$e[1]||$e[2]||$e[3]||$e[4]||$e[5]||$e[6],!!xe){if(Bt=xe.length,$e[3]||$e[4]){en+=Bt;continue}else if(($e[5]||$e[6])&&bt%3&&!((bt+Bt)%3)){dn+=Bt;continue}if(en-=Bt,!(en>0))return Bt=Math.min(Bt,Bt+en+dn),Math.min(bt,Bt)%2?{type:"em",raw:le.slice(0,bt+$e.index+Bt+1),text:le.slice(1,bt+$e.index+Bt)}:{type:"strong",raw:le.slice(0,bt+$e.index+Bt+1),text:le.slice(2,bt+$e.index+Bt-1)}}}}},Qe.codespan=function(le){var pe=this.rules.inline.code.exec(le);if(pe){var Pe=pe[2].replace(/\n/g," "),$e=/[^ ]/.test(Pe),G=/^ /.test(Pe)&&/ $/.test(Pe);return $e&&G&&(Pe=Pe.substring(1,Pe.length-1)),Pe=w(Pe,!0),{type:"codespan",raw:pe[0],text:Pe}}},Qe.br=function(le){var pe=this.rules.inline.br.exec(le);if(pe)return{type:"br",raw:pe[0]}},Qe.del=function(le){var pe=this.rules.inline.del.exec(le);if(pe)return{type:"del",raw:pe[0],text:pe[2]}},Qe.autolink=function(le,pe){var Pe=this.rules.inline.autolink.exec(le);if(Pe){var $e,G;return Pe[2]==="@"?($e=w(this.options.mangle?pe(Pe[1]):Pe[1]),G="mailto:"+$e):($e=w(Pe[1]),G=$e),{type:"link",raw:Pe[0],text:$e,href:G,tokens:[{type:"text",raw:$e,text:$e}]}}},Qe.url=function(le,pe){var Pe;if(Pe=this.rules.inline.url.exec(le)){var $e,G;if(Pe[2]==="@")$e=w(this.options.mangle?pe(Pe[0]):Pe[0]),G="mailto:"+$e;else{var bt;do bt=Pe[0],Pe[0]=this.rules.inline._backpedal.exec(Pe[0])[0];while(bt!==Pe[0]);$e=w(Pe[0]),Pe[1]==="www."?G="http://"+$e:G=$e}return{type:"link",raw:Pe[0],text:$e,href:G,tokens:[{type:"text",raw:$e,text:$e}]}}},Qe.inlineText=function(le,pe,Pe){var $e=this.rules.inline.text.exec(le);if($e){var G;return pe?G=this.options.sanitize?this.options.sanitizer?this.options.sanitizer($e[0]):w($e[0]):$e[0]:G=w(this.options.smartypants?Pe($e[0]):$e[0]),{type:"text",raw:$e[0],text:G}}},ze}(),Ue=se.noopTest,st=se.edit,pt=se.merge,Et={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]+/};Et._label=/(?!\s*\])(?:\\[\[\]]|[^\[\]])+/,Et._title=/(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/,Et.def=st(Et.def).replace("label",Et._label).replace("title",Et._title).getRegex(),Et.bullet=/(?:[*+-]|\d{1,9}[.)])/,Et.item=/^( *)(bull) ?[^\n]*(?:\n(?! *bull ?)[^\n]*)*/,Et.item=st(Et.item,"gm").replace(/bull/g,Et.bullet).getRegex(),Et.listItemStart=st(/^( *)(bull) */).replace("bull",Et.bullet).getRegex(),Et.list=st(Et.list).replace(/bull/g,Et.bullet).replace("hr","\\n+(?=\\1?(?:(?:- *){3,}|(?:_ *){3,}|(?:\\* *){3,})(?:\\n+|$))").replace("def","\\n+(?="+Et.def.source+")").getRegex(),Et._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",Et._comment=/<!--(?!-?>)[\s\S]*?(?:-->|$)/,Et.html=st(Et.html,"i").replace("comment",Et._comment).replace("tag",Et._tag).replace("attribute",/ +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex(),Et.paragraph=st(Et._paragraph).replace("hr",Et.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",Et._tag).getRegex(),Et.blockquote=st(Et.blockquote).replace("paragraph",Et.paragraph).getRegex(),Et.normal=pt({},Et),Et.gfm=pt({},Et.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*|$)"}),Et.gfm.nptable=st(Et.gfm.nptable).replace("hr",Et.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",Et._tag).getRegex(),Et.gfm.table=st(Et.gfm.table).replace("hr",Et.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",Et._tag).getRegex(),Et.pedantic=pt({},Et.normal,{html:st(`^ *(?:comment *(?:\\n|\\s*$)|<(tag)[\\s\\S]+?</\\1> *(?:\\n{2,}|\\s*$)|<tag(?:"[^"]*"|'[^']*'|\\s[^'"/>\\s]*)*?/?> *(?:\\n{2,}|\\s*$))`).replace("comment",Et._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:st(Et.normal._paragraph).replace("hr",Et.hr).replace("heading",` *#{1,6} *[^
|
|
|
]`).replace("lheading",Et.lheading).replace("blockquote"," {0,3}>").replace("|fences","").replace("|list","").replace("|html","").getRegex()});var Ne={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])/};Ne._punctuation="!\"#$%&'()+\\-.,/:;<=>?@\\[\\]`^{|}~",Ne.punctuation=st(Ne.punctuation).replace(/punctuation/g,Ne._punctuation).getRegex(),Ne.blockSkip=/\[[^\]]*?\]\([^\)]*?\)|`[^`]*?`|<[^>]*?>/g,Ne.escapedEmSt=/\\\*|\\_/g,Ne._comment=st(Et._comment).replace("(?:-->|$)","-->").getRegex(),Ne.emStrong.lDelim=st(Ne.emStrong.lDelim).replace(/punct/g,Ne._punctuation).getRegex(),Ne.emStrong.rDelimAst=st(Ne.emStrong.rDelimAst,"g").replace(/punct/g,Ne._punctuation).getRegex(),Ne.emStrong.rDelimUnd=st(Ne.emStrong.rDelimUnd,"g").replace(/punct/g,Ne._punctuation).getRegex(),Ne._escapes=/\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/g,Ne._scheme=/[a-zA-Z][a-zA-Z0-9+.-]{1,31}/,Ne._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])?)+(?![-_])/,Ne.autolink=st(Ne.autolink).replace("scheme",Ne._scheme).replace("email",Ne._email).getRegex(),Ne._attribute=/\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/,Ne.tag=st(Ne.tag).replace("comment",Ne._comment).replace("attribute",Ne._attribute).getRegex(),Ne._label=/(?:\[(?:\\.|[^\[\]\\])*\]|\\.|`[^`]*`|[^\[\]\\`])*?/,Ne._href=/<(?:\\.|[^\n<>\\])+>|[^\s\x00-\x1f]*/,Ne._title=/"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/,Ne.link=st(Ne.link).replace("label",Ne._label).replace("href",Ne._href).replace("title",Ne._title).getRegex(),Ne.reflink=st(Ne.reflink).replace("label",Ne._label).getRegex(),Ne.reflinkSearch=st(Ne.reflinkSearch,"g").replace("reflink",Ne.reflink).replace("nolink",Ne.nolink).getRegex(),Ne.normal=pt({},Ne),Ne.pedantic=pt({},Ne.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:st(/^!?\[(label)\]\((.*?)\)/).replace("label",Ne._label).getRegex(),reflink:st(/^!?\[(label)\]\s*\[([^\]]*)\]/).replace("label",Ne._label).getRegex()}),Ne.gfm=pt({},Ne.normal,{escape:st(Ne.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.!#$%&'*+\/=?_`{\|}~-]+@)))/}),Ne.gfm.url=st(Ne.gfm.url,"i").replace("email",Ne.gfm._extended_email).getRegex(),Ne.breaks=pt({},Ne.gfm,{br:st(Ne.br).replace("{2,}","*").getRegex(),text:st(Ne.gfm.text).replace("\\b_","\\b_| {2,}\\n").replace(/\{2,\}/g,"*").getRegex()});var St={block:Et,inline:Ne},at=ft,Nt=fe.exports.defaults,Ge=St.block,je=St.inline,Re=se.repeatString;function _e(ze){return ze.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 Y(ze){var Qe="",lt,le,pe=ze.length;for(lt=0;lt<pe;lt++)le=ze.charCodeAt(lt),Math.random()>.5&&(le="x"+le.toString(16)),Qe+="&#"+le+";";return Qe}var Le=function(){function ze(lt){this.tokens=[],this.tokens.links=Object.create(null),this.options=lt||Nt,this.options.tokenizer=this.options.tokenizer||new at,this.tokenizer=this.options.tokenizer,this.tokenizer.options=this.options;var le={block:Ge.normal,inline:je.normal};this.options.pedantic?(le.block=Ge.pedantic,le.inline=je.pedantic):this.options.gfm&&(le.block=Ge.gfm,this.options.breaks?le.inline=je.breaks:le.inline=je.gfm),this.tokenizer.rules=le}ze.lex=function(le,pe){var Pe=new ze(pe);return Pe.lex(le)},ze.lexInline=function(le,pe){var Pe=new ze(pe);return Pe.inlineTokens(le)};var Qe=ze.prototype;return Qe.lex=function(le){return le=le.replace(/\r\n|\r/g,`
|
|
|
`).replace(/\t/g," "),this.blockTokens(le,this.tokens,!0),this.inline(this.tokens),this.tokens},Qe.blockTokens=function(le,pe,Pe){pe===void 0&&(pe=[]),Pe===void 0&&(Pe=!0),this.options.pedantic&&(le=le.replace(/^ +$/gm,""));for(var $e,G,bt,xe;le;){if($e=this.tokenizer.space(le)){le=le.substring($e.raw.length),$e.type&&pe.push($e);continue}if($e=this.tokenizer.code(le)){le=le.substring($e.raw.length),xe=pe[pe.length-1],xe&&xe.type==="paragraph"?(xe.raw+=`
|
|
|
`+$e.raw,xe.text+=`
|
|
|
`+$e.text):pe.push($e);continue}if($e=this.tokenizer.fences(le)){le=le.substring($e.raw.length),pe.push($e);continue}if($e=this.tokenizer.heading(le)){le=le.substring($e.raw.length),pe.push($e);continue}if($e=this.tokenizer.nptable(le)){le=le.substring($e.raw.length),pe.push($e);continue}if($e=this.tokenizer.hr(le)){le=le.substring($e.raw.length),pe.push($e);continue}if($e=this.tokenizer.blockquote(le)){le=le.substring($e.raw.length),$e.tokens=this.blockTokens($e.text,[],Pe),pe.push($e);continue}if($e=this.tokenizer.list(le)){for(le=le.substring($e.raw.length),bt=$e.items.length,G=0;G<bt;G++)$e.items[G].tokens=this.blockTokens($e.items[G].text,[],!1);pe.push($e);continue}if($e=this.tokenizer.html(le)){le=le.substring($e.raw.length),pe.push($e);continue}if(Pe&&($e=this.tokenizer.def(le))){le=le.substring($e.raw.length),this.tokens.links[$e.tag]||(this.tokens.links[$e.tag]={href:$e.href,title:$e.title});continue}if($e=this.tokenizer.table(le)){le=le.substring($e.raw.length),pe.push($e);continue}if($e=this.tokenizer.lheading(le)){le=le.substring($e.raw.length),pe.push($e);continue}if(Pe&&($e=this.tokenizer.paragraph(le))){le=le.substring($e.raw.length),pe.push($e);continue}if($e=this.tokenizer.text(le)){le=le.substring($e.raw.length),xe=pe[pe.length-1],xe&&xe.type==="text"?(xe.raw+=`
|
|
|
`+$e.raw,xe.text+=`
|
|
|
`+$e.text):pe.push($e);continue}if(le){var Bt="Infinite loop on byte: "+le.charCodeAt(0);if(this.options.silent){console.error(Bt);break}else throw new Error(Bt)}}return pe},Qe.inline=function(le){var pe,Pe,$e,G,bt,xe,Bt=le.length;for(pe=0;pe<Bt;pe++)switch(xe=le[pe],xe.type){case"paragraph":case"text":case"heading":{xe.tokens=[],this.inlineTokens(xe.text,xe.tokens);break}case"table":{for(xe.tokens={header:[],cells:[]},G=xe.header.length,Pe=0;Pe<G;Pe++)xe.tokens.header[Pe]=[],this.inlineTokens(xe.header[Pe],xe.tokens.header[Pe]);for(G=xe.cells.length,Pe=0;Pe<G;Pe++)for(bt=xe.cells[Pe],xe.tokens.cells[Pe]=[],$e=0;$e<bt.length;$e++)xe.tokens.cells[Pe][$e]=[],this.inlineTokens(bt[$e],xe.tokens.cells[Pe][$e]);break}case"blockquote":{this.inline(xe.tokens);break}case"list":{for(G=xe.items.length,Pe=0;Pe<G;Pe++)this.inline(xe.items[Pe].tokens);break}}return le},Qe.inlineTokens=function(le,pe,Pe,$e){pe===void 0&&(pe=[]),Pe===void 0&&(Pe=!1),$e===void 0&&($e=!1);var G,bt,xe=le,Bt,en,dn;if(this.tokens.links){var Hn=Object.keys(this.tokens.links);if(Hn.length>0)for(;(Bt=this.tokenizer.rules.inline.reflinkSearch.exec(xe))!=null;)Hn.includes(Bt[0].slice(Bt[0].lastIndexOf("[")+1,-1))&&(xe=xe.slice(0,Bt.index)+"["+Re("a",Bt[0].length-2)+"]"+xe.slice(this.tokenizer.rules.inline.reflinkSearch.lastIndex))}for(;(Bt=this.tokenizer.rules.inline.blockSkip.exec(xe))!=null;)xe=xe.slice(0,Bt.index)+"["+Re("a",Bt[0].length-2)+"]"+xe.slice(this.tokenizer.rules.inline.blockSkip.lastIndex);for(;(Bt=this.tokenizer.rules.inline.escapedEmSt.exec(xe))!=null;)xe=xe.slice(0,Bt.index)+"++"+xe.slice(this.tokenizer.rules.inline.escapedEmSt.lastIndex);for(;le;){if(en||(dn=""),en=!1,G=this.tokenizer.escape(le)){le=le.substring(G.raw.length),pe.push(G);continue}if(G=this.tokenizer.tag(le,Pe,$e)){le=le.substring(G.raw.length),Pe=G.inLink,$e=G.inRawBlock;var wt=pe[pe.length-1];wt&&G.type==="text"&&wt.type==="text"?(wt.raw+=G.raw,wt.text+=G.text):pe.push(G);continue}if(G=this.tokenizer.link(le)){le=le.substring(G.raw.length),G.type==="link"&&(G.tokens=this.inlineTokens(G.text,[],!0,$e)),pe.push(G);continue}if(G=this.tokenizer.reflink(le,this.tokens.links)){le=le.substring(G.raw.length);var Gt=pe[pe.length-1];G.type==="link"?(G.tokens=this.inlineTokens(G.text,[],!0,$e),pe.push(G)):Gt&&G.type==="text"&&Gt.type==="text"?(Gt.raw+=G.raw,Gt.text+=G.text):pe.push(G);continue}if(G=this.tokenizer.emStrong(le,xe,dn)){le=le.substring(G.raw.length),G.tokens=this.inlineTokens(G.text,[],Pe,$e),pe.push(G);continue}if(G=this.tokenizer.codespan(le)){le=le.substring(G.raw.length),pe.push(G);continue}if(G=this.tokenizer.br(le)){le=le.substring(G.raw.length),pe.push(G);continue}if(G=this.tokenizer.del(le)){le=le.substring(G.raw.length),G.tokens=this.inlineTokens(G.text,[],Pe,$e),pe.push(G);continue}if(G=this.tokenizer.autolink(le,Y)){le=le.substring(G.raw.length),pe.push(G);continue}if(!Pe&&(G=this.tokenizer.url(le,Y))){le=le.substring(G.raw.length),pe.push(G);continue}if(G=this.tokenizer.inlineText(le,$e,_e)){le=le.substring(G.raw.length),G.raw.slice(-1)!=="_"&&(dn=G.raw.slice(-1)),en=!0,bt=pe[pe.length-1],bt&&bt.type==="text"?(bt.raw+=G.raw,bt.text+=G.text):pe.push(G);continue}if(le){var mn="Infinite loop on byte: "+le.charCodeAt(0);if(this.options.silent){console.error(mn);break}else throw new Error(mn)}}return pe},m(ze,null,[{key:"rules",get:function(){return{block:Ge,inline:je}}}]),ze}(),Ce=fe.exports.defaults,B=se.cleanUrl,P=se.escape,ce=function(){function ze(lt){this.options=lt||Ce}var Qe=ze.prototype;return Qe.code=function(le,pe,Pe){var $e=(pe||"").match(/\S*/)[0];if(this.options.highlight){var G=this.options.highlight(le,$e);G!=null&&G!==le&&(Pe=!0,le=G)}return le=le.replace(/\n$/,"")+`
|
|
|
`,$e?'<pre><code class="'+this.options.langPrefix+P($e,!0)+'">'+(Pe?le:P(le,!0))+`</code></pre>
|
|
|
`:"<pre><code>"+(Pe?le:P(le,!0))+`</code></pre>
|
|
|
`},Qe.blockquote=function(le){return`<blockquote>
|
|
|
`+le+`</blockquote>
|
|
|
`},Qe.html=function(le){return le},Qe.heading=function(le,pe,Pe,$e){return this.options.headerIds?"<h"+pe+' id="'+this.options.headerPrefix+$e.slug(Pe)+'">'+le+"</h"+pe+`>
|
|
|
`:"<h"+pe+">"+le+"</h"+pe+`>
|
|
|
`},Qe.hr=function(){return this.options.xhtml?`<hr/>
|
|
|
`:`<hr>
|
|
|
`},Qe.list=function(le,pe,Pe){var $e=pe?"ol":"ul",G=pe&&Pe!==1?' start="'+Pe+'"':"";return"<"+$e+G+`>
|
|
|
`+le+"</"+$e+`>
|
|
|
`},Qe.listitem=function(le){return"<li>"+le+`</li>
|
|
|
`},Qe.checkbox=function(le){return"<input "+(le?'checked="" ':"")+'disabled="" type="checkbox"'+(this.options.xhtml?" /":"")+"> "},Qe.paragraph=function(le){return"<p>"+le+`</p>
|
|
|
`},Qe.table=function(le,pe){return pe&&(pe="<tbody>"+pe+"</tbody>"),`<table>
|
|
|
<thead>
|
|
|
`+le+`</thead>
|
|
|
`+pe+`</table>
|
|
|
`},Qe.tablerow=function(le){return`<tr>
|
|
|
`+le+`</tr>
|
|
|
`},Qe.tablecell=function(le,pe){var Pe=pe.header?"th":"td",$e=pe.align?"<"+Pe+' align="'+pe.align+'">':"<"+Pe+">";return $e+le+"</"+Pe+`>
|
|
|
`},Qe.strong=function(le){return"<strong>"+le+"</strong>"},Qe.em=function(le){return"<em>"+le+"</em>"},Qe.codespan=function(le){return"<code>"+le+"</code>"},Qe.br=function(){return this.options.xhtml?"<br/>":"<br>"},Qe.del=function(le){return"<del>"+le+"</del>"},Qe.link=function(le,pe,Pe){if(le=B(this.options.sanitize,this.options.baseUrl,le),le===null)return Pe;var $e='<a href="'+P(le)+'"';return pe&&($e+=' title="'+pe+'"'),$e+=">"+Pe+"</a>",$e},Qe.image=function(le,pe,Pe){if(le=B(this.options.sanitize,this.options.baseUrl,le),le===null)return Pe;var $e='<img src="'+le+'" alt="'+Pe+'"';return pe&&($e+=' title="'+pe+'"'),$e+=this.options.xhtml?"/>":">",$e},Qe.text=function(le){return le},ze}(),ve=function(){function ze(){}var Qe=ze.prototype;return Qe.strong=function(le){return le},Qe.em=function(le){return le},Qe.codespan=function(le){return le},Qe.del=function(le){return le},Qe.html=function(le){return le},Qe.text=function(le){return le},Qe.link=function(le,pe,Pe){return""+Pe},Qe.image=function(le,pe,Pe){return""+Pe},Qe.br=function(){return""},ze}(),de=function(){function ze(){this.seen={}}var Qe=ze.prototype;return Qe.serialize=function(le){return le.toLowerCase().trim().replace(/<[!\/a-z].*?>/ig,"").replace(/[\u2000-\u206F\u2E00-\u2E7F\\'!"#$%&()*+,./:;<=>?@[\]^`{|}~]/g,"").replace(/\s/g,"-")},Qe.getNextSafeSlug=function(le,pe){var Pe=le,$e=0;if(this.seen.hasOwnProperty(Pe)){$e=this.seen[le];do $e++,Pe=le+"-"+$e;while(this.seen.hasOwnProperty(Pe))}return pe||(this.seen[le]=$e,this.seen[Pe]=0),Pe},Qe.slug=function(le,pe){pe===void 0&&(pe={});var Pe=this.serialize(le);return this.getNextSafeSlug(Pe,pe.dryrun)},ze}(),ye=ce,Te=ve,we=de,Ie=fe.exports.defaults,Ae=se.unescape,Xe=function(){function ze(lt){this.options=lt||Ie,this.options.renderer=this.options.renderer||new ye,this.renderer=this.options.renderer,this.renderer.options=this.options,this.textRenderer=new Te,this.slugger=new we}ze.parse=function(le,pe){var Pe=new ze(pe);return Pe.parse(le)},ze.parseInline=function(le,pe){var Pe=new ze(pe);return Pe.parseInline(le)};var Qe=ze.prototype;return Qe.parse=function(le,pe){pe===void 0&&(pe=!0);var Pe="",$e,G,bt,xe,Bt,en,dn,Hn,wt,Gt,mn,yn,rn,En,Zt,Dt,Mt,gn,Ln=le.length;for($e=0;$e<Ln;$e++)switch(Gt=le[$e],Gt.type){case"space":continue;case"hr":{Pe+=this.renderer.hr();continue}case"heading":{Pe+=this.renderer.heading(this.parseInline(Gt.tokens),Gt.depth,Ae(this.parseInline(Gt.tokens,this.textRenderer)),this.slugger);continue}case"code":{Pe+=this.renderer.code(Gt.text,Gt.lang,Gt.escaped);continue}case"table":{for(Hn="",dn="",xe=Gt.header.length,G=0;G<xe;G++)dn+=this.renderer.tablecell(this.parseInline(Gt.tokens.header[G]),{header:!0,align:Gt.align[G]});for(Hn+=this.renderer.tablerow(dn),wt="",xe=Gt.cells.length,G=0;G<xe;G++){for(en=Gt.tokens.cells[G],dn="",Bt=en.length,bt=0;bt<Bt;bt++)dn+=this.renderer.tablecell(this.parseInline(en[bt]),{header:!1,align:Gt.align[bt]});wt+=this.renderer.tablerow(dn)}Pe+=this.renderer.table(Hn,wt);continue}case"blockquote":{wt=this.parse(Gt.tokens),Pe+=this.renderer.blockquote(wt);continue}case"list":{for(mn=Gt.ordered,yn=Gt.start,rn=Gt.loose,xe=Gt.items.length,wt="",G=0;G<xe;G++)Zt=Gt.items[G],Dt=Zt.checked,Mt=Zt.task,En="",Zt.task&&(gn=this.renderer.checkbox(Dt),rn?Zt.tokens.length>0&&Zt.tokens[0].type==="text"?(Zt.tokens[0].text=gn+" "+Zt.tokens[0].text,Zt.tokens[0].tokens&&Zt.tokens[0].tokens.length>0&&Zt.tokens[0].tokens[0].type==="text"&&(Zt.tokens[0].tokens[0].text=gn+" "+Zt.tokens[0].tokens[0].text)):Zt.tokens.unshift({type:"text",text:gn}):En+=gn),En+=this.parse(Zt.tokens,rn),wt+=this.renderer.listitem(En,Mt,Dt);Pe+=this.renderer.list(wt,mn,yn);continue}case"html":{Pe+=this.renderer.html(Gt.text);continue}case"paragraph":{Pe+=this.renderer.paragraph(this.parseInline(Gt.tokens));continue}case"text":{for(wt=Gt.tokens?this.parseInline(Gt.tokens):Gt.text;$e+1<Ln&&le[$e+1].type==="text";)Gt=le[++$e],wt+=`
|
|
|
`+(Gt.tokens?this.parseInline(Gt.tokens):Gt.text);Pe+=pe?this.renderer.paragraph(wt):wt;continue}default:{var ut='Token with "'+Gt.type+'" type was not found.';if(this.options.silent){console.error(ut);return}else throw new Error(ut)}}return Pe},Qe.parseInline=function(le,pe){pe=pe||this.renderer;var Pe="",$e,G,bt=le.length;for($e=0;$e<bt;$e++)switch(G=le[$e],G.type){case"escape":{Pe+=pe.text(G.text);break}case"html":{Pe+=pe.html(G.text);break}case"link":{Pe+=pe.link(G.href,G.title,this.parseInline(G.tokens,pe));break}case"image":{Pe+=pe.image(G.href,G.title,G.text);break}case"strong":{Pe+=pe.strong(this.parseInline(G.tokens,pe));break}case"em":{Pe+=pe.em(this.parseInline(G.tokens,pe));break}case"codespan":{Pe+=pe.codespan(G.text);break}case"br":{Pe+=pe.br();break}case"del":{Pe+=pe.del(this.parseInline(G.tokens,pe));break}case"text":{Pe+=pe.text(G.text);break}default:{var xe='Token with "'+G.type+'" type was not found.';if(this.options.silent){console.error(xe);return}else throw new Error(xe)}}return Pe},ze}(),gt=Le,ht=Xe,nt=ft,Oe=ce,qe=ve,rt=de,ot=se.merge,Rt=se.checkSanitizeDeprecation,S=se.escape,R=fe.exports.getDefaults,Ze=fe.exports.changeDefaults,J=fe.exports.defaults;function be(ze,Qe,lt){if(typeof ze=="undefined"||ze===null)throw new Error("marked(): input parameter is undefined or null");if(typeof ze!="string")throw new Error("marked(): input parameter is of type "+Object.prototype.toString.call(ze)+", string expected");if(typeof Qe=="function"&&(lt=Qe,Qe=null),Qe=ot({},be.defaults,Qe||{}),Rt(Qe),lt){var le=Qe.highlight,pe;try{pe=gt.lex(ze,Qe)}catch(bt){return lt(bt)}var Pe=function(xe){var Bt;if(!xe)try{Qe.walkTokens&&be.walkTokens(pe,Qe.walkTokens),Bt=ht.parse(pe,Qe)}catch(en){xe=en}return Qe.highlight=le,xe?lt(xe):lt(null,Bt)};if(!le||le.length<3||(delete Qe.highlight,!pe.length))return Pe();var $e=0;be.walkTokens(pe,function(bt){bt.type==="code"&&($e++,setTimeout(function(){le(bt.text,bt.lang,function(xe,Bt){if(xe)return Pe(xe);Bt!=null&&Bt!==bt.text&&(bt.text=Bt,bt.escaped=!0),$e--,$e===0&&Pe()})},0))}),$e===0&&Pe();return}try{var G=gt.lex(ze,Qe);return Qe.walkTokens&&be.walkTokens(G,Qe.walkTokens),ht.parse(G,Qe)}catch(bt){if(bt.message+=`
|
|
|
Please report this to https://github.com/markedjs/marked.`,Qe.silent)return"<p>An error occurred:</p><pre>"+S(bt.message+"",!0)+"</pre>";throw bt}}be.options=be.setOptions=function(ze){return ot(be.defaults,ze),Ze(be.defaults),be},be.getDefaults=R,be.defaults=J,be.use=function(ze){var Qe=ot({},ze);if(ze.renderer&&function(){var le=be.defaults.renderer||new Oe,pe=function(G){var bt=le[G];le[G]=function(){for(var xe=arguments.length,Bt=new Array(xe),en=0;en<xe;en++)Bt[en]=arguments[en];var dn=ze.renderer[G].apply(le,Bt);return dn===!1&&(dn=bt.apply(le,Bt)),dn}};for(var Pe in ze.renderer)pe(Pe);Qe.renderer=le}(),ze.tokenizer&&function(){var le=be.defaults.tokenizer||new nt,pe=function(G){var bt=le[G];le[G]=function(){for(var xe=arguments.length,Bt=new Array(xe),en=0;en<xe;en++)Bt[en]=arguments[en];var dn=ze.tokenizer[G].apply(le,Bt);return dn===!1&&(dn=bt.apply(le,Bt)),dn}};for(var Pe in ze.tokenizer)pe(Pe);Qe.tokenizer=le}(),ze.walkTokens){var lt=be.defaults.walkTokens;Qe.walkTokens=function(le){ze.walkTokens(le),lt&<(le)}}be.setOptions(Qe)},be.walkTokens=function(ze,Qe){for(var lt=W(ze),le;!(le=lt()).done;){var pe=le.value;switch(Qe(pe),pe.type){case"table":{for(var Pe=W(pe.tokens.header),$e;!($e=Pe()).done;){var G=$e.value;be.walkTokens(G,Qe)}for(var bt=W(pe.tokens.cells),xe;!(xe=bt()).done;)for(var Bt=xe.value,en=W(Bt),dn;!(dn=en()).done;){var Hn=dn.value;be.walkTokens(Hn,Qe)}break}case"list":{be.walkTokens(pe.items,Qe);break}default:pe.tokens&&be.walkTokens(pe.tokens,Qe)}}},be.parseInline=function(ze,Qe){if(typeof ze=="undefined"||ze===null)throw new Error("marked.parseInline(): input parameter is undefined or null");if(typeof ze!="string")throw new Error("marked.parseInline(): input parameter is of type "+Object.prototype.toString.call(ze)+", string expected");Qe=ot({},be.defaults,Qe||{}),Rt(Qe);try{var lt=gt.lexInline(ze,Qe);return Qe.walkTokens&&be.walkTokens(lt,Qe.walkTokens),ht.parseInline(lt,Qe)}catch(le){if(le.message+=`
|
|
|
Please report this to https://github.com/markedjs/marked.`,Qe.silent)return"<p>An error occurred:</p><pre>"+S(le.message+"",!0)+"</pre>";throw le}},be.Parser=ht,be.parser=ht.parse,be.Renderer=Oe,be.TextRenderer=qe,be.Lexer=gt,be.lexer=gt.lex,be.Tokenizer=nt,be.Slugger=rt,be.parse=be;var zt=be;return zt})},11690:function(ln){const mt=/[&<>"']/,m=/[&<>"']/g,v=/[<>"']|&(?!#?\w+;)/,ae=/[<>"']|&(?!#?\w+;)/g,W={"&":"&","<":"<",">":">",'"':""","'":"'"},fe=ie=>W[ie];function z(ie,Ee){if(Ee){if(mt.test(ie))return ie.replace(m,fe)}else if(v.test(ie))return ie.replace(ae,fe);return ie}const g=/&(#(?:\d+)|(?:#x[0-9A-Fa-f]+)|(?:\w+));?/ig;function q(ie){return ie.replace(g,(Ee,Me)=>(Me=Me.toLowerCase(),Me==="colon"?":":Me.charAt(0)==="#"?Me.charAt(1)==="x"?String.fromCharCode(parseInt(Me.substring(2),16)):String.fromCharCode(+Me.substring(1)):""))}const te=/(^|[^\[])\^/g;function o(ie,Ee){ie=ie.source||ie,Ee=Ee||"";const Me={replace:(ke,tt)=>(tt=tt.source||tt,tt=tt.replace(te,"$1"),ie=ie.replace(ke,tt),Me),getRegex:()=>new RegExp(ie,Ee)};return Me}const C=/[^\w:]/g,M=/^$|^[a-z][a-z0-9+.-]*:|^[?#]/i;function y(ie,Ee,Me){if(ie){let ke;try{ke=decodeURIComponent(q(Me)).replace(C,"").toLowerCase()}catch(tt){return null}if(ke.indexOf("javascript:")===0||ke.indexOf("vbscript:")===0||ke.indexOf("data:")===0)return null}Ee&&!M.test(Me)&&(Me=Z(Ee,Me));try{Me=encodeURI(Me).replace(/%25/g,"%")}catch(ke){return null}return Me}const E={},T=/^[^:]+:\/*[^/]*$/,k=/^([^:]+:)[\s\S]*$/,j=/^([^:]+:\/*[^/]*)[\s\S]*$/;function Z(ie,Ee){E[" "+ie]||(T.test(ie)?E[" "+ie]=ie+"/":E[" "+ie]=D(ie,"/",!0)),ie=E[" "+ie];const Me=ie.indexOf(":")===-1;return Ee.substring(0,2)==="//"?Me?Ee:ie.replace(k,"$1")+Ee:Ee.charAt(0)==="/"?Me?Ee:ie.replace(j,"$1")+Ee:ie+Ee}const U={exec:function(){}};function A(ie){let Ee=1,Me,ke;for(;Ee<arguments.length;Ee++){Me=arguments[Ee];for(ke in Me)Object.prototype.hasOwnProperty.call(Me,ke)&&(ie[ke]=Me[ke])}return ie}function K(ie,Ee){const Me=ie.replace(/\|/g,(ue,X,L)=>{let se=!1,Q=X;for(;--Q>=0&&L[Q]==="\\";)se=!se;return se?"|":" |"}),ke=Me.split(/ \|/);let tt=0;if(ke.length>Ee)ke.splice(Ee);else for(;ke.length<Ee;)ke.push("");for(;tt<ke.length;tt++)ke[tt]=ke[tt].trim().replace(/\\\|/g,"|");return ke}function D(ie,Ee,Me){const ke=ie.length;if(ke===0)return"";let tt=0;for(;tt<ke;){const ue=ie.charAt(ke-tt-1);if(ue===Ee&&!Me)tt++;else if(ue!==Ee&&Me)tt++;else break}return ie.substr(0,ke-tt)}function O(ie,Ee){if(ie.indexOf(Ee[1])===-1)return-1;const Me=ie.length;let ke=0,tt=0;for(;tt<Me;tt++)if(ie[tt]==="\\")tt++;else if(ie[tt]===Ee[0])ke++;else if(ie[tt]===Ee[1]&&(ke--,ke<0))return tt;return-1}function re(ie){ie&&ie.sanitize&&!ie.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(ie,Ee){if(Ee<1)return"";let Me="";for(;Ee>1;)Ee&1&&(Me+=ie),Ee>>=1,ie+=ie;return Me+ie}ln.exports={escape:z,unescape:q,edit:o,cleanUrl:y,resolveUrl:Z,noopTest:U,merge:A,splitCells:K,rtrim:D,findClosingBracket:O,checkSanitizeDeprecation:re,repeatString:oe}},75918:function(ln,mt,m){"use strict";m.d(mt,{Wi:function(){return g},Z0:function(){return q},aU:function(){return z},eZ:function(){return o},wY:function(){return te}});var v=m(4348),ae=m(69323),W=m(13268),fe=function(C,M,y,E){function T(k){return k instanceof y?k:new y(function(j){j(k)})}return new(y||(y=Promise))(function(k,j){function Z(K){try{A(E.next(K))}catch(D){j(D)}}function U(K){try{A(E.throw(K))}catch(D){j(D)}}function A(K){K.done?k(K.value):T(K.value).then(Z,U)}A((E=E.apply(C,M||[])).next())})};class z extends ae.JT{constructor(M,y="",E="",T=!0,k){super(),this._onDidChange=this._register(new v.Q5),this.onDidChange=this._onDidChange.event,this._enabled=!0,this._id=M,this._label=y,this._cssClass=E,this._enabled=T,this._actionCallback=k}get id(){return this._id}get label(){return this._label}set label(M){this._setLabel(M)}_setLabel(M){this._label!==M&&(this._label=M,this._onDidChange.fire({label:M}))}get tooltip(){return this._tooltip||""}set tooltip(M){this._setTooltip(M)}_setTooltip(M){this._tooltip!==M&&(this._tooltip=M,this._onDidChange.fire({tooltip:M}))}get class(){return this._cssClass}set class(M){this._setClass(M)}_setClass(M){this._cssClass!==M&&(this._cssClass=M,this._onDidChange.fire({class:M}))}get enabled(){return this._enabled}set enabled(M){this._setEnabled(M)}_setEnabled(M){this._enabled!==M&&(this._enabled=M,this._onDidChange.fire({enabled:M}))}get checked(){return this._checked}set checked(M){this._setChecked(M)}_setChecked(M){this._checked!==M&&(this._checked=M,this._onDidChange.fire({checked:M}))}run(M,y){return fe(this,void 0,void 0,function*(){this._actionCallback&&(yield this._actionCallback(M))})}}class g extends ae.JT{constructor(){super(...arguments),this._onBeforeRun=this._register(new v.Q5),this.onBeforeRun=this._onBeforeRun.event,this._onDidRun=this._register(new v.Q5),this.onDidRun=this._onDidRun.event}run(M,y){return fe(this,void 0,void 0,function*(){if(!M.enabled)return;this._onBeforeRun.fire({action:M});let E;try{yield this.runAction(M,y)}catch(T){E=T}this._onDidRun.fire({action:M,error:E})})}runAction(M,y){return fe(this,void 0,void 0,function*(){yield M.run(y)})}}class q extends z{constructor(M){super(q.ID,M,M?"separator text":"separator"),this.checked=!1,this.enabled=!1}}q.ID="vs.actions.separator";class te{constructor(M,y,E,T){this.tooltip="",this.enabled=!0,this.checked=!1,this.id=M,this.label=y,this.class=T,this._actions=E}get actions(){return this._actions}dispose(){}run(){return fe(this,void 0,void 0,function*(){})}}class o extends z{constructor(){super(o.ID,W.N("submenu.empty","(empty)"),void 0,!1)}}o.ID="vs.actions.empty"},76068:function(ln,mt,m){"use strict";m.d(mt,{ok:function(){return v}});function v(ae,W){if(!ae)throw new Error(W?`Assertion failed (${W})`:"Assertion Failed")}},52615:function(ln,mt,m){"use strict";m.d(mt,{CM:function(){return z},JL:function(){return g},dT:function(){return te},fK:function(){return fe},lA:function(){return q}});var v=m(4348);class ae{constructor(){this._icons=new Map,this._onDidRegister=new v.Q5}add(C){const M=this._icons.get(C.id);M?C.description?M.description=C.description:console.error(`Duplicate registration of codicon ${C.id}`):(this._icons.set(C.id,C),this._onDidRegister.fire(C))}get(C){return this._icons.get(C)}get all(){return this._icons.values()}get onDidRegister(){return this._onDidRegister.event}}const W=new ae,fe=W;function z(o,C){return new q(o,C)}function g(o){return o?o.replace(/\$\((.*?)\)/g,(C,M)=>` ${M} `).trim():""}class q{constructor(C,M,y){this.id=C,this.definition=M,this.description=y,W.add(this)}get classNames(){return"codicon codicon-"+this.id}get classNamesArray(){return["codicon","codicon-"+this.id]}get cssSelector(){return".codicon.codicon-"+this.id}}var te;(function(o){o.iconNameSegment="[A-Za-z0-9]+",o.iconNameExpression="[A-Za-z0-9\\-]+",o.iconModifierExpression="~[A-Za-z]+";const C=new RegExp(`^(${o.iconNameExpression})(${o.iconModifierExpression})?$`);function M(T){if(T instanceof q)return["codicon","codicon-"+T.id];const k=C.exec(T.id);if(!k)return M(q.error);let[,j,Z]=k;const U=["codicon","codicon-"+j];return Z&&U.push("codicon-modifier-"+Z.substr(1)),U}o.asClassNameArray=M;function y(T){return M(T).join(" ")}o.asClassName=y;function E(T){return"."+M(T).join(".")}o.asCSSSelector=E})(te||(te={})),function(o){o.add=new o("add",{fontCharacter:"\\ea60"}),o.plus=new o("plus",o.add.definition),o.gistNew=new o("gist-new",o.add.definition),o.repoCreate=new o("repo-create",o.add.definition),o.lightbulb=new o("lightbulb",{fontCharacter:"\\ea61"}),o.lightBulb=new o("light-bulb",{fontCharacter:"\\ea61"}),o.repo=new o("repo",{fontCharacter:"\\ea62"}),o.repoDelete=new o("repo-delete",{fontCharacter:"\\ea62"}),o.gistFork=new o("gist-fork",{fontCharacter:"\\ea63"}),o.repoForked=new o("repo-forked",{fontCharacter:"\\ea63"}),o.gitPullRequest=new o("git-pull-request",{fontCharacter:"\\ea64"}),o.gitPullRequestAbandoned=new o("git-pull-request-abandoned",{fontCharacter:"\\ea64"}),o.recordKeys=new o("record-keys",{fontCharacter:"\\ea65"}),o.keyboard=new o("keyboard",{fontCharacter:"\\ea65"}),o.tag=new o("tag",{fontCharacter:"\\ea66"}),o.tagAdd=new o("tag-add",{fontCharacter:"\\ea66"}),o.tagRemove=new o("tag-remove",{fontCharacter:"\\ea66"}),o.person=new o("person",{fontCharacter:"\\ea67"}),o.personFollow=new o("person-follow",{fontCharacter:"\\ea67"}),o.personOutline=new o("person-outline",{fontCharacter:"\\ea67"}),o.personFilled=new o("person-filled",{fontCharacter:"\\ea67"}),o.gitBranch=new o("git-branch",{fontCharacter:"\\ea68"}),o.gitBranchCreate=new o("git-branch-create",{fontCharacter:"\\ea68"}),o.gitBranchDelete=new o("git-branch-delete",{fontCharacter:"\\ea68"}),o.sourceControl=new o("source-control",{fontCharacter:"\\ea68"}),o.mirror=new o("mirror",{fontCharacter:"\\ea69"}),o.mirrorPublic=new o("mirror-public",{fontCharacter:"\\ea69"}),o.star=new o("star",{fontCharacter:"\\ea6a"}),o.starAdd=new o("star-add",{fontCharacter:"\\ea6a"}),o.starDelete=new o("star-delete",{fontCharacter:"\\ea6a"}),o.starEmpty=new o("star-empty",{fontCharacter:"\\ea6a"}),o.comment=new o("comment",{fontCharacter:"\\ea6b"}),o.commentAdd=new o("comment-add",{fontCharacter:"\\ea6b"}),o.alert=new o("alert",{fontCharacter:"\\ea6c"}),o.warning=new o("warning",{fontCharacter:"\\ea6c"}),o.search=new o("search",{fontCharacter:"\\ea6d"}),o.searchSave=new o("search-save",{fontCharacter:"\\ea6d"}),o.logOut=new o("log-out",{fontCharacter:"\\ea6e"}),o.signOut=new o("sign-out",{fontCharacter:"\\ea6e"}),o.logIn=new o("log-in",{fontCharacter:"\\ea6f"}),o.signIn=new o("sign-in",{fontCharacter:"\\ea6f"}),o.eye=new o("eye",{fontCharacter:"\\ea70"}),o.eyeUnwatch=new o("eye-unwatch",{fontCharacter:"\\ea70"}),o.eyeWatch=new o("eye-watch",{fontCharacter:"\\ea70"}),o.circleFilled=new o("circle-filled",{fontCharacter:"\\ea71"}),o.primitiveDot=new o("primitive-dot",{fontCharacter:"\\ea71"}),o.closeDirty=new o("close-dirty",{fontCharacter:"\\ea71"}),o.debugBreakpoint=new o("debug-breakpoint",{fontCharacter:"\\ea71"}),o.debugBreakpointDisabled=new o("debug-breakpoint-disabled",{fontCharacter:"\\ea71"}),o.debugHint=new o("debug-hint",{fontCharacter:"\\ea71"}),o.primitiveSquare=new o("primitive-square",{fontCharacter:"\\ea72"}),o.edit=new o("edit",{fontCharacter:"\\ea73"}),o.pencil=new o("pencil",{fontCharacter:"\\ea73"}),o.info=new o("info",{fontCharacter:"\\ea74"}),o.issueOpened=new o("issue-opened",{fontCharacter:"\\ea74"}),o.gistPrivate=new o("gist-private",{fontCharacter:"\\ea75"}),o.gitForkPrivate=new o("git-fork-private",{fontCharacter:"\\ea75"}),o.lock=new o("lock",{fontCharacter:"\\ea75"}),o.mirrorPrivate=new o("mirror-private",{fontCharacter:"\\ea75"}),o.close=new o("close",{fontCharacter:"\\ea76"}),o.removeClose=new o("remove-close",{fontCharacter:"\\ea76"}),o.x=new o("x",{fontCharacter:"\\ea76"}),o.repoSync=new o("repo-sync",{fontCharacter:"\\ea77"}),o.sync=new o("sync",{fontCharacter:"\\ea77"}),o.clone=new o("clone",{fontCharacter:"\\ea78"}),o.desktopDownload=new o("desktop-download",{fontCharacter:"\\ea78"}),o.beaker=new o("beaker",{fontCharacter:"\\ea79"}),o.microscope=new o("microscope",{fontCharacter:"\\ea79"}),o.vm=new o("vm",{fontCharacter:"\\ea7a"}),o.deviceDesktop=new o("device-desktop",{fontCharacter:"\\ea7a"}),o.file=new o("file",{fontCharacter:"\\ea7b"}),o.fileText=new o("file-text",{fontCharacter:"\\ea7b"}),o.more=new o("more",{fontCharacter:"\\ea7c"}),o.ellipsis=new o("ellipsis",{fontCharacter:"\\ea7c"}),o.kebabHorizontal=new o("kebab-horizontal",{fontCharacter:"\\ea7c"}),o.mailReply=new o("mail-reply",{fontCharacter:"\\ea7d"}),o.reply=new o("reply",{fontCharacter:"\\ea7d"}),o.organization=new o("organization",{fontCharacter:"\\ea7e"}),o.organizationFilled=new o("organization-filled",{fontCharacter:"\\ea7e"}),o.organizationOutline=new o("organization-outline",{fontCharacter:"\\ea7e"}),o.newFile=new o("new-file",{fontCharacter:"\\ea7f"}),o.fileAdd=new o("file-add",{fontCharacter:"\\ea7f"}),o.newFolder=new o("new-folder",{fontCharacter:"\\ea80"}),o.fileDirectoryCreate=new o("file-directory-create",{fontCharacter:"\\ea80"}),o.trash=new o("trash",{fontCharacter:"\\ea81"}),o.trashcan=new o("trashcan",{fontCharacter:"\\ea81"}),o.history=new o("history",{fontCharacter:"\\ea82"}),o.clock=new o("clock",{fontCharacter:"\\ea82"}),o.folder=new o("folder",{fontCharacter:"\\ea83"}),o.fileDirectory=new o("file-directory",{fontCharacter:"\\ea83"}),o.symbolFolder=new o("symbol-folder",{fontCharacter:"\\ea83"}),o.logoGithub=new o("logo-github",{fontCharacter:"\\ea84"}),o.markGithub=new o("mark-github",{fontCharacter:"\\ea84"}),o.github=new o("github",{fontCharacter:"\\ea84"}),o.terminal=new o("terminal",{fontCharacter:"\\ea85"}),o.console=new o("console",{fontCharacter:"\\ea85"}),o.repl=new o("repl",{fontCharacter:"\\ea85"}),o.zap=new o("zap",{fontCharacter:"\\ea86"}),o.symbolEvent=new o("symbol-event",{fontCharacter:"\\ea86"}),o.error=new o("error",{fontCharacter:"\\ea87"}),o.stop=new o("stop",{fontCharacter:"\\ea87"}),o.variable=new o("variable",{fontCharacter:"\\ea88"}),o.symbolVariable=new o("symbol-variable",{fontCharacter:"\\ea88"}),o.array=new o("array",{fontCharacter:"\\ea8a"}),o.symbolArray=new o("symbol-array",{fontCharacter:"\\ea8a"}),o.symbolModule=new o("symbol-module",{fontCharacter:"\\ea8b"}),o.symbolPackage=new o("symbol-package",{fontCharacter:"\\ea8b"}),o.symbolNamespace=new o("symbol-namespace",{fontCharacter:"\\ea8b"}),o.symbolObject=new o("symbol-object",{fontCharacter:"\\ea8b"}),o.symbolMethod=new o("symbol-method",{fontCharacter:"\\ea8c"}),o.symbolFunction=new o("symbol-function",{fontCharacter:"\\ea8c"}),o.symbolConstructor=new o("symbol-constructor",{fontCharacter:"\\ea8c"}),o.symbolBoolean=new o("symbol-boolean",{fontCharacter:"\\ea8f"}),o.symbolNull=new o("symbol-null",{fontCharacter:"\\ea8f"}),o.symbolNumeric=new o("symbol-numeric",{fontCharacter:"\\ea90"}),o.symbolNumber=new o("symbol-number",{fontCharacter:"\\ea90"}),o.symbolStructure=new o("symbol-structure",{fontCharacter:"\\ea91"}),o.symbolStruct=new o("symbol-struct",{fontCharacter:"\\ea91"}),o.symbolParameter=new o("symbol-parameter",{fontCharacter:"\\ea92"}),o.symbolTypeParameter=new o("symbol-type-parameter",{fontCharacter:"\\ea92"}),o.symbolKey=new o("symbol-key",{fontCharacter:"\\ea93"}),o.symbolText=new o("symbol-text",{fontCharacter:"\\ea93"}),o.symbolReference=new o("symbol-reference",{fontCharacter:"\\ea94"}),o.goToFile=new o("go-to-file",{fontCharacter:"\\ea94"}),o.symbolEnum=new o("symbol-enum",{fontCharacter:"\\ea95"}),o.symbolValue=new o("symbol-value",{fontCharacter:"\\ea95"}),o.symbolRuler=new o("symbol-ruler",{fontCharacter:"\\ea96"}),o.symbolUnit=new o("symbol-unit",{fontCharacter:"\\ea96"}),o.activateBreakpoints=new o("activate-breakpoints",{fontCharacter:"\\ea97"}),o.archive=new o("archive",{fontCharacter:"\\ea98"}),o.arrowBoth=new o("arrow-both",{fontCharacter:"\\ea99"}),o.arrowDown=new o("arrow-down",{fontCharacter:"\\ea9a"}),o.arrowLeft=new o("arrow-left",{fontCharacter:"\\ea9b"}),o.arrowRight=new o("arrow-right",{fontCharacter:"\\ea9c"}),o.arrowSmallDown=new o("arrow-small-down",{fontCharacter:"\\ea9d"}),o.arrowSmallLeft=new o("arrow-small-left",{fontCharacter:"\\ea9e"}),o.arrowSmallRight=new o("arrow-small-right",{fontCharacter:"\\ea9f"}),o.arrowSmallUp=new o("arrow-small-up",{fontCharacter:"\\eaa0"}),o.arrowUp=new o("arrow-up",{fontCharacter:"\\eaa1"}),o.bell=new o("bell",{fontCharacter:"\\eaa2"}),o.bold=new o("bold",{fontCharacter:"\\eaa3"}),o.book=new o("book",{fontCharacter:"\\eaa4"}),o.bookmark=new o("bookmark",{fontCharacter:"\\eaa5"}),o.debugBreakpointConditionalUnverified=new o("debug-breakpoint-conditional-unverified",{fontCharacter:"\\eaa6"}),o.debugBreakpointConditional=new o("debug-breakpoint-conditional",{fontCharacter:"\\eaa7"}),o.debugBreakpointConditionalDisabled=new o("debug-breakpoint-conditional-disabled",{fontCharacter:"\\eaa7"}),o.debugBreakpointDataUnverified=new o("debug-breakpoint-data-unverified",{fontCharacter:"\\eaa8"}),o.debugBreakpointData=new o("debug-breakpoint-data",{fontCharacter:"\\eaa9"}),o.debugBreakpointDataDisabled=new o("debug-breakpoint-data-disabled",{fontCharacter:"\\eaa9"}),o.debugBreakpointLogUnverified=new o("debug-breakpoint-log-unverified",{fontCharacter:"\\eaaa"}),o.debugBreakpointLog=new o("debug-breakpoint-log",{fontCharacter:"\\eaab"}),o.debugBreakpointLogDisabled=new o("debug-breakpoint-log-disabled",{fontCharacter:"\\eaab"}),o.briefcase=new o("briefcase",{fontCharacter:"\\eaac"}),o.broadcast=new o("broadcast",{fontCharacter:"\\eaad"}),o.browser=new o("browser",{fontCharacter:"\\eaae"}),o.bug=new o("bug",{fontCharacter:"\\eaaf"}),o.calendar=new o("calendar",{fontCharacter:"\\eab0"}),o.caseSensitive=new o("case-sensitive",{fontCharacter:"\\eab1"}),o.check=new o("check",{fontCharacter:"\\eab2"}),o.checklist=new o("checklist",{fontCharacter:"\\eab3"}),o.chevronDown=new o("chevron-down",{fontCharacter:"\\eab4"}),o.dropDownButton=new o("drop-down-button",o.chevronDown.definition),o.chevronLeft=new o("chevron-left",{fontCharacter:"\\eab5"}),o.chevronRight=new o("chevron-right",{fontCharacter:"\\eab6"}),o.chevronUp=new o("chevron-up",{fontCharacter:"\\eab7"}),o.chromeClose=new o("chrome-close",{fontCharacter:"\\eab8"}),o.chromeMaximize=new o("chrome-maximize",{fontCharacter:"\\eab9"}),o.chromeMinimize=new o("chrome-minimize",{fontCharacter:"\\eaba"}),o.chromeRestore=new o("chrome-restore",{fontCharacter:"\\eabb"}),o.circleOutline=new o("circle-outline",{fontCharacter:"\\eabc"}),o.debugBreakpointUnverified=new o("debug-breakpoint-unverified",{fontCharacter:"\\eabc"}),o.circleSlash=new o("circle-slash",{fontCharacter:"\\eabd"}),o.circuitBoard=new o("circuit-board",{fontCharacter:"\\eabe"}),o.clearAll=new o("clear-all",{fontCharacter:"\\eabf"}),o.clippy=new o("clippy",{fontCharacter:"\\eac0"}),o.closeAll=new o("close-all",{fontCharacter:"\\eac1"}),o.cloudDownload=new o("cloud-download",{fontCharacter:"\\eac2"}),o.cloudUpload=new o("cloud-upload",{fontCharacter:"\\eac3"}),o.code=new o("code",{fontCharacter:"\\eac4"}),o.collapseAll=new o("collapse-all",{fontCharacter:"\\eac5"}),o.colorMode=new o("color-mode",{fontCharacter:"\\eac6"}),o.commentDiscussion=new o("comment-discussion",{fontCharacter:"\\eac7"}),o.compareChanges=new o("compare-changes",{fontCharacter:"\\eafd"}),o.creditCard=new o("credit-card",{fontCharacter:"\\eac9"}),o.dash=new o("dash",{fontCharacter:"\\eacc"}),o.dashboard=new o("dashboard",{fontCharacter:"\\eacd"}),o.database=new o("database",{fontCharacter:"\\eace"}),o.debugContinue=new o("debug-continue",{fontCharacter:"\\eacf"}),o.debugDisconnect=new o("debug-disconnect",{fontCharacter:"\\ead0"}),o.debugPause=new o("debug-pause",{fontCharacter:"\\ead1"}),o.debugRestart=new o("debug-restart",{fontCharacter:"\\ead2"}),o.debugStart=new o("debug-start",{fontCharacter:"\\ead3"}),o.debugStepInto=new o("debug-step-into",{fontCharacter:"\\ead4"}),o.debugStepOut=new o("debug-step-out",{fontCharacter:"\\ead5"}),o.debugStepOver=new o("debug-step-over",{fontCharacter:"\\ead6"}),o.debugStop=new o("debug-stop",{fontCharacter:"\\ead7"}),o.debug=new o("debug",{fontCharacter:"\\ead8"}),o.deviceCameraVideo=new o("device-camera-video",{fontCharacter:"\\ead9"}),o.deviceCamera=new o("device-camera",{fontCharacter:"\\eada"}),o.deviceMobile=new o("device-mobile",{fontCharacter:"\\eadb"}),o.diffAdded=new o("diff-added",{fontCharacter:"\\eadc"}),o.diffIgnored=new o("diff-ignored",{fontCharacter:"\\eadd"}),o.diffModified=new o("diff-modified",{fontCharacter:"\\eade"}),o.diffRemoved=new o("diff-removed",{fontCharacter:"\\eadf"}),o.diffRenamed=new o("diff-renamed",{fontCharacter:"\\eae0"}),o.diff=new o("diff",{fontCharacter:"\\eae1"}),o.discard=new o("discard",{fontCharacter:"\\eae2"}),o.editorLayout=new o("editor-layout",{fontCharacter:"\\eae3"}),o.emptyWindow=new o("empty-window",{fontCharacter:"\\eae4"}),o.exclude=new o("exclude",{fontCharacter:"\\eae5"}),o.extensions=new o("extensions",{fontCharacter:"\\eae6"}),o.eyeClosed=new o("eye-closed",{fontCharacter:"\\eae7"}),o.fileBinary=new o("file-binary",{fontCharacter:"\\eae8"}),o.fileCode=new o("file-code",{fontCharacter:"\\eae9"}),o.fileMedia=new o("file-media",{fontCharacter:"\\eaea"}),o.filePdf=new o("file-pdf",{fontCharacter:"\\eaeb"}),o.fileSubmodule=new o("file-submodule",{fontCharacter:"\\eaec"}),o.fileSymlinkDirectory=new o("file-symlink-directory",{fontCharacter:"\\eaed"}),o.fileSymlinkFile=new o("file-symlink-file",{fontCharacter:"\\eaee"}),o.fileZip=new o("file-zip",{fontCharacter:"\\eaef"}),o.files=new o("files",{fontCharacter:"\\eaf0"}),o.filter=new o("filter",{fontCharacter:"\\eaf1"}),o.flame=new o("flame",{fontCharacter:"\\eaf2"}),o.foldDown=new o("fold-down",{fontCharacter:"\\eaf3"}),o.foldUp=new o("fold-up",{fontCharacter:"\\eaf4"}),o.fold=new o("fold",{fontCharacter:"\\eaf5"}),o.folderActive=new o("folder-active",{fontCharacter:"\\eaf6"}),o.folderOpened=new o("folder-opened",{fontCharacter:"\\eaf7"}),o.gear=new o("gear",{fontCharacter:"\\eaf8"}),o.gift=new o("gift",{fontCharacter:"\\eaf9"}),o.gistSecret=new o("gist-secret",{fontCharacter:"\\eafa"}),o.gist=new o("gist",{fontCharacter:"\\eafb"}),o.gitCommit=new o("git-commit",{fontCharacter:"\\eafc"}),o.gitCompare=new o("git-compare",{fontCharacter:"\\eafd"}),o.gitMerge=new o("git-merge",{fontCharacter:"\\eafe"}),o.githubAction=new o("github-action",{fontCharacter:"\\eaff"}),o.githubAlt=new o("github-alt",{fontCharacter:"\\eb00"}),o.globe=new o("globe",{fontCharacter:"\\eb01"}),o.grabber=new o("grabber",{fontCharacter:"\\eb02"}),o.graph=new o("graph",{fontCharacter:"\\eb03"}),o.gripper=new o("gripper",{fontCharacter:"\\eb04"}),o.heart=new o("heart",{fontCharacter:"\\eb05"}),o.home=new o("home",{fontCharacter:"\\eb06"}),o.horizontalRule=new o("horizontal-rule",{fontCharacter:"\\eb07"}),o.hubot=new o("hubot",{fontCharacter:"\\eb08"}),o.inbox=new o("inbox",{fontCharacter:"\\eb09"}),o.issueClosed=new o("issue-closed",{fontCharacter:"\\eba4"}),o.issueReopened=new o("issue-reopened",{fontCharacter:"\\eb0b"}),o.issues=new o("issues",{fontCharacter:"\\eb0c"}),o.italic=new o("italic",{fontCharacter:"\\eb0d"}),o.jersey=new o("jersey",{fontCharacter:"\\eb0e"}),o.json=new o("json",{fontCharacter:"\\eb0f"}),o.kebabVertical=new o("kebab-vertical",{fontCharacter:"\\eb10"}),o.key=new o("key",{fontCharacter:"\\eb11"}),o.law=new o("law",{fontCharacter:"\\eb12"}),o.lightbulbAutofix=new o("lightbulb-autofix",{fontCharacter:"\\eb13"}),o.linkExternal=new o("link-external",{fontCharacter:"\\eb14"}),o.link=new o("link",{fontCharacter:"\\eb15"}),o.listOrdered=new o("list-ordered",{fontCharacter:"\\eb16"}),o.listUnordered=new o("list-unordered",{fontCharacter:"\\eb17"}),o.liveShare=new o("live-share",{fontCharacter:"\\eb18"}),o.loading=new o("loading",{fontCharacter:"\\eb19"}),o.location=new o("location",{fontCharacter:"\\eb1a"}),o.mailRead=new o("mail-read",{fontCharacter:"\\eb1b"}),o.mail=new o("mail",{fontCharacter:"\\eb1c"}),o.markdown=new o("markdown",{fontCharacter:"\\eb1d"}),o.megaphone=new o("megaphone",{fontCharacter:"\\eb1e"}),o.mention=new o("mention",{fontCharacter:"\\eb1f"}),o.milestone=new o("milestone",{fontCharacter:"\\eb20"}),o.mortarBoard=new o("mortar-board",{fontCharacter:"\\eb21"}),o.move=new o("move",{fontCharacter:"\\eb22"}),o.multipleWindows=new o("multiple-windows",{fontCharacter:"\\eb23"}),o.mute=new o("mute",{fontCharacter:"\\eb24"}),o.noNewline=new o("no-newline",{fontCharacter:"\\eb25"}),o.note=new o("note",{fontCharacter:"\\eb26"}),o.octoface=new o("octoface",{fontCharacter:"\\eb27"}),o.openPreview=new o("open-preview",{fontCharacter:"\\eb28"}),o.package_=new o("package",{fontCharacter:"\\eb29"}),o.paintcan=new o("paintcan",{fontCharacter:"\\eb2a"}),o.pin=new o("pin",{fontCharacter:"\\eb2b"}),o.play=new o("play",{fontCharacter:"\\eb2c"}),o.run=new o("run",{fontCharacter:"\\eb2c"}),o.plug=new o("plug",{fontCharacter:"\\eb2d"}),o.preserveCase=new o("preserve-case",{fontCharacter:"\\eb2e"}),o.preview=new o("preview",{fontCharacter:"\\eb2f"}),o.project=new o("project",{fontCharacter:"\\eb30"}),o.pulse=new o("pulse",{fontCharacter:"\\eb31"}),o.question=new o("question",{fontCharacter:"\\eb32"}),o.quote=new o("quote",{fontCharacter:"\\eb33"}),o.radioTower=new o("radio-tower",{fontCharacter:"\\eb34"}),o.reactions=new o("reactions",{fontCharacter:"\\eb35"}),o.references=new o("references",{fontCharacter:"\\eb36"}),o.refresh=new o("refresh",{fontCharacter:"\\eb37"}),o.regex=new o("regex",{fontCharacter:"\\eb38"}),o.remoteExplorer=new o("remote-explorer",{fontCharacter:"\\eb39"}),o.remote=new o("remote",{fontCharacter:"\\eb3a"}),o.remove=new o("remove",{fontCharacter:"\\eb3b"}),o.replaceAll=new o("replace-all",{fontCharacter:"\\eb3c"}),o.replace=new o("replace",{fontCharacter:"\\eb3d"}),o.repoClone=new o("repo-clone",{fontCharacter:"\\eb3e"}),o.repoForcePush=new o("repo-force-push",{fontCharacter:"\\eb3f"}),o.repoPull=new o("repo-pull",{fontCharacter:"\\eb40"}),o.repoPush=new o("repo-push",{fontCharacter:"\\eb41"}),o.report=new o("report",{fontCharacter:"\\eb42"}),o.requestChanges=new o("request-changes",{fontCharacter:"\\eb43"}),o.rocket=new o("rocket",{fontCharacter:"\\eb44"}),o.rootFolderOpened=new o("root-folder-opened",{fontCharacter:"\\eb45"}),o.rootFolder=new o("root-folder",{fontCharacter:"\\eb46"}),o.rss=new o("rss",{fontCharacter:"\\eb47"}),o.ruby=new o("ruby",{fontCharacter:"\\eb48"}),o.saveAll=new o("save-all",{fontCharacter:"\\eb49"}),o.saveAs=new o("save-as",{fontCharacter:"\\eb4a"}),o.save=new o("save",{fontCharacter:"\\eb4b"}),o.screenFull=new o("screen-full",{fontCharacter:"\\eb4c"}),o.screenNormal=new o("screen-normal",{fontCharacter:"\\eb4d"}),o.searchStop=new o("search-stop",{fontCharacter:"\\eb4e"}),o.server=new o("server",{fontCharacter:"\\eb50"}),o.settingsGear=new o("settings-gear",{fontCharacter:"\\eb51"}),o.settings=new o("settings",{fontCharacter:"\\eb52"}),o.shield=new o("shield",{fontCharacter:"\\eb53"}),o.smiley=new o("smiley",{fontCharacter:"\\eb54"}),o.sortPrecedence=new o("sort-precedence",{fontCharacter:"\\eb55"}),o.splitHorizontal=new o("split-horizontal",{fontCharacter:"\\eb56"}),o.splitVertical=new o("split-vertical",{fontCharacter:"\\eb57"}),o.squirrel=new o("squirrel",{fontCharacter:"\\eb58"}),o.starFull=new o("star-full",{fontCharacter:"\\eb59"}),o.starHalf=new o("star-half",{fontCharacter:"\\eb5a"}),o.symbolClass=new o("symbol-class",{fontCharacter:"\\eb5b"}),o.symbolColor=new o("symbol-color",{fontCharacter:"\\eb5c"}),o.symbolConstant=new o("symbol-constant",{fontCharacter:"\\eb5d"}),o.symbolEnumMember=new o("symbol-enum-member",{fontCharacter:"\\eb5e"}),o.symbolField=new o("symbol-field",{fontCharacter:"\\eb5f"}),o.symbolFile=new o("symbol-file",{fontCharacter:"\\eb60"}),o.symbolInterface=new o("symbol-interface",{fontCharacter:"\\eb61"}),o.symbolKeyword=new o("symbol-keyword",{fontCharacter:"\\eb62"}),o.symbolMisc=new o("symbol-misc",{fontCharacter:"\\eb63"}),o.symbolOperator=new o("symbol-operator",{fontCharacter:"\\eb64"}),o.symbolProperty=new o("symbol-property",{fontCharacter:"\\eb65"}),o.wrench=new o("wrench",{fontCharacter:"\\eb65"}),o.wrenchSubaction=new o("wrench-subaction",{fontCharacter:"\\eb65"}),o.symbolSnippet=new o("symbol-snippet",{fontCharacter:"\\eb66"}),o.tasklist=new o("tasklist",{fontCharacter:"\\eb67"}),o.telescope=new o("telescope",{fontCharacter:"\\eb68"}),o.textSize=new o("text-size",{fontCharacter:"\\eb69"}),o.threeBars=new o("three-bars",{fontCharacter:"\\eb6a"}),o.thumbsdown=new o("thumbsdown",{fontCharacter:"\\eb6b"}),o.thumbsup=new o("thumbsup",{fontCharacter:"\\eb6c"}),o.tools=new o("tools",{fontCharacter:"\\eb6d"}),o.triangleDown=new o("triangle-down",{fontCharacter:"\\eb6e"}),o.triangleLeft=new o("triangle-left",{fontCharacter:"\\eb6f"}),o.triangleRight=new o("triangle-right",{fontCharacter:"\\eb70"}),o.triangleUp=new o("triangle-up",{fontCharacter:"\\eb71"}),o.twitter=new o("twitter",{fontCharacter:"\\eb72"}),o.unfold=new o("unfold",{fontCharacter:"\\eb73"}),o.unlock=new o("unlock",{fontCharacter:"\\eb74"}),o.unmute=new o("unmute",{fontCharacter:"\\eb75"}),o.unverified=new o("unverified",{fontCharacter:"\\eb76"}),o.verified=new o("verified",{fontCharacter:"\\eb77"}),o.versions=new o("versions",{fontCharacter:"\\eb78"}),o.vmActive=new o("vm-active",{fontCharacter:"\\eb79"}),o.vmOutline=new o("vm-outline",{fontCharacter:"\\eb7a"}),o.vmRunning=new o("vm-running",{fontCharacter:"\\eb7b"}),o.watch=new o("watch",{fontCharacter:"\\eb7c"}),o.whitespace=new o("whitespace",{fontCharacter:"\\eb7d"}),o.wholeWord=new o("whole-word",{fontCharacter:"\\eb7e"}),o.window=new o("window",{fontCharacter:"\\eb7f"}),o.wordWrap=new o("word-wrap",{fontCharacter:"\\eb80"}),o.zoomIn=new o("zoom-in",{fontCharacter:"\\eb81"}),o.zoomOut=new o("zoom-out",{fontCharacter:"\\eb82"}),o.listFilter=new o("list-filter",{fontCharacter:"\\eb83"}),o.listFlat=new o("list-flat",{fontCharacter:"\\eb84"}),o.listSelection=new o("list-selection",{fontCharacter:"\\eb85"}),o.selection=new o("selection",{fontCharacter:"\\eb85"}),o.listTree=new o("list-tree",{fontCharacter:"\\eb86"}),o.debugBreakpointFunctionUnverified=new o("debug-breakpoint-function-unverified",{fontCharacter:"\\eb87"}),o.debugBreakpointFunction=new o("debug-breakpoint-function",{fontCharacter:"\\eb88"}),o.debugBreakpointFunctionDisabled=new o("debug-breakpoint-function-disabled",{fontCharacter:"\\eb88"}),o.debugStackframeActive=new o("debug-stackframe-active",{fontCharacter:"\\eb89"}),o.debugStackframeDot=new o("debug-stackframe-dot",{fontCharacter:"\\eb8a"}),o.debugStackframe=new o("debug-stackframe",{fontCharacter:"\\eb8b"}),o.debugStackframeFocused=new o("debug-stackframe-focused",{fontCharacter:"\\eb8b"}),o.debugBreakpointUnsupported=new o("debug-breakpoint-unsupported",{fontCharacter:"\\eb8c"}),o.symbolString=new o("symbol-string",{fontCharacter:"\\eb8d"}),o.debugReverseContinue=new o("debug-reverse-continue",{fontCharacter:"\\eb8e"}),o.debugStepBack=new o("debug-step-back",{fontCharacter:"\\eb8f"}),o.debugRestartFrame=new o("debug-restart-frame",{fontCharacter:"\\eb90"}),o.callIncoming=new o("call-incoming",{fontCharacter:"\\eb92"}),o.callOutgoing=new o("call-outgoing",{fontCharacter:"\\eb93"}),o.menu=new o("menu",{fontCharacter:"\\eb94"}),o.expandAll=new o("expand-all",{fontCharacter:"\\eb95"}),o.feedback=new o("feedback",{fontCharacter:"\\eb96"}),o.groupByRefType=new o("group-by-ref-type",{fontCharacter:"\\eb97"}),o.ungroupByRefType=new o("ungroup-by-ref-type",{fontCharacter:"\\eb98"}),o.account=new o("account",{fontCharacter:"\\eb99"}),o.bellDot=new o("bell-dot",{fontCharacter:"\\eb9a"}),o.debugConsole=new o("debug-console",{fontCharacter:"\\eb9b"}),o.library=new o("library",{fontCharacter:"\\eb9c"}),o.output=new o("output",{fontCharacter:"\\eb9d"}),o.runAll=new o("run-all",{fontCharacter:"\\eb9e"}),o.syncIgnored=new o("sync-ignored",{fontCharacter:"\\eb9f"}),o.pinned=new o("pinned",{fontCharacter:"\\eba0"}),o.githubInverted=new o("github-inverted",{fontCharacter:"\\eba1"}),o.debugAlt=new o("debug-alt",{fontCharacter:"\\eb91"}),o.serverProcess=new o("server-process",{fontCharacter:"\\eba2"}),o.serverEnvironment=new o("server-environment",{fontCharacter:"\\eba3"}),o.pass=new o("pass",{fontCharacter:"\\eba4"}),o.stopCircle=new o("stop-circle",{fontCharacter:"\\eba5"}),o.playCircle=new o("play-circle",{fontCharacter:"\\eba6"}),o.record=new o("record",{fontCharacter:"\\eba7"}),o.debugAltSmall=new o("debug-alt-small",{fontCharacter:"\\eba8"}),o.vmConnect=new o("vm-connect",{fontCharacter:"\\eba9"}),o.cloud=new o("cloud",{fontCharacter:"\\ebaa"}),o.merge=new o("merge",{fontCharacter:"\\ebab"}),o.exportIcon=new o("export",{fontCharacter:"\\ebac"}),o.graphLeft=new o("graph-left",{fontCharacter:"\\ebad"}),o.magnet=new o("magnet",{fontCharacter:"\\ebae"}),o.notebook=new o("notebook",{fontCharacter:"\\ebaf"}),o.redo=new o("redo",{fontCharacter:"\\ebb0"}),o.checkAll=new o("check-all",{fontCharacter:"\\ebb1"}),o.pinnedDirty=new o("pinned-dirty",{fontCharacter:"\\ebb2"}),o.passFilled=new o("pass-filled",{fontCharacter:"\\ebb3"}),o.circleLargeFilled=new o("circle-large-filled",{fontCharacter:"\\ebb4"}),o.circleLargeOutline=new o("circle-large-outline",{fontCharacter:"\\ebb5"}),o.combine=new o("combine",{fontCharacter:"\\ebb6"}),o.gather=new o("gather",{fontCharacter:"\\ebb6"}),o.table=new o("table",{fontCharacter:"\\ebb7"}),o.variableGroup=new o("variable-group",{fontCharacter:"\\ebb8"}),o.typeHierarchy=new o("type-hierarchy",{fontCharacter:"\\ebb9"}),o.typeHierarchySub=new o("type-hierarchy-sub",{fontCharacter:"\\ebba"}),o.typeHierarchySuper=new o("type-hierarchy-super",{fontCharacter:"\\ebbb"}),o.gitPullRequestCreate=new o("git-pull-request-create",{fontCharacter:"\\ebbc"}),o.runAbove=new o("run-above",{fontCharacter:"\\ebbd"}),o.runBelow=new o("run-below",{fontCharacter:"\\ebbe"}),o.notebookTemplate=new o("notebook-template",{fontCharacter:"\\ebbf"}),o.debugRerun=new o("debug-rerun",{fontCharacter:"\\ebc0"}),o.workspaceTrusted=new o("workspace-trusted",{fontCharacter:"\\ebc1"}),o.workspaceUntrusted=new o("workspace-untrusted",{fontCharacter:"\\ebc2"}),o.workspaceUnspecified=new o("workspace-unspecified",{fontCharacter:"\\ebc3"}),o.terminalCmd=new o("terminal-cmd",{fontCharacter:"\\ebc4"}),o.terminalDebian=new o("terminal-debian",{fontCharacter:"\\ebc5"}),o.terminalLinux=new o("terminal-linux",{fontCharacter:"\\ebc6"}),o.terminalPowershell=new o("terminal-powershell",{fontCharacter:"\\ebc7"}),o.terminalTmux=new o("terminal-tmux",{fontCharacter:"\\ebc8"}),o.terminalUbuntu=new o("terminal-ubuntu",{fontCharacter:"\\ebc9"}),o.terminalBash=new o("terminal-bash",{fontCharacter:"\\ebca"}),o.arrowSwap=new o("arrow-swap",{fontCharacter:"\\ebcb"}),o.copy=new o("copy",{fontCharacter:"\\ebcc"}),o.personAdd=new o("person-add",{fontCharacter:"\\ebcd"}),o.filterFilled=new o("filter-filled",{fontCharacter:"\\ebce"}),o.wand=new o("wand",{fontCharacter:"\\ebcf"}),o.debugLineByLine=new o("debug-line-by-line",{fontCharacter:"\\ebd0"}),o.inspect=new o("inspect",{fontCharacter:"\\ebd1"}),o.layers=new o("layers",{fontCharacter:"\\ebd2"}),o.layersDot=new o("layers-dot",{fontCharacter:"\\ebd3"}),o.layersActive=new o("layers-active",{fontCharacter:"\\ebd4"}),o.compass=new o("compass",{fontCharacter:"\\ebd5"}),o.compassDot=new o("compass-dot",{fontCharacter:"\\ebd6"}),o.compassActive=new o("compass-active",{fontCharacter:"\\ebd7"}),o.azure=new o("azure",{fontCharacter:"\\ebd8"}),o.issueDraft=new o("issue-draft",{fontCharacter:"\\ebd9"}),o.gitPullRequestClosed=new o("git-pull-request-closed",{fontCharacter:"\\ebda"}),o.gitPullRequestDraft=new o("git-pull-request-draft",{fontCharacter:"\\ebdb"}),o.debugAll=new o("debug-all",{fontCharacter:"\\ebdc"}),o.debugCoverage=new o("debug-coverage",{fontCharacter:"\\ebdd"}),o.runErrors=new o("run-errors",{fontCharacter:"\\ebde"}),o.folderLibrary=new o("folder-library",{fontCharacter:"\\ebdf"}),o.debugContinueSmall=new o("debug-continue-small",{fontCharacter:"\\ebe0"}),o.beakerStop=new o("beaker-stop",{fontCharacter:"\\ebe1"}),o.graphLine=new o("graph-line",{fontCharacter:"\\ebe2"}),o.graphScatter=new o("graph-scatter",{fontCharacter:"\\ebe3"}),o.pieChart=new o("pie-chart",{fontCharacter:"\\ebe4"}),o.bracket=new o("bracket",o.json.definition),o.bracketDot=new o("bracket-dot",{fontCharacter:"\\ebe5"}),o.bracketError=new o("bracket-error",{fontCharacter:"\\ebe6"}),o.lockSmall=new o("lock-small",{fontCharacter:"\\ebe7"}),o.azureDevops=new o("azure-devops",{fontCharacter:"\\ebe8"}),o.verifiedFilled=new o("verified-filled",{fontCharacter:"\\ebe9"})}(q||(q={}))},79881:function(ln,mt,m){"use strict";m.d(mt,{B8:function(){return M},Cp:function(){return fe},F0:function(){return te},L6:function(){return C},VV:function(){return q},b1:function(){return o},dL:function(){return W},ri:function(){return z}});class v{constructor(){this.listeners=[],this.unexpectedErrorHandler=function(E){setTimeout(()=>{throw E.stack?new Error(E.message+`
|
|
|
|
|
|
`+E.stack):E},0)}}emit(E){this.listeners.forEach(T=>{T(E)})}onUnexpectedError(E){this.unexpectedErrorHandler(E),this.emit(E)}onUnexpectedExternalError(E){this.unexpectedErrorHandler(E)}}const ae=new v;function W(y){q(y)||ae.onUnexpectedError(y)}function fe(y){q(y)||ae.onUnexpectedExternalError(y)}function z(y){if(y instanceof Error){let{name:E,message:T}=y;const k=y.stacktrace||y.stack;return{$isError:!0,name:E,message:T,stack:k}}return y}const g="Canceled";function q(y){return y instanceof Error&&y.name===g&&y.message===g}function te(){const y=new Error(g);return y.name=y.message,y}function o(y){return y?new Error(`Illegal argument: ${y}`):new Error("Illegal argument")}function C(y){return y?new Error(`Illegal state: ${y}`):new Error("Illegal state")}class M extends Error{constructor(E){super("NotSupported"),E&&(this.message=E)}}},4348:function(ln,mt,m){"use strict";m.d(mt,{D0:function(){return M},E7:function(){return y},K3:function(){return C},Q5:function(){return o},ZD:function(){return E},ju:function(){return z}});var v=m(79881),ae=m(69323),W=m(34502),fe=m(95830),z;(function(T){T.None=()=>ae.JT.None;function k(L){return(se,Q=null,V)=>{let x=!1,w;return w=L(H=>{if(!x)return w?w.dispose():x=!0,se.call(Q,H)},null,V),x&&w.dispose(),w}}T.once=k;function j(L,se){return O((Q,V=null,x)=>L(w=>Q.call(V,se(w)),null,x))}T.map=j;function Z(L,se){return O((Q,V=null,x)=>L(w=>{se(w),Q.call(V,w)},null,x))}T.forEach=Z;function U(L,se){return O((Q,V=null,x)=>L(w=>se(w)&&Q.call(V,w),null,x))}T.filter=U;function A(L){return L}T.signal=A;function K(...L){return(se,Q=null,V)=>(0,ae.F8)(...L.map(x=>x(w=>se.call(Q,w),null,V)))}T.any=K;function D(L,se,Q){let V=Q;return j(L,x=>(V=se(V,x),V))}T.reduce=D;function O(L){let se;const Q=new o({onFirstListenerAdd(){se=L(Q.fire,Q)},onLastListenerRemove(){se.dispose()}});return Q.event}function re(L,se,Q=100,V=!1,x){let w,H,he,Ke=0;const ft=new o({leakWarningThreshold:x,onFirstListenerAdd(){w=L(Ue=>{Ke++,H=se(H,Ue),V&&!he&&(ft.fire(H),H=void 0),clearTimeout(he),he=setTimeout(()=>{const st=H;H=void 0,he=void 0,(!V||Ke>1)&&ft.fire(st),Ke=0},Q)})},onLastListenerRemove(){w.dispose()}});return ft.event}T.debounce=re;function oe(L,se=(Q,V)=>Q===V){let Q=!0,V;return U(L,x=>{const w=Q||!se(x,V);return Q=!1,V=x,w})}T.latch=oe;function ie(L,se){return[T.filter(L,se),T.filter(L,Q=>!se(Q))]}T.split=ie;function Ee(L,se=!1,Q=[]){let V=Q.slice(),x=L(he=>{V?V.push(he):H.fire(he)});const w=()=>{V&&V.forEach(he=>H.fire(he)),V=null},H=new o({onFirstListenerAdd(){x||(x=L(he=>H.fire(he)))},onFirstListenerDidAdd(){V&&(se?setTimeout(w):w())},onLastListenerRemove(){x&&x.dispose(),x=null}});return H.event}T.buffer=Ee;class Me{constructor(se){this.event=se}map(se){return new Me(j(this.event,se))}forEach(se){return new Me(Z(this.event,se))}filter(se){return new Me(U(this.event,se))}reduce(se,Q){return new Me(D(this.event,se,Q))}latch(){return new Me(oe(this.event))}debounce(se,Q=100,V=!1,x){return new Me(re(this.event,se,Q,V,x))}on(se,Q,V){return this.event(se,Q,V)}once(se,Q,V){return k(this.event)(se,Q,V)}}function ke(L){return new Me(L)}T.chain=ke;function tt(L,se,Q=V=>V){const V=(...he)=>H.fire(Q(...he)),x=()=>L.on(se,V),w=()=>L.removeListener(se,V),H=new o({onFirstListenerAdd:x,onLastListenerRemove:w});return H.event}T.fromNodeEventEmitter=tt;function ue(L,se,Q=V=>V){const V=(...he)=>H.fire(Q(...he)),x=()=>L.addEventListener(se,V),w=()=>L.removeEventListener(se,V),H=new o({onFirstListenerAdd:x,onLastListenerRemove:w});return H.event}T.fromDOMEventEmitter=ue;function X(L){return new Promise(se=>k(L)(se))}T.toPromise=X})(z||(z={}));class g{constructor(k){this._listenerCount=0,this._invocationCount=0,this._elapsedOverall=0,this._name=`${k}_${g._idPool++}`}start(k){this._stopWatch=new fe.G(!0),this._listenerCount=k}stop(){if(this._stopWatch){const k=this._stopWatch.elapsed();this._elapsedOverall+=k,this._invocationCount+=1,console.info(`did FIRE ${this._name}: elapsed_ms: ${k.toFixed(5)}, listener: ${this._listenerCount} (elapsed_overall: ${this._elapsedOverall.toFixed(2)}, invocations: ${this._invocationCount})`),this._stopWatch=void 0}}}g._idPool=0;let q=-1;class te{constructor(k,j=Math.random().toString(18).slice(2,5)){this.customThreshold=k,this.name=j,this._warnCountdown=0}dispose(){this._stacks&&this._stacks.clear()}check(k){let j=q;if(typeof this.customThreshold=="number"&&(j=this.customThreshold),j<=0||k<j)return;this._stacks||(this._stacks=new Map);const Z=new Error().stack.split(`
|
|
|
`).slice(3).join(`
|
|
|
`),U=this._stacks.get(Z)||0;if(this._stacks.set(Z,U+1),this._warnCountdown-=1,this._warnCountdown<=0){this._warnCountdown=j*.5;let A,K=0;for(const[D,O]of this._stacks)(!A||K<O)&&(A=D,K=O);console.warn(`[${this.name}] potential listener LEAK detected, having ${k} listeners already. MOST frequent listener (${K}):`),console.warn(A)}return()=>{const A=this._stacks.get(Z)||0;this._stacks.set(Z,A-1)}}}class o{constructor(k){var j;this._disposed=!1,this._options=k,this._leakageMon=q>0?new te(this._options&&this._options.leakWarningThreshold):void 0,this._perfMon=!((j=this._options)===null||j===void 0)&&j._profName?new g(this._options._profName):void 0}get event(){return this._event||(this._event=(k,j,Z)=>{var U;this._listeners||(this._listeners=new W.S);const A=this._listeners.isEmpty();A&&this._options&&this._options.onFirstListenerAdd&&this._options.onFirstListenerAdd(this);const K=this._listeners.push(j?[k,j]:k);A&&this._options&&this._options.onFirstListenerDidAdd&&this._options.onFirstListenerDidAdd(this),this._options&&this._options.onListenerDidAdd&&this._options.onListenerDidAdd(this,k,j);const D=(U=this._leakageMon)===null||U===void 0?void 0:U.check(this._listeners.size),O=(0,ae.OF)(()=>{D&&D(),this._disposed||(K(),this._options&&this._options.onLastListenerRemove&&(this._listeners&&!this._listeners.isEmpty()||this._options.onLastListenerRemove(this)))});return Z instanceof ae.SL?Z.add(O):Array.isArray(Z)&&Z.push(O),O}),this._event}fire(k){var j,Z;if(this._listeners){this._deliveryQueue||(this._deliveryQueue=new W.S);for(let U of this._listeners)this._deliveryQueue.push([U,k]);for((j=this._perfMon)===null||j===void 0||j.start(this._deliveryQueue.size);this._deliveryQueue.size>0;){const[U,A]=this._deliveryQueue.shift();try{typeof U=="function"?U.call(void 0,A):U[0].call(U[1],A)}catch(K){(0,v.dL)(K)}}(Z=this._perfMon)===null||Z===void 0||Z.stop()}}dispose(){var k,j,Z,U,A;this._disposed||(this._disposed=!0,(k=this._listeners)===null||k===void 0||k.clear(),(j=this._deliveryQueue)===null||j===void 0||j.clear(),(U=(Z=this._options)===null||Z===void 0?void 0:Z.onLastListenerRemove)===null||U===void 0||U.call(Z),(A=this._leakageMon)===null||A===void 0||A.dispose())}}class C extends o{constructor(k){super(k),this._isPaused=0,this._eventQueue=new W.S,this._mergeFn=k==null?void 0:k.merge}pause(){this._isPaused++}resume(){if(this._isPaused!==0&&--this._isPaused===0)if(this._mergeFn){const k=Array.from(this._eventQueue);this._eventQueue.clear(),super.fire(this._mergeFn(k))}else for(;!this._isPaused&&this._eventQueue.size!==0;)super.fire(this._eventQueue.shift())}fire(k){this._listeners&&(this._isPaused!==0?this._eventQueue.push(k):super.fire(k))}}class M extends C{constructor(k){var j;super(k),this._delay=(j=k.delay)!==null&&j!==void 0?j:100}fire(k){this._handle||(this.pause(),this._handle=setTimeout(()=>{this._handle=void 0,this.resume()},this._delay)),super.fire(k)}}class y{constructor(){this.buffers=[]}wrapEvent(k){return(j,Z,U)=>k(A=>{const K=this.buffers[this.buffers.length-1];K?K.push(()=>j.call(Z,A)):j.call(Z,A)},void 0,U)}bufferEvents(k){const j=[];this.buffers.push(j);const Z=k();return this.buffers.pop(),j.forEach(U=>U()),Z}}class E{constructor(){this.listening=!1,this.inputEvent=z.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(k){this.inputEvent=k,this.listening&&(this.inputEventListener.dispose(),this.inputEventListener=k(this.emitter.fire,this.emitter))}dispose(){this.inputEventListener.dispose(),this.emitter.dispose()}}},17845:function(ln,mt,m){"use strict";m.d(mt,{I:function(){return v}});function v(ae){const W=this;let fe=!1,z;return function(){return fe||(fe=!0,z=ae.apply(W,arguments)),z}}},88226:function(ln,mt,m){"use strict";m.d(mt,{$:function(){return v}});var v;(function(ae){function W(K){return K&&typeof K=="object"&&typeof K[Symbol.iterator]=="function"}ae.is=W;const fe=Object.freeze([]);function z(){return fe}ae.empty=z;function*g(K){yield K}ae.single=g;function q(K){return K||fe}ae.from=q;function te(K){return!K||K[Symbol.iterator]().next().done===!0}ae.isEmpty=te;function o(K){return K[Symbol.iterator]().next().value}ae.first=o;function C(K,D){for(const O of K)if(D(O))return!0;return!1}ae.some=C;function M(K,D){for(const O of K)if(D(O))return O}ae.find=M;function*y(K,D){for(const O of K)D(O)&&(yield O)}ae.filter=y;function*E(K,D){let O=0;for(const re of K)yield D(re,O++)}ae.map=E;function*T(...K){for(const D of K)for(const O of D)yield O}ae.concat=T;function*k(K){for(const D of K)for(const O of D)yield O}ae.concatNested=k;function j(K,D,O){let re=O;for(const oe of K)re=D(re,oe);return re}ae.reduce=j;function*Z(K,D,O=K.length){for(D<0&&(D+=K.length),O<0?O+=K.length:O>K.length&&(O=K.length);D<O;D++)yield K[D]}ae.slice=Z;function U(K,D=Number.POSITIVE_INFINITY){const O=[];if(D===0)return[O,K];const re=K[Symbol.iterator]();for(let oe=0;oe<D;oe++){const ie=re.next();if(ie.done)return[O,ae.empty()];O.push(ie.value)}return[O,{[Symbol.iterator](){return re}}]}ae.consume=U;function A(K,D,O=(re,oe)=>re===oe){const re=K[Symbol.iterator](),oe=D[Symbol.iterator]();for(;;){const ie=re.next(),Ee=oe.next();if(ie.done!==Ee.done)return!1;if(ie.done)return!0;if(!O(ie.value,Ee.value))return!1}}ae.equals=A})(v||(v={}))},69323:function(ln,mt,m){"use strict";m.d(mt,{B9:function(){return E},F8:function(){return T},JT:function(){return Z},Jz:function(){return A},OF:function(){return k},SL:function(){return j},Wf:function(){return y},XK:function(){return U},dk:function(){return C}});var v=m(17845),ae=m(88226);const W=!1;let fe=null;function z(K){fe=K}if(W){const K="__is_disposable_tracked__";z(new class{trackDisposable(D){const O=new Error("Potentially leaked disposable").stack;setTimeout(()=>{D[K]||console.log(O)},3e3)}setParent(D,O){if(D&&D!==Z.None)try{D[K]=!0}catch(re){}}markAsDisposed(D){if(D&&D!==Z.None)try{D[K]=!0}catch(O){}}markAsSingleton(D){}})}function g(K){return fe==null||fe.trackDisposable(K),K}function q(K){fe==null||fe.markAsDisposed(K)}function te(K,D){fe==null||fe.setParent(K,D)}function o(K,D){if(fe)for(const O of K)fe.setParent(O,D)}function C(K){return fe==null||fe.markAsSingleton(K),K}class M extends Error{constructor(D){super(`Encountered errors while disposing of store. Errors: [${D.join(", ")}]`),this.errors=D}}function y(K){return typeof K.dispose=="function"&&K.dispose.length===0}function E(K){if(ae.$.is(K)){let D=[];for(const O of K)if(O)try{O.dispose()}catch(re){D.push(re)}if(D.length===1)throw D[0];if(D.length>1)throw new M(D);return Array.isArray(K)?[]:K}else if(K)return K.dispose(),K}function T(...K){const D=k(()=>E(K));return o(K,D),D}function k(K){const D=g({dispose:(0,v.I)(()=>{q(D),K()})});return D}class j{constructor(){this._toDispose=new Set,this._isDisposed=!1,g(this)}dispose(){this._isDisposed||(q(this),this._isDisposed=!0,this.clear())}clear(){try{E(this._toDispose.values())}finally{this._toDispose.clear()}}add(D){if(!D)return D;if(D===this)throw new Error("Cannot register a disposable on itself!");return te(D,this),this._isDisposed?j.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(D),D}}j.DISABLE_DISPOSED_WARNING=!1;class Z{constructor(){this._store=new j,g(this),te(this._store,this)}dispose(){q(this),this._store.dispose()}_register(D){if(D===this)throw new Error("Cannot register a disposable on itself!");return this._store.add(D)}}Z.None=Object.freeze({dispose(){}});class U{constructor(){this._isDisposed=!1,g(this)}get value(){return this._isDisposed?void 0:this._value}set value(D){var O;this._isDisposed||D===this._value||((O=this._value)===null||O===void 0||O.dispose(),D&&te(D,this),this._value=D)}clear(){this.value=void 0}dispose(){var D;this._isDisposed=!0,q(this),(D=this._value)===null||D===void 0||D.dispose(),this._value=void 0}clearAndLeak(){const D=this._value;return this._value=void 0,D&&te(D,null),D}}class A{constructor(D){this.object=D}dispose(){}}},34502:function(ln,mt,m){"use strict";m.d(mt,{S:function(){return ae}});class v{constructor(fe){this.element=fe,this.next=v.Undefined,this.prev=v.Undefined}}v.Undefined=new v(void 0);class ae{constructor(){this._first=v.Undefined,this._last=v.Undefined,this._size=0}get size(){return this._size}isEmpty(){return this._first===v.Undefined}clear(){let fe=this._first;for(;fe!==v.Undefined;){const z=fe.next;fe.prev=v.Undefined,fe.next=v.Undefined,fe=z}this._first=v.Undefined,this._last=v.Undefined,this._size=0}unshift(fe){return this._insert(fe,!1)}push(fe){return this._insert(fe,!0)}_insert(fe,z){const g=new v(fe);if(this._first===v.Undefined)this._first=g,this._last=g;else if(z){const te=this._last;this._last=g,g.prev=te,te.next=g}else{const te=this._first;this._first=g,g.next=te,te.prev=g}this._size+=1;let q=!1;return()=>{q||(q=!0,this._remove(g))}}shift(){if(this._first!==v.Undefined){const fe=this._first.element;return this._remove(this._first),fe}}pop(){if(this._last!==v.Undefined){const fe=this._last.element;return this._remove(this._last),fe}}_remove(fe){if(fe.prev!==v.Undefined&&fe.next!==v.Undefined){const z=fe.prev;z.next=fe.next,fe.next.prev=z}else fe.prev===v.Undefined&&fe.next===v.Undefined?(this._first=v.Undefined,this._last=v.Undefined):fe.next===v.Undefined?(this._last=this._last.prev,this._last.next=v.Undefined):fe.prev===v.Undefined&&(this._first=this._first.next,this._first.prev=v.Undefined);this._size-=1}*[Symbol.iterator](){let fe=this._first;for(;fe!==v.Undefined;)yield fe.element,fe=fe.next}}},23345:function(ln,mt,m){"use strict";m.d(mt,{$L:function(){return re},ED:function(){return A},IJ:function(){return D},OS:function(){return Me},WE:function(){return ie},dz:function(){return K},gn:function(){return oe},li:function(){return k},r:function(){return ue},tY:function(){return O},xS:function(){return Ee}});var v=m(97671),ae;const W="en";let fe=!1,z=!1,g=!1,q=!1,te=!1,o=!1,C=!1,M,y=null,E=null,T;const k=typeof self=="object"?self:typeof m.g=="object"?m.g:{};let j;typeof k.vscode!="undefined"&&typeof k.vscode.process!="undefined"?j=k.vscode.process:typeof v!="undefined"&&(j=v);const Z=typeof((ae=j==null?void 0:j.versions)===null||ae===void 0?void 0:ae.electron)=="string"&&j.type==="renderer";if(typeof navigator=="object"&&!Z)T=navigator.userAgent,fe=T.indexOf("Windows")>=0,z=T.indexOf("Macintosh")>=0,C=(T.indexOf("Macintosh")>=0||T.indexOf("iPad")>=0||T.indexOf("iPhone")>=0)&&!!navigator.maxTouchPoints&&navigator.maxTouchPoints>0,g=T.indexOf("Linux")>=0,o=!0,M=navigator.language,y=M;else if(typeof j=="object"){fe=j.platform==="win32",z=j.platform==="darwin",g=j.platform==="linux",q=g&&!!j.env.SNAP&&!!j.env.SNAP_REVISION,M=W,y=W;const X=j.env.VSCODE_NLS_CONFIG;if(X)try{const L=JSON.parse(X),se=L.availableLanguages["*"];M=L.locale,y=se||W,E=L._translationsConfigFile}catch(L){}te=!0}else console.error("Unable to resolve platform.");let U=0;z?U=1:fe?U=3:g&&(U=2);const A=fe,K=z,D=g,O=te,re=o,oe=C,ie=T,Ee=function(){if(k.setImmediate)return k.setImmediate.bind(k);if(typeof k.postMessage=="function"&&!k.importScripts){let se=[];k.addEventListener("message",V=>{if(V.data&&V.data.vscodeSetImmediateId)for(let x=0,w=se.length;x<w;x++){const H=se[x];if(H.id===V.data.vscodeSetImmediateId){se.splice(x,1),H.callback();return}}});let Q=0;return V=>{const x=++Q;se.push({id:x,callback:V}),k.postMessage({vscodeSetImmediateId:x},"*")}}if(typeof(j==null?void 0:j.nextTick)=="function")return j.nextTick.bind(j);const L=Promise.resolve();return se=>L.then(se)}(),Me=z||C?2:fe?1:3;let ke=!0,tt=!1;function ue(){if(!tt){tt=!0;const X=new Uint8Array(2);X[0]=1,X[1]=2,ke=new Uint16Array(X.buffer)[0]===513}return ke}},95830:function(ln,mt,m){"use strict";m.d(mt,{G:function(){return W}});var v=m(23345);const ae=v.li.performance&&typeof v.li.performance.now=="function";class W{constructor(z){this._highResolution=ae&&z,this._startTime=this._now(),this._stopTime=-1}static create(z=!0){return new W(z)}stop(){this._stopTime=this._now()}elapsed(){return this._stopTime!==-1?this._stopTime-this._startTime:this._now()-this._startTime}_now(){return this._highResolution?v.li.performance.now():Date.now()}}},82983:function(ln,mt,m){"use strict";m.d(mt,{$i:function(){return Ke},C8:function(){return Et},GF:function(){return M},HO:function(){return Q},IO:function(){return y},K7:function(){return pt},Kw:function(){return at},LC:function(){return k},Mh:function(){return Ee},P1:function(){return Me},PJ:function(){return Nt},Qe:function(){return ft},R1:function(){return C},RP:function(){return H},S6:function(){return Ge},TT:function(){return A},Ut:function(){return x},V8:function(){return j},WU:function(){return W},YK:function(){return tt},YU:function(){return fe},ZG:function(){return ke},ZH:function(){return X},ab:function(){return Ue},c1:function(){return Ne},df:function(){return re},ec:function(){return z},fi:function(){return je},fy:function(){return g},j3:function(){return q},j_:function(){return D},m5:function(){return v},mK:function(){return O},mr:function(){return E},oH:function(){return Y},oL:function(){return te},ok:function(){return ie},ow:function(){return Z},qq:function(){return oe},qu:function(){return U},rL:function(){return ue},uS:function(){return St},un:function(){return o},uq:function(){return T},vH:function(){return se},xe:function(){return st},zY:function(){return K}});function v(P){return!P||typeof P!="string"?!0:P.trim().length===0}const ae=/{(\d+)}/g;function W(P,...ce){return ce.length===0?P:P.replace(ae,function(ve,de){const ye=parseInt(de,10);return isNaN(ye)||ye<0||ye>=ce.length?ve:ce[ye]})}function fe(P){return P.replace(/[<>&]/g,function(ce){switch(ce){case"<":return"<";case">":return">";case"&":return"&";default:return ce}})}function z(P){return P.replace(/[\\\{\}\*\+\?\|\^\$\.\[\]\(\)]/g,"\\$&")}function g(P,ce=" "){const ve=q(P,ce);return te(ve,ce)}function q(P,ce){if(!P||!ce)return P;const ve=ce.length;if(ve===0||P.length===0)return P;let de=0;for(;P.indexOf(ce,de)===de;)de=de+ve;return P.substring(de)}function te(P,ce){if(!P||!ce)return P;const ve=ce.length,de=P.length;if(ve===0||de===0)return P;let ye=de,Te=-1;for(;Te=P.lastIndexOf(ce,ye-1),!(Te===-1||Te+ve!==ye);){if(Te===0)return"";ye=Te}return P.substring(0,ye)}function o(P){return P.replace(/[\-\\\{\}\+\?\|\^\$\.\,\[\]\(\)\#\s]/g,"\\$&").replace(/[\*]/g,".*")}function C(P){return P.replace(/\*/g,"")}function M(P,ce,ve={}){if(!P)throw new Error("Cannot create regex from empty string");ce||(P=z(P)),ve.wholeWord&&(/\B/.test(P.charAt(0))||(P="\\b"+P),/\B/.test(P.charAt(P.length-1))||(P=P+"\\b"));let de="";return ve.global&&(de+="g"),ve.matchCase||(de+="i"),ve.multiline&&(de+="m"),ve.unicode&&(de+="u"),new RegExp(P,de)}function y(P){return P.source==="^"||P.source==="^$"||P.source==="$"||P.source==="^\\s*$"?!1:!!(P.exec("")&&P.lastIndex===0)}function E(P){return(P.global?"g":"")+(P.ignoreCase?"i":"")+(P.multiline?"m":"")+(P.unicode?"u":"")}function T(P){return P.split(/\r\n|\r|\n/)}function k(P){for(let ce=0,ve=P.length;ce<ve;ce++){const de=P.charCodeAt(ce);if(de!==32&&de!==9)return ce}return-1}function j(P,ce=0,ve=P.length){for(let de=ce;de<ve;de++){const ye=P.charCodeAt(de);if(ye!==32&&ye!==9)return P.substring(ce,de)}return P.substring(ce,ve)}function Z(P,ce=P.length-1){for(let ve=ce;ve>=0;ve--){const de=P.charCodeAt(ve);if(de!==32&&de!==9)return ve}return-1}function U(P,ce){return P<ce?-1:P>ce?1:0}function A(P,ce,ve=0,de=P.length,ye=0,Te=ce.length){for(;ve<de&&ye<Te;ve++,ye++){let Ae=P.charCodeAt(ve),Xe=ce.charCodeAt(ye);if(Ae<Xe)return-1;if(Ae>Xe)return 1}const we=de-ve,Ie=Te-ye;return we<Ie?-1:we>Ie?1:0}function K(P,ce){return D(P,ce,0,P.length,0,ce.length)}function D(P,ce,ve=0,de=P.length,ye=0,Te=ce.length){for(;ve<de&&ye<Te;ve++,ye++){let Ae=P.charCodeAt(ve),Xe=ce.charCodeAt(ye);if(Ae===Xe)continue;if(Ae>=128||Xe>=128)return A(P.toLowerCase(),ce.toLowerCase(),ve,de,ye,Te);O(Ae)&&(Ae-=32),O(Xe)&&(Xe-=32);const gt=Ae-Xe;if(gt!==0)return gt}const we=de-ve,Ie=Te-ye;return we<Ie?-1:we>Ie?1:0}function O(P){return P>=97&&P<=122}function re(P){return P>=65&&P<=90}function oe(P,ce){return P.length===ce.length&&D(P,ce)===0}function ie(P,ce){const ve=ce.length;return ce.length>P.length?!1:D(P,ce,0,ve)===0}function Ee(P,ce){let ve,de=Math.min(P.length,ce.length);for(ve=0;ve<de;ve++)if(P.charCodeAt(ve)!==ce.charCodeAt(ve))return ve;return de}function Me(P,ce){let ve,de=Math.min(P.length,ce.length);const ye=P.length-1,Te=ce.length-1;for(ve=0;ve<de;ve++)if(P.charCodeAt(ye-ve)!==ce.charCodeAt(Te-ve))return ve;return de}function ke(P){return 55296<=P&&P<=56319}function tt(P){return 56320<=P&&P<=57343}function ue(P,ce){return(P-55296<<10)+(ce-56320)+65536}function X(P,ce,ve){const de=P.charCodeAt(ve);if(ke(de)&&ve+1<ce){const ye=P.charCodeAt(ve+1);if(tt(ye))return ue(de,ye)}return de}function L(P,ce){const ve=P.charCodeAt(ce-1);if(tt(ve)&&ce>1){const de=P.charCodeAt(ce-2);if(ke(de))return ue(de,ve)}return ve}function se(P,ce){const ve=Re.getInstance(),de=ce,ye=P.length,Te=X(P,ye,ce);ce+=Te>=65536?2:1;let we=ve.getGraphemeBreakType(Te);for(;ce<ye;){const Ie=X(P,ye,ce),Ae=ve.getGraphemeBreakType(Ie);if(je(we,Ae))break;ce+=Ie>=65536?2:1,we=Ae}return ce-de}function Q(P,ce){const ve=Re.getInstance(),de=ce,ye=L(P,ce);ce-=ye>=65536?2:1;let Te=ve.getGraphemeBreakType(ye);for(;ce>0;){const we=L(P,ce),Ie=ve.getGraphemeBreakType(we);if(je(Ie,Te))break;ce-=we>=65536?2:1,Te=Ie}return de-ce}const V=/(?:[\u05BE\u05C0\u05C3\u05C6\u05D0-\u05F4\u0608\u060B\u060D\u061B-\u064A\u066D-\u066F\u0671-\u06D5\u06E5\u06E6\u06EE\u06EF\u06FA-\u0710\u0712-\u072F\u074D-\u07A5\u07B1-\u07EA\u07F4\u07F5\u07FA-\u0815\u081A\u0824\u0828\u0830-\u0858\u085E-\u08BD\u200F\uFB1D\uFB1F-\uFB28\uFB2A-\uFD3D\uFD50-\uFDFC\uFE70-\uFEFC]|\uD802[\uDC00-\uDD1B\uDD20-\uDE00\uDE10-\uDE33\uDE40-\uDEE4\uDEEB-\uDF35\uDF40-\uDFFF]|\uD803[\uDC00-\uDCFF]|\uD83A[\uDC00-\uDCCF\uDD00-\uDD43\uDD50-\uDFFF]|\uD83B[\uDC00-\uDEBB])/;function x(P){return V.test(P)}const w=/(?:[\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 H(P){return w.test(P)}const he=/^[\t\n\r\x20-\x7E]*$/;function Ke(P){return he.test(P)}const ft=/[\u2028\u2029]/;function Ue(P){return ft.test(P)}function st(P){for(let ce=0,ve=P.length;ce<ve;ce++)if(pt(P.charCodeAt(ce)))return!0;return!1}function pt(P){return P=+P,P>=11904&&P<=55215||P>=63744&&P<=64255||P>=65281&&P<=65374}function Et(P){return P>=127462&&P<=127487||P===8986||P===8987||P===9200||P===9203||P>=9728&&P<=10175||P===11088||P===11093||P>=127744&&P<=128591||P>=128640&&P<=128764||P>=128992&&P<=129003||P>=129280&&P<=129535||P>=129648&&P<=129750}const Ne="\uFEFF";function St(P){return!!(P&&P.length>0&&P.charCodeAt(0)===65279)}function at(P,ce=!1){return P?(ce&&(P=P.replace(/\\./g,"")),P.toLowerCase()!==P):!1}function Nt(P){return P=P%(2*26),P<26?String.fromCharCode(97+P):String.fromCharCode(65+P-26)}function Ge(P){return Re.getInstance().getGraphemeBreakType(P)}function je(P,ce){return P===0?ce!==5&&ce!==7:P===2&&ce===3?!1:P===4||P===2||P===3||ce===4||ce===2||ce===3?!0:!(P===8&&(ce===8||ce===9||ce===11||ce===12)||(P===11||P===9)&&(ce===9||ce===10)||(P===12||P===10)&&ce===10||ce===5||ce===13||ce===7||P===1||P===13&&ce===14||P===6&&ce===6)}class Re{constructor(){this._data=_e()}static getInstance(){return Re._INSTANCE||(Re._INSTANCE=new Re),Re._INSTANCE}getGraphemeBreakType(ce){if(ce<32)return ce===10?3:ce===13?2:4;if(ce<127)return 0;const ve=this._data,de=ve.length/3;let ye=1;for(;ye<=de;)if(ce<ve[3*ye])ye=2*ye;else if(ce>ve[3*ye+1])ye=2*ye+1;else return ve[3*ye+2];return 0}}Re._INSTANCE=null;function _e(){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 Y(P,ce){if(P===0)return 0;const ve=Le(P,ce);if(ve!==void 0)return ve;const de=L(ce,P);return P-=Ce(de),P}function Le(P,ce){let ve=L(ce,P);for(P-=Ce(ve);B(ve)||ve===65039||ve===8419;){if(P===0)return;ve=L(ce,P),P-=Ce(ve)}if(Et(ve)){if(P>=0){const de=L(ce,P);de===8205&&(P-=Ce(de))}return P}}function Ce(P){return P>=65536?2:1}function B(P){return 127995<=P&&P<=127999}},72999:function(ln,mt,m){"use strict";m.d(mt,{$E:function(){return k},$K:function(){return q},D8:function(){return y},HD:function(){return ae},IU:function(){return j},Jp:function(){return te},Kn:function(){return W},cW:function(){return C},f6:function(){return Z},hj:function(){return fe},jn:function(){return z},kJ:function(){return v},mf:function(){return M},o8:function(){return g},p_:function(){return o},vE:function(){return U}});function v(A){return Array.isArray(A)}function ae(A){return typeof A=="string"}function W(A){return typeof A=="object"&&A!==null&&!Array.isArray(A)&&!(A instanceof RegExp)&&!(A instanceof Date)}function fe(A){return typeof A=="number"&&!isNaN(A)}function z(A){return A===!0||A===!1}function g(A){return typeof A=="undefined"}function q(A){return!te(A)}function te(A){return g(A)||A===null}function o(A,K){if(!A)throw new Error(K?`Unexpected type, expected '${K}'`:"Unexpected type")}function C(A){if(te(A))throw new Error("Assertion Failed: argument is undefined or null");return A}function M(A){return typeof A=="function"}function y(A,K){const D=Math.min(A.length,K.length);for(let O=0;O<D;O++)E(A[O],K[O])}function E(A,K){if(ae(K)){if(typeof A!==K)throw new Error(`argument does not match constraint: typeof ${K}`)}else if(M(K)){try{if(A instanceof K)return}catch(D){}if(!te(A)&&A.constructor===K||K.length===1&&K.call(void 0,A)===!0)return;throw new Error("argument does not match one of these constraints: arg instanceof constraint, arg.constructor === constraint, nor constraint(arg) === true")}}function T(A){let K=[],D=Object.getPrototypeOf(A);for(;Object.prototype!==D;)K=K.concat(Object.getOwnPropertyNames(D)),D=Object.getPrototypeOf(D);return K}function k(A){const K=[];for(const D of T(A))typeof A[D]=="function"&&K.push(D);return K}function j(A,K){const D=re=>function(){const oe=Array.prototype.slice.call(arguments,0);return K(re,oe)};let O={};for(const re of A)O[re]=D(re);return O}function Z(A){return A===null?void 0:A}function U(A,K="Unreachable"){throw new Error(K)}},13268:function(ln,mt,m){"use strict";m.d(mt,{N:function(){return ae}});function v(W,fe){let z;return fe.length===0?z=W:z=W.replace(/\{(\d+)\}/g,function(g,q){const te=q[0];return typeof fe[te]!="undefined"?fe[te]:g}),z}function ae(W,fe,...z){return v(fe,z)}},96236:function(ln,mt,m){"use strict";m.d(mt,{BH:function(){return j},NZ:function(){return Z},U8:function(){return U},co:function(){return k},eH:function(){return T},vr:function(){return E}});var v=m(75918),ae=m(52615),W=m(4348),fe=m(88226),z=m(69323),g=m(34502),q=m(35884),te=m(90689),o=m(16925),C=m(49055),M=function(A,K,D,O){var re=arguments.length,oe=re<3?K:O===null?O=Object.getOwnPropertyDescriptor(K,D):O,ie;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")oe=Reflect.decorate(A,K,D,O);else for(var Ee=A.length-1;Ee>=0;Ee--)(ie=A[Ee])&&(oe=(re<3?ie(oe):re>3?ie(K,D,oe):ie(K,D))||oe);return re>3&&oe&&Object.defineProperty(K,D,oe),oe},y=function(A,K){return function(D,O){K(D,O,A)}};function E(A){return A.command!==void 0}class T{constructor(K){this.id=T._idPool++,this._debugName=K}}T._idPool=0,T.CommandPalette=new T("CommandPalette"),T.EditorContext=new T("EditorContext"),T.SimpleEditorContext=new T("SimpleEditorContext"),T.EditorContextCopy=new T("EditorContextCopy"),T.EditorContextPeek=new T("EditorContextPeek"),T.MenubarEditMenu=new T("MenubarEditMenu"),T.MenubarCopy=new T("MenubarCopy"),T.MenubarGoMenu=new T("MenubarGoMenu"),T.MenubarSelectionMenu=new T("MenubarSelectionMenu"),T.InlineCompletionsActions=new T("InlineCompletionsActions");const k=(0,o.yh)("menuService"),j=new class{constructor(){this._commands=new Map,this._menuItems=new Map,this._onDidChangeMenu=new W.Q5,this.onDidChangeMenu=this._onDidChangeMenu.event,this._commandPaletteChangeEvent={has:A=>A===T.CommandPalette}}addCommand(A){return this.addCommands(fe.$.single(A))}addCommands(A){for(const K of A)this._commands.set(K.id,K);return this._onDidChangeMenu.fire(this._commandPaletteChangeEvent),(0,z.OF)(()=>{let K=!1;for(const D of A)K=this._commands.delete(D.id)||K;K&&this._onDidChangeMenu.fire(this._commandPaletteChangeEvent)})}getCommand(A){return this._commands.get(A)}getCommands(){const A=new Map;return this._commands.forEach((K,D)=>A.set(D,K)),A}appendMenuItem(A,K){return this.appendMenuItems(fe.$.single({id:A,item:K}))}appendMenuItems(A){const K=new Set,D=new g.S;for(const{id:O,item:re}of A){let oe=this._menuItems.get(O);oe||(oe=new g.S,this._menuItems.set(O,oe)),D.push(oe.push(re)),K.add(O)}return this._onDidChangeMenu.fire(K),(0,z.OF)(()=>{if(D.size>0){for(let O of D)O();this._onDidChangeMenu.fire(K),D.clear()}})}getMenuItems(A){let K;return this._menuItems.has(A)?K=[...this._menuItems.get(A)]:K=[],A===T.CommandPalette&&this._appendImplicitItems(K),K}_appendImplicitItems(A){const K=new Set;for(const D of A)E(D)&&(K.add(D.command.id),D.alt&&K.add(D.alt.id));this._commands.forEach((D,O)=>{K.has(O)||A.push({command:D})})}};class Z extends v.wY{constructor(K,D,O,re){super(`submenuitem.${K.submenu.id}`,typeof K.title=="string"?K.title:K.title.value,[],"submenu"),this.item=K,this._menuService=D,this._contextKeyService=O,this._options=re}get actions(){const K=[],D=this._menuService.createMenu(this.item.submenu,this._contextKeyService),O=D.getActions(this._options);D.dispose();for(const[,re]of O)re.length>0&&(K.push(...re),K.push(new v.Z0));return K.length&&K.pop(),K}}let U=class Eu{constructor(K,D,O,re,oe){var ie,Ee;if(this._commandService=oe,this.id=K.id,this.label=O!=null&&O.renderShortTitle&&K.shortTitle?typeof K.shortTitle=="string"?K.shortTitle:K.shortTitle.value:typeof K.title=="string"?K.title:K.title.value,this.tooltip=(Ee=typeof K.tooltip=="string"?K.tooltip:(ie=K.tooltip)===null||ie===void 0?void 0:ie.value)!==null&&Ee!==void 0?Ee:"",this.enabled=!K.precondition||re.contextMatchesRules(K.precondition),this.checked=void 0,K.toggled){const Me=K.toggled.condition?K.toggled:{condition:K.toggled};this.checked=re.contextMatchesRules(Me.condition),this.checked&&Me.tooltip&&(this.tooltip=typeof Me.tooltip=="string"?Me.tooltip:Me.tooltip.value),Me.title&&(this.label=typeof Me.title=="string"?Me.title:Me.title.value)}this.item=K,this.alt=D?new Eu(D,void 0,O,re,oe):void 0,this._options=O,C.kS.isThemeIcon(K.icon)&&(this.class=ae.dT.asClassName(K.icon))}dispose(){}run(...K){var D,O;let re=[];return!((D=this._options)===null||D===void 0)&&D.arg&&(re=[...re,this._options.arg]),!((O=this._options)===null||O===void 0)&&O.shouldForwardArgs&&(re=[...re,...K]),this._commandService.executeCommand(this.id,...re)}};U=M([y(3,te.i6),y(4,q.H)],U)},35884:function(ln,mt,m){"use strict";m.d(mt,{H:function(){return q},P:function(){return te}});var v=m(4348),ae=m(88226),W=m(69323),fe=m(34502),z=m(72999),g=m(16925);const q=(0,g.yh)("commandService"),te=new class{constructor(){this._commands=new Map,this._onDidRegisterCommand=new v.Q5,this.onDidRegisterCommand=this._onDidRegisterCommand.event}registerCommand(o,C){if(!o)throw new Error("invalid command");if(typeof o=="string"){if(!C)throw new Error("invalid command");return this.registerCommand({id:o,handler:C})}if(o.description){const k=[];for(let Z of o.description.args)k.push(Z.constraint);const j=o.handler;o.handler=function(Z,...U){return(0,z.D8)(U,k),j(Z,...U)}}const{id:M}=o;let y=this._commands.get(M);y||(y=new fe.S,this._commands.set(M,y));let E=y.unshift(o),T=(0,W.OF)(()=>{E();const k=this._commands.get(M);k!=null&&k.isEmpty()&&this._commands.delete(M)});return this._onDidRegisterCommand.fire(M),T}registerCommandAlias(o,C){return te.registerCommand(o,(M,...y)=>M.get(q).executeCommand(C,...y))}getCommand(o){const C=this._commands.get(o);if(!(!C||C.isEmpty()))return ae.$.first(C)}getCommands(){const o=new Map;for(const C of this._commands.keys()){const M=this.getCommand(C);M&&o.set(C,M)}return o}};te.registerCommand("noop",()=>{})},90689:function(ln,mt,m){"use strict";m.d(mt,{Ao:function(){return q},Eq:function(){return ue},Fb:function(){return te},K8:function(){return se},i6:function(){return tt},uy:function(){return ke}});var v=m(23345),ae=m(82983),W=m(16925);let fe=v.WE||"";const z=new Map;z.set("false",!1),z.set("true",!0),z.set("isMac",v.dz),z.set("isLinux",v.IJ),z.set("isWindows",v.ED),z.set("isWeb",v.$L),z.set("isMacNative",v.dz&&!v.$L),z.set("isEdge",fe.indexOf("Edg/")>=0),z.set("isFirefox",fe.indexOf("Firefox")>=0),z.set("isChrome",fe.indexOf("Chrome")>=0),z.set("isSafari",fe.indexOf("Safari")>=0);const g=Object.prototype.hasOwnProperty;class q{static has(x){return y.create(x)}static equals(x,w){return E.create(x,w)}static regex(x,w){return re.create(x,w)}static not(x){return Z.create(x)}static and(...x){return Ee.create(x,null)}static or(...x){return Me.create(x,null,!0)}static deserialize(x,w=!1){if(x)return this._deserializeOrExpression(x,w)}static _deserializeOrExpression(x,w){let H=x.split("||");return Me.create(H.map(he=>this._deserializeAndExpression(he,w)),null,!0)}static _deserializeAndExpression(x,w){let H=x.split("&&");return Ee.create(H.map(he=>this._deserializeOne(he,w)),null)}static _deserializeOne(x,w){if(x=x.trim(),x.indexOf("!=")>=0){let H=x.split("!=");return j.create(H[0].trim(),this._deserializeValue(H[1],w))}if(x.indexOf("==")>=0){let H=x.split("==");return E.create(H[0].trim(),this._deserializeValue(H[1],w))}if(x.indexOf("=~")>=0){let H=x.split("=~");return re.create(H[0].trim(),this._deserializeRegexValue(H[1],w))}if(x.indexOf(" in ")>=0){let H=x.split(" in ");return T.create(H[0].trim(),H[1].trim())}if(/^[^<=>]+>=[^<=>]+$/.test(x)){const H=x.split(">=");return K.create(H[0].trim(),H[1].trim())}if(/^[^<=>]+>[^<=>]+$/.test(x)){const H=x.split(">");return A.create(H[0].trim(),H[1].trim())}if(/^[^<=>]+<=[^<=>]+$/.test(x)){const H=x.split("<=");return O.create(H[0].trim(),H[1].trim())}if(/^[^<=>]+<[^<=>]+$/.test(x)){const H=x.split("<");return D.create(H[0].trim(),H[1].trim())}return/^\!\s*/.test(x)?Z.create(x.substr(1).trim()):y.create(x)}static _deserializeValue(x,w){if(x=x.trim(),x==="true")return!0;if(x==="false")return!1;let H=/^'([^']*)'$/.exec(x);return H?H[1].trim():x}static _deserializeRegexValue(x,w){if((0,ae.m5)(x)){if(w)throw new Error("missing regexp-value for =~-expression");return console.warn("missing regexp-value for =~-expression"),null}let H=x.indexOf("/"),he=x.lastIndexOf("/");if(H===he||H<0){if(w)throw new Error(`bad regexp-value '${x}', missing /-enclosure`);return console.warn(`bad regexp-value '${x}', missing /-enclosure`),null}let Ke=x.slice(H+1,he),ft=x[he+1]==="i"?"i":"";try{return new RegExp(Ke,ft)}catch(Ue){if(w)throw new Error(`bad regexp-value '${x}', parse error: ${Ue}`);return console.warn(`bad regexp-value '${x}', parse error: ${Ue}`),null}}}function te(V,x){const w=V?V.substituteConstants():void 0,H=x?x.substituteConstants():void 0;return!w&&!H?!0:!w||!H?!1:w.equals(H)}function o(V,x){return V.cmp(x)}class C{constructor(){this.type=0}cmp(x){return this.type-x.type}equals(x){return x.type===this.type}substituteConstants(){return this}evaluate(x){return!1}serialize(){return"false"}keys(){return[]}negate(){return M.INSTANCE}}C.INSTANCE=new C;class M{constructor(){this.type=1}cmp(x){return this.type-x.type}equals(x){return x.type===this.type}substituteConstants(){return this}evaluate(x){return!0}serialize(){return"true"}keys(){return[]}negate(){return C.INSTANCE}}M.INSTANCE=new M;class y{constructor(x,w){this.key=x,this.negated=w,this.type=2}static create(x,w=null){const H=z.get(x);return typeof H=="boolean"?H?M.INSTANCE:C.INSTANCE:new y(x,w)}cmp(x){return x.type!==this.type?this.type-x.type:X(this.key,x.key)}equals(x){return x.type===this.type?this.key===x.key:!1}substituteConstants(){const x=z.get(this.key);return typeof x=="boolean"?x?M.INSTANCE:C.INSTANCE:this}evaluate(x){return!!x.getValue(this.key)}serialize(){return this.key}keys(){return[this.key]}negate(){return this.negated||(this.negated=Z.create(this.key,this)),this.negated}}class E{constructor(x,w,H){this.key=x,this.value=w,this.negated=H,this.type=4}static create(x,w,H=null){if(typeof w=="boolean")return w?y.create(x,H):Z.create(x,H);const he=z.get(x);return typeof he=="boolean"?w===(he?"true":"false")?M.INSTANCE:C.INSTANCE:new E(x,w,H)}cmp(x){return x.type!==this.type?this.type-x.type:L(this.key,this.value,x.key,x.value)}equals(x){return x.type===this.type?this.key===x.key&&this.value===x.value:!1}substituteConstants(){const x=z.get(this.key);if(typeof x=="boolean"){const w=x?"true":"false";return this.value===w?M.INSTANCE:C.INSTANCE}return this}evaluate(x){return x.getValue(this.key)==this.value}serialize(){return`${this.key} == '${this.value}'`}keys(){return[this.key]}negate(){return this.negated||(this.negated=j.create(this.key,this.value,this)),this.negated}}class T{constructor(x,w){this.key=x,this.valueKey=w,this.type=10,this.negated=null}static create(x,w){return new T(x,w)}cmp(x){return x.type!==this.type?this.type-x.type:L(this.key,this.valueKey,x.key,x.valueKey)}equals(x){return x.type===this.type?this.key===x.key&&this.valueKey===x.valueKey:!1}substituteConstants(){return this}evaluate(x){const w=x.getValue(this.valueKey),H=x.getValue(this.key);return Array.isArray(w)?w.indexOf(H)>=0:typeof H=="string"&&typeof w=="object"&&w!==null?g.call(w,H):!1}serialize(){return`${this.key} in '${this.valueKey}'`}keys(){return[this.key,this.valueKey]}negate(){return this.negated||(this.negated=k.create(this)),this.negated}}class k{constructor(x){this._actual=x,this.type=11}static create(x){return new k(x)}cmp(x){return x.type!==this.type?this.type-x.type:this._actual.cmp(x._actual)}equals(x){return x.type===this.type?this._actual.equals(x._actual):!1}substituteConstants(){return this}evaluate(x){return!this._actual.evaluate(x)}serialize(){throw new Error("Method not implemented.")}keys(){return this._actual.keys()}negate(){return this._actual}}class j{constructor(x,w,H){this.key=x,this.value=w,this.negated=H,this.type=5}static create(x,w,H=null){if(typeof w=="boolean")return w?Z.create(x,H):y.create(x,H);const he=z.get(x);return typeof he=="boolean"?w===(he?"true":"false")?C.INSTANCE:M.INSTANCE:new j(x,w,H)}cmp(x){return x.type!==this.type?this.type-x.type:L(this.key,this.value,x.key,x.value)}equals(x){return x.type===this.type?this.key===x.key&&this.value===x.value:!1}substituteConstants(){const x=z.get(this.key);if(typeof x=="boolean"){const w=x?"true":"false";return this.value===w?C.INSTANCE:M.INSTANCE}return this}evaluate(x){return x.getValue(this.key)!=this.value}serialize(){return`${this.key} != '${this.value}'`}keys(){return[this.key]}negate(){return this.negated||(this.negated=E.create(this.key,this.value,this)),this.negated}}class Z{constructor(x,w){this.key=x,this.negated=w,this.type=3}static create(x,w=null){const H=z.get(x);return typeof H=="boolean"?H?C.INSTANCE:M.INSTANCE:new Z(x,w)}cmp(x){return x.type!==this.type?this.type-x.type:X(this.key,x.key)}equals(x){return x.type===this.type?this.key===x.key:!1}substituteConstants(){const x=z.get(this.key);return typeof x=="boolean"?x?C.INSTANCE:M.INSTANCE:this}evaluate(x){return!x.getValue(this.key)}serialize(){return`!${this.key}`}keys(){return[this.key]}negate(){return this.negated||(this.negated=y.create(this.key,this)),this.negated}}function U(V,x){if(typeof V=="string"){const w=parseFloat(V);isNaN(w)||(V=w)}return typeof V=="string"||typeof V=="number"?x(V):C.INSTANCE}class A{constructor(x,w,H){this.key=x,this.value=w,this.negated=H,this.type=12}static create(x,w,H=null){return U(w,he=>new A(x,he,H))}cmp(x){return x.type!==this.type?this.type-x.type:L(this.key,this.value,x.key,x.value)}equals(x){return x.type===this.type?this.key===x.key&&this.value===x.value:!1}substituteConstants(){return this}evaluate(x){return typeof this.value=="string"?!1:parseFloat(x.getValue(this.key))>this.value}serialize(){return`${this.key} > ${this.value}`}keys(){return[this.key]}negate(){return this.negated||(this.negated=O.create(this.key,this.value,this)),this.negated}}class K{constructor(x,w,H){this.key=x,this.value=w,this.negated=H,this.type=13}static create(x,w,H=null){return U(w,he=>new K(x,he,H))}cmp(x){return x.type!==this.type?this.type-x.type:L(this.key,this.value,x.key,x.value)}equals(x){return x.type===this.type?this.key===x.key&&this.value===x.value:!1}substituteConstants(){return this}evaluate(x){return typeof this.value=="string"?!1:parseFloat(x.getValue(this.key))>=this.value}serialize(){return`${this.key} >= ${this.value}`}keys(){return[this.key]}negate(){return this.negated||(this.negated=D.create(this.key,this.value,this)),this.negated}}class D{constructor(x,w,H){this.key=x,this.value=w,this.negated=H,this.type=14}static create(x,w,H=null){return U(w,he=>new D(x,he,H))}cmp(x){return x.type!==this.type?this.type-x.type:L(this.key,this.value,x.key,x.value)}equals(x){return x.type===this.type?this.key===x.key&&this.value===x.value:!1}substituteConstants(){return this}evaluate(x){return typeof this.value=="string"?!1:parseFloat(x.getValue(this.key))<this.value}serialize(){return`${this.key} < ${this.value}`}keys(){return[this.key]}negate(){return this.negated||(this.negated=K.create(this.key,this.value,this)),this.negated}}class O{constructor(x,w,H){this.key=x,this.value=w,this.negated=H,this.type=15}static create(x,w,H=null){return U(w,he=>new O(x,he,H))}cmp(x){return x.type!==this.type?this.type-x.type:L(this.key,this.value,x.key,x.value)}equals(x){return x.type===this.type?this.key===x.key&&this.value===x.value:!1}substituteConstants(){return this}evaluate(x){return typeof this.value=="string"?!1:parseFloat(x.getValue(this.key))<=this.value}serialize(){return`${this.key} <= ${this.value}`}keys(){return[this.key]}negate(){return this.negated||(this.negated=A.create(this.key,this.value,this)),this.negated}}class re{constructor(x,w){this.key=x,this.regexp=w,this.type=7,this.negated=null}static create(x,w){return new re(x,w)}cmp(x){if(x.type!==this.type)return this.type-x.type;if(this.key<x.key)return-1;if(this.key>x.key)return 1;const w=this.regexp?this.regexp.source:"",H=x.regexp?x.regexp.source:"";return w<H?-1:w>H?1:0}equals(x){if(x.type===this.type){const w=this.regexp?this.regexp.source:"",H=x.regexp?x.regexp.source:"";return this.key===x.key&&w===H}return!1}substituteConstants(){return this}evaluate(x){let w=x.getValue(this.key);return this.regexp?this.regexp.test(w):!1}serialize(){const x=this.regexp?`/${this.regexp.source}/${this.regexp.ignoreCase?"i":""}`:"/invalid/";return`${this.key} =~ ${x}`}keys(){return[this.key]}negate(){return this.negated||(this.negated=oe.create(this)),this.negated}}class oe{constructor(x){this._actual=x,this.type=8}static create(x){return new oe(x)}cmp(x){return x.type!==this.type?this.type-x.type:this._actual.cmp(x._actual)}equals(x){return x.type===this.type?this._actual.equals(x._actual):!1}substituteConstants(){return this}evaluate(x){return!this._actual.evaluate(x)}serialize(){throw new Error("Method not implemented.")}keys(){return this._actual.keys()}negate(){return this._actual}}function ie(V){let x=null;for(let w=0,H=V.length;w<H;w++){const he=V[w].substituteConstants();if(V[w]!==he&&x===null){x=[];for(let Ke=0;Ke<w;Ke++)x[Ke]=V[Ke]}x!==null&&(x[w]=he)}return x===null?V:x}class Ee{constructor(x,w){this.expr=x,this.negated=w,this.type=6}static create(x,w){return Ee._normalizeArr(x,w)}cmp(x){if(x.type!==this.type)return this.type-x.type;if(this.expr.length<x.expr.length)return-1;if(this.expr.length>x.expr.length)return 1;for(let w=0,H=this.expr.length;w<H;w++){const he=o(this.expr[w],x.expr[w]);if(he!==0)return he}return 0}equals(x){if(x.type===this.type){if(this.expr.length!==x.expr.length)return!1;for(let w=0,H=this.expr.length;w<H;w++)if(!this.expr[w].equals(x.expr[w]))return!1;return!0}return!1}substituteConstants(){const x=ie(this.expr);return x===this.expr?this:Ee.create(x,this.negated)}evaluate(x){for(let w=0,H=this.expr.length;w<H;w++)if(!this.expr[w].evaluate(x))return!1;return!0}static _normalizeArr(x,w){const H=[];let he=!1;for(const Ke of x)if(Ke){if(Ke.type===1){he=!0;continue}if(Ke.type===0)return C.INSTANCE;if(Ke.type===6){H.push(...Ke.expr);continue}H.push(Ke)}if(H.length===0&&he)return M.INSTANCE;if(H.length!==0){if(H.length===1)return H[0];H.sort(o);for(let Ke=1;Ke<H.length;Ke++)H[Ke-1].equals(H[Ke])&&(H.splice(Ke,1),Ke--);if(H.length===1)return H[0];for(;H.length>1;){const Ke=H[H.length-1];if(Ke.type!==9)break;H.pop();const ft=H.pop(),Ue=H.length===0,st=Me.create(Ke.expr.map(pt=>Ee.create([pt,ft],null)),null,Ue);st&&(H.push(st),H.sort(o))}return H.length===1?H[0]:new Ee(H,w)}}serialize(){return this.expr.map(x=>x.serialize()).join(" && ")}keys(){const x=[];for(let w of this.expr)x.push(...w.keys());return x}negate(){if(!this.negated){const x=[];for(let w of this.expr)x.push(w.negate());this.negated=Me.create(x,this,!0)}return this.negated}}class Me{constructor(x,w){this.expr=x,this.negated=w,this.type=9}static create(x,w,H){return Me._normalizeArr(x,w,H)}cmp(x){if(x.type!==this.type)return this.type-x.type;if(this.expr.length<x.expr.length)return-1;if(this.expr.length>x.expr.length)return 1;for(let w=0,H=this.expr.length;w<H;w++){const he=o(this.expr[w],x.expr[w]);if(he!==0)return he}return 0}equals(x){if(x.type===this.type){if(this.expr.length!==x.expr.length)return!1;for(let w=0,H=this.expr.length;w<H;w++)if(!this.expr[w].equals(x.expr[w]))return!1;return!0}return!1}substituteConstants(){const x=ie(this.expr);return x===this.expr?this:Me.create(x,this.negated,!1)}evaluate(x){for(let w=0,H=this.expr.length;w<H;w++)if(this.expr[w].evaluate(x))return!0;return!1}static _normalizeArr(x,w,H){let he=[],Ke=!1;if(x){for(let ft=0,Ue=x.length;ft<Ue;ft++){const st=x[ft];if(st){if(st.type===0){Ke=!0;continue}if(st.type===1)return M.INSTANCE;if(st.type===9){he=he.concat(st.expr);continue}he.push(st)}}if(he.length===0&&Ke)return C.INSTANCE;he.sort(o)}if(he.length!==0){if(he.length===1)return he[0];for(let ft=1;ft<he.length;ft++)he[ft-1].equals(he[ft])&&(he.splice(ft,1),ft--);if(he.length===1)return he[0];if(H){for(let ft=0;ft<he.length;ft++)for(let Ue=ft+1;Ue<he.length;Ue++)se(he[ft],he[Ue])&&(he.splice(Ue,1),Ue--);if(he.length===1)return he[0]}return new Me(he,w)}}serialize(){return this.expr.map(x=>x.serialize()).join(" || ")}keys(){const x=[];for(let w of this.expr)x.push(...w.keys());return x}negate(){if(!this.negated){let x=[];for(let w of this.expr)x.push(w.negate());for(;x.length>1;){const w=x.shift(),H=x.shift(),he=[];for(const ft of Q(w))for(const Ue of Q(H))he.push(Ee.create([ft,Ue],null));const Ke=x.length===0;x.unshift(Me.create(he,null,Ke))}this.negated=x[0]}return this.negated}}class ke extends y{constructor(x,w,H){super(x,null),this._defaultValue=w,typeof H=="object"?ke._info.push(Object.assign(Object.assign({},H),{key:x})):H!==!0&&ke._info.push({key:x,description:H,type:w!=null?typeof w:void 0})}static all(){return ke._info.values()}bindTo(x){return x.createKey(this.key,this._defaultValue)}getValue(x){return x.getContextKeyValue(this.key)}toNegated(){return this.negate()}isEqualTo(x){return E.create(this.key,x)}}ke._info=[];const tt=(0,W.yh)("contextKeyService"),ue="setContext";function X(V,x){return V<x?-1:V>x?1:0}function L(V,x,w,H){return V<w?-1:V>w?1:x<H?-1:x>H?1:0}function se(V,x){if(x.type===6&&V.type!==9&&V.type!==6){for(const he of x.expr)if(V.equals(he))return!0}const w=V.negate(),H=Q(w).concat(Q(x));H.sort(o);for(let he=0;he<H.length;he++){const ft=H[he].negate();for(let Ue=he+1;Ue<H.length;Ue++){const st=H[Ue];if(ft.equals(st))return!0}}return!1}function Q(V){return V.type===9?V.expr:[V]}},16925:function(ln,mt,m){"use strict";m.d(mt,{I8:function(){return v},TG:function(){return ae},jt:function(){return z},yh:function(){return fe}});var v;(function(g){g.serviceIds=new Map,g.DI_TARGET="$di$target",g.DI_DEPENDENCIES="$di$dependencies";function q(te){return te[g.DI_DEPENDENCIES]||[]}g.getServiceDependencies=q})(v||(v={}));const ae=fe("instantiationService");function W(g,q,te,o){q[v.DI_TARGET]===q?q[v.DI_DEPENDENCIES].push({id:g,index:te,optional:o}):(q[v.DI_DEPENDENCIES]=[{id:g,index:te,optional:o}],q[v.DI_TARGET]=q)}function fe(g){if(v.serviceIds.has(g))return v.serviceIds.get(g);const q=function(te,o,C){if(arguments.length!==3)throw new Error("@IServiceName-decorator can only be used to decorate a parameter");W(q,te,C,!1)};return q.toString=()=>g,v.serviceIds.set(g,q),q}function z(g){return function(q,te,o){if(arguments.length!==3)throw new Error("@optional-decorator can only be used to decorate a parameter");W(g,q,o,!0)}}},44650:function(ln,mt,m){"use strict";m.d(mt,{B:function(){return fe}});var v=m(76068),ae=m(72999);class W{constructor(){this.data=new Map}add(g,q){v.ok(ae.HD(g)),v.ok(ae.Kn(q)),v.ok(!this.data.has(g),"There is already an extension with this id"),this.data.set(g,q)}as(g){return this.data.get(g)||null}}const fe=new W},66213:function(ln,mt,m){"use strict";m.d(mt,{e:function(){return v}});var v;(function(ae){ae.DARK="dark",ae.LIGHT="light",ae.HIGH_CONTRAST="hc"})(v||(v={}))},49055:function(ln,mt,m){"use strict";m.d(mt,{EN:function(){return o},IP:function(){return y},Ic:function(){return k},XE:function(){return q},bB:function(){return j},kS:function(){return C},m6:function(){return M}});var v=m(52615),ae=m(4348),W=m(69323),fe=m(16925),z=m(44650),g=m(66213);const q=(0,fe.yh)("themeService");var te;(function(Z){function U(A){return A&&typeof A=="object"&&typeof A.id=="string"}Z.isThemeColor=U})(te||(te={}));function o(Z){return{id:Z}}var C;(function(Z){function U(oe){return oe&&typeof oe=="object"&&typeof oe.id=="string"&&(typeof oe.color=="undefined"||te.isThemeColor(oe.color))}Z.isThemeIcon=U;const A=new RegExp(`^\\$\\((${v.dT.iconNameExpression}(?:${v.dT.iconModifierExpression})?)\\)$`);function K(oe){const ie=A.exec(oe);if(!ie)return;let[,Ee]=ie;return{id:Ee}}Z.fromString=K;function D(oe,ie){let Ee=oe.id;const Me=Ee.lastIndexOf("~");return Me!==-1&&(Ee=Ee.substring(0,Me)),ie&&(Ee=`${Ee}~${ie}`),{id:Ee}}Z.modify=D;function O(oe,ie){var Ee,Me;return oe.id===ie.id&&((Ee=oe.color)===null||Ee===void 0?void 0:Ee.id)===((Me=ie.color)===null||Me===void 0?void 0:Me.id)}Z.isEqual=O;function re(oe,ie){return{id:oe.id,color:ie?o(ie):void 0}}Z.asThemeIcon=re,Z.asClassNameArray=v.dT.asClassNameArray,Z.asClassName=v.dT.asClassName,Z.asCSSSelector=v.dT.asCSSSelector})(C||(C={}));function M(Z){switch(Z){case g.e.DARK:return"vs-dark";case g.e.HIGH_CONTRAST:return"hc-black";default:return"vs"}}const y={ThemingContribution:"base.contributions.theming"};class E{constructor(){this.themingParticipants=[],this.themingParticipants=[],this.onThemingParticipantAddedEmitter=new ae.Q5}onColorThemeChange(U){return this.themingParticipants.push(U),this.onThemingParticipantAddedEmitter.fire(U),(0,W.OF)(()=>{const A=this.themingParticipants.indexOf(U);this.themingParticipants.splice(A,1)})}getThemingParticipants(){return this.themingParticipants}}let T=new E;z.B.add(y.ThemingContribution,T);function k(Z){return T.onColorThemeChange(Z)}class j extends W.JT{constructor(U){super(),this.themeService=U,this.theme=U.getColorTheme(),this._register(this.themeService.onDidColorThemeChange(A=>this.onThemeChange(A)))}onThemeChange(U){this.theme=U,this.updateStyles()}updateStyles(){}}},96478:function(ln,mt,m){"use strict";m.d(mt,{Z:function(){return oe}});var v=m(60499),ae=m(18642),W=m(72190),fe=m(42244),z=m(68196),g=m(92310),q=m.n(g),te=m(8654),o=m(59301),C=m(10228),M=m(16089),y=C.Z.ESC,E=C.Z.TAB;function T(ie){var Ee=ie.visible,Me=ie.triggerRef,ke=ie.onVisibleChange,tt=ie.autoFocus,ue=ie.overlayRef,X=o.useRef(!1),L=function(){if(Ee){var x,w;(x=Me.current)===null||x===void 0||(w=x.focus)===null||w===void 0||w.call(x),ke==null||ke(!1)}},se=function(){var x;return(x=ue.current)!==null&&x!==void 0&&x.focus?(ue.current.focus(),X.current=!0,!0):!1},Q=function(x){switch(x.keyCode){case y:L();break;case E:{var w=!1;X.current||(w=se()),w?x.preventDefault():L();break}}};o.useEffect(function(){return Ee?(window.addEventListener("keydown",Q),tt&&(0,M.Z)(se,3),function(){window.removeEventListener("keydown",Q),X.current=!1}):function(){X.current=!1}},[Ee])}var k=(0,o.forwardRef)(function(ie,Ee){var Me=ie.overlay,ke=ie.arrow,tt=ie.prefixCls,ue=(0,o.useMemo)(function(){var L;return typeof Me=="function"?L=Me():L=Me,L},[Me]),X=(0,te.sQ)(Ee,(0,te.C4)(ue));return o.createElement(o.Fragment,null,ke&&o.createElement("div",{className:"".concat(tt,"-arrow")}),o.cloneElement(ue,{ref:(0,te.Yr)(ue)?X:void 0}))}),j=k,Z={adjustX:1,adjustY:1},U=[0,0],A={topLeft:{points:["bl","tl"],overflow:Z,offset:[0,-4],targetOffset:U},top:{points:["bc","tc"],overflow:Z,offset:[0,-4],targetOffset:U},topRight:{points:["br","tr"],overflow:Z,offset:[0,-4],targetOffset:U},bottomLeft:{points:["tl","bl"],overflow:Z,offset:[0,4],targetOffset:U},bottom:{points:["tc","bc"],overflow:Z,offset:[0,4],targetOffset:U},bottomRight:{points:["tr","br"],overflow:Z,offset:[0,4],targetOffset:U}},K=A,D=["arrow","prefixCls","transitionName","animation","align","placement","placements","getPopupContainer","showAction","hideAction","overlayClassName","overlayStyle","visible","trigger","autoFocus","overlay","children","onVisibleChange"];function O(ie,Ee){var Me,ke=ie.arrow,tt=ke===void 0?!1:ke,ue=ie.prefixCls,X=ue===void 0?"rc-dropdown":ue,L=ie.transitionName,se=ie.animation,Q=ie.align,V=ie.placement,x=V===void 0?"bottomLeft":V,w=ie.placements,H=w===void 0?K:w,he=ie.getPopupContainer,Ke=ie.showAction,ft=ie.hideAction,Ue=ie.overlayClassName,st=ie.overlayStyle,pt=ie.visible,Et=ie.trigger,Ne=Et===void 0?["hover"]:Et,St=ie.autoFocus,at=ie.overlay,Nt=ie.children,Ge=ie.onVisibleChange,je=(0,fe.Z)(ie,D),Re=o.useState(),_e=(0,W.Z)(Re,2),Y=_e[0],Le=_e[1],Ce="visible"in ie?pt:Y,B=o.useRef(null),P=o.useRef(null),ce=o.useRef(null);o.useImperativeHandle(Ee,function(){return B.current});var ve=function(ht){Le(ht),Ge==null||Ge(ht)};T({visible:Ce,triggerRef:ce,onVisibleChange:ve,autoFocus:St,overlayRef:P});var de=function(ht){var nt=ie.onOverlayClick;Le(!1),nt&&nt(ht)},ye=function(){return o.createElement(j,{ref:P,overlay:at,prefixCls:X,arrow:tt})},Te=function(){return typeof at=="function"?ye:ye()},we=function(){var ht=ie.minOverlayWidthMatchTrigger,nt=ie.alignPoint;return"minOverlayWidthMatchTrigger"in ie?ht:!nt},Ie=function(){var ht=ie.openClassName;return ht!==void 0?ht:"".concat(X,"-open")},Ae=o.cloneElement(Nt,{className:q()((Me=Nt.props)===null||Me===void 0?void 0:Me.className,Ce&&Ie()),ref:(0,te.Yr)(Nt)?(0,te.sQ)(ce,(0,te.C4)(Nt)):void 0}),Xe=ft;return!Xe&&Ne.indexOf("contextMenu")!==-1&&(Xe=["click"]),o.createElement(z.Z,(0,v.Z)({builtinPlacements:H},je,{prefixCls:X,ref:B,popupClassName:q()(Ue,(0,ae.Z)({},"".concat(X,"-show-arrow"),tt)),popupStyle:st,action:Ne,showAction:Ke,hideAction:Xe,popupPlacement:x,popupAlign:Q,popupTransitionName:L,popupAnimation:se,popupVisible:Ce,stretch:we()?"minWidth":"",popup:Te(),onPopupVisibleChange:ve,onPopupClick:de,getPopupContainer:he}),Ae)}var re=o.forwardRef(O),oe=re},66003:function(ln,mt,m){"use strict";m.d(mt,{Z:function(){return q}});var v=m(42244),ae=m(85899),W=m(43749),fe=m(59301),z=["show"];function g(te,o){if(!o.max)return!0;var C=o.strategy(te);return C<=o.max}function q(te,o){return fe.useMemo(function(){var C={};o&&(C.show=(0,W.Z)(o)==="object"&&o.formatter?o.formatter:!!o),C=(0,ae.Z)((0,ae.Z)({},C),te);var M=C,y=M.show,E=(0,v.Z)(M,z);return(0,ae.Z)((0,ae.Z)({},E),{},{show:!!y,showFormatter:typeof y=="function"?y:void 0,strategy:E.strategy||function(T){return T.length}})},[te,o])}},36901:function(ln,mt,m){"use strict";m.r(mt),m.d(mt,{BaseInput:function(){return C},default:function(){return K}});var v=m(85899),ae=m(60499),W=m(18642),fe=m(43749),z=m(92310),g=m.n(z),q=m(59301),te=m(30292),o=q.forwardRef(function(D,O){var re,oe,ie,Ee=D.inputElement,Me=D.children,ke=D.prefixCls,tt=D.prefix,ue=D.suffix,X=D.addonBefore,L=D.addonAfter,se=D.className,Q=D.style,V=D.disabled,x=D.readOnly,w=D.focused,H=D.triggerFocus,he=D.allowClear,Ke=D.value,ft=D.handleReset,Ue=D.hidden,st=D.classes,pt=D.classNames,Et=D.dataAttrs,Ne=D.styles,St=D.components,at=D.onClear,Nt=Me!=null?Me:Ee,Ge=(St==null?void 0:St.affixWrapper)||"span",je=(St==null?void 0:St.groupWrapper)||"span",Re=(St==null?void 0:St.wrapper)||"span",_e=(St==null?void 0:St.groupAddon)||"span",Y=(0,q.useRef)(null),Le=function(qe){var rt;(rt=Y.current)!==null&&rt!==void 0&&rt.contains(qe.target)&&(H==null||H())},Ce=(0,te.X3)(D),B=(0,q.cloneElement)(Nt,{value:Ke,className:g()((re=Nt.props)===null||re===void 0?void 0:re.className,!Ce&&(pt==null?void 0:pt.variant))||null}),P=(0,q.useRef)(null);if(q.useImperativeHandle(O,function(){return{nativeElement:P.current||Y.current}}),Ce){var ce=null;if(he){var ve=!V&&!x&&Ke,de="".concat(ke,"-clear-icon"),ye=(0,fe.Z)(he)==="object"&&he!==null&&he!==void 0&&he.clearIcon?he.clearIcon:"\u2716";ce=q.createElement("button",{type:"button",tabIndex:-1,onClick:function(qe){ft==null||ft(qe),at==null||at()},onMouseDown:function(qe){return qe.preventDefault()},className:g()(de,(0,W.Z)((0,W.Z)({},"".concat(de,"-hidden"),!ve),"".concat(de,"-has-suffix"),!!ue))},ye)}var Te="".concat(ke,"-affix-wrapper"),we=g()(Te,(0,W.Z)((0,W.Z)((0,W.Z)((0,W.Z)((0,W.Z)({},"".concat(ke,"-disabled"),V),"".concat(Te,"-disabled"),V),"".concat(Te,"-focused"),w),"".concat(Te,"-readonly"),x),"".concat(Te,"-input-with-clear-btn"),ue&&he&&Ke),st==null?void 0:st.affixWrapper,pt==null?void 0:pt.affixWrapper,pt==null?void 0:pt.variant),Ie=(ue||he)&&q.createElement("span",{className:g()("".concat(ke,"-suffix"),pt==null?void 0:pt.suffix),style:Ne==null?void 0:Ne.suffix},ce,ue);B=q.createElement(Ge,(0,ae.Z)({className:we,style:Ne==null?void 0:Ne.affixWrapper,onClick:Le},Et==null?void 0:Et.affixWrapper,{ref:Y}),tt&&q.createElement("span",{className:g()("".concat(ke,"-prefix"),pt==null?void 0:pt.prefix),style:Ne==null?void 0:Ne.prefix},tt),B,Ie)}if((0,te.He)(D)){var Ae="".concat(ke,"-group"),Xe="".concat(Ae,"-addon"),gt="".concat(Ae,"-wrapper"),ht=g()("".concat(ke,"-wrapper"),Ae,st==null?void 0:st.wrapper,pt==null?void 0:pt.wrapper),nt=g()(gt,(0,W.Z)({},"".concat(gt,"-disabled"),V),st==null?void 0:st.group,pt==null?void 0:pt.groupWrapper);B=q.createElement(je,{className:nt,ref:P},q.createElement(Re,{className:ht},X&&q.createElement(_e,{className:Xe},X),B,L&&q.createElement(_e,{className:Xe},L)))}return q.cloneElement(B,{className:g()((oe=B.props)===null||oe===void 0?void 0:oe.className,se)||null,style:(0,v.Z)((0,v.Z)({},(ie=B.props)===null||ie===void 0?void 0:ie.style),Q),hidden:Ue})}),C=o,M=m(77654),y=m(72190),E=m(42244),T=m(18929),k=m(2738),j=m(66003),Z=["autoComplete","onChange","onFocus","onBlur","onPressEnter","onKeyDown","onKeyUp","prefixCls","disabled","htmlSize","className","maxLength","suffix","showCount","count","type","classes","classNames","styles","onCompositionStart","onCompositionEnd"],U=(0,q.forwardRef)(function(D,O){var re=D.autoComplete,oe=D.onChange,ie=D.onFocus,Ee=D.onBlur,Me=D.onPressEnter,ke=D.onKeyDown,tt=D.onKeyUp,ue=D.prefixCls,X=ue===void 0?"rc-input":ue,L=D.disabled,se=D.htmlSize,Q=D.className,V=D.maxLength,x=D.suffix,w=D.showCount,H=D.count,he=D.type,Ke=he===void 0?"text":he,ft=D.classes,Ue=D.classNames,st=D.styles,pt=D.onCompositionStart,Et=D.onCompositionEnd,Ne=(0,E.Z)(D,Z),St=(0,q.useState)(!1),at=(0,y.Z)(St,2),Nt=at[0],Ge=at[1],je=(0,q.useRef)(!1),Re=(0,q.useRef)(!1),_e=(0,q.useRef)(null),Y=(0,q.useRef)(null),Le=function(zt){_e.current&&(0,te.nH)(_e.current,zt)},Ce=(0,T.Z)(D.defaultValue,{value:D.value}),B=(0,y.Z)(Ce,2),P=B[0],ce=B[1],ve=P==null?"":String(P),de=(0,q.useState)(null),ye=(0,y.Z)(de,2),Te=ye[0],we=ye[1],Ie=(0,j.Z)(H,w),Ae=Ie.max||V,Xe=Ie.strategy(ve),gt=!!Ae&&Xe>Ae;(0,q.useImperativeHandle)(O,function(){var be;return{focus:Le,blur:function(){var ze;(ze=_e.current)===null||ze===void 0||ze.blur()},setSelectionRange:function(ze,Qe,lt){var le;(le=_e.current)===null||le===void 0||le.setSelectionRange(ze,Qe,lt)},select:function(){var ze;(ze=_e.current)===null||ze===void 0||ze.select()},input:_e.current,nativeElement:((be=Y.current)===null||be===void 0?void 0:be.nativeElement)||_e.current}}),(0,q.useEffect)(function(){Re.current&&(Re.current=!1),Ge(function(be){return be&&L?!1:be})},[L]);var ht=function(zt,ze,Qe){var lt=ze;if(!je.current&&Ie.exceedFormatter&&Ie.max&&Ie.strategy(ze)>Ie.max){if(lt=Ie.exceedFormatter(ze,{max:Ie.max}),ze!==lt){var le,pe;we([((le=_e.current)===null||le===void 0?void 0:le.selectionStart)||0,((pe=_e.current)===null||pe===void 0?void 0:pe.selectionEnd)||0])}}else if(Qe.source==="compositionEnd")return;ce(lt),_e.current&&(0,te.rJ)(_e.current,zt,oe,lt)};(0,q.useEffect)(function(){if(Te){var be;(be=_e.current)===null||be===void 0||be.setSelectionRange.apply(be,(0,M.Z)(Te))}},[Te]);var nt=function(zt){ht(zt,zt.target.value,{source:"change"})},Oe=function(zt){je.current=!1,ht(zt,zt.currentTarget.value,{source:"compositionEnd"}),Et==null||Et(zt)},qe=function(zt){Me&&zt.key==="Enter"&&!Re.current&&(Re.current=!0,Me(zt)),ke==null||ke(zt)},rt=function(zt){zt.key==="Enter"&&(Re.current=!1),tt==null||tt(zt)},ot=function(zt){Ge(!0),ie==null||ie(zt)},Rt=function(zt){Re.current&&(Re.current=!1),Ge(!1),Ee==null||Ee(zt)},S=function(zt){ce(""),Le(),_e.current&&(0,te.rJ)(_e.current,zt,oe)},R=gt&&"".concat(X,"-out-of-range"),Ze=function(){var zt=(0,k.Z)(D,["prefixCls","onPressEnter","addonBefore","addonAfter","prefix","suffix","allowClear","defaultValue","showCount","count","classes","htmlSize","styles","classNames","onClear"]);return q.createElement("input",(0,ae.Z)({autoComplete:re},zt,{onChange:nt,onFocus:ot,onBlur:Rt,onKeyDown:qe,onKeyUp:rt,className:g()(X,(0,W.Z)({},"".concat(X,"-disabled"),L),Ue==null?void 0:Ue.input),style:st==null?void 0:st.input,ref:_e,size:se,type:Ke,onCompositionStart:function(Qe){je.current=!0,pt==null||pt(Qe)},onCompositionEnd:Oe}))},J=function(){var zt=Number(Ae)>0;if(x||Ie.show){var ze=Ie.showFormatter?Ie.showFormatter({value:ve,count:Xe,maxLength:Ae}):"".concat(Xe).concat(zt?" / ".concat(Ae):"");return q.createElement(q.Fragment,null,Ie.show&&q.createElement("span",{className:g()("".concat(X,"-show-count-suffix"),(0,W.Z)({},"".concat(X,"-show-count-has-suffix"),!!x),Ue==null?void 0:Ue.count),style:(0,v.Z)({},st==null?void 0:st.count)},ze),x)}return null};return q.createElement(C,(0,ae.Z)({},Ne,{prefixCls:X,className:g()(Q,R),handleReset:S,value:ve,focused:Nt,triggerFocus:Le,suffix:J(),disabled:L,classes:ft,classNames:Ue,styles:st}),Ze())}),A=U,K=A},30292:function(ln,mt,m){"use strict";m.d(mt,{He:function(){return v},X3:function(){return ae},nH:function(){return z},rJ:function(){return fe}});function v(g){return!!(g.addonBefore||g.addonAfter)}function ae(g){return!!(g.prefix||g.suffix||g.allowClear)}function W(g,q,te){var o=q.cloneNode(!0),C=Object.create(g,{target:{value:o},currentTarget:{value:o}});return o.value=te,typeof q.selectionStart=="number"&&typeof q.selectionEnd=="number"&&(o.selectionStart=q.selectionStart,o.selectionEnd=q.selectionEnd),o.setSelectionRange=function(){q.setSelectionRange.apply(q,arguments)},C}function fe(g,q,te,o){if(te){var C=q;if(q.type==="click"){C=W(q,g,""),te(C);return}if(g.type!=="file"&&o!==void 0){C=W(q,g,o),te(C);return}te(C)}}function z(g,q){if(g){g.focus(q);var te=q||{},o=te.cursor;if(o){var C=g.value.length;switch(o){case"start":g.setSelectionRange(0,0);break;case"end":g.setSelectionRange(C,C);break;default:g.setSelectionRange(0,C)}}}}},28321:function(ln,mt,m){"use strict";m.d(mt,{iz:function(){return ut},ck:function(){return lt},BW:function(){return it},sN:function(){return lt},Wd:function(){return gn},ZP:function(){return qt},Xl:function(){return Me}});var v=m(60499),ae=m(18642),W=m(85899),fe=m(77654),z=m(72190),g=m(42244),q=m(92310),te=m.n(q),o=m(83836),C=m(18929),M=m(13697),y=m(48736),E=m(59301),T=m(4676),k=E.createContext(null);function j(Ye,vt){return Ye===void 0?null:"".concat(Ye,"-").concat(vt)}function Z(Ye){var vt=E.useContext(k);return j(vt,Ye)}var U=m(80547),A=["children","locked"],K=E.createContext(null);function D(Ye,vt){var Ct=(0,W.Z)({},Ye);return Object.keys(vt).forEach(function(_t){var At=vt[_t];At!==void 0&&(Ct[_t]=At)}),Ct}function O(Ye){var vt=Ye.children,Ct=Ye.locked,_t=(0,g.Z)(Ye,A),At=E.useContext(K),kt=(0,U.Z)(function(){return D(At,_t)},[At,_t],function(Wt,Kt){return!Ct&&(Wt[0]!==Kt[0]||!(0,M.Z)(Wt[1],Kt[1],!0))});return E.createElement(K.Provider,{value:kt},vt)}var re=[],oe=E.createContext(null);function ie(){return E.useContext(oe)}var Ee=E.createContext(re);function Me(Ye){var vt=E.useContext(Ee);return E.useMemo(function(){return Ye!==void 0?[].concat((0,fe.Z)(vt),[Ye]):vt},[vt,Ye])}var ke=E.createContext(null),tt=E.createContext({}),ue=tt,X=m(29194);function L(Ye){var vt=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;if((0,X.Z)(Ye)){var Ct=Ye.nodeName.toLowerCase(),_t=["input","select","textarea","button"].includes(Ct)||Ye.isContentEditable||Ct==="a"&&!!Ye.getAttribute("href"),At=Ye.getAttribute("tabindex"),kt=Number(At),Wt=null;return At&&!Number.isNaN(kt)?Wt=kt:_t&&Wt===null&&(Wt=0),_t&&Ye.disabled&&(Wt=null),Wt!==null&&(Wt>=0||vt&&Wt<0)}return!1}function se(Ye){var vt=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,Ct=(0,fe.Z)(Ye.querySelectorAll("*")).filter(function(_t){return L(_t,vt)});return L(Ye,vt)&&Ct.unshift(Ye),Ct}var Q=null;function V(){Q=document.activeElement}function x(){Q=null}function w(){if(Q)try{Q.focus()}catch(Ye){}}function H(Ye,vt){if(vt.keyCode===9){var Ct=se(Ye),_t=Ct[vt.shiftKey?0:Ct.length-1],At=_t===document.activeElement||Ye===document.activeElement;if(At){var kt=Ct[vt.shiftKey?Ct.length-1:0];kt.focus(),vt.preventDefault()}}}var he=m(10228),Ke=m(16089),ft=he.Z.LEFT,Ue=he.Z.RIGHT,st=he.Z.UP,pt=he.Z.DOWN,Et=he.Z.ENTER,Ne=he.Z.ESC,St=he.Z.HOME,at=he.Z.END,Nt=[st,pt,ft,Ue];function Ge(Ye,vt,Ct,_t){var At,kt="prev",Wt="next",Kt="children",on="parent";if(Ye==="inline"&&_t===Et)return{inlineTrigger:!0};var cn=(0,ae.Z)((0,ae.Z)({},st,kt),pt,Wt),Wn=(0,ae.Z)((0,ae.Z)((0,ae.Z)((0,ae.Z)({},ft,Ct?Wt:kt),Ue,Ct?kt:Wt),pt,Kt),Et,Kt),bn=(0,ae.Z)((0,ae.Z)((0,ae.Z)((0,ae.Z)((0,ae.Z)((0,ae.Z)({},st,kt),pt,Wt),Et,Kt),Ne,on),ft,Ct?Kt:on),Ue,Ct?on:Kt),fn={inline:cn,horizontal:Wn,vertical:bn,inlineSub:cn,horizontalSub:bn,verticalSub:bn},In=(At=fn["".concat(Ye).concat(vt?"":"Sub")])===null||At===void 0?void 0:At[_t];switch(In){case kt:return{offset:-1,sibling:!0};case Wt:return{offset:1,sibling:!0};case on:return{offset:-1,sibling:!1};case Kt:return{offset:1,sibling:!1};default:return null}}function je(Ye){for(var vt=Ye;vt;){if(vt.getAttribute("data-menu-list"))return vt;vt=vt.parentElement}return null}function Re(Ye,vt){for(var Ct=Ye||document.activeElement;Ct;){if(vt.has(Ct))return Ct;Ct=Ct.parentElement}return null}function _e(Ye,vt){var Ct=se(Ye,!0);return Ct.filter(function(_t){return vt.has(_t)})}function Y(Ye,vt,Ct){var _t=arguments.length>3&&arguments[3]!==void 0?arguments[3]:1;if(!Ye)return null;var At=_e(Ye,vt),kt=At.length,Wt=At.findIndex(function(Kt){return Ct===Kt});return _t<0?Wt===-1?Wt=kt-1:Wt-=1:_t>0&&(Wt+=1),Wt=(Wt+kt)%kt,At[Wt]}var Le=function(vt,Ct){var _t=new Set,At=new Map,kt=new Map;return vt.forEach(function(Wt){var Kt=document.querySelector("[data-menu-id='".concat(j(Ct,Wt),"']"));Kt&&(_t.add(Kt),kt.set(Kt,Wt),At.set(Wt,Kt))}),{elements:_t,key2element:At,element2key:kt}};function Ce(Ye,vt,Ct,_t,At,kt,Wt,Kt,on,cn){var Wn=E.useRef(),bn=E.useRef();bn.current=vt;var fn=function(){Ke.Z.cancel(Wn.current)};return E.useEffect(function(){return function(){fn()}},[]),function(In){var On=In.which;if([].concat(Nt,[Et,Ne,St,at]).includes(On)){var Zn=kt(),An=Le(Zn,_t),Mn=An,Nn=Mn.elements,jn=Mn.key2element,zn=Mn.element2key,Dn=jn.get(vt),Bn=Re(Dn,Nn),Sn=zn.get(Bn),cr=Ge(Ye,Wt(Sn,!0).length===1,Ct,On);if(!cr&&On!==St&&On!==at)return;(Nt.includes(On)||[St,at].includes(On))&&In.preventDefault();var Tt=function(wn){if(wn){var jt=wn,Vt=wn.querySelector("a");Vt!=null&&Vt.getAttribute("href")&&(jt=Vt);var un=zn.get(wn);Kt(un),fn(),Wn.current=(0,Ke.Z)(function(){bn.current===un&&jt.focus()})}};if([St,at].includes(On)||cr.sibling||!Bn){var Fn;!Bn||Ye==="inline"?Fn=At.current:Fn=je(Bn);var Kn,Dr=_e(Fn,Nn);On===St?Kn=Dr[0]:On===at?Kn=Dr[Dr.length-1]:Kn=Y(Fn,Nn,Bn,cr.offset),Tt(Kn)}else if(cr.inlineTrigger)on(Sn);else if(cr.offset>0)on(Sn,!0),fn(),Wn.current=(0,Ke.Z)(function(){An=Le(Zn,_t);var _n=Bn.getAttribute("aria-controls"),wn=document.getElementById(_n),jt=Y(wn,An.elements);Tt(jt)},5);else if(cr.offset<0){var gr=Wt(Sn,!0),Or=gr[gr.length-2],Cr=jn.get(Or);on(Or,!1),Tt(Cr)}}cn==null||cn(In)}}function B(Ye){Promise.resolve().then(Ye)}var P="__RC_UTIL_PATH_SPLIT__",ce=function(vt){return vt.join(P)},ve=function(vt){return vt.split(P)},de="rc-menu-more";function ye(){var Ye=E.useState({}),vt=(0,z.Z)(Ye,2),Ct=vt[1],_t=(0,E.useRef)(new Map),At=(0,E.useRef)(new Map),kt=E.useState([]),Wt=(0,z.Z)(kt,2),Kt=Wt[0],on=Wt[1],cn=(0,E.useRef)(0),Wn=(0,E.useRef)(!1),bn=function(){Wn.current||Ct({})},fn=(0,E.useCallback)(function(jn,zn){var Dn=ce(zn);At.current.set(Dn,jn),_t.current.set(jn,Dn),cn.current+=1;var Bn=cn.current;B(function(){Bn===cn.current&&bn()})},[]),In=(0,E.useCallback)(function(jn,zn){var Dn=ce(zn);At.current.delete(Dn),_t.current.delete(jn)},[]),On=(0,E.useCallback)(function(jn){on(jn)},[]),Zn=(0,E.useCallback)(function(jn,zn){var Dn=_t.current.get(jn)||"",Bn=ve(Dn);return zn&&Kt.includes(Bn[0])&&Bn.unshift(de),Bn},[Kt]),An=(0,E.useCallback)(function(jn,zn){return jn.filter(function(Dn){return Dn!==void 0}).some(function(Dn){var Bn=Zn(Dn,!0);return Bn.includes(zn)})},[Zn]),Mn=function(){var zn=(0,fe.Z)(_t.current.keys());return Kt.length&&zn.push(de),zn},Nn=(0,E.useCallback)(function(jn){var zn="".concat(_t.current.get(jn)).concat(P),Dn=new Set;return(0,fe.Z)(At.current.keys()).forEach(function(Bn){Bn.startsWith(zn)&&Dn.add(At.current.get(Bn))}),Dn},[]);return E.useEffect(function(){return function(){Wn.current=!0}},[]),{registerPath:fn,unregisterPath:In,refreshOverflowKeys:On,isSubPathKey:An,getKeyPath:Zn,getKeys:Mn,getSubPathKeys:Nn}}function Te(Ye){var vt=E.useRef(Ye);vt.current=Ye;var Ct=E.useCallback(function(){for(var _t,At=arguments.length,kt=new Array(At),Wt=0;Wt<At;Wt++)kt[Wt]=arguments[Wt];return(_t=vt.current)===null||_t===void 0?void 0:_t.call.apply(_t,[vt].concat(kt))},[]);return Ye?Ct:void 0}var we=Math.random().toFixed(5).toString().slice(2),Ie=0;function Ae(Ye){var vt=(0,C.Z)(Ye,{value:Ye}),Ct=(0,z.Z)(vt,2),_t=Ct[0],At=Ct[1];return E.useEffect(function(){Ie+=1;var kt="".concat(we,"-").concat(Ie);At("rc-menu-uuid-".concat(kt))},[]),_t}var Xe=m(38705),gt=m(17212),ht=m(39153),nt=m(55401),Oe=m(2738),qe=m(8654);function rt(Ye,vt,Ct,_t){var At=E.useContext(K),kt=At.activeKey,Wt=At.onActive,Kt=At.onInactive,on={active:kt===Ye};return vt||(on.onMouseEnter=function(cn){Ct==null||Ct({key:Ye,domEvent:cn}),Wt(Ye)},on.onMouseLeave=function(cn){_t==null||_t({key:Ye,domEvent:cn}),Kt(Ye)}),on}function ot(Ye){var vt=E.useContext(K),Ct=vt.mode,_t=vt.rtl,At=vt.inlineIndent;if(Ct!=="inline")return null;var kt=Ye;return _t?{paddingRight:kt*At}:{paddingLeft:kt*At}}function Rt(Ye){var vt=Ye.icon,Ct=Ye.props,_t=Ye.children,At;return vt===null||vt===!1?null:(typeof vt=="function"?At=E.createElement(vt,(0,W.Z)({},Ct)):typeof vt!="boolean"&&(At=vt),At||_t||null)}var S=["item"];function R(Ye){var vt=Ye.item,Ct=(0,g.Z)(Ye,S);return Object.defineProperty(Ct,"item",{get:function(){return(0,y.ZP)(!1,"`info.item` is deprecated since we will move to function component that not provides React Node instance in future."),vt}}),Ct}var Ze=["title","attribute","elementRef"],J=["style","className","eventKey","warnKey","disabled","itemIcon","children","role","onMouseEnter","onMouseLeave","onClick","onKeyDown","onFocus"],be=["active"],zt=function(Ye){(0,ht.Z)(Ct,Ye);var vt=(0,nt.Z)(Ct);function Ct(){return(0,Xe.Z)(this,Ct),vt.apply(this,arguments)}return(0,gt.Z)(Ct,[{key:"render",value:function(){var At=this.props,kt=At.title,Wt=At.attribute,Kt=At.elementRef,on=(0,g.Z)(At,Ze),cn=(0,Oe.Z)(on,["eventKey","popupClassName","popupOffset","onTitleClick"]);return(0,y.ZP)(!Wt,"`attribute` of Menu.Item is deprecated. Please pass attribute directly."),E.createElement(o.Z.Item,(0,v.Z)({},Wt,{title:typeof kt=="string"?kt:void 0},cn,{ref:Kt}))}}]),Ct}(E.Component),ze=E.forwardRef(function(Ye,vt){var Ct=Ye.style,_t=Ye.className,At=Ye.eventKey,kt=Ye.warnKey,Wt=Ye.disabled,Kt=Ye.itemIcon,on=Ye.children,cn=Ye.role,Wn=Ye.onMouseEnter,bn=Ye.onMouseLeave,fn=Ye.onClick,In=Ye.onKeyDown,On=Ye.onFocus,Zn=(0,g.Z)(Ye,J),An=Z(At),Mn=E.useContext(K),Nn=Mn.prefixCls,jn=Mn.onItemClick,zn=Mn.disabled,Dn=Mn.overflowDisabled,Bn=Mn.itemIcon,Sn=Mn.selectedKeys,cr=Mn.onActive,Tt=E.useContext(ue),Fn=Tt._internalRenderMenuItem,Kn="".concat(Nn,"-item"),Dr=E.useRef(),gr=E.useRef(),Or=zn||Wt,Cr=(0,qe.x1)(vt,gr),_n=Me(At),wn=function(dr){return{key:At,keyPath:(0,fe.Z)(_n).reverse(),item:Dr.current,domEvent:dr}},jt=Kt||Bn,Vt=rt(At,Or,Wn,bn),un=Vt.active,Cn=(0,g.Z)(Vt,be),Vn=Sn.includes(At),tr=ot(_n.length),tn=function(dr){if(!Or){var Zr=wn(dr);fn==null||fn(R(Zr)),jn(Zr)}},Yn=function(dr){if(In==null||In(dr),dr.which===he.Z.ENTER){var Zr=wn(dr);fn==null||fn(R(Zr)),jn(Zr)}},vr=function(dr){cr(At),On==null||On(dr)},Lr={};Ye.role==="option"&&(Lr["aria-selected"]=Vn);var Br=E.createElement(zt,(0,v.Z)({ref:Dr,elementRef:Cr,role:cn===null?"none":cn||"menuitem",tabIndex:Wt?null:-1,"data-menu-id":Dn&&An?null:An},(0,Oe.Z)(Zn,["extra"]),Cn,Lr,{component:"li","aria-disabled":Wt,style:(0,W.Z)((0,W.Z)({},tr),Ct),className:te()(Kn,(0,ae.Z)((0,ae.Z)((0,ae.Z)({},"".concat(Kn,"-active"),un),"".concat(Kn,"-selected"),Vn),"".concat(Kn,"-disabled"),Or),_t),onClick:tn,onKeyDown:Yn,onFocus:vr}),on,E.createElement(Rt,{props:(0,W.Z)((0,W.Z)({},Ye),{},{isSelected:Vn}),icon:jt}));return Fn&&(Br=Fn(Br,Ye,{selected:Vn})),Br});function Qe(Ye,vt){var Ct=Ye.eventKey,_t=ie(),At=Me(Ct);return E.useEffect(function(){if(_t)return _t.registerPath(Ct,At),function(){_t.unregisterPath(Ct,At)}},[At]),_t?null:E.createElement(ze,(0,v.Z)({},Ye,{ref:vt}))}var lt=E.forwardRef(Qe),le=["className","children"],pe=function(vt,Ct){var _t=vt.className,At=vt.children,kt=(0,g.Z)(vt,le),Wt=E.useContext(K),Kt=Wt.prefixCls,on=Wt.mode,cn=Wt.rtl;return E.createElement("ul",(0,v.Z)({className:te()(Kt,cn&&"".concat(Kt,"-rtl"),"".concat(Kt,"-sub"),"".concat(Kt,"-").concat(on==="inline"?"inline":"vertical"),_t),role:"menu"},kt,{"data-menu-list":!0,ref:Ct}),At)},Pe=E.forwardRef(pe);Pe.displayName="SubMenuList";var $e=Pe,G=m(11592);function bt(Ye,vt){return(0,G.Z)(Ye).map(function(Ct,_t){if(E.isValidElement(Ct)){var At,kt,Wt=Ct.key,Kt=(At=(kt=Ct.props)===null||kt===void 0?void 0:kt.eventKey)!==null&&At!==void 0?At:Wt,on=Kt==null;on&&(Kt="tmp_key-".concat([].concat((0,fe.Z)(vt),[_t]).join("-")));var cn={key:Kt,eventKey:Kt};return E.cloneElement(Ct,cn)}return Ct})}var xe=m(68196),Bt={adjustX:1,adjustY:1},en={topLeft:{points:["bl","tl"],overflow:Bt},topRight:{points:["br","tr"],overflow:Bt},bottomLeft:{points:["tl","bl"],overflow:Bt},bottomRight:{points:["tr","br"],overflow:Bt},leftTop:{points:["tr","tl"],overflow:Bt},leftBottom:{points:["br","bl"],overflow:Bt},rightTop:{points:["tl","tr"],overflow:Bt},rightBottom:{points:["bl","br"],overflow:Bt}},dn={topLeft:{points:["bl","tl"],overflow:Bt},topRight:{points:["br","tr"],overflow:Bt},bottomLeft:{points:["tl","bl"],overflow:Bt},bottomRight:{points:["tr","br"],overflow:Bt},rightTop:{points:["tr","tl"],overflow:Bt},rightBottom:{points:["br","bl"],overflow:Bt},leftTop:{points:["tl","tr"],overflow:Bt},leftBottom:{points:["bl","br"],overflow:Bt}},Hn=null;function wt(Ye,vt,Ct){if(vt)return vt;if(Ct)return Ct[Ye]||Ct.other}var Gt={horizontal:"bottomLeft",vertical:"rightTop","vertical-left":"rightTop","vertical-right":"leftTop"};function mn(Ye){var vt=Ye.prefixCls,Ct=Ye.visible,_t=Ye.children,At=Ye.popup,kt=Ye.popupStyle,Wt=Ye.popupClassName,Kt=Ye.popupOffset,on=Ye.disabled,cn=Ye.mode,Wn=Ye.onVisibleChange,bn=E.useContext(K),fn=bn.getPopupContainer,In=bn.rtl,On=bn.subMenuOpenDelay,Zn=bn.subMenuCloseDelay,An=bn.builtinPlacements,Mn=bn.triggerSubMenuAction,Nn=bn.forceSubMenuRender,jn=bn.rootClassName,zn=bn.motion,Dn=bn.defaultMotions,Bn=E.useState(!1),Sn=(0,z.Z)(Bn,2),cr=Sn[0],Tt=Sn[1],Fn=In?(0,W.Z)((0,W.Z)({},dn),An):(0,W.Z)((0,W.Z)({},en),An),Kn=Gt[cn],Dr=wt(cn,zn,Dn),gr=E.useRef(Dr);cn!=="inline"&&(gr.current=Dr);var Or=(0,W.Z)((0,W.Z)({},gr.current),{},{leavedClassName:"".concat(vt,"-hidden"),removeOnLeave:!1,motionAppear:!0}),Cr=E.useRef();return E.useEffect(function(){return Cr.current=(0,Ke.Z)(function(){Tt(Ct)}),function(){Ke.Z.cancel(Cr.current)}},[Ct]),E.createElement(xe.Z,{prefixCls:vt,popupClassName:te()("".concat(vt,"-popup"),(0,ae.Z)({},"".concat(vt,"-rtl"),In),Wt,jn),stretch:cn==="horizontal"?"minWidth":null,getPopupContainer:fn,builtinPlacements:Fn,popupPlacement:Kn,popupVisible:cr,popup:At,popupStyle:kt,popupAlign:Kt&&{offset:Kt},action:on?[]:[Mn],mouseEnterDelay:On,mouseLeaveDelay:Zn,onPopupVisibleChange:Wn,forceRender:Nn,popupMotion:Or,fresh:!0},_t)}var yn=m(77900);function rn(Ye){var vt=Ye.id,Ct=Ye.open,_t=Ye.keyPath,At=Ye.children,kt="inline",Wt=E.useContext(K),Kt=Wt.prefixCls,on=Wt.forceSubMenuRender,cn=Wt.motion,Wn=Wt.defaultMotions,bn=Wt.mode,fn=E.useRef(!1);fn.current=bn===kt;var In=E.useState(!fn.current),On=(0,z.Z)(In,2),Zn=On[0],An=On[1],Mn=fn.current?Ct:!1;E.useEffect(function(){fn.current&&An(!1)},[bn]);var Nn=(0,W.Z)({},wt(kt,cn,Wn));_t.length>1&&(Nn.motionAppear=!1);var jn=Nn.onVisibleChanged;return Nn.onVisibleChanged=function(zn){return!fn.current&&!zn&&An(!0),jn==null?void 0:jn(zn)},Zn?null:E.createElement(O,{mode:kt,locked:!fn.current},E.createElement(yn.default,(0,v.Z)({visible:Mn},Nn,{forceRender:on,removeOnLeave:!1,leavedClassName:"".concat(Kt,"-hidden")}),function(zn){var Dn=zn.className,Bn=zn.style;return E.createElement($e,{id:vt,className:Dn,style:Bn},At)}))}var En=["style","className","title","eventKey","warnKey","disabled","internalPopupClose","children","itemIcon","expandIcon","popupClassName","popupOffset","popupStyle","onClick","onMouseEnter","onMouseLeave","onTitleClick","onTitleMouseEnter","onTitleMouseLeave"],Zt=["active"],Dt=E.forwardRef(function(Ye,vt){var Ct=Ye.style,_t=Ye.className,At=Ye.title,kt=Ye.eventKey,Wt=Ye.warnKey,Kt=Ye.disabled,on=Ye.internalPopupClose,cn=Ye.children,Wn=Ye.itemIcon,bn=Ye.expandIcon,fn=Ye.popupClassName,In=Ye.popupOffset,On=Ye.popupStyle,Zn=Ye.onClick,An=Ye.onMouseEnter,Mn=Ye.onMouseLeave,Nn=Ye.onTitleClick,jn=Ye.onTitleMouseEnter,zn=Ye.onTitleMouseLeave,Dn=(0,g.Z)(Ye,En),Bn=Z(kt),Sn=E.useContext(K),cr=Sn.prefixCls,Tt=Sn.mode,Fn=Sn.openKeys,Kn=Sn.disabled,Dr=Sn.overflowDisabled,gr=Sn.activeKey,Or=Sn.selectedKeys,Cr=Sn.itemIcon,_n=Sn.expandIcon,wn=Sn.onItemClick,jt=Sn.onOpenChange,Vt=Sn.onActive,un=E.useContext(ue),Cn=un._internalRenderSubMenuItem,Vn=E.useContext(ke),tr=Vn.isSubPathKey,tn=Me(),Yn="".concat(cr,"-submenu"),vr=Kn||Kt,Lr=E.useRef(),Br=E.useRef(),jr=Wn!=null?Wn:Cr,dr=bn!=null?bn:_n,Zr=Fn.includes(kt),fr=!Dr&&Zr,Nr=tr(Or,kt),sr=rt(kt,vr,jn,zn),ar=sr.active,Ar=(0,g.Z)(sr,Zt),Rr=E.useState(!1),Qn=(0,z.Z)(Rr,2),Kr=Qn[0],Fr=Qn[1],Gr=function(ii){vr||Fr(ii)},Ur=function(ii){Gr(!0),An==null||An({key:kt,domEvent:ii})},Jn=function(ii){Gr(!1),Mn==null||Mn({key:kt,domEvent:ii})},Si=E.useMemo(function(){return ar||(Tt!=="inline"?Kr||tr([gr],kt):!1)},[Tt,ar,gr,Kr,kt,tr]),vn=ot(tn.length),ni=function(ii){vr||(Nn==null||Nn({key:kt,domEvent:ii}),Tt==="inline"&&jt(kt,!Zr))},yi=Te(function(Qr){Zn==null||Zn(R(Qr)),wn(Qr)}),_i=function(ii){Tt!=="inline"&&jt(kt,ii)},oi=function(){Vt(kt)},pi=Bn&&"".concat(Bn,"-popup"),hr=E.useMemo(function(){return E.createElement(Rt,{icon:Tt!=="horizontal"?dr:void 0,props:(0,W.Z)((0,W.Z)({},Ye),{},{isOpen:fr,isSubMenu:!0})},E.createElement("i",{className:"".concat(Yn,"-arrow")}))},[Tt,dr,Ye,fr,Yn]),Xr=E.createElement("div",(0,v.Z)({role:"menuitem",style:vn,className:"".concat(Yn,"-title"),tabIndex:vr?null:-1,ref:Lr,title:typeof At=="string"?At:null,"data-menu-id":Dr&&Bn?null:Bn,"aria-expanded":fr,"aria-haspopup":!0,"aria-controls":pi,"aria-disabled":vr,onClick:ni,onFocus:oi},Ar),At,hr),gi=E.useRef(Tt);if(Tt!=="inline"&&tn.length>1?gi.current="vertical":gi.current=Tt,!Dr){var xi=gi.current;Xr=E.createElement(mn,{mode:xi,prefixCls:Yn,visible:!on&&fr&&Tt!=="inline",popupClassName:fn,popupOffset:In,popupStyle:On,popup:E.createElement(O,{mode:xi==="horizontal"?"vertical":xi},E.createElement($e,{id:pi,ref:Br},cn)),disabled:vr,onVisibleChange:_i},Xr)}var Mr=E.createElement(o.Z.Item,(0,v.Z)({ref:vt,role:"none"},Dn,{component:"li",style:Ct,className:te()(Yn,"".concat(Yn,"-").concat(Tt),_t,(0,ae.Z)((0,ae.Z)((0,ae.Z)((0,ae.Z)({},"".concat(Yn,"-open"),fr),"".concat(Yn,"-active"),Si),"".concat(Yn,"-selected"),Nr),"".concat(Yn,"-disabled"),vr)),onMouseEnter:Ur,onMouseLeave:Jn}),Xr,!Dr&&E.createElement(rn,{id:pi,open:fr,keyPath:tn},cn));return Cn&&(Mr=Cn(Mr,Ye,{selected:Nr,active:Si,open:fr,disabled:vr})),E.createElement(O,{onItemClick:yi,mode:Tt==="horizontal"?"vertical":Tt,itemIcon:jr,expandIcon:dr},Mr)}),Mt=E.forwardRef(function(Ye,vt){var Ct=Ye.eventKey,_t=Ye.children,At=Me(Ct),kt=bt(_t,At),Wt=ie();E.useEffect(function(){if(Wt)return Wt.registerPath(Ct,At),function(){Wt.unregisterPath(Ct,At)}},[At]);var Kt;return Wt?Kt=kt:Kt=E.createElement(Dt,(0,v.Z)({ref:vt},Ye),kt),E.createElement(Ee.Provider,{value:At},Kt)}),gn=Mt,Ln=m(43749);function ut(Ye){var vt=Ye.className,Ct=Ye.style,_t=E.useContext(K),At=_t.prefixCls,kt=ie();return kt?null:E.createElement("li",{role:"separator",className:te()("".concat(At,"-item-divider"),vt),style:Ct})}var ct=["className","title","eventKey","children"],Se=E.forwardRef(function(Ye,vt){var Ct=Ye.className,_t=Ye.title,At=Ye.eventKey,kt=Ye.children,Wt=(0,g.Z)(Ye,ct),Kt=E.useContext(K),on=Kt.prefixCls,cn="".concat(on,"-item-group");return E.createElement("li",(0,v.Z)({ref:vt,role:"presentation"},Wt,{onClick:function(bn){return bn.stopPropagation()},className:te()(cn,Ct)}),E.createElement("div",{role:"presentation",className:"".concat(cn,"-title"),title:typeof _t=="string"?_t:void 0},_t),E.createElement("ul",{role:"group",className:"".concat(cn,"-list")},kt))}),He=E.forwardRef(function(Ye,vt){var Ct=Ye.eventKey,_t=Ye.children,At=Me(Ct),kt=bt(_t,At),Wt=ie();return Wt?kt:E.createElement(Se,(0,v.Z)({ref:vt},(0,Oe.Z)(Ye,["warnKey"])),kt)}),it=He,Je=["label","children","key","type","extra"];function yt(Ye,vt,Ct){var _t=vt.item,At=vt.group,kt=vt.submenu,Wt=vt.divider;return(Ye||[]).map(function(Kt,on){if(Kt&&(0,Ln.Z)(Kt)==="object"){var cn=Kt,Wn=cn.label,bn=cn.children,fn=cn.key,In=cn.type,On=cn.extra,Zn=(0,g.Z)(cn,Je),An=fn!=null?fn:"tmp-".concat(on);return bn||In==="group"?In==="group"?E.createElement(At,(0,v.Z)({key:An},Zn,{title:Wn}),yt(bn,vt,Ct)):E.createElement(kt,(0,v.Z)({key:An},Zn,{title:Wn}),yt(bn,vt,Ct)):In==="divider"?E.createElement(Wt,(0,v.Z)({key:An},Zn)):E.createElement(_t,(0,v.Z)({key:An},Zn,{extra:On}),Wn,(!!On||On===0)&&E.createElement("span",{className:"".concat(Ct,"-item-extra")},On))}return null}).filter(function(Kt){return Kt})}function $t(Ye,vt,Ct,_t,At){var kt=Ye,Wt=(0,W.Z)({divider:ut,item:lt,group:it,submenu:gn},_t);return vt&&(kt=yt(vt,Wt,At)),bt(kt,Ct)}var Jt=["prefixCls","rootClassName","style","className","tabIndex","items","children","direction","id","mode","inlineCollapsed","disabled","disabledOverflow","subMenuOpenDelay","subMenuCloseDelay","forceSubMenuRender","defaultOpenKeys","openKeys","activeKey","defaultActiveFirst","selectable","multiple","defaultSelectedKeys","selectedKeys","onSelect","onDeselect","inlineIndent","motion","defaultMotions","triggerSubMenuAction","builtinPlacements","itemIcon","expandIcon","overflowedIndicator","overflowedIndicatorPopupClassName","getPopupContainer","onClick","onOpenChange","onKeyDown","openAnimation","openTransitionName","_internalRenderMenuItem","_internalRenderSubMenuItem","_internalComponents"],nn=[],Ht=E.forwardRef(function(Ye,vt){var Ct,_t=Ye,At=_t.prefixCls,kt=At===void 0?"rc-menu":At,Wt=_t.rootClassName,Kt=_t.style,on=_t.className,cn=_t.tabIndex,Wn=cn===void 0?0:cn,bn=_t.items,fn=_t.children,In=_t.direction,On=_t.id,Zn=_t.mode,An=Zn===void 0?"vertical":Zn,Mn=_t.inlineCollapsed,Nn=_t.disabled,jn=_t.disabledOverflow,zn=_t.subMenuOpenDelay,Dn=zn===void 0?.1:zn,Bn=_t.subMenuCloseDelay,Sn=Bn===void 0?.1:Bn,cr=_t.forceSubMenuRender,Tt=_t.defaultOpenKeys,Fn=_t.openKeys,Kn=_t.activeKey,Dr=_t.defaultActiveFirst,gr=_t.selectable,Or=gr===void 0?!0:gr,Cr=_t.multiple,_n=Cr===void 0?!1:Cr,wn=_t.defaultSelectedKeys,jt=_t.selectedKeys,Vt=_t.onSelect,un=_t.onDeselect,Cn=_t.inlineIndent,Vn=Cn===void 0?24:Cn,tr=_t.motion,tn=_t.defaultMotions,Yn=_t.triggerSubMenuAction,vr=Yn===void 0?"hover":Yn,Lr=_t.builtinPlacements,Br=_t.itemIcon,jr=_t.expandIcon,dr=_t.overflowedIndicator,Zr=dr===void 0?"...":dr,fr=_t.overflowedIndicatorPopupClassName,Nr=_t.getPopupContainer,sr=_t.onClick,ar=_t.onOpenChange,Ar=_t.onKeyDown,Rr=_t.openAnimation,Qn=_t.openTransitionName,Kr=_t._internalRenderMenuItem,Fr=_t._internalRenderSubMenuItem,Gr=_t._internalComponents,Ur=(0,g.Z)(_t,Jt),Jn=E.useMemo(function(){return[$t(fn,bn,nn,Gr,kt),$t(fn,bn,nn,{},kt)]},[fn,bn,Gr]),Si=(0,z.Z)(Jn,2),vn=Si[0],ni=Si[1],yi=E.useState(!1),_i=(0,z.Z)(yi,2),oi=_i[0],pi=_i[1],hr=E.useRef(),Xr=Ae(On),gi=In==="rtl",xi=(0,C.Z)(Tt,{value:Fn,postState:function(ei){return ei||nn}}),Mr=(0,z.Z)(xi,2),Qr=Mr[0],ii=Mr[1],ir=function(ei){var ui=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;function Oi(){ii(ei),ar==null||ar(ei)}ui?(0,T.flushSync)(Oi):Oi()},Er=E.useState(Qr),kn=(0,z.Z)(Er,2),$n=kn[0],lr=kn[1],yr=E.useRef(!1),Wr=E.useMemo(function(){return(An==="inline"||An==="vertical")&&Mn?["vertical",Mn]:[An,!1]},[An,Mn]),Rn=(0,z.Z)(Wr,2),Un=Rn[0],rr=Rn[1],or=Un==="inline",Sr=E.useState(Un),Ei=(0,z.Z)(Sr,2),ri=Ei[0],di=Ei[1],li=E.useState(rr),Vi=(0,z.Z)(li,2),Pi=Vi[0],Ui=Vi[1];E.useEffect(function(){di(Un),Ui(rr),yr.current&&(or?ii($n):ir(nn))},[Un,rr]);var Di=E.useState(0),zi=(0,z.Z)(Di,2),Mi=zi[0],Ds=zi[1],as=Mi>=vn.length-1||ri!=="horizontal"||jn;E.useEffect(function(){or&&lr(Qr)},[Qr]),E.useEffect(function(){return yr.current=!0,function(){yr.current=!1}},[]);var Gi=ye(),bs=Gi.registerPath,_s=Gi.unregisterPath,ks=Gi.refreshOverflowKeys,os=Gi.isSubPathKey,xs=Gi.getKeyPath,ki=Gi.getKeys,Ns=Gi.getSubPathKeys,Qs=E.useMemo(function(){return{registerPath:bs,unregisterPath:_s}},[bs,_s]),Is=E.useMemo(function(){return{isSubPathKey:os}},[os]);E.useEffect(function(){ks(as?nn:vn.slice(Mi+1).map(function(qr){return qr.key}))},[Mi,as]);var Bs=(0,C.Z)(Kn||Dr&&((Ct=vn[0])===null||Ct===void 0?void 0:Ct.key),{value:Kn}),hs=(0,z.Z)(Bs,2),Yi=hs[0],zr=hs[1],Ir=Te(function(qr){zr(qr)}),wi=Te(function(){zr(void 0)});(0,E.useImperativeHandle)(vt,function(){return{list:hr.current,focus:function(ei){var ui,Oi=ki(),Ni=Le(Oi,Xr),Rs=Ni.elements,Ls=Ni.key2element,ms=Ni.element2key,qs=_e(hr.current,Rs),Fs=Yi!=null?Yi:qs[0]?ms.get(qs[0]):(ui=vn.find(function(Us){return!Us.props.disabled}))===null||ui===void 0?void 0:ui.key,ps=Ls.get(Fs);if(Fs&&ps){var $s;ps==null||($s=ps.focus)===null||$s===void 0||$s.call(ps,ei)}}}});var Ai=(0,C.Z)(wn||[],{value:jt,postState:function(ei){return Array.isArray(ei)?ei:ei==null?nn:[ei]}}),Yr=(0,z.Z)(Ai,2),vi=Yr[0],Ri=Yr[1],Li=function(ei){if(Or){var ui=ei.key,Oi=vi.includes(ui),Ni;_n?Oi?Ni=vi.filter(function(Ls){return Ls!==ui}):Ni=[].concat((0,fe.Z)(vi),[ui]):Ni=[ui],Ri(Ni);var Rs=(0,W.Z)((0,W.Z)({},ei),{},{selectedKeys:Ni});Oi?un==null||un(Rs):Vt==null||Vt(Rs)}!_n&&Qr.length&&ri!=="inline"&&ir(nn)},Ji=Te(function(qr){sr==null||sr(R(qr)),Li(qr)}),Ii=Te(function(qr,ei){var ui=Qr.filter(function(Ni){return Ni!==qr});if(ei)ui.push(qr);else if(ri!=="inline"){var Oi=Ns(qr);ui=ui.filter(function(Ni){return!Oi.has(Ni)})}(0,M.Z)(Qr,ui,!0)||ir(ui,!0)}),qi=function(ei,ui){var Oi=ui!=null?ui:!Qr.includes(ei);Ii(ei,Oi)},ji=Ce(ri,Yi,gi,Xr,hr,ki,xs,zr,qi,Ar);E.useEffect(function(){pi(!0)},[]);var ts=E.useMemo(function(){return{_internalRenderMenuItem:Kr,_internalRenderSubMenuItem:Fr}},[Kr,Fr]),ns=ri!=="horizontal"||jn?vn:vn.map(function(qr,ei){return E.createElement(O,{key:qr.key,overflowDisabled:ei>Mi},qr)}),Js=E.createElement(o.Z,(0,v.Z)({id:On,ref:hr,prefixCls:"".concat(kt,"-overflow"),component:"ul",itemComponent:lt,className:te()(kt,"".concat(kt,"-root"),"".concat(kt,"-").concat(ri),on,(0,ae.Z)((0,ae.Z)({},"".concat(kt,"-inline-collapsed"),Pi),"".concat(kt,"-rtl"),gi),Wt),dir:In,style:Kt,role:"menu",tabIndex:Wn,data:ns,renderRawItem:function(ei){return ei},renderRawRest:function(ei){var ui=ei.length,Oi=ui?vn.slice(-ui):null;return E.createElement(gn,{eventKey:de,title:Zr,disabled:as,internalPopupClose:ui===0,popupClassName:fr},Oi)},maxCount:ri!=="horizontal"||jn?o.Z.INVALIDATE:o.Z.RESPONSIVE,ssr:"full","data-menu-list":!0,onVisibleChange:function(ei){Ds(ei)},onKeyDown:ji},Ur));return E.createElement(ue.Provider,{value:ts},E.createElement(k.Provider,{value:Xr},E.createElement(O,{prefixCls:kt,rootClassName:Wt,mode:ri,openKeys:Qr,rtl:gi,disabled:Nn,motion:oi?tr:null,defaultMotions:oi?tn:null,activeKey:Yi,onActive:Ir,onInactive:wi,selectedKeys:vi,inlineIndent:Vn,subMenuOpenDelay:Dn,subMenuCloseDelay:Sn,forceSubMenuRender:cr,builtinPlacements:Lr,triggerSubMenuAction:vr,getPopupContainer:Nr,itemIcon:Br,expandIcon:jr,onItemClick:Ji,onOpenChange:Ii},E.createElement(ke.Provider,{value:Is},Js),E.createElement("div",{style:{display:"none"},"aria-hidden":!0},E.createElement(oe.Provider,{value:Qs},ni)))))}),Qt=Ht,pn=Qt;pn.Item=lt,pn.SubMenu=gn,pn.ItemGroup=it,pn.Divider=ut;var qt=pn},83836:function(ln,mt,m){"use strict";m.d(mt,{Z:function(){return V}});var v=m(60499),ae=m(85899),W=m(72190),fe=m(42244),z=m(59301),g=m(92310),q=m.n(g),te=m(29301),o=m(34280),C=["prefixCls","invalidate","item","renderItem","responsive","responsiveDisabled","registerSize","itemKey","className","style","children","display","order","component"],M=void 0;function y(x,w){var H=x.prefixCls,he=x.invalidate,Ke=x.item,ft=x.renderItem,Ue=x.responsive,st=x.responsiveDisabled,pt=x.registerSize,Et=x.itemKey,Ne=x.className,St=x.style,at=x.children,Nt=x.display,Ge=x.order,je=x.component,Re=je===void 0?"div":je,_e=(0,fe.Z)(x,C),Y=Ue&&!Nt;function Le(ve){pt(Et,ve)}z.useEffect(function(){return function(){Le(null)}},[]);var Ce=ft&&Ke!==M?ft(Ke,{index:Ge}):at,B;he||(B={opacity:Y?0:1,height:Y?0:M,overflowY:Y?"hidden":M,order:Ue?Ge:M,pointerEvents:Y?"none":M,position:Y?"absolute":M});var P={};Y&&(P["aria-hidden"]=!0);var ce=z.createElement(Re,(0,v.Z)({className:q()(!he&&H,Ne),style:(0,ae.Z)((0,ae.Z)({},B),St)},P,_e,{ref:w}),Ce);return Ue&&(ce=z.createElement(te.Z,{onResize:function(de){var ye=de.offsetWidth;Le(ye)},disabled:st},ce)),ce}var E=z.forwardRef(y);E.displayName="Item";var T=E,k=m(6089),j=m(4676),Z=m(16089);function U(x){if(typeof MessageChannel=="undefined")(0,Z.Z)(x);else{var w=new MessageChannel;w.port1.onmessage=function(){return x()},w.port2.postMessage(void 0)}}function A(){var x=z.useRef(null),w=function(he){x.current||(x.current=[],U(function(){(0,j.unstable_batchedUpdates)(function(){x.current.forEach(function(Ke){Ke()}),x.current=null})})),x.current.push(he)};return w}function K(x,w){var H=z.useState(w),he=(0,W.Z)(H,2),Ke=he[0],ft=he[1],Ue=(0,k.Z)(function(st){x(function(){ft(st)})});return[Ke,Ue]}var D=z.createContext(null),O=["component"],re=["className"],oe=["className"],ie=function(w,H){var he=z.useContext(D);if(!he){var Ke=w.component,ft=Ke===void 0?"div":Ke,Ue=(0,fe.Z)(w,O);return z.createElement(ft,(0,v.Z)({},Ue,{ref:H}))}var st=he.className,pt=(0,fe.Z)(he,re),Et=w.className,Ne=(0,fe.Z)(w,oe);return z.createElement(D.Provider,{value:null},z.createElement(T,(0,v.Z)({ref:H,className:q()(st,Et)},pt,Ne)))},Ee=z.forwardRef(ie);Ee.displayName="RawItem";var Me=Ee,ke=["prefixCls","data","renderItem","renderRawItem","itemKey","itemWidth","ssr","style","className","maxCount","renderRest","renderRawRest","prefix","suffix","component","itemComponent","onVisibleChange"],tt="responsive",ue="invalidate";function X(x){return"+ ".concat(x.length," ...")}function L(x,w){var H=x.prefixCls,he=H===void 0?"rc-overflow":H,Ke=x.data,ft=Ke===void 0?[]:Ke,Ue=x.renderItem,st=x.renderRawItem,pt=x.itemKey,Et=x.itemWidth,Ne=Et===void 0?10:Et,St=x.ssr,at=x.style,Nt=x.className,Ge=x.maxCount,je=x.renderRest,Re=x.renderRawRest,_e=x.prefix,Y=x.suffix,Le=x.component,Ce=Le===void 0?"div":Le,B=x.itemComponent,P=x.onVisibleChange,ce=(0,fe.Z)(x,ke),ve=St==="full",de=A(),ye=K(de,null),Te=(0,W.Z)(ye,2),we=Te[0],Ie=Te[1],Ae=we||0,Xe=K(de,new Map),gt=(0,W.Z)(Xe,2),ht=gt[0],nt=gt[1],Oe=K(de,0),qe=(0,W.Z)(Oe,2),rt=qe[0],ot=qe[1],Rt=K(de,0),S=(0,W.Z)(Rt,2),R=S[0],Ze=S[1],J=K(de,0),be=(0,W.Z)(J,2),zt=be[0],ze=be[1],Qe=K(de,0),lt=(0,W.Z)(Qe,2),le=lt[0],pe=lt[1],Pe=(0,z.useState)(null),$e=(0,W.Z)(Pe,2),G=$e[0],bt=$e[1],xe=(0,z.useState)(null),Bt=(0,W.Z)(xe,2),en=Bt[0],dn=Bt[1],Hn=z.useMemo(function(){return en===null&&ve?Number.MAX_SAFE_INTEGER:en||0},[en,we]),wt=(0,z.useState)(!1),Gt=(0,W.Z)(wt,2),mn=Gt[0],yn=Gt[1],rn="".concat(he,"-item"),En=Math.max(rt,R),Zt=Ge===tt,Dt=ft.length&&Zt,Mt=Ge===ue,gn=Dt||typeof Ge=="number"&&ft.length>Ge,Ln=(0,z.useMemo)(function(){var At=ft;return Dt?we===null&&ve?At=ft:At=ft.slice(0,Math.min(ft.length,Ae/Ne)):typeof Ge=="number"&&(At=ft.slice(0,Ge)),At},[ft,Ne,we,Ge,Dt]),ut=(0,z.useMemo)(function(){return Dt?ft.slice(Hn+1):ft.slice(Ln.length)},[ft,Ln,Dt,Hn]),ct=(0,z.useCallback)(function(At,kt){var Wt;return typeof pt=="function"?pt(At):(Wt=pt&&(At==null?void 0:At[pt]))!==null&&Wt!==void 0?Wt:kt},[pt]),Se=(0,z.useCallback)(Ue||function(At){return At},[Ue]);function He(At,kt,Wt){en===At&&(kt===void 0||kt===G)||(dn(At),Wt||(yn(At<ft.length-1),P==null||P(At)),kt!==void 0&&bt(kt))}function it(At,kt){Ie(kt.clientWidth)}function Je(At,kt){nt(function(Wt){var Kt=new Map(Wt);return kt===null?Kt.delete(At):Kt.set(At,kt),Kt})}function yt(At,kt){Ze(kt),ot(R)}function $t(At,kt){ze(kt)}function Jt(At,kt){pe(kt)}function nn(At){return ht.get(ct(Ln[At],At))}(0,o.Z)(function(){if(Ae&&typeof En=="number"&&Ln){var At=zt+le,kt=Ln.length,Wt=kt-1;if(!kt){He(0,null);return}for(var Kt=0;Kt<kt;Kt+=1){var on=nn(Kt);if(ve&&(on=on||0),on===void 0){He(Kt-1,void 0,!0);break}if(At+=on,Wt===0&&At<=Ae||Kt===Wt-1&&At+nn(Wt)<=Ae){He(Wt,null);break}else if(At+En>Ae){He(Kt-1,At-on-le+R);break}}Y&&nn(0)+le>Ae&&bt(null)}},[Ae,ht,R,zt,le,ct,Ln]);var Ht=mn&&!!ut.length,Qt={};G!==null&&Dt&&(Qt={position:"absolute",left:G,top:0});var pn={prefixCls:rn,responsive:Dt,component:B,invalidate:Mt},qt=st?function(At,kt){var Wt=ct(At,kt);return z.createElement(D.Provider,{key:Wt,value:(0,ae.Z)((0,ae.Z)({},pn),{},{order:kt,item:At,itemKey:Wt,registerSize:Je,display:kt<=Hn})},st(At,kt))}:function(At,kt){var Wt=ct(At,kt);return z.createElement(T,(0,v.Z)({},pn,{order:kt,key:Wt,item:At,renderItem:Se,itemKey:Wt,registerSize:Je,display:kt<=Hn}))},Ye={order:Ht?Hn:Number.MAX_SAFE_INTEGER,className:"".concat(rn,"-rest"),registerSize:yt,display:Ht},vt=je||X,Ct=Re?z.createElement(D.Provider,{value:(0,ae.Z)((0,ae.Z)({},pn),Ye)},Re(ut)):z.createElement(T,(0,v.Z)({},pn,Ye),typeof vt=="function"?vt(ut):vt),_t=z.createElement(Ce,(0,v.Z)({className:q()(!Mt&&he,Nt),style:at,ref:w},ce),_e&&z.createElement(T,(0,v.Z)({},pn,{responsive:Zt,responsiveDisabled:!Dt,order:-1,className:"".concat(rn,"-prefix"),registerSize:$t,display:!0}),_e),Ln.map(qt),gn?Ct:null,Y&&z.createElement(T,(0,v.Z)({},pn,{responsive:Zt,responsiveDisabled:!Dt,order:Hn,className:"".concat(rn,"-suffix"),registerSize:Jt,display:!0,style:Qt}),Y));return Zt?z.createElement(te.Z,{onResize:it,disabled:!Dt},_t):_t}var se=z.forwardRef(L);se.displayName="Overflow",se.Item=Me,se.RESPONSIVE=tt,se.INVALIDATE=ue;var Q=se,V=Q},29301:function(ln,mt,m){"use strict";m.d(mt,{Z:function(){return ue}});var v=m(60499),ae=m(59301),W=m(11592),fe=m(48736),z=m(85899),g=m(43749),q=m(76846),te=m(8654),o=ae.createContext(null);function C(X){var L=X.children,se=X.onBatchResize,Q=ae.useRef(0),V=ae.useRef([]),x=ae.useContext(o),w=ae.useCallback(function(H,he,Ke){Q.current+=1;var ft=Q.current;V.current.push({size:H,element:he,data:Ke}),Promise.resolve().then(function(){ft===Q.current&&(se==null||se(V.current),V.current=[])}),x==null||x(H,he,Ke)},[se,x]);return ae.createElement(o.Provider,{value:w},L)}var M=m(76374),y=new Map;function E(X){X.forEach(function(L){var se,Q=L.target;(se=y.get(Q))===null||se===void 0||se.forEach(function(V){return V(Q)})})}var T=new M.Z(E),k=null,j=null;function Z(X,L){y.has(X)||(y.set(X,new Set),T.observe(X)),y.get(X).add(L)}function U(X,L){y.has(X)&&(y.get(X).delete(L),y.get(X).size||(T.unobserve(X),y.delete(X)))}var A=m(38705),K=m(17212),D=m(39153),O=m(55401),re=function(X){(0,D.Z)(se,X);var L=(0,O.Z)(se);function se(){return(0,A.Z)(this,se),L.apply(this,arguments)}return(0,K.Z)(se,[{key:"render",value:function(){return this.props.children}}]),se}(ae.Component);function oe(X,L){var se=X.children,Q=X.disabled,V=ae.useRef(null),x=ae.useRef(null),w=ae.useContext(o),H=typeof se=="function",he=H?se(V):se,Ke=ae.useRef({width:-1,height:-1,offsetWidth:-1,offsetHeight:-1}),ft=!H&&ae.isValidElement(he)&&(0,te.Yr)(he),Ue=ft?(0,te.C4)(he):null,st=(0,te.x1)(Ue,V),pt=function(){var at;return(0,q.ZP)(V.current)||(V.current&&(0,g.Z)(V.current)==="object"?(0,q.ZP)((at=V.current)===null||at===void 0?void 0:at.nativeElement):null)||(0,q.ZP)(x.current)};ae.useImperativeHandle(L,function(){return pt()});var Et=ae.useRef(X);Et.current=X;var Ne=ae.useCallback(function(St){var at=Et.current,Nt=at.onResize,Ge=at.data,je=St.getBoundingClientRect(),Re=je.width,_e=je.height,Y=St.offsetWidth,Le=St.offsetHeight,Ce=Math.floor(Re),B=Math.floor(_e);if(Ke.current.width!==Ce||Ke.current.height!==B||Ke.current.offsetWidth!==Y||Ke.current.offsetHeight!==Le){var P={width:Ce,height:B,offsetWidth:Y,offsetHeight:Le};Ke.current=P;var ce=Y===Math.round(Re)?Re:Y,ve=Le===Math.round(_e)?_e:Le,de=(0,z.Z)((0,z.Z)({},P),{},{offsetWidth:ce,offsetHeight:ve});w==null||w(de,St,Ge),Nt&&Promise.resolve().then(function(){Nt(de,St)})}},[]);return ae.useEffect(function(){var St=pt();return St&&!Q&&Z(St,Ne),function(){return U(St,Ne)}},[V.current,Q]),ae.createElement(re,{ref:x},ft?ae.cloneElement(he,{ref:st}):he)}var ie=ae.forwardRef(oe),Ee=ie,Me="rc-observer-key";function ke(X,L){var se=X.children,Q=typeof se=="function"?[se]:(0,W.Z)(se);return Q.map(function(V,x){var w=(V==null?void 0:V.key)||"".concat(Me,"-").concat(x);return ae.createElement(Ee,(0,v.Z)({},X,{key:w,ref:x===0?L:void 0}),V)})}var tt=ae.forwardRef(ke);tt.Collection=C;var ue=tt},6551:function(ln,mt,m){"use strict";m.d(mt,{ZP:function(){return q}});var v=m(72190),ae=m(59301),W=m(47273),fe=0,z=(0,W.Z)();function g(){var te;return z?(te=fe,fe+=1):te="TEST_OR_SSR",te}function q(te){var o=ae.useState(),C=(0,v.Z)(o,2),M=C[0],y=C[1];return ae.useEffect(function(){y("rc_select_".concat(g()))},[]),te||M}},37463:function(ln,mt,m){"use strict";m.d(mt,{Ac:function(){return Oe},Xo:function(){return rt},Wx:function(){return Rt},ZP:function(){return Ln},lk:function(){return K}});var v=m(60499),ae=m(77654),W=m(18642),fe=m(85899),z=m(72190),g=m(42244),q=m(43749),te=m(18929),o=m(48736),C=m(59301),M=m(92310),y=m.n(M),E=m(34280),T=m(49658),k=m(8654),j=function(ct){var Se=ct.className,He=ct.customizeIcon,it=ct.customizeIconProps,Je=ct.children,yt=ct.onMouseDown,$t=ct.onClick,Jt=typeof He=="function"?He(it):He;return C.createElement("span",{className:Se,onMouseDown:function(Ht){Ht.preventDefault(),yt==null||yt(Ht)},style:{userSelect:"none",WebkitUserSelect:"none"},unselectable:"on",onClick:$t,"aria-hidden":!0},Jt!==void 0?Jt:C.createElement("span",{className:y()(Se.split(/\s+/).map(function(nn){return"".concat(nn,"-icon")}))},Je))},Z=j,U=function(ct,Se,He,it,Je){var yt=arguments.length>5&&arguments[5]!==void 0?arguments[5]:!1,$t=arguments.length>6?arguments[6]:void 0,Jt=arguments.length>7?arguments[7]:void 0,nn=C.useMemo(function(){if((0,q.Z)(it)==="object")return it.clearIcon;if(Je)return Je},[it,Je]),Ht=C.useMemo(function(){return!!(!yt&&it&&(He.length||$t)&&!(Jt==="combobox"&&$t===""))},[it,yt,He.length,$t,Jt]);return{allowClear:Ht,clearIcon:C.createElement(Z,{className:"".concat(ct,"-clear"),onMouseDown:Se,customizeIcon:nn},"\xD7")}},A=C.createContext(null);function K(){return C.useContext(A)}function D(){var ut=arguments.length>0&&arguments[0]!==void 0?arguments[0]:10,ct=C.useState(!1),Se=(0,z.Z)(ct,2),He=Se[0],it=Se[1],Je=C.useRef(null),yt=function(){window.clearTimeout(Je.current)};C.useEffect(function(){return yt},[]);var $t=function(nn,Ht){yt(),Je.current=window.setTimeout(function(){it(nn),Ht&&Ht()},ut)};return[He,$t,yt]}function O(){var ut=arguments.length>0&&arguments[0]!==void 0?arguments[0]:250,ct=C.useRef(null),Se=C.useRef(null);C.useEffect(function(){return function(){window.clearTimeout(Se.current)}},[]);function He(it){(it||ct.current===null)&&(ct.current=it),window.clearTimeout(Se.current),Se.current=window.setTimeout(function(){ct.current=null},ut)}return[function(){return ct.current},He]}function re(ut,ct,Se,He){var it=C.useRef(null);it.current={open:ct,triggerOpen:Se,customizedTrigger:He},C.useEffect(function(){function Je(yt){var $t;if(!(($t=it.current)!==null&&$t!==void 0&&$t.customizedTrigger)){var Jt=yt.target;Jt.shadowRoot&&yt.composed&&(Jt=yt.composedPath()[0]||Jt),it.current.open&&ut().filter(function(nn){return nn}).every(function(nn){return!nn.contains(Jt)&&nn!==Jt})&&it.current.triggerOpen(!1)}}return window.addEventListener("mousedown",Je),function(){return window.removeEventListener("mousedown",Je)}},[])}var oe=m(10228);function ie(ut){return ut&&![oe.Z.ESC,oe.Z.SHIFT,oe.Z.BACKSPACE,oe.Z.TAB,oe.Z.WIN_KEY,oe.Z.ALT,oe.Z.META,oe.Z.WIN_KEY_RIGHT,oe.Z.CTRL,oe.Z.SEMICOLON,oe.Z.EQUALS,oe.Z.CAPS_LOCK,oe.Z.CONTEXT_MENU,oe.Z.F1,oe.Z.F2,oe.Z.F3,oe.Z.F4,oe.Z.F5,oe.Z.F6,oe.Z.F7,oe.Z.F8,oe.Z.F9,oe.Z.F10,oe.Z.F11,oe.Z.F12].includes(ut)}var Ee=m(26112),Me=m(83836);function ke(ut,ct,Se){var He=(0,fe.Z)((0,fe.Z)({},ut),Se?ct:{});return Object.keys(ct).forEach(function(it){var Je=ct[it];typeof Je=="function"&&(He[it]=function(){for(var yt,$t=arguments.length,Jt=new Array($t),nn=0;nn<$t;nn++)Jt[nn]=arguments[nn];return Je.apply(void 0,Jt),(yt=ut[it])===null||yt===void 0?void 0:yt.call.apply(yt,[ut].concat(Jt))})}),He}var tt=ke,ue=["prefixCls","id","inputElement","autoFocus","autoComplete","editable","activeDescendantId","value","open","attrs"],X=function(ct,Se){var He=ct.prefixCls,it=ct.id,Je=ct.inputElement,yt=ct.autoFocus,$t=ct.autoComplete,Jt=ct.editable,nn=ct.activeDescendantId,Ht=ct.value,Qt=ct.open,pn=ct.attrs,qt=(0,g.Z)(ct,ue),Ye=Je||C.createElement("input",null),vt=Ye,Ct=vt.ref,_t=vt.props;return(0,o.Kp)(!("maxLength"in Ye.props),"Passing 'maxLength' to input element directly may not work because input in BaseSelect is controlled."),Ye=C.cloneElement(Ye,(0,fe.Z)((0,fe.Z)((0,fe.Z)({type:"search"},tt(qt,_t,!0)),{},{id:it,ref:(0,k.sQ)(Se,Ct),autoComplete:$t||"off",autoFocus:yt,className:y()("".concat(He,"-selection-search-input"),_t==null?void 0:_t.className),role:"combobox","aria-expanded":Qt||!1,"aria-haspopup":"listbox","aria-owns":"".concat(it,"_list"),"aria-autocomplete":"list","aria-controls":"".concat(it,"_list"),"aria-activedescendant":Qt?nn:void 0},pn),{},{value:Jt?Ht:"",readOnly:!Jt,unselectable:Jt?null:"on",style:(0,fe.Z)((0,fe.Z)({},_t.style),{},{opacity:Jt?null:0})})),Ye},L=C.forwardRef(X),se=L;function Q(ut){return Array.isArray(ut)?ut:ut!==void 0?[ut]:[]}var V=typeof window!="undefined"&&window.document&&window.document.documentElement,x=V;function w(ut){return ut!=null}function H(ut){return!ut&&ut!==0}function he(ut){return["string","number"].includes((0,q.Z)(ut))}function Ke(ut){var ct=void 0;return ut&&(he(ut.title)?ct=ut.title.toString():he(ut.label)&&(ct=ut.label.toString())),ct}function ft(ut,ct){x?C.useLayoutEffect(ut,ct):C.useEffect(ut,ct)}function Ue(ut){var ct;return(ct=ut.key)!==null&&ct!==void 0?ct:ut.value}var st=function(ct){ct.preventDefault(),ct.stopPropagation()},pt=function(ct){var Se=ct.id,He=ct.prefixCls,it=ct.values,Je=ct.open,yt=ct.searchValue,$t=ct.autoClearSearchValue,Jt=ct.inputRef,nn=ct.placeholder,Ht=ct.disabled,Qt=ct.mode,pn=ct.showSearch,qt=ct.autoFocus,Ye=ct.autoComplete,vt=ct.activeDescendantId,Ct=ct.tabIndex,_t=ct.removeIcon,At=ct.maxTagCount,kt=ct.maxTagTextLength,Wt=ct.maxTagPlaceholder,Kt=Wt===void 0?function(un){return"+ ".concat(un.length," ...")}:Wt,on=ct.tagRender,cn=ct.onToggleOpen,Wn=ct.onRemove,bn=ct.onInputChange,fn=ct.onInputPaste,In=ct.onInputKeyDown,On=ct.onInputMouseDown,Zn=ct.onInputCompositionStart,An=ct.onInputCompositionEnd,Mn=ct.onInputBlur,Nn=C.useRef(null),jn=(0,C.useState)(0),zn=(0,z.Z)(jn,2),Dn=zn[0],Bn=zn[1],Sn=(0,C.useState)(!1),cr=(0,z.Z)(Sn,2),Tt=cr[0],Fn=cr[1],Kn="".concat(He,"-selection"),Dr=Je||Qt==="multiple"&&$t===!1||Qt==="tags"?yt:"",gr=Qt==="tags"||Qt==="multiple"&&$t===!1||pn&&(Je||Tt);ft(function(){Bn(Nn.current.scrollWidth)},[Dr]);var Or=function(Cn,Vn,tr,tn,Yn){return C.createElement("span",{title:Ke(Cn),className:y()("".concat(Kn,"-item"),(0,W.Z)({},"".concat(Kn,"-item-disabled"),tr))},C.createElement("span",{className:"".concat(Kn,"-item-content")},Vn),tn&&C.createElement(Z,{className:"".concat(Kn,"-item-remove"),onMouseDown:st,onClick:Yn,customizeIcon:_t},"\xD7"))},Cr=function(Cn,Vn,tr,tn,Yn,vr){var Lr=function(jr){st(jr),cn(!Je)};return C.createElement("span",{onMouseDown:Lr},on({label:Vn,value:Cn,disabled:tr,closable:tn,onClose:Yn,isMaxTag:!!vr}))},_n=function(Cn){var Vn=Cn.disabled,tr=Cn.label,tn=Cn.value,Yn=!Ht&&!Vn,vr=tr;if(typeof kt=="number"&&(typeof tr=="string"||typeof tr=="number")){var Lr=String(vr);Lr.length>kt&&(vr="".concat(Lr.slice(0,kt),"..."))}var Br=function(dr){dr&&dr.stopPropagation(),Wn(Cn)};return typeof on=="function"?Cr(tn,vr,Vn,Yn,Br):Or(Cn,vr,Vn,Yn,Br)},wn=function(Cn){if(!it.length)return null;var Vn=typeof Kt=="function"?Kt(Cn):Kt;return typeof on=="function"?Cr(void 0,Vn,!1,!1,void 0,!0):Or({title:Vn},Vn,!1)},jt=C.createElement("div",{className:"".concat(Kn,"-search"),style:{width:Dn},onFocus:function(){Fn(!0)},onBlur:function(){Fn(!1)}},C.createElement(se,{ref:Jt,open:Je,prefixCls:He,id:Se,inputElement:null,disabled:Ht,autoFocus:qt,autoComplete:Ye,editable:gr,activeDescendantId:vt,value:Dr,onKeyDown:In,onMouseDown:On,onChange:bn,onPaste:fn,onCompositionStart:Zn,onCompositionEnd:An,onBlur:Mn,tabIndex:Ct,attrs:(0,Ee.Z)(ct,!0)}),C.createElement("span",{ref:Nn,className:"".concat(Kn,"-search-mirror"),"aria-hidden":!0},Dr,"\xA0")),Vt=C.createElement(Me.Z,{prefixCls:"".concat(Kn,"-overflow"),data:it,renderItem:_n,renderRest:wn,suffix:jt,itemKey:Ue,maxCount:At});return C.createElement("span",{className:"".concat(Kn,"-wrap")},Vt,!it.length&&!Dr&&C.createElement("span",{className:"".concat(Kn,"-placeholder")},nn))},Et=pt,Ne=function(ct){var Se=ct.inputElement,He=ct.prefixCls,it=ct.id,Je=ct.inputRef,yt=ct.disabled,$t=ct.autoFocus,Jt=ct.autoComplete,nn=ct.activeDescendantId,Ht=ct.mode,Qt=ct.open,pn=ct.values,qt=ct.placeholder,Ye=ct.tabIndex,vt=ct.showSearch,Ct=ct.searchValue,_t=ct.activeValue,At=ct.maxLength,kt=ct.onInputKeyDown,Wt=ct.onInputMouseDown,Kt=ct.onInputChange,on=ct.onInputPaste,cn=ct.onInputCompositionStart,Wn=ct.onInputCompositionEnd,bn=ct.onInputBlur,fn=ct.title,In=C.useState(!1),On=(0,z.Z)(In,2),Zn=On[0],An=On[1],Mn=Ht==="combobox",Nn=Mn||vt,jn=pn[0],zn=Ct||"";Mn&&_t&&!Zn&&(zn=_t),C.useEffect(function(){Mn&&An(!1)},[Mn,_t]);var Dn=Ht!=="combobox"&&!Qt&&!vt?!1:!!zn,Bn=fn===void 0?Ke(jn):fn,Sn=C.useMemo(function(){return jn?null:C.createElement("span",{className:"".concat(He,"-selection-placeholder"),style:Dn?{visibility:"hidden"}:void 0},qt)},[jn,Dn,qt,He]);return C.createElement("span",{className:"".concat(He,"-selection-wrap")},C.createElement("span",{className:"".concat(He,"-selection-search")},C.createElement(se,{ref:Je,prefixCls:He,id:it,open:Qt,inputElement:Se,disabled:yt,autoFocus:$t,autoComplete:Jt,editable:Nn,activeDescendantId:nn,value:zn,onKeyDown:kt,onMouseDown:Wt,onChange:function(Tt){An(!0),Kt(Tt)},onPaste:on,onCompositionStart:cn,onCompositionEnd:Wn,onBlur:bn,tabIndex:Ye,attrs:(0,Ee.Z)(ct,!0),maxLength:Mn?At:void 0})),!Mn&&jn?C.createElement("span",{className:"".concat(He,"-selection-item"),title:Bn,style:Dn?{visibility:"hidden"}:void 0},jn.label):null,Sn)},St=Ne,at=function(ct,Se){var He=(0,C.useRef)(null),it=(0,C.useRef)(!1),Je=ct.prefixCls,yt=ct.open,$t=ct.mode,Jt=ct.showSearch,nn=ct.tokenWithEnter,Ht=ct.disabled,Qt=ct.prefix,pn=ct.autoClearSearchValue,qt=ct.onSearch,Ye=ct.onSearchSubmit,vt=ct.onToggleOpen,Ct=ct.onInputKeyDown,_t=ct.onInputBlur,At=ct.domRef;C.useImperativeHandle(Se,function(){return{focus:function(Bn){He.current.focus(Bn)},blur:function(){He.current.blur()}}});var kt=O(0),Wt=(0,z.Z)(kt,2),Kt=Wt[0],on=Wt[1],cn=function(Bn){var Sn=Bn.which,cr=He.current instanceof HTMLTextAreaElement;!cr&&yt&&(Sn===oe.Z.UP||Sn===oe.Z.DOWN)&&Bn.preventDefault(),Ct&&Ct(Bn),Sn===oe.Z.ENTER&&$t==="tags"&&!it.current&&!yt&&(Ye==null||Ye(Bn.target.value)),!(cr&&!yt&&~[oe.Z.UP,oe.Z.DOWN,oe.Z.LEFT,oe.Z.RIGHT].indexOf(Sn))&&ie(Sn)&&vt(!0)},Wn=function(){on(!0)},bn=(0,C.useRef)(null),fn=function(Bn){qt(Bn,!0,it.current)!==!1&&vt(!0)},In=function(){it.current=!0},On=function(Bn){it.current=!1,$t!=="combobox"&&fn(Bn.target.value)},Zn=function(Bn){var Sn=Bn.target.value;if(nn&&bn.current&&/[\r\n]/.test(bn.current)){var cr=bn.current.replace(/[\r\n]+$/,"").replace(/\r\n/g," ").replace(/[\r\n]/g," ");Sn=Sn.replace(cr,bn.current)}bn.current=null,fn(Sn)},An=function(Bn){var Sn=Bn.clipboardData,cr=Sn==null?void 0:Sn.getData("text");bn.current=cr||""},Mn=function(Bn){var Sn=Bn.target;if(Sn!==He.current){var cr=document.body.style.msTouchAction!==void 0;cr?setTimeout(function(){He.current.focus()}):He.current.focus()}},Nn=function(Bn){var Sn=Kt();Bn.target!==He.current&&!Sn&&!($t==="combobox"&&Ht)&&Bn.preventDefault(),($t!=="combobox"&&(!Jt||!Sn)||!yt)&&(yt&&pn!==!1&&qt("",!0,!1),vt())},jn={inputRef:He,onInputKeyDown:cn,onInputMouseDown:Wn,onInputChange:Zn,onInputPaste:An,onInputCompositionStart:In,onInputCompositionEnd:On,onInputBlur:_t},zn=$t==="multiple"||$t==="tags"?C.createElement(Et,(0,v.Z)({},ct,jn)):C.createElement(St,(0,v.Z)({},ct,jn));return C.createElement("div",{ref:At,className:"".concat(Je,"-selector"),onClick:Mn,onMouseDown:Nn},Qt&&C.createElement("div",{className:"".concat(Je,"-prefix")},Qt),zn)},Nt=C.forwardRef(at),Ge=Nt,je=m(68196),Re=["prefixCls","disabled","visible","children","popupElement","animation","transitionName","dropdownStyle","dropdownClassName","direction","placement","builtinPlacements","dropdownMatchSelectWidth","dropdownRender","dropdownAlign","getPopupContainer","empty","getTriggerDOMNode","onPopupVisibleChange","onPopupMouseEnter"],_e=function(ct){var Se=ct===!0?0:1;return{bottomLeft:{points:["tl","bl"],offset:[0,4],overflow:{adjustX:Se,adjustY:1},htmlRegion:"scroll"},bottomRight:{points:["tr","br"],offset:[0,4],overflow:{adjustX:Se,adjustY:1},htmlRegion:"scroll"},topLeft:{points:["bl","tl"],offset:[0,-4],overflow:{adjustX:Se,adjustY:1},htmlRegion:"scroll"},topRight:{points:["br","tr"],offset:[0,-4],overflow:{adjustX:Se,adjustY:1},htmlRegion:"scroll"}}},Y=function(ct,Se){var He=ct.prefixCls,it=ct.disabled,Je=ct.visible,yt=ct.children,$t=ct.popupElement,Jt=ct.animation,nn=ct.transitionName,Ht=ct.dropdownStyle,Qt=ct.dropdownClassName,pn=ct.direction,qt=pn===void 0?"ltr":pn,Ye=ct.placement,vt=ct.builtinPlacements,Ct=ct.dropdownMatchSelectWidth,_t=ct.dropdownRender,At=ct.dropdownAlign,kt=ct.getPopupContainer,Wt=ct.empty,Kt=ct.getTriggerDOMNode,on=ct.onPopupVisibleChange,cn=ct.onPopupMouseEnter,Wn=(0,g.Z)(ct,Re),bn="".concat(He,"-dropdown"),fn=$t;_t&&(fn=_t($t));var In=C.useMemo(function(){return vt||_e(Ct)},[vt,Ct]),On=Jt?"".concat(bn,"-").concat(Jt):nn,Zn=typeof Ct=="number",An=C.useMemo(function(){return Zn?null:Ct===!1?"minWidth":"width"},[Ct,Zn]),Mn=Ht;Zn&&(Mn=(0,fe.Z)((0,fe.Z)({},Mn),{},{width:Ct}));var Nn=C.useRef(null);return C.useImperativeHandle(Se,function(){return{getPopupElement:function(){var zn;return(zn=Nn.current)===null||zn===void 0?void 0:zn.popupElement}}}),C.createElement(je.Z,(0,v.Z)({},Wn,{showAction:on?["click"]:[],hideAction:on?["click"]:[],popupPlacement:Ye||(qt==="rtl"?"bottomRight":"bottomLeft"),builtinPlacements:In,prefixCls:bn,popupTransitionName:On,popup:C.createElement("div",{onMouseEnter:cn},fn),ref:Nn,stretch:An,popupAlign:At,popupVisible:Je,getPopupContainer:kt,popupClassName:y()(Qt,(0,W.Z)({},"".concat(bn,"-empty"),Wt)),popupStyle:Mn,getTriggerDOMNode:Kt,onPopupVisibleChange:on}),yt)},Le=C.forwardRef(Y),Ce=Le,B=m(48745);function P(ut,ct){var Se=ut.key,He;return"value"in ut&&(He=ut.value),Se!=null?Se:He!==void 0?He:"rc-index-key-".concat(ct)}function ce(ut){return typeof ut!="undefined"&&!Number.isNaN(ut)}function ve(ut,ct){var Se=ut||{},He=Se.label,it=Se.value,Je=Se.options,yt=Se.groupLabel,$t=He||(ct?"children":"label");return{label:$t,value:it||"value",options:Je||"options",groupLabel:yt||$t}}function de(ut){var ct=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},Se=ct.fieldNames,He=ct.childrenAsData,it=[],Je=ve(Se,!1),yt=Je.label,$t=Je.value,Jt=Je.options,nn=Je.groupLabel;function Ht(Qt,pn){Array.isArray(Qt)&&Qt.forEach(function(qt){if(pn||!(Jt in qt)){var Ye=qt[$t];it.push({key:P(qt,it.length),groupOption:pn,data:qt,label:qt[yt],value:Ye})}else{var vt=qt[nn];vt===void 0&&He&&(vt=qt.label),it.push({key:P(qt,it.length),group:!0,data:qt,label:vt}),Ht(qt[Jt],!0)}})}return Ht(ut,!1),it}function ye(ut){var ct=(0,fe.Z)({},ut);return"props"in ct||Object.defineProperty(ct,"props",{get:function(){return(0,o.ZP)(!1,"Return type is option instead of Option instance. Please read value directly instead of reading from `props`."),ct}}),ct}var Te=function(ct,Se,He){if(!Se||!Se.length)return null;var it=!1,Je=function $t(Jt,nn){var Ht=(0,B.Z)(nn),Qt=Ht[0],pn=Ht.slice(1);if(!Qt)return[Jt];var qt=Jt.split(Qt);return it=it||qt.length>1,qt.reduce(function(Ye,vt){return[].concat((0,ae.Z)(Ye),(0,ae.Z)($t(vt,pn)))},[]).filter(Boolean)},yt=Je(ct,Se);return it?typeof He!="undefined"?yt.slice(0,He):yt:null},we=C.createContext(null),Ie=we;function Ae(ut){var ct=ut.visible,Se=ut.values;if(!ct)return null;var He=50;return C.createElement("span",{"aria-live":"polite",style:{width:0,height:0,position:"absolute",overflow:"hidden",opacity:0}},"".concat(Se.slice(0,He).map(function(it){var Je=it.label,yt=it.value;return["number","string"].includes((0,q.Z)(Je))?Je:yt}).join(", ")),Se.length>He?", ...":null)}var Xe=["id","prefixCls","className","showSearch","tagRender","direction","omitDomProps","displayValues","onDisplayValuesChange","emptyOptions","notFoundContent","onClear","mode","disabled","loading","getInputElement","getRawInputElement","open","defaultOpen","onDropdownVisibleChange","activeValue","onActiveValueChange","activeDescendantId","searchValue","autoClearSearchValue","onSearch","onSearchSplit","tokenSeparators","allowClear","prefix","suffixIcon","clearIcon","OptionList","animation","transitionName","dropdownStyle","dropdownClassName","dropdownMatchSelectWidth","dropdownRender","dropdownAlign","placement","builtinPlacements","getPopupContainer","showAction","onFocus","onBlur","onKeyUp","onKeyDown","onMouseDown"],gt=["value","onChange","removeIcon","placeholder","autoFocus","maxTagCount","maxTagTextLength","maxTagPlaceholder","choiceTransitionName","onInputKeyDown","onPopupScroll","tabIndex"],ht=function(ct){return ct==="tags"||ct==="multiple"},nt=C.forwardRef(function(ut,ct){var Se,He=ut.id,it=ut.prefixCls,Je=ut.className,yt=ut.showSearch,$t=ut.tagRender,Jt=ut.direction,nn=ut.omitDomProps,Ht=ut.displayValues,Qt=ut.onDisplayValuesChange,pn=ut.emptyOptions,qt=ut.notFoundContent,Ye=qt===void 0?"Not Found":qt,vt=ut.onClear,Ct=ut.mode,_t=ut.disabled,At=ut.loading,kt=ut.getInputElement,Wt=ut.getRawInputElement,Kt=ut.open,on=ut.defaultOpen,cn=ut.onDropdownVisibleChange,Wn=ut.activeValue,bn=ut.onActiveValueChange,fn=ut.activeDescendantId,In=ut.searchValue,On=ut.autoClearSearchValue,Zn=ut.onSearch,An=ut.onSearchSplit,Mn=ut.tokenSeparators,Nn=ut.allowClear,jn=ut.prefix,zn=ut.suffixIcon,Dn=ut.clearIcon,Bn=ut.OptionList,Sn=ut.animation,cr=ut.transitionName,Tt=ut.dropdownStyle,Fn=ut.dropdownClassName,Kn=ut.dropdownMatchSelectWidth,Dr=ut.dropdownRender,gr=ut.dropdownAlign,Or=ut.placement,Cr=ut.builtinPlacements,_n=ut.getPopupContainer,wn=ut.showAction,jt=wn===void 0?[]:wn,Vt=ut.onFocus,un=ut.onBlur,Cn=ut.onKeyUp,Vn=ut.onKeyDown,tr=ut.onMouseDown,tn=(0,g.Z)(ut,Xe),Yn=ht(Ct),vr=(yt!==void 0?yt:Yn)||Ct==="combobox",Lr=(0,fe.Z)({},tn);gt.forEach(function(zr){delete Lr[zr]}),nn==null||nn.forEach(function(zr){delete Lr[zr]});var Br=C.useState(!1),jr=(0,z.Z)(Br,2),dr=jr[0],Zr=jr[1];C.useEffect(function(){Zr((0,T.Z)())},[]);var fr=C.useRef(null),Nr=C.useRef(null),sr=C.useRef(null),ar=C.useRef(null),Ar=C.useRef(null),Rr=C.useRef(!1),Qn=D(),Kr=(0,z.Z)(Qn,3),Fr=Kr[0],Gr=Kr[1],Ur=Kr[2];C.useImperativeHandle(ct,function(){var zr,Ir;return{focus:(zr=ar.current)===null||zr===void 0?void 0:zr.focus,blur:(Ir=ar.current)===null||Ir===void 0?void 0:Ir.blur,scrollTo:function(Ai){var Yr;return(Yr=Ar.current)===null||Yr===void 0?void 0:Yr.scrollTo(Ai)},nativeElement:fr.current||Nr.current}});var Jn=C.useMemo(function(){var zr;if(Ct!=="combobox")return In;var Ir=(zr=Ht[0])===null||zr===void 0?void 0:zr.value;return typeof Ir=="string"||typeof Ir=="number"?String(Ir):""},[In,Ct,Ht]),Si=Ct==="combobox"&&typeof kt=="function"&&kt()||null,vn=typeof Wt=="function"&&Wt(),ni=(0,k.x1)(Nr,vn==null||(Se=vn.props)===null||Se===void 0?void 0:Se.ref),yi=C.useState(!1),_i=(0,z.Z)(yi,2),oi=_i[0],pi=_i[1];(0,E.Z)(function(){pi(!0)},[]);var hr=(0,te.Z)(!1,{defaultValue:on,value:Kt}),Xr=(0,z.Z)(hr,2),gi=Xr[0],xi=Xr[1],Mr=oi?gi:!1,Qr=!Ye&&pn;(_t||Qr&&Mr&&Ct==="combobox")&&(Mr=!1);var ii=Qr?!1:Mr,ir=C.useCallback(function(zr){var Ir=zr!==void 0?zr:!Mr;_t||(xi(Ir),Mr!==Ir&&(cn==null||cn(Ir)))},[_t,Mr,xi,cn]),Er=C.useMemo(function(){return(Mn||[]).some(function(zr){return[`
|
|
|
`,`\r
|
|
|
`].includes(zr)})},[Mn]),kn=C.useContext(Ie)||{},$n=kn.maxCount,lr=kn.rawValues,yr=function(Ir,wi,Ai){if(!(Yn&&ce($n)&&(lr==null?void 0:lr.size)>=$n)){var Yr=!0,vi=Ir;bn==null||bn(null);var Ri=Te(Ir,Mn,ce($n)?$n-lr.size:void 0),Li=Ai?null:Ri;return Ct!=="combobox"&&Li&&(vi="",An==null||An(Li),ir(!1),Yr=!1),Zn&&Jn!==vi&&Zn(vi,{source:wi?"typing":"effect"}),Yr}},Wr=function(Ir){!Ir||!Ir.trim()||Zn(Ir,{source:"submit"})};C.useEffect(function(){!Mr&&!Yn&&Ct!=="combobox"&&yr("",!1,!1)},[Mr]),C.useEffect(function(){gi&&_t&&xi(!1),_t&&!Rr.current&&Gr(!1)},[_t]);var Rn=O(),Un=(0,z.Z)(Rn,2),rr=Un[0],or=Un[1],Sr=C.useRef(!1),Ei=function(Ir){var wi=rr(),Ai=Ir.key,Yr=Ai==="Enter";if(Yr&&(Ct!=="combobox"&&Ir.preventDefault(),Mr||ir(!0)),or(!!Jn),Ai==="Backspace"&&!wi&&Yn&&!Jn&&Ht.length){for(var vi=(0,ae.Z)(Ht),Ri=null,Li=vi.length-1;Li>=0;Li-=1){var Ji=vi[Li];if(!Ji.disabled){vi.splice(Li,1),Ri=Ji;break}}Ri&&Qt(vi,{type:"remove",values:[Ri]})}for(var Ii=arguments.length,qi=new Array(Ii>1?Ii-1:0),ji=1;ji<Ii;ji++)qi[ji-1]=arguments[ji];if(Mr&&(!Yr||!Sr.current)){var ts;Yr&&(Sr.current=!0),(ts=Ar.current)===null||ts===void 0||ts.onKeyDown.apply(ts,[Ir].concat(qi))}Vn==null||Vn.apply(void 0,[Ir].concat(qi))},ri=function(Ir){for(var wi=arguments.length,Ai=new Array(wi>1?wi-1:0),Yr=1;Yr<wi;Yr++)Ai[Yr-1]=arguments[Yr];if(Mr){var vi;(vi=Ar.current)===null||vi===void 0||vi.onKeyUp.apply(vi,[Ir].concat(Ai))}Ir.key==="Enter"&&(Sr.current=!1),Cn==null||Cn.apply(void 0,[Ir].concat(Ai))},di=function(Ir){var wi=Ht.filter(function(Ai){return Ai!==Ir});Qt(wi,{type:"remove",values:[Ir]})},li=function(){Sr.current=!1},Vi=C.useRef(!1),Pi=function(){Gr(!0),_t||(Vt&&!Vi.current&&Vt.apply(void 0,arguments),jt.includes("focus")&&ir(!0)),Vi.current=!0},Ui=function(){Rr.current=!0,Gr(!1,function(){Vi.current=!1,Rr.current=!1,ir(!1)}),!_t&&(Jn&&(Ct==="tags"?Zn(Jn,{source:"submit"}):Ct==="multiple"&&Zn("",{source:"blur"})),un&&un.apply(void 0,arguments))},Di=[];C.useEffect(function(){return function(){Di.forEach(function(zr){return clearTimeout(zr)}),Di.splice(0,Di.length)}},[]);var zi=function(Ir){var wi,Ai=Ir.target,Yr=(wi=sr.current)===null||wi===void 0?void 0:wi.getPopupElement();if(Yr&&Yr.contains(Ai)){var vi=setTimeout(function(){var Ii=Di.indexOf(vi);if(Ii!==-1&&Di.splice(Ii,1),Ur(),!dr&&!Yr.contains(document.activeElement)){var qi;(qi=ar.current)===null||qi===void 0||qi.focus()}});Di.push(vi)}for(var Ri=arguments.length,Li=new Array(Ri>1?Ri-1:0),Ji=1;Ji<Ri;Ji++)Li[Ji-1]=arguments[Ji];tr==null||tr.apply(void 0,[Ir].concat(Li))},Mi=C.useState({}),Ds=(0,z.Z)(Mi,2),as=Ds[1];function Gi(){as({})}var bs;vn&&(bs=function(Ir){ir(Ir)}),re(function(){var zr;return[fr.current,(zr=sr.current)===null||zr===void 0?void 0:zr.getPopupElement()]},ii,ir,!!vn);var _s=C.useMemo(function(){return(0,fe.Z)((0,fe.Z)({},ut),{},{notFoundContent:Ye,open:Mr,triggerOpen:ii,id:He,showSearch:vr,multiple:Yn,toggleOpen:ir})},[ut,Ye,ii,Mr,He,vr,Yn,ir]),ks=!!zn||At,os;ks&&(os=C.createElement(Z,{className:y()("".concat(it,"-arrow"),(0,W.Z)({},"".concat(it,"-arrow-loading"),At)),customizeIcon:zn,customizeIconProps:{loading:At,searchValue:Jn,open:Mr,focused:Fr,showSearch:vr}}));var xs=function(){var Ir;vt==null||vt(),(Ir=ar.current)===null||Ir===void 0||Ir.focus(),Qt([],{type:"clear",values:Ht}),yr("",!1,!1)},ki=U(it,xs,Ht,Nn,Dn,_t,Jn,Ct),Ns=ki.allowClear,Qs=ki.clearIcon,Is=C.createElement(Bn,{ref:Ar}),Bs=y()(it,Je,(0,W.Z)((0,W.Z)((0,W.Z)((0,W.Z)((0,W.Z)((0,W.Z)((0,W.Z)((0,W.Z)((0,W.Z)((0,W.Z)({},"".concat(it,"-focused"),Fr),"".concat(it,"-multiple"),Yn),"".concat(it,"-single"),!Yn),"".concat(it,"-allow-clear"),Nn),"".concat(it,"-show-arrow"),ks),"".concat(it,"-disabled"),_t),"".concat(it,"-loading"),At),"".concat(it,"-open"),Mr),"".concat(it,"-customize-input"),Si),"".concat(it,"-show-search"),vr)),hs=C.createElement(Ce,{ref:sr,disabled:_t,prefixCls:it,visible:ii,popupElement:Is,animation:Sn,transitionName:cr,dropdownStyle:Tt,dropdownClassName:Fn,direction:Jt,dropdownMatchSelectWidth:Kn,dropdownRender:Dr,dropdownAlign:gr,placement:Or,builtinPlacements:Cr,getPopupContainer:_n,empty:pn,getTriggerDOMNode:function(Ir){return Nr.current||Ir},onPopupVisibleChange:bs,onPopupMouseEnter:Gi},vn?C.cloneElement(vn,{ref:ni}):C.createElement(Ge,(0,v.Z)({},ut,{domRef:Nr,prefixCls:it,inputElement:Si,ref:ar,id:He,prefix:jn,showSearch:vr,autoClearSearchValue:On,mode:Ct,activeDescendantId:fn,tagRender:$t,values:Ht,open:Mr,onToggleOpen:ir,activeValue:Wn,searchValue:Jn,onSearch:yr,onSearchSubmit:Wr,onRemove:di,tokenWithEnter:Er,onInputBlur:li}))),Yi;return vn?Yi=hs:Yi=C.createElement("div",(0,v.Z)({className:Bs},Lr,{ref:fr,onMouseDown:zi,onKeyDown:Ei,onKeyUp:ri,onFocus:Pi,onBlur:Ui}),C.createElement(Ae,{visible:Fr&&!Mr,values:Ht}),hs,os,Ns&&Qs),C.createElement(A.Provider,{value:_s},Yi)}),Oe=nt,qe=function(){return null};qe.isSelectOptGroup=!0;var rt=qe,ot=function(){return null};ot.isSelectOption=!0;var Rt=ot,S=m(80547),R=m(2738),Ze=m(48911);function J(){return/(mac\sos|macintosh)/i.test(navigator.appVersion)}var be=["disabled","title","children","style","className"];function zt(ut){return typeof ut=="string"||typeof ut=="number"}var ze=function(ct,Se){var He=K(),it=He.prefixCls,Je=He.id,yt=He.open,$t=He.multiple,Jt=He.mode,nn=He.searchValue,Ht=He.toggleOpen,Qt=He.notFoundContent,pn=He.onPopupScroll,qt=C.useContext(Ie),Ye=qt.maxCount,vt=qt.flattenOptions,Ct=qt.onActiveValue,_t=qt.defaultActiveFirstOption,At=qt.onSelect,kt=qt.menuItemSelectedIcon,Wt=qt.rawValues,Kt=qt.fieldNames,on=qt.virtual,cn=qt.direction,Wn=qt.listHeight,bn=qt.listItemHeight,fn=qt.optionRender,In="".concat(it,"-item"),On=(0,S.Z)(function(){return vt},[yt,vt],function(wn,jt){return jt[0]&&wn[1]!==jt[1]}),Zn=C.useRef(null),An=C.useMemo(function(){return $t&&ce(Ye)&&(Wt==null?void 0:Wt.size)>=Ye},[$t,Ye,Wt==null?void 0:Wt.size]),Mn=function(jt){jt.preventDefault()},Nn=function(jt){var Vt;(Vt=Zn.current)===null||Vt===void 0||Vt.scrollTo(typeof jt=="number"?{index:jt}:jt)},jn=C.useCallback(function(wn){return Jt==="combobox"?!1:Wt.has(wn)},[Jt,(0,ae.Z)(Wt).toString(),Wt.size]),zn=function(jt){for(var Vt=arguments.length>1&&arguments[1]!==void 0?arguments[1]:1,un=On.length,Cn=0;Cn<un;Cn+=1){var Vn=(jt+Cn*Vt+un)%un,tr=On[Vn]||{},tn=tr.group,Yn=tr.data;if(!tn&&!(Yn!=null&&Yn.disabled)&&(jn(Yn.value)||!An))return Vn}return-1},Dn=C.useState(function(){return zn(0)}),Bn=(0,z.Z)(Dn,2),Sn=Bn[0],cr=Bn[1],Tt=function(jt){var Vt=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;cr(jt);var un={source:Vt?"keyboard":"mouse"},Cn=On[jt];if(!Cn){Ct(null,-1,un);return}Ct(Cn.value,jt,un)};(0,C.useEffect)(function(){Tt(_t!==!1?zn(0):-1)},[On.length,nn]);var Fn=C.useCallback(function(wn){return Jt==="combobox"?String(wn).toLowerCase()===nn.toLowerCase():Wt.has(wn)},[Jt,nn,(0,ae.Z)(Wt).toString(),Wt.size]);(0,C.useEffect)(function(){var wn=setTimeout(function(){if(!$t&&yt&&Wt.size===1){var Vt=Array.from(Wt)[0],un=On.findIndex(function(Cn){var Vn=Cn.data;return nn?String(Vn.value).startsWith(nn):Vn.value===Vt});un!==-1&&(Tt(un),Nn(un))}});if(yt){var jt;(jt=Zn.current)===null||jt===void 0||jt.scrollTo(void 0)}return function(){return clearTimeout(wn)}},[yt,nn]);var Kn=function(jt){jt!==void 0&&At(jt,{selected:!Wt.has(jt)}),$t||Ht(!1)};if(C.useImperativeHandle(Se,function(){return{onKeyDown:function(jt){var Vt=jt.which,un=jt.ctrlKey;switch(Vt){case oe.Z.N:case oe.Z.P:case oe.Z.UP:case oe.Z.DOWN:{var Cn=0;if(Vt===oe.Z.UP?Cn=-1:Vt===oe.Z.DOWN?Cn=1:J()&&un&&(Vt===oe.Z.N?Cn=1:Vt===oe.Z.P&&(Cn=-1)),Cn!==0){var Vn=zn(Sn+Cn,Cn);Nn(Vn),Tt(Vn,!0)}break}case oe.Z.TAB:case oe.Z.ENTER:{var tr,tn=On[Sn];tn&&!(tn!=null&&(tr=tn.data)!==null&&tr!==void 0&&tr.disabled)&&!An?Kn(tn.value):Kn(void 0),yt&&jt.preventDefault();break}case oe.Z.ESC:Ht(!1),yt&&jt.stopPropagation()}},onKeyUp:function(){},scrollTo:function(jt){Nn(jt)}}}),On.length===0)return C.createElement("div",{role:"listbox",id:"".concat(Je,"_list"),className:"".concat(In,"-empty"),onMouseDown:Mn},Qt);var Dr=Object.keys(Kt).map(function(wn){return Kt[wn]}),gr=function(jt){return jt.label};function Or(wn,jt){var Vt=wn.group;return{role:Vt?"presentation":"option",id:"".concat(Je,"_list_").concat(jt)}}var Cr=function(jt){var Vt=On[jt];if(!Vt)return null;var un=Vt.data||{},Cn=un.value,Vn=Vt.group,tr=(0,Ee.Z)(un,!0),tn=gr(Vt);return Vt?C.createElement("div",(0,v.Z)({"aria-label":typeof tn=="string"&&!Vn?tn:null},tr,{key:jt},Or(Vt,jt),{"aria-selected":Fn(Cn)}),Cn):null},_n={role:"listbox",id:"".concat(Je,"_list")};return C.createElement(C.Fragment,null,on&&C.createElement("div",(0,v.Z)({},_n,{style:{height:0,width:0,overflow:"hidden"}}),Cr(Sn-1),Cr(Sn),Cr(Sn+1)),C.createElement(Ze.Z,{itemKey:"key",ref:Zn,data:On,height:Wn,itemHeight:bn,fullHeight:!1,onMouseDown:Mn,onScroll:pn,virtual:on,direction:cn,innerProps:on?null:_n},function(wn,jt){var Vt=wn.group,un=wn.groupOption,Cn=wn.data,Vn=wn.label,tr=wn.value,tn=Cn.key;if(Vt){var Yn,vr=(Yn=Cn.title)!==null&&Yn!==void 0?Yn:zt(Vn)?Vn.toString():void 0;return C.createElement("div",{className:y()(In,"".concat(In,"-group"),Cn.className),title:vr},Vn!==void 0?Vn:tn)}var Lr=Cn.disabled,Br=Cn.title,jr=Cn.children,dr=Cn.style,Zr=Cn.className,fr=(0,g.Z)(Cn,be),Nr=(0,R.Z)(fr,Dr),sr=jn(tr),ar=Lr||!sr&&An,Ar="".concat(In,"-option"),Rr=y()(In,Ar,Zr,(0,W.Z)((0,W.Z)((0,W.Z)((0,W.Z)({},"".concat(Ar,"-grouped"),un),"".concat(Ar,"-active"),Sn===jt&&!ar),"".concat(Ar,"-disabled"),ar),"".concat(Ar,"-selected"),sr)),Qn=gr(wn),Kr=!kt||typeof kt=="function"||sr,Fr=typeof Qn=="number"?Qn:Qn||tr,Gr=zt(Fr)?Fr.toString():void 0;return Br!==void 0&&(Gr=Br),C.createElement("div",(0,v.Z)({},(0,Ee.Z)(Nr),on?{}:Or(wn,jt),{"aria-selected":Fn(tr),className:Rr,title:Gr,onMouseMove:function(){Sn===jt||ar||Tt(jt)},onClick:function(){ar||Kn(tr)},style:dr}),C.createElement("div",{className:"".concat(Ar,"-content")},typeof fn=="function"?fn(wn,{index:jt}):Fr),C.isValidElement(kt)||sr,Kr&&C.createElement(Z,{className:"".concat(In,"-option-state"),customizeIcon:kt,customizeIconProps:{value:tr,disabled:ar,isSelected:sr}},sr?"\u2713":null))}))},Qe=C.forwardRef(ze),lt=Qe,le=function(ut,ct){var Se=C.useRef({values:new Map,options:new Map}),He=C.useMemo(function(){var Je=Se.current,yt=Je.values,$t=Je.options,Jt=ut.map(function(Qt){if(Qt.label===void 0){var pn;return(0,fe.Z)((0,fe.Z)({},Qt),{},{label:(pn=yt.get(Qt.value))===null||pn===void 0?void 0:pn.label})}return Qt}),nn=new Map,Ht=new Map;return Jt.forEach(function(Qt){nn.set(Qt.value,Qt),Ht.set(Qt.value,ct.get(Qt.value)||$t.get(Qt.value))}),Se.current.values=nn,Se.current.options=Ht,Jt},[ut,ct]),it=C.useCallback(function(Je){return ct.get(Je)||Se.current.options.get(Je)},[ct]);return[He,it]};function pe(ut,ct){return Q(ut).join("").toUpperCase().includes(ct)}var Pe=function(ut,ct,Se,He,it){return C.useMemo(function(){if(!Se||He===!1)return ut;var Je=ct.options,yt=ct.label,$t=ct.value,Jt=[],nn=typeof He=="function",Ht=Se.toUpperCase(),Qt=nn?He:function(qt,Ye){return it?pe(Ye[it],Ht):Ye[Je]?pe(Ye[yt!=="children"?yt:"label"],Ht):pe(Ye[$t],Ht)},pn=nn?function(qt){return ye(qt)}:function(qt){return qt};return ut.forEach(function(qt){if(qt[Je]){var Ye=Qt(Se,pn(qt));if(Ye)Jt.push(qt);else{var vt=qt[Je].filter(function(Ct){return Qt(Se,pn(Ct))});vt.length&&Jt.push((0,fe.Z)((0,fe.Z)({},qt),{},(0,W.Z)({},Je,vt)))}return}Qt(Se,pn(qt))&&Jt.push(qt)}),Jt},[ut,He,it,Se,ct])},$e=m(6551),G=m(11592),bt=["children","value"],xe=["children"];function Bt(ut){var ct=ut,Se=ct.key,He=ct.props,it=He.children,Je=He.value,yt=(0,g.Z)(He,bt);return(0,fe.Z)({key:Se,value:Je!==void 0?Je:Se,children:it},yt)}function en(ut){var ct=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;return(0,G.Z)(ut).map(function(Se,He){if(!C.isValidElement(Se)||!Se.type)return null;var it=Se,Je=it.type.isSelectOptGroup,yt=it.key,$t=it.props,Jt=$t.children,nn=(0,g.Z)($t,xe);return ct||!Je?Bt(Se):(0,fe.Z)((0,fe.Z)({key:"__RC_SELECT_GRP__".concat(yt===null?He:yt,"__"),label:yt},nn),{},{options:en(Jt)})}).filter(function(Se){return Se})}var dn=function(ct,Se,He,it,Je){return C.useMemo(function(){var yt=ct,$t=!ct;$t&&(yt=en(Se));var Jt=new Map,nn=new Map,Ht=function(qt,Ye,vt){vt&&typeof vt=="string"&&qt.set(Ye[vt],Ye)},Qt=function pn(qt){for(var Ye=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,vt=0;vt<qt.length;vt+=1){var Ct=qt[vt];!Ct[He.options]||Ye?(Jt.set(Ct[He.value],Ct),Ht(nn,Ct,He.label),Ht(nn,Ct,it),Ht(nn,Ct,Je)):pn(Ct[He.options],!0)}};return Qt(yt),{options:yt,valueOptions:Jt,labelOptions:nn}},[ct,Se,He,it,Je])},Hn=dn;function wt(ut){var ct=C.useRef();ct.current=ut;var Se=C.useCallback(function(){return ct.current.apply(ct,arguments)},[]);return Se}function Gt(ut){var ct=ut.mode,Se=ut.options,He=ut.children,it=ut.backfill,Je=ut.allowClear,yt=ut.placeholder,$t=ut.getInputElement,Jt=ut.showSearch,nn=ut.onSearch,Ht=ut.defaultOpen,Qt=ut.autoFocus,pn=ut.labelInValue,qt=ut.value,Ye=ut.inputValue,vt=ut.optionLabelProp,Ct=isMultiple(ct),_t=Jt!==void 0?Jt:Ct||ct==="combobox",At=Se||convertChildrenToData(He);if(warning(ct!=="tags"||At.every(function(on){return!on.disabled}),"Please avoid setting option to disabled in tags mode since user can always type text as tag."),ct==="tags"||ct==="combobox"){var kt=At.some(function(on){return on.options?on.options.some(function(cn){return typeof("value"in cn?cn.value:cn.key)=="number"}):typeof("value"in on?on.value:on.key)=="number"});warning(!kt,"`value` of Option should not use number type when `mode` is `tags` or `combobox`.")}if(warning(ct!=="combobox"||!vt,"`combobox` mode not support `optionLabelProp`. Please set `value` on Option directly."),warning(ct==="combobox"||!it,"`backfill` only works with `combobox` mode."),warning(ct==="combobox"||!$t,"`getInputElement` only work with `combobox` mode."),noteOnce(ct!=="combobox"||!$t||!Je||!yt,"Customize `getInputElement` should customize clear and placeholder logic instead of configuring `allowClear` and `placeholder`."),nn&&!_t&&ct!=="combobox"&&ct!=="tags"&&warning(!1,"`onSearch` should work with `showSearch` instead of use alone."),noteOnce(!Ht||Qt,"`defaultOpen` makes Select open without focus which means it will not close by click outside. You can set `autoFocus` if needed."),qt!=null){var Wt=toArray(qt);warning(!pn||Wt.every(function(on){return _typeof(on)==="object"&&("key"in on||"value"in on)}),"`value` should in shape of `{ value: string | number, label?: ReactNode }` when you set `labelInValue` to `true`"),warning(!Ct||Array.isArray(qt),"`value` should be array when `mode` is `multiple` or `tags`")}if(He){var Kt=null;toNodeArray(He).some(function(on){if(!React.isValidElement(on)||!on.type)return!1;var cn=on,Wn=cn.type;if(Wn.isSelectOption)return!1;if(Wn.isSelectOptGroup){var bn=toNodeArray(on.props.children).every(function(fn){return!React.isValidElement(fn)||!on.type||fn.type.isSelectOption?!0:(Kt=fn.type,!1)});return!bn}return Kt=Wn,!0}),Kt&&warning(!1,"`children` should be `Select.Option` or `Select.OptGroup` instead of `".concat(Kt.displayName||Kt.name||Kt,"`.")),warning(Ye===void 0,"`inputValue` is deprecated, please use `searchValue` instead.")}}function mn(ut,ct){if(ut){var Se=function He(it){for(var Je=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,yt=0;yt<it.length;yt++){var $t=it[yt];if($t[ct==null?void 0:ct.value]===null)return warning(!1,"`value` in Select options should not be `null`."),!0;if(!Je&&Array.isArray($t[ct==null?void 0:ct.options])&&He($t[ct==null?void 0:ct.options],!0))break}};Se(ut)}}var yn=null,rn=["id","mode","prefixCls","backfill","fieldNames","inputValue","searchValue","onSearch","autoClearSearchValue","onSelect","onDeselect","dropdownMatchSelectWidth","filterOption","filterSort","optionFilterProp","optionLabelProp","options","optionRender","children","defaultActiveFirstOption","menuItemSelectedIcon","virtual","direction","listHeight","listItemHeight","labelRender","value","defaultValue","labelInValue","onChange","maxCount"],En=["inputValue"];function Zt(ut){return!ut||(0,q.Z)(ut)!=="object"}var Dt=C.forwardRef(function(ut,ct){var Se=ut.id,He=ut.mode,it=ut.prefixCls,Je=it===void 0?"rc-select":it,yt=ut.backfill,$t=ut.fieldNames,Jt=ut.inputValue,nn=ut.searchValue,Ht=ut.onSearch,Qt=ut.autoClearSearchValue,pn=Qt===void 0?!0:Qt,qt=ut.onSelect,Ye=ut.onDeselect,vt=ut.dropdownMatchSelectWidth,Ct=vt===void 0?!0:vt,_t=ut.filterOption,At=ut.filterSort,kt=ut.optionFilterProp,Wt=ut.optionLabelProp,Kt=ut.options,on=ut.optionRender,cn=ut.children,Wn=ut.defaultActiveFirstOption,bn=ut.menuItemSelectedIcon,fn=ut.virtual,In=ut.direction,On=ut.listHeight,Zn=On===void 0?200:On,An=ut.listItemHeight,Mn=An===void 0?20:An,Nn=ut.labelRender,jn=ut.value,zn=ut.defaultValue,Dn=ut.labelInValue,Bn=ut.onChange,Sn=ut.maxCount,cr=(0,g.Z)(ut,rn),Tt=(0,$e.ZP)(Se),Fn=ht(He),Kn=!!(!Kt&&cn),Dr=C.useMemo(function(){return _t===void 0&&He==="combobox"?!1:_t},[_t,He]),gr=C.useMemo(function(){return ve($t,Kn)},[JSON.stringify($t),Kn]),Or=(0,te.Z)("",{value:nn!==void 0?nn:Jt,postState:function(Er){return Er||""}}),Cr=(0,z.Z)(Or,2),_n=Cr[0],wn=Cr[1],jt=Hn(Kt,cn,gr,kt,Wt),Vt=jt.valueOptions,un=jt.labelOptions,Cn=jt.options,Vn=C.useCallback(function(ir){var Er=Q(ir);return Er.map(function(kn){var $n,lr,yr,Wr,Rn;if(Zt(kn))$n=kn;else{var Un;yr=kn.key,lr=kn.label,$n=(Un=kn.value)!==null&&Un!==void 0?Un:yr}var rr=Vt.get($n);if(rr){var or;if(lr===void 0&&(lr=rr==null?void 0:rr[Wt||gr.label]),yr===void 0&&(yr=(or=rr==null?void 0:rr.key)!==null&&or!==void 0?or:$n),Wr=rr==null?void 0:rr.disabled,Rn=rr==null?void 0:rr.title,0)var Sr}return{label:lr,value:$n,key:yr,disabled:Wr,title:Rn}})},[gr,Wt,Vt]),tr=(0,te.Z)(zn,{value:jn}),tn=(0,z.Z)(tr,2),Yn=tn[0],vr=tn[1],Lr=C.useMemo(function(){var ir,Er=Fn&&Yn===null?[]:Yn,kn=Vn(Er);return He==="combobox"&&H((ir=kn[0])===null||ir===void 0?void 0:ir.value)?[]:kn},[Yn,Vn,He,Fn]),Br=le(Lr,Vt),jr=(0,z.Z)(Br,2),dr=jr[0],Zr=jr[1],fr=C.useMemo(function(){if(!He&&dr.length===1){var ir=dr[0];if(ir.value===null&&(ir.label===null||ir.label===void 0))return[]}return dr.map(function(Er){var kn;return(0,fe.Z)((0,fe.Z)({},Er),{},{label:(kn=typeof Nn=="function"?Nn(Er):Er.label)!==null&&kn!==void 0?kn:Er.value})})},[He,dr,Nn]),Nr=C.useMemo(function(){return new Set(dr.map(function(ir){return ir.value}))},[dr]);C.useEffect(function(){if(He==="combobox"){var ir,Er=(ir=dr[0])===null||ir===void 0?void 0:ir.value;wn(w(Er)?String(Er):"")}},[dr]);var sr=wt(function(ir,Er){var kn=Er!=null?Er:ir;return(0,W.Z)((0,W.Z)({},gr.value,ir),gr.label,kn)}),ar=C.useMemo(function(){if(He!=="tags")return Cn;var ir=(0,ae.Z)(Cn),Er=function($n){return Vt.has($n)};return(0,ae.Z)(dr).sort(function(kn,$n){return kn.value<$n.value?-1:1}).forEach(function(kn){var $n=kn.value;Er($n)||ir.push(sr($n,kn.label))}),ir},[sr,Cn,Vt,dr,He]),Ar=Pe(ar,gr,_n,Dr,kt),Rr=C.useMemo(function(){return He!=="tags"||!_n||Ar.some(function(ir){return ir[kt||"value"]===_n})||Ar.some(function(ir){return ir[gr.value]===_n})?Ar:[sr(_n)].concat((0,ae.Z)(Ar))},[sr,kt,He,Ar,_n,gr]),Qn=function ir(Er){var kn=(0,ae.Z)(Er).sort(function($n,lr){return At($n,lr,{searchValue:_n})});return kn.map(function($n){return Array.isArray($n.options)?(0,fe.Z)((0,fe.Z)({},$n),{},{options:$n.options.length>0?ir($n.options):$n.options}):$n})},Kr=C.useMemo(function(){return At?Qn(Rr):Rr},[Rr,At,_n]),Fr=C.useMemo(function(){return de(Kr,{fieldNames:gr,childrenAsData:Kn})},[Kr,gr,Kn]),Gr=function(Er){var kn=Vn(Er);if(vr(kn),Bn&&(kn.length!==dr.length||kn.some(function(yr,Wr){var Rn;return((Rn=dr[Wr])===null||Rn===void 0?void 0:Rn.value)!==(yr==null?void 0:yr.value)}))){var $n=Dn?kn:kn.map(function(yr){return yr.value}),lr=kn.map(function(yr){return ye(Zr(yr.value))});Bn(Fn?$n:$n[0],Fn?lr:lr[0])}},Ur=C.useState(null),Jn=(0,z.Z)(Ur,2),Si=Jn[0],vn=Jn[1],ni=C.useState(0),yi=(0,z.Z)(ni,2),_i=yi[0],oi=yi[1],pi=Wn!==void 0?Wn:He!=="combobox",hr=C.useCallback(function(ir,Er){var kn=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},$n=kn.source,lr=$n===void 0?"keyboard":$n;oi(Er),yt&&He==="combobox"&&ir!==null&&lr==="keyboard"&&vn(String(ir))},[yt,He]),Xr=function(Er,kn,$n){var lr=function(){var di,li=Zr(Er);return[Dn?{label:li==null?void 0:li[gr.label],value:Er,key:(di=li==null?void 0:li.key)!==null&&di!==void 0?di:Er}:Er,ye(li)]};if(kn&&qt){var yr=lr(),Wr=(0,z.Z)(yr,2),Rn=Wr[0],Un=Wr[1];qt(Rn,Un)}else if(!kn&&Ye&&$n!=="clear"){var rr=lr(),or=(0,z.Z)(rr,2),Sr=or[0],Ei=or[1];Ye(Sr,Ei)}},gi=wt(function(ir,Er){var kn,$n=Fn?Er.selected:!0;$n?kn=Fn?[].concat((0,ae.Z)(dr),[ir]):[ir]:kn=dr.filter(function(lr){return lr.value!==ir}),Gr(kn),Xr(ir,$n),He==="combobox"?vn(""):(!ht||pn)&&(wn(""),vn(""))}),xi=function(Er,kn){Gr(Er);var $n=kn.type,lr=kn.values;($n==="remove"||$n==="clear")&&lr.forEach(function(yr){Xr(yr.value,!1,$n)})},Mr=function(Er,kn){if(wn(Er),vn(null),kn.source==="submit"){var $n=(Er||"").trim();if($n){var lr=Array.from(new Set([].concat((0,ae.Z)(Nr),[$n])));Gr(lr),Xr($n,!0),wn("")}return}kn.source!=="blur"&&(He==="combobox"&&Gr(Er),Ht==null||Ht(Er))},Qr=function(Er){var kn=Er;He!=="tags"&&(kn=Er.map(function(lr){var yr=un.get(lr);return yr==null?void 0:yr.value}).filter(function(lr){return lr!==void 0}));var $n=Array.from(new Set([].concat((0,ae.Z)(Nr),(0,ae.Z)(kn))));Gr($n),$n.forEach(function(lr){Xr(lr,!0)})},ii=C.useMemo(function(){var ir=fn!==!1&&Ct!==!1;return(0,fe.Z)((0,fe.Z)({},jt),{},{flattenOptions:Fr,onActiveValue:hr,defaultActiveFirstOption:pi,onSelect:gi,menuItemSelectedIcon:bn,rawValues:Nr,fieldNames:gr,virtual:ir,direction:In,listHeight:Zn,listItemHeight:Mn,childrenAsData:Kn,maxCount:Sn,optionRender:on})},[Sn,jt,Fr,hr,pi,gi,bn,Nr,gr,fn,Ct,In,Zn,Mn,Kn,on]);return C.createElement(Ie.Provider,{value:ii},C.createElement(Oe,(0,v.Z)({},cr,{id:Tt,prefixCls:Je,ref:ct,omitDomProps:En,mode:He,displayValues:fr,onDisplayValuesChange:xi,direction:In,searchValue:_n,onSearch:Mr,autoClearSearchValue:pn,onSearchSplit:Qr,dropdownMatchSelectWidth:Ct,OptionList:lt,emptyOptions:!Fr.length,activeValue:Si,activeDescendantId:"".concat(Tt,"_list_").concat(_i)})))}),Mt=Dt;Mt.Option=Rt,Mt.OptGroup=rt;var gn=Mt,Ln=gn},22711:function(ln,mt,m){"use strict";m.r(mt),m.d(mt,{ResizableTextArea:function(){return tt},default:function(){return se}});var v=m(60499),ae=m(18642),W=m(85899),fe=m(77654),z=m(72190),g=m(42244),q=m(92310),te=m.n(q),o=m(36901),C=m(66003),M=m(30292),y=m(18929),E=m(59301),T=m(43749),k=m(29301),j=m(34280),Z=m(16089),U=`
|
|
|
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;
|
|
|
`,A=["letter-spacing","line-height","padding-top","padding-bottom","font-family","font-weight","font-size","font-variant","text-rendering","text-transform","width","text-indent","padding-left","padding-right","border-width","box-sizing","word-break","white-space"],K={},D;function O(Q){var V=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,x=Q.getAttribute("id")||Q.getAttribute("data-reactid")||Q.getAttribute("name");if(V&&K[x])return K[x];var w=window.getComputedStyle(Q),H=w.getPropertyValue("box-sizing")||w.getPropertyValue("-moz-box-sizing")||w.getPropertyValue("-webkit-box-sizing"),he=parseFloat(w.getPropertyValue("padding-bottom"))+parseFloat(w.getPropertyValue("padding-top")),Ke=parseFloat(w.getPropertyValue("border-bottom-width"))+parseFloat(w.getPropertyValue("border-top-width")),ft=A.map(function(st){return"".concat(st,":").concat(w.getPropertyValue(st))}).join(";"),Ue={sizingStyle:ft,paddingSize:he,borderSize:Ke,boxSizing:H};return V&&x&&(K[x]=Ue),Ue}function re(Q){var V=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,x=arguments.length>2&&arguments[2]!==void 0?arguments[2]:null,w=arguments.length>3&&arguments[3]!==void 0?arguments[3]:null;D||(D=document.createElement("textarea"),D.setAttribute("tab-index","-1"),D.setAttribute("aria-hidden","true"),D.setAttribute("name","hiddenTextarea"),document.body.appendChild(D)),Q.getAttribute("wrap")?D.setAttribute("wrap",Q.getAttribute("wrap")):D.removeAttribute("wrap");var H=O(Q,V),he=H.paddingSize,Ke=H.borderSize,ft=H.boxSizing,Ue=H.sizingStyle;D.setAttribute("style","".concat(Ue,";").concat(U)),D.value=Q.value||Q.placeholder||"";var st=void 0,pt=void 0,Et,Ne=D.scrollHeight;if(ft==="border-box"?Ne+=Ke:ft==="content-box"&&(Ne-=he),x!==null||w!==null){D.value=" ";var St=D.scrollHeight-he;x!==null&&(st=St*x,ft==="border-box"&&(st=st+he+Ke),Ne=Math.max(st,Ne)),w!==null&&(pt=St*w,ft==="border-box"&&(pt=pt+he+Ke),Et=Ne>pt?"":"hidden",Ne=Math.min(pt,Ne))}var at={height:Ne,overflowY:Et,resize:"none"};return st&&(at.minHeight=st),pt&&(at.maxHeight=pt),at}var oe=["prefixCls","defaultValue","value","autoSize","onResize","className","style","disabled","onChange","onInternalAutoSize"],ie=0,Ee=1,Me=2,ke=E.forwardRef(function(Q,V){var x=Q,w=x.prefixCls,H=x.defaultValue,he=x.value,Ke=x.autoSize,ft=x.onResize,Ue=x.className,st=x.style,pt=x.disabled,Et=x.onChange,Ne=x.onInternalAutoSize,St=(0,g.Z)(x,oe),at=(0,y.Z)(H,{value:he,postState:function(Rt){return Rt!=null?Rt:""}}),Nt=(0,z.Z)(at,2),Ge=Nt[0],je=Nt[1],Re=function(Rt){je(Rt.target.value),Et==null||Et(Rt)},_e=E.useRef();E.useImperativeHandle(V,function(){return{textArea:_e.current}});var Y=E.useMemo(function(){return Ke&&(0,T.Z)(Ke)==="object"?[Ke.minRows,Ke.maxRows]:[]},[Ke]),Le=(0,z.Z)(Y,2),Ce=Le[0],B=Le[1],P=!!Ke,ce=function(){try{if(document.activeElement===_e.current){var Rt=_e.current,S=Rt.selectionStart,R=Rt.selectionEnd,Ze=Rt.scrollTop;_e.current.setSelectionRange(S,R),_e.current.scrollTop=Ze}}catch(J){}},ve=E.useState(Me),de=(0,z.Z)(ve,2),ye=de[0],Te=de[1],we=E.useState(),Ie=(0,z.Z)(we,2),Ae=Ie[0],Xe=Ie[1],gt=function(){Te(ie)};(0,j.Z)(function(){P&>()},[he,Ce,B,P]),(0,j.Z)(function(){if(ye===ie)Te(Ee);else if(ye===Ee){var ot=re(_e.current,!1,Ce,B);Te(Me),Xe(ot)}else ce()},[ye]);var ht=E.useRef(),nt=function(){Z.Z.cancel(ht.current)},Oe=function(Rt){ye===Me&&(ft==null||ft(Rt),Ke&&(nt(),ht.current=(0,Z.Z)(function(){gt()})))};E.useEffect(function(){return nt},[]);var qe=P?Ae:null,rt=(0,W.Z)((0,W.Z)({},st),qe);return(ye===ie||ye===Ee)&&(rt.overflowY="hidden",rt.overflowX="hidden"),E.createElement(k.Z,{onResize:Oe,disabled:!(Ke||ft)},E.createElement("textarea",(0,v.Z)({},St,{ref:_e,style:rt,className:te()(w,Ue,(0,ae.Z)({},"".concat(w,"-disabled"),pt)),disabled:pt,value:Ge,onChange:Re})))}),tt=ke,ue=["defaultValue","value","onFocus","onBlur","onChange","allowClear","maxLength","onCompositionStart","onCompositionEnd","suffix","prefixCls","showCount","count","className","style","disabled","hidden","classNames","styles","onResize","onClear","onPressEnter","readOnly","autoSize","onKeyDown"],X=E.forwardRef(function(Q,V){var x,w=Q.defaultValue,H=Q.value,he=Q.onFocus,Ke=Q.onBlur,ft=Q.onChange,Ue=Q.allowClear,st=Q.maxLength,pt=Q.onCompositionStart,Et=Q.onCompositionEnd,Ne=Q.suffix,St=Q.prefixCls,at=St===void 0?"rc-textarea":St,Nt=Q.showCount,Ge=Q.count,je=Q.className,Re=Q.style,_e=Q.disabled,Y=Q.hidden,Le=Q.classNames,Ce=Q.styles,B=Q.onResize,P=Q.onClear,ce=Q.onPressEnter,ve=Q.readOnly,de=Q.autoSize,ye=Q.onKeyDown,Te=(0,g.Z)(Q,ue),we=(0,y.Z)(w,{value:H,defaultValue:w}),Ie=(0,z.Z)(we,2),Ae=Ie[0],Xe=Ie[1],gt=Ae==null?"":String(Ae),ht=E.useState(!1),nt=(0,z.Z)(ht,2),Oe=nt[0],qe=nt[1],rt=E.useRef(!1),ot=E.useState(null),Rt=(0,z.Z)(ot,2),S=Rt[0],R=Rt[1],Ze=(0,E.useRef)(null),J=(0,E.useRef)(null),be=function(){var Mt;return(Mt=J.current)===null||Mt===void 0?void 0:Mt.textArea},zt=function(){be().focus()};(0,E.useImperativeHandle)(V,function(){var Dt;return{resizableTextArea:J.current,focus:zt,blur:function(){be().blur()},nativeElement:((Dt=Ze.current)===null||Dt===void 0?void 0:Dt.nativeElement)||be()}}),(0,E.useEffect)(function(){qe(function(Dt){return!_e&&Dt})},[_e]);var ze=E.useState(null),Qe=(0,z.Z)(ze,2),lt=Qe[0],le=Qe[1];E.useEffect(function(){if(lt){var Dt;(Dt=be()).setSelectionRange.apply(Dt,(0,fe.Z)(lt))}},[lt]);var pe=(0,C.Z)(Ge,Nt),Pe=(x=pe.max)!==null&&x!==void 0?x:st,$e=Number(Pe)>0,G=pe.strategy(gt),bt=!!Pe&&G>Pe,xe=function(Mt,gn){var Ln=gn;!rt.current&&pe.exceedFormatter&&pe.max&&pe.strategy(gn)>pe.max&&(Ln=pe.exceedFormatter(gn,{max:pe.max}),gn!==Ln&&le([be().selectionStart||0,be().selectionEnd||0])),Xe(Ln),(0,M.rJ)(Mt.currentTarget,Mt,ft,Ln)},Bt=function(Mt){rt.current=!0,pt==null||pt(Mt)},en=function(Mt){rt.current=!1,xe(Mt,Mt.currentTarget.value),Et==null||Et(Mt)},dn=function(Mt){xe(Mt,Mt.target.value)},Hn=function(Mt){Mt.key==="Enter"&&ce&&ce(Mt),ye==null||ye(Mt)},wt=function(Mt){qe(!0),he==null||he(Mt)},Gt=function(Mt){qe(!1),Ke==null||Ke(Mt)},mn=function(Mt){Xe(""),zt(),(0,M.rJ)(be(),Mt,ft)},yn=Ne,rn;pe.show&&(pe.showFormatter?rn=pe.showFormatter({value:gt,count:G,maxLength:Pe}):rn="".concat(G).concat($e?" / ".concat(Pe):""),yn=E.createElement(E.Fragment,null,yn,E.createElement("span",{className:te()("".concat(at,"-data-count"),Le==null?void 0:Le.count),style:Ce==null?void 0:Ce.count},rn)));var En=function(Mt){var gn;B==null||B(Mt),(gn=be())!==null&&gn!==void 0&&gn.style.height&&R(!0)},Zt=!de&&!Nt&&!Ue;return E.createElement(o.BaseInput,{ref:Ze,value:gt,allowClear:Ue,handleReset:mn,suffix:yn,prefixCls:at,classNames:(0,W.Z)((0,W.Z)({},Le),{},{affixWrapper:te()(Le==null?void 0:Le.affixWrapper,(0,ae.Z)((0,ae.Z)({},"".concat(at,"-show-count"),Nt),"".concat(at,"-textarea-allow-clear"),Ue))}),disabled:_e,focused:Oe,className:te()(je,bt&&"".concat(at,"-out-of-range")),style:(0,W.Z)((0,W.Z)({},Re),S&&!Zt?{height:"auto"}:{}),dataAttrs:{affixWrapper:{"data-count":typeof rn=="string"?rn:void 0}},hidden:Y,readOnly:ve,onClear:P},E.createElement(tt,(0,v.Z)({},Te,{autoSize:de,maxLength:st,onKeyDown:Hn,onChange:dn,onFocus:wt,onBlur:Gt,onCompositionStart:Bt,onCompositionEnd:en,className:te()(Le==null?void 0:Le.textarea),style:(0,W.Z)((0,W.Z)({},Ce==null?void 0:Ce.textarea),{},{resize:Re==null?void 0:Re.resize}),disabled:_e,prefixCls:at,onResize:En,ref:J,readOnly:ve})))}),L=X,se=L},29125:function(ln,mt,m){"use strict";m.d(mt,{G:function(){return fe},Z:function(){return U}});var v=m(92310),ae=m.n(v),W=m(59301);function fe(A){var K=A.children,D=A.prefixCls,O=A.id,re=A.overlayInnerStyle,oe=A.bodyClassName,ie=A.className,Ee=A.style;return W.createElement("div",{className:ae()("".concat(D,"-content"),ie),style:Ee},W.createElement("div",{className:ae()("".concat(D,"-inner"),oe),id:O,role:"tooltip",style:re},typeof K=="function"?K():K))}var z=m(60499),g=m(85899),q=m(42244),te=m(68196),o={shiftX:64,adjustY:1},C={adjustX:1,shiftY:!0},M=[0,0],y={left:{points:["cr","cl"],overflow:C,offset:[-4,0],targetOffset:M},right:{points:["cl","cr"],overflow:C,offset:[4,0],targetOffset:M},top:{points:["bc","tc"],overflow:o,offset:[0,-4],targetOffset:M},bottom:{points:["tc","bc"],overflow:o,offset:[0,4],targetOffset:M},topLeft:{points:["bl","tl"],overflow:o,offset:[0,-4],targetOffset:M},leftTop:{points:["tr","tl"],overflow:C,offset:[-4,0],targetOffset:M},topRight:{points:["br","tr"],overflow:o,offset:[0,-4],targetOffset:M},rightTop:{points:["tl","tr"],overflow:C,offset:[4,0],targetOffset:M},bottomRight:{points:["tr","br"],overflow:o,offset:[0,4],targetOffset:M},rightBottom:{points:["bl","br"],overflow:C,offset:[4,0],targetOffset:M},bottomLeft:{points:["tl","bl"],overflow:o,offset:[0,4],targetOffset:M},leftBottom:{points:["br","bl"],overflow:C,offset:[-4,0],targetOffset:M}},E=null,T=m(80402),k=["overlayClassName","trigger","mouseEnterDelay","mouseLeaveDelay","overlayStyle","prefixCls","children","onVisibleChange","afterVisibleChange","transitionName","animation","motion","placement","align","destroyTooltipOnHide","defaultVisible","getTooltipContainer","overlayInnerStyle","arrowContent","overlay","id","showArrow","classNames","styles"],j=function(K,D){var O=K.overlayClassName,re=K.trigger,oe=re===void 0?["hover"]:re,ie=K.mouseEnterDelay,Ee=ie===void 0?0:ie,Me=K.mouseLeaveDelay,ke=Me===void 0?.1:Me,tt=K.overlayStyle,ue=K.prefixCls,X=ue===void 0?"rc-tooltip":ue,L=K.children,se=K.onVisibleChange,Q=K.afterVisibleChange,V=K.transitionName,x=K.animation,w=K.motion,H=K.placement,he=H===void 0?"right":H,Ke=K.align,ft=Ke===void 0?{}:Ke,Ue=K.destroyTooltipOnHide,st=Ue===void 0?!1:Ue,pt=K.defaultVisible,Et=K.getTooltipContainer,Ne=K.overlayInnerStyle,St=K.arrowContent,at=K.overlay,Nt=K.id,Ge=K.showArrow,je=Ge===void 0?!0:Ge,Re=K.classNames,_e=K.styles,Y=(0,q.Z)(K,k),Le=(0,T.Z)(Nt),Ce=(0,W.useRef)(null);(0,W.useImperativeHandle)(D,function(){return Ce.current});var B=(0,g.Z)({},Y);"visible"in K&&(B.popupVisible=K.visible);var P=function(){return W.createElement(fe,{key:"content",prefixCls:X,id:Le,bodyClassName:Re==null?void 0:Re.body,overlayInnerStyle:(0,g.Z)((0,g.Z)({},Ne),_e==null?void 0:_e.body)},at)},ce=function(){var de=W.Children.only(L),ye=(de==null?void 0:de.props)||{},Te=(0,g.Z)((0,g.Z)({},ye),{},{"aria-describedby":at?Le:null});return W.cloneElement(L,Te)};return W.createElement(te.Z,(0,z.Z)({popupClassName:ae()(O,Re==null?void 0:Re.root),prefixCls:X,popup:P,action:oe,builtinPlacements:y,popupPlacement:he,ref:Ce,popupAlign:ft,getPopupContainer:Et,onPopupVisibleChange:se,afterPopupVisibleChange:Q,popupTransitionName:V,popupAnimation:x,popupMotion:w,defaultPopupVisible:pt,autoDestroy:st,mouseLeaveDelay:ke,popupStyle:(0,g.Z)((0,g.Z)({},tt),_e==null?void 0:_e.root),mouseEnterDelay:Ee,arrow:je},B),ce())},Z=(0,W.forwardRef)(j),U=Z},639:function(ln,mt,m){"use strict";m.d(mt,{Z:function(){return K}});var v=m(60499),ae=m(18642),W=m(85899),fe=m(72190),z=m(42244),g=m(59301),q=m(92310),te=m.n(q),o=m(26112),C=m(30699),M=function(O){for(var re=O.prefixCls,oe=O.level,ie=O.isStart,Ee=O.isEnd,Me="".concat(re,"-indent-unit"),ke=[],tt=0;tt<oe;tt+=1)ke.push(g.createElement("span",{key:tt,className:te()(Me,(0,ae.Z)((0,ae.Z)({},"".concat(Me,"-start"),ie[tt]),"".concat(Me,"-end"),Ee[tt]))}));return g.createElement("span",{"aria-hidden":"true",className:"".concat(re,"-indent")},ke)},y=g.memo(M),E=m(65065),T=m(34061),k=["eventKey","className","style","dragOver","dragOverGapTop","dragOverGapBottom","isLeaf","isStart","isEnd","expanded","selected","checked","halfChecked","loading","domRef","active","data","onMouseMove","selectable"],j="open",Z="close",U="---",A=function(O){var re,oe,ie,Ee=O.eventKey,Me=O.className,ke=O.style,tt=O.dragOver,ue=O.dragOverGapTop,X=O.dragOverGapBottom,L=O.isLeaf,se=O.isStart,Q=O.isEnd,V=O.expanded,x=O.selected,w=O.checked,H=O.halfChecked,he=O.loading,Ke=O.domRef,ft=O.active,Ue=O.data,st=O.onMouseMove,pt=O.selectable,Et=(0,z.Z)(O,k),Ne=g.useContext(C.k),St=g.useContext(C.y),at=g.useRef(null),Nt=g.useState(!1),Ge=(0,fe.Z)(Nt,2),je=Ge[0],Re=Ge[1],_e=!!(Ne.disabled||O.disabled||(re=St.nodeDisabled)!==null&&re!==void 0&&re.call(St,Ue)),Y=g.useMemo(function(){return!Ne.checkable||O.checkable===!1?!1:Ne.checkable},[Ne.checkable,O.checkable]),Le=function(G){_e||Ne.onNodeSelect(G,(0,T.F)(O))},Ce=function(G){_e||!Y||O.disableCheckbox||Ne.onNodeCheck(G,(0,T.F)(O),!w)},B=g.useMemo(function(){return typeof pt=="boolean"?pt:Ne.selectable},[pt,Ne.selectable]),P=function(G){Ne.onNodeClick(G,(0,T.F)(O)),B?Le(G):Ce(G)},ce=function(G){Ne.onNodeDoubleClick(G,(0,T.F)(O))},ve=function(G){Ne.onNodeMouseEnter(G,(0,T.F)(O))},de=function(G){Ne.onNodeMouseLeave(G,(0,T.F)(O))},ye=function(G){Ne.onNodeContextMenu(G,(0,T.F)(O))},Te=g.useMemo(function(){return!!(Ne.draggable&&(!Ne.draggable.nodeDraggable||Ne.draggable.nodeDraggable(Ue)))},[Ne.draggable,Ue]),we=function(G){G.stopPropagation(),Re(!0),Ne.onNodeDragStart(G,O);try{G.dataTransfer.setData("text/plain","")}catch(bt){}},Ie=function(G){G.preventDefault(),G.stopPropagation(),Ne.onNodeDragEnter(G,O)},Ae=function(G){G.preventDefault(),G.stopPropagation(),Ne.onNodeDragOver(G,O)},Xe=function(G){G.stopPropagation(),Ne.onNodeDragLeave(G,O)},gt=function(G){G.stopPropagation(),Re(!1),Ne.onNodeDragEnd(G,O)},ht=function(G){G.preventDefault(),G.stopPropagation(),Re(!1),Ne.onNodeDrop(G,O)},nt=function(G){he||Ne.onNodeExpand(G,(0,T.F)(O))},Oe=g.useMemo(function(){var $e=(0,E.Z)(Ne.keyEntities,Ee)||{},G=$e.children;return!!(G||[]).length},[Ne.keyEntities,Ee]),qe=g.useMemo(function(){return L===!1?!1:L||!Ne.loadData&&!Oe||Ne.loadData&&O.loaded&&!Oe},[L,Ne.loadData,Oe,O.loaded]);g.useEffect(function(){he||typeof Ne.loadData=="function"&&V&&!qe&&!O.loaded&&Ne.onNodeLoad((0,T.F)(O))},[he,Ne.loadData,Ne.onNodeLoad,V,qe,O]);var rt=g.useMemo(function(){var $e;return($e=Ne.draggable)!==null&&$e!==void 0&&$e.icon?g.createElement("span",{className:"".concat(Ne.prefixCls,"-draggable-icon")},Ne.draggable.icon):null},[Ne.draggable]),ot=function(G){var bt=O.switcherIcon||Ne.switcherIcon;return typeof bt=="function"?bt((0,W.Z)((0,W.Z)({},O),{},{isLeaf:G})):bt},Rt=function(){if(qe){var G=ot(!0);return G!==!1?g.createElement("span",{className:te()("".concat(Ne.prefixCls,"-switcher"),"".concat(Ne.prefixCls,"-switcher-noop"))},G):null}var bt=ot(!1);return bt!==!1?g.createElement("span",{onClick:nt,className:te()("".concat(Ne.prefixCls,"-switcher"),"".concat(Ne.prefixCls,"-switcher_").concat(V?j:Z))},bt):null},S=g.useMemo(function(){if(!Y)return null;var $e=typeof Y!="boolean"?Y:null;return g.createElement("span",{className:te()("".concat(Ne.prefixCls,"-checkbox"),(0,ae.Z)((0,ae.Z)((0,ae.Z)({},"".concat(Ne.prefixCls,"-checkbox-checked"),w),"".concat(Ne.prefixCls,"-checkbox-indeterminate"),!w&&H),"".concat(Ne.prefixCls,"-checkbox-disabled"),_e||O.disableCheckbox)),onClick:Ce,role:"checkbox","aria-checked":H?"mixed":w,"aria-disabled":_e||O.disableCheckbox,"aria-label":"Select ".concat(typeof O.title=="string"?O.title:"tree node")},$e)},[Y,w,H,_e,O.disableCheckbox,O.title]),R=g.useMemo(function(){return qe?null:V?j:Z},[qe,V]),Ze=g.useMemo(function(){return g.createElement("span",{className:te()("".concat(Ne.prefixCls,"-iconEle"),"".concat(Ne.prefixCls,"-icon__").concat(R||"docu"),(0,ae.Z)({},"".concat(Ne.prefixCls,"-icon_loading"),he))})},[Ne.prefixCls,R,he]),J=g.useMemo(function(){var $e=!!Ne.draggable,G=!O.disabled&&$e&&Ne.dragOverNodeKey===Ee;return G?Ne.dropIndicatorRender({dropPosition:Ne.dropPosition,dropLevelOffset:Ne.dropLevelOffset,indent:Ne.indent,prefixCls:Ne.prefixCls,direction:Ne.direction}):null},[Ne.dropPosition,Ne.dropLevelOffset,Ne.indent,Ne.prefixCls,Ne.direction,Ne.draggable,Ne.dragOverNodeKey,Ne.dropIndicatorRender]),be=g.useMemo(function(){var $e=O.title,G=$e===void 0?U:$e,bt="".concat(Ne.prefixCls,"-node-content-wrapper"),xe;if(Ne.showIcon){var Bt=O.icon||Ne.icon;xe=Bt?g.createElement("span",{className:te()("".concat(Ne.prefixCls,"-iconEle"),"".concat(Ne.prefixCls,"-icon__customize"))},typeof Bt=="function"?Bt(O):Bt):Ze}else Ne.loadData&&he&&(xe=Ze);var en;return typeof G=="function"?en=G(Ue):Ne.titleRender?en=Ne.titleRender(Ue):en=G,g.createElement("span",{ref:at,title:typeof G=="string"?G:"",className:te()(bt,"".concat(bt,"-").concat(R||"normal"),(0,ae.Z)({},"".concat(Ne.prefixCls,"-node-selected"),!_e&&(x||je))),onMouseEnter:ve,onMouseLeave:de,onContextMenu:ye,onClick:P,onDoubleClick:ce},xe,g.createElement("span",{className:"".concat(Ne.prefixCls,"-title")},en),J)},[Ne.prefixCls,Ne.showIcon,O,Ne.icon,Ze,Ne.titleRender,Ue,R,ve,de,ye,P,ce]),zt=(0,o.Z)(Et,{aria:!0,data:!0}),ze=(0,E.Z)(Ne.keyEntities,Ee)||{},Qe=ze.level,lt=Q[Q.length-1],le=!_e&&Te,pe=Ne.draggingNodeKey===Ee,Pe=pt!==void 0?{"aria-selected":!!pt}:void 0;return g.createElement("div",(0,v.Z)({ref:Ke,role:"treeitem","aria-expanded":L?void 0:V,className:te()(Me,"".concat(Ne.prefixCls,"-treenode"),(ie={},(0,ae.Z)((0,ae.Z)((0,ae.Z)((0,ae.Z)((0,ae.Z)((0,ae.Z)((0,ae.Z)((0,ae.Z)((0,ae.Z)((0,ae.Z)(ie,"".concat(Ne.prefixCls,"-treenode-disabled"),_e),"".concat(Ne.prefixCls,"-treenode-switcher-").concat(V?"open":"close"),!L),"".concat(Ne.prefixCls,"-treenode-checkbox-checked"),w),"".concat(Ne.prefixCls,"-treenode-checkbox-indeterminate"),H),"".concat(Ne.prefixCls,"-treenode-selected"),x),"".concat(Ne.prefixCls,"-treenode-loading"),he),"".concat(Ne.prefixCls,"-treenode-active"),ft),"".concat(Ne.prefixCls,"-treenode-leaf-last"),lt),"".concat(Ne.prefixCls,"-treenode-draggable"),Te),"dragging",pe),(0,ae.Z)((0,ae.Z)((0,ae.Z)((0,ae.Z)((0,ae.Z)((0,ae.Z)((0,ae.Z)(ie,"drop-target",Ne.dropTargetKey===Ee),"drop-container",Ne.dropContainerKey===Ee),"drag-over",!_e&&tt),"drag-over-gap-top",!_e&&ue),"drag-over-gap-bottom",!_e&&X),"filter-node",(oe=Ne.filterTreeNode)===null||oe===void 0?void 0:oe.call(Ne,(0,T.F)(O))),"".concat(Ne.prefixCls,"-treenode-leaf"),qe))),style:ke,draggable:le,onDragStart:le?we:void 0,onDragEnter:Te?Ie:void 0,onDragOver:Te?Ae:void 0,onDragLeave:Te?Xe:void 0,onDrop:Te?ht:void 0,onDragEnd:Te?gt:void 0,onMouseMove:st},Pe,zt),g.createElement(y,{prefixCls:Ne.prefixCls,level:Qe,isStart:se,isEnd:Q}),rt,Rt(),S,be)};A.isTreeNode=1;var K=A},30699:function(ln,mt,m){"use strict";m.d(mt,{k:function(){return ae},y:function(){return W}});var v=m(59301),ae=v.createContext(null),W=v.createContext({})},87632:function(ln,mt,m){"use strict";m.d(mt,{OF:function(){return Ee.Z},y6:function(){return Z.y},ZP:function(){return _e}});var v=m(60499),ae=m(43749),W=m(85899),fe=m(77654),z=m(38705),g=m(17212),q=m(15793),te=m(39153),o=m(55401),C=m(18642),M=m(92310),y=m.n(M),E=m(10228),T=m(26112),k=m(48736),j=m(59301),Z=m(30699),U=function(Le){var Ce=Le.dropPosition,B=Le.dropLevelOffset,P=Le.indent,ce={pointerEvents:"none",position:"absolute",right:0,backgroundColor:"red",height:2};switch(Ce){case-1:ce.top=0,ce.left=-B*P;break;case 1:ce.bottom=0,ce.left=-B*P;break;case 0:ce.bottom=0,ce.left=P;break}return j.createElement("div",{style:ce})},A=U;function K(Y){if(Y==null)throw new TypeError("Cannot destructure "+Y)}var D=m(72190),O=m(42244),re=m(34280),oe=m(48911),ie=m(77900),Ee=m(639);function Me(Y,Le){var Ce=j.useState(!1),B=(0,D.Z)(Ce,2),P=B[0],ce=B[1];(0,re.Z)(function(){if(P)return Y(),function(){Le()}},[P]),(0,re.Z)(function(){return ce(!0),function(){ce(!1)}},[])}var ke=Me,tt=m(34061),ue=["className","style","motion","motionNodes","motionType","onMotionStart","onMotionEnd","active","treeNodeRequiredProps"],X=j.forwardRef(function(Y,Le){var Ce=Y.className,B=Y.style,P=Y.motion,ce=Y.motionNodes,ve=Y.motionType,de=Y.onMotionStart,ye=Y.onMotionEnd,Te=Y.active,we=Y.treeNodeRequiredProps,Ie=(0,O.Z)(Y,ue),Ae=j.useState(!0),Xe=(0,D.Z)(Ae,2),gt=Xe[0],ht=Xe[1],nt=j.useContext(Z.k),Oe=nt.prefixCls,qe=ce&&ve!=="hide";(0,re.Z)(function(){ce&&qe!==gt&&ht(qe)},[ce]);var rt=function(){ce&&de()},ot=j.useRef(!1),Rt=function(){ce&&!ot.current&&(ot.current=!0,ye())};ke(rt,Rt);var S=function(Ze){qe===Ze&&Rt()};return ce?j.createElement(ie.default,(0,v.Z)({ref:Le,visible:gt},P,{motionAppear:ve==="show",onVisibleChanged:S}),function(R,Ze){var J=R.className,be=R.style;return j.createElement("div",{ref:Ze,className:y()("".concat(Oe,"-treenode-motion"),J),style:be},ce.map(function(zt){var ze=Object.assign({},(K(zt.data),zt.data)),Qe=zt.title,lt=zt.key,le=zt.isStart,pe=zt.isEnd;delete ze.children;var Pe=(0,tt.H8)(lt,we);return j.createElement(Ee.Z,(0,v.Z)({},ze,Pe,{title:Qe,active:Te,data:zt.data,key:lt,isStart:le,isEnd:pe}))}))}):j.createElement(Ee.Z,(0,v.Z)({domRef:Le,className:Ce,style:B},Ie,{active:Te}))}),L=X;function se(){var Y=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[],Le=arguments.length>1&&arguments[1]!==void 0?arguments[1]:[],Ce=Y.length,B=Le.length;if(Math.abs(Ce-B)!==1)return{add:!1,key:null};function P(ce,ve){var de=new Map;ce.forEach(function(Te){de.set(Te,!0)});var ye=ve.filter(function(Te){return!de.has(Te)});return ye.length===1?ye[0]:null}return Ce<B?{add:!0,key:P(Y,Le)}:{add:!1,key:P(Le,Y)}}function Q(Y,Le,Ce){var B=Y.findIndex(function(de){return de.key===Ce}),P=Y[B+1],ce=Le.findIndex(function(de){return de.key===Ce});if(P){var ve=Le.findIndex(function(de){return de.key===P.key});return Le.slice(ce+1,ve)}return Le.slice(ce+1)}var V=["prefixCls","data","selectable","checkable","expandedKeys","selectedKeys","checkedKeys","loadedKeys","loadingKeys","halfCheckedKeys","keyEntities","disabled","dragging","dragOverNodeKey","dropPosition","motion","height","itemHeight","virtual","scrollWidth","focusable","activeItem","focused","tabIndex","onKeyDown","onFocus","onBlur","onActiveChange","onListChangeStart","onListChangeEnd"],x={width:0,height:0,display:"flex",overflow:"hidden",opacity:0,border:0,padding:0,margin:0},w=function(){},H="RC_TREE_MOTION_".concat(Math.random()),he={key:H},Ke={key:H,level:0,index:0,pos:"0",node:he,nodes:[he]},ft={parent:null,children:[],pos:Ke.pos,data:he,title:null,key:H,isStart:[],isEnd:[]};function Ue(Y,Le,Ce,B){return Le===!1||!Ce?Y:Y.slice(0,Math.ceil(Ce/B)+1)}function st(Y){var Le=Y.key,Ce=Y.pos;return(0,tt.km)(Le,Ce)}function pt(Y){for(var Le=String(Y.data.key),Ce=Y;Ce.parent;)Ce=Ce.parent,Le="".concat(Ce.data.key," > ").concat(Le);return Le}var Et=j.forwardRef(function(Y,Le){var Ce=Y.prefixCls,B=Y.data,P=Y.selectable,ce=Y.checkable,ve=Y.expandedKeys,de=Y.selectedKeys,ye=Y.checkedKeys,Te=Y.loadedKeys,we=Y.loadingKeys,Ie=Y.halfCheckedKeys,Ae=Y.keyEntities,Xe=Y.disabled,gt=Y.dragging,ht=Y.dragOverNodeKey,nt=Y.dropPosition,Oe=Y.motion,qe=Y.height,rt=Y.itemHeight,ot=Y.virtual,Rt=Y.scrollWidth,S=Y.focusable,R=Y.activeItem,Ze=Y.focused,J=Y.tabIndex,be=Y.onKeyDown,zt=Y.onFocus,ze=Y.onBlur,Qe=Y.onActiveChange,lt=Y.onListChangeStart,le=Y.onListChangeEnd,pe=(0,O.Z)(Y,V),Pe=j.useRef(null),$e=j.useRef(null);j.useImperativeHandle(Le,function(){return{scrollTo:function($t){Pe.current.scrollTo($t)},getIndentWidth:function(){return $e.current.offsetWidth}}});var G=j.useState(ve),bt=(0,D.Z)(G,2),xe=bt[0],Bt=bt[1],en=j.useState(B),dn=(0,D.Z)(en,2),Hn=dn[0],wt=dn[1],Gt=j.useState(B),mn=(0,D.Z)(Gt,2),yn=mn[0],rn=mn[1],En=j.useState([]),Zt=(0,D.Z)(En,2),Dt=Zt[0],Mt=Zt[1],gn=j.useState(null),Ln=(0,D.Z)(gn,2),ut=Ln[0],ct=Ln[1],Se=j.useRef(B);Se.current=B;function He(){var yt=Se.current;wt(yt),rn(yt),Mt([]),ct(null),le()}(0,re.Z)(function(){Bt(ve);var yt=se(xe,ve);if(yt.key!==null)if(yt.add){var $t=Hn.findIndex(function(qt){var Ye=qt.key;return Ye===yt.key}),Jt=Ue(Q(Hn,B,yt.key),ot,qe,rt),nn=Hn.slice();nn.splice($t+1,0,ft),rn(nn),Mt(Jt),ct("show")}else{var Ht=B.findIndex(function(qt){var Ye=qt.key;return Ye===yt.key}),Qt=Ue(Q(B,Hn,yt.key),ot,qe,rt),pn=B.slice();pn.splice(Ht+1,0,ft),rn(pn),Mt(Qt),ct("hide")}else Hn!==B&&(wt(B),rn(B))},[ve,B]),j.useEffect(function(){gt||He()},[gt]);var it=Oe?yn:B,Je={expandedKeys:ve,selectedKeys:de,loadedKeys:Te,loadingKeys:we,checkedKeys:ye,halfCheckedKeys:Ie,dragOverNodeKey:ht,dropPosition:nt,keyEntities:Ae};return j.createElement(j.Fragment,null,Ze&&R&&j.createElement("span",{style:x,"aria-live":"assertive"},pt(R)),j.createElement("div",null,j.createElement("input",{style:x,disabled:S===!1||Xe,tabIndex:S!==!1?J:null,onKeyDown:be,onFocus:zt,onBlur:ze,value:"",onChange:w,"aria-label":"for screen reader"})),j.createElement("div",{className:"".concat(Ce,"-treenode"),"aria-hidden":!0,style:{position:"absolute",pointerEvents:"none",visibility:"hidden",height:0,overflow:"hidden",border:0,padding:0}},j.createElement("div",{className:"".concat(Ce,"-indent")},j.createElement("div",{ref:$e,className:"".concat(Ce,"-indent-unit")}))),j.createElement(oe.Z,(0,v.Z)({},pe,{data:it,itemKey:st,height:qe,fullHeight:!1,virtual:ot,itemHeight:rt,scrollWidth:Rt,prefixCls:"".concat(Ce,"-list"),ref:Pe,role:"tree",onVisibleChange:function($t){$t.every(function(Jt){return st(Jt)!==H})&&He()}}),function(yt){var $t=yt.pos,Jt=Object.assign({},(K(yt.data),yt.data)),nn=yt.title,Ht=yt.key,Qt=yt.isStart,pn=yt.isEnd,qt=(0,tt.km)(Ht,$t);delete Jt.key,delete Jt.children;var Ye=(0,tt.H8)(qt,Je);return j.createElement(L,(0,v.Z)({},Jt,Ye,{title:nn,active:!!R&&Ht===R.key,pos:$t,data:yt.data,isStart:Qt,isEnd:pn,motion:Oe,motionNodes:Ht===H?Dt:null,motionType:ut,onMotionStart:lt,onMotionEnd:He,treeNodeRequiredProps:Je,onMouseMove:function(){Qe(null)}}))}))}),Ne=Et,St=m(82661),at=m(34643),Nt=m(65065),Ge=10,je=function(Y){(0,te.Z)(Ce,Y);var Le=(0,o.Z)(Ce);function Ce(){var B;(0,z.Z)(this,Ce);for(var P=arguments.length,ce=new Array(P),ve=0;ve<P;ve++)ce[ve]=arguments[ve];return B=Le.call.apply(Le,[this].concat(ce)),(0,C.Z)((0,q.Z)(B),"destroyed",!1),(0,C.Z)((0,q.Z)(B),"delayedDragEnterLogic",void 0),(0,C.Z)((0,q.Z)(B),"loadingRetryTimes",{}),(0,C.Z)((0,q.Z)(B),"state",{keyEntities:{},indent:null,selectedKeys:[],checkedKeys:[],halfCheckedKeys:[],loadedKeys:[],loadingKeys:[],expandedKeys:[],draggingNodeKey:null,dragChildrenKeys:[],dropTargetKey:null,dropPosition:null,dropContainerKey:null,dropLevelOffset:null,dropTargetPos:null,dropAllowed:!0,dragOverNodeKey:null,treeData:[],flattenNodes:[],focused:!1,activeKey:null,listChanging:!1,prevProps:null,fieldNames:(0,tt.w$)()}),(0,C.Z)((0,q.Z)(B),"dragStartMousePosition",null),(0,C.Z)((0,q.Z)(B),"dragNodeProps",null),(0,C.Z)((0,q.Z)(B),"currentMouseOverDroppableNodeKey",null),(0,C.Z)((0,q.Z)(B),"listRef",j.createRef()),(0,C.Z)((0,q.Z)(B),"onNodeDragStart",function(de,ye){var Te=B.state,we=Te.expandedKeys,Ie=Te.keyEntities,Ae=B.props.onDragStart,Xe=ye.eventKey;B.dragNodeProps=ye,B.dragStartMousePosition={x:de.clientX,y:de.clientY};var gt=(0,St._5)(we,Xe);B.setState({draggingNodeKey:Xe,dragChildrenKeys:(0,St.wA)(Xe,Ie),indent:B.listRef.current.getIndentWidth()}),B.setExpandedKeys(gt),window.addEventListener("dragend",B.onWindowDragEnd),Ae==null||Ae({event:de,node:(0,tt.F)(ye)})}),(0,C.Z)((0,q.Z)(B),"onNodeDragEnter",function(de,ye){var Te=B.state,we=Te.expandedKeys,Ie=Te.keyEntities,Ae=Te.dragChildrenKeys,Xe=Te.flattenNodes,gt=Te.indent,ht=B.props,nt=ht.onDragEnter,Oe=ht.onExpand,qe=ht.allowDrop,rt=ht.direction,ot=ye.pos,Rt=ye.eventKey;if(B.currentMouseOverDroppableNodeKey!==Rt&&(B.currentMouseOverDroppableNodeKey=Rt),!B.dragNodeProps){B.resetDragState();return}var S=(0,St.OM)(de,B.dragNodeProps,ye,gt,B.dragStartMousePosition,qe,Xe,Ie,we,rt),R=S.dropPosition,Ze=S.dropLevelOffset,J=S.dropTargetKey,be=S.dropContainerKey,zt=S.dropTargetPos,ze=S.dropAllowed,Qe=S.dragOverNodeKey;if(Ae.includes(J)||!ze){B.resetDragState();return}if(B.delayedDragEnterLogic||(B.delayedDragEnterLogic={}),Object.keys(B.delayedDragEnterLogic).forEach(function(lt){clearTimeout(B.delayedDragEnterLogic[lt])}),B.dragNodeProps.eventKey!==ye.eventKey&&(de.persist(),B.delayedDragEnterLogic[ot]=window.setTimeout(function(){if(B.state.draggingNodeKey!==null){var lt=(0,fe.Z)(we),le=(0,Nt.Z)(Ie,ye.eventKey);le&&(le.children||[]).length&&(lt=(0,St.L0)(we,ye.eventKey)),B.props.hasOwnProperty("expandedKeys")||B.setExpandedKeys(lt),Oe==null||Oe(lt,{node:(0,tt.F)(ye),expanded:!0,nativeEvent:de.nativeEvent})}},800)),B.dragNodeProps.eventKey===J&&Ze===0){B.resetDragState();return}B.setState({dragOverNodeKey:Qe,dropPosition:R,dropLevelOffset:Ze,dropTargetKey:J,dropContainerKey:be,dropTargetPos:zt,dropAllowed:ze}),nt==null||nt({event:de,node:(0,tt.F)(ye),expandedKeys:we})}),(0,C.Z)((0,q.Z)(B),"onNodeDragOver",function(de,ye){var Te=B.state,we=Te.dragChildrenKeys,Ie=Te.flattenNodes,Ae=Te.keyEntities,Xe=Te.expandedKeys,gt=Te.indent,ht=B.props,nt=ht.onDragOver,Oe=ht.allowDrop,qe=ht.direction;if(B.dragNodeProps){var rt=(0,St.OM)(de,B.dragNodeProps,ye,gt,B.dragStartMousePosition,Oe,Ie,Ae,Xe,qe),ot=rt.dropPosition,Rt=rt.dropLevelOffset,S=rt.dropTargetKey,R=rt.dropContainerKey,Ze=rt.dropTargetPos,J=rt.dropAllowed,be=rt.dragOverNodeKey;we.includes(S)||!J||(B.dragNodeProps.eventKey===S&&Rt===0?B.state.dropPosition===null&&B.state.dropLevelOffset===null&&B.state.dropTargetKey===null&&B.state.dropContainerKey===null&&B.state.dropTargetPos===null&&B.state.dropAllowed===!1&&B.state.dragOverNodeKey===null||B.resetDragState():ot===B.state.dropPosition&&Rt===B.state.dropLevelOffset&&S===B.state.dropTargetKey&&R===B.state.dropContainerKey&&Ze===B.state.dropTargetPos&&J===B.state.dropAllowed&&be===B.state.dragOverNodeKey||B.setState({dropPosition:ot,dropLevelOffset:Rt,dropTargetKey:S,dropContainerKey:R,dropTargetPos:Ze,dropAllowed:J,dragOverNodeKey:be}),nt==null||nt({event:de,node:(0,tt.F)(ye)}))}}),(0,C.Z)((0,q.Z)(B),"onNodeDragLeave",function(de,ye){B.currentMouseOverDroppableNodeKey===ye.eventKey&&!de.currentTarget.contains(de.relatedTarget)&&(B.resetDragState(),B.currentMouseOverDroppableNodeKey=null);var Te=B.props.onDragLeave;Te==null||Te({event:de,node:(0,tt.F)(ye)})}),(0,C.Z)((0,q.Z)(B),"onWindowDragEnd",function(de){B.onNodeDragEnd(de,null,!0),window.removeEventListener("dragend",B.onWindowDragEnd)}),(0,C.Z)((0,q.Z)(B),"onNodeDragEnd",function(de,ye){var Te=B.props.onDragEnd;B.setState({dragOverNodeKey:null}),B.cleanDragState(),Te==null||Te({event:de,node:(0,tt.F)(ye)}),B.dragNodeProps=null,window.removeEventListener("dragend",B.onWindowDragEnd)}),(0,C.Z)((0,q.Z)(B),"onNodeDrop",function(de,ye){var Te,we=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1,Ie=B.state,Ae=Ie.dragChildrenKeys,Xe=Ie.dropPosition,gt=Ie.dropTargetKey,ht=Ie.dropTargetPos,nt=Ie.dropAllowed;if(nt){var Oe=B.props.onDrop;if(B.setState({dragOverNodeKey:null}),B.cleanDragState(),gt!==null){var qe=(0,W.Z)((0,W.Z)({},(0,tt.H8)(gt,B.getTreeNodeRequiredProps())),{},{active:((Te=B.getActiveItem())===null||Te===void 0?void 0:Te.key)===gt,data:(0,Nt.Z)(B.state.keyEntities,gt).node}),rt=Ae.includes(gt);(0,k.ZP)(!rt,"Can not drop to dragNode's children node. This is a bug of rc-tree. Please report an issue.");var ot=(0,St.yx)(ht),Rt={event:de,node:(0,tt.F)(qe),dragNode:B.dragNodeProps?(0,tt.F)(B.dragNodeProps):null,dragNodesKeys:[B.dragNodeProps.eventKey].concat(Ae),dropToGap:Xe!==0,dropPosition:Xe+Number(ot[ot.length-1])};we||Oe==null||Oe(Rt),B.dragNodeProps=null}}}),(0,C.Z)((0,q.Z)(B),"cleanDragState",function(){var de=B.state.draggingNodeKey;de!==null&&B.setState({draggingNodeKey:null,dropPosition:null,dropContainerKey:null,dropTargetKey:null,dropLevelOffset:null,dropAllowed:!0,dragOverNodeKey:null}),B.dragStartMousePosition=null,B.currentMouseOverDroppableNodeKey=null}),(0,C.Z)((0,q.Z)(B),"triggerExpandActionExpand",function(de,ye){var Te=B.state,we=Te.expandedKeys,Ie=Te.flattenNodes,Ae=ye.expanded,Xe=ye.key,gt=ye.isLeaf;if(!(gt||de.shiftKey||de.metaKey||de.ctrlKey)){var ht=Ie.filter(function(Oe){return Oe.key===Xe})[0],nt=(0,tt.F)((0,W.Z)((0,W.Z)({},(0,tt.H8)(Xe,B.getTreeNodeRequiredProps())),{},{data:ht.data}));B.setExpandedKeys(Ae?(0,St._5)(we,Xe):(0,St.L0)(we,Xe)),B.onNodeExpand(de,nt)}}),(0,C.Z)((0,q.Z)(B),"onNodeClick",function(de,ye){var Te=B.props,we=Te.onClick,Ie=Te.expandAction;Ie==="click"&&B.triggerExpandActionExpand(de,ye),we==null||we(de,ye)}),(0,C.Z)((0,q.Z)(B),"onNodeDoubleClick",function(de,ye){var Te=B.props,we=Te.onDoubleClick,Ie=Te.expandAction;Ie==="doubleClick"&&B.triggerExpandActionExpand(de,ye),we==null||we(de,ye)}),(0,C.Z)((0,q.Z)(B),"onNodeSelect",function(de,ye){var Te=B.state.selectedKeys,we=B.state,Ie=we.keyEntities,Ae=we.fieldNames,Xe=B.props,gt=Xe.onSelect,ht=Xe.multiple,nt=ye.selected,Oe=ye[Ae.key],qe=!nt;qe?ht?Te=(0,St.L0)(Te,Oe):Te=[Oe]:Te=(0,St._5)(Te,Oe);var rt=Te.map(function(ot){var Rt=(0,Nt.Z)(Ie,ot);return Rt?Rt.node:null}).filter(Boolean);B.setUncontrolledState({selectedKeys:Te}),gt==null||gt(Te,{event:"select",selected:qe,node:ye,selectedNodes:rt,nativeEvent:de.nativeEvent})}),(0,C.Z)((0,q.Z)(B),"onNodeCheck",function(de,ye,Te){var we=B.state,Ie=we.keyEntities,Ae=we.checkedKeys,Xe=we.halfCheckedKeys,gt=B.props,ht=gt.checkStrictly,nt=gt.onCheck,Oe=ye.key,qe,rt={event:"check",node:ye,checked:Te,nativeEvent:de.nativeEvent};if(ht){var ot=Te?(0,St.L0)(Ae,Oe):(0,St._5)(Ae,Oe),Rt=(0,St._5)(Xe,Oe);qe={checked:ot,halfChecked:Rt},rt.checkedNodes=ot.map(function(zt){return(0,Nt.Z)(Ie,zt)}).filter(Boolean).map(function(zt){return zt.node}),B.setUncontrolledState({checkedKeys:ot})}else{var S=(0,at.S)([].concat((0,fe.Z)(Ae),[Oe]),!0,Ie),R=S.checkedKeys,Ze=S.halfCheckedKeys;if(!Te){var J=new Set(R);J.delete(Oe);var be=(0,at.S)(Array.from(J),{checked:!1,halfCheckedKeys:Ze},Ie);R=be.checkedKeys,Ze=be.halfCheckedKeys}qe=R,rt.checkedNodes=[],rt.checkedNodesPositions=[],rt.halfCheckedKeys=Ze,R.forEach(function(zt){var ze=(0,Nt.Z)(Ie,zt);if(ze){var Qe=ze.node,lt=ze.pos;rt.checkedNodes.push(Qe),rt.checkedNodesPositions.push({node:Qe,pos:lt})}}),B.setUncontrolledState({checkedKeys:R},!1,{halfCheckedKeys:Ze})}nt==null||nt(qe,rt)}),(0,C.Z)((0,q.Z)(B),"onNodeLoad",function(de){var ye,Te=de.key,we=B.state.keyEntities,Ie=(0,Nt.Z)(we,Te);if(!(Ie!=null&&(ye=Ie.children)!==null&&ye!==void 0&&ye.length)){var Ae=new Promise(function(Xe,gt){B.setState(function(ht){var nt=ht.loadedKeys,Oe=nt===void 0?[]:nt,qe=ht.loadingKeys,rt=qe===void 0?[]:qe,ot=B.props,Rt=ot.loadData,S=ot.onLoad;if(!Rt||Oe.includes(Te)||rt.includes(Te))return null;var R=Rt(de);return R.then(function(){var Ze=B.state.loadedKeys,J=(0,St.L0)(Ze,Te);S==null||S(J,{event:"load",node:de}),B.setUncontrolledState({loadedKeys:J}),B.setState(function(be){return{loadingKeys:(0,St._5)(be.loadingKeys,Te)}}),Xe()}).catch(function(Ze){if(B.setState(function(be){return{loadingKeys:(0,St._5)(be.loadingKeys,Te)}}),B.loadingRetryTimes[Te]=(B.loadingRetryTimes[Te]||0)+1,B.loadingRetryTimes[Te]>=Ge){var J=B.state.loadedKeys;(0,k.ZP)(!1,"Retry for `loadData` many times but still failed. No more retry."),B.setUncontrolledState({loadedKeys:(0,St.L0)(J,Te)}),Xe()}gt(Ze)}),{loadingKeys:(0,St.L0)(rt,Te)}})});return Ae.catch(function(){}),Ae}}),(0,C.Z)((0,q.Z)(B),"onNodeMouseEnter",function(de,ye){var Te=B.props.onMouseEnter;Te==null||Te({event:de,node:ye})}),(0,C.Z)((0,q.Z)(B),"onNodeMouseLeave",function(de,ye){var Te=B.props.onMouseLeave;Te==null||Te({event:de,node:ye})}),(0,C.Z)((0,q.Z)(B),"onNodeContextMenu",function(de,ye){var Te=B.props.onRightClick;Te&&(de.preventDefault(),Te({event:de,node:ye}))}),(0,C.Z)((0,q.Z)(B),"onFocus",function(){var de=B.props.onFocus;B.setState({focused:!0});for(var ye=arguments.length,Te=new Array(ye),we=0;we<ye;we++)Te[we]=arguments[we];de==null||de.apply(void 0,Te)}),(0,C.Z)((0,q.Z)(B),"onBlur",function(){var de=B.props.onBlur;B.setState({focused:!1}),B.onActiveChange(null);for(var ye=arguments.length,Te=new Array(ye),we=0;we<ye;we++)Te[we]=arguments[we];de==null||de.apply(void 0,Te)}),(0,C.Z)((0,q.Z)(B),"getTreeNodeRequiredProps",function(){var de=B.state,ye=de.expandedKeys,Te=de.selectedKeys,we=de.loadedKeys,Ie=de.loadingKeys,Ae=de.checkedKeys,Xe=de.halfCheckedKeys,gt=de.dragOverNodeKey,ht=de.dropPosition,nt=de.keyEntities;return{expandedKeys:ye||[],selectedKeys:Te||[],loadedKeys:we||[],loadingKeys:Ie||[],checkedKeys:Ae||[],halfCheckedKeys:Xe||[],dragOverNodeKey:gt,dropPosition:ht,keyEntities:nt}}),(0,C.Z)((0,q.Z)(B),"setExpandedKeys",function(de){var ye=B.state,Te=ye.treeData,we=ye.fieldNames,Ie=(0,tt.oH)(Te,de,we);B.setUncontrolledState({expandedKeys:de,flattenNodes:Ie},!0)}),(0,C.Z)((0,q.Z)(B),"onNodeExpand",function(de,ye){var Te=B.state.expandedKeys,we=B.state,Ie=we.listChanging,Ae=we.fieldNames,Xe=B.props,gt=Xe.onExpand,ht=Xe.loadData,nt=ye.expanded,Oe=ye[Ae.key];if(!Ie){var qe=Te.includes(Oe),rt=!nt;if((0,k.ZP)(nt&&qe||!nt&&!qe,"Expand state not sync with index check"),Te=rt?(0,St.L0)(Te,Oe):(0,St._5)(Te,Oe),B.setExpandedKeys(Te),gt==null||gt(Te,{node:ye,expanded:rt,nativeEvent:de.nativeEvent}),rt&&ht){var ot=B.onNodeLoad(ye);ot&&ot.then(function(){var Rt=(0,tt.oH)(B.state.treeData,Te,Ae);B.setUncontrolledState({flattenNodes:Rt})}).catch(function(){var Rt=B.state.expandedKeys,S=(0,St._5)(Rt,Oe);B.setExpandedKeys(S)})}}}),(0,C.Z)((0,q.Z)(B),"onListChangeStart",function(){B.setUncontrolledState({listChanging:!0})}),(0,C.Z)((0,q.Z)(B),"onListChangeEnd",function(){setTimeout(function(){B.setUncontrolledState({listChanging:!1})})}),(0,C.Z)((0,q.Z)(B),"onActiveChange",function(de){var ye=B.state.activeKey,Te=B.props,we=Te.onActiveChange,Ie=Te.itemScrollOffset,Ae=Ie===void 0?0:Ie;ye!==de&&(B.setState({activeKey:de}),de!==null&&B.scrollTo({key:de,offset:Ae}),we==null||we(de))}),(0,C.Z)((0,q.Z)(B),"getActiveItem",function(){var de=B.state,ye=de.activeKey,Te=de.flattenNodes;return ye===null?null:Te.find(function(we){var Ie=we.key;return Ie===ye})||null}),(0,C.Z)((0,q.Z)(B),"offsetActiveKey",function(de){var ye=B.state,Te=ye.flattenNodes,we=ye.activeKey,Ie=Te.findIndex(function(gt){var ht=gt.key;return ht===we});Ie===-1&&de<0&&(Ie=Te.length),Ie=(Ie+de+Te.length)%Te.length;var Ae=Te[Ie];if(Ae){var Xe=Ae.key;B.onActiveChange(Xe)}else B.onActiveChange(null)}),(0,C.Z)((0,q.Z)(B),"onKeyDown",function(de){var ye=B.state,Te=ye.activeKey,we=ye.expandedKeys,Ie=ye.checkedKeys,Ae=ye.fieldNames,Xe=B.props,gt=Xe.onKeyDown,ht=Xe.checkable,nt=Xe.selectable;switch(de.which){case E.Z.UP:{B.offsetActiveKey(-1),de.preventDefault();break}case E.Z.DOWN:{B.offsetActiveKey(1),de.preventDefault();break}}var Oe=B.getActiveItem();if(Oe&&Oe.data){var qe=B.getTreeNodeRequiredProps(),rt=Oe.data.isLeaf===!1||!!(Oe.data[Ae.children]||[]).length,ot=(0,tt.F)((0,W.Z)((0,W.Z)({},(0,tt.H8)(Te,qe)),{},{data:Oe.data,active:!0}));switch(de.which){case E.Z.LEFT:{rt&&we.includes(Te)?B.onNodeExpand({},ot):Oe.parent&&B.onActiveChange(Oe.parent.key),de.preventDefault();break}case E.Z.RIGHT:{rt&&!we.includes(Te)?B.onNodeExpand({},ot):Oe.children&&Oe.children.length&&B.onActiveChange(Oe.children[0].key),de.preventDefault();break}case E.Z.ENTER:case E.Z.SPACE:{ht&&!ot.disabled&&ot.checkable!==!1&&!ot.disableCheckbox?B.onNodeCheck({},ot,!Ie.includes(Te)):!ht&&nt&&!ot.disabled&&ot.selectable!==!1&&B.onNodeSelect({},ot);break}}}gt==null||gt(de)}),(0,C.Z)((0,q.Z)(B),"setUncontrolledState",function(de){var ye=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,Te=arguments.length>2&&arguments[2]!==void 0?arguments[2]:null;if(!B.destroyed){var we=!1,Ie=!0,Ae={};Object.keys(de).forEach(function(Xe){if(B.props.hasOwnProperty(Xe)){Ie=!1;return}we=!0,Ae[Xe]=de[Xe]}),we&&(!ye||Ie)&&B.setState((0,W.Z)((0,W.Z)({},Ae),Te))}}),(0,C.Z)((0,q.Z)(B),"scrollTo",function(de){B.listRef.current.scrollTo(de)}),B}return(0,g.Z)(Ce,[{key:"componentDidMount",value:function(){this.destroyed=!1,this.onUpdated()}},{key:"componentDidUpdate",value:function(){this.onUpdated()}},{key:"onUpdated",value:function(){var P=this.props,ce=P.activeKey,ve=P.itemScrollOffset,de=ve===void 0?0:ve;ce!==void 0&&ce!==this.state.activeKey&&(this.setState({activeKey:ce}),ce!==null&&this.scrollTo({key:ce,offset:de}))}},{key:"componentWillUnmount",value:function(){window.removeEventListener("dragend",this.onWindowDragEnd),this.destroyed=!0}},{key:"resetDragState",value:function(){this.setState({dragOverNodeKey:null,dropPosition:null,dropLevelOffset:null,dropTargetKey:null,dropContainerKey:null,dropTargetPos:null,dropAllowed:!1})}},{key:"render",value:function(){var P=this.state,ce=P.focused,ve=P.flattenNodes,de=P.keyEntities,ye=P.draggingNodeKey,Te=P.activeKey,we=P.dropLevelOffset,Ie=P.dropContainerKey,Ae=P.dropTargetKey,Xe=P.dropPosition,gt=P.dragOverNodeKey,ht=P.indent,nt=this.props,Oe=nt.prefixCls,qe=nt.className,rt=nt.style,ot=nt.showLine,Rt=nt.focusable,S=nt.tabIndex,R=S===void 0?0:S,Ze=nt.selectable,J=nt.showIcon,be=nt.icon,zt=nt.switcherIcon,ze=nt.draggable,Qe=nt.checkable,lt=nt.checkStrictly,le=nt.disabled,pe=nt.motion,Pe=nt.loadData,$e=nt.filterTreeNode,G=nt.height,bt=nt.itemHeight,xe=nt.scrollWidth,Bt=nt.virtual,en=nt.titleRender,dn=nt.dropIndicatorRender,Hn=nt.onContextMenu,wt=nt.onScroll,Gt=nt.direction,mn=nt.rootClassName,yn=nt.rootStyle,rn=(0,T.Z)(this.props,{aria:!0,data:!0}),En;ze&&((0,ae.Z)(ze)==="object"?En=ze:typeof ze=="function"?En={nodeDraggable:ze}:En={});var Zt={prefixCls:Oe,selectable:Ze,showIcon:J,icon:be,switcherIcon:zt,draggable:En,draggingNodeKey:ye,checkable:Qe,checkStrictly:lt,disabled:le,keyEntities:de,dropLevelOffset:we,dropContainerKey:Ie,dropTargetKey:Ae,dropPosition:Xe,dragOverNodeKey:gt,indent:ht,direction:Gt,dropIndicatorRender:dn,loadData:Pe,filterTreeNode:$e,titleRender:en,onNodeClick:this.onNodeClick,onNodeDoubleClick:this.onNodeDoubleClick,onNodeExpand:this.onNodeExpand,onNodeSelect:this.onNodeSelect,onNodeCheck:this.onNodeCheck,onNodeLoad:this.onNodeLoad,onNodeMouseEnter:this.onNodeMouseEnter,onNodeMouseLeave:this.onNodeMouseLeave,onNodeContextMenu:this.onNodeContextMenu,onNodeDragStart:this.onNodeDragStart,onNodeDragEnter:this.onNodeDragEnter,onNodeDragOver:this.onNodeDragOver,onNodeDragLeave:this.onNodeDragLeave,onNodeDragEnd:this.onNodeDragEnd,onNodeDrop:this.onNodeDrop};return j.createElement(Z.k.Provider,{value:Zt},j.createElement("div",{className:y()(Oe,qe,mn,(0,C.Z)((0,C.Z)((0,C.Z)({},"".concat(Oe,"-show-line"),ot),"".concat(Oe,"-focused"),ce),"".concat(Oe,"-active-focused"),Te!==null)),style:yn},j.createElement(Ne,(0,v.Z)({ref:this.listRef,prefixCls:Oe,style:rt,data:ve,disabled:le,selectable:Ze,checkable:!!Qe,motion:pe,dragging:ye!==null,height:G,itemHeight:bt,virtual:Bt,focusable:Rt,focused:ce,tabIndex:R,activeItem:this.getActiveItem(),onFocus:this.onFocus,onBlur:this.onBlur,onKeyDown:this.onKeyDown,onActiveChange:this.onActiveChange,onListChangeStart:this.onListChangeStart,onListChangeEnd:this.onListChangeEnd,onContextMenu:Hn,onScroll:wt,scrollWidth:xe},this.getTreeNodeRequiredProps(),rn))))}}],[{key:"getDerivedStateFromProps",value:function(P,ce){var ve=ce.prevProps,de={prevProps:P};function ye(R){return!ve&&P.hasOwnProperty(R)||ve&&ve[R]!==P[R]}var Te,we=ce.fieldNames;if(ye("fieldNames")&&(we=(0,tt.w$)(P.fieldNames),de.fieldNames=we),ye("treeData")?Te=P.treeData:ye("children")&&((0,k.ZP)(!1,"`children` of Tree is deprecated. Please use `treeData` instead."),Te=(0,tt.zn)(P.children)),Te){de.treeData=Te;var Ie=(0,tt.I8)(Te,{fieldNames:we});de.keyEntities=(0,W.Z)((0,C.Z)({},H,Ke),Ie.keyEntities)}var Ae=de.keyEntities||ce.keyEntities;if(ye("expandedKeys")||ve&&ye("autoExpandParent"))de.expandedKeys=P.autoExpandParent||!ve&&P.defaultExpandParent?(0,St.r7)(P.expandedKeys,Ae):P.expandedKeys;else if(!ve&&P.defaultExpandAll){var Xe=(0,W.Z)({},Ae);delete Xe[H];var gt=[];Object.keys(Xe).forEach(function(R){var Ze=Xe[R];Ze.children&&Ze.children.length&>.push(Ze.key)}),de.expandedKeys=gt}else!ve&&P.defaultExpandedKeys&&(de.expandedKeys=P.autoExpandParent||P.defaultExpandParent?(0,St.r7)(P.defaultExpandedKeys,Ae):P.defaultExpandedKeys);if(de.expandedKeys||delete de.expandedKeys,Te||de.expandedKeys){var ht=(0,tt.oH)(Te||ce.treeData,de.expandedKeys||ce.expandedKeys,we);de.flattenNodes=ht}if(P.selectable&&(ye("selectedKeys")?de.selectedKeys=(0,St.BT)(P.selectedKeys,P):!ve&&P.defaultSelectedKeys&&(de.selectedKeys=(0,St.BT)(P.defaultSelectedKeys,P))),P.checkable){var nt;if(ye("checkedKeys")?nt=(0,St.E6)(P.checkedKeys)||{}:!ve&&P.defaultCheckedKeys?nt=(0,St.E6)(P.defaultCheckedKeys)||{}:Te&&(nt=(0,St.E6)(P.checkedKeys)||{checkedKeys:ce.checkedKeys,halfCheckedKeys:ce.halfCheckedKeys}),nt){var Oe=nt,qe=Oe.checkedKeys,rt=qe===void 0?[]:qe,ot=Oe.halfCheckedKeys,Rt=ot===void 0?[]:ot;if(!P.checkStrictly){var S=(0,at.S)(rt,!0,Ae);rt=S.checkedKeys,Rt=S.halfCheckedKeys}de.checkedKeys=rt,de.halfCheckedKeys=Rt}}return ye("loadedKeys")&&(de.loadedKeys=P.loadedKeys),de}}]),Ce}(j.Component);(0,C.Z)(je,"defaultProps",{prefixCls:"rc-tree",showLine:!1,showIcon:!0,selectable:!0,multiple:!1,checkable:!1,disabled:!1,checkStrictly:!1,draggable:!1,defaultExpandParent:!0,autoExpandParent:!1,defaultExpandAll:!1,defaultExpandedKeys:[],defaultCheckedKeys:[],defaultSelectedKeys:[],dropIndicatorRender:A,allowDrop:function(){return!0},expandAction:!1}),(0,C.Z)(je,"TreeNode",Ee.Z);var Re=je,_e=Re},82661:function(ln,mt,m){"use strict";m.d(mt,{BT:function(){return j},E6:function(){return A},L0:function(){return C},OM:function(){return k},_5:function(){return o},r7:function(){return K},wA:function(){return y},yx:function(){return M}});var v=m(77654),ae=m(43749),W=m(48736),fe=m(59301),z=m(639),g=m(65065),q=m(34061),te=null;function o(D,O){if(!D)return[];var re=D.slice(),oe=re.indexOf(O);return oe>=0&&re.splice(oe,1),re}function C(D,O){var re=(D||[]).slice();return re.indexOf(O)===-1&&re.push(O),re}function M(D){return D.split("-")}function y(D,O){var re=[],oe=(0,g.Z)(O,D);function ie(){var Ee=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[];Ee.forEach(function(Me){var ke=Me.key,tt=Me.children;re.push(ke),ie(tt)})}return ie(oe.children),re}function E(D){if(D.parent){var O=M(D.pos);return Number(O[O.length-1])===D.parent.children.length-1}return!1}function T(D){var O=M(D.pos);return Number(O[O.length-1])===0}function k(D,O,re,oe,ie,Ee,Me,ke,tt,ue){var X,L=D.clientX,se=D.clientY,Q=D.target.getBoundingClientRect(),V=Q.top,x=Q.height,w=(ue==="rtl"?-1:1)*(((ie==null?void 0:ie.x)||0)-L),H=(w-12)/oe,he=tt.filter(function(_e){var Y;return(Y=ke[_e])===null||Y===void 0||(Y=Y.children)===null||Y===void 0?void 0:Y.length}),Ke=(0,g.Z)(ke,re.eventKey);if(se<V+x/2){var ft=Me.findIndex(function(_e){return _e.key===Ke.key}),Ue=ft<=0?0:ft-1,st=Me[Ue].key;Ke=(0,g.Z)(ke,st)}var pt=Ke.key,Et=Ke,Ne=Ke.key,St=0,at=0;if(!he.includes(pt))for(var Nt=0;Nt<H&&E(Ke);Nt+=1)Ke=Ke.parent,at+=1;var Ge=O.data,je=Ke.node,Re=!0;return T(Ke)&&Ke.level===0&&se<V+x/2&&Ee({dragNode:Ge,dropNode:je,dropPosition:-1})&&Ke.key===re.eventKey?St=-1:(Et.children||[]).length&&he.includes(Ne)?Ee({dragNode:Ge,dropNode:je,dropPosition:0})?St=0:Re=!1:at===0?H>-1.5?Ee({dragNode:Ge,dropNode:je,dropPosition:1})?St=1:Re=!1:Ee({dragNode:Ge,dropNode:je,dropPosition:0})?St=0:Ee({dragNode:Ge,dropNode:je,dropPosition:1})?St=1:Re=!1:Ee({dragNode:Ge,dropNode:je,dropPosition:1})?St=1:Re=!1,{dropPosition:St,dropLevelOffset:at,dropTargetKey:Ke.key,dropTargetPos:Ke.pos,dragOverNodeKey:Ne,dropContainerKey:St===0?null:((X=Ke.parent)===null||X===void 0?void 0:X.key)||null,dropAllowed:Re}}function j(D,O){if(D){var re=O.multiple;return re?D.slice():D.length?[D[0]]:D}}var Z=function(O){return O};function U(D,O){if(!D)return[];var re=O||{},oe=re.processProps,ie=oe===void 0?Z:oe,Ee=Array.isArray(D)?D:[D];return Ee.map(function(Me){var ke=Me.children,tt=_objectWithoutProperties(Me,te),ue=U(ke,O);return React.createElement(TreeNode,_extends({key:tt.key},ie(tt)),ue)})}function A(D){if(!D)return null;var O;if(Array.isArray(D))O={checkedKeys:D,halfCheckedKeys:void 0};else if((0,ae.Z)(D)==="object")O={checkedKeys:D.checked||void 0,halfCheckedKeys:D.halfChecked||void 0};else return(0,W.ZP)(!1,"`checkedKeys` is not an array or an object"),null;return O}function K(D,O){var re=new Set;function oe(ie){if(!re.has(ie)){var Ee=(0,g.Z)(O,ie);if(Ee){re.add(ie);var Me=Ee.parent,ke=Ee.node;ke.disabled||Me&&oe(Me.key)}}}return(D||[]).forEach(function(ie){oe(ie)}),(0,v.Z)(re)}},34643:function(ln,mt,m){"use strict";m.d(mt,{S:function(){return q}});var v=m(48736),ae=m(65065);function W(te,o){var C=new Set;return te.forEach(function(M){o.has(M)||C.add(M)}),C}function fe(te){var o=te||{},C=o.disabled,M=o.disableCheckbox,y=o.checkable;return!!(C||M)||y===!1}function z(te,o,C,M){for(var y=new Set(te),E=new Set,T=0;T<=C;T+=1){var k=o.get(T)||new Set;k.forEach(function(A){var K=A.key,D=A.node,O=A.children,re=O===void 0?[]:O;y.has(K)&&!M(D)&&re.filter(function(oe){return!M(oe.node)}).forEach(function(oe){y.add(oe.key)})})}for(var j=new Set,Z=C;Z>=0;Z-=1){var U=o.get(Z)||new Set;U.forEach(function(A){var K=A.parent,D=A.node;if(!(M(D)||!A.parent||j.has(A.parent.key))){if(M(A.parent.node)){j.add(K.key);return}var O=!0,re=!1;(K.children||[]).filter(function(oe){return!M(oe.node)}).forEach(function(oe){var ie=oe.key,Ee=y.has(ie);O&&!Ee&&(O=!1),!re&&(Ee||E.has(ie))&&(re=!0)}),O&&y.add(K.key),re&&E.add(K.key),j.add(K.key)}})}return{checkedKeys:Array.from(y),halfCheckedKeys:Array.from(W(E,y))}}function g(te,o,C,M,y){for(var E=new Set(te),T=new Set(o),k=0;k<=M;k+=1){var j=C.get(k)||new Set;j.forEach(function(K){var D=K.key,O=K.node,re=K.children,oe=re===void 0?[]:re;!E.has(D)&&!T.has(D)&&!y(O)&&oe.filter(function(ie){return!y(ie.node)}).forEach(function(ie){E.delete(ie.key)})})}T=new Set;for(var Z=new Set,U=M;U>=0;U-=1){var A=C.get(U)||new Set;A.forEach(function(K){var D=K.parent,O=K.node;if(!(y(O)||!K.parent||Z.has(K.parent.key))){if(y(K.parent.node)){Z.add(D.key);return}var re=!0,oe=!1;(D.children||[]).filter(function(ie){return!y(ie.node)}).forEach(function(ie){var Ee=ie.key,Me=E.has(Ee);re&&!Me&&(re=!1),!oe&&(Me||T.has(Ee))&&(oe=!0)}),re||E.delete(D.key),oe&&T.add(D.key),Z.add(D.key)}})}return{checkedKeys:Array.from(E),halfCheckedKeys:Array.from(W(T,E))}}function q(te,o,C,M){var y=[],E;M?E=M:E=fe;var T=new Set(te.filter(function(U){var A=!!(0,ae.Z)(C,U);return A||y.push(U),A})),k=new Map,j=0;Object.keys(C).forEach(function(U){var A=C[U],K=A.level,D=k.get(K);D||(D=new Set,k.set(K,D)),D.add(A),j=Math.max(j,K)}),(0,v.ZP)(!y.length,"Tree missing follow keys: ".concat(y.slice(0,100).map(function(U){return"'".concat(U,"'")}).join(", ")));var Z;return o===!0?Z=z(T,k,j,E):Z=g(T,o.halfCheckedKeys,k,j,E),Z}},65065:function(ln,mt,m){"use strict";m.d(mt,{Z:function(){return v}});function v(ae,W){return ae[W]}},34061:function(ln,mt,m){"use strict";m.d(mt,{F:function(){return K},H8:function(){return A},I8:function(){return U},km:function(){return y},oH:function(){return j},w$:function(){return E},zn:function(){return k}});var v=m(43749),ae=m(77654),W=m(85899),fe=m(42244),z=m(11592),g=m(2738),q=m(48736),te=m(65065),o=["children"];function C(D,O){return"".concat(D,"-").concat(O)}function M(D){return D&&D.type&&D.type.isTreeNode}function y(D,O){return D!=null?D:O}function E(D){var O=D||{},re=O.title,oe=O._title,ie=O.key,Ee=O.children,Me=re||"title";return{title:Me,_title:oe||[Me],key:ie||"key",children:Ee||"children"}}function T(D,O){var re=new Map;function oe(ie){var Ee=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"";(ie||[]).forEach(function(Me){var ke=Me[O.key],tt=Me[O.children];warning(ke!=null,"Tree node must have a certain key: [".concat(Ee).concat(ke,"]"));var ue=String(ke);warning(!re.has(ue)||ke===null||ke===void 0,"Same 'key' exist in the Tree: ".concat(ue)),re.set(ue,!0),oe(tt,"".concat(Ee).concat(ue," > "))})}oe(D)}function k(D){function O(re){var oe=(0,z.Z)(re);return oe.map(function(ie){if(!M(ie))return(0,q.ZP)(!ie,"Tree/TreeNode can only accept TreeNode as children."),null;var Ee=ie.key,Me=ie.props,ke=Me.children,tt=(0,fe.Z)(Me,o),ue=(0,W.Z)({key:Ee},tt),X=O(ke);return X.length&&(ue.children=X),ue}).filter(function(ie){return ie})}return O(D)}function j(D,O,re){var oe=E(re),ie=oe._title,Ee=oe.key,Me=oe.children,ke=new Set(O===!0?[]:O),tt=[];function ue(X){var L=arguments.length>1&&arguments[1]!==void 0?arguments[1]:null;return X.map(function(se,Q){for(var V=C(L?L.pos:"0",Q),x=y(se[Ee],V),w,H=0;H<ie.length;H+=1){var he=ie[H];if(se[he]!==void 0){w=se[he];break}}var Ke=Object.assign((0,g.Z)(se,[].concat((0,ae.Z)(ie),[Ee,Me])),{title:w,key:x,parent:L,pos:V,children:null,data:se,isStart:[].concat((0,ae.Z)(L?L.isStart:[]),[Q===0]),isEnd:[].concat((0,ae.Z)(L?L.isEnd:[]),[Q===X.length-1])});return tt.push(Ke),O===!0||ke.has(x)?Ke.children=ue(se[Me]||[],Ke):Ke.children=[],Ke})}return ue(D),tt}function Z(D,O,re){var oe={};(0,v.Z)(re)==="object"?oe=re:oe={externalGetKey:re},oe=oe||{};var ie=oe,Ee=ie.childrenPropName,Me=ie.externalGetKey,ke=ie.fieldNames,tt=E(ke),ue=tt.key,X=tt.children,L=Ee||X,se;Me?typeof Me=="string"?se=function(x){return x[Me]}:typeof Me=="function"&&(se=function(x){return Me(x)}):se=function(x,w){return y(x[ue],w)};function Q(V,x,w,H){var he=V?V[L]:D,Ke=V?C(w.pos,x):"0",ft=V?[].concat((0,ae.Z)(H),[V]):[];if(V){var Ue=se(V,Ke),st={node:V,index:x,pos:Ke,key:Ue,parentPos:w.node?w.pos:null,level:w.level+1,nodes:ft};O(st)}he&&he.forEach(function(pt,Et){Q(pt,Et,{node:V,pos:Ke,level:w?w.level+1:-1},ft)})}Q(null)}function U(D){var O=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},re=O.initWrapper,oe=O.processEntity,ie=O.onProcessFinished,Ee=O.externalGetKey,Me=O.childrenPropName,ke=O.fieldNames,tt=arguments.length>2?arguments[2]:void 0,ue=Ee||tt,X={},L={},se={posEntities:X,keyEntities:L};return re&&(se=re(se)||se),Z(D,function(Q){var V=Q.node,x=Q.index,w=Q.pos,H=Q.key,he=Q.parentPos,Ke=Q.level,ft=Q.nodes,Ue={node:V,nodes:ft,index:x,key:H,pos:w,level:Ke},st=y(H,w);X[w]=Ue,L[st]=Ue,Ue.parent=X[he],Ue.parent&&(Ue.parent.children=Ue.parent.children||[],Ue.parent.children.push(Ue)),oe&&oe(Ue,se)},{externalGetKey:ue,childrenPropName:Me,fieldNames:ke}),ie&&ie(se),se}function A(D,O){var re=O.expandedKeys,oe=O.selectedKeys,ie=O.loadedKeys,Ee=O.loadingKeys,Me=O.checkedKeys,ke=O.halfCheckedKeys,tt=O.dragOverNodeKey,ue=O.dropPosition,X=O.keyEntities,L=(0,te.Z)(X,D),se={eventKey:D,expanded:re.indexOf(D)!==-1,selected:oe.indexOf(D)!==-1,loaded:ie.indexOf(D)!==-1,loading:Ee.indexOf(D)!==-1,checked:Me.indexOf(D)!==-1,halfChecked:ke.indexOf(D)!==-1,pos:String(L?L.pos:""),dragOver:tt===D&&ue===0,dragOverGapTop:tt===D&&ue===-1,dragOverGapBottom:tt===D&&ue===1};return se}function K(D){var O=D.data,re=D.expanded,oe=D.selected,ie=D.checked,Ee=D.loaded,Me=D.loading,ke=D.halfChecked,tt=D.dragOver,ue=D.dragOverGapTop,X=D.dragOverGapBottom,L=D.pos,se=D.active,Q=D.eventKey,V=(0,W.Z)((0,W.Z)({},O),{},{expanded:re,selected:oe,checked:ie,loaded:Ee,loading:Me,halfChecked:ke,dragOver:tt,dragOverGapTop:ue,dragOverGapBottom:X,pos:L,active:se,key:Q});return"props"in V||Object.defineProperty(V,"props",{get:function(){return(0,q.ZP)(!1,"Second param return from event is node data instead of TreeNode instance. Please read value directly instead of reading from `props`."),D}}),V}},49658:function(ln,mt){"use strict";mt.Z=function(){if(typeof navigator=="undefined"||typeof window=="undefined")return!1;var m=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(m)||/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(m==null?void 0:m.substr(0,4))}},48911:function(ln,mt,m){"use strict";m.d(mt,{Z:function(){return Ge}});var v=m(60499),ae=m(43749),W=m(85899),fe=m(18642),z=m(72190),g=m(42244),q=m(92310),te=m.n(q),o=m(29301),C=m(70425),M=m(34280),y=m(59301),E=m(4676),T=y.forwardRef(function(je,Re){var _e=je.height,Y=je.offsetY,Le=je.offsetX,Ce=je.children,B=je.prefixCls,P=je.onInnerResize,ce=je.innerProps,ve=je.rtl,de=je.extra,ye={},Te={display:"flex",flexDirection:"column"};return Y!==void 0&&(ye={height:_e,position:"relative",overflow:"hidden"},Te=(0,W.Z)((0,W.Z)({},Te),{},(0,fe.Z)((0,fe.Z)((0,fe.Z)((0,fe.Z)((0,fe.Z)({transform:"translateY(".concat(Y,"px)")},ve?"marginRight":"marginLeft",-Le),"position","absolute"),"left",0),"right",0),"top",0))),y.createElement("div",{style:ye},y.createElement(o.Z,{onResize:function(Ie){var Ae=Ie.offsetHeight;Ae&&P&&P()}},y.createElement("div",(0,v.Z)({style:Te,className:te()((0,fe.Z)({},"".concat(B,"-holder-inner"),B)),ref:Re},ce),Ce,de)))});T.displayName="Filler";var k=T;function j(je){var Re=je.children,_e=je.setRef,Y=y.useCallback(function(Le){_e(Le)},[]);return y.cloneElement(Re,{ref:Y})}function Z(je,Re,_e,Y,Le,Ce,B,P){var ce=P.getKey;return je.slice(Re,_e+1).map(function(ve,de){var ye=Re+de,Te=B(ve,ye,{style:{width:Y},offsetX:Le}),we=ce(ve);return y.createElement(j,{key:we,setRef:function(Ae){return Ce(ve,Ae)}},Te)})}function U(je,Re,_e,Y){var Le=_e-je,Ce=Re-_e,B=Math.min(Le,Ce)*2;if(Y<=B){var P=Math.floor(Y/2);return Y%2?_e+P+1:_e-P}return Le>Ce?_e-(Y-Ce):_e+(Y-Le)}function A(je,Re,_e){var Y=je.length,Le=Re.length,Ce,B;if(Y===0&&Le===0)return null;Y<Le?(Ce=je,B=Re):(Ce=Re,B=je);var P={__EMPTY_ITEM__:!0};function ce(Ie){return Ie!==void 0?_e(Ie):P}for(var ve=null,de=Math.abs(Y-Le)!==1,ye=0;ye<B.length;ye+=1){var Te=ce(Ce[ye]),we=ce(B[ye]);if(Te!==we){ve=ye,de=de||Te!==ce(B[ye+1]);break}}return ve===null?null:{index:ve,multiple:de}}function K(je,Re,_e){var Y=y.useState(je),Le=(0,z.Z)(Y,2),Ce=Le[0],B=Le[1],P=y.useState(null),ce=(0,z.Z)(P,2),ve=ce[0],de=ce[1];return y.useEffect(function(){var ye=A(Ce||[],je||[],Re);(ye==null?void 0:ye.index)!==void 0&&(_e==null||_e(ye.index),de(je[ye.index])),B(je)},[je]),[ve]}var D=m(16089),O=(typeof navigator=="undefined"?"undefined":(0,ae.Z)(navigator))==="object"&&/Firefox/i.test(navigator.userAgent),re=O,oe=function(je,Re,_e,Y){var Le=(0,y.useRef)(!1),Ce=(0,y.useRef)(null);function B(){clearTimeout(Ce.current),Le.current=!0,Ce.current=setTimeout(function(){Le.current=!1},50)}var P=(0,y.useRef)({top:je,bottom:Re,left:_e,right:Y});return P.current.top=je,P.current.bottom=Re,P.current.left=_e,P.current.right=Y,function(ce,ve){var de=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1,ye=ce?ve<0&&P.current.left||ve>0&&P.current.right:ve<0&&P.current.top||ve>0&&P.current.bottom;return de&&ye?(clearTimeout(Ce.current),Le.current=!1):(!ye||Le.current)&&B(),!Le.current&&ye}};function ie(je,Re,_e,Y,Le,Ce,B){var P=(0,y.useRef)(0),ce=(0,y.useRef)(null),ve=(0,y.useRef)(null),de=(0,y.useRef)(!1),ye=oe(Re,_e,Y,Le);function Te(ht,nt){if(D.Z.cancel(ce.current),!ye(!1,nt)){var Oe=ht;if(!Oe._virtualHandled)Oe._virtualHandled=!0;else return;P.current+=nt,ve.current=nt,re||Oe.preventDefault(),ce.current=(0,D.Z)(function(){var qe=de.current?10:1;B(P.current*qe,!1),P.current=0})}}function we(ht,nt){B(nt,!0),re||ht.preventDefault()}var Ie=(0,y.useRef)(null),Ae=(0,y.useRef)(null);function Xe(ht){if(je){D.Z.cancel(Ae.current),Ae.current=(0,D.Z)(function(){Ie.current=null},2);var nt=ht.deltaX,Oe=ht.deltaY,qe=ht.shiftKey,rt=nt,ot=Oe;(Ie.current==="sx"||!Ie.current&&qe&&Oe&&!nt)&&(rt=Oe,ot=0,Ie.current="sx");var Rt=Math.abs(rt),S=Math.abs(ot);Ie.current===null&&(Ie.current=Ce&&Rt>S?"x":"y"),Ie.current==="y"?Te(ht,ot):we(ht,rt)}}function gt(ht){je&&(de.current=ht.detail===ve.current)}return[Xe,gt]}function Ee(je,Re,_e,Y){var Le=y.useMemo(function(){return[new Map,[]]},[je,_e.id,Y]),Ce=(0,z.Z)(Le,2),B=Ce[0],P=Ce[1],ce=function(de){var ye=arguments.length>1&&arguments[1]!==void 0?arguments[1]:de,Te=B.get(de),we=B.get(ye);if(Te===void 0||we===void 0)for(var Ie=je.length,Ae=P.length;Ae<Ie;Ae+=1){var Xe,gt=je[Ae],ht=Re(gt);B.set(ht,Ae);var nt=(Xe=_e.get(ht))!==null&&Xe!==void 0?Xe:Y;if(P[Ae]=(P[Ae-1]||0)+nt,ht===de&&(Te=Ae),ht===ye&&(we=Ae),Te!==void 0&&we!==void 0)break}return{top:P[Te-1]||0,bottom:P[we]}};return ce}var Me=m(38705),ke=m(17212),tt=function(){function je(){(0,Me.Z)(this,je),(0,fe.Z)(this,"maps",void 0),(0,fe.Z)(this,"id",0),(0,fe.Z)(this,"diffRecords",new Map),this.maps=Object.create(null)}return(0,ke.Z)(je,[{key:"set",value:function(_e,Y){this.diffRecords.set(_e,this.maps[_e]),this.maps[_e]=Y,this.id+=1}},{key:"get",value:function(_e){return this.maps[_e]}},{key:"resetRecord",value:function(){this.diffRecords.clear()}},{key:"getRecord",value:function(){return this.diffRecords}}]),je}(),ue=tt;function X(je){var Re=parseFloat(je);return isNaN(Re)?0:Re}function L(je,Re,_e){var Y=y.useState(0),Le=(0,z.Z)(Y,2),Ce=Le[0],B=Le[1],P=(0,y.useRef)(new Map),ce=(0,y.useRef)(new ue),ve=(0,y.useRef)(0);function de(){ve.current+=1}function ye(){var we=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!1;de();var Ie=function(){var gt=!1;P.current.forEach(function(ht,nt){if(ht&&ht.offsetParent){var Oe=ht.offsetHeight,qe=getComputedStyle(ht),rt=qe.marginTop,ot=qe.marginBottom,Rt=X(rt),S=X(ot),R=Oe+Rt+S;ce.current.get(nt)!==R&&(ce.current.set(nt,R),gt=!0)}}),gt&&B(function(ht){return ht+1})};if(we)Ie();else{ve.current+=1;var Ae=ve.current;Promise.resolve().then(function(){Ae===ve.current&&Ie()})}}function Te(we,Ie){var Ae=je(we),Xe=P.current.get(Ae);Ie?(P.current.set(Ae,Ie),ye()):P.current.delete(Ae),!Xe!=!Ie&&(Ie?Re==null||Re(we):_e==null||_e(we))}return(0,y.useEffect)(function(){return de},[]),[Te,ye,ce.current,Ce]}var se=14/15;function Q(je,Re,_e){var Y=(0,y.useRef)(!1),Le=(0,y.useRef)(0),Ce=(0,y.useRef)(0),B=(0,y.useRef)(null),P=(0,y.useRef)(null),ce,ve=function(we){if(Y.current){var Ie=Math.ceil(we.touches[0].pageX),Ae=Math.ceil(we.touches[0].pageY),Xe=Le.current-Ie,gt=Ce.current-Ae,ht=Math.abs(Xe)>Math.abs(gt);ht?Le.current=Ie:Ce.current=Ae;var nt=_e(ht,ht?Xe:gt,!1,we);nt&&we.preventDefault(),clearInterval(P.current),nt&&(P.current=setInterval(function(){ht?Xe*=se:gt*=se;var Oe=Math.floor(ht?Xe:gt);(!_e(ht,Oe,!0)||Math.abs(Oe)<=.1)&&clearInterval(P.current)},16))}},de=function(){Y.current=!1,ce()},ye=function(we){ce(),we.touches.length===1&&!Y.current&&(Y.current=!0,Le.current=Math.ceil(we.touches[0].pageX),Ce.current=Math.ceil(we.touches[0].pageY),B.current=we.target,B.current.addEventListener("touchmove",ve,{passive:!1}),B.current.addEventListener("touchend",de,{passive:!0}))};ce=function(){B.current&&(B.current.removeEventListener("touchmove",ve),B.current.removeEventListener("touchend",de))},(0,M.Z)(function(){return je&&Re.current.addEventListener("touchstart",ye,{passive:!0}),function(){var Te;(Te=Re.current)===null||Te===void 0||Te.removeEventListener("touchstart",ye),ce(),clearInterval(P.current)}},[je])}function V(je){return Math.floor(Math.pow(je,.5))}function x(je,Re){var _e="touches"in je?je.touches[0]:je;return _e[Re?"pageX":"pageY"]-window[Re?"scrollX":"scrollY"]}function w(je,Re,_e){y.useEffect(function(){var Y=Re.current;if(je&&Y){var Le=!1,Ce,B,P=function(){D.Z.cancel(Ce)},ce=function Te(){P(),Ce=(0,D.Z)(function(){_e(B),Te()})},ve=function(){Le=!1,P()},de=function(we){if(!(we.target.draggable||we.button!==0)){var Ie=we;Ie._virtualHandled||(Ie._virtualHandled=!0,Le=!0)}},ye=function(we){if(Le){var Ie=x(we,!1),Ae=Y.getBoundingClientRect(),Xe=Ae.top,gt=Ae.bottom;if(Ie<=Xe){var ht=Xe-Ie;B=-V(ht),ce()}else if(Ie>=gt){var nt=Ie-gt;B=V(nt),ce()}else P()}};return Y.addEventListener("mousedown",de),Y.ownerDocument.addEventListener("mouseup",ve),Y.ownerDocument.addEventListener("mousemove",ye),Y.ownerDocument.addEventListener("dragend",ve),function(){Y.removeEventListener("mousedown",de),Y.ownerDocument.removeEventListener("mouseup",ve),Y.ownerDocument.removeEventListener("mousemove",ye),Y.ownerDocument.removeEventListener("dragend",ve),P()}}},[je])}var H=10;function he(je,Re,_e,Y,Le,Ce,B,P){var ce=y.useRef(),ve=y.useState(null),de=(0,z.Z)(ve,2),ye=de[0],Te=de[1];return(0,M.Z)(function(){if(ye&&ye.times<H){if(!je.current){Te(function(pe){return(0,W.Z)({},pe)});return}Ce();var we=ye.targetAlign,Ie=ye.originAlign,Ae=ye.index,Xe=ye.offset,gt=je.current.clientHeight,ht=!1,nt=we,Oe=null;if(gt){for(var qe=we||Ie,rt=0,ot=0,Rt=0,S=Math.min(Re.length-1,Ae),R=0;R<=S;R+=1){var Ze=Le(Re[R]);ot=rt;var J=_e.get(Ze);Rt=ot+(J===void 0?Y:J),rt=Rt}for(var be=qe==="top"?Xe:gt-Xe,zt=S;zt>=0;zt-=1){var ze=Le(Re[zt]),Qe=_e.get(ze);if(Qe===void 0){ht=!0;break}if(be-=Qe,be<=0)break}switch(qe){case"top":Oe=ot-Xe;break;case"bottom":Oe=Rt-gt+Xe;break;default:{var lt=je.current.scrollTop,le=lt+gt;ot<lt?nt="top":Rt>le&&(nt="bottom")}}Oe!==null&&B(Oe),Oe!==ye.lastTop&&(ht=!0)}ht&&Te((0,W.Z)((0,W.Z)({},ye),{},{times:ye.times+1,targetAlign:nt,lastTop:Oe}))}},[ye,je.current]),function(we){if(we==null){P();return}if(D.Z.cancel(ce.current),typeof we=="number")B(we);else if(we&&(0,ae.Z)(we)==="object"){var Ie,Ae=we.align;"index"in we?Ie=we.index:Ie=Re.findIndex(function(ht){return Le(ht)===we.key});var Xe=we.offset,gt=Xe===void 0?0:Xe;Te({times:0,index:Ie,offset:gt,originAlign:Ae})}}}var Ke=y.forwardRef(function(je,Re){var _e=je.prefixCls,Y=je.rtl,Le=je.scrollOffset,Ce=je.scrollRange,B=je.onStartMove,P=je.onStopMove,ce=je.onScroll,ve=je.horizontal,de=je.spinSize,ye=je.containerSize,Te=je.style,we=je.thumbStyle,Ie=je.showScrollBar,Ae=y.useState(!1),Xe=(0,z.Z)(Ae,2),gt=Xe[0],ht=Xe[1],nt=y.useState(null),Oe=(0,z.Z)(nt,2),qe=Oe[0],rt=Oe[1],ot=y.useState(null),Rt=(0,z.Z)(ot,2),S=Rt[0],R=Rt[1],Ze=!Y,J=y.useRef(),be=y.useRef(),zt=y.useState(Ie),ze=(0,z.Z)(zt,2),Qe=ze[0],lt=ze[1],le=y.useRef(),pe=function(){Ie===!0||Ie===!1||(clearTimeout(le.current),lt(!0),le.current=setTimeout(function(){lt(!1)},3e3))},Pe=Ce-ye||0,$e=ye-de||0,G=y.useMemo(function(){if(Le===0||Pe===0)return 0;var mn=Le/Pe;return mn*$e},[Le,Pe,$e]),bt=function(yn){yn.stopPropagation(),yn.preventDefault()},xe=y.useRef({top:G,dragging:gt,pageY:qe,startTop:S});xe.current={top:G,dragging:gt,pageY:qe,startTop:S};var Bt=function(yn){ht(!0),rt(x(yn,ve)),R(xe.current.top),B(),yn.stopPropagation(),yn.preventDefault()};y.useEffect(function(){var mn=function(Zt){Zt.preventDefault()},yn=J.current,rn=be.current;return yn.addEventListener("touchstart",mn,{passive:!1}),rn.addEventListener("touchstart",Bt,{passive:!1}),function(){yn.removeEventListener("touchstart",mn),rn.removeEventListener("touchstart",Bt)}},[]);var en=y.useRef();en.current=Pe;var dn=y.useRef();dn.current=$e,y.useEffect(function(){if(gt){var mn,yn=function(Zt){var Dt=xe.current,Mt=Dt.dragging,gn=Dt.pageY,Ln=Dt.startTop;D.Z.cancel(mn);var ut=J.current.getBoundingClientRect(),ct=ye/(ve?ut.width:ut.height);if(Mt){var Se=(x(Zt,ve)-gn)*ct,He=Ln;!Ze&&ve?He-=Se:He+=Se;var it=en.current,Je=dn.current,yt=Je?He/Je:0,$t=Math.ceil(yt*it);$t=Math.max($t,0),$t=Math.min($t,it),mn=(0,D.Z)(function(){ce($t,ve)})}},rn=function(){ht(!1),P()};return window.addEventListener("mousemove",yn,{passive:!0}),window.addEventListener("touchmove",yn,{passive:!0}),window.addEventListener("mouseup",rn,{passive:!0}),window.addEventListener("touchend",rn,{passive:!0}),function(){window.removeEventListener("mousemove",yn),window.removeEventListener("touchmove",yn),window.removeEventListener("mouseup",rn),window.removeEventListener("touchend",rn),D.Z.cancel(mn)}}},[gt]),y.useEffect(function(){return pe(),function(){clearTimeout(le.current)}},[Le]),y.useImperativeHandle(Re,function(){return{delayHidden:pe}});var Hn="".concat(_e,"-scrollbar"),wt={position:"absolute",visibility:Qe?null:"hidden"},Gt={position:"absolute",borderRadius:99,background:"var(--rc-virtual-list-scrollbar-bg, rgba(0, 0, 0, 0.5))",cursor:"pointer",userSelect:"none"};return ve?(Object.assign(wt,{height:8,left:0,right:0,bottom:0}),Object.assign(Gt,(0,fe.Z)({height:"100%",width:de},Ze?"left":"right",G))):(Object.assign(wt,(0,fe.Z)({width:8,top:0,bottom:0},Ze?"right":"left",0)),Object.assign(Gt,{width:"100%",height:de,top:G})),y.createElement("div",{ref:J,className:te()(Hn,(0,fe.Z)((0,fe.Z)((0,fe.Z)({},"".concat(Hn,"-horizontal"),ve),"".concat(Hn,"-vertical"),!ve),"".concat(Hn,"-visible"),Qe)),style:(0,W.Z)((0,W.Z)({},wt),Te),onMouseDown:bt,onMouseMove:pe},y.createElement("div",{ref:be,className:te()("".concat(Hn,"-thumb"),(0,fe.Z)({},"".concat(Hn,"-thumb-moving"),gt)),style:(0,W.Z)((0,W.Z)({},Gt),we),onMouseDown:Bt}))}),ft=Ke,Ue=20;function st(){var je=arguments.length>0&&arguments[0]!==void 0?arguments[0]:0,Re=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,_e=je/Re*je;return isNaN(_e)&&(_e=0),_e=Math.max(_e,Ue),Math.floor(_e)}var pt=["prefixCls","className","height","itemHeight","fullHeight","style","data","children","itemKey","virtual","direction","scrollWidth","component","onScroll","onVirtualScroll","onVisibleChange","innerProps","extraRender","styles","showScrollBar"],Et=[],Ne={overflowY:"auto",overflowAnchor:"none"};function St(je,Re){var _e=je.prefixCls,Y=_e===void 0?"rc-virtual-list":_e,Le=je.className,Ce=je.height,B=je.itemHeight,P=je.fullHeight,ce=P===void 0?!0:P,ve=je.style,de=je.data,ye=je.children,Te=je.itemKey,we=je.virtual,Ie=je.direction,Ae=je.scrollWidth,Xe=je.component,gt=Xe===void 0?"div":Xe,ht=je.onScroll,nt=je.onVirtualScroll,Oe=je.onVisibleChange,qe=je.innerProps,rt=je.extraRender,ot=je.styles,Rt=je.showScrollBar,S=Rt===void 0?"optional":Rt,R=(0,g.Z)(je,pt),Ze=y.useCallback(function(jt){return typeof Te=="function"?Te(jt):jt==null?void 0:jt[Te]},[Te]),J=L(Ze,null,null),be=(0,z.Z)(J,4),zt=be[0],ze=be[1],Qe=be[2],lt=be[3],le=!!(we!==!1&&Ce&&B),pe=y.useMemo(function(){return Object.values(Qe.maps).reduce(function(jt,Vt){return jt+Vt},0)},[Qe.id,Qe.maps]),Pe=le&&de&&(Math.max(B*de.length,pe)>Ce||!!Ae),$e=Ie==="rtl",G=te()(Y,(0,fe.Z)({},"".concat(Y,"-rtl"),$e),Le),bt=de||Et,xe=(0,y.useRef)(),Bt=(0,y.useRef)(),en=(0,y.useRef)(),dn=(0,y.useState)(0),Hn=(0,z.Z)(dn,2),wt=Hn[0],Gt=Hn[1],mn=(0,y.useState)(0),yn=(0,z.Z)(mn,2),rn=yn[0],En=yn[1],Zt=(0,y.useState)(!1),Dt=(0,z.Z)(Zt,2),Mt=Dt[0],gn=Dt[1],Ln=function(){gn(!0)},ut=function(){gn(!1)},ct={getKey:Ze};function Se(jt){Gt(function(Vt){var un;typeof jt=="function"?un=jt(Vt):un=jt;var Cn=Wn(un);return xe.current.scrollTop=Cn,Cn})}var He=(0,y.useRef)({start:0,end:bt.length}),it=(0,y.useRef)(),Je=K(bt,Ze),yt=(0,z.Z)(Je,1),$t=yt[0];it.current=$t;var Jt=y.useMemo(function(){if(!le)return{scrollHeight:void 0,start:0,end:bt.length-1,offset:void 0};if(!Pe){var jt;return{scrollHeight:((jt=Bt.current)===null||jt===void 0?void 0:jt.offsetHeight)||0,start:0,end:bt.length-1,offset:void 0}}for(var Vt=0,un,Cn,Vn,tr=bt.length,tn=0;tn<tr;tn+=1){var Yn=bt[tn],vr=Ze(Yn),Lr=Qe.get(vr),Br=Vt+(Lr===void 0?B:Lr);Br>=wt&&un===void 0&&(un=tn,Cn=Vt),Br>wt+Ce&&Vn===void 0&&(Vn=tn),Vt=Br}return un===void 0&&(un=0,Cn=0,Vn=Math.ceil(Ce/B)),Vn===void 0&&(Vn=bt.length-1),Vn=Math.min(Vn+1,bt.length-1),{scrollHeight:Vt,start:un,end:Vn,offset:Cn}},[Pe,le,wt,bt,lt,Ce]),nn=Jt.scrollHeight,Ht=Jt.start,Qt=Jt.end,pn=Jt.offset;He.current.start=Ht,He.current.end=Qt,y.useLayoutEffect(function(){var jt=Qe.getRecord();if(jt.size===1){var Vt=Array.from(jt.keys())[0],un=jt.get(Vt),Cn=bt[Ht];if(Cn&&un===void 0){var Vn=Ze(Cn);if(Vn===Vt){var tr=Qe.get(Vt),tn=tr-B;Se(function(Yn){return Yn+tn})}}}Qe.resetRecord()},[nn]);var qt=y.useState({width:0,height:Ce}),Ye=(0,z.Z)(qt,2),vt=Ye[0],Ct=Ye[1],_t=function(Vt){Ct({width:Vt.offsetWidth,height:Vt.offsetHeight})},At=(0,y.useRef)(),kt=(0,y.useRef)(),Wt=y.useMemo(function(){return st(vt.width,Ae)},[vt.width,Ae]),Kt=y.useMemo(function(){return st(vt.height,nn)},[vt.height,nn]),on=nn-Ce,cn=(0,y.useRef)(on);cn.current=on;function Wn(jt){var Vt=jt;return Number.isNaN(cn.current)||(Vt=Math.min(Vt,cn.current)),Vt=Math.max(Vt,0),Vt}var bn=wt<=0,fn=wt>=on,In=rn<=0,On=rn>=Ae,Zn=oe(bn,fn,In,On),An=function(){return{x:$e?-rn:rn,y:wt}},Mn=(0,y.useRef)(An()),Nn=(0,C.zX)(function(jt){if(nt){var Vt=(0,W.Z)((0,W.Z)({},An()),jt);(Mn.current.x!==Vt.x||Mn.current.y!==Vt.y)&&(nt(Vt),Mn.current=Vt)}});function jn(jt,Vt){var un=jt;Vt?((0,E.flushSync)(function(){En(un)}),Nn()):Se(un)}function zn(jt){var Vt=jt.currentTarget.scrollTop;Vt!==wt&&Se(Vt),ht==null||ht(jt),Nn()}var Dn=function(Vt){var un=Vt,Cn=Ae?Ae-vt.width:0;return un=Math.max(un,0),un=Math.min(un,Cn),un},Bn=(0,C.zX)(function(jt,Vt){Vt?((0,E.flushSync)(function(){En(function(un){var Cn=un+($e?-jt:jt);return Dn(Cn)})}),Nn()):Se(function(un){var Cn=un+jt;return Cn})}),Sn=ie(le,bn,fn,In,On,!!Ae,Bn),cr=(0,z.Z)(Sn,2),Tt=cr[0],Fn=cr[1];Q(le,xe,function(jt,Vt,un,Cn){var Vn=Cn;return Zn(jt,Vt,un)?!1:!Vn||!Vn._virtualHandled?(Vn&&(Vn._virtualHandled=!0),Tt({preventDefault:function(){},deltaX:jt?Vt:0,deltaY:jt?0:Vt}),!0):!1}),w(Pe,xe,function(jt){Se(function(Vt){return Vt+jt})}),(0,M.Z)(function(){function jt(un){var Cn=bn&&un.detail<0,Vn=fn&&un.detail>0;le&&!Cn&&!Vn&&un.preventDefault()}var Vt=xe.current;return Vt.addEventListener("wheel",Tt,{passive:!1}),Vt.addEventListener("DOMMouseScroll",Fn,{passive:!0}),Vt.addEventListener("MozMousePixelScroll",jt,{passive:!1}),function(){Vt.removeEventListener("wheel",Tt),Vt.removeEventListener("DOMMouseScroll",Fn),Vt.removeEventListener("MozMousePixelScroll",jt)}},[le,bn,fn]),(0,M.Z)(function(){if(Ae){var jt=Dn(rn);En(jt),Nn({x:jt})}},[vt.width,Ae]);var Kn=function(){var Vt,un;(Vt=At.current)===null||Vt===void 0||Vt.delayHidden(),(un=kt.current)===null||un===void 0||un.delayHidden()},Dr=he(xe,bt,Qe,B,Ze,function(){return ze(!0)},Se,Kn);y.useImperativeHandle(Re,function(){return{nativeElement:en.current,getScrollInfo:An,scrollTo:function(Vt){function un(Cn){return Cn&&(0,ae.Z)(Cn)==="object"&&("left"in Cn||"top"in Cn)}un(Vt)?(Vt.left!==void 0&&En(Dn(Vt.left)),Dr(Vt.top)):Dr(Vt)}}}),(0,M.Z)(function(){if(Oe){var jt=bt.slice(Ht,Qt+1);Oe(jt,bt)}},[Ht,Qt,bt]);var gr=Ee(bt,Ze,Qe,B),Or=rt==null?void 0:rt({start:Ht,end:Qt,virtual:Pe,offsetX:rn,offsetY:pn,rtl:$e,getSize:gr}),Cr=Z(bt,Ht,Qt,Ae,rn,zt,ye,ct),_n=null;Ce&&(_n=(0,W.Z)((0,fe.Z)({},ce?"height":"maxHeight",Ce),Ne),le&&(_n.overflowY="hidden",Ae&&(_n.overflowX="hidden"),Mt&&(_n.pointerEvents="none")));var wn={};return $e&&(wn.dir="rtl"),y.createElement("div",(0,v.Z)({ref:en,style:(0,W.Z)((0,W.Z)({},ve),{},{position:"relative"}),className:G},wn,R),y.createElement(o.Z,{onResize:_t},y.createElement(gt,{className:"".concat(Y,"-holder"),style:_n,ref:xe,onScroll:zn,onMouseEnter:Kn},y.createElement(k,{prefixCls:Y,height:nn,offsetX:rn,offsetY:pn,scrollWidth:Ae,onInnerResize:ze,ref:Bt,innerProps:qe,rtl:$e,extra:Or},Cr))),Pe&&nn>Ce&&y.createElement(ft,{ref:At,prefixCls:Y,scrollOffset:wt,scrollRange:nn,rtl:$e,onScroll:jn,onStartMove:Ln,onStopMove:ut,spinSize:Kt,containerSize:vt.height,style:ot==null?void 0:ot.verticalScrollBar,thumbStyle:ot==null?void 0:ot.verticalScrollBarThumb,showScrollBar:S}),Pe&&Ae>vt.width&&y.createElement(ft,{ref:kt,prefixCls:Y,scrollOffset:rn,scrollRange:Ae,rtl:$e,onScroll:jn,onStartMove:Ln,onStopMove:ut,spinSize:Wt,containerSize:vt.width,horizontal:!0,style:ot==null?void 0:ot.horizontalScrollBar,thumbStyle:ot==null?void 0:ot.horizontalScrollBarThumb,showScrollBar:S}))}var at=y.forwardRef(St);at.displayName="List";var Nt=at,Ge=Nt},83145:function(ln,mt,m){"use strict";Object.defineProperty(mt,"__esModule",{value:!0}),mt.CopyToClipboard=void 0;var v=W(m(59301)),ae=W(m(25769));function W(A){return A&&A.__esModule?A:{default:A}}function fe(A){return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?fe=function(D){return typeof D}:fe=function(D){return D&&typeof Symbol=="function"&&D.constructor===Symbol&&D!==Symbol.prototype?"symbol":typeof D},fe(A)}function z(A,K){var D=Object.keys(A);if(Object.getOwnPropertySymbols){var O=Object.getOwnPropertySymbols(A);K&&(O=O.filter(function(re){return Object.getOwnPropertyDescriptor(A,re).enumerable})),D.push.apply(D,O)}return D}function g(A){for(var K=1;K<arguments.length;K++){var D=arguments[K]!=null?arguments[K]:{};K%2?z(D,!0).forEach(function(O){Z(A,O,D[O])}):Object.getOwnPropertyDescriptors?Object.defineProperties(A,Object.getOwnPropertyDescriptors(D)):z(D).forEach(function(O){Object.defineProperty(A,O,Object.getOwnPropertyDescriptor(D,O))})}return A}function q(A,K){if(A==null)return{};var D=te(A,K),O,re;if(Object.getOwnPropertySymbols){var oe=Object.getOwnPropertySymbols(A);for(re=0;re<oe.length;re++)O=oe[re],!(K.indexOf(O)>=0)&&Object.prototype.propertyIsEnumerable.call(A,O)&&(D[O]=A[O])}return D}function te(A,K){if(A==null)return{};var D={},O=Object.keys(A),re,oe;for(oe=0;oe<O.length;oe++)re=O[oe],!(K.indexOf(re)>=0)&&(D[re]=A[re]);return D}function o(A,K){if(!(A instanceof K))throw new TypeError("Cannot call a class as a function")}function C(A,K){for(var D=0;D<K.length;D++){var O=K[D];O.enumerable=O.enumerable||!1,O.configurable=!0,"value"in O&&(O.writable=!0),Object.defineProperty(A,O.key,O)}}function M(A,K,D){return K&&C(A.prototype,K),D&&C(A,D),A}function y(A,K){return K&&(fe(K)==="object"||typeof K=="function")?K:T(A)}function E(A){return E=Object.setPrototypeOf?Object.getPrototypeOf:function(D){return D.__proto__||Object.getPrototypeOf(D)},E(A)}function T(A){if(A===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return A}function k(A,K){if(typeof K!="function"&&K!==null)throw new TypeError("Super expression must either be null or a function");A.prototype=Object.create(K&&K.prototype,{constructor:{value:A,writable:!0,configurable:!0}}),K&&j(A,K)}function j(A,K){return j=Object.setPrototypeOf||function(O,re){return O.__proto__=re,O},j(A,K)}function Z(A,K,D){return K in A?Object.defineProperty(A,K,{value:D,enumerable:!0,configurable:!0,writable:!0}):A[K]=D,A}var U=function(A){k(K,A);function K(){var D,O;o(this,K);for(var re=arguments.length,oe=new Array(re),ie=0;ie<re;ie++)oe[ie]=arguments[ie];return O=y(this,(D=E(K)).call.apply(D,[this].concat(oe))),Z(T(O),"onClick",function(Ee){var Me=O.props,ke=Me.text,tt=Me.onCopy,ue=Me.children,X=Me.options,L=v.default.Children.only(ue),se=(0,ae.default)(ke,X);tt&&tt(ke,se),L&&L.props&&typeof L.props.onClick=="function"&&L.props.onClick(Ee)}),O}return M(K,[{key:"render",value:function(){var O=this.props,re=O.text,oe=O.onCopy,ie=O.options,Ee=O.children,Me=q(O,["text","onCopy","options","children"]),ke=v.default.Children.only(Ee);return v.default.cloneElement(ke,g({},Me,{onClick:this.onClick}))}}]),K}(v.default.PureComponent);mt.CopyToClipboard=U,Z(U,"defaultProps",{onCopy:void 0,options:void 0})},56102:function(ln,mt,m){"use strict";var v=m(83145),ae=v.CopyToClipboard;ae.CopyToClipboard=ae,ln.exports=ae},76374:function(ln,mt,m){"use strict";var v=function(){if(typeof Map!="undefined")return Map;function ue(X,L){var se=-1;return X.some(function(Q,V){return Q[0]===L?(se=V,!0):!1}),se}return function(){function X(){this.__entries__=[]}return Object.defineProperty(X.prototype,"size",{get:function(){return this.__entries__.length},enumerable:!0,configurable:!0}),X.prototype.get=function(L){var se=ue(this.__entries__,L),Q=this.__entries__[se];return Q&&Q[1]},X.prototype.set=function(L,se){var Q=ue(this.__entries__,L);~Q?this.__entries__[Q][1]=se:this.__entries__.push([L,se])},X.prototype.delete=function(L){var se=this.__entries__,Q=ue(se,L);~Q&&se.splice(Q,1)},X.prototype.has=function(L){return!!~ue(this.__entries__,L)},X.prototype.clear=function(){this.__entries__.splice(0)},X.prototype.forEach=function(L,se){se===void 0&&(se=null);for(var Q=0,V=this.__entries__;Q<V.length;Q++){var x=V[Q];L.call(se,x[1],x[0])}},X}()}(),ae=typeof window!="undefined"&&typeof document!="undefined"&&window.document===document,W=function(){return typeof m.g!="undefined"&&m.g.Math===Math?m.g:typeof self!="undefined"&&self.Math===Math?self:typeof window!="undefined"&&window.Math===Math?window:Function("return this")()}(),fe=function(){return typeof requestAnimationFrame=="function"?requestAnimationFrame.bind(W):function(ue){return setTimeout(function(){return ue(Date.now())},1e3/60)}}(),z=2;function g(ue,X){var L=!1,se=!1,Q=0;function V(){L&&(L=!1,ue()),se&&w()}function x(){fe(V)}function w(){var H=Date.now();if(L){if(H-Q<z)return;se=!0}else L=!0,se=!1,setTimeout(x,X);Q=H}return w}var q=20,te=["top","right","bottom","left","width","height","size","weight"],o=typeof MutationObserver!="undefined",C=function(){function ue(){this.connected_=!1,this.mutationEventsAdded_=!1,this.mutationsObserver_=null,this.observers_=[],this.onTransitionEnd_=this.onTransitionEnd_.bind(this),this.refresh=g(this.refresh.bind(this),q)}return ue.prototype.addObserver=function(X){~this.observers_.indexOf(X)||this.observers_.push(X),this.connected_||this.connect_()},ue.prototype.removeObserver=function(X){var L=this.observers_,se=L.indexOf(X);~se&&L.splice(se,1),!L.length&&this.connected_&&this.disconnect_()},ue.prototype.refresh=function(){var X=this.updateObservers_();X&&this.refresh()},ue.prototype.updateObservers_=function(){var X=this.observers_.filter(function(L){return L.gatherActive(),L.hasActive()});return X.forEach(function(L){return L.broadcastActive()}),X.length>0},ue.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)},ue.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)},ue.prototype.onTransitionEnd_=function(X){var L=X.propertyName,se=L===void 0?"":L,Q=te.some(function(V){return!!~se.indexOf(V)});Q&&this.refresh()},ue.getInstance=function(){return this.instance_||(this.instance_=new ue),this.instance_},ue.instance_=null,ue}(),M=function(ue,X){for(var L=0,se=Object.keys(X);L<se.length;L++){var Q=se[L];Object.defineProperty(ue,Q,{value:X[Q],enumerable:!1,writable:!1,configurable:!0})}return ue},y=function(ue){var X=ue&&ue.ownerDocument&&ue.ownerDocument.defaultView;return X||W},E=re(0,0,0,0);function T(ue){return parseFloat(ue)||0}function k(ue){for(var X=[],L=1;L<arguments.length;L++)X[L-1]=arguments[L];return X.reduce(function(se,Q){var V=ue["border-"+Q+"-width"];return se+T(V)},0)}function j(ue){for(var X=["top","right","bottom","left"],L={},se=0,Q=X;se<Q.length;se++){var V=Q[se],x=ue["padding-"+V];L[V]=T(x)}return L}function Z(ue){var X=ue.getBBox();return re(0,0,X.width,X.height)}function U(ue){var X=ue.clientWidth,L=ue.clientHeight;if(!X&&!L)return E;var se=y(ue).getComputedStyle(ue),Q=j(se),V=Q.left+Q.right,x=Q.top+Q.bottom,w=T(se.width),H=T(se.height);if(se.boxSizing==="border-box"&&(Math.round(w+V)!==X&&(w-=k(se,"left","right")+V),Math.round(H+x)!==L&&(H-=k(se,"top","bottom")+x)),!K(ue)){var he=Math.round(w+V)-X,Ke=Math.round(H+x)-L;Math.abs(he)!==1&&(w-=he),Math.abs(Ke)!==1&&(H-=Ke)}return re(Q.left,Q.top,w,H)}var A=function(){return typeof SVGGraphicsElement!="undefined"?function(ue){return ue instanceof y(ue).SVGGraphicsElement}:function(ue){return ue instanceof y(ue).SVGElement&&typeof ue.getBBox=="function"}}();function K(ue){return ue===y(ue).document.documentElement}function D(ue){return ae?A(ue)?Z(ue):U(ue):E}function O(ue){var X=ue.x,L=ue.y,se=ue.width,Q=ue.height,V=typeof DOMRectReadOnly!="undefined"?DOMRectReadOnly:Object,x=Object.create(V.prototype);return M(x,{x:X,y:L,width:se,height:Q,top:L,right:X+se,bottom:Q+L,left:X}),x}function re(ue,X,L,se){return{x:ue,y:X,width:L,height:se}}var oe=function(){function ue(X){this.broadcastWidth=0,this.broadcastHeight=0,this.contentRect_=re(0,0,0,0),this.target=X}return ue.prototype.isActive=function(){var X=D(this.target);return this.contentRect_=X,X.width!==this.broadcastWidth||X.height!==this.broadcastHeight},ue.prototype.broadcastRect=function(){var X=this.contentRect_;return this.broadcastWidth=X.width,this.broadcastHeight=X.height,X},ue}(),ie=function(){function ue(X,L){var se=O(L);M(this,{target:X,contentRect:se})}return ue}(),Ee=function(){function ue(X,L,se){if(this.activeObservations_=[],this.observations_=new v,typeof X!="function")throw new TypeError("The callback provided as parameter 1 is not a function.");this.callback_=X,this.controller_=L,this.callbackCtx_=se}return ue.prototype.observe=function(X){if(!arguments.length)throw new TypeError("1 argument required, but only 0 present.");if(!(typeof Element=="undefined"||!(Element instanceof Object))){if(!(X instanceof y(X).Element))throw new TypeError('parameter 1 is not of type "Element".');var L=this.observations_;L.has(X)||(L.set(X,new oe(X)),this.controller_.addObserver(this),this.controller_.refresh())}},ue.prototype.unobserve=function(X){if(!arguments.length)throw new TypeError("1 argument required, but only 0 present.");if(!(typeof Element=="undefined"||!(Element instanceof Object))){if(!(X instanceof y(X).Element))throw new TypeError('parameter 1 is not of type "Element".');var L=this.observations_;L.has(X)&&(L.delete(X),L.size||this.controller_.removeObserver(this))}},ue.prototype.disconnect=function(){this.clearActive(),this.observations_.clear(),this.controller_.removeObserver(this)},ue.prototype.gatherActive=function(){var X=this;this.clearActive(),this.observations_.forEach(function(L){L.isActive()&&X.activeObservations_.push(L)})},ue.prototype.broadcastActive=function(){if(this.hasActive()){var X=this.callbackCtx_,L=this.activeObservations_.map(function(se){return new ie(se.target,se.broadcastRect())});this.callback_.call(X,L,X),this.clearActive()}},ue.prototype.clearActive=function(){this.activeObservations_.splice(0)},ue.prototype.hasActive=function(){return this.activeObservations_.length>0},ue}(),Me=typeof WeakMap!="undefined"?new WeakMap:new v,ke=function(){function ue(X){if(!(this instanceof ue))throw new TypeError("Cannot call a class as a function.");if(!arguments.length)throw new TypeError("1 argument required, but only 0 present.");var L=C.getInstance(),se=new Ee(X,L,this);Me.set(this,se)}return ue}();["observe","unobserve","disconnect"].forEach(function(ue){ke.prototype[ue]=function(){var X;return(X=Me.get(this))[ue].apply(X,arguments)}});var tt=function(){return typeof W.ResizeObserver!="undefined"?W.ResizeObserver:ke}();mt.Z=tt},98040:function(ln){ln.exports=function(){var mt=document.getSelection();if(!mt.rangeCount)return function(){};for(var m=document.activeElement,v=[],ae=0;ae<mt.rangeCount;ae++)v.push(mt.getRangeAt(ae));switch(m.tagName.toUpperCase()){case"INPUT":case"TEXTAREA":m.blur();break;default:m=null;break}return mt.removeAllRanges(),function(){mt.type==="Caret"&&mt.removeAllRanges(),mt.rangeCount||v.forEach(function(W){mt.addRange(W)}),m&&m.focus()}}},4977:function(ln){"use strict";ln.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=="},72054:function(ln,mt,m){"use strict";m.d(mt,{Z:function(){return ae}});var v=m(68688);function ae(W,fe){var z=typeof Symbol!="undefined"&&W[Symbol.iterator]||W["@@iterator"];if(!z){if(Array.isArray(W)||(z=(0,v.Z)(W))||fe&&W&&typeof W.length=="number"){z&&(W=z);var g=0,q=function(){};return{s:q,n:function(){return g>=W.length?{done:!0}:{done:!1,value:W[g++]}},e:function(y){throw y},f:q}}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 te,o=!0,C=!1;return{s:function(){z=z.call(W)},n:function(){var y=z.next();return o=y.done,y},e:function(y){C=!0,te=y},f:function(){try{o||z.return==null||z.return()}finally{if(C)throw te}}}}},16471:function(ln,mt,m){"use strict";m.d(mt,{ZP:function(){return Xs}});const v=Number.isFinite||function(a){return typeof a=="number"&&isFinite(a)},ae=Number.isSafeInteger||function(a){return typeof a=="number"&&Math.abs(a)<=W},W=Number.MAX_SAFE_INTEGER||9007199254740991;let fe=function(a){return a.NETWORK_ERROR="networkError",a.MEDIA_ERROR="mediaError",a.KEY_SYSTEM_ERROR="keySystemError",a.MUX_ERROR="muxError",a.OTHER_ERROR="otherError",a}({}),z=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}({}),g=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 q={MANIFEST:"manifest",LEVEL:"level",AUDIO_TRACK:"audioTrack",SUBTITLE_TRACK:"subtitleTrack"},te={MAIN:"main",AUDIO:"audio",SUBTITLE:"subtitle"};class o{constructor(e,t=0,n=0){this.halfLife=void 0,this.alpha_=void 0,this.estimate_=void 0,this.totalWeight_=void 0,this.halfLife=e,this.alpha_=e?Math.exp(Math.log(.5)/e):0,this.estimate_=t,this.totalWeight_=n}sample(e,t){const n=Math.pow(this.alpha_,e);this.estimate_=t*(1-n)+n*this.estimate_,this.totalWeight_+=e}getTotalWeight(){return this.totalWeight_}getEstimate(){if(this.alpha_){const e=1-Math.pow(this.alpha_,this.totalWeight_);if(e)return this.estimate_/e}return this.estimate_}}class C{constructor(e,t,n,r=100){this.defaultEstimate_=void 0,this.minWeight_=void 0,this.minDelayMs_=void 0,this.slow_=void 0,this.fast_=void 0,this.defaultTTFB_=void 0,this.ttfb_=void 0,this.defaultEstimate_=n,this.minWeight_=.001,this.minDelayMs_=50,this.slow_=new o(e),this.fast_=new o(t),this.defaultTTFB_=r,this.ttfb_=new o(e)}update(e,t){const{slow_:n,fast_:r,ttfb_:i}=this;n.halfLife!==e&&(this.slow_=new o(e,n.getEstimate(),n.getTotalWeight())),r.halfLife!==t&&(this.fast_=new o(t,r.getEstimate(),r.getTotalWeight())),i.halfLife!==e&&(this.ttfb_=new o(e,i.getEstimate(),i.getTotalWeight()))}sample(e,t){e=Math.max(e,this.minDelayMs_);const n=8*t,r=e/1e3,i=n/r;this.fast_.sample(r,i),this.slow_.sample(r,i)}sampleTTFB(e){const t=e/1e3,n=Math.sqrt(2)*Math.exp(-Math.pow(t,2)/2);this.ttfb_.sample(n,Math.max(e,5))}canEstimate(){return this.fast_.getTotalWeight()>=this.minWeight_}getEstimate(){return this.canEstimate()?Math.min(this.fast_.getEstimate(),this.slow_.getEstimate()):this.defaultEstimate_}getEstimateTTFB(){return this.ttfb_.getTotalWeight()>=this.minWeight_?this.ttfb_.getEstimate():this.defaultTTFB_}get defaultEstimate(){return this.defaultEstimate_}destroy(){}}function M(a,e,t){return(e=j(e))in a?Object.defineProperty(a,e,{value:t,enumerable:!0,configurable:!0,writable:!0}):a[e]=t,a}function y(){return y=Object.assign?Object.assign.bind():function(a){for(var e=1;e<arguments.length;e++){var t=arguments[e];for(var n in t)({}).hasOwnProperty.call(t,n)&&(a[n]=t[n])}return a},y.apply(null,arguments)}function E(a,e){var t=Object.keys(a);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(a);e&&(n=n.filter(function(r){return Object.getOwnPropertyDescriptor(a,r).enumerable})),t.push.apply(t,n)}return t}function T(a){for(var e=1;e<arguments.length;e++){var t=arguments[e]!=null?arguments[e]:{};e%2?E(Object(t),!0).forEach(function(n){M(a,n,t[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(a,Object.getOwnPropertyDescriptors(t)):E(Object(t)).forEach(function(n){Object.defineProperty(a,n,Object.getOwnPropertyDescriptor(t,n))})}return a}function k(a,e){if(typeof a!="object"||!a)return a;var t=a[Symbol.toPrimitive];if(t!==void 0){var n=t.call(a,e);if(typeof n!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(a)}function j(a){var e=k(a,"string");return typeof e=="symbol"?e:e+""}class Z{constructor(e,t){this.trace=void 0,this.debug=void 0,this.log=void 0,this.warn=void 0,this.info=void 0,this.error=void 0;const n=`[${e}]:`;this.trace=U,this.debug=t.debug.bind(null,n),this.log=t.log.bind(null,n),this.warn=t.warn.bind(null,n),this.info=t.info.bind(null,n),this.error=t.error.bind(null,n)}}const U=function(){},A={trace:U,debug:U,log:U,warn:U,info:U,error:U};function K(){return y({},A)}function D(a,e){const t=self.console[a];return t?t.bind(self.console,`${e?"["+e+"] ":""}[${a}] >`):U}function O(a,e,t){return e[a]?e[a].bind(e):D(a,t)}const re=K();function oe(a,e,t){const n=K();if(typeof console=="object"&&a===!0||typeof a=="object"){const r=["debug","log","info","warn","error"];r.forEach(i=>{n[i]=O(i,a,t)});try{n.log(`Debug logs enabled for "${e}" in hls.js version 1.6.15`)}catch(i){return K()}r.forEach(i=>{re[i]=O(i,a)})}else y(re,n);return n}const ie=re;function Ee(a=!0){return typeof self=="undefined"?void 0:(a||!self.MediaSource)&&self.ManagedMediaSource||self.MediaSource||self.WebKitMediaSource}function Me(a){return typeof self!="undefined"&&a===self.ManagedMediaSource}function ke(a,e){const t=Object.keys(a),n=Object.keys(e),r=t.length,i=n.length;return!r||!i||r===i&&!t.some(s=>n.indexOf(s)===-1)}function tt(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 n,r,i,s="",l=0;for(;l<t;){if(n=a[l++],n===0&&e)return s;if(n===0||n===3)continue;switch(n>>4){case 0:case 1:case 2:case 3:case 4:case 5:case 6:case 7:s+=String.fromCharCode(n);break;case 12:case 13:r=a[l++],s+=String.fromCharCode((n&31)<<6|r&63);break;case 14:r=a[l++],i=a[l++],s+=String.fromCharCode((n&15)<<12|(r&63)<<6|(i&63)<<0);break}}return s}function ue(a){let e="";for(let t=0;t<a.length;t++){let n=a[t].toString(16);n.length<2&&(n="0"+n),e+=n}return e}function X(a){return Uint8Array.from(a.replace(/^0x/,"").replace(/([\da-fA-F]{2}) ?/g,"0x$1 ").replace(/ +$/,"").split(" ")).buffer}function L(a){return a&&a.__esModule&&Object.prototype.hasOwnProperty.call(a,"default")?a.default:a}var se={exports:{}},Q;function V(){return Q||(Q=1,function(a,e){(function(t){var n=/^(?=((?:[a-zA-Z0-9+\-.]+:)?))\1(?=((?:\/\/[^\/?#]*)?))\2(?=((?:(?:[^?#\/]*\/)*[^;?#\/]*)?))\3((?:;[^?#]*)?)(\?[^#]*)?(#[^]*)?$/,r=/^(?=([^\/?#]*))\1([^]*)$/,i=/(?:\/|^)\.(?=\/)/g,s=/(?:\/|^)\.\.\/(?!\.\.\/)[^\/]*(?=\/)/g,l={buildAbsoluteURL:function(d,c,p){if(p=p||{},d=d.trim(),c=c.trim(),!c){if(!p.alwaysNormalize)return d;var b=l.parseURL(d);if(!b)throw new Error("Error trying to parse base URL.");return b.path=l.normalizePath(b.path),l.buildURLFromParts(b)}var I=l.parseURL(c);if(!I)throw new Error("Error trying to parse relative URL.");if(I.scheme)return p.alwaysNormalize?(I.path=l.normalizePath(I.path),l.buildURLFromParts(I)):c;var F=l.parseURL(d);if(!F)throw new Error("Error trying to parse base URL.");if(!F.netLoc&&F.path&&F.path[0]!=="/"){var $=r.exec(F.path);F.netLoc=$[1],F.path=$[2]}F.netLoc&&!F.path&&(F.path="/");var ge={scheme:F.scheme,netLoc:I.netLoc,path:null,params:I.params,query:I.query,fragment:I.fragment};if(!I.netLoc&&(ge.netLoc=F.netLoc,I.path[0]!=="/"))if(!I.path)ge.path=F.path,I.params||(ge.params=F.params,I.query||(ge.query=F.query));else{var me=F.path,Fe=me.substring(0,me.lastIndexOf("/")+1)+I.path;ge.path=l.normalizePath(Fe)}return ge.path===null&&(ge.path=p.alwaysNormalize?l.normalizePath(I.path):I.path),l.buildURLFromParts(ge)},parseURL:function(d){var c=n.exec(d);return c?{scheme:c[1]||"",netLoc:c[2]||"",path:c[3]||"",params:c[4]||"",query:c[5]||"",fragment:c[6]||""}:null},normalizePath:function(d){for(d=d.split("").reverse().join("").replace(i,"");d.length!==(d=d.replace(s,"")).length;);return d.split("").reverse().join("")},buildURLFromParts:function(d){return d.scheme+d.netLoc+d.path+d.params+d.query+d.fragment}};a.exports=l})()}(se)),se.exports}var x=V();class w{constructor(){this.aborted=!1,this.loaded=0,this.retry=0,this.total=0,this.chunkCount=0,this.bwEstimate=0,this.loading={start:0,first:0,end:0},this.parsing={start:0,end:0},this.buffering={start:0,first:0,end:0}}}var H={AUDIO:"audio",VIDEO:"video",AUDIOVIDEO:"audiovideo"};class he{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,pt(this,"stats")}setByteRange(e,t){const n=e.split("@",2);let r;n.length===1?r=(t==null?void 0:t.byteRangeEndOffset)||0:r=parseInt(n[1]),this._byteRange=[r,parseInt(n[0])+r]}get baseurl(){return this.base.url}get byteRange(){return this._byteRange===null?[]:this._byteRange}get byteRangeStartOffset(){return this.byteRange[0]}get byteRangeEndOffset(){return this.byteRange[1]}get elementaryStreams(){return this._streams===null&&(this._streams={[H.AUDIO]:null,[H.VIDEO]:null,[H.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 w),this._stats}set stats(e){this._stats=e}get url(){return!this._url&&this.baseurl&&this.relurl&&(this._url=x.buildAbsoluteURL(this.baseurl,this.relurl,{alwaysNormalize:!0})),this._url||""}set url(e){this._url=e}clearElementaryStreamInfo(){const{elementaryStreams:e}=this;e[H.AUDIO]=null,e[H.VIDEO]=null,e[H.AUDIOVIDEO]=null}}function Ke(a){return a.sn!=="initSegment"}class ft extends he{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.length){const e=this.byteRange[0],t=this.byteRange[1];if(v(e)&&v(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(){var e;const{levelkeys:t}=this;if(!t||t.NONE)return null;if(t.identity)this._decryptdata||(this._decryptdata=t.identity.getDecryptData(this.sn));else if(!((e=this._decryptdata)!=null&&e.keyId)){const n=Object.keys(t);if(n.length===1){const r=this._decryptdata=t[n[0]]||null;r&&(this._decryptdata=r.getDecryptData(this.sn,t))}}return this._decryptdata}get end(){return this.start+this.duration}get endProgramDateTime(){if(this.programDateTime===null)return null;const e=v(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){var t;const n=Object.keys(this.levelkeys),r=n.length;if(r>1||r===1&&(t=this.levelkeys[n[0]])!=null&&t.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(!v(e)){this._programDateTime=this.rawProgramDateTime=null;return}this._programDateTime=e}get ref(){return Ke(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){const t=this.levelkeys;if(t){var n;const r=t[e];r&&!((n=this._decryptdata)!=null&&n.keyId)&&(this._decryptdata=r.getDecryptData(this.sn,t))}}abortRequests(){var e,t;(e=this.loader)==null||e.abort(),(t=this.keyLoader)==null||t.abort()}setElementaryStreamInfo(e,t,n,r,i,s=!1){const{elementaryStreams:l}=this,d=l[e];if(!d){l[e]={startPTS:t,endPTS:n,startDTS:r,endDTS:i,partial:s};return}d.startPTS=Math.min(d.startPTS,t),d.endPTS=Math.max(d.endPTS,n),d.startDTS=Math.min(d.startDTS,r),d.endDTS=Math.max(d.endDTS,i)}}class Ue extends he{constructor(e,t,n,r,i){super(n),this.fragOffset=0,this.duration=0,this.gap=!1,this.independent=!1,this.relurl=void 0,this.fragment=void 0,this.index=void 0,this.duration=e.decimalFloatingPoint("DURATION"),this.gap=e.bool("GAP"),this.independent=e.bool("INDEPENDENT"),this.relurl=e.enumeratedString("URI"),this.fragment=t,this.index=r;const s=e.enumeratedString("BYTERANGE");s&&this.setByteRange(s,i),i&&(this.fragOffset=i.fragOffset+i.duration)}get start(){return this.fragment.start+this.fragOffset}get end(){return this.start+this.duration}get loaded(){const{elementaryStreams:e}=this;return!!(e.audio||e.video||e.audiovideo)}}function st(a,e){const t=Object.getPrototypeOf(a);if(t){const n=Object.getOwnPropertyDescriptor(t,e);return n||st(t,e)}}function pt(a,e){const t=st(a,e);t&&(t.enumerable=!0,Object.defineProperty(a,e,t))}const Et=Math.pow(2,32)-1,Ne=[].push,St={video:1,audio:2,id3:3,text:4};function at(a){return String.fromCharCode.apply(null,a)}function Nt(a,e){const t=a[e]<<8|a[e+1];return t<0?65536+t:t}function Ge(a,e){const t=Re(a,e);return t<0?4294967296+t:t}function je(a,e){let t=Ge(a,e);return t*=Math.pow(2,32),t+=Ge(a,e+4),t}function Re(a,e){return a[e]<<24|a[e+1]<<16|a[e+2]<<8|a[e+3]}function _e(a){const e=a.byteLength;for(let t=0;t<e;){const n=Ge(a,t);if(n>8&&a[t+4]===109&&a[t+5]===111&&a[t+6]===111&&a[t+7]===102)return!0;t=n>1?t+n:e}return!1}function Y(a,e){const t=[];if(!e.length)return t;const n=a.byteLength;for(let r=0;r<n;){const i=Ge(a,r),s=at(a.subarray(r+4,r+8)),l=i>1?r+i:n;if(s===e[0])if(e.length===1)t.push(a.subarray(r+8,l));else{const d=Y(a.subarray(r+8,l),e.slice(1));d.length&&Ne.apply(t,d)}r=l}return t}function Le(a){const e=[],t=a[0];let n=8;const r=Ge(a,n);n+=4;let i=0,s=0;t===0?(i=Ge(a,n),s=Ge(a,n+4),n+=8):(i=je(a,n),s=je(a,n+8),n+=16),n+=2;let l=a.length+s;const d=Nt(a,n);n+=2;for(let c=0;c<d;c++){let p=n;const b=Ge(a,p);p+=4;const I=b&2147483647;if((b&2147483648)>>>31===1)return ie.warn("SIDX has hierarchical references (not supported)"),null;const $=Ge(a,p);p+=4,e.push({referenceSize:I,subsegmentDuration:$,info:{duration:$/r,start:l,end:l+I-1}}),l+=I,p+=4,n=p}return{earliestPresentationTime:i,timescale:r,version:t,referencesCount:d,references:e}}function Ce(a){const e=[],t=Y(a,["moov","trak"]);for(let r=0;r<t.length;r++){const i=t[r],s=Y(i,["tkhd"])[0];if(s){let l=s[0];const d=Ge(s,l===0?12:20),c=Y(i,["mdia","mdhd"])[0];if(c){l=c[0];const p=Ge(c,l===0?12:20),b=Y(i,["mdia","hdlr"])[0];if(b){const I=at(b.subarray(8,12)),F={soun:H.AUDIO,vide:H.VIDEO}[I],$=Y(i,["mdia","minf","stbl","stsd"])[0],ge=B($);F?(e[d]={timescale:p,type:F,stsd:ge},e[F]=T({timescale:p,id:d},ge)):e[d]={timescale:p,type:I,stsd:ge}}}}}return Y(a,["moov","mvex","trex"]).forEach(r=>{const i=Ge(r,4),s=e[i];s&&(s.default={duration:Ge(r,12),flags:Ge(r,20)})}),e}function B(a){const e=a.subarray(8),t=e.subarray(86),n=at(e.subarray(4,8));let r=n,i;const s=n==="enca"||n==="encv";if(s){const c=Y(e,[n])[0].subarray(n==="enca"?28:78);Y(c,["sinf"]).forEach(b=>{const I=Y(b,["schm"])[0];if(I){const F=at(I.subarray(4,8));if(F==="cbcs"||F==="cenc"){const $=Y(b,["frma"])[0];$&&(r=at($))}}})}const l=r;switch(r){case"avc1":case"avc2":case"avc3":case"avc4":{const d=Y(t,["avcC"])[0];d&&d.length>3&&(r+="."+de(d[1])+de(d[2])+de(d[3]),i=P(l==="avc1"?"dva1":"dvav",t));break}case"mp4a":{const d=Y(e,[n])[0],c=Y(d.subarray(28),["esds"])[0];if(c&&c.length>7){let p=4;if(c[p++]!==3)break;p=ve(c,p),p+=2;const b=c[p++];if(b&128&&(p+=2),b&64&&(p+=c[p++]),c[p++]!==4)break;p=ve(c,p);const I=c[p++];if(I===64)r+="."+de(I);else break;if(p+=12,c[p++]!==5)break;p=ve(c,p);const F=c[p++];let $=(F&248)>>3;$===31&&($+=1+((F&7)<<3)+((c[p]&224)>>5)),r+="."+$}break}case"hvc1":case"hev1":{const d=Y(t,["hvcC"])[0];if(d&&d.length>12){const c=d[1],p=["","A","B","C"][c>>6],b=c&31,I=Ge(d,2),F=(c&32)>>5?"H":"L",$=d[12],ge=d.subarray(6,12);r+="."+p+b,r+="."+ce(I).toString(16).toUpperCase(),r+="."+F+$;let me="";for(let Fe=ge.length;Fe--;){const We=ge[Fe];(We||me)&&(me="."+We.toString(16).toUpperCase()+me)}r+=me}i=P(l=="hev1"?"dvhe":"dvh1",t);break}case"dvh1":case"dvhe":case"dvav":case"dva1":case"dav1":{r=P(r,t)||r;break}case"vp09":{const d=Y(t,["vpcC"])[0];if(d&&d.length>6){const c=d[4],p=d[5],b=d[6]>>4&15;r+="."+ye(c)+"."+ye(p)+"."+ye(b)}break}case"av01":{const d=Y(t,["av1C"])[0];if(d&&d.length>2){const c=d[1]>>>5,p=d[1]&31,b=d[2]>>>7?"H":"M",I=(d[2]&64)>>6,F=(d[2]&32)>>5,$=c===2&&I?F?12:10:I?10:8,ge=(d[2]&16)>>4,me=(d[2]&8)>>3,Fe=(d[2]&4)>>2,We=d[2]&3;r+="."+c+"."+ye(p)+b+"."+ye($)+"."+ge+"."+me+Fe+We+"."+ye(1)+"."+ye(1)+"."+ye(1)+"."+0,i=P("dav1",t)}break}}return{codec:r,encrypted:s,supplemental:i}}function P(a,e){const t=Y(e,["dvvC"]),n=t.length?t[0]:Y(e,["dvcC"])[0];if(n){const r=n[2]>>1&127,i=n[2]<<5&32|n[3]>>3&31;return a+"."+ye(r)+"."+ye(i)}}function ce(a){let e=0;for(let t=0;t<32;t++)e|=(a>>t&1)<<31-t;return e>>>0}function ve(a,e){const t=e+5;for(;a[e++]&128&&e<t;);return e}function de(a){return("0"+a.toString(16).toUpperCase()).slice(-2)}function ye(a){return(a<10?"0":"")+a}function Te(a,e){if(!a||!e)return;const t=e.keyId;t&&e.isCommonEncryption&&Ie(a,(n,r)=>{const i=n.subarray(8,24);i.some(s=>s!==0)||(ie.log(`[eme] Patching keyId in 'enc${r?"a":"v"}>sinf>>tenc' box: ${ue(i)} -> ${ue(t)}`),n.set(t,8))})}function we(a){const e=[];return Ie(a,t=>e.push(t.subarray(8,24))),e}function Ie(a,e){Y(a,["moov","trak"]).forEach(n=>{const r=Y(n,["mdia","minf","stbl","stsd"])[0];if(!r)return;const i=r.subarray(8);let s=Y(i,["enca"]);const l=s.length>0;l||(s=Y(i,["encv"])),s.forEach(d=>{const c=l?d.subarray(28):d.subarray(78);Y(c,["sinf"]).forEach(b=>{const I=Ae(b);I&&e(I,l)})})})}function Ae(a){const e=Y(a,["schm"])[0];if(e){const t=at(e.subarray(4,8));if(t==="cbcs"||t==="cenc"){const n=Y(a,["schi","tenc"])[0];if(n)return n}}}function Xe(a,e,t){const n={},r=Y(a,["moof","traf"]);for(let i=0;i<r.length;i++){const s=r[i],l=Y(s,["tfhd"])[0],d=Ge(l,4),c=e[d];if(!c)continue;n[d]||(n[d]={start:NaN,duration:0,sampleCount:0,timescale:c.timescale,type:c.type});const p=n[d],b=Y(s,["tfdt"])[0];if(b){const et=b[0];let xt=Ge(b,4);et===1&&(xt===Et?t.warn("[mp4-demuxer]: Ignoring assumed invalid signed 64-bit track fragment decode time"):(xt*=Et+1,xt+=Ge(b,8))),v(xt)&&(!v(p.start)||xt<p.start)&&(p.start=xt)}const I=c.default,F=Ge(l,0)|(I==null?void 0:I.flags);let $=(I==null?void 0:I.duration)||0;F&8&&(F&2?$=Ge(l,12):$=Ge(l,8));const ge=Y(s,["trun"]);let me=p.start||0,Fe=0,We=$;for(let et=0;et<ge.length;et++){const xt=ge[et],Ot=Ge(xt,4),sn=p.sampleCount;p.sampleCount+=Ot;const Pt=xt[3]&1,Xt=xt[3]&4,Yt=xt[2]&1,Ft=xt[2]&2,xn=xt[2]&4,nr=xt[2]&8;let mr=8,Tr=Ot;for(Pt&&(mr+=4),Xt&&Ot&&(!(xt[mr+1]&1)&&p.keyFrameIndex===void 0&&(p.keyFrameIndex=sn),mr+=4,Yt?(We=Ge(xt,mr),mr+=4):We=$,Ft&&(mr+=4),nr&&(mr+=4),me+=We,Fe+=We,Tr--);Tr--;)Yt?(We=Ge(xt,mr),mr+=4):We=$,Ft&&(mr+=4),xn&&(xt[mr+1]&1||p.keyFrameIndex===void 0&&(p.keyFrameIndex=p.sampleCount-(Tr+1),p.keyFrameStart=me),mr+=4),nr&&(mr+=4),me+=We,Fe+=We;!Fe&&$&&(Fe+=$*Ot)}p.duration+=Fe}if(!Object.keys(n).some(i=>n[i].duration)){let i=1/0,s=0;const l=Y(a,["sidx"]);for(let d=0;d<l.length;d++){const c=Le(l[d]);if(c!=null&&c.references){i=Math.min(i,c.earliestPresentationTime/c.timescale);const p=c.references.reduce((b,I)=>b+I.info.duration||0,0);s=Math.max(s,p+c.earliestPresentationTime/c.timescale)}}s&&v(s)&&Object.keys(n).forEach(d=>{n[d].duration||(n[d].duration=s*n[d].timescale-n[d].start)})}return n}function gt(a){const e={valid:null,remainder:null},t=Y(a,["moof"]);if(t.length<2)return e.remainder=a,e;const n=t[t.length-1];return e.valid=a.slice(0,n.byteOffset-8),e.remainder=a.slice(n.byteOffset-8),e}function ht(a,e){const t=new Uint8Array(a.length+e.length);return t.set(a),t.set(e,a.length),t}function nt(a,e){const t=[],n=e.samples,r=e.timescale,i=e.id;let s=!1;return Y(n,["moof"]).map(d=>{const c=d.byteOffset-8;Y(d,["traf"]).map(b=>{const I=Y(b,["tfdt"]).map(F=>{const $=F[0];let ge=Ge(F,4);return $===1&&(ge*=Math.pow(2,32),ge+=Ge(F,8)),ge/r})[0];return I!==void 0&&(a=I),Y(b,["tfhd"]).map(F=>{const $=Ge(F,4),ge=Ge(F,0)&16777215,me=(ge&1)!==0,Fe=(ge&2)!==0,We=(ge&8)!==0;let et=0;const xt=(ge&16)!==0;let Ot=0;const sn=(ge&32)!==0;let Pt=8;$===i&&(me&&(Pt+=8),Fe&&(Pt+=4),We&&(et=Ge(F,Pt),Pt+=4),xt&&(Ot=Ge(F,Pt),Pt+=4),sn&&(Pt+=4),e.type==="video"&&(s=Oe(e.codec)),Y(b,["trun"]).map(Xt=>{const Yt=Xt[0],Ft=Ge(Xt,0)&16777215,xn=(Ft&1)!==0;let nr=0;const mr=(Ft&4)!==0,Tr=(Ft&256)!==0;let pr=0;const Gn=(Ft&512)!==0;let _r=0;const ur=(Ft&1024)!==0,wr=(Ft&2048)!==0;let kr=0;const qn=Ge(Xt,4);let er=8;xn&&(nr=Ge(Xt,er),er+=4),mr&&(er+=4);let Hr=nr+c;for(let ai=0;ai<qn;ai++){if(Tr?(pr=Ge(Xt,er),er+=4):pr=et,Gn?(_r=Ge(Xt,er),er+=4):_r=Ot,ur&&(er+=4),wr&&(Yt===0?kr=Ge(Xt,er):kr=Re(Xt,er),er+=4),e.type===H.VIDEO){let Vr=0;for(;Vr<_r;){const Jr=Ge(n,Hr);if(Hr+=4,qe(s,n[Hr])){const Zi=n.subarray(Hr,Hr+Jr);rt(Zi,s?2:1,a+kr/r,t)}Hr+=Jr,Vr+=Jr+4}}a+=pr/r}}))})})}),t}function Oe(a){if(!a)return!1;const e=a.substring(0,4);return e==="hvc1"||e==="hev1"||e==="dvh1"||e==="dvhe"}function qe(a,e){if(a){const t=e>>1&63;return t===39||t===40}else return(e&31)===6}function rt(a,e,t,n){const r=ot(a);let i=0;i+=e;let s=0,l=0,d=0;for(;i<r.length;){s=0;do{if(i>=r.length)break;d=r[i++],s+=d}while(d===255);l=0;do{if(i>=r.length)break;d=r[i++],l+=d}while(d===255);const c=r.length-i;let p=i;if(l<c)i+=l;else if(l>c){ie.error(`Malformed SEI payload. ${l} is too small, only ${c} bytes left to parse.`);break}if(s===4){if(r[p++]===181){const I=Nt(r,p);if(p+=2,I===49){const F=Ge(r,p);if(p+=4,F===1195456820){const $=r[p++];if($===3){const ge=r[p++],me=31&ge,Fe=64&ge,We=Fe?2+me*3:0,et=new Uint8Array(We);if(Fe){et[0]=ge;for(let xt=1;xt<We;xt++)et[xt]=r[p++]}n.push({type:$,payloadType:s,pts:t,bytes:et})}}}}}else if(s===5&&l>16){const b=[];for(let $=0;$<16;$++){const ge=r[p++].toString(16);b.push(ge.length==1?"0"+ge:ge),($===3||$===5||$===7||$===9)&&b.push("-")}const I=l-16,F=new Uint8Array(I);for(let $=0;$<I;$++)F[$]=r[p++];n.push({payloadType:s,pts:t,uuid:b.join(""),userData:tt(F),userDataBytes:F})}}}function ot(a){const e=a.byteLength,t=[];let n=1;for(;n<e-2;)a[n]===0&&a[n+1]===0&&a[n+2]===3?(t.push(n+2),n+=2):n++;if(t.length===0)return a;const r=e-t.length,i=new Uint8Array(r);let s=0;for(n=0;n<r;s++,n++)s===t[0]&&(s++,t.shift()),i[n]=a[s];return i}function Rt(a){const e=a[0];let t="",n="",r=0,i=0,s=0,l=0,d=0,c=0;if(e===0){for(;at(a.subarray(c,c+1))!=="\0";)t+=at(a.subarray(c,c+1)),c+=1;for(t+=at(a.subarray(c,c+1)),c+=1;at(a.subarray(c,c+1))!=="\0";)n+=at(a.subarray(c,c+1)),c+=1;n+=at(a.subarray(c,c+1)),c+=1,r=Ge(a,12),i=Ge(a,16),l=Ge(a,20),d=Ge(a,24),c=28}else if(e===1){c+=4,r=Ge(a,c),c+=4;const b=Ge(a,c);c+=4;const I=Ge(a,c);for(c+=4,s=_u(2,32)*b+I,ae(s)||(s=Number.MAX_SAFE_INTEGER,ie.warn("Presentation time exceeds safe integer limit and wrapped to max safe integer in parsing emsg box")),l=Ge(a,c),c+=4,d=Ge(a,c),c+=4;at(a.subarray(c,c+1))!=="\0";)t+=at(a.subarray(c,c+1)),c+=1;for(t+=at(a.subarray(c,c+1)),c+=1;at(a.subarray(c,c+1))!=="\0";)n+=at(a.subarray(c,c+1)),c+=1;n+=at(a.subarray(c,c+1)),c+=1}const p=a.subarray(c,a.byteLength);return{schemeIdUri:t,value:n,timeScale:r,presentationTime:s,presentationTimeDelta:i,eventDuration:l,id:d,payload:p}}function S(a,...e){const t=e.length;let n=8,r=t;for(;r--;)n+=e[r].byteLength;const i=new Uint8Array(n);for(i[0]=n>>24&255,i[1]=n>>16&255,i[2]=n>>8&255,i[3]=n&255,i.set(a,4),r=0,n=8;r<t;r++)i.set(e[r],n),n+=e[r].byteLength;return i}function R(a,e,t){if(a.byteLength!==16)throw new RangeError("Invalid system id");let n,r;n=0,r=new Uint8Array;let i;n>0?(i=new Uint8Array(4),e.length>0&&new DataView(i.buffer).setUint32(0,e.length,!1)):i=new Uint8Array;const s=new Uint8Array(4);return t.byteLength>0&&new DataView(s.buffer).setUint32(0,t.byteLength,!1),S([112,115,115,104],new Uint8Array([n,0,0,0]),a,i,r,s,t)}function Ze(a){const e=[];if(a instanceof ArrayBuffer){const t=a.byteLength;let n=0;for(;n+32<t;){const r=new DataView(a,n),i=J(r);e.push(i),n+=i.size}}return e}function J(a){const e=a.getUint32(0),t=a.byteOffset,n=a.byteLength;if(n<e)return{offset:t,size:n};if(a.getUint32(4)!==1886614376)return{offset:t,size:e};const i=a.getUint32(8)>>>24;if(i!==0&&i!==1)return{offset:t,size:e};const s=a.buffer,l=ue(new Uint8Array(s,t+12,16));let d=null,c=null,p=0;if(i===0)p=28;else{const I=a.getUint32(28);if(!I||n<32+I*16)return{offset:t,size:e};d=[];for(let F=0;F<I;F++)d.push(new Uint8Array(s,t+32+F*16,16));p=32+I*16}if(!p)return{offset:t,size:e};const b=a.getUint32(p);return e-32<b?{offset:t,size:e}:(c=new Uint8Array(s,t+p+4,b),{version:i,systemId:l,kids:d,data:c,offset:t,size:e})}const be=()=>/\(Windows.+Firefox\//i.test(navigator.userAgent),zt={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 ze(a,e){const t=zt[e];return!!t&&!!t[a.slice(0,4)]}function Qe(a,e,t=!0){return!a.split(",").some(n=>!lt(n,e,t))}function lt(a,e,t=!0){var n;const r=Ee(t);return(n=r==null?void 0:r.isTypeSupported(le(a,e)))!=null?n:!1}function le(a,e){return`${e}/mp4;codecs=${a}`}function pe(a){if(a){const e=a.substring(0,4);return zt.video[e]}return 2}function Pe(a){const e=be();return a.split(",").reduce((t,n)=>{const i=e&&Oe(n)?9:zt.video[n];return i?(i*2+t)/(t?3:2):(zt.audio[n]+t)/(t?2:1)},0)}const $e={};function G(a,e=!0){if($e[a])return $e[a];const t={flac:["flac","fLaC","FLAC"],opus:["opus","Opus"],"mp4a.40.34":["mp3"]}[a];for(let r=0;r<t.length;r++){var n;if(lt(t[r],"audio",e))return $e[a]=t[r],t[r];if(t[r]==="mp3"&&(n=Ee(e))!=null&&n.isTypeSupported("audio/mpeg"))return""}return a}const bt=/flac|opus|mp4a\.40\.34/i;function xe(a,e=!0){return a.replace(bt,t=>G(t.toLowerCase(),e))}function Bt(a,e){const t=[];if(a){const n=a.split(",");for(let r=0;r<n.length;r++)ze(n[r],"video")||t.push(n[r])}return e&&t.push(e),t.join(",")}function en(a,e){if(a&&(a.length>4||["ac-3","ec-3","alac","fLaC","Opus"].indexOf(a)!==-1)&&(dn(a,"audio")||dn(a,"video")))return a;if(e){const t=e.split(",");if(t.length>1){if(a){for(let n=t.length;n--;)if(t[n].substring(0,4)===a.substring(0,4))return t[n]}return t[0]}}return e||a}function dn(a,e){return ze(a,e)&<(a,e)}function Hn(a){const e=a.split(",");for(let t=0;t<e.length;t++){const n=e[t].split(".");n.length>2&&n[0]==="avc1"&&(e[t]=`avc1.${parseInt(n[1]).toString(16)}${("000"+parseInt(n[2]).toString(16)).slice(-4)}`)}return e.join(",")}function wt(a){if(a.startsWith("av01.")){const e=a.split("."),t=["0","111","01","01","01","0"];for(let n=e.length;n>4&&n<10;n++)e[n]=t[n-4];return e.join(".")}return a}function Gt(a){const e=Ee(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 mn(a){return a.replace(/^.+codecs=["']?([^"']+).*$/,"$1")}const yn={supported:!0,powerEfficient:!0,smooth:!0},rn={supported:!1,smooth:!1,powerEfficient:!1},En={supported:!0,configurations:[],decodingInfoResults:[yn]};function Zt(a,e){return{supported:!1,configurations:e,decodingInfoResults:[rn],error:a}}function Dt(a,e,t,n,r,i){const s=a.videoCodec,l=a.audioCodec?a.audioGroups:null,d=i==null?void 0:i.audioCodec,c=i==null?void 0:i.channels,p=c?parseInt(c):d?1/0:2;let b=null;if(l!=null&&l.length)try{l.length===1&&l[0]?b=e.groups[l[0]].channels:b=l.reduce((I,F)=>{if(F){const $=e.groups[F];if(!$)throw new Error(`Audio track group ${F} not found`);Object.keys($.channels).forEach(ge=>{I[ge]=(I[ge]||0)+$.channels[ge]})}return I},{2:0})}catch(I){return!0}return s!==void 0&&(s.split(",").some(I=>Oe(I))||a.width>1920&&a.height>1088||a.height>1920&&a.width>1088||a.frameRate>Math.max(n,30)||a.videoRange!=="SDR"&&a.videoRange!==t||a.bitrate>Math.max(r,8e6))||!!b&&v(p)&&Object.keys(b).some(I=>parseInt(I)>p)}function Mt(a,e,t,n={}){const r=a.videoCodec;if(!r&&!a.audioCodec||!t)return Promise.resolve(En);const i=[],s=gn(a),l=s.length,d=Ln(a,e,l>0),c=d.length;for(let p=l||1*c||1;p--;){const b={type:"media-source"};if(l&&(b.video=s[p%l]),c){b.audio=d[p%c];const I=b.audio.bitrate;b.video&&I&&(b.video.bitrate-=I)}i.push(b)}if(r){const p=navigator.userAgent;if(r.split(",").some(b=>Oe(b))&&be())return Promise.resolve(Zt(new Error(`Overriding Windows Firefox HEVC MediaCapabilities result based on user-agent string: (${p})`),i))}return Promise.all(i.map(p=>{const b=Se(p);return n[b]||(n[b]=t.decodingInfo(p))})).then(p=>({supported:!p.some(b=>!b.supported),configurations:i,decodingInfoResults:p})).catch(p=>({supported:!1,configurations:i,decodingInfoResults:[],error:p}))}function gn(a){var e;const t=(e=a.videoCodec)==null?void 0:e.split(","),n=ct(a),r=a.width||640,i=a.height||480,s=a.frameRate||30,l=a.videoRange.toLowerCase();return t?t.map(d=>{const c={contentType:le(wt(d),"video"),width:r,height:i,bitrate:n,framerate:s};return l!=="sdr"&&(c.transferFunction=l),c}):[]}function Ln(a,e,t){var n;const r=(n=a.audioCodec)==null?void 0:n.split(","),i=ct(a);return r&&a.audioGroups?a.audioGroups.reduce((s,l)=>{var d;const c=l?(d=e.groups[l])==null?void 0:d.tracks:null;return c?c.reduce((p,b)=>{if(b.groupId===l){const I=parseFloat(b.channels||"");r.forEach(F=>{const $={contentType:le(F,"audio"),bitrate:t?ut(F,i):i};I&&($.channels=""+I),p.push($)})}return p},s):s},[]):[]}function ut(a,e){if(e<=1)return 1;let t=128e3;return a==="ec-3"?t=768e3:a==="ac-3"&&(t=64e4),Math.min(e/2,t)}function ct(a){return Math.ceil(Math.max(a.bitrate*.9,a.averageBitrate)/1e3)*1e3||1}function Se(a){let e="";const{audio:t,video:n}=a;if(n){const r=mn(n.contentType);e+=`${r}_r${n.height}x${n.width}f${Math.ceil(n.framerate)}${n.transferFunction||"sd"}_${Math.ceil(n.bitrate/1e5)}`}if(t){const r=mn(t.contentType);e+=`${n?"_":""}${r}_c${t.channels}`}return e}const He=["NONE","TYPE-0","TYPE-1",null];function it(a){return He.indexOf(a)>-1}const Je=["SDR","PQ","HLG"];function yt(a){return!!a&&Je.indexOf(a)>-1}var $t={No:"",Yes:"YES",v2:"v2"};function Jt(a){const{canSkipUntil:e,canSkipDateRanges:t,age:n}=a,r=n<e/2;return e&&r?t?$t.v2:$t.Yes:$t.No}class nn{constructor(e,t,n){this.msn=void 0,this.part=void 0,this.skip=void 0,this.msn=e,this.part=t,this.skip=n}addDirectives(e){const t=new self.URL(e);return this.msn!==void 0&&t.searchParams.set("_HLS_msn",this.msn.toString()),this.part!==void 0&&t.searchParams.set("_HLS_part",this.part.toString()),this.skip&&t.searchParams.set("_HLS_skip",this.skip),t.href}}class Ht{constructor(e){if(this._attrs=void 0,this.audioCodec=void 0,this.bitrate=void 0,this.codecSet=void 0,this.url=void 0,this.frameRate=void 0,this.height=void 0,this.id=void 0,this.name=void 0,this.supplemental=void 0,this.videoCodec=void 0,this.width=void 0,this.details=void 0,this.fragmentError=0,this.loadError=0,this.loaded=void 0,this.realBitrate=0,this.supportedPromise=void 0,this.supportedResult=void 0,this._avgBitrate=0,this._audioGroups=void 0,this._subtitleGroups=void 0,this._urlId=0,this.url=[e.url],this._attrs=[e.attrs],this.bitrate=e.bitrate,e.details&&(this.details=e.details),this.id=e.id||0,this.name=e.name,this.width=e.width||0,this.height=e.height||0,this.frameRate=e.attrs.optionalFloat("FRAME-RATE",0),this._avgBitrate=e.attrs.decimalInteger("AVERAGE-BANDWIDTH"),this.audioCodec=e.audioCodec,this.videoCodec=e.videoCodec,this.codecSet=[e.videoCodec,e.audioCodec].filter(n=>!!n).map(n=>n.substring(0,4)).join(","),"supplemental"in e){var t;this.supplemental=e.supplemental;const n=(t=e.supplemental)==null?void 0:t.videoCodec;n&&n!==e.videoCodec&&(this.codecSet+=`,${n.substring(0,4)}`)}this.addGroupId("audio",e.attrs.AUDIO),this.addGroupId("text",e.attrs.SUBTITLES)}get maxBitrate(){return Math.max(this.realBitrate,this.bitrate)}get averageBitrate(){return this._avgBitrate||this.realBitrate||this.bitrate}get attrs(){return this._attrs[0]}get codecs(){return this.attrs.CODECS||""}get pathwayId(){return this.attrs["PATHWAY-ID"]||"."}get videoRange(){return this.attrs["VIDEO-RANGE"]||"SDR"}get score(){return this.attrs.optionalFloat("SCORE",0)}get uri(){return this.url[0]||""}hasAudioGroup(e){return 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 n=this._audioGroups;n||(n=this._audioGroups=[]),n.indexOf(t)===-1&&n.push(t)}else if(e==="text"){let n=this._subtitleGroups;n||(n=this._subtitleGroups=[]),n.indexOf(t)===-1&&n.push(t)}}}get urlId(){return 0}set urlId(e){}get audioGroupIds(){return this.audioGroups?[this.audioGroupId]:void 0}get textGroupIds(){return this.subtitleGroups?[this.textGroupId]:void 0}get audioGroupId(){var e;return(e=this.audioGroups)==null?void 0:e[0]}get textGroupId(){var e;return(e=this.subtitleGroups)==null?void 0:e[0]}addFallback(){}}function Qt(a,e){return!e||!a?!1:a.indexOf(e)!==-1}function pn(){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 qt(a,e){let t=!1,n=[];if(a&&(t=a!=="SDR",n=[a]),e){n=e.allowedVideoRanges||Je.slice(0);const r=n.join("")!=="SDR"&&!e.videoCodec;t=e.preferHDR!==void 0?e.preferHDR:r&&pn(),t||(n=["SDR"])}return{preferHDR:t,allowedVideoRanges:n}}const Ye=a=>{const e=new WeakSet;return(t,n)=>{if(a&&(n=a(t,n)),typeof n=="object"&&n!==null){if(e.has(n))return;e.add(n)}return n}},vt=(a,e)=>JSON.stringify(a,Ye(e));function Ct(a,e,t,n,r){const i=Object.keys(a),s=n==null?void 0:n.channels,l=n==null?void 0:n.audioCodec,d=r==null?void 0:r.videoCodec,c=s&&parseInt(s)===2;let p=!1,b=!1,I=1/0,F=1/0,$=1/0,ge=1/0,me=0,Fe=[];const{preferHDR:We,allowedVideoRanges:et}=qt(e,r);for(let Xt=i.length;Xt--;){const Yt=a[i[Xt]];p||(p=Yt.channels[2]>0),I=Math.min(I,Yt.minHeight),F=Math.min(F,Yt.minFramerate),$=Math.min($,Yt.minBitrate),et.filter(xn=>Yt.videoRanges[xn]>0).length>0&&(b=!0)}I=v(I)?I:0,F=v(F)?F:0;const xt=Math.max(1080,I),Ot=Math.max(30,F);$=v($)?$:t,t=Math.max($,t),b||(e=void 0);const sn=i.length>1;return{codecSet:i.reduce((Xt,Yt)=>{const Ft=a[Yt];if(Yt===Xt)return Xt;if(Fe=b?et.filter(xn=>Ft.videoRanges[xn]>0):[],sn){if(Ft.minBitrate>t)return _t(Yt,`min bitrate of ${Ft.minBitrate} > current estimate of ${t}`),Xt;if(!Ft.hasDefaultAudio)return _t(Yt,"no renditions with default or auto-select sound found"),Xt;if(l&&Yt.indexOf(l.substring(0,4))%5!==0)return _t(Yt,`audio codec preference "${l}" not found`),Xt;if(s&&!c){if(!Ft.channels[s])return _t(Yt,`no renditions with ${s} channel sound found (channels options: ${Object.keys(Ft.channels)})`),Xt}else if((!l||c)&&p&&Ft.channels[2]===0)return _t(Yt,"no renditions with stereo sound found"),Xt;if(Ft.minHeight>xt)return _t(Yt,`min resolution of ${Ft.minHeight} > maximum of ${xt}`),Xt;if(Ft.minFramerate>Ot)return _t(Yt,`min framerate of ${Ft.minFramerate} > maximum of ${Ot}`),Xt;if(!Fe.some(xn=>Ft.videoRanges[xn]>0))return _t(Yt,`no variants with VIDEO-RANGE of ${vt(Fe)} found`),Xt;if(d&&Yt.indexOf(d.substring(0,4))%5!==0)return _t(Yt,`video codec preference "${d}" not found`),Xt;if(Ft.maxScore<me)return _t(Yt,`max score of ${Ft.maxScore} < selected max of ${me}`),Xt}return Xt&&(Pe(Yt)>=Pe(Xt)||Ft.fragmentError>a[Xt].fragmentError)?Xt:(ge=Ft.minIndex,me=Ft.maxScore,Yt)},void 0),videoRanges:Fe,preferHDR:We,minFramerate:F,minBitrate:$,minIndex:ge}}function _t(a,e){ie.log(`[abr] start candidates with "${a}" ignored because ${e}`)}function At(a){return a.reduce((e,t)=>{let n=e.groups[t.groupId];n||(n=e.groups[t.groupId]={tracks:[],channels:{2:0},hasDefault:!1,hasAutoSelect:!1}),n.tracks.push(t);const r=t.channels||"2";return n.channels[r]=(n.channels[r]||0)+1,n.hasDefault=n.hasDefault||t.default,n.hasAutoSelect=n.hasAutoSelect||t.autoselect,n.hasDefault&&(e.hasDefaultAudio=!0),n.hasAutoSelect&&(e.hasAutoSelectAudio=!0),e},{hasDefaultAudio:!1,hasAutoSelectAudio:!1,groups:{}})}function kt(a,e,t,n){return a.slice(t,n+1).reduce((r,i,s)=>{if(!i.codecSet)return r;const l=i.audioGroups;let d=r[i.codecSet];d||(r[i.codecSet]=d={minBitrate:1/0,minHeight:1/0,minFramerate:1/0,minIndex:s,maxScore:0,videoRanges:{SDR:0},channels:{2:0},hasDefaultAudio:!l,fragmentError:0}),d.minBitrate=Math.min(d.minBitrate,i.bitrate);const c=Math.min(i.height,i.width);return d.minHeight=Math.min(d.minHeight,c),d.minFramerate=Math.min(d.minFramerate,i.frameRate),d.minIndex=Math.min(d.minIndex,s),d.maxScore=Math.max(d.maxScore,i.score),d.fragmentError+=i.fragmentError,d.videoRanges[i.videoRange]=(d.videoRanges[i.videoRange]||0)+1,l&&l.forEach(p=>{if(!p)return;const b=e.groups[p];b&&(d.hasDefaultAudio=d.hasDefaultAudio||e.hasDefaultAudio?b.hasDefault:b.hasAutoSelect||!e.hasDefaultAudio&&!e.hasAutoSelectAudio,Object.keys(b.channels).forEach(I=>{d.channels[I]=(d.channels[I]||0)+b.channels[I]}))}),r},{})}function Wt(a){if(!a)return a;const{lang:e,assocLang:t,characteristics:n,channels:r,audioCodec:i}=a;return{lang:e,assocLang:t,characteristics:n,channels:r,audioCodec:i}}function Kt(a,e,t){if("attrs"in a){const n=e.indexOf(a);if(n!==-1)return n}for(let n=0;n<e.length;n++){const r=e[n];if(on(a,r,t))return n}return-1}function on(a,e,t){const{groupId:n,name:r,lang:i,assocLang:s,default:l}=a,d=a.forced;return(n===void 0||e.groupId===n)&&(r===void 0||e.name===r)&&(i===void 0||cn(i,e.lang))&&(i===void 0||e.assocLang===s)&&(l===void 0||e.default===l)&&(d===void 0||e.forced===d)&&(!("characteristics"in a)||Wn(a.characteristics||"",e.characteristics))&&(t===void 0||t(a,e))}function cn(a,e="--"){return a.length===e.length?a===e:a.startsWith(e)||e.startsWith(a)}function Wn(a,e=""){const t=a.split(","),n=e.split(",");return t.length===n.length&&!t.some(r=>n.indexOf(r)===-1)}function bn(a,e){const{audioCodec:t,channels:n}=a;return(t===void 0||(e.audioCodec||"").substring(0,4)===t.substring(0,4))&&(n===void 0||n===(e.channels||"2"))}function fn(a,e,t,n,r){const i=e[n],l=e.reduce((I,F,$)=>{const ge=F.uri;return(I[ge]||(I[ge]=[])).push($),I},{})[i.uri];l.length>1&&(n=Math.max.apply(Math,l));const d=i.videoRange,c=i.frameRate,p=i.codecSet.substring(0,4),b=In(e,n,I=>{if(I.videoRange!==d||I.frameRate!==c||I.codecSet.substring(0,4)!==p)return!1;const F=I.audioGroups,$=t.filter(ge=>!F||F.indexOf(ge.groupId)!==-1);return Kt(a,$,r)>-1});return b>-1?b:In(e,n,I=>{const F=I.audioGroups,$=t.filter(ge=>!F||F.indexOf(ge.groupId)!==-1);return Kt(a,$,r)>-1})}function In(a,e,t){for(let n=e;n>-1;n--)if(t(a[n]))return n;for(let n=e+1;n<a.length;n++)if(t(a[n]))return n;return-1}function On(a,e){var t;return!!a&&a!==((t=e.loadLevelObj)==null?void 0:t.uri)}class Zn extends Z{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.supportedCache={},this.bwEstimator=void 0,this._abandonRulesCheck=t=>{var n;const{fragCurrent:r,partCurrent:i,hls:s}=this,{autoLevelEnabled:l,media:d}=s;if(!r||!d)return;const c=performance.now(),p=i?i.stats:r.stats,b=i?i.duration:r.duration,I=c-p.loading.start,F=s.minAutoLevel,$=r.level,ge=this._nextAutoLevel;if(p.aborted||p.loaded&&p.loaded===p.total||$<=F){this.clearTimer(),this._nextAutoLevel=-1;return}if(!l)return;const me=ge>-1&&ge!==$,Fe=!!t||me;if(!Fe&&(d.paused||!d.playbackRate||!d.readyState))return;const We=s.mainForwardBufferInfo;if(!Fe&&We===null)return;const et=this.bwEstimator.getEstimateTTFB(),xt=Math.abs(d.playbackRate);if(I<=Math.max(et,1e3*(b/(xt*2))))return;const Ot=We?We.len/xt:0,sn=p.loading.first?p.loading.first-p.loading.start:-1,Pt=p.loaded&&sn>-1,Xt=this.getBwEstimate(),Yt=s.levels,Ft=Yt[$],xn=Math.max(p.loaded,Math.round(b*(r.bitrate||Ft.averageBitrate)/8));let nr=Pt?I-sn:I;nr<1&&Pt&&(nr=Math.min(I,p.loaded*8/Xt));const mr=Pt?p.loaded*1e3/nr:0,Tr=et/1e3,pr=mr?(xn-p.loaded)/mr:xn*8/Xt+Tr;if(pr<=Ot)return;const Gn=mr?mr*8:Xt,_r=((n=(t==null?void 0:t.details)||this.hls.latestLevelDetails)==null?void 0:n.live)===!0,ur=this.hls.config.abrBandWidthUpFactor;let wr=Number.POSITIVE_INFINITY,kr;for(kr=$-1;kr>F;kr--){const ai=Yt[kr].maxBitrate,Vr=!Yt[kr].details||_r;if(wr=this.getTimeToLoadFrag(Tr,Gn,b*ai,Vr),wr<Math.min(Ot,b+Tr))break}if(wr>=pr||wr>b*10)return;Pt?this.bwEstimator.sample(I-Math.min(et,sn),p.loaded):this.bwEstimator.sampleTTFB(I);const qn=Yt[kr].maxBitrate;this.getBwEstimate()*ur>qn&&this.resetEstimator(qn);const er=this.findBestLevel(qn,F,kr,0,Ot,1,1);er>-1&&(kr=er),this.warn(`Fragment ${r.sn}${i?" part "+i.index:""} of level ${$} is loading too slowly;
|
|
|
Fragment duration: ${r.duration.toFixed(3)}
|
|
|
Time to underbuffer: ${Ot.toFixed(3)} s
|
|
|
Estimated load time for current fragment: ${pr.toFixed(3)} s
|
|
|
Estimated load time for down switch fragment: ${wr.toFixed(3)} s
|
|
|
TTFB estimate: ${sn|0} ms
|
|
|
Current BW estimate: ${v(Xt)?Xt|0:"Unknown"} bps
|
|
|
New BW estimate: ${this.getBwEstimate()|0} bps
|
|
|
Switching to level ${kr} @ ${qn|0} bps`),s.nextLoadLevel=s.nextAutoLevel=kr,this.clearTimer();const Hr=()=>{if(this.clearTimer(),this.fragCurrent===r&&this.hls.loadLevel===kr&&kr>0){const ai=this.getStarvationDelay();if(this.warn(`Aborting inflight request ${kr>0?"and switching down":""}
|
|
|
Fragment duration: ${r.duration.toFixed(3)} s
|
|
|
Time to underbuffer: ${ai.toFixed(3)} s`),r.abortRequests(),this.fragCurrent=this.partCurrent=null,kr>F){let Vr=this.findBestLevel(this.hls.levels[F].bitrate,F,kr,0,ai,1,1);Vr===-1&&(Vr=F),this.hls.nextLoadLevel=this.hls.nextAutoLevel=Vr,this.resetEstimator(this.hls.levels[Vr].bitrate)}}};me||pr>wr*2?Hr():this.timer=self.setInterval(Hr,wr*1e3),s.trigger(g.FRAG_LOAD_EMERGENCY_ABORTED,{frag:r,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 C(e.abrEwmaSlowVoD,e.abrEwmaFastVoD,e.abrEwmaDefaultEstimate)}registerListeners(){const{hls:e}=this;e.on(g.MANIFEST_LOADING,this.onManifestLoading,this),e.on(g.FRAG_LOADING,this.onFragLoading,this),e.on(g.FRAG_LOADED,this.onFragLoaded,this),e.on(g.FRAG_BUFFERED,this.onFragBuffered,this),e.on(g.LEVEL_SWITCHING,this.onLevelSwitching,this),e.on(g.LEVEL_LOADED,this.onLevelLoaded,this),e.on(g.LEVELS_UPDATED,this.onLevelsUpdated,this),e.on(g.MAX_AUTO_LEVEL_UPDATED,this.onMaxAutoLevelUpdated,this),e.on(g.ERROR,this.onError,this)}unregisterListeners(){const{hls:e}=this;e&&(e.off(g.MANIFEST_LOADING,this.onManifestLoading,this),e.off(g.FRAG_LOADING,this.onFragLoading,this),e.off(g.FRAG_LOADED,this.onFragLoaded,this),e.off(g.FRAG_BUFFERED,this.onFragBuffered,this),e.off(g.LEVEL_SWITCHING,this.onLevelSwitching,this),e.off(g.LEVEL_LOADED,this.onLevelLoaded,this),e.off(g.LEVELS_UPDATED,this.onLevelsUpdated,this),e.off(g.MAX_AUTO_LEVEL_UPDATED,this.onMaxAutoLevelUpdated,this),e.off(g.ERROR,this.onError,this))}destroy(){this.unregisterListeners(),this.clearTimer(),this.hls=this._abandonRulesCheck=this.supportedCache=null,this.fragCurrent=this.partCurrent=null}onManifestLoading(e,t){this.lastLoadedFragLevel=-1,this.firstSelection=-1,this.lastLevelLoadSec=0,this.supportedCache={},this.fragCurrent=this.partCurrent=null,this.onLevelsUpdated(),this.clearTimer()}onLevelsUpdated(){this.lastLoadedFragLevel>-1&&this.fragCurrent&&(this.lastLoadedFragLevel=this.fragCurrent.level),this._nextAutoLevel=-1,this.onMaxAutoLevelUpdated(),this.codecTiers=null,this.audioTracksByGroup=null}onMaxAutoLevelUpdated(){this.firstSelection=-1,this.nextAutoLevelKey=""}onFragLoading(e,t){const n=t.frag;if(!this.ignoreFragment(n)){if(!n.bitrateTest){var r;this.fragCurrent=n,this.partCurrent=(r=t.part)!=null?r:null}this.clearTimer(),this.timer=self.setInterval(this._abandonRulesCheck,100)}}onLevelSwitching(e,t){this.clearTimer()}onError(e,t){if(!t.fatal)switch(t.details){case z.BUFFER_ADD_CODEC_ERROR:case z.BUFFER_APPEND_ERROR:this.lastLoadedFragLevel=-1,this.firstSelection=-1;break;case z.FRAG_LOAD_TIMEOUT:{const n=t.frag,{fragCurrent:r,partCurrent:i}=this;if(n&&r&&n.sn===r.sn&&n.level===r.level){const s=performance.now(),l=i?i.stats:n.stats,d=s-l.loading.start,c=l.loading.first?l.loading.first-l.loading.start:-1;if(l.loaded&&c>-1){const b=this.bwEstimator.getEstimateTTFB();this.bwEstimator.sample(d-Math.min(b,c),l.loaded)}else this.bwEstimator.sampleTTFB(d)}break}}}getTimeToLoadFrag(e,t,n,r){const i=e+n/t,s=r?e+this.lastLevelLoadSec:0;return i+s}onLevelLoaded(e,t){const n=this.hls.config,{loading:r}=t.stats,i=r.end-r.first;v(i)&&(this.lastLevelLoadSec=i/1e3),t.details.live?this.bwEstimator.update(n.abrEwmaSlowLive,n.abrEwmaFastLive):this.bwEstimator.update(n.abrEwmaSlowVoD,n.abrEwmaFastVoD),this.timer>-1&&this._abandonRulesCheck(t.levelInfo)}onFragLoaded(e,{frag:t,part:n}){const r=n?n.stats:t.stats;if(t.type===te.MAIN&&this.bwEstimator.sampleTTFB(r.loading.first-r.loading.start),!this.ignoreFragment(t)){if(this.clearTimer(),t.level===this._nextAutoLevel&&(this._nextAutoLevel=-1),this.firstSelection=-1,this.hls.config.abrMaxWithRealBitrate){const i=n?n.duration:t.duration,s=this.hls.levels[t.level],l=(s.loaded?s.loaded.bytes:0)+r.loaded,d=(s.loaded?s.loaded.duration:0)+i;s.loaded={bytes:l,duration:d},s.realBitrate=Math.round(8*l/d)}if(t.bitrateTest){const i={stats:r,frag:t,part:n,id:t.type};this.onFragBuffered(g.FRAG_BUFFERED,i),t.bitrateTest=!1}else this.lastLoadedFragLevel=t.level}}onFragBuffered(e,t){const{frag:n,part:r}=t,i=r!=null&&r.stats.loaded?r.stats:n.stats;if(i.aborted||this.ignoreFragment(n))return;const s=i.parsing.end-i.loading.start-Math.min(i.loading.first-i.loading.start,this.bwEstimator.getEstimateTTFB());this.bwEstimator.sample(s,i.loaded),i.bwEstimate=this.getBwEstimate(),n.bitrateTest?this.bitrateTestDelay=s/1e3:this.bitrateTestDelay=0}ignoreFragment(e){return e.type!==te.MAIN||e.sn==="initSegment"}clearTimer(){this.timer>-1&&(self.clearInterval(this.timer),this.timer=-1)}get firstAutoLevel(){const{maxAutoLevel:e,minAutoLevel:t}=this.hls,n=this.getBwEstimate(),r=this.hls.config.maxStarvationDelay,i=this.findBestLevel(n,t,e,0,r,1,1);if(i>-1)return i;const s=this.hls.firstLevel,l=Math.min(Math.max(s,t),e);return this.warn(`Could not find best starting auto level. Defaulting to first in playlist ${s} clamped to ${l}`),l}get forcedAutoLevel(){return this.nextAutoLevelKey?-1:this._nextAutoLevel}get nextAutoLevel(){const e=this.forcedAutoLevel,n=this.bwEstimator.canEstimate(),r=this.lastLoadedFragLevel>-1;if(e!==-1&&(!n||!r||this.nextAutoLevelKey===this.getAutoLevelKey()))return e;const i=n&&r?this.getNextABRAutoLevel():this.firstAutoLevel;if(e!==-1){const s=this.hls.levels;if(s.length>Math.max(e,i)&&s[e].loadError<=s[i].loadError)return e}return this._nextAutoLevel=i,this.nextAutoLevelKey=this.getAutoLevelKey(),i}getAutoLevelKey(){return`${this.getBwEstimate()}_${this.getStarvationDelay().toFixed(2)}`}getNextABRAutoLevel(){const{fragCurrent:e,partCurrent:t,hls:n}=this;if(n.levels.length<=1)return n.loadLevel;const{maxAutoLevel:r,config:i,minAutoLevel:s}=n,l=t?t.duration:e?e.duration:0,d=this.getBwEstimate(),c=this.getStarvationDelay();let p=i.abrBandWidthFactor,b=i.abrBandWidthUpFactor;if(c){const me=this.findBestLevel(d,s,r,c,0,p,b);if(me>=0)return this.rebufferNotice=-1,me}let I=l?Math.min(l,i.maxStarvationDelay):i.maxStarvationDelay;if(!c){const me=this.bitrateTestDelay;me&&(I=(l?Math.min(l,i.maxLoadingDelay):i.maxLoadingDelay)-me,this.info(`bitrate test took ${Math.round(1e3*me)}ms, set first fragment max fetchDuration to ${Math.round(1e3*I)} ms`),p=b=1)}const F=this.findBestLevel(d,s,r,c,I,p,b);if(this.rebufferNotice!==F&&(this.rebufferNotice=F,this.info(`${c?"rebuffering expected":"buffer is empty"}, optimal quality level ${F}`)),F>-1)return F;const $=n.levels[s],ge=n.loadLevelObj;return ge&&($==null?void 0:$.bitrate)<ge.bitrate?s:n.loadLevel}getStarvationDelay(){const e=this.hls,t=e.media;if(!t)return 1/0;const n=t&&t.playbackRate!==0?Math.abs(t.playbackRate):1,r=e.mainForwardBufferInfo;return(r?r.len:0)/n}getBwEstimate(){return this.bwEstimator.canEstimate()?this.bwEstimator.getEstimate():this.hls.config.abrEwmaDefaultEstimate}findBestLevel(e,t,n,r,i,s,l){var d;const c=r+i,p=this.lastLoadedFragLevel,b=p===-1?this.hls.firstLevel:p,{fragCurrent:I,partCurrent:F}=this,{levels:$,allAudioTracks:ge,loadLevel:me,config:Fe}=this.hls;if($.length===1)return 0;const We=$[b],et=!!((d=this.hls.latestLevelDetails)!=null&&d.live),xt=me===-1||p===-1;let Ot,sn="SDR",Pt=(We==null?void 0:We.frameRate)||0;const{audioPreference:Xt,videoPreference:Yt}=Fe,Ft=this.audioTracksByGroup||(this.audioTracksByGroup=At(ge));let xn=-1;if(xt){if(this.firstSelection!==-1)return this.firstSelection;const Gn=this.codecTiers||(this.codecTiers=kt($,Ft,t,n)),_r=Ct(Gn,sn,e,Xt,Yt),{codecSet:ur,videoRanges:wr,minFramerate:kr,minBitrate:qn,minIndex:er,preferHDR:Hr}=_r;xn=er,Ot=ur,sn=Hr?wr[wr.length-1]:wr[0],Pt=kr,e=Math.max(e,qn),this.log(`picked start tier ${vt(_r)}`)}else Ot=We==null?void 0:We.codecSet,sn=We==null?void 0:We.videoRange;const nr=F?F.duration:I?I.duration:0,mr=this.bwEstimator.getEstimateTTFB()/1e3,Tr=[];for(let Gn=n;Gn>=t;Gn--){var pr;const _r=$[Gn],ur=Gn>b;if(!_r)continue;if(Fe.useMediaCapabilities&&!_r.supportedResult&&!_r.supportedPromise){const Vr=navigator.mediaCapabilities;typeof(Vr==null?void 0:Vr.decodingInfo)=="function"&&Dt(_r,Ft,sn,Pt,e,Xt)?(_r.supportedPromise=Mt(_r,Ft,Vr,this.supportedCache),_r.supportedPromise.then(Jr=>{if(!this.hls)return;_r.supportedResult=Jr;const Zi=this.hls.levels,Hi=Zi.indexOf(_r);Jr.error?this.warn(`MediaCapabilities decodingInfo error: "${Jr.error}" for level ${Hi} ${vt(Jr)}`):Jr.supported?Jr.decodingInfoResults.some(ds=>ds.smooth===!1||ds.powerEfficient===!1)&&this.log(`MediaCapabilities decodingInfo for level ${Hi} not smooth or powerEfficient: ${vt(Jr)}`):(this.warn(`Unsupported MediaCapabilities decodingInfo result for level ${Hi} ${vt(Jr)}`),Hi>-1&&Zi.length>1&&(this.log(`Removing unsupported level ${Hi}`),this.hls.removeLevel(Hi),this.hls.loadLevel===-1&&(this.hls.nextLoadLevel=0)))}).catch(Jr=>{this.warn(`Error handling MediaCapabilities decodingInfo: ${Jr}`)})):_r.supportedResult=En}if((Ot&&_r.codecSet!==Ot||sn&&_r.videoRange!==sn||ur&&Pt>_r.frameRate||!ur&&Pt>0&&Pt<_r.frameRate||(pr=_r.supportedResult)!=null&&(pr=pr.decodingInfoResults)!=null&&pr.some(Vr=>Vr.smooth===!1))&&(!xt||Gn!==xn)){Tr.push(Gn);continue}const wr=_r.details,kr=(F?wr==null?void 0:wr.partTarget:wr==null?void 0:wr.averagetargetduration)||nr;let qn;ur?qn=l*e:qn=s*e;const er=nr&&r>=nr*2&&i===0?_r.averageBitrate:_r.maxBitrate,Hr=this.getTimeToLoadFrag(mr,qn,er*kr,wr===void 0);if(qn>=er&&(Gn===p||_r.loadError===0&&_r.fragmentError===0)&&(Hr<=mr||!v(Hr)||et&&!this.bitrateTestDelay||Hr<c)){const Vr=this.forcedAutoLevel;return Gn!==me&&(Vr===-1||Vr!==me)&&(Tr.length&&this.trace(`Skipped level(s) ${Tr.join(",")} of ${n} max with CODECS and VIDEO-RANGE:"${$[Tr[0]].codecs}" ${$[Tr[0]].videoRange}; not compatible with "${Ot}" ${sn}`),this.info(`switch candidate:${b}->${Gn} adjustedbw(${Math.round(qn)})-bitrate=${Math.round(qn-er)} ttfb:${mr.toFixed(1)} avgDuration:${kr.toFixed(1)} maxFetchDuration:${c.toFixed(1)} fetchDuration:${Hr.toFixed(1)} firstSelection:${xt} codecSet:${_r.codecSet} videoRange:${_r.videoRange} hls.loadLevel:${me}`)),xt&&(this.firstSelection=Gn),Gn}}return-1}set nextAutoLevel(e){const t=this.deriveNextAutoLevel(e);this._nextAutoLevel!==t&&(this.nextAutoLevelKey="",this._nextAutoLevel=t)}deriveNextAutoLevel(e){const{maxAutoLevel:t,minAutoLevel:n}=this.hls;return Math.min(Math.max(e,n),t)}}const An={search:function(a,e){let t=0,n=a.length-1,r=null,i=null;for(;t<=n;){r=(t+n)/2|0,i=a[r];const s=e(i);if(s>0)t=r+1;else if(s<0)n=r-1;else return i}return null}};function Mn(a,e,t){if(e===null||!Array.isArray(a)||!a.length||!v(e))return null;const n=a[0].programDateTime;if(e<(n||0))return null;const r=a[a.length-1].endProgramDateTime;if(e>=(r||0))return null;for(let i=0;i<a.length;++i){const s=a[i];if(Dn(e,t,s))return s}return null}function Nn(a,e,t=0,n=0,r=.005){let i=null;if(a){i=e[1+a.sn-e[0].sn]||null;const l=a.endDTS-t;l>0&&l<15e-7&&(t+=15e-7),i&&a.level!==i.level&&i.end<=a.end&&(i=e[2+a.sn-e[0].sn]||null)}else t===0&&e[0].start===0&&(i=e[0]);if(i&&((!a||a.level===i.level)&&zn(t,n,i)===0||jn(i,a,Math.min(r,n))))return i;const s=An.search(e,zn.bind(null,t,n));return s&&(s!==a||!i)?s:i}function jn(a,e,t){if(e&&e.start===0&&e.level<a.level&&(e.endPTS||0)>0){const n=e.tagList.reduce((r,i)=>(i[0]==="INF"&&(r+=parseFloat(i[1])),r),t);return a.start<=n}return!1}function zn(a=0,e=0,t){if(t.start<=a&&t.start+t.duration>a)return 0;const n=Math.min(e,t.duration+(t.deltaPTS?t.deltaPTS:0));return t.start+t.duration-n<=a?1:t.start-n>a&&t.start?-1:0}function Dn(a,e,t){const n=Math.min(e,t.duration+(t.deltaPTS?t.deltaPTS:0))*1e3;return(t.endProgramDateTime||0)-n>a}function Bn(a,e,t){if(a&&a.startCC<=e&&a.endCC>=e){let n=a.fragments;const{fragmentHint:r}=a;r&&(n=n.concat(r));let i;return An.search(n,s=>s.cc<e?1:s.cc>e?-1:(i=s,s.end<=t?1:s.start>t?-1:0)),i||null}return null}function Sn(a){switch(a.details){case z.FRAG_LOAD_TIMEOUT:case z.KEY_LOAD_TIMEOUT:case z.LEVEL_LOAD_TIMEOUT:case z.MANIFEST_LOAD_TIMEOUT:return!0}return!1}function cr(a){return a.details.startsWith("key")}function Tt(a){return cr(a)&&!!a.frag&&!a.frag.decryptdata}function Fn(a,e){const t=Sn(e);return a.default[`${t?"timeout":"error"}Retry`]}function Kn(a,e){const t=a.backoff==="linear"?1:Math.pow(2,e);return Math.min(t*a.retryDelayMs,a.maxRetryDelayMs)}function Dr(a){return T(T({},a),{errorRetry:null,timeoutRetry:null})}function gr(a,e,t,n){if(!a)return!1;const r=n==null?void 0:n.code,i=e<a.maxNumRetry&&(Or(r)||!!t);return a.shouldRetry?a.shouldRetry(a,e,t,n,i):i}function Or(a){return Cr(a)||!!a&&(a<400||a>499)}function Cr(a){return a===0&&navigator.onLine===!1}var _n={DoNothing:0,SendEndCallback:1,SendAlternateToPenaltyBox:2,RemoveAlternatePermanently:3,InsertDiscontinuity:4,RetryRequest:5},wn={None:0,MoveAllAlternatesMatchingHost:1,MoveAllAlternatesMatchingHDCP:2,MoveAllAlternatesMatchingKey:4,SwitchToSDR:8};class jt extends Z{constructor(e){super("error-controller",e.logger),this.hls=void 0,this.playlistError=0,this.hls=e,this.registerListeners()}registerListeners(){const e=this.hls;e.on(g.ERROR,this.onError,this),e.on(g.MANIFEST_LOADING,this.onManifestLoading,this),e.on(g.LEVEL_UPDATED,this.onLevelUpdated,this)}unregisterListeners(){const e=this.hls;e&&(e.off(g.ERROR,this.onError,this),e.off(g.ERROR,this.onErrorOut,this),e.off(g.MANIFEST_LOADING,this.onManifestLoading,this),e.off(g.LEVEL_UPDATED,this.onLevelUpdated,this))}destroy(){this.unregisterListeners(),this.hls=null}startLoad(e){}stopLoad(){this.playlistError=0}getVariantLevelIndex(e){return(e==null?void 0:e.type)===te.MAIN?e.level:this.getVariantIndex()}getVariantIndex(){var e;const t=this.hls,n=t.currentLevel;return(e=t.loadLevelObj)!=null&&e.details||n===-1?t.loadLevel:n}variantHasKey(e,t){if(e){var n;if((n=e.details)!=null&&n.hasKey(t))return!0;const r=e.audioGroups;if(r)return this.hls.allAudioTracks.filter(s=>r.indexOf(s.groupId)>=0).some(s=>{var l;return(l=s.details)==null?void 0:l.hasKey(t)})}return!1}onManifestLoading(){this.playlistError=0}onLevelUpdated(){this.playlistError=0}onError(e,t){var n;if(t.fatal)return;const r=this.hls,i=t.context;switch(t.details){case z.FRAG_LOAD_ERROR:case z.FRAG_LOAD_TIMEOUT:case z.KEY_LOAD_ERROR:case z.KEY_LOAD_TIMEOUT:t.errorAction=this.getFragRetryOrSwitchAction(t);return;case z.FRAG_PARSING_ERROR:if((n=t.frag)!=null&&n.gap){t.errorAction=Vt();return}case z.FRAG_GAP:case z.FRAG_DECRYPT_ERROR:{t.errorAction=this.getFragRetryOrSwitchAction(t),t.errorAction.action=_n.SendAlternateToPenaltyBox;return}case z.LEVEL_EMPTY_ERROR:case z.LEVEL_PARSING_ERROR:{var s;const d=t.parent===te.MAIN?t.level:r.loadLevel;t.details===z.LEVEL_EMPTY_ERROR&&((s=t.context)!=null&&(s=s.levelDetails)!=null&&s.live)?t.errorAction=this.getPlaylistRetryOrSwitchAction(t,d):(t.levelRetry=!1,t.errorAction=this.getLevelSwitchAction(t,d))}return;case z.LEVEL_LOAD_ERROR:case z.LEVEL_LOAD_TIMEOUT:typeof(i==null?void 0:i.level)=="number"&&(t.errorAction=this.getPlaylistRetryOrSwitchAction(t,i.level));return;case z.AUDIO_TRACK_LOAD_ERROR:case z.AUDIO_TRACK_LOAD_TIMEOUT:case z.SUBTITLE_LOAD_ERROR:case z.SUBTITLE_TRACK_LOAD_TIMEOUT:if(i){const d=r.loadLevelObj;if(d&&(i.type===q.AUDIO_TRACK&&d.hasAudioGroup(i.groupId)||i.type===q.SUBTITLE_TRACK&&d.hasSubtitleGroup(i.groupId))){t.errorAction=this.getPlaylistRetryOrSwitchAction(t,r.loadLevel),t.errorAction.action=_n.SendAlternateToPenaltyBox,t.errorAction.flags=wn.MoveAllAlternatesMatchingHost;return}}return;case z.KEY_SYSTEM_STATUS_OUTPUT_RESTRICTED:t.errorAction={action:_n.SendAlternateToPenaltyBox,flags:wn.MoveAllAlternatesMatchingHDCP};return;case z.KEY_SYSTEM_SESSION_UPDATE_FAILED:case z.KEY_SYSTEM_STATUS_INTERNAL_ERROR:case z.KEY_SYSTEM_NO_SESSION:t.errorAction={action:_n.SendAlternateToPenaltyBox,flags:wn.MoveAllAlternatesMatchingKey};return;case z.BUFFER_ADD_CODEC_ERROR:case z.REMUX_ALLOC_ERROR:case z.BUFFER_APPEND_ERROR:if(!t.errorAction){var l;t.errorAction=this.getLevelSwitchAction(t,(l=t.level)!=null?l:r.loadLevel)}return;case z.INTERNAL_EXCEPTION:case z.BUFFER_APPENDING_ERROR:case z.BUFFER_FULL_ERROR:case z.LEVEL_SWITCH_ERROR:case z.BUFFER_STALLED_ERROR:case z.BUFFER_SEEK_OVER_HOLE:case z.BUFFER_NUDGE_ON_STALL:t.errorAction=Vt();return}t.type===fe.KEY_SYSTEM_ERROR&&(t.levelRetry=!1,t.errorAction=Vt())}getPlaylistRetryOrSwitchAction(e,t){const n=this.hls,r=Fn(n.config.playlistLoadPolicy,e),i=this.playlistError++;if(gr(r,i,Sn(e),e.response))return{action:_n.RetryRequest,flags:wn.None,retryConfig:r,retryCount:i};const l=this.getLevelSwitchAction(e,t);return r&&(l.retryConfig=r,l.retryCount=i),l}getFragRetryOrSwitchAction(e){const t=this.hls,n=this.getVariantLevelIndex(e.frag),r=t.levels[n],{fragLoadPolicy:i,keyLoadPolicy:s}=t.config,l=Fn(cr(e)?s:i,e),d=t.levels.reduce((p,b)=>p+b.fragmentError,0);if(r&&(e.details!==z.FRAG_GAP&&r.fragmentError++,!Tt(e)&&gr(l,d,Sn(e),e.response)))return{action:_n.RetryRequest,flags:wn.None,retryConfig:l,retryCount:d};const c=this.getLevelSwitchAction(e,n);return l&&(c.retryConfig=l,c.retryCount=d),c}getLevelSwitchAction(e,t){const n=this.hls;t==null&&(t=n.loadLevel);const r=this.hls.levels[t];if(r){var i,s;const c=e.details;r.loadError++,c===z.BUFFER_APPEND_ERROR&&r.fragmentError++;let p=-1;const{levels:b,loadLevel:I,minAutoLevel:F,maxAutoLevel:$}=n;!n.autoLevelEnabled&&!n.config.preserveManualLevelOnError&&(n.loadLevel=-1);const ge=(i=e.frag)==null?void 0:i.type,Fe=(ge===te.AUDIO&&c===z.FRAG_PARSING_ERROR||e.sourceBufferName==="audio"&&(c===z.BUFFER_ADD_CODEC_ERROR||c===z.BUFFER_APPEND_ERROR))&&b.some(({audioCodec:sn})=>r.audioCodec!==sn),et=e.sourceBufferName==="video"&&(c===z.BUFFER_ADD_CODEC_ERROR||c===z.BUFFER_APPEND_ERROR)&&b.some(({codecSet:sn,audioCodec:Pt})=>r.codecSet!==sn&&r.audioCodec===Pt),{type:xt,groupId:Ot}=(s=e.context)!=null?s:{};for(let sn=b.length;sn--;){const Pt=(sn+I)%b.length;if(Pt!==I&&Pt>=F&&Pt<=$&&b[Pt].loadError===0){var l,d;const Xt=b[Pt];if(c===z.FRAG_GAP&&ge===te.MAIN&&e.frag){const Yt=b[Pt].details;if(Yt){const Ft=Nn(e.frag,Yt.fragments,e.frag.start);if(Ft!=null&&Ft.gap)continue}}else{if(xt===q.AUDIO_TRACK&&Xt.hasAudioGroup(Ot)||xt===q.SUBTITLE_TRACK&&Xt.hasSubtitleGroup(Ot))continue;if(ge===te.AUDIO&&(l=r.audioGroups)!=null&&l.some(Yt=>Xt.hasAudioGroup(Yt))||ge===te.SUBTITLE&&(d=r.subtitleGroups)!=null&&d.some(Yt=>Xt.hasSubtitleGroup(Yt))||Fe&&r.audioCodec===Xt.audioCodec||et&&r.codecSet===Xt.codecSet||!Fe&&r.codecSet!==Xt.codecSet)continue}p=Pt;break}}if(p>-1&&n.loadLevel!==p)return e.levelRetry=!0,this.playlistError=0,{action:_n.SendAlternateToPenaltyBox,flags:wn.None,nextAutoLevel:p}}return{action:_n.SendAlternateToPenaltyBox,flags:wn.MoveAllAlternatesMatchingHost}}onErrorOut(e,t){var n;switch((n=t.errorAction)==null?void 0:n.action){case _n.DoNothing:break;case _n.SendAlternateToPenaltyBox:this.sendAlternateToPenaltyBox(t),!t.errorAction.resolved&&t.details!==z.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 _n.RetryRequest:break}if(t.fatal){this.hls.stopLoad();return}}sendAlternateToPenaltyBox(e){const t=this.hls,n=e.errorAction;if(!n)return;const{flags:r}=n,i=n.nextAutoLevel;switch(r){case wn.None:this.switchLevel(e,i);break;case wn.MoveAllAlternatesMatchingHDCP:{const d=this.getVariantLevelIndex(e.frag),c=t.levels[d],p=c==null?void 0:c.attrs["HDCP-LEVEL"];if(n.hdcpLevel=p,p==="NONE")this.warn("HDCP policy resticted output with HDCP-LEVEL=NONE");else if(p){t.maxHdcpLevel=He[He.indexOf(p)-1],n.resolved=!0,this.warn(`Restricting playback to HDCP-LEVEL of "${t.maxHdcpLevel}" or lower`);break}}case wn.MoveAllAlternatesMatchingKey:{const d=e.decryptdata;if(d){const c=this.hls.levels,p=c.length;for(let I=p;I--;)if(this.variantHasKey(c[I],d)){var s,l;this.log(`Banned key found in level ${I} (${c[I].bitrate}bps) or audio group "${(s=c[I].audioGroups)==null?void 0:s.join(",")}" (${(l=e.frag)==null?void 0:l.type} fragment) ${ue(d.keyId||[])}`),c[I].fragmentError++,c[I].loadError++,this.log(`Removing level ${I} with key error (${e.error})`),this.hls.removeLevel(I)}const b=e.frag;if(this.hls.levels.length<p)n.resolved=!0;else if(b&&b.type!==te.MAIN){const I=b.decryptdata;I&&!d.matches(I)&&(n.resolved=!0)}}break}}n.resolved||this.switchLevel(e,i)}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===z.BUFFER_ADD_CODEC_ERROR&&e.mimeType&&e.sourceBufferName!=="audiovideo")){const n=mn(e.mimeType),r=this.hls.levels;for(let i=r.length;i--;)r[i][`${e.sourceBufferName}Codec`]===n&&(this.log(`Removing level ${i} for ${e.details} ("${n}" not supported)`),this.hls.removeLevel(i))}}}function Vt(a){const e={action:_n.DoNothing,flags:wn.None};return a&&(e.resolved=!0),e}var un={NOT_LOADED:"NOT_LOADED",APPENDING:"APPENDING",PARTIAL:"PARTIAL",OK:"OK"};class Cn{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&&(e.on(g.MANIFEST_LOADING,this.onManifestLoading,this),e.on(g.BUFFER_APPENDED,this.onBufferAppended,this),e.on(g.FRAG_BUFFERED,this.onFragBuffered,this),e.on(g.FRAG_LOADED,this.onFragLoaded,this))}_unregisterListeners(){const{hls:e}=this;e&&(e.off(g.MANIFEST_LOADING,this.onManifestLoading,this),e.off(g.BUFFER_APPENDED,this.onBufferAppended,this),e.off(g.FRAG_BUFFERED,this.onFragBuffered,this),e.off(g.FRAG_LOADED,this.onFragLoaded,this))}destroy(){this._unregisterListeners(),this.hls=this.fragments=this.activePartLists=this.endListFragments=this.timeRanges=null}getAppendedFrag(e,t){const n=this.activePartLists[t];if(n)for(let r=n.length;r--;){const i=n[r];if(!i)break;if(i.start<=e&&e<=i.end&&i.loaded)return i}return this.getBufferedFrag(e,t)}getBufferedFrag(e,t){return this.getFragAtPos(e,t,!0)}getFragAtPos(e,t,n){const{fragments:r}=this,i=Object.keys(r);for(let s=i.length;s--;){const l=r[i[s]];if((l==null?void 0:l.body.type)===t&&(!n||l.buffered)){const d=l.body;if(d.start<=e&&e<=d.end)return d}}return null}detectEvictedFragments(e,t,n,r,i){this.timeRanges&&(this.timeRanges[e]=t);const s=(r==null?void 0:r.fragment.sn)||-1;Object.keys(this.fragments).forEach(l=>{const d=this.fragments[l];if(!d||s>=d.body.sn)return;if(!d.buffered&&(!d.loaded||i)){d.body.type===n&&this.removeFragment(d.body);return}const c=d.range[e];if(c){if(c.time.length===0){this.removeFragment(d.body);return}c.time.some(p=>{const b=!this.isTimeBuffered(p.startPTS,p.endPTS,t);return b&&this.removeFragment(d.body),b})}})}detectPartialFragments(e){const t=this.timeRanges;if(!t||e.frag.sn==="initSegment")return;const n=e.frag,r=tr(n),i=this.fragments[r];if(!i||i.buffered&&n.gap)return;const s=!n.relurl;Object.keys(t).forEach(l=>{const d=n.elementaryStreams[l];if(!d)return;const c=t[l],p=s||d.partial===!0;i.range[l]=this.getBufferedTimes(n,e.part,p,c)}),i.loaded=null,Object.keys(i.range).length?(this.bufferedEnd(i,n),Vn(i)||this.removeParts(n.sn-1,n.type)):this.removeFragment(i.body)}bufferedEnd(e,t){e.buffered=!0,(e.body.endList=t.endList||e.body.endList)&&(this.endListFragments[e.body.type]=e)}removeParts(e,t){const n=this.activePartLists[t];n&&(this.activePartLists[t]=tn(n,r=>r.fragment.sn>=e))}fragBuffered(e,t){const n=tr(e);let r=this.fragments[n];!r&&t&&(r=this.fragments[n]={body:e,appendedPTS:null,loaded:null,buffered:!1,range:Object.create(null)},e.gap&&(this.hasGaps=!0)),r&&(r.loaded=null,this.bufferedEnd(r,e))}getBufferedTimes(e,t,n,r){const i={time:[],partial:n},s=e.start,l=e.end,d=e.minEndPTS||l,c=e.maxStartPTS||s;for(let p=0;p<r.length;p++){const b=r.start(p)-this.bufferPadding,I=r.end(p)+this.bufferPadding;if(c>=b&&d<=I){i.time.push({startPTS:Math.max(s,r.start(p)),endPTS:Math.min(l,r.end(p))});break}else if(s<I&&l>b){const F=Math.max(s,r.start(p)),$=Math.min(l,r.end(p));$>F&&(i.partial=!0,i.time.push({startPTS:F,endPTS:$}))}else if(l<=b)break}return i}getPartialFragment(e){let t=null,n,r,i,s=0;const{bufferPadding:l,fragments:d}=this;return Object.keys(d).forEach(c=>{const p=d[c];p&&Vn(p)&&(r=p.body.start-l,i=p.body.end+l,e>=r&&e<=i&&(n=Math.min(e-r,i-e),s<=n&&(t=p.body,s=n)))}),t}isEndListAppended(e){const t=this.endListFragments[e];return t!==void 0&&(t.buffered||Vn(t))}getState(e){const t=tr(e),n=this.fragments[t];return n?n.buffered?Vn(n)?un.PARTIAL:un.OK:un.APPENDING:un.NOT_LOADED}isTimeBuffered(e,t,n){let r,i;for(let s=0;s<n.length;s++){if(r=n.start(s)-this.bufferPadding,i=n.end(s)+this.bufferPadding,e>=r&&t<=i)return!0;if(t<=r)return!1}return!1}onManifestLoading(){this.removeAllFragments()}onFragLoaded(e,t){if(t.frag.sn==="initSegment"||t.frag.bitrateTest)return;const n=t.frag,r=t.part?null:t,i=tr(n);this.fragments[i]={body:n,appendedPTS:null,loaded:r,buffered:!1,range:Object.create(null)}}onBufferAppended(e,t){const{frag:n,part:r,timeRanges:i,type:s}=t;if(n.sn==="initSegment")return;const l=n.type;if(r){let c=this.activePartLists[l];c||(this.activePartLists[l]=c=[]),c.push(r)}this.timeRanges=i;const d=i[s];this.detectEvictedFragments(s,d,l,r)}onFragBuffered(e,t){this.detectPartialFragments(t)}hasFragment(e){const t=tr(e);return!!this.fragments[t]}hasFragments(e){const{fragments:t}=this,n=Object.keys(t);if(!e)return n.length>0;for(let r=n.length;r--;){const i=t[n[r]];if((i==null?void 0:i.body.type)===e)return!0}return!1}hasParts(e){var t;return!!((t=this.activePartLists[e])!=null&&t.length)}removeFragmentsInRange(e,t,n,r,i){r&&!this.hasGaps||Object.keys(this.fragments).forEach(s=>{const l=this.fragments[s];if(!l)return;const d=l.body;d.type!==n||r&&!d.gap||d.start<t&&d.end>e&&(l.buffered||i)&&this.removeFragment(d)})}removeFragment(e){const t=tr(e);e.clearElementaryStreamInfo();const n=this.activePartLists[e.type];if(n){const r=e.sn;this.activePartLists[e.type]=tn(n,i=>i.fragment.sn!==r)}delete this.fragments[t],e.endList&&delete this.endListFragments[e.type]}removeAllFragments(){var e;this.fragments=Object.create(null),this.endListFragments=Object.create(null),this.activePartLists=Object.create(null),this.hasGaps=!1;const t=(e=this.hls)==null||(e=e.latestLevelDetails)==null?void 0:e.partList;t&&t.forEach(n=>n.clearElementaryStreamInfo())}}function Vn(a){var e,t,n;return a.buffered&&!!(a.body.gap||(e=a.range.video)!=null&&e.partial||(t=a.range.audio)!=null&&t.partial||(n=a.range.audiovideo)!=null&&n.partial)}function tr(a){return`${a.type}_${a.level}_${a.sn}`}function tn(a,e){return a.filter(t=>{const n=e(t);return n||t.clearElementaryStreamInfo(),n})}var Yn={cbc:0,ctr:1};class vr{constructor(e,t,n){this.subtle=void 0,this.aesIV=void 0,this.aesMode=void 0,this.subtle=e,this.aesIV=t,this.aesMode=n}decrypt(e,t){switch(this.aesMode){case Yn.cbc:return this.subtle.decrypt({name:"AES-CBC",iv:this.aesIV},t,e);case Yn.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 Lr(a){const e=a.byteLength,t=e&&new DataView(a.buffer).getUint8(e-1);return t?a.slice(0,e-t):a}class Br{constructor(){this.rcon=[0,1,2,4,8,16,32,64,128,27,54],this.subMix=[new Uint32Array(256),new Uint32Array(256),new Uint32Array(256),new Uint32Array(256)],this.invSubMix=[new Uint32Array(256),new Uint32Array(256),new Uint32Array(256),new Uint32Array(256)],this.sBox=new Uint32Array(256),this.invSBox=new Uint32Array(256),this.key=new Uint32Array(0),this.ksRows=0,this.keySize=0,this.keySchedule=void 0,this.invKeySchedule=void 0,this.initTable()}uint8ArrayToUint32Array_(e){const t=new DataView(e),n=new Uint32Array(4);for(let r=0;r<4;r++)n[r]=t.getUint32(r*4);return n}initTable(){const e=this.sBox,t=this.invSBox,n=this.subMix,r=n[0],i=n[1],s=n[2],l=n[3],d=this.invSubMix,c=d[0],p=d[1],b=d[2],I=d[3],F=new Uint32Array(256);let $=0,ge=0,me=0;for(me=0;me<256;me++)me<128?F[me]=me<<1:F[me]=me<<1^283;for(me=0;me<256;me++){let Fe=ge^ge<<1^ge<<2^ge<<3^ge<<4;Fe=Fe>>>8^Fe&255^99,e[$]=Fe,t[Fe]=$;const We=F[$],et=F[We],xt=F[et];let Ot=F[Fe]*257^Fe*16843008;r[$]=Ot<<24|Ot>>>8,i[$]=Ot<<16|Ot>>>16,s[$]=Ot<<8|Ot>>>24,l[$]=Ot,Ot=xt*16843009^et*65537^We*257^$*16843008,c[Fe]=Ot<<24|Ot>>>8,p[Fe]=Ot<<16|Ot>>>16,b[Fe]=Ot<<8|Ot>>>24,I[Fe]=Ot,$?($=We^F[F[F[xt^We]]],ge^=F[F[ge]]):$=ge=1}}expandKey(e){const t=this.uint8ArrayToUint32Array_(e);let n=!0,r=0;for(;r<t.length&&n;)n=t[r]===this.key[r],r++;if(n)return;this.key=t;const i=this.keySize=t.length;if(i!==4&&i!==6&&i!==8)throw new Error("Invalid aes key size="+i);const s=this.ksRows=(i+6+1)*4;let l,d;const c=this.keySchedule=new Uint32Array(s),p=this.invKeySchedule=new Uint32Array(s),b=this.sBox,I=this.rcon,F=this.invSubMix,$=F[0],ge=F[1],me=F[2],Fe=F[3];let We,et;for(l=0;l<s;l++){if(l<i){We=c[l]=t[l];continue}et=We,l%i===0?(et=et<<8|et>>>24,et=b[et>>>24]<<24|b[et>>>16&255]<<16|b[et>>>8&255]<<8|b[et&255],et^=I[l/i|0]<<24):i>6&&l%i===4&&(et=b[et>>>24]<<24|b[et>>>16&255]<<16|b[et>>>8&255]<<8|b[et&255]),c[l]=We=(c[l-i]^et)>>>0}for(d=0;d<s;d++)l=s-d,d&3?et=c[l]:et=c[l-4],d<4||l<=4?p[d]=et:p[d]=$[b[et>>>24]]^ge[b[et>>>16&255]]^me[b[et>>>8&255]]^Fe[b[et&255]],p[d]=p[d]>>>0}networkToHostOrderSwap(e){return e<<24|(e&65280)<<8|(e&16711680)>>8|e>>>24}decrypt(e,t,n){const r=this.keySize+6,i=this.invKeySchedule,s=this.invSBox,l=this.invSubMix,d=l[0],c=l[1],p=l[2],b=l[3],I=this.uint8ArrayToUint32Array_(n);let F=I[0],$=I[1],ge=I[2],me=I[3];const Fe=new Int32Array(e),We=new Int32Array(Fe.length);let et,xt,Ot,sn,Pt,Xt,Yt,Ft,xn,nr,mr,Tr,pr,Gn;const _r=this.networkToHostOrderSwap;for(;t<Fe.length;){for(xn=_r(Fe[t]),nr=_r(Fe[t+1]),mr=_r(Fe[t+2]),Tr=_r(Fe[t+3]),Pt=xn^i[0],Xt=Tr^i[1],Yt=mr^i[2],Ft=nr^i[3],pr=4,Gn=1;Gn<r;Gn++)et=d[Pt>>>24]^c[Xt>>16&255]^p[Yt>>8&255]^b[Ft&255]^i[pr],xt=d[Xt>>>24]^c[Yt>>16&255]^p[Ft>>8&255]^b[Pt&255]^i[pr+1],Ot=d[Yt>>>24]^c[Ft>>16&255]^p[Pt>>8&255]^b[Xt&255]^i[pr+2],sn=d[Ft>>>24]^c[Pt>>16&255]^p[Xt>>8&255]^b[Yt&255]^i[pr+3],Pt=et,Xt=xt,Yt=Ot,Ft=sn,pr=pr+4;et=s[Pt>>>24]<<24^s[Xt>>16&255]<<16^s[Yt>>8&255]<<8^s[Ft&255]^i[pr],xt=s[Xt>>>24]<<24^s[Yt>>16&255]<<16^s[Ft>>8&255]<<8^s[Pt&255]^i[pr+1],Ot=s[Yt>>>24]<<24^s[Ft>>16&255]<<16^s[Pt>>8&255]<<8^s[Xt&255]^i[pr+2],sn=s[Ft>>>24]<<24^s[Pt>>16&255]<<16^s[Xt>>8&255]<<8^s[Yt&255]^i[pr+3],We[t]=_r(et^F),We[t+1]=_r(sn^$),We[t+2]=_r(Ot^ge),We[t+3]=_r(xt^me),F=xn,$=nr,ge=mr,me=Tr,t=t+4}return We.buffer}}class jr{constructor(e,t,n){this.subtle=void 0,this.key=void 0,this.aesMode=void 0,this.subtle=e,this.key=t,this.aesMode=n}expandKey(){const e=dr(this.aesMode);return this.subtle.importKey("raw",this.key,{name:e},!1,["encrypt","decrypt"])}}function dr(a){switch(a){case Yn.cbc:return"AES-CBC";case Yn.ctr:return"AES-CTR";default:throw new Error(`[FastAESKey] invalid aes mode ${a}`)}}const Zr=16;class fr{constructor(e,{removePKCS7Padding:t=!0}={}){if(this.logEnabled=!0,this.removePKCS7Padding=void 0,this.subtle=null,this.softwareDecrypter=null,this.key=null,this.fastAesKey=null,this.remainderData=null,this.currentIV=null,this.currentResult=null,this.useSoftware=void 0,this.enableSoftwareAES=void 0,this.enableSoftwareAES=e.enableSoftwareAES,this.removePKCS7Padding=t,t)try{const n=self.crypto;n&&(this.subtle=n.subtle||n.webkitSubtle)}catch(n){}this.useSoftware=!this.subtle}destroy(){this.subtle=null,this.softwareDecrypter=null,this.key=null,this.fastAesKey=null,this.remainderData=null,this.currentIV=null,this.currentResult=null}isSync(){return this.useSoftware}flush(){const{currentResult:e,remainderData:t}=this;if(!e||t)return this.reset(),null;const n=new Uint8Array(e);return this.reset(),this.removePKCS7Padding?Lr(n):n}reset(){this.currentResult=null,this.currentIV=null,this.remainderData=null,this.softwareDecrypter&&(this.softwareDecrypter=null)}decrypt(e,t,n,r){return this.useSoftware?new Promise((i,s)=>{const l=ArrayBuffer.isView(e)?e:new Uint8Array(e);this.softwareDecrypt(l,t,n,r);const d=this.flush();d?i(d.buffer):s(new Error("[softwareDecrypt] Failed to decrypt data"))}):this.webCryptoDecrypt(new Uint8Array(e),t,n,r)}softwareDecrypt(e,t,n,r){const{currentIV:i,currentResult:s,remainderData:l}=this;if(r!==Yn.cbc||t.byteLength!==16)return ie.warn("SoftwareDecrypt: can only handle AES-128-CBC"),null;this.logOnce("JS AES decrypt"),l&&(e=ht(l,e),this.remainderData=null);const d=this.getValidChunk(e);if(!d.length)return null;i&&(n=i);let c=this.softwareDecrypter;c||(c=this.softwareDecrypter=new Br),c.expandKey(t);const p=s;return this.currentResult=c.decrypt(d.buffer,0,n),this.currentIV=d.slice(-16).buffer,p||null}webCryptoDecrypt(e,t,n,r){if(this.key!==t||!this.fastAesKey){if(!this.subtle)return Promise.resolve(this.onWebCryptoError(e,t,n,r));this.key=t,this.fastAesKey=new jr(this.subtle,t,r)}return this.fastAesKey.expandKey().then(i=>this.subtle?(this.logOnce("WebCrypto AES decrypt"),new vr(this.subtle,new Uint8Array(n),r).decrypt(e.buffer,i)):Promise.reject(new Error("web crypto not initialized"))).catch(i=>(ie.warn(`[decrypter]: WebCrypto Error, disable WebCrypto API, ${i.name}: ${i.message}`),this.onWebCryptoError(e,t,n,r)))}onWebCryptoError(e,t,n,r){const i=this.enableSoftwareAES;if(i){this.useSoftware=!0,this.logEnabled=!0,this.softwareDecrypt(e,t,n,r);const s=this.flush();if(s)return s.buffer}throw new Error("WebCrypto"+(i?" and softwareDecrypt":"")+": failed to decrypt data")}getValidChunk(e){let t=e;const n=e.length-e.length%Zr;return n!==e.length&&(t=e.slice(0,n),this.remainderData=e.slice(n)),t}logOnce(e){this.logEnabled&&(ie.log(`[decrypter]: ${e}`),this.logEnabled=!1)}}const Nr=Math.pow(2,17);class sr{constructor(e){this.config=void 0,this.loader=null,this.partLoadTimeout=-1,this.config=e}destroy(){this.loader&&(this.loader.destroy(),this.loader=null)}abort(){this.loader&&this.loader.abort()}load(e,t){const n=e.url;if(!n)return Promise.reject(new Qn({type:fe.NETWORK_ERROR,details:z.FRAG_LOAD_ERROR,fatal:!1,frag:e,error:new Error(`Fragment does not have a ${n?"part list":"url"}`),networkDetails:null}));this.abort();const r=this.config,i=r.fLoader,s=r.loader;return new Promise((l,d)=>{if(this.loader&&this.loader.destroy(),e.gap)if(e.tagList.some($=>$[0]==="GAP")){d(Ar(e));return}else e.gap=!1;const c=this.loader=i?new i(r):new s(r),p=ar(e);e.loader=c;const b=Dr(r.fragLoadPolicy.default),I={loadPolicy:b,timeout:b.maxLoadTimeMs,maxRetry:0,retryDelay:0,maxRetryDelay:0,highWaterMark:e.sn==="initSegment"?1/0:Nr};e.stats=c.stats;const F={onSuccess:($,ge,me,Fe)=>{this.resetLoader(e,c);let We=$.data;me.resetIV&&e.decryptdata&&(e.decryptdata.iv=new Uint8Array(We.slice(0,16)),We=We.slice(16)),l({frag:e,part:null,payload:We,networkDetails:Fe})},onError:($,ge,me,Fe)=>{this.resetLoader(e,c),d(new Qn({type:fe.NETWORK_ERROR,details:z.FRAG_LOAD_ERROR,fatal:!1,frag:e,response:T({url:n,data:void 0},$),error:new Error(`HTTP Error ${$.code} ${$.text}`),networkDetails:me,stats:Fe}))},onAbort:($,ge,me)=>{this.resetLoader(e,c),d(new Qn({type:fe.NETWORK_ERROR,details:z.INTERNAL_ABORTED,fatal:!1,frag:e,error:new Error("Aborted"),networkDetails:me,stats:$}))},onTimeout:($,ge,me)=>{this.resetLoader(e,c),d(new Qn({type:fe.NETWORK_ERROR,details:z.FRAG_LOAD_TIMEOUT,fatal:!1,frag:e,error:new Error(`Timeout after ${I.timeout}ms`),networkDetails:me,stats:$}))}};t&&(F.onProgress=($,ge,me,Fe)=>t({frag:e,part:null,payload:me,networkDetails:Fe})),c.load(p,I,F)})}loadPart(e,t,n){this.abort();const r=this.config,i=r.fLoader,s=r.loader;return new Promise((l,d)=>{if(this.loader&&this.loader.destroy(),e.gap||t.gap){d(Ar(e,t));return}const c=this.loader=i?new i(r):new s(r),p=ar(e,t);e.loader=c;const b=Dr(r.fragLoadPolicy.default),I={loadPolicy:b,timeout:b.maxLoadTimeMs,maxRetry:0,retryDelay:0,maxRetryDelay:0,highWaterMark:Nr};t.stats=c.stats,c.load(p,I,{onSuccess:(F,$,ge,me)=>{this.resetLoader(e,c),this.updateStatsFromPart(e,t);const Fe={frag:e,part:t,payload:F.data,networkDetails:me};n(Fe),l(Fe)},onError:(F,$,ge,me)=>{this.resetLoader(e,c),d(new Qn({type:fe.NETWORK_ERROR,details:z.FRAG_LOAD_ERROR,fatal:!1,frag:e,part:t,response:T({url:p.url,data:void 0},F),error:new Error(`HTTP Error ${F.code} ${F.text}`),networkDetails:ge,stats:me}))},onAbort:(F,$,ge)=>{e.stats.aborted=t.stats.aborted,this.resetLoader(e,c),d(new Qn({type:fe.NETWORK_ERROR,details:z.INTERNAL_ABORTED,fatal:!1,frag:e,part:t,error:new Error("Aborted"),networkDetails:ge,stats:F}))},onTimeout:(F,$,ge)=>{this.resetLoader(e,c),d(new Qn({type:fe.NETWORK_ERROR,details:z.FRAG_LOAD_TIMEOUT,fatal:!1,frag:e,part:t,error:new Error(`Timeout after ${I.timeout}ms`),networkDetails:ge,stats:F}))}})})}updateStatsFromPart(e,t){const n=e.stats,r=t.stats,i=r.total;if(n.loaded+=r.loaded,i){const d=Math.round(e.duration/t.duration),c=Math.min(Math.round(n.loaded/i),d),b=(d-c)*Math.round(n.loaded/c);n.total=n.loaded+b}else n.total=Math.max(n.loaded,n.total);const s=n.loading,l=r.loading;s.start?s.first+=l.first-l.start:(s.start=l.start,s.first=l.first),s.end=l.end}resetLoader(e,t){e.loader=null,this.loader===t&&(self.clearTimeout(this.partLoadTimeout),this.loader=null),t.destroy()}}function ar(a,e=null){const t=e||a,n={frag:a,part:e,responseType:"arraybuffer",url:t.url,headers:{},rangeStart:0,rangeEnd:0},r=t.byteRangeStartOffset,i=t.byteRangeEndOffset;if(v(r)&&v(i)){var s;let l=r,d=i;if(a.sn==="initSegment"&&Rr((s=a.decryptdata)==null?void 0:s.method)){const c=i-r;c%16&&(d=i+(16-c%16)),r!==0&&(n.resetIV=!0,l=r-16)}n.rangeStart=l,n.rangeEnd=d}return n}function Ar(a,e){const t=new Error(`GAP ${a.gap?"tag":"attribute"} found`),n={type:fe.MEDIA_ERROR,details:z.FRAG_GAP,fatal:!1,frag:a,error:t,networkDetails:null};return e&&(n.part=e),(e||a).stats.aborted=!0,new Qn(n)}function Rr(a){return a==="AES-128"||a==="AES-256"}class Qn extends Error{constructor(e){super(e.error.message),this.data=void 0,this.data=e}}class Kr extends Z{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 Fr{constructor(e,t,n,r=0,i=-1,s=!1){this.level=void 0,this.sn=void 0,this.part=void 0,this.id=void 0,this.size=void 0,this.partial=void 0,this.transmuxing=Gr(),this.buffering={audio:Gr(),video:Gr(),audiovideo:Gr()},this.level=e,this.sn=t,this.id=n,this.size=r,this.part=i,this.partial=s}}function Gr(){return{start:0,executeStart:0,executeEnd:0,end:0}}const Ur={length:0,start:()=>0,end:()=>0};class Jn{static isBuffered(e,t){if(e){const n=Jn.getBuffered(e);for(let r=n.length;r--;)if(t>=n.start(r)&&t<=n.end(r))return!0}return!1}static bufferedRanges(e){if(e){const t=Jn.getBuffered(e);return Jn.timeRangesToArray(t)}return[]}static timeRangesToArray(e){const t=[];for(let n=0;n<e.length;n++)t.push({start:e.start(n),end:e.end(n)});return t}static bufferInfo(e,t,n){if(e){const r=Jn.bufferedRanges(e);if(r.length)return Jn.bufferedInfo(r,t,n)}return{len:0,start:t,end:t,bufferedIndex:-1}}static bufferedInfo(e,t,n){t=Math.max(0,t),e.length>1&&e.sort((p,b)=>p.start-b.start||b.end-p.end);let r=-1,i=[];if(n)for(let p=0;p<e.length;p++){t>=e[p].start&&t<=e[p].end&&(r=p);const b=i.length;if(b){const I=i[b-1].end;e[p].start-I<n?e[p].end>I&&(i[b-1].end=e[p].end):i.push(e[p])}else i.push(e[p])}else i=e;let s=0,l,d=t,c=t;for(let p=0;p<i.length;p++){const b=i[p].start,I=i[p].end;if(r===-1&&t>=b&&t<=I&&(r=p),t+n>=b&&t<I)d=b,c=I,s=c-t;else if(t+n<b){l=b;break}}return{len:s,start:d||0,end:c||0,nextStart:l,buffered:e,bufferedIndex:r}}static getBuffered(e){try{return e.buffered||Ur}catch(t){return ie.log("failed to get media.buffered",t),Ur}}}const Si=/\{\$([a-zA-Z0-9-_]+)\}/g;function vn(a){return Si.test(a)}function ni(a,e){if(a.variableList!==null||a.hasVariableRefs){const t=a.variableList;return e.replace(Si,n=>{const r=n.substring(2,n.length-1),i=t==null?void 0:t[r];return i===void 0?(a.playlistParsingError||(a.playlistParsingError=new Error(`Missing preceding EXT-X-DEFINE tag for Variable Reference: "${r}"`)),n):i})}return e}function yi(a,e,t){let n=a.variableList;n||(a.variableList=n={});let r,i;if("QUERYPARAM"in e){r=e.QUERYPARAM;try{const s=new self.URL(t).searchParams;if(s.has(r))i=s.get(r);else throw new Error(`"${r}" does not match any query parameter in URI: "${t}"`)}catch(s){a.playlistParsingError||(a.playlistParsingError=new Error(`EXT-X-DEFINE QUERYPARAM: ${s.message}`))}}else r=e.NAME,i=e.VALUE;r in n?a.playlistParsingError||(a.playlistParsingError=new Error(`EXT-X-DEFINE duplicate Variable Name declarations: "${r}"`)):n[r]=i||""}function _i(a,e,t){const n=e.IMPORT;if(t&&n in t){let r=a.variableList;r||(a.variableList=r={}),r[n]=t[n]}else a.playlistParsingError||(a.playlistParsingError=new Error(`EXT-X-DEFINE IMPORT attribute not found in Multivariant Playlist: "${n}"`))}const oi=/^(\d+)x(\d+)$/,pi=/(.+?)=(".*?"|.*?)(?:,|$)/g;class hr{constructor(e,t){typeof e=="string"&&(e=hr.parseAttrList(e,t)),y(this,e)}get clientAttrs(){return Object.keys(this).filter(e=>e.substring(0,2)==="X-")}decimalInteger(e){const t=parseInt(this[e],10);return t>Number.MAX_SAFE_INTEGER?1/0:t}hexadecimalInteger(e){if(this[e]){let t=(this[e]||"0x").slice(2);t=(t.length&1?"0":"")+t;const n=new Uint8Array(t.length/2);for(let r=0;r<t.length/2;r++)n[r]=parseInt(t.slice(r*2,r*2+2),16);return n}return null}hexadecimalIntegerAsNumber(e){const t=parseInt(this[e],16);return t>Number.MAX_SAFE_INTEGER?1/0:t}decimalFloatingPoint(e){return parseFloat(this[e])}optionalFloat(e,t){const n=this[e];return n?parseFloat(n):t}enumeratedString(e){return this[e]}enumeratedStringList(e,t){const n=this[e];return(n?n.split(/[ ,]+/):[]).reduce((r,i)=>(r[i.toLowerCase()]=!0,r),t)}bool(e){return this[e]==="YES"}decimalResolution(e){const t=oi.exec(this[e]);if(t!==null)return{width:parseInt(t[1],10),height:parseInt(t[2],10)}}static parseAttrList(e,t){let n;const r={},i='"';for(pi.lastIndex=0;(n=pi.exec(e))!==null;){const s=n[1].trim();let l=n[2];const d=l.indexOf(i)===0&&l.lastIndexOf(i)===l.length-1;let c=!1;if(d)l=l.slice(1,-1);else switch(s){case"IV":case"SCTE35-CMD":case"SCTE35-IN":case"SCTE35-OUT":c=!0}if(t&&(d||c))l=ni(t,l);else if(!c&&!d)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":ie.warn(`${e}: attribute ${s} is missing quotes`)}r[s]=l}return r}}const Xr="com.apple.hls.interstitial";function gi(a){return a!=="ID"&&a!=="CLASS"&&a!=="CUE"&&a!=="START-DATE"&&a!=="DURATION"&&a!=="END-DATE"&&a!=="END-ON-NEXT"}function xi(a){return a==="SCTE35-OUT"||a==="SCTE35-IN"||a==="SCTE35-CMD"}class Mr{constructor(e,t,n=0){var r;if(this.attr=void 0,this.tagAnchor=void 0,this.tagOrder=void 0,this._startDate=void 0,this._endDate=void 0,this._dateAtEnd=void 0,this._cue=void 0,this._badValueForSameId=void 0,this.tagAnchor=(t==null?void 0:t.tagAnchor)||null,this.tagOrder=(r=t==null?void 0:t.tagOrder)!=null?r:n,t){const i=t.attr;for(const s in i)if(Object.prototype.hasOwnProperty.call(e,s)&&e[s]!==i[s]){ie.warn(`DATERANGE tag attribute: "${s}" does not match for tags with ID: "${e.ID}"`),this._badValueForSameId=s;break}e=y(new hr({}),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"]);v(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?(ie.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(v(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===Xr}get isValid(){return!!this.id&&!this._badValueForSameId&&v(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 Qr=10;class ii{constructor(e){this.PTSKnown=!1,this.alignedSliding=!1,this.averagetargetduration=void 0,this.endCC=0,this.endSN=0,this.fragments=void 0,this.fragmentHint=void 0,this.partList=null,this.dateRanges=void 0,this.dateRangeTagCount=0,this.live=!0,this.requestScheduled=-1,this.ageHeader=0,this.advancedDateTime=void 0,this.updated=!0,this.advanced=!0,this.misses=0,this.startCC=0,this.startSN=0,this.startTimeOffset=null,this.targetduration=0,this.totalduration=0,this.type=null,this.url=void 0,this.m3u8="",this.version=null,this.canBlockReload=!1,this.canSkipUntil=0,this.canSkipDateRanges=!1,this.skippedSegments=0,this.recentlyRemovedDateranges=void 0,this.partHoldBack=0,this.holdBack=0,this.partTarget=0,this.preloadHint=void 0,this.renditionReports=void 0,this.tuneInGoal=0,this.deltaUpdateFailed=void 0,this.driftStartTime=0,this.driftEndTime=0,this.driftStart=0,this.driftEnd=0,this.encryptedFragments=void 0,this.playlistParsingError=null,this.variableList=null,this.hasVariableRefs=!1,this.appliedTimelineOffset=void 0,this.fragments=[],this.encryptedFragments=[],this.dateRanges={},this.url=e}reloaded(e){if(!e){this.advanced=!0,this.updated=!0;return}const t=this.lastPartSn-e.lastPartSn,n=this.lastPartIndex-e.lastPartIndex;this.updated=this.endSN!==e.endSN||!!n||!!t||!this.live,this.advanced=this.endSN>e.endSN||t>0||t===0&&n>0,this.updated||this.advanced?this.misses=Math.floor(e.misses*.6):this.misses=e.misses+1}hasKey(e){return this.encryptedFragments.some(t=>{let n=t.decryptdata;return n||(t.setKeyFormat(e.keyFormat),n=t.decryptdata),!!n&&e.matches(n)})}get hasProgramDateTime(){return this.fragments.length?v(this.fragments[this.fragments.length-1].programDateTime):!1}get levelTargetDuration(){return this.averagetargetduration||this.targetduration||Qr}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(){return this.fragments.length?this.fragments[this.fragments.length-1].end:0}get fragmentStart(){return this.fragments.length?this.fragments[0].start:0}get age(){return this.advancedDateTime?Math.max(Date.now()-this.advancedDateTime,0)/1e3:0}get lastPartIndex(){var e;return(e=this.partList)!=null&&e.length?this.partList[this.partList.length-1].index:-1}get maxPartIndex(){const e=this.partList;if(e){const t=this.lastPartIndex;if(t!==-1){for(let n=e.length;n--;)if(e[n].index>t)return e[n].index;return t}}return 0}get lastPartSn(){var e;return(e=this.partList)!=null&&e.length?this.partList[this.partList.length-1].fragment.sn:this.endSN}get expired(){if(this.live&&this.age&&this.misses<3){const e=this.partEnd-this.fragmentStart;return this.age>Math.max(e,this.totalduration)+this.levelTargetDuration}return!1}}function ir(a,e){return a.length===e.length?!a.some((t,n)=>t!==e[n]):!1}function Er(a,e){return!a&&!e?!0:!a||!e?!1:ir(a,e)}function kn(a){return a==="AES-128"||a==="AES-256"||a==="AES-256-CTR"}function $n(a){switch(a){case"AES-128":case"AES-256":return Yn.cbc;case"AES-256-CTR":return Yn.ctr;default:throw new Error(`invalid full segment method ${a}`)}}function lr(a){return Uint8Array.from(atob(a),e=>e.charCodeAt(0))}function yr(a){return Uint8Array.from(unescape(encodeURIComponent(a)),e=>e.charCodeAt(0))}function Wr(a){const e=yr(a).subarray(0,16),t=new Uint8Array(16);return t.set(e,16-e.length),t}function Rn(a){const e=function(n,r,i){const s=n[r];n[r]=n[i],n[i]=s};e(a,0,3),e(a,1,2),e(a,4,5),e(a,6,7)}function Un(a){const e=a.split(":");let t=null;if(e[0]==="data"&&e.length===2){const n=e[1].split(";"),r=n[n.length-1].split(",");if(r.length===2){const i=r[0]==="base64",s=r[1];i?(n.splice(-1,1),t=lr(s)):t=Wr(s)}}return t}const rr=typeof self!="undefined"?self:void 0;var or={CLEARKEY:"org.w3.clearkey",FAIRPLAY:"com.apple.fps",PLAYREADY:"com.microsoft.playready",WIDEVINE:"com.widevine.alpha"},Sr={CLEARKEY:"org.w3.clearkey",FAIRPLAY:"com.apple.streamingkeydelivery",PLAYREADY:"com.microsoft.playready",WIDEVINE:"urn:uuid:edef8ba9-79d6-4ace-a3c8-27dcd51d21ed"};function Ei(a){switch(a){case Sr.FAIRPLAY:return or.FAIRPLAY;case Sr.PLAYREADY:return or.PLAYREADY;case Sr.WIDEVINE:return or.WIDEVINE;case Sr.CLEARKEY:return or.CLEARKEY}}function ri(a){switch(a){case or.FAIRPLAY:return Sr.FAIRPLAY;case or.PLAYREADY:return Sr.PLAYREADY;case or.WIDEVINE:return Sr.WIDEVINE;case or.CLEARKEY:return Sr.CLEARKEY}}function di(a){const{drmSystems:e,widevineLicenseUrl:t}=a,n=e?[or.FAIRPLAY,or.WIDEVINE,or.PLAYREADY,or.CLEARKEY].filter(r=>!!e[r]):[];return!n[or.WIDEVINE]&&t&&n.push(or.WIDEVINE),n}const li=function(a){return rr!=null&&(a=rr.navigator)!=null&&a.requestMediaKeySystemAccess?self.navigator.requestMediaKeySystemAccess.bind(self.navigator):null}();function Vi(a,e,t,n){let r;switch(a){case or.FAIRPLAY:r=["cenc","sinf"];break;case or.WIDEVINE:case or.PLAYREADY:r=["cenc"];break;case or.CLEARKEY:r=["cenc","keyids"];break;default:throw new Error(`Unknown key-system: ${a}`)}return Pi(r,e,t,n)}function Pi(a,e,t,n){return[{initDataTypes:a,persistentState:n.persistentState||"optional",distinctiveIdentifier:n.distinctiveIdentifier||"optional",sessionTypes:n.sessionTypes||[n.sessionType||"temporary"],audioCapabilities:e.map(i=>({contentType:`audio/mp4; codecs=${i}`,robustness:n.audioRobustness||"",encryptionScheme:n.audioEncryptionScheme||null})),videoCapabilities:t.map(i=>({contentType:`video/mp4; codecs=${i}`,robustness:n.videoRobustness||"",encryptionScheme:n.videoEncryptionScheme||null}))}]}function Ui(a){var e;return!!a&&(a.sessionType==="persistent-license"||!!((e=a.sessionTypes)!=null&&e.some(t=>t==="persistent-license")))}function Di(a){const e=new Uint16Array(a.buffer,a.byteOffset,a.byteLength/2),t=String.fromCharCode.apply(null,Array.from(e)),n=t.substring(t.indexOf("<"),t.length),s=new DOMParser().parseFromString(n,"text/xml").getElementsByTagName("KID")[0];if(s){const l=s.childNodes[0]?s.childNodes[0].nodeValue:s.getAttribute("VALUE");if(l){const d=lr(l).subarray(0,16);return Rn(d),d}}return null}let zi={};class Mi{static clearKeyUriToKeyIdMap(){zi={}}static setKeyIdForUri(e,t){zi[e]=t}static addKeyIdForUri(e){const t=Object.keys(zi).length%Number.MAX_SAFE_INTEGER,n=new Uint8Array(16);return new DataView(n.buffer,12,4).setUint32(0,t),zi[e]=n,n}constructor(e,t,n,r=[1],i=null,s){this.uri=void 0,this.method=void 0,this.keyFormat=void 0,this.keyFormatVersions=void 0,this.encrypted=void 0,this.isCommonEncryption=void 0,this.iv=null,this.key=null,this.keyId=null,this.pssh=null,this.method=e,this.uri=t,this.keyFormat=n,this.keyFormatVersions=r,this.iv=i,this.encrypted=e?e!=="NONE":!1,this.isCommonEncryption=this.encrypted&&!kn(e),s!=null&&s.startsWith("0x")&&(this.keyId=new Uint8Array(X(s)))}matches(e){return e.uri===this.uri&&e.method===this.method&&e.encrypted===this.encrypted&&e.keyFormat===this.keyFormat&&ir(e.keyFormatVersions,this.keyFormatVersions)&&Er(e.iv,this.iv)&&Er(e.keyId,this.keyId)}isSupported(){if(this.method){if(kn(this.method)||this.method==="NONE")return!0;if(this.keyFormat==="identity")return this.method==="SAMPLE-AES";switch(this.keyFormat){case Sr.FAIRPLAY:case Sr.WIDEVINE:case Sr.PLAYREADY:case Sr.CLEARKEY:return["SAMPLE-AES","SAMPLE-AES-CENC","SAMPLE-AES-CTR"].indexOf(this.method)!==-1}}return!1}getDecryptData(e,t){if(!this.encrypted||!this.uri)return null;if(kn(this.method)){let i=this.iv;return i||(typeof e!="number"&&(ie.warn(`missing IV for initialization segment with method="${this.method}" - compliance issue`),e=0),i=Gi(e)),new Mi(this.method,this.uri,"identity",this.keyFormatVersions,i)}if(this.keyId){const i=zi[this.uri];if(i&&!ir(this.keyId,i)&&Mi.setKeyIdForUri(this.uri,this.keyId),this.pssh)return this}const n=Un(this.uri);if(n)switch(this.keyFormat){case Sr.WIDEVINE:if(this.pssh=n,!this.keyId){const i=Ze(n.buffer);if(i.length){var r;const s=i[0];this.keyId=(r=s.kids)!=null&&r.length?s.kids[0]:null}}this.keyId||(this.keyId=as(t));break;case Sr.PLAYREADY:{const i=new Uint8Array([154,4,240,121,152,64,66,134,171,146,230,91,224,136,95,149]);this.pssh=R(i,null,n),this.keyId=Di(n);break}default:{let i=n.subarray(0,16);if(i.length!==16){const s=new Uint8Array(16);s.set(i,16-i.length),i=s}this.keyId=i;break}}if(!this.keyId||this.keyId.byteLength!==16){let i;i=Ds(t),i||(i=as(t),i||(i=zi[this.uri])),i&&(this.keyId=i,Mi.setKeyIdForUri(this.uri,i))}return this}}function Ds(a){const e=a==null?void 0:a[Sr.WIDEVINE];return e?e.keyId:null}function as(a){const e=a==null?void 0:a[Sr.PLAYREADY];if(e){const t=Un(e.uri);if(t)return Di(t)}return null}function Gi(a){const e=new Uint8Array(16);for(let t=12;t<16;t++)e[t]=a>>8*(15-t)&255;return e}const bs=/#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,_s=/#EXT-X-MEDIA:(.*)/g,ks=/^#EXT(?:INF|-X-TARGETDURATION):/m,os=new RegExp([/#EXTINF:\s*(\d*(?:\.\d+)?)(?:,(.*)\s+)?/.source,/(?!#) *(\S[^\r\n]*)/.source,/#.*/.source].join("|"),"g"),xs=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 ki{static findGroup(e,t){for(let n=0;n<e.length;n++){const r=e[n];if(r.id===t)return r}}static resolve(e,t){return x.buildAbsoluteURL(t,e,{alwaysNormalize:!0})}static isMediaPlaylist(e){return ks.test(e)}static parseMasterPlaylist(e,t){const n=vn(e),r={contentSteering:null,levels:[],playlistParsingError:null,sessionData:null,sessionKeys:null,startTimeOffset:null,variableList:null,hasVariableRefs:n},i=[];if(bs.lastIndex=0,!e.startsWith("#EXTM3U"))return r.playlistParsingError=new Error("no EXTM3U delimiter"),r;let s;for(;(s=bs.exec(e))!=null;)if(s[1]){var l;const c=new hr(s[1],r),p=ni(r,s[2]),b={attrs:c,bitrate:c.decimalInteger("BANDWIDTH")||c.decimalInteger("AVERAGE-BANDWIDTH"),name:c.NAME,url:ki.resolve(p,t)},I=c.decimalResolution("RESOLUTION");I&&(b.width=I.width,b.height=I.height),hs(c.CODECS,b);const F=c["SUPPLEMENTAL-CODECS"];F&&(b.supplemental={},hs(F,b.supplemental)),(l=b.unknownCodecs)!=null&&l.length||i.push(b),r.levels.push(b)}else if(s[3]){const c=s[3],p=s[4];switch(c){case"SESSION-DATA":{const b=new hr(p,r),I=b["DATA-ID"];I&&(r.sessionData===null&&(r.sessionData={}),r.sessionData[I]=b);break}case"SESSION-KEY":{const b=Is(p,t,r);b.encrypted&&b.isSupported()?(r.sessionKeys===null&&(r.sessionKeys=[]),r.sessionKeys.push(b)):ie.warn(`[Keys] Ignoring invalid EXT-X-SESSION-KEY tag: "${p}"`);break}case"DEFINE":{{const b=new hr(p,r);yi(r,b,t)}break}case"CONTENT-STEERING":{const b=new hr(p,r);r.contentSteering={uri:ki.resolve(b["SERVER-URI"],t),pathwayId:b["PATHWAY-ID"]||"."};break}case"START":{r.startTimeOffset=Bs(p);break}}}const d=i.length>0&&i.length<r.levels.length;return r.levels=d?i:r.levels,r.levels.length===0&&(r.playlistParsingError=new Error("no levels found in manifest")),r}static parseMasterPlaylistMedia(e,t,n){let r;const i={},s=n.levels,l={AUDIO:s.map(c=>({id:c.attrs.AUDIO,audioCodec:c.audioCodec})),SUBTITLES:s.map(c=>({id:c.attrs.SUBTITLES,textCodec:c.textCodec})),"CLOSED-CAPTIONS":[]};let d=0;for(_s.lastIndex=0;(r=_s.exec(e))!==null;){const c=new hr(r[1],n),p=c.TYPE;if(p){const b=l[p],I=i[p]||[];i[p]=I;const F=c.LANGUAGE,$=c["ASSOC-LANGUAGE"],ge=c.CHANNELS,me=c.CHARACTERISTICS,Fe=c["INSTREAM-ID"],We={attrs:c,bitrate:0,id:d++,groupId:c["GROUP-ID"]||"",name:c.NAME||F||"",type:p,default:c.bool("DEFAULT"),autoselect:c.bool("AUTOSELECT"),forced:c.bool("FORCED"),lang:F,url:c.URI?ki.resolve(c.URI,t):""};if($&&(We.assocLang=$),ge&&(We.channels=ge),me&&(We.characteristics=me),Fe&&(We.instreamId=Fe),b!=null&&b.length){const et=ki.findGroup(b,We.groupId)||b[0];Yi(We,et,"audioCodec"),Yi(We,et,"textCodec")}I.push(We)}}return i}static parseLevelPlaylist(e,t,n,r,i,s){var l;const d={url:t},c=new ii(t),p=c.fragments,b=[];let I=null,F=0,$=0,ge=0,me=0,Fe=0,We=null,et=new ft(r,d),xt,Ot,sn,Pt=-1,Xt=!1,Yt=null,Ft;if(os.lastIndex=0,c.m3u8=e,c.hasVariableRefs=vn(e),((l=os.exec(e))==null?void 0:l[0])!=="#EXTM3U")return c.playlistParsingError=new Error("Missing format identifier #EXTM3U"),c;for(;(xt=os.exec(e))!==null;){Xt&&(Xt=!1,et=new ft(r,d),et.playlistOffset=ge,et.setStart(ge),et.sn=F,et.cc=me,Fe&&(et.bitrate=Fe),et.level=n,I&&(et.initSegment=I,I.rawProgramDateTime&&(et.rawProgramDateTime=I.rawProgramDateTime,I.rawProgramDateTime=null),Yt&&(et.setByteRange(Yt),Yt=null)));const Tr=xt[1];if(Tr){et.duration=parseFloat(Tr);const pr=(" "+xt[2]).slice(1);et.title=pr||null,et.tagList.push(pr?["INF",Tr,pr]:["INF",Tr])}else if(xt[3]){if(v(et.duration)){et.playlistOffset=ge,et.setStart(ge),sn&&Ai(et,sn,c),et.sn=F,et.level=n,et.cc=me,p.push(et);const pr=(" "+xt[3]).slice(1);et.relurl=ni(c,pr),Ir(et,We,b),We=et,ge+=et.duration,F++,$=0,Xt=!0}}else{if(xt=xt[0].match(xs),!xt){ie.warn("No matches on slow regex match for level playlist!");continue}for(Ot=1;Ot<xt.length&&xt[Ot]===void 0;Ot++);const pr=(" "+xt[Ot]).slice(1),Gn=(" "+xt[Ot+1]).slice(1),_r=xt[Ot+2]?(" "+xt[Ot+2]).slice(1):null;switch(pr){case"BYTERANGE":We?et.setByteRange(Gn,We):et.setByteRange(Gn);break;case"PROGRAM-DATE-TIME":et.rawProgramDateTime=Gn,et.tagList.push(["PROGRAM-DATE-TIME",Gn]),Pt===-1&&(Pt=p.length);break;case"PLAYLIST-TYPE":c.type&&Yr(c,pr,xt),c.type=Gn.toUpperCase();break;case"MEDIA-SEQUENCE":c.startSN!==0?Yr(c,pr,xt):p.length>0&&vi(c,pr,xt),F=c.startSN=parseInt(Gn);break;case"SKIP":{c.skippedSegments&&Yr(c,pr,xt);const ur=new hr(Gn,c),wr=ur.decimalInteger("SKIPPED-SEGMENTS");if(v(wr)){c.skippedSegments+=wr;for(let qn=wr;qn--;)p.push(null);F+=wr}const kr=ur.enumeratedString("RECENTLY-REMOVED-DATERANGES");kr&&(c.recentlyRemovedDateranges=(c.recentlyRemovedDateranges||[]).concat(kr.split(" ")));break}case"TARGETDURATION":c.targetduration!==0&&Yr(c,pr,xt),c.targetduration=Math.max(parseInt(Gn),1);break;case"VERSION":c.version!==null&&Yr(c,pr,xt),c.version=parseInt(Gn);break;case"INDEPENDENT-SEGMENTS":break;case"ENDLIST":c.live||Yr(c,pr,xt),c.live=!1;break;case"#":(Gn||_r)&&et.tagList.push(_r?[Gn,_r]:[Gn]);break;case"DISCONTINUITY":me++,et.tagList.push(["DIS"]);break;case"GAP":et.gap=!0,et.tagList.push([pr]);break;case"BITRATE":et.tagList.push([pr,Gn]),Fe=parseInt(Gn)*1e3,v(Fe)?et.bitrate=Fe:Fe=0;break;case"DATERANGE":{const ur=new hr(Gn,c),wr=new Mr(ur,c.dateRanges[ur.ID],c.dateRangeTagCount);c.dateRangeTagCount++,wr.isValid||c.skippedSegments?c.dateRanges[wr.id]=wr:ie.warn(`Ignoring invalid DATERANGE tag: "${Gn}"`),et.tagList.push(["EXT-X-DATERANGE",Gn]);break}case"DEFINE":{{const ur=new hr(Gn,c);"IMPORT"in ur?_i(c,ur,s):yi(c,ur,t)}break}case"DISCONTINUITY-SEQUENCE":c.startCC!==0?Yr(c,pr,xt):p.length>0&&vi(c,pr,xt),c.startCC=me=parseInt(Gn);break;case"KEY":{const ur=Is(Gn,t,c);if(ur.isSupported()){if(ur.method==="NONE"){sn=void 0;break}sn||(sn={});const wr=sn[ur.keyFormat];wr!=null&&wr.matches(ur)||(wr&&(sn=y({},sn)),sn[ur.keyFormat]=ur)}else ie.warn(`[Keys] Ignoring unsupported EXT-X-KEY tag: "${Gn}"`);break}case"START":c.startTimeOffset=Bs(Gn);break;case"MAP":{const ur=new hr(Gn,c);if(et.duration){const wr=new ft(r,d);wi(wr,ur,n,sn),I=wr,et.initSegment=I,I.rawProgramDateTime&&!et.rawProgramDateTime&&(et.rawProgramDateTime=I.rawProgramDateTime)}else{const wr=et.byteRangeEndOffset;if(wr){const kr=et.byteRangeStartOffset;Yt=`${wr-kr}@${kr}`}else Yt=null;wi(et,ur,n,sn),I=et,Xt=!0}I.cc=me;break}case"SERVER-CONTROL":{Ft&&Yr(c,pr,xt),Ft=new hr(Gn),c.canBlockReload=Ft.bool("CAN-BLOCK-RELOAD"),c.canSkipUntil=Ft.optionalFloat("CAN-SKIP-UNTIL",0),c.canSkipDateRanges=c.canSkipUntil>0&&Ft.bool("CAN-SKIP-DATERANGES"),c.partHoldBack=Ft.optionalFloat("PART-HOLD-BACK",0),c.holdBack=Ft.optionalFloat("HOLD-BACK",0);break}case"PART-INF":{c.partTarget&&Yr(c,pr,xt);const ur=new hr(Gn);c.partTarget=ur.decimalFloatingPoint("PART-TARGET");break}case"PART":{let ur=c.partList;ur||(ur=c.partList=[]);const wr=$>0?ur[ur.length-1]:void 0,kr=$++,qn=new hr(Gn,c),er=new Ue(qn,et,d,kr,wr);ur.push(er),et.duration+=er.duration;break}case"PRELOAD-HINT":{const ur=new hr(Gn,c);c.preloadHint=ur;break}case"RENDITION-REPORT":{const ur=new hr(Gn,c);c.renditionReports=c.renditionReports||[],c.renditionReports.push(ur);break}default:ie.warn(`line parsed but not handled: ${xt}`);break}}}We&&!We.relurl?(p.pop(),ge-=We.duration,c.partList&&(c.fragmentHint=We)):c.partList&&(Ir(et,We,b),et.cc=me,c.fragmentHint=et,sn&&Ai(et,sn,c)),c.targetduration||(c.playlistParsingError=new Error("Missing Target Duration"));const xn=p.length,nr=p[0],mr=p[xn-1];if(ge+=c.skippedSegments*c.targetduration,ge>0&&xn&&mr){c.averagetargetduration=ge/xn;const Tr=mr.sn;c.endSN=Tr!=="initSegment"?Tr:0,c.live||(mr.endList=!0),Pt>0&&(zr(p,Pt),nr&&b.unshift(nr))}return c.fragmentHint&&(ge+=c.fragmentHint.duration),c.totalduration=ge,b.length&&c.dateRangeTagCount&&nr&&Ns(b,c),c.endCC=me,c}}function Ns(a,e){let t=a.length;if(!t)if(e.hasProgramDateTime){const l=e.fragments[e.fragments.length-1];a.push(l),t++}else return;const n=a[t-1],r=e.live?1/0:e.totalduration,i=Object.keys(e.dateRanges);for(let l=i.length;l--;){const d=e.dateRanges[i[l]],c=d.startDate.getTime();d.tagAnchor=n.ref;for(let p=t;p--;){var s;if(((s=a[p])==null?void 0:s.sn)<e.startSN)break;const b=Qs(e,c,a,p,r);if(b!==-1){d.tagAnchor=e.fragments[b].ref;break}}}}function Qs(a,e,t,n,r){const i=t[n];if(i){const l=i.programDateTime;if(e>=l||n===0){var s;const d=(((s=t[n+1])==null?void 0:s.start)||r)-i.start;if(e<=l+d*1e3){const c=t[n].sn-a.startSN;if(c<0)return-1;const p=a.fragments;if(p.length>t.length){const I=(t[n+1]||p[p.length-1]).sn-a.startSN;for(let F=I;F>c;F--){const $=p[F].programDateTime;if(e>=$&&e<$+p[F].duration*1e3)return F}}return c}}}return-1}function Is(a,e,t){var n,r;const i=new hr(a,t),s=(n=i.METHOD)!=null?n:"",l=i.URI,d=i.hexadecimalInteger("IV"),c=i.KEYFORMATVERSIONS,p=(r=i.KEYFORMAT)!=null?r:"identity";l&&i.IV&&!d&&ie.error(`Invalid IV: ${i.IV}`);const b=l?ki.resolve(l,e):"",I=(c||"1").split("/").map(Number).filter(Number.isFinite);return new Mi(s,b,p,I,d,i.KEYID)}function Bs(a){const t=new hr(a).decimalFloatingPoint("TIME-OFFSET");return v(t)?t:null}function hs(a,e){let t=(a||"").split(/[ ,]+/).filter(n=>n);["video","audio","text"].forEach(n=>{const r=t.filter(i=>ze(i,n));r.length&&(e[`${n}Codec`]=r.map(i=>i.split("/")[0]).join(","),t=t.filter(i=>r.indexOf(i)===-1))}),e.unknownCodecs=t}function Yi(a,e,t){const n=e[t];n&&(a[t]=n)}function zr(a,e){let t=a[e];for(let n=e;n--;){const r=a[n];if(!r)return;r.programDateTime=t.programDateTime-r.duration*1e3,t=r}}function Ir(a,e,t){a.rawProgramDateTime?t.push(a):e!=null&&e.programDateTime&&(a.programDateTime=e.endProgramDateTime)}function wi(a,e,t,n){a.relurl=e.URI,e.BYTERANGE&&a.setByteRange(e.BYTERANGE),a.level=t,a.sn="initSegment",n&&(a.levelkeys=n),a.initSegment=null}function Ai(a,e,t){a.levelkeys=e;const{encryptedFragments:n}=t;(!n.length||n[n.length-1].levelkeys!==e)&&Object.keys(e).some(r=>e[r].isCommonEncryption)&&n.push(a)}function Yr(a,e,t){a.playlistParsingError=new Error(`#EXT-X-${e} must not appear more than once (${t[0]})`)}function vi(a,e,t){a.playlistParsingError=new Error(`#EXT-X-${e} must appear before the first Media Segment (${t[0]})`)}function Ri(a,e){const t=e.startPTS;if(v(t)){let n=0,r;e.sn>a.sn?(n=t-a.start,r=a):(n=a.start-t,r=e),r.duration!==n&&r.setDuration(n)}else e.sn>a.sn?a.cc===e.cc&&a.minEndPTS?e.setStart(a.start+(a.minEndPTS-a.start)):e.setStart(a.start+a.duration):e.setStart(Math.max(a.start-e.duration,0))}function Li(a,e,t,n,r,i,s){n-t<=0&&(s.warn("Fragment should have a positive duration",e),n=t+e.duration,i=r+e.duration);let d=t,c=n;const p=e.startPTS,b=e.endPTS;if(v(p)){const Fe=Math.abs(p-t);a&&Fe>a.totalduration?s.warn(`media timestamps and playlist times differ by ${Fe}s for level ${e.level} ${a.url}`):v(e.deltaPTS)?e.deltaPTS=Math.max(Fe,e.deltaPTS):e.deltaPTS=Fe,d=Math.max(t,p),t=Math.min(t,p),r=e.startDTS!==void 0?Math.min(r,e.startDTS):r,c=Math.min(n,b),n=Math.max(n,b),i=e.endDTS!==void 0?Math.max(i,e.endDTS):i}const I=t-e.start;e.start!==0&&e.setStart(t),e.setDuration(n-e.start),e.startPTS=t,e.maxStartPTS=d,e.startDTS=r,e.endPTS=n,e.minEndPTS=c,e.endDTS=i;const F=e.sn;if(!a||F<a.startSN||F>a.endSN)return 0;let $;const ge=F-a.startSN,me=a.fragments;for(me[ge]=e,$=ge;$>0;$--)Ri(me[$],me[$-1]);for($=ge;$<me.length-1;$++)Ri(me[$],me[$+1]);return a.fragmentHint&&Ri(me[me.length-1],a.fragmentHint),a.PTSKnown=a.alignedSliding=!0,I}function Ji(a,e,t){if(a===e)return;let n=null;const r=a.fragments;for(let p=r.length-1;p>=0;p--){const b=r[p].initSegment;if(b){n=b;break}}a.fragmentHint&&delete a.fragmentHint.endPTS;let i;ji(a,e,(p,b,I,F)=>{if((!e.startCC||e.skippedSegments)&&b.cc!==p.cc){const $=p.cc-b.cc;for(let ge=I;ge<F.length;ge++)F[ge].cc+=$;e.endCC=F[F.length-1].cc}v(p.startPTS)&&v(p.endPTS)&&(b.setStart(b.startPTS=p.startPTS),b.startDTS=p.startDTS,b.maxStartPTS=p.maxStartPTS,b.endPTS=p.endPTS,b.endDTS=p.endDTS,b.minEndPTS=p.minEndPTS,b.setDuration(p.endPTS-p.startPTS),b.duration&&(i=b),e.PTSKnown=e.alignedSliding=!0),p.hasStreams&&(b.elementaryStreams=p.elementaryStreams),b.loader=p.loader,p.hasStats&&(b.stats=p.stats),p.initSegment&&(b.initSegment=p.initSegment,n=p.initSegment)});const s=e.fragments,l=e.fragmentHint?s.concat(e.fragmentHint):s;if(n&&l.forEach(p=>{var b;p&&(!p.initSegment||p.initSegment.relurl===((b=n)==null?void 0:b.relurl))&&(p.initSegment=n)}),e.skippedSegments){if(e.deltaUpdateFailed=s.some(p=>!p),e.deltaUpdateFailed){t.warn("[level-helper] Previous playlist missing segments skipped in delta playlist");for(let p=e.skippedSegments;p--;)s.shift();e.startSN=s[0].sn}else{e.canSkipDateRanges&&(e.dateRanges=Ii(a.dateRanges,e,t));const p=a.fragments.filter(b=>b.rawProgramDateTime);if(a.hasProgramDateTime&&!e.hasProgramDateTime)for(let b=1;b<l.length;b++)l[b].programDateTime===null&&Ir(l[b],l[b-1],p);Ns(p,e)}e.endCC=s[s.length-1].cc}if(!e.startCC){var d;const p=ei(a,e.startSN-1);e.startCC=(d=p==null?void 0:p.cc)!=null?d:s[0].cc}qi(a.partList,e.partList,(p,b)=>{b.elementaryStreams=p.elementaryStreams,b.stats=p.stats}),i?Li(e,i,i.startPTS,i.endPTS,i.startDTS,i.endDTS,t):ns(a,e),s.length&&(e.totalduration=e.edge-s[0].start),e.driftStartTime=a.driftStartTime,e.driftStart=a.driftStart;const c=e.advancedDateTime;if(e.advanced&&c){const p=e.edge;e.driftStart||(e.driftStartTime=c,e.driftStart=p),e.driftEndTime=c,e.driftEnd=p}else e.driftEndTime=a.driftEndTime,e.driftEnd=a.driftEnd,e.advancedDateTime=a.advancedDateTime;e.requestScheduled===-1&&(e.requestScheduled=a.requestScheduled)}function Ii(a,e,t){const{dateRanges:n,recentlyRemovedDateranges:r}=e,i=y({},a);r&&r.forEach(d=>{delete i[d]});const l=Object.keys(i).length;return l?(Object.keys(n).forEach(d=>{const c=i[d],p=new Mr(n[d].attr,c);p.isValid?(i[d]=p,c||(p.tagOrder+=l)):t.warn(`Ignoring invalid Playlist Delta Update DATERANGE tag: "${vt(n[d].attr)}"`)}),i):n}function qi(a,e,t){if(a&&e){let n=0;for(let r=0,i=a.length;r<=i;r++){const s=a[r],l=e[r+n];s&&l&&s.index===l.index&&s.fragment.sn===l.fragment.sn?t(s,l):n--}}}function ji(a,e,t){const n=e.skippedSegments,r=Math.max(a.startSN,e.startSN)-e.startSN,i=(a.fragmentHint?1:0)+(n?e.endSN:Math.min(a.endSN,e.endSN))-e.startSN,s=e.startSN-a.startSN,l=e.fragmentHint?e.fragments.concat(e.fragmentHint):e.fragments,d=a.fragmentHint?a.fragments.concat(a.fragmentHint):a.fragments;for(let c=r;c<=i;c++){const p=d[s+c];let b=l[c];if(n&&!b&&p&&(b=e.fragments[c]=p),p&&b){t(p,b,c,l);const I=p.relurl,F=b.relurl;if(I&&Rs(I,F)){e.playlistParsingError=ts(`media sequence mismatch ${b.sn}:`,a,e,p,b);return}else if(p.cc!==b.cc){e.playlistParsingError=ts(`discontinuity sequence mismatch (${p.cc}!=${b.cc})`,a,e,p,b);return}}}}function ts(a,e,t,n,r){return new Error(`${a} ${r.url}
|
|
|
Playlist starting @${e.startSN}
|
|
|
${e.m3u8}
|
|
|
|
|
|
Playlist starting @${t.startSN}
|
|
|
${t.m3u8}`)}function ns(a,e,t=!0){const n=e.startSN+e.skippedSegments-a.startSN,r=a.fragments,i=n>=0;let s=0;if(i&&n<r.length)s=r[n].start;else if(i&&e.startSN===a.endSN+1)s=a.fragmentEnd;else if(i&&t)s=a.fragmentStart+n*e.levelTargetDuration;else if(!e.skippedSegments&&e.fragmentStart===0)s=a.fragmentStart;else return;Js(e,s)}function Js(a,e){if(e){const t=a.fragments;for(let n=a.skippedSegments;n<t.length;n++)t[n].addStart(e);a.fragmentHint&&a.fragmentHint.addStart(e)}}function qr(a,e=1/0){let t=1e3*a.targetduration;if(a.updated){const n=a.fragments;if(n.length&&t*4>e){const i=n[n.length-1].duration*1e3;i<t&&(t=i)}}else t/=2;return Math.round(t)}function ei(a,e,t){if(!a)return null;let n=a.fragments[e-a.startSN];return n||(n=a.fragmentHint,n&&n.sn===e)?n:e<a.startSN&&t&&t.sn===e?t:null}function ui(a,e,t){return a?Oi(a.partList,e,t):null}function Oi(a,e,t){if(a)for(let n=a.length;n--;){const r=a[n];if(r.index===t&&r.fragment.sn===e)return r}return null}function Ni(a){a.forEach((e,t)=>{var n;(n=e.details)==null||n.fragments.forEach(r=>{r.level=t,r.initSegment&&(r.initSegment.level=t)})})}function Rs(a,e){return a!==e&&e?Ls(a)!==Ls(e):!1}function Ls(a){return a.replace(/\?[^?]*$/,"")}function ms(a,e){for(let n=0,r=a.length;n<r;n++){var t;if(((t=a[n])==null?void 0:t.cc)===e)return a[n]}return null}function qs(a,e){return!!(a&&e.startCC<a.endCC&&e.endCC>a.startCC)}function Fs(a,e){const t=a.start+e;a.startPTS=t,a.setStart(t),a.endPTS=t+a.duration}function ps(a,e){const t=e.fragments;for(let n=0,r=t.length;n<r;n++)Fs(t[n],a);e.fragmentHint&&Fs(e.fragmentHint,a),e.alignedSliding=!0}function $s(a,e){a&&(Us(e,a),e.alignedSliding||zs(e,a),!e.alignedSliding&&!e.skippedSegments&&ns(a,e,!1))}function Us(a,e){if(!qs(e,a))return;const t=Math.min(e.endCC,a.endCC),n=ms(e.fragments,t),r=ms(a.fragments,t);if(!n||!r)return;ie.log(`Aligning playlist at start of dicontinuity sequence ${t}`);const i=n.start-r.start;ps(i,a)}function zs(a,e){if(!a.hasProgramDateTime||!e.hasProgramDateTime)return;const t=a.fragments,n=e.fragments;if(!t.length||!n.length)return;let r,i;const s=Math.min(e.endCC,a.endCC);e.startCC<s&&a.startCC<s&&(r=ms(n,s),i=ms(t,s)),(!r||!i)&&(r=n[Math.floor(n.length/2)],i=ms(t,r.cc)||t[Math.floor(t.length/2)]);const l=r.programDateTime,d=i.programDateTime;if(!l||!d)return;const c=(d-l)/1e3-(i.start-r.start);ps(c,a)}function Bi(a,e,t){Ki(a,e,t),a.addEventListener(e,t)}function Ki(a,e,t){a.removeEventListener(e,t)}const Ha={toString:function(a){let e="";const t=a.length;for(let n=0;n<t;n++)e+=`[${a.start(n).toFixed(3)}-${a.end(n).toFixed(3)}]`;return e}},hn={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 ea extends Kr{constructor(e,t,n,r,i){super(r,e.logger),this.hls=void 0,this.fragPrevious=null,this.fragCurrent=null,this.fragmentTracker=void 0,this.transmuxer=null,this._state=hn.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:d,mediaBuffer:c,state:p}=this,b=d?d.currentTime:0,I=Jn.bufferInfo(c||d,b,s.maxBufferHole),F=!I.len;if(this.log(`Media seeking to ${v(b)?b.toFixed(3):b}, state: ${p}, ${F?"out of":"in"} buffer`),this.state===hn.ENDED)this.resetLoadingState();else if(l){const $=s.maxFragLookUpTolerance,ge=l.start-$,me=l.start+l.duration+$;if(F||me<I.start||ge>I.end){const Fe=b>me;(b<ge||Fe)&&(Fe&&l.loader&&(this.log(`Cancelling fragment load for seek (sn: ${l.sn})`),l.abortRequests(),this.resetLoadingState()),this.fragPrevious=null)}}if(d){this.fragmentTracker.removeFragmentsInRange(b,1/0,this.playlistType,!0);const $=this.lastCurrentTime;if(b>$&&(this.lastCurrentTime=b),!this.loadingParts){const ge=Math.max(I.end,b),me=this.shouldLoadParts(this.getLevelDetails(),ge);me&&(this.log(`LL-Part loading ON after seeking to ${b.toFixed(2)} with buffer @${ge.toFixed(2)}`),this.loadingParts=me)}}this.hls.hasEnoughToStart||(this.log(`Setting ${F?"startPosition":"nextLoadPosition"} to ${b} for seek without enough to start`),this.nextLoadPosition=b,F&&(this.startPosition=b)),F&&this.state===hn.IDLE&&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 sr(e.config),this.keyLoader=n,this.fragmentTracker=t,this.config=e.config,this.decrypter=new fr(e.config)}registerListeners(){const{hls:e}=this;e.on(g.MEDIA_ATTACHED,this.onMediaAttached,this),e.on(g.MEDIA_DETACHING,this.onMediaDetaching,this),e.on(g.MANIFEST_LOADING,this.onManifestLoading,this),e.on(g.MANIFEST_LOADED,this.onManifestLoaded,this),e.on(g.ERROR,this.onError,this)}unregisterListeners(){const{hls:e}=this;e.off(g.MEDIA_ATTACHED,this.onMediaAttached,this),e.off(g.MEDIA_DETACHING,this.onMediaDetaching,this),e.off(g.MANIFEST_LOADING,this.onManifestLoading,this),e.off(g.MANIFEST_LOADED,this.onManifestLoaded,this),e.off(g.ERROR,this.onError,this)}doTick(){this.onTickEnd()}onTickEnd(){}startLoad(e){}stopLoad(){if(this.state===hn.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=hn.STOPPED}get startPositionValue(){const{nextLoadPosition:e,startPosition:t}=this;return t===-1&&e?e:t}get bufferingEnabled(){return this.buffering}pauseBuffering(){this.buffering=!1}resumeBuffering(){this.buffering=!0}get inFlightFrag(){return{frag:this.fragCurrent,state:this.state}}_streamEnded(e,t){if(t.live||!this.media)return!1;const n=e.end||0,r=this.config.timelineOffset||0;if(n<=r)return!1;const i=e.buffered;this.config.maxBufferHole&&i&&i.length>1&&(e=Jn.bufferedInfo(i,e.start,0));const s=e.nextStart;if(s&&s>r&&s<t.edge||this.media.currentTime<e.start)return!1;const d=t.partList;if(d!=null&&d.length){const p=d[d.length-1];return Jn.isBuffered(this.media,p.start+p.duration/2)}const c=t.fragments[t.fragments.length-1].type;return this.fragmentTracker.isEndListAppended(c)}getLevelDetails(){if(this.levels&&this.levelLastLoaded!==null)return this.levelLastLoaded.details}get timelineOffset(){const e=this.config.timelineOffset;if(e){var t;return((t=this.getLevelDetails())==null?void 0:t.appliedTimelineOffset)||e}return 0}onMediaAttached(e,t){const n=this.media=this.mediaBuffer=t.media;Bi(n,"seeking",this.onMediaSeeking),Bi(n,"ended",this.onMediaEnded);const r=this.config;this.levels&&r.autoStartLoad&&this.state===hn.STOPPED&&this.startLoad(r.startPosition)}onMediaDetaching(e,t){const n=!!t.transferMedia,r=this.media;if(r!==null){if(r.ended&&(this.log("MSE detaching and video ended, reset startPosition"),this.startPosition=this.lastCurrentTime=0),Ki(r,"seeking",this.onMediaSeeking),Ki(r,"ended",this.onMediaEnded),this.keyLoader&&!n&&this.keyLoader.detach(),this.media=this.mediaBuffer=null,this.loopSn=void 0,n){this.resetLoadingState(),this.resetTransmuxer();return}this.loadingParts=!1,this.fragmentTracker.removeAllFragments(),this.stopLoad()}}onManifestLoading(){this.initPTS=[],this.levels=this.levelLastLoaded=this.fragCurrent=null,this.lastCurrentTime=this.startPosition=0,this.startFragRequested=!1}onError(e,t){}onManifestLoaded(e,t){this.startTimeOffset=t.startTimeOffset}onHandlerDestroying(){this.stopLoad(),this.transmuxer&&(this.transmuxer.destroy(),this.transmuxer=null),super.onHandlerDestroying(),this.hls=this.onMediaSeeking=this.onMediaEnded=null}onHandlerDestroyed(){this.state=hn.STOPPED,this.fragmentLoader&&this.fragmentLoader.destroy(),this.keyLoader&&this.keyLoader.destroy(),this.decrypter&&this.decrypter.destroy(),this.hls=this.log=this.warn=this.decrypter=this.keyLoader=this.fragmentLoader=this.fragmentTracker=null,super.onHandlerDestroyed()}loadFragment(e,t,n){this.startFragRequested=!0,this._loadFragForPlayback(e,t,n)}_loadFragForPlayback(e,t,n){const r=i=>{const s=i.frag;if(this.fragContextChanged(s)){this.warn(`${s.type} sn: ${s.sn}${i.part?" part: "+i.part.index:""} of ${this.fragInfo(s,!1,i.part)}) was dropped during download.`),this.fragmentTracker.removeFragment(s);return}s.stats.chunkCount++,this._handleFragmentLoadProgress(i)};this._doFragLoad(e,t,n,r).then(i=>{if(!i)return;const s=this.state,l=i.frag;if(this.fragContextChanged(l)){(s===hn.FRAG_LOADING||!this.fragCurrent&&s===hn.PARSING)&&(this.fragmentTracker.removeFragment(l),this.state=hn.IDLE);return}"payload"in i&&(this.log(`Loaded ${l.type} sn: ${l.sn} of ${this.playlistLabel()} ${l.level}`),this.hls.trigger(g.FRAG_LOADED,i)),this._handleFragmentLoadComplete(i)}).catch(i=>{this.state===hn.STOPPED||this.state===hn.ERROR||(this.warn(`Frag error: ${(i==null?void 0:i.message)||i}`),this.resetFragmentLoading(e))})}clearTrackerIfNeeded(e){var t;const{fragmentTracker:n}=this;if(n.getState(e)===un.APPENDING){const i=e.type,s=this.getFwdBufferInfo(this.mediaBuffer,i),l=Math.max(e.duration,s?s.len:this.config.maxBufferLength),d=this.backtrackFragment;((d?e.sn-d.sn:0)===1||this.reduceMaxBufferLength(l,e.duration))&&n.removeFragment(e)}else((t=this.mediaBuffer)==null?void 0:t.buffered.length)===0?n.removeAllFragments():n.hasParts(e.type)&&(n.detectPartialFragments({frag:e,part:null,stats:e.stats,id:e.type}),n.getState(e)===un.PARTIAL&&n.removeFragment(e))}checkLiveUpdate(e){if(e.updated&&!e.live){const t=e.fragments[e.fragments.length-1];this.fragmentTracker.detectPartialFragments({frag:t,part:null,stats:t.stats,id:t.type})}e.fragments[0]||(e.deltaUpdateFailed=!0)}waitForLive(e){const t=e.details;return(t==null?void 0:t.live)&&t.type!=="EVENT"&&(this.levelLastLoaded!==e||t.expired)}flushMainBuffer(e,t,n=null){if(!(e-t))return;const r={startOffset:e,endOffset:t,type:n};this.hls.trigger(g.BUFFER_FLUSHING,r)}_loadInitSegment(e,t){this._doFragLoad(e,t).then(n=>{const r=n==null?void 0:n.frag;if(!r||this.fragContextChanged(r)||!this.levels)throw new Error("init load aborted");return n}).then(n=>{const{hls:r}=this,{frag:i,payload:s}=n,l=i.decryptdata;if(s&&s.byteLength>0&&l!=null&&l.key&&l.iv&&kn(l.method)){const d=self.performance.now();return this.decrypter.decrypt(new Uint8Array(s),l.key.buffer,l.iv.buffer,$n(l.method)).catch(c=>{throw r.trigger(g.ERROR,{type:fe.MEDIA_ERROR,details:z.FRAG_DECRYPT_ERROR,fatal:!1,error:c,reason:c.message,frag:i}),c}).then(c=>{const p=self.performance.now();return r.trigger(g.FRAG_DECRYPTED,{frag:i,payload:c,stats:{tstart:d,tdecrypt:p}}),n.payload=c,this.completeInitSegmentLoad(n)})}return this.completeInitSegmentLoad(n)}).catch(n=>{this.state===hn.STOPPED||this.state===hn.ERROR||(this.warn(n),this.resetFragmentLoading(e))})}completeInitSegmentLoad(e){const{levels:t}=this;if(!t)throw new Error("init load aborted, missing levels");const n=e.frag.stats;this.state!==hn.STOPPED&&(this.state=hn.IDLE),e.frag.data=new Uint8Array(e.payload),n.parsing.start=n.buffering.start=self.performance.now(),n.parsing.end=n.buffering.end=self.performance.now(),this.tick()}unhandledEncryptionError(e,t){var n,r;const i=e.tracks;if(i&&!t.encrypted&&((n=i.audio)!=null&&n.encrypted||(r=i.video)!=null&&r.encrypted)&&(!this.config.emeEnabled||!this.keyLoader.emeController)){const s=this.media,l=new Error(`Encrypted track with no key in ${this.fragInfo(t)} (media ${s?"attached mediaKeys: "+s.mediaKeys:"detached"})`);return this.warn(l.message),!s||s.mediaKeys?!1:(this.hls.trigger(g.ERROR,{type:fe.KEY_SYSTEM_ERROR,details:z.KEY_SYSTEM_NO_KEYS,fatal:!1,error:l,frag:t}),this.resetTransmuxer(),!0)}return!1}fragContextChanged(e){const{fragCurrent:t}=this;return!e||!t||e.sn!==t.sn||e.level!==t.level}fragBufferedComplete(e,t){const n=this.mediaBuffer?this.mediaBuffer:this.media;if(this.log(`Buffered ${e.type} sn: ${e.sn}${t?" part: "+t.index:""} of ${this.fragInfo(e,!1,t)} > buffer:${n?Ha.toString(Jn.getBuffered(n)):"(detached)"})`),Ke(e)){var r;if(e.type!==te.SUBTITLE){const s=e.elementaryStreams;if(!Object.keys(s).some(l=>!!s[l])){this.state=hn.IDLE;return}}const i=(r=this.levels)==null?void 0:r[e.level];i!=null&&i.fragmentError&&(this.log(`Resetting level fragment error count of ${i.fragmentError} on frag buffered`),i.fragmentError=0)}this.state=hn.IDLE}_handleFragmentLoadComplete(e){const{transmuxer:t}=this;if(!t)return;const{frag:n,part:r,partsLoaded:i}=e,s=!i||i.length===0||i.some(d=>!d),l=new Fr(n.level,n.sn,n.stats.chunkCount+1,0,r?r.index:-1,!s);t.flush(l)}_handleFragmentLoadProgress(e){}_doFragLoad(e,t,n=null,r){var i;this.fragCurrent=e;const s=t.details;if(!this.levels||!s)throw new Error(`frag load aborted, missing level${s?"":" detail"}s`);let l=null;if(e.encrypted&&!((i=e.decryptdata)!=null&&i.key)){if(this.log(`Loading key for ${e.sn} of [${s.startSN}-${s.endSN}], ${this.playlistLabel()} ${e.level}`),this.state=hn.KEY_LOADING,this.fragCurrent=e,l=this.keyLoader.load(e).then(I=>{if(!this.fragContextChanged(I.frag))return this.hls.trigger(g.KEY_LOADED,I),this.state===hn.KEY_LOADING&&(this.state=hn.IDLE),I}),this.hls.trigger(g.KEY_LOADING,{frag:e}),this.fragCurrent===null)return this.log("context changed in KEY_LOADING"),Promise.resolve(null)}else e.encrypted||(l=this.keyLoader.loadClear(e,s.encryptedFragments,this.startFragRequested),l&&this.log("[eme] blocking frag load until media-keys acquired"));const d=this.fragPrevious;if(Ke(e)&&(!d||e.sn!==d.sn)){const I=this.shouldLoadParts(t.details,e.end);I!==this.loadingParts&&(this.log(`LL-Part loading ${I?"ON":"OFF"} loading sn ${d==null?void 0:d.sn}->${e.sn}`),this.loadingParts=I)}if(n=Math.max(e.start,n||0),this.loadingParts&&Ke(e)){const I=s.partList;if(I&&r){n>s.fragmentEnd&&s.fragmentHint&&(e=s.fragmentHint);const F=this.getNextPart(I,e,n);if(F>-1){const $=I[F];e=this.fragCurrent=$.fragment,this.log(`Loading ${e.type} sn: ${e.sn} part: ${$.index} (${F}/${I.length-1}) of ${this.fragInfo(e,!1,$)}) cc: ${e.cc} [${s.startSN}-${s.endSN}], target: ${parseFloat(n.toFixed(3))}`),this.nextLoadPosition=$.start+$.duration,this.state=hn.FRAG_LOADING;let ge;return l?ge=l.then(me=>!me||this.fragContextChanged(me.frag)?null:this.doFragPartsLoad(e,$,t,r)).catch(me=>this.handleFragLoadError(me)):ge=this.doFragPartsLoad(e,$,t,r).catch(me=>this.handleFragLoadError(me)),this.hls.trigger(g.FRAG_LOADING,{frag:e,part:$,targetBufferTime:n}),this.fragCurrent===null?Promise.reject(new Error("frag load aborted, context changed in FRAG_LOADING parts")):ge}else if(!e.url||this.loadedEndOfParts(I,n))return Promise.resolve(null)}}if(Ke(e)&&this.loadingParts){var c;this.log(`LL-Part loading OFF after next part miss @${n.toFixed(2)} Check buffer at sn: ${e.sn} loaded parts: ${(c=s.partList)==null?void 0:c.filter(I=>I.loaded).map(I=>`[${I.start}-${I.end}]`)}`),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.startSN+"-"+s.endSN+"]"}, target: ${parseFloat(n.toFixed(3))}`),v(e.sn)&&!this.bitrateTest&&(this.nextLoadPosition=e.start+e.duration),this.state=hn.FRAG_LOADING;const p=this.config.progressive&&e.type!==te.SUBTITLE;let b;return p&&l?b=l.then(I=>!I||this.fragContextChanged(I.frag)?null:this.fragmentLoader.load(e,r)).catch(I=>this.handleFragLoadError(I)):b=Promise.all([this.fragmentLoader.load(e,p?r:void 0),l]).then(([I])=>(!p&&r&&r(I),I)).catch(I=>this.handleFragLoadError(I)),this.hls.trigger(g.FRAG_LOADING,{frag:e,targetBufferTime:n}),this.fragCurrent===null?Promise.reject(new Error("frag load aborted, context changed in FRAG_LOADING")):b}doFragPartsLoad(e,t,n,r){return new Promise((i,s)=>{var l;const d=[],c=(l=n.details)==null?void 0:l.partList,p=b=>{this.fragmentLoader.loadPart(e,b,r).then(I=>{d[b.index]=I;const F=I.part;this.hls.trigger(g.FRAG_LOADED,I);const $=ui(n.details,e.sn,b.index+1)||Oi(c,e.sn,b.index+1);if($)p($);else return i({frag:e,part:F,partsLoaded:d})}).catch(s)};p(t)})}handleFragLoadError(e){if("data"in e){const t=e.data;t.frag&&t.details===z.INTERNAL_ABORTED?this.handleFragLoadAborted(t.frag,t.part):t.frag&&t.type===fe.KEY_SYSTEM_ERROR?(t.frag.abortRequests(),this.resetStartWhenNotLoaded(),this.resetFragmentLoading(t.frag)):this.hls.trigger(g.ERROR,t)}else this.hls.trigger(g.ERROR,{type:fe.OTHER_ERROR,details:z.INTERNAL_EXCEPTION,err:e,error:e,fatal:!0});return null}_handleTransmuxerFlush(e){const t=this.getCurrentContext(e);if(!t||this.state!==hn.PARSING){!this.fragCurrent&&this.state!==hn.STOPPED&&this.state!==hn.ERROR&&(this.state=hn.IDLE);return}const{frag:n,part:r,level:i}=t,s=self.performance.now();n.stats.parsing.end=s,r&&(r.stats.parsing.end=s);const l=this.getLevelDetails(),c=l&&n.sn>l.endSN||this.shouldLoadParts(l,n.end);c!==this.loadingParts&&(this.log(`LL-Part loading ${c?"ON":"OFF"} after parsing segment ending @${n.end.toFixed(2)}`),this.loadingParts=c),this.updateLevelTiming(n,r,i,e.partial)}shouldLoadParts(e,t){if(this.config.lowLatencyMode){if(!e)return this.loadingParts;if(e.partList){var n;const i=e.partList[0];if(i.fragment.type===te.SUBTITLE)return!1;const s=i.end+(((n=e.fragmentHint)==null?void 0:n.duration)||0);if(t>=s){var r;if((this.hls.hasEnoughToStart?((r=this.media)==null?void 0:r.currentTime)||this.lastCurrentTime:this.getLoadPosition())>i.start-i.fragment.duration)return!0}}}return!1}getCurrentContext(e){const{levels:t,fragCurrent:n}=this,{level:r,sn:i,part:s}=e;if(!(t!=null&&t[r]))return this.warn(`Levels object was unset while buffering fragment ${i} of ${this.playlistLabel()} ${r}. The current chunk will not be buffered.`),null;const l=t[r],d=l.details,c=s>-1?ui(d,i,s):null,p=c?c.fragment:ei(d,i,n);return p?(n&&n!==p&&(p.stats=n.stats),{frag:p,part:c,level:l}):null}bufferFragmentData(e,t,n,r,i){if(this.state!==hn.PARSING)return;const{data1:s,data2:l}=e;let d=s;if(l&&(d=ht(s,l)),!d.length)return;const c=this.initPTS[t.cc],p=c?-c.baseTime/c.timescale:void 0,b={type:e.type,frag:t,part:n,chunkMeta:r,offset:p,parent:t.type,data:d};if(this.hls.trigger(g.BUFFER_APPENDING,b),e.dropped&&e.independent&&!n){if(i)return;this.flushBufferGap(t)}}flushBufferGap(e){const t=this.media;if(!t)return;if(!Jn.isBuffered(t,t.currentTime)){this.flushMainBuffer(0,e.start);return}const n=t.currentTime,r=Jn.bufferInfo(t,n,0),i=e.duration,s=Math.min(this.config.maxFragLookUpTolerance*2,i*.25),l=Math.max(Math.min(e.start-s,r.end-s),n+s);e.start-l>s&&this.flushMainBuffer(l,e.start)}getFwdBufferInfo(e,t){var n;const r=this.getLoadPosition();if(!v(r))return null;const s=this.lastCurrentTime>r||(n=this.media)!=null&&n.paused?0:this.config.maxBufferHole;return this.getFwdBufferInfoAtPos(e,r,t,s)}getFwdBufferInfoAtPos(e,t,n,r){const i=Jn.bufferInfo(e,t,r);if(i.len===0&&i.nextStart!==void 0){const s=this.fragmentTracker.getBufferedFrag(t,n);if(s&&(i.nextStart<=s.end||s.gap)){const l=Math.max(Math.min(i.nextStart,s.end)-t,r);return Jn.bufferInfo(e,t,l)}}return i}getMaxBufferLength(e){const{config:t}=this;let n;return e?n=Math.max(8*t.maxBufferSize/e,t.maxBufferLength):n=t.maxBufferLength,Math.min(n,t.maxMaxBufferLength)}reduceMaxBufferLength(e,t){const n=this.config,r=Math.max(Math.min(e-t,n.maxBufferLength),t),i=Math.max(e-t*3,n.maxMaxBufferLength/2,r);return i>=r?(n.maxMaxBufferLength=i,this.warn(`Reduce max buffer length to ${i}s`),!0):!1}getAppendedFrag(e,t=te.MAIN){const n=this.fragmentTracker?this.fragmentTracker.getAppendedFrag(e,t):null;return n&&"fragment"in n?n.fragment:n}getNextFragment(e,t){const n=t.fragments,r=n.length;if(!r)return null;const{config:i}=this,s=n[0].start,l=i.lowLatencyMode&&!!t.partList;let d=null;if(t.live){const b=i.initialLiveManifestSize;if(r<b)return this.warn(`Not enough fragments to start playback (have: ${r}, need: ${b})`),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),d=this.getInitialLiveFragment(t);const I=this.hls.startPosition,F=this.hls.liveSyncPosition,$=d?(I!==-1&&I>=s?I:F)||d.start:e;this.log(`Setting startPosition to ${$} to match start frag at live edge. mainStart: ${I} liveSyncPosition: ${F} frag.start: ${(c=d)==null?void 0:c.start}`),this.startPosition=this.nextLoadPosition=$}}else e<=s&&(d=n[0]);if(!d){const b=this.loadingParts?t.partEnd:t.fragmentEnd;d=this.getFragmentAtPosition(e,b,t)}let p=this.filterReplacedPrimary(d,t);if(!p&&d){const b=d.sn-t.startSN;p=this.filterReplacedPrimary(n[b+1]||null,t)}return this.mapToInitFragWhenRequired(p)}isLoopLoading(e,t){const n=this.fragmentTracker.getState(e);return(n===un.OK||n===un.PARTIAL&&!!e.gap)&&this.nextLoadPosition>t}getNextFragmentLoopLoading(e,t,n,r,i){let s=null;if(e.gap&&(s=this.getNextFragment(this.nextLoadPosition,t),s&&!s.gap&&n.nextStart)){const l=this.getFwdBufferInfoAtPos(this.mediaBuffer?this.mediaBuffer:this.media,n.nextStart,r,0);if(l!==null&&n.len+l.len>=i){const d=s.sn;return this.loopSn!==d&&(this.log(`buffer full after gaps in "${r}" playlist starting at sn: ${d}`),this.loopSn=d),null}}return this.loopSn=void 0,s}get primaryPrefetch(){if(Ca(this.config)){var e;if((e=this.hls.interstitialsManager)==null||(e=e.playingItem)==null?void 0:e.event)return!0}return!1}filterReplacedPrimary(e,t){if(!e)return e;if(Ca(this.config)&&e.type!==te.SUBTITLE){const n=this.hls.interstitialsManager,r=n==null?void 0:n.bufferingItem;if(r){const s=r.event;if(s){if(s.appendInPlace||Math.abs(e.start-r.start)>1||r.start===0)return null}else if(e.end<=r.start&&(t==null?void 0:t.live)===!1||e.start>r.end&&r.nextEvent&&(r.nextEvent.appendInPlace||e.start-r.end>1))return null}const i=n==null?void 0:n.playerQueue;if(i)for(let s=i.length;s--;){const l=i[s].interstitial;if(l.appendInPlace&&e.start>=l.startTime&&e.end<=l.resumeTime)return null}}return e}mapToInitFragWhenRequired(e){return e!=null&&e.initSegment&&!e.initSegment.data&&!this.bitrateTest?e.initSegment:e}getNextPart(e,t,n){let r=-1,i=!1,s=!0;for(let l=0,d=e.length;l<d;l++){const c=e[l];if(s=s&&!c.independent,r>-1&&n<c.start)break;const p=c.loaded;p?r=-1:(i||(c.independent||s)&&c.fragment===t)&&(c.fragment!==t&&this.warn(`Need buffer at ${n} but next unloaded part starts at ${c.start}`),r=l),i=p}return r}loadedEndOfParts(e,t){let n;for(let r=e.length;r--;){if(n=e[r],!n.loaded)return!1;if(t>n.start)return!0}return!1}getInitialLiveFragment(e){const t=e.fragments,n=this.fragPrevious;let r=null;if(n){if(e.hasProgramDateTime&&(this.log(`Live playlist, switching playlist, load frag with same PDT: ${n.programDateTime}`),r=Mn(t,n.endProgramDateTime,this.config.maxFragLookUpTolerance)),!r){const i=n.sn+1;if(i>=e.startSN&&i<=e.endSN){const s=t[i-e.startSN];n.cc===s.cc&&(r=s,this.log(`Live playlist, switching playlist, load frag with next SN: ${r.sn}`))}r||(r=Bn(e,n.cc,n.end),r&&this.log(`Live playlist, switching playlist, load frag with same CC: ${r.sn}`))}}else{const i=this.hls.liveSyncPosition;i!==null&&(r=this.getFragmentAtPosition(i,this.bitrateTest?e.fragmentEnd:e.edge,e))}return r}getFragmentAtPosition(e,t,n){const{config:r}=this;let{fragPrevious:i}=this,{fragments:s,endSN:l}=n;const{fragmentHint:d}=n,{maxFragLookUpTolerance:c}=r,p=n.partList,b=!!(this.loadingParts&&p!=null&&p.length&&d);b&&!this.bitrateTest&&p[p.length-1].fragment.sn===d.sn&&(s=s.concat(d),l=d.sn);let I;if(e<t){var F;const ge=e<this.lastCurrentTime||e>t-c||(F=this.media)!=null&&F.paused||!this.startFragRequested?0:c;I=Nn(i,s,e,ge)}else I=s[s.length-1];if(I){const $=I.sn-n.startSN,ge=this.fragmentTracker.getState(I);if((ge===un.OK||ge===un.PARTIAL&&I.gap)&&(i=I),i&&I.sn===i.sn&&(!b||p[0].fragment.sn>I.sn||!n.live)&&I.level===i.level){const Fe=s[$+1];I.sn<l&&this.fragmentTracker.getState(Fe)!==un.OK?I=Fe:I=null}}return I}alignPlaylists(e,t,n){const r=e.fragments.length;if(!r)return this.warn("No fragments in live playlist"),0;const i=e.fragmentStart,s=!t,l=e.alignedSliding&&v(i);if(s||!l&&!i){$s(n,e);const d=e.fragmentStart;return this.log(`Live playlist sliding: ${d.toFixed(2)} start-sn: ${t?t.startSN:"na"}->${e.startSN} fragments: ${r}`),d}return i}waitForCdnTuneIn(e){return e.live&&e.canBlockReload&&e.partTarget&&e.tuneInGoal>Math.max(e.partHoldBack,e.partTarget*3)}setStartPosition(e,t){let n=this.startPosition;n<t&&(n=-1);const r=this.timelineOffset;if(n===-1){const i=this.startTimeOffset!==null,s=i?this.startTimeOffset:e.startTimeOffset;s!==null&&v(s)?(n=t+s,s<0&&(n+=e.edge),n=Math.min(Math.max(t,n),t+e.totalduration),this.log(`Setting startPosition to ${n} for start time offset ${s} found in ${i?"multivariant":"media"} playlist`),this.startPosition=n):e.live?(n=this.hls.liveSyncPosition||t,this.log(`Setting startPosition to -1 to start at live edge ${n}`),this.startPosition=-1):(this.log("setting startPosition to 0 by default"),this.startPosition=n=0),this.lastCurrentTime=n+r}this.nextLoadPosition=n+r}getLoadPosition(){var e;const{media:t}=this;let n=0;return(e=this.hls)!=null&&e.hasEnoughToStart&&t?n=t.currentTime:this.nextLoadPosition>=0&&(n=this.nextLoadPosition),n}handleFragLoadAborted(e,t){this.transmuxer&&e.type===this.playlistType&&Ke(e)&&e.stats.aborted&&(this.log(`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!==hn.FRAG_LOADING_WAITING_RETRY)&&(this.state=hn.IDLE)}onFragmentOrKeyLoadError(e,t){var n;if(t.chunkMeta&&!t.frag){const Fe=this.getCurrentContext(t.chunkMeta);Fe&&(t.frag=Fe.frag)}const r=t.frag;if(!r||r.type!==e||!this.levels)return;if(this.fragContextChanged(r)){var i;this.warn(`Frag load error must match current frag to retry ${r.url} > ${(i=this.fragCurrent)==null?void 0:i.url}`);return}const s=t.details===z.FRAG_GAP;s&&this.fragmentTracker.fragBuffered(r,!0);const l=t.errorAction;if(!l){this.state=hn.ERROR;return}const{action:d,flags:c,retryCount:p=0,retryConfig:b}=l,I=!!b,F=I&&d===_n.RetryRequest,$=I&&!l.resolved&&c===wn.MoveAllAlternatesMatchingHost,ge=(n=this.hls.latestLevelDetails)==null?void 0:n.live;if(!F&&$&&Ke(r)&&!r.endList&&ge&&!Tt(t))this.resetFragmentErrors(e),this.treatAsGap(r),l.resolved=!0;else if((F||$)&&p<b.maxNumRetry){var me;const Fe=Cr((me=t.response)==null?void 0:me.code),We=Kn(b,p);if(this.resetStartWhenNotLoaded(),this.retryDate=self.performance.now()+We,this.state=hn.FRAG_LOADING_WAITING_RETRY,l.resolved=!0,Fe){this.log("Waiting for connection (offline)"),this.retryDate=1/0,t.reason="offline";return}this.warn(`Fragment ${r.sn} of ${e} ${r.level} errored with ${t.details}, retrying loading ${p+1}/${b.maxNumRetry} in ${We}ms`)}else if(b)if(this.resetFragmentErrors(e),p<b.maxNumRetry)!s&&d!==_n.RemoveAlternatePermanently&&(l.resolved=!0);else{this.warn(`${t.details} reached or exceeded max retry (${p})`);return}else d===_n.SendAlternateToPenaltyBox?this.state=hn.WAITING_LEVEL:this.state=hn.ERROR;this.tickImmediate()}checkRetryDate(){const e=self.performance.now(),t=this.retryDate,n=t===1/0;(!t||e>=t||n&&!Cr(0))&&(n&&this.log("Connection restored (online)"),this.resetStartWhenNotLoaded(),this.state=hn.IDLE)}reduceLengthAndFlushBuffer(e){if(this.state===hn.PARSING||this.state===hn.PARSED){const t=e.frag,n=e.parent,r=this.getFwdBufferInfo(this.mediaBuffer,n),i=r&&r.len>.5;i&&this.reduceMaxBufferLength(r.len,(t==null?void 0:t.duration)||10);const s=!i;return s&&this.warn(`Buffer full error while media.currentTime (${this.getLoadPosition()}) is not buffered, flush ${n} buffer`),t&&(this.fragmentTracker.removeFragment(t),this.nextLoadPosition=t.start),this.resetLoadingState(),s}return!1}resetFragmentErrors(e){e===te.AUDIO&&(this.fragCurrent=null),this.hls.hasEnoughToStart||(this.startFragRequested=!1),this.state!==hn.STOPPED&&(this.state=hn.IDLE)}afterBufferFlushed(e,t,n){if(!e)return;const r=Jn.getBuffered(e);this.fragmentTracker.detectEvictedFragments(t,r,n),this.state===hn.ENDED&&this.resetLoadingState()}resetLoadingState(){this.log("Reset loading state"),this.fragCurrent=null,this.fragPrevious=null,this.state!==hn.STOPPED&&(this.state=hn.IDLE)}resetStartWhenNotLoaded(){if(!this.hls.hasEnoughToStart){this.startFragRequested=!1;const e=this.levelLastLoaded,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.log(`Loading context changed while buffering sn ${e.sn} of ${this.playlistLabel()} ${e.level===-1?"<removed>":e.level}. This chunk will not be buffered.`),this.removeUnbufferedFrags(),this.resetStartWhenNotLoaded(),this.resetLoadingState()}removeUnbufferedFrags(e=0){this.fragmentTracker.removeFragmentsInRange(e,1/0,this.playlistType,!1,!0)}updateLevelTiming(e,t,n,r){const i=n.details;if(!i){this.warn("level.details undefined");return}if(!Object.keys(e.elementaryStreams).reduce((d,c)=>{const p=e.elementaryStreams[c];if(p){const b=p.endPTS-p.startPTS;if(b<=0)return this.warn(`Could not parse fragment ${e.sn} ${c} duration reliably (${b})`),d||!1;const I=r?0:Li(i,e,p.startPTS,p.endPTS,p.startDTS,p.endDTS,this);return this.hls.trigger(g.LEVEL_PTS_UPDATED,{details:i,level:n,drift:I,type:c,frag:e,start:p.startPTS,end:p.endPTS}),!0}return d},!1)){var l;const d=((l=this.transmuxer)==null?void 0:l.error)===null;if((n.fragmentError===0||d&&(n.fragmentError<2||e.endList))&&this.treatAsGap(e,n),d){const c=new Error(`Found no media in fragment ${e.sn} of ${this.playlistLabel()} ${e.level} resetting transmuxer to fallback to playlist timing`);if(this.warn(c.message),this.hls.trigger(g.ERROR,{type:fe.MEDIA_ERROR,details:z.FRAG_PARSING_ERROR,fatal:!1,error:c,frag:e,reason:`Found no media in msn ${e.sn} of ${this.playlistLabel()} "${n.url}"`}),!this.hls)return;this.resetTransmuxer()}}this.state=hn.PARSED,this.log(`Parsed ${e.type} sn: ${e.sn}${t?" part: "+t.index:""} of ${this.fragInfo(e,!1,t)})`),this.hls.trigger(g.FRAG_PARSED,{frag:e,part:t})}playlistLabel(){return this.playlistType===te.MAIN?"level":"track"}fragInfo(e,t=!0,n){var r,i;return`${this.playlistLabel()} ${e.level} (${n?"part":"frag"}:[${((r=t&&!n?e.startPTS:(n||e).start)!=null?r:NaN).toFixed(3)}-${((i=t&&!n?e.endPTS:(n||e).end)!=null?i:NaN).toFixed(3)}]${n&&e.type==="main"?"INDEPENDENT="+(n.independent?"YES":"NO"):""}`}treatAsGap(e,t){t&&t.fragmentError++,e.gap=!0,this.fragmentTracker.removeFragment(e),this.fragmentTracker.fragBuffered(e,!0)}resetTransmuxer(){var e;(e=this.transmuxer)==null||e.reset()}recoverWorkerError(e){e.event==="demuxerWorker"&&(this.fragmentTracker.removeAllFragments(),this.transmuxer&&(this.transmuxer.destroy(),this.transmuxer=null),this.resetStartWhenNotLoaded(),this.resetLoadingState())}set state(e){const t=this._state;t!==e&&(this._state=e,this.log(`${t}->${e}`))}get state(){return this._state}}function Ca(a){return!!a.interstitialsController&&a.enableInterstitialPlayback!==!1}class Ta{constructor(){this.chunks=[],this.dataLength=0}push(e){this.chunks.push(e),this.dataLength+=e.length}flush(){const{chunks:e,dataLength:t}=this;let n;if(e.length)e.length===1?n=e[0]:n=ja(e,t);else return new Uint8Array(0);return this.reset(),n}reset(){this.chunks.length=0,this.dataLength=0}}function ja(a,e){const t=new Uint8Array(e);let n=0;for(let r=0;r<a.length;r++){const i=a[r];t.set(i,n),n+=i.length}return t}var Es={exports:{}},Ks;function To(){return Ks||(Ks=1,function(a){var e=Object.prototype.hasOwnProperty,t="~";function n(){}Object.create&&(n.prototype=Object.create(null),new n().__proto__||(t=!1));function r(d,c,p){this.fn=d,this.context=c,this.once=p||!1}function i(d,c,p,b,I){if(typeof p!="function")throw new TypeError("The listener must be a function");var F=new r(p,b||d,I),$=t?t+c:c;return d._events[$]?d._events[$].fn?d._events[$]=[d._events[$],F]:d._events[$].push(F):(d._events[$]=F,d._eventsCount++),d}function s(d,c){--d._eventsCount===0?d._events=new n:delete d._events[c]}function l(){this._events=new n,this._eventsCount=0}l.prototype.eventNames=function(){var c=[],p,b;if(this._eventsCount===0)return c;for(b in p=this._events)e.call(p,b)&&c.push(t?b.slice(1):b);return Object.getOwnPropertySymbols?c.concat(Object.getOwnPropertySymbols(p)):c},l.prototype.listeners=function(c){var p=t?t+c:c,b=this._events[p];if(!b)return[];if(b.fn)return[b.fn];for(var I=0,F=b.length,$=new Array(F);I<F;I++)$[I]=b[I].fn;return $},l.prototype.listenerCount=function(c){var p=t?t+c:c,b=this._events[p];return b?b.fn?1:b.length:0},l.prototype.emit=function(c,p,b,I,F,$){var ge=t?t+c:c;if(!this._events[ge])return!1;var me=this._events[ge],Fe=arguments.length,We,et;if(me.fn){switch(me.once&&this.removeListener(c,me.fn,void 0,!0),Fe){case 1:return me.fn.call(me.context),!0;case 2:return me.fn.call(me.context,p),!0;case 3:return me.fn.call(me.context,p,b),!0;case 4:return me.fn.call(me.context,p,b,I),!0;case 5:return me.fn.call(me.context,p,b,I,F),!0;case 6:return me.fn.call(me.context,p,b,I,F,$),!0}for(et=1,We=new Array(Fe-1);et<Fe;et++)We[et-1]=arguments[et];me.fn.apply(me.context,We)}else{var xt=me.length,Ot;for(et=0;et<xt;et++)switch(me[et].once&&this.removeListener(c,me[et].fn,void 0,!0),Fe){case 1:me[et].fn.call(me[et].context);break;case 2:me[et].fn.call(me[et].context,p);break;case 3:me[et].fn.call(me[et].context,p,b);break;case 4:me[et].fn.call(me[et].context,p,b,I);break;default:if(!We)for(Ot=1,We=new Array(Fe-1);Ot<Fe;Ot++)We[Ot-1]=arguments[Ot];me[et].fn.apply(me[et].context,We)}}return!0},l.prototype.on=function(c,p,b){return i(this,c,p,b,!1)},l.prototype.once=function(c,p,b){return i(this,c,p,b,!0)},l.prototype.removeListener=function(c,p,b,I){var F=t?t+c:c;if(!this._events[F])return this;if(!p)return s(this,F),this;var $=this._events[F];if($.fn)$.fn===p&&(!I||$.once)&&(!b||$.context===b)&&s(this,F);else{for(var ge=0,me=[],Fe=$.length;ge<Fe;ge++)($[ge].fn!==p||I&&!$[ge].once||b&&$[ge].context!==b)&&me.push($[ge]);me.length?this._events[F]=me.length===1?me[0]:me:s(this,F)}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 n,this._eventsCount=0),this},l.prototype.off=l.prototype.removeListener,l.prototype.addListener=l.prototype.on,l.prefixed=t,l.EventEmitter=l,a.exports=l}(Es)),Es.exports}var Ao=To(),fa=L(Ao);const ta="1.6.15",Os={};function Za(){return typeof __HLS_WORKER_BUNDLE__=="function"}function Do(){const a=Os[ta];if(a)return a.clientCount++,a;const e=new self.Blob([`var exports={};var module={exports:exports};function define(f){f()};define.amd=true;(${__HLS_WORKER_BUNDLE__.toString()})(true);`],{type:"text/javascript"}),t=self.URL.createObjectURL(e),r={worker:new self.Worker(t),objectURL:t,clientCount:1};return Os[ta]=r,r}function Wa(a){const e=Os[a];if(e)return e.clientCount++,e;const t=new self.URL(a,self.location.href).href,r={worker:new self.Worker(t),scriptURL:t,clientCount:1};return Os[a]=r,r}function Io(a){const e=Os[a||ta];if(e&&e.clientCount--===1){const{worker:n,objectURL:r}=e;delete Os[a||ta],r&&self.URL.revokeObjectURL(r),n.terminate()}}function Aa(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 na(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 Hs(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 js(a,e){const t=e;let n=0;for(;na(a,e);){n+=10;const r=Hs(a,e+6);n+=r,Aa(a,e+10)&&(n+=10),e+=n}if(n>0)return a.subarray(t,t+n)}function Va(a,e,t,n){const r=[96e3,88200,64e3,48e3,44100,32e3,24e3,22050,16e3,12e3,11025,8e3,7350],i=e[t+2],s=i>>2&15;if(s>12){const F=new Error(`invalid ADTS sampling index:${s}`);a.emit(g.ERROR,g.ERROR,{type:fe.MEDIA_ERROR,details:z.FRAG_PARSING_ERROR,fatal:!0,error:F,reason:F.message});return}const l=(i>>6&3)+1,d=e[t+3]>>6&3|(i&1)<<2,c="mp4a.40."+l,p=r[s];let b=s;(l===5||l===29)&&(b-=3);const I=[l<<3|(b&14)>>1,(b&1)<<7|d<<3];return ie.log(`manifest codec:${n}, parsed codec:${c}, channels:${d}, rate:${p} (ADTS object type:${l} sampling index:${s})`),{config:I,samplerate:p,channelCount:d,codec:c,parsedCodec:c,manifestCodec:n}}function Da(a,e){return a[e]===255&&(a[e+1]&246)===240}function Ga(a,e){return a[e+1]&1?7:9}function ha(a,e){return(a[e+3]&3)<<11|a[e+4]<<3|(a[e+5]&224)>>>5}function Ya(a,e){return e+5<a.length}function ma(a,e){return e+1<a.length&&Da(a,e)}function ra(a,e){return Ya(a,e)&&Da(a,e)&&ha(a,e)<=a.length-e}function Ia(a,e){if(ma(a,e)){const t=Ga(a,e);if(e+t>=a.length)return!1;const n=ha(a,e);if(n<=t)return!1;const r=e+n;return r===a.length||ma(a,r)}return!1}function Ra(a,e,t,n,r){if(!a.samplerate){const i=Va(e,t,n,r);if(!i)return;y(a,i)}}function Xa(a){return 1024*9e4/a}function Ro(a,e){const t=Ga(a,e);if(e+t<=a.length){const n=ha(a,e)-t;if(n>0)return{headerLength:t,frameLength:n}}}function Qa(a,e,t,n,r){const i=Xa(a.samplerate),s=n+r*i,l=Ro(e,t);let d;if(l){const{frameLength:b,headerLength:I}=l,F=I+b,$=Math.max(0,t+F-e.length);$?(d=new Uint8Array(F-I),d.set(e.subarray(t+I,e.length),0)):d=e.subarray(t+I,t+F);const ge={unit:d,pts:s};return $||a.samples.push(ge),{sample:ge,length:F,missing:$}}const c=e.length-t;return d=new Uint8Array(c),d.set(e.subarray(t,e.length),0),{sample:{unit:d,pts:s},length:c,missing:-1}}function La(a,e){return na(a,e)&&Hs(a,e+6)+10<=a.length-e}function Lo(a){return a instanceof ArrayBuffer?a:a.byteOffset==0&&a.byteLength==a.buffer.byteLength?a.buffer:new Uint8Array(a).buffer}function Oa(a,e=0,t=1/0){return Ja(a,e,t,Uint8Array)}function Ja(a,e,t,n){const r=Oo(a);let i=1;"BYTES_PER_ELEMENT"in n&&(i=n.BYTES_PER_ELEMENT);const s=qa(a)?a.byteOffset:0,l=(s+a.byteLength)/i,d=(s+e)/i,c=Math.floor(Math.max(0,Math.min(d,l))),p=Math.floor(Math.min(c+Math.max(t,0),l));return new n(r,c,p-c)}function Oo(a){return a instanceof ArrayBuffer?a:a.buffer}function qa(a){return a&&a.buffer instanceof ArrayBuffer&&a.byteLength!==void 0&&a.byteOffset!==void 0}function Po(a){const e={key:a.type,description:"",data:"",mimeType:null,pictureType:null},t=3;if(a.size<2)return;if(a.data[0]!==t){console.log("Ignore frame with unrecognized character encoding");return}const n=a.data.subarray(1).indexOf(0);if(n===-1)return;const r=tt(Oa(a.data,1,n)),i=a.data[2+n],s=a.data.subarray(3+n).indexOf(0);if(s===-1)return;const l=tt(Oa(a.data,3+n,s));let d;return r==="-->"?d=tt(Oa(a.data,4+n+s)):d=Lo(a.data.subarray(4+n+s)),e.mimeType=r,e.pictureType=i,e.description=l,e.data=d,e}function Ve(a){if(a.size<2)return;const e=tt(a.data,!0),t=new Uint8Array(a.data.subarray(e.length+1));return{key:a.type,info:e,data:t.buffer}}function eo(a){if(a.size<2)return;if(a.type==="TXXX"){let t=1;const n=tt(a.data.subarray(t),!0);t+=n.length+1;const r=tt(a.data.subarray(t));return{key:a.type,info:n,data:r}}const e=tt(a.data.subarray(1));return{key:a.type,info:"",data:e}}function Pa(a){if(a.type==="WXXX"){if(a.size<2)return;let t=1;const n=tt(a.data.subarray(t),!0);t+=n.length+1;const r=tt(a.data.subarray(t));return{key:a.type,info:n,data:r}}const e=tt(a.data);return{key:a.type,info:"",data:e}}function Ma(a){return a.type==="PRIV"?Ve(a):a.type[0]==="W"?Pa(a):a.type==="APIC"?Po(a):eo(a)}function to(a){const e=String.fromCharCode(a[0],a[1],a[2],a[3]),t=Hs(a,4),n=10;return{type:e,size:t,data:a.subarray(n,n+t)}}const Zs=10,no=10;function ka(a){let e=0;const t=[];for(;na(a,e);){const n=Hs(a,e+6);a[e+5]>>6&1&&(e+=Zs),e+=Zs;const r=e+n;for(;e+no<r;){const i=to(a.subarray(e)),s=Ma(i);s&&t.push(s),e+=i.size+Zs}Aa(a,e)&&(e+=Zs)}return t}function ro(a){return a&&a.key==="PRIV"&&a.info==="com.apple.streaming.transportStreamTimestamp"}function io(a){if(a.data.byteLength===8){const e=new Uint8Array(a.data),t=e[3]&1;let n=(e[4]<<23)+(e[5]<<15)+(e[6]<<7)+e[7];return n/=45,t&&(n+=4772185884e-2),Math.round(n)}}function pa(a){const e=ka(a);for(let t=0;t<e.length;t++){const n=e[t];if(ro(n))return io(n)}}let Fi=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 ls(a="",e=9e4){return{type:a,id:-1,pid:-1,inputTimeScale:e,sequenceNumber:-1,samples:[],dropped:0}}class ia{constructor(){this._audioTrack=void 0,this._id3Track=void 0,this.frameIndex=0,this.cachedData=null,this.basePTS=null,this.initPTS=null,this.lastPTS=null}resetInitSegment(e,t,n,r){this._id3Track={type:"id3",id:3,pid:-1,inputTimeScale:9e4,sequenceNumber:0,samples:[],dropped:0}}resetTimeStamp(e){this.initPTS=e,this.resetContiguity()}resetContiguity(){this.basePTS=null,this.lastPTS=null,this.frameIndex=0}canParse(e,t){return!1}appendFrame(e,t,n){}demux(e,t){this.cachedData&&(e=ht(this.cachedData,e),this.cachedData=null);let n=js(e,0),r=n?n.length:0,i;const s=this._audioTrack,l=this._id3Track,d=n?pa(n):void 0,c=e.length;for((this.basePTS===null||this.frameIndex===0&&v(d))&&(this.basePTS=so(d,t,this.initPTS),this.lastPTS=this.basePTS),this.lastPTS===null&&(this.lastPTS=this.basePTS),n&&n.length>0&&l.samples.push({pts:this.lastPTS,dts:this.lastPTS,data:n,type:Fi.audioId3,duration:Number.POSITIVE_INFINITY});r<c;){if(this.canParse(e,r)){const p=this.appendFrame(s,e,r);p?(this.frameIndex++,this.lastPTS=p.sample.pts,r+=p.length,i=r):r=c}else La(e,r)?(n=js(e,r),l.samples.push({pts:this.lastPTS,dts:this.lastPTS,data:n,type:Fi.audioId3,duration:Number.POSITIVE_INFINITY}),r+=n.length,i=r):r++;if(r===c&&i!==c){const p=e.slice(i);this.cachedData?this.cachedData=ht(this.cachedData,p):this.cachedData=p}}return{audioTrack:s,videoTrack:ls(),id3Track:l,textTrack:ls()}}demuxSampleAes(e,t,n){return Promise.reject(new Error(`[${this}] This demuxer does not support Sample-AES decryption`))}flush(e){const t=this.cachedData;return t&&(this.cachedData=null,this.demux(t,0)),{audioTrack:this._audioTrack,videoTrack:ls(),id3Track:this._id3Track,textTrack:ls()}}destroy(){this.cachedData=null,this._audioTrack=this._id3Track=void 0}}const so=(a,e,t)=>{if(v(a))return a*90;const n=t?t.baseTime*9e4/t.timescale:0;return e*9e4+n};let ga=null;const Mo=[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],ao=[44100,48e3,32e3,22050,24e3,16e3,11025,12e3,8e3],Na=[[0,72,144,12],[0,0,0,0],[0,72,144,12],[0,144,144,12]],ko=[0,1,1,4];function oo(a,e,t,n,r){if(t+24>e.length)return;const i=No(e,t);if(i&&t+i.frameLength<=e.length){const s=i.samplesPerFrame*9e4/i.sampleRate,l=n+r*s,d={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(d),{sample:d,length:i.frameLength,missing:0}}}function No(a,e){const t=a[e+1]>>3&3,n=a[e+1]>>1&3,r=a[e+2]>>4&15,i=a[e+2]>>2&3;if(t!==1&&r!==0&&r!==15&&i!==3){const s=a[e+2]>>1&1,l=a[e+3]>>6,d=t===3?3-n:n===3?3:4,c=Mo[d*14+r-1]*1e3,b=ao[(t===3?0:t===2?1:2)*3+i],I=l===3?1:2,F=Na[t][n],$=ko[n],ge=F*8*$,me=Math.floor(F*c/b+s)*$;if(ga===null){const et=(navigator.userAgent||"").match(/Chrome\/(\d+)/i);ga=et?parseInt(et[1]):0}return!!ga&&ga<=87&&n===2&&c>=224e3&&l===0&&(a[e+3]=a[e+3]|128),{sampleRate:b,channelCount:I,frameLength:me,samplesPerFrame:ge}}}function ne(a,e){return a[e]===255&&(a[e+1]&224)===224&&(a[e+1]&6)!==0}function u(a,e){return e+1<a.length&&ne(a,e)}function f(a,e){return ne(a,e)&&4<=a.length-e}function h(a,e){if(e+1<a.length&&ne(a,e)){const n=No(a,e);let r=4;n!=null&&n.frameLength&&(r=n.frameLength);const i=e+r;return i===a.length||u(a,i)}return!1}class _ extends ia{constructor(e,t){super(),this.observer=void 0,this.config=void 0,this.observer=e,this.config=t}resetInitSegment(e,t,n,r){super.resetInitSegment(e,t,n,r),this._audioTrack={container:"audio/adts",type:"audio",id:2,pid:-1,sequenceNumber:0,segmentCodec:"aac",samples:[],manifestCodec:t,duration:r,inputTimeScale:9e4,dropped:0}}static probe(e,t){if(!e)return!1;const n=js(e,0);let r=(n==null?void 0:n.length)||0;if(h(e,r))return!1;for(let i=e.length;r<i;r++)if(Ia(e,r))return t.log("ADTS sync word found !"),!0;return!1}canParse(e,t){return ra(e,t)}appendFrame(e,t,n){Ra(e,this.observer,t,n,e.manifestCodec);const r=Qa(e,t,n,this.basePTS,this.frameIndex);if(r&&r.missing===0)return r}}const N=(a,e)=>{let t=0,n=5;e+=n;const r=new Uint32Array(1),i=new Uint32Array(1),s=new Uint8Array(1);for(;n>0;){s[0]=a[e];const l=Math.min(n,8),d=8-l;i[0]=4278190080>>>24+d<<d,r[0]=(s[0]&i[0])>>d,t=t?t<<l|r[0]:r[0],e+=1,n-=l}return t};class ee extends ia{constructor(e){super(),this.observer=void 0,this.observer=e}resetInitSegment(e,t,n,r){super.resetInitSegment(e,t,n,r),this._audioTrack={container:"audio/ac-3",type:"audio",id:2,pid:-1,sequenceNumber:0,segmentCodec:"ac3",samples:[],manifestCodec:t,duration:r,inputTimeScale:9e4,dropped:0}}canParse(e,t){return t+64<e.length}appendFrame(e,t,n){const r=De(e,t,n,this.basePTS,this.frameIndex);if(r!==-1)return{sample:e.samples[e.samples.length-1],length:r,missing:0}}static probe(e){if(!e)return!1;const t=js(e,0);if(!t)return!1;const n=t.length;return e[n]===11&&e[n+1]===119&&pa(t)!==void 0&&N(e,n)<16}}function De(a,e,t,n,r){if(t+8>e.length||e[t]!==11||e[t+1]!==119)return-1;const i=e[t+4]>>6;if(i>=3)return-1;const l=[48e3,44100,32e3][i],d=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][d*3+i]*2;if(t+p>e.length)return-1;const b=e[t+6]>>5;let I=0;b===2?I+=2:(b&1&&b!==1&&(I+=2),b&4&&(I+=2));const F=(e[t+6]<<8|e[t+7])>>12-I&1,ge=[2,1,2,3,3,4,4,5][b]+F,me=e[t+5]>>3,Fe=e[t+5]&7,We=new Uint8Array([i<<6|me<<1|Fe>>2,(Fe&3)<<6|b<<3|F<<2|d>>4,d<<4&224]),et=1536/l*9e4,xt=n+r*et,Ot=e.subarray(t,t+p);return a.config=We,a.channelCount=ge,a.samplerate=l,a.samples.push({unit:Ot,pts:xt}),p}class Be extends ia{resetInitSegment(e,t,n,r){super.resetInitSegment(e,t,n,r),this._audioTrack={container:"audio/mpeg",type:"audio",id:2,pid:-1,sequenceNumber:0,segmentCodec:"mp3",samples:[],manifestCodec:t,duration:r,inputTimeScale:9e4,dropped:0}}static probe(e){if(!e)return!1;const t=js(e,0);let n=(t==null?void 0:t.length)||0;if(t&&e[n]===11&&e[n+1]===119&&pa(t)!==void 0&&N(e,n)<=16)return!1;for(let r=e.length;n<r;n++)if(h(e,n))return ie.log("MPEG Audio sync word found !"),!0;return!1}canParse(e,t){return f(e,t)}appendFrame(e,t,n){if(this.basePTS!==null)return oo(e,t,n,this.basePTS,this.frameIndex)}}const dt=/\/emsg[-/]ID3/i;class It{constructor(e,t){this.remainderData=null,this.timeOffset=0,this.config=void 0,this.videoTrack=void 0,this.audioTrack=void 0,this.id3Track=void 0,this.txtTrack=void 0,this.config=t}resetTimeStamp(){}resetInitSegment(e,t,n,r){const i=this.videoTrack=ls("video",1),s=this.audioTrack=ls("audio",1),l=this.txtTrack=ls("text",1);if(this.id3Track=ls("id3",1),this.timeOffset=0,!(e!=null&&e.byteLength))return;const d=Ce(e);if(d.video){const{id:c,timescale:p,codec:b,supplemental:I}=d.video;i.id=c,i.timescale=l.timescale=p,i.codec=b,i.supplemental=I}if(d.audio){const{id:c,timescale:p,codec:b}=d.audio;s.id=c,s.timescale=p,s.codec=b}l.id=St.text,i.sampleDuration=0,i.duration=s.duration=r}resetContiguity(){this.remainderData=null}static probe(e){return _e(e)}demux(e,t){this.timeOffset=t;let n=e;const r=this.videoTrack,i=this.txtTrack;if(this.config.progressive){this.remainderData&&(n=ht(this.remainderData,e));const l=gt(n);this.remainderData=l.remainder,r.samples=l.valid||new Uint8Array}else r.samples=n;const s=this.extractID3Track(r,t);return i.samples=nt(t,r),{videoTrack:r,audioTrack:this.audioTrack,id3Track:s,textTrack:this.txtTrack}}flush(){const e=this.timeOffset,t=this.videoTrack,n=this.txtTrack;t.samples=this.remainderData||new Uint8Array,this.remainderData=null;const r=this.extractID3Track(t,this.timeOffset);return n.samples=nt(e,t),{videoTrack:t,audioTrack:ls(),id3Track:r,textTrack:ls()}}extractID3Track(e,t){const n=this.id3Track;if(e.samples.length){const r=Y(e.samples,["emsg"]);r&&r.forEach(i=>{const s=Rt(i);if(dt.test(s.schemeIdUri)){const l=Ut(s,t);let d=s.eventDuration===4294967295?Number.POSITIVE_INFINITY:s.eventDuration/s.timeScale;d<=.001&&(d=Number.POSITIVE_INFINITY);const c=s.payload;n.samples.push({data:c,len:c.byteLength,dts:l,pts:l,type:Fi.emsg,duration:d})}else if(this.config.enableEmsgKLVMetadata&&s.schemeIdUri.startsWith("urn:misb:KLV:bin:1910.1")){const l=Ut(s,t);n.samples.push({data:s.payload,len:s.payload.byteLength,dts:l,pts:l,type:Fi.misbklv,duration:Number.POSITIVE_INFINITY})}})}return n}demuxSampleAes(e,t,n){return Promise.reject(new Error("The MP4 demuxer does not support SAMPLE-AES decryption"))}destroy(){this.config=null,this.remainderData=null,this.videoTrack=this.audioTrack=this.id3Track=this.txtTrack=void 0}}function Ut(a,e){return v(a.presentationTime)?a.presentationTime/a.timeScale:e+a.presentationTimeDelta/a.timeScale}class an{constructor(e,t,n){this.keyData=void 0,this.decrypter=void 0,this.keyData=n,this.decrypter=new fr(t,{removePKCS7Padding:!1})}decryptBuffer(e){return this.decrypter.decrypt(e,this.keyData.key.buffer,this.keyData.iv.buffer,Yn.cbc)}decryptAacSample(e,t,n){const r=e[t].unit;if(r.length<=16)return;const i=r.subarray(16,r.length-r.length%16),s=i.buffer.slice(i.byteOffset,i.byteOffset+i.length);this.decryptBuffer(s).then(l=>{const d=new Uint8Array(l);r.set(d,16),this.decrypter.isSync()||this.decryptAacSamples(e,t+1,n)}).catch(n)}decryptAacSamples(e,t,n){for(;;t++){if(t>=e.length){n();return}if(!(e[t].unit.length<32)&&(this.decryptAacSample(e,t,n),!this.decrypter.isSync()))return}}getAvcEncryptedData(e){const t=Math.floor((e.length-48)/160)*16+16,n=new Int8Array(t);let r=0;for(let i=32;i<e.length-16;i+=160,r+=16)n.set(e.subarray(i,i+16),r);return n}getAvcDecryptedUnit(e,t){const n=new Uint8Array(t);let r=0;for(let i=32;i<e.length-16;i+=160,r+=16)e.set(n.subarray(r,r+16),i);return e}decryptAvcSample(e,t,n,r,i){const s=ot(i.data),l=this.getAvcEncryptedData(s);this.decryptBuffer(l.buffer).then(d=>{i.data=this.getAvcDecryptedUnit(s,d),this.decrypter.isSync()||this.decryptAvcSamples(e,t,n+1,r)}).catch(r)}decryptAvcSamples(e,t,n,r){if(e instanceof Uint8Array)throw new Error("Cannot decrypt samples of type Uint8Array");for(;;t++,n=0){if(t>=e.length){r();return}const i=e[t].units;for(;!(n>=i.length);n++){const s=i[n];if(!(s.data.length<=48||s.type!==1&&s.type!==5)&&(this.decryptAvcSample(e,t,n,r,s),!this.decrypter.isSync()))return}}}}class Tn{constructor(){this.VideoSample=null}createVideoSample(e,t,n){return{key:e,frame:!1,pts:t,dts:n,units:[],length:0}}getLastNalUnit(e){var t;let n=this.VideoSample,r;if((!n||n.units.length===0)&&(n=e[e.length-1]),(t=n)!=null&&t.units){const i=n.units;r=i[i.length-1]}return r}pushAccessUnit(e,t){if(e.units.length&&e.frame){if(e.pts===void 0){const n=t.samples,r=n.length;if(r){const i=n[r-1];e.pts=i.pts,e.dts=i.dts}else{t.dropped++;return}}t.samples.push(e)}}parseNALu(e,t,n){const r=t.byteLength;let i=e.naluState||0;const s=i,l=[];let d=0,c,p,b,I=-1,F=0;for(i===-1&&(I=0,F=this.getNALuType(t,0),i=0,d=1);d<r;){if(c=t[d++],!i){i=c?0:1;continue}if(i===1){i=c?0:2;continue}if(!c)i=3;else if(c===1){if(p=d-i-1,I>=0){const $={data:t.subarray(I,p),type:F};l.push($)}else{const $=this.getLastNalUnit(e.samples);$&&(s&&d<=4-s&&$.state&&($.data=$.data.subarray(0,$.data.byteLength-s)),p>0&&($.data=ht($.data,t.subarray(0,p)),$.state=0))}d<r?(b=this.getNALuType(t,d),I=d,F=b,i=0):i=-1}else i=0}if(I>=0&&i>=0){const $={data:t.subarray(I,r),type:F,state:i};l.push($)}if(l.length===0){const $=this.getLastNalUnit(e.samples);$&&($.data=ht($.data,t))}return e.naluState=i,l}}class Pn{constructor(e){this.data=void 0,this.bytesAvailable=void 0,this.word=void 0,this.bitsAvailable=void 0,this.data=e,this.bytesAvailable=e.byteLength,this.word=0,this.bitsAvailable=0}loadWord(){const e=this.data,t=this.bytesAvailable,n=e.byteLength-t,r=new Uint8Array(4),i=Math.min(4,t);if(i===0)throw new Error("no bytes available");r.set(e.subarray(n,n+i)),this.word=new DataView(r.buffer).getUint32(0),this.bitsAvailable=i*8,this.bytesAvailable-=i}skipBits(e){let t;e=Math.min(e,this.bytesAvailable*8+this.bitsAvailable),this.bitsAvailable>e?(this.word<<=e,this.bitsAvailable-=e):(e-=this.bitsAvailable,t=e>>3,e-=t<<3,this.bytesAvailable-=t,this.loadWord(),this.word<<=e,this.bitsAvailable-=e)}readBits(e){let t=Math.min(this.bitsAvailable,e);const n=this.word>>>32-t;if(e>32&&ie.error("Cannot read more than 32 bits at a time"),this.bitsAvailable-=t,this.bitsAvailable>0)this.word<<=t;else if(this.bytesAvailable>0)this.loadWord();else throw new Error("no bits available");return t=e-t,t>0&&this.bitsAvailable?n<<t|this.readBits(t):n}skipLZ(){let e;for(e=0;e<this.bitsAvailable;++e)if(this.word&2147483648>>>e)return this.word<<=e,this.bitsAvailable-=e,e;return this.loadWord(),e+this.skipLZ()}skipUEG(){this.skipBits(1+this.skipLZ())}skipEG(){this.skipBits(1+this.skipLZ())}readUEG(){const e=this.skipLZ();return this.readBits(e+1)-1}readEG(){const e=this.readUEG();return 1&e?1+e>>>1:-1*(e>>>1)}readBoolean(){return this.readBits(1)===1}readUByte(){return this.readBits(8)}readUShort(){return this.readBits(16)}readUInt(){return this.readBits(32)}}class Xn extends Tn{parsePES(e,t,n,r){const i=this.parseNALu(e,n.data,r);let s=this.VideoSample,l,d=!1;n.data=null,s&&i.length&&!e.audFound&&(this.pushAccessUnit(s,e),s=this.VideoSample=this.createVideoSample(!1,n.pts,n.dts)),i.forEach(c=>{var p,b;switch(c.type){case 1:{let ge=!1;l=!0;const me=c.data;if(d&&me.length>4){const Fe=this.readSliceType(me);(Fe===2||Fe===4||Fe===7||Fe===9)&&(ge=!0)}if(ge){var I;(I=s)!=null&&I.frame&&!s.key&&(this.pushAccessUnit(s,e),s=this.VideoSample=null)}s||(s=this.VideoSample=this.createVideoSample(!0,n.pts,n.dts)),s.frame=!0,s.key=ge;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,n.pts,n.dts)),s.key=!0,s.frame=!0;break;case 6:{l=!0,rt(c.data,1,n.pts,t.samples);break}case 7:{var F,$;l=!0,d=!0;const ge=c.data,me=this.readSPS(ge);if(!e.sps||e.width!==me.width||e.height!==me.height||((F=e.pixelRatio)==null?void 0:F[0])!==me.pixelRatio[0]||(($=e.pixelRatio)==null?void 0:$[1])!==me.pixelRatio[1]){e.width=me.width,e.height=me.height,e.pixelRatio=me.pixelRatio,e.sps=[ge];const Fe=ge.subarray(1,4);let We="avc1.";for(let et=0;et<3;et++){let xt=Fe[et].toString(16);xt.length<2&&(xt="0"+xt),We+=xt}e.codec=We}break}case 8:l=!0,e.pps=[c.data];break;case 9:l=!0,e.audFound=!0,(b=s)!=null&&b.frame&&(this.pushAccessUnit(s,e),s=null),s||(s=this.VideoSample=this.createVideoSample(!1,n.pts,n.dts));break;case 12:l=!0;break;default:l=!1;break}s&&l&&s.units.push(c)}),r&&s&&(this.pushAccessUnit(s,e),this.VideoSample=null)}getNALuType(e,t){return e[t]&31}readSliceType(e){const t=new Pn(e);return t.readUByte(),t.readUEG(),t.readUEG()}skipScalingList(e,t){let n=8,r=8,i;for(let s=0;s<e;s++)r!==0&&(i=t.readEG(),r=(n+i+256)%256),n=r===0?n:r}readSPS(e){const t=new Pn(e);let n=0,r=0,i=0,s=0,l,d,c;const p=t.readUByte.bind(t),b=t.readBits.bind(t),I=t.readUEG.bind(t),F=t.readBoolean.bind(t),$=t.skipBits.bind(t),ge=t.skipEG.bind(t),me=t.skipUEG.bind(t),Fe=this.skipScalingList.bind(this);p();const We=p();if(b(5),$(3),p(),me(),We===100||We===110||We===122||We===244||We===44||We===83||We===86||We===118||We===128){const Xt=I();if(Xt===3&&$(1),me(),me(),$(1),F())for(d=Xt!==3?8:12,c=0;c<d;c++)F()&&(c<6?Fe(16,t):Fe(64,t))}me();const et=I();if(et===0)I();else if(et===1)for($(1),ge(),ge(),l=I(),c=0;c<l;c++)ge();me(),$(1);const xt=I(),Ot=I(),sn=b(1);sn===0&&$(1),$(1),F()&&(n=I(),r=I(),i=I(),s=I());let Pt=[1,1];if(F()&&F())switch(p()){case 1:Pt=[1,1];break;case 2:Pt=[12,11];break;case 3:Pt=[10,11];break;case 4:Pt=[16,11];break;case 5:Pt=[40,33];break;case 6:Pt=[24,11];break;case 7:Pt=[20,11];break;case 8:Pt=[32,11];break;case 9:Pt=[80,33];break;case 10:Pt=[18,11];break;case 11:Pt=[15,11];break;case 12:Pt=[64,33];break;case 13:Pt=[160,99];break;case 14:Pt=[4,3];break;case 15:Pt=[3,2];break;case 16:Pt=[2,1];break;case 255:{Pt=[p()<<8|p(),p()<<8|p()];break}}return{width:Math.ceil((xt+1)*16-n*2-r*2),height:(2-sn)*(Ot+1)*16-(sn?2:4)*(i+s),pixelRatio:Pt}}}class br extends Tn{constructor(...e){super(...e),this.initVPS=null}parsePES(e,t,n,r){const i=this.parseNALu(e,n.data,r);let s=this.VideoSample,l,d=!1;n.data=null,s&&i.length&&!e.audFound&&(this.pushAccessUnit(s,e),s=this.VideoSample=this.createVideoSample(!1,n.pts,n.dts)),i.forEach(c=>{var p,b;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,n.pts,n.dts)),s.frame=!0,l=!0;break;case 16:case 17:case 18:case 21:if(l=!0,d){var I;(I=s)!=null&&I.frame&&!s.key&&(this.pushAccessUnit(s,e),s=this.VideoSample=null)}s||(s=this.VideoSample=this.createVideoSample(!0,n.pts,n.dts)),s.key=!0,s.frame=!0;break;case 19:case 20:l=!0,(p=s)!=null&&p.frame&&!s.key&&(this.pushAccessUnit(s,e),s=this.VideoSample=null),s||(s=this.VideoSample=this.createVideoSample(!0,n.pts,n.dts)),s.key=!0,s.frame=!0;break;case 39:l=!0,rt(c.data,2,n.pts,t.samples);break;case 32:l=!0,e.vps||(typeof e.params!="object"&&(e.params={}),e.params=y(e.params,this.readVPS(c.data)),this.initVPS=c.data),e.vps=[c.data];break;case 33:if(l=!0,d=!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 F=this.readSPS(c.data);e.width=F.width,e.height=F.height,e.pixelRatio=F.pixelRatio,e.codec=F.codecString,e.sps=[],typeof e.params!="object"&&(e.params={});for(const $ in F.params)e.params[$]=F.params[$]}this.pushParameterSet(e.sps,c.data,e.vps),s||(s=this.VideoSample=this.createVideoSample(!0,n.pts,n.dts)),s.key=!0;break;case 34:if(l=!0,typeof e.params=="object"){if(!e.pps){e.pps=[];const F=this.readPPS(c.data);for(const $ in F)e.params[$]=F[$]}this.pushParameterSet(e.pps,c.data,e.vps)}break;case 35:l=!0,e.audFound=!0,(b=s)!=null&&b.frame&&(this.pushAccessUnit(s,e),s=null),s||(s=this.VideoSample=this.createVideoSample(!1,n.pts,n.dts));break;default:l=!1;break}s&&l&&s.units.push(c)}),r&&s&&(this.pushAccessUnit(s,e),this.VideoSample=null)}pushParameterSet(e,t,n){(n&&n[0]===this.initVPS||!n&&!e.length)&&e.push(t)}getNALuType(e,t){return(e[t]&126)>>>1}ebsp2rbsp(e){const t=new Uint8Array(e.byteLength);let n=0;for(let r=0;r<e.byteLength;r++)r>=2&&e[r]===3&&e[r-1]===0&&e[r-2]===0||(t[n]=e[r],n++);return new Uint8Array(t.buffer,0,n)}pushAccessUnit(e,t){super.pushAccessUnit(e,t),this.initVPS&&(this.initVPS=null)}readVPS(e){const t=new Pn(e);t.readUByte(),t.readUByte(),t.readBits(4),t.skipBits(2),t.readBits(6);const n=t.readBits(3),r=t.readBoolean();return{numTemporalLayers:n+1,temporalIdNested:r}}readSPS(e){const t=new Pn(this.ebsp2rbsp(e));t.readUByte(),t.readUByte(),t.readBits(4);const n=t.readBits(3);t.readBoolean();const r=t.readBits(2),i=t.readBoolean(),s=t.readBits(5),l=t.readUByte(),d=t.readUByte(),c=t.readUByte(),p=t.readUByte(),b=t.readUByte(),I=t.readUByte(),F=t.readUByte(),$=t.readUByte(),ge=t.readUByte(),me=t.readUByte(),Fe=t.readUByte(),We=[],et=[];for(let ti=0;ti<n;ti++)We.push(t.readBoolean()),et.push(t.readBoolean());if(n>0)for(let ti=n;ti<8;ti++)t.readBits(2);for(let ti=0;ti<n;ti++)We[ti]&&(t.readUByte(),t.readUByte(),t.readUByte(),t.readUByte(),t.readUByte(),t.readUByte(),t.readUByte(),t.readUByte(),t.readUByte(),t.readUByte(),t.readUByte()),et[ti]&&t.readUByte();t.readUEG();const xt=t.readUEG();xt==3&&t.skipBits(1);const Ot=t.readUEG(),sn=t.readUEG(),Pt=t.readBoolean();let Xt=0,Yt=0,Ft=0,xn=0;Pt&&(Xt+=t.readUEG(),Yt+=t.readUEG(),Ft+=t.readUEG(),xn+=t.readUEG());const nr=t.readUEG(),mr=t.readUEG(),Tr=t.readUEG(),pr=t.readBoolean();for(let ti=pr?0:n;ti<=n;ti++)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 Wi=0;Wi<4;Wi++)for(let fs=0;fs<(Wi===3?2:6);fs++)if(!t.readBoolean())t.readUEG();else{const ys=Math.min(64,1<<4+(Wi<<1));Wi>1&&t.readEG();for(let wa=0;wa<ys;wa++)t.readEG()}t.readBoolean(),t.readBoolean(),t.readBoolean()&&(t.readUByte(),t.skipUEG(),t.skipUEG(),t.readBoolean());const ur=t.readUEG();let wr=0;for(let ti=0;ti<ur;ti++){let Wi=!1;if(ti!==0&&(Wi=t.readBoolean()),Wi){ti===ur&&t.readUEG(),t.readBoolean(),t.readUEG();let fs=0;for(let ca=0;ca<=wr;ca++){const ys=t.readBoolean();let wa=!1;ys||(wa=t.readBoolean()),(ys||wa)&&fs++}wr=fs}else{const fs=t.readUEG(),ca=t.readUEG();wr=fs+ca;for(let ys=0;ys<fs;ys++)t.readUEG(),t.readBoolean();for(let ys=0;ys<ca;ys++)t.readUEG(),t.readBoolean()}}if(t.readBoolean()){const ti=t.readUEG();for(let Wi=0;Wi<ti;Wi++){for(let fs=0;fs<Tr+4;fs++)t.readBits(1);t.readBits(1)}}let qn=0,er=1,Hr=1,ai=!0,Vr=1,Jr=0;t.readBoolean(),t.readBoolean();let Zi=!1;if(t.readBoolean()){if(t.readBoolean()){const da=t.readUByte(),pu=[1,12,10,16,40,24,20,32,80,18,15,64,160,4,3,2],Co=[1,11,11,11,33,11,11,11,33,11,11,33,99,3,2,1];da>0&&da<16?(er=pu[da-1],Hr=Co[da-1]):da===255&&(er=t.readBits(16),Hr=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(),Zi=t.readBoolean(),Zi&&(t.skipUEG(),t.skipUEG(),t.skipUEG(),t.skipUEG()),t.readBoolean()&&(Vr=t.readBits(32),Jr=t.readBits(32),t.readBoolean()&&t.readUEG(),t.readBoolean())){const Co=t.readBoolean(),gu=t.readBoolean();let za=!1;(Co||gu)&&(za=t.readBoolean(),za&&(t.readUByte(),t.readBits(5),t.readBoolean(),t.readBits(5)),t.readBits(4),t.readBits(4),za&&t.readBits(4),t.readBits(5),t.readBits(5),t.readBits(5));for(let vu=0;vu<=n;vu++){ai=t.readBoolean();const j0=ai||t.readBoolean();let yu=!1;j0?t.readEG():yu=t.readBoolean();const bu=yu?1:t.readUEG()+1;if(Co)for(let Ka=0;Ka<bu;Ka++)t.readUEG(),t.readUEG(),za&&(t.readUEG(),t.readUEG()),t.skipBits(1);if(gu)for(let Ka=0;Ka<bu;Ka++)t.readUEG(),t.readUEG(),za&&(t.readUEG(),t.readUEG()),t.skipBits(1)}}t.readBoolean()&&(t.readBoolean(),t.readBoolean(),t.readBoolean(),qn=t.readUEG())}let ds=Ot,As=sn;if(Pt){let ti=1,Wi=1;xt===1?ti=Wi=2:xt==2&&(ti=2),ds=Ot-ti*Yt-ti*Xt,As=sn-Wi*xn-Wi*Ft}const ua=r?["A","B","C"][r]:"",H0=l<<24|d<<16|c<<8|p;let fl=0;for(let ti=0;ti<32;ti++)fl=(fl|(H0>>ti&1)<<31-ti)>>>0;let hl=fl.toString(16);return s===1&&hl==="2"&&(hl="6"),{codecString:`hvc1.${ua}${s}.${hl}.${i?"H":"L"}${Fe}.B0`,params:{general_tier_flag:i,general_profile_idc:s,general_profile_space:r,general_profile_compatibility_flags:[l,d,c,p],general_constraint_indicator_flags:[b,I,F,$,ge,me],general_level_idc:Fe,bit_depth:nr+8,bit_depth_luma_minus8:nr,bit_depth_chroma_minus8:mr,min_spatial_segmentation_idc:qn,chroma_format_idc:xt,frame_rate:{fixed:ai,fps:Jr/Vr}},width:ds,height:As,pixelRatio:[er,Hr]}}readPPS(e){const t=new Pn(this.ebsp2rbsp(e));t.readUByte(),t.readUByte(),t.skipUEG(),t.skipUEG(),t.skipBits(2),t.skipBits(3),t.skipBits(2),t.skipUEG(),t.skipUEG(),t.skipEG(),t.skipBits(2),t.readBoolean()&&t.skipUEG(),t.skipEG(),t.skipEG(),t.skipBits(4);const r=t.readBoolean(),i=t.readBoolean();let s=1;return i&&r?s=0:i?s=3:r&&(s=2),{parallelismType:s}}matchSPS(e,t){return String.fromCharCode.apply(null,e).substr(3)===String.fromCharCode.apply(null,t).substr(3)}}const xr=188;class Pr{constructor(e,t,n,r){this.logger=void 0,this.observer=void 0,this.config=void 0,this.typeSupported=void 0,this.sampleAes=null,this.pmtParsed=!1,this.audioCodec=void 0,this.videoCodec=void 0,this._pmtId=-1,this._videoTrack=void 0,this._audioTrack=void 0,this._id3Track=void 0,this._txtTrack=void 0,this.aacOverFlow=null,this.remainderData=null,this.videoParser=void 0,this.observer=e,this.config=t,this.typeSupported=n,this.logger=r,this.videoParser=null}static probe(e,t){const n=Pr.syncOffset(e);return n>0&&t.warn(`MPEG2-TS detected but first sync word found @ offset ${n}`),n!==-1}static syncOffset(e){const t=e.length;let n=Math.min(xr*5,t-xr)+1,r=0;for(;r<n;){let i=!1,s=-1,l=0;for(let d=r;d<t;d+=xr)if(e[d]===71&&(t-d===xr||e[d+xr]===71)){if(l++,s===-1&&(s=d,s!==0&&(n=Math.min(s+xr*99,e.length-xr)+1)),i||(i=$r(e,d)===0),i&&l>1&&(s===0&&l>2||d+xr>n))return s}else{if(l)return-1;break}r++}return-1}static createTrack(e,t){return{container:e==="video"||e==="audio"?"video/mp2t":void 0,type:e,id:St[e],pid:-1,inputTimeScale:9e4,sequenceNumber:0,samples:[],dropped:0,duration:e==="audio"?t:void 0}}resetInitSegment(e,t,n,r){this.pmtParsed=!1,this._pmtId=-1,this._videoTrack=Pr.createTrack("video"),this._videoTrack.duration=r,this._audioTrack=Pr.createTrack("audio",r),this._id3Track=Pr.createTrack("id3"),this._txtTrack=Pr.createTrack("text"),this._audioTrack.segmentCodec="aac",this.videoParser=null,this.aacOverFlow=null,this.remainderData=null,this.audioCodec=t,this.videoCodec=n}resetTimeStamp(){}resetContiguity(){const{_audioTrack:e,_videoTrack:t,_id3Track:n}=this;e&&(e.pesData=null),t&&(t.pesData=null),n&&(n.pesData=null),this.aacOverFlow=null,this.remainderData=null}demux(e,t,n=!1,r=!1){n||(this.sampleAes=null);let i;const s=this._videoTrack,l=this._audioTrack,d=this._id3Track,c=this._txtTrack;let p=s.pid,b=s.pesData,I=l.pid,F=d.pid,$=l.pesData,ge=d.pesData,me=null,Fe=this.pmtParsed,We=this._pmtId,et=e.length;if(this.remainderData&&(e=ht(this.remainderData,e),et=e.length,this.remainderData=null),et<xr&&!r)return this.remainderData=e,{audioTrack:l,videoTrack:s,id3Track:d,textTrack:c};const xt=Math.max(0,Pr.syncOffset(e));et-=(et-xt)%xr,et<e.byteLength&&!r&&(this.remainderData=new Uint8Array(e.buffer,et,e.buffer.byteLength-et));let Ot=0;for(let Pt=xt;Pt<et;Pt+=xr)if(e[Pt]===71){const Xt=!!(e[Pt+1]&64),Yt=$r(e,Pt),Ft=(e[Pt+3]&48)>>4;let xn;if(Ft>1){if(xn=Pt+5+e[Pt+4],xn===Pt+xr)continue}else xn=Pt+4;switch(Yt){case p:Xt&&(b&&(i=ci(b,this.logger))&&(this.readyVideoParser(s.segmentCodec),this.videoParser!==null&&this.videoParser.parsePES(s,c,i,!1)),b={data:[],size:0}),b&&(b.data.push(e.subarray(xn,Pt+xr)),b.size+=Pt+xr-xn);break;case I:if(Xt){if($&&(i=ci($,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}$={data:[],size:0}}$&&($.data.push(e.subarray(xn,Pt+xr)),$.size+=Pt+xr-xn);break;case F:Xt&&(ge&&(i=ci(ge,this.logger))&&this.parseID3PES(d,i),ge={data:[],size:0}),ge&&(ge.data.push(e.subarray(xn,Pt+xr)),ge.size+=Pt+xr-xn);break;case 0:Xt&&(xn+=e[xn]+1),We=this._pmtId=fi(e,xn);break;case We:{Xt&&(xn+=e[xn]+1);const nr=si(e,xn,this.typeSupported,n,this.observer,this.logger);p=nr.videoPid,p>0&&(s.pid=p,s.segmentCodec=nr.segmentVideoCodec),I=nr.audioPid,I>0&&(l.pid=I,l.segmentCodec=nr.segmentAudioCodec),F=nr.id3Pid,F>0&&(d.pid=F),me!==null&&!Fe&&(this.logger.warn(`MPEG-TS PMT found at ${Pt} after unknown PID '${me}'. Backtracking to sync byte @${xt} to parse all TS packets.`),me=null,Pt=xt-188),Fe=this.pmtParsed=!0;break}case 17:case 8191:break;default:me=Yt;break}}else Ot++;Ot>0&&hi(this.observer,new Error(`Found ${Ot} TS packet/s that do not start with 0x47`),void 0,this.logger),s.pesData=b,l.pesData=$,d.pesData=ge;const sn={audioTrack:l,videoTrack:s,id3Track:d,textTrack:c};return r&&this.extractRemainingSamples(sn),sn}flush(){const{remainderData:e}=this;this.remainderData=null;let t;return e?t=this.demux(e,-1,!1,!0):t={videoTrack:this._videoTrack,audioTrack:this._audioTrack,id3Track:this._id3Track,textTrack:this._txtTrack},this.extractRemainingSamples(t),this.sampleAes?this.decrypt(t,this.sampleAes):t}extractRemainingSamples(e){const{audioTrack:t,videoTrack:n,id3Track:r,textTrack:i}=e,s=n.pesData,l=t.pesData,d=r.pesData;let c;if(s&&(c=ci(s,this.logger))?(this.readyVideoParser(n.segmentCodec),this.videoParser!==null&&(this.videoParser.parsePES(n,i,c,!0),n.pesData=null)):n.pesData=s,l&&(c=ci(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;d&&(c=ci(d,this.logger))?(this.parseID3PES(r,c),r.pesData=null):r.pesData=d}demuxSampleAes(e,t,n){const r=this.demux(e,n,!0,!this.config.progressive),i=this.sampleAes=new an(this.observer,this.config,t);return this.decrypt(r,i)}readyVideoParser(e){this.videoParser===null&&(e==="avc"?this.videoParser=new Xn:e==="hevc"&&(this.videoParser=new br))}decrypt(e,t){return new Promise(n=>{const{audioTrack:r,videoTrack:i}=e;r.samples&&r.segmentCodec==="aac"?t.decryptAacSamples(r.samples,0,()=>{i.samples?t.decryptAvcSamples(i.samples,0,0,()=>{n(e)}):n(e)}):i.samples&&t.decryptAvcSamples(i.samples,0,0,()=>{n(e)})})}destroy(){this.observer&&this.observer.removeAllListeners(),this.config=this.logger=this.observer=null,this.aacOverFlow=this.videoParser=this.remainderData=this.sampleAes=null,this._videoTrack=this._audioTrack=this._id3Track=this._txtTrack=void 0}parseAACPES(e,t){let n=0;const r=this.aacOverFlow;let i=t.data;if(r){this.aacOverFlow=null;const b=r.missing,I=r.sample.unit.byteLength;if(b===-1)i=ht(r.sample.unit,i);else{const F=I-b;r.sample.unit.set(i.subarray(0,b),F),e.samples.push(r.sample),n=r.missing}}let s,l;for(s=n,l=i.length;s<l-1&&!ma(i,s);s++);if(s!==n){let b;const I=s<l-1;if(I?b=`AAC PES did not start with ADTS header,offset:${s}`:b="No ADTS header found in AAC PES",hi(this.observer,new Error(b),I,this.logger),!I)return}Ra(e,this.observer,i,s,this.audioCodec);let d;if(t.pts!==void 0)d=t.pts;else if(r){const b=Xa(e.samplerate);d=r.sample.pts+b}else{this.logger.warn("[tsdemuxer]: AAC PES unknown PTS");return}let c=0,p;for(;s<l;)if(p=Qa(e,i,s,d,c),s+=p.length,p.missing){this.aacOverFlow=p;break}else for(c++;s<l-1&&!ma(i,s);s++);}parseMPEGPES(e,t){const n=t.data,r=n.length;let i=0,s=0;const l=t.pts;if(l===void 0){this.logger.warn("[tsdemuxer]: MPEG PES unknown PTS");return}for(;s<r;)if(u(n,s)){const d=oo(e,n,s,l,i);if(d)s+=d.length,i++;else break}else s++}parseAC3PES(e,t){{const n=t.data,r=t.pts;if(r===void 0){this.logger.warn("[tsdemuxer]: AC3 PES unknown PTS");return}const i=n.length;let s=0,l=0,d;for(;l<i&&(d=De(e,n,l,r,s++))>0;)l+=d}}parseID3PES(e,t){if(t.pts===void 0){this.logger.warn("[tsdemuxer]: ID3 PES unknown PTS");return}const n=y({},t,{type:this._videoTrack?Fi.emsg:Fi.audioId3,duration:Number.POSITIVE_INFINITY});e.samples.push(n)}}function $r(a,e){return((a[e+1]&31)<<8)+a[e+2]}function fi(a,e){return(a[e+10]&31)<<8|a[e+11]}function si(a,e,t,n,r,i){const s={audioPid:-1,videoPid:-1,id3Pid:-1,segmentVideoCodec:"avc",segmentAudioCodec:"aac"},l=(a[e+1]&15)<<8|a[e+2],d=e+3+l-4,c=(a[e+10]&15)<<8|a[e+11];for(e+=12+c;e<d;){const p=$r(a,e),b=(a[e+3]&15)<<8|a[e+4];switch(a[e]){case 207:if(!n){mi("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(!n){mi("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(!n){mi("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&&b>0){let I=e+5,F=b;for(;F>2;){switch(a[I]){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 ge=a[I+1]+2;I+=ge,F-=ge}}break;case 194:case 135:return hi(r,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+=b+5}return s}function hi(a,e,t,n){n.warn(`parsing error: ${e.message}`),a.emit(g.ERROR,g.ERROR,{type:fe.MEDIA_ERROR,details:z.FRAG_PARSING_ERROR,fatal:!1,levelRetry:t,error:e,reason:e.message})}function mi(a,e){e.log(`${a} with AES-128-CBC encryption found in unencrypted stream`)}function ci(a,e){let t=0,n,r,i,s,l;const d=a.data;if(!a||a.size===0)return null;for(;d[0].length<19&&d.length>1;)d[0]=ht(d[0],d[1]),d.splice(1,1);if(n=d[0],(n[0]<<16)+(n[1]<<8)+n[2]===1){if(r=(n[4]<<8)+n[5],r&&r>a.size-6)return null;const p=n[7];p&192&&(s=(n[9]&14)*536870912+(n[10]&255)*4194304+(n[11]&254)*16384+(n[12]&255)*128+(n[13]&254)/2,p&64?(l=(n[14]&14)*536870912+(n[15]&255)*4194304+(n[16]&254)*16384+(n[17]&255)*128+(n[18]&254)/2,s-l>60*9e4&&(e.warn(`${Math.round((s-l)/9e4)}s delta between PTS and DTS, align them`),s=l)):l=s),i=n[8];let b=i+9;if(a.size<=b)return null;a.size-=b;const I=new Uint8Array(a.size);for(let F=0,$=d.length;F<$;F++){n=d[F];let ge=n.byteLength;if(b)if(b>ge){b-=ge;continue}else n=n.subarray(b),ge-=b,b=0;I.set(n,t),t+=ge}return r&&(r-=i+3),{data:I,pts:s,dts:l,len:r}}return null}class $i{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 bi=Math.pow(2,32)-1;class Lt{static init(){Lt.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 Lt.types)Lt.types.hasOwnProperty(e)&&(Lt.types[e]=[e.charCodeAt(0),e.charCodeAt(1),e.charCodeAt(2),e.charCodeAt(3)]);const t=new Uint8Array([0,0,0,0,0,0,0,0,118,105,100,101,0,0,0,0,0,0,0,0,0,0,0,0,86,105,100,101,111,72,97,110,100,108,101,114,0]),n=new Uint8Array([0,0,0,0,0,0,0,0,115,111,117,110,0,0,0,0,0,0,0,0,0,0,0,0,83,111,117,110,100,72,97,110,100,108,101,114,0]);Lt.HDLR_TYPES={video:t,audio:n};const r=new Uint8Array([0,0,0,0,0,0,0,1,0,0,0,12,117,114,108,32,0,0,0,1]),i=new Uint8Array([0,0,0,0,0,0,0,0]);Lt.STTS=Lt.STSC=Lt.STCO=i,Lt.STSZ=new Uint8Array([0,0,0,0,0,0,0,0,0,0,0,0]),Lt.VMHD=new Uint8Array([0,0,0,1,0,0,0,0,0,0,0,0]),Lt.SMHD=new Uint8Array([0,0,0,0,0,0,0,0]),Lt.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]),d=new Uint8Array([0,0,0,1]);Lt.FTYP=Lt.box(Lt.types.ftyp,s,d,s,l),Lt.DINF=Lt.box(Lt.types.dinf,Lt.box(Lt.types.dref,r))}static box(e,...t){let n=8,r=t.length;const i=r;for(;r--;)n+=t[r].byteLength;const s=new Uint8Array(n);for(s[0]=n>>24&255,s[1]=n>>16&255,s[2]=n>>8&255,s[3]=n&255,s.set(e,4),r=0,n=8;r<i;r++)s.set(t[r],n),n+=t[r].byteLength;return s}static hdlr(e){return Lt.box(Lt.types.hdlr,Lt.HDLR_TYPES[e])}static mdat(e){return Lt.box(Lt.types.mdat,e)}static mdhd(e,t){t*=e;const n=Math.floor(t/(bi+1)),r=Math.floor(t%(bi+1));return Lt.box(Lt.types.mdhd,new Uint8Array([1,0,0,0,0,0,0,0,0,0,0,2,0,0,0,0,0,0,0,3,e>>24&255,e>>16&255,e>>8&255,e&255,n>>24,n>>16&255,n>>8&255,n&255,r>>24,r>>16&255,r>>8&255,r&255,85,196,0,0]))}static mdia(e){return Lt.box(Lt.types.mdia,Lt.mdhd(e.timescale||0,e.duration||0),Lt.hdlr(e.type),Lt.minf(e))}static mfhd(e){return Lt.box(Lt.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"?Lt.box(Lt.types.minf,Lt.box(Lt.types.smhd,Lt.SMHD),Lt.DINF,Lt.stbl(e)):Lt.box(Lt.types.minf,Lt.box(Lt.types.vmhd,Lt.VMHD),Lt.DINF,Lt.stbl(e))}static moof(e,t,n){return Lt.box(Lt.types.moof,Lt.mfhd(e),Lt.traf(n,t))}static moov(e){let t=e.length;const n=[];for(;t--;)n[t]=Lt.trak(e[t]);return Lt.box.apply(null,[Lt.types.moov,Lt.mvhd(e[0].timescale||0,e[0].duration||0)].concat(n).concat(Lt.mvex(e)))}static mvex(e){let t=e.length;const n=[];for(;t--;)n[t]=Lt.trex(e[t]);return Lt.box.apply(null,[Lt.types.mvex,...n])}static mvhd(e,t){t*=e;const n=Math.floor(t/(bi+1)),r=Math.floor(t%(bi+1)),i=new Uint8Array([1,0,0,0,0,0,0,0,0,0,0,2,0,0,0,0,0,0,0,3,e>>24&255,e>>16&255,e>>8&255,e&255,n>>24,n>>16&255,n>>8&255,n&255,r>>24,r>>16&255,r>>8&255,r&255,0,1,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,64,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,255,255]);return Lt.box(Lt.types.mvhd,i)}static sdtp(e){const t=e.samples||[],n=new Uint8Array(4+t.length);let r,i;for(r=0;r<t.length;r++)i=t[r].flags,n[r+4]=i.dependsOn<<4|i.isDependedOn<<2|i.hasRedundancy;return Lt.box(Lt.types.sdtp,n)}static stbl(e){return Lt.box(Lt.types.stbl,Lt.stsd(e),Lt.box(Lt.types.stts,Lt.STTS),Lt.box(Lt.types.stsc,Lt.STSC),Lt.box(Lt.types.stsz,Lt.STSZ),Lt.box(Lt.types.stco,Lt.STCO))}static avc1(e){let t=[],n=[],r,i,s;for(r=0;r<e.sps.length;r++)i=e.sps[r],s=i.byteLength,t.push(s>>>8&255),t.push(s&255),t=t.concat(Array.prototype.slice.call(i));for(r=0;r<e.pps.length;r++)i=e.pps[r],s=i.byteLength,n.push(s>>>8&255),n.push(s&255),n=n.concat(Array.prototype.slice.call(i));const l=Lt.box(Lt.types.avcC,new Uint8Array([1,t[3],t[4],t[5],255,224|e.sps.length].concat(t).concat([e.pps.length]).concat(n))),d=e.width,c=e.height,p=e.pixelRatio[0],b=e.pixelRatio[1];return Lt.box(Lt.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,d>>8&255,d&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,Lt.box(Lt.types.btrt,new Uint8Array([0,28,156,128,0,45,198,192,0,45,198,192])),Lt.box(Lt.types.pasp,new Uint8Array([p>>24,p>>16&255,p>>8&255,p&255,b>>24,b>>16&255,b>>8&255,b&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 Lt.box(Lt.types.mp4a,Lt.audioStsd(e),Lt.box(Lt.types.esds,Lt.esds(e)))}static mp3(e){return Lt.box(Lt.types[".mp3"],Lt.audioStsd(e))}static ac3(e){return Lt.box(Lt.types["ac-3"],Lt.audioStsd(e),Lt.box(Lt.types.dac3,e.config))}static stsd(e){const{segmentCodec:t}=e;if(e.type==="audio"){if(t==="aac")return Lt.box(Lt.types.stsd,Lt.STSD,Lt.mp4a(e));if(t==="ac3"&&e.config)return Lt.box(Lt.types.stsd,Lt.STSD,Lt.ac3(e));if(t==="mp3"&&e.codec==="mp3")return Lt.box(Lt.types.stsd,Lt.STSD,Lt.mp3(e))}else if(e.pps&&e.sps){if(t==="avc")return Lt.box(Lt.types.stsd,Lt.STSD,Lt.avc1(e));if(t==="hevc"&&e.vps)return Lt.box(Lt.types.stsd,Lt.STSD,Lt.hvc1(e))}else throw new Error("video track missing pps or sps");throw new Error(`unsupported ${e.type} segment codec (${t}/${e.codec})`)}static tkhd(e){const t=e.id,n=(e.duration||0)*(e.timescale||0),r=e.width||0,i=e.height||0,s=Math.floor(n/(bi+1)),l=Math.floor(n%(bi+1));return Lt.box(Lt.types.tkhd,new Uint8Array([1,0,0,7,0,0,0,0,0,0,0,2,0,0,0,0,0,0,0,3,t>>24&255,t>>16&255,t>>8&255,t&255,0,0,0,0,s>>24,s>>16&255,s>>8&255,s&255,l>>24,l>>16&255,l>>8&255,l&255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,64,0,0,0,r>>8&255,r&255,0,0,i>>8&255,i&255,0,0]))}static traf(e,t){const n=Lt.sdtp(e),r=e.id,i=Math.floor(t/(bi+1)),s=Math.floor(t%(bi+1));return Lt.box(Lt.types.traf,Lt.box(Lt.types.tfhd,new Uint8Array([0,0,0,0,r>>24,r>>16&255,r>>8&255,r&255])),Lt.box(Lt.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])),Lt.trun(e,n.length+16+20+8+16+8+8),n)}static trak(e){return e.duration=e.duration||4294967295,Lt.box(Lt.types.trak,Lt.tkhd(e),Lt.mdia(e))}static trex(e){const t=e.id;return Lt.box(Lt.types.trex,new Uint8Array([0,0,0,0,t>>24,t>>16&255,t>>8&255,t&255,0,0,0,1,0,0,0,0,0,0,0,0,0,1,0,1]))}static trun(e,t){const n=e.samples||[],r=n.length,i=12+16*r,s=new Uint8Array(i);let l,d,c,p,b,I;for(t+=8+i,s.set([e.type==="video"?1:0,0,15,1,r>>>24&255,r>>>16&255,r>>>8&255,r&255,t>>>24&255,t>>>16&255,t>>>8&255,t&255],0),l=0;l<r;l++)d=n[l],c=d.duration,p=d.size,b=d.flags,I=d.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,b.isLeading<<2|b.dependsOn,b.isDependedOn<<6|b.hasRedundancy<<4|b.paddingValue<<1|b.isNonSync,b.degradPrio&61440,b.degradPrio&15,I>>>24&255,I>>>16&255,I>>>8&255,I&255],12+16*l);return Lt.box(Lt.types.trun,s)}static initSegment(e){Lt.types||Lt.init();const t=Lt.moov(e);return ht(Lt.FTYP,t)}static hvc1(e){const t=e.params,n=[e.vps,e.sps,e.pps],r=4,i=new Uint8Array([1,t.general_profile_space<<6|(t.general_tier_flag?32:0)|t.general_profile_idc,t.general_profile_compatibility_flags[0],t.general_profile_compatibility_flags[1],t.general_profile_compatibility_flags[2],t.general_profile_compatibility_flags[3],t.general_constraint_indicator_flags[0],t.general_constraint_indicator_flags[1],t.general_constraint_indicator_flags[2],t.general_constraint_indicator_flags[3],t.general_constraint_indicator_flags[4],t.general_constraint_indicator_flags[5],t.general_level_idc,240|t.min_spatial_segmentation_idc>>8,255&t.min_spatial_segmentation_idc,252|t.parallelismType,252|t.chroma_format_idc,248|t.bit_depth_luma_minus8,248|t.bit_depth_chroma_minus8,0,parseInt(t.frame_rate.fps),r-1|t.temporal_id_nested<<2|t.num_temporal_layers<<3|(t.frame_rate.fixed?64:0),n.length]);let s=i.length;for(let $=0;$<n.length;$+=1){s+=3;for(let ge=0;ge<n[$].length;ge+=1)s+=2+n[$][ge].length}const l=new Uint8Array(s);l.set(i,0),s=i.length;const d=n.length-1;for(let $=0;$<n.length;$+=1){l.set(new Uint8Array([32+$|($===d?128:0),0,n[$].length]),s),s+=3;for(let ge=0;ge<n[$].length;ge+=1)l.set(new Uint8Array([n[$][ge].length>>8,n[$][ge].length&255]),s),s+=2,l.set(n[$][ge],s),s+=n[$][ge].length}const c=Lt.box(Lt.types.hvcC,l),p=e.width,b=e.height,I=e.pixelRatio[0],F=e.pixelRatio[1];return Lt.box(Lt.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,b>>8&255,b&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,Lt.box(Lt.types.btrt,new Uint8Array([0,28,156,128,0,45,198,192,0,45,198,192])),Lt.box(Lt.types.pasp,new Uint8Array([I>>24,I>>16&255,I>>8&255,I&255,F>>24,F>>16&255,F>>8&255,F&255])))}}Lt.types=void 0,Lt.HDLR_TYPES=void 0,Lt.STTS=void 0,Lt.STSC=void 0,Lt.STCO=void 0,Lt.STSZ=void 0,Lt.VMHD=void 0,Lt.SMHD=void 0,Lt.STSD=void 0,Lt.FTYP=void 0,Lt.DINF=void 0;const Xi=9e4;function us(a,e,t=1,n=!1){const r=a*e*t;return n?Math.round(r):r}function rs(a,e,t=1,n=!1){return us(a,e,1/t,n)}function Ci(a,e=!1){return us(a,1e3,1/Xi,e)}function Ss(a,e=1){return us(a,Xi,1/e)}function cs(a){const{baseTime:e,timescale:t,trackId:n}=a;return`${e/t} (${e}/${t}) trackId: ${n}`}const lo=10*1e3,Bo=1024,Ws=1152,Vs=1536;let is=null,Gs=null;function sa(a,e,t,n){return{duration:e,size:t,cts:n,flags:{isLeading:0,isDependedOn:0,hasRedundancy:0,degradPrio:0,dependsOn:a?2:1,isNonSync:a?0:1}}}class va extends Z{constructor(e,t,n,r){if(super("mp4-remuxer",r),this.observer=void 0,this.config=void 0,this.typeSupported=void 0,this.ISGenerated=!1,this._initPTS=null,this._initDTS=null,this.nextVideoTs=null,this.nextAudioTs=null,this.videoSampleDuration=null,this.isAudioContiguous=!1,this.isVideoContiguous=!1,this.videoTrackConfig=void 0,this.observer=e,this.config=t,this.typeSupported=n,this.ISGenerated=!1,is===null){const s=(navigator.userAgent||"").match(/Chrome\/(\d+)/i);is=s?parseInt(s[1]):0}if(Gs===null){const i=navigator.userAgent.match(/Safari\/(\d+)/i);Gs=i?parseInt(i[1]):0}}destroy(){this.config=this.videoTrackConfig=this._initPTS=this._initDTS=null}resetTimeStamp(e){const t=this._initPTS;(!t||!e||e.trackId!==t.trackId||e.baseTime!==t.baseTime||e.timescale!==t.timescale)&&this.log(`Reset initPTS: ${t&&cs(t)} > ${e&&cs(e)}`),this._initPTS=this._initDTS=e}resetNextTimestamp(){this.log("reset next timestamp"),this.isVideoContiguous=!1,this.isAudioContiguous=!1}resetInitSegment(){this.log("ISGenerated flag reset"),this.ISGenerated=!1,this.videoTrackConfig=void 0}getVideoStartPts(e){let t=!1;const n=e[0].pts,r=e.reduce((i,s)=>{let l=s.pts,d=l-i;return d<-4294967296&&(t=!0,l=Qi(l,n),d=l-i),d>0?i:l},n);return t&&this.debug("PTS rollover detected"),r}remux(e,t,n,r,i,s,l,d){let c,p,b,I,F,$,ge=i,me=i;const Fe=e.pid>-1,We=t.pid>-1,et=t.samples.length,xt=e.samples.length>0,Ot=l&&et>0||et>1;if((!Fe||xt)&&(!We||Ot)||this.ISGenerated||l){if(this.ISGenerated){var Pt,Xt,Yt,Ft;const Tr=this.videoTrackConfig;(Tr&&(t.width!==Tr.width||t.height!==Tr.height||((Pt=t.pixelRatio)==null?void 0:Pt[0])!==((Xt=Tr.pixelRatio)==null?void 0:Xt[0])||((Yt=t.pixelRatio)==null?void 0:Yt[1])!==((Ft=Tr.pixelRatio)==null?void 0:Ft[1]))||!Tr&&Ot||this.nextAudioTs===null&&xt)&&this.resetInitSegment()}this.ISGenerated||(b=this.generateIS(e,t,i,s));const xn=this.isVideoContiguous;let nr=-1,mr;if(Ot&&(nr=Fo(t.samples),!xn&&this.config.forceKeyFrameOnDiscontinuity))if($=!0,nr>0){this.warn(`Dropped ${nr} out of ${et} video samples due to a missing keyframe`);const Tr=this.getVideoStartPts(t.samples);t.samples=t.samples.slice(nr),t.dropped+=nr,me+=(t.samples[0].pts-Tr)/t.inputTimeScale,mr=me}else nr===-1&&(this.warn(`No keyframe found out of ${et} video samples`),$=!1);if(this.ISGenerated){if(xt&&Ot){const Tr=this.getVideoStartPts(t.samples),Gn=(Qi(e.samples[0].pts,Tr)-Tr)/t.inputTimeScale;ge+=Math.max(0,Gn),me+=Math.max(0,-Gn)}if(xt){if(e.samplerate||(this.warn("regenerate InitSegment as audio detected"),b=this.generateIS(e,t,i,s)),p=this.remuxAudio(e,ge,this.isAudioContiguous,s,We||Ot||d===te.AUDIO?me:void 0),Ot){const Tr=p?p.endPTS-p.startPTS:0;t.inputTimeScale||(this.warn("regenerate InitSegment as video detected"),b=this.generateIS(e,t,i,s)),c=this.remuxVideo(t,me,xn,Tr)}}else Ot&&(c=this.remuxVideo(t,me,xn,0));c&&(c.firstKeyFrame=nr,c.independent=nr!==-1,c.firstKeyFramePTS=mr)}}return this.ISGenerated&&this._initPTS&&this._initDTS&&(n.samples.length&&(F=ya(n,i,this._initPTS,this._initDTS)),r.samples.length&&(I=Ba(r,i,this._initPTS))),{audio:p,video:c,initSegment:b,independent:$,text:I,id3:F}}computeInitPts(e,t,n,r){const i=Math.round(n*t);let s=Qi(e,i);if(s<i+t)for(this.log(`Adjusting PTS for rollover in timeline near ${(i-s)/t} ${r}`);s<i+t;)s+=8589934592;return s-i}generateIS(e,t,n,r){const i=e.samples,s=t.samples,l=this.typeSupported,d={},c=this._initPTS;let p=!c||r,b="audio/mp4",I,F,$,ge=-1;if(p&&(I=F=1/0),e.config&&i.length){switch(e.timescale=e.samplerate,e.segmentCodec){case"mp3":l.mpeg?(b="audio/mpeg",e.codec=""):l.mp3&&(e.codec="mp3");break;case"ac3":e.codec="ac-3";break}d.audio={id:"audio",container:b,codec:e.codec,initSegment:e.segmentCodec==="mp3"&&l.mpeg?new Uint8Array(0):Lt.initSegment([e]),metadata:{channelCount:e.channelCount}},p&&(ge=e.id,$=e.inputTimeScale,!c||$!==c.timescale?I=F=this.computeInitPts(i[0].pts,$,n,"audio"):p=!1)}if(t.sps&&t.pps&&s.length){if(t.timescale=t.inputTimeScale,d.video={id:"main",container:"video/mp4",codec:t.codec,initSegment:Lt.initSegment([t]),metadata:{width:t.width,height:t.height}},p)if(ge=t.id,$=t.inputTimeScale,!c||$!==c.timescale){const me=this.getVideoStartPts(s),Fe=Qi(s[0].dts,me),We=this.computeInitPts(Fe,$,n,"video"),et=this.computeInitPts(me,$,n,"video");F=Math.min(F,We),I=Math.min(I,et)}else p=!1;this.videoTrackConfig={width:t.width,height:t.height,pixelRatio:t.pixelRatio}}if(Object.keys(d).length)return this.ISGenerated=!0,p?(c&&this.warn(`Timestamps at playlist time: ${r?"":"~"}${n} ${I/$} != initPTS: ${c.baseTime/c.timescale} (${c.baseTime}/${c.timescale}) trackId: ${c.trackId}`),this.log(`Found initPTS at playlist time: ${n} offset: ${I/$} (${I}/${$}) trackId: ${ge}`),this._initPTS={baseTime:I,timescale:$,trackId:ge},this._initDTS={baseTime:F,timescale:$,trackId:ge}):I=$=void 0,{tracks:d,initPTS:I,timescale:$,trackId:ge}}remuxVideo(e,t,n,r){const i=e.inputTimeScale,s=e.samples,l=[],d=s.length,c=this._initPTS,p=c.baseTime*i/c.timescale;let b=this.nextVideoTs,I=8,F=this.videoSampleDuration,$,ge,me=Number.POSITIVE_INFINITY,Fe=Number.NEGATIVE_INFINITY,We=!1;if(!n||b===null){const qn=p+t*i,er=s[0].pts-Qi(s[0].dts,s[0].pts);is&&b!==null&&Math.abs(qn-er-(b+p))<15e3?n=!0:b=qn-er-p}const et=b+p;for(let qn=0;qn<d;qn++){const er=s[qn];er.pts=Qi(er.pts,et),er.dts=Qi(er.dts,et),er.dts<s[qn>0?qn-1:qn].dts&&(We=!0)}We&&s.sort(function(qn,er){const Hr=qn.dts-er.dts,ai=qn.pts-er.pts;return Hr||ai}),$=s[0].dts,ge=s[s.length-1].dts;const xt=ge-$,Ot=xt?Math.round(xt/(d-1)):F||e.inputTimeScale/30;if(n){const qn=$-et,er=qn>Ot,Hr=qn<-1;if((er||Hr)&&(er?this.warn(`${(e.segmentCodec||"").toUpperCase()}: ${Ci(qn,!0)} ms (${qn}dts) hole between fragments detected at ${t.toFixed(3)}`):this.warn(`${(e.segmentCodec||"").toUpperCase()}: ${Ci(-qn,!0)} ms (${qn}dts) overlapping between fragments detected at ${t.toFixed(3)}`),!Hr||et>=s[0].pts||is)){$=et;const ai=s[0].pts-qn;if(er)s[0].dts=$,s[0].pts=ai;else{let Vr=!0;for(let Jr=0;Jr<s.length&&!(s[Jr].dts>ai&&Vr);Jr++){const Zi=s[Jr].pts;if(s[Jr].dts-=qn,s[Jr].pts-=qn,Jr<s.length-1){const Hi=s[Jr+1].pts,ds=s[Jr].pts,As=Hi<=ds,ua=Hi<=Zi;Vr=As==ua}}}this.log(`Video: Initial PTS/DTS adjusted: ${Ci(ai,!0)}/${Ci($,!0)}, delta: ${Ci(qn,!0)} ms`)}}$=Math.max(0,$);let sn=0,Pt=0,Xt=$;for(let qn=0;qn<d;qn++){const er=s[qn],Hr=er.units,ai=Hr.length;let Vr=0;for(let Jr=0;Jr<ai;Jr++)Vr+=Hr[Jr].data.length;Pt+=Vr,sn+=ai,er.length=Vr,er.dts<Xt?(er.dts=Xt,Xt+=Ot/4|0||1):Xt=er.dts,me=Math.min(er.pts,me),Fe=Math.max(er.pts,Fe)}ge=s[d-1].dts;const Yt=Pt+4*sn+8;let Ft;try{Ft=new Uint8Array(Yt)}catch(qn){this.observer.emit(g.ERROR,g.ERROR,{type:fe.MUX_ERROR,details:z.REMUX_ALLOC_ERROR,fatal:!1,error:qn,bytes:Yt,reason:`fail allocating video mdat ${Yt}`});return}const xn=new DataView(Ft.buffer);xn.setUint32(0,Yt),Ft.set(Lt.types.mdat,4);let nr=!1,mr=Number.POSITIVE_INFINITY,Tr=Number.POSITIVE_INFINITY,pr=Number.NEGATIVE_INFINITY,Gn=Number.NEGATIVE_INFINITY;for(let qn=0;qn<d;qn++){const er=s[qn],Hr=er.units;let ai=0;for(let Zi=0,Hi=Hr.length;Zi<Hi;Zi++){const ds=Hr[Zi],As=ds.data,ua=ds.data.byteLength;xn.setUint32(I,ua),I+=4,Ft.set(As,I),I+=ua,ai+=4+ua}let Vr;if(qn<d-1)F=s[qn+1].dts-er.dts,Vr=s[qn+1].pts-er.pts;else{const Zi=this.config,Hi=qn>0?er.dts-s[qn-1].dts:Ot;if(Vr=qn>0?er.pts-s[qn-1].pts:Ot,Zi.stretchShortVideoTrack&&this.nextAudioTs!==null){const ds=Math.floor(Zi.maxBufferHole*i),As=(r?me+r*i:this.nextAudioTs+p)-er.pts;As>ds?(F=As-Hi,F<0?F=Hi:nr=!0,this.log(`It is approximately ${As/90} ms to the next segment; using duration ${F/90} ms for the last video frame.`)):F=Hi}else F=Hi}const Jr=Math.round(er.pts-er.dts);mr=Math.min(mr,F),pr=Math.max(pr,F),Tr=Math.min(Tr,Vr),Gn=Math.max(Gn,Vr),l.push(sa(er.key,F,ai,Jr))}if(l.length){if(is){if(is<70){const qn=l[0].flags;qn.dependsOn=2,qn.isNonSync=0}}else if(Gs&&Gn-Tr<pr-mr&&Ot/pr<.025&&l[0].cts===0){this.warn("Found irregular gaps in sample duration. Using PTS instead of DTS to determine MP4 sample duration.");let qn=$;for(let er=0,Hr=l.length;er<Hr;er++){const ai=qn+l[er].duration,Vr=qn+l[er].cts;if(er<Hr-1){const Jr=ai+l[er+1].cts;l[er].duration=Jr-Vr}else l[er].duration=er?l[er-1].duration:Ot;l[er].cts=0,qn=ai}}}F=nr||!F?Ot:F;const _r=ge+F;this.nextVideoTs=b=_r-p,this.videoSampleDuration=F,this.isVideoContiguous=!0;const kr={data1:Lt.moof(e.sequenceNumber++,$,y(e,{samples:l})),data2:Ft,startPTS:(me-p)/i,endPTS:(Fe+F-p)/i,startDTS:($-p)/i,endDTS:b/i,type:"video",hasAudio:!1,hasVideo:!0,nb:l.length,dropped:e.dropped};return e.samples=[],e.dropped=0,kr}getSamplesPerFrame(e){switch(e.segmentCodec){case"mp3":return Ws;case"ac3":return Vs;default:return Bo}}remuxAudio(e,t,n,r,i){const s=e.inputTimeScale,l=e.samplerate?e.samplerate:s,d=s/l,c=this.getSamplesPerFrame(e),p=c*d,b=this._initPTS,I=e.segmentCodec==="mp3"&&this.typeSupported.mpeg,F=[],$=i!==void 0;let ge=e.samples,me=I?0:8,Fe=this.nextAudioTs||-1;const We=b.baseTime*s/b.timescale,et=We+t*s;if(this.isAudioContiguous=n=n||ge.length&&Fe>0&&(r&&Math.abs(et-(Fe+We))<9e3||Math.abs(Qi(ge[0].pts,et)-(Fe+We))<20*p),ge.forEach(function(Gn){Gn.pts=Qi(Gn.pts,et)}),!n||Fe<0){const Gn=ge.length;if(ge=ge.filter(_r=>_r.pts>=0),Gn!==ge.length&&this.warn(`Removed ${ge.length-Gn} of ${Gn} samples (initPTS ${We} / ${s})`),!ge.length)return;i===0?Fe=0:r&&!$?Fe=Math.max(0,et-We):Fe=ge[0].pts-We}if(e.segmentCodec==="aac"){const Gn=this.config.maxAudioFramesDrift;for(let _r=0,ur=Fe+We;_r<ge.length;_r++){const wr=ge[_r],kr=wr.pts,qn=kr-ur,er=Math.abs(1e3*qn/s);if(qn<=-Gn*p&&$)_r===0&&(this.warn(`Audio frame @ ${(kr/s).toFixed(3)}s overlaps marker by ${Math.round(1e3*qn/s)} ms.`),this.nextAudioTs=Fe=kr-We,ur=kr);else if(qn>=Gn*p&&er<lo&&$){let Hr=Math.round(qn/p);for(ur=kr-Hr*p;ur<0&&Hr&&p;)Hr--,ur+=p;_r===0&&(this.nextAudioTs=Fe=ur-We),this.warn(`Injecting ${Hr} audio frames @ ${((ur-We)/s).toFixed(3)}s due to ${Math.round(1e3*qn/s)} ms gap.`);for(let ai=0;ai<Hr;ai++){let Vr=$i.getSilentFrame(e.parsedCodec||e.manifestCodec||e.codec,e.channelCount);Vr||(this.log("Unable to get silent frame for given audio codec; duplicating last frame instead."),Vr=wr.unit.subarray()),ge.splice(_r,0,{unit:Vr,pts:ur}),ur+=p,_r++}}wr.pts=ur,ur+=p}}let xt=null,Ot=null,sn,Pt=0,Xt=ge.length;for(;Xt--;)Pt+=ge[Xt].unit.byteLength;for(let Gn=0,_r=ge.length;Gn<_r;Gn++){const ur=ge[Gn],wr=ur.unit;let kr=ur.pts;if(Ot!==null){const er=F[Gn-1];er.duration=Math.round((kr-Ot)/d)}else if(n&&e.segmentCodec==="aac"&&(kr=Fe+We),xt=kr,Pt>0){Pt+=me;try{sn=new Uint8Array(Pt)}catch(er){this.observer.emit(g.ERROR,g.ERROR,{type:fe.MUX_ERROR,details:z.REMUX_ALLOC_ERROR,fatal:!1,error:er,bytes:Pt,reason:`fail allocating audio mdat ${Pt}`});return}I||(new DataView(sn.buffer).setUint32(0,Pt),sn.set(Lt.types.mdat,4))}else return;sn.set(wr,me);const qn=wr.byteLength;me+=qn,F.push(sa(!0,c,qn,0)),Ot=kr}const Yt=F.length;if(!Yt)return;const Ft=F[F.length-1];Fe=Ot-We,this.nextAudioTs=Fe+d*Ft.duration;const xn=I?new Uint8Array(0):Lt.moof(e.sequenceNumber++,xt/d,y({},e,{samples:F}));e.samples=[];const nr=(xt-We)/s,mr=this.nextAudioTs/s,pr={data1:xn,data2:sn,startPTS:nr,endPTS:mr,startDTS:nr,endDTS:mr,type:"audio",hasAudio:!0,hasVideo:!1,nb:Yt};return this.isAudioContiguous=!0,pr}}function Qi(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 Fo(a){for(let e=0;e<a.length;e++)if(a[e].key)return e;return-1}function ya(a,e,t,n){const r=a.samples.length;if(!r)return;const i=a.inputTimeScale;for(let l=0;l<r;l++){const d=a.samples[l];d.pts=Qi(d.pts-t.baseTime*i/t.timescale,e*i)/i,d.dts=Qi(d.dts-n.baseTime*i/n.timescale,e*i)/i}const s=a.samples;return a.samples=[],{samples:s}}function Ba(a,e,t){const n=a.samples.length;if(!n)return;const r=a.inputTimeScale;for(let s=0;s<n;s++){const l=a.samples[s];l.pts=Qi(l.pts-t.baseTime*r/t.timescale,e*r)/r}a.samples.sort((s,l)=>s.pts-l.pts);const i=a.samples;return a.samples=[],{samples:i}}class uo extends Z{constructor(e,t,n,r){super("passthrough-remuxer",r),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.isVideoContiguous=!1}destroy(){}resetTimeStamp(e){this.lastEndTime=null;const t=this.initPTS;t&&e&&t.baseTime===e.baseTime&&t.timescale===e.timescale||(this.initPTS=e)}resetNextTimestamp(){this.isVideoContiguous=!1,this.lastEndTime=null}resetInitSegment(e,t,n,r){this.audioCodec=t,this.videoCodec=n,this.generateInitSegment(e,r),this.emitInitSegment=!0}generateInitSegment(e,t){let{audioCodec:n,videoCodec:r}=this;if(!(e!=null&&e.byteLength)){this.initTracks=void 0,this.initData=void 0;return}const{audio:i,video:s}=this.initData=Ce(e);if(t)Te(e,t);else{const d=i||s;d!=null&&d.encrypted&&this.warn(`Init segment with encrypted track with has no key ("${d.codec}")!`)}i&&(n=ml(i,H.AUDIO,this)),s&&(r=ml(s,H.VIDEO,this));const l={};i&&s?l.audiovideo={container:"video/mp4",codec:n+","+r,supplemental:s.supplemental,encrypted:s.encrypted,initSegment:e,id:"main"}:i?l.audio={container:"audio/mp4",codec:n,encrypted:i.encrypted,initSegment:e,id:"audio"}:s?l.video={container:"video/mp4",codec:r,supplemental:s.supplemental,encrypted:s.encrypted,initSegment:e,id:"main"}:this.warn("initSegment does not contain moov or trak boxes."),this.initTracks=l}remux(e,t,n,r,i,s){var l,d;let{initPTS:c,lastEndTime:p}=this;const b={audio:void 0,video:void 0,text:r,id3:n,initSegment:void 0};v(p)||(p=this.lastEndTime=i||0);const I=t.samples;if(!I.length)return b;const F={initPTS:void 0,timescale:void 0,trackId:void 0};let $=this.initData;if((l=$)!=null&&l.length||(this.generateInitSegment(I),$=this.initData),!((d=$)!=null&&d.length))return this.warn("Failed to generate initSegment."),b;this.emitInitSegment&&(F.tracks=this.initTracks,this.emitInitSegment=!1);const ge=Xe(I,$,this),me=$.audio?ge[$.audio.id]:null,Fe=$.video?ge[$.video.id]:null,We=aa(Fe,1/0),et=aa(me,1/0),xt=aa(Fe,0,!0),Ot=aa(me,0,!0);let sn=i,Pt=0;const Xt=me&&(!Fe||!c&&et<We||c&&c.trackId===$.audio.id),Yt=Xt?me:Fe;if(Yt){const ur=Yt.timescale,wr=Yt.start-i*ur,kr=Xt?$.audio.id:$.video.id;sn=Yt.start/ur,Pt=Xt?Ot-et:xt-We,(s||!c)&&(ba(c,sn,i,Pt)||ur!==c.timescale)&&(c&&this.warn(`Timestamps at playlist time: ${s?"":"~"}${i} ${wr/ur} != initPTS: ${c.baseTime/c.timescale} (${c.baseTime}/${c.timescale}) trackId: ${c.trackId}`),this.log(`Found initPTS at playlist time: ${i} offset: ${sn-i} (${wr}/${ur}) trackId: ${kr}`),c=null,F.initPTS=wr,F.timescale=ur,F.trackId=kr)}else this.warn(`No audio or video samples found for initPTS at playlist time: ${i}`);c?(F.initPTS=c.baseTime,F.timescale=c.timescale,F.trackId=c.trackId):((!F.timescale||F.trackId===void 0||F.initPTS===void 0)&&(this.warn("Could not set initPTS"),F.initPTS=sn,F.timescale=1,F.trackId=-1),this.initPTS=c={baseTime:F.initPTS,timescale:F.timescale,trackId:F.trackId});const Ft=sn-c.baseTime/c.timescale,xn=Ft+Pt;Pt>0?this.lastEndTime=xn:(this.warn("Duration parsed from mp4 should be greater than zero"),this.resetNextTimestamp());const nr=!!$.audio,mr=!!$.video;let Tr="";nr&&(Tr+="audio"),mr&&(Tr+="video");const pr=($.audio?$.audio.encrypted:!1)||($.video?$.video.encrypted:!1),Gn={data1:I,startPTS:Ft,startDTS:Ft,endPTS:xn,endDTS:xn,type:Tr,hasAudio:nr,hasVideo:mr,nb:1,dropped:0,encrypted:pr};b.audio=nr&&!mr?Gn:void 0,b.video=mr?Gn:void 0;const _r=Fe==null?void 0:Fe.sampleCount;if(_r){const ur=Fe.keyFrameIndex,wr=ur!==-1;Gn.nb=_r,Gn.dropped=ur===0||this.isVideoContiguous?0:wr?ur:_r,Gn.independent=wr,Gn.firstKeyFrame=ur,wr&&Fe.keyFrameStart&&(Gn.firstKeyFramePTS=(Fe.keyFrameStart-c.baseTime)/c.timescale),this.isVideoContiguous||(b.independent=wr),this.isVideoContiguous||(this.isVideoContiguous=wr),Gn.dropped&&this.warn(`fmp4 does not start with IDR: firstIDR ${ur}/${_r} dropped: ${Gn.dropped} start: ${Gn.firstKeyFramePTS||"NA"}`)}return b.initSegment=F,b.id3=ya(n,i,c,c),r.samples.length&&(b.text=Ba(r,i,c)),b}}function aa(a,e,t=!1){return(a==null?void 0:a.start)!==void 0?(a.start+(t?a.duration:0))/a.timescale:e}function ba(a,e,t,n){if(a===null)return!0;const r=Math.max(n,1),i=e-a.baseTime/a.timescale;return Math.abs(i-t)>r}function ml(a,e,t){const n=a.codec;return n&&n.length>4?n:e===H.AUDIO?n==="ec-3"||n==="ac-3"||n==="alac"?n:n==="fLaC"||n==="Opus"?xe(n,!1):(t.warn(`Unhandled audio codec "${n}" in mp4 MAP`),n||"mp4a"):(t.warn(`Unhandled video codec "${n}" in mp4 MAP`),n||"avc1")}let Ps;try{Ps=self.performance.now.bind(self.performance)}catch(a){Ps=Date.now}const co=[{demux:It,remux:uo},{demux:Pr,remux:va},{demux:_,remux:va},{demux:Be,remux:va}];co.splice(2,0,{demux:ee,remux:va});class pl{constructor(e,t,n,r,i,s){this.asyncResult=!1,this.logger=void 0,this.observer=void 0,this.typeSupported=void 0,this.config=void 0,this.id=void 0,this.demuxer=void 0,this.remuxer=void 0,this.decrypter=void 0,this.probe=void 0,this.decryptionPromise=null,this.transmuxConfig=void 0,this.currentTransmuxState=void 0,this.observer=e,this.typeSupported=t,this.config=n,this.id=i,this.logger=s}configure(e){this.transmuxConfig=e,this.decrypter&&this.decrypter.reset()}push(e,t,n,r){const i=n.transmuxing;i.executeStart=Ps();let s=new Uint8Array(e);const{currentTransmuxState:l,transmuxConfig:d}=this;r&&(this.currentTransmuxState=r);const{contiguous:c,discontinuity:p,trackSwitch:b,accurateTimeOffset:I,timeOffset:F,initSegmentChange:$}=r||l,{audioCodec:ge,videoCodec:me,defaultInitPts:Fe,duration:We,initSegmentData:et}=d,xt=Su(s,t);if(xt&&kn(xt.method)){const Xt=this.getDecrypter(),Yt=$n(xt.method);if(Xt.isSync()){let Ft=Xt.softwareDecrypt(s,xt.key.buffer,xt.iv.buffer,Yt);if(n.part>-1){const nr=Xt.flush();Ft=nr&&nr.buffer}if(!Ft)return i.executeEnd=Ps(),$o(n);s=new Uint8Array(Ft)}else return this.asyncResult=!0,this.decryptionPromise=Xt.webCryptoDecrypt(s,xt.key.buffer,xt.iv.buffer,Yt).then(Ft=>{const xn=this.push(Ft,null,n);return this.decryptionPromise=null,xn}),this.decryptionPromise}const Ot=this.needsProbing(p,b);if(Ot){const Xt=this.configureTransmuxer(s);if(Xt)return this.logger.warn(`[transmuxer] ${Xt.message}`),this.observer.emit(g.ERROR,g.ERROR,{type:fe.MEDIA_ERROR,details:z.FRAG_PARSING_ERROR,fatal:!1,error:Xt,reason:Xt.message}),i.executeEnd=Ps(),$o(n)}(p||b||$||Ot)&&this.resetInitSegment(et,ge,me,We,t),(p||$||Ot)&&this.resetInitialTimestamp(Fe),c||this.resetContiguity();const sn=this.transmux(s,xt,F,I,n);this.asyncResult=Fa(sn);const Pt=this.currentTransmuxState;return Pt.contiguous=!0,Pt.discontinuity=!1,Pt.trackSwitch=!1,i.executeEnd=Ps(),sn}flush(e){const t=e.transmuxing;t.executeStart=Ps();const{decrypter:n,currentTransmuxState:r,decryptionPromise:i}=this;if(i)return this.asyncResult=!0,i.then(()=>this.flush(e));const s=[],{timeOffset:l}=r;if(n){const b=n.flush();b&&s.push(this.push(b.buffer,null,e))}const{demuxer:d,remuxer:c}=this;if(!d||!c){t.executeEnd=Ps();const b=[$o(e)];return this.asyncResult?Promise.resolve(b):b}const p=d.flush(l);return Fa(p)?(this.asyncResult=!0,p.then(b=>(this.flushRemux(s,b,e),s))):(this.flushRemux(s,p,e),this.asyncResult?Promise.resolve(s):s)}flushRemux(e,t,n){const{audioTrack:r,videoTrack:i,id3Track:s,textTrack:l}=t,{accurateTimeOffset:d,timeOffset:c}=this.currentTransmuxState;this.logger.log(`[transmuxer.ts]: Flushed ${this.id} sn: ${n.sn}${n.part>-1?" part: "+n.part:""} of ${this.id===te.MAIN?"level":"track"} ${n.level}`);const p=this.remuxer.remux(r,i,s,l,c,d,!0,this.id);e.push({remuxResult:p,chunkMeta:n}),n.transmuxing.executeEnd=Ps()}resetInitialTimestamp(e){const{demuxer:t,remuxer:n}=this;!t||!n||(t.resetTimeStamp(e),n.resetTimeStamp(e))}resetContiguity(){const{demuxer:e,remuxer:t}=this;!e||!t||(e.resetContiguity(),t.resetNextTimestamp())}resetInitSegment(e,t,n,r,i){const{demuxer:s,remuxer:l}=this;!s||!l||(s.resetInitSegment(e,t,n,r),l.resetInitSegment(e,t,n,i))}destroy(){this.demuxer&&(this.demuxer.destroy(),this.demuxer=void 0),this.remuxer&&(this.remuxer.destroy(),this.remuxer=void 0)}transmux(e,t,n,r,i){let s;return t&&t.method==="SAMPLE-AES"?s=this.transmuxSampleAes(e,t,n,r,i):s=this.transmuxUnencrypted(e,n,r,i),s}transmuxUnencrypted(e,t,n,r){const{audioTrack:i,videoTrack:s,id3Track:l,textTrack:d}=this.demuxer.demux(e,t,!1,!this.config.progressive);return{remuxResult:this.remuxer.remux(i,s,l,d,t,n,!1,this.id),chunkMeta:r}}transmuxSampleAes(e,t,n,r,i){return this.demuxer.demuxSampleAes(e,t,n).then(s=>({remuxResult:this.remuxer.remux(s.audioTrack,s.videoTrack,s.id3Track,s.textTrack,n,r,!1,this.id),chunkMeta:i}))}configureTransmuxer(e){const{config:t,observer:n,typeSupported:r}=this;let i;for(let b=0,I=co.length;b<I;b++){var s;if((s=co[b].demux)!=null&&s.probe(e,this.logger)){i=co[b];break}}if(!i)return new Error("Failed to find demuxer by probing fragment data");const l=this.demuxer,d=this.remuxer,c=i.remux,p=i.demux;(!d||!(d instanceof c))&&(this.remuxer=new c(n,t,r,this.logger)),(!l||!(l instanceof p))&&(this.demuxer=new p(n,t,r,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 fr(this.config)),e}}function Su(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 $o=a=>({remuxResult:{},chunkMeta:a});function Fa(a){return"then"in a&&a.then instanceof Function}class wu{constructor(e,t,n,r,i){this.audioCodec=void 0,this.videoCodec=void 0,this.initSegmentData=void 0,this.duration=void 0,this.defaultInitPts=void 0,this.audioCodec=e,this.videoCodec=t,this.initSegmentData=n,this.duration=r,this.defaultInitPts=i||null}}class Cu{constructor(e,t,n,r,i,s){this.discontinuity=void 0,this.contiguous=void 0,this.accurateTimeOffset=void 0,this.trackSwitch=void 0,this.timeOffset=void 0,this.initSegmentChange=void 0,this.discontinuity=e,this.contiguous=t,this.accurateTimeOffset=n,this.trackSwitch=r,this.timeOffset=i,this.initSegmentChange=s}}let gl=0;class vl{constructor(e,t,n,r){this.error=null,this.hls=void 0,this.id=void 0,this.instanceNo=gl++,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=d=>{const c=d.data,p=this.hls;if(!(!p||!(c!=null&&c.event)||c.instanceNo!==this.instanceNo))switch(c.event){case"init":{var b;const I=(b=this.workerContext)==null?void 0:b.objectURL;I&&self.URL.revokeObjectURL(I);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=d=>{if(!this.hls)return;const c=new Error(`${d.message} (${d.filename}:${d.lineno})`);this.hls.config.enableWorker=!1,this.hls.logger.warn(`Error in "${this.id}" Web Worker, fallback to inline`),this.hls.trigger(g.ERROR,{type:fe.OTHER_ERROR,details:z.INTERNAL_EXCEPTION,fatal:!1,event:"demuxerWorker",error:c})};const i=e.config;this.hls=e,this.id=t,this.useWorker=!!i.enableWorker,this.onTransmuxComplete=n,this.onFlush=r;const s=(d,c)=>{c=c||{},c.frag=this.frag||void 0,d===g.ERROR&&(c=c,c.parent=this.id,c.part=this.part,this.error=c.error),this.hls.trigger(d,c)};this.observer=new fa,this.observer.on(g.FRAG_DECRYPTED,s),this.observer.on(g.ERROR,s);const l=Gt(i.preferManagedMediaSource);if(this.useWorker&&typeof Worker!="undefined"){const d=this.hls.logger;if(i.workerPath||Za()){try{i.workerPath?(d.log(`loading Web Worker ${i.workerPath} for "${t}"`),this.workerContext=Wa(i.workerPath)):(d.log(`injecting Web Worker for "${t}"`),this.workerContext=Do());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:vt(i)})}catch(p){d.warn(`Error setting up "${t}" Web Worker, fallback to inline`,p),this.terminateWorker(),this.error=null,this.transmuxer=new pl(this.observer,l,i,"",t,e.logger)}return}}this.transmuxer=new pl(this.observer,l,i,"",t,e.logger)}reset(){if(this.frag=null,this.part=null,this.workerContext){const e=this.instanceNo;this.instanceNo=gl++;const t=this.hls.config,n=Gt(t.preferManagedMediaSource);this.workerContext.worker.postMessage({instanceNo:this.instanceNo,cmd:"reset",resetNo:e,typeSupported:n,id:this.id,config:vt(t)})}}terminateWorker(){if(this.workerContext){const{worker:e}=this.workerContext;this.workerContext=null,e.removeEventListener("message",this.onWorkerMessage),e.removeEventListener("error",this.onWorkerError),Io(this.hls.config.workerPath)}}destroy(){if(this.workerContext)this.terminateWorker(),this.onWorkerMessage=this.onWorkerError=null;else{const t=this.transmuxer;t&&(t.destroy(),this.transmuxer=null)}const e=this.observer;e&&e.removeAllListeners(),this.frag=null,this.part=null,this.observer=null,this.hls=null}push(e,t,n,r,i,s,l,d,c,p){var b,I;c.transmuxing.start=self.performance.now();const{instanceNo:F,transmuxer:$}=this,ge=s?s.start:i.start,me=i.decryptdata,Fe=this.frag,We=!(Fe&&i.cc===Fe.cc),et=!(Fe&&c.level===Fe.level),xt=Fe?c.sn-Fe.sn:-1,Ot=this.part?c.part-this.part.index:-1,sn=xt===0&&c.id>1&&c.id===(Fe==null?void 0:Fe.stats.chunkCount),Pt=!et&&(xt===1||xt===0&&(Ot===1||sn&&Ot<=0)),Xt=self.performance.now();(et||xt||i.stats.parsing.start===0)&&(i.stats.parsing.start=Xt),s&&(Ot||!Pt)&&(s.stats.parsing.start=Xt);const Yt=!(Fe&&((b=i.initSegment)==null?void 0:b.url)===((I=Fe.initSegment)==null?void 0:I.url)),Ft=new Cu(We,Pt,d,et,ge,Yt);if(!Pt||We||Yt){this.hls.logger.log(`[transmuxer-interface]: Starting new transmux session for ${i.type} sn: ${c.sn}${c.part>-1?" part: "+c.part:""} ${this.id===te.MAIN?"level":"track"}: ${c.level} id: ${c.id}
|
|
|
discontinuity: ${We}
|
|
|
trackSwitch: ${et}
|
|
|
contiguous: ${Pt}
|
|
|
accurateTimeOffset: ${d}
|
|
|
timeOffset: ${ge}
|
|
|
initSegmentChange: ${Yt}`);const xn=new wu(n,r,t,l,p);this.configureTransmuxer(xn)}if(this.frag=i,this.part=s,this.workerContext)this.workerContext.worker.postMessage({instanceNo:F,cmd:"demux",data:e,decryptdata:me,chunkMeta:c,state:Ft},e instanceof ArrayBuffer?[e]:[]);else if($){const xn=$.push(e,me,c,Ft);Fa(xn)?xn.then(nr=>{this.handleTransmuxComplete(nr)}).catch(nr=>{this.transmuxerError(nr,c,"transmuxer-interface push error")}):this.handleTransmuxComplete(xn)}}flush(e){e.transmuxing.start=self.performance.now();const{instanceNo:t,transmuxer:n}=this;if(this.workerContext)this.workerContext.worker.postMessage({instanceNo:t,cmd:"flush",chunkMeta:e});else if(n){const r=n.flush(e);Fa(r)?r.then(i=>{this.handleFlushResult(i,e)}).catch(i=>{this.transmuxerError(i,e,"transmuxer-interface flush error")}):this.handleFlushResult(r,e)}}transmuxerError(e,t,n){this.hls&&(this.error=e,this.hls.trigger(g.ERROR,{type:fe.MEDIA_ERROR,details:z.FRAG_PARSING_ERROR,chunkMeta:t,frag:this.frag||void 0,part:this.part||void 0,fatal:!1,error:e,err:e,reason:n}))}handleFlushResult(e,t){e.forEach(n=>{this.handleTransmuxComplete(n)}),this.onFlush(t)}configureTransmuxer(e){const{instanceNo:t,transmuxer:n}=this;this.workerContext?this.workerContext.worker.postMessage({instanceNo:t,cmd:"configure",config:e}):n&&n.configure(e)}handleTransmuxComplete(e){e.chunkMeta.transmuxing.end=self.performance.now(),this.onTransmuxComplete(e)}}const yl=100;class Tu extends ea{constructor(e,t,n){super(e,t,n,"audio-stream-controller",te.AUDIO),this.mainAnchor=null,this.mainFragLoading=null,this.audioOnly=!1,this.bufferedTrack=null,this.switchingTrack=null,this.trackId=-1,this.waitingData=null,this.mainDetails=null,this.flushing=!1,this.bufferFlushed=!1,this.cachedTrackLoadedData=null,this.registerListeners()}onHandlerDestroying(){this.unregisterListeners(),super.onHandlerDestroying(),this.resetItem()}resetItem(){this.mainDetails=this.mainAnchor=this.mainFragLoading=this.bufferedTrack=this.switchingTrack=this.waitingData=this.cachedTrackLoadedData=null}registerListeners(){super.registerListeners();const{hls:e}=this;e.on(g.LEVEL_LOADED,this.onLevelLoaded,this),e.on(g.AUDIO_TRACKS_UPDATED,this.onAudioTracksUpdated,this),e.on(g.AUDIO_TRACK_SWITCHING,this.onAudioTrackSwitching,this),e.on(g.AUDIO_TRACK_LOADED,this.onAudioTrackLoaded,this),e.on(g.BUFFER_RESET,this.onBufferReset,this),e.on(g.BUFFER_CREATED,this.onBufferCreated,this),e.on(g.BUFFER_FLUSHING,this.onBufferFlushing,this),e.on(g.BUFFER_FLUSHED,this.onBufferFlushed,this),e.on(g.INIT_PTS_FOUND,this.onInitPtsFound,this),e.on(g.FRAG_LOADING,this.onFragLoading,this),e.on(g.FRAG_BUFFERED,this.onFragBuffered,this)}unregisterListeners(){const{hls:e}=this;e&&(super.unregisterListeners(),e.off(g.LEVEL_LOADED,this.onLevelLoaded,this),e.off(g.AUDIO_TRACKS_UPDATED,this.onAudioTracksUpdated,this),e.off(g.AUDIO_TRACK_SWITCHING,this.onAudioTrackSwitching,this),e.off(g.AUDIO_TRACK_LOADED,this.onAudioTrackLoaded,this),e.off(g.BUFFER_RESET,this.onBufferReset,this),e.off(g.BUFFER_CREATED,this.onBufferCreated,this),e.off(g.BUFFER_FLUSHING,this.onBufferFlushing,this),e.off(g.BUFFER_FLUSHED,this.onBufferFlushed,this),e.off(g.INIT_PTS_FOUND,this.onInitPtsFound,this),e.off(g.FRAG_LOADING,this.onFragLoading,this),e.off(g.FRAG_BUFFERED,this.onFragBuffered,this))}onInitPtsFound(e,{frag:t,id:n,initPTS:r,timescale:i,trackId:s}){if(n===te.MAIN){const l=t.cc,d=this.fragCurrent;if(this.initPTS[l]={baseTime:r,timescale:i,trackId:s},this.log(`InitPTS for cc: ${l} found from main: ${r/i} (${r}/${i}) trackId: ${s}`),this.mainAnchor=t,this.state===hn.WAITING_INIT_PTS){const c=this.waitingData;(!c&&!this.loadingParts||c&&c.frag.cc!==l)&&this.syncWithAnchor(t,c==null?void 0:c.frag)}else!this.hls.hasEnoughToStart&&d&&d.cc!==l?(d.abortRequests(),this.syncWithAnchor(t,d)):this.state===hn.IDLE&&this.tick()}}getLoadPosition(){return!this.startFragRequested&&this.nextLoadPosition>=0?this.nextLoadPosition:super.getLoadPosition()}syncWithAnchor(e,t){var n;const r=((n=this.mainFragLoading)==null?void 0:n.frag)||null;if(t&&(r==null?void 0:r.cc)===t.cc)return;const i=(r||e).cc,s=this.getLevelDetails(),l=this.getLoadPosition(),d=Bn(s,i,l);d&&(this.log(`Syncing with main frag at ${d.start} cc ${d.cc}`),this.startFragRequested=!1,this.nextLoadPosition=d.start,this.resetLoadingState(),this.state===hn.IDLE&&this.doTickIdle())}startLoad(e,t){if(!this.levels){this.startPosition=e,this.state=hn.STOPPED;return}const n=this.lastCurrentTime;this.stopLoad(),this.setInterval(yl),n>0&&e===-1?(this.log(`Override startPosition with lastCurrentTime @${n.toFixed(3)}`),e=n,this.state=hn.IDLE):this.state=hn.WAITING_TRACK,this.nextLoadPosition=this.lastCurrentTime=e+this.timelineOffset,this.startPosition=t?-1:e,this.tick()}doTick(){switch(this.state){case hn.IDLE:this.doTickIdle();break;case hn.WAITING_TRACK:{const{levels:e,trackId:t}=this,n=e==null?void 0:e[t],r=n==null?void 0:n.details;if(r&&!this.waitForLive(n)){if(this.waitForCdnTuneIn(r))break;this.state=hn.WAITING_INIT_PTS}break}case hn.FRAG_LOADING_WAITING_RETRY:{this.checkRetryDate();break}case hn.WAITING_INIT_PTS:{const e=this.waitingData;if(e){const{frag:t,part:n,cache:r,complete:i}=e,s=this.mainAnchor;if(this.initPTS[t.cc]!==void 0){this.waitingData=null,this.state=hn.FRAG_LOADING;const l=r.flush().buffer,d={frag:t,part:n,payload:l,networkDetails:null};this._handleFragmentLoadProgress(d),i&&super._handleFragmentLoadComplete(d)}else s&&s.cc!==e.frag.cc&&this.syncWithAnchor(s,e.frag)}else this.state=hn.IDLE}}this.onTickEnd()}resetLoadingState(){const e=this.waitingData;e&&(this.fragmentTracker.removeFragment(e.frag),this.waitingData=null),super.resetLoadingState()}onTickEnd(){const{media:e}=this;e!=null&&e.readyState&&(this.lastCurrentTime=e.currentTime)}doTickIdle(){var e;const{hls:t,levels:n,media:r,trackId:i}=this,s=t.config;if(!this.buffering||!r&&!this.primaryPrefetch&&(this.startFragRequested||!s.startFragPrefetch)||!(n!=null&&n[i]))return;const l=n[i],d=l.details;if(!d||this.waitForLive(l)||this.waitForCdnTuneIn(d)){this.state=hn.WAITING_TRACK,this.startFragRequested=!1;return}const c=this.mediaBuffer?this.mediaBuffer:this.media;this.bufferFlushed&&c&&(this.bufferFlushed=!1,this.afterBufferFlushed(c,H.AUDIO,te.AUDIO));const p=this.getFwdBufferInfo(c,te.AUDIO);if(p===null)return;if(!this.switchingTrack&&this._streamEnded(p,d)){t.trigger(g.BUFFER_EOS,{type:"audio"}),this.state=hn.ENDED;return}const b=p.len,I=t.maxBufferLength,F=d.fragments,$=F[0].start,ge=this.getLoadPosition(),me=this.flushing?ge:p.end;if(this.switchingTrack&&r){const et=ge;d.PTSKnown&&et<$&&(p.end>$||p.nextStart)&&(this.log("Alt audio track ahead of main track, seek to start of alt audio track"),r.currentTime=$+.05)}if(b>=I&&!this.switchingTrack&&me<F[F.length-1].start)return;let Fe=this.getNextFragment(me,d);if(Fe&&this.isLoopLoading(Fe,me)&&(Fe=this.getNextFragmentLoopLoading(Fe,d,p,te.MAIN,I)),!Fe){this.bufferFlushed=!0;return}let We=((e=this.mainFragLoading)==null?void 0:e.frag)||null;if(!this.audioOnly&&this.startFragRequested&&We&&Ke(Fe)&&!Fe.endList&&(!d.live||!this.loadingParts&&me<this.hls.liveSyncPosition)&&(this.fragmentTracker.getState(We)===un.OK&&(this.mainFragLoading=We=null),We&&Ke(We))){if(Fe.start>We.end){const xt=this.fragmentTracker.getFragAtPos(me,te.MAIN);xt&&xt.end>We.end&&(We=xt,this.mainFragLoading={frag:xt,targetBufferTime:null})}if(Fe.start>We.end)return}this.loadFragment(Fe,l,me)}onMediaDetaching(e,t){this.bufferFlushed=this.flushing=!1,super.onMediaDetaching(e,t)}onAudioTracksUpdated(e,{audioTracks:t}){this.resetTransmuxer(),this.levels=t.map(n=>new Ht(n))}onAudioTrackSwitching(e,t){const n=!!t.url;this.trackId=t.id;const{fragCurrent:r}=this;r&&(r.abortRequests(),this.removeUnbufferedFrags(r.start)),this.resetLoadingState(),n?(this.switchingTrack=t,this.flushAudioIfNeeded(t),this.state!==hn.STOPPED&&(this.setInterval(yl),this.state=hn.IDLE,this.tick())):(this.resetTransmuxer(),this.switchingTrack=null,this.bufferedTrack=t,this.clearInterval())}onManifestLoading(){super.onManifestLoading(),this.bufferFlushed=this.flushing=this.audioOnly=!1,this.resetItem(),this.trackId=-1}onLevelLoaded(e,t){this.mainDetails=t.details;const n=this.cachedTrackLoadedData;n&&(this.cachedTrackLoadedData=null,this.onAudioTrackLoaded(g.AUDIO_TRACK_LOADED,n))}onAudioTrackLoaded(e,t){var n;const{levels:r}=this,{details:i,id:s,groupId:l,track:d}=t;if(!r){this.warn(`Audio tracks reset while loading track ${s} "${d.name}" of "${l}"`);return}const c=this.mainDetails;if(!c||i.endCC>c.endCC||c.expired){this.cachedTrackLoadedData=t,this.state!==hn.STOPPED&&(this.state=hn.WAITING_TRACK);return}this.cachedTrackLoadedData=null,this.log(`Audio track ${s} "${d.name}" of "${l}" loaded [${i.startSN},${i.endSN}]${i.lastPartSn?`[part-${i.lastPartSn}-${i.lastPartIndex}]`:""},duration:${i.totalduration}`);const p=r[s];let b=0;if(i.live||(n=p.details)!=null&&n.live){if(this.checkLiveUpdate(i),i.deltaUpdateFailed)return;if(p.details){var I;b=this.alignPlaylists(i,p.details,(I=this.levelLastLoaded)==null?void 0:I.details)}i.alignedSliding||(Us(i,c),i.alignedSliding||zs(i,c),b=i.fragmentStart)}p.details=i,this.levelLastLoaded=p,this.startFragRequested||this.setStartPosition(c,b),this.hls.trigger(g.AUDIO_TRACK_UPDATED,{details:i,id:s,groupId:t.groupId}),this.state===hn.WAITING_TRACK&&!this.waitForCdnTuneIn(i)&&(this.state=hn.IDLE),this.tick()}_handleFragmentLoadProgress(e){var t;const n=e.frag,{part:r,payload:i}=e,{config:s,trackId:l,levels:d}=this;if(!d){this.warn(`Audio tracks were reset while fragment load was in progress. Fragment ${n.sn} of level ${n.level} will not be buffered`);return}const c=d[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(n.start);return}const b=s.defaultAudioCodec||c.audioCodec||"mp4a.40.2";let I=this.transmuxer;I||(I=this.transmuxer=new vl(this.hls,te.AUDIO,this._handleTransmuxComplete.bind(this),this._handleTransmuxerFlush.bind(this)));const F=this.initPTS[n.cc],$=(t=n.initSegment)==null?void 0:t.data;if(F!==void 0){const me=r?r.index:-1,Fe=me!==-1,We=new Fr(n.level,n.sn,n.stats.chunkCount,i.byteLength,me,Fe);I.push(i,$,b,"",n,r,p.totalduration,!1,We,F)}else{this.log(`Unknown video PTS for cc ${n.cc}, waiting for video PTS before demuxing audio frag ${n.sn} of [${p.startSN} ,${p.endSN}],track ${l}`);const{cache:ge}=this.waitingData=this.waitingData||{frag:n,part:r,cache:new Ta,complete:!1};ge.push(new Uint8Array(i)),this.state!==hn.STOPPED&&(this.state=hn.WAITING_INIT_PTS)}}_handleFragmentLoadComplete(e){if(this.waitingData){this.waitingData.complete=!0;return}super._handleFragmentLoadComplete(e)}onBufferReset(){this.mediaBuffer=null}onBufferCreated(e,t){this.bufferFlushed=this.flushing=!1;const n=t.tracks.audio;n&&(this.mediaBuffer=n.buffer||null)}onFragLoading(e,t){!this.audioOnly&&t.frag.type===te.MAIN&&Ke(t.frag)&&(this.mainFragLoading=t,this.state===hn.IDLE&&this.tick())}onFragBuffered(e,t){const{frag:n,part:r}=t;if(n.type!==te.AUDIO){!this.audioOnly&&n.type===te.MAIN&&!n.elementaryStreams.video&&!n.elementaryStreams.audiovideo&&(this.audioOnly=!0,this.mainFragLoading=null);return}if(this.fragContextChanged(n)){this.warn(`Fragment ${n.sn}${r?" p: "+r.index:""} of level ${n.level} finished buffering, but was aborted. state: ${this.state}, audioSwitch: ${this.switchingTrack?this.switchingTrack.name:"false"}`);return}if(Ke(n)){this.fragPrevious=n;const i=this.switchingTrack;i&&(this.bufferedTrack=i,this.switchingTrack=null,this.hls.trigger(g.AUDIO_TRACK_SWITCHED,T({},i)))}this.fragBufferedComplete(n,r),this.media&&this.tick()}onError(e,t){var n;if(t.fatal){this.state=hn.ERROR;return}switch(t.details){case z.FRAG_GAP:case z.FRAG_PARSING_ERROR:case z.FRAG_DECRYPT_ERROR:case z.FRAG_LOAD_ERROR:case z.FRAG_LOAD_TIMEOUT:case z.KEY_LOAD_ERROR:case z.KEY_LOAD_TIMEOUT:this.onFragmentOrKeyLoadError(te.AUDIO,t);break;case z.AUDIO_TRACK_LOAD_ERROR:case z.AUDIO_TRACK_LOAD_TIMEOUT:case z.LEVEL_PARSING_ERROR:!t.levelRetry&&this.state===hn.WAITING_TRACK&&((n=t.context)==null?void 0:n.type)===q.AUDIO_TRACK&&(this.state=hn.IDLE);break;case z.BUFFER_ADD_CODEC_ERROR:case z.BUFFER_APPEND_ERROR:if(t.parent!=="audio")return;this.reduceLengthAndFlushBuffer(t)||this.resetLoadingState();break;case z.BUFFER_FULL_ERROR:if(t.parent!=="audio")return;this.reduceLengthAndFlushBuffer(t)&&(this.bufferedTrack=null,super.flushMainBuffer(0,Number.POSITIVE_INFINITY,"audio"));break;case z.INTERNAL_EXCEPTION:this.recoverWorkerError(t);break}}onBufferFlushing(e,{type:t}){t!==H.VIDEO&&(this.flushing=!0)}onBufferFlushed(e,{type:t}){if(t!==H.VIDEO){this.flushing=!1,this.bufferFlushed=!0,this.state===hn.ENDED&&(this.state=hn.IDLE);const n=this.mediaBuffer||this.media;n&&(this.afterBufferFlushed(n,t,te.AUDIO),this.tick())}}_handleTransmuxComplete(e){var t;const n="audio",{hls:r}=this,{remuxResult:i,chunkMeta:s}=e,l=this.getCurrentContext(s);if(!l){this.resetWhenMissingContext(s);return}const{frag:d,part:c,level:p}=l,{details:b}=p,{audio:I,text:F,id3:$,initSegment:ge}=i;if(this.fragContextChanged(d)||!b){this.fragmentTracker.removeFragment(d);return}if(this.state=hn.PARSING,this.switchingTrack&&I&&this.completeAudioSwitch(this.switchingTrack),ge!=null&&ge.tracks){const me=d.initSegment||d;if(this.unhandledEncryptionError(ge,d))return;this._bufferInitSegment(p,ge.tracks,me,s),r.trigger(g.FRAG_PARSING_INIT_SEGMENT,{frag:me,id:n,tracks:ge.tracks})}if(I){const{startPTS:me,endPTS:Fe,startDTS:We,endDTS:et}=I;c&&(c.elementaryStreams[H.AUDIO]={startPTS:me,endPTS:Fe,startDTS:We,endDTS:et}),d.setElementaryStreamInfo(H.AUDIO,me,Fe,We,et),this.bufferFragmentData(I,d,c,s)}if($!=null&&(t=$.samples)!=null&&t.length){const me=y({id:n,frag:d,details:b},$);r.trigger(g.FRAG_PARSING_METADATA,me)}if(F){const me=y({id:n,frag:d,details:b},F);r.trigger(g.FRAG_PARSING_USERDATA,me)}}_bufferInitSegment(e,t,n,r){if(this.state!==hn.PARSING||(t.video&&delete t.video,t.audiovideo&&delete t.audiovideo,!t.audio))return;const i=t.audio;i.id=te.AUDIO;const s=e.audioCodec;this.log(`Init audio buffer, container:${i.container}, codecs[level/parsed]=[${s}/${i.codec}]`),s&&s.split(",").length===1&&(i.levelCodec=s),this.hls.trigger(g.BUFFER_CODECS,t);const l=i.initSegment;if(l!=null&&l.byteLength){const d={type:"audio",frag:n,part:null,chunkMeta:r,parent:n.type,data:l};this.hls.trigger(g.BUFFER_APPENDING,d)}this.tickImmediate()}loadFragment(e,t,n){const r=this.fragmentTracker.getState(e);if(this.switchingTrack||r===un.NOT_LOADED||r===un.PARTIAL){var i;if(!Ke(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=hn.WAITING_INIT_PTS;const s=this.mainDetails;s&&s.fragmentStart!==t.details.fragmentStart&&zs(t.details,s)}else super.loadFragment(e,t,n)}else this.clearTrackerIfNeeded(e)}flushAudioIfNeeded(e){if(this.media&&this.bufferedTrack){const{name:t,lang:n,assocLang:r,characteristics:i,audioCodec:s,channels:l}=this.bufferedTrack;on({name:t,lang:n,assocLang:r,characteristics:i,audioCodec:s,channels:l},e,bn)||(On(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(g.AUDIO_TRACK_SWITCHED,T({},e))}}class Uo extends Z{constructor(e,t){super(t,e.logger),this.hls=void 0,this.canLoad=!1,this.timer=-1,this.hls=e}destroy(){this.clearTimer(),this.hls=this.log=this.warn=null}clearTimer(){this.timer!==-1&&(self.clearTimeout(this.timer),this.timer=-1)}startLoad(){this.canLoad=!0,this.loadPlaylist()}stopLoad(){this.canLoad=!1,this.clearTimer()}switchParams(e,t,n){const r=t==null?void 0:t.renditionReports;if(r){let i=-1;for(let s=0;s<r.length;s++){const l=r[s];let d;try{d=new self.URL(l.URI,t.url).href}catch(c){this.warn(`Could not construct new URL for Rendition Report: ${c}`),d=l.URI||""}if(d===e){i=s;break}else d===e.substring(0,d.length)&&(i=s)}if(i!==-1){const s=r[i],l=parseInt(s["LAST-MSN"])||t.lastPartSn;let d=parseInt(s["LAST-PART"])||t.lastPartIndex;if(this.hls.config.lowLatencyMode){const p=Math.min(t.age-t.partTarget,t.targetduration);d>=0&&p>t.partTarget&&(d+=1)}const c=n&&Jt(n);return new nn(l,d>=0?d: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(n){this.warn(`Could not construct new URL with HLS Delivery Directives: ${n}`)}return e}playlistLoaded(e,t,n){const{details:r,stats:i}=t,s=self.performance.now(),l=i.loading.first?Math.max(0,s-i.loading.first):0;r.advancedDateTime=Date.now()-l;const d=this.hls.config.timelineOffset;if(d!==r.appliedTimelineOffset){const p=Math.max(d||0,0);r.appliedTimelineOffset=p,r.fragments.forEach(b=>{b.setStart(b.playlistOffset+p)})}if(r.live||n!=null&&n.live){const p="levelInfo"in t?t.levelInfo:t.track;if(r.reloaded(n),n&&r.fragments.length>0){Ji(n,r,this);const We=r.playlistParsingError;if(We){this.warn(We);const et=this.hls;if(!et.config.ignorePlaylistParsingErrors){var c;const{networkDetails:xt}=t;et.trigger(g.ERROR,{type:fe.NETWORK_ERROR,details:z.LEVEL_PARSING_ERROR,fatal:!1,url:r.url,error:We,reason:We.message,level:t.level||void 0,parent:(c=r.fragments[0])==null?void 0:c.type,networkDetails:xt,stats:i});return}r.playlistParsingError=null}}r.requestScheduled===-1&&(r.requestScheduled=i.loading.start);const b=this.hls.mainForwardBufferInfo,I=b?b.end-b.len:0,F=(r.edge-I)*1e3,$=qr(r,F);if(r.requestScheduled+$<s?r.requestScheduled=s:r.requestScheduled+=$,this.log(`live playlist ${e} ${r.advanced?"REFRESHED "+r.lastPartSn+"-"+r.lastPartIndex:r.updated?"UPDATED":"MISSED"}`),!this.canLoad||!r.live)return;let ge,me,Fe;if(r.canBlockReload&&r.endSN&&r.advanced){const We=this.hls.config.lowLatencyMode,et=r.lastPartSn,xt=r.endSN,Ot=r.lastPartIndex,sn=Ot!==-1,Pt=et===xt;sn?Pt?(me=xt+1,Fe=We?0:Ot):(me=et,Fe=We?Ot+1:r.maxPartIndex):me=xt+1;const Xt=r.age,Yt=Xt+r.ageHeader;let Ft=Math.min(Yt-r.partTarget,r.targetduration*1.5);if(Ft>0){if(Yt>r.targetduration*3)this.log(`Playlist last advanced ${Xt.toFixed(2)}s ago. Omitting segment and part directives.`),me=void 0,Fe=void 0;else if(n!=null&&n.tuneInGoal&&Yt-r.partTarget>n.tuneInGoal)this.warn(`CDN Tune-in goal increased from: ${n.tuneInGoal} to: ${Ft} with playlist age: ${r.age}`),Ft=0;else{const xn=Math.floor(Ft/r.targetduration);if(me+=xn,Fe!==void 0){const nr=Math.round(Ft%r.targetduration/r.partTarget);Fe+=nr}this.log(`CDN Tune-in age: ${r.ageHeader}s last advanced ${Xt.toFixed(2)}s goal: ${Ft} skip sn ${xn} to part ${Fe}`)}r.tuneInGoal=Ft}if(ge=this.getDeliveryDirectives(r,t.deliveryDirectives,me,Fe),We||!Pt){r.requestScheduled=s,this.loadingPlaylist(p,ge);return}}else(r.canBlockReload||r.canSkipUntil)&&(ge=this.getDeliveryDirectives(r,t.deliveryDirectives,me,Fe));ge&&me!==void 0&&r.canBlockReload&&(r.requestScheduled=i.loading.first+Math.max($-l*2,$/2)),this.scheduleLoading(p,ge,r)}else this.clearTimer()}scheduleLoading(e,t,n){const r=n||e.details;if(!r){this.loadingPlaylist(e,t);return}const i=self.performance.now(),s=r.requestScheduled;if(i>=s){this.loadingPlaylist(e,t);return}const l=s-i;this.log(`reload live playlist ${e.name||e.bitrate+"bps"} in ${Math.round(l)} ms`),this.clearTimer(),this.timer=self.setTimeout(()=>this.loadingPlaylist(e,t),l)}getDeliveryDirectives(e,t,n,r){let i=Jt(e);return t!=null&&t.skip&&e.deltaUpdateFailed&&(n=t.msn,r=t.part,i=$t.No),new nn(n,r,i)}checkRetry(e){const t=e.details,n=Sn(e),r=e.errorAction,{action:i,retryCount:s=0,retryConfig:l}=r||{},d=!!r&&!!l&&(i===_n.RetryRequest||!r.resolved&&i===_n.SendAlternateToPenaltyBox);if(d){var c;if(s>=l.maxNumRetry)return!1;if(n&&(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=Kn(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,r.resolved=!0}return d}}function bl(a,e){if(a.length!==e.length)return!1;for(let t=0;t<a.length;t++)if(!$a(a[t].attrs,e[t].attrs))return!1;return!0}function $a(a,e,t){const n=a["STABLE-RENDITION-ID"];return n&&!t?n===e["STABLE-RENDITION-ID"]:!(t||["LANGUAGE","NAME","CHARACTERISTICS","AUTOSELECT","DEFAULT","FORCED","ASSOC-LANGUAGE"]).some(r=>a[r]!==e[r])}function zo(a,e){return e.label.toLowerCase()===a.name.toLowerCase()&&(!e.language||e.language.toLowerCase()===(a.lang||"").toLowerCase())}class Au extends Uo{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(g.MANIFEST_LOADING,this.onManifestLoading,this),e.on(g.MANIFEST_PARSED,this.onManifestParsed,this),e.on(g.LEVEL_LOADING,this.onLevelLoading,this),e.on(g.LEVEL_SWITCHING,this.onLevelSwitching,this),e.on(g.AUDIO_TRACK_LOADED,this.onAudioTrackLoaded,this),e.on(g.ERROR,this.onError,this)}unregisterListeners(){const{hls:e}=this;e.off(g.MANIFEST_LOADING,this.onManifestLoading,this),e.off(g.MANIFEST_PARSED,this.onManifestParsed,this),e.off(g.LEVEL_LOADING,this.onLevelLoading,this),e.off(g.LEVEL_SWITCHING,this.onLevelSwitching,this),e.off(g.AUDIO_TRACK_LOADED,this.onAudioTrackLoaded,this),e.off(g.ERROR,this.onError,this)}destroy(){this.unregisterListeners(),this.tracks.length=0,this.tracksInGroup.length=0,this.currentTrack=null,super.destroy()}onManifestLoading(){this.tracks=[],this.tracksInGroup=[],this.groupIds=null,this.currentTrack=null,this.trackId=-1,this.selectDefaultTrack=!0}onManifestParsed(e,t){this.tracks=t.audioTracks||[]}onAudioTrackLoaded(e,t){const{id:n,groupId:r,details:i}=t,s=this.tracksInGroup[n];if(!s||s.groupId!==r){this.warn(`Audio track with id:${n} and group:${r} not found in active group ${s==null?void 0:s.groupId}`);return}const l=s.details;s.details=t.details,this.log(`Audio track ${n} "${s.name}" lang:${s.lang} group:${r} loaded [${i.startSN}-${i.endSN}]`),n===this.trackId&&this.playlistLoaded(n,t,l)}onLevelLoading(e,t){this.switchLevel(t.level)}onLevelSwitching(e,t){this.switchLevel(t.level)}switchLevel(e){const t=this.hls.levels[e];if(!t)return;const n=t.audioGroups||null,r=this.groupIds;let i=this.currentTrack;if(!n||(r==null?void 0:r.length)!==(n==null?void 0:n.length)||n!=null&&n.some(l=>(r==null?void 0:r.indexOf(l))===-1)){this.groupIds=n,this.trackId=-1,this.currentTrack=null;const l=this.tracks.filter(I=>!n||n.indexOf(I.groupId)!==-1);if(l.length)this.selectDefaultTrack&&!l.some(I=>I.default)&&(this.selectDefaultTrack=!1),l.forEach((I,F)=>{I.id=F});else if(!i&&!this.tracksInGroup.length)return;this.tracksInGroup=l;const d=this.hls.config.audioPreference;if(!i&&d){const I=Kt(d,l,bn);if(I>-1)i=l[I];else{const F=Kt(d,this.tracks);i=this.tracks[F]}}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): ${n==null?void 0:n.join(",")}`),this.hls.trigger(g.AUDIO_TRACKS_UPDATED,p);const b=this.trackId;if(c!==-1&&b===-1)this.setAudioTrack(c);else if(l.length&&b===-1){var s;const I=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(I.message),this.hls.trigger(g.ERROR,{type:fe.MEDIA_ERROR,details:z.AUDIO_TRACK_LOAD_ERROR,fatal:!0,error:I})}}}onError(e,t){t.fatal||!t.context||t.context.type===q.AUDIO_TRACK&&t.context.id===this.trackId&&(!this.groupIds||this.groupIds.indexOf(t.context.groupId)!==-1)&&this.checkRetry(t)}get allAudioTracks(){return this.tracks}get audioTracks(){return this.tracksInGroup}get audioTrack(){return this.trackId}set audioTrack(e){this.selectDefaultTrack=!1,this.setAudioTrack(e)}setAudioOption(e){const t=this.hls;if(t.config.audioPreference=e,e){const n=this.allAudioTracks;if(this.selectDefaultTrack=!1,n.length){const r=this.currentTrack;if(r&&on(e,r,bn))return r;const i=Kt(e,this.tracksInGroup,bn);if(i>-1){const s=this.tracksInGroup[i];return this.setAudioTrack(i),s}else if(r){let s=t.loadLevel;s===-1&&(s=t.firstAutoLevel);const l=fn(e,t.levels,n,s,bn);if(l===-1)return null;t.nextLoadLevel=l}if(e.channels||e.audioCodec){const s=Kt(e,n);if(s>-1)return n[s]}}}return null}setAudioTrack(e){const t=this.tracksInGroup;if(e<0||e>=t.length){this.warn(`Invalid audio track id: ${e}`);return}this.selectDefaultTrack=!1;const n=this.currentTrack,r=t[e],i=r.details&&!r.details.live;if(e===this.trackId&&r===n&&i||(this.log(`Switching to audio-track ${e} "${r.name}" lang:${r.lang} group:${r.groupId} channels:${r.channels}`),this.trackId=e,this.currentTrack=r,this.hls.trigger(g.AUDIO_TRACK_SWITCHING,T({},r)),i))return;const s=this.switchParams(r.url,n==null?void 0:n.details,r.details);this.loadPlaylist(s)}findTrackId(e){const t=this.tracksInGroup;for(let n=0;n<t.length;n++){const r=t[n];if(!(this.selectDefaultTrack&&!r.default)&&(!e||on(e,r,bn)))return n}if(e){const{name:n,lang:r,assocLang:i,characteristics:s,audioCodec:l,channels:d}=e;for(let c=0;c<t.length;c++){const p=t[c];if(on({name:n,lang:r,assocLang:i,characteristics:s,audioCodec:l,channels:d},p,bn))return c}for(let c=0;c<t.length;c++){const p=t[c];if($a(e.attrs,p.attrs,["LANGUAGE","ASSOC-LANGUAGE","CHARACTERISTICS"]))return c}for(let c=0;c<t.length;c++){const p=t[c];if($a(e.attrs,p.attrs,["LANGUAGE"]))return c}}return-1}loadPlaylist(e){super.loadPlaylist();const t=this.currentTrack;this.shouldLoadPlaylist(t)&&On(t.url,this.hls)&&this.scheduleLoading(t,e)}loadingPlaylist(e,t){super.loadingPlaylist(e,t);const n=e.id,r=e.groupId,i=this.getUrlWithDirectives(e.url,t),s=e.details,l=s==null?void 0:s.age;this.log(`Loading audio-track ${n} "${e.name}" lang:${e.lang} group:${r}${(t==null?void 0:t.msn)!==void 0?" at sn "+t.msn+" part "+t.part:""}${l&&s.live?" age "+l.toFixed(1)+(s.type?" "+s.type||0:""):""} ${i}`),this.hls.trigger(g.AUDIO_TRACK_LOADING,{url:i,id:n,groupId:r,deliveryDirectives:t||null,track:e})}}class Du{constructor(e){this.tracks=void 0,this.queues={video:[],audio:[],audiovideo:[]},this.tracks=e}destroy(){this.tracks=this.queues=null}append(e,t,n){if(this.queues===null||this.tracks===null)return;const r=this.queues[t];r.push(e),r.length===1&&!n&&this.executeNext(t)}appendBlocker(e){return new Promise(t=>{const n={label:"async-blocker",execute:t,onStart:()=>{},onComplete:()=>{},onError:()=>{}};this.append(n,e)})}prependBlocker(e){return new Promise(t=>{if(this.queues){const n={label:"async-blocker-prepend",execute:t,onStart:()=>{},onComplete:()=>{},onError:()=>{}};this.queues[e].unshift(n)}})}removeBlockers(){this.queues!==null&&[this.queues.video,this.queues.audio,this.queues.audiovideo].forEach(e=>{var t;const n=(t=e[0])==null?void 0:t.label;(n==="async-blocker"||n==="async-blocker-prepend")&&(e[0].execute(),e.splice(0,1))})}unblockAudio(e){if(this.queues===null)return;this.queues.audio[0]===e&&this.shiftAndExecuteNext("audio")}executeNext(e){if(this.queues===null||this.tracks===null)return;const t=this.queues[e];if(t.length){const r=t[0];try{r.execute()}catch(i){var n;if(r.onError(i),this.queues===null||this.tracks===null)return;const s=(n=this.tracks[e])==null?void 0:n.buffer;s!=null&&s.updating||this.shiftAndExecuteNext(e)}}}shiftAndExecuteNext(e){this.queues!==null&&(this.queues[e].shift(),this.executeNext(e))}current(e){var t;return((t=this.queues)==null?void 0:t[e][0])||null}toString(){const{queues:e,tracks:t}=this;return e===null||t===null?"<destroyed>":`
|
|
|
${this.list("video")}
|
|
|
${this.list("audio")}
|
|
|
${this.list("audiovideo")}}`}list(e){var t,n;return(t=this.queues)!=null&&t[e]||(n=this.tracks)!=null&&n[e]?`${e}: (${this.listSbInfo(e)}) ${this.listOps(e)}`:""}listSbInfo(e){var t;const n=(t=this.tracks)==null?void 0:t[e],r=n==null?void 0:n.buffer;return r?`SourceBuffer${r.updating?" updating":""}${n.ended?" ended":""}${n.ending?" ending":""}`:"none"}listOps(e){var t;return((t=this.queues)==null?void 0:t[e].map(n=>n.label).join(", "))||""}}const _l=/(avc[1234]|hvc1|hev1|dvh[1e]|vp09|av01)(?:\.[^.,]+)+/,xl="HlsJsTrackRemovedError";class Iu extends Error{constructor(e){super(e),this.name=xl}}class Ru extends Z{constructor(e,t){super("buffer-controller",e.logger),this.hls=void 0,this.fragmentTracker=void 0,this.details=null,this._objectUrl=null,this.operationQueue=null,this.bufferCodecEventsTotal=0,this.media=null,this.mediaSource=null,this.lastMpegAudioChunk=null,this.blockedAudioAppend=null,this.lastVideoAppendEnd=0,this.appendSource=void 0,this.transferData=void 0,this.overrides=void 0,this.appendErrors={audio:0,video:0,audiovideo:0},this.tracks={},this.sourceBuffers=[[null,null],[null,null]],this._onEndStreaming=n=>{var r;this.hls&&((r=this.mediaSource)==null?void 0:r.readyState)==="open"&&this.hls.pauseBuffering()},this._onStartStreaming=n=>{this.hls&&this.hls.resumeBuffering()},this._onMediaSourceOpen=n=>{const{media:r,mediaSource:i}=this;n&&this.log("Media source opened"),!(!r||!i)&&(i.removeEventListener("sourceopen",this._onMediaSourceOpen),r.removeEventListener("emptied",this._onMediaEmptied),this.updateDuration(),this.hls.trigger(g.MEDIA_ATTACHED,{media:r,mediaSource:i}),this.mediaSource!==null&&this.checkPendingTracks())},this._onMediaSourceClose=()=>{this.log("Media source closed")},this._onMediaSourceEnded=()=>{this.log("Media source ended")},this._onMediaEmptied=()=>{const{mediaSrc:n,_objectUrl:r}=this;n!==r&&this.error(`Media element src was set while attaching MediaSource (${r} > ${n})`)},this.hls=e,this.fragmentTracker=t,this.appendSource=Me(Ee(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(g.MEDIA_ATTACHING,this.onMediaAttaching,this),e.on(g.MEDIA_DETACHING,this.onMediaDetaching,this),e.on(g.MANIFEST_LOADING,this.onManifestLoading,this),e.on(g.MANIFEST_PARSED,this.onManifestParsed,this),e.on(g.BUFFER_RESET,this.onBufferReset,this),e.on(g.BUFFER_APPENDING,this.onBufferAppending,this),e.on(g.BUFFER_CODECS,this.onBufferCodecs,this),e.on(g.BUFFER_EOS,this.onBufferEos,this),e.on(g.BUFFER_FLUSHING,this.onBufferFlushing,this),e.on(g.LEVEL_UPDATED,this.onLevelUpdated,this),e.on(g.FRAG_PARSED,this.onFragParsed,this),e.on(g.FRAG_CHANGED,this.onFragChanged,this),e.on(g.ERROR,this.onError,this)}unregisterListeners(){const{hls:e}=this;e.off(g.MEDIA_ATTACHING,this.onMediaAttaching,this),e.off(g.MEDIA_DETACHING,this.onMediaDetaching,this),e.off(g.MANIFEST_LOADING,this.onManifestLoading,this),e.off(g.MANIFEST_PARSED,this.onManifestParsed,this),e.off(g.BUFFER_RESET,this.onBufferReset,this),e.off(g.BUFFER_APPENDING,this.onBufferAppending,this),e.off(g.BUFFER_CODECS,this.onBufferCodecs,this),e.off(g.BUFFER_EOS,this.onBufferEos,this),e.off(g.BUFFER_FLUSHING,this.onBufferFlushing,this),e.off(g.LEVEL_UPDATED,this.onLevelUpdated,this),e.off(g.FRAG_PARSED,this.onFragParsed,this),e.off(g.FRAG_CHANGED,this.onFragChanged,this),e.off(g.ERROR,this.onError,this)}transferMedia(){const{media:e,mediaSource:t}=this;if(!e)return null;const n={};if(this.operationQueue){const i=this.isUpdating();i||this.operationQueue.removeBlockers();const s=this.isQueued();(i||s)&&this.warn(`Transfering MediaSource with${s?" operations in queue":""}${i?" updating SourceBuffer(s)":""} ${this.operationQueue}`),this.operationQueue.destroy()}const r=this.transferData;return!this.sourceBufferCount&&r&&r.mediaSource===t?y(n,r.tracks):this.sourceBuffers.forEach(i=>{const[s]=i;s&&(n[s]=y({},this.tracks[s]),this.removeBuffer(s)),i[0]=i[1]=null}),{media:e,mediaSource:t,tracks:n}}initTracks(){const e={};this.sourceBuffers=[[null,null],[null,null]],this.tracks=e,this.resetQueue(),this.resetAppendErrors(),this.lastMpegAudioChunk=this.blockedAudioAppend=null,this.lastVideoAppendEnd=0}onManifestLoading(){this.bufferCodecEventsTotal=0,this.details=null}onManifestParsed(e,t){var n;let r=2;(t.audio&&!t.video||!t.altAudio)&&(r=1),this.bufferCodecEventsTotal=r,this.log(`${r} bufferCodec event(s) expected.`),(n=this.transferData)!=null&&n.mediaSource&&this.sourceBufferCount&&r&&this.bufferCreated()}onMediaAttaching(e,t){const n=this.media=t.media;this.transferData=this.overrides=void 0;const r=Ee(this.appendSource);if(r){const i=!!t.mediaSource;(i||t.overrides)&&(this.transferData=t,this.overrides=t.overrides);const s=this.mediaSource=t.mediaSource||new r;if(this.assignMediaSource(s),i)this._objectUrl=n.src,this.attachTransferred();else{const l=this._objectUrl=self.URL.createObjectURL(s);if(this.appendSource)try{n.removeAttribute("src");const d=self.ManagedMediaSource;n.disableRemotePlayback=n.disableRemotePlayback||d&&s instanceof d,El(n),Lu(n,l),n.load()}catch(d){n.src=l}else n.src=l}n.addEventListener("emptied",this._onMediaEmptied)}}assignMediaSource(e){var t,n;this.log(`${((t=this.transferData)==null?void 0:t.mediaSource)===e?"transferred":"created"} media source: ${(n=e.constructor)==null?void 0:n.name}`),e.addEventListener("sourceopen",this._onMediaSourceOpen),e.addEventListener("sourceended",this._onMediaSourceEnded),e.addEventListener("sourceclose",this._onMediaSourceClose),this.appendSource&&(e.addEventListener("startstreaming",this._onStartStreaming),e.addEventListener("endstreaming",this._onEndStreaming))}attachTransferred(){const e=this.media,t=this.transferData;if(!t||!e)return;const n=this.tracks,r=t.tracks,i=r?Object.keys(r):null,s=i?i.length:0,l=()=>{Promise.resolve().then(()=>{this.media&&this.mediaSourceOpenOrEnded&&this._onMediaSourceOpen()})};if(r&&i&&s){if(!this.tracksReady){this.hls.config.startFragPrefetch=!0,this.log("attachTransferred: waiting for SourceBuffer track info");return}if(this.log(`attachTransferred: (bufferCodecEventsTotal ${this.bufferCodecEventsTotal})
|
|
|
required tracks: ${vt(n,(d,c)=>d==="initSegment"?void 0:c)};
|
|
|
transfer tracks: ${vt(r,(d,c)=>d==="initSegment"?void 0:c)}}`),!ke(r,n)){t.mediaSource=null,t.tracks=void 0;const d=e.currentTime,c=this.details,p=Math.max(d,(c==null?void 0:c.fragments[0].start)||0);if(p-d>1){this.log(`attachTransferred: waiting for playback to reach new tracks start time ${d} -> ${p}`);return}this.warn(`attachTransferred: resetting MediaSource for incompatible tracks ("${Object.keys(r)}"->"${Object.keys(n)}") start time: ${p} currentTime: ${d}`),this.onMediaDetaching(g.MEDIA_DETACHING,{}),this.onMediaAttaching(g.MEDIA_ATTACHING,t),e.currentTime=p;return}this.transferData=void 0,i.forEach(d=>{const c=d,p=r[c];if(p){const b=p.buffer;if(b){const I=this.fragmentTracker,F=p.id;if(I.hasFragments(F)||I.hasParts(F)){const me=Jn.getBuffered(b);I.detectEvictedFragments(c,me,F,null,!0)}const $=Ko(c),ge=[c,b];this.sourceBuffers[$]=ge,b.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 n=!!t.transferMedia;this.transferData=this.overrides=void 0;const{media:r,mediaSource:i,_objectUrl:s}=this;if(i){if(this.log(`media source ${n?"transferring":"detaching"}`),n)this.sourceBuffers.forEach(([l])=>{l&&this.removeBuffer(l)}),this.resetQueue();else{if(this.mediaSourceOpenOrEnded){const l=i.readyState==="open";try{const d=i.sourceBuffers;for(let c=d.length;c--;)l&&d[c].abort(),i.removeSourceBuffer(d[c]);l&&i.endOfStream()}catch(d){this.warn(`onMediaDetaching: ${d.message} while calling endOfStream`)}}this.sourceBufferCount&&this.onBufferReset()}i.removeEventListener("sourceopen",this._onMediaSourceOpen),i.removeEventListener("sourceended",this._onMediaSourceEnded),i.removeEventListener("sourceclose",this._onMediaSourceClose),this.appendSource&&(i.removeEventListener("startstreaming",this._onStartStreaming),i.removeEventListener("endstreaming",this._onEndStreaming)),this.mediaSource=null,this._objectUrl=null}r&&(r.removeEventListener("emptied",this._onMediaEmptied),n||(s&&self.URL.revokeObjectURL(s),this.mediaSrc===s?(r.removeAttribute("src"),this.appendSource&&El(r),r.load()):this.warn("media|source.src was changed by a third party - skip cleanup")),this.media=null),this.hls.trigger(g.MEDIA_DETACHED,t)}onBufferReset(){this.sourceBuffers.forEach(([e])=>{e&&this.resetBuffer(e)}),this.initTracks()}resetBuffer(e){var t;const n=(t=this.tracks[e])==null?void 0:t.buffer;if(this.removeBuffer(e),n)try{var r;(r=this.mediaSource)!=null&&r.sourceBuffers.length&&this.mediaSource.removeSourceBuffer(n)}catch(i){this.warn(`onBufferReset ${e}`,i)}delete this.tracks[e]}removeBuffer(e){this.removeBufferListeners(e),this.sourceBuffers[Ko(e)]=[null,null];const t=this.tracks[e];t&&(t.buffer=void 0)}resetQueue(){this.operationQueue&&this.operationQueue.destroy(),this.operationQueue=new Du(this.tracks)}onBufferCodecs(e,t){var n;const r=this.tracks,i=Object.keys(t);this.log(`BUFFER_CODECS: "${i}" (current SB count ${this.sourceBufferCount})`);const s="audiovideo"in t&&(r.audio||r.video)||r.audiovideo&&("audio"in t||"video"in t),l=!s&&this.sourceBufferCount&&this.media&&i.some(d=>!r[d]);if(s||l){this.warn(`Unsupported transition between "${Object.keys(r)}" and "${i}" SourceBuffers`);return}i.forEach(d=>{var c,p;const b=t[d],{id:I,codec:F,levelCodec:$,container:ge,metadata:me,supplemental:Fe}=b;let We=r[d];const et=(c=this.transferData)==null||(c=c.tracks)==null?void 0:c[d],xt=et!=null&&et.buffer?et:We,Ot=(xt==null?void 0:xt.pendingCodec)||(xt==null?void 0:xt.codec),sn=xt==null?void 0:xt.levelCodec;We||(We=r[d]={buffer:void 0,listeners:[],codec:F,supplemental:Fe,container:ge,levelCodec:$,metadata:me,id:I});const Pt=en(Ot,sn),Xt=Pt==null?void 0:Pt.replace(_l,"$1");let Yt=en(F,$);const Ft=(p=Yt)==null?void 0:p.replace(_l,"$1");Yt&&Pt&&Xt!==Ft&&(d.slice(0,5)==="audio"&&(Yt=xe(Yt,this.appendSource)),this.log(`switching codec ${Ot} to ${Yt}`),Yt!==(We.pendingCodec||We.codec)&&(We.pendingCodec=Yt),We.container=ge,this.appendChangeType(d,ge,Yt))}),(this.tracksReady||this.sourceBufferCount)&&(t.tracks=this.sourceBufferTracks),!this.sourceBufferCount&&(this.bufferCodecEventsTotal>1&&!this.tracks.video&&!t.video&&((n=t.audio)==null?void 0:n.id)==="main"&&(this.log("Main audio-only"),this.bufferCodecEventsTotal=1),this.mediaSourceOpenOrEnded&&this.checkPendingTracks())}get sourceBufferTracks(){return Object.keys(this.tracks).reduce((e,t)=>{const n=this.tracks[t];return e[t]={id:n.id,container:n.container,codec:n.codec,levelCodec:n.levelCodec},e},{})}appendChangeType(e,t,n){const r=`${t};codecs=${n}`,i={label:`change-type=${r}`,execute:()=>{const s=this.tracks[e];if(s){const l=s.buffer;l!=null&&l.changeType&&(this.log(`changing ${e} sourceBuffer type to ${r}`),l.changeType(r),s.codec=n,s.container=t)}this.shiftAndExecuteNext(e)},onStart:()=>{},onComplete:()=>{},onError:s=>{this.warn(`Failed to change ${e} SourceBuffer type`,s)}};this.append(i,e,this.isPending(this.tracks[e]))}blockAudio(e){var t;const n=e.start,r=n+e.duration*.05;if(((t=this.fragmentTracker.getAppendedFrag(n,te.MAIN))==null?void 0:t.gap)===!0)return;const s={label:"block-audio",execute:()=>{var l;const d=this.tracks.video;(this.lastVideoAppendEnd>r||d!=null&&d.buffer&&Jn.isBuffered(d.buffer,r)||((l=this.fragmentTracker.getAppendedFrag(r,te.MAIN))==null?void 0:l.gap)===!0)&&(this.blockedAudioAppend=null,this.shiftAndExecuteNext("audio"))},onStart:()=>{},onComplete:()=>{},onError:l=>{this.warn("Error executing block-audio operation",l)}};this.blockedAudioAppend={op:s,frag:e},this.append(s,"audio",!0)}unblockAudio(){const{blockedAudioAppend:e,operationQueue:t}=this;e&&t&&(this.blockedAudioAppend=null,t.unblockAudio(e.op))}onBufferAppending(e,t){const{tracks:n}=this,{data:r,type:i,parent:s,frag:l,part:d,chunkMeta:c,offset:p}=t,b=c.buffering[i],{sn:I,cc:F}=l,$=self.performance.now();b.start=$;const ge=l.stats.buffering,me=d?d.stats.buffering:null;ge.start===0&&(ge.start=$),me&&me.start===0&&(me.start=$);const Fe=n.audio;let We=!1;i==="audio"&&(Fe==null?void 0:Fe.container)==="audio/mpeg"&&(We=!this.lastMpegAudioChunk||c.id===1||this.lastMpegAudioChunk.sn!==c.sn,this.lastMpegAudioChunk=c);const et=n.video,xt=et==null?void 0:et.buffer;if(xt&&I!=="initSegment"){const Pt=d||l,Xt=this.blockedAudioAppend;if(i==="audio"&&s!=="main"&&!this.blockedAudioAppend&&!(et.ending||et.ended)){const Ft=Pt.start+Pt.duration*.05,xn=xt.buffered,nr=this.currentOp("video");!xn.length&&!nr?this.blockAudio(Pt):!nr&&!Jn.isBuffered(xt,Ft)&&this.lastVideoAppendEnd<Ft&&this.blockAudio(Pt)}else if(i==="video"){const Yt=Pt.end;if(Xt){const Ft=Xt.frag.start;(Yt>Ft||Yt<this.lastVideoAppendEnd||Jn.isBuffered(xt,Ft))&&this.unblockAudio()}this.lastVideoAppendEnd=Yt}}const Ot=(d||l).start,sn={label:`append-${i}`,execute:()=>{var Pt;b.executeStart=self.performance.now();const Xt=(Pt=this.tracks[i])==null?void 0:Pt.buffer;Xt&&(We?this.updateTimestampOffset(Xt,Ot,.1,i,I,F):p!==void 0&&v(p)&&this.updateTimestampOffset(Xt,p,1e-6,i,I,F)),this.appendExecutor(r,i)},onStart:()=>{},onComplete:()=>{const Pt=self.performance.now();b.executeEnd=b.end=Pt,ge.first===0&&(ge.first=Pt),me&&me.first===0&&(me.first=Pt);const Xt={};this.sourceBuffers.forEach(([Yt,Ft])=>{Yt&&(Xt[Yt]=Jn.getBuffered(Ft))}),this.appendErrors[i]=0,i==="audio"||i==="video"?this.appendErrors.audiovideo=0:(this.appendErrors.audio=0,this.appendErrors.video=0),this.hls.trigger(g.BUFFER_APPENDED,{type:i,frag:l,part:d,chunkMeta:c,parent:l.type,timeRanges:Xt})},onError:Pt=>{var Xt;const Yt={type:fe.MEDIA_ERROR,parent:l.type,details:z.BUFFER_APPEND_ERROR,sourceBufferName:i,frag:l,part:d,chunkMeta:c,error:Pt,err:Pt,fatal:!1},Ft=(Xt=this.media)==null?void 0:Xt.error;if(Pt.code===DOMException.QUOTA_EXCEEDED_ERR||Pt.name=="QuotaExceededError"||"quota"in Pt)Yt.details=z.BUFFER_FULL_ERROR;else if(Pt.code===DOMException.INVALID_STATE_ERR&&this.mediaSourceOpenOrEnded&&!Ft)Yt.errorAction=Vt(!0);else if(Pt.name===xl&&this.sourceBufferCount===0)Yt.errorAction=Vt(!0);else{const xn=++this.appendErrors[i];this.warn(`Failed ${xn}/${this.hls.config.appendErrorMaxRetry} times to append segment in "${i}" sourceBuffer (${Ft||"no media error"})`),(xn>=this.hls.config.appendErrorMaxRetry||Ft)&&(Yt.fatal=!0)}this.hls.trigger(g.ERROR,Yt)}};this.log(`queuing "${i}" append sn: ${I}${d?" p: "+d.index:""} of ${l.type===te.MAIN?"level":"track"} ${l.level} cc: ${F}`),this.append(sn,i,this.isPending(this.tracks[i]))}getFlushOp(e,t,n){return this.log(`queuing "${e}" remove ${t}-${n}`),{label:"remove",execute:()=>{this.removeExecutor(e,t,n)},onStart:()=>{},onComplete:()=>{this.hls.trigger(g.BUFFER_FLUSHED,{type:e})},onError:r=>{this.warn(`Failed to remove ${t}-${n} from "${e}" SourceBuffer`,r)}}}onBufferFlushing(e,t){const{type:n,startOffset:r,endOffset:i}=t;n?this.append(this.getFlushOp(n,r,i),n):this.sourceBuffers.forEach(([s])=>{s&&this.append(this.getFlushOp(s,r,i),s)})}onFragParsed(e,t){const{frag:n,part:r}=t,i=[],s=r?r.elementaryStreams:n.elementaryStreams;s[H.AUDIOVIDEO]?i.push("audiovideo"):(s[H.AUDIO]&&i.push("audio"),s[H.VIDEO]&&i.push("video"));const l=()=>{const d=self.performance.now();n.stats.buffering.end=d,r&&(r.stats.buffering.end=d);const c=r?r.stats:n.stats;this.hls.trigger(g.FRAG_BUFFERED,{frag:n,part:r,stats:c,id:n.type})};i.length===0&&this.warn(`Fragments must have at least one ElementaryStreamType set. type: ${n.type} level: ${n.level} sn: ${n.sn}`),this.blockBuffers(l,i).catch(d=>{this.warn(`Fragment buffered callback ${d}`),this.stepOperationQueue(this.sourceBufferTypes)})}onFragChanged(e,t){this.trimBuffers()}get bufferedToEnd(){return this.sourceBufferCount>0&&!this.sourceBuffers.some(([e])=>{if(e){const t=this.tracks[e];if(t)return!t.ended||t.ending}return!1})}onBufferEos(e,t){var n;this.sourceBuffers.forEach(([s])=>{if(s){const l=this.tracks[s];(!t.type||t.type===s)&&(l.ending=!0,l.ended||(l.ended=!0,this.log(`${s} buffer reached EOS`)))}});const r=((n=this.overrides)==null?void 0:n.endOfStream)!==!1;this.sourceBufferCount>0&&!this.sourceBuffers.some(([s])=>{var l;return s&&!((l=this.tracks[s])!=null&&l.ended)})?r?(this.log("Queueing EOS"),this.blockUntilOpen(()=>{this.tracksEnded();const{mediaSource:s}=this;if(!s||s.readyState!=="open"){s&&this.log(`Could not call mediaSource.endOfStream(). mediaSource.readyState: ${s.readyState}`);return}this.log("Calling mediaSource.endOfStream()"),s.endOfStream(),this.hls.trigger(g.BUFFERED_TO_END,void 0)})):(this.tracksEnded(),this.hls.trigger(g.BUFFERED_TO_END,void 0)):t.type==="video"&&this.unblockAudio()}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(){this.blockUntilOpen(()=>{const e=this.getDurationAndRange();e&&this.updateMediaSource(e)})}onError(e,t){if(t.details===z.BUFFER_APPEND_ERROR&&t.frag){var n;const r=(n=t.errorAction)==null?void 0:n.nextAutoLevel;v(r)&&r!==t.frag.level&&this.resetAppendErrors()}}resetAppendErrors(){this.appendErrors={audio:0,video:0,audiovideo:0}}trimBuffers(){const{hls:e,details:t,media:n}=this;if(!n||t===null||!this.sourceBufferCount)return;const r=e.config,i=n.currentTime,s=t.levelTargetDuration,l=t.live&&r.liveBackBufferLength!==null?r.liveBackBufferLength:r.backBufferLength;if(v(l)&&l>=0){const c=Math.max(l,s),p=Math.floor(i/s)*s-c;this.flushBackBuffer(i,s,p)}const d=r.frontBufferFlushThreshold;if(v(d)&&d>0){const c=Math.max(r.maxBufferLength,d),p=Math.max(c,s),b=Math.floor(i/s)*s+p;this.flushFrontBuffer(i,s,b)}}flushBackBuffer(e,t,n){this.sourceBuffers.forEach(([r,i])=>{if(i){const l=Jn.getBuffered(i);if(l.length>0&&n>l.start(0)){var s;this.hls.trigger(g.BACK_BUFFER_REACHED,{bufferEnd:n});const d=this.tracks[r];if((s=this.details)!=null&&s.live)this.hls.trigger(g.LIVE_BACK_BUFFER_REACHED,{bufferEnd:n});else if(d!=null&&d.ended){this.log(`Cannot flush ${r} back buffer while SourceBuffer is in ended state`);return}this.hls.trigger(g.BUFFER_FLUSHING,{startOffset:0,endOffset:n,type:r})}}})}flushFrontBuffer(e,t,n){this.sourceBuffers.forEach(([r,i])=>{if(i){const s=Jn.getBuffered(i),l=s.length;if(l<2)return;const d=s.start(l-1),c=s.end(l-1);if(n>d||e>=d&&e<=c)return;this.hls.trigger(g.BUFFER_FLUSHING,{startOffset:d,endOffset:1/0,type:r})}})}getDurationAndRange(){var e;const{details:t,mediaSource:n}=this;if(!t||!this.media||(n==null?void 0:n.readyState)!=="open")return null;const r=t.edge;if(t.live&&this.hls.config.liveDurationInfinity){if(t.fragments.length&&n.setLiveSeekableRange){const c=Math.max(0,t.fragmentStart),p=Math.max(c,r);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 v(i)?{duration:i}:null;const s=this.media.duration,l=v(n.duration)?n.duration:0;return r>l&&r>s||!v(s)?{duration:r}:null}updateMediaSource({duration:e,start:t,end:n}){const r=this.mediaSource;!this.media||!r||r.readyState!=="open"||(r.duration!==e&&(v(e)&&this.log(`Updating MediaSource duration to ${e.toFixed(3)}`),r.duration=e),t!==void 0&&n!==void 0&&(this.log(`MediaSource duration is set to ${r.duration}. Setting seekable range to ${t}-${n}.`),r.setLiveSeekableRange(t,n)))}get tracksReady(){const e=this.pendingTrackCount;return e>0&&(e>=this.bufferCodecEventsTotal||this.isPending(this.tracks.audiovideo))}checkPendingTracks(){const{bufferCodecEventsTotal:e,pendingTrackCount:t,tracks:n}=this;if(this.log(`checkPendingTracks (pending: ${t} codec events expected: ${e}) ${vt(n)}`),this.tracksReady){var r;const i=(r=this.transferData)==null?void 0:r.tracks;i&&Object.keys(i).length?this.attachTransferred():this.createSourceBuffers()}}bufferCreated(){if(this.sourceBufferCount){const e={};this.sourceBuffers.forEach(([t,n])=>{if(t){const r=this.tracks[t];e[t]={buffer:n,container:r.container,codec:r.codec,supplemental:r.supplemental,levelCodec:r.levelCodec,id:r.id,metadata:r.metadata}}}),this.hls.trigger(g.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(g.ERROR,{type:fe.MEDIA_ERROR,details:z.BUFFER_INCOMPATIBLE_CODECS_ERROR,fatal:!0,error:e,reason:e.message})}}createSourceBuffers(){const{tracks:e,sourceBuffers:t,mediaSource:n}=this;if(!n)throw new Error("createSourceBuffers called when mediaSource was null");for(const i in e){const s=i,l=e[s];if(this.isPending(l)){const d=this.getTrackCodec(l,s),c=`${l.container};codecs=${d}`;l.codec=d,this.log(`creating sourceBuffer(${c})${this.currentOp(s)?" Queued":""} ${vt(l)}`);try{const p=n.addSourceBuffer(c),b=Ko(s),I=[s,p];t[b]=I,l.buffer=p}catch(p){var r;this.error(`error while trying to add sourceBuffer: ${p.message}`),this.shiftAndExecuteNext(s),(r=this.operationQueue)==null||r.removeBlockers(),delete this.tracks[s],this.hls.trigger(g.ERROR,{type:fe.MEDIA_ERROR,details:z.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 n=e.supplemental;let r=e.codec;n&&(t==="video"||t==="audiovideo")&&Qe(n,"video")&&(r=Bt(r,n));const i=en(r,e.levelCodec);return i?t.slice(0,5)==="audio"?xe(i,this.appendSource):i:""}trackSourceBuffer(e,t){const n=t.buffer;if(!n)return;const r=this.getTrackCodec(t,e);this.tracks[e]={buffer:n,codec:r,container:t.container,levelCodec:t.levelCodec,supplemental:t.supplemental,metadata:t.metadata,id:t.id,listeners:[]},this.removeBufferListeners(e),this.addBufferListener(e,"updatestart",this.onSBUpdateStart),this.addBufferListener(e,"updateend",this.onSBUpdateEnd),this.addBufferListener(e,"error",this.onSBUpdateError),this.appendSource&&this.addBufferListener(e,"bufferedchange",(i,s)=>{const l=s.removedRanges;l!=null&&l.length&&this.hls.trigger(g.BUFFER_FLUSHED,{type:i})})}get mediaSrc(){var e,t;const n=((e=this.media)==null||(t=e.querySelector)==null?void 0:t.call(e,"source"))||this.media;return n==null?void 0:n.src}onSBUpdateStart(e){const t=this.currentOp(e);t&&t.onStart()}onSBUpdateEnd(e){var t;if(((t=this.mediaSource)==null?void 0:t.readyState)==="closed"){this.resetBuffer(e);return}const n=this.currentOp(e);n&&(n.onComplete(),this.shiftAndExecuteNext(e))}onSBUpdateError(e,t){var n;const r=new Error(`${e} SourceBuffer error. MediaSource readyState: ${(n=this.mediaSource)==null?void 0:n.readyState}`);this.error(`${r}`,t),this.hls.trigger(g.ERROR,{type:fe.MEDIA_ERROR,details:z.BUFFER_APPENDING_ERROR,sourceBufferName:e,error:r,fatal:!1});const i=this.currentOp(e);i&&i.onError(r)}updateTimestampOffset(e,t,n,r,i,s){const l=t-e.timestampOffset;Math.abs(l)>=n&&(this.log(`Updating ${r} SourceBuffer timestampOffset to ${t} (sn: ${i} cc: ${s})`),e.timestampOffset=t)}removeExecutor(e,t,n){const{media:r,mediaSource:i}=this,s=this.tracks[e],l=s==null?void 0:s.buffer;if(!r||!i||!l){this.warn(`Attempting to remove from the ${e} SourceBuffer, but it does not exist`),this.shiftAndExecuteNext(e);return}const d=v(r.duration)?r.duration:1/0,c=v(i.duration)?i.duration:1/0,p=Math.max(0,t),b=Math.min(n,d,c);b>p&&(!s.ending||s.ended)?(s.ended=!1,this.log(`Removing [${p},${b}] from the ${e} SourceBuffer`),l.remove(p,b)):this.shiftAndExecuteNext(e)}appendExecutor(e,t){const n=this.tracks[t],r=n==null?void 0:n.buffer;if(!r)throw new Iu(`Attempting to append to the ${t} SourceBuffer, but it does not exist`);n.ending=!1,n.ended=!1,r.appendBuffer(e)}blockUntilOpen(e){if(this.isUpdating()||this.isQueued())this.blockBuffers(e).catch(t=>{this.warn(`SourceBuffer blocked callback ${t}`),this.stepOperationQueue(this.sourceBufferTypes)});else try{e()}catch(t){this.warn(`Callback run without blocking ${this.operationQueue} ${t}`)}}isUpdating(){return this.sourceBuffers.some(([e,t])=>e&&t.updating)}isQueued(){return this.sourceBuffers.some(([e])=>e&&!!this.currentOp(e))}isPending(e){return!!e&&!e.buffer}blockBuffers(e,t=this.sourceBufferTypes){if(!t.length)return this.log("Blocking operation requested, but no SourceBuffers exist"),Promise.resolve().then(e);const{operationQueue:n}=this,r=t.map(s=>this.appendBlocker(s));return t.length>1&&!!this.blockedAudioAppend&&this.unblockAudio(),Promise.all(r).then(s=>{n===this.operationQueue&&(e(),this.stepOperationQueue(this.sourceBufferTypes))})}stepOperationQueue(e){e.forEach(t=>{var n;const r=(n=this.tracks[t])==null?void 0:n.buffer;!r||r.updating||this.shiftAndExecuteNext(t)})}append(e,t,n){this.operationQueue&&this.operationQueue.append(e,t,n)}appendBlocker(e){if(this.operationQueue)return this.operationQueue.appendBlocker(e)}currentOp(e){return this.operationQueue?this.operationQueue.current(e):null}executeNext(e){e&&this.operationQueue&&this.operationQueue.executeNext(e)}shiftAndExecuteNext(e){this.operationQueue&&this.operationQueue.shiftAndExecuteNext(e)}get pendingTrackCount(){return Object.keys(this.tracks).reduce((e,t)=>e+(this.isPending(this.tracks[t])?1:0),0)}get sourceBufferCount(){return this.sourceBuffers.reduce((e,[t])=>e+(t?1:0),0)}get sourceBufferTypes(){return this.sourceBuffers.map(([e])=>e).filter(e=>!!e)}addBufferListener(e,t,n){const r=this.tracks[e];if(!r)return;const i=r.buffer;if(!i)return;const s=n.bind(this,e);r.listeners.push({event:t,listener:s}),i.addEventListener(t,s)}removeBufferListeners(e){const t=this.tracks[e];if(!t)return;const n=t.buffer;n&&(t.listeners.forEach(r=>{n.removeEventListener(r.event,r.listener)}),t.listeners.length=0)}}function El(a){const e=a.querySelectorAll("source");[].slice.call(e).forEach(t=>{a.removeChild(t)})}function Lu(a,e){const t=self.document.createElement("source");t.type="video/mp4",t.src=e,a.appendChild(t)}function Ko(a){return a==="audio"?1:0}class Ho{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(g.FPS_DROP_LEVEL_CAPPING,this.onFpsDropLevelCapping,this),e.on(g.MEDIA_ATTACHING,this.onMediaAttaching,this),e.on(g.MANIFEST_PARSED,this.onManifestParsed,this),e.on(g.LEVELS_UPDATED,this.onLevelsUpdated,this),e.on(g.BUFFER_CODECS,this.onBufferCodecs,this),e.on(g.MEDIA_DETACHING,this.onMediaDetaching,this)}unregisterListener(){const{hls:e}=this;e.off(g.FPS_DROP_LEVEL_CAPPING,this.onFpsDropLevelCapping,this),e.off(g.MEDIA_ATTACHING,this.onMediaAttaching,this),e.off(g.MANIFEST_PARSED,this.onManifestParsed,this),e.off(g.LEVELS_UPDATED,this.onLevelsUpdated,this),e.off(g.BUFFER_CODECS,this.onBufferCodecs,this),e.off(g.MEDIA_DETACHING,this.onMediaDetaching,this)}onFpsDropLevelCapping(e,t){const n=this.hls.levels[t.droppedLevel];this.isLevelAllowed(n)&&this.restrictedLevels.push({bitrate:n.bitrate,height:n.height,width:n.width})}onMediaAttaching(e,t){this.media=t.media instanceof HTMLVideoElement?t.media:null,this.clientRect=null,this.timer&&this.hls.levels.length&&this.detectPlayerSize()}onManifestParsed(e,t){const n=this.hls;this.restrictedLevels=[],this.firstLevel=t.firstLevel,n.config.capLevelToPlayerSize&&t.video&&this.startCapping()}onLevelsUpdated(e,t){this.timer&&v(this.autoLevelCapping)&&this.detectPlayerSize()}onBufferCodecs(e,t){this.hls.config.capLevelToPlayerSize&&t.video&&this.startCapping()}onMediaDetaching(){this.stopCapping(),this.media=null}detectPlayerSize(){if(this.media){if(this.mediaHeight<=0||this.mediaWidth<=0){this.clientRect=null;return}const e=this.hls.levels;if(e.length){const t=this.hls,n=this.getMaxLevel(e.length-1);n!==this.autoLevelCapping&&t.logger.log(`Setting autoLevelCapping to ${n}: ${e[n].height}p@${e[n].bitrate} for media ${this.mediaWidth}x${this.mediaHeight}`),t.autoLevelCapping=n,t.autoLevelEnabled&&t.autoLevelCapping>this.autoLevelCapping&&this.streamController&&this.streamController.nextLevelSwitch(),this.autoLevelCapping=t.autoLevelCapping}}}getMaxLevel(e){const t=this.hls.levels;if(!t.length)return-1;const n=t.filter((r,i)=>this.isLevelAllowed(r)&&i<=e);return this.clientRect=null,Ho.getMaxLevelByMediaSize(n,this.mediaWidth,this.mediaHeight)}startCapping(){this.timer||(this.autoLevelCapping=Number.POSITIVE_INFINITY,self.clearInterval(this.timer),this.timer=self.setInterval(this.detectPlayerSize.bind(this),1e3),this.detectPlayerSize())}stopCapping(){this.restrictedLevels=[],this.firstLevel=-1,this.autoLevelCapping=Number.POSITIVE_INFINITY,this.timer&&(self.clearInterval(this.timer),this.timer=void 0)}getDimensions(){if(this.clientRect)return this.clientRect;const e=this.media,t={width:0,height:0};if(e){const n=e.getBoundingClientRect();t.width=n.width,t.height=n.height,!t.width&&!t.height&&(t.width=n.right-n.left||e.width||0,t.height=n.bottom-n.top||e.height||0)}return this.clientRect=t,t}get mediaWidth(){return this.getDimensions().width*this.contentScaleFactor}get mediaHeight(){return this.getDimensions().height*this.contentScaleFactor}get contentScaleFactor(){let e=1;if(!this.hls.config.ignoreDevicePixelRatio)try{e=self.devicePixelRatio}catch(t){}return Math.min(e,this.hls.config.maxDevicePixelRatio)}isLevelAllowed(e){return!this.restrictedLevels.some(n=>e.bitrate===n.bitrate&&e.width===n.width&&e.height===n.height)}static getMaxLevelByMediaSize(e,t,n){if(!(e!=null&&e.length))return-1;const r=(l,d)=>d?l.width!==d.width||l.height!==d.height:!0;let i=e.length-1;const s=Math.max(t,n);for(let l=0;l<e.length;l+=1){const d=e[l];if((d.width>=s||d.height>=s)&&r(d,e[l+1])){i=l;break}}return i}}const es={MANIFEST:"m",AUDIO:"a",VIDEO:"v",MUXED:"av",INIT:"i",CAPTION:"c",TIMED_TEXT:"tt",KEY:"k",OTHER:"o"},Ou={HLS:"h"};class ws{constructor(e,t){Array.isArray(e)&&(e=e.map(n=>n instanceof ws?n:new ws(n))),this.value=e,this.params=t}}const Pu="Dict";function Mu(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 ku(a,e,t,n){return new Error(`failed to ${a} "${Mu(e)}" as ${t}`,{cause:n})}function Cs(a,e,t){return ku("serialize",a,e,t)}class Sl{constructor(e){this.description=e}}const wl="Bare Item",Nu="Boolean";function Bu(a){if(typeof a!="boolean")throw Cs(a,Nu);return a?"?1":"?0"}function Fu(a){return btoa(String.fromCharCode(...a))}const $u="Byte Sequence";function Uu(a){if(ArrayBuffer.isView(a)===!1)throw Cs(a,$u);return`:${Fu(a)}:`}const zu="Integer";function Ku(a){return a<-999999999999999||999999999999999<a}function Cl(a){if(Ku(a))throw Cs(a,zu);return a.toString()}function Hu(a){return`@${Cl(a.getTime()/1e3)}`}function Tl(a,e){if(a<0)return-Tl(-a,e);const t=Math.pow(10,e);if(Math.abs(a*t%1-.5)<Number.EPSILON){const r=Math.floor(a*t);return(r%2===0?r:r+1)/t}else return Math.round(a*t)/t}const ju="Decimal";function Zu(a){const e=Tl(a,3);if(Math.floor(Math.abs(e)).toString().length>12)throw Cs(a,ju);const t=e.toString();return t.includes(".")?t:`${t}.0`}const Wu="String",Vu=/[\x00-\x1f\x7f]+/;function Gu(a){if(Vu.test(a))throw Cs(a,Wu);return`"${a.replace(/\\/g,"\\\\").replace(/"/g,'\\"')}"`}function Yu(a){return a.description||a.toString().slice(7,-1)}const Xu="Token";function Al(a){const e=Yu(a);if(/^([a-zA-Z*])([!#$%&'*+\-.^_`|~\w:/]*)$/.test(e)===!1)throw Cs(e,Xu);return e}function jo(a){switch(typeof a){case"number":if(!v(a))throw Cs(a,wl);return Number.isInteger(a)?Cl(a):Zu(a);case"string":return Gu(a);case"symbol":return Al(a);case"boolean":return Bu(a);case"object":if(a instanceof Date)return Hu(a);if(a instanceof Uint8Array)return Uu(a);if(a instanceof Sl)return Al(a);default:throw Cs(a,wl)}}const Qu="Key";function Zo(a){if(/^[a-z*][a-z0-9\-_.*]*$/.test(a)===!1)throw Cs(a,Qu);return a}function Wo(a){return a==null?"":Object.entries(a).map(([e,t])=>t===!0?`;${Zo(e)}`:`;${Zo(e)}=${jo(t)}`).join("")}function Dl(a){return a instanceof ws?`${jo(a.value)}${Wo(a.params)}`:jo(a)}function Ju(a){return`(${a.value.map(Dl).join(" ")})${Wo(a.params)}`}function qu(a,e={whitespace:!0}){if(typeof a!="object"||a==null)throw Cs(a,Pu);const t=a instanceof Map?a.entries():Object.entries(a),n=e!=null&&e.whitespace?" ":"";return Array.from(t).map(([r,i])=>{i instanceof ws||(i=new ws(i));let s=Zo(r);return i.value===!0?s+=Wo(i.params):(s+="=",Array.isArray(i.value)?s+=Ju(i):s+=Dl(i)),s}).join(`,${n}`)}function Il(a,e){return qu(a,e)}const Ts="CMCD-Object",Ti="CMCD-Request",oa="CMCD-Session",Ys="CMCD-Status",ec={br:Ts,ab:Ts,d:Ts,ot:Ts,tb:Ts,tpb:Ts,lb:Ts,tab:Ts,lab:Ts,url:Ts,pb:Ti,bl:Ti,tbl:Ti,dl:Ti,ltc:Ti,mtp:Ti,nor:Ti,nrr:Ti,rc:Ti,sn:Ti,sta:Ti,su:Ti,ttfb:Ti,ttfbb:Ti,ttlb:Ti,cmsdd:Ti,cmsds:Ti,smrt:Ti,df:Ti,cs:Ti,ts:Ti,cid:oa,pr:oa,sf:oa,sid:oa,st:oa,v:oa,msd:oa,bs:Ys,bsd:Ys,cdn:Ys,rtp:Ys,bg:Ys,pt:Ys,ec:Ys,e:Ys},tc={REQUEST:Ti};function nc(a){return Object.keys(a).reduce((e,t)=>{var n;return(n=a[t])===null||n===void 0||n.forEach(r=>e[r]=t),e},{})}function rc(a,e){const t={};if(!a)return t;const n=Object.keys(a),r=e?nc(e):{};return n.reduce((i,s)=>{var l;const d=ec[s]||r[s]||tc.REQUEST,c=(l=i[d])!==null&&l!==void 0?l:i[d]={};return c[s]=a[s],i},t)}function ic(a){return["ot","sf","st","e","sta"].includes(a)}function sc(a){return typeof a=="number"?v(a):a!=null&&a!==""&&a!==!1}const Rl="event";function ac(a,e){const t=new URL(a),n=new URL(e);if(t.origin!==n.origin)return a;const r=t.pathname.split("/").slice(1),i=n.pathname.split("/").slice(1,-1);for(;r[0]===i[0];)r.shift(),i.shift();for(;i.length;)i.shift(),r.unshift("..");return r.join("/")+t.search+t.hash}const fo=a=>Math.round(a),Vo=(a,e)=>Array.isArray(a)?a.map(t=>Vo(t,e)):a instanceof ws&&typeof a.value=="string"?new ws(Vo(a.value,e),a.params):(e.baseUrl&&(a=ac(a,e.baseUrl)),e.version===1?encodeURIComponent(a):a),ho=a=>fo(a/100)*100,oc={br:fo,d:fo,bl:ho,dl:ho,mtp:ho,nor:(a,e)=>{let t=a;return e.version>=2&&(a instanceof ws&&typeof a.value=="string"?t=new ws([a]):typeof a=="string"&&(t=[a])),Vo(t,e)},rtp:ho,tb:fo},Ll="request",Ol="response",Go=["ab","bg","bl","br","bs","bsd","cdn","cid","cs","df","ec","lab","lb","ltc","msd","mtp","pb","pr","pt","sf","sid","sn","st","sta","tab","tb","tbl","tpb","ts","v"],lc=["e"],uc=/^[a-zA-Z0-9-.]+-[a-zA-Z0-9-.]+$/;function mo(a){return uc.test(a)}function cc(a){return Go.includes(a)||lc.includes(a)||mo(a)}const Pl=["d","dl","nor","ot","rtp","su"];function dc(a){return Go.includes(a)||Pl.includes(a)||mo(a)}const fc=["cmsdd","cmsds","rc","smrt","ttfb","ttfbb","ttlb","url"];function hc(a){return Go.includes(a)||Pl.includes(a)||fc.includes(a)||mo(a)}const mc=["bl","br","bs","cid","d","dl","mtp","nor","nrr","ot","pr","rtp","sf","sid","st","su","tb","v"];function pc(a){return mc.includes(a)||mo(a)}const gc={[Ol]:hc,[Rl]:cc,[Ll]:dc};function Ml(a,e={}){const t={};if(a==null||typeof a!="object")return t;const n=e.version||a.v||1,r=e.reportingMode||Ll,i=n===1?pc:gc[r];let s=Object.keys(a).filter(i);const l=e.filter;typeof l=="function"&&(s=s.filter(l));const d=r===Ol||r===Rl;d&&!s.includes("ts")&&s.push("ts"),n>1&&!s.includes("v")&&s.push("v");const c=y({},oc,e.formatters),p={version:n,reportingMode:r,baseUrl:e.baseUrl};return s.sort().forEach(b=>{let I=a[b];const F=c[b];if(typeof F=="function"&&(I=F(I,p)),b==="v"){if(n===1)return;I=n}b=="pr"&&I===1||(d&&b==="ts"&&!v(I)&&(I=Date.now()),sc(I)&&(ic(b)&&typeof I=="string"&&(I=new Sl(I)),t[b]=I))}),t}function vc(a,e={}){const t={};if(!a)return t;const n=Ml(a,e),r=rc(n,e==null?void 0:e.customHeaderMap);return Object.entries(r).reduce((i,[s,l])=>{const d=Il(l,{whitespace:!1});return d&&(i[s]=d),i},t)}function yc(a,e,t){return y(a,vc(e,t))}const bc="CMCD";function _c(a,e={}){return a?Il(Ml(a,e),{whitespace:!1}):""}function xc(a,e={}){if(!a)return"";const t=_c(a,e);return encodeURIComponent(t)}function Ec(a,e={}){if(!a)return"";const t=xc(a,e);return`${bc}=${t}`}const kl=/CMCD=[^&#]+/;function Sc(a,e,t){const n=Ec(e,t);if(!n)return a;if(kl.test(a))return a.replace(kl,n);const r=a.includes("?")?"&":"?";return`${a}${r}${n}`}class wc{constructor(e){this.hls=void 0,this.config=void 0,this.media=void 0,this.sid=void 0,this.cid=void 0,this.useHeaders=!1,this.includeKeys=void 0,this.initialized=!1,this.starved=!1,this.buffering=!0,this.audioBuffer=void 0,this.videoBuffer=void 0,this.onWaiting=()=>{this.initialized&&(this.starved=!0),this.buffering=!0},this.onPlaying=()=>{this.initialized||(this.initialized=!0),this.buffering=!1},this.applyPlaylistData=r=>{try{this.apply(r,{ot:es.MANIFEST,su:!this.initialized})}catch(i){this.hls.logger.warn("Could not generate manifest CMCD data.",i)}},this.applyFragmentData=r=>{try{const{frag:i,part:s}=r,l=this.hls.levels[i.level],d=this.getObjectType(i),c={d:(s||i).duration*1e3,ot:d};(d===es.VIDEO||d===es.AUDIO||d==es.MUXED)&&(c.br=l.bitrate/1e3,c.tb=this.getTopBandwidth(d)/1e3,c.bl=this.getBufferLength(d));const p=s?this.getNextPart(s):this.getNextFrag(i);p!=null&&p.url&&p.url!==i.url&&(c.nor=p.url),this.apply(r,c)}catch(i){this.hls.logger.warn("Could not generate segment CMCD data.",i)}},this.hls=e;const t=this.config=e.config,{cmcd:n}=t;n!=null&&(t.pLoader=this.createPlaylistLoader(),t.fLoader=this.createFragmentLoader(),this.sid=n.sessionId||e.sessionId,this.cid=n.contentId,this.useHeaders=n.useHeaders===!0,this.includeKeys=n.includeKeys,this.registerListeners())}registerListeners(){const e=this.hls;e.on(g.MEDIA_ATTACHED,this.onMediaAttached,this),e.on(g.MEDIA_DETACHED,this.onMediaDetached,this),e.on(g.BUFFER_CREATED,this.onBufferCreated,this)}unregisterListeners(){const e=this.hls;e.off(g.MEDIA_ATTACHED,this.onMediaAttached,this),e.off(g.MEDIA_DETACHED,this.onMediaDetached,this),e.off(g.BUFFER_CREATED,this.onBufferCreated,this)}destroy(){this.unregisterListeners(),this.onMediaDetached(),this.hls=this.config=this.audioBuffer=this.videoBuffer=null,this.onWaiting=this.onPlaying=this.media=null}onMediaAttached(e,t){this.media=t.media,this.media.addEventListener("waiting",this.onWaiting),this.media.addEventListener("playing",this.onPlaying)}onMediaDetached(){this.media&&(this.media.removeEventListener("waiting",this.onWaiting),this.media.removeEventListener("playing",this.onPlaying),this.media=null)}onBufferCreated(e,t){var n,r;this.audioBuffer=(n=t.tracks.audio)==null?void 0:n.buffer,this.videoBuffer=(r=t.tracks.video)==null?void 0:r.buffer}createData(){var e;return{v:1,sf:Ou.HLS,sid:this.sid,cid:this.cid,pr:(e=this.media)==null?void 0:e.playbackRate,mtp:this.hls.bandwidthEstimate/1e3}}apply(e,t={}){y(t,this.createData());const n=t.ot===es.INIT||t.ot===es.VIDEO||t.ot===es.MUXED;this.starved&&n&&(t.bs=!0,t.su=!0,this.starved=!1),t.su==null&&(t.su=this.buffering);const{includeKeys:r}=this;r&&(t=Object.keys(t).reduce((s,l)=>(r.includes(l)&&(s[l]=t[l]),s),{}));const i={baseUrl:e.url};this.useHeaders?(e.headers||(e.headers={}),yc(e.headers,t,i)):e.url=Sc(e.url,t,i)}getNextFrag(e){var t;const n=(t=this.hls.levels[e.level])==null?void 0:t.details;if(n){const r=e.sn-n.startSN;return n.fragments[r+1]}}getNextPart(e){var t;const{index:n,fragment:r}=e,i=(t=this.hls.levels[r.level])==null||(t=t.details)==null?void 0:t.partList;if(i){const{sn:s}=r;for(let l=i.length-1;l>=0;l--){const d=i[l];if(d.index===n&&d.fragment.sn===s)return i[l+1]}}}getObjectType(e){const{type:t}=e;if(t==="subtitle")return es.TIMED_TEXT;if(e.sn==="initSegment")return es.INIT;if(t==="audio")return es.AUDIO;if(t==="main")return this.hls.audioTracks.length?es.VIDEO:es.MUXED}getTopBandwidth(e){let t=0,n;const r=this.hls;if(e===es.AUDIO)n=r.audioTracks;else{const i=r.maxAutoLevel,s=i>-1?i+1:r.levels.length;n=r.levels.slice(0,s)}return n.forEach(i=>{i.bitrate>t&&(t=i.bitrate)}),t>0?t:NaN}getBufferLength(e){const t=this.media,n=e===es.AUDIO?this.audioBuffer:this.videoBuffer;return!n||!t?NaN:Jn.bufferInfo(n,t.currentTime,this.config.maxBufferHole).len*1e3}createPlaylistLoader(){const{pLoader:e}=this.config,t=this.applyPlaylistData,n=e||this.config.loader;return class{constructor(i){this.loader=void 0,this.loader=new n(i)}get stats(){return this.loader.stats}get context(){return this.loader.context}destroy(){this.loader.destroy()}abort(){this.loader.abort()}load(i,s,l){t(i),this.loader.load(i,s,l)}}}createFragmentLoader(){const{fLoader:e}=this.config,t=this.applyFragmentData,n=e||this.config.loader;return class{constructor(i){this.loader=void 0,this.loader=new n(i)}get stats(){return this.loader.stats}get context(){return this.loader.context}destroy(){this.loader.destroy()}abort(){this.loader.abort()}load(i,s,l){t(i),this.loader.load(i,s,l)}}}}const Cc=3e5;class Tc extends Z{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(g.MANIFEST_LOADING,this.onManifestLoading,this),e.on(g.MANIFEST_LOADED,this.onManifestLoaded,this),e.on(g.MANIFEST_PARSED,this.onManifestParsed,this),e.on(g.ERROR,this.onError,this)}unregisterListeners(){const e=this.hls;e&&(e.off(g.MANIFEST_LOADING,this.onManifestLoading,this),e.off(g.MANIFEST_LOADED,this.onManifestLoaded,this),e.off(g.MANIFEST_PARSED,this.onManifestParsed,this),e.off(g.ERROR,this.onError,this))}pathways(){return(this.levels||[]).reduce((e,t)=>(e.indexOf(t.pathwayId)===-1&&e.push(t.pathwayId),e),[])}get pathwayPriority(){return this._pathwayPriority}set pathwayPriority(e){this.updatePathwayPriority(e)}startLoad(){if(this.started=!0,this.clearTimeout(),this.enabled&&this.uri){if(this.updated){const e=this.timeToLoad*1e3-(performance.now()-this.updated);if(e>0){this.scheduleRefresh(this.uri,e);return}}this.loadSteeringManifest(this.uri)}}stopLoad(){this.started=!1,this.loader&&(this.loader.destroy(),this.loader=null),this.clearTimeout()}clearTimeout(){this.reloadTimer!==-1&&(self.clearTimeout(this.reloadTimer),this.reloadTimer=-1)}destroy(){this.unregisterListeners(),this.stopLoad(),this.hls=null,this.levels=this.audioTracks=this.subtitleTracks=null}removeLevel(e){const t=this.levels;t&&(this.levels=t.filter(n=>n!==e))}onManifestLoading(){this.stopLoad(),this.enabled=!0,this.timeToLoad=300,this.updated=0,this.uri=null,this.pathwayId=".",this.levels=this.audioTracks=this.subtitleTracks=null}onManifestLoaded(e,t){const{contentSteering:n}=t;n!==null&&(this.pathwayId=n.pathwayId,this.uri=n.uri,this.started&&this.startLoad())}onManifestParsed(e,t){this.audioTracks=t.audioTracks,this.subtitleTracks=t.subtitleTracks}onError(e,t){const{errorAction:n}=t;if((n==null?void 0:n.action)===_n.SendAlternateToPenaltyBox&&n.flags===wn.MoveAllAlternatesMatchingHost){const r=this.levels;let i=this._pathwayPriority,s=this.pathwayId;if(t.context){const{groupId:l,pathwayId:d,type:c}=t.context;l&&r?s=this.getPathwayForGroupId(l,c,s):d&&(s=d)}s in this.penalizedPathways||(this.penalizedPathways[s]=performance.now()),!i&&r&&(i=this.pathways()),i&&i.length>1&&(this.updatePathwayPriority(i),n.resolved=this.pathwayId!==s),t.details===z.BUFFER_APPEND_ERROR&&!t.fatal?n.resolved=!0:n.resolved||this.warn(`Could not resolve ${t.details} ("${t.error.message}") with content-steering for Pathway: ${s} levels: ${r&&r.length} priorities: ${vt(i)} penalized: ${vt(this.penalizedPathways)}`)}}filterParsedLevels(e){this.levels=e;let t=this.getLevelsForPathway(this.pathwayId);if(t.length===0){const n=e[0].pathwayId;this.log(`No levels found in Pathway ${this.pathwayId}. Setting initial Pathway to "${n}"`),t=this.getLevelsForPathway(n),this.pathwayId=n}return t.length!==e.length&&this.log(`Found ${t.length}/${e.length} levels in Pathway "${this.pathwayId}"`),t}getLevelsForPathway(e){return this.levels===null?[]:this.levels.filter(t=>e===t.pathwayId)}updatePathwayPriority(e){this._pathwayPriority=e;let t;const n=this.penalizedPathways,r=performance.now();Object.keys(n).forEach(i=>{r-n[i]>Cc&&delete n[i]});for(let i=0;i<e.length;i++){const s=e[i];if(s in n)continue;if(s===this.pathwayId)return;const l=this.hls.nextLoadLevel,d=this.hls.levels[l];if(t=this.getLevelsForPathway(s),t.length>0){this.log(`Setting Pathway to "${s}"`),this.pathwayId=s,Ni(t),this.hls.trigger(g.LEVELS_UPDATED,{levels:t});const c=this.hls.levels[l];d&&c&&this.levels&&(c.attrs["STABLE-VARIANT-ID"]!==d.attrs["STABLE-VARIANT-ID"]&&c.bitrate!==d.bitrate&&this.log(`Unstable Pathways change from bitrate ${d.bitrate} to ${c.bitrate}`),this.hls.nextLoadLevel=l);break}}}getPathwayForGroupId(e,t,n){const r=this.getLevelsForPathway(n).concat(this.levels||[]);for(let i=0;i<r.length;i++)if(t===q.AUDIO_TRACK&&r[i].hasAudioGroup(e)||t===q.SUBTITLE_TRACK&&r[i].hasSubtitleGroup(e))return r[i].pathwayId;return n}clonePathways(e){const t=this.levels;if(!t)return;const n={},r={};e.forEach(i=>{const{ID:s,"BASE-ID":l,"URI-REPLACEMENT":d}=i;if(t.some(p=>p.pathwayId===s))return;const c=this.getLevelsForPathway(l).map(p=>{const b=new hr(p.attrs);b["PATHWAY-ID"]=s;const I=b.AUDIO&&`${b.AUDIO}_clone_${s}`,F=b.SUBTITLES&&`${b.SUBTITLES}_clone_${s}`;I&&(n[b.AUDIO]=I,b.AUDIO=I),F&&(r[b.SUBTITLES]=F,b.SUBTITLES=F);const $=Bl(p.uri,b["STABLE-VARIANT-ID"],"PER-VARIANT-URIS",d),ge=new Ht({attrs:b,audioCodec:p.audioCodec,bitrate:p.bitrate,height:p.height,name:p.name,url:$,videoCodec:p.videoCodec,width:p.width});if(p.audioGroups)for(let me=1;me<p.audioGroups.length;me++)ge.addGroupId("audio",`${p.audioGroups[me]}_clone_${s}`);if(p.subtitleGroups)for(let me=1;me<p.subtitleGroups.length;me++)ge.addGroupId("text",`${p.subtitleGroups[me]}_clone_${s}`);return ge});t.push(...c),Nl(this.audioTracks,n,d,s),Nl(this.subtitleTracks,r,d,s)})}loadSteeringManifest(e){const t=this.hls.config,n=t.loader;this.loader&&this.loader.destroy(),this.loader=new n(t);let r;try{r=new self.URL(e)}catch(p){this.enabled=!1,this.log(`Failed to parse Steering Manifest URI: ${e}`);return}if(r.protocol!=="data:"){const p=(this.hls.bandwidthEstimate||t.abrEwmaDefaultEstimate)|0;r.searchParams.set("_HLS_pathway",this.pathwayId),r.searchParams.set("_HLS_throughput",""+p)}const i={responseType:"json",url:r.href},s=t.steeringManifestLoadPolicy.default,l=s.errorRetry||s.timeoutRetry||{},d={loadPolicy:s,timeout:s.maxLoadTimeMs,maxRetry:l.maxNumRetry||0,retryDelay:l.retryDelayMs||0,maxRetryDelay:l.maxRetryDelayMs||0},c={onSuccess:(p,b,I,F)=>{this.log(`Loaded steering manifest: "${r}"`);const $=p.data;if(($==null?void 0:$.VERSION)!==1){this.log(`Steering VERSION ${$.VERSION} not supported!`);return}this.updated=performance.now(),this.timeToLoad=$.TTL;const{"RELOAD-URI":ge,"PATHWAY-CLONES":me,"PATHWAY-PRIORITY":Fe}=$;if(ge)try{this.uri=new self.URL(ge,r).href}catch(et){this.enabled=!1,this.log(`Failed to parse Steering Manifest RELOAD-URI: ${ge}`);return}this.scheduleRefresh(this.uri||I.url),me&&this.clonePathways(me);const We={steeringManifest:$,url:r.toString()};this.hls.trigger(g.STEERING_MANIFEST_LOADED,We),Fe&&this.updatePathwayPriority(Fe)},onError:(p,b,I,F)=>{if(this.log(`Error loading steering manifest: ${p.code} ${p.text} (${b.url})`),this.stopLoad(),p.code===410){this.enabled=!1,this.log(`Steering manifest ${b.url} no longer available`);return}let $=this.timeToLoad*1e3;if(p.code===429){const ge=this.loader;if(typeof(ge==null?void 0:ge.getResponseHeader)=="function"){const me=ge.getResponseHeader("Retry-After");me&&($=parseFloat(me)*1e3)}this.log(`Steering manifest ${b.url} rate limited`);return}this.scheduleRefresh(this.uri||b.url,$)},onTimeout:(p,b,I)=>{this.log(`Timeout loading steering manifest (${b.url})`),this.scheduleRefresh(this.uri||b.url)}};this.log(`Requesting steering manifest: ${r}`),this.loader.load(i,d,c)}scheduleRefresh(e,t=this.timeToLoad*1e3){this.clearTimeout(),this.reloadTimer=self.setTimeout(()=>{var n;const r=(n=this.hls)==null?void 0:n.media;if(r&&!r.ended){this.loadSteeringManifest(e);return}this.scheduleRefresh(e,this.timeToLoad*1e3)},t)}}function Nl(a,e,t,n){a&&Object.keys(e).forEach(r=>{const i=a.filter(s=>s.groupId===r).map(s=>{const l=y({},s);return l.details=void 0,l.attrs=new hr(l.attrs),l.url=l.attrs.URI=Bl(s.url,s.attrs["STABLE-RENDITION-ID"],"PER-RENDITION-URIS",t),l.groupId=l.attrs["GROUP-ID"]=e[r],l.attrs["PATHWAY-ID"]=n,l});a.push(...i)})}function Bl(a,e,t,n){const{HOST:r,PARAMS:i,[t]:s}=n;let l;e&&(l=s==null?void 0:s[e],l&&(a=l));const d=new self.URL(a);return r&&!l&&(d.host=r),i&&Object.keys(i).sort().forEach(c=>{c&&d.searchParams.set(c,i[c])}),d.href}class _a extends Z{constructor(e){super("eme",e.logger),this.hls=void 0,this.config=void 0,this.media=null,this.mediaResolved=void 0,this.keyFormatPromise=null,this.keySystemAccessPromises={},this._requestLicenseFailureCount=0,this.mediaKeySessions=[],this.keyIdToKeySessionPromise={},this.mediaKeys=null,this.setMediaKeysQueue=_a.CDMCleanupPromise?[_a.CDMCleanupPromise]:[],this.bannedKeyIds={},this.onMediaEncrypted=t=>{const{initDataType:n,initData:r}=t,i=`"${t.type}" event: init data type: "${n}"`;if(this.debug(i),r!==null){if(!this.keyFormatPromise){let s=Object.keys(this.keySystemAccessPromises);s.length||(s=di(this.config));const l=s.map(ri).filter(d=>!!d);this.keyFormatPromise=this.getKeyFormatPromise(l)}this.keyFormatPromise.then(s=>{const l=Ei(s);if(n!=="sinf"||l!==or.FAIRPLAY){this.log(`Ignoring "${t.type}" event with init data type: "${n}" for selected key-system ${l}`);return}let d;try{const F=at(new Uint8Array(r)),$=lr(JSON.parse(F).sinf),ge=Ae($);if(!ge)throw new Error("'schm' box missing or not cbcs/cenc with schi > tenc");d=new Uint8Array(ge.subarray(8,24))}catch(F){this.warn(`${i} Failed to parse sinf: ${F}`);return}const c=ue(d),{keyIdToKeySessionPromise:p,mediaKeySessions:b}=this;let I=p[c];for(let F=0;F<b.length;F++){const $=b[F],ge=$.decryptdata;if(!ge.keyId)continue;const me=ue(ge.keyId);if(ir(d,ge.keyId)||ge.uri.replace(/-/g,"").indexOf(c)!==-1){if(I=p[me],!I)continue;if(ge.pssh)break;delete p[me],ge.pssh=new Uint8Array(r),ge.keyId=d,I=p[c]=I.then(()=>this.generateRequestWithPreferredKeySession($,n,r,"encrypted-event-key-match")),I.catch(Fe=>this.handleError(Fe));break}}I||this.handleError(new Error(`Key ID ${c} not encountered in playlist. Key-system sessions ${b.length}.`))}).catch(s=>this.handleError(s))}},this.onWaitingForKey=t=>{this.log(`"${t.type}" event`)},this.hls=e,this.config=e.config,this.registerListeners()}destroy(){this.onDestroying(),this.onMediaDetached();const e=this.config;e.requestMediaKeySystemAccessFunc=null,e.licenseXhrSetup=e.licenseResponseCallback=void 0,e.drmSystems=e.drmSystemOptions={},this.hls=this.config=this.keyIdToKeySessionPromise=null,this.onMediaEncrypted=this.onWaitingForKey=null}registerListeners(){this.hls.on(g.MEDIA_ATTACHED,this.onMediaAttached,this),this.hls.on(g.MEDIA_DETACHED,this.onMediaDetached,this),this.hls.on(g.MANIFEST_LOADING,this.onManifestLoading,this),this.hls.on(g.MANIFEST_LOADED,this.onManifestLoaded,this),this.hls.on(g.DESTROYING,this.onDestroying,this)}unregisterListeners(){this.hls.off(g.MEDIA_ATTACHED,this.onMediaAttached,this),this.hls.off(g.MEDIA_DETACHED,this.onMediaDetached,this),this.hls.off(g.MANIFEST_LOADING,this.onManifestLoading,this),this.hls.off(g.MANIFEST_LOADED,this.onManifestLoaded,this),this.hls.off(g.DESTROYING,this.onDestroying,this)}getLicenseServerUrl(e){const{drmSystems:t,widevineLicenseUrl:n}=this.config,r=t==null?void 0:t[e];if(r)return r.licenseUrl;if(e===or.WIDEVINE&&n)return n}getLicenseServerUrlOrThrow(e){const t=this.getLicenseServerUrl(e);if(t===void 0)throw new Error(`no license server URL configured for key-system "${e}"`);return t}getServerCertificateUrl(e){const{drmSystems:t}=this.config,n=t==null?void 0:t[e];if(n)return n.serverCertificateUrl;this.log(`No Server Certificate in config.drmSystems["${e}"]`)}attemptKeySystemAccess(e){const t=this.hls.levels,n=(s,l,d)=>!!s&&d.indexOf(s)===l,r=t.map(s=>s.audioCodec).filter(n),i=t.map(s=>s.videoCodec).filter(n);return r.length+i.length===0&&i.push("avc1.42e01e"),new Promise((s,l)=>{const d=c=>{const p=c.shift();this.getMediaKeysPromise(p,r,i).then(b=>s({keySystem:p,mediaKeys:b})).catch(b=>{c.length?d(c):b instanceof ss?l(b):l(new ss({type:fe.KEY_SYSTEM_ERROR,details:z.KEY_SYSTEM_NO_ACCESS,error:b,fatal:!0},b.message))})};d(e)})}requestMediaKeySystemAccess(e,t){const{requestMediaKeySystemAccessFunc:n}=this.config;if(typeof n!="function"){let r=`Configured requestMediaKeySystemAccess is not a function ${n}`;return li===null&&self.location.protocol==="http:"&&(r=`navigator.requestMediaKeySystemAccess is not available over insecure protocol ${location.protocol}`),Promise.reject(new Error(r))}return n(e,t)}getMediaKeysPromise(e,t,n){var r;const i=Vi(e,t,n,this.config.drmSystemOptions||{});let s=this.keySystemAccessPromises[e],l=(r=s)==null?void 0:r.keySystemAccess;if(!l){this.log(`Requesting encrypted media "${e}" key-system access with config: ${vt(i)}`),l=this.requestMediaKeySystemAccess(e,i);const d=s=this.keySystemAccessPromises[e]={keySystemAccess:l};return l.catch(c=>{this.log(`Failed to obtain access to key-system "${e}": ${c}`)}),l.then(c=>{this.log(`Access for key-system "${c.keySystem}" obtained`);const p=this.fetchServerCertificate(e);this.log(`Create media-keys for "${e}"`);const b=d.mediaKeys=c.createMediaKeys().then(I=>(this.log(`Media-keys created for "${e}"`),d.hasMediaKeys=!0,p.then(F=>F?this.setMediaKeysServerCertificate(I,e,F):I)));return b.catch(I=>{this.error(`Failed to create media-keys for "${e}"}: ${I}`)}),b})}return l.then(()=>s.mediaKeys)}createMediaKeySessionContext({decryptdata:e,keySystem:t,mediaKeys:n}){this.log(`Creating key-system session "${t}" keyId: ${ue(e.keyId||[])} keyUri: ${e.uri}`);const r=n.createSession(),i={decryptdata:e,keySystem:t,mediaKeys:n,mediaKeysSession:r,keyStatus:"status-pending"};return this.mediaKeySessions.push(i),i}renewKeySession(e){const t=e.decryptdata;if(t.pssh){const n=this.createMediaKeySessionContext(e),r=po(t),i="cenc";this.keyIdToKeySessionPromise[r]=this.generateRequestWithPreferredKeySession(n,i,t.pssh.buffer,"expired")}else this.warn("Could not renew expired session. Missing pssh initData.");this.removeSession(e)}updateKeySession(e,t){const n=e.mediaKeysSession;return this.log(`Updating key-session "${n.sessionId}" for keyId ${ue(e.decryptdata.keyId||[])}
|
|
|
} (data length: ${t.byteLength})`),n.update(t)}getSelectedKeySystemFormats(){return Object.keys(this.keySystemAccessPromises).map(e=>({keySystem:e,hasMediaKeys:this.keySystemAccessPromises[e].hasMediaKeys})).filter(({hasMediaKeys:e})=>!!e).map(({keySystem:e})=>ri(e)).filter(e=>!!e)}getKeySystemAccess(e){return this.getKeySystemSelectionPromise(e).then(({keySystem:t,mediaKeys:n})=>this.attemptSetMediaKeys(t,n))}selectKeySystem(e){return new Promise((t,n)=>{this.getKeySystemSelectionPromise(e).then(({keySystem:r})=>{const i=ri(r);i?t(i):n(new Error(`Unable to find format for key-system "${r}"`))}).catch(n)})}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){const t=di(this.config),n=e.map(Ei).filter(r=>!!r&&t.indexOf(r)!==-1);return this.selectKeySystem(n)}getKeyStatus(e){const{mediaKeySessions:t}=this;for(let n=0;n<t.length;n++){const r=Ac(e,t[n]);if(r)return r}}loadKey(e){const t=e.keyInfo.decryptdata,n=po(t),r=this.bannedKeyIds[n];if(r||this.getKeyStatus(t)==="internal-error"){const l=Fl(r||"internal-error",t);return this.handleError(l,e.frag),Promise.reject(l)}const i=`(keyId: ${n} format: "${t.keyFormat}" method: ${t.method} uri: ${t.uri})`;this.log(`Starting session for key ${i}`);const s=this.keyIdToKeySessionPromise[n];if(!s){const l=this.getKeySystemForKeyPromise(t).then(({keySystem:d,mediaKeys:c})=>(this.throwIfDestroyed(),this.log(`Handle encrypted media sn: ${e.frag.sn} ${e.frag.type}: ${e.frag.level} using key ${i}`),this.attemptSetMediaKeys(d,c).then(()=>(this.throwIfDestroyed(),this.createMediaKeySessionContext({keySystem:d,mediaKeys:c,decryptdata:t}))))).then(d=>{const c="cenc",p=t.pssh?t.pssh.buffer:null;return this.generateRequestWithPreferredKeySession(d,c,p,"playlist-key")});return l.catch(d=>this.handleError(d,e.frag)),this.keyIdToKeySessionPromise[n]=l,l}return s.catch(l=>{if(l instanceof ss){const d=T({},l.data);this.getKeyStatus(t)==="internal-error"&&(d.decryptdata=t);const c=new ss(d,l.message);this.handleError(c,e.frag)}}),s}throwIfDestroyed(e="Invalid state"){if(!this.hls)throw new Error("invalid state")}handleError(e,t){if(this.hls)if(e instanceof ss){t&&(e.data.frag=t);const n=e.data.decryptdata;this.error(`${e.message}${n?` (${ue(n.keyId||[])})`:""}`),this.hls.trigger(g.ERROR,e.data)}else this.error(e.message),this.hls.trigger(g.ERROR,{type:fe.KEY_SYSTEM_ERROR,details:z.KEY_SYSTEM_NO_KEYS,error:e,fatal:!0})}getKeySystemForKeyPromise(e){const t=po(e),n=this.keyIdToKeySessionPromise[t];if(!n){const r=Ei(e.keyFormat),i=r?[r]:di(this.config);return this.attemptKeySystemAccess(i)}return n}getKeySystemSelectionPromise(e){if(e.length||(e=di(this.config)),e.length===0)throw new ss({type:fe.KEY_SYSTEM_ERROR,details:z.KEY_SYSTEM_NO_CONFIGURED_LICENSE,fatal:!0},`Missing key-system license configuration options ${vt({drmSystems:this.config.drmSystems})}`);return this.attemptKeySystemAccess(e)}attemptSetMediaKeys(e,t){if(this.mediaResolved=void 0,this.mediaKeys===t)return Promise.resolve();const n=this.setMediaKeysQueue.slice();this.log(`Setting media-keys for "${e}"`);const r=Promise.all(n).then(()=>this.media?this.media.setMediaKeys(t):new Promise((i,s)=>{this.mediaResolved=()=>{if(this.mediaResolved=void 0,!this.media)return s(new Error("Attempted to set mediaKeys without media element attached"));this.mediaKeys=t,this.media.setMediaKeys(t).then(i).catch(s)}}));return this.mediaKeys=t,this.setMediaKeysQueue.push(r),r.then(()=>{this.log(`Media-keys set for "${e}"`),n.push(r),this.setMediaKeysQueue=this.setMediaKeysQueue.filter(i=>n.indexOf(i)===-1)})}generateRequestWithPreferredKeySession(e,t,n,r){var i;const s=(i=this.config.drmSystems)==null||(i=i[e.keySystem])==null?void 0:i.generateRequest;if(s)try{const $=s.call(this.hls,t,n,e);if(!$)throw new Error("Invalid response from configured generateRequest filter");t=$.initDataType,n=$.initData?$.initData:null,e.decryptdata.pssh=n?new Uint8Array(n):null}catch($){if(this.warn($.message),this.hls&&this.hls.config.debug)throw $}if(n===null)return this.log(`Skipping key-session request for "${r}" (no initData)`),Promise.resolve(e);const l=po(e.decryptdata),d=e.decryptdata.uri;this.log(`Generating key-session request for "${r}" keyId: ${l} URI: ${d} (init data type: ${t} length: ${n.byteLength})`);const c=new fa,p=e._onmessage=$=>{const ge=e.mediaKeysSession;if(!ge){c.emit("error",new Error("invalid state"));return}const{messageType:me,message:Fe}=$;this.log(`"${me}" message event for session "${ge.sessionId}" message size: ${Fe.byteLength}`),me==="license-request"||me==="license-renewal"?this.renewLicense(e,Fe).catch(We=>{c.eventNames().length?c.emit("error",We):this.handleError(We)}):me==="license-release"?e.keySystem===or.FAIRPLAY&&this.updateKeySession(e,yr("acknowledged")).then(()=>this.removeSession(e)).catch(We=>this.handleError(We)):this.warn(`unhandled media key message type "${me}"`)},b=($,ge)=>{ge.keyStatus=$;let me;$.startsWith("usable")?c.emit("resolved"):$==="internal-error"||$==="output-restricted"||$==="output-downscaled"?me=Fl($,ge.decryptdata):$==="expired"?me=new Error(`key expired (keyId: ${l})`):$==="released"?me=new Error("key released"):$==="status-pending"||this.warn(`unhandled key status change "${$}" (keyId: ${l})`),me&&(c.eventNames().length?c.emit("error",me):this.handleError(me))},I=e._onkeystatuseschange=$=>{if(!e.mediaKeysSession){c.emit("error",new Error("invalid state"));return}const me=this.getKeyStatuses(e);if(!Object.keys(me).some(xt=>me[xt]!=="status-pending"))return;if(me[l]==="expired"){this.log(`Expired key ${vt(me)} in key-session "${e.mediaKeysSession.sessionId}"`),this.renewKeySession(e);return}let We=me[l];if(We)b(We,e);else{var et;e.keyStatusTimeouts||(e.keyStatusTimeouts={}),(et=e.keyStatusTimeouts)[l]||(et[l]=self.setTimeout(()=>{if(!e.mediaKeysSession||!this.mediaKeys)return;const Ot=this.getKeyStatus(e.decryptdata);if(Ot&&Ot!=="status-pending")return this.log(`No status for keyId ${l} in key-session "${e.mediaKeysSession.sessionId}". Using session key-status ${Ot} from other session.`),b(Ot,e);this.log(`key status for ${l} in key-session "${e.mediaKeysSession.sessionId}" timed out after 1000ms`),We="internal-error",b(We,e)},1e3)),this.log(`No status for keyId ${l} (${vt(me)}).`)}};Bi(e.mediaKeysSession,"message",p),Bi(e.mediaKeysSession,"keystatuseschange",I);const F=new Promise(($,ge)=>{c.on("error",ge),c.on("resolved",$)});return e.mediaKeysSession.generateRequest(t,n).then(()=>{this.log(`Request generated for key-session "${e.mediaKeysSession.sessionId}" keyId: ${l} URI: ${d}`)}).catch($=>{throw new ss({type:fe.KEY_SYSTEM_ERROR,details:z.KEY_SYSTEM_NO_SESSION,error:$,decryptdata:e.decryptdata,fatal:!1},`Error generating key-session request: ${$}`)}).then(()=>F).catch($=>(c.removeAllListeners(),this.removeSession(e).then(()=>{throw $}))).then(()=>(c.removeAllListeners(),e))}getKeyStatuses(e){const t={};return e.mediaKeysSession.keyStatuses.forEach((n,r)=>{if(typeof r=="string"&&typeof n=="object"){const l=r;r=n,n=l}const i="buffer"in r?new Uint8Array(r.buffer,r.byteOffset,r.byteLength):new Uint8Array(r);if(e.keySystem===or.PLAYREADY&&i.length===16){const l=ue(i);t[l]=n,Rn(i)}const s=ue(i);n==="internal-error"&&(this.bannedKeyIds[s]=n),this.log(`key status change "${n}" for keyStatuses keyId: ${s} key-session "${e.mediaKeysSession.sessionId}"`),t[s]=n}),t}fetchServerCertificate(e){const t=this.config,n=t.loader,r=new n(t),i=this.getServerCertificateUrl(e);return i?(this.log(`Fetching server certificate for "${e}"`),new Promise((s,l)=>{const d={responseType:"arraybuffer",url:i},c=t.certLoadPolicy.default,p={loadPolicy:c,timeout:c.maxLoadTimeMs,maxRetry:0,retryDelay:0,maxRetryDelay:0},b={onSuccess:(I,F,$,ge)=>{s(I.data)},onError:(I,F,$,ge)=>{l(new ss({type:fe.KEY_SYSTEM_ERROR,details:z.KEY_SYSTEM_SERVER_CERTIFICATE_REQUEST_FAILED,fatal:!0,networkDetails:$,response:T({url:d.url,data:void 0},I)},`"${e}" certificate request failed (${i}). Status: ${I.code} (${I.text})`))},onTimeout:(I,F,$)=>{l(new ss({type:fe.KEY_SYSTEM_ERROR,details:z.KEY_SYSTEM_SERVER_CERTIFICATE_REQUEST_FAILED,fatal:!0,networkDetails:$,response:{url:d.url,data:void 0}},`"${e}" certificate request timed out (${i})`))},onAbort:(I,F,$)=>{l(new Error("aborted"))}};r.load(d,p,b)})):Promise.resolve()}setMediaKeysServerCertificate(e,t,n){return new Promise((r,i)=>{e.setServerCertificate(n).then(s=>{this.log(`setServerCertificate ${s?"success":"not supported by CDM"} (${n.byteLength}) on "${t}"`),r(e)}).catch(s=>{i(new ss({type:fe.KEY_SYSTEM_ERROR,details:z.KEY_SYSTEM_SERVER_CERTIFICATE_UPDATE_FAILED,error:s,fatal:!0},s.message))})})}renewLicense(e,t){return this.requestLicense(e,new Uint8Array(t)).then(n=>this.updateKeySession(e,new Uint8Array(n)).catch(r=>{throw new ss({type:fe.KEY_SYSTEM_ERROR,details:z.KEY_SYSTEM_SESSION_UPDATE_FAILED,decryptdata:e.decryptdata,error:r,fatal:!1},r.message)}))}unpackPlayReadyKeyMessage(e,t){const n=String.fromCharCode.apply(null,new Uint16Array(t.buffer));if(!n.includes("PlayReadyKeyMessage"))return e.setRequestHeader("Content-Type","text/xml; charset=utf-8"),t;const r=new DOMParser().parseFromString(n,"application/xml"),i=r.querySelectorAll("HttpHeader");if(i.length>0){let p;for(let b=0,I=i.length;b<I;b++){var s,l;p=i[b];const F=(s=p.querySelector("name"))==null?void 0:s.textContent,$=(l=p.querySelector("value"))==null?void 0:l.textContent;F&&$&&e.setRequestHeader(F,$)}}const d=r.querySelector("Challenge"),c=d==null?void 0:d.textContent;if(!c)throw new Error("Cannot find <Challenge> in key message");return yr(atob(c))}setupLicenseXHR(e,t,n,r){const i=this.config.licenseXhrSetup;return i?Promise.resolve().then(()=>{if(!n.decryptdata)throw new Error("Key removed");return i.call(this.hls,e,t,n,r)}).catch(s=>{if(!n.decryptdata)throw s;return e.open("POST",t,!0),i.call(this.hls,e,t,n,r)}).then(s=>(e.readyState||e.open("POST",t,!0),{xhr:e,licenseChallenge:s||r})):(e.open("POST",t,!0),Promise.resolve({xhr:e,licenseChallenge:r}))}requestLicense(e,t){const n=this.config.keyLoadPolicy.default;return new Promise((r,i)=>{const s=this.getLicenseServerUrlOrThrow(e.keySystem);this.log(`Sending license request to URL: ${s}`);const l=new XMLHttpRequest;l.responseType="arraybuffer",l.onreadystatechange=()=>{if(!this.hls||!e.mediaKeysSession)return i(new Error("invalid state"));if(l.readyState===4)if(l.status===200){this._requestLicenseFailureCount=0;let d=l.response;this.log(`License received ${d instanceof ArrayBuffer?d.byteLength:d}`);const c=this.config.licenseResponseCallback;if(c)try{d=c.call(this.hls,l,s,e)}catch(p){this.error(p)}r(d)}else{const d=n.errorRetry,c=d?d.maxNumRetry:0;if(this._requestLicenseFailureCount++,this._requestLicenseFailureCount>c||l.status>=400&&l.status<500)i(new ss({type:fe.KEY_SYSTEM_ERROR,details:z.KEY_SYSTEM_LICENSE_REQUEST_FAILED,decryptdata:e.decryptdata,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(r,i)}}},e.licenseXhr&&e.licenseXhr.readyState!==XMLHttpRequest.DONE&&e.licenseXhr.abort(),e.licenseXhr=l,this.setupLicenseXHR(l,s,e,t).then(({xhr:d,licenseChallenge:c})=>{e.keySystem==or.PLAYREADY&&(c=this.unpackPlayReadyKeyMessage(d,c)),d.send(c)}).catch(i)})}onDestroying(){this.unregisterListeners(),this._clear()}onMediaAttached(e,t){if(!this.config.emeEnabled)return;const n=t.media;this.media=n,Bi(n,"encrypted",this.onMediaEncrypted),Bi(n,"waitingforkey",this.onWaitingForKey);const r=this.mediaResolved;r?r():this.mediaKeys=n.mediaKeys}onMediaDetached(){const e=this.media;e&&(Ki(e,"encrypted",this.onMediaEncrypted),Ki(e,"waitingforkey",this.onWaitingForKey),this.media=null,this.mediaKeys=null)}_clear(){var e;this._requestLicenseFailureCount=0,this.keyIdToKeySessionPromise={},this.bannedKeyIds={};const t=this.mediaResolved;if(t&&t(),!this.mediaKeys&&!this.mediaKeySessions.length)return;const n=this.media,r=this.mediaKeySessions.slice();this.mediaKeySessions=[],this.mediaKeys=null,Mi.clearKeyUriToKeyIdMap();const i=r.length;_a.CDMCleanupPromise=Promise.all(r.map(s=>this.removeSession(s)).concat((n==null||(e=n.setMediaKeys(null))==null?void 0:e.catch(s=>{this.log(`Could not clear media keys: ${s}`),this.hls&&this.hls.trigger(g.ERROR,{type:fe.OTHER_ERROR,details:z.KEY_SYSTEM_DESTROY_MEDIA_KEYS_ERROR,fatal:!1,error:new Error(`Could not clear media keys: ${s}`)})}))||Promise.resolve())).catch(s=>{this.log(`Could not close sessions and clear media keys: ${s}`),this.hls&&this.hls.trigger(g.ERROR,{type:fe.OTHER_ERROR,details:z.KEY_SYSTEM_DESTROY_CLOSE_SESSION_ERROR,fatal:!1,error:new Error(`Could not close sessions and clear media keys: ${s}`)})}).then(()=>{i&&this.log("finished closing key sessions and clearing media keys")})}onManifestLoading(){this._clear()}onManifestLoaded(e,{sessionKeys:t}){if(!(!t||!this.config.emeEnabled)&&!this.keyFormatPromise){const n=t.reduce((r,i)=>(r.indexOf(i.keyFormat)===-1&&r.push(i.keyFormat),r),[]);this.log(`Selecting key-system from session-keys ${n.join(", ")}`),this.keyFormatPromise=this.getKeyFormatPromise(n)}}removeSession(e){const{mediaKeysSession:t,licenseXhr:n,decryptdata:r}=e;if(t){this.log(`Remove licenses and keys and close session "${t.sessionId}" keyId: ${ue((r==null?void 0:r.keyId)||[])}`),e._onmessage&&(t.removeEventListener("message",e._onmessage),e._onmessage=void 0),e._onkeystatuseschange&&(t.removeEventListener("keystatuseschange",e._onkeystatuseschange),e._onkeystatuseschange=void 0),n&&n.readyState!==XMLHttpRequest.DONE&&n.abort(),e.mediaKeysSession=e.decryptdata=e.licenseXhr=void 0;const i=this.mediaKeySessions.indexOf(e);i>-1&&this.mediaKeySessions.splice(i,1);const{keyStatusTimeouts:s}=e;s&&Object.keys(s).forEach(c=>self.clearTimeout(s[c]));const{drmSystemOptions:l}=this.config;return(Ui(l)?new Promise((c,p)=>{self.setTimeout(()=>p(new Error("MediaKeySession.remove() timeout")),8e3),t.remove().then(c).catch(p)}):Promise.resolve()).catch(c=>{this.log(`Could not remove session: ${c}`),this.hls&&this.hls.trigger(g.ERROR,{type:fe.OTHER_ERROR,details:z.KEY_SYSTEM_DESTROY_REMOVE_SESSION_ERROR,fatal:!1,error:new Error(`Could not remove session: ${c}`)})}).then(()=>t.close()).catch(c=>{this.log(`Could not close session: ${c}`),this.hls&&this.hls.trigger(g.ERROR,{type:fe.OTHER_ERROR,details:z.KEY_SYSTEM_DESTROY_CLOSE_SESSION_ERROR,fatal:!1,error:new Error(`Could not close session: ${c}`)})})}return Promise.resolve()}}_a.CDMCleanupPromise=void 0;function po(a){if(!a)throw new Error("Could not read keyId of undefined decryptdata");if(a.keyId===null)throw new Error("keyId is null");return ue(a.keyId)}function Ac(a,e){if(a.keyId&&e.mediaKeysSession.keyStatuses.has(a.keyId))return e.mediaKeysSession.keyStatuses.get(a.keyId);if(a.matches(e.decryptdata))return e.keyStatus}class ss 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}}function Fl(a,e){const t=a==="output-restricted",n=t?z.KEY_SYSTEM_STATUS_OUTPUT_RESTRICTED:z.KEY_SYSTEM_STATUS_INTERNAL_ERROR;return new ss({type:fe.KEY_SYSTEM_ERROR,details:n,fatal:!1,decryptdata:e},t?"HDCP level output restricted":`key status changed to "${a}"`)}class Dc{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(g.MEDIA_ATTACHING,this.onMediaAttaching,this),this.hls.on(g.MEDIA_DETACHING,this.onMediaDetaching,this)}unregisterListeners(){this.hls.off(g.MEDIA_ATTACHING,this.onMediaAttaching,this),this.hls.off(g.MEDIA_DETACHING,this.onMediaDetaching,this)}destroy(){this.timer&&clearInterval(this.timer),this.unregisterListeners(),this.isVideoPlaybackQualityAvailable=!1,this.media=null}onMediaAttaching(e,t){const n=this.hls.config;if(n.capLevelOnFPSDrop){const r=t.media instanceof self.HTMLVideoElement?t.media:null;this.media=r,r&&typeof r.getVideoPlaybackQuality=="function"&&(this.isVideoPlaybackQualityAvailable=!0),self.clearInterval(this.timer),this.timer=self.setInterval(this.checkFPSInterval.bind(this),n.fpsDroppedMonitoringPeriod)}}onMediaDetaching(){this.media=null}checkFPS(e,t,n){const r=performance.now();if(t){if(this.lastTime){const i=r-this.lastTime,s=n-this.lastDroppedFrames,l=t-this.lastDecodedFrames,d=1e3*s/i,c=this.hls;if(c.trigger(g.FPS_DROP,{currentDropped:s,currentDecoded:l,totalDroppedFrames:n}),d>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(g.FPS_DROP_LEVEL_CAPPING,{level:p,droppedLevel:c.currentLevel}),c.autoLevelCapping=p,this.streamController.nextLevelSwitch())}}this.lastTime=r,this.lastDroppedFrames=n,this.lastDecodedFrames=t}}checkFPSInterval(){const e=this.media;if(e)if(this.isVideoPlaybackQualityAvailable){const t=e.getVideoPlaybackQuality();this.checkFPS(e,t.totalVideoFrames,t.droppedVideoFrames)}else this.checkFPS(e,e.webkitDecodedFrameCount,e.webkitDroppedFrameCount)}}function $l(a,e){let t;try{t=new Event("addtrack")}catch(n){t=document.createEvent("Event"),t.initEvent("addtrack",!1,!1)}t.track=a,e.dispatchEvent(t)}function Ul(a,e){const t=a.mode;if(t==="disabled"&&(a.mode="hidden"),a.cues&&!a.cues.getCueById(e.id))try{if(a.addCue(e),!a.cues.getCueById(e.id))throw new Error(`addCue is failed for: ${e}`)}catch(n){ie.debug(`[texttrack-utils]: ${n}`);try{const r=new self.TextTrackCue(e.startTime,e.endTime,e.text);r.id=e.id,a.addCue(r)}catch(r){ie.debug(`[texttrack-utils]: Legacy TextTrackCue fallback failed: ${r}`)}}t==="disabled"&&(a.mode=t)}function xa(a,e){const t=a.mode;if(t==="disabled"&&(a.mode="hidden"),a.cues)for(let n=a.cues.length;n--;)e&&a.cues[n].removeEventListener("enter",e),a.removeCue(a.cues[n]);t==="disabled"&&(a.mode=t)}function Yo(a,e,t,n){const r=a.mode;if(r==="disabled"&&(a.mode="hidden"),a.cues&&a.cues.length>0){const i=Rc(a.cues,e,t);for(let s=0;s<i.length;s++)(!n||n(i[s]))&&a.removeCue(i[s])}r==="disabled"&&(a.mode=r)}function Ic(a,e){if(e<=a[0].startTime)return 0;const t=a.length-1;if(e>a[t].endTime)return-1;let n=0,r=t,i;for(;n<=r;)if(i=Math.floor((r+n)/2),e<a[i].startTime)r=i-1;else if(e>a[i].startTime&&n<t)n=i+1;else return i;return a[n].startTime-e<e-a[r].startTime?n:r}function Rc(a,e,t){const n=[],r=Ic(a,e);if(r>-1)for(let i=r,s=a.length;i<s;i++){const l=a[i];if(l.startTime>=e&&l.endTime<=t)n.push(l);else if(l.startTime>t)return n}return n}function go(a){const e=[];for(let t=0;t<a.length;t++){const n=a[t];(n.kind==="subtitles"||n.kind==="captions")&&n.label&&e.push(a[t])}return e}class Lc extends Uo{constructor(e){super(e,"subtitle-track-controller"),this.media=null,this.tracks=[],this.groupIds=null,this.tracksInGroup=[],this.trackId=-1,this.currentTrack=null,this.selectDefaultTrack=!0,this.queuedDefaultTrack=-1,this.useTextTrackPolling=!1,this.subtitlePollingInterval=-1,this._subtitleDisplay=!0,this.asyncPollTrackChange=()=>this.pollTrackChange(0),this.onTextTracksChanged=()=>{if(this.useTextTrackPolling||self.clearInterval(this.subtitlePollingInterval),!this.media||!this.hls.config.renderTextTracksNatively)return;let t=null;const n=go(this.media.textTracks);for(let i=0;i<n.length;i++)if(n[i].mode==="hidden")t=n[i];else if(n[i].mode==="showing"){t=n[i];break}const r=this.findTrackForTextTrack(t);this.subtitleTrack!==r&&this.setSubtitleTrack(r)},this.registerListeners()}destroy(){this.unregisterListeners(),this.tracks.length=0,this.tracksInGroup.length=0,this.currentTrack=null,this.onTextTracksChanged=this.asyncPollTrackChange=null,super.destroy()}get subtitleDisplay(){return this._subtitleDisplay}set subtitleDisplay(e){this._subtitleDisplay=e,this.trackId>-1&&this.toggleTrackModes()}registerListeners(){const{hls:e}=this;e.on(g.MEDIA_ATTACHED,this.onMediaAttached,this),e.on(g.MEDIA_DETACHING,this.onMediaDetaching,this),e.on(g.MANIFEST_LOADING,this.onManifestLoading,this),e.on(g.MANIFEST_PARSED,this.onManifestParsed,this),e.on(g.LEVEL_LOADING,this.onLevelLoading,this),e.on(g.LEVEL_SWITCHING,this.onLevelSwitching,this),e.on(g.SUBTITLE_TRACK_LOADED,this.onSubtitleTrackLoaded,this),e.on(g.ERROR,this.onError,this)}unregisterListeners(){const{hls:e}=this;e.off(g.MEDIA_ATTACHED,this.onMediaAttached,this),e.off(g.MEDIA_DETACHING,this.onMediaDetaching,this),e.off(g.MANIFEST_LOADING,this.onManifestLoading,this),e.off(g.MANIFEST_PARSED,this.onManifestParsed,this),e.off(g.LEVEL_LOADING,this.onLevelLoading,this),e.off(g.LEVEL_SWITCHING,this.onLevelSwitching,this),e.off(g.SUBTITLE_TRACK_LOADED,this.onSubtitleTrackLoaded,this),e.off(g.ERROR,this.onError,this)}onMediaAttached(e,t){this.media=t.media,this.media&&(this.queuedDefaultTrack>-1&&(this.subtitleTrack=this.queuedDefaultTrack,this.queuedDefaultTrack=-1),this.useTextTrackPolling=!(this.media.textTracks&&"onchange"in this.media.textTracks),this.useTextTrackPolling?this.pollTrackChange(500):this.media.textTracks.addEventListener("change",this.asyncPollTrackChange))}pollTrackChange(e){self.clearInterval(this.subtitlePollingInterval),this.subtitlePollingInterval=self.setInterval(this.onTextTracksChanged,e)}onMediaDetaching(e,t){const n=this.media;if(!n)return;const r=!!t.transferMedia;if(self.clearInterval(this.subtitlePollingInterval),this.useTextTrackPolling||n.textTracks.removeEventListener("change",this.asyncPollTrackChange),this.trackId>-1&&(this.queuedDefaultTrack=this.trackId),this.subtitleTrack=-1,this.media=null,r)return;go(n.textTracks).forEach(s=>{xa(s)})}onManifestLoading(){this.tracks=[],this.groupIds=null,this.tracksInGroup=[],this.trackId=-1,this.currentTrack=null,this.selectDefaultTrack=!0}onManifestParsed(e,t){this.tracks=t.subtitleTracks}onSubtitleTrackLoaded(e,t){const{id:n,groupId:r,details:i}=t,s=this.tracksInGroup[n];if(!s||s.groupId!==r){this.warn(`Subtitle track with id:${n} and group:${r} not found in active group ${s==null?void 0:s.groupId}`);return}const l=s.details;s.details=t.details,this.log(`Subtitle track ${n} "${s.name}" lang:${s.lang} group:${r} loaded [${i.startSN}-${i.endSN}]`),n===this.trackId&&this.playlistLoaded(n,t,l)}onLevelLoading(e,t){this.switchLevel(t.level)}onLevelSwitching(e,t){this.switchLevel(t.level)}switchLevel(e){const t=this.hls.levels[e];if(!t)return;const n=t.subtitleGroups||null,r=this.groupIds;let i=this.currentTrack;if(!n||(r==null?void 0:r.length)!==(n==null?void 0:n.length)||n!=null&&n.some(s=>(r==null?void 0:r.indexOf(s))===-1)){this.groupIds=n,this.trackId=-1,this.currentTrack=null;const s=this.tracks.filter(p=>!n||n.indexOf(p.groupId)!==-1);if(s.length)this.selectDefaultTrack&&!s.some(p=>p.default)&&(this.selectDefaultTrack=!1),s.forEach((p,b)=>{p.id=b});else if(!i&&!this.tracksInGroup.length)return;this.tracksInGroup=s;const l=this.hls.config.subtitlePreference;if(!i&&l){this.selectDefaultTrack=!1;const p=Kt(l,s);if(p>-1)i=s[p];else{const b=Kt(l,this.tracks);i=this.tracks[b]}}let d=this.findTrackId(i);d===-1&&i&&(d=this.findTrackId(null));const c={subtitleTracks:s};this.log(`Updating subtitle tracks, ${s.length} track(s) found in "${n==null?void 0:n.join(",")}" group-id`),this.hls.trigger(g.SUBTITLE_TRACKS_UPDATED,c),d!==-1&&this.trackId===-1&&this.setSubtitleTrack(d)}}findTrackId(e){const t=this.tracksInGroup,n=this.selectDefaultTrack;for(let r=0;r<t.length;r++){const i=t[r];if(!(n&&!i.default||!n&&!e)&&(!e||on(i,e)))return r}if(e){for(let r=0;r<t.length;r++){const i=t[r];if($a(e.attrs,i.attrs,["LANGUAGE","ASSOC-LANGUAGE","CHARACTERISTICS"]))return r}for(let r=0;r<t.length;r++){const i=t[r];if($a(e.attrs,i.attrs,["LANGUAGE"]))return r}}return-1}findTrackForTextTrack(e){if(e){const t=this.tracksInGroup;for(let n=0;n<t.length;n++){const r=t[n];if(zo(r,e))return n}}return-1}onError(e,t){t.fatal||!t.context||t.context.type===q.SUBTITLE_TRACK&&t.context.id===this.trackId&&(!this.groupIds||this.groupIds.indexOf(t.context.groupId)!==-1)&&this.checkRetry(t)}get allSubtitleTracks(){return this.tracks}get subtitleTracks(){return this.tracksInGroup}get subtitleTrack(){return this.trackId}set subtitleTrack(e){this.selectDefaultTrack=!1,this.setSubtitleTrack(e)}setSubtitleOption(e){if(this.hls.config.subtitlePreference=e,e){if(e.id===-1)return this.setSubtitleTrack(-1),null;const t=this.allSubtitleTracks;if(this.selectDefaultTrack=!1,t.length){const n=this.currentTrack;if(n&&on(e,n))return n;const r=Kt(e,this.tracksInGroup);if(r>-1){const i=this.tracksInGroup[r];return this.setSubtitleTrack(r),i}else{if(n)return null;{const i=Kt(e,t);if(i>-1)return t[i]}}}}return null}loadPlaylist(e){super.loadPlaylist(),this.shouldLoadPlaylist(this.currentTrack)&&this.scheduleLoading(this.currentTrack,e)}loadingPlaylist(e,t){super.loadingPlaylist(e,t);const n=e.id,r=e.groupId,i=this.getUrlWithDirectives(e.url,t),s=e.details,l=s==null?void 0:s.age;this.log(`Loading subtitle ${n} "${e.name}" lang:${e.lang} group:${r}${(t==null?void 0:t.msn)!==void 0?" at sn "+t.msn+" part "+t.part:""}${l&&s.live?" age "+l.toFixed(1)+(s.type?" "+s.type||0:""):""} ${i}`),this.hls.trigger(g.SUBTITLE_TRACK_LOADING,{url:i,id:n,groupId:r,deliveryDirectives:t||null,track:e})}toggleTrackModes(){const{media:e}=this;if(!e)return;const t=go(e.textTracks),n=this.currentTrack;let r;if(n&&(r=t.filter(i=>zo(n,i))[0],r||this.warn(`Unable to find subtitle TextTrack with name "${n.name}" and language "${n.lang}"`)),[].slice.call(t).forEach(i=>{i.mode!=="disabled"&&i!==r&&(i.mode="disabled")}),r){const i=this.subtitleDisplay?"showing":"hidden";r.mode!==i&&(r.mode=i)}}setSubtitleTrack(e){const t=this.tracksInGroup;if(!this.media){this.queuedDefaultTrack=e;return}if(e<-1||e>=t.length||!v(e)){this.warn(`Invalid subtitle track id: ${e}`);return}this.selectDefaultTrack=!1;const n=this.currentTrack,r=t[e]||null;if(this.trackId=e,this.currentTrack=r,this.toggleTrackModes(),!r){this.hls.trigger(g.SUBTITLE_TRACK_SWITCH,{id:e});return}const i=!!r.details&&!r.details.live;if(e===this.trackId&&r===n&&i)return;this.log(`Switching to subtitle-track ${e}`+(r?` "${r.name}" lang:${r.lang} group:${r.groupId}`:""));const{id:s,groupId:l="",name:d,type:c,url:p}=r;this.hls.trigger(g.SUBTITLE_TRACK_SWITCH,{id:s,groupId:l,name:d,type:c,url:p});const b=this.switchParams(r.url,n==null?void 0:n.details,r.details);this.loadPlaylist(b)}}function Oc(){try{return crypto.randomUUID()}catch(a){try{const e=URL.createObjectURL(new Blob),t=e.toString();return URL.revokeObjectURL(e),t.slice(t.lastIndexOf("/")+1)}catch(e){let t=new Date().getTime();return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,r=>{const i=(t+Math.random()*16)%16|0;return t=Math.floor(t/16),(r=="x"?i:i&3|8).toString(16)})}}}function Ua(a){let e=5381,t=a.length;for(;t;)e=e*33^a.charCodeAt(--t);return(e>>>0).toString()}const Ea=.025;let vo=function(a){return a[a.Point=0]="Point",a[a.Range=1]="Range",a}({});function Pc(a,e,t){return`${a.identifier}-${t+1}-${Ua(e)}`}class Mc{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){var t;if(e>0&&e>=this.assetList.length)return!0;const n=this.playoutLimit;return e<=0||isNaN(n)?!1:n===0?!0:(((t=this.assetList[e])==null?void 0:t.startOffset)||0)>n}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 Xo(e,t)}return e}get startOffset(){return this.cue.pre?0:this.startTime}get startIsAligned(){if(this.startTime===0||this.snapOptions.out)return!0;const e=this.dateRange.tagAnchor;if(e){const t=this.dateRange.startTime,n=Xo(t,e);return t-n<.1}return!1}get resumptionOffset(){const e=this.resumeOffset,t=v(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 Xo(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)<Ea))}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"?vo.Range:vo.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 kc(this)}}function Xo(a,e){return a-e.start<e.duration/2&&!(Math.abs(a-(e.start+e.duration))<Ea)?e.start:e.start+e.duration}function zl(a,e,t){const n=new self.URL(a,t);return n.protocol!=="data:"&&n.searchParams.set("_HLS_primary_id",e),n}function Qo(a,e){for(;(t=a.assetList[++e])!=null&&t.error;)var t;return e}function kc(a){return`["${a.identifier}" ${a.cue.pre?"<pre>":a.cue.post?"<post>":""}${a.timelineStart.toFixed(2)}-${a.resumeTime.toFixed(2)}]`}function Sa(a){const e=a.timelineStart,t=a.duration||0;return`["${a.identifier}" ${e.toFixed(2)}-${(e+t).toFixed(2)}]`}class Nc{constructor(e,t,n,r){this.hls=void 0,this.interstitial=void 0,this.assetItem=void 0,this.tracks=null,this.hasDetails=!1,this.mediaAttached=null,this._currentTime=void 0,this._bufferedEosTime=void 0,this.checkPlayout=()=>{this.reachedPlayout(this.currentTime)&&this.hls&&this.hls.trigger(g.PLAYOUT_LIMIT_REACHED,{})};const i=this.hls=new e(t);this.interstitial=n,this.assetItem=r;const s=()=>{this.hasDetails=!0};i.once(g.LEVEL_LOADED,s),i.once(g.AUDIO_TRACK_LOADED,s),i.once(g.SUBTITLE_TRACK_LOADED,s),i.on(g.MEDIA_ATTACHING,(l,{media:d})=>{this.removeMediaListeners(),this.mediaAttached=d,this.interstitial.playoutLimit&&(d.addEventListener("timeupdate",this.checkPlayout),this.appendInPlace&&i.on(g.BUFFER_APPENDED,()=>{const p=this.bufferedEnd;this.reachedPlayout(p)&&(this._bufferedEosTime=p,i.trigger(g.BUFFERED_TO_END,void 0))}))})}get appendInPlace(){return this.interstitial.appendInPlace}loadSource(){const e=this.hls;if(e)if(e.url)e.levels.length&&!e.started&&e.startLoad(-1,!0);else{let t=this.assetItem.uri;try{t=zl(t,e.config.primarySessionId||"").href}catch(n){}e.loadSource(t)}}bufferedInPlaceToEnd(e){var t;if(!this.appendInPlace)return!1;if((t=this.hls)!=null&&t.bufferedToEnd)return!0;if(!e)return!1;const n=Math.min(this._bufferedEosTime||1/0,this.duration),r=this.timelineOffset,i=Jn.bufferInfo(e,r,0);return this.getAssetTime(i.end)>=n-.02}reachedPlayout(e){const n=this.interstitial.playoutLimit;return this.startOffset+e>=n}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=Jn.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;if(!e)return 0;const t=this.interstitial.playoutLimit;if(t){const n=t-this.startOffset;if(n>0&&n<e)return n}return e}get remaining(){const e=this.duration;return e?Math.max(0,e-this.currentTime):0}get startOffset(){return this.assetItem.startOffset}get timelineOffset(){var e;return((e=this.hls)==null?void 0:e.config.timelineOffset)||0}set timelineOffset(e){const t=this.timelineOffset;if(e!==t){const n=e-t;if(Math.abs(n)>1/9e4&&this.hls){if(this.hasDetails)throw new Error("Cannot set timelineOffset after playlists are loaded");this.hls.config.timelineOffset=e}}}getAssetTime(e){const t=this.timelineOffset,n=this.duration;return Math.min(Math.max(0,e-t),n)}removeMediaListeners(){const e=this.mediaAttached;e&&(this._currentTime=e.currentTime,this.bufferSnapShot(),e.removeEventListener("timeupdate",this.checkPlayout))}bufferSnapShot(){if(this.mediaAttached){var e;(e=this.hls)!=null&&e.bufferedToEnd&&(this._bufferedEosTime=this.bufferedEnd)}}destroy(){this.removeMediaListeners(),this.hls&&this.hls.destroy(),this.hls=null,this.tracks=this.mediaAttached=this.checkPlayout=null}attachMedia(e){var t;this.loadSource(),(t=this.hls)==null||t.attachMedia(e)}detachMedia(){var e;this.removeMediaListeners(),this.mediaAttached=null,(e=this.hls)==null||e.detachMedia()}resumeBuffering(){var e;(e=this.hls)==null||e.resumeBuffering()}pauseBuffering(){var e;(e=this.hls)==null||e.pauseBuffering()}transferMedia(){var e;return this.bufferSnapShot(),((e=this.hls)==null?void 0:e.transferMedia())||null}resetDetails(){const e=this.hls;if(e&&this.hasDetails){e.stopLoad();const t=n=>delete n.details;e.levels.forEach(t),e.allAudioTracks.forEach(t),e.allSubtitleTracks.forEach(t),this.hasDetails=!1}}on(e,t,n){var r;(r=this.hls)==null||r.on(e,t)}once(e,t,n){var r;(r=this.hls)==null||r.once(e,t)}off(e,t,n){var r;(r=this.hls)==null||r.off(e,t)}toString(){var e;return`HlsAssetPlayer: ${Sa(this.assetItem)} ${(e=this.hls)==null?void 0:e.sessionId} ${this.appendInPlace?"append-in-place":""}`}}const Kl=.033;class Bc extends Z{constructor(e,t){super("interstitials-sched",t),this.onScheduleUpdate=void 0,this.eventMap={},this.events=null,this.items=null,this.durations={primary:0,playout:0,integrated:0},this.onScheduleUpdate=e}destroy(){this.reset(),this.onScheduleUpdate=null}reset(){this.eventMap={},this.setDurations(0,0,0),this.events&&this.events.forEach(e=>e.reset()),this.events=this.items=null}resetErrorsInRange(e,t){return this.events?this.events.reduce((n,r)=>e<=r.startOffset&&t>r.startOffset?(delete r.error,n+1):n,0):0}get duration(){const e=this.items;return e?e[e.length-1].end:0}get length(){return this.items?this.items.length:0}getEvent(e){return e&&this.eventMap[e]||null}hasEvent(e){return e in this.eventMap}findItemIndex(e,t){if(e.event)return this.findEventIndex(e.event.identifier);let n=-1;e.nextEvent?n=this.findEventIndex(e.nextEvent.identifier)-1:e.previousEvent&&(n=this.findEventIndex(e.previousEvent.identifier)+1);const r=this.items;if(r)for(r[n]||(t===void 0&&(t=e.start),n=this.findItemIndexAtTime(t));n>=0&&(i=r[n])!=null&&i.event;){var i;n--}return n}findItemIndexAtTime(e,t){const n=this.items;if(n)for(let r=0;r<n.length;r++){let i=n[r];if(t&&t!=="primary"&&(i=i[t]),e===i.start||e>i.start&&e<i.end)return r}return-1}findJumpRestrictedIndex(e,t){const n=this.items;if(n)for(let r=e;r<=t&&n[r];r++){const i=n[r].event;if(i!=null&&i.restrictions.jump&&!i.appendInPlace)return r}return-1}findEventIndex(e){const t=this.items;if(t)for(let r=t.length;r--;){var n;if(((n=t[r].event)==null?void 0:n.identifier)===e)return r}return-1}findAssetIndex(e,t){const n=e.assetList,r=n.length;if(r>1)for(let i=0;i<r;i++){const s=n[i];if(!s.error){const l=s.timelineStart;if(t===l||t>l&&(t<l+(s.duration||0)||i===r-1))return i}}return 0}get assetIdAtEnd(){var e;const t=(e=this.items)==null||(e=e[this.length-1])==null?void 0:e.event;if(t){const n=t.assetList,r=n[n.length-1];if(r)return r.identifier}return null}parseInterstitialDateRanges(e,t){const n=e.main.details,{dateRanges:r}=n,i=this.events,s=this.parseDateRanges(r,{url:n.url},t),l=Object.keys(r),d=i?i.filter(c=>!l.includes(c.identifier)):[];s.length&&s.sort((c,p)=>{const b=c.cue.pre,I=c.cue.post,F=p.cue.pre,$=p.cue.post;if(b&&!F)return-1;if(F&&!b||I&&!$)return 1;if($&&!I)return-1;if(!b&&!F&&!I&&!$){const ge=c.startTime,me=p.startTime;if(ge!==me)return ge-me}return c.dateRange.tagOrder-p.dateRange.tagOrder}),this.events=s,d.forEach(c=>{this.removeEvent(c)}),this.updateSchedule(e,d)}updateSchedule(e,t=[],n=!1){const r=this.events||[];if(r.length||t.length||this.length<2){const i=this.items,s=this.parseSchedule(r,e);(n||t.length||(i==null?void 0:i.length)!==s.length||s.some((d,c)=>Math.abs(d.playout.start-i[c].playout.start)>.005||Math.abs(d.playout.end-i[c].playout.end)>.005))&&(this.items=s,this.onScheduleUpdate(t,i))}}parseDateRanges(e,t,n){const r=[],i=Object.keys(e);for(let s=0;s<i.length;s++){const l=i[s],d=e[l];if(d.isInterstitial){let c=this.eventMap[l];c?c.setDateRange(d):(c=new Mc(d,t),this.eventMap[l]=c,n===!1&&(c.appendInPlace=n)),r.push(c)}}return r}parseSchedule(e,t){const n=[],r=t.main.details,i=r.live?1/0:r.edge;let s=0;if(e=e.filter(d=>!d.error&&!(d.cue.once&&d.hasPlayed)),e.length){this.resolveOffsets(e,t);let d=0,c=0;if(e.forEach((p,b)=>{const I=p.cue.pre,F=p.cue.post,$=e[b-1]||null,ge=p.appendInPlace,me=F?i:p.startOffset,Fe=p.duration,We=p.timelineOccupancy===vo.Range?Fe:0,et=p.resumptionOffset,xt=($==null?void 0:$.startTime)===me,Ot=me+p.cumulativeDuration;let sn=ge?Ot+Fe:me+et;if(I||!F&&me<=0){const Xt=c;c+=We,p.timelineStart=Ot;const Yt=s;s+=Fe,n.push({event:p,start:Ot,end:sn,playout:{start:Yt,end:s},integrated:{start:Xt,end:c}})}else if(me<=i){if(!xt){const Ft=me-d;if(Ft>Kl){const xn=d,nr=c;c+=Ft;const mr=s;s+=Ft;const Tr={previousEvent:e[b-1]||null,nextEvent:p,start:xn,end:xn+Ft,playout:{start:mr,end:s},integrated:{start:nr,end:c}};n.push(Tr)}else Ft>0&&$&&($.cumulativeDuration+=Ft,n[n.length-1].end=me)}F&&(sn=Ot),p.timelineStart=Ot;const Xt=c;c+=We;const Yt=s;s+=Fe,n.push({event:p,start:Ot,end:sn,playout:{start:Yt,end:s},integrated:{start:Xt,end:c}})}else return;const Pt=p.resumeTime;F||Pt>i?d=i:d=Pt}),d<i){var l;const p=d,b=c,I=i-d;c+=I;const F=s;s+=I,n.push({previousEvent:((l=n[n.length-1])==null?void 0:l.event)||null,nextEvent:null,start:d,end:p+I,playout:{start:F,end:s},integrated:{start:b,end:c}})}this.setDurations(i,s,c)}else n.push({previousEvent:null,nextEvent:null,start:0,end:i,playout:{start:0,end:i},integrated:{start:0,end:i}}),this.setDurations(i,i,i);return n}setDurations(e,t,n){this.durations={primary:e,playout:t,integrated:n}}resolveOffsets(e,t){const n=t.main.details,r=n.live?1/0:n.edge;let i=0,s=-1;e.forEach((l,d)=>{const c=l.cue.pre,p=l.cue.post,b=c?0:p?r:l.startTime;this.updateAssetDurations(l),s===b?l.cumulativeDuration=i:(i=0,s=b),!p&&l.snapOptions.in&&(l.resumeAnchor=Nn(null,n.fragments,l.startOffset+l.resumptionOffset,0,0)||void 0),l.appendInPlace&&!l.appendInPlaceStarted&&(this.primaryCanResumeInPlaceAt(l,t)||(l.appendInPlace=!1)),!l.appendInPlace&&d+1<e.length&&e[d+1].startTime-e[d].resumeTime<Kl&&(e[d+1].appendInPlace=!1,e[d+1].appendInPlace&&this.warn(`Could not change append strategy for abutting event ${l}`));const F=v(l.resumeOffset)?l.resumeOffset:l.duration;i+=F})}primaryCanResumeInPlaceAt(e,t){const n=e.resumeTime,r=e.startTime+e.resumptionOffset;return Math.abs(n-r)>Ea?(this.log(`"${e.identifier}" resumption ${n} not aligned with estimated timeline end ${r}`),!1):!Object.keys(t).some(s=>{const l=t[s].details,d=l.edge;if(n>=d)return this.log(`"${e.identifier}" resumption ${n} past ${s} playlist end ${d}`),!1;const c=Nn(null,l.fragments,n);if(!c)return this.log(`"${e.identifier}" resumption ${n} 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-n)<Ea+p||Math.abs(c.end-n)<Ea+p?!1:(this.log(`"${e.identifier}" resumption ${n} not aligned with ${s} fragment bounds (${c.start}-${c.end} sn: ${c.sn} cc: ${c.cc})`),!0)})}updateAssetDurations(e){if(!e.assetListLoaded)return;const t=e.timelineStart;let n=0,r=!1,i=!1;for(let s=0;s<e.assetList.length;s++){const l=e.assetList[s],d=t+n;l.startOffset=n,l.timelineStart=d,r||(r=l.duration===null),i||(i=!!l.error);const c=l.error?0:l.duration||0;n+=c}r&&!i?e.duration=Math.max(n,e.duration):e.duration=n}removeEvent(e){e.reset(),delete this.eventMap[e.identifier]}}function gs(a){return`[${a.event?'"'+a.event.identifier+'"':"primary"}: ${a.start.toFixed(2)}-${a.end.toFixed(2)}]`}class Fc{constructor(e){this.hls=void 0,this.hls=e}destroy(){this.hls=null}loadAssetList(e,t){const n=e.assetListUrl;let r;try{r=zl(n,this.hls.sessionId,e.baseUrl)}catch(I){const F=this.assignAssetListError(e,z.ASSET_LIST_LOAD_ERROR,I,n);this.hls.trigger(g.ERROR,F);return}t&&r.protocol!=="data:"&&r.searchParams.set("_HLS_start_offset",""+t);const i=this.hls.config,s=i.loader,l=new s(i),d={responseType:"json",url:r.href},c=i.interstitialAssetListLoadPolicy.default,p={loadPolicy:c,timeout:c.maxLoadTimeMs,maxRetry:0,retryDelay:0,maxRetryDelay:0},b={onSuccess:(I,F,$,ge)=>{const me=I.data,Fe=me==null?void 0:me.ASSETS;if(!Array.isArray(Fe)){const We=this.assignAssetListError(e,z.ASSET_LIST_PARSING_ERROR,new Error("Invalid interstitial asset list"),$.url,F,ge);this.hls.trigger(g.ERROR,We);return}e.assetListResponse=me,this.hls.trigger(g.ASSET_LIST_LOADED,{event:e,assetListResponse:me,networkDetails:ge})},onError:(I,F,$,ge)=>{const me=this.assignAssetListError(e,z.ASSET_LIST_LOAD_ERROR,new Error(`Error loading X-ASSET-LIST: HTTP status ${I.code} ${I.text} (${F.url})`),F.url,ge,$);this.hls.trigger(g.ERROR,me)},onTimeout:(I,F,$)=>{const ge=this.assignAssetListError(e,z.ASSET_LIST_LOAD_TIMEOUT,new Error(`Timeout loading X-ASSET-LIST (${F.url})`),F.url,I,$);this.hls.trigger(g.ERROR,ge)}};return l.load(d,p,b),this.hls.trigger(g.ASSET_LIST_LOADING,{event:e}),l}assignAssetListError(e,t,n,r,i,s){return e.error=n,{type:fe.NETWORK_ERROR,details:t,fatal:!1,interstitial:e,url:r,error:n,networkDetails:s,stats:i}}}function Hl(a){var e;a==null||(e=a.play())==null||e.catch(()=>{})}function yo(a,e){return`[${a}] Advancing timeline position to ${e}`}class $c extends Z{constructor(e,t){super("interstitials",e.logger),this.HlsPlayerClass=void 0,this.hls=void 0,this.assetListLoader=void 0,this.mediaSelection=null,this.altSelection=null,this.media=null,this.detachedData=null,this.requiredTracks=null,this.manager=null,this.playerQueue=[],this.bufferedPos=-1,this.timelinePos=-1,this.schedule=void 0,this.playingItem=null,this.bufferingItem=null,this.waitingItem=null,this.endedItem=null,this.playingAsset=null,this.endedAsset=null,this.bufferingAsset=null,this.shouldPlay=!1,this.onPlay=()=>{this.shouldPlay=!0},this.onPause=()=>{this.shouldPlay=!1},this.onSeeking=()=>{const n=this.currentTime;if(n===void 0||this.playbackDisabled||!this.schedule)return;const r=n-this.timelinePos;if(Math.abs(r)<1/7056e5)return;const s=r<=-.01;this.timelinePos=n,this.bufferedPos=n;const l=this.playingItem;if(!l){this.checkBuffer();return}if(s&&this.schedule.resetErrorsInRange(n,n-r)&&this.updateSchedule(!0),this.checkBuffer(),s&&n<l.start||n>=l.end){var d;const F=this.findItemIndex(l);let $=this.schedule.findItemIndexAtTime(n);if($===-1&&($=F+(s?-1:1),this.log(`seeked ${s?"back ":""}to position not covered by schedule ${n} (resolving from ${F} to ${$})`)),!this.isInterstitial(l)&&(d=this.media)!=null&&d.paused&&(this.shouldPlay=!1),!s&&$>F){const ge=this.schedule.findJumpRestrictedIndex(F+1,$);if(ge>F){this.setSchedulePosition(ge);return}}this.setSchedulePosition($);return}const c=this.playingAsset;if(!c){if(this.playingLastItem&&this.isInterstitial(l)){const F=l.event.assetList[0];F&&(this.endedItem=this.playingItem,this.playingItem=null,this.setScheduleToAssetAtTime(n,F))}return}const p=c.timelineStart,b=c.duration||0;if(s&&n<p||n>=p+b){var I;(I=l.event)!=null&&I.appendInPlace&&(this.clearAssetPlayers(l.event,l),this.flushFrontBuffer(n)),this.setScheduleToAssetAtTime(n,c)}},this.onTimeupdate=()=>{const n=this.currentTime;if(n===void 0||this.playbackDisabled)return;if(n>this.timelinePos)this.timelinePos=n,n>this.bufferedPos&&this.checkBuffer();else return;const r=this.playingItem;if(!r||this.playingLastItem)return;if(n>=r.end){this.timelinePos=r.end;const l=this.findItemIndex(r);this.setSchedulePosition(l+1)}const i=this.playingAsset;if(!i)return;const s=i.timelineStart+(i.duration||0);n>=s&&this.setScheduleToAssetAtTime(n,i)},this.onScheduleUpdate=(n,r)=>{const i=this.schedule;if(!i)return;const s=this.playingItem,l=i.events||[],d=i.items||[],c=i.durations,p=n.map(ge=>ge.identifier),b=!!(l.length||p.length);(b||r)&&this.log(`INTERSTITIALS_UPDATED (${l.length}): ${l}
|
|
|
Schedule: ${d.map(ge=>gs(ge))} pos: ${this.timelinePos}`),p.length&&this.log(`Removed events ${p}`);let I=null,F=null;s&&(I=this.updateItem(s,this.timelinePos),this.itemsMatch(s,I)?this.playingItem=I:this.waitingItem=this.endedItem=null),this.waitingItem=this.updateItem(this.waitingItem),this.endedItem=this.updateItem(this.endedItem);const $=this.bufferingItem;if($&&(F=this.updateItem($,this.bufferedPos),this.itemsMatch($,F)?this.bufferingItem=F:$.event&&(this.bufferingItem=this.playingItem,this.clearInterstitial($.event,null))),n.forEach(ge=>{ge.assetList.forEach(me=>{this.clearAssetPlayer(me.identifier,null)})}),this.playerQueue.forEach(ge=>{if(ge.interstitial.appendInPlace){const me=ge.assetItem.timelineStart,Fe=ge.timelineOffset-me;if(Fe)try{ge.timelineOffset=me}catch(We){Math.abs(Fe)>Ea&&this.warn(`${We} ("${ge.assetId}" ${ge.timelineOffset}->${me})`)}}}),b||r){if(this.hls.trigger(g.INTERSTITIALS_UPDATED,{events:l.slice(0),schedule:d.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}s&&this.trimInPlace(I,s),$&&F!==I&&this.trimInPlace(F,$),this.checkBuffer()}},this.hls=e,this.HlsPlayerClass=t,this.assetListLoader=new Fc(e),this.schedule=new Bc(this.onScheduleUpdate,e.logger),this.registerListeners()}registerListeners(){const e=this.hls;e&&(e.on(g.MEDIA_ATTACHING,this.onMediaAttaching,this),e.on(g.MEDIA_ATTACHED,this.onMediaAttached,this),e.on(g.MEDIA_DETACHING,this.onMediaDetaching,this),e.on(g.MANIFEST_LOADING,this.onManifestLoading,this),e.on(g.LEVEL_UPDATED,this.onLevelUpdated,this),e.on(g.AUDIO_TRACK_SWITCHING,this.onAudioTrackSwitching,this),e.on(g.AUDIO_TRACK_UPDATED,this.onAudioTrackUpdated,this),e.on(g.SUBTITLE_TRACK_SWITCH,this.onSubtitleTrackSwitch,this),e.on(g.SUBTITLE_TRACK_UPDATED,this.onSubtitleTrackUpdated,this),e.on(g.EVENT_CUE_ENTER,this.onInterstitialCueEnter,this),e.on(g.ASSET_LIST_LOADED,this.onAssetListLoaded,this),e.on(g.BUFFER_APPENDED,this.onBufferAppended,this),e.on(g.BUFFER_FLUSHED,this.onBufferFlushed,this),e.on(g.BUFFERED_TO_END,this.onBufferedToEnd,this),e.on(g.MEDIA_ENDED,this.onMediaEnded,this),e.on(g.ERROR,this.onError,this),e.on(g.DESTROYING,this.onDestroying,this))}unregisterListeners(){const e=this.hls;e&&(e.off(g.MEDIA_ATTACHING,this.onMediaAttaching,this),e.off(g.MEDIA_ATTACHED,this.onMediaAttached,this),e.off(g.MEDIA_DETACHING,this.onMediaDetaching,this),e.off(g.MANIFEST_LOADING,this.onManifestLoading,this),e.off(g.LEVEL_UPDATED,this.onLevelUpdated,this),e.off(g.AUDIO_TRACK_SWITCHING,this.onAudioTrackSwitching,this),e.off(g.AUDIO_TRACK_UPDATED,this.onAudioTrackUpdated,this),e.off(g.SUBTITLE_TRACK_SWITCH,this.onSubtitleTrackSwitch,this),e.off(g.SUBTITLE_TRACK_UPDATED,this.onSubtitleTrackUpdated,this),e.off(g.EVENT_CUE_ENTER,this.onInterstitialCueEnter,this),e.off(g.ASSET_LIST_LOADED,this.onAssetListLoaded,this),e.off(g.BUFFER_CODECS,this.onBufferCodecs,this),e.off(g.BUFFER_APPENDED,this.onBufferAppended,this),e.off(g.BUFFER_FLUSHED,this.onBufferFlushed,this),e.off(g.BUFFERED_TO_END,this.onBufferedToEnd,this),e.off(g.MEDIA_ENDED,this.onMediaEnded,this),e.off(g.ERROR,this.onError,this),e.off(g.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.schedule=this.manager=null,this.hls=this.HlsPlayerClass=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){Ki(e,"play",this.onPlay),Ki(e,"pause",this.onPause),Ki(e,"seeking",this.onSeeking),Ki(e,"timeupdate",this.onTimeupdate)}onMediaAttaching(e,t){const n=this.media=t.media;Bi(n,"seeking",this.onSeeking),Bi(n,"timeupdate",this.onTimeupdate),Bi(n,"play",this.onPlay),Bi(n,"pause",this.onPause)}onMediaAttached(e,t){const n=this.effectivePlayingItem,r=this.detachedData;if(this.detachedData=null,n===null)this.checkStart();else if(!r){this.clearScheduleState();const i=this.findItemIndex(n);this.setSchedulePosition(i)}}clearScheduleState(){this.log("clear schedule state"),this.playingItem=this.bufferingItem=this.waitingItem=this.endedItem=this.playingAsset=this.endedAsset=this.bufferingAsset=null}onMediaDetaching(e,t){const n=!!t.transferMedia,r=this.media;if(this.media=null,!n&&(r&&this.removeMediaListeners(r),this.detachedData)){const i=this.getBufferingPlayer();i&&(this.log(`Removing schedule state for detachedData and ${i}`),this.playingAsset=this.endedAsset=this.bufferingAsset=this.bufferingItem=this.waitingItem=this.detachedData=null,i.detachMedia()),this.shouldPlay=!1}}get interstitialsManager(){if(!this.hls)return null;if(this.manager)return this.manager;const e=this,t=()=>e.bufferingItem||e.waitingItem,n=b=>b&&e.getAssetPlayer(b.identifier),r=(b,I,F,$,ge)=>{if(b){let me=b[I].start;const Fe=b.event;if(Fe){if(I==="playout"||Fe.timelineOccupancy!==vo.Point){const We=n(F);(We==null?void 0:We.interstitial)===Fe&&(me+=We.assetItem.startOffset+We[ge])}}else{const We=$==="bufferedPos"?s():e[$];me+=We-b.start}return me}return 0},i=(b,I)=>{var F;if(b!==0&&I!=="primary"&&(F=e.schedule)!=null&&F.length){var $;const ge=e.schedule.findItemIndexAtTime(b),me=($=e.schedule.items)==null?void 0:$[ge];if(me){const Fe=me[I].start-me.start;return b+Fe}}return b},s=()=>{const b=e.bufferedPos;return b===Number.MAX_VALUE?l("primary"):Math.max(b,0)},l=b=>{var I,F;return(I=e.primaryDetails)!=null&&I.live?e.primaryDetails.edge:((F=e.schedule)==null?void 0:F.durations[b])||0},d=(b,I)=>{var F,$;const ge=e.effectivePlayingItem;if(ge!=null&&(F=ge.event)!=null&&F.restrictions.skip||!e.schedule)return;e.log(`seek to ${b} "${I}"`);const me=e.effectivePlayingItem,Fe=e.schedule.findItemIndexAtTime(b,I),We=($=e.schedule.items)==null?void 0:$[Fe],et=e.getBufferingPlayer(),xt=et==null?void 0:et.interstitial,Ot=xt==null?void 0:xt.appendInPlace,sn=me&&e.itemsMatch(me,We);if(me&&(Ot||sn)){const Pt=n(e.playingAsset),Xt=(Pt==null?void 0:Pt.media)||e.primaryMedia;if(Xt){const Yt=I==="primary"?Xt.currentTime:r(me,I,e.playingAsset,"timelinePos","currentTime"),Ft=b-Yt,xn=(Ot?Yt:Xt.currentTime)+Ft;if(xn>=0&&(!Pt||Ot||xn<=Pt.duration)){Xt.currentTime=xn;return}}}if(We){let Pt=b;if(I!=="primary"){const Yt=We[I].start,Ft=b-Yt;Pt=We.start+Ft}const Xt=!e.isInterstitial(We);if((!e.isInterstitial(me)||me.event.appendInPlace)&&(Xt||We.event.appendInPlace)){const Yt=e.media||(Ot?et==null?void 0:et.media:null);Yt&&(Yt.currentTime=Pt)}else if(me){const Yt=e.findItemIndex(me);if(Fe>Yt){const xn=e.schedule.findJumpRestrictedIndex(Yt+1,Fe);if(xn>Yt){e.setSchedulePosition(xn);return}}let Ft=0;if(Xt)e.timelinePos=Pt,e.checkBuffer();else{const xn=We.event.assetList,nr=b-(We[I]||We).start;for(let mr=xn.length;mr--;){const Tr=xn[mr];if(Tr.duration&&nr>=Tr.startOffset&&nr<Tr.startOffset+Tr.duration){Ft=mr;break}}}e.setSchedulePosition(Fe,Ft)}}},c=()=>{const b=e.effectivePlayingItem;if(e.isInterstitial(b))return b;const I=t();return e.isInterstitial(I)?I:null},p={get bufferedEnd(){const b=t(),I=e.bufferingItem;if(I&&I===b){var F;return r(I,"playout",e.bufferingAsset,"bufferedPos","bufferedEnd")-I.playout.start||((F=e.bufferingAsset)==null?void 0:F.startOffset)||0}return 0},get currentTime(){const b=c(),I=e.effectivePlayingItem;return I&&I===b?r(I,"playout",e.effectivePlayingAsset,"timelinePos","currentTime")-I.playout.start:0},set currentTime(b){const I=c(),F=e.effectivePlayingItem;F&&F===I&&d(b+F.playout.start,"playout")},get duration(){const b=c();return b?b.playout.end-b.playout.start:0},get assetPlayers(){var b;const I=(b=c())==null?void 0:b.event.assetList;return I?I.map(F=>e.getAssetPlayer(F.identifier)):[]},get playingIndex(){var b;const I=(b=c())==null?void 0:b.event;return I&&e.effectivePlayingAsset?I.findAssetIndex(e.effectivePlayingAsset):-1},get scheduleItem(){return c()}};return this.manager={get events(){var b;return((b=e.schedule)==null||(b=b.events)==null?void 0:b.slice(0))||[]},get schedule(){var b;return((b=e.schedule)==null||(b=b.items)==null?void 0:b.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 b=t();return e.findItemIndex(b)},get playingAsset(){return e.effectivePlayingAsset},get playingItem(){return e.effectivePlayingItem},get playingIndex(){const b=e.effectivePlayingItem;return e.findItemIndex(b)},primary:{get bufferedEnd(){return s()},get currentTime(){const b=e.timelinePos;return b>0?b:0},set currentTime(b){d(b,"primary")},get duration(){return l("primary")},get seekableStart(){var b;return((b=e.primaryDetails)==null?void 0:b.fragmentStart)||0}},integrated:{get bufferedEnd(){return r(t(),"integrated",e.bufferingAsset,"bufferedPos","bufferedEnd")},get currentTime(){return r(e.effectivePlayingItem,"integrated",e.effectivePlayingAsset,"timelinePos","currentTime")},set currentTime(b){d(b,"integrated")},get duration(){return l("integrated")},get seekableStart(){var b;return i(((b=e.primaryDetails)==null?void 0:b.fragmentStart)||0,"integrated")}},skip:()=>{const b=e.effectivePlayingItem,I=b==null?void 0:b.event;if(I&&!I.restrictions.skip){const F=e.findItemIndex(b);if(I.appendInPlace){const $=b.playout.start+b.event.duration;d($+.001,"playout")}else e.advanceAfterAssetEnded(I,F,1/0)}}}}get effectivePlayingItem(){return this.waitingItem||this.playingItem||this.endedItem}get effectivePlayingAsset(){return this.playingAsset||this.endedAsset}get playingLastItem(){var e;const t=this.playingItem,n=(e=this.schedule)==null?void 0:e.items;return!this.playbackStarted||!t||!n?!1:this.findItemIndex(t)===n.length-1}get playbackStarted(){return this.effectivePlayingItem!==null}get currentTime(){var e,t;if(this.mediaSelection===null)return;const n=this.waitingItem||this.playingItem;if(this.isInterstitial(n)&&!n.event.appendInPlace)return;let r=this.media;!r&&(e=this.bufferingItem)!=null&&(e=e.event)!=null&&e.appendInPlace&&(r=this.primaryMedia);const i=(t=r)==null?void 0:t.currentTime;if(!(i===void 0||!v(i)))return i}get primaryMedia(){var e;return this.media||((e=this.detachedData)==null?void 0:e.media)||null}isInterstitial(e){return!!(e!=null&&e.event)}retreiveMediaSource(e,t){const n=this.getAssetPlayer(e);n&&this.transferMediaFromPlayer(n,t)}transferMediaFromPlayer(e,t){const n=e.interstitial.appendInPlace,r=e.media;if(n&&r===this.primaryMedia){if(this.bufferingAsset=null,(!t||this.isInterstitial(t)&&!t.event.appendInPlace)&&t&&r){this.detachedData={media:r};return}const i=e.transferMedia();this.log(`transfer MediaSource from ${e} ${vt(i)}`),this.detachedData=i}else t&&r&&(this.shouldPlay||(this.shouldPlay=!r.paused))}transferMediaTo(e,t){var n,r;if(e.media===t)return;let i=null;const s=this.hls,l=e!==s,d=l&&e.interstitial.appendInPlace,c=(n=this.detachedData)==null?void 0:n.mediaSource;let p;if(s.media)d&&(i=s.transferMedia(),this.detachedData=i),p="Primary";else if(c){const $=this.getBufferingPlayer();$?(i=$.transferMedia(),p=`${$}`):p="detached MediaSource"}else p="detached media";if(!i){if(c)i=this.detachedData,this.log(`using detachedData: MediaSource ${vt(i)}`);else if(!this.detachedData||s.media===t){const $=this.playerQueue;$.length>1&&$.forEach(ge=>{if(l&&ge.interstitial.appendInPlace!==d){const me=ge.interstitial;this.clearInterstitial(ge.interstitial,null),me.appendInPlace=!1,me.appendInPlace&&this.warn(`Could not change append strategy for queued assets ${me}`)}}),this.hls.detachMedia(),this.detachedData={media:t}}}const b=i&&"mediaSource"in i&&((r=i.mediaSource)==null?void 0:r.readyState)!=="closed",I=b&&i?i:t;this.log(`${b?"transfering MediaSource":"attaching media"} to ${l?e:"Primary"} from ${p} (media.currentTime: ${t.currentTime})`);const F=this.schedule;if(I===i&&F){const $=l&&e.assetId===F.assetIdAtEnd;I.overrides={duration:F.duration,endOfStream:!l||$,cueRemoval:!l}}e.attachMedia(I)}onInterstitialCueEnter(){this.onTimeupdate()}checkStart(){const e=this.schedule,t=e==null?void 0:e.events;if(!t||this.playbackDisabled||!this.media)return;this.bufferedPos===-1&&(this.bufferedPos=0);const n=this.timelinePos,r=this.effectivePlayingItem;if(n===-1){const i=this.hls.startPosition;if(this.log(yo("checkStart",i)),this.timelinePos=i,t.length&&t[0].cue.pre){const s=e.findEventIndex(t[0].identifier);this.setSchedulePosition(s)}else if(i>=0||!this.primaryLive){const s=this.timelinePos=i>0?i:0,l=e.findItemIndexAtTime(s);this.setSchedulePosition(l)}}else if(r&&!this.playingItem){const i=e.findItemIndex(r);this.setSchedulePosition(i)}}advanceAssetBuffering(e,t){const n=e.event,r=n.findAssetIndex(t),i=Qo(n,r);if(!n.isAssetPastPlayoutLimit(i))this.bufferedToEvent(e,i);else if(this.schedule){var s;const l=(s=this.schedule.items)==null?void 0:s[this.findItemIndex(e)+1];l&&this.bufferedToItem(l)}}advanceAfterAssetEnded(e,t,n){const r=Qo(e,n);if(e.isAssetPastPlayoutLimit(r)){if(this.schedule){const i=this.schedule.items;if(i){const s=t+1,l=i.length;if(s>=l){this.setSchedulePosition(-1);return}const d=e.resumeTime;this.timelinePos<d&&(this.log(yo("advanceAfterAssetEnded",d)),this.timelinePos=d,e.appendInPlace&&this.advanceInPlace(d),this.checkBuffer(this.bufferedPos<d)),this.setSchedulePosition(s)}}}else{if(e.appendInPlace){const i=e.assetList[r];i&&this.advanceInPlace(i.timelineStart)}this.setSchedulePosition(t,r)}}setScheduleToAssetAtTime(e,t){const n=this.schedule;if(!n)return;const r=t.parentIdentifier,i=n.getEvent(r);if(i){const s=n.findEventIndex(r),l=n.findAssetIndex(i,e);this.advanceAfterAssetEnded(i,s,l-1)}}setSchedulePosition(e,t){var n;const r=(n=this.schedule)==null?void 0:n.items;if(!r||this.playbackDisabled)return;const i=e>=0?r[e]:null;this.log(`setSchedulePosition ${e}, ${t} (${i&&gs(i)}) pos: ${this.timelinePos}`);const s=this.waitingItem||this.playingItem,l=this.playingLastItem;if(this.isInterstitial(s)){const p=s.event,b=this.playingAsset,I=b==null?void 0:b.identifier,F=I?this.getAssetPlayer(I):null;if(F&&I&&(!this.eventItemsMatch(s,i)||t!==void 0&&I!==p.assetList[t].identifier)){var d;const $=p.findAssetIndex(b);if(this.log(`INTERSTITIAL_ASSET_ENDED ${$+1}/${p.assetList.length} ${Sa(b)}`),this.endedAsset=b,this.playingAsset=null,this.hls.trigger(g.INTERSTITIAL_ASSET_ENDED,{asset:b,assetListIndex:$,event:p,schedule:r.slice(0),scheduleIndex:e,player:F}),s!==this.playingItem){this.itemsMatch(s,this.playingItem)&&!this.playingAsset&&this.advanceAfterAssetEnded(p,this.findItemIndex(this.playingItem),$);return}this.retreiveMediaSource(I,i),F.media&&!((d=this.detachedData)!=null&&d.mediaSource)&&F.detachMedia()}if(!this.eventItemsMatch(s,i)&&(this.endedItem=s,this.playingItem=null,this.log(`INTERSTITIAL_ENDED ${p} ${gs(s)}`),p.hasPlayed=!0,this.hls.trigger(g.INTERSTITIAL_ENDED,{event:p,schedule:r.slice(0),scheduleIndex:e}),p.cue.once)){var c;this.updateSchedule();const $=(c=this.schedule)==null?void 0:c.items;if(i&&$){const ge=this.findItemIndex(i);this.advanceSchedule(ge,$,t,s,l)}return}}this.advanceSchedule(e,r,t,s,l)}advanceSchedule(e,t,n,r,i){const s=this.schedule;if(!s)return;const l=t[e]||null,d=this.primaryMedia,c=this.playerQueue;if(c.length&&c.forEach(p=>{const b=p.interstitial,I=s.findEventIndex(b.identifier);(I<e||I>e+1)&&this.clearInterstitial(b,l)}),this.isInterstitial(l)){this.timelinePos=Math.min(Math.max(this.timelinePos,l.start),l.end);const p=l.event;if(n===void 0){n=s.findAssetIndex(p,this.timelinePos);const $=Qo(p,n-1);if(p.isAssetPastPlayoutLimit($)||p.appendInPlace&&this.timelinePos===l.end){this.advanceAfterAssetEnded(p,e,n);return}n=$}const b=this.waitingItem;this.assetsBuffered(l,d)||this.setBufferingItem(l);let I=this.preloadAssets(p,n);if(this.eventItemsMatch(l,b||r)||(this.waitingItem=l,this.log(`INTERSTITIAL_STARTED ${gs(l)} ${p.appendInPlace?"append in place":""}`),this.hls.trigger(g.INTERSTITIAL_STARTED,{event:p,schedule:t.slice(0),scheduleIndex:e})),!p.assetListLoaded){this.log(`Waiting for ASSET-LIST to complete loading ${p}`);return}if(p.assetListLoader&&(p.assetListLoader.destroy(),p.assetListLoader=void 0),!d){this.log(`Waiting for attachMedia to start Interstitial ${p}`);return}this.waitingItem=this.endedItem=null,this.playingItem=l;const F=p.assetList[n];if(!F){this.advanceAfterAssetEnded(p,e,n||0);return}if(I||(I=this.getAssetPlayer(F.identifier)),I===null||I.destroyed){const $=p.assetList.length;this.warn(`asset ${n+1}/${$} player destroyed ${p}`),I=this.createAssetPlayer(p,F,n),I.loadSource()}if(!this.eventItemsMatch(l,this.bufferingItem)&&p.appendInPlace&&this.isAssetBuffered(F))return;this.startAssetPlayer(I,n,t,e,d),this.shouldPlay&&Hl(I.media)}else l?(this.resumePrimary(l,e,r),this.shouldPlay&&Hl(this.hls.media)):i&&this.isInterstitial(r)&&(this.endedItem=null,this.playingItem=r,r.event.appendInPlace||this.attachPrimary(s.durations.primary,null))}get playbackDisabled(){return this.hls.config.enableInterstitialPlayback===!1}get primaryDetails(){var e;return(e=this.mediaSelection)==null?void 0:e.main.details}get primaryLive(){var e;return!!((e=this.primaryDetails)!=null&&e.live)}resumePrimary(e,t,n){var r,i;if(this.playingItem=e,this.playingAsset=this.endedAsset=null,this.waitingItem=this.endedItem=null,this.bufferedToItem(e),this.log(`resuming ${gs(e)}`),!((r=this.detachedData)!=null&&r.mediaSource)){let l=this.timelinePos;(l<e.start||l>=e.end)&&(l=this.getPrimaryResumption(e,t),this.log(yo("resumePrimary",l)),this.timelinePos=l),this.attachPrimary(l,e)}if(!n)return;const s=(i=this.schedule)==null?void 0:i.items;s&&(this.log(`INTERSTITIALS_PRIMARY_RESUMED ${gs(e)}`),this.hls.trigger(g.INTERSTITIALS_PRIMARY_RESUMED,{schedule:s.slice(0),scheduleIndex:t}),this.checkBuffer())}getPrimaryResumption(e,t){const n=e.start;if(this.primaryLive){const r=this.primaryDetails;if(t===0)return this.hls.startPosition;if(r&&(n<r.fragmentStart||n>r.edge))return this.hls.liveSyncPosition||-1}return n}isAssetBuffered(e){const t=this.getAssetPlayer(e.identifier);return t!=null&&t.hls?t.hls.bufferedToEnd:Jn.bufferInfo(this.primaryMedia,this.timelinePos,0).end+1>=e.timelineStart+(e.duration||0)}attachPrimary(e,t,n){t?this.setBufferingItem(t):this.bufferingItem=this.playingItem,this.bufferingAsset=null;const r=this.primaryMedia;if(!r)return;const i=this.hls;i.media?this.checkBuffer():(this.transferMediaTo(i,r),n&&this.startLoadingPrimaryAt(e,n)),n||(this.log(yo("attachPrimary",e)),this.timelinePos=e,this.startLoadingPrimaryAt(e,n))}startLoadingPrimaryAt(e,t){var n;const r=this.hls;!r.loadingEnabled||!r.media||Math.abs((((n=r.mainForwardBufferInfo)==null?void 0:n.start)||r.media.currentTime)-e)>.5?r.startLoad(e,t):r.bufferingEnabled||r.resumeBuffering()}onManifestLoading(){var e;this.stopLoad(),(e=this.schedule)==null||e.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(g.BUFFER_CODECS,this.onBufferCodecs,this),this.hls.on(g.BUFFER_CODECS,this.onBufferCodecs,this)}onLevelUpdated(e,t){if(t.level===-1||!this.schedule)return;const n=this.hls.levels[t.level];if(!n.details)return;const r=T(T({},this.mediaSelection||this.altSelection),{},{main:n});this.mediaSelection=r,this.schedule.parseInterstitialDateRanges(r,this.hls.config.interstitialAppendInPlace),!this.effectivePlayingItem&&this.schedule.items&&this.checkStart()}onAudioTrackUpdated(e,t){const n=this.hls.audioTracks[t.id],r=this.mediaSelection;if(!r){this.altSelection=T(T({},this.altSelection),{},{audio:n});return}const i=T(T({},r),{},{audio:n});this.mediaSelection=i}onSubtitleTrackUpdated(e,t){const n=this.hls.subtitleTracks[t.id],r=this.mediaSelection;if(!r){this.altSelection=T(T({},this.altSelection),{},{subtitles:n});return}const i=T(T({},r),{},{subtitles:n});this.mediaSelection=i}onAudioTrackSwitching(e,t){const n=Wt(t);this.playerQueue.forEach(({hls:r})=>r&&(r.setAudioOption(t)||r.setAudioOption(n)))}onSubtitleTrackSwitch(e,t){const n=Wt(t);this.playerQueue.forEach(({hls:r})=>r&&(r.setSubtitleOption(t)||t.id!==-1&&r.setSubtitleOption(n)))}onBufferCodecs(e,t){const n=t.tracks;n&&(this.requiredTracks=n)}onBufferAppended(e,t){this.checkBuffer()}onBufferFlushed(e,t){const n=this.playingItem;if(n&&!this.itemsMatch(n,this.bufferingItem)&&!this.isInterstitial(n)){const r=this.timelinePos;this.bufferedPos=r,this.checkBuffer()}}onBufferedToEnd(e){if(!this.schedule)return;const t=this.schedule.events;if(this.bufferedPos<Number.MAX_VALUE&&t){for(let r=0;r<t.length;r++){const i=t[r];if(i.cue.post){var n;const s=this.schedule.findEventIndex(i.identifier),l=(n=this.schedule.items)==null?void 0:n[s];this.isInterstitial(l)&&this.eventItemsMatch(l,this.bufferingItem)&&this.bufferedToItem(l,0);break}}this.bufferedPos=Number.MAX_VALUE}}onMediaEnded(e){const t=this.playingItem;if(!this.playingLastItem&&t){const n=this.findItemIndex(t);this.setSchedulePosition(n+1)}else this.shouldPlay=!1}updateItem(e,t){var n;const r=(n=this.schedule)==null?void 0:n.items;if(e&&r){const i=this.findItemIndex(e,t);return r[i]||null}return null}trimInPlace(e,t){if(this.isInterstitial(e)&&e.event.appendInPlace&&t.end-e.end>.25){e.event.assetList.forEach((i,s)=>{e.event.isAssetPastPlayoutLimit(s)&&this.clearAssetPlayer(i.identifier,null)});const n=e.end+.25,r=Jn.bufferInfo(this.primaryMedia,n,0);(r.end>n||(r.nextStart||0)>n)&&(this.log(`trim buffered interstitial ${gs(e)} (was ${gs(t)})`),this.attachPrimary(n,null,!0),this.flushFrontBuffer(n))}}itemsMatch(e,t){return!!t&&(e===t||e.event&&t.event&&this.eventItemsMatch(e,t)||!e.event&&!t.event&&this.findItemIndex(e)===this.findItemIndex(t))}eventItemsMatch(e,t){var n;return!!t&&(e===t||e.event.identifier===((n=t.event)==null?void 0:n.identifier))}findItemIndex(e,t){return e&&this.schedule?this.schedule.findItemIndex(e,t):-1}updateSchedule(e=!1){var t;const n=this.mediaSelection;n&&((t=this.schedule)==null||t.updateSchedule(n,[],e))}checkBuffer(e){var t;const n=(t=this.schedule)==null?void 0:t.items;if(!n)return;const r=Jn.bufferInfo(this.primaryMedia,this.timelinePos,0);e&&(this.bufferedPos=this.timelinePos),e||(e=r.len<1),this.updateBufferedPos(r.end,n,e)}updateBufferedPos(e,t,n){const r=this.schedule,i=this.bufferingItem;if(this.bufferedPos>e||!r)return;if(t.length===1&&this.itemsMatch(t[0],i)){this.bufferedPos=e;return}const s=this.playingItem,l=this.findItemIndex(s);let d=r.findItemIndexAtTime(e);if(this.bufferedPos<e){var c;const p=this.findItemIndex(i),b=Math.min(p+1,t.length-1),I=t[b];if((d===-1&&i&&e>=i.end||(c=I.event)!=null&&c.appendInPlace&&e+.01>=I.start)&&(d=b),this.isInterstitial(i)){const F=i.event;if(b-l>1&&F.appendInPlace===!1||F.assetList.length===0&&F.assetListLoader)return}if(this.bufferedPos=e,d>p&&d>l)this.bufferedToItem(I);else{const F=this.primaryDetails;this.primaryLive&&F&&e>F.edge-F.targetduration&&I.start<F.edge+this.hls.config.interstitialLiveLookAhead&&this.isInterstitial(I)&&this.preloadAssets(I.event,0)}}else n&&s&&!this.itemsMatch(s,i)&&(d===l?this.bufferedToItem(s):d===l+1&&this.bufferedToItem(t[d]))}assetsBuffered(e,t){return e.event.assetList.length===0?!1:!e.event.assetList.some(r=>{const i=this.getAssetPlayer(r.identifier);return!(i!=null&&i.bufferedInPlaceToEnd(t))})}setBufferingItem(e){const t=this.bufferingItem,n=this.schedule;if(!this.itemsMatch(e,t)&&n){const{items:r,events:i}=n;if(!r||!i)return t;const s=this.isInterstitial(e),l=this.getBufferingPlayer();this.bufferingItem=e,this.bufferedPos=Math.max(e.start,Math.min(e.end,this.timelinePos));const d=l?l.remaining:t?t.end-this.timelinePos:0;if(this.log(`INTERSTITIALS_BUFFERED_TO_BOUNDARY ${gs(e)}`+(t?` (${d.toFixed(2)} remaining)`:"")),!this.playbackDisabled)if(s){const c=n.findAssetIndex(e.event,this.bufferedPos);e.event.assetList.forEach((p,b)=>{const I=this.getAssetPlayer(p.identifier);I&&(b===c&&I.loadSource(),I.resumeBuffering())})}else this.hls.resumeBuffering(),this.playerQueue.forEach(c=>c.pauseBuffering());this.hls.trigger(g.INTERSTITIALS_BUFFERED_TO_BOUNDARY,{events:i.slice(0),schedule:r.slice(0),bufferingIndex:this.findItemIndex(e),playingIndex:this.findItemIndex(this.playingItem)})}else this.bufferingItem!==e&&(this.bufferingItem=e);return t}bufferedToItem(e,t=0){const n=this.setBufferingItem(e);if(!this.playbackDisabled){if(this.isInterstitial(e))this.bufferedToEvent(e,t);else if(n!==null){this.bufferingAsset=null;const r=this.detachedData;r?r.mediaSource?this.attachPrimary(e.start,e,!0):this.preloadPrimary(e):this.preloadPrimary(e)}}}preloadPrimary(e){const t=this.findItemIndex(e),n=this.getPrimaryResumption(e,t);this.startLoadingPrimaryAt(n)}bufferedToEvent(e,t){const n=e.event,r=n.assetList.length===0&&!n.assetListLoader,i=n.cue.once;if(r||!i){const s=this.preloadAssets(n,t);if(s!=null&&s.interstitial.appendInPlace){const l=this.primaryMedia;l&&this.bufferAssetPlayer(s,l)}}}preloadAssets(e,t){const n=e.assetUrl,r=e.assetList.length,i=r===0&&!e.assetListLoader,s=e.cue.once;if(i){const d=e.timelineStart;if(e.appendInPlace){var l;const I=this.playingItem;!this.isInterstitial(I)&&(I==null||(l=I.nextEvent)==null?void 0:l.identifier)===e.identifier&&this.flushFrontBuffer(d+.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 I=p-d;I>0&&(c=Math.round(I*1e3)/1e3)}if(this.log(`Load interstitial asset ${t+1}/${n?1:r} ${e}${c?` live-start: ${p} start-offset: ${c}`:""}`),n)return this.createAsset(e,0,0,d,e.duration,n);const b=this.assetListLoader.loadAssetList(e,c);b&&(e.assetListLoader=b)}else if(!s&&r){for(let c=t;c<r;c++){const p=e.assetList[c],b=this.getAssetPlayerQueueIndex(p.identifier);(b===-1||this.playerQueue[b].destroyed)&&!p.error&&this.createAssetPlayer(e,p,c)}const d=e.assetList[t];if(d){const c=this.getAssetPlayer(d.identifier);return c&&c.loadSource(),c}}return null}flushFrontBuffer(e){const t=this.requiredTracks;if(!t)return;this.log(`Removing front buffer starting at ${e}`),Object.keys(t).forEach(r=>{this.hls.trigger(g.BUFFER_FLUSHING,{startOffset:e,endOffset:1/0,type:r})})}getAssetPlayerQueueIndex(e){const t=this.playerQueue;for(let n=0;n<t.length;n++)if(e===t[n].assetId)return n;return-1}getAssetPlayer(e){const t=this.getAssetPlayerQueueIndex(e);return this.playerQueue[t]||null}getBufferingPlayer(){const{playerQueue:e,primaryMedia:t}=this;if(t){for(let n=0;n<e.length;n++)if(e[n].media===t)return e[n]}return null}createAsset(e,t,n,r,i,s){const l={parentIdentifier:e.identifier,identifier:Pc(e,s,t),duration:i,startOffset:n,timelineStart:r,uri:s};return this.createAssetPlayer(e,l,t)}createAssetPlayer(e,t,n){const r=this.hls,i=r.userConfig;let s=i.videoPreference;const l=r.loadLevelObj||r.levels[r.currentLevel];(s||l)&&(s=y({},s),l.videoCodec&&(s.videoCodec=l.videoCodec),l.videoRange&&(s.allowedVideoRanges=[l.videoRange]));const d=r.audioTracks[r.audioTrack],c=r.subtitleTracks[r.subtitleTrack];let p=0;if(this.primaryLive||e.appendInPlace){const xt=this.timelinePos-t.timelineStart;if(xt>1){const Ot=t.duration;Ot&&xt<Ot&&(p=xt)}}const b=t.identifier,I=T(T({},i),{},{maxMaxBufferLength:Math.min(180,r.config.maxMaxBufferLength),autoStartLoad:!0,startFragPrefetch:!0,primarySessionId:r.sessionId,assetPlayerId:b,abrEwmaDefaultEstimate:r.bandwidthEstimate,interstitialsController:void 0,startPosition:p,liveDurationInfinity:!1,testBandwidth:!1,videoPreference:s,audioPreference:d||i.audioPreference,subtitlePreference:c||i.subtitlePreference});e.appendInPlace&&(e.appendInPlaceStarted=!0,t.timelineStart&&(I.timelineOffset=t.timelineStart));const F=I.cmcd;F!=null&&F.sessionId&&F.contentId&&(I.cmcd=y({},F,{contentId:Ua(t.uri)})),this.getAssetPlayer(b)&&this.warn(`Duplicate date range identifier ${e} and asset ${b}`);const $=new Nc(this.HlsPlayerClass,I,e,t);this.playerQueue.push($),e.assetList[n]=t;let ge=!0;const me=xt=>{if(xt.live){var Ot;const Xt=new Error(`Interstitials MUST be VOD assets ${e}`),Yt={fatal:!0,type:fe.OTHER_ERROR,details:z.INTERSTITIAL_ASSET_ITEM_ERROR,error:Xt},Ft=((Ot=this.schedule)==null?void 0:Ot.findEventIndex(e.identifier))||-1;this.handleAssetItemError(Yt,e,Ft,n,Xt.message);return}const sn=xt.edge-xt.fragmentStart,Pt=t.duration;(ge||Pt===null||sn>Pt)&&(ge=!1,this.log(`Interstitial asset "${b}" duration change ${Pt} > ${sn}`),t.duration=sn,this.updateSchedule())};$.on(g.LEVEL_UPDATED,(xt,{details:Ot})=>me(Ot)),$.on(g.LEVEL_PTS_UPDATED,(xt,{details:Ot})=>me(Ot)),$.on(g.EVENT_CUE_ENTER,()=>this.onInterstitialCueEnter());const Fe=(xt,Ot)=>{const sn=this.getAssetPlayer(b);if(sn&&Ot.tracks){sn.off(g.BUFFER_CODECS,Fe),sn.tracks=Ot.tracks;const Pt=this.primaryMedia;this.bufferingAsset===sn.assetItem&&Pt&&!sn.media&&this.bufferAssetPlayer(sn,Pt)}};$.on(g.BUFFER_CODECS,Fe);const We=()=>{var xt;const Ot=this.getAssetPlayer(b);if(this.log(`buffered to end of asset ${Ot}`),!Ot||!this.schedule)return;const sn=this.schedule.findEventIndex(e.identifier),Pt=(xt=this.schedule.items)==null?void 0:xt[sn];this.isInterstitial(Pt)&&this.advanceAssetBuffering(Pt,t)};$.on(g.BUFFERED_TO_END,We);const et=xt=>()=>{if(!this.getAssetPlayer(b)||!this.schedule)return;this.shouldPlay=!0;const sn=this.schedule.findEventIndex(e.identifier);this.advanceAfterAssetEnded(e,sn,xt)};return $.once(g.MEDIA_ENDED,et(n)),$.once(g.PLAYOUT_LIMIT_REACHED,et(1/0)),$.on(g.ERROR,(xt,Ot)=>{if(!this.schedule)return;const sn=this.getAssetPlayer(b);if(Ot.details===z.BUFFER_STALLED_ERROR){if(sn!=null&&sn.appendInPlace){this.handleInPlaceStall(e);return}this.onTimeupdate(),this.checkBuffer(!0);return}this.handleAssetItemError(Ot,e,this.schedule.findEventIndex(e.identifier),n,`Asset player error ${Ot.error} ${e}`)}),$.on(g.DESTROYING,()=>{if(!this.getAssetPlayer(b)||!this.schedule)return;const Ot=new Error(`Asset player destroyed unexpectedly ${b}`),sn={fatal:!0,type:fe.OTHER_ERROR,details:z.INTERSTITIAL_ASSET_ITEM_ERROR,error:Ot};this.handleAssetItemError(sn,e,this.schedule.findEventIndex(e.identifier),n,Ot.message)}),this.log(`INTERSTITIAL_ASSET_PLAYER_CREATED ${Sa(t)}`),this.hls.trigger(g.INTERSTITIAL_ASSET_PLAYER_CREATED,{asset:t,assetListIndex:n,event:e,player:$}),$}clearInterstitial(e,t){this.clearAssetPlayers(e,t),e.reset()}clearAssetPlayers(e,t){e.assetList.forEach(n=>{this.clearAssetPlayer(n.identifier,t)})}resetAssetPlayer(e){const t=this.getAssetPlayerQueueIndex(e);if(t!==-1){this.log(`reset asset player "${e}" after error`);const n=this.playerQueue[t];this.transferMediaFromPlayer(n,null),n.resetDetails()}}clearAssetPlayer(e,t){const n=this.getAssetPlayerQueueIndex(e);if(n!==-1){const r=this.playerQueue[n];this.log(`clear ${r} toSegment: ${t&&gs(t)}`),this.transferMediaFromPlayer(r,t),this.playerQueue.splice(n,1),r.destroy()}}emptyPlayerQueue(){let e;for(;e=this.playerQueue.pop();)e.destroy();this.playerQueue=[]}startAssetPlayer(e,t,n,r,i){const{interstitial:s,assetItem:l,assetId:d}=e,c=s.assetList.length,p=this.playingAsset;this.endedAsset=null,this.playingAsset=l,(!p||p.identifier!==d)&&(p&&(this.clearAssetPlayer(p.identifier,n[r]),delete p.error),this.log(`INTERSTITIAL_ASSET_STARTED ${t+1}/${c} ${Sa(l)}`),this.hls.trigger(g.INTERSTITIAL_ASSET_STARTED,{asset:l,assetListIndex:t,event:s,schedule:n.slice(0),scheduleIndex:r,player:e})),this.bufferAssetPlayer(e,i)}bufferAssetPlayer(e,t){var n,r;if(!this.schedule)return;const{interstitial:i,assetItem:s}=e,l=this.schedule.findEventIndex(i.identifier),d=(n=this.schedule.items)==null?void 0:n[l];if(!d)return;e.loadSource(),this.setBufferingItem(d),this.bufferingAsset=s;const c=this.getBufferingPlayer();if(c===e)return;const p=i.appendInPlace;if(p&&(c==null?void 0:c.interstitial.appendInPlace)===!1)return;const b=(c==null?void 0:c.tracks)||((r=this.detachedData)==null?void 0:r.tracks)||this.requiredTracks;if(p&&s!==this.playingAsset){if(!e.tracks){this.log(`Waiting for track info before buffering ${e}`);return}if(b&&!ke(b,e.tracks)){const I=new Error(`Asset ${Sa(s)} SourceBuffer tracks ('${Object.keys(e.tracks)}') are not compatible with primary content tracks ('${Object.keys(b)}')`),F={fatal:!0,type:fe.OTHER_ERROR,details:z.INTERSTITIAL_ASSET_ITEM_ERROR,error:I},$=i.findAssetIndex(s);this.handleAssetItemError(F,i,l,$,I.message);return}}this.transferMediaTo(e,t)}handleInPlaceStall(e){const t=this.schedule,n=this.primaryMedia;if(!t||!n)return;const r=n.currentTime,i=t.findAssetIndex(e,r),s=e.assetList[i];if(s){const l=this.getAssetPlayer(s.identifier);if(l){const d=l.currentTime||r-s.timelineStart,c=l.duration-d;if(this.warn(`Stalled at ${d} of ${d+c} in ${l} ${e} (media.currentTime: ${r})`),d&&(c/n.playbackRate<.5||l.bufferedInPlaceToEnd(n))&&l.hls){const p=t.findEventIndex(e.identifier);this.advanceAfterAssetEnded(e,p,i)}}}}advanceInPlace(e){const t=this.primaryMedia;t&&t.currentTime<e&&(t.currentTime=e)}handleAssetItemError(e,t,n,r,i){if(e.details===z.BUFFER_STALLED_ERROR)return;const s=t.assetList[r]||null;if(this.warn(`INTERSTITIAL_ASSET_ERROR ${s&&Sa(s)} ${e.error}`),!this.schedule)return;const l=(s==null?void 0:s.identifier)||"",d=this.getAssetPlayerQueueIndex(l),c=this.playerQueue[d]||null,p=this.schedule.items,b=y({},e,{fatal:!1,errorAction:Vt(!0),asset:s,assetListIndex:r,event:t,schedule:p,scheduleIndex:n,player:c});if(this.hls.trigger(g.INTERSTITIAL_ASSET_ERROR,b),!e.fatal)return;const I=this.playingAsset,F=this.bufferingAsset,$=new Error(i);if(s&&(this.clearAssetPlayer(l,null),s.error=$),!t.assetList.some(ge=>!ge.error))t.error=$;else for(let ge=r;ge<t.assetList.length;ge++)this.resetAssetPlayer(t.assetList[ge].identifier);this.updateSchedule(!0),t.error?this.primaryFallback(t):I&&I.identifier===l?this.advanceAfterAssetEnded(t,n,r):F&&F.identifier===l&&this.isInterstitial(this.bufferingItem)&&this.advanceAssetBuffering(this.bufferingItem,F)}primaryFallback(e){const t=e.timelineStart,n=this.effectivePlayingItem;let r=this.timelinePos;if(n){this.log(`Fallback to primary from event "${e.identifier}" start: ${t} pos: ${r} playing: ${gs(n)} error: ${e.error}`),r===-1&&(r=this.hls.startPosition);const s=this.updateItem(n,r);this.itemsMatch(n,s)&&this.clearInterstitial(e,null),e.appendInPlace&&(this.attachPrimary(t,null),this.flushFrontBuffer(t))}else if(r===-1){this.checkStart();return}if(!this.schedule)return;const i=this.schedule.findItemIndexAtTime(r);this.setSchedulePosition(i)}onAssetListLoaded(e,t){var n,r;const i=t.event,s=i.identifier,l=t.assetListResponse.ASSETS;if(!((n=this.schedule)!=null&&n.hasEvent(s)))return;const d=i.timelineStart,c=i.duration;let p=0;l.forEach((ge,me)=>{const Fe=parseFloat(ge.DURATION);this.createAsset(i,me,p,d+p,Fe,ge.URI),p+=Fe}),i.duration=p,this.log(`Loaded asset-list with duration: ${p} (was: ${c}) ${i}`);const b=this.waitingItem,I=(b==null?void 0:b.event.identifier)===s;this.updateSchedule();const F=(r=this.bufferingItem)==null?void 0:r.event;if(I){var $;const ge=this.schedule.findEventIndex(s),me=($=this.schedule.items)==null?void 0:$[ge];if(me){if(!this.playingItem&&this.timelinePos>me.end&&this.schedule.findItemIndexAtTime(this.timelinePos)!==ge){i.error=new Error(`Interstitial ${l.length?"no longer within playback range":"asset-list is empty"} ${this.timelinePos} ${i}`),this.log(i.error.message),this.updateSchedule(!0),this.primaryFallback(i);return}this.setBufferingItem(me)}this.setSchedulePosition(ge)}else if((F==null?void 0:F.identifier)===s){const ge=i.assetList[0];if(ge){const me=this.getAssetPlayer(ge.identifier);if(F.appendInPlace){const Fe=this.primaryMedia;me&&Fe&&this.bufferAssetPlayer(me,Fe)}else me&&me.loadSource()}}}onError(e,t){if(this.schedule)switch(t.details){case z.ASSET_LIST_PARSING_ERROR:case z.ASSET_LIST_LOAD_ERROR:case z.ASSET_LIST_LOAD_TIMEOUT:{const n=t.interstitial;n&&(this.updateSchedule(!0),this.primaryFallback(n));break}case z.BUFFER_STALLED_ERROR:{const n=this.endedItem||this.waitingItem||this.playingItem;if(this.isInterstitial(n)&&n.event.appendInPlace){this.handleInPlaceStall(n.event);return}this.log(`Primary player stall @${this.timelinePos} bufferedPos: ${this.bufferedPos}`),this.onTimeupdate(),this.checkBuffer(!0);break}}}}const jl=500;class Uc extends ea{constructor(e,t,n){super(e,t,n,"subtitle-stream-controller",te.SUBTITLE),this.currentTrackId=-1,this.tracksBuffered=[],this.mainDetails=null,this.registerListeners()}onHandlerDestroying(){this.unregisterListeners(),super.onHandlerDestroying(),this.mainDetails=null}registerListeners(){super.registerListeners();const{hls:e}=this;e.on(g.LEVEL_LOADED,this.onLevelLoaded,this),e.on(g.SUBTITLE_TRACKS_UPDATED,this.onSubtitleTracksUpdated,this),e.on(g.SUBTITLE_TRACK_SWITCH,this.onSubtitleTrackSwitch,this),e.on(g.SUBTITLE_TRACK_LOADED,this.onSubtitleTrackLoaded,this),e.on(g.SUBTITLE_FRAG_PROCESSED,this.onSubtitleFragProcessed,this),e.on(g.BUFFER_FLUSHING,this.onBufferFlushing,this)}unregisterListeners(){super.unregisterListeners();const{hls:e}=this;e.off(g.LEVEL_LOADED,this.onLevelLoaded,this),e.off(g.SUBTITLE_TRACKS_UPDATED,this.onSubtitleTracksUpdated,this),e.off(g.SUBTITLE_TRACK_SWITCH,this.onSubtitleTrackSwitch,this),e.off(g.SUBTITLE_TRACK_LOADED,this.onSubtitleTrackLoaded,this),e.off(g.SUBTITLE_FRAG_PROCESSED,this.onSubtitleFragProcessed,this),e.off(g.BUFFER_FLUSHING,this.onBufferFlushing,this)}startLoad(e,t){this.stopLoad(),this.state=hn.IDLE,this.setInterval(jl),this.nextLoadPosition=this.lastCurrentTime=e+this.timelineOffset,this.startPosition=t?-1:e,this.tick()}onManifestLoading(){super.onManifestLoading(),this.mainDetails=null}onMediaDetaching(e,t){this.tracksBuffered=[],super.onMediaDetaching(e,t)}onLevelLoaded(e,t){this.mainDetails=t.details}onSubtitleFragProcessed(e,t){const{frag:n,success:r}=t;if(this.fragContextChanged(n)||(Ke(n)&&(this.fragPrevious=n),this.state=hn.IDLE),!r)return;const i=this.tracksBuffered[this.currentTrackId];if(!i)return;let s;const l=n.start;for(let c=0;c<i.length;c++)if(l>=i[c].start&&l<=i[c].end){s=i[c];break}const d=n.start+n.duration;s?s.end=d:(s={start:l,end:d},i.push(s)),this.fragmentTracker.fragBuffered(n),this.fragBufferedComplete(n,null),this.media&&this.tick()}onBufferFlushing(e,t){const{startOffset:n,endOffset:r}=t;if(n===0&&r!==Number.POSITIVE_INFINITY){const i=r-1;if(i<=0)return;t.endOffsetSubtitles=Math.max(0,i),this.tracksBuffered.forEach(s=>{for(let l=0;l<s.length;){if(s[l].end<=i){s.shift();continue}else if(s[l].start<i)s[l].start=i;else break;l++}}),this.fragmentTracker.removeFragmentsInRange(n,i,te.SUBTITLE)}}onError(e,t){const n=t.frag;(n==null?void 0:n.type)===te.SUBTITLE&&(t.details===z.FRAG_GAP&&this.fragmentTracker.fragBuffered(n,!0),this.fragCurrent&&this.fragCurrent.abortRequests(),this.state!==hn.STOPPED&&(this.state=hn.IDLE))}onSubtitleTracksUpdated(e,{subtitleTracks:t}){if(this.levels&&bl(this.levels,t)){this.levels=t.map(n=>new Ht(n));return}this.tracksBuffered=[],this.levels=t.map(n=>{const r=new Ht(n);return this.tracksBuffered[r.id]=[],r}),this.fragmentTracker.removeFragmentsInRange(0,Number.POSITIVE_INFINITY,te.SUBTITLE),this.fragPrevious=null,this.mediaBuffer=null}onSubtitleTrackSwitch(e,t){var n;if(this.currentTrackId=t.id,!((n=this.levels)!=null&&n.length)||this.currentTrackId===-1){this.clearInterval();return}const r=this.levels[this.currentTrackId];r!=null&&r.details?this.mediaBuffer=this.mediaBufferTimeRanges:this.mediaBuffer=null,r&&this.state!==hn.STOPPED&&this.setInterval(jl)}onSubtitleTrackLoaded(e,t){var n;const{currentTrackId:r,levels:i}=this,{details:s,id:l}=t;if(!i){this.warn(`Subtitle tracks were reset while loading level ${l}`);return}const d=i[l];if(l>=i.length||!d)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||(n=d.details)!=null&&n.live){if(s.deltaUpdateFailed)return;const b=this.mainDetails;if(!b){this.startFragRequested=!1;return}const I=b.fragments[0];if(!d.details)s.hasProgramDateTime&&b.hasProgramDateTime?(zs(s,b),c=s.fragmentStart):I&&(c=I.start,Js(s,c));else{var p;c=this.alignPlaylists(s,d.details,(p=this.levelLastLoaded)==null?void 0:p.details),c===0&&I&&(c=I.start,Js(s,c))}b&&!this.startFragRequested&&this.setStartPosition(b,c)}d.details=s,this.levelLastLoaded=d,l===r&&(this.hls.trigger(g.SUBTITLE_TRACK_UPDATED,{details:s,id:l,groupId:t.groupId}),this.tick(),s.live&&!this.fragCurrent&&this.media&&this.state===hn.IDLE&&(Nn(null,s.fragments,this.media.currentTime,0)||(this.warn("Subtitle playlist not aligned with playback"),d.details=void 0)))}_handleFragmentLoadComplete(e){const{frag:t,payload:n}=e,r=t.decryptdata,i=this.hls;if(!this.fragContextChanged(t)&&n&&n.byteLength>0&&r!=null&&r.key&&r.iv&&kn(r.method)){const s=performance.now();this.decrypter.decrypt(new Uint8Array(n),r.key.buffer,r.iv.buffer,$n(r.method)).catch(l=>{throw i.trigger(g.ERROR,{type:fe.MEDIA_ERROR,details:z.FRAG_DECRYPT_ERROR,fatal:!1,error:l,reason:l.message,frag:t}),l}).then(l=>{const d=performance.now();i.trigger(g.FRAG_DECRYPTED,{frag:t,payload:l,stats:{tstart:s,tdecrypt:d}})}).catch(l=>{this.warn(`${l.name}: ${l.message}`),this.state=hn.IDLE})}}doTick(){if(!this.media){this.state=hn.IDLE;return}if(this.state===hn.IDLE){const{currentTrackId:e,levels:t}=this,n=t==null?void 0:t[e];if(!n||!t.length||!n.details||this.waitForLive(n))return;const{config:r}=this,i=this.getLoadPosition(),s=Jn.bufferedInfo(this.tracksBuffered[this.currentTrackId]||[],i,r.maxBufferHole),{end:l,len:d}=s,c=n.details,p=this.hls.maxBufferLength+c.levelTargetDuration;if(d>p)return;const b=c.fragments,I=b.length,F=c.edge;let $=null;const ge=this.fragPrevious;if(l<F){const We=r.maxFragLookUpTolerance,et=l>F-We?0:We;$=Nn(ge,b,Math.max(b[0].start,l),et),!$&&ge&&ge.start<b[0].start&&($=b[0])}else $=b[I-1];if($=this.filterReplacedPrimary($,n.details),!$)return;const me=$.sn-c.startSN,Fe=b[me-1];if(Fe&&Fe.cc===$.cc&&this.fragmentTracker.getState(Fe)===un.NOT_LOADED&&($=Fe),this.fragmentTracker.getState($)===un.NOT_LOADED){const We=this.mapToInitFragWhenRequired($);We&&this.loadFragment(We,n,l)}}}loadFragment(e,t,n){Ke(e)?super.loadFragment(e,t,n):this._loadInitSegment(e,t)}get mediaBufferTimeRanges(){return new zc(this.tracksBuffered[this.currentTrackId]||[])}}class zc{constructor(e){this.buffered=void 0;const t=(n,r,i)=>{if(r=r>>>0,r>i-1)throw new DOMException(`Failed to execute '${n}' on 'TimeRanges': The index provided (${r}) is greater than the maximum bound (${i})`);return e[r][n]};this.buffered={get length(){return e.length},end(n){return t("end",n,e.length)},start(n){return t("start",n,e.length)}}}}const Kc={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},Zl=a=>String.fromCharCode(Kc[a]||a),vs=15,Ms=100,Hc={17:1,18:3,21:5,22:7,23:9,16:11,19:12,20:14},jc={17:2,18:4,21:6,22:8,23:10,19:13,20:15},Zc={25:1,26:3,29:5,30:7,31:9,24:11,27:12,28:14},Wc={25:2,26:4,29:6,30:8,31:10,27:13,28:15},Vc=["white","green","blue","cyan","red","yellow","magenta","black","transparent"];class Gc{constructor(){this.time=null,this.verboseLevel=0}log(e,t){if(this.verboseLevel>=e){const n=typeof t=="function"?t():t;ie.log(`${this.time} [${e}] ${n}`)}}}const la=function(e){const t=[];for(let n=0;n<e.length;n++)t.push(e[n].toString(16));return t};class Wl{constructor(){this.foreground="white",this.underline=!1,this.italics=!1,this.background="black",this.flash=!1}reset(){this.foreground="white",this.underline=!1,this.italics=!1,this.background="black",this.flash=!1}setStyles(e){const t=["foreground","underline","italics","background","flash"];for(let n=0;n<t.length;n++){const r=t[n];e.hasOwnProperty(r)&&(this[r]=e[r])}}isDefault(){return this.foreground==="white"&&!this.underline&&!this.italics&&this.background==="black"&&!this.flash}equals(e){return this.foreground===e.foreground&&this.underline===e.underline&&this.italics===e.italics&&this.background===e.background&&this.flash===e.flash}copy(e){this.foreground=e.foreground,this.underline=e.underline,this.italics=e.italics,this.background=e.background,this.flash=e.flash}toString(){return"color="+this.foreground+", underline="+this.underline+", italics="+this.italics+", background="+this.background+", flash="+this.flash}}class Yc{constructor(){this.uchar=" ",this.penState=new Wl}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 Xc{constructor(e){this.chars=[],this.pos=0,this.currPenState=new Wl,this.cueStartTime=null,this.logger=void 0;for(let t=0;t<Ms;t++)this.chars.push(new Yc);this.logger=e}equals(e){for(let t=0;t<Ms;t++)if(!this.chars[t].equals(e.chars[t]))return!1;return!0}copy(e){for(let t=0;t<Ms;t++)this.chars[t].copy(e.chars[t])}isEmpty(){let e=!0;for(let t=0;t<Ms;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>Ms&&(this.logger.log(3,"Too large cursor position "+this.pos),this.pos=Ms)}moveCursor(e){const t=this.pos+e;if(e>1)for(let n=this.pos+1;n<t+1;n++)this.chars[n].setPenState(this.currPenState);this.setCursor(t)}backSpace(){this.moveCursor(-1),this.chars[this.pos].setChar(" ",this.currPenState)}insertChar(e){e>=144&&this.backSpace();const t=Zl(e);if(this.pos>=Ms){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<Ms;t++)this.chars[t].reset()}clear(){this.clearFromPos(0),this.pos=0,this.currPenState.reset()}clearToEndOfRow(){this.clearFromPos(this.pos)}getTextString(){const e=[];let t=!0;for(let n=0;n<Ms;n++){const r=this.chars[n].uchar;r!==" "&&(t=!1),e.push(r)}return t?"":e.join("")}setPenStyles(e){this.currPenState.setStyles(e),this.chars[this.pos].setPenState(this.currPenState)}}class Jo{constructor(e){this.rows=[],this.currRow=vs-1,this.nrRollUpRows=null,this.lastOutputScreen=null,this.logger=void 0;for(let t=0;t<vs;t++)this.rows.push(new Xc(e));this.logger=e}reset(){for(let e=0;e<vs;e++)this.rows[e].clear();this.currRow=vs-1}equals(e){let t=!0;for(let n=0;n<vs;n++)if(!this.rows[n].equals(e.rows[n])){t=!1;break}return t}copy(e){for(let t=0;t<vs;t++)this.rows[t].copy(e.rows[t])}isEmpty(){let e=!0;for(let t=0;t<vs;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 = "+vt(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<vs;l++)this.rows[l].clear();const i=this.currRow+1-this.nrRollUpRows,s=this.lastOutputScreen;if(s){const l=s.rows[i].cueStartTime,d=this.logger.time;if(l!==null&&d!==null&&l<d)for(let c=0;c<this.nrRollUpRows;c++)this.rows[t-this.nrRollUpRows+c+1].copy(s.rows[i+c])}}this.currRow=t;const n=this.rows[this.currRow];if(e.indent!==null){const i=e.indent,s=Math.max(i-1,0);n.setCursor(e.indent),e.color=n.chars[s].penState.foreground}const r={foreground:e.color,underline:e.underline,italics:e.italics,background:"black",flash:!1};this.setPen(r)}setBkgData(e){this.logger.log(2,()=>"bkgData = "+vt(e)),this.backSpace(),this.setPen(e),this.insertChar(32)}setRollUpRows(e){this.nrRollUpRows=e}rollUp(){if(this.nrRollUpRows===null){this.logger.log(3,"roll_up but nrRollUpRows not set yet");return}this.logger.log(1,()=>this.getDisplayText());const e=this.currRow+1-this.nrRollUpRows,t=this.rows.splice(e,1)[0];t.clear(),this.rows.splice(this.currRow,0,t),this.logger.log(2,"Rolling up")}getDisplayText(e){e=e||!1;const t=[];let n="",r=-1;for(let i=0;i<vs;i++){const s=this.rows[i].getTextString();s&&(r=i+1,e?t.push("Row "+r+": '"+s+"'"):t.push(s.trim()))}return t.length>0&&(e?n="["+t.join(" | ")+"]":n=t.join(`
|
|
|
`)),n}getTextAndFormat(){return this.rows}}class Vl{constructor(e,t,n){this.chNr=void 0,this.outputFilter=void 0,this.mode=void 0,this.verbose=void 0,this.displayedMemory=void 0,this.nonDisplayedMemory=void 0,this.lastOutputScreen=void 0,this.currRollUpRow=void 0,this.writeScreen=void 0,this.cueStartTime=void 0,this.logger=void 0,this.chNr=e,this.outputFilter=t,this.mode=null,this.verbose=0,this.displayedMemory=new Jo(n),this.nonDisplayedMemory=new Jo(n),this.lastOutputScreen=new Jo(n),this.currRollUpRow=this.displayedMemory.rows[vs-1],this.writeScreen=this.displayedMemory,this.mode=null,this.cueStartTime=null,this.logger=n}reset(){this.mode=null,this.displayedMemory.reset(),this.nonDisplayedMemory.reset(),this.lastOutputScreen.reset(),this.outputFilter.reset(),this.currRollUpRow=this.displayedMemory.rows[vs-1],this.writeScreen=this.displayedMemory,this.mode=null,this.cueStartTime=null}getHandler(){return this.outputFilter}setHandler(e){this.outputFilter=e}setPAC(e){this.writeScreen.setPAC(e)}setBkgData(e){this.writeScreen.setBkgData(e)}setMode(e){e!==this.mode&&(this.mode=e,this.logger.log(2,()=>"MODE="+e),this.mode==="MODE_POP-ON"?this.writeScreen=this.nonDisplayedMemory:(this.writeScreen=this.displayedMemory,this.writeScreen.reset()),this.mode!=="MODE_ROLL-UP"&&(this.displayedMemory.nrRollUpRows=null,this.nonDisplayedMemory.nrRollUpRows=null),this.mode=e)}insertChars(e){for(let n=0;n<e.length;n++)this.writeScreen.insertChar(e[n]);const t=this.writeScreen===this.displayedMemory?"DISP":"NON_DISP";this.logger.log(2,()=>t+": "+this.writeScreen.getDisplayText(!0)),(this.mode==="MODE_PAINT-ON"||this.mode==="MODE_ROLL-UP")&&(this.logger.log(1,()=>"DISPLAYED: "+this.displayedMemory.getDisplayText(!0)),this.outputDataUpdate())}ccRCL(){this.logger.log(2,"RCL - Resume Caption Loading"),this.setMode("MODE_POP-ON")}ccBS(){this.logger.log(2,"BS - BackSpace"),this.mode!=="MODE_TEXT"&&(this.writeScreen.backSpace(),this.writeScreen===this.displayedMemory&&this.outputDataUpdate())}ccAOF(){}ccAON(){}ccDER(){this.logger.log(2,"DER- Delete to End of Row"),this.writeScreen.clearToEndOfRow(),this.outputDataUpdate()}ccRU(e){this.logger.log(2,"RU("+e+") - Roll Up"),this.writeScreen=this.displayedMemory,this.setMode("MODE_ROLL-UP"),this.writeScreen.setRollUpRows(e)}ccFON(){this.logger.log(2,"FON - Flash On"),this.writeScreen.setPen({flash:!0})}ccRDC(){this.logger.log(2,"RDC - Resume Direct Captioning"),this.setMode("MODE_PAINT-ON")}ccTR(){this.logger.log(2,"TR"),this.setMode("MODE_TEXT")}ccRTD(){this.logger.log(2,"RTD"),this.setMode("MODE_TEXT")}ccEDM(){this.logger.log(2,"EDM - Erase Displayed Memory"),this.displayedMemory.reset(),this.outputDataUpdate(!0)}ccCR(){this.logger.log(2,"CR - Carriage Return"),this.writeScreen.rollUp(),this.outputDataUpdate(!0)}ccENM(){this.logger.log(2,"ENM - Erase Non-displayed Memory"),this.nonDisplayedMemory.reset()}ccEOC(){if(this.logger.log(2,"EOC - End Of Caption"),this.mode==="MODE_POP-ON"){const e=this.displayedMemory;this.displayedMemory=this.nonDisplayedMemory,this.nonDisplayedMemory=e,this.writeScreen=this.nonDisplayedMemory,this.logger.log(1,()=>"DISP: "+this.displayedMemory.getDisplayText())}this.outputDataUpdate(!0)}ccTO(e){this.logger.log(2,"TO("+e+") - Tab Offset"),this.writeScreen.moveCursor(e)}ccMIDROW(e){const t={flash:!1};if(t.underline=e%2===1,t.italics=e>=46,t.italics)t.foreground="white";else{const n=Math.floor(e/2)-16,r=["white","green","blue","cyan","red","yellow","magenta"];t.foreground=r[n]}this.logger.log(2,"MIDROW: "+vt(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 Gl{constructor(e,t,n){this.channels=void 0,this.currentChannel=0,this.cmdHistory=Jc(),this.logger=void 0;const r=this.logger=new Gc;this.channels=[null,new Vl(e,t,r),new Vl(e+1,n,r)]}getHandler(e){return this.channels[e].getHandler()}setHandler(e,t){this.channels[e].setHandler(t)}addData(e,t){this.logger.time=e;for(let n=0;n<t.length;n+=2){const r=t[n]&127,i=t[n+1]&127;let s=!1,l=null;if(r===0&&i===0)continue;this.logger.log(3,()=>"["+la([t[n],t[n+1]])+"] -> ("+la([r,i])+")");const d=this.cmdHistory;if(r>=16&&r<=31){if(Qc(r,i,d)){bo(null,null,d),this.logger.log(3,()=>"Repeated command ("+la([r,i])+") is dropped");continue}bo(r,i,this.cmdHistory),s=this.parseCmd(r,i),s||(s=this.parseMidrow(r,i)),s||(s=this.parsePAC(r,i)),s||(s=this.parseBackgroundAttributes(r,i))}else bo(null,null,d);if(!s&&(l=this.parseChars(r,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 "+la([r,i])+" orig: "+la([t[n],t[n+1]]))}}parseCmd(e,t){const n=(e===20||e===28||e===21||e===29)&&t>=32&&t<=47,r=(e===23||e===31)&&t>=33&&t<=35;if(!(n||r))return!1;const i=e===20||e===21||e===23?1:2,s=this.channels[i];return e===20||e===21||e===28||e===29?t===32?s.ccRCL():t===33?s.ccBS():t===34?s.ccAOF():t===35?s.ccAON():t===36?s.ccDER():t===37?s.ccRU(2):t===38?s.ccRU(3):t===39?s.ccRU(4):t===40?s.ccFON():t===41?s.ccRDC():t===42?s.ccTR():t===43?s.ccRTD():t===44?s.ccEDM():t===45?s.ccCR():t===46?s.ccENM():t===47&&s.ccEOC():s.ccTO(t-32),this.currentChannel=i,!0}parseMidrow(e,t){let n=0;if((e===17||e===25)&&t>=32&&t<=47){if(e===17?n=1:n=2,n!==this.currentChannel)return this.logger.log(0,"Mismatch channel in midrow parsing"),!1;const r=this.channels[n];return r?(r.ccMIDROW(t),this.logger.log(3,()=>"MIDROW ("+la([e,t])+")"),!0):!1}return!1}parsePAC(e,t){let n;const r=(e>=17&&e<=23||e>=25&&e<=31)&&t>=64&&t<=127,i=(e===16||e===24)&&t>=64&&t<=95;if(!(r||i))return!1;const s=e<=23?1:2;t>=64&&t<=95?n=s===1?Hc[e]:Zc[e]:n=s===1?jc[e]:Wc[e];const l=this.channels[s];return l?(l.setPAC(this.interpretPAC(n,t)),this.currentChannel=s,!0):!1}interpretPAC(e,t){let n;const r={color:null,italics:!1,indent:null,underline:!1,row:e};return t>95?n=t-96:n=t-64,r.underline=(n&1)===1,n<=13?r.color=["white","green","blue","cyan","red","yellow","magenta","white"][Math.floor(n/2)]:n<=15?(r.italics=!0,r.color="white"):r.indent=Math.floor((n-16)/2)*4,r}parseChars(e,t){let n,r=null,i=null;if(e>=25?(n=2,i=e-8):(n=1,i=e),i>=17&&i<=19){let s;i===17?s=t+80:i===18?s=t+112:s=t+144,this.logger.log(2,()=>"Special char '"+Zl(s)+"' in channel "+n),r=[s]}else e>=32&&e<=127&&(r=t===0?[e]:[e,t]);return r&&this.logger.log(3,()=>"Char codes = "+la(r).join(",")),r}parseBackgroundAttributes(e,t){const n=(e===16||e===24)&&t>=32&&t<=47,r=(e===23||e===31)&&t>=45&&t<=47;if(!(n||r))return!1;let i;const s={};e===16||e===24?(i=Math.floor((t-32)/2),s.background=Vc[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()}bo(null,null,this.cmdHistory)}cueSplitAtTime(e){for(let t=0;t<this.channels.length;t++){const n=this.channels[t];n&&n.cueSplitAtTime(e)}}}function bo(a,e,t){t.a=a,t.b=e}function Qc(a,e,t){return t.a===a&&t.b===e}function Jc(){return{a:null,b:null}}var qo=function(){if(rr!=null&&rr.VTTCue)return self.VTTCue;const a=["","lr","rl"],e=["start","middle","end","left","right"];function t(l,d){if(typeof d!="string"||!Array.isArray(l))return!1;const c=d.toLowerCase();return~l.indexOf(c)?c:!1}function n(l){return t(a,l)}function r(l){return t(e,l)}function i(l,...d){let c=1;for(;c<arguments.length;c++){const p=arguments[c];for(const b in p)l[b]=p[b]}return l}function s(l,d,c){const p=this,b={enumerable:!0};p.hasBeenReset=!1;let I="",F=!1,$=l,ge=d,me=c,Fe=null,We="",et=!0,xt="auto",Ot="start",sn=50,Pt="middle",Xt=50,Yt="middle";Object.defineProperty(p,"id",i({},b,{get:function(){return I},set:function(Ft){I=""+Ft}})),Object.defineProperty(p,"pauseOnExit",i({},b,{get:function(){return F},set:function(Ft){F=!!Ft}})),Object.defineProperty(p,"startTime",i({},b,{get:function(){return $},set:function(Ft){if(typeof Ft!="number")throw new TypeError("Start time must be set to a number.");$=Ft,this.hasBeenReset=!0}})),Object.defineProperty(p,"endTime",i({},b,{get:function(){return ge},set:function(Ft){if(typeof Ft!="number")throw new TypeError("End time must be set to a number.");ge=Ft,this.hasBeenReset=!0}})),Object.defineProperty(p,"text",i({},b,{get:function(){return me},set:function(Ft){me=""+Ft,this.hasBeenReset=!0}})),Object.defineProperty(p,"region",i({},b,{get:function(){return Fe},set:function(Ft){Fe=Ft,this.hasBeenReset=!0}})),Object.defineProperty(p,"vertical",i({},b,{get:function(){return We},set:function(Ft){const xn=n(Ft);if(xn===!1)throw new SyntaxError("An invalid or illegal string was specified.");We=xn,this.hasBeenReset=!0}})),Object.defineProperty(p,"snapToLines",i({},b,{get:function(){return et},set:function(Ft){et=!!Ft,this.hasBeenReset=!0}})),Object.defineProperty(p,"line",i({},b,{get:function(){return xt},set:function(Ft){if(typeof Ft!="number"&&Ft!=="auto")throw new SyntaxError("An invalid number or illegal string was specified.");xt=Ft,this.hasBeenReset=!0}})),Object.defineProperty(p,"lineAlign",i({},b,{get:function(){return Ot},set:function(Ft){const xn=r(Ft);if(!xn)throw new SyntaxError("An invalid or illegal string was specified.");Ot=xn,this.hasBeenReset=!0}})),Object.defineProperty(p,"position",i({},b,{get:function(){return sn},set:function(Ft){if(Ft<0||Ft>100)throw new Error("Position must be between 0 and 100.");sn=Ft,this.hasBeenReset=!0}})),Object.defineProperty(p,"positionAlign",i({},b,{get:function(){return Pt},set:function(Ft){const xn=r(Ft);if(!xn)throw new SyntaxError("An invalid or illegal string was specified.");Pt=xn,this.hasBeenReset=!0}})),Object.defineProperty(p,"size",i({},b,{get:function(){return Xt},set:function(Ft){if(Ft<0||Ft>100)throw new Error("Size must be between 0 and 100.");Xt=Ft,this.hasBeenReset=!0}})),Object.defineProperty(p,"align",i({},b,{get:function(){return Yt},set:function(Ft){const xn=r(Ft);if(!xn)throw new SyntaxError("An invalid or illegal string was specified.");Yt=xn,this.hasBeenReset=!0}})),p.displayState=void 0}return s.prototype.getCueAsHTML=function(){return self.WebVTT.convertCueToDOMTree(self,this.text)},s}();class qc{decode(e,t){if(!e)return"";if(typeof e!="string")throw new Error("Error - expected string data.");return decodeURIComponent(encodeURIComponent(e))}}function Yl(a){function e(n,r,i,s){return(n|0)*3600+(r|0)*60+(i|0)+parseFloat(s||0)}const t=a.match(/^(?:(\d+):)?(\d{2}):(\d{2})(\.\d+)?/);return t?parseFloat(t[2])>59?e(t[2],t[3],0,t[4]):e(t[1],t[2],t[3],t[4]):null}class e0{constructor(){this.values=Object.create(null)}set(e,t){!this.get(e)&&t!==""&&(this.values[e]=t)}get(e,t,n){return n?this.has(e)?this.values[e]:t[n]:this.has(e)?this.values[e]:t}has(e){return e in this.values}alt(e,t,n){for(let r=0;r<n.length;++r)if(t===n[r]){this.set(e,t);break}}integer(e,t){/^-?\d+$/.test(t)&&this.set(e,parseInt(t,10))}percent(e,t){if(/^([\d]{1,3})(\.[\d]*)?%$/.test(t)){const n=parseFloat(t);if(n>=0&&n<=100)return this.set(e,n),!0}return!1}}function Xl(a,e,t,n){const r=n?a.split(n):[a];for(const i in r){if(typeof r[i]!="string")continue;const s=r[i].split(t);if(s.length!==2)continue;const l=s[0],d=s[1];e(l,d)}}const el=new qo(0,0,""),_o=el.align==="middle"?"middle":"center";function t0(a,e,t){const n=a;function r(){const l=Yl(a);if(l===null)throw new Error("Malformed timestamp: "+n);return a=a.replace(/^[^\sa-zA-Z-]+/,""),l}function i(l,d){const c=new e0;Xl(l,function(I,F){let $;switch(I){case"region":for(let ge=t.length-1;ge>=0;ge--)if(t[ge].id===F){c.set(I,t[ge].region);break}break;case"vertical":c.alt(I,F,["rl","lr"]);break;case"line":$=F.split(","),c.integer(I,$[0]),c.percent(I,$[0])&&c.set("snapToLines",!1),c.alt(I,$[0],["auto"]),$.length===2&&c.alt("lineAlign",$[1],["start",_o,"end"]);break;case"position":$=F.split(","),c.percent(I,$[0]),$.length===2&&c.alt("positionAlign",$[1],["start",_o,"end","line-left","line-right","auto"]);break;case"size":c.percent(I,F);break;case"align":c.alt(I,F,["start",_o,"end","left","right"]);break}},/:/,/\s/),d.region=c.get("region",null),d.vertical=c.get("vertical","");let p=c.get("line","auto");p==="auto"&&el.line===-1&&(p=-1),d.line=p,d.lineAlign=c.get("lineAlign","start"),d.snapToLines=c.get("snapToLines",!0),d.size=c.get("size",100),d.align=c.get("align",_o);let b=c.get("position","auto");b==="auto"&&el.position===50&&(b=d.align==="start"||d.align==="left"?0:d.align==="end"||d.align==="right"?100:50),d.position=b}function s(){a=a.replace(/^\s+/,"")}if(s(),e.startTime=r(),s(),a.slice(0,3)!=="-->")throw new Error("Malformed time stamp (time stamps must be separated by '-->'): "+n);a=a.slice(3),s(),e.endTime=r(),s(),i(a,e)}function Ql(a){return a.replace(/<br(?: \/)?>/gi,`
|
|
|
`)}class n0{constructor(){this.state="INITIAL",this.buffer="",this.decoder=new qc,this.regionList=[],this.cue=null,this.oncue=void 0,this.onparsingerror=void 0,this.onflush=void 0}parse(e){const t=this;e&&(t.buffer+=t.decoder.decode(e,{stream:!0}));function n(){let i=t.buffer,s=0;for(i=Ql(i);s<i.length&&i[s]!=="\r"&&i[s]!==`
|
|
|
`;)++s;const l=i.slice(0,s);return i[s]==="\r"&&++s,i[s]===`
|
|
|
`&&++s,t.buffer=i.slice(s),l}function r(i){Xl(i,function(s,l){},/:/)}try{let i="";if(t.state==="INITIAL"){if(!/\r\n|\n/.test(t.buffer))return this;i=n();const l=i.match(/^()?WEBVTT([ \t].*)?$/);if(!(l!=null&&l[0]))throw new Error("Malformed WebVTT signature.");t.state="HEADER"}let s=!1;for(;t.buffer;){if(!/\r\n|\n/.test(t.buffer))return this;switch(s?s=!1:i=n(),t.state){case"HEADER":/:/.test(i)?r(i):i||(t.state="ID");continue;case"NOTE":i||(t.state="ID");continue;case"ID":if(/^NOTE($|[ \t])/.test(i)){t.state="NOTE";break}if(!i)continue;if(t.cue=new qo(0,0,""),t.state="CUE",i.indexOf("-->")===-1){t.cue.id=i;continue}case"CUE":if(!t.cue){t.state="BADCUE";continue}try{t0(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 r0=/\r\n|\n\r|\n|\r/g,tl=function(e,t,n=0){return e.slice(n,n+t.length)===t},i0=function(e){let t=parseInt(e.slice(-3));const n=parseInt(e.slice(-6,-4)),r=parseInt(e.slice(-9,-7)),i=e.length>9?parseInt(e.substring(0,e.indexOf(":"))):0;if(!v(t)||!v(n)||!v(r)||!v(i))throw Error(`Malformed X-TIMESTAMP-MAP: Local:${e}`);return t+=1e3*n,t+=60*1e3*r,t+=60*60*1e3*i,t};function nl(a,e,t){return Ua(a.toString())+Ua(e.toString())+Ua(t)}const s0=function(e,t,n){let r=e[t],i=e[r.prevCC];if(!i||!i.new&&r.new){e.ccOffset=e.presentationOffset=r.start,r.new=!1;return}for(;(s=i)!=null&&s.new;){var s;e.ccOffset+=r.start-i.start,r.new=!1,r=i,i=e[r.prevCC]}e.presentationOffset=n};function a0(a,e,t,n,r,i,s){const l=new n0,d=tt(new Uint8Array(a)).trim().replace(r0,`
|
|
|
`).split(`
|
|
|
`),c=[],p=e?Ss(e.baseTime,e.timescale):0;let b="00:00.000",I=0,F=0,$,ge=!0;l.oncue=function(me){const Fe=t[n];let We=t.ccOffset;const et=(I-p)/9e4;if(Fe!=null&&Fe.new&&(F!==void 0?We=t.ccOffset=Fe.start:s0(t,n,et)),et){if(!e){$=new Error("Missing initPTS for VTT MPEGTS");return}We=et-t.presentationOffset}const xt=me.endTime-me.startTime,Ot=Qi((me.startTime+We-F)*9e4,r*9e4)/9e4;me.startTime=Math.max(Ot,0),me.endTime=Math.max(Ot+xt,0);const sn=me.text.trim();me.text=decodeURIComponent(encodeURIComponent(sn)),me.id||(me.id=nl(me.startTime,me.endTime,sn)),me.endTime>0&&c.push(me)},l.onparsingerror=function(me){$=me},l.onflush=function(){if($){s($);return}i(c)},d.forEach(me=>{if(ge)if(tl(me,"X-TIMESTAMP-MAP=")){ge=!1,me.slice(16).split(",").forEach(Fe=>{tl(Fe,"LOCAL:")?b=Fe.slice(6):tl(Fe,"MPEGTS:")&&(I=parseInt(Fe.slice(7)))});try{F=i0(b)/1e3}catch(Fe){$=Fe}return}else me===""&&(ge=!1);l.parse(me+`
|
|
|
`)}),l.flush()}const rl="stpp.ttml.im1t",Jl=/^(\d{2,}):(\d{2}):(\d{2}):(\d{2})\.?(\d+)?$/,ql=/^(\d*(?:\.\d*)?)(h|m|s|ms|f|t)$/,o0={left:"start",center:"center",right:"end",start:"start",end:"end"};function eu(a,e,t,n){const r=Y(new Uint8Array(a),["mdat"]);if(r.length===0){n(new Error("Could not parse IMSC1 mdat"));return}const i=r.map(l=>tt(l)),s=rs(e.baseTime,1,e.timescale);try{i.forEach(l=>t(l0(l,s)))}catch(l){n(l)}}function l0(a,e){const r=new DOMParser().parseFromString(a,"text/xml").getElementsByTagName("tt")[0];if(!r)throw new Error("Invalid ttml");const i={frameRate:30,subFrameRate:1,frameRateMultiplier:0,tickRate:0},s=Object.keys(i).reduce((b,I)=>(b[I]=r.getAttribute(`ttp:${I}`)||i[I],b),{}),l=r.getAttribute("xml:space")!=="preserve",d=tu(il(r,"styling","style")),c=tu(il(r,"layout","region")),p=il(r,"body","[begin]");return[].map.call(p,b=>{const I=nu(b,l);if(!I||!b.hasAttribute("begin"))return null;const F=al(b.getAttribute("begin"),s),$=al(b.getAttribute("dur"),s);let ge=al(b.getAttribute("end"),s);if(F===null)throw ru(b);if(ge===null){if($===null)throw ru(b);ge=F+$}const me=new qo(F-e,ge-e,I);me.id=nl(me.startTime,me.endTime,me.text);const Fe=c[b.getAttribute("region")],We=d[b.getAttribute("style")],et=u0(Fe,We,d),{textAlign:xt}=et;if(xt){const Ot=o0[xt];Ot&&(me.lineAlign=Ot),me.align=xt}return y(me,et),me}).filter(b=>b!==null)}function il(a,e,t){const n=a.getElementsByTagName(e)[0];return n?[].slice.call(n.querySelectorAll(t)):[]}function tu(a){return a.reduce((e,t)=>{const n=t.getAttribute("xml:id");return n&&(e[n]=t),e},{})}function nu(a,e){return[].slice.call(a.childNodes).reduce((t,n,r)=>{var i;return n.nodeName==="br"&&r?t+`
|
|
|
`:(i=n.childNodes)!=null&&i.length?nu(n,e):e?t+n.textContent.trim().replace(/\s+/g," "):t+n.textContent},"")}function u0(a,e,t){const n="http://www.w3.org/ns/ttml#styling";let r=null;const i=["displayAlign","textAlign","color","backgroundColor","fontSize","fontFamily"],s=a!=null&&a.hasAttribute("style")?a.getAttribute("style"):null;return s&&t.hasOwnProperty(s)&&(r=t[s]),i.reduce((l,d)=>{const c=sl(e,n,d)||sl(a,n,d)||sl(r,n,d);return c&&(l[d]=c),l},{})}function sl(a,e,t){return a&&a.hasAttributeNS(e,t)?a.getAttributeNS(e,t):null}function ru(a){return new Error(`Could not parse ttml timestamp ${a}`)}function al(a,e){if(!a)return null;let t=Yl(a);return t===null&&(Jl.test(a)?t=c0(a,e):ql.test(a)&&(t=d0(a,e))),t}function c0(a,e){const t=Jl.exec(a),n=(t[4]|0)+(t[5]|0)/e.subFrameRate;return(t[1]|0)*3600+(t[2]|0)*60+(t[3]|0)+n/e.frameRate}function d0(a,e){const t=ql.exec(a),n=Number(t[1]);switch(t[2]){case"h":return n*3600;case"m":return n*60;case"ms":return n*1e3;case"f":return n/e.frameRate;case"t":return n/e.tickRate}return n}class xo{constructor(e,t){this.timelineController=void 0,this.cueRanges=[],this.trackName=void 0,this.startTime=null,this.endTime=null,this.screen=null,this.timelineController=e,this.trackName=t}dispatchCue(){this.startTime!==null&&(this.timelineController.addCues(this.trackName,this.startTime,this.endTime,this.screen,this.cueRanges),this.startTime=null)}newCue(e,t,n){(this.startTime===null||this.startTime>e)&&(this.startTime=e),this.endTime=t,this.screen=n,this.timelineController.createCaptionsTrack(this.trackName)}reset(){this.cueRanges=[],this.startTime=null}}class f0{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=au(),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(g.MEDIA_ATTACHING,this.onMediaAttaching,this),e.on(g.MEDIA_DETACHING,this.onMediaDetaching,this),e.on(g.MANIFEST_LOADING,this.onManifestLoading,this),e.on(g.MANIFEST_LOADED,this.onManifestLoaded,this),e.on(g.SUBTITLE_TRACKS_UPDATED,this.onSubtitleTracksUpdated,this),e.on(g.FRAG_LOADING,this.onFragLoading,this),e.on(g.FRAG_LOADED,this.onFragLoaded,this),e.on(g.FRAG_PARSING_USERDATA,this.onFragParsingUserdata,this),e.on(g.FRAG_DECRYPTED,this.onFragDecrypted,this),e.on(g.INIT_PTS_FOUND,this.onInitPtsFound,this),e.on(g.SUBTITLE_TRACKS_CLEARED,this.onSubtitleTracksCleared,this),e.on(g.BUFFER_FLUSHING,this.onBufferFlushing,this)}destroy(){const{hls:e}=this;e.off(g.MEDIA_ATTACHING,this.onMediaAttaching,this),e.off(g.MEDIA_DETACHING,this.onMediaDetaching,this),e.off(g.MANIFEST_LOADING,this.onManifestLoading,this),e.off(g.MANIFEST_LOADED,this.onManifestLoaded,this),e.off(g.SUBTITLE_TRACKS_UPDATED,this.onSubtitleTracksUpdated,this),e.off(g.FRAG_LOADING,this.onFragLoading,this),e.off(g.FRAG_LOADED,this.onFragLoaded,this),e.off(g.FRAG_PARSING_USERDATA,this.onFragParsingUserdata,this),e.off(g.FRAG_DECRYPTED,this.onFragDecrypted,this),e.off(g.INIT_PTS_FOUND,this.onInitPtsFound,this),e.off(g.SUBTITLE_TRACKS_CLEARED,this.onSubtitleTracksCleared,this),e.off(g.BUFFER_FLUSHING,this.onBufferFlushing,this),this.hls=this.config=this.media=null,this.cea608Parser1=this.cea608Parser2=void 0}initCea608Parsers(){const e=new xo(this,"textTrack1"),t=new xo(this,"textTrack2"),n=new xo(this,"textTrack3"),r=new xo(this,"textTrack4");this.cea608Parser1=new Gl(1,e,t),this.cea608Parser2=new Gl(3,n,r)}addCues(e,t,n,r,i){let s=!1;for(let l=i.length;l--;){const d=i[l],c=h0(d[0],d[1],t,n);if(c>=0&&(d[0]=Math.min(d[0],t),d[1]=Math.max(d[1],n),s=!0,c/(n-t)>.5))return}if(s||i.push([t,n]),this.config.renderTextTracksNatively){const l=this.captionsTracks[e];this.Cues.newCue(l,t,n,r)}else{const l=this.Cues.newCue(null,t,n,r);this.hls.trigger(g.CUES_PARSED,{type:"captions",cues:l,track:e})}}onInitPtsFound(e,{frag:t,id:n,initPTS:r,timescale:i,trackId:s}){const{unparsedVttFrags:l}=this;n===te.MAIN&&(this.initPTS[t.cc]={baseTime:r,timescale:i,trackId:s}),l.length&&(this.unparsedVttFrags=[],l.forEach(d=>{this.initPTS[d.frag.cc]?this.onFragLoaded(g.FRAG_LOADED,d):this.hls.trigger(g.SUBTITLE_FRAG_PROCESSED,{success:!1,frag:d.frag,error:new Error("Subtitle discontinuity domain does not match main")})}))}getExistingTrack(e,t){const{media:n}=this;if(n)for(let r=0;r<n.textTracks.length;r++){const i=n.textTracks[r];if(su(i,{name:e,lang:t,characteristics:"transcribes-spoken-dialog,describes-music-and-sound"}))return i}return null}createCaptionsTrack(e){this.config.renderTextTracksNatively?this.createNativeTrack(e):this.createNonNativeTrack(e)}createNativeTrack(e){if(this.captionsTracks[e])return;const{captionsProperties:t,captionsTracks:n,media:r}=this,{label:i,languageCode:s}=t[e],l=this.getExistingTrack(i,s);if(l)n[e]=l,xa(n[e]),$l(n[e],r);else{const d=this.createTextTrack("captions",i,s);d&&(d[e]=!0,n[e]=d)}}createNonNativeTrack(e){if(this.nonNativeCaptionsTracks[e])return;const t=this.captionsProperties[e];if(!t)return;const n=t.label,r={_id:e,label:n,kind:"captions",default:t.media?!!t.media.default:!1,closedCaptions:t.media};this.nonNativeCaptionsTracks[e]=r,this.hls.trigger(g.NON_NATIVE_TEXT_TRACKS_FOUND,{tracks:[r]})}createTextTrack(e,t,n){const r=this.media;if(r)return r.addTextTrack(e,t,n)}onMediaAttaching(e,t){this.media=t.media,t.mediaSource||this._cleanTracks()}onMediaDetaching(e,t){const n=!!t.transferMedia;if(this.media=null,n)return;const{captionsTracks:r}=this;Object.keys(r).forEach(i=>{xa(r[i]),delete r[i]}),this.nonNativeCaptionsTracks={}}onManifestLoading(){this.lastCc=-1,this.lastSn=-1,this.lastPartIndex=-1,this.prevCC=-1,this.vttCCs=au(),this._cleanTracks(),this.tracks=[],this.captionsTracks={},this.nonNativeCaptionsTracks={},this.textTracks=[],this.unparsedVttFrags=[],this.initPTS=[],this.cea608Parser1&&this.cea608Parser2&&(this.cea608Parser1.reset(),this.cea608Parser2.reset())}_cleanTracks(){const{media:e}=this;if(!e)return;const t=e.textTracks;if(t)for(let n=0;n<t.length;n++)xa(t[n])}onSubtitleTracksUpdated(e,t){const n=t.subtitleTracks||[],r=n.some(i=>i.textCodec===rl);if(this.config.enableWebVTT||r&&this.config.enableIMSC1){if(bl(this.tracks,n)){this.tracks=n;return}if(this.textTracks=[],this.tracks=n,this.config.renderTextTracksNatively){const s=this.media,l=s?go(s.textTracks):null;if(this.tracks.forEach((d,c)=>{let p;if(l){let b=null;for(let I=0;I<l.length;I++)if(l[I]&&su(l[I],d)){b=l[I],l[I]=null;break}b&&(p=b)}if(p)xa(p);else{const b=iu(d);p=this.createTextTrack(b,d.name,d.lang),p&&(p.mode="disabled")}p&&this.textTracks.push(p)}),l!=null&&l.length){const d=l.filter(c=>c!==null).map(c=>c.label);d.length&&this.hls.logger.warn(`Media element contains unused subtitle tracks: ${d.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(g.NON_NATIVE_TEXT_TRACKS_FOUND,{tracks:s})}}}onManifestLoaded(e,t){this.config.enableCEA708Captions&&t.captions&&t.captions.forEach(n=>{const r=/(?:CC|SERVICE)([1-4])/.exec(n.instreamId);if(!r)return;const i=`textTrack${r[1]}`,s=this.captionsProperties[i];s&&(s.label=n.name,n.lang&&(s.languageCode=n.lang),s.media=n)})}closedCaptionsForLevel(e){const t=this.hls.levels[e.level];return t==null?void 0:t.attrs["CLOSED-CAPTIONS"]}onFragLoading(e,t){if(this.enabled&&t.frag.type===te.MAIN){var n,r;const{cea608Parser1:i,cea608Parser2:s,lastSn:l}=this,{cc:d,sn:c}=t.frag,p=(n=(r=t.part)==null?void 0:r.index)!=null?n:-1;i&&s&&(c!==l+1||c===l&&p!==this.lastPartIndex+1||d!==this.lastCc)&&(i.reset(),s.reset()),this.lastCc=d,this.lastSn=c,this.lastPartIndex=p}}onFragLoaded(e,t){const{frag:n,payload:r}=t;if(n.type===te.SUBTITLE)if(r.byteLength){const i=n.decryptdata,s="stats"in t;if(i==null||!i.encrypted||s){const l=this.tracks[n.level],d=this.vttCCs;d[n.cc]||(d[n.cc]={start:n.start,prevCC:this.prevCC,new:!0},this.prevCC=n.cc),l&&l.textCodec===rl?this._parseIMSC1(n,r):this._parseVTTs(t)}}else this.hls.trigger(g.SUBTITLE_FRAG_PROCESSED,{success:!1,frag:n,error:new Error("Empty subtitle payload")})}_parseIMSC1(e,t){const n=this.hls;eu(t,this.initPTS[e.cc],r=>{this._appendCues(r,e.level),n.trigger(g.SUBTITLE_FRAG_PROCESSED,{success:!0,frag:e})},r=>{n.logger.log(`Failed to parse IMSC1: ${r}`),n.trigger(g.SUBTITLE_FRAG_PROCESSED,{success:!1,frag:e,error:r})})}_parseVTTs(e){var t;const{frag:n,payload:r}=e,{initPTS:i,unparsedVttFrags:s}=this,l=i.length-1;if(!i[n.cc]&&l===-1){s.push(e);return}const d=this.hls,c=(t=n.initSegment)!=null&&t.data?ht(n.initSegment.data,new Uint8Array(r)).buffer:r;a0(c,this.initPTS[n.cc],this.vttCCs,n.cc,n.start,p=>{this._appendCues(p,n.level),d.trigger(g.SUBTITLE_FRAG_PROCESSED,{success:!0,frag:n})},p=>{const b=p.message==="Missing initPTS for VTT MPEGTS";b?s.push(e):this._fallbackToIMSC1(n,r),d.logger.log(`Failed to parse VTT cue: ${p}`),!(b&&l>n.cc)&&d.trigger(g.SUBTITLE_FRAG_PROCESSED,{success:!1,frag:n,error:p})})}_fallbackToIMSC1(e,t){const n=this.tracks[e.level];n.textCodec||eu(t,this.initPTS[e.cc],()=>{n.textCodec=rl,this._parseIMSC1(e,t)},()=>{n.textCodec="wvtt"})}_appendCues(e,t){const n=this.hls;if(this.config.renderTextTracksNatively){const r=this.textTracks[t];if(!r||r.mode==="disabled")return;e.forEach(i=>Ul(r,i))}else{const r=this.tracks[t];if(!r)return;const i=r.default?"default":"subtitles"+t;n.trigger(g.CUES_PARSED,{type:"subtitles",cues:e,track:i})}}onFragDecrypted(e,t){const{frag:n}=t;n.type===te.SUBTITLE&&this.onFragLoaded(g.FRAG_LOADED,t)}onSubtitleTracksCleared(){this.tracks=[],this.captionsTracks={}}onFragParsingUserdata(e,t){if(!this.enabled||!this.config.enableCEA708Captions)return;const{frag:n,samples:r}=t;if(!(n.type===te.MAIN&&this.closedCaptionsForLevel(n)==="NONE"))for(let i=0;i<r.length;i++){const s=r[i].bytes;if(s){this.cea608Parser1||this.initCea608Parsers();const l=this.extractCea608Data(s);this.cea608Parser1.addData(r[i].pts,l[0]),this.cea608Parser2.addData(r[i].pts,l[1])}}}onBufferFlushing(e,{startOffset:t,endOffset:n,endOffsetSubtitles:r,type:i}){const{media:s}=this;if(!(!s||s.currentTime<n)){if(!i||i==="video"){const{captionsTracks:l}=this;Object.keys(l).forEach(d=>Yo(l[d],t,n))}if(this.config.renderTextTracksNatively&&t===0&&r!==void 0){const{textTracks:l}=this;Object.keys(l).forEach(d=>Yo(l[d],t,r))}}}extractCea608Data(e){const t=[[],[]],n=e[0]&31;let r=2;for(let i=0;i<n;i++){const s=e[r++],l=127&e[r++],d=127&e[r++];if(l===0&&d===0)continue;if((4&s)!==0){const p=3&s;(p===0||p===1)&&(t[p].push(l),t[p].push(d))}}return t}}function iu(a){return a.characteristics&&/transcribes-spoken-dialog/gi.test(a.characteristics)&&/describes-music-and-sound/gi.test(a.characteristics)?"captions":"subtitles"}function su(a,e){return!!a&&a.kind===iu(e)&&zo(e,a)}function h0(a,e,t,n){return Math.min(e,n)-Math.max(a,t)}function au(){return{ccOffset:0,presentationOffset:0,0:{start:0,prevCC:-1,new:!0}}}const m0=/\s/,p0={newCue(a,e,t,n){const r=[];let i,s,l,d,c;const p=self.VTTCue||self.TextTrackCue;for(let I=0;I<n.rows.length;I++)if(i=n.rows[I],l=!0,d=0,c="",!i.isEmpty()){var b;for(let ge=0;ge<i.chars.length;ge++)m0.test(i.chars[ge].uchar)&&l?d++:(c+=i.chars[ge].uchar,l=!1);i.cueStartTime=e,e===t&&(t+=1e-4),d>=16?d--:d++;const F=Ql(c.trim()),$=nl(e,t,F);a!=null&&(b=a.cues)!=null&&b.getCueById($)||(s=new p(e,t,F),s.id=$,s.line=I+1,s.align="left",s.position=10+Math.min(80,Math.floor(d*8/32)*10),r.push(s))}return a&&r.length&&(r.sort((I,F)=>I.line==="auto"||F.line==="auto"?0:I.line>8&&F.line>8?F.line-I.line:I.line-F.line),r.forEach(I=>Ul(a,I))),r}};function g0(){if(self.fetch&&self.AbortController&&self.ReadableStream&&self.Request)try{return new self.ReadableStream({}),!0}catch(a){}return!1}const v0=/(\d+)-(\d+)\/(\d+)/;class ou{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||x0,this.controller=new self.AbortController,this.stats=new w}destroy(){this.loader=this.callbacks=this.context=this.config=this.request=null,this.abortInternal(),this.response=null,this.fetchSetup=this.controller=this.stats=null}abortInternal(){this.controller&&!this.stats.loading.end&&(this.stats.aborted=!0,this.controller.abort())}abort(){var e;this.abortInternal(),(e=this.callbacks)!=null&&e.onAbort&&this.callbacks.onAbort(this.stats,this.context,this.response)}load(e,t,n){const r=this.stats;if(r.loading.start)throw new Error("Loader can only be used once.");r.loading.start=self.performance.now();const i=y0(e,this.controller.signal),s=e.responseType==="arraybuffer",l=s?"byteLength":"length",{maxTimeToFirstByteMs:d,maxLoadTimeMs:c}=t.loadPolicy;this.context=e,this.config=t,this.callbacks=n,this.request=this.fetchSetup(e,i),self.clearTimeout(this.requestTimeout),t.timeout=d&&v(d)?d:c,this.requestTimeout=self.setTimeout(()=>{this.callbacks&&(this.abortInternal(),this.callbacks.onTimeout(r,e,this.response))},t.timeout),(Fa(this.request)?this.request.then(self.fetch):self.fetch(this.request)).then(b=>{var I;this.response=this.loader=b;const F=Math.max(self.performance.now(),r.loading.start);if(self.clearTimeout(this.requestTimeout),t.timeout=c,this.requestTimeout=self.setTimeout(()=>{this.callbacks&&(this.abortInternal(),this.callbacks.onTimeout(r,e,this.response))},c-(F-r.loading.start)),!b.ok){const{status:ge,statusText:me}=b;throw new E0(me||"fetch, bad network response",ge,b)}r.loading.first=F,r.total=_0(b.headers)||r.total;const $=(I=this.callbacks)==null?void 0:I.onProgress;return $&&v(t.highWaterMark)?this.loadProgressively(b,r,e,t.highWaterMark,$):s?b.arrayBuffer():e.responseType==="json"?b.json():b.text()}).then(b=>{var I,F;const $=this.response;if(!$)throw new Error("loader destroyed");self.clearTimeout(this.requestTimeout),r.loading.end=Math.max(self.performance.now(),r.loading.first);const ge=b[l];ge&&(r.loaded=r.total=ge);const me={url:$.url,data:b,code:$.status},Fe=(I=this.callbacks)==null?void 0:I.onProgress;Fe&&!v(t.highWaterMark)&&Fe(r,e,b,$),(F=this.callbacks)==null||F.onSuccess(me,r,e,$)}).catch(b=>{var I;if(self.clearTimeout(this.requestTimeout),r.aborted)return;const F=b&&b.code||0,$=b?b.message:null;(I=this.callbacks)==null||I.onError({code:F,text:$},e,b?b.details:null,r)})}getCacheAge(){let e=null;if(this.response){const t=this.response.headers.get("age");e=t?parseFloat(t):null}return e}getResponseHeader(e){return this.response?this.response.headers.get(e):null}loadProgressively(e,t,n,r=0,i){const s=new Ta,l=e.body.getReader(),d=()=>l.read().then(c=>{if(c.done)return s.dataLength&&i(t,n,s.flush().buffer,e),Promise.resolve(new ArrayBuffer(0));const p=c.value,b=p.length;return t.loaded+=b,b<r||s.dataLength?(s.push(p),s.dataLength>=r&&i(t,n,s.flush().buffer,e)):i(t,n,p.buffer,e),d()}).catch(()=>Promise.reject());return d()}}function y0(a,e){const t={method:"GET",mode:"cors",credentials:"same-origin",signal:e,headers:new self.Headers(y({},a.headers))};return a.rangeEnd&&t.headers.set("Range","bytes="+a.rangeStart+"-"+String(a.rangeEnd-1)),t}function b0(a){const e=v0.exec(a);if(e)return parseInt(e[2])-parseInt(e[1])+1}function _0(a){const e=a.get("Content-Range");if(e){const n=b0(e);if(v(n))return n}const t=a.get("Content-Length");if(t)return parseInt(t)}function x0(a,e){return new self.Request(a.url,e)}class E0 extends Error{constructor(e,t,n){super(e),this.code=void 0,this.details=void 0,this.code=t,this.details=n}}const S0=/^age:\s*[\d.]+\s*$/im;class lu{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 w,this.retryDelay=0}destroy(){this.callbacks=null,this.abortInternal(),this.loader=null,this.config=null,this.context=null,this.xhrSetup=null}abortInternal(){const e=this.loader;self.clearTimeout(this.requestTimeout),self.clearTimeout(this.retryTimeout),e&&(e.onreadystatechange=null,e.onprogress=null,e.readyState!==4&&(this.stats.aborted=!0,e.abort()))}abort(){var e;this.abortInternal(),(e=this.callbacks)!=null&&e.onAbort&&this.callbacks.onAbort(this.stats,this.context,this.loader)}load(e,t,n){if(this.stats.loading.start)throw new Error("Loader can only be used once.");this.stats.loading.start=self.performance.now(),this.context=e,this.config=t,this.callbacks=n,this.loadInternal()}loadInternal(){const{config:e,context:t}=this;if(!e||!t)return;const n=this.loader=new self.XMLHttpRequest,r=this.stats;r.loading.first=0,r.loaded=0,r.aborted=!1;const i=this.xhrSetup;i?Promise.resolve().then(()=>{if(!(this.loader!==n||this.stats.aborted))return i(n,t.url)}).catch(s=>{if(!(this.loader!==n||this.stats.aborted))return n.open("GET",t.url,!0),i(n,t.url)}).then(()=>{this.loader!==n||this.stats.aborted||this.openAndSendXhr(n,t,e)}).catch(s=>{var l;(l=this.callbacks)==null||l.onError({code:n.status,text:s.message},t,n,r)}):this.openAndSendXhr(n,t,e)}openAndSendXhr(e,t,n){e.readyState||e.open("GET",t.url,!0);const r=t.headers,{maxTimeToFirstByteMs:i,maxLoadTimeMs:s}=n.loadPolicy;if(r)for(const l in r)e.setRequestHeader(l,r[l]);t.rangeEnd&&e.setRequestHeader("Range","bytes="+t.rangeStart+"-"+(t.rangeEnd-1)),e.onreadystatechange=this.readystatechange.bind(this),e.onprogress=this.loadprogress.bind(this),e.responseType=t.responseType,self.clearTimeout(this.requestTimeout),n.timeout=i&&v(i)?i:s,this.requestTimeout=self.setTimeout(this.loadtimeout.bind(this),n.timeout),e.send()}readystatechange(){const{context:e,loader:t,stats:n}=this;if(!e||!t)return;const r=t.readyState,i=this.config;if(!n.aborted&&r>=2&&(n.loading.first===0&&(n.loading.first=Math.max(self.performance.now(),n.loading.start),i.timeout!==i.loadPolicy.maxLoadTimeMs&&(self.clearTimeout(this.requestTimeout),i.timeout=i.loadPolicy.maxLoadTimeMs,this.requestTimeout=self.setTimeout(this.loadtimeout.bind(this),i.loadPolicy.maxLoadTimeMs-(n.loading.first-n.loading.start)))),r===4)){self.clearTimeout(this.requestTimeout),t.onreadystatechange=null,t.onprogress=null;const c=t.status,p=t.responseType==="text"?t.responseText:null;if(c>=200&&c<300){const $=p!=null?p:t.response;if($!=null){var s,l;n.loading.end=Math.max(self.performance.now(),n.loading.first);const ge=t.responseType==="arraybuffer"?$.byteLength:$.length;n.loaded=n.total=ge,n.bwEstimate=n.total*8e3/(n.loading.end-n.loading.first);const me=(s=this.callbacks)==null?void 0:s.onProgress;me&&me(n,e,$,t);const Fe={url:t.responseURL,data:$,code:c};(l=this.callbacks)==null||l.onSuccess(Fe,n,e,t);return}}const b=i.loadPolicy.errorRetry,I=n.retry,F={url:e.url,data:void 0,code:c};if(gr(b,I,!1,F))this.retry(b);else{var d;ie.error(`${c} while loading ${e.url}`),(d=this.callbacks)==null||d.onError({code:c,text:t.statusText},e,t,n)}}}loadtimeout(){if(!this.config)return;const e=this.config.loadPolicy.timeoutRetry,t=this.stats.retry;if(gr(e,t,!0))this.retry(e);else{var n;ie.warn(`timeout while loading ${(n=this.context)==null?void 0:n.url}`);const r=this.callbacks;r&&(this.abortInternal(),r.onTimeout(this.stats,this.context,this.loader))}}retry(e){const{context:t,stats:n}=this;this.retryDelay=Kn(e,n.retry),n.retry++,ie.warn(`${status?"HTTP Status "+status:"Timeout"} while loading ${t==null?void 0:t.url}, retrying ${n.retry}/${e.maxNumRetry} in ${this.retryDelay}ms`),this.abortInternal(),this.loader=null,self.clearTimeout(this.retryTimeout),this.retryTimeout=self.setTimeout(this.loadInternal.bind(this),this.retryDelay)}loadprogress(e){const t=this.stats;t.loaded=e.loaded,e.lengthComputable&&(t.total=e.total)}getCacheAge(){let e=null;if(this.loader&&S0.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 w0={maxTimeToFirstByteMs:8e3,maxLoadTimeMs:2e4,timeoutRetry:null,errorRetry:null},C0=T(T({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,startOnSegmentBoundary:!1,maxBufferSize:60*1e3*1e3,maxFragLookUpTolerance:.25,maxBufferHole:.1,detectStallWithCurrentTimeMs:1250,highBufferWatchdogPeriod:2,nudgeOffset:.1,nudgeMaxRetry:3,nudgeOnVideoHole:!0,liveSyncMode:"edge",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:lu,fLoader:void 0,pLoader:void 0,xhrSetup:void 0,licenseXhrSetup:void 0,licenseResponseCallback:void 0,abrController:Zn,bufferController:Ru,capLevelController:Ho,errorController:jt,fpsController:Dc,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:li,requireKeySystemAccessOnStart:!1,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,preserveManualLevelOnError:!1,certLoadPolicy:{default:w0},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},T0()),{},{subtitleStreamController:Uc,subtitleTrackController:Lc,timelineController:f0,audioStreamController:Tu,audioTrackController:Au,emeController:_a,cmcdController:wc,contentSteeringController:Tc,interstitialsController:$c});function T0(){return{cueHandler:p0,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 A0(a,e,t){if((e.liveSyncDurationCount||e.liveMaxLatencyDurationCount)&&(e.liveSyncDuration||e.liveMaxLatencyDuration))throw new Error("Illegal hls.js config: don't mix up liveSyncDurationCount/liveMaxLatencyDurationCount and liveSyncDuration/liveMaxLatencyDuration");if(e.liveMaxLatencyDurationCount!==void 0&&(e.liveSyncDurationCount===void 0||e.liveMaxLatencyDurationCount<=e.liveSyncDurationCount))throw new Error('Illegal hls.js config: "liveMaxLatencyDurationCount" must be greater than "liveSyncDurationCount"');if(e.liveMaxLatencyDuration!==void 0&&(e.liveSyncDuration===void 0||e.liveMaxLatencyDuration<=e.liveSyncDuration))throw new Error('Illegal hls.js config: "liveMaxLatencyDuration" must be greater than "liveSyncDuration"');const n=ol(a),r=["manifest","level","frag"],i=["TimeOut","MaxRetry","RetryDelay","MaxRetryTimeout"];return r.forEach(s=>{const l=`${s==="level"?"playlist":s}LoadPolicy`,d=e[l]===void 0,c=[];i.forEach(p=>{const b=`${s}Loading${p}`,I=e[b];if(I!==void 0&&d){c.push(b);const F=n[l].default;switch(e[l]={default:F},p){case"TimeOut":F.maxLoadTimeMs=I,F.maxTimeToFirstByteMs=I;break;case"MaxRetry":F.errorRetry.maxNumRetry=I,F.timeoutRetry.maxNumRetry=I;break;case"RetryDelay":F.errorRetry.retryDelayMs=I,F.timeoutRetry.retryDelayMs=I;break;case"MaxRetryTimeout":F.errorRetry.maxRetryDelayMs=I,F.timeoutRetry.maxRetryDelayMs=I;break}}}),c.length&&t.warn(`hls.js config: "${c.join('", "')}" setting(s) are deprecated, use "${l}": ${vt(e[l])}`)}),T(T({},n),e)}function ol(a){return a&&typeof a=="object"?Array.isArray(a)?a.map(ol):Object.keys(a).reduce((e,t)=>(e[t]=ol(a[t]),e),{}):a}function D0(a,e){const t=a.loader;t!==ou&&t!==lu?(e.log("[config]: Custom loader detected, cannot enable progressive streaming"),a.progressive=!1):g0()&&(a.loader=ou,a.progressive=!0,a.enableSoftwareAES=!0,e.log("[config]: Progressive streaming enabled, using FetchLoader"))}const Eo=2,I0=.1,R0=.05,L0=100;class O0 extends Kr{constructor(e,t){super("gap-controller",e.logger),this.hls=void 0,this.fragmentTracker=void 0,this.media=null,this.mediaSource=void 0,this.nudgeRetry=0,this.stallReported=!1,this.stalled=null,this.moved=!1,this.seeking=!1,this.buffered={},this.lastCurrentTime=0,this.ended=0,this.waiting=0,this.onMediaPlaying=()=>{this.ended=0,this.waiting=0},this.onMediaWaiting=()=>{var n;(n=this.media)!=null&&n.seeking||(this.waiting=self.performance.now(),this.tick())},this.onMediaEnded=()=>{if(this.hls){var n;this.ended=((n=this.media)==null?void 0:n.currentTime)||1,this.hls.trigger(g.MEDIA_ENDED,{stalled:!1})}},this.hls=e,this.fragmentTracker=t,this.registerListeners()}registerListeners(){const{hls:e}=this;e&&(e.on(g.MEDIA_ATTACHED,this.onMediaAttached,this),e.on(g.MEDIA_DETACHING,this.onMediaDetaching,this),e.on(g.BUFFER_APPENDED,this.onBufferAppended,this))}unregisterListeners(){const{hls:e}=this;e&&(e.off(g.MEDIA_ATTACHED,this.onMediaAttached,this),e.off(g.MEDIA_DETACHING,this.onMediaDetaching,this),e.off(g.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(L0),this.mediaSource=t.mediaSource;const n=this.media=t.media;Bi(n,"playing",this.onMediaPlaying),Bi(n,"waiting",this.onMediaWaiting),Bi(n,"ended",this.onMediaEnded)}onMediaDetaching(e,t){this.clearInterval();const{media:n}=this;n&&(Ki(n,"playing",this.onMediaPlaying),Ki(n,"waiting",this.onMediaWaiting),Ki(n,"ended",this.onMediaEnded),this.media=null),this.mediaSource=void 0}onBufferAppended(e,t){this.buffered=t.timeRanges}get hasBuffered(){return Object.keys(this.buffered).length>0}tick(){var e;if(!((e=this.media)!=null&&e.readyState)||!this.hasBuffered)return;const t=this.media.currentTime;this.poll(t,this.lastCurrentTime),this.lastCurrentTime=t}poll(e,t){var n,r;const i=(n=this.hls)==null?void 0:n.config;if(!i)return;const s=this.media;if(!s)return;const{seeking:l}=s,d=this.seeking&&!l,c=!this.seeking&&l,p=s.paused&&!l||s.ended||s.playbackRate===0;if(this.seeking=l,e!==t){t&&(this.ended=0),this.moved=!0,l||(this.nudgeRetry=0,i.nudgeOnVideoHole&&!p&&e>t&&this.nudgeOnVideoHole(e,t)),this.waiting===0&&this.stallResolved(e);return}if(c||d){d&&this.stallResolved(e);return}if(p){this.nudgeRetry=0,this.stallResolved(e),!this.ended&&s.ended&&this.hls&&(this.ended=e||1,this.hls.trigger(g.MEDIA_ENDED,{stalled:!1}));return}if(!Jn.getBuffered(s).length){this.nudgeRetry=0;return}const b=Jn.bufferInfo(s,e,0),I=b.nextStart||0,F=this.fragmentTracker;if(l&&F&&this.hls){const sn=uu(this.hls.inFlightFragments,e),Pt=b.len>Eo,Xt=!I||sn||I-e>Eo&&!F.getPartialFragment(e);if(Pt||Xt)return;this.moved=!1}const $=(r=this.hls)==null?void 0:r.latestLevelDetails;if(!this.moved&&this.stalled!==null&&F){if(!(b.len>0)&&!I)return;const Pt=Math.max(I,b.start||0)-e,Yt=!!($!=null&&$.live)?$.targetduration*2:Eo,Ft=So(e,F);if(Pt>0&&(Pt<=Yt||Ft)){s.paused||this._trySkipBufferHole(Ft);return}}const ge=i.detectStallWithCurrentTimeMs,me=self.performance.now(),Fe=this.waiting;let We=this.stalled;if(We===null)if(Fe>0&&me-Fe<ge)We=this.stalled=Fe;else{this.stalled=me;return}const et=me-We;if(!l&&(et>=ge||Fe)&&this.hls){var xt;if(((xt=this.mediaSource)==null?void 0:xt.readyState)==="ended"&&!($!=null&&$.live)&&Math.abs(e-(($==null?void 0:$.edge)||0))<1){if(this.ended)return;this.ended=e||1,this.hls.trigger(g.MEDIA_ENDED,{stalled:!0});return}if(this._reportStall(b),!this.media||!this.hls)return}const Ot=Jn.bufferInfo(s,e,i.maxBufferHole);this._tryFixBufferStall(Ot,et,e)}stallResolved(e){const t=this.stalled;if(t&&this.hls&&(this.stalled=null,this.stallReported)){const n=self.performance.now()-t;this.log(`playback not stuck anymore @${e}, after ${Math.round(n)}ms`),this.stallReported=!1,this.waiting=0,this.hls.trigger(g.STALL_RESOLVED,{})}}nudgeOnVideoHole(e,t){var n;const r=this.buffered.video;if(this.hls&&this.media&&this.fragmentTracker&&(n=this.buffered.audio)!=null&&n.length&&r&&r.length>1&&e>r.end(0)){const i=Jn.bufferedInfo(Jn.timeRangesToArray(this.buffered.audio),e,0);if(i.len>1&&t>=i.start){const s=Jn.timeRangesToArray(r),l=Jn.bufferedInfo(s,t,0).bufferedIndex;if(l>-1&&l<s.length-1){const d=Jn.bufferedInfo(s,e,0).bufferedIndex,c=s[l].end,p=s[l+1].start;if((d===-1||d>l)&&p-c<1&&e-c<2){const b=new Error(`nudging playhead to flush pipeline after video hole. currentTime: ${e} hole: ${c} -> ${p} buffered index: ${d}`);this.warn(b.message),this.media.currentTime+=1e-6;let I=So(e,this.fragmentTracker);I&&"fragment"in I?I=I.fragment:I||(I=void 0);const F=Jn.bufferInfo(this.media,e,0);this.hls.trigger(g.ERROR,{type:fe.MEDIA_ERROR,details:z.BUFFER_SEEK_OVER_HOLE,fatal:!1,error:b,reason:b.message,frag:I,buffer:F.len,bufferInfo:F})}}}}}_tryFixBufferStall(e,t,n){var r,i;const{fragmentTracker:s,media:l}=this,d=(r=this.hls)==null?void 0:r.config;if(!l||!s||!d)return;const c=(i=this.hls)==null?void 0:i.latestLevelDetails,p=So(n,s);if((p||c!=null&&c.live&&n<c.fragmentStart)&&(this._trySkipBufferHole(p)||!this.media))return;const b=e.buffered,I=this.adjacentTraversal(e,n);(b&&b.length>1&&e.len>d.maxBufferHole||e.nextStart&&(e.nextStart-n<d.maxBufferHole||I))&&(t>d.highBufferWatchdogPeriod*1e3||this.waiting)&&(this.warn("Trying to nudge playhead over buffer-hole"),this._tryNudgeBuffer(e))}adjacentTraversal(e,t){const n=this.fragmentTracker,r=e.nextStart;if(n&&r){const i=n.getFragAtPos(t,te.MAIN),s=n.getFragAtPos(r,te.MAIN);if(i&&s)return s.sn-i.sn<2}return!1}_reportStall(e){const{hls:t,media:n,stallReported:r,stalled:i}=this;if(!r&&i!==null&&n&&t){this.stallReported=!0;const s=new Error(`Playback stalling at @${n.currentTime} due to low buffer (${vt(e)})`);this.warn(s.message),t.trigger(g.ERROR,{type:fe.MEDIA_ERROR,details:z.BUFFER_STALLED_ERROR,fatal:!1,error:s,buffer:e.len,bufferInfo:e,stalled:{start:i}})}}_trySkipBufferHole(e){var t;const{fragmentTracker:n,media:r}=this,i=(t=this.hls)==null?void 0:t.config;if(!r||!n||!i)return 0;const s=r.currentTime,l=Jn.bufferInfo(r,s,0),d=s<l.start?l.start:l.nextStart;if(d&&this.hls){const p=l.len<=i.maxBufferHole,b=l.len>0&&l.len<1&&r.readyState<3,I=d-s;if(I>0&&(p||b)){if(I>i.maxBufferHole){let $=!1;if(s===0){const ge=n.getAppendedFrag(0,te.MAIN);ge&&d<ge.end&&($=!0)}if(!$&&e){var c;if(!((c=this.hls.loadLevelObj)!=null&&c.details)||uu(this.hls.inFlightFragments,d))return 0;let me=!1,Fe=e.end;for(;Fe<d;){const We=So(Fe,n);if(We)Fe+=We.duration;else{me=!0;break}}if(me)return 0}}const F=Math.max(d+R0,s+I0);if(this.warn(`skipping hole, adjusting currentTime from ${s} to ${F}`),this.moved=!0,r.currentTime=F,!(e!=null&&e.gap)){const $=new Error(`fragment loaded with buffer holes, seeking from ${s} to ${F}`),ge={type:fe.MEDIA_ERROR,details:z.BUFFER_SEEK_OVER_HOLE,fatal:!1,error:$,reason:$.message,buffer:l.len,bufferInfo:l};e&&("fragment"in e?ge.part=e:ge.frag=e),this.hls.trigger(g.ERROR,ge)}return F}}return 0}_tryNudgeBuffer(e){const{hls:t,media:n,nudgeRetry:r}=this,i=t==null?void 0:t.config;if(!n||!i)return 0;const s=n.currentTime;if(this.nudgeRetry++,r<i.nudgeMaxRetry){const l=s+(r+1)*i.nudgeOffset,d=new Error(`Nudging 'currentTime' from ${s} to ${l}`);this.warn(d.message),n.currentTime=l,t.trigger(g.ERROR,{type:fe.MEDIA_ERROR,details:z.BUFFER_NUDGE_ON_STALL,error:d,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(g.ERROR,{type:fe.MEDIA_ERROR,details:z.BUFFER_STALLED_ERROR,error:l,fatal:!0,buffer:e.len,bufferInfo:e})}}}function uu(a,e){const t=cu(a.main);if(t&&t.start<=e)return t;const n=cu(a.audio);return n&&n.start<=e?n:null}function cu(a){if(!a)return null;switch(a.state){case hn.IDLE:case hn.STOPPED:case hn.ENDED:case hn.ERROR:return null}return a.frag}function So(a,e){return e.getAppendedFrag(a,te.MAIN)||e.getPartialFragment(a)}const P0=.25;function ll(){if(typeof self!="undefined")return self.VTTCue||self.TextTrackCue}function ul(a,e,t,n,r){let i=new a(e,t,"");try{i.value=n,r&&(i.type=r)}catch(s){i=new a(e,t,vt(r?T({type:r},n):n))}return i}const wo=(()=>{const a=ll();try{a&&new a(0,Number.POSITIVE_INFINITY,"")}catch(e){return Number.MAX_VALUE}return Number.POSITIVE_INFINITY})();class M0{constructor(e){this.hls=void 0,this.id3Track=null,this.media=null,this.dateRangeCuesAppended={},this.removeCues=!0,this.assetCue=void 0,this.onEventCueEnter=()=>{this.hls&&this.hls.trigger(g.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&&(e.on(g.MEDIA_ATTACHING,this.onMediaAttaching,this),e.on(g.MEDIA_ATTACHED,this.onMediaAttached,this),e.on(g.MEDIA_DETACHING,this.onMediaDetaching,this),e.on(g.MANIFEST_LOADING,this.onManifestLoading,this),e.on(g.FRAG_PARSING_METADATA,this.onFragParsingMetadata,this),e.on(g.BUFFER_FLUSHING,this.onBufferFlushing,this),e.on(g.LEVEL_UPDATED,this.onLevelUpdated,this),e.on(g.LEVEL_PTS_UPDATED,this.onLevelPtsUpdated,this))}_unregisterListeners(){const{hls:e}=this;e&&(e.off(g.MEDIA_ATTACHING,this.onMediaAttaching,this),e.off(g.MEDIA_ATTACHED,this.onMediaAttached,this),e.off(g.MEDIA_DETACHING,this.onMediaDetaching,this),e.off(g.MANIFEST_LOADING,this.onManifestLoading,this),e.off(g.FRAG_PARSING_METADATA,this.onFragParsingMetadata,this),e.off(g.BUFFER_FLUSHING,this.onBufferFlushing,this),e.off(g.LEVEL_UPDATED,this.onLevelUpdated,this),e.off(g.LEVEL_PTS_UPDATED,this.onLevelPtsUpdated,this))}onMediaAttaching(e,t){var n;this.media=t.media,((n=t.overrides)==null?void 0:n.cueRemoval)===!1&&(this.removeCues=!1)}onMediaAttached(){var e;const t=(e=this.hls)==null?void 0:e.latestLevelDetails;t&&this.updateDateRangeCues(t)}onMediaDetaching(e,t){this.media=null,!t.transferMedia&&(this.id3Track&&(this.removeCues&&xa(this.id3Track,this.onEventCueEnter),this.id3Track=null),this.dateRangeCuesAppended={})}onManifestLoading(){this.dateRangeCuesAppended={}}createTrack(e){const t=this.getID3Track(e.textTracks);return t.mode="hidden",t}getID3Track(e){if(this.media){for(let t=0;t<e.length;t++){const n=e[t];if(n.kind==="metadata"&&n.label==="id3")return $l(n,this.media),n}return this.media.addTextTrack("metadata","id3")}}onFragParsingMetadata(e,t){if(!this.media||!this.hls)return;const{enableEmsgMetadataCues:n,enableID3MetadataCues:r}=this.hls.config;if(!n&&!r)return;const{samples:i}=t;this.id3Track||(this.id3Track=this.createTrack(this.media));const s=ll();if(s)for(let l=0;l<i.length;l++){const d=i[l].type;if(d===Fi.emsg&&!n||!r)continue;const c=ka(i[l].data),p=i[l].pts;let b=p+i[l].duration;b>wo&&(b=wo),b-p<=0&&(b=p+P0);for(let F=0;F<c.length;F++){const $=c[F];if(!ro($)){this.updateId3CueEnds(p,d);const ge=ul(s,p,b,$,d);ge&&this.id3Track.addCue(ge)}}}}updateId3CueEnds(e,t){var n;const r=(n=this.id3Track)==null?void 0:n.cues;if(r)for(let i=r.length;i--;){const s=r[i];s.type===t&&s.startTime<e&&s.endTime===wo&&(s.endTime=e)}}onBufferFlushing(e,{startOffset:t,endOffset:n,type:r}){const{id3Track:i,hls:s}=this;if(!s)return;const{config:{enableEmsgMetadataCues:l,enableID3MetadataCues:d}}=s;if(i&&(l||d)){let c;r==="audio"?c=p=>p.type===Fi.audioId3&&d:r==="video"?c=p=>p.type===Fi.emsg&&l:c=p=>p.type===Fi.audioId3&&d||p.type===Fi.emsg&&l,Yo(i,t,n,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.hls||!this.media)return;const{assetPlayerId:n,timelineOffset:r,enableDateRangeMetadataCues:i,interstitialsController:s}=this.hls.config;if(!i)return;const l=ll();if(n&&r&&!s){const{fragmentStart:ge,fragmentEnd:me}=e;let Fe=this.assetCue;Fe?(Fe.startTime=ge,Fe.endTime=me):l&&(Fe=this.assetCue=ul(l,ge,me,{assetPlayerId:this.hls.config.assetPlayerId},"hlsjs.interstitial.asset"),Fe&&(Fe.id=n,this.id3Track||(this.id3Track=this.createTrack(this.media)),this.id3Track.addCue(Fe),Fe.addEventListener("enter",this.onEventCueEnter)))}if(!e.hasProgramDateTime)return;const{id3Track:d}=this,{dateRanges:c}=e,p=Object.keys(c);let b=this.dateRangeCuesAppended;if(d&&t){var I;if((I=d.cues)!=null&&I.length){const ge=Object.keys(b).filter(me=>!p.includes(me));for(let me=ge.length;me--;){var F;const Fe=ge[me],We=(F=b[Fe])==null?void 0:F.cues;delete b[Fe],We&&Object.keys(We).forEach(et=>{const xt=We[et];if(xt){xt.removeEventListener("enter",this.onEventCueEnter);try{d.removeCue(xt)}catch(Ot){}}})}}else b=this.dateRangeCuesAppended={}}const $=e.fragments[e.fragments.length-1];if(!(p.length===0||!v($==null?void 0:$.programDateTime))){this.id3Track||(this.id3Track=this.createTrack(this.media));for(let ge=0;ge<p.length;ge++){const me=p[ge],Fe=c[me],We=Fe.startTime,et=b[me],xt=(et==null?void 0:et.cues)||{};let Ot=(et==null?void 0:et.durationKnown)||!1,sn=wo;const{duration:Pt,endDate:Xt}=Fe;if(Xt&&Pt!==null)sn=We+Pt,Ot=!0;else if(Fe.endOnNext&&!Ot){const Ft=p.reduce((xn,nr)=>{if(nr!==Fe.id){const mr=c[nr];if(mr.class===Fe.class&&mr.startDate>Fe.startDate&&(!xn||Fe.startDate<xn.startDate))return mr}return xn},null);Ft&&(sn=Ft.startTime,Ot=!0)}const Yt=Object.keys(Fe.attr);for(let Ft=0;Ft<Yt.length;Ft++){const xn=Yt[Ft];if(!gi(xn))continue;const nr=xt[xn];if(nr)Ot&&!(et!=null&&et.durationKnown)?nr.endTime=sn:Math.abs(nr.startTime-We)>.01&&(nr.startTime=We,nr.endTime=sn);else if(l){let mr=Fe.attr[xn];xi(xn)&&(mr=X(mr));const pr=ul(l,We,sn,{key:xn,data:mr},Fi.dateRange);pr&&(pr.id=me,this.id3Track.addCue(pr),xt[xn]=pr,s&&(xn==="X-ASSET-LIST"||xn==="X-ASSET-URL")&&pr.addEventListener("enter",this.onEventCueEnter))}}b[me]={cues:xt,dateRange:Fe,durationKnown:Ot}}}}}class k0{constructor(e){this.hls=void 0,this.config=void 0,this.media=null,this.currentTime=0,this.stallCount=0,this._latency=null,this._targetLatencyUpdated=!1,this.onTimeupdate=()=>{const{media:t}=this,n=this.levelDetails;if(!t||!n)return;this.currentTime=t.currentTime;const r=this.computeLatency();if(r===null)return;this._latency=r;const{lowLatencyMode:i,maxLiveSyncPlaybackRate:s}=this.config;if(!i||s===1||!n.live)return;const l=this.targetLatency;if(l===null)return;const d=r-l,c=Math.min(this.maxLatency,l+n.targetduration);if(d<c&&d>.05&&this.forwardBufferLength>1){const b=Math.min(2,Math.max(1,s)),I=Math.round(2/(1+Math.exp(-.75*d-this.edgeStalled))*20)/20,F=Math.min(b,Math.max(1,I));this.changeMediaPlaybackRate(t,F)}else t.playbackRate!==1&&t.playbackRate!==0&&this.changeMediaPlaybackRate(t,1)},this.hls=e,this.config=e.config,this.registerListeners()}get levelDetails(){var e;return((e=this.hls)==null?void 0:e.latestLevelDetails)||null}get latency(){return this._latency||0}get maxLatency(){const{config:e}=this;if(e.liveMaxLatencyDuration!==void 0)return e.liveMaxLatencyDuration;const t=this.levelDetails;return t?e.liveMaxLatencyDurationCount*t.targetduration:0}get targetLatency(){const e=this.levelDetails;if(e===null||this.hls===null)return null;const{holdBack:t,partHoldBack:n,targetduration:r}=e,{liveSyncDuration:i,liveSyncDurationCount:s,lowLatencyMode:l}=this.config,d=this.hls.userConfig;let c=l&&n||t;(this._targetLatencyUpdated||d.liveSyncDuration||d.liveSyncDurationCount||c===0)&&(c=i!==void 0?i:s*r);const p=r;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 n=this.levelDetails;if(n===null)return null;const r=n.edge,i=e-t-this.edgeStalled,s=r-n.totalduration,l=r-(this.config.lowLatencyMode&&n.partTarget||n.targetduration);return Math.min(Math.max(s,i),l)}get drift(){const e=this.levelDetails;return e===null?1:e.drift}get edgeStalled(){const e=this.levelDetails;if(e===null)return 0;const t=(this.config.lowLatencyMode&&e.partTarget||e.targetduration)*3;return Math.max(e.age-t,0)}get forwardBufferLength(){const{media:e}=this,t=this.levelDetails;if(!e||!t)return 0;const n=e.buffered.length;return(n?e.buffered.end(n-1):t.edge)-this.currentTime}destroy(){this.unregisterListeners(),this.onMediaDetaching(),this.hls=null}registerListeners(){const{hls:e}=this;e&&(e.on(g.MEDIA_ATTACHED,this.onMediaAttached,this),e.on(g.MEDIA_DETACHING,this.onMediaDetaching,this),e.on(g.MANIFEST_LOADING,this.onManifestLoading,this),e.on(g.LEVEL_UPDATED,this.onLevelUpdated,this),e.on(g.ERROR,this.onError,this))}unregisterListeners(){const{hls:e}=this;e&&(e.off(g.MEDIA_ATTACHED,this.onMediaAttached,this),e.off(g.MEDIA_DETACHING,this.onMediaDetaching,this),e.off(g.MANIFEST_LOADING,this.onManifestLoading,this),e.off(g.LEVEL_UPDATED,this.onLevelUpdated,this),e.off(g.ERROR,this.onError,this))}onMediaAttached(e,t){this.media=t.media,this.media.addEventListener("timeupdate",this.onTimeupdate)}onMediaDetaching(){this.media&&(this.media.removeEventListener("timeupdate",this.onTimeupdate),this.media=null)}onManifestLoading(){this._latency=null,this.stallCount=0}onLevelUpdated(e,{details:t}){t.advanced&&this.onTimeupdate(),!t.live&&this.media&&this.media.removeEventListener("timeupdate",this.onTimeupdate)}onError(e,t){var n;t.details===z.BUFFER_STALLED_ERROR&&(this.stallCount++,this.hls&&(n=this.levelDetails)!=null&&n.live&&this.hls.logger.warn("[latency-controller]: Stall detected, adjusting target latency"))}changeMediaPlaybackRate(e,t){var n,r;e.playbackRate!==t&&((n=this.hls)==null||n.logger.debug(`[latency-controller]: latency=${this.latency.toFixed(3)}, targetLatency=${(r=this.targetLatency)==null?void 0:r.toFixed(3)}, forwardBufferLength=${this.forwardBufferLength.toFixed(3)}: adjusting playback rate from ${e.playbackRate} to ${t}`),e.playbackRate=t)}estimateLiveEdge(){const e=this.levelDetails;return e===null?null:e.edge+e.age}computeLatency(){const e=this.estimateLiveEdge();return e===null?null:e-this.currentTime}}class N0 extends Uo{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(g.MANIFEST_LOADING,this.onManifestLoading,this),e.on(g.MANIFEST_LOADED,this.onManifestLoaded,this),e.on(g.LEVEL_LOADED,this.onLevelLoaded,this),e.on(g.LEVELS_UPDATED,this.onLevelsUpdated,this),e.on(g.FRAG_BUFFERED,this.onFragBuffered,this),e.on(g.ERROR,this.onError,this)}_unregisterListeners(){const{hls:e}=this;e.off(g.MANIFEST_LOADING,this.onManifestLoading,this),e.off(g.MANIFEST_LOADED,this.onManifestLoaded,this),e.off(g.LEVEL_LOADED,this.onLevelLoaded,this),e.off(g.LEVELS_UPDATED,this.onLevelsUpdated,this),e.off(g.FRAG_BUFFERED,this.onFragBuffered,this),e.off(g.ERROR,this.onError,this)}destroy(){this._unregisterListeners(),this.steering=null,this.resetLevels(),super.destroy()}stopLoad(){this._levels.forEach(t=>{t.loadError=0,t.fragmentError=0}),super.stopLoad()}resetLevels(){this._startLevel=void 0,this.manualLevelIndex=-1,this.currentLevelIndex=-1,this.currentLevel=null,this._levels=[],this._maxAutoLevel=-1}onManifestLoading(e,t){this.resetLevels()}onManifestLoaded(e,t){const n=this.hls.config.preferManagedMediaSource,r=[],i={},s={};let l=!1,d=!1,c=!1;t.levels.forEach(p=>{const b=p.attrs;let{audioCodec:I,videoCodec:F}=p;I&&(p.audioCodec=I=xe(I,n)||void 0),F&&(F=p.videoCodec=Hn(F));const{width:$,height:ge,unknownCodecs:me}=p,Fe=(me==null?void 0:me.length)||0;if(l||(l=!!($&&ge)),d||(d=!!F),c||(c=!!I),Fe||I&&!this.isAudioSupported(I)||F&&!this.isVideoSupported(F)){this.log(`Some or all CODECS not supported "${b.CODECS}"`);return}const{CODECS:We,"FRAME-RATE":et,"HDCP-LEVEL":xt,"PATHWAY-ID":Ot,RESOLUTION:sn,"VIDEO-RANGE":Pt}=b,Yt=`${`${Ot||"."}-`}${p.bitrate}-${sn}-${et}-${We}-${Pt}-${xt}`;if(i[Yt])if(i[Yt].uri!==p.url&&!p.attrs["PATHWAY-ID"]){const Ft=s[Yt]+=1;p.attrs["PATHWAY-ID"]=new Array(Ft+1).join(".");const xn=this.createLevel(p);i[Yt]=xn,r.push(xn)}else i[Yt].addGroupId("audio",b.AUDIO),i[Yt].addGroupId("text",b.SUBTITLES);else{const Ft=this.createLevel(p);i[Yt]=Ft,s[Yt]=1,r.push(Ft)}}),this.filterAndSortMediaOptions(r,t,l,d,c)}createLevel(e){const t=new Ht(e),n=e.supplemental;if(n!=null&&n.videoCodec&&!this.isVideoSupported(n.videoCodec)){const r=new Error(`SUPPLEMENTAL-CODECS not supported "${n.videoCodec}"`);this.log(r.message),t.supportedResult=Zt(r,[])}return t}isAudioSupported(e){return Qe(e,"audio",this.hls.config.preferManagedMediaSource)}isVideoSupported(e){return Qe(e,"video",this.hls.config.preferManagedMediaSource)}filterAndSortMediaOptions(e,t,n,r,i){var s;let l=[],d=[],c=e;const p=((s=t.stats)==null?void 0:s.parsing)||{};if((n||r)&&i&&(c=c.filter(({videoCodec:We,videoRange:et,width:xt,height:Ot})=>(!!We||!!(xt&&Ot))&&yt(et))),c.length===0){Promise.resolve().then(()=>{if(this.hls){let We="no level with compatible codecs found in manifest",et=We;t.levels.length&&(et=`one or more CODECS in variant not supported: ${vt(t.levels.map(Ot=>Ot.attrs.CODECS).filter((Ot,sn,Pt)=>Pt.indexOf(Ot)===sn))}`,this.warn(et),We+=` (${et})`);const xt=new Error(We);this.hls.trigger(g.ERROR,{type:fe.MEDIA_ERROR,details:z.MANIFEST_INCOMPATIBLE_CODECS_ERROR,fatal:!0,url:t.url,error:xt,reason:et})}}),p.end=performance.now();return}t.audioTracks&&(l=t.audioTracks.filter(We=>!We.audioCodec||this.isAudioSupported(We.audioCodec)),du(l)),t.subtitles&&(d=t.subtitles,du(d));const b=c.slice(0);c.sort((We,et)=>{if(We.attrs["HDCP-LEVEL"]!==et.attrs["HDCP-LEVEL"])return(We.attrs["HDCP-LEVEL"]||"")>(et.attrs["HDCP-LEVEL"]||"")?1:-1;if(n&&We.height!==et.height)return We.height-et.height;if(We.frameRate!==et.frameRate)return We.frameRate-et.frameRate;if(We.videoRange!==et.videoRange)return Je.indexOf(We.videoRange)-Je.indexOf(et.videoRange);if(We.videoCodec!==et.videoCodec){const xt=pe(We.videoCodec),Ot=pe(et.videoCodec);if(xt!==Ot)return Ot-xt}if(We.uri===et.uri&&We.codecSet!==et.codecSet){const xt=Pe(We.codecSet),Ot=Pe(et.codecSet);if(xt!==Ot)return Ot-xt}return We.averageBitrate!==et.averageBitrate?We.averageBitrate-et.averageBitrate:0});let I=b[0];if(this.steering&&(c=this.steering.filterParsedLevels(c),c.length!==b.length)){for(let We=0;We<b.length;We++)if(b[We].pathwayId===c[0].pathwayId){I=b[We];break}}this._levels=c;for(let We=0;We<c.length;We++)if(c[We]===I){var F;this._firstLevel=We;const et=I.bitrate,xt=this.hls.bandwidthEstimate;if(this.log(`manifest loaded, ${c.length} level(s) found, first bitrate: ${et}`),((F=this.hls.userConfig)==null?void 0:F.abrEwmaDefaultEstimate)===void 0){const Ot=Math.min(et,this.hls.config.abrEwmaDefaultEstimateMax);Ot>xt&&xt===this.hls.abrEwmaDefaultEstimate&&(this.hls.bandwidthEstimate=Ot)}break}const $=i&&!r,ge=this.hls.config,me=!!(ge.audioStreamController&&ge.audioTrackController),Fe={levels:c,audioTracks:l,subtitleTracks:d,sessionData:t.sessionData,sessionKeys:t.sessionKeys,firstLevel:this._firstLevel,stats:t.stats,audio:i,video:r,altAudio:me&&!$&&l.some(We=>!!We.url)};p.end=performance.now(),this.hls.trigger(g.MANIFEST_PARSED,Fe)}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"),b=e<0;if(this.hls.trigger(g.ERROR,{type:fe.OTHER_ERROR,details:z.LEVEL_SWITCH_ERROR,level:e,fatal:b,error:p,reason:p.message}),b)return;e=Math.min(e,t.length-1)}const n=this.currentLevelIndex,r=this.currentLevel,i=r?r.attrs["PATHWAY-ID"]:void 0,s=t[e],l=s.attrs["PATHWAY-ID"];if(this.currentLevelIndex=e,this.currentLevel=s,n===e&&r&&i===l)return;this.log(`Switching to level ${e} (${s.height?s.height+"p ":""}${s.videoRange?s.videoRange+" ":""}${s.codecSet?s.codecSet+" ":""}@${s.bitrate})${l?" with Pathway "+l:""} from level ${n}${i?" with Pathway "+i:""}`);const d={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(g.LEVEL_SWITCHING,d);const c=s.details;if(!c||c.live){const p=this.switchParams(s.uri,r==null?void 0:r.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(),n=e.filter(r=>t.indexOf(r)!==-1);if(e.length<1){this.warn(`pathwayPriority ${e} should contain at least one pathway from list: ${t}`);return}this.steering.pathwayPriority=n}}onError(e,t){t.fatal||!t.context||t.context.type===q.LEVEL&&t.context.level===this.level&&this.checkRetry(t)}onFragBuffered(e,{frag:t}){if(t!==void 0&&t.type===te.MAIN){const n=t.elementaryStreams;if(!Object.keys(n).some(i=>!!n[i]))return;const r=this._levels[t.level];r!=null&&r.loadError&&(this.log(`Resetting level error count of ${r.loadError} on frag buffered`),r.loadError=0)}}onLevelLoaded(e,t){var n;const{level:r,details:i}=t,s=t.levelInfo;if(!s){var l;this.warn(`Invalid level index ${r}`),(l=t.deliveryDirectives)!=null&&l.skip&&(i.deltaUpdateFailed=!0);return}if(s===this.currentLevel||t.withoutMultiVariant){s.fragmentError===0&&(s.loadError=0);let d=s.details;d===t.details&&d.advanced&&(d=void 0),this.playlistLoaded(r,t,d)}else(n=t.deliveryDirectives)!=null&&n.skip&&(i.deltaUpdateFailed=!0)}loadPlaylist(e){super.loadPlaylist(),this.shouldLoadPlaylist(this.currentLevel)&&this.scheduleLoading(this.currentLevel,e)}loadingPlaylist(e,t){super.loadingPlaylist(e,t);const n=this.getUrlWithDirectives(e.uri,t),r=this.currentLevelIndex,i=e.attrs["PATHWAY-ID"],s=e.details,l=s==null?void 0:s.age;this.log(`Loading level index ${r}${(t==null?void 0:t.msn)!==void 0?" at sn "+t.msn+" part "+t.part:""}${i?" Pathway "+i:""}${l&&s.live?" age "+l.toFixed(1)+(s.type?" "+s.type||0:""):""} ${n}`),this.hls.trigger(g.LEVEL_LOADING,{url:n,level:r,levelInfo:e,pathwayId:e.attrs["PATHWAY-ID"],id:0,deliveryDirectives:t||null})}get nextLoadLevel(){return this.manualLevelIndex!==-1?this.manualLevelIndex:this.hls.nextAutoLevel}set nextLoadLevel(e){this.level=e,this.manualLevelIndex===-1&&(this.hls.nextAutoLevel=e)}removeLevel(e){var t;if(this._levels.length===1)return;const n=this._levels.filter((i,s)=>s!==e?!0:(this.steering&&this.steering.removeLevel(i),i===this.currentLevel&&(this.currentLevel=null,this.currentLevelIndex=-1,i.details&&i.details.fragments.forEach(l=>l.level=-1)),!1));Ni(n),this._levels=n,this.currentLevelIndex>-1&&(t=this.currentLevel)!=null&&t.details&&(this.currentLevelIndex=this.currentLevel.details.fragments[0].level),this.manualLevelIndex>-1&&(this.manualLevelIndex=this.currentLevelIndex);const r=n.length-1;this._firstLevel=Math.min(this._firstLevel,r),this._startLevel&&(this._startLevel=Math.min(this._startLevel,r)),this.hls.trigger(g.LEVELS_UPDATED,{levels:n})}onLevelsUpdated(e,{levels:t}){this._levels=t}checkMaxAutoUpdated(){const{autoLevelCapping:e,maxAutoLevel:t,maxHdcpLevel:n}=this.hls;this._maxAutoLevel!==t&&(this._maxAutoLevel=t,this.hls.trigger(g.MAX_AUTO_LEVEL_UPDATED,{autoLevelCapping:e,levels:this.levels,maxAutoLevel:t,minAutoLevel:this.hls.minAutoLevel,maxHdcpLevel:n}))}}function du(a){const e={};a.forEach(t=>{const n=t.groupId||"";t.id=e[n]=e[n]||0,e[n]++})}function fu(){return self.SourceBuffer||self.WebKitSourceBuffer}function hu(){if(!Ee())return!1;const e=fu();return!e||e.prototype&&typeof e.prototype.appendBuffer=="function"&&typeof e.prototype.remove=="function"}function B0(){if(!hu())return!1;const a=Ee();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(le(e,"video")))||["mp4a.40.2","fLaC"].some(e=>a.isTypeSupported(le(e,"audio"))))}function F0(){var a;const e=fu();return typeof(e==null||(a=e.prototype)==null?void 0:a.changeType)=="function"}const $0=100;class U0 extends ea{constructor(e,t,n){super(e,t,n,"stream-controller",te.MAIN),this.audioCodecSwap=!1,this.level=-1,this._forceStartLoad=!1,this._hasEnoughToStart=!1,this.altAudio=0,this.audioOnly=!1,this.fragPlaying=null,this.fragLastKbps=0,this.couldBacktrack=!1,this.backtrackFragment=null,this.audioCodecSwitch=!1,this.videoBuffer=null,this.onMediaPlaying=()=>{this.tick()},this.onMediaSeeked=()=>{const r=this.media,i=r?r.currentTime:null;if(i===null||!v(i)||(this.log(`Media seeked to ${i.toFixed(3)}`),!this.getBufferedFrag(i)))return;const s=this.getFwdBufferInfoAtPos(r,i,te.MAIN,0);if(s===null||s.len===0){this.warn(`Main forward buffer length at ${i} on "seeked" event ${s?s.len:"empty"})`);return}this.tick()},this.registerListeners()}registerListeners(){super.registerListeners();const{hls:e}=this;e.on(g.MANIFEST_PARSED,this.onManifestParsed,this),e.on(g.LEVEL_LOADING,this.onLevelLoading,this),e.on(g.LEVEL_LOADED,this.onLevelLoaded,this),e.on(g.FRAG_LOAD_EMERGENCY_ABORTED,this.onFragLoadEmergencyAborted,this),e.on(g.AUDIO_TRACK_SWITCHING,this.onAudioTrackSwitching,this),e.on(g.AUDIO_TRACK_SWITCHED,this.onAudioTrackSwitched,this),e.on(g.BUFFER_CREATED,this.onBufferCreated,this),e.on(g.BUFFER_FLUSHED,this.onBufferFlushed,this),e.on(g.LEVELS_UPDATED,this.onLevelsUpdated,this),e.on(g.FRAG_BUFFERED,this.onFragBuffered,this)}unregisterListeners(){super.unregisterListeners();const{hls:e}=this;e.off(g.MANIFEST_PARSED,this.onManifestParsed,this),e.off(g.LEVEL_LOADED,this.onLevelLoaded,this),e.off(g.FRAG_LOAD_EMERGENCY_ABORTED,this.onFragLoadEmergencyAborted,this),e.off(g.AUDIO_TRACK_SWITCHING,this.onAudioTrackSwitching,this),e.off(g.AUDIO_TRACK_SWITCHED,this.onAudioTrackSwitched,this),e.off(g.BUFFER_CREATED,this.onBufferCreated,this),e.off(g.BUFFER_FLUSHED,this.onBufferFlushed,this),e.off(g.LEVELS_UPDATED,this.onLevelsUpdated,this),e.off(g.FRAG_BUFFERED,this.onFragBuffered,this)}onHandlerDestroying(){this.onMediaPlaying=this.onMediaSeeked=null,this.unregisterListeners(),super.onHandlerDestroying()}startLoad(e,t){if(this.levels){const{lastCurrentTime:n,hls:r}=this;if(this.stopLoad(),this.setInterval($0),this.level=-1,!this.startFragRequested){let i=r.startLevel;i===-1&&(r.config.testBandwidth&&this.levels.length>1?(i=0,this.bitrateTest=!0):i=r.firstAutoLevel),r.nextLoadLevel=i,this.level=r.loadLevel,this._hasEnoughToStart=!!t}n>0&&e===-1&&!t&&(this.log(`Override startPosition with lastCurrentTime @${n.toFixed(3)}`),e=n),this.state=hn.IDLE,this.nextLoadPosition=this.lastCurrentTime=e+this.timelineOffset,this.startPosition=t?-1:e,this.tick()}else this._forceStartLoad=!0,this.state=hn.STOPPED}stopLoad(){this._forceStartLoad=!1,super.stopLoad()}doTick(){switch(this.state){case hn.WAITING_LEVEL:{const{levels:e,level:t}=this,n=e==null?void 0:e[t],r=n==null?void 0:n.details;if(r&&(!r.live||this.levelLastLoaded===n&&!this.waitForLive(n))){if(this.waitForCdnTuneIn(r))break;this.state=hn.IDLE;break}else if(this.hls.nextLoadLevel!==this.level){this.state=hn.IDLE;break}break}case hn.FRAG_LOADING_WAITING_RETRY:this.checkRetryDate();break}this.state===hn.IDLE&&this.doTickIdle(),this.onTickEnd()}onTickEnd(){var e;super.onTickEnd(),(e=this.media)!=null&&e.readyState&&this.media.seeking===!1&&(this.lastCurrentTime=this.media.currentTime),this.checkFragmentChanged()}doTickIdle(){const{hls:e,levelLastLoaded:t,levels:n,media:r}=this;if(t===null||!r&&!this.primaryPrefetch&&(this.startFragRequested||!e.config.startFragPrefetch)||this.altAudio&&this.audioOnly)return;const i=this.buffering?e.nextLoadLevel:e.loadLevel;if(!(n!=null&&n[i]))return;const s=n[i],l=this.getMainFwdBufferInfo();if(l===null)return;const d=this.getLevelDetails();if(d&&this._streamEnded(l,d)){const ge={};this.altAudio===2&&(ge.type="video"),this.hls.trigger(g.BUFFER_EOS,ge),this.state=hn.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===hn.WAITING_LEVEL||this.waitForLive(s)){this.level=i,this.state=hn.WAITING_LEVEL,this.startFragRequested=!1;return}const p=l.len,b=this.getMaxBufferLength(s.maxBitrate);if(p>=b)return;this.backtrackFragment&&this.backtrackFragment.start>l.end&&(this.backtrackFragment=null);const I=this.backtrackFragment?this.backtrackFragment.start:l.end;let F=this.getNextFragment(I,c);if(this.couldBacktrack&&!this.fragPrevious&&F&&Ke(F)&&this.fragmentTracker.getState(F)!==un.OK){var $;const me=(($=this.backtrackFragment)!=null?$:F).sn-c.startSN,Fe=c.fragments[me-1];Fe&&F.cc===Fe.cc&&(F=Fe,this.fragmentTracker.removeFragment(Fe))}else this.backtrackFragment&&l.len&&(this.backtrackFragment=null);if(F&&this.isLoopLoading(F,I)){if(!F.gap){const me=this.audioOnly&&!this.altAudio?H.AUDIO:H.VIDEO,Fe=(me===H.VIDEO?this.videoBuffer:this.mediaBuffer)||this.media;Fe&&this.afterBufferFlushed(Fe,me,te.MAIN)}F=this.getNextFragmentLoopLoading(F,c,l,te.MAIN,b)}F&&(F.initSegment&&!F.initSegment.data&&!this.bitrateTest&&(F=F.initSegment),this.loadFragment(F,s,I))}loadFragment(e,t,n){const r=this.fragmentTracker.getState(e);r===un.NOT_LOADED||r===un.PARTIAL?Ke(e)?this.bitrateTest?(this.log(`Fragment ${e.sn} of level ${e.level} is being downloaded to test bitrate and will not be buffered`),this._loadBitrateTestFrag(e,t)):super.loadFragment(e,t,n):this._loadInitSegment(e,t):this.clearTrackerIfNeeded(e)}getBufferedFrag(e){return this.fragmentTracker.getBufferedFrag(e,te.MAIN)}followingBufferedFrag(e){return e?this.getBufferedFrag(e.end+.5):null}immediateLevelSwitch(){this.abortCurrentFrag(),this.flushMainBuffer(0,Number.POSITIVE_INFINITY)}nextLevelSwitch(){const{levels:e,media:t}=this;if(t!=null&&t.readyState){let n;const r=this.getAppendedFrag(t.currentTime);r&&r.start>1&&this.flushMainBuffer(0,r.start-1);const i=this.getLevelDetails();if(i!=null&&i.live){const l=this.getMainFwdBufferInfo();if(!l||l.len<i.targetduration*2)return}if(!t.paused&&e){const l=this.hls.nextLoadLevel,d=e[l],c=this.fragLastKbps;c&&this.fragCurrent?n=this.fragCurrent.duration*d.maxBitrate/(1e3*c)+1:n=0}else n=0;const s=this.getBufferedFrag(t.currentTime+n);if(s){const l=this.followingBufferedFrag(s);if(l){this.abortCurrentFrag();const d=l.maxStartPTS?l.maxStartPTS:l.start,c=l.duration,p=Math.max(s.end,d+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 hn.KEY_LOADING:case hn.FRAG_LOADING:case hn.FRAG_LOADING_WAITING_RETRY:case hn.PARSING:case hn.PARSED:this.state=hn.IDLE;break}this.nextLoadPosition=this.getLoadPosition()}flushMainBuffer(e,t){super.flushMainBuffer(e,t,this.altAudio===2?"video":null)}onMediaAttached(e,t){super.onMediaAttached(e,t);const n=t.media;Bi(n,"playing",this.onMediaPlaying),Bi(n,"seeked",this.onMediaSeeked)}onMediaDetaching(e,t){const{media:n}=this;n&&(Ki(n,"playing",this.onMediaPlaying),Ki(n,"seeked",this.onMediaSeeked)),this.videoBuffer=null,this.fragPlaying=null,super.onMediaDetaching(e,t),!t.transferMedia&&(this._hasEnoughToStart=!1)}onManifestLoading(){super.onManifestLoading(),this.log("Trigger BUFFER_RESET"),this.hls.trigger(g.BUFFER_RESET,void 0),this.couldBacktrack=!1,this.fragLastKbps=0,this.fragPlaying=this.backtrackFragment=null,this.altAudio=0,this.audioOnly=!1}onManifestParsed(e,t){let n=!1,r=!1;for(let i=0;i<t.levels.length;i++){const s=t.levels[i].audioCodec;s&&(n=n||s.indexOf("mp4a.40.2")!==-1,r=r||s.indexOf("mp4a.40.5")!==-1)}this.audioCodecSwitch=n&&r&&!F0(),this.audioCodecSwitch&&this.log("Both AAC/HE-AAC audio found in levels; declaring level codec as HE-AAC"),this.levels=t.levels,this.startFragRequested=!1}onLevelLoading(e,t){const{levels:n}=this;if(!n||this.state!==hn.IDLE)return;const r=t.levelInfo;(!r.details||r.details.live&&(this.levelLastLoaded!==r||r.details.expired)||this.waitForCdnTuneIn(r.details))&&(this.state=hn.WAITING_LEVEL)}onLevelLoaded(e,t){var n;const{levels:r,startFragRequested:i}=this,s=t.level,l=t.details,d=l.totalduration;if(!r){this.warn(`Levels were reset while loading level ${s}`);return}this.log(`Level ${s} loaded [${l.startSN},${l.endSN}]${l.lastPartSn?`[part-${l.lastPartSn}-${l.lastPartIndex}]`:""}, cc [${l.startCC}, ${l.endCC}] duration:${d}`);const c=t.levelInfo,p=this.fragCurrent;p&&(this.state===hn.FRAG_LOADING||this.state===hn.FRAG_LOADING_WAITING_RETRY)&&p.level!==t.level&&p.loader&&this.abortCurrentFrag();let b=0;if(l.live||(n=c.details)!=null&&n.live){var I;if(this.checkLiveUpdate(l),l.deltaUpdateFailed)return;b=this.alignPlaylists(l,c.details,(I=this.levelLastLoaded)==null?void 0:I.details)}if(c.details=l,this.levelLastLoaded=c,i||this.setStartPosition(l,b),this.hls.trigger(g.LEVEL_UPDATED,{details:l,level:s}),this.state===hn.WAITING_LEVEL){if(this.waitForCdnTuneIn(l))return;this.state=hn.IDLE}i&&l.live&&this.synchronizeToLiveEdge(l),this.tick()}synchronizeToLiveEdge(e){const{config:t,media:n}=this;if(!n)return;const r=this.hls.liveSyncPosition,i=this.getLoadPosition(),s=e.fragmentStart,l=e.edge,d=i>=s-t.maxFragLookUpTolerance&&i<=l;if(r!==null&&n.duration>r&&(i<r||!d)){const p=t.liveMaxLatencyDuration!==void 0?t.liveMaxLatencyDuration:t.liveMaxLatencyDurationCount*e.targetduration;if((!d&&n.readyState<4||i<l-p)&&(this._hasEnoughToStart||(this.nextLoadPosition=r),n.readyState))if(this.warn(`Playback: ${i.toFixed(3)} is located too far from the end of live sliding playlist: ${l}, reset currentTime to : ${r.toFixed(3)}`),this.config.liveSyncMode==="buffered"){var c;const b=Jn.bufferInfo(n,r,0);if(!((c=b.buffered)!=null&&c.length)){n.currentTime=r;return}if(b.start<=i){n.currentTime=r;return}const{nextStart:F}=Jn.bufferedInfo(b.buffered,i,0);F&&(n.currentTime=F)}else n.currentTime=r}}_handleFragmentLoadProgress(e){var t;const n=e.frag,{part:r,payload:i}=e,{levels:s}=this;if(!s){this.warn(`Levels were reset while fragment load was in progress. Fragment ${n.sn} of level ${n.level} will not be buffered`);return}const l=s[n.level];if(!l){this.warn(`Level ${n.level} not found on progress`);return}const d=l.details;if(!d){this.warn(`Dropping fragment ${n.sn} of level ${n.level} after level details were reset`),this.fragmentTracker.removeFragment(n);return}const c=l.videoCodec,p=d.PTSKnown||!d.live,b=(t=n.initSegment)==null?void 0:t.data,I=this._getAudioCodec(l),F=this.transmuxer=this.transmuxer||new vl(this.hls,te.MAIN,this._handleTransmuxComplete.bind(this),this._handleTransmuxerFlush.bind(this)),$=r?r.index:-1,ge=$!==-1,me=new Fr(n.level,n.sn,n.stats.chunkCount,i.byteLength,$,ge),Fe=this.initPTS[n.cc];F.push(i,b,I,c,n,r,d.totalduration,p,me,Fe)}onAudioTrackSwitching(e,t){const n=this.hls,r=this.altAudio!==0;if(On(t.url,n))this.altAudio=1;else{if(this.mediaBuffer!==this.media){this.log("Switching on main audio, use media.buffered to schedule main fragment loading"),this.mediaBuffer=this.media;const s=this.fragCurrent;s&&(this.log("Switching to main audio track, cancel main fragment load"),s.abortRequests(),this.fragmentTracker.removeFragment(s)),this.resetTransmuxer(),this.resetLoadingState()}else this.audioOnly&&this.resetTransmuxer();if(r){this.altAudio=0,this.fragmentTracker.removeAllFragments(),n.once(g.BUFFER_FLUSHED,()=>{this.hls&&this.hls.trigger(g.AUDIO_TRACK_SWITCHED,t)}),n.trigger(g.BUFFER_FLUSHING,{startOffset:0,endOffset:Number.POSITIVE_INFINITY,type:null});return}n.trigger(g.AUDIO_TRACK_SWITCHED,t)}}onAudioTrackSwitched(e,t){const n=On(t.url,this.hls);if(n){const r=this.videoBuffer;r&&this.mediaBuffer!==r&&(this.log("Switching on alternate audio, use video.buffered to schedule main fragment loading"),this.mediaBuffer=r)}this.altAudio=n?2:0,this.tick()}onBufferCreated(e,t){const n=t.tracks;let r,i,s=!1;for(const l in n){const d=n[l];if(d.id==="main"){if(i=l,r=d,l==="video"){const c=n[l];c&&(this.videoBuffer=c.buffer)}}else s=!0}s&&r?(this.log(`Alternate track found, use ${i}.buffered to schedule main fragment loading`),this.mediaBuffer=r.buffer):this.mediaBuffer=this.media}onFragBuffered(e,t){const{frag:n,part:r}=t,i=n.type===te.MAIN;if(i){if(this.fragContextChanged(n)){this.warn(`Fragment ${n.sn}${r?" p: "+r.index:""} of level ${n.level} finished buffering, but was aborted. state: ${this.state}`),this.state===hn.PARSED&&(this.state=hn.IDLE);return}const l=r?r.stats:n.stats;this.fragLastKbps=Math.round(8*l.total/(l.buffering.end-l.loading.first)),Ke(n)&&(this.fragPrevious=n),this.fragBufferedComplete(n,r)}const s=this.media;s&&(!this._hasEnoughToStart&&Jn.getBuffered(s).length&&(this._hasEnoughToStart=!0,this.seekToStartPos()),i&&this.tick())}get hasEnoughToStart(){return this._hasEnoughToStart}onError(e,t){var n;if(t.fatal){this.state=hn.ERROR;return}switch(t.details){case z.FRAG_GAP:case z.FRAG_PARSING_ERROR:case z.FRAG_DECRYPT_ERROR:case z.FRAG_LOAD_ERROR:case z.FRAG_LOAD_TIMEOUT:case z.KEY_LOAD_ERROR:case z.KEY_LOAD_TIMEOUT:this.onFragmentOrKeyLoadError(te.MAIN,t);break;case z.LEVEL_LOAD_ERROR:case z.LEVEL_LOAD_TIMEOUT:case z.LEVEL_PARSING_ERROR:!t.levelRetry&&this.state===hn.WAITING_LEVEL&&((n=t.context)==null?void 0:n.type)===q.LEVEL&&(this.state=hn.IDLE);break;case z.BUFFER_ADD_CODEC_ERROR:case z.BUFFER_APPEND_ERROR:if(t.parent!=="main")return;this.reduceLengthAndFlushBuffer(t)&&this.resetLoadingState();break;case z.BUFFER_FULL_ERROR:if(t.parent!=="main")return;this.reduceLengthAndFlushBuffer(t)&&(!this.config.interstitialsController&&this.config.assetPlayerId?this._hasEnoughToStart=!0:this.flushMainBuffer(0,Number.POSITIVE_INFINITY));break;case z.INTERNAL_EXCEPTION:this.recoverWorkerError(t);break}}onFragLoadEmergencyAborted(){this.state=hn.IDLE,this._hasEnoughToStart||(this.startFragRequested=!1,this.nextLoadPosition=this.lastCurrentTime),this.tickImmediate()}onBufferFlushed(e,{type:t}){if(t!==H.AUDIO||!this.altAudio){const n=(t===H.VIDEO?this.videoBuffer:this.mediaBuffer)||this.media;n&&(this.afterBufferFlushed(n,t,te.MAIN),this.tick())}}onLevelsUpdated(e,t){this.level>-1&&this.fragCurrent&&(this.level=this.fragCurrent.level,this.level===-1&&this.resetWhenMissingContext(this.fragCurrent)),this.levels=t.levels}swapAudioCodec(){this.audioCodecSwap=!this.audioCodecSwap}seekToStartPos(){const{media:e}=this;if(!e)return;const t=e.currentTime;let n=this.startPosition;if(n>=0&&t<n){if(e.seeking){this.log(`could not seek to ${n}, already seeking at ${t}`);return}const r=this.timelineOffset;r&&n&&(n+=r);const i=this.getLevelDetails(),s=Jn.getBuffered(e),l=s.length?s.start(0):0,d=l-n,c=Math.max(this.config.maxBufferHole,this.config.maxFragLookUpTolerance);(this.config.startOnSegmentBoundary||d>0&&(d<c||this.loadingParts&&d<2*((i==null?void 0:i.partTarget)||0)))&&(this.log(`adjusting start position by ${d} to match buffer start`),n+=d,this.startPosition=n),t<n&&(this.log(`seek to target start position ${n} from current time ${t} buffer start ${l}`),e.currentTime=n)}}_getAudioCodec(e){let t=this.config.defaultAudioCodec||e.audioCodec;return this.audioCodecSwap&&t&&(this.log("Swapping audio codec"),t.indexOf("mp4a.40.5")!==-1?t="mp4a.40.2":t="mp4a.40.5"),t}_loadBitrateTestFrag(e,t){e.bitrateTest=!0,this._doFragLoad(e,t).then(n=>{const{hls:r}=this,i=n==null?void 0:n.frag;if(!i||this.fragContextChanged(i))return;t.fragmentError=0,this.state=hn.IDLE,this.startFragRequested=!1,this.bitrateTest=!1;const s=i.stats;s.parsing.start=s.parsing.end=s.buffering.start=s.buffering.end=self.performance.now(),r.trigger(g.FRAG_LOADED,n),i.bitrateTest=!1}).catch(n=>{this.state===hn.STOPPED||this.state===hn.ERROR||(this.warn(n),this.resetFragmentLoading(e))})}_handleTransmuxComplete(e){const t=this.playlistType,{hls:n}=this,{remuxResult:r,chunkMeta:i}=e,s=this.getCurrentContext(i);if(!s){this.resetWhenMissingContext(i);return}const{frag:l,part:d,level:c}=s,{video:p,text:b,id3:I,initSegment:F}=r,{details:$}=c,ge=this.altAudio?void 0:r.audio;if(this.fragContextChanged(l)){this.fragmentTracker.removeFragment(l);return}if(this.state=hn.PARSING,F){const me=F.tracks;if(me){const xt=l.initSegment||l;if(this.unhandledEncryptionError(F,l))return;this._bufferInitSegment(c,me,xt,i),n.trigger(g.FRAG_PARSING_INIT_SEGMENT,{frag:xt,id:t,tracks:me})}const Fe=F.initPTS,We=F.timescale,et=this.initPTS[l.cc];if(v(Fe)&&(!et||et.baseTime!==Fe||et.timescale!==We)){const xt=F.trackId;this.initPTS[l.cc]={baseTime:Fe,timescale:We,trackId:xt},n.trigger(g.INIT_PTS_FOUND,{frag:l,id:t,initPTS:Fe,timescale:We,trackId:xt})}}if(p&&$){ge&&p.type==="audiovideo"&&this.logMuxedErr(l);const me=$.fragments[l.sn-1-$.startSN],Fe=l.sn===$.startSN,We=!me||l.cc>me.cc;if(r.independent!==!1){const{startPTS:et,endPTS:xt,startDTS:Ot,endDTS:sn}=p;if(d)d.elementaryStreams[p.type]={startPTS:et,endPTS:xt,startDTS:Ot,endDTS:sn};else if(p.firstKeyFrame&&p.independent&&i.id===1&&!We&&(this.couldBacktrack=!0),p.dropped&&p.independent){const Pt=this.getMainFwdBufferInfo(),Xt=(Pt?Pt.end:this.getLoadPosition())+this.config.maxBufferHole,Yt=p.firstKeyFramePTS?p.firstKeyFramePTS:et;if(!Fe&&Xt<Yt-this.config.maxBufferHole&&!We){this.backtrack(l);return}else We&&(l.gap=!0);l.setElementaryStreamInfo(p.type,l.start,xt,l.start,sn,!0)}else Fe&&et-($.appliedTimelineOffset||0)>Eo&&(l.gap=!0);l.setElementaryStreamInfo(p.type,et,xt,Ot,sn),this.backtrackFragment&&(this.backtrackFragment=l),this.bufferFragmentData(p,l,d,i,Fe||We)}else if(Fe||We)l.gap=!0;else{this.backtrack(l);return}}if(ge){const{startPTS:me,endPTS:Fe,startDTS:We,endDTS:et}=ge;d&&(d.elementaryStreams[H.AUDIO]={startPTS:me,endPTS:Fe,startDTS:We,endDTS:et}),l.setElementaryStreamInfo(H.AUDIO,me,Fe,We,et),this.bufferFragmentData(ge,l,d,i)}if($&&I!=null&&I.samples.length){const me={id:t,frag:l,details:$,samples:I.samples};n.trigger(g.FRAG_PARSING_METADATA,me)}if($&&b){const me={id:t,frag:l,details:$,samples:b.samples};n.trigger(g.FRAG_PARSING_USERDATA,me)}}logMuxedErr(e){this.warn(`${Ke(e)?"Media":"Init"} segment with muxed audiovideo where only video expected: ${e.url}`)}_bufferInitSegment(e,t,n,r){if(this.state!==hn.PARSING)return;this.audioOnly=!!t.audio&&!t.video,this.altAudio&&!this.audioOnly&&(delete t.audio,t.audiovideo&&this.logMuxedErr(n));const{audio:i,video:s,audiovideo:l}=t;if(i){const c=e.audioCodec;let p=en(i.codec,c);p==="mp4a"&&(p="mp4a.40.5");const b=navigator.userAgent.toLowerCase();if(this.audioCodecSwitch){p&&(p.indexOf("mp4a.40.5")!==-1?p="mp4a.40.2":p="mp4a.40.5");const I=i.metadata;I&&"channelCount"in I&&(I.channelCount||1)!==1&&b.indexOf("firefox")===-1&&(p="mp4a.40.5")}p&&p.indexOf("mp4a.40.5")!==-1&&b.indexOf("android")!==-1&&i.container!=="audio/mpeg"&&(p="mp4a.40.2",this.log(`Android: force audio codec to ${p}`)),c&&c!==p&&this.log(`Swapping manifest audio codec "${c}" for "${p}"`),i.levelCodec=p,i.id=te.MAIN,this.log(`Init audio buffer, container:${i.container}, codecs[selected/level/parsed]=[${p||""}/${c||""}/${i.codec}]`),delete t.audiovideo}if(s){s.levelCodec=e.videoCodec,s.id=te.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 d=Object.keys(t);if(d.length){if(this.hls.trigger(g.BUFFER_CODECS,t),!this.hls)return;d.forEach(c=>{const b=t[c].initSegment;b!=null&&b.byteLength&&this.hls.trigger(g.BUFFER_APPENDING,{type:c,data:b,frag:n,part:null,chunkMeta:r,parent:n.type})})}this.tickImmediate()}getMainFwdBufferInfo(){const e=this.mediaBuffer&&this.altAudio===2?this.mediaBuffer:this.media;return this.getFwdBufferInfo(e,te.MAIN)}get maxBufferLength(){const{levels:e,level:t}=this,n=e==null?void 0:e[t];return n?this.getMaxBufferLength(n.maxBitrate):this.config.maxBufferLength}backtrack(e){this.couldBacktrack=!0,this.backtrackFragment=e,this.resetTransmuxer(),this.flushBufferGap(e),this.fragmentTracker.removeFragment(e),this.fragPrevious=null,this.nextLoadPosition=e.start,this.state=hn.IDLE}checkFragmentChanged(){const e=this.media;let t=null;if(e&&e.readyState>1&&e.seeking===!1){const n=e.currentTime;if(Jn.isBuffered(e,n)?t=this.getAppendedFrag(n):Jn.isBuffered(e,n+.1)&&(t=this.getAppendedFrag(n+.1)),t){this.backtrackFragment=null;const r=this.fragPlaying,i=t.level;(!r||t.sn!==r.sn||r.level!==i)&&(this.fragPlaying=t,this.hls.trigger(g.FRAG_CHANGED,{frag:t}),(!r||r.level!==i)&&this.hls.trigger(g.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 v(t)?this.getAppendedFrag(t):null}get currentProgramDateTime(){var e;const t=((e=this.media)==null?void 0:e.currentTime)||this.lastCurrentTime;if(v(t)){const n=this.getLevelDetails(),r=this.currentFrag||(n?Nn(null,n.fragments,t):null);if(r){const i=r.programDateTime;if(i!==null){const s=i+(t-r.start)*1e3;return new Date(s)}}}return null}get currentLevel(){const e=this.currentFrag;return e?e.level:-1}get nextBufferedFrag(){const e=this.currentFrag;return e?this.followingBufferedFrag(e):null}get forceStartLoad(){return this._forceStartLoad}}class z0 extends Z{constructor(e,t){super("key-loader",t),this.config=void 0,this.keyIdToKeyInfo={},this.emeController=null,this.config=e}abort(e){for(const n in this.keyIdToKeyInfo){const r=this.keyIdToKeyInfo[n].loader;if(r){var t;if(e&&e!==((t=r.context)==null?void 0:t.frag.type))return;r.abort()}}}detach(){for(const e in this.keyIdToKeyInfo){const t=this.keyIdToKeyInfo[e];(t.mediaKeySessionContext||t.decryptdata.isCommonEncryption)&&delete this.keyIdToKeyInfo[e]}}destroy(){this.detach();for(const e in this.keyIdToKeyInfo){const t=this.keyIdToKeyInfo[e].loader;t&&t.destroy()}this.keyIdToKeyInfo={}}createKeyLoadError(e,t=z.KEY_LOAD_ERROR,n,r,i){return new Qn({type:fe.NETWORK_ERROR,details:t,fatal:!1,frag:e,response:i,error:n,networkDetails:r})}loadClear(e,t,n){if(this.emeController&&this.config.emeEnabled&&!this.emeController.getSelectedKeySystemFormats().length){if(t.length)for(let r=0,i=t.length;r<i;r++){const s=t[r];if(e.cc<=s.cc&&(!Ke(e)||!Ke(s)||e.sn<s.sn)||!n&&r==i-1)return this.emeController.selectKeySystemFormat(s).then(l=>{if(!this.emeController)return;s.setKeyFormat(l);const d=Ei(l);if(d)return this.emeController.getKeySystemAccess([d])})}if(this.config.requireKeySystemAccessOnStart){const r=di(this.config);if(r.length)return this.emeController.getKeySystemAccess(r)}}return null}load(e){return!e.decryptdata&&e.encrypted&&this.emeController&&this.config.emeEnabled?this.emeController.selectKeySystemFormat(e).then(t=>this.loadInternal(e,t)):this.loadInternal(e)}loadInternal(e,t){var n,r;t&&e.setKeyFormat(t);const i=e.decryptdata;if(!i){const c=new Error(t?`Expected frag.decryptdata to be defined after setting format ${t}`:`Missing decryption data on fragment in onKeyLoading (emeEnabled with controller: ${this.emeController&&this.config.emeEnabled})`);return Promise.reject(this.createKeyLoadError(e,z.KEY_LOAD_ERROR,c))}const s=i.uri;if(!s)return Promise.reject(this.createKeyLoadError(e,z.KEY_LOAD_ERROR,new Error(`Invalid key URI: "${s}"`)));const l=cl(i);let d=this.keyIdToKeyInfo[l];if((n=d)!=null&&n.decryptdata.key)return i.key=d.decryptdata.key,Promise.resolve({frag:e,keyInfo:d});if(this.emeController&&(r=d)!=null&&r.keyLoadPromise)switch(this.emeController.getKeyStatus(d.decryptdata)){case"usable":case"usable-in-future":return d.keyLoadPromise.then(p=>{const{keyInfo:b}=p;return i.key=b.decryptdata.key,{frag:e,keyInfo:b}})}switch(this.log(`${this.keyIdToKeyInfo[l]?"Rel":"L"}oading${i.keyId?" keyId: "+ue(i.keyId):""} URI: ${i.uri} from ${e.type} ${e.level}`),d=this.keyIdToKeyInfo[l]={decryptdata:i,keyLoadPromise:null,loader:null,mediaKeySessionContext:null},i.method){case"SAMPLE-AES":case"SAMPLE-AES-CENC":case"SAMPLE-AES-CTR":return i.keyFormat==="identity"?this.loadKeyHTTP(d,e):this.loadKeyEME(d,e);case"AES-128":case"AES-256":case"AES-256-CTR":return this.loadKeyHTTP(d,e);default:return Promise.reject(this.createKeyLoadError(e,z.KEY_LOAD_ERROR,new Error(`Key supplied with unsupported METHOD: "${i.method}"`)))}}loadKeyEME(e,t){const n={frag:t,keyInfo:e};if(this.emeController&&this.config.emeEnabled){var r;if(!e.decryptdata.keyId&&(r=t.initSegment)!=null&&r.data){const s=we(t.initSegment.data);if(s.length){let l=s[0];l.some(d=>d!==0)?(this.log(`Using keyId found in init segment ${ue(l)}`),Mi.setKeyIdForUri(e.decryptdata.uri,l)):(l=Mi.addKeyIdForUri(e.decryptdata.uri),this.log(`Generating keyId to patch media ${ue(l)}`)),e.decryptdata.keyId=l}}if(!e.decryptdata.keyId&&!Ke(t))return Promise.resolve(n);const i=this.emeController.loadKey(n);return(e.keyLoadPromise=i.then(s=>(e.mediaKeySessionContext=s,n))).catch(s=>{throw e.keyLoadPromise=null,"data"in s&&(s.data.frag=t),s})}return Promise.resolve(n)}loadKeyHTTP(e,t){const n=this.config,r=n.loader,i=new r(n);return t.keyLoader=e.loader=i,e.keyLoadPromise=new Promise((s,l)=>{const d={keyInfo:e,frag:t,responseType:"arraybuffer",url:e.decryptdata.uri},c=n.keyLoadPolicy.default,p={loadPolicy:c,timeout:c.maxLoadTimeMs,maxRetry:0,retryDelay:0,maxRetryDelay:0},b={onSuccess:(I,F,$,ge)=>{const{frag:me,keyInfo:Fe}=$,We=cl(Fe.decryptdata);if(!me.decryptdata||Fe!==this.keyIdToKeyInfo[We])return l(this.createKeyLoadError(me,z.KEY_LOAD_ERROR,new Error("after key load, decryptdata unset or changed"),ge));Fe.decryptdata.key=me.decryptdata.key=new Uint8Array(I.data),me.keyLoader=null,Fe.loader=null,s({frag:me,keyInfo:Fe})},onError:(I,F,$,ge)=>{this.resetLoader(F),l(this.createKeyLoadError(t,z.KEY_LOAD_ERROR,new Error(`HTTP Error ${I.code} loading key ${I.text}`),$,T({url:d.url,data:void 0},I)))},onTimeout:(I,F,$)=>{this.resetLoader(F),l(this.createKeyLoadError(t,z.KEY_LOAD_TIMEOUT,new Error("key loading timed out"),$))},onAbort:(I,F,$)=>{this.resetLoader(F),l(this.createKeyLoadError(t,z.INTERNAL_ABORTED,new Error("key loading aborted"),$))}};i.load(d,p,b)})}resetLoader(e){const{frag:t,keyInfo:n,url:r}=e,i=n.loader;t.keyLoader===i&&(t.keyLoader=null,n.loader=null);const s=cl(n.decryptdata)||r;delete this.keyIdToKeyInfo[s],i&&i.destroy()}}function cl(a){if(a.keyFormat!==Sr.FAIRPLAY){const e=a.keyId;if(e)return ue(e)}return a.uri}function mu(a){const{type:e}=a;switch(e){case q.AUDIO_TRACK:return te.AUDIO;case q.SUBTITLE_TRACK:return te.SUBTITLE;default:return te.MAIN}}function dl(a,e){let t=a.url;return(t===void 0||t.indexOf("data:")===0)&&(t=e.url),t}class K0{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(g.MANIFEST_LOADING,this.onManifestLoading,this),e.on(g.LEVEL_LOADING,this.onLevelLoading,this),e.on(g.AUDIO_TRACK_LOADING,this.onAudioTrackLoading,this),e.on(g.SUBTITLE_TRACK_LOADING,this.onSubtitleTrackLoading,this),e.on(g.LEVELS_UPDATED,this.onLevelsUpdated,this)}unregisterListeners(){const{hls:e}=this;e.off(g.MANIFEST_LOADING,this.onManifestLoading,this),e.off(g.LEVEL_LOADING,this.onLevelLoading,this),e.off(g.AUDIO_TRACK_LOADING,this.onAudioTrackLoading,this),e.off(g.SUBTITLE_TRACK_LOADING,this.onSubtitleTrackLoading,this),e.off(g.LEVELS_UPDATED,this.onLevelsUpdated,this)}createInternalLoader(e){const t=this.hls.config,n=t.pLoader,r=t.loader,i=n||r,s=new i(t);return this.loaders[e.type]=s,s}getInternalLoader(e){return this.loaders[e.type]}resetInternalLoader(e){this.loaders[e]&&delete this.loaders[e]}destroyInternalLoaders(){for(const e in this.loaders){const t=this.loaders[e];t&&t.destroy(),this.resetInternalLoader(e)}}destroy(){this.variableList=null,this.unregisterListeners(),this.destroyInternalLoaders()}onManifestLoading(e,t){const{url:n}=t;this.variableList=null,this.load({id:null,level:0,responseType:"text",type:q.MANIFEST,url:n,deliveryDirectives:null,levelOrTrack:null})}onLevelLoading(e,t){const{id:n,level:r,pathwayId:i,url:s,deliveryDirectives:l,levelInfo:d}=t;this.load({id:n,level:r,pathwayId:i,responseType:"text",type:q.LEVEL,url:s,deliveryDirectives:l,levelOrTrack:d})}onAudioTrackLoading(e,t){const{id:n,groupId:r,url:i,deliveryDirectives:s,track:l}=t;this.load({id:n,groupId:r,level:null,responseType:"text",type:q.AUDIO_TRACK,url:i,deliveryDirectives:s,levelOrTrack:l})}onSubtitleTrackLoading(e,t){const{id:n,groupId:r,url:i,deliveryDirectives:s,track:l}=t;this.load({id:n,groupId:r,level:null,responseType:"text",type:q.SUBTITLE_TRACK,url:i,deliveryDirectives:s,levelOrTrack:l})}onLevelsUpdated(e,t){const n=this.loaders[q.LEVEL];if(n){const r=n.context;r&&!t.levels.some(i=>i===r.levelOrTrack)&&(n.abort(),delete this.loaders[q.LEVEL])}}load(e){var t;const n=this.hls.config;let r=this.getInternalLoader(e);if(r){const c=this.hls.logger,p=r.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}`),r.abort()}let i;if(e.type===q.MANIFEST?i=n.manifestLoadPolicy.default:i=y({},n.playlistLoadPolicy.default,{timeoutRetry:null,errorRetry:null}),r=this.createInternalLoader(e),v((t=e.deliveryDirectives)==null?void 0:t.part)){let c;if(e.type===q.LEVEL&&e.level!==null?c=this.hls.levels[e.level].details:e.type===q.AUDIO_TRACK&&e.id!==null?c=this.hls.audioTracks[e.id].details:e.type===q.SUBTITLE_TRACK&&e.id!==null&&(c=this.hls.subtitleTracks[e.id].details),c){const p=c.partTarget,b=c.targetduration;if(p&&b){const I=Math.max(p*3,b*.8)*1e3;i=y({},i,{maxTimeToFirstByteMs:Math.min(I,i.maxTimeToFirstByteMs),maxLoadTimeMs:Math.min(I,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},d={onSuccess:(c,p,b,I)=>{const F=this.getInternalLoader(b);this.resetInternalLoader(b.type);const $=c.data;p.parsing.start=performance.now(),ki.isMediaPlaylist($)||b.type!==q.MANIFEST?this.handleTrackOrLevelPlaylist(c,p,b,I||null,F):this.handleMasterPlaylist(c,p,b,I)},onError:(c,p,b,I)=>{this.handleNetworkError(p,b,!1,c,I)},onTimeout:(c,p,b)=>{this.handleNetworkError(p,b,!0,void 0,c)}};r.load(e,l,d)}checkAutostartLoad(){if(!this.hls)return;const{config:{autoStartLoad:e,startPosition:t},forceStartLoad:n}=this.hls;(e||n)&&(this.hls.logger.log(`${e?"auto":"force"} startLoad with configured startPosition ${t}`),this.hls.startLoad(t))}handleMasterPlaylist(e,t,n,r){const i=this.hls,s=e.data,l=dl(e,n),d=ki.parseMasterPlaylist(s,l);if(d.playlistParsingError){t.parsing.end=performance.now(),this.handleManifestParsingError(e,n,d.playlistParsingError,r,t);return}const{contentSteering:c,levels:p,sessionData:b,sessionKeys:I,startTimeOffset:F,variableList:$}=d;this.variableList=$,p.forEach(We=>{const{unknownCodecs:et}=We;if(et){const{preferManagedMediaSource:xt}=this.hls.config;let{audioCodec:Ot,videoCodec:sn}=We;for(let Pt=et.length;Pt--;){const Xt=et[Pt];Qe(Xt,"audio",xt)?(We.audioCodec=Ot=Ot?`${Ot},${Xt}`:Xt,zt.audio[Ot.substring(0,4)]=2,et.splice(Pt,1)):Qe(Xt,"video",xt)&&(We.videoCodec=sn=sn?`${sn},${Xt}`:Xt,zt.video[sn.substring(0,4)]=2,et.splice(Pt,1))}}});const{AUDIO:ge=[],SUBTITLES:me,"CLOSED-CAPTIONS":Fe}=ki.parseMasterPlaylistMedia(s,l,d);ge.length&&!ge.some(et=>!et.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"),ge.unshift({type:"main",name:"main",groupId:"main",default:!1,autoselect:!1,forced:!1,id:-1,attrs:new hr({}),bitrate:0,url:""})),i.trigger(g.MANIFEST_LOADED,{levels:p,audioTracks:ge,subtitles:me,captions:Fe,contentSteering:c,url:l,stats:t,networkDetails:r,sessionData:b,sessionKeys:I,startTimeOffset:F,variableList:$})}handleTrackOrLevelPlaylist(e,t,n,r,i){const s=this.hls,{id:l,level:d,type:c}=n,p=dl(e,n),b=v(d)?d:v(l)?l:0,I=mu(n),F=ki.parseLevelPlaylist(e.data,p,b,I,0,this.variableList);if(c===q.MANIFEST){const $={attrs:new hr({}),bitrate:0,details:F,name:"",url:p};F.requestScheduled=t.loading.start+qr(F,0),s.trigger(g.MANIFEST_LOADED,{levels:[$],audioTracks:[],url:p,stats:t,networkDetails:r,sessionData:null,sessionKeys:null,contentSteering:null,startTimeOffset:null,variableList:null})}t.parsing.end=performance.now(),n.levelDetails=F,this.handlePlaylistLoaded(F,e,t,n,r,i)}handleManifestParsingError(e,t,n,r,i){this.hls.trigger(g.ERROR,{type:fe.NETWORK_ERROR,details:z.MANIFEST_PARSING_ERROR,fatal:t.type===q.MANIFEST,url:e.url,err:n,error:n,reason:n.message,response:e,context:t,networkDetails:r,stats:i})}handleNetworkError(e,t,n=!1,r,i){let s=`A network ${n?"timeout":"error"+(r?" (status "+r.code+")":"")} occurred while loading ${e.type}`;e.type===q.LEVEL?s+=`: ${e.level} id: ${e.id}`:(e.type===q.AUDIO_TRACK||e.type===q.SUBTITLE_TRACK)&&(s+=` id: ${e.id} group-id: "${e.groupId}"`);const l=new Error(s);this.hls.logger.warn(`[playlist-loader]: ${s}`);let d=z.UNKNOWN,c=!1;const p=this.getInternalLoader(e);switch(e.type){case q.MANIFEST:d=n?z.MANIFEST_LOAD_TIMEOUT:z.MANIFEST_LOAD_ERROR,c=!0;break;case q.LEVEL:d=n?z.LEVEL_LOAD_TIMEOUT:z.LEVEL_LOAD_ERROR,c=!1;break;case q.AUDIO_TRACK:d=n?z.AUDIO_TRACK_LOAD_TIMEOUT:z.AUDIO_TRACK_LOAD_ERROR,c=!1;break;case q.SUBTITLE_TRACK:d=n?z.SUBTITLE_TRACK_LOAD_TIMEOUT:z.SUBTITLE_LOAD_ERROR,c=!1;break}p&&this.resetInternalLoader(e.type);const b={type:fe.NETWORK_ERROR,details:d,fatal:c,url:e.url,loader:p,context:e,error:l,networkDetails:t,stats:i};if(r){const I=(t==null?void 0:t.url)||e.url;b.response=T({url:I,data:void 0},r)}this.hls.trigger(g.ERROR,b)}handlePlaylistLoaded(e,t,n,r,i,s){const l=this.hls,{type:d,level:c,levelOrTrack:p,id:b,groupId:I,deliveryDirectives:F}=r,$=dl(t,r),ge=mu(r);let me=typeof r.level=="number"&&ge===te.MAIN?c:void 0;const Fe=e.playlistParsingError;if(Fe){if(this.hls.logger.warn(`${Fe} ${e.url}`),!l.config.ignorePlaylistParsingErrors){l.trigger(g.ERROR,{type:fe.NETWORK_ERROR,details:z.LEVEL_PARSING_ERROR,fatal:!1,url:$,error:Fe,reason:Fe.message,response:t,context:r,level:me,parent:ge,networkDetails:i,stats:n});return}e.playlistParsingError=null}if(!e.fragments.length){const We=e.playlistParsingError=new Error("No Segments found in Playlist");l.trigger(g.ERROR,{type:fe.NETWORK_ERROR,details:z.LEVEL_EMPTY_ERROR,fatal:!1,url:$,error:We,reason:We.message,response:t,context:r,level:me,parent:ge,networkDetails:i,stats:n});return}switch(e.live&&s&&(s.getCacheAge&&(e.ageHeader=s.getCacheAge()||0),(!s.getCacheAge||isNaN(e.ageHeader))&&(e.ageHeader=0)),d){case q.MANIFEST:case q.LEVEL:if(me){if(!p)me=0;else if(p!==l.levels[me]){const We=l.levels.indexOf(p);We>-1&&(me=We)}}l.trigger(g.LEVEL_LOADED,{details:e,levelInfo:p||l.levels[0],level:me||0,id:b||0,stats:n,networkDetails:i,deliveryDirectives:F,withoutMultiVariant:d===q.MANIFEST});break;case q.AUDIO_TRACK:l.trigger(g.AUDIO_TRACK_LOADED,{details:e,track:p,id:b||0,groupId:I||"",stats:n,networkDetails:i,deliveryDirectives:F});break;case q.SUBTITLE_TRACK:l.trigger(g.SUBTITLE_TRACK_LOADED,{details:e,track:p,id:b||0,groupId:I||"",stats:n,networkDetails:i,deliveryDirectives:F});break}}}class Xs{static get version(){return ta}static isMSESupported(){return hu()}static isSupported(){return B0()}static getMediaSource(){return Ee()}static get Events(){return g}static get MetadataSchema(){return Fi}static get ErrorTypes(){return fe}static get ErrorDetails(){return z}static get DefaultConfig(){return Xs.defaultConfig?Xs.defaultConfig:C0}static set DefaultConfig(e){Xs.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 fa,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),n=this.config=A0(Xs.DefaultConfig,e,t);this.userConfig=e,n.progressive&&D0(n,t);const{abrController:r,bufferController:i,capLevelController:s,errorController:l,fpsController:d}=n,c=new l(this),p=this.abrController=new r(this),b=new Cn(this),I=n.interstitialsController,F=I?this.interstitialsController=new I(this,Xs):null,$=this.bufferController=new i(this,b),ge=this.capLevelController=new s(this),me=new d(this),Fe=new K0(this),We=n.contentSteeringController,et=We?new We(this):null,xt=this.levelController=new N0(this,et),Ot=new M0(this),sn=new z0(this.config,this.logger),Pt=this.streamController=new U0(this,b,sn),Xt=this.gapController=new O0(this,b);ge.setStreamController(Pt),me.setStreamController(Pt);const Yt=[Fe,xt,Pt];F&&Yt.splice(1,0,F),et&&Yt.splice(1,0,et),this.networkControllers=Yt;const Ft=[p,$,Xt,ge,me,Ot,b];this.audioTrackController=this.createController(n.audioTrackController,Yt);const xn=n.audioStreamController;xn&&Yt.push(this.audioStreamController=new xn(this,b,sn)),this.subtitleTrackController=this.createController(n.subtitleTrackController,Yt);const nr=n.subtitleStreamController;nr&&Yt.push(this.subtititleStreamController=new nr(this,b,sn)),this.createController(n.timelineController,Ft),sn.emeController=this.emeController=this.createController(n.emeController,Ft),this.cmcdController=this.createController(n.cmcdController,Ft),this.latencyController=this.createController(k0,Ft),this.coreComponents=Ft,Yt.push(c);const mr=c.onErrorOut;typeof mr=="function"&&this.on(g.ERROR,mr,c),this.on(g.MANIFEST_LOADED,Fe.onManifestLoaded,Fe)}createController(e,t){if(e){const n=new e(this);return t&&t.push(n),n}return null}on(e,t,n=this){this._emitter.on(e,t,n)}once(e,t,n=this){this._emitter.once(e,t,n)}removeAllListeners(e){this._emitter.removeAllListeners(e)}off(e,t,n=this,r){this._emitter.off(e,t,n,r)}listeners(e){return this._emitter.listeners(e)}emit(e,t,n){return this._emitter.emit(e,t,n)}trigger(e,t){if(this.config.debug)return this.emit(e,e,t);try{return this.emit(e,e,t)}catch(n){if(this.logger.error("An internal error happened while handling event "+e+'. Error message: "'+n.message+'". Here is a stacktrace:',n),!this.triggeringException){this.triggeringException=!0;const r=e===g.ERROR;this.trigger(g.ERROR,{type:fe.OTHER_ERROR,details:z.INTERNAL_EXCEPTION,fatal:r,event:e,error:n}),this.triggeringException=!1}}return!1}listenerCount(e){return this._emitter.listenerCount(e)}destroy(){this.logger.log("destroy"),this.trigger(g.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(g.ERROR,{type:fe.OTHER_ERROR,details:z.ATTACH_MEDIA_ERROR,fatal:!0,error:i});return}this.logger.log("attachMedia"),this._media&&(this.logger.warn("media must be detached before attaching"),this.detachMedia());const t="media"in e,n=t?e.media:e,r=t?e:{media:n};this._media=n,this.trigger(g.MEDIA_ATTACHING,r)}detachMedia(){this.logger.log("detachMedia"),this.trigger(g.MEDIA_DETACHING,{}),this._media=null}transferMedia(){this._media=null;const e=this.bufferController.transferMedia();return this.trigger(g.MEDIA_DETACHING,{transferMedia:e}),e}loadSource(e){this.stopLoad();const t=this.media,n=this._url,r=this._url=x.buildAbsoluteURL(self.location.href,e,{alwaysNormalize:!0});this._autoLevelCapping=-1,this._maxHdcpLevel=null,this.logger.log(`loadSource:${r}`),t&&n&&(n!==r||this.bufferController.hasSourceTypes())&&(this.detachMedia(),this.attachMedia(t)),this.trigger(g.MANIFEST_LOADING,{url:e})}get url(){return this._url}get hasEnoughToStart(){return this.streamController.hasEnoughToStart}get startPosition(){return this.streamController.startPositionValue}startLoad(e=-1,t){this.logger.log(`startLoad(${e+(t?", <skip seek to start>":"")})`),this.started=!0,this.resumeBuffering();for(let n=0;n<this.networkControllers.length&&(this.networkControllers[n].startLoad(e,t),!(!this.started||!this.networkControllers));n++);}stopLoad(){this.logger.log("stopLoad"),this.started=!1;for(let e=0;e<this.networkControllers.length&&(this.networkControllers[e].stopLoad(),!(this.started||!this.networkControllers));e++);}get loadingEnabled(){return this.started}get bufferingEnabled(){return this.streamController.bufferingEnabled}resumeBuffering(){this.bufferingEnabled||(this.logger.log("resume buffering"),this.networkControllers.forEach(e=>{e.resumeBuffering&&e.resumeBuffering()}))}pauseBuffering(){this.bufferingEnabled&&(this.logger.log("pause buffering"),this.networkControllers.forEach(e=>{e.pauseBuffering&&e.pauseBuffering()}))}get inFlightFragments(){const e={[te.MAIN]:this.streamController.inFlightFrag};return this.audioStreamController&&(e[te.AUDIO]=this.audioStreamController.inFlightFrag),this.subtititleStreamController&&(e[te.SUBTITLE]=this.subtititleStreamController.inFlightFrag),e}swapAudioCodec(){this.logger.log("swapAudioCodec"),this.streamController.swapAudioCodec()}recoverMediaError(){this.logger.log("recoverMediaError");const e=this._media,t=e==null?void 0:e.currentTime;this.detachMedia(),e&&(this.attachMedia(e),t&&this.startLoad(t))}removeLevel(e){this.levelController.removeLevel(e)}get sessionId(){let e=this._sessionId;return e||(e=this._sessionId=Oc()),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){it(e)&&this._maxHdcpLevel!==e&&(this._maxHdcpLevel=e,this.levelController.checkMaxAutoUpdated())}get autoLevelEnabled(){return this.levelController.manualLevel===-1}get manualLevel(){return this.levelController.manualLevel}get minAutoLevel(){const{levels:e,config:{minAutoBitrate:t}}=this;if(!e)return 0;const n=e.length;for(let r=0;r<n;r++)if(e[r].maxBitrate>=t)return r;return 0}get maxAutoLevel(){const{levels:e,autoLevelCapping:t,maxHdcpLevel:n}=this;let r;if(t===-1&&e!=null&&e.length?r=e.length-1:r=t,n)for(let i=r;i--;){const s=e[i].attrs["HDCP-LEVEL"];if(s&&s<=n)return i}return r}get firstAutoLevel(){return this.abrController.firstAutoLevel}get nextAutoLevel(){return this.abrController.nextAutoLevel}set nextAutoLevel(e){this.abrController.nextAutoLevel=e}get playingDate(){return this.streamController.currentProgramDateTime}get mainForwardBufferInfo(){return this.streamController.getMainFwdBufferInfo()}get maxBufferLength(){return this.streamController.maxBufferLength}setAudioOption(e){var t;return((t=this.audioTrackController)==null?void 0:t.setAudioOption(e))||null}setSubtitleOption(e){var t;return((t=this.subtitleTrackController)==null?void 0:t.setSubtitleOption(e))||null}get allAudioTracks(){const e=this.audioTrackController;return e?e.allAudioTracks:[]}get audioTracks(){const e=this.audioTrackController;return e?e.audioTracks:[]}get audioTrack(){const e=this.audioTrackController;return e?e.audioTrack:-1}set audioTrack(e){const t=this.audioTrackController;t&&(t.audioTrack=e)}get allSubtitleTracks(){const e=this.subtitleTrackController;return e?e.allSubtitleTracks:[]}get subtitleTracks(){const e=this.subtitleTrackController;return e?e.subtitleTracks:[]}get subtitleTrack(){const e=this.subtitleTrackController;return e?e.subtitleTrack:-1}get media(){return this._media}set subtitleTrack(e){const t=this.subtitleTrackController;t&&(t.subtitleTrack=e)}get subtitleDisplay(){const e=this.subtitleTrackController;return e?e.subtitleDisplay:!1}set subtitleDisplay(e){const t=this.subtitleTrackController;t&&(t.subtitleDisplay=e)}get lowLatencyMode(){return this.config.lowLatencyMode}set lowLatencyMode(e){this.config.lowLatencyMode=e}get liveSyncPosition(){return this.latencyController.liveSyncPosition}get latency(){return this.latencyController.latency}get maxLatency(){return this.latencyController.maxLatency}get targetLatency(){return this.latencyController.targetLatency}set targetLatency(e){this.latencyController.targetLatency=e}get drift(){return this.latencyController.drift}get forceStartLoad(){return this.streamController.forceStartLoad}get pathways(){return this.levelController.pathways}get pathwayPriority(){return this.levelController.pathwayPriority}set pathwayPriority(e){this.levelController.pathwayPriority=e}get bufferedToEnd(){var e;return!!((e=this.bufferController)!=null&&e.bufferedToEnd)}get interstitialsManager(){var e;return((e=this.interstitialsController)==null?void 0:e.interstitialsManager)||null}getMediaDecodingInfo(e,t=this.allAudioTracks){const n=At(t);return Mt(e,n,navigator.mediaCapabilities)}}Xs.defaultConfig=void 0},16722:function(ln,mt,m){"use strict";m.d(mt,{Z:function(){return te}});const v=o=>typeof o=="object"&&o!=null&&o.nodeType===1,ae=(o,C)=>(!C||o!=="hidden")&&o!=="visible"&&o!=="clip",W=(o,C)=>{if(o.clientHeight<o.scrollHeight||o.clientWidth<o.scrollWidth){const M=getComputedStyle(o,null);return ae(M.overflowY,C)||ae(M.overflowX,C)||(y=>{const E=(T=>{if(!T.ownerDocument||!T.ownerDocument.defaultView)return null;try{return T.ownerDocument.defaultView.frameElement}catch(k){return null}})(y);return!!E&&(E.clientHeight<y.scrollHeight||E.clientWidth<y.scrollWidth)})(o)}return!1},fe=(o,C,M,y,E,T,k,j)=>T<o&&k>C||T>o&&k<C?0:T<=o&&j<=M||k>=C&&j>=M?T-o-y:k>C&&j<M||T<o&&j>M?k-C+E:0,z=o=>{const C=o.parentElement;return C==null?o.getRootNode().host||null:C},g=(o,C)=>{var M,y,E,T;if(typeof document=="undefined")return[];const{scrollMode:k,block:j,inline:Z,boundary:U,skipOverflowHiddenElements:A}=C,K=typeof U=="function"?U:ft=>ft!==U;if(!v(o))throw new TypeError("Invalid target");const D=document.scrollingElement||document.documentElement,O=[];let re=o;for(;v(re)&&K(re);){if(re=z(re),re===D){O.push(re);break}re!=null&&re===document.body&&W(re)&&!W(document.documentElement)||re!=null&&W(re,A)&&O.push(re)}const oe=(y=(M=window.visualViewport)==null?void 0:M.width)!=null?y:innerWidth,ie=(T=(E=window.visualViewport)==null?void 0:E.height)!=null?T:innerHeight,{scrollX:Ee,scrollY:Me}=window,{height:ke,width:tt,top:ue,right:X,bottom:L,left:se}=o.getBoundingClientRect(),{top:Q,right:V,bottom:x,left:w}=(ft=>{const Ue=window.getComputedStyle(ft);return{top:parseFloat(Ue.scrollMarginTop)||0,right:parseFloat(Ue.scrollMarginRight)||0,bottom:parseFloat(Ue.scrollMarginBottom)||0,left:parseFloat(Ue.scrollMarginLeft)||0}})(o);let H=j==="start"||j==="nearest"?ue-Q:j==="end"?L+x:ue+ke/2-Q+x,he=Z==="center"?se+tt/2-w+V:Z==="end"?X+V:se-w;const Ke=[];for(let ft=0;ft<O.length;ft++){const Ue=O[ft],{height:st,width:pt,top:Et,right:Ne,bottom:St,left:at}=Ue.getBoundingClientRect();if(k==="if-needed"&&ue>=0&&se>=0&&L<=ie&&X<=oe&&(Ue===D&&!W(Ue)||ue>=Et&&L<=St&&se>=at&&X<=Ne))return Ke;const Nt=getComputedStyle(Ue),Ge=parseInt(Nt.borderLeftWidth,10),je=parseInt(Nt.borderTopWidth,10),Re=parseInt(Nt.borderRightWidth,10),_e=parseInt(Nt.borderBottomWidth,10);let Y=0,Le=0;const Ce="offsetWidth"in Ue?Ue.offsetWidth-Ue.clientWidth-Ge-Re:0,B="offsetHeight"in Ue?Ue.offsetHeight-Ue.clientHeight-je-_e:0,P="offsetWidth"in Ue?Ue.offsetWidth===0?0:pt/Ue.offsetWidth:0,ce="offsetHeight"in Ue?Ue.offsetHeight===0?0:st/Ue.offsetHeight:0;if(D===Ue)Y=j==="start"?H:j==="end"?H-ie:j==="nearest"?fe(Me,Me+ie,ie,je,_e,Me+H,Me+H+ke,ke):H-ie/2,Le=Z==="start"?he:Z==="center"?he-oe/2:Z==="end"?he-oe:fe(Ee,Ee+oe,oe,Ge,Re,Ee+he,Ee+he+tt,tt),Y=Math.max(0,Y+Me),Le=Math.max(0,Le+Ee);else{Y=j==="start"?H-Et-je:j==="end"?H-St+_e+B:j==="nearest"?fe(Et,St,st,je,_e+B,H,H+ke,ke):H-(Et+st/2)+B/2,Le=Z==="start"?he-at-Ge:Z==="center"?he-(at+pt/2)+Ce/2:Z==="end"?he-Ne+Re+Ce:fe(at,Ne,pt,Ge,Re+Ce,he,he+tt,tt);const{scrollLeft:ve,scrollTop:de}=Ue;Y=ce===0?0:Math.max(0,Math.min(de+Y/ce,Ue.scrollHeight-st/ce+B)),Le=P===0?0:Math.max(0,Math.min(ve+Le/P,Ue.scrollWidth-pt/P+Ce)),H+=de-Y,he+=ve-Le}Ke.push({el:Ue,top:Y,left:Le})}return Ke},q=o=>o===!1?{block:"end",inline:"nearest"}:(C=>C===Object(C)&&Object.keys(C).length!==0)(o)?o:{block:"start",inline:"nearest"};function te(o,C){if(!o.isConnected||!(E=>{let T=E;for(;T&&T.parentNode;){if(T.parentNode===document)return!0;T=T.parentNode instanceof ShadowRoot?T.parentNode.host:T.parentNode}return!1})(o))return;const M=(E=>{const T=window.getComputedStyle(E);return{top:parseFloat(T.scrollMarginTop)||0,right:parseFloat(T.scrollMarginRight)||0,bottom:parseFloat(T.scrollMarginBottom)||0,left:parseFloat(T.scrollMarginLeft)||0}})(o);if((E=>typeof E=="object"&&typeof E.behavior=="function")(C))return C.behavior(g(o,C));const y=typeof C=="boolean"||C==null?void 0:C.behavior;for(const{el:E,top:T,left:k}of g(o,q(C))){const j=T-M.top+M.bottom,Z=k-M.left+M.right;E.scroll({top:j,left:Z,behavior:y})}}}}]);
|
|
|
}()); |