You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
NewEduCoderBuild/p__RestFul__index.ad8c5dc8....

1354 lines
1.5 MiB

This file contains ambiguous Unicode characters!

This file contains ambiguous Unicode characters that may be confused with others in your current locale. If your use case is intentional and legitimate, you can safely ignore this warning. Use the Escape button to highlight these characters.

!(function(){var Vl=Math.pow;(self.webpackChunk=self.webpackChunk||[]).push([[1006],{70557:function(ln,et,m){"use strict";m.d(et,{Z:function(){return fe}});var L=m(72308),Q=m(59301),ge={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M862 465.3h-81c-4.6 0-9 2-12.1 5.5L550 723.1V160c0-4.4-3.6-8-8-8h-60c-4.4 0-8 3.6-8 8v563.1L255.1 470.8c-3-3.5-7.4-5.5-12.1-5.5h-81c-6.8 0-10.5 8.1-6 13.2L487.9 861a31.96 31.96 0 0048.3 0L868 478.5c4.5-5.2.8-13.2-6-13.2z"}}]},name:"arrow-down",theme:"outlined"},_e=ge,A=m(7657),p=function(k,N){return Q.createElement(A.Z,(0,L.Z)({},k,{ref:N,icon:_e}))},be=Q.forwardRef(p),fe=be},40001:function(ln,et,m){"use strict";m.d(et,{Z:function(){return fe}});var L=m(72308),Q=m(59301),ge={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"},_e=ge,A=m(7657),p=function(k,N){return Q.createElement(A.Z,(0,L.Z)({},k,{ref:N,icon:_e}))},be=Q.forwardRef(p),fe=be},84105:function(ln,et,m){"use strict";m.d(et,{Z:function(){return fe}});var L=m(72308),Q=m(59301),ge={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M884 256h-75c-5.1 0-9.9 2.5-12.9 6.6L512 654.2 227.9 262.6c-3-4.1-7.8-6.6-12.9-6.6h-75c-6.5 0-10.3 7.4-6.5 12.7l352.6 486.1c12.8 17.6 39 17.6 51.7 0l352.6-486.1c3.9-5.3.1-12.7-6.4-12.7z"}}]},name:"down",theme:"outlined"},_e=ge,A=m(7657),p=function(k,N){return Q.createElement(A.Z,(0,L.Z)({},k,{ref:N,icon:_e}))},be=Q.forwardRef(p),fe=be},18785:function(ln,et,m){"use strict";m.d(et,{Z:function(){return fe}});var L=m(72308),Q=m(59301),ge={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M176 511a56 56 0 10112 0 56 56 0 10-112 0zm280 0a56 56 0 10112 0 56 56 0 10-112 0zm280 0a56 56 0 10112 0 56 56 0 10-112 0z"}}]},name:"ellipsis",theme:"outlined"},_e=ge,A=m(7657),p=function(k,N){return Q.createElement(A.Z,(0,L.Z)({},k,{ref:N,icon:_e}))},be=Q.forwardRef(p),fe=be},73331:function(ln,et,m){"use strict";m.d(et,{Z:function(){return fe}});var L=m(72308),Q=m(59301),ge={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M942.2 486.2Q889.47 375.11 816.7 305l-50.88 50.88C807.31 395.53 843.45 447.4 874.7 512 791.5 684.2 673.4 766 512 766q-72.67 0-133.87-22.38L323 798.75Q408 838 512 838q288.3 0 430.2-300.3a60.29 60.29 0 000-51.5zm-63.57-320.64L836 122.88a8 8 0 00-11.32 0L715.31 232.2Q624.86 186 512 186q-288.3 0-430.2 300.3a60.3 60.3 0 000 51.5q56.69 119.4 136.5 191.41L112.48 835a8 8 0 000 11.31L155.17 889a8 8 0 0011.31 0l712.15-712.12a8 8 0 000-11.32zM149.3 512C232.6 339.8 350.7 258 512 258c54.54 0 104.13 9.36 149.12 28.39l-70.3 70.3a176 176 0 00-238.13 238.13l-83.42 83.42C223.1 637.49 183.3 582.28 149.3 512zm246.7 0a112.11 112.11 0 01146.2-106.69L401.31 546.2A112 112 0 01396 512z"}},{tag:"path",attrs:{d:"M508 624c-3.46 0-6.87-.16-10.25-.47l-52.82 52.82a176.09 176.09 0 00227.42-227.42l-52.82 52.82c.31 3.38.47 6.79.47 10.25a111.94 111.94 0 01-112 112z"}}]},name:"eye-invisible",theme:"outlined"},_e=ge,A=m(7657),p=function(k,N){return Q.createElement(A.Z,(0,L.Z)({},k,{ref:N,icon:_e}))},be=Q.forwardRef(p),fe=be},15277:function(ln,et,m){"use strict";m.d(et,{Z:function(){return fe}});var L=m(72308),Q=m(59301),ge={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M942.2 486.2C847.4 286.5 704.1 186 512 186c-192.2 0-335.4 100.5-430.2 300.3a60.3 60.3 0 000 51.5C176.6 737.5 319.9 838 512 838c192.2 0 335.4-100.5 430.2-300.3 7.7-16.2 7.7-35 0-51.5zM512 766c-161.3 0-279.4-81.8-362.7-254C232.6 339.8 350.7 258 512 258c161.3 0 279.4 81.8 362.7 254C791.5 684.2 673.4 766 512 766zm-4-430c-97.2 0-176 78.8-176 176s78.8 176 176 176 176-78.8 176-176-78.8-176-176-176zm0 288c-61.9 0-112-50.1-112-112s50.1-112 112-112 112 50.1 112 112-50.1 112-112 112z"}}]},name:"eye",theme:"outlined"},_e=ge,A=m(7657),p=function(k,N){return Q.createElement(A.Z,(0,L.Z)({},k,{ref:N,icon:_e}))},be=Q.forwardRef(p),fe=be},52671:function(ln,et,m){"use strict";m.d(et,{Z:function(){return fe}});var L=m(72308),Q=m(59301),ge={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"},_e=ge,A=m(7657),p=function(k,N){return Q.createElement(A.Z,(0,L.Z)({},k,{ref:N,icon:_e}))},be=Q.forwardRef(p),fe=be},8657:function(ln,et,m){"use strict";m.d(et,{Z:function(){return fe}});var L=m(72308),Q=m(59301),ge={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"},_e=ge,A=m(7657),p=function(k,N){return Q.createElement(A.Z,(0,L.Z)({},k,{ref:N,icon:_e}))},be=Q.forwardRef(p),fe=be},56082:function(ln,et,m){"use strict";m.d(et,{Z:function(){return fe}});var L=m(72308),Q=m(59301),ge={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"},_e=ge,A=m(7657),p=function(k,N){return Q.createElement(A.Z,(0,L.Z)({},k,{ref:N,icon:_e}))},be=Q.forwardRef(p),fe=be},33853:function(ln,et,m){"use strict";m.d(et,{Z:function(){return fe}});var L=m(72308),Q=m(59301),ge={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M724 218.3V141c0-6.7-7.7-10.4-12.9-6.3L260.3 486.8a31.86 31.86 0 000 50.3l450.8 352.1c5.3 4.1 12.9.4 12.9-6.3v-77.3c0-4.9-2.3-9.6-6.1-12.6l-360-281 360-281.1c3.8-3 6.1-7.7 6.1-12.6z"}}]},name:"left",theme:"outlined"},_e=ge,A=m(7657),p=function(k,N){return Q.createElement(A.Z,(0,L.Z)({},k,{ref:N,icon:_e}))},be=Q.forwardRef(p),fe=be},15075:function(ln,et,m){"use strict";m.d(et,{Z:function(){return fe}});var L=m(72308),Q=m(59301),ge={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"},_e=ge,A=m(7657),p=function(k,N){return Q.createElement(A.Z,(0,L.Z)({},k,{ref:N,icon:_e}))},be=Q.forwardRef(p),fe=be},43531:function(ln,et,m){"use strict";m.d(et,{Z:function(){return fe}});var L=m(72308),Q=m(59301),ge={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"},_e=ge,A=m(7657),p=function(k,N){return Q.createElement(A.Z,(0,L.Z)({},k,{ref:N,icon:_e}))},be=Q.forwardRef(p),fe=be},61485:function(ln,et,m){"use strict";m.d(et,{Z:function(){return fe}});var L=m(72308),Q=m(59301),ge={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"},_e=ge,A=m(7657),p=function(k,N){return Q.createElement(A.Z,(0,L.Z)({},k,{ref:N,icon:_e}))},be=Q.forwardRef(p),fe=be},38819:function(ln,et,m){"use strict";m.d(et,{Z:function(){return fe}});var L=m(72308),Q=m(59301),ge={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M765.7 486.8L314.9 134.7A7.97 7.97 0 00302 141v77.3c0 4.9 2.3 9.6 6.1 12.6l360 281.1-360 281.1c-3.9 3-6.1 7.7-6.1 12.6V883c0 6.7 7.7 10.4 12.9 6.3l450.8-352.1a31.96 31.96 0 000-50.4z"}}]},name:"right",theme:"outlined"},_e=ge,A=m(7657),p=function(k,N){return Q.createElement(A.Z,(0,L.Z)({},k,{ref:N,icon:_e}))},be=Q.forwardRef(p),fe=be},47472:function(ln,et,m){"use strict";m.d(et,{Z:function(){return fe}});var L=m(72308),Q=m(59301),ge={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M909.6 854.5L649.9 594.8C690.2 542.7 712 479 712 412c0-80.2-31.3-155.4-87.9-212.1-56.6-56.7-132-87.9-212.1-87.9s-155.5 31.3-212.1 87.9C143.2 256.5 112 331.8 112 412c0 80.1 31.3 155.5 87.9 212.1C256.5 680.8 331.8 712 412 712c67 0 130.6-21.8 182.7-62l259.7 259.6a8.2 8.2 0 0011.6 0l43.6-43.5a8.2 8.2 0 000-11.6zM570.4 570.4C528 612.7 471.8 636 412 636s-116-23.3-158.4-65.6C211.3 528 188 471.8 188 412s23.3-116.1 65.6-158.4C296 211.3 352.2 188 412 188s116.1 23.2 158.4 65.6S636 352.2 636 412s-23.3 116.1-65.6 158.4z"}}]},name:"search",theme:"outlined"},_e=ge,A=m(7657),p=function(k,N){return Q.createElement(A.Z,(0,L.Z)({},k,{ref:N,icon:_e}))},be=Q.forwardRef(p),fe=be},35593:function(ln,et,m){"use strict";m.d(et,{Z:function(){return At}});var L=m(77321),Q=m(52487),ge=m(74416),_e=m(43403),A=m(92310),p=m.n(A),be=m(29301),fe=m(76846),o=m(96452),k=m(6089),N=m(80402),v=m(34280),x=m(49658),S=m(59301),T=m(72308),z=m(77900),ae=m(8654);function B(ne){var de=ne.prefixCls,se=ne.align,W=ne.arrow,Ie=ne.arrowPos,M=W||{},ce=M.className,q=M.content,le=Ie.x,pe=le===void 0?0:le,De=Ie.y,Te=De===void 0?0:De,ke=S.useRef();if(!se||!se.points)return null;var Oe={position:"absolute"};if(se.autoArrow!==!1){var Ne=se.points[0],nt=se.points[1],Qe=Ne[0],Ze=Ne[1],pt=nt[0],vt=nt[1];Qe===pt||!["t","b"].includes(Qe)?Oe.top=Te:Qe==="t"?Oe.top=0:Oe.bottom=0,Ze===vt||!["l","r"].includes(Ze)?Oe.left=pe:Ze==="l"?Oe.left=0:Oe.right=0}return S.createElement("div",{ref:ke,className:p()("".concat(de,"-arrow"),ce),style:Oe},q)}function U(ne){var de=ne.prefixCls,se=ne.open,W=ne.zIndex,Ie=ne.mask,M=ne.motion;return Ie?S.createElement(z.default,(0,T.Z)({},M,{motionAppear:!0,visible:se,removeOnLeave:!0}),function(ce){var q=ce.className;return S.createElement("div",{style:{zIndex:W},className:p()("".concat(de,"-mask"),q)})}):null}var X=S.memo(function(ne){var de=ne.children;return de},function(ne,de){return de.cache}),Z=X,D=S.forwardRef(function(ne,de){var se=ne.popup,W=ne.className,Ie=ne.prefixCls,M=ne.style,ce=ne.target,q=ne.onVisibleChanged,le=ne.open,pe=ne.keepDom,De=ne.fresh,Te=ne.onClick,ke=ne.mask,Oe=ne.arrow,Ne=ne.arrowPos,nt=ne.align,Qe=ne.motion,Ze=ne.maskMotion,pt=ne.forceRender,vt=ne.getPopupContainer,ct=ne.autoDestroy,Dt=ne.portal,Ut=ne.zIndex,w=ne.onMouseEnter,I=ne.onMouseLeave,dt=ne.onPointerEnter,oe=ne.ready,Pe=ne.offsetX,vn=ne.offsetY,je=ne.offsetR,He=ne.offsetB,tt=ne.onAlign,he=ne.onPrepare,ie=ne.stretch,xe=ne.targetWidth,Fe=ne.targetHeight,V=typeof se=="function"?se():se,at=le||pe,Ce=(vt==null?void 0:vt.length)>0,It=S.useState(!vt||!Ce),Bt=(0,Q.Z)(It,2),an=Bt[0],en=Bt[1];if((0,v.Z)(function(){!an&&Ce&&ce&&en(!0)},[an,Ce,ce]),!an)return null;var Mt="auto",tn={left:"-1000vw",top:"-1000vh",right:Mt,bottom:Mt};if(oe||!le){var Ue,bt=nt.points,wt=nt.dynamicInset||((Ue=nt._experimental)===null||Ue===void 0?void 0:Ue.dynamicInset),Me=wt&&bt[0][1]==="r",Ae=wt&&bt[0][0]==="b";Me?(tn.right=je,tn.left=Mt):(tn.left=Pe,tn.right=Mt),Ae?(tn.bottom=He,tn.top=Mt):(tn.top=vn,tn.bottom=Mt)}var ut={};return ie&&(ie.includes("height")&&Fe?ut.height=Fe:ie.includes("minHeight")&&Fe&&(ut.minHeight=Fe),ie.includes("width")&&xe?ut.width=xe:ie.includes("minWidth")&&xe&&(ut.minWidth=xe)),le||(ut.pointerEvents="none"),S.createElement(Dt,{open:pt||at,getContainer:vt&&function(){return vt(ce)},autoDestroy:ct},S.createElement(U,{prefixCls:Ie,open:le,zIndex:Ut,mask:ke,motion:Ze}),S.createElement(be.Z,{onResize:tt,disabled:!le},function(ft){return S.createElement(z.default,(0,T.Z)({motionAppear:!0,motionEnter:!0,motionLeave:!0,removeOnLeave:!1,forceRender:pt,leavedClassName:"".concat(Ie,"-hidden")},Qe,{onAppearPrepare:he,onEnterPrepare:he,visible:le,onVisibleChanged:function(Pt){var Zt;Qe==null||(Zt=Qe.onVisibleChanged)===null||Zt===void 0||Zt.call(Qe,Pt),q(Pt)}}),function(Nt,Pt){var Zt=Nt.className,Ht=Nt.style,sn=p()(Ie,Zt,W);return S.createElement("div",{ref:(0,ae.sQ)(ft,de,Pt),className:sn,style:(0,L.Z)((0,L.Z)((0,L.Z)((0,L.Z)({"--arrow-x":"".concat(Ne.x||0,"px"),"--arrow-y":"".concat(Ne.y||0,"px")},tn),ut),Ht),{},{boxSizing:"border-box",zIndex:Ut},M),onMouseEnter:w,onMouseLeave:I,onPointerEnter:dt,onClick:Te},Oe&&S.createElement(B,{prefixCls:Ie,arrow:Oe,arrowPos:Ne,align:nt}),S.createElement(Z,{cache:!le&&!De},V))})}))}),C=D,K=S.forwardRef(function(ne,de){var se=ne.children,W=ne.getTriggerDOMNode,Ie=(0,ae.Yr)(se),M=S.useCallback(function(q){(0,ae.mH)(de,W?W(q):q)},[W]),ce=(0,ae.x1)(M,se.ref);return Ie?S.cloneElement(se,{ref:ce}):se}),$=K,ve=S.createContext(null),Se=ve;function Le(ne){return ne?Array.isArray(ne)?ne:[ne]:[]}function ye(ne,de,se,W){return S.useMemo(function(){var Ie=Le(se!=null?se:de),M=Le(W!=null?W:de),ce=new Set(Ie),q=new Set(M);return ne&&(ce.has("hover")&&(ce.delete("hover"),ce.add("click")),q.has("hover")&&(q.delete("hover"),q.add("click"))),[ce,q]},[ne,de,se,W])}var te=m(29194);function j(){var ne=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[],de=arguments.length>1&&arguments[1]!==void 0?arguments[1]:[],se=arguments.length>2?arguments[2]:void 0;return se?ne[0]===de[0]:ne[0]===de[0]&&ne[1]===de[1]}function ue(ne,de,se,W){for(var Ie=se.points,M=Object.keys(ne),ce=0;ce<M.length;ce+=1){var q,le=M[ce];if(j((q=ne[le])===null||q===void 0?void 0:q.points,Ie,W))return"".concat(de,"-placement-").concat(le)}return""}function R(ne,de,se,W){return de||(se?{motionName:"".concat(ne,"-").concat(se)}:W?{motionName:W}:null)}function ee(ne){return ne.ownerDocument.defaultView}function G(ne){for(var de=[],se=ne==null?void 0:ne.parentElement,W=["hidden","scroll","clip","auto"];se;){var Ie=ee(se).getComputedStyle(se),M=Ie.overflowX,ce=Ie.overflowY,q=Ie.overflow;[M,ce,q].some(function(le){return W.includes(le)})&&de.push(se),se=se.parentElement}return de}function y(ne){var de=arguments.length>1&&arguments[1]!==void 0?arguments[1]:1;return Number.isNaN(ne)?de:ne}function E(ne){return y(parseFloat(ne),0)}function Y(ne,de){var se=(0,L.Z)({},ne);return(de||[]).forEach(function(W){if(!(W instanceof HTMLBodyElement||W instanceof HTMLHtmlElement)){var Ie=ee(W).getComputedStyle(W),M=Ie.overflow,ce=Ie.overflowClipMargin,q=Ie.borderTopWidth,le=Ie.borderBottomWidth,pe=Ie.borderLeftWidth,De=Ie.borderRightWidth,Te=W.getBoundingClientRect(),ke=W.offsetHeight,Oe=W.clientHeight,Ne=W.offsetWidth,nt=W.clientWidth,Qe=E(q),Ze=E(le),pt=E(pe),vt=E(De),ct=y(Math.round(Te.width/Ne*1e3)/1e3),Dt=y(Math.round(Te.height/ke*1e3)/1e3),Ut=(Ne-nt-pt-vt)*ct,w=(ke-Oe-Qe-Ze)*Dt,I=Qe*Dt,dt=Ze*Dt,oe=pt*ct,Pe=vt*ct,vn=0,je=0;if(M==="clip"){var He=E(ce);vn=He*ct,je=He*Dt}var tt=Te.x+oe-vn,he=Te.y+I-je,ie=tt+Te.width+2*vn-oe-Pe-Ut,xe=he+Te.height+2*je-I-dt-w;se.left=Math.max(se.left,tt),se.top=Math.max(se.top,he),se.right=Math.min(se.right,ie),se.bottom=Math.min(se.bottom,xe)}}),se}function me(ne){var de=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,se="".concat(de),W=se.match(/^(.*)\%$/);return W?ne*(parseFloat(W[1])/100):parseFloat(se)}function $e(ne,de){var se=de||[],W=(0,Q.Z)(se,2),Ie=W[0],M=W[1];return[me(ne.width,Ie),me(ne.height,M)]}function We(){var ne=arguments.length>0&&arguments[0]!==void 0?arguments[0]:"";return[ne[0],ne[1]]}function qe(ne,de){var se=de[0],W=de[1],Ie,M;return se==="t"?M=ne.y:se==="b"?M=ne.y+ne.height:M=ne.y+ne.height/2,W==="l"?Ie=ne.x:W==="r"?Ie=ne.x+ne.width:Ie=ne.x+ne.width/2,{x:Ie,y:M}}function Xe(ne,de){var se={t:"b",b:"t",l:"r",r:"l"};return ne.map(function(W,Ie){return Ie===de?se[W]||"c":W}).join("")}function gt(ne,de,se,W,Ie,M,ce){var q=S.useState({ready:!1,offsetX:0,offsetY:0,offsetR:0,offsetB:0,arrowX:0,arrowY:0,scaleX:1,scaleY:1,align:Ie[W]||{}}),le=(0,Q.Z)(q,2),pe=le[0],De=le[1],Te=S.useRef(0),ke=S.useMemo(function(){return de?G(de):[]},[de]),Oe=S.useRef({}),Ne=function(){Oe.current={}};ne||Ne();var nt=(0,k.Z)(function(){if(de&&se&&ne){let Sn=function(Qn,gr){var Kr=arguments.length>2&&arguments[2]!==void 0?arguments[2]:sn,Pr=V.x+Qn,Rr=V.y+gr,rr=Pr+Ue,Br=Rr+tn,ni=Math.max(Pr,Kr.left),ci=Math.max(Rr,Kr.top),Ni=Math.min(rr,Kr.right),_i=Math.min(Br,Kr.bottom);return Math.max(0,(Ni-ni)*(_i-ci))},En=function(){mn=V.y+fn,Mn=mn+tn,Tn=V.x+dn,Xn=Tn+Ue};var pt,vt,ct=de,Dt=ct.ownerDocument,Ut=ee(ct),w=Ut.getComputedStyle(ct),I=w.width,dt=w.height,oe=w.position,Pe=ct.style.left,vn=ct.style.top,je=ct.style.right,He=ct.style.bottom,tt=ct.style.overflow,he=(0,L.Z)((0,L.Z)({},Ie[W]),M),ie=Dt.createElement("div");(pt=ct.parentElement)===null||pt===void 0||pt.appendChild(ie),ie.style.left="".concat(ct.offsetLeft,"px"),ie.style.top="".concat(ct.offsetTop,"px"),ie.style.position=oe,ie.style.height="".concat(ct.offsetHeight,"px"),ie.style.width="".concat(ct.offsetWidth,"px"),ct.style.left="0",ct.style.top="0",ct.style.right="auto",ct.style.bottom="auto",ct.style.overflow="hidden";var xe;if(Array.isArray(se))xe={x:se[0],y:se[1],width:0,height:0};else{var Fe=se.getBoundingClientRect();xe={x:Fe.x,y:Fe.y,width:Fe.width,height:Fe.height}}var V=ct.getBoundingClientRect(),at=Dt.documentElement,Ce=at.clientWidth,It=at.clientHeight,Bt=at.scrollWidth,an=at.scrollHeight,en=at.scrollTop,Mt=at.scrollLeft,tn=V.height,Ue=V.width,bt=xe.height,wt=xe.width,Me={left:0,top:0,right:Ce,bottom:It},Ae={left:-Mt,top:-en,right:Bt-Mt,bottom:an-en},ut=he.htmlRegion,ft="visible",Nt="visibleFirst";ut!=="scroll"&&ut!==Nt&&(ut=ft);var Pt=ut===Nt,Zt=Y(Ae,ke),Ht=Y(Me,ke),sn=ut===ft?Ht:Zt,_n=Pt?Ht:sn;ct.style.left="auto",ct.style.top="auto",ct.style.right="0",ct.style.bottom="0";var hn=ct.getBoundingClientRect();ct.style.left=Pe,ct.style.top=vn,ct.style.right=je,ct.style.bottom=He,ct.style.overflow=tt,(vt=ct.parentElement)===null||vt===void 0||vt.removeChild(ie);var Lt=y(Math.round(Ue/parseFloat(I)*1e3)/1e3),Ft=y(Math.round(tn/parseFloat(dt)*1e3)/1e3);if(Lt===0||Ft===0||(0,fe.Sh)(se)&&!(0,te.Z)(se))return;var $t=he.offset,Xt=he.targetOffset,Wt=$e(V,$t),Dn=(0,Q.Z)(Wt,2),pn=Dn[0],Gt=Dn[1],Je=$e(xe,Xt),rt=(0,Q.Z)(Je,2),ht=rt[0],xt=rt[1];xe.x-=ht,xe.y-=xt;var mt=he.points||[],jt=(0,Q.Z)(mt,2),Et=jt[0],Qt=jt[1],nn=We(Qt),on=We(Et),In=qe(xe,nn),wn=qe(V,on),Kn=(0,L.Z)({},he),dn=In.x-wn.x+pn,fn=In.y-wn.y+Gt,Hn=Sn(dn,fn),Zn=Sn(dn,fn,Ht),Yn=qe(xe,["t","l"]),On=qe(V,["t","l"]),Fn=qe(xe,["b","r"]),jn=qe(V,["b","r"]),Bn=he.overflow||{},Jn=Bn.adjustX,ur=Bn.adjustY,Pn=Bn.shiftX,bn=Bn.shiftY,Ge=function(gr){return typeof gr=="boolean"?gr:gr>=0},mn,Mn,Tn,Xn;En();var sr=Ge(ur),ar=on[0]===nn[0];if(sr&&on[0]==="t"&&(Mn>_n.bottom||Oe.current.bt)){var Un=fn;ar?Un-=tn-bt:Un=Yn.y-jn.y-Gt;var tr=Sn(dn,Un),xn=Sn(dn,Un,Ht);tr>Hn||tr===Hn&&(!Pt||xn>=Zn)?(Oe.current.bt=!0,fn=Un,Gt=-Gt,Kn.points=[Xe(on,0),Xe(nn,0)]):Oe.current.bt=!1}if(sr&&on[0]==="b"&&(mn<_n.top||Oe.current.tb)){var gn=fn;ar?gn+=tn-bt:gn=Fn.y-On.y-Gt;var Vn=Sn(dn,gn),nr=Sn(dn,gn,Ht);Vn>Hn||Vn===Hn&&(!Pt||nr>=Zn)?(Oe.current.tb=!0,fn=gn,Gt=-Gt,Kn.points=[Xe(on,0),Xe(nn,0)]):Oe.current.tb=!1}var pr=Ge(Jn),Mr=on[1]===nn[1];if(pr&&on[1]==="l"&&(Xn>_n.right||Oe.current.rl)){var Cn=dn;Mr?Cn-=Ue-wt:Cn=Yn.x-jn.x-pn;var Sr=Sn(Cn,fn),mr=Sn(Cn,fn,Ht);Sr>Hn||Sr===Hn&&(!Pt||mr>=Zn)?(Oe.current.rl=!0,dn=Cn,pn=-pn,Kn.points=[Xe(on,1),Xe(nn,1)]):Oe.current.rl=!1}if(pr&&on[1]==="r"&&(Tn<_n.left||Oe.current.lr)){var _r=dn;Mr?_r+=Ue-wt:_r=Fn.x-On.x-pn;var zr=Sn(_r,fn),Or=Sn(_r,fn,Ht);zr>Hn||zr===Hn&&(!Pt||Or>=Zn)?(Oe.current.lr=!0,dn=_r,pn=-pn,Kn.points=[Xe(on,1),Xe(nn,1)]):Oe.current.lr=!1}En();var wr=Pn===!0?0:Pn;typeof wr=="number"&&(Tn<Ht.left&&(dn-=Tn-Ht.left-pn,xe.x+wt<Ht.left+wr&&(dn+=xe.x-Ht.left+wt-wr)),Xn>Ht.right&&(dn-=Xn-Ht.right-pn,xe.x>Ht.right-wr&&(dn+=xe.x-Ht.right+wr)));var Nr=bn===!0?0:bn;typeof Nr=="number"&&(mn<Ht.top&&(fn-=mn-Ht.top-Gt,xe.y+bt<Ht.top+Nr&&(fn+=xe.y-Ht.top+bt-Nr)),Mn>Ht.bottom&&(fn-=Mn-Ht.bottom-Gt,xe.y>Ht.bottom-Nr&&(fn+=xe.y-Ht.bottom+Nr)));var vr=V.x+dn,ei=vr+Ue,qn=V.y+fn,oi=qn+tn,Xr=xe.x,ti=Xr+wt,cr=xe.y,fi=cr+bt,xi=Math.max(vr,Xr),vi=Math.min(ei,ti),or=(xi+vi)/2,yi=or-vr,Er=Math.max(qn,cr),qt=Math.min(oi,fi),dr=(Er+qt)/2,Tr=dr-qn;ce==null||ce(de,Kn);var Nn=hn.right-V.x-(dn+V.width),kn=hn.bottom-V.y-(fn+V.height);De({ready:!0,offsetX:dn/Lt,offsetY:fn/Ft,offsetR:Nn/Lt,offsetB:kn/Ft,arrowX:yi/Lt,arrowY:Tr/Ft,scaleX:Lt,scaleY:Ft,align:Kn})}}),Qe=function(){Te.current+=1;var vt=Te.current;Promise.resolve().then(function(){Te.current===vt&&nt()})},Ze=function(){De(function(vt){return(0,L.Z)((0,L.Z)({},vt),{},{ready:!1})})};return(0,v.Z)(Ze,[W]),(0,v.Z)(function(){ne||Ze()},[ne]),[pe.ready,pe.offsetX,pe.offsetY,pe.offsetR,pe.offsetB,pe.arrowX,pe.arrowY,pe.scaleX,pe.scaleY,pe.align,Qe]}var _t=m(80702);function st(ne,de,se,W,Ie){(0,v.Z)(function(){if(ne&&de&&se){let Te=function(){W(),Ie()};var M=de,ce=se,q=G(M),le=G(ce),pe=ee(ce),De=new Set([pe].concat((0,_t.Z)(q),(0,_t.Z)(le)));return De.forEach(function(ke){ke.addEventListener("scroll",Te,{passive:!0})}),pe.addEventListener("resize",Te,{passive:!0}),W(),function(){De.forEach(function(ke){ke.removeEventListener("scroll",Te),pe.removeEventListener("resize",Te)})}}},[ne,de,se])}var Kt=m(48736),un=m(16089);function Ot(ne,de,se,W,Ie,M,ce,q){var le=S.useRef(ne),pe=S.useRef(!1);le.current!==ne&&(pe.current=!0,le.current=ne),S.useEffect(function(){var De=(0,un.Z)(function(){pe.current=!1});return function(){un.Z.cancel(De)}},[ne]),S.useEffect(function(){if(de&&W&&(!Ie||M)){var De=function(){var oe=!1,Pe=function(He){var tt=He.target;oe=ce(tt)},vn=function(He){var tt=He.target;!pe.current&&le.current&&!oe&&!ce(tt)&&q(!1)};return[Pe,vn]},Te=De(),ke=(0,Q.Z)(Te,2),Oe=ke[0],Ne=ke[1],nt=De(),Qe=(0,Q.Z)(nt,2),Ze=Qe[0],pt=Qe[1],vt=ee(W);vt.addEventListener("mousedown",Oe,!0),vt.addEventListener("click",Ne,!0),vt.addEventListener("contextmenu",Ne,!0);var ct=(0,o.A)(se);if(ct&&(ct.addEventListener("mousedown",Ze,!0),ct.addEventListener("click",pt,!0),ct.addEventListener("contextmenu",pt,!0)),0)var Dt,Ut,w,I;return function(){vt.removeEventListener("mousedown",Oe,!0),vt.removeEventListener("click",Ne,!0),vt.removeEventListener("contextmenu",Ne,!0),ct&&(ct.removeEventListener("mousedown",Ze,!0),ct.removeEventListener("click",pt,!0),ct.removeEventListener("contextmenu",pt,!0))}}},[de,se,W,Ie,M])}var Vt=["prefixCls","children","action","showAction","hideAction","popupVisible","defaultPopupVisible","onPopupVisibleChange","afterPopupVisibleChange","mouseEnterDelay","mouseLeaveDelay","focusDelay","blurDelay","mask","maskClosable","getPopupContainer","forceRender","autoDestroy","destroyPopupOnHide","popup","popupClassName","popupStyle","popupPlacement","builtinPlacements","popupAlign","zIndex","stretch","getPopupClassNameFromAlign","fresh","alignPoint","onPopupClick","onPopupAlign","arrow","popupMotion","maskMotion","popupTransitionName","popupAnimation","maskTransitionName","maskAnimation","className","getTriggerDOMNode"];function lt(){var ne=arguments.length>0&&arguments[0]!==void 0?arguments[0]:_e.Z,de=S.forwardRef(function(se,W){var Ie=se.prefixCls,M=Ie===void 0?"rc-trigger-popup":Ie,ce=se.children,q=se.action,le=q===void 0?"hover":q,pe=se.showAction,De=se.hideAction,Te=se.popupVisible,ke=se.defaultPopupVisible,Oe=se.onPopupVisibleChange,Ne=se.afterPopupVisibleChange,nt=se.mouseEnterDelay,Qe=se.mouseLeaveDelay,Ze=Qe===void 0?.1:Qe,pt=se.focusDelay,vt=se.blurDelay,ct=se.mask,Dt=se.maskClosable,Ut=Dt===void 0?!0:Dt,w=se.getPopupContainer,I=se.forceRender,dt=se.autoDestroy,oe=se.destroyPopupOnHide,Pe=se.popup,vn=se.popupClassName,je=se.popupStyle,He=se.popupPlacement,tt=se.builtinPlacements,he=tt===void 0?{}:tt,ie=se.popupAlign,xe=se.zIndex,Fe=se.stretch,V=se.getPopupClassNameFromAlign,at=se.fresh,Ce=se.alignPoint,It=se.onPopupClick,Bt=se.onPopupAlign,an=se.arrow,en=se.popupMotion,Mt=se.maskMotion,tn=se.popupTransitionName,Ue=se.popupAnimation,bt=se.maskTransitionName,wt=se.maskAnimation,Me=se.className,Ae=se.getTriggerDOMNode,ut=(0,ge.Z)(se,Vt),ft=dt||oe||!1,Nt=S.useState(!1),Pt=(0,Q.Z)(Nt,2),Zt=Pt[0],Ht=Pt[1];(0,v.Z)(function(){Ht((0,x.Z)())},[]);var sn=S.useRef({}),_n=S.useContext(Se),hn=S.useMemo(function(){return{registerSubPopup:function(ir,$r){sn.current[ir]=$r,_n==null||_n.registerSubPopup(ir,$r)}}},[_n]),Lt=(0,N.Z)(),Ft=S.useState(null),$t=(0,Q.Z)(Ft,2),Xt=$t[0],Wt=$t[1],Dn=(0,k.Z)(function(Wn){(0,fe.Sh)(Wn)&&Xt!==Wn&&Wt(Wn),_n==null||_n.registerSubPopup(Lt,Wn)}),pn=S.useState(null),Gt=(0,Q.Z)(pn,2),Je=Gt[0],rt=Gt[1],ht=S.useRef(null),xt=(0,k.Z)(function(Wn){(0,fe.Sh)(Wn)&&Je!==Wn&&(rt(Wn),ht.current=Wn)}),mt=S.Children.only(ce),jt=(mt==null?void 0:mt.props)||{},Et={},Qt=(0,k.Z)(function(Wn){var ir,$r,ri=Je;return(ri==null?void 0:ri.contains(Wn))||((ir=(0,o.A)(ri))===null||ir===void 0?void 0:ir.host)===Wn||Wn===ri||(Xt==null?void 0:Xt.contains(Wn))||(($r=(0,o.A)(Xt))===null||$r===void 0?void 0:$r.host)===Wn||Wn===Xt||Object.values(sn.current).some(function(Ur){return(Ur==null?void 0:Ur.contains(Wn))||Wn===Ur})}),nn=R(M,en,Ue,tn),on=R(M,Mt,wt,bt),In=S.useState(ke||!1),wn=(0,Q.Z)(In,2),Kn=wn[0],dn=wn[1],fn=Te!=null?Te:Kn,Hn=(0,k.Z)(function(Wn){Te===void 0&&dn(Wn)});(0,v.Z)(function(){dn(Te||!1)},[Te]);var Zn=S.useRef(fn);Zn.current=fn;var Yn=S.useRef([]);Yn.current=[];var On=(0,k.Z)(function(Wn){var ir;Hn(Wn),((ir=Yn.current[Yn.current.length-1])!==null&&ir!==void 0?ir:fn)!==Wn&&(Yn.current.push(Wn),Oe==null||Oe(Wn))}),Fn=S.useRef(),jn=function(){clearTimeout(Fn.current)},Bn=function(ir){var $r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0;jn(),$r===0?On(ir):Fn.current=setTimeout(function(){On(ir)},$r*1e3)};S.useEffect(function(){return jn},[]);var Jn=S.useState(!1),ur=(0,Q.Z)(Jn,2),Pn=ur[0],bn=ur[1];(0,v.Z)(function(Wn){(!Wn||fn)&&bn(!0)},[fn]);var Ge=S.useState(null),mn=(0,Q.Z)(Ge,2),Mn=mn[0],Tn=mn[1],Xn=S.useState([0,0]),sr=(0,Q.Z)(Xn,2),ar=sr[0],Un=sr[1],tr=function(ir){Un([ir.clientX,ir.clientY])},xn=gt(fn,Xt,Ce?ar:Je,He,he,ie,Bt),gn=(0,Q.Z)(xn,11),Vn=gn[0],nr=gn[1],pr=gn[2],Mr=gn[3],Cn=gn[4],Sr=gn[5],mr=gn[6],_r=gn[7],zr=gn[8],Or=gn[9],wr=gn[10],Nr=ye(Zt,le,pe,De),vr=(0,Q.Z)(Nr,2),ei=vr[0],qn=vr[1],oi=ei.has("click"),Xr=qn.has("click")||qn.has("contextMenu"),ti=(0,k.Z)(function(){Pn||wr()}),cr=function(){Zn.current&&Ce&&Xr&&Bn(!1)};st(fn,Je,Xt,ti,cr),(0,v.Z)(function(){ti()},[ar,He]),(0,v.Z)(function(){fn&&!(he!=null&&he[He])&&ti()},[JSON.stringify(ie)]);var fi=S.useMemo(function(){var Wn=ue(he,M,Or,Ce);return p()(Wn,V==null?void 0:V(Or))},[Or,V,he,M,Ce]);S.useImperativeHandle(W,function(){return{nativeElement:ht.current,forceAlign:ti}});var xi=S.useState(0),vi=(0,Q.Z)(xi,2),or=vi[0],yi=vi[1],Er=S.useState(0),qt=(0,Q.Z)(Er,2),dr=qt[0],Tr=qt[1],Nn=function(){if(Fe&&Je){var ir=Je.getBoundingClientRect();yi(ir.width),Tr(ir.height)}},kn=function(){Nn(),ti()},Sn=function(ir){bn(!1),wr(),Ne==null||Ne(ir)},En=function(){return new Promise(function(ir){Nn(),Tn(function(){return ir})})};(0,v.Z)(function(){Mn&&(wr(),Mn(),Tn(null))},[Mn]);function Qn(Wn,ir,$r,ri){Et[Wn]=function(Ur){var Ri;ri==null||ri(Ur),Bn(ir,$r);for(var Fi=arguments.length,Li=new Array(Fi>1?Fi-1:0),Di=1;Di<Fi;Di++)Li[Di-1]=arguments[Di];(Ri=jt[Wn])===null||Ri===void 0||Ri.call.apply(Ri,[jt,Ur].concat(Li))}}(oi||Xr)&&(Et.onClick=function(Wn){var ir;Zn.current&&Xr?Bn(!1):!Zn.current&&oi&&(tr(Wn),Bn(!0));for(var $r=arguments.length,ri=new Array($r>1?$r-1:0),Ur=1;Ur<$r;Ur++)ri[Ur-1]=arguments[Ur];(ir=jt.onClick)===null||ir===void 0||ir.call.apply(ir,[jt,Wn].concat(ri))}),Ot(fn,Xr,Je,Xt,ct,Ut,Qt,Bn);var gr=ei.has("hover"),Kr=qn.has("hover"),Pr,Rr;gr&&(Qn("onMouseEnter",!0,nt,function(Wn){tr(Wn)}),Qn("onPointerEnter",!0,nt,function(Wn){tr(Wn)}),Pr=function(ir){(fn||Pn)&&Xt!==null&&Xt!==void 0&&Xt.contains(ir.target)&&Bn(!0,nt)},Ce&&(Et.onMouseMove=function(Wn){var ir;(ir=jt.onMouseMove)===null||ir===void 0||ir.call(jt,Wn)})),Kr&&(Qn("onMouseLeave",!1,Ze),Qn("onPointerLeave",!1,Ze),Rr=function(){Bn(!1,Ze)}),ei.has("focus")&&Qn("onFocus",!0,pt),qn.has("focus")&&Qn("onBlur",!1,vt),ei.has("contextMenu")&&(Et.onContextMenu=function(Wn){var ir;Zn.current&&qn.has("contextMenu")?Bn(!1):(tr(Wn),Bn(!0)),Wn.preventDefault();for(var $r=arguments.length,ri=new Array($r>1?$r-1:0),Ur=1;Ur<$r;Ur++)ri[Ur-1]=arguments[Ur];(ir=jt.onContextMenu)===null||ir===void 0||ir.call.apply(ir,[jt,Wn].concat(ri))}),Me&&(Et.className=p()(jt.className,Me));var rr=(0,L.Z)((0,L.Z)({},jt),Et),Br={},ni=["onContextMenu","onClick","onMouseDown","onTouchStart","onMouseEnter","onMouseLeave","onFocus","onBlur"];ni.forEach(function(Wn){ut[Wn]&&(Br[Wn]=function(){for(var ir,$r=arguments.length,ri=new Array($r),Ur=0;Ur<$r;Ur++)ri[Ur]=arguments[Ur];(ir=rr[Wn])===null||ir===void 0||ir.call.apply(ir,[rr].concat(ri)),ut[Wn].apply(ut,ri)})});var ci=S.cloneElement(mt,(0,L.Z)((0,L.Z)({},rr),Br)),Ni={x:Sr,y:mr},_i=an?(0,L.Z)({},an!==!0?an:{}):null;return S.createElement(S.Fragment,null,S.createElement(be.Z,{disabled:!fn,ref:xt,onResize:kn},S.createElement($,{getTriggerDOMNode:Ae},ci)),S.createElement(Se.Provider,{value:hn},S.createElement(C,{portal:ne,ref:Dn,prefixCls:M,popup:Pe,className:p()(vn,fi),style:je,target:Je,onMouseEnter:Pr,onMouseLeave:Rr,onPointerEnter:Pr,zIndex:xe,open:fn,keepDom:Pn,fresh:at,onClick:It,mask:ct,motion:nn,maskMotion:on,onVisibleChanged:Sn,onPrepare:En,forceRender:I,autoDestroy:ft,getPopupContainer:w,align:Or,arrow:_i,arrowPos:Ni,ready:Vn,offsetX:nr,offsetY:pr,offsetR:Mr,offsetB:Cn,onAlign:ti,stretch:Fe,targetWidth:or/_r,targetHeight:dr/zr})))});return de}var At=lt(_e.Z)},50304:function(){"use strict"},8797:function(ln,et,m){"use strict";var L=m(59301),Q=m(93314),ge=m(3113),_e=Object.defineProperty,A=Object.defineProperties,p=Object.getOwnPropertyDescriptors,be=Object.getOwnPropertySymbols,fe=Object.prototype.hasOwnProperty,o=Object.prototype.propertyIsEnumerable,k=(S,T,z)=>T in S?_e(S,T,{enumerable:!0,configurable:!0,writable:!0,value:z}):S[T]=z,N=(S,T)=>{for(var z in T||(T={}))fe.call(T,z)&&k(S,z,T[z]);if(be)for(var z of be(T))o.call(T,z)&&k(S,z,T[z]);return S},v=(S,T)=>A(S,p(T));const x=({img:S,buttonProps:T={},styles:z={},customText:ae,ButtonText:B,ButtonClick:U,Buttonclass:X,ButtonTwo:Z,imgStyles:D,loading:C=!1,className:K=""})=>L.createElement("section",{className:`tc animated fadeIn ${K}`,style:N({color:"#999",margin:"100px auto",visibility:C?"hidden":"visible"},z)},L.createElement("img",{src:S||Q,style:v(N({},D),{pointerEvents:"none",userSelect:"none"})}),L.createElement("p",{className:"mt20 font14"},ae||"\u6682\u65F6\u8FD8\u6CA1\u6709\u76F8\u5173\u6570\u636E\u54E6!"),B&&L.createElement(ge.ZP,N({className:X,onClick:U},T),B),Z&&Z);et.Z=x},23210:function(ln,et,m){"use strict";m.d(et,{Z:function(){return X}});var L=m(59301),Q={wrp:"wrp___dq7YK",bgBlack:"bgBlack___ARIUV",monaco:"monaco___VnZC3",darkBlue:"darkBlue___UprA9",close:"close___LKoWu",embed:"embed___hvpEJ"},ge=m(3113),_e=m(70557),A=m(23954),p=m(6848),be=m(955),fe=m(94941),o=m(8797),k=m(3294),N=m(19381),v=m(59301),x=Object.defineProperty,S=Object.getOwnPropertySymbols,T=Object.prototype.hasOwnProperty,z=Object.prototype.propertyIsEnumerable,ae=(Z,D,C)=>D in Z?x(Z,D,{enumerable:!0,configurable:!0,writable:!0,value:C}):Z[D]=C,B=(Z,D)=>{for(var C in D||(D={}))T.call(D,C)&&ae(Z,C,D[C]);if(S)for(var C of S(D))z.call(D,C)&&ae(Z,C,D[C]);return Z},U=(Z,D,C)=>new Promise((K,$)=>{var ve=ye=>{try{Le(C.next(ye))}catch(te){$(te)}},Se=ye=>{try{Le(C.throw(ye))}catch(te){$(te)}},Le=ye=>ye.done?K(ye.value):Promise.resolve(ye.value).then(ve,Se);Le((C=C.apply(Z,D)).next())}),X=({editOffice:Z="view",data:D,theme:C,type:K,filename:$,monacoEditor:ve,className:Se,style:Le,close:ye,onClose:te,hasMask:j,disabledDownload:ue,onImgDimensions:R,showNodata:ee,recordInfo:G})=>{const[y,E]=(0,L.useState)("https://view.officeapps.live.com/op/view.aspx?src=http://testgs.educoder.net//rails/active_storage/blobs/eyJfcmFpbHMiOnsibWVzc2FnZSI6IkJBaHBCZz09IiwiZXhwIjpudWxsLCJwdXIiOiJibG9iX2lkIn19--03541f6234b93d7ac3b2d84e7eb0e6594a952945/1.ppt"),[Y,me]=(0,L.useState)(""),[$e,We]=(0,L.useState)(),qe=window.ENV==="build"?"/react/build":"",Xe=location.host.startsWith("localhost")?k.Z.PROXY_SERVER:k.Z.API_SERVER,_t=10*(1024*1024),st=(0,L.useRef)();D!=null&&D.startsWith("/api")&&K!=="txt"&&(D=k.Z.API_SERVER+D);const Kt=lt=>lt.substring(lt.lastIndexOf("/")+1).split(".").pop();$&&ve&&(ve.filename=$),(0,L.useEffect)(()=>{var lt,At;const ne=(At=(lt=document.cookie)==null?void 0:lt.replace(/\s/g,""))==null?void 0:At.split(";");ne==null||ne.map(de=>{let se=de.split("=");se[0]==="_educoder_session"&&me(se[1])})},[]),(0,L.useEffect)(()=>{K==="office"&&(D.indexOf("bigfilescdn.")>-1||D.indexOf("bigfiles1")>-1?We({url:D,fileType:Kt(D),model:D.indexOf("model=edit")?"edit":"view"}):un())},[K,D]);const un=()=>U(void 0,null,function*(){console.log("data:",D);let lt=D;D.startsWith("http")||(lt=location.origin+lt);let At=new URL(lt).pathname.split("/").pop();const ne=yield(0,fe.gJ)({attachment_id:At});ne.url=Xe+ne.url,We(ne)}),Ot=()=>{if(D.startsWith("http")||D.startsWith("blob:")){Vt();return}(0,be.Sv)($||"educoder",D,$)},Vt=()=>{G&&(0,N.fc)({id:G==null?void 0:G.id,watch_type:1,course_id:G==null?void 0:G.course_id}),(0,be.Nd)($||"educoder",decodeURIComponent(D))};return v.createElement("div",{style:B({},Le||{}),className:`${j&&Q.bgBlack} ${K?Q.wrp:"hide"}`},ye&&v.createElement("div",{className:Q.close,ref:st},!!R&&v.createElement(p.Z,{title:"\u70B9\u51FB\u5BF9\u56FE\u7247\u8FDB\u884C\u6279\u6CE8",getPopupContainer:()=>st.current},v.createElement("span",{onClick:()=>{te(),R()}},v.createElement("i",{className:"icon-yulanpizhu"}))),!ue&&v.createElement(p.Z,{title:"\u70B9\u51FB\u4E0B\u8F7D\u6B64\u6587\u4EF6",getPopupContainer:()=>st.current},v.createElement("span",{onClick:Vt},v.createElement("i",{className:"icon-quxiaozhiding"}))),v.createElement(p.Z,{title:"\u5173\u95ED",getPopupContainer:()=>st.current},v.createElement("span",{className:"",onClick:te},v.createElement("i",{className:"icon-guanbi1"})))),v.createElement("div",{className:`${Q[Se]} ${Se} ${Q.monaco} ${K==="txt"?"show":"hide"}`},K==="txt"&&v.createElement(v.Fragment,null,v.createElement(A.ZP,B({},ve)))),K==="audio"&&v.createElement("audio",{src:`${(D==null?void 0:D.indexOf("http://"))>-1||(D==null?void 0:D.indexOf("https://"))>-1?"":"data:audio/mp3;base64,"}${D}`,autoPlay:!0}),K==="video"&&v.createElement(v.Fragment,null,(D==null?void 0:D.indexOf("http"))>-1?v.createElement("video",{controls:!0,src:`${D}`,autoPlay:!0}):v.createElement("video",{controls:!0,src:`data:video/mp4;base64,${D}`,autoPlay:!0})),K==="office"&&$e&&v.createElement("iframe",{src:`${qe}/office.html?key=${$e.key}&url=${btoa($e.url)}&callbackUrl=${Xe+($e.callbackUrl||"")}&fileType=${$e.fileType}&title=${$e.title||""}&model=${Z}&officeServer=${k.Z.ONLYOFFICE}&disabledDownload=${!!ue}`}),K==="html"&&v.createElement("iframe",{src:D+"&disposition=inline"}),K==="pdf"&&v.createElement("iframe",{src:`${qe}/js/pdfview/index.html?filename=${$||"educoder.pdf"}&url=${encodeURIComponent(D)}&disabledDownload=${!!ue}`}),K==="image"&&v.createElement("img",{src:`${(D==null?void 0:D.indexOf("http://"))>-1||(D==null?void 0:D.indexOf("https://"))>-1?"":"data:image/png;base64,"}${D}`}),(K==="other"||K==="download")&&v.createElement(v.Fragment,null,ee?v.createElement(o.Z,{customText:"\u5F53\u524D\u6587\u4EF6\u4E0D\u652F\u6301\u9884\u89C8\uFF0C\u53EF\u70B9\u51FB\u4E0B\u8F7D\u67E5\u770B",ButtonTwo:v.createElement(ge.ZP,{icon:v.createElement("i",{className:"iconfont icon-xiazai4 font14"}),type:"primary",size:"middle",onClick:Ot,disabled:ue},"\u4E0B\u8F7D")}):v.createElement(ge.ZP,{type:"primary",size:"middle",onClick:Ot,disabled:ue},v.createElement(_e.Z,null),"\u70B9\u51FB\u4E0B\u8F7D")))}},85149:function(ln,et,m){"use strict";m.d(et,{z:function(){return K},Z:function(){return $}});var L=m(59301),Q=m(50304),ge=m(24768),_e=m(64018),A=m(46284),p=m(3294),be=m(955),fe=m(15342),o=m(1012),k=m(23210),N=m(59301),x=({html:ve})=>{const Se=(0,L.useRef)(null),Le=(0,L.useRef)(null),ye=`.markdown-body p {
margin: 0 0 16px 0 !important;
line-height: 28px;
white-space: pre-wrap;
}
ol,
ul,
li {
list-style-type: none
}
ol,
ul,
dl {
margin-bottom: 0px;
}
.markdown-body {
-ms-text-size-adjust: 100%;
-webkit-text-size-adjust: 100%;
color: #333;
overflow: hidden;
font-family: "Microsoft YaHei", Helvetica, "Meiryo UI", "Malgun Gothic", "Segoe UI", "Trebuchet MS", "Monaco", monospace, Tahoma, STXihei, "\u534E\u6587\u7EC6\u9ED1", STHeiti, "Helvetica Neue", "Droid Sans", "wenquanyi micro hei", FreeSans, Arimo, Arial, SimSun, "\u5B8B\u4F53", Heiti, "\u9ED1\u4F53", sans-serif;
word-break: break-word;
font-size: 16px;
line-height: 1.6;
white-space: normal;
word-wrap: break-word;
position: relative;
}
.markdown-body ul>li {
list-style-type: disc;
}
.markdown-body ol>li {
list-style-type: decimal;
}
.markdown-body a {
background: transparent;
}
.markdown-body a:active,
.markdown-body a:hover {
outline: 0;
}
.markdown-body strong {
font-weight: bold;
}
.markdown-body h1 {
font-size: 2em;
margin: 0.67em 0;
}
.markdown-body img {
border: 0;
}
.markdown-body hr {
-moz-box-sizing: content-box;
box-sizing: content-box;
height: 0;
}
.markdown-body pre {
overflow: auto;
}
.markdown-body code,
.markdown-body kbd,
.markdown-body pre {
font-family: "Meiryo UI", "YaHei Consolas Hybrid", Consolas, "Malgun Gothic", "Segoe UI", "Trebuchet MS", Helvetica, monospace, monospace;
font-size: 1em;
}
.markdown-body input {
color: inherit;
font: inherit;
margin: 0;
}
.markdown-body html input[disabled] {
cursor: default;
}
.markdown-body input {
line-height: normal;
}
.markdown-body input[type="checkbox"] {
-moz-box-sizing: border-box;
box-sizing: border-box;
padding: 0;
}
.markdown-body table {
border-collapse: collapse;
border-spacing: 0;
}
.markdown-body td,
.markdown-body th {
padding: 0;
}
.markdown-body * {
-moz-box-sizing: border-box;
box-sizing: border-box;
}
.markdown-body input {
font: 13px/1.4 Helvetica, arial, freesans, clean, sans-serif, "Segoe UI Emoji", "Segoe UI Symbol";
}
.markdown-body a {
color: #4183c4;
text-decoration: none;
}
.markdown-body a:hover,
.markdown-body a:active {
text-decoration: underline;
}
.markdown-body hr {
height: 0;
margin: 15px 0;
overflow: hidden;
background: transparent;
border: 0;
border-bottom: 1px solid #ddd;
}
.markdown-body hr:before {
display: table;
content: "";
}
.markdown-body hr:after {
display: table;
clear: both;
content: "";
}
.markdown-body h1,
.markdown-body h2,
.markdown-body h3,
.markdown-body h4,
.markdown-body h5,
.markdown-body h6 {
margin-top: 15px;
margin-bottom: 15px;
line-height: 1.1;
}
.markdown-body h1 {
font-size: 30px;
}
.markdown-body h2 {
font-size: 21px;
}
.markdown-body h3 {
font-size: 16px;
}
.markdown-body h4 {
font-size: 14px;
}
.markdown-body h5 {
font-size: 12px;
}
.markdown-body h6 {
font-size: 11px;
}
.markdown-body blockquote {
margin: 0;
}
.markdown-body ul,
.markdown-body ol {
padding: 0;
margin-top: 0;
margin-bottom: 0;
}
ul.linenums,
ol.linenums {
padding: 16px 0 0 36px !important;
}
.markdown-body ul,
.markdown-body ol {
padding-left: 2em;
}
.markdown-body ol ol,
.markdown-body ul ol {
list-style-type: lower-roman;
}
.markdown-body ul ul ol,
.markdown-body ul ol ol,
.markdown-body ol ul ol,
.markdown-body ol ol ol {
list-style-type: lower-alpha;
}
.markdown-body dd {
margin-left: 0;
}
.markdown-body code {
font-family: Consolas, "Liberation Mono", Menlo, Courier, monospace;
font-size: 12px;
}
.markdown-body pre {
margin-top: 0;
margin-bottom: 0;
font: 12px Consolas, "Liberation Mono", Menlo, Courier, monospace;
}
.markdown-body .octicon {
font: normal normal 16px octicons-anchor;
line-height: 1;
display: inline-block;
text-decoration: none;
-webkit-font-smoothing: antialiased;
-moz-osx-font-smoothing: grayscale;
-webkit-user-select: none;
-moz-user-select: none;
-ms-user-select: none;
user-select: none;
}
.markdown-body .octicon-link:before {
content: '\f05c';
}
.markdown-body>*:first-child {
margin-top: 0 !important;
}
.markdown-body>*:last-child {
margin-bottom: 0 !important;
}
.markdown-body .anchor {
position: absolute;
top: 0;
left: 0;
display: block;
padding-right: 6px;
padding-left: 30px;
margin-left: -30px;
}
.markdown-body .anchor:focus {
outline: none;
}
.markdown-body h1,
.markdown-body h2,
.markdown-body h3,
.markdown-body h4,
.markdown-body h5,
.markdown-body h6 {
position: relative;
margin-top: 1em;
margin-bottom: 16px;
font-weight: bold;
line-height: 1.4;
}
.markdown-body h1 .octicon-link,
.markdown-body h2 .octicon-link,
.markdown-body h3 .octicon-link,
.markdown-body h4 .octicon-link,
.markdown-body h5 .octicon-link,
.markdown-body h6 .octicon-link {
display: none;
color: #000;
vertical-align: middle;
}
.markdown-body h1:hover .anchor,
.markdown-body h2:hover .anchor,
.markdown-body h3:hover .anchor,
.markdown-body h4:hover .anchor,
.markdown-body h5:hover .anchor,
.markdown-body h6:hover .anchor {
padding-left: 8px;
margin-left: -30px;
text-decoration: none;
}
.markdown-body h1:hover .anchor .octicon-link,
.markdown-body h2:hover .anchor .octicon-link,
.markdown-body h3:hover .anchor .octicon-link,
.markdown-body h4:hover .anchor .octicon-link,
.markdown-body h5:hover .anchor .octicon-link,
.markdown-body h6:hover .anchor .octicon-link {
display: inline-block;
}
.markdown-body h1 {
padding-bottom: 0.3em;
font-size: 2.25em;
line-height: 1.2;
border-bottom: 1px solid #eee;
}
.markdown-body h1 .anchor {
line-height: 1;
}
.markdown-body h2 {
padding-bottom: 0.3em;
font-size: 1.75em;
line-height: 1.225;
border-bottom: 1px solid #eee;
}
.markdown-body h2 .anchor {
line-height: 1;
}
.markdown-body h3 {
font-size: 1.5em;
line-height: 1.43;
}
.markdown-body h3 .anchor {
line-height: 1.2;
}
.markdown-body h4 {
font-size: 1.25em;
}
.markdown-body h4 .anchor {
line-height: 1.2;
}
.markdown-body h5 {
font-size: 1em;
}
.markdown-body h5 .anchor {
line-height: 1.1;
}
.markdown-body h6 {
font-size: 1em;
color: #777;
}
.markdown-body h6 .anchor {
line-height: 1.1;
}
.markdown-body p,
.markdown-body blockquote,
.markdown-body ul,
.markdown-body ol,
.markdown-body dl,
.markdown-body table,
.markdown-body pre {
margin-top: 0;
margin-bottom: 16px;
}
.markdown-body ul ul,
.markdown-body ul ol,
.markdown-body ol ol,
.markdown-body ol ul {
margin-top: 0;
margin-bottom: 0;
}
.markdown-body li>p {
margin-top: 16px;
}
.markdown-body dl {
padding: 0;
}
.markdown-body dl dt {
padding: 0;
margin-top: 16px;
font-size: 1em;
font-style: italic;
font-weight: bold;
}
.markdown-body dl dd {
padding: 0 16px;
margin-bottom: 16px;
}
.markdown-body blockquote {
padding: 0 15px;
color: #777;
border-left: 4px solid #ddd;
}
.markdown-body blockquote> :first-child {
margin-top: 0;
}
.markdown-body blockquote> :last-child {
margin-bottom: 0;
}
.markdown-body table {
display: block;
width: 100%;
overflow: auto;
word-break: normal;
word-break: keep-all;
}
.markdown-body table th {
font-weight: bold;
text-align: revert;
}
.markdown-body table th,
.markdown-body table td {
padding: 6px 13px;
border: 1px solid #ddd;
}
.markdown-body table tr {
background-color: #fff;
border-top: 1px solid #ccc;
}
.markdown-body table tr:nth-child(2n) {
background-color: #f8f8f8;
}
.markdown-body img {
max-width: 100%;
-moz-box-sizing: border-box;
box-sizing: border-box;
}
.markdown-body code {
padding: 0;
padding-top: 0.2em;
padding-bottom: 0.2em;
margin: 0;
font-size: 85%;
background-color: rgba(0, 0, 0, 0.04);
border-radius: 3px;
}
.markdown-body code:has(.katex) {
background-color: transparent;
}
.markdown-body code:before,
.markdown-body code:after {
letter-spacing: -0.2em;
content: "\\00a0";
}
.markdown-body pre>code {
padding: 0;
margin: 0;
font-size: 100%;
word-break: normal;
white-space: pre;
background: transparent;
border: 0;
}
.markdown-body .highlight {
margin-bottom: 16px;
}
.markdown-body .highlight pre,
.markdown-body pre {
padding: 16px;
overflow: auto;
font-size: 85%;
line-height: 1.45;
background-color: #f7f7f7;
border-radius: 3px;
}
.markdown-body .highlight pre {
margin-bottom: 0;
word-break: normal;
}
.markdown-body pre {
word-wrap: normal;
}
.markdown-body pre code {
display: inline;
max-width: initial;
padding: 0;
margin: 0;
overflow: initial;
line-height: inherit;
word-wrap: normal;
background-color: transparent;
border: 0;
}
.markdown-body pre code:before,
.markdown-body pre code:after {
content: normal;
}
.markdown-body kbd {
display: inline-block;
padding: 3px 5px;
font-size: 11px;
line-height: 10px;
color: #555;
vertical-align: middle;
background-color: #fcfcfc;
border: solid 1px #ccc;
border-bottom-color: #bbb;
border-radius: 3px;
box-shadow: inset 0 -1px 0 #bbb;
}
.markdown-body .pl-c {
color: #969896;
}
.markdown-body .pl-c1,
.markdown-body .pl-mdh,
.markdown-body .pl-mm,
.markdown-body .pl-mp,
.markdown-body .pl-mr,
.markdown-body .pl-s1 .pl-v,
.markdown-body .pl-s3,
.markdown-body .pl-sc,
.markdown-body .pl-sv {
color: #0086b3;
}
.markdown-body .pl-e,
.markdown-body .pl-en {
color: #795da3;
}
.markdown-body .pl-s1 .pl-s2,
.markdown-body .pl-smi,
.markdown-body .pl-smp,
.markdown-body .pl-stj,
.markdown-body .pl-vo,
.markdown-body .pl-vpf {
color: #333;
}
.markdown-body .pl-ent {
color: #63a35c;
}
.markdown-body .pl-k,
.markdown-body .pl-s,
.markdown-body .pl-st {
color: #a71d5d;
}
.markdown-body .pl-pds,
.markdown-body .pl-s1,
.markdown-body .pl-s1 .pl-pse .pl-s2,
.markdown-body .pl-sr,
.markdown-body .pl-sr .pl-cce,
.markdown-body .pl-sr .pl-sra,
.markdown-body .pl-sr .pl-sre,
.markdown-body .pl-src {
color: #df5000;
}
.markdown-body .pl-mo,
.markdown-body .pl-v {
color: #1d3e81;
}
.markdown-body .pl-id {
color: #b52a1d;
}
.markdown-body .pl-ii {
background-color: #b52a1d;
color: #f8f8f8;
}
.markdown-body .pl-sr .pl-cce {
color: #63a35c;
font-weight: bold;
}
.markdown-body .pl-ml {
color: #693a17;
}
.markdown-body .pl-mh,
.markdown-body .pl-mh .pl-en,
.markdown-body .pl-ms {
color: #1d3e81;
font-weight: bold;
}
.markdown-body .pl-mq {
color: #008080;
}
.markdown-body .pl-mi {
color: #333;
font-style: italic;
}
.markdown-body .pl-mb {
color: #333;
font-weight: bold;
}
.markdown-body .pl-md,
.markdown-body .pl-mdhf {
background-color: #ffecec;
color: #bd2c00;
}
.markdown-body .pl-mdht,
.markdown-body .pl-mi1 {
background-color: #eaffea;
color: #55a532;
}
.markdown-body .pl-mdr {
color: #795da3;
font-weight: bold;
}
.markdown-body kbd {
display: inline-block;
padding: 3px 5px;
font: 11px Consolas, "Liberation Mono", Menlo, Courier, monospace;
line-height: 10px;
color: #555;
vertical-align: middle;
background-color: #fcfcfc;
border: solid 1px #ccc;
border-bottom-color: #bbb;
border-radius: 3px;
box-shadow: inset 0 -1px 0 #bbb;
}
.markdown-body .task-list-item {
list-style-type: none;
}
.markdown-body .task-list-item+.task-list-item {
margin-top: 3px;
}
.markdown-body .task-list-item input {
float: left;
margin: 0.3em 0 0.25em -1.6em;
vertical-align: middle;
}
.markdown-body :checked+.radio-label {
z-index: 1;
position: relative;
border-color: #4183c4;
}
/*! Pretty printing styles. Used with prettify.js. */
/* SPAN elements with the classes below are added by prettyprint. */
.pln {
color: #000
}
/* plain text */
@media screen {
.str {
color: #080
}
/* string content */
.kwd {
color: #008
}
/* a keyword */
.com {
color: #800
}
/* a comment */
.typ {
color: #606
}
/* a type name */
.lit {
color: #066
}
/* a literal value */
/* punctuation, lisp open bracket, lisp close bracket */
.pun,
.opn,
.clo {
color: #660
}
.tag {
color: #008
}
/* a markup tag name */
.atn {
color: #606
}
/* a markup attribute name */
.atv {
color: #080
}
/* a markup attribute value */
.dec,
.var {
color: #606
}
/* a declaration; a variable name */
.fun {
color: red
}
/* a function name */
}
/* Use higher contrast and text-weight for printable form. */
@media print,
projection {
.str {
color: #060
}
.kwd {
color: #006;
font-weight: bold
}
.com {
color: #600;
font-style: italic
}
.typ {
color: #404;
font-weight: bold
}
.lit {
color: #044
}
.pun,
.opn,
.clo {
color: #440
}
.tag {
color: #006;
font-weight: bold
}
.atn {
color: #404
}
.atv {
color: #060
}
}
/* Put a border around prettyprinted code snippets. */
pre.prettyprint {
padding: 2px;
/* border: 1px solid #888 */
}
/* Specify class=linenums on a pre to get line numbering */
ol.linenums {
margin-top: 0;
margin-bottom: 0
}
/* IE indents via margin-left */
li.L0,
li.L1,
li.L2,
li.L3,
li.L5,
li.L6,
li.L7,
li.L8 {
list-style-type: none
}
/* Alternate shading for lines */
li.L1,
li.L3,
li.L5,
li.L7,
li.L9 {
background: #eee
}
.markdown-body p,
.markdown-body blockquote,
.markdown-body ul,
.markdown-body ol,
.markdown-body dl,
.markdown-body table,
.markdown-body pre {
margin-top: 0;
margin-bottom: 16px;
}`;return(0,L.useEffect)(()=>{const te=Se.current.attachShadow({mode:"open"});Le.current=document.createElement("div"),Le.current.className="markdown-body",Le.current.innerHTML=ve,te.appendChild(Le.current);const j=document.createElement("style");return j.textContent=ye,te.appendChild(j),()=>{te.innerHTML=""}},[]),(0,L.useEffect)(()=>{Le.current&&(Le.current.innerHTML=ve)},[ve]),N.createElement("div",{ref:Se})},S=Object.defineProperty,T=Object.getOwnPropertySymbols,z=Object.prototype.hasOwnProperty,ae=Object.prototype.propertyIsEnumerable,B=(ve,Se,Le)=>Se in ve?S(ve,Se,{enumerable:!0,configurable:!0,writable:!0,value:Le}):ve[Se]=Le,U=(ve,Se)=>{for(var Le in Se||(Se={}))z.call(Se,Le)&&B(ve,Le,Se[Le]);if(T)for(var Le of T(Se))ae.call(Se,Le)&&B(ve,Le,Se[Le]);return ve};const X="@\u2581\u2581@",Z="@\u2581@",D=/<pre[^>]*>/g;function C(ve){let Se=document.createElement("div");return Se.innerHTML=ve,Se.childNodes.length===0?"":Se.childNodes[0].nodeValue}const K=(ve,Se)=>{ve=ve||"";const Le=/(?:https?:\/\/[^\/]+)?\/api\/attachments\/([A-Za-z0-9+/=]+)(\?.*?)?\)|(?:https?:\/\/[^\/]+)?\/api\/attachments\/([A-Za-z0-9+/=]+)(\?.*?)?|(?:https?:\/\/[^\/]+)?\/attachments\/download\/([A-Za-z0-9+/=]+)(\?.*?)?\//g,ye=/\"(?:https?:\/\/[^\/]+)?\/api\/attachments\/([A-Za-z0-9+/=]+)(\?.*?)?|\"(?:https?:\/\/[^\/]+)?\/attachments\/download\/([A-Za-z0-9+/=]+)(\?.*?)?\//g,te=/\(\s+(?:https?:\/\/[^\/]+)?\/files\/uploads\/([A-Za-z0-9+/=]+)(\?.*?)?|\"(?:https?:\/\/[^\/]+)?\/files\/uploads\/([A-Za-z0-9+/=]+)(\?.*?)?\//g,j=/(?:https?:\/\/[^\/]+)?\/attachments\/download\/([A-Za-z0-9+/=]+)(\?.*?)?\//g;return Se?ve.replaceAll("https://www.educoder.net","").replaceAll("https://www-cdn.educoder.net","").replaceAll("//api/attachments","/api/attachments").replace(Le,(ue,R,ee,G,y,E,Y)=>{const me=R||G||E,$e=ee||y||Y||"?";return p.Z.API_SERVER+"/api/attachments/"+me+$e+"&t="+(0,be.Jn)(me,Date.now())+(ue.indexOf(")")>-1?")":"&")}).replaceAll('src="(','src="').replaceAll("src='(",'src="'):(ve=ve.replace(j,(ue,R,ee,G,y,E,Y)=>{const me=R||G||E,$e=ee||y||Y||"?";return p.Z.API_SERVER+"/attachments/download/"+me+$e+"&t="+(0,be.Jn)(me,Date.now())+(ue.indexOf(")")>-1?")":"&")}).replace(Le,(ue,R,ee,G,y,E,Y)=>{const me=R||G||E,$e=ee||y||Y||"?";return p.Z.API_SERVER+"/api/attachments/"+me+$e+"&t="+(0,be.Jn)(me,Date.now())+(ue.indexOf(")")>-1?")":"&")}).replace(ye,(ue,R,ee,G,y)=>{const E=R||G,Y=ee||y||"";return'"'+p.Z.API_SERVER+"/api/attachments/"+E+Y+E+Y+"&t="+(0,be.Jn)(E,Date.now())}).replace(te,(ue,R,ee,G,y)=>{const E=R||G,Y=ee||y||"";return"("+p.Z.API_SERVER+"/files/uploads/"+E+Y+E+Y+"&t="+(0,be.Jn)(E,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,`
`),ve)};var $=({value:ve="",className:Se,showTextOnly:Le,showLines:ye,style:te={},stylesPrev:j={},highlightKeywords:ue,showProgramFill:R,isProgramFill:ee,disabledFill:G=!1,programFillValue:y,onFillChange:E=$e=>{},onFillBlur:Y=()=>{},onFillFocus:me=()=>{}})=>{let $e=String(ve);const[We,qe]=(0,L.useState)(""),[Xe,gt]=(0,L.useState)("office"),[_t,st]=(0,L.useState)([]),Kt=(0,L.useRef)("a"+(0,o.Z)()),un={},Ot=(le,pe,De)=>{const Te=document.createElement(le===Z?"input":"textarea");Te.style.width="100%",Te.style.height=le===Z?"40px":"151px",Te.rows=5,Te.spellcheck=!1,Te.name="edu-program-fill",Te.placeholder="\u8BF7\u8F93\u5165",Te.dataset.id=pe;const ke=Object.keys(un).length;return un[ke]=Te,`<span class="edu-program-fill-wrap ${le===Z?"":"show"}" style="width:${le===Z?"400px":"100%"}" title=${De||""}><span>${Te.outerHTML}<span class="edu-program-fill-score" style="margin:0 6px"></span></span></span>`};function Vt(le){return le=le.replace(/!\[.*?\]\(.*?\)/g,""),le=le.replace(/\[.*?\]\(.*?\)/g,""),le=le.replace(new RegExp("<iframe.*?<\\/iframe>","gs"),""),le=le.replace(/<embed.*?>/g,""),le=le.replace(/<img.*?>/g,""),le=le.replace(new RegExp("<video.*?>.*?<\\/video>","gs"),""),le=le.replace(new RegExp("<audio.*?>.*?<\\/audio>","gs"),""),le=le.replace(new RegExp("<style.*?>.*?<\\/style>","gs"),""),le=le.replace(new RegExp("<script.*?>.*?<\\/script>","gs"),""),le}const lt=le=>le.replace(/<style.*?>([\s\S]+?)<\/style>/gim,function(pe,De){let Te=De.replace(/(\n|\r)/g,"").split("}"),ke=[];return Te.map(Oe=>{Oe!=""&&ke.push(`.${Kt.current} ${Oe}`)}),`<style>${ke.join("}")}</style>`}),At=(0,L.useMemo)(()=>{try{const Te=/\(\s+\/api\/attachments\/|\(\/api\/attachments\//g,ke=/\"\/api\/attachments\/|\"\/attachments\/download\//g,Oe=/\(\s+\/files\/uploads\/|\"\/files\/uploads\//g,Ne=/\(\/attachments\/download\//g;$e=$e.replace(Ne,"("+p.Z.API_SERVER+"/attachments/download/").replace(Te,"("+p.Z.API_SERVER+"/api/attachments/").replace(ke,'"'+p.Z.API_SERVER+"/api/attachments/").replace(Oe,'"'+p.Z.API_SERVER+"/files/uploads/").replaceAll("http://video.educoder","https://video.educoder").replaceAll("http://www.educoder.net/api","https://data.educoder.net/api").replaceAll("https://www.educoder.net/api","https://data.educoder.net/api").replace(/\r\n/g,`
`)}catch(Te){}if(R){let Te=-1;return $e=$e.replaceAll("<","&lt;").replaceAll(">","&gt;").replace(/(@▁▁@|@▁@)/g,function(ke,Oe,Ne){var nt;return++Te,Ot(ke,Te,(nt=y==null?void 0:y[Te])==null?void 0:nt.value.replaceAll("<","&lt;").replaceAll(">","&gt;"))}),`<pre style="background:#fff;padding:4px">${lt($e||"")}</pre>`}let le=lt($e);le=(0,ge.ZP)(le);const pe=(0,ge.ez)();$e.match(/\[TOC\]/)&&(le=le.replace("<p>[TOC]</p>",(0,ge.Qv)()),(0,ge.Iy)()),le=le.replace(/(__special_katext_id_\d+__)/g,(Te,ke)=>{const{type:Oe,expression:Ne}=pe[ke];return(0,fe.renderToString)(C(Ne)||"",{displayMode:Oe==="block",throwOnError:!1,output:"html"})}),le=le.replace(/▁/g,"\u2581\u2581\u2581\u2581\u2581"),(0,ge.AL)();const De=document.createElement("div");if(De.innerHTML=le,Le)return De.innerText;if(ue){const Te=ue.replace(/[.*+?^${}()|[\]\\]/g,"\\$&");return W(De,Te),De.innerHTML}return setTimeout(()=>ce(),500),De.innerHTML},[$e,ue]);(0,L.useEffect)(()=>{Ie.current&&Ie.current.querySelectorAll(["input","textarea"]).forEach(pe=>{pe.oninput=ne,pe.onblur=de,pe.onfocus=se})},[_t]),(0,L.useEffect)(()=>{var le,pe,De,Te,ke;if(y!=null&&y.length)try{const Oe=Ie.current.querySelectorAll(".edu-program-fill-score"),Ne=Ie.current.querySelectorAll('[name="edu-program-fill"]');for(const[nt,Qe]of Ne.entries())Qe.value=((le=y==null?void 0:y[nt])==null?void 0:le.value)||"",((pe=y==null?void 0:y[nt])==null?void 0:pe.type)==="warning"?Qe.className="program-fill-warning":((De=y==null?void 0:y[nt])==null?void 0:De.type)==="success"?Qe.className="program-fill-success":Qe.className="";for(const[nt,Qe]of Oe.entries())Qe.innerHTML=(Te=y==null?void 0:y[nt])!=null&&Te.score?`${(ke=y==null?void 0:y[nt])==null?void 0:ke.score}\u5206`:"";st(y)}catch(Oe){console.log(Oe,"error")}},[y]);const ne=le=>{_t[le.target.dataset.id]=_t[le.target.dataset.id]||{},_t[le.target.dataset.id].value=le.target.value,st([..._t]),E(_t,le.target.dataset.id)},de=le=>{_t[le.target.dataset.id]=_t[le.target.dataset.id]||{},_t[le.target.dataset.id].value=le.target.value,st([..._t]),Y(_t,le.target.dataset.id)},se=le=>{_t[le.target.dataset.id]=_t[le.target.dataset.id]||{},_t[le.target.dataset.id].value=le.target.value,st([..._t]),me(_t,le.target.dataset.id)};function W(le,pe){return le.childNodes.forEach(De=>{var Te;if(De.childNodes.length>0)W(De,pe);else if(De.nodeName!=="IMG")if(De.innerHTML)De.innerHTML=(Te=De.innerHTML)==null?void 0:Te.replace(new RegExp(pe,"gi"),'<span style="color:#0152d9;background-color:#1890ff33">$&</span>');else{const ke=document.createElement("span");ke.innerHTML=De.textContent.replace(new RegExp(pe,"gi"),'<span style="color:#0152d9;background-color:#1890ff33">$&</span>'),De.replaceWith(ke)}})}const Ie=(0,L.useRef)();ge.jb.WebkitLineClamp=ye,ye&&(te=U(U({},te),ge.jb));function M(le){let pe=le.target;if(pe.tagName.toUpperCase()==="A"){let De=pe.getAttribute("href");if(De.indexOf("office")>-1)le.preventDefault(),qe(De),gt("office");else if(De.indexOf("application/pdf")>-1)le.preventDefault(),qe(De),gt("pdf");else if(De.indexOf("text/html")>-1)le.preventDefault(),qe(De),gt("html");else if(De.startsWith("#")){le.preventDefault();let Te=document.getElementById(De.replace("#",""));Te&&Te.scrollIntoView(!0)}}}const ce=()=>{var le;const pe=(le=Ie.current)==null?void 0:le.querySelectorAll("video");pe==null||pe.forEach(De=>{if(De.oncontextmenu=()=>!1,De.src.indexOf(".m3u8")>-1&&!De.canPlayType("application/vnd.apple.mpegurl")){if(A.ZP.isSupported()){var Te=new A.ZP;Te.loadSource(De.src),Te.attachMedia(De)}}})};(0,L.useEffect)(()=>{if(Ie.current&&At&&At.match(D)&&window.PR.prettyPrint(),Ie.current)return Ie.current.addEventListener("click",M),()=>{var le;(le=Ie.current)==null||le.removeEventListener("click",M),(0,ge.AL)(),(0,ge.Iy)()}},[At,Ie.current,M]),(0,L.useEffect)(()=>{var le;const pe=De=>{De.preventDefault(),De.clipboardData.setData("text",window.getSelection().toString())};return(le=Ie.current)==null||le.addEventListener("copy",pe),()=>{var De;(De=Ie.current)==null||De.removeEventListener("copy",pe)}},[Ie.current]);const q=le=>/<style[\s\S]*?>/i.test(le||"");return L.createElement(L.Fragment,null,Le&&L.createElement("div",{ref:Ie},At),!Le&&!q(At)&&L.createElement("div",{ref:Ie,style:U({},te),className:`${Se||""} ${G?"disabled-fill":""} markdown-body ${Kt.current}`,dangerouslySetInnerHTML:{__html:At}}),!Le&&q(At)&&L.createElement(x,{html:At}),L.createElement(k.Z,{close:!0,data:We,type:We!=null&&We.length?Xe:"",style:U({},j),onClose:()=>qe("")}))}},23954:function(ln,et,m){"use strict";m.d(et,{SV:function(){return Ie},ZP:function(){return W}});var L=m(59301),Q=m(76374);const ge={keywords:["print","auto","break","case","char","const","continue","default","do","double","else","enum","extern","float","for","goto","if","int","long","register","return","short","signed","sizeof","static","struct","switch","typedef","union","unsigned","void","volatile","while"]},_e={quickKey:[{label:"main",content:["public static void main(String[] args) {"," $0","}"].join(`
`)},{label:"System.out.println",content:["System.out.println($0)"].join(`
`)},{label:"System.out.print",content:["System.out.print($0)"].join(`
`)}],keywords:["abstract","continue","for","new","switch","assert","default","goto","package","synchronized","boolean","do","if","private","this","break","double","implements","protected","throw","byte","else","import","public","throws","case","enum","instanceof","return","transient","catch","extends","int","short","try","char","final","interface","static","void","class","finally","long","strictfp","volatile","const","float","native","super","while","true","false"]},A={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(`
`)}]},p={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(`
`)}]},be={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 fe=m(53184),o=m.n(fe),k=Object.defineProperty,N=Object.defineProperties,v=Object.getOwnPropertyDescriptors,x=Object.getOwnPropertySymbols,S=Object.prototype.hasOwnProperty,T=Object.prototype.propertyIsEnumerable,z=(M,ce,q)=>ce in M?k(M,ce,{enumerable:!0,configurable:!0,writable:!0,value:q}):M[ce]=q,ae=(M,ce)=>{for(var q in ce||(ce={}))S.call(ce,q)&&z(M,q,ce[q]);if(x)for(var q of x(ce))T.call(ce,q)&&z(M,q,ce[q]);return M},B=(M,ce)=>N(M,v(ce)),U=(M,ce,q)=>new Promise((le,pe)=>{var De=Oe=>{try{ke(q.next(Oe))}catch(Ne){pe(Ne)}},Te=Oe=>{try{ke(q.throw(Oe))}catch(Ne){pe(Ne)}},ke=Oe=>Oe.done?le(Oe.value):Promise.resolve(Oe.value).then(De,Te);ke((q=q.apply(M,ce)).next())});const X={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"]}},Z=(M,ce)=>ce.map(q=>({label:q,kind:M.languages.CompletionItemKind.Keyword,insertText:q})),D=M=>Object.keys(X.tables).map(ce=>({label:ce,kind:M.languages.CompletionItemKind.Variable,insertText:ce})),C=(M,ce)=>{const q=X.tables[M];return q?q.map(le=>({label:le,kind:ce.languages.CompletionItemKind.Field,insertText:le})):[]};function K(M,ce,q,le,pe){let De=ce.getWordUntilPosition(q),Te={startLineNumber:q.lineNumber,endLineNumber:q.lineNumber,startColumn:De.startColumn,endColumn:De.endColumn},ke=le.map(Oe=>({label:Oe,kind:M.languages.CompletionItemKind.Keyword,insertText:Oe,insertTextRules:M.languages.CompletionItemInsertTextRule.InsertAsSnippet,range:Te}));return pe.map(Oe=>{ke.push(B(ae({},Oe),{range:Te}))}),ke}var $=M=>{X.languages.map(pe=>(M.languages.registerDocumentFormattingEditProvider(pe,{provideDocumentFormattingEdits(De,Te,ke){return U(this,null,function*(){const Oe=o()(De.getValue(),{indent_size:"2",indent_char:" ",max_preserve_newlines:"2",preserve_newlines:!0,keep_array_indentation:!0,break_chained_methods:!1,indent_scripts:"normal",brace_style:"collapse",space_before_conditional:!0,unescape_strings:!1,jslint_happy:!1,end_with_newline:!0,wrap_line_length:"0",indent_inner_html:!1,comma_first:!1,e4x:!1,indent_empty_lines:!1});return[{range:De.getFullModelRange(),text:Oe}]})}}),pe));const ce=A.quickKey.map(pe=>({label:pe.label,kind:M.languages.CompletionItemKind.Method,insertText:pe.content,insertTextRules:M.languages.CompletionItemInsertTextRule.InsertAsSnippet})),q=p.quickKey.map(pe=>({label:pe.label,kind:M.languages.CompletionItemKind.Method,insertText:pe.content,insertTextRules:M.languages.CompletionItemInsertTextRule.InsertAsSnippet})),le=_e.quickKey.map(pe=>({label:pe.label,kind:M.languages.CompletionItemKind.Method,insertText:pe.content,insertTextRules:M.languages.CompletionItemInsertTextRule.InsertAsSnippet}));M.languages.registerCompletionItemProvider("cpp",{provideCompletionItems:function(pe,De){var Te=pe.getWordUntilPosition(De),ke={startLineNumber:De.lineNumber,endLineNumber:De.lineNumber,startColumn:Te.startColumn,endColumn:Te.endColumn},Oe=pe.getLineContent(De.lineNumber).substring(Te.startColumn-2,Te.endColumn);return{suggestions:[...A.keywords.map(Ne=>({label:Ne,kind:M.languages.CompletionItemKind.Function,documentation:Ne,insertText:Ne,insertTextRules:M.languages.CompletionItemInsertTextRule.InsertAsSnippet,range:ke})),...A.quickKey.map(Ne=>({label:Ne.label,kind:M.languages.CompletionItemKind.Function,documentation:Ne.content,insertText:Oe.startsWith("#")?Ne.content.replace(/#/,""):Ne.content,insertTextRules:M.languages.CompletionItemInsertTextRule.InsertAsSnippet,range:ke}))]}}}),M.languages.registerCompletionItemProvider("c",{provideCompletionItems:function(pe,De){var Te=pe.getWordUntilPosition(De),ke={startLineNumber:De.lineNumber,endLineNumber:De.lineNumber,startColumn:Te.startColumn,endColumn:Te.endColumn};return{suggestions:[...ge.keywords.map(Oe=>({label:Oe,kind:M.languages.CompletionItemKind.Function,documentation:Oe,insertText:Oe,insertTextRules:M.languages.CompletionItemInsertTextRule.InsertAsSnippet,range:ke}))]}}}),M.languages.registerCompletionItemProvider("java",{provideCompletionItems:function(pe,De){var Te=pe.getWordUntilPosition(De),ke={startLineNumber:De.lineNumber,endLineNumber:De.lineNumber,startColumn:Te.startColumn,endColumn:Te.endColumn},Oe=pe.getLineContent(De.lineNumber).substring(Te.startColumn-2,Te.endColumn);return{suggestions:[..._e.keywords.map(Ne=>({label:Ne,kind:M.languages.CompletionItemKind.Function,documentation:Ne,insertText:Ne,insertTextRules:M.languages.CompletionItemInsertTextRule.InsertAsSnippet,range:ke})),..._e.quickKey.map(Ne=>({label:Ne.label,kind:M.languages.CompletionItemKind.Function,documentation:Ne.content,insertText:Oe.startsWith("#")?Ne.content.replace(/#/,""):Ne.content,insertTextRules:M.languages.CompletionItemInsertTextRule.InsertAsSnippet,range:ke}))]}}}),M.languages.registerCompletionItemProvider("scala",{provideCompletionItems:function(pe,De){var Te=pe.getWordUntilPosition(De),ke={startLineNumber:De.lineNumber,endLineNumber:De.lineNumber,startColumn:Te.startColumn,endColumn:Te.endColumn},Oe=pe.getLineContent(De.lineNumber).substring(Te.startColumn-2,Te.endColumn);return{suggestions:[...be.keywords.map(Ne=>({label:Ne,kind:M.languages.CompletionItemKind.Function,documentation:Ne,insertText:Ne,insertTextRules:M.languages.CompletionItemInsertTextRule.InsertAsSnippet,range:ke})),...be.quickKey.map(Ne=>({label:Ne.label,kind:M.languages.CompletionItemKind.Function,documentation:Ne.content,insertText:Oe.startsWith("#")?Ne.content.replace(/#/,""):Ne.content,insertTextRules:M.languages.CompletionItemInsertTextRule.InsertAsSnippet,range:ke}))]}}}),M.languages.registerCompletionItemProvider("python",{provideCompletionItems:function(pe,De){var Te=pe.getWordUntilPosition(De),ke={startLineNumber:De.lineNumber,endLineNumber:De.lineNumber,startColumn:Te.startColumn,endColumn:Te.endColumn},Oe=pe.getLineContent(De.lineNumber).substring(Te.startColumn-2,Te.endColumn);return{suggestions:[...p.keywords.map(Ne=>({label:Ne,kind:M.languages.CompletionItemKind.Function,documentation:Ne,insertText:Ne,insertTextRules:M.languages.CompletionItemInsertTextRule.InsertAsSnippet,range:ke})),...p.quickKey.map(Ne=>({label:Ne.label,kind:M.languages.CompletionItemKind.Function,documentation:Ne.content,insertText:Oe.startsWith("#")?Ne.content.replace(/#/,""):Ne.content,insertTextRules:M.languages.CompletionItemInsertTextRule.InsertAsSnippet,range:ke}))]}}})};const ve="\u8BE5\u4EFB\u52A1\u5173\u5361\u8BBE\u7F6E\u4E86\u7981\u6B62\u590D\u5236\u7C98\u8D34\uFF0C\u8BF7\u624B\u52A8\u8F93\u5165\u4EE3\u7801\u3002";var Se=Object.defineProperty,Le=(M,ce,q)=>ce in M?Se(M,ce,{enumerable:!0,configurable:!0,writable:!0,value:q}):M[ce]=q,ye=(M,ce,q)=>Le(M,typeof ce!="symbol"?ce+"":ce,q);const te=class Yl{constructor(ce,q,le){this.placeholder=ce,this.editor=q,this.monaco=le,q.onDidChangeModelContent(()=>this.onDidChangeModelContent()),this.onDidChangeModelContent()}onDidChangeModelContent(){this.editor.getValue()===""?this.editor.addContentWidget(this):this.editor.removeContentWidget(this)}getId(){return Yl.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)}};ye(te,"ID","editor.widget.placeholderHint");var ue=te,R=m(96236),ee=m(8591),G=m(6848),y=m(89392),E=m(34604),Y=m(56102),me=Object.defineProperty,$e=Object.defineProperties,We=Object.getOwnPropertyDescriptors,qe=Object.getOwnPropertySymbols,Xe=Object.prototype.hasOwnProperty,gt=Object.prototype.propertyIsEnumerable,_t=(M,ce,q)=>ce in M?me(M,ce,{enumerable:!0,configurable:!0,writable:!0,value:q}):M[ce]=q,st=(M,ce)=>{for(var q in ce||(ce={}))Xe.call(ce,q)&&_t(M,q,ce[q]);if(qe)for(var q of qe(ce))gt.call(ce,q)&&_t(M,q,ce[q]);return M},Kt=(M,ce)=>$e(M,We(ce)),un=(M,ce)=>{var q={};for(var le in M)Xe.call(M,le)&&ce.indexOf(le)<0&&(q[le]=M[le]);if(M!=null&&qe)for(var le of qe(M))ce.indexOf(le)<0&&gt.call(M,le)&&(q[le]=M[le]);return q},Ot=(M,ce,q)=>new Promise((le,pe)=>{var De=Oe=>{try{ke(q.next(Oe))}catch(Ne){pe(Ne)}},Te=Oe=>{try{ke(q.throw(Oe))}catch(Ne){pe(Ne)}},ke=Oe=>Oe.done?le(Oe.value):Promise.resolve(Oe.value).then(De,Te);ke((q=q.apply(M,ce)).next())});function Vt(M){return/^\d+$/.test(M)?`${M}px`:M}function lt(){}let At=!1;const ne={"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 de(M=[]){let ce=M;if(Array.isArray(M)){for(let q=0;q<M.length;q++){let le=ne[M[q]];if(le)return le}return ce[0]}return ne[ce]||ce}let se=null;var W=M=>{var ce=M,{width:q="100%",height:le="100%",value:pe,language:De="javascript",style:Te={},options:ke={},overrideServices:Oe={},theme:Ne="vs-dark",onEditBlur:nt,isCopy:Qe=!1,onSave:Ze,autoHeight:pt=!1,forbidCopy:vt=!1,onChange:ct=lt,editorDidMount:Dt=lt,onFocus:Ut=lt,onBreakPoint:w=lt,breakPointValue:I=[],filename:dt="educoder.txt",errorLine:oe,errorContent:Pe="",highlightLine:vn,openBreakPoint:je=!1,placeholder:He="",showMiniMap:tt=!0}=ce,he=un(ce,["width","height","value","language","style","options","overrideServices","theme","onEditBlur","isCopy","onSave","autoHeight","forbidCopy","onChange","editorDidMount","onFocus","onBreakPoint","breakPointValue","filename","errorLine","errorContent","highlightLine","openBreakPoint","placeholder","showMiniMap"]);const ie=(0,L.useRef)(),xe=(0,L.useRef)({}),Fe=(0,L.useRef)(),V=(0,L.useRef)(),at=(0,L.useRef)([]),Ce=(0,L.useRef)(!1),It=(0,L.useRef)(),Bt=(0,L.useRef)(),an=(0,L.useRef)(!1),[en,Mt]=(0,L.useState)(!1);function tn(){let Lt;return ie.current&&(Lt=new Q.Z(Ft=>{for(let $t of Ft)($t.target.offsetHeight>0||$t.target.offsetWidth>0)&&xe.current.instance.layout()}),Lt.observe(ie.current)),Lt}function Ue(){ee.ZP.warning({content:decodeURIComponent(ve),key:"monaco-editor-tip"})}const bt=()=>{let Lt=xe.current.instance;if(pe!=null&&Lt&&en){const Ft=Lt.getModel();Ft&&pe!==Ft.getValue()&&(At=!0,Ft.setValue(pe),Lt.layout(),At=!1)}};(0,L.useEffect)(()=>{const Lt=E.Z.subscribe("formatDocument",Ft=>{var $t;let Xt=xe.current.instance;($t=Xt==null?void 0:Xt.getAction)==null||$t.call(Xt,"editor.action.formatDocument").run()});return window.updateMonacoValue=Ft=>{ct(Ft)},Lt},[]),(0,L.useEffect)(()=>{var Lt;let Ft=xe.current.instance;V.current&&clearTimeout(V.current),V.current=setTimeout(()=>{bt()},500),pe&&(pe!=null&&pe.length)&&((Lt=Ft==null?void 0:Ft.updateOptions)==null||Lt.call(Ft,{lineNumbersMinChars:Math.max(Math.floor(Math.log10(pe.split(/\r\n|\r|\n/g).length))+3,5)}))},[pe,en,xe.current]),(0,L.useEffect)(()=>{if(oe&&xe.current&&xe.current.instance){let Ft=xe.current.instance;Ft.changeViewZones(function($t){var Xt=document.createElement("div");Xt.style.padding="10px 20px",Xt.style.width="calc(100% - 20px)",Xt.className="my-error-line-wrp",Xt.innerHTML=Pe,$t.addZone({afterLineNumber:oe||11,heightInLines:3,domNode:Xt})});var Lt={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}};Ft.addOverlayWidget(Lt),Ft.revealPositionInCenter({lineNumber:20,column:1})}},[oe,xe.current,en]);const wt=(Lt="",Ft)=>{if(!Lt||Lt.trim()==="")return!0;const Xt=xe.current.instance.getModel().getLineTokens(Ft);let Wt=!1;for(let Dn=0;Dn<2;Dn++)Xt.getStandardTokenType(Dn)===1&&(Wt=!0);return Wt};(0,L.useEffect)(()=>{var Lt;const Ft=(Lt=xe.current)==null?void 0:Lt.instance;if(Ft&&en&&vt){const $t=Ft.onDidBlurEditorWidget(()=>{an.current=!1}),Xt=Ft.onDidFocusEditorText(()=>{an.current=!0});return()=>{$t.dispose(),Xt.dispose()}}},[xe.current,en,vt]),(0,L.useEffect)(()=>{var Lt;if((Lt=xe.current)!=null&&Lt.instance&&en&&je){let Ft=xe.current.instance,$t=Ft.getModel();if(!$t)return;(()=>{var Et;let Qt=[],nn=[];const on=$t.getAllDecorations();for(let wn of on)wn.options.className==="highlighted-line"&&(Qt.push((Et=wn==null?void 0:wn.range)==null?void 0:Et.startLineNumber),nn.push(wn==null?void 0:wn.id));if(vn===Qt[0])return;$t.deltaDecorations(nn,[]);const In=$t.getLineCount();vn&&vn<=In&&(Ft.deltaDecorations([],[{range:new se.Range(vn,1,vn,$t.getLineMaxColumn(vn)),options:{isWholeLine:!0,className:"highlighted-line"}}]),Ft.revealLineInCenter(vn))})();const Wt=(Et=!1)=>{var Qt;let nn=[],on=[];const In=$t.getAllDecorations();for(let wn of In)wn.options.linesDecorationsClassName==="breakpoints-select"&&(nn.push((Qt=wn==null?void 0:wn.range)==null?void 0:Qt.startLineNumber),on.push(wn==null?void 0:wn.id));if(Et)return{lines:nn,ids:on};w(nn)},Dn=Et=>Ot(void 0,null,function*(){let Qt={range:new se.Range(Et,1,Et,1),options:{isWholeLine:!1,linesDecorationsClassName:"breakpoints-select"}};yield $t.deltaDecorations([],[Qt]),Wt()}),pn=Et=>Ot(void 0,null,function*(){let Qt=[];const nn=Ft.getLineDecorations(Et);for(let on of nn)on.options.linesDecorationsClassName==="breakpoints-select"&&Qt.push(on.id);yield $t.deltaDecorations(Qt,[]),Wt()}),Gt=Et=>{let Qt=Ft.getLineDecorations(Et);for(let nn of Qt)if(nn.options.linesDecorationsClassName==="breakpoints-select")return!0;return!1};if(!(0,y.isEqual)(I,Wt(!0).lines)){$t.deltaDecorations(Wt(!0).ids,[]);const Et=I.map(Qt=>({range:new se.Range(Qt,1,Qt,1),options:{isWholeLine:!1,linesDecorationsClassName:"breakpoints-select"}}));$t.deltaDecorations([],Et)}const Je=Ft.onDidChangeModelContent(Et=>{let Qt=Ft.getPosition();if(Qt){let nn=Qt.lineNumber;clearTimeout(Bt.current),Bt.current=setTimeout(()=>{wt($t.getLineContent(nn),nn)?pn(nn):Gt(nn)?(pn(nn),Dn(nn)):Wt()},100)}}),rt=Ft.onMouseDown(Et=>{var Qt,nn,on;if(Et.target.detail&&((on=(nn=(Qt=Et.target)==null?void 0:Qt.element)==null?void 0:nn.className)!=null&&on.includes("line-numbers"))){let In=Et.target.position.lineNumber;if(wt($t.getLineContent(In),In))return;Gt(In)?pn(In):Dn(In)}}),ht=Et=>{let Qt={range:new se.Range(Et,1,Et,1),options:{isWholeLine:!1,linesDecorationsClassName:"breakpoints-fake"}};at.current=Ft.deltaDecorations(at.current,[Qt])},xt=()=>{at.current=Ft.deltaDecorations(at.current,[])},mt=Ft.onMouseMove(Et=>{var Qt,nn,on;if(xt(),Et.target.detail&&((on=(nn=(Qt=Et.target)==null?void 0:Qt.element)==null?void 0:nn.className)!=null&&on.includes("line-numbers"))){let In=Et.target.position.lineNumber;if(wt($t.getLineContent(In),In))return;ht(In)}}),jt=Ft.onMouseLeave(()=>{xt()});return()=>{Je.dispose(),rt.dispose(),mt.dispose(),jt.dispose()}}},[xe.current,en,I,vn,je,De]),(0,L.useEffect)(()=>{var Lt;(Lt=xe.current)!=null&&Lt.instance&&je&&xe.current.instance.setPosition({lineNumber:0,column:0})},[vn]);function Me(){let Lt=xe.current.instance;if(Lt){const Ft=Lt.getSelection(),$t=xe.current.pastePos||{},Xt=new se.Range($t.startLineNumber||Ft.endLineNumber,$t.startColumn||Ft.endColumn,$t.endLineNumber||Ft.endLineNumber,$t.endColumn||Ft.endColumn);setTimeout(()=>{Lt.executeEdits("",[{range:Xt,text:""}])},300)}}function Ae(Lt){(window.navigator.platform.match("Mac")?Lt.metaKey:Lt.ctrlKey)&&Lt.keyCode==83&&(Lt.preventDefault(),Ze())}const ut=()=>{if(pt&&xe.current.instance){const Lt=xe.current.instance.getContentHeight();_n(Lt<le?le:Lt)}else _n(le)};function ft(Lt){var Ft=document.createEvent("MouseEvents");Ft.initMouseEvent("click",!0,!1,window,0,0,0,0,0,!1,!1,!1,!1,0,null),Lt.dispatchEvent(Ft)}const Nt=Lt=>{if(!an.current)return;const{keyCode:Ft,ctrlKey:$t,metaKey:Xt,target:Wt,type:Dn}=Lt;return(Dn==="paste"||(Ft===67||Ft===86)&&(Xt||$t))&&Wt.nodeName==="TEXTAREA"&&(Ue(),Lt.preventDefault()),!1};function Pt(Lt,Ft){var $t=window.URL||window.webkitURL||window,Xt=new Blob([Ft]),Wt=document.createElementNS("http://www.w3.org/1999/xhtml","a");Wt.href=$t.createObjectURL(Xt),Wt.download=Lt,ft(Wt)}(0,L.useEffect)(()=>{ut()},[ut]),(0,L.useEffect)(()=>{ie.current&&!en&&Promise.all([m.e(8909),m.e(3267)]).then(m.bind(m,71448)).then(Lt=>{try{se=Lt,xe.current.instance=se.editor.create(ie.current,{value:pe,language:de(De),theme:Ne,requireConfig:{"vs/nls":{availableLanguages:{"*":"zh-cn"}}},wordWrap:!0,autoIndent:!0,contextmenu:!0,formatOnType:!0,minimap:{enabled:tt||!1}},Oe);const Ft=xe.current.instance;let Wt=[...R.BH._menuItems].find(Je=>Je[0]._debugName=="EditorContext")[1],Dn=["editor.action.clipboardCopyWithSyntaxHighlightingAction","editor.action.quickCommand","editor.action.clipboardCopyAction","editor.action.clipboardPasteAction","editor.action.clipboardCutAction"],pn=(Je,rt)=>{var ht,xt;let mt=Je._first;do rt.includes((xt=(ht=mt.element)==null?void 0:ht.command)==null?void 0:xt.id)&&Je._remove(mt);while(mt=mt.next)};if(Dt(Ft,se),setTimeout(()=>{ut(),xe.current.instance.addAction({id:"d123123",label:"Download File",contextMenuGroupId:"9_cutcopypaste",run:()=>{Pt(dt||"educoder.txt",Ft.getValue())}})},500),xe.current.subscription=Ft.onDidChangeModelContent(Je=>{Ce.current?clearTimeout(It.current):(ut(),ct(Ft.getValue(),Je)),It.current=setTimeout(()=>{Ce.current=!1},500)}),window.Monaco||$(se,de(De)),vt&&(pn(Wt,Dn),ie.current.classList.add("noCopyPaste"),window.removeEventListener("keydown",Nt),window.removeEventListener("paste",Nt),window.addEventListener("keydown",Nt),window.addEventListener("paste",Nt)),window.Monaco=se,nt&&Ft.onDidBlurEditorWidget(()=>{nt(Ft.getValue())}),Ut&&Ft.onDidFocusEditorText(()=>{Ut(Ft.getValue())}),vt)try{Ft.onDidPaste(Je=>{const rt=Ft.getSelection(),ht=xe.current.pastePos||{},xt=new se.Range(ht.startLineNumber||rt.endLineNumber,ht.startColumn||rt.endColumn,ht.endLineNumber||rt.endLineNumber,ht.endColumn||rt.endColumn);Ft.executeEdits("",[{range:Je.range,text:""}])})}catch(Je){}let Gt=tn();return He&&typeof He=="string"&&new ue(He,Ft,se),Mt(!0),()=>{const Je=xe.current.instance;Je.dispose();const rt=Je.getModel();rt&&rt.dispose(),xe.current.subscription&&xe.current.subscription.dispose(),Gt.unobserve(ie.current)}}catch(Ft){}})},[]),(0,L.useEffect)(()=>{if(xe.current.instance&&en)return document.addEventListener("keydown",Ae,!1),()=>{document.removeEventListener("keydown",Ae)}},[Ze,en]),(0,L.useEffect)(()=>{let Lt=xe.current.instance;if(Lt&&en){let Ft=de(De);se.editor.setModelLanguage(Lt.getModel(),Ft)}},[De,en]),(0,L.useEffect)(()=>{xe.current.instance&&en&&se.editor.setTheme(Ne)},[Ne,en]),(0,L.useEffect)(()=>{let Lt=xe.current.instance;Fe.current=ke,Lt&&en&&(Lt.updateOptions(st({},ke)),setTimeout(()=>{Lt.getModel().updateOptions(st({},ke))},200))},[JSON.stringify(ke),en]),(0,L.useEffect)(()=>{let Lt=xe.current.instance;Lt&&en&&Lt.layout()},[q,le,en]);const[Zt,Ht]=(0,L.useState)(Vt(q)),[sn,_n]=(0,L.useState)(Vt(le)),hn=Kt(st({},Te),{width:Zt,height:sn,position:"relative"});return L.createElement("div",{className:"my-monaco-editor",ref:ie,style:hn},Qe&&L.createElement(Y.CopyToClipboard,{text:pe,onCopy:()=>ee.ZP.success("\u590D\u5236\u6210\u529F")},L.createElement(G.Z,{title:"\u590D\u5236\u4EE3\u7801"},L.createElement("div",{style:{position:"absolute",top:0,right:10,cursor:"pointer",zIndex:10,color:"#165DFF"}},L.createElement("i",{className:"iconfont icon-fuzhi8",style:{fontSize:14}})," \u590D\u5236\u4EE3\u7801"))))};function Ie({width:M="100%",height:ce="100%",original:q,modified:le,language:pe,options:De={}}){const Te=(0,L.useRef)(),[ke,Oe]=(0,L.useState)(null);function Ne(pt){let vt;return Te.current&&(vt=new Q.Z(ct=>{for(let Dt of ct)(Dt.target.offsetHeight>0||Dt.target.offsetWidth>0)&&pt.layout()}),vt.observe(Te.current)),vt}(0,L.useEffect)(()=>(Te.current&&Promise.all([m.e(8909),m.e(9404)]).then(m.bind(m,2550)).then(pt=>{se=pt;const vt=se.editor.createDiffEditor(Te.current,Kt(st({enableSplitViewResizing:!1,scrollBeyondLastLine:!1,roundedSelection:!1,renderIndicators:!1,useShadows:!1,horizontal:"hidden",lineNumbers:"off",wordWrap:"off",ignoreTrimWhitespace:!1,"semanticHighlighting.enabled":!0,followsCaret:!0,ignoreCharChanges:!0,minimap:{enabled:!1},readOnly:!0},De),{wordWrap:!0}));Oe(vt);let ct=Ne(vt);return()=>{vt.dispose();const Dt=vt.getModel();Dt&&Dt.dispose(),ct.unobserve(Te.current)}}),()=>{window.removeEventListener("keydown",checkPaste),window.removeEventListener("paste",checkPaste)}),[]),(0,L.useEffect)(()=>{ke&&ke.setModel({original:se.editor.createModel(q,pe),modified:se.editor.createModel(le,pe)})},[q,le,pe,ke]);const nt=Vt(M),Qe=Vt(ce),Ze={width:nt,height:Qe};return L.createElement("div",{className:"my-diff-editor",ref:Te,style:Ze})}},98537:function(ln,et,m){"use strict";m.r(et),m.d(et,{default:function(){return De}});var L=m(59301),Q=m(89070),ge=m(66104),_e=m(95237),A=m(43604),p=m(6848),be=m(85149),fe=m(24065),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"},k=m(92832),N=m(17574),v=m(78241),x=m(43418),S=m(8591),T=m(60324),z=m(98228),ae=m(99064),B=Object.defineProperty,U=Object.getOwnPropertySymbols,X=Object.prototype.hasOwnProperty,Z=Object.prototype.propertyIsEnumerable,D=(Te,ke,Oe)=>ke in Te?B(Te,ke,{enumerable:!0,configurable:!0,writable:!0,value:Oe}):Te[ke]=Oe,C=(Te,ke)=>{for(var Oe in ke||(ke={}))X.call(ke,Oe)&&D(Te,Oe,ke[Oe]);if(U)for(var Oe of U(ke))Z.call(ke,Oe)&&D(Te,Oe,ke[Oe]);return Te},K=(Te,ke,Oe)=>new Promise((Ne,nt)=>{var Qe=vt=>{try{pt(Oe.next(vt))}catch(ct){nt(ct)}},Ze=vt=>{try{pt(Oe.throw(vt))}catch(ct){nt(ct)}},pt=vt=>vt.done?Ne(vt.value):Promise.resolve(vt.value).then(Qe,Ze);pt((Oe=Oe.apply(Te,ke)).next())});const{TreeNode:$}=z.default,ve=({restful:Te,loading:ke,dispatch:Oe})=>{const Ne=(0,Q.useParams)(),nt=(0,Q.useLocation)(),[Qe,Ze]=(0,L.useState)(!1),[pt,vt]=(0,L.useState)(),{actionTabs:ct}=Te,[Dt]=v.default.useForm();return(0,L.useEffect)(()=>{Te.actionTabs.key=="\u65B0\u5EFA\u540C\u7EA7\u76EE\u5F55"&&Dt.resetFields()},[Te.actionTabs.key]),Te.actionTabs.key!=="\u65B0\u5EFA\u540C\u7EA7\u76EE\u5F55"?null:L.createElement(x.default,{centered:!0,title:"\u65B0\u5EFA\u76EE\u5F55",open:Te.actionTabs.key==="\u65B0\u5EFA\u540C\u7EA7\u76EE\u5F55",okText:"\u786E\u5B9A",cancelText:"\u53D6\u6D88",bodyStyle:{minHeight:150},confirmLoading:Qe,onOk:()=>K(void 0,null,function*(){yield Dt.validateFields();const Ut=Dt.getFieldValue();Ze(!0),(yield(0,ae.ZP)("/api/restfuls.json",{method:"post",body:C({file_type:1},Ut)})).status===0&&(S.ZP.success("\u6DFB\u52A0\u6210\u529F"),Oe({type:"restful/setActionTabs",payload:{}}),Oe({type:"restful/getRestful"})),Ze(!1)}),onCancel:()=>{Oe({type:"restful/setActionTabs",payload:{}})}},L.createElement("div",{className:"pl30 pr30"},L.createElement(v.default,{form:Dt,initialValues:{name:""}},L.createElement(v.default.Item,{name:"name",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u76EE\u5F55\u540D\u79F0"}]},L.createElement(_e.Z,{className:"mt30"},L.createElement(A.Z,{flex:"80px",className:"font14"},"\u76EE\u5F55\u540D\u79F0\uFF1A"),L.createElement(A.Z,{flex:"1"},L.createElement(k.default,{placeholder:`\u8BF7\u8F93\u5165\u540D\u79F0\uFF0C\u6700\u5927\u9650\u523660\u4E2A\u5B57\u7B26
`,maxLength:60})))))))};var Se=(0,Q.connect)(({restful:Te,loading:ke})=>({restful:Te,loading:ke}))(ve),Le=Object.defineProperty,ye=Object.getOwnPropertySymbols,te=Object.prototype.hasOwnProperty,j=Object.prototype.propertyIsEnumerable,ue=(Te,ke,Oe)=>ke in Te?Le(Te,ke,{enumerable:!0,configurable:!0,writable:!0,value:Oe}):Te[ke]=Oe,R=(Te,ke)=>{for(var Oe in ke||(ke={}))te.call(ke,Oe)&&ue(Te,Oe,ke[Oe]);if(ye)for(var Oe of ye(ke))j.call(ke,Oe)&&ue(Te,Oe,ke[Oe]);return Te},ee=(Te,ke,Oe)=>new Promise((Ne,nt)=>{var Qe=vt=>{try{pt(Oe.next(vt))}catch(ct){nt(ct)}},Ze=vt=>{try{pt(Oe.throw(vt))}catch(ct){nt(ct)}},pt=vt=>vt.done?Ne(vt.value):Promise.resolve(vt.value).then(Qe,Ze);pt((Oe=Oe.apply(Te,ke)).next())});const{TreeNode:G}=z.default,y=({restful:Te,loading:ke,dispatch:Oe})=>{const Ne=(0,Q.useParams)(),nt=(0,Q.useLocation)(),[Qe,Ze]=(0,L.useState)(!1),[pt,vt]=(0,L.useState)(),{actionTabs:ct}=Te,[Dt]=v.default.useForm();return(0,L.useEffect)(()=>{Te.actionTabs.key=="\u91CD\u547D\u540D"&&(Dt.resetFields(),Dt.setFieldsValue({name:Te.actionTabs.data.title}))},[Te.actionTabs.key]),Te.actionTabs.key!=="\u91CD\u547D\u540D"?null:L.createElement(x.default,{centered:!0,title:"\u91CD\u547D\u540D",open:Te.actionTabs.key==="\u91CD\u547D\u540D",okText:"\u786E\u5B9A",cancelText:"\u53D6\u6D88",bodyStyle:{minHeight:150},confirmLoading:Qe,onOk:()=>ee(void 0,null,function*(){yield Dt.validateFields();const Ut=Dt.getFieldValue();Ze(!0);let w=`/api/restfuls/${Te.actionTabs.data.id}.json`;(yield(0,ae.ZP)(w,{method:"put",body:R({file_type:1},Ut)})).status===0&&(S.ZP.success("\u4FEE\u6539\u6210\u529F"),Oe({type:"restful/setActionTabs",payload:{}}),Oe({type:"restful/getRestful"})),Ze(!1)}),onCancel:()=>{Oe({type:"restful/setActionTabs",payload:{}})}},L.createElement("div",{className:"pl30 pr30"},L.createElement(v.default,{form:Dt,initialValues:{name:""}},L.createElement(_e.Z,{className:"mt30"},L.createElement(A.Z,{flex:"80px",className:"font14"},"\u76EE\u5F55\u540D\u79F0\uFF1A"),L.createElement(A.Z,{flex:"1"},L.createElement(v.default.Item,{name:"name",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u65B0\u540D\u79F0"}]},L.createElement(k.default,{placeholder:`\u8BF7\u8F93\u5165\u540D\u79F0\uFF0C\u6700\u5927\u9650\u523660\u4E2A\u5B57\u7B26
`,maxLength:60})))))))};var E=(0,Q.connect)(({restful:Te,loading:ke})=>({restful:Te,loading:ke}))(y),Y=m(52403),me={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"},$e=Object.defineProperty,We=Object.defineProperties,qe=Object.getOwnPropertyDescriptors,Xe=Object.getOwnPropertySymbols,gt=Object.prototype.hasOwnProperty,_t=Object.prototype.propertyIsEnumerable,st=(Te,ke,Oe)=>ke in Te?$e(Te,ke,{enumerable:!0,configurable:!0,writable:!0,value:Oe}):Te[ke]=Oe,Kt=(Te,ke)=>{for(var Oe in ke||(ke={}))gt.call(ke,Oe)&&st(Te,Oe,ke[Oe]);if(Xe)for(var Oe of Xe(ke))_t.call(ke,Oe)&&st(Te,Oe,ke[Oe]);return Te},un=(Te,ke)=>We(Te,qe(ke)),Ot=(Te,ke,Oe)=>new Promise((Ne,nt)=>{var Qe=vt=>{try{pt(Oe.next(vt))}catch(ct){nt(ct)}},Ze=vt=>{try{pt(Oe.throw(vt))}catch(ct){nt(ct)}},pt=vt=>vt.done?Ne(vt.value):Promise.resolve(vt.value).then(Qe,Ze);pt((Oe=Oe.apply(Te,ke)).next())});const{Search:Vt}=k.default,{DirectoryTree:lt}=N.default,At=({user:Te,globalSetting:ke,loading:Oe,dispatch:Ne,restful:nt})=>{const Qe=(0,Q.useParams)(),[Ze,pt]=(0,L.useState)(!0),[vt]=v.default.useForm(),[ct,Dt]=(0,L.useState)(""),[Ut]=(0,L.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"}]),[w,I]=(0,L.useState)([]),[dt,oe]=(0,L.useState)([]),[Pe,vn]=(0,L.useState)(!1),[je,He]=(0,L.useState)([]);(0,L.useEffect)(()=>{var at,Ce,It,Bt;if((at=nt.restful)!=null&&at.data){He([...(Ce=nt.restful)==null?void 0:Ce.data]);let an=0,en;if((Bt=(It=nt.restful)==null?void 0:It.data)==null||Bt.map(Mt=>{var tn;Mt.id==Qe.id&&(an=Mt.id),Mt.file_type==0&&!en&&(en=Mt.id),(tn=Mt==null?void 0:Mt.children)==null||tn.map(Ue=>{en||(en=Ue.id),Ue.id==Qe.id&&(an=Mt.id)}),!Mt.children&&!en&&(en=Mt.id)}),!Qe.id&&en){Q.history.push(`/ch/rest/${en}`);return}an&&setTimeout(()=>{I([an]),oe([Number(Qe.id||en)])},200)}},[nt.restful]);const tt=(at,Ce)=>{Ce.node.file_type===0?Q.history.push(`/ch/rest/${at[0]}`):oe([...at]),console.log("Trigger Select",at,Ce)},he=at=>{I(at),console.log("Trigger Expand",at)},ie=at=>L.createElement("div",null,Ut.map((Ce,It)=>L.createElement("p",{key:Ce.id,className:"current",onClick:()=>{switch(Ce.id){case 1:Q.history.push(`/ch/rest/edit/${at.id}/0`);break;case 2:case 3:Ne({type:"restful/setActionTabs",payload:{key:Ce.name,data:at}});break;case 4:document.location.href=`/ch/rest/edit/${at.pid||0}/${at.id}`;break;case 5:x.default.confirm({title:"\u63D0\u793A",content:"\u662F\u5426\u786E\u5B9A\u5220\u9664\uFF1F",onOk:()=>Ot(void 0,null,function*(){const Bt=yield(0,Y.E1)({id:at.id});(Bt==null?void 0:Bt.status)==0&&(S.ZP.success("\u5220\u9664\u6210\u529F"),Ne({type:"restful/getRestful"}))})});break}}},Ce.name)).filter(Ce=>!!Ce).filter(Ce=>at.pid||at.file_type==0?Ce.key>3:Ce.key!=4)),xe=at=>at.map(Ce=>{var It;const Bt=Ce.title.indexOf(ct),an=Ce.title.substr(0,Bt),en=Ce.title.substr(Bt+ct.length),Mt=L.createElement("span",null,an,L.createElement("span",{className:"c-blue"},ct),en,(0,fe.ag)()&&L.createElement(T.Z,{placement:"right",title:ct,content:()=>ie(Ce),trigger:"hover"},L.createElement("span",{className:`iconfont icon-sandian ${me.actions}`})));return ct!==""&&Bt===-1&&!((It=Ce.children)!=null&&It.length)?null:Ce.children&&Ce.file_type===1?un(Kt({},Ce),{title:Mt,key:Ce.key,children:xe(Ce.children)}):un(Kt({},Ce),{title:Mt,key:Ce.key,isLeaf:!0})}).filter(Ce=>!!Ce),Fe=(at,Ce)=>{let It;for(let Bt=0;Bt<Ce.length;Bt++){const an=Ce[Bt];an.children&&(an.children.some(en=>en.key===at)?It=an.key:Fe(at,an.children)&&(It=Fe(at,an.children)))}return It},V=at=>{const{value:Ce}=at.target,It=je.map(Bt=>{var an;return Bt!=null&&Bt.children&&(an=Bt==null?void 0:Bt.children.filter(en=>en.title.indexOf(Ce)>-1))!=null&&an.length?Bt.id:null});Dt(Ce),vn(!0),console.log("expandedKeys:",It),I(It)};return console.log("loop(treeData):",xe(je)),L.createElement("div",{className:me.tree},L.createElement(Vt,{style:{marginBottom:8},placeholder:"\u8F93\u5165\u5173\u952E\u5B57\u68C0\u7D22",onChange:V}),L.createElement(lt,{multiple:!0,defaultExpandAll:!0,onSelect:tt,onExpand:he,expandedKeys:w,selectedKeys:dt,autoExpandParent:Pe,treeData:xe(je)}),L.createElement(Se,null),L.createElement(E,null))};var ne=(0,Q.connect)(({user:Te,loading:ke,globalSetting:Oe,restful:Ne})=>({user:Te,globalSetting:Oe,restful:Ne,loading:ke.models.index}))(At),de=Object.defineProperty,se=Object.getOwnPropertySymbols,W=Object.prototype.hasOwnProperty,Ie=Object.prototype.propertyIsEnumerable,M=(Te,ke,Oe)=>ke in Te?de(Te,ke,{enumerable:!0,configurable:!0,writable:!0,value:Oe}):Te[ke]=Oe,ce=(Te,ke)=>{for(var Oe in ke||(ke={}))W.call(ke,Oe)&&M(Te,Oe,ke[Oe]);if(se)for(var Oe of se(ke))Ie.call(ke,Oe)&&M(Te,Oe,ke[Oe]);return Te},q=(Te,ke)=>{var Oe={};for(var Ne in Te)W.call(Te,Ne)&&ke.indexOf(Ne)<0&&(Oe[Ne]=Te[Ne]);if(Te!=null&&se)for(var Ne of se(Te))ke.indexOf(Ne)<0&&Ie.call(Te,Ne)&&(Oe[Ne]=Te[Ne]);return Oe},le=(Te,ke,Oe)=>new Promise((Ne,nt)=>{var Qe=vt=>{try{pt(Oe.next(vt))}catch(ct){nt(ct)}},Ze=vt=>{try{pt(Oe.throw(vt))}catch(ct){nt(ct)}},pt=vt=>vt.done?Ne(vt.value):Promise.resolve(vt.value).then(Qe,Ze);pt((Oe=Oe.apply(Te,ke)).next())});const pe=Te=>{var ke=Te,{user:Oe,globalSetting:Ne,loading:nt,dispatch:Qe,restful:Ze}=ke,pt=q(ke,["user","globalSetting","loading","dispatch","restful"]),vt,ct;const Dt=(0,Q.useParams)(),[Ut,w]=(0,L.useState)(!0),I=()=>le(void 0,null,function*(){Qe({type:"restful/getRestful"}),Dt.id&&Qe({type:"restful/getRestfulDetail",payload:ce({},Dt)})});(0,L.useEffect)(()=>{w(!0),I()},[Dt.id]);const dt=()=>{Qe({type:"restful/setActionTabs",payload:{key:"\u65B0\u5EFA\u540C\u7EA7\u76EE\u5F55"}})},oe=()=>{var Pe,vn,je;if((Pe=Ze.restful)!=null&&Pe.data){let He=0;return(je=(vn=Ze.restful)==null?void 0:vn.data)==null||je.map(tt=>{var he;(he=tt==null?void 0:tt.children)==null||he.map(ie=>{ie.id==Dt.id&&(He=tt.id)}),!tt.children&&!He&&(He=tt.id)}),He}return 0};return L.createElement("section",null,L.createElement("aside",{className:"edu-container mt20"},L.createElement(ge.Z,null,L.createElement(ge.Z.Item,null,L.createElement(Q.Link,{to:"/"},"\u9996\u9875")),L.createElement(ge.Z.Item,null,L.createElement(Q.Link,{to:"/ch/rest"},"API\u6587\u6863"))),L.createElement("div",{className:"mt20"},L.createElement(_e.Z,{gutter:[20,20]},L.createElement(A.Z,{flex:"300px"},L.createElement(ne,ce({},pt))),L.createElement(A.Z,{flex:"1"},L.createElement("div",{className:o.info},L.createElement("h1",{style:{fontSize:28,paddingBottom:15,borderBottom:"1px solid #eaeaea",textAlign:"center"}},(vt=Ze.restfulDetail)==null?void 0:vt.name),L.createElement(be.Z,{value:(ct=Ze.restfulDetail)==null?void 0:ct.description}))))),(0,fe.ag)()&&L.createElement("div",{className:o.bar},L.createElement(_e.Z,null,!!oe()&&L.createElement(A.Z,null,L.createElement(p.Z,{title:"\u7F16\u8F91\u6587\u4EF6"},L.createElement(Q.Link,{to:`/ch/rest/edit/${oe()}/${Dt.id}`,className:"icon-zhongmingming current"}))),L.createElement(A.Z,null,L.createElement(p.Z,{title:"\u6DFB\u52A0\u6587\u4EF6"},L.createElement(Q.Link,{to:`/ch/rest/edit/${oe()}/0`,className:"icon-tianjiatimu current"}))),L.createElement(A.Z,null,L.createElement(p.Z,{title:"\u65B0\u5EFA\u6587\u4EF6\u5939"},L.createElement("span",{className:"icon-wenjianjia1 current",onClick:dt})))))))};var De=(0,Q.connect)(({user:Te,loading:ke,globalSetting:Oe,restful:Ne})=>({user:Te,globalSetting:Oe,restful:Ne,loading:ke.models.index}))(pe)},24768:function(ln,et,m){"use strict";m.d(et,{AL:function(){return Z},Iy:function(){return N},Qv:function(){return S},ez:function(){return X},jb:function(){return v}});var L=m(32834),Q=m.n(L),ge=m(11690),_e=m.n(ge);let A=1;function p(ve,Se){const Le=ve.match(/^(\s+)(?:```)/);if(Le===null)return Se;const ye=Le[1];return Se.split(`
`).map(te=>{const j=te.match(/^\s+/);if(j===null)return te;const[ue]=j;return ue.length>=ye.length?te.slice(ye.length):te}).join(`
`)}let be=[],fe=["<ul>"];const o=new(Q()).Renderer,k=/^ *(#{1,6}) *([^\n]+?) *(?:#+ *)?(?:\n+|$)/;function N(){be.length=0,fe=["<ul>"]}const v={overflow:"hidden",WebkitBoxOrient:"vertical",display:"-webkit-box",WebkitLineClamp:2};function x(ve,Se,Le,ye){if(Se>=ve.length||ve[Se].level<=Le)return Se;var te=ve[Se];ye.push("<li><a href='#"+A+te.anchor+"'>"+te.text+"</a>"),Se++;var j=[];return Se=x(ve,Se,te.level,j),j.length>0&&(ye.push("<ul>"),j.forEach(function(ue){ye.push(ue)}),ye.push("</ul>")),ye.push("</li>"),Se=x(ve,Se,Le,ye),Se}function S(){return x(be,0,0,fe),fe.push("</ul>"),fe.join("")}const T={heading(ve){const Se=k.exec(ve);if(A+=1,Se)return{type:"heading",raw:Se[0],depth:Se[1].length,text:Se[2]}},fences(ve){const Se=this.rules.block.fences.exec(ve);if(Se){const Le=Se[0];let ye=p(Le,Se[3]||"");const te=Se[2]?Se[2].trim():Se[2];if(["latex","katex","math"].indexOf(te)>=0){const j=B(),ue=ye;ye=j,U[j]={type:"block",expression:ue}}return{type:"code",raw:Le,lang:te,text:ye}}}},z=/(?:\${2})([^\n`]+?)(?:\${2})/gi;let ae=0;const B=()=>`__special_katext_id_${ae++}__`;let U={};function X(){return U}function Z(){ae=0,U={}}function D(ve){return ve=ve.replace(z,(Se,Le)=>{const ye=B();return U[ye]={type:"inline",expression:Le},ye}),ve}const C=o.listitem;o.listitem=function(ve){return C(D(ve))};const K=o.paragraph;o.paragraph=function(ve){return K(D(ve))};const $=o.tablecell;o.tablecell=function(ve,Se){return $(D(ve),Se)},o.code=function(ve,Se,Le){const ye=(Se||"").match(/\S*/)[0];return ye?["latex","katex","math"].indexOf(ye)>=0?`<p class='editormd-tex'>${ve}</p>`:`<pre class="prettyprint linenums"><code class="language-${Se}">${Le?ve:(0,ge.escape)(ve,!0)}</code></pre>
`:'<pre class="prettyprint linenums"><code>'+(Le?ve:(0,ge.escape)(ve,!0))+"</code></pre>"},o.heading=function(ve,Se,Le){let ye=this.options.headerPrefix+Le.toLowerCase().replace(/[^\w\\u4e00-\\u9fa5]]+/g,"-");return be.push({anchor:ye,level:Se,text:ve}),"<h"+Se+' id="'+A+ye+'">'+ve+"</h"+Se+">"},Q().setOptions({silent:!0,gfm:!0,pedantic:!1}),Q().use({tokenizer:T,renderer:o}),et.ZP=Q()},36785:function(ln,et,m){"use strict";m.d(et,{o2:function(){return A},yT:function(){return p}});var L=m(80702),Q=m(33166);const ge=Q.i.map(be=>`${be}-inverse`),_e=["success","processing","error","default","warning"];function A(be){return(arguments.length>1&&arguments[1]!==void 0?arguments[1]:!0)?[].concat((0,L.Z)(ge),(0,L.Z)(Q.i)).includes(be):Q.i.includes(be)}function p(be){return _e.includes(be)}},77578:function(ln,et,m){"use strict";m.d(et,{Z:function(){return L}});const L=Q=>Q?typeof Q=="function"?Q():Q:null},79676:function(ln,et,m){"use strict";m.d(et,{Z:function(){return p}});var L=m(19447);function Q(be,fe,o,k){if(k===!1)return{adjustX:!1,adjustY:!1};const N=k&&typeof k=="object"?k:{},v={};switch(be){case"top":case"bottom":v.shiftX=fe.dropdownArrowOffset*2+o;break;case"left":case"right":v.shiftY=fe.dropdownArrowOffsetVertical*2+o;break}const x=Object.assign(Object.assign({},v),N);return x.shiftX||(x.adjustX=!0),x.shiftY||(x.adjustY=!0),x}const ge={left:{points:["cr","cl"]},right:{points:["cl","cr"]},top:{points:["bc","tc"]},bottom:{points:["tc","bc"]},topLeft:{points:["bl","tl"]},leftTop:{points:["tr","tl"]},topRight:{points:["br","tr"]},rightTop:{points:["tl","tr"]},bottomRight:{points:["tr","br"]},rightBottom:{points:["bl","br"]},bottomLeft:{points:["tl","bl"]},leftBottom:{points:["br","bl"]}},_e={topLeft:{points:["bl","tc"]},leftTop:{points:["tr","cl"]},topRight:{points:["br","tc"]},rightTop:{points:["tl","cr"]},bottomRight:{points:["tr","bc"]},rightBottom:{points:["bl","cr"]},bottomLeft:{points:["tl","bc"]},leftBottom:{points:["br","cl"]}},A=new Set(["topLeft","topRight","bottomLeft","bottomRight","leftTop","leftBottom","rightTop","rightBottom"]);function p(be){const{arrowWidth:fe,autoAdjustOverflow:o,arrowPointAtCenter:k,offset:N,borderRadius:v,visibleFirst:x}=be,S=fe/2,T={};return Object.keys(ge).forEach(z=>{const ae=k&&_e[z]||ge[z],B=Object.assign(Object.assign({},ae),{offset:[0,0]});switch(T[z]=B,A.has(z)&&(B.autoArrow=!1),z){case"top":case"topLeft":case"topRight":B.offset[1]=-S-N;break;case"bottom":case"bottomLeft":case"bottomRight":B.offset[1]=S+N;break;case"left":case"leftTop":case"leftBottom":B.offset[0]=-S-N;break;case"right":case"rightTop":case"rightBottom":B.offset[0]=S+N;break}const U=(0,L.fS)({contentRadius:v,limitVerticalRadius:!0});if(k)switch(z){case"topLeft":case"bottomLeft":B.offset[0]=-U.dropdownArrowOffset-S;break;case"topRight":case"bottomRight":B.offset[0]=U.dropdownArrowOffset+S;break;case"leftTop":case"rightTop":B.offset[1]=-U.dropdownArrowOffset-S;break;case"leftBottom":case"rightBottom":B.offset[1]=U.dropdownArrowOffset+S;break}B.overflow=Q(z,U,fe,o),x&&(B.htmlRegion="visibleFirst")}),T}},19080:function(ln,et,m){"use strict";m.d(et,{F:function(){return A},Z:function(){return _e}});var L=m(92310),Q=m.n(L);const ge=null;function _e(p,be,fe){return Q()({[`${p}-status-success`]:be==="success",[`${p}-status-warning`]:be==="warning",[`${p}-status-error`]:be==="error",[`${p}-status-validating`]:be==="validating",[`${p}-has-feedback`]:fe})}const A=(p,be)=>be||p},66104:function(ln,et,m){"use strict";m.d(et,{Z:function(){return ue}});var L=m(92310),Q=m.n(L),ge=m(11592),_e=m(26112),A=m(59301),p=m(92343),be=m(36355),fe=m(84105),o=m(91857);const k=R=>{let{children:ee}=R;const{getPrefixCls:G}=A.useContext(be.E_),y=G("breadcrumb");return A.createElement("li",{className:`${y}-separator`,"aria-hidden":"true"},ee===""?ee:ee||"/")};k.__ANT_BREADCRUMB_SEPARATOR=!0;var N=k,v=function(R,ee){var G={};for(var y in R)Object.prototype.hasOwnProperty.call(R,y)&&ee.indexOf(y)<0&&(G[y]=R[y]);if(R!=null&&typeof Object.getOwnPropertySymbols=="function")for(var E=0,y=Object.getOwnPropertySymbols(R);E<y.length;E++)ee.indexOf(y[E])<0&&Object.prototype.propertyIsEnumerable.call(R,y[E])&&(G[y[E]]=R[y[E]]);return G};function x(R,ee){if(R.title===void 0||R.title===null)return null;const G=Object.keys(ee).join("|");return typeof R.title=="object"?R.title:String(R.title).replace(new RegExp(`:(${G})`,"g"),(y,E)=>ee[E]||y)}function S(R,ee,G,y){if(G==null)return null;const{className:E,onClick:Y}=ee,me=v(ee,["className","onClick"]),$e=Object.assign(Object.assign({},(0,_e.Z)(me,{data:!0,aria:!0})),{onClick:Y});return y!==void 0?A.createElement("a",Object.assign({},$e,{className:Q()(`${R}-link`,E),href:y}),G):A.createElement("span",Object.assign({},$e,{className:Q()(`${R}-link`,E)}),G)}function T(R,ee){return(y,E,Y,me,$e)=>{if(ee)return ee(y,E,Y,me);const We=x(y,E);return S(R,y,We,$e)}}var z=function(R,ee){var G={};for(var y in R)Object.prototype.hasOwnProperty.call(R,y)&&ee.indexOf(y)<0&&(G[y]=R[y]);if(R!=null&&typeof Object.getOwnPropertySymbols=="function")for(var E=0,y=Object.getOwnPropertySymbols(R);E<y.length;E++)ee.indexOf(y[E])<0&&Object.prototype.propertyIsEnumerable.call(R,y[E])&&(G[y[E]]=R[y[E]]);return G};const ae=R=>{const{prefixCls:ee,separator:G="/",children:y,menu:E,overlay:Y,dropdownProps:me,href:$e}=R,qe=(Xe=>{if(E||Y){const gt=Object.assign({},me);if(E){const _t=E||{},{items:st}=_t,Kt=z(_t,["items"]);gt.menu=Object.assign(Object.assign({},Kt),{items:st==null?void 0:st.map((un,Ot)=>{var{key:Vt,title:lt,label:At,path:ne}=un,de=z(un,["key","title","label","path"]);let se=At!=null?At:lt;return ne&&(se=A.createElement("a",{href:`${$e}${ne}`},se)),Object.assign(Object.assign({},de),{key:Vt!=null?Vt:Ot,label:se})})})}else Y&&(gt.overlay=Y);return A.createElement(o.Z,Object.assign({placement:"bottom"},gt),A.createElement("span",{className:`${ee}-overlay-link`},Xe,A.createElement(fe.Z,null)))}return Xe})(y);return qe!=null?A.createElement(A.Fragment,null,A.createElement("li",null,qe),G&&A.createElement(N,null,G)):null},B=R=>{const{prefixCls:ee,children:G,href:y}=R,E=z(R,["prefixCls","children","href"]),{getPrefixCls:Y}=A.useContext(be.E_),me=Y("breadcrumb",ee);return A.createElement(ae,Object.assign({},E,{prefixCls:me}),S(me,E,G,y))};B.__ANT_BREADCRUMB_ITEM=!0;var U=B,X=m(17313),Z=m(83116),D=m(37613);const C=R=>{const{componentCls:ee,iconCls:G}=R;return{[ee]:Object.assign(Object.assign({},(0,X.Wf)(R)),{color:R.itemColor,fontSize:R.fontSize,[G]:{fontSize:R.iconFontSize},ol:{display:"flex",flexWrap:"wrap",margin:0,padding:0,listStyle:"none"},a:Object.assign({color:R.linkColor,transition:`color ${R.motionDurationMid}`,padding:`0 ${R.paddingXXS}px`,borderRadius:R.borderRadiusSM,height:R.lineHeight*R.fontSize,display:"inline-block",marginInline:-R.marginXXS,"&:hover":{color:R.linkHoverColor,backgroundColor:R.colorBgTextHover}},(0,X.Qy)(R)),"li:last-child":{color:R.lastItemColor},[`${ee}-separator`]:{marginInline:R.separatorMargin,color:R.separatorColor},[`${ee}-link`]:{[`
> ${G} + span,
> ${G} + a
`]:{marginInlineStart:R.marginXXS}},[`${ee}-overlay-link`]:{borderRadius:R.borderRadiusSM,height:R.lineHeight*R.fontSize,display:"inline-block",padding:`0 ${R.paddingXXS}px`,marginInline:-R.marginXXS,[`> ${G}`]:{marginInlineStart:R.marginXXS,fontSize:R.fontSizeIcon},"&:hover":{color:R.linkHoverColor,backgroundColor:R.colorBgTextHover,a:{color:R.linkHoverColor}},a:{"&:hover":{backgroundColor:"transparent"}}},[`&${R.componentCls}-rtl`]:{direction:"rtl"}})}};var K=(0,Z.Z)("Breadcrumb",R=>{const ee=(0,D.TS)(R,{});return[C(ee)]},R=>({itemColor:R.colorTextDescription,lastItemColor:R.colorText,iconFontSize:R.fontSize,linkColor:R.colorTextDescription,linkHoverColor:R.colorText,separatorColor:R.colorTextDescription,separatorMargin:R.marginXS})),$=function(R,ee){var G={};for(var y in R)Object.prototype.hasOwnProperty.call(R,y)&&ee.indexOf(y)<0&&(G[y]=R[y]);if(R!=null&&typeof Object.getOwnPropertySymbols=="function")for(var E=0,y=Object.getOwnPropertySymbols(R);E<y.length;E++)ee.indexOf(y[E])<0&&Object.prototype.propertyIsEnumerable.call(R,y[E])&&(G[y[E]]=R[y[E]]);return G};function ve(R){const{breadcrumbName:ee,children:G}=R,y=$(R,["breadcrumbName","children"]),E=Object.assign({title:ee},y);return G&&(E.menu={items:G.map(Y=>{var{breadcrumbName:me}=Y,$e=$(Y,["breadcrumbName"]);return Object.assign(Object.assign({},$e),{title:me})})}),E}function Se(R,ee){return(0,A.useMemo)(()=>R||(ee?ee.map(ve):null),[R,ee])}var Le=function(R,ee){var G={};for(var y in R)Object.prototype.hasOwnProperty.call(R,y)&&ee.indexOf(y)<0&&(G[y]=R[y]);if(R!=null&&typeof Object.getOwnPropertySymbols=="function")for(var E=0,y=Object.getOwnPropertySymbols(R);E<y.length;E++)ee.indexOf(y[E])<0&&Object.prototype.propertyIsEnumerable.call(R,y[E])&&(G[y[E]]=R[y[E]]);return G};const ye=(R,ee)=>{if(ee===void 0)return ee;let G=(ee||"").replace(/^\//,"");return Object.keys(R).forEach(y=>{G=G.replace(`:${y}`,R[y])}),G},te=R=>{const{prefixCls:ee,separator:G="/",style:y,className:E,rootClassName:Y,routes:me,items:$e,children:We,itemRender:qe,params:Xe={}}=R,gt=Le(R,["prefixCls","separator","style","className","rootClassName","routes","items","children","itemRender","params"]),{getPrefixCls:_t,direction:st,breadcrumb:Kt}=A.useContext(be.E_);let un;const Ot=_t("breadcrumb",ee),[Vt,lt]=K(Ot),At=Se($e,me),ne=T(Ot,qe);if(At&&At.length>0){const W=[],Ie=$e||me;un=At.map((M,ce)=>{const{path:q,key:le,type:pe,menu:De,overlay:Te,onClick:ke,className:Oe,separator:Ne,dropdownProps:nt}=M,Qe=ye(Xe,q);Qe!==void 0&&W.push(Qe);const Ze=le!=null?le:ce;if(pe==="separator")return A.createElement(N,{key:Ze},Ne);const pt={},vt=ce===At.length-1;De?pt.menu=De:Te&&(pt.overlay=Te);let{href:ct}=M;return W.length&&Qe!==void 0&&(ct=`#/${W.join("/")}`),A.createElement(ae,Object.assign({key:Ze},pt,(0,_e.Z)(M,{data:!0,aria:!0}),{className:Oe,dropdownProps:nt,href:ct,separator:vt?"":G,onClick:ke,prefixCls:Ot}),ne(M,Xe,Ie,W,ct))})}else if(We){const W=(0,ge.Z)(We).length;un=(0,ge.Z)(We).map((Ie,M)=>{if(!Ie)return Ie;const ce=M===W-1;return(0,p.Tm)(Ie,{separator:ce?"":G,key:M})})}const de=Q()(Ot,Kt==null?void 0:Kt.className,{[`${Ot}-rtl`]:st==="rtl"},E,Y,lt),se=Object.assign(Object.assign({},Kt==null?void 0:Kt.style),y);return Vt(A.createElement("nav",Object.assign({className:de,style:se},gt),A.createElement("ol",null,un)))};te.Item=U,te.Separator=N;var j=te,ue=j},98447:function(ln,et,m){"use strict";m.d(et,{C2:function(){return A}});var L=m(17313),Q=m(37613),ge=m(83116);const _e=p=>{const{checkboxCls:be}=p,fe=`${be}-wrapper`;return[{[`${be}-group`]:Object.assign(Object.assign({},(0,L.Wf)(p)),{display:"inline-flex",flexWrap:"wrap",columnGap:p.marginXS,[`> ${p.antCls}-row`]:{flex:1}}),[fe]:Object.assign(Object.assign({},(0,L.Wf)(p)),{display:"inline-flex",alignItems:"baseline",cursor:"pointer","&:after":{display:"inline-block",width:0,overflow:"hidden",content:"'\\a0'"},[`& + ${fe}`]:{marginInlineStart:0},[`&${fe}-in-form-item`]:{'input[type="checkbox"]':{width:14,height:14}}}),[be]:Object.assign(Object.assign({},(0,L.Wf)(p)),{position:"relative",whiteSpace:"nowrap",lineHeight:1,cursor:"pointer",borderRadius:p.borderRadiusSM,alignSelf:"center",[`${be}-input`]:{position:"absolute",inset:0,zIndex:1,cursor:"pointer",opacity:0,margin:0,[`&:focus-visible + ${be}-inner`]:Object.assign({},(0,L.oN)(p))},[`${be}-inner`]:{boxSizing:"border-box",position:"relative",top:0,insetInlineStart:0,display:"block",width:p.checkboxSize,height:p.checkboxSize,direction:"ltr",backgroundColor:p.colorBgContainer,border:`${p.lineWidth}px ${p.lineType} ${p.colorBorder}`,borderRadius:p.borderRadiusSM,borderCollapse:"separate",transition:`all ${p.motionDurationSlow}`,"&:after":{boxSizing:"border-box",position:"absolute",top:"50%",insetInlineStart:"21.5%",display:"table",width:p.checkboxSize/14*5,height:p.checkboxSize/14*8,border:`${p.lineWidthBold}px solid ${p.colorWhite}`,borderTop:0,borderInlineStart:0,transform:"rotate(45deg) scale(0) translate(-50%,-50%)",opacity:0,content:'""',transition:`all ${p.motionDurationFast} ${p.motionEaseInBack}, opacity ${p.motionDurationFast}`}},"& + span":{paddingInlineStart:p.paddingXS,paddingInlineEnd:p.paddingXS}})},{[`
${fe}:not(${fe}-disabled),
${be}:not(${be}-disabled)
`]:{[`&:hover ${be}-inner`]:{borderColor:p.colorPrimary}},[`${fe}:not(${fe}-disabled)`]:{[`&:hover ${be}-checked:not(${be}-disabled) ${be}-inner`]:{backgroundColor:p.colorPrimaryHover,borderColor:"transparent"},[`&:hover ${be}-checked:not(${be}-disabled):after`]:{borderColor:p.colorPrimaryHover}}},{[`${be}-checked`]:{[`${be}-inner`]:{backgroundColor:p.colorPrimary,borderColor:p.colorPrimary,"&:after":{opacity:1,transform:"rotate(45deg) scale(1) translate(-50%,-50%)",transition:`all ${p.motionDurationMid} ${p.motionEaseOutBack} ${p.motionDurationFast}`}}},[`
${fe}-checked:not(${fe}-disabled),
${be}-checked:not(${be}-disabled)
`]:{[`&:hover ${be}-inner`]:{backgroundColor:p.colorPrimaryHover,borderColor:"transparent"}}},{[be]:{"&-indeterminate":{[`${be}-inner`]:{backgroundColor:p.colorBgContainer,borderColor:p.colorBorder,"&:after":{top:"50%",insetInlineStart:"50%",width:p.fontSizeLG/2,height:p.fontSizeLG/2,backgroundColor:p.colorPrimary,border:0,transform:"translate(-50%, -50%) scale(1)",opacity:1,content:'""'}}}}},{[`${fe}-disabled`]:{cursor:"not-allowed"},[`${be}-disabled`]:{[`&, ${be}-input`]:{cursor:"not-allowed",pointerEvents:"none"},[`${be}-inner`]:{background:p.colorBgContainerDisabled,borderColor:p.colorBorder,"&:after":{borderColor:p.colorTextDisabled}},"&:after":{display:"none"},"& + span":{color:p.colorTextDisabled},[`&${be}-indeterminate ${be}-inner::after`]:{background:p.colorTextDisabled}}}]};function A(p,be){const fe=(0,Q.TS)(be,{checkboxCls:`.${p}`,checkboxSize:be.controlInteractiveSize});return[_e(fe)]}et.ZP=(0,ge.Z)("Checkbox",(p,be)=>{let{prefixCls:fe}=be;return[A(fe,p)]})},93891:function(ln,et,m){"use strict";var L=m(59301),Q=m(36355),ge=m(64165);const _e=A=>{const{componentName:p}=A,{getPrefixCls:be}=(0,L.useContext)(Q.E_),fe=be("empty");switch(p){case"Table":case"List":return L.createElement(ge.Z,{image:ge.Z.PRESENTED_IMAGE_SIMPLE});case"Select":case"TreeSelect":case"Cascader":case"Transfer":case"Mentions":return L.createElement(ge.Z,{image:ge.Z.PRESENTED_IMAGE_SIMPLE,className:`${fe}-small`});default:return L.createElement(ge.Z,null)}};et.Z=_e},91857:function(ln,et,m){"use strict";var L=m(59301),Q=m(38819),ge=m(92310),_e=m.n(ge),A=m(31561),p=m(70425),be=m(18929),fe=m(2738),o=m(79676),k=m(53487),N=m(92343),v=m(36355),x=m(20834),S=m(40875),T=m(88088),z=m(47211);const ae=null,B=D=>{const{menu:C,arrow:K,prefixCls:$,children:ve,trigger:Se,disabled:Le,dropdownRender:ye,getPopupContainer:te,overlayClassName:j,rootClassName:ue,open:R,onOpenChange:ee,visible:G,onVisibleChange:y,mouseEnterDelay:E=.15,mouseLeaveDelay:Y=.1,autoAdjustOverflow:me=!0,placement:$e="",overlay:We,transitionName:qe}=D,{getPopupContainer:Xe,getPrefixCls:gt,direction:_t}=L.useContext(v.E_),st=L.useMemo(()=>{const De=gt();return qe!==void 0?qe:$e.includes("top")?`${De}-slide-down`:`${De}-slide-up`},[gt,$e,qe]),Kt=L.useMemo(()=>$e?$e.includes("Center")?$e.slice(0,$e.indexOf("Center")):$e:_t==="rtl"?"bottomRight":"bottomLeft",[$e,_t]),un=gt("dropdown",$),[Ot,Vt]=(0,z.Z)(un),[,lt]=(0,T.Z)(),At=L.Children.only(ve),ne=(0,N.Tm)(At,{className:_e()(`${un}-trigger`,{[`${un}-rtl`]:_t==="rtl"},At.props.className),disabled:Le}),de=Le?[]:Se;let se;de&&de.includes("contextMenu")&&(se=!0);const[W,Ie]=(0,be.Z)(!1,{value:R!=null?R:G}),M=(0,p.useEvent)(De=>{ee==null||ee(De),y==null||y(De),Ie(De)}),ce=_e()(j,ue,Vt,{[`${un}-rtl`]:_t==="rtl"}),q=(0,o.Z)({arrowPointAtCenter:typeof K=="object"&&K.pointAtCenter,autoAdjustOverflow:me,offset:lt.marginXXS,arrowWidth:K?lt.sizePopupArrow:0,borderRadius:lt.borderRadius}),le=L.useCallback(()=>{Ie(!1)},[]),pe=()=>{let De;return C!=null&&C.items?De=L.createElement(x.default,Object.assign({},C)):typeof We=="function"?De=We():De=We,ye&&(De=ye(De)),De=L.Children.only(typeof De=="string"?L.createElement("span",null,De):De),L.createElement(S.J,{prefixCls:`${un}-menu`,expandIcon:L.createElement("span",{className:`${un}-menu-submenu-arrow`},L.createElement(Q.Z,{className:`${un}-menu-submenu-arrow-icon`})),mode:"vertical",selectable:!1,onClick:le,validator:Te=>{let{mode:ke}=Te}},De)};return Ot(L.createElement(A.Z,Object.assign({alignPoint:se},(0,fe.Z)(D,["rootClassName"]),{mouseEnterDelay:E,mouseLeaveDelay:Y,visible:W,builtinPlacements:q,arrow:!!K,overlayClassName:ce,prefixCls:un,getPopupContainer:te||Xe,transitionName:st,trigger:de,overlay:pe,placement:Kt,onVisibleChange:M}),ne))};function U(D){return Object.assign(Object.assign({},D),{align:{overflow:{adjustX:!1,adjustY:!1}}})}const X=(0,k.Z)(B,"dropdown",D=>D,U),Z=D=>L.createElement(X,Object.assign({},D),L.createElement("span",null));B._InternalPanelDoNotUseOrYouWillBeFired=Z,et.Z=B},47211:function(ln,et,m){"use strict";m.d(et,{Z:function(){return N}});var L=m(17313),Q=m(13826),ge=m(92899),_e=m(29878),A=m(19447),p=m(83116),be=m(37613),o=v=>{const{componentCls:x,menuCls:S,colorError:T,colorTextLightSolid:z}=v,ae=`${S}-item`;return{[`${x}, ${x}-menu-submenu`]:{[`${S} ${ae}`]:{[`&${ae}-danger:not(${ae}-disabled)`]:{color:T,"&:hover":{color:z,backgroundColor:T}}}}}};const k=v=>{const{componentCls:x,menuCls:S,zIndexPopup:T,dropdownArrowDistance:z,sizePopupArrow:ae,antCls:B,iconCls:U,motionDurationMid:X,dropdownPaddingVertical:Z,fontSize:D,dropdownEdgeChildPadding:C,colorTextDisabled:K,fontSizeIcon:$,controlPaddingHorizontal:ve,colorBgElevated:Se}=v;return[{[x]:Object.assign(Object.assign({},(0,L.Wf)(v)),{position:"absolute",top:-9999,left:{_skip_check_:!0,value:-9999},zIndex:T,display:"block","&::before":{position:"absolute",insetBlock:-z+ae/2,zIndex:-9999,opacity:1e-4,content:'""'},[`&-trigger${B}-btn`]:{[`& > ${U}-down, & > ${B}-btn-icon > ${U}-down`]:{fontSize:$}},[`${x}-wrap`]:{position:"relative",[`${B}-btn > ${U}-down`]:{fontSize:$},[`${U}-down::before`]:{transition:`transform ${X}`}},[`${x}-wrap-open`]:{[`${U}-down::before`]:{transform:"rotate(180deg)"}},"\n &-hidden,\n &-menu-hidden,\n &-menu-submenu-hidden\n ":{display:"none"},[`&${B}-slide-down-enter${B}-slide-down-enter-active${x}-placement-bottomLeft,
&${B}-slide-down-appear${B}-slide-down-appear-active${x}-placement-bottomLeft,
&${B}-slide-down-enter${B}-slide-down-enter-active${x}-placement-bottom,
&${B}-slide-down-appear${B}-slide-down-appear-active${x}-placement-bottom,
&${B}-slide-down-enter${B}-slide-down-enter-active${x}-placement-bottomRight,
&${B}-slide-down-appear${B}-slide-down-appear-active${x}-placement-bottomRight`]:{animationName:Q.fJ},[`&${B}-slide-up-enter${B}-slide-up-enter-active${x}-placement-topLeft,
&${B}-slide-up-appear${B}-slide-up-appear-active${x}-placement-topLeft,
&${B}-slide-up-enter${B}-slide-up-enter-active${x}-placement-top,
&${B}-slide-up-appear${B}-slide-up-appear-active${x}-placement-top,
&${B}-slide-up-enter${B}-slide-up-enter-active${x}-placement-topRight,
&${B}-slide-up-appear${B}-slide-up-appear-active${x}-placement-topRight`]:{animationName:Q.Qt},[`&${B}-slide-down-leave${B}-slide-down-leave-active${x}-placement-bottomLeft,
&${B}-slide-down-leave${B}-slide-down-leave-active${x}-placement-bottom,
&${B}-slide-down-leave${B}-slide-down-leave-active${x}-placement-bottomRight`]:{animationName:Q.Uw},[`&${B}-slide-up-leave${B}-slide-up-leave-active${x}-placement-topLeft,
&${B}-slide-up-leave${B}-slide-up-leave-active${x}-placement-top,
&${B}-slide-up-leave${B}-slide-up-leave-active${x}-placement-topRight`]:{animationName:Q.ly}})},(0,A.ZP)(v,{colorBg:Se,limitVerticalRadius:!0,arrowPlacement:{top:!0,bottom:!0}}),{[`${x} ${S}`]:{position:"relative",margin:0},[`${S}-submenu-popup`]:{position:"absolute",zIndex:T,background:"transparent",boxShadow:"none",transformOrigin:"0 0","ul, li":{listStyle:"none",margin:0}},[`${x}, ${x}-menu-submenu`]:{[S]:Object.assign(Object.assign({padding:C,listStyleType:"none",backgroundColor:Se,backgroundClip:"padding-box",borderRadius:v.borderRadiusLG,outline:"none",boxShadow:v.boxShadowSecondary},(0,L.Qy)(v)),{[`${S}-item-group-title`]:{padding:`${Z}px ${ve}px`,color:v.colorTextDescription,transition:`all ${X}`},[`${S}-item`]:{position:"relative",display:"flex",alignItems:"center"},[`${S}-item-icon`]:{minWidth:D,marginInlineEnd:v.marginXS,fontSize:v.fontSizeSM},[`${S}-title-content`]:{flex:"auto","> a":{color:"inherit",transition:`all ${X}`,"&:hover":{color:"inherit"},"&::after":{position:"absolute",inset:0,content:'""'}}},[`${S}-item, ${S}-submenu-title`]:Object.assign(Object.assign({clear:"both",margin:0,padding:`${Z}px ${ve}px`,color:v.colorText,fontWeight:"normal",fontSize:D,lineHeight:v.lineHeight,cursor:"pointer",transition:`all ${X}`,borderRadius:v.borderRadiusSM,"&:hover, &-active":{backgroundColor:v.controlItemBgHover}},(0,L.Qy)(v)),{"&-selected":{color:v.colorPrimary,backgroundColor:v.controlItemBgActive,"&:hover, &-active":{backgroundColor:v.controlItemBgActiveHover}},"&-disabled":{color:K,cursor:"not-allowed","&:hover":{color:K,backgroundColor:Se,cursor:"not-allowed"},a:{pointerEvents:"none"}},"&-divider":{height:1,margin:`${v.marginXXS}px 0`,overflow:"hidden",lineHeight:0,backgroundColor:v.colorSplit},[`${x}-menu-submenu-expand-icon`]:{position:"absolute",insetInlineEnd:v.paddingXS,[`${x}-menu-submenu-arrow-icon`]:{marginInlineEnd:"0 !important",color:v.colorTextDescription,fontSize:$,fontStyle:"normal"}}}),[`${S}-item-group-list`]:{margin:`0 ${v.marginXS}px`,padding:0,listStyle:"none"},[`${S}-submenu-title`]:{paddingInlineEnd:ve+v.fontSizeSM},[`${S}-submenu-vertical`]:{position:"relative"},[`${S}-submenu${S}-submenu-disabled ${x}-menu-submenu-title`]:{[`&, ${x}-menu-submenu-arrow-icon`]:{color:K,backgroundColor:Se,cursor:"not-allowed"}},[`${S}-submenu-selected ${x}-menu-submenu-title`]:{color:v.colorPrimary}})}},[(0,Q.oN)(v,"slide-up"),(0,Q.oN)(v,"slide-down"),(0,ge.Fm)(v,"move-up"),(0,ge.Fm)(v,"move-down"),(0,_e._y)(v,"zoom-big")]]};var N=(0,p.Z)("Dropdown",(v,x)=>{let{rootPrefixCls:S}=x;const{marginXXS:T,sizePopupArrow:z,controlHeight:ae,fontSize:B,lineHeight:U,paddingXXS:X,componentCls:Z,borderRadiusLG:D}=v,C=(ae-B*U)/2,{dropdownArrowOffset:K}=(0,A.fS)({contentRadius:D}),$=(0,be.TS)(v,{menuCls:`${Z}-menu`,rootPrefixCls:S,dropdownArrowDistance:z/2+T,dropdownArrowOffset:K,dropdownPaddingVertical:C,dropdownEdgeChildPadding:X});return[k($),o($)]},v=>({zIndexPopup:v.zIndexPopupBase+50}))},64165:function(ln,et,m){"use strict";m.d(et,{Z:function(){return X}});var L=m(92310),Q=m.n(L),ge=m(59301),_e=m(36355),A=m(9763),p=m(64993),be=m(88088),o=()=>{const[,Z]=(0,be.Z)(),C=new p.C(Z.colorBgBase).toHsl().l<.5?{opacity:.65}:{};return ge.createElement("svg",{style:C,width:"184",height:"152",viewBox:"0 0 184 152",xmlns:"http://www.w3.org/2000/svg"},ge.createElement("g",{fill:"none",fillRule:"evenodd"},ge.createElement("g",{transform:"translate(24 31.67)"},ge.createElement("ellipse",{fillOpacity:".8",fill:"#F5F5F7",cx:"67.797",cy:"106.89",rx:"67.797",ry:"12.668"}),ge.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"}),ge.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)"}),ge.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"}),ge.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"})),ge.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"}),ge.createElement("g",{transform:"translate(149.65 15.383)",fill:"#FFF"},ge.createElement("ellipse",{cx:"20.654",cy:"3.167",rx:"2.849",ry:"2.815"}),ge.createElement("path",{d:"M5.698 5.63H0L2.898.704zM9.259.704h4.985V5.63H9.259z"}))))},N=()=>{const[,Z]=(0,be.Z)(),{colorFill:D,colorFillTertiary:C,colorFillQuaternary:K,colorBgContainer:$}=Z,{borderColor:ve,shadowColor:Se,contentColor:Le}=(0,ge.useMemo)(()=>({borderColor:new p.C(D).onBackground($).toHexShortString(),shadowColor:new p.C(C).onBackground($).toHexShortString(),contentColor:new p.C(K).onBackground($).toHexShortString()}),[D,C,K,$]);return ge.createElement("svg",{width:"64",height:"41",viewBox:"0 0 64 41",xmlns:"http://www.w3.org/2000/svg"},ge.createElement("g",{transform:"translate(0 1)",fill:"none",fillRule:"evenodd"},ge.createElement("ellipse",{fill:Se,cx:"32",cy:"33",rx:"32",ry:"7"}),ge.createElement("g",{fillRule:"nonzero",stroke:ve},ge.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"}),ge.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:Le}))))},v=m(83116),x=m(37613);const S=Z=>{const{componentCls:D,margin:C,marginXS:K,marginXL:$,fontSize:ve,lineHeight:Se}=Z;return{[D]:{marginInline:K,fontSize:ve,lineHeight:Se,textAlign:"center",[`${D}-image`]:{height:Z.emptyImgHeight,marginBottom:K,opacity:Z.opacityImage,img:{height:"100%"},svg:{maxWidth:"100%",height:"100%",margin:"auto"}},[`${D}-description`]:{color:Z.colorText},[`${D}-footer`]:{marginTop:C},"&-normal":{marginBlock:$,color:Z.colorTextDisabled,[`${D}-description`]:{color:Z.colorTextDisabled},[`${D}-image`]:{height:Z.emptyImgHeightMD}},"&-small":{marginBlock:K,color:Z.colorTextDisabled,[`${D}-image`]:{height:Z.emptyImgHeightSM}}}}};var T=(0,v.Z)("Empty",Z=>{const{componentCls:D,controlHeightLG:C}=Z,K=(0,x.TS)(Z,{emptyImgCls:`${D}-img`,emptyImgHeight:C*2.5,emptyImgHeightMD:C,emptyImgHeightSM:C*.875});return[S(K)]}),z=function(Z,D){var C={};for(var K in Z)Object.prototype.hasOwnProperty.call(Z,K)&&D.indexOf(K)<0&&(C[K]=Z[K]);if(Z!=null&&typeof Object.getOwnPropertySymbols=="function")for(var $=0,K=Object.getOwnPropertySymbols(Z);$<K.length;$++)D.indexOf(K[$])<0&&Object.prototype.propertyIsEnumerable.call(Z,K[$])&&(C[K[$]]=Z[K[$]]);return C};const ae=ge.createElement(o,null),B=ge.createElement(N,null),U=Z=>{var{className:D,rootClassName:C,prefixCls:K,image:$=ae,description:ve,children:Se,imageStyle:Le,style:ye}=Z,te=z(Z,["className","rootClassName","prefixCls","image","description","children","imageStyle","style"]);const{getPrefixCls:j,direction:ue,empty:R}=ge.useContext(_e.E_),ee=j("empty",K),[G,y]=T(ee),[E]=(0,A.Z)("Empty"),Y=typeof ve!="undefined"?ve:E==null?void 0:E.description,me=typeof Y=="string"?Y:"empty";let $e=null;return typeof $=="string"?$e=ge.createElement("img",{alt:me,src:$}):$e=$,G(ge.createElement("div",Object.assign({className:Q()(y,ee,R==null?void 0:R.className,{[`${ee}-normal`]:$===B,[`${ee}-rtl`]:ue==="rtl"},D,C),style:Object.assign(Object.assign({},R==null?void 0:R.style),ye)},te),ge.createElement("div",{className:`${ee}-image`,style:Le},$e),Y&&ge.createElement("div",{className:`${ee}-description`},Y),Se&&ge.createElement("div",{className:`${ee}-footer`},Se)))};U.PRESENTED_IMAGE_DEFAULT=ae,U.PRESENTED_IMAGE_SIMPLE=B;var X=U},78241:function(ln,et,m){"use strict";m.d(et,{default:function(){return tn}});var L=m(80702),Q=m(92310),ge=m.n(Q),_e=m(77900),A=m(59301),p=m(62892),be=m(32441);function fe(Ue){const[bt,wt]=A.useState(Ue);return A.useEffect(()=>{const Me=setTimeout(()=>{wt(Ue)},Ue.length?0:10);return()=>{clearTimeout(Me)}},[Ue]),bt}var o=m(17313),k=m(29878),N=m(8378),v=m(37613),x=m(83116),T=Ue=>{const{componentCls:bt}=Ue,wt=`${bt}-show-help`,Me=`${bt}-show-help-item`;return{[wt]:{transition:`opacity ${Ue.motionDurationSlow} ${Ue.motionEaseInOut}`,"&-appear, &-enter":{opacity:0,"&-active":{opacity:1}},"&-leave":{opacity:1,"&-active":{opacity:0}},[Me]:{overflow:"hidden",transition:`height ${Ue.motionDurationSlow} ${Ue.motionEaseInOut},
opacity ${Ue.motionDurationSlow} ${Ue.motionEaseInOut},
transform ${Ue.motionDurationSlow} ${Ue.motionEaseInOut} !important`,[`&${Me}-appear, &${Me}-enter`]:{transform:"translateY(-5px)",opacity:0,"&-active":{transform:"translateY(0)",opacity:1}},[`&${Me}-leave-active`]:{transform:"translateY(-5px)"}}}}};const z=Ue=>({legend:{display:"block",width:"100%",marginBottom:Ue.marginLG,padding:0,color:Ue.colorTextDescription,fontSize:Ue.fontSizeLG,lineHeight:"inherit",border:0,borderBottom:`${Ue.lineWidth}px ${Ue.lineType} ${Ue.colorBorder}`},label:{fontSize:Ue.fontSize},'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 ${Ue.controlOutlineWidth}px ${Ue.controlOutline}`},output:{display:"block",paddingTop:15,color:Ue.colorText,fontSize:Ue.fontSize,lineHeight:Ue.lineHeight}}),ae=(Ue,bt)=>{const{formItemCls:wt}=Ue;return{[wt]:{[`${wt}-label > label`]:{height:bt},[`${wt}-control-input`]:{minHeight:bt}}}},B=Ue=>{const{componentCls:bt}=Ue;return{[Ue.componentCls]:Object.assign(Object.assign(Object.assign({},(0,o.Wf)(Ue)),z(Ue)),{[`${bt}-text`]:{display:"inline-block",paddingInlineEnd:Ue.paddingSM},"&-small":Object.assign({},ae(Ue,Ue.controlHeightSM)),"&-large":Object.assign({},ae(Ue,Ue.controlHeightLG))})}},U=Ue=>{const{formItemCls:bt,iconCls:wt,componentCls:Me,rootPrefixCls:Ae,labelRequiredMarkColor:ut,labelColor:ft,labelFontSize:Nt,labelHeight:Pt,labelColonMarginInlineStart:Zt,labelColonMarginInlineEnd:Ht,itemMarginBottom:sn}=Ue;return{[bt]:Object.assign(Object.assign({},(0,o.Wf)(Ue)),{marginBottom:sn,verticalAlign:"top","&-with-help":{transition:"none"},[`&-hidden,
&-hidden.${Ae}-row`]:{display:"none"},"&-has-warning":{[`${bt}-split`]:{color:Ue.colorError}},"&-has-error":{[`${bt}-split`]:{color:Ue.colorWarning}},[`${bt}-label`]:{flexGrow:0,overflow:"hidden",whiteSpace:"nowrap",textAlign:"end",verticalAlign:"middle","&-left":{textAlign:"start"},"&-wrap":{overflow:"unset",lineHeight:`${Ue.lineHeight} - 0.25em`,whiteSpace:"unset"},"> label":{position:"relative",display:"inline-flex",alignItems:"center",maxWidth:"100%",height:Pt,color:ft,fontSize:Nt,[`> ${wt}`]:{fontSize:Ue.fontSize,verticalAlign:"top"},[`&${bt}-required:not(${bt}-required-mark-optional)::before`]:{display:"inline-block",marginInlineEnd:Ue.marginXXS,color:ut,fontSize:Ue.fontSize,fontFamily:"SimSun, sans-serif",lineHeight:1,content:'"*"',[`${Me}-hide-required-mark &`]:{display:"none"}},[`${bt}-optional`]:{display:"inline-block",marginInlineStart:Ue.marginXXS,color:Ue.colorTextDescription,[`${Me}-hide-required-mark &`]:{display:"none"}},[`${bt}-tooltip`]:{color:Ue.colorTextDescription,cursor:"help",writingMode:"horizontal-tb",marginInlineStart:Ue.marginXXS},"&::after":{content:'":"',position:"relative",marginBlock:0,marginInlineStart:Zt,marginInlineEnd:Ht},[`&${bt}-no-colon::after`]:{content:'"\\a0"'}}},[`${bt}-control`]:{"--ant-display":"flex",flexDirection:"column",flexGrow:1,[`&:first-child:not([class^="'${Ae}-col-'"]):not([class*="' ${Ae}-col-'"])`]:{width:"100%"},"&-input":{position:"relative",display:"flex",alignItems:"center",minHeight:Ue.controlHeight,"&-content":{flex:"auto",maxWidth:"100%"}}},[bt]:{"&-explain, &-extra":{clear:"both",color:Ue.colorTextDescription,fontSize:Ue.fontSize,lineHeight:Ue.lineHeight},"&-explain-connected":{width:"100%"},"&-extra":{minHeight:Ue.controlHeightSM,transition:`color ${Ue.motionDurationMid} ${Ue.motionEaseOut}`},"&-explain":{"&-error":{color:Ue.colorError},"&-warning":{color:Ue.colorWarning}}},[`&-with-help ${bt}-explain`]:{height:"auto",opacity:1},[`${bt}-feedback-icon`]:{fontSize:Ue.fontSize,textAlign:"center",visibility:"visible",animationName:k.kr,animationDuration:Ue.motionDurationMid,animationTimingFunction:Ue.motionEaseOutBack,pointerEvents:"none","&-success":{color:Ue.colorSuccess},"&-error":{color:Ue.colorError},"&-warning":{color:Ue.colorWarning},"&-validating":{color:Ue.colorPrimary}}})}},X=Ue=>{const{componentCls:bt,formItemCls:wt}=Ue;return{[`${bt}-horizontal`]:{[`${wt}-label`]:{flexGrow:0},[`${wt}-control`]:{flex:"1 1 0",minWidth:0},[`${wt}-label[class$='-24'], ${wt}-label[class*='-24 ']`]:{[`& + ${wt}-control`]:{minWidth:"unset"}}}}},Z=Ue=>{const{componentCls:bt,formItemCls:wt}=Ue;return{[`${bt}-inline`]:{display:"flex",flexWrap:"wrap",[wt]:{flex:"none",marginInlineEnd:Ue.margin,marginBottom:0,"&-row":{flexWrap:"nowrap"},[`> ${wt}-label,
> ${wt}-control`]:{display:"inline-block",verticalAlign:"top"},[`> ${wt}-label`]:{flex:"none"},[`${bt}-text`]:{display:"inline-block"},[`${wt}-has-feedback`]:{display:"inline-block"}}}}},D=Ue=>({padding:Ue.verticalLabelPadding,margin:Ue.verticalLabelMargin,whiteSpace:"initial",textAlign:"start","> label":{margin:0,"&::after":{visibility:"hidden"}}}),C=Ue=>{const{componentCls:bt,formItemCls:wt,rootPrefixCls:Me}=Ue;return{[`${wt} ${wt}-label`]:D(Ue),[bt]:{[wt]:{flexWrap:"wrap",[`${wt}-label, ${wt}-control`]:{[`&:not([class*=" ${Me}-col-xs"])`]:{flex:"0 0 100%",maxWidth:"100%"}}}}}},K=Ue=>{const{componentCls:bt,formItemCls:wt,rootPrefixCls:Me}=Ue;return{[`${bt}-vertical`]:{[wt]:{"&-row":{flexDirection:"column"},"&-label > label":{height:"auto"},[`${bt}-item-control`]:{width:"100%"}}},[`${bt}-vertical ${wt}-label,
.${Me}-col-24${wt}-label,
.${Me}-col-xl-24${wt}-label`]:D(Ue),[`@media (max-width: ${Ue.screenXSMax}px)`]:[C(Ue),{[bt]:{[`.${Me}-col-xs-24${wt}-label`]:D(Ue)}}],[`@media (max-width: ${Ue.screenSMMax}px)`]:{[bt]:{[`.${Me}-col-sm-24${wt}-label`]:D(Ue)}},[`@media (max-width: ${Ue.screenMDMax}px)`]:{[bt]:{[`.${Me}-col-md-24${wt}-label`]:D(Ue)}},[`@media (max-width: ${Ue.screenLGMax}px)`]:{[bt]:{[`.${Me}-col-lg-24${wt}-label`]:D(Ue)}}}},$=(Ue,bt)=>(0,v.TS)(Ue,{formItemCls:`${Ue.componentCls}-item`,rootPrefixCls:bt});var ve=(0,x.Z)("Form",(Ue,bt)=>{let{rootPrefixCls:wt}=bt;const Me=$(Ue,wt);return[B(Me),U(Me),T(Me),X(Me),Z(Me),K(Me),(0,N.Z)(Me),k.kr]},Ue=>({labelRequiredMarkColor:Ue.colorError,labelColor:Ue.colorTextHeading,labelFontSize:Ue.fontSize,labelHeight:Ue.controlHeight,labelColonMarginInlineStart:Ue.marginXXS/2,labelColonMarginInlineEnd:Ue.marginXS,itemMarginBottom:Ue.marginLG,verticalLabelPadding:`0 0 ${Ue.paddingXS}px`,verticalLabelMargin:0}),{order:-1e3});const Se=[];function Le(Ue,bt,wt){let Me=arguments.length>3&&arguments[3]!==void 0?arguments[3]:0;return{key:typeof Ue=="string"?Ue:`${bt}-${Me}`,error:Ue,errorStatus:wt}}var te=Ue=>{let{help:bt,helpStatus:wt,errors:Me=Se,warnings:Ae=Se,className:ut,fieldId:ft,onVisibleChanged:Nt}=Ue;const{prefixCls:Pt}=A.useContext(be.Rk),Zt=`${Pt}-item-explain`,[,Ht]=ve(Pt),sn=(0,A.useMemo)(()=>(0,p.Z)(Pt),[Pt]),_n=fe(Me),hn=fe(Ae),Lt=A.useMemo(()=>bt!=null?[Le(bt,"help",wt)]:[].concat((0,L.Z)(_n.map(($t,Xt)=>Le($t,"error","error",Xt))),(0,L.Z)(hn.map(($t,Xt)=>Le($t,"warning","warning",Xt)))),[bt,wt,_n,hn]),Ft={};return ft&&(Ft.id=`${ft}_help`),A.createElement(_e.default,{motionDeadline:sn.motionDeadline,motionName:`${Pt}-show-help`,visible:!!Lt.length,onVisibleChanged:Nt},$t=>{const{className:Xt,style:Wt}=$t;return A.createElement("div",Object.assign({},Ft,{className:ge()(Zt,Xt,ut,Ht),style:Wt,role:"alert"}),A.createElement(_e.CSSMotionList,Object.assign({keys:Lt},(0,p.Z)(Pt),{motionName:`${Pt}-show-help-item`,component:!1}),Dn=>{const{key:pn,error:Gt,errorStatus:Je,className:rt,style:ht}=Dn;return A.createElement("div",{key:pn,className:ge()(rt,{[`${Zt}-${Je}`]:Je}),style:ht},Gt)}))})},j=m(95013),ue=m(36355),R=m(1684),ee=m(52946),G=m(19716),y=m(16722);const E=["parentNode"],Y="form_item";function me(Ue){return Ue===void 0||Ue===!1?[]:Array.isArray(Ue)?Ue:[Ue]}function $e(Ue,bt){if(!Ue.length)return;const wt=Ue.join("_");return bt?`${bt}_${wt}`:E.includes(wt)?`${Y}_${wt}`:wt}function We(Ue,bt,wt,Me,Ae,ut){let ft=Me;return ut!==void 0?ft=ut:wt.validating?ft="validating":Ue.length?ft="error":bt.length?ft="warning":(wt.touched||Ae&&wt.validated)&&(ft="success"),ft}function qe(Ue){return me(Ue).join("_")}function Xe(Ue){const[bt]=(0,j.useForm)(),wt=A.useRef({}),Me=A.useMemo(()=>Ue!=null?Ue:Object.assign(Object.assign({},bt),{__INTERNAL__:{itemRef:Ae=>ut=>{const ft=qe(Ae);ut?wt.current[ft]=ut:delete wt.current[ft]}},scrollToField:function(Ae){let ut=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};const ft=me(Ae),Nt=$e(ft,Me.__INTERNAL__.name),Pt=Nt?document.getElementById(Nt):null;Pt&&(0,y.Z)(Pt,Object.assign({scrollMode:"if-needed",block:"nearest"},ut))},getFieldInstance:Ae=>{const ut=qe(Ae);return wt.current[ut]}}),[Ue,bt]);return[Me]}var gt=m(28726),_t=function(Ue,bt){var wt={};for(var Me in Ue)Object.prototype.hasOwnProperty.call(Ue,Me)&&bt.indexOf(Me)<0&&(wt[Me]=Ue[Me]);if(Ue!=null&&typeof Object.getOwnPropertySymbols=="function")for(var Ae=0,Me=Object.getOwnPropertySymbols(Ue);Ae<Me.length;Ae++)bt.indexOf(Me[Ae])<0&&Object.prototype.propertyIsEnumerable.call(Ue,Me[Ae])&&(wt[Me[Ae]]=Ue[Me[Ae]]);return wt};const st=(Ue,bt)=>{const wt=A.useContext(R.Z),{getPrefixCls:Me,direction:Ae,form:ut}=A.useContext(ue.E_),{prefixCls:ft,className:Nt,rootClassName:Pt,size:Zt,disabled:Ht=wt,form:sn,colon:_n,labelAlign:hn,labelWrap:Lt,labelCol:Ft,wrapperCol:$t,hideRequiredMark:Xt,layout:Wt="horizontal",scrollToFirstError:Dn,requiredMark:pn,onFinishFailed:Gt,name:Je,style:rt,feedbackIcons:ht}=Ue,xt=_t(Ue,["prefixCls","className","rootClassName","size","disabled","form","colon","labelAlign","labelWrap","labelCol","wrapperCol","hideRequiredMark","layout","scrollToFirstError","requiredMark","onFinishFailed","name","style","feedbackIcons"]),mt=(0,G.Z)(Zt),jt=A.useContext(gt.Z),Et=(0,A.useMemo)(()=>pn!==void 0?pn:ut&&ut.requiredMark!==void 0?ut.requiredMark:!Xt,[Xt,pn,ut]),Qt=_n!=null?_n:ut==null?void 0:ut.colon,nn=Me("form",ft),[on,In]=ve(nn),wn=ge()(nn,`${nn}-${Wt}`,{[`${nn}-hide-required-mark`]:Et===!1,[`${nn}-rtl`]:Ae==="rtl",[`${nn}-${mt}`]:mt},In,ut==null?void 0:ut.className,Nt,Pt),[Kn]=Xe(sn),{__INTERNAL__:dn}=Kn;dn.name=Je;const fn=(0,A.useMemo)(()=>({name:Je,labelAlign:hn,labelCol:Ft,labelWrap:Lt,wrapperCol:$t,vertical:Wt==="vertical",colon:Qt,requiredMark:Et,itemRef:dn.itemRef,form:Kn,feedbackIcons:ht}),[Je,hn,Ft,$t,Wt,Qt,Et,Kn,ht]);A.useImperativeHandle(bt,()=>Kn);const Hn=(Yn,On)=>{if(Yn){let Fn={block:"nearest"};typeof Yn=="object"&&(Fn=Yn),Kn.scrollToField(On,Fn)}},Zn=Yn=>{if(Gt==null||Gt(Yn),Yn.errorFields.length){const On=Yn.errorFields[0].name;if(Dn!==void 0){Hn(Dn,On);return}ut&&ut.scrollToFirstError!==void 0&&Hn(ut.scrollToFirstError,On)}};return on(A.createElement(R.n,{disabled:Ht},A.createElement(ee.q,{size:mt},A.createElement(be.RV,Object.assign({},{validateMessages:jt}),A.createElement(be.q3.Provider,{value:fn},A.createElement(j.default,Object.assign({id:Je},xt,{name:Je,onFinishFailed:Zn,form:Kn,style:Object.assign(Object.assign({},ut==null?void 0:ut.style),rt),className:wn})))))))};var un=A.forwardRef(st),Ot=m(41799),Vt=m(8654),lt=m(92343),At=m(11592);function ne(Ue){if(typeof Ue=="function")return Ue;const bt=(0,At.Z)(Ue);return bt.length<=1?bt[0]:bt}const de=()=>{const{status:Ue,errors:bt=[],warnings:wt=[]}=(0,A.useContext)(be.aM);return{status:Ue,errors:bt,warnings:wt}};de.Context=be.aM;var se=de,W=m(16089);function Ie(Ue){const[bt,wt]=A.useState(Ue),Me=(0,A.useRef)(null),Ae=(0,A.useRef)([]),ut=(0,A.useRef)(!1);A.useEffect(()=>(ut.current=!1,()=>{ut.current=!0,W.Z.cancel(Me.current),Me.current=null}),[]);function ft(Nt){ut.current||(Me.current===null&&(Ae.current=[],Me.current=(0,W.Z)(()=>{Me.current=null,wt(Pt=>{let Zt=Pt;return Ae.current.forEach(Ht=>{Zt=Ht(Zt)}),Zt})})),Ae.current.push(Nt))}return[bt,ft]}function M(){const{itemRef:Ue}=A.useContext(be.q3),bt=A.useRef({});function wt(Me,Ae){const ut=Ae&&typeof Ae=="object"&&Ae.ref,ft=Me.join("_");return(bt.current.name!==ft||bt.current.originRef!==ut)&&(bt.current.name=ft,bt.current.originRef=ut,bt.current.ref=(0,Vt.sQ)(Ue(Me),ut)),bt.current.ref}return wt}var ce=m(29194),q=m(34280),le=m(2738),pe=m(27382),De=m(37028);const Te=Ue=>{const{formItemCls:bt}=Ue;return{"@media screen and (-ms-high-contrast: active), (-ms-high-contrast: none)":{[`${bt}-control`]:{display:"flex"}}}};var ke=(0,x.b)(["Form","item-item"],(Ue,bt)=>{let{rootPrefixCls:wt}=bt;const Me=$(Ue,wt);return[Te(Me)]}),Ne=Ue=>{const{prefixCls:bt,status:wt,wrapperCol:Me,children:Ae,errors:ut,warnings:ft,_internalItemRender:Nt,extra:Pt,help:Zt,fieldId:Ht,marginBottom:sn,onErrorVisibleChanged:_n}=Ue,hn=`${bt}-item`,Lt=A.useContext(be.q3),Ft=Me||Lt.wrapperCol||{},$t=ge()(`${hn}-control`,Ft.className),Xt=A.useMemo(()=>Object.assign({},Lt),[Lt]);delete Xt.labelCol,delete Xt.wrapperCol;const Wt=A.createElement("div",{className:`${hn}-control-input`},A.createElement("div",{className:`${hn}-control-input-content`},Ae)),Dn=A.useMemo(()=>({prefixCls:bt,status:wt}),[bt,wt]),pn=sn!==null||ut.length||ft.length?A.createElement("div",{style:{display:"flex",flexWrap:"nowrap"}},A.createElement(be.Rk.Provider,{value:Dn},A.createElement(te,{fieldId:Ht,errors:ut,warnings:ft,help:Zt,helpStatus:wt,className:`${hn}-explain-connected`,onVisibleChanged:_n})),!!sn&&A.createElement("div",{style:{width:0,height:sn}})):null,Gt={};Ht&&(Gt.id=`${Ht}_extra`);const Je=Pt?A.createElement("div",Object.assign({},Gt,{className:`${hn}-extra`}),Pt):null,rt=Nt&&Nt.mark==="pro_table_render"&&Nt.render?Nt.render(Ue,{input:Wt,errorList:pn,extra:Je}):A.createElement(A.Fragment,null,Wt,pn,Je);return A.createElement(be.q3.Provider,{value:Xt},A.createElement(De.Z,Object.assign({},Ft,{className:$t}),rt),A.createElement(ke,{prefixCls:bt}))},nt=m(61485),Qe=m(31724),Ze=m(9763),pt=m(6848),vt=function(Ue,bt){var wt={};for(var Me in Ue)Object.prototype.hasOwnProperty.call(Ue,Me)&&bt.indexOf(Me)<0&&(wt[Me]=Ue[Me]);if(Ue!=null&&typeof Object.getOwnPropertySymbols=="function")for(var Ae=0,Me=Object.getOwnPropertySymbols(Ue);Ae<Me.length;Ae++)bt.indexOf(Me[Ae])<0&&Object.prototype.propertyIsEnumerable.call(Ue,Me[Ae])&&(wt[Me[Ae]]=Ue[Me[Ae]]);return wt};function ct(Ue){return Ue?typeof Ue=="object"&&!A.isValidElement(Ue)?Ue:{title:Ue}:null}var Ut=Ue=>{let{prefixCls:bt,label:wt,htmlFor:Me,labelCol:Ae,labelAlign:ut,colon:ft,required:Nt,requiredMark:Pt,tooltip:Zt}=Ue;var Ht;const[sn]=(0,Ze.Z)("Form"),{vertical:_n,labelAlign:hn,labelCol:Lt,labelWrap:Ft,colon:$t}=A.useContext(be.q3);if(!wt)return null;const Xt=Ae||Lt||{},Wt=ut||hn,Dn=`${bt}-item-label`,pn=ge()(Dn,Wt==="left"&&`${Dn}-left`,Xt.className,{[`${Dn}-wrap`]:!!Ft});let Gt=wt;const Je=ft===!0||$t!==!1&&ft!==!1;Je&&!_n&&typeof wt=="string"&&wt.trim()!==""&&(Gt=wt.replace(/[:|]\s*$/,""));const ht=ct(Zt);if(ht){const{icon:Et=A.createElement(nt.Z,null)}=ht,Qt=vt(ht,["icon"]),nn=A.createElement(pt.Z,Object.assign({},Qt),A.cloneElement(Et,{className:`${bt}-item-tooltip`,title:""}));Gt=A.createElement(A.Fragment,null,Gt,nn)}const xt=Pt==="optional",mt=typeof Pt=="function";mt?Gt=Pt(Gt,{required:!!Nt}):xt&&!Nt&&(Gt=A.createElement(A.Fragment,null,Gt,A.createElement("span",{className:`${bt}-item-optional`,title:""},(sn==null?void 0:sn.optional)||((Ht=Qe.Z.Form)===null||Ht===void 0?void 0:Ht.optional))));const jt=ge()({[`${bt}-item-required`]:Nt,[`${bt}-item-required-mark-optional`]:xt||mt,[`${bt}-item-no-colon`]:!Je});return A.createElement(De.Z,Object.assign({},Xt,{className:pn}),A.createElement("label",{htmlFor:Me,className:jt,title:typeof wt=="string"?wt:""},Gt))},w=m(29679),I=m(19248),dt=m(96512),oe=m(58617);const Pe={success:w.Z,warning:dt.Z,error:I.Z,validating:oe.Z};function vn(Ue){let{children:bt,errors:wt,warnings:Me,hasFeedback:Ae,validateStatus:ut,prefixCls:ft,meta:Nt,noStyle:Pt}=Ue;const Zt=`${ft}-item`,{feedbackIcons:Ht}=A.useContext(be.q3),sn=We(wt,Me,Nt,null,!!Ae,ut),{isFormItemInput:_n,status:hn}=A.useContext(be.aM),Lt=A.useMemo(()=>{var Ft;let $t;if(Ae){const Dn=Ae!==!0&&Ae.icons||Ht,pn=sn&&((Ft=Dn==null?void 0:Dn({status:sn,errors:wt,warnings:Me}))===null||Ft===void 0?void 0:Ft[sn]),Gt=sn&&Pe[sn];$t=pn!==!1&&Gt?A.createElement("span",{className:ge()(`${Zt}-feedback-icon`,`${Zt}-feedback-icon-${sn}`)},pn||A.createElement(Gt,null)):null}let Xt=!0,Wt=sn||"";return Pt&&(Xt=_n,Wt=(sn!=null?sn:hn)||""),{status:Wt,errors:wt,warnings:Me,hasFeedback:!!Ae,feedbackIcon:$t,isFormItemInput:Xt}},[sn,Ae,Pt,_n,hn]);return A.createElement(be.aM.Provider,{value:Lt},bt)}var je=function(Ue,bt){var wt={};for(var Me in Ue)Object.prototype.hasOwnProperty.call(Ue,Me)&&bt.indexOf(Me)<0&&(wt[Me]=Ue[Me]);if(Ue!=null&&typeof Object.getOwnPropertySymbols=="function")for(var Ae=0,Me=Object.getOwnPropertySymbols(Ue);Ae<Me.length;Ae++)bt.indexOf(Me[Ae])<0&&Object.prototype.propertyIsEnumerable.call(Ue,Me[Ae])&&(wt[Me[Ae]]=Ue[Me[Ae]]);return wt};function He(Ue){const{prefixCls:bt,className:wt,rootClassName:Me,style:Ae,help:ut,errors:ft,warnings:Nt,validateStatus:Pt,meta:Zt,hasFeedback:Ht,hidden:sn,children:_n,fieldId:hn,required:Lt,isRequired:Ft,onSubItemMetaChange:$t}=Ue,Xt=je(Ue,["prefixCls","className","rootClassName","style","help","errors","warnings","validateStatus","meta","hasFeedback","hidden","children","fieldId","required","isRequired","onSubItemMetaChange"]),Wt=`${bt}-item`,{requiredMark:Dn}=A.useContext(be.q3),pn=A.useRef(null),Gt=fe(ft),Je=fe(Nt),rt=ut!=null,ht=!!(rt||ft.length||Nt.length),xt=!!pn.current&&(0,ce.Z)(pn.current),[mt,jt]=A.useState(null);(0,q.Z)(()=>{if(ht&&pn.current){const In=getComputedStyle(pn.current);jt(parseInt(In.marginBottom,10))}},[ht,xt]);const Et=In=>{In||jt(null)},nn=function(){let In=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!1;const wn=In?Gt:Zt.errors,Kn=In?Je:Zt.warnings;return We(wn,Kn,Zt,"",!!Ht,Pt)}(),on=ge()(Wt,wt,Me,{[`${Wt}-with-help`]:rt||Gt.length||Je.length,[`${Wt}-has-feedback`]:nn&&Ht,[`${Wt}-has-success`]:nn==="success",[`${Wt}-has-warning`]:nn==="warning",[`${Wt}-has-error`]:nn==="error",[`${Wt}-is-validating`]:nn==="validating",[`${Wt}-hidden`]:sn});return A.createElement("div",{className:on,style:Ae,ref:pn},A.createElement(pe.Z,Object.assign({className:`${Wt}-row`},(0,le.Z)(Xt,["_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"])),A.createElement(Ut,Object.assign({htmlFor:hn},Ue,{requiredMark:Dn,required:Lt!=null?Lt:Ft,prefixCls:bt})),A.createElement(Ne,Object.assign({},Ue,Zt,{errors:Gt,warnings:Je,prefixCls:bt,status:nn,help:ut,marginBottom:mt,onErrorVisibleChanged:Et}),A.createElement(be.qI.Provider,{value:$t},A.createElement(vn,{prefixCls:bt,meta:Zt,errors:Zt.errors,warnings:Zt.warnings,hasFeedback:Ht,validateStatus:nn},_n)))),!!mt&&A.createElement("div",{className:`${Wt}-margin-offset`,style:{marginBottom:-mt}}))}const tt="__SPLIT__",he=null,ie=A.memo(Ue=>{let{children:bt}=Ue;return bt},(Ue,bt)=>Ue.value===bt.value&&Ue.update===bt.update&&Ue.childProps.length===bt.childProps.length&&Ue.childProps.every((wt,Me)=>wt===bt.childProps[Me]));function xe(Ue){return Ue!=null}function Fe(){return{errors:[],warnings:[],touched:!1,validating:!1,name:[],validated:!1}}function V(Ue){const{name:bt,noStyle:wt,className:Me,dependencies:Ae,prefixCls:ut,shouldUpdate:ft,rules:Nt,children:Pt,required:Zt,label:Ht,messageVariables:sn,trigger:_n="onChange",validateTrigger:hn,hidden:Lt,help:Ft}=Ue,{getPrefixCls:$t}=A.useContext(ue.E_),{name:Xt}=A.useContext(be.q3),Wt=ne(Pt),Dn=typeof Wt=="function",pn=A.useContext(be.qI),{validateTrigger:Gt}=A.useContext(j.FieldContext),Je=hn!==void 0?hn:Gt,rt=xe(bt),ht=$t("form",ut),[xt,mt]=ve(ht),jt=A.useContext(j.ListContext),Et=A.useRef(),[Qt,nn]=Ie({}),[on,In]=(0,Ot.Z)(()=>Fe()),wn=On=>{const Fn=jt==null?void 0:jt.getKey(On.name);if(In(On.destroy?Fe():On,!0),wt&&Ft!==!1&&pn){let jn=On.name;if(On.destroy)jn=Et.current||jn;else if(Fn!==void 0){const[Bn,Jn]=Fn;jn=[Bn].concat((0,L.Z)(Jn)),Et.current=jn}pn(On,jn)}},Kn=(On,Fn)=>{nn(jn=>{const Bn=Object.assign({},jn),ur=[].concat((0,L.Z)(On.name.slice(0,-1)),(0,L.Z)(Fn)).join(tt);return On.destroy?delete Bn[ur]:Bn[ur]=On,Bn})},[dn,fn]=A.useMemo(()=>{const On=(0,L.Z)(on.errors),Fn=(0,L.Z)(on.warnings);return Object.values(Qt).forEach(jn=>{On.push.apply(On,(0,L.Z)(jn.errors||[])),Fn.push.apply(Fn,(0,L.Z)(jn.warnings||[]))}),[On,Fn]},[Qt,on.errors,on.warnings]),Hn=M();function Zn(On,Fn,jn){return wt&&!Lt?A.createElement(vn,{prefixCls:ht,hasFeedback:Ue.hasFeedback,validateStatus:Ue.validateStatus,meta:on,errors:dn,warnings:fn,noStyle:!0},On):A.createElement(He,Object.assign({key:"row"},Ue,{className:ge()(Me,mt),prefixCls:ht,fieldId:Fn,isRequired:jn,errors:dn,warnings:fn,meta:on,onSubItemMetaChange:Kn}),On)}if(!rt&&!Dn&&!Ae)return xt(Zn(Wt));let Yn={};return typeof Ht=="string"?Yn.label=Ht:bt&&(Yn.label=String(bt)),sn&&(Yn=Object.assign(Object.assign({},Yn),sn)),xt(A.createElement(j.Field,Object.assign({},Ue,{messageVariables:Yn,trigger:_n,validateTrigger:Je,onMetaChange:wn}),(On,Fn,jn)=>{const Bn=me(bt).length&&Fn?Fn.name:[],Jn=$e(Bn,Xt),ur=Zt!==void 0?Zt:!!(Nt&&Nt.some(Ge=>{if(Ge&&typeof Ge=="object"&&Ge.required&&!Ge.warningOnly)return!0;if(typeof Ge=="function"){const mn=Ge(jn);return mn&&mn.required&&!mn.warningOnly}return!1})),Pn=Object.assign({},On);let bn=null;if(Array.isArray(Wt)&&rt)bn=Wt;else if(!(Dn&&(!(ft||Ae)||rt))){if(!(Ae&&!Dn&&!rt))if((0,lt.l$)(Wt)){const Ge=Object.assign(Object.assign({},Wt.props),Pn);if(Ge.id||(Ge.id=Jn),Ft||dn.length>0||fn.length>0||Ue.extra){const Tn=[];(Ft||dn.length>0)&&Tn.push(`${Jn}_help`),Ue.extra&&Tn.push(`${Jn}_extra`),Ge["aria-describedby"]=Tn.join(" ")}dn.length>0&&(Ge["aria-invalid"]="true"),ur&&(Ge["aria-required"]="true"),(0,Vt.Yr)(Wt)&&(Ge.ref=Hn(Bn,Wt)),new Set([].concat((0,L.Z)(me(_n)),(0,L.Z)(me(Je)))).forEach(Tn=>{Ge[Tn]=function(){for(var Xn,sr,ar,Un,tr,xn=arguments.length,gn=new Array(xn),Vn=0;Vn<xn;Vn++)gn[Vn]=arguments[Vn];(ar=Pn[Tn])===null||ar===void 0||(Xn=ar).call.apply(Xn,[Pn].concat(gn)),(tr=(Un=Wt.props)[Tn])===null||tr===void 0||(sr=tr).call.apply(sr,[Un].concat(gn))}});const Mn=[Ge["aria-required"],Ge["aria-invalid"],Ge["aria-describedby"]];bn=A.createElement(ie,{value:Pn[Ue.valuePropName||"value"],update:Wt,childProps:Mn},(0,lt.Tm)(Wt,Ge))}else Dn&&(ft||Ae)&&!rt?bn=Wt(jn):bn=Wt}return Zn(bn,Jn,ur)}))}const at=V;at.useStatus=se;var Ce=at,It=function(Ue,bt){var wt={};for(var Me in Ue)Object.prototype.hasOwnProperty.call(Ue,Me)&&bt.indexOf(Me)<0&&(wt[Me]=Ue[Me]);if(Ue!=null&&typeof Object.getOwnPropertySymbols=="function")for(var Ae=0,Me=Object.getOwnPropertySymbols(Ue);Ae<Me.length;Ae++)bt.indexOf(Me[Ae])<0&&Object.prototype.propertyIsEnumerable.call(Ue,Me[Ae])&&(wt[Me[Ae]]=Ue[Me[Ae]]);return wt},an=Ue=>{var{prefixCls:bt,children:wt}=Ue,Me=It(Ue,["prefixCls","children"]);const{getPrefixCls:Ae}=A.useContext(ue.E_),ut=Ae("form",bt),ft=A.useMemo(()=>({prefixCls:ut,status:"error"}),[ut]);return A.createElement(j.List,Object.assign({},Me),(Nt,Pt,Zt)=>A.createElement(be.Rk.Provider,{value:ft},wt(Nt.map(Ht=>Object.assign(Object.assign({},Ht),{fieldKey:Ht.key})),Pt,{errors:Zt.errors,warnings:Zt.warnings})))};function en(){const{form:Ue}=(0,A.useContext)(be.q3);return Ue}const Mt=un;Mt.Item=Ce,Mt.List=an,Mt.ErrorList=te,Mt.useForm=Xe,Mt.useFormInstance=en,Mt.useWatch=j.useWatch,Mt.Provider=be.RV,Mt.create=()=>{};var tn=Mt},9432:function(ln,et,m){"use strict";m.d(et,{Z:function(){return U},n:function(){return ae}});var L=m(19248),Q=m(92310),ge=m.n(Q),_e=m(93681),A=m(8654),p=m(59301),be=m(19080),fe=m(36355),o=m(1684),k=m(19716),N=m(32441),v=m(33234),x=m(59412),S=m(9937);function T(X){return!!(X.prefix||X.suffix||X.allowClear)}var z=function(X,Z){var D={};for(var C in X)Object.prototype.hasOwnProperty.call(X,C)&&Z.indexOf(C)<0&&(D[C]=X[C]);if(X!=null&&typeof Object.getOwnPropertySymbols=="function")for(var K=0,C=Object.getOwnPropertySymbols(X);K<C.length;K++)Z.indexOf(C[K])<0&&Object.prototype.propertyIsEnumerable.call(X,C[K])&&(D[C[K]]=X[C[K]]);return D};function ae(X,Z){if(!X)return;X.focus(Z);const{cursor:D}=Z||{};if(D){const C=X.value.length;switch(D){case"start":X.setSelectionRange(0,0);break;case"end":X.setSelectionRange(C,C);break;default:X.setSelectionRange(0,C);break}}}var U=(0,p.forwardRef)((X,Z)=>{var D;const{prefixCls:C,bordered:K=!0,status:$,size:ve,disabled:Se,onBlur:Le,onFocus:ye,suffix:te,allowClear:j,addonAfter:ue,addonBefore:R,className:ee,style:G,styles:y,rootClassName:E,onChange:Y,classNames:me}=X,$e=z(X,["prefixCls","bordered","status","size","disabled","onBlur","onFocus","suffix","allowClear","addonAfter","addonBefore","className","style","styles","rootClassName","onChange","classNames"]),{getPrefixCls:We,direction:qe,input:Xe}=p.useContext(fe.E_),gt=We("input",C),_t=(0,p.useRef)(null),[st,Kt]=(0,S.ZP)(gt),{compactSize:un,compactItemClassnames:Ot}=(0,v.ri)(gt,qe),Vt=(0,k.Z)(ke=>{var Oe;return(Oe=ve!=null?ve:un)!==null&&Oe!==void 0?Oe:ke}),lt=p.useContext(o.Z),At=Se!=null?Se:lt,{status:ne,hasFeedback:de,feedbackIcon:se}=(0,p.useContext)(N.aM),W=(0,be.F)(ne,$),Ie=T(X)||!!de,M=(0,p.useRef)(Ie);(0,p.useEffect)(()=>{var ke;Ie&&M.current,M.current=Ie},[Ie]);const ce=(0,x.Z)(_t,!0),q=ke=>{ce(),Le==null||Le(ke)},le=ke=>{ce(),ye==null||ye(ke)},pe=ke=>{ce(),Y==null||Y(ke)},De=(de||te)&&p.createElement(p.Fragment,null,te,de&&se);let Te;return typeof j=="object"&&(j!=null&&j.clearIcon)?Te=j:j&&(Te={clearIcon:p.createElement(L.Z,null)}),st(p.createElement(_e.default,Object.assign({ref:(0,A.sQ)(Z,_t),prefixCls:gt,autoComplete:Xe==null?void 0:Xe.autoComplete},$e,{disabled:At,onBlur:q,onFocus:le,style:Object.assign(Object.assign({},Xe==null?void 0:Xe.style),G),styles:Object.assign(Object.assign({},Xe==null?void 0:Xe.styles),y),suffix:De,allowClear:Te,className:ge()(ee,E,Ot,Xe==null?void 0:Xe.className),onChange:pe,addonAfter:ue&&p.createElement(v.BR,null,p.createElement(N.Ux,{override:!0,status:!0},ue)),addonBefore:R&&p.createElement(v.BR,null,p.createElement(N.Ux,{override:!0,status:!0},R)),classNames:Object.assign(Object.assign(Object.assign({},me),Xe==null?void 0:Xe.classNames),{input:ge()({[`${gt}-sm`]:Vt==="small",[`${gt}-lg`]:Vt==="large",[`${gt}-rtl`]:qe==="rtl",[`${gt}-borderless`]:!K},!Ie&&(0,be.Z)(gt,W),me==null?void 0:me.input,(D=Xe==null?void 0:Xe.classNames)===null||D===void 0?void 0:D.input,Kt)}),classes:{affixWrapper:ge()({[`${gt}-affix-wrapper-sm`]:Vt==="small",[`${gt}-affix-wrapper-lg`]:Vt==="large",[`${gt}-affix-wrapper-rtl`]:qe==="rtl",[`${gt}-affix-wrapper-borderless`]:!K},(0,be.Z)(`${gt}-affix-wrapper`,W,de),Kt),wrapper:ge()({[`${gt}-group-rtl`]:qe==="rtl"},Kt),group:ge()({[`${gt}-group-wrapper-sm`]:Vt==="small",[`${gt}-group-wrapper-lg`]:Vt==="large",[`${gt}-group-wrapper-rtl`]:qe==="rtl",[`${gt}-group-wrapper-disabled`]:At},(0,be.Z)(`${gt}-group-wrapper`,W,de),Kt)}})))})},1643:function(ln,et,m){"use strict";var L=m(19248),Q=m(92310),ge=m.n(Q),_e=m(9296),A=m(59301),p=m(19080),be=m(36355),fe=m(1684),o=m(19716),k=m(32441),N=m(9432),v=m(9937),x=function(T,z){var ae={};for(var B in T)Object.prototype.hasOwnProperty.call(T,B)&&z.indexOf(B)<0&&(ae[B]=T[B]);if(T!=null&&typeof Object.getOwnPropertySymbols=="function")for(var U=0,B=Object.getOwnPropertySymbols(T);U<B.length;U++)z.indexOf(B[U])<0&&Object.prototype.propertyIsEnumerable.call(T,B[U])&&(ae[B[U]]=T[B[U]]);return ae};const S=(0,A.forwardRef)((T,z)=>{const{prefixCls:ae,bordered:B=!0,size:U,disabled:X,status:Z,allowClear:D,showCount:C,classNames:K,rootClassName:$,className:ve}=T,Se=x(T,["prefixCls","bordered","size","disabled","status","allowClear","showCount","classNames","rootClassName","className"]),{getPrefixCls:Le,direction:ye}=A.useContext(be.E_),te=(0,o.Z)(U),j=A.useContext(fe.Z),ue=X!=null?X:j,{status:R,hasFeedback:ee,feedbackIcon:G}=A.useContext(k.aM),y=(0,p.F)(R,Z),E=A.useRef(null);A.useImperativeHandle(z,()=>{var qe;return{resizableTextArea:(qe=E.current)===null||qe===void 0?void 0:qe.resizableTextArea,focus:Xe=>{var gt,_t;(0,N.n)((_t=(gt=E.current)===null||gt===void 0?void 0:gt.resizableTextArea)===null||_t===void 0?void 0:_t.textArea,Xe)},blur:()=>{var Xe;return(Xe=E.current)===null||Xe===void 0?void 0:Xe.blur()}}});const Y=Le("input",ae);let me;typeof D=="object"&&(D!=null&&D.clearIcon)?me=D:D&&(me={clearIcon:A.createElement(L.Z,null)});const[$e,We]=(0,v.ZP)(Y);return $e(A.createElement(_e.default,Object.assign({},Se,{disabled:ue,allowClear:me,className:ge()(ve,$),classes:{affixWrapper:ge()(`${Y}-textarea-affix-wrapper`,{[`${Y}-affix-wrapper-rtl`]:ye==="rtl",[`${Y}-affix-wrapper-borderless`]:!B,[`${Y}-affix-wrapper-sm`]:te==="small",[`${Y}-affix-wrapper-lg`]:te==="large",[`${Y}-textarea-show-count`]:C},(0,p.Z)(`${Y}-affix-wrapper`,y),We)},classNames:Object.assign(Object.assign({},K),{textarea:ge()({[`${Y}-borderless`]:!B,[`${Y}-sm`]:te==="small",[`${Y}-lg`]:te==="large"},(0,p.Z)(Y,y),We,K==null?void 0:K.textarea)}),prefixCls:Y,suffix:ee&&A.createElement("span",{className:`${Y}-textarea-suffix`},G),showCount:C,ref:E})))});et.Z=S},59412:function(ln,et,m){"use strict";m.d(et,{Z:function(){return Q}});var L=m(59301);function Q(ge,_e){const A=(0,L.useRef)([]),p=()=>{A.current.push(setTimeout(()=>{var be,fe,o,k;!((be=ge.current)===null||be===void 0)&&be.input&&((fe=ge.current)===null||fe===void 0?void 0:fe.input.getAttribute("type"))==="password"&&(!((o=ge.current)===null||o===void 0)&&o.input.hasAttribute("value"))&&((k=ge.current)===null||k===void 0||k.input.removeAttribute("value"))}))};return(0,L.useEffect)(()=>(_e&&p(),()=>A.current.forEach(be=>{be&&clearTimeout(be)})),[]),p}},92832:function(ln,et,m){"use strict";m.d(et,{default:function(){return te}});var L=m(92310),Q=m.n(L),ge=m(59301),_e=m(36355),A=m(32441),p=m(9937),fe=j=>{const{getPrefixCls:ue,direction:R}=(0,ge.useContext)(_e.E_),{prefixCls:ee,className:G}=j,y=ue("input-group",ee),E=ue("input"),[Y,me]=(0,p.ZP)(E),$e=Q()(y,{[`${y}-lg`]:j.size==="large",[`${y}-sm`]:j.size==="small",[`${y}-compact`]:j.compact,[`${y}-rtl`]:R==="rtl"},me,G),We=(0,ge.useContext)(A.aM),qe=(0,ge.useMemo)(()=>Object.assign(Object.assign({},We),{isFormItemInput:!1}),[We]);return Y(ge.createElement("span",{className:$e,style:j.style,onMouseEnter:j.onMouseEnter,onMouseLeave:j.onMouseLeave,onFocus:j.onFocus,onBlur:j.onBlur},ge.createElement(A.aM.Provider,{value:qe},j.children)))},o=m(9432),k=m(73331),N=m(15277),v=m(2738),x=m(8654),S=m(59412),T=function(j,ue){var R={};for(var ee in j)Object.prototype.hasOwnProperty.call(j,ee)&&ue.indexOf(ee)<0&&(R[ee]=j[ee]);if(j!=null&&typeof Object.getOwnPropertySymbols=="function")for(var G=0,ee=Object.getOwnPropertySymbols(j);G<ee.length;G++)ue.indexOf(ee[G])<0&&Object.prototype.propertyIsEnumerable.call(j,ee[G])&&(R[ee[G]]=j[ee[G]]);return R};const z=j=>j?ge.createElement(N.Z,null):ge.createElement(k.Z,null),ae={click:"onClick",hover:"onMouseOver"};var U=ge.forwardRef((j,ue)=>{const{visibilityToggle:R=!0}=j,ee=typeof R=="object"&&R.visible!==void 0,[G,y]=(0,ge.useState)(()=>ee?R.visible:!1),E=(0,ge.useRef)(null);ge.useEffect(()=>{ee&&y(R.visible)},[ee,R]);const Y=(0,S.Z)(E),me=()=>{const{disabled:At}=j;At||(G&&Y(),y(ne=>{var de;const se=!ne;return typeof R=="object"&&((de=R.onVisibleChange)===null||de===void 0||de.call(R,se)),se}))},$e=At=>{const{action:ne="click",iconRender:de=z}=j,se=ae[ne]||"",W=de(G),Ie={[se]:me,className:`${At}-icon`,key:"passwordIcon",onMouseDown:M=>{M.preventDefault()},onMouseUp:M=>{M.preventDefault()}};return ge.cloneElement(ge.isValidElement(W)?W:ge.createElement("span",null,W),Ie)},{className:We,prefixCls:qe,inputPrefixCls:Xe,size:gt}=j,_t=T(j,["className","prefixCls","inputPrefixCls","size"]),{getPrefixCls:st}=ge.useContext(_e.E_),Kt=st("input",Xe),un=st("input-password",qe),Ot=R&&$e(un),Vt=Q()(un,We,{[`${un}-${gt}`]:!!gt}),lt=Object.assign(Object.assign({},(0,v.Z)(_t,["suffix","iconRender","visibilityToggle"])),{type:G?"text":"password",className:Vt,prefixCls:Kt,suffix:Ot});return gt&&(lt.size=gt),ge.createElement(o.Z,Object.assign({ref:(0,x.sQ)(ue,E)},lt))}),X=m(47472),Z=m(92343),D=m(3113),C=m(19716),K=m(33234),$=function(j,ue){var R={};for(var ee in j)Object.prototype.hasOwnProperty.call(j,ee)&&ue.indexOf(ee)<0&&(R[ee]=j[ee]);if(j!=null&&typeof Object.getOwnPropertySymbols=="function")for(var G=0,ee=Object.getOwnPropertySymbols(j);G<ee.length;G++)ue.indexOf(ee[G])<0&&Object.prototype.propertyIsEnumerable.call(j,ee[G])&&(R[ee[G]]=j[ee[G]]);return R},Se=ge.forwardRef((j,ue)=>{const{prefixCls:R,inputPrefixCls:ee,className:G,size:y,suffix:E,enterButton:Y=!1,addonAfter:me,loading:$e,disabled:We,onSearch:qe,onChange:Xe,onCompositionStart:gt,onCompositionEnd:_t}=j,st=$(j,["prefixCls","inputPrefixCls","className","size","suffix","enterButton","addonAfter","loading","disabled","onSearch","onChange","onCompositionStart","onCompositionEnd"]),{getPrefixCls:Kt,direction:un}=ge.useContext(_e.E_),Ot=ge.useRef(!1),Vt=Kt("input-search",R),lt=Kt("input",ee),{compactSize:At}=(0,K.ri)(Vt,un),ne=(0,C.Z)(Ne=>{var nt;return(nt=y!=null?y:At)!==null&&nt!==void 0?nt:Ne}),de=ge.useRef(null),se=Ne=>{Ne&&Ne.target&&Ne.type==="click"&&qe&&qe(Ne.target.value,Ne,{source:"clear"}),Xe&&Xe(Ne)},W=Ne=>{var nt;document.activeElement===((nt=de.current)===null||nt===void 0?void 0:nt.input)&&Ne.preventDefault()},Ie=Ne=>{var nt,Qe;qe&&qe((Qe=(nt=de.current)===null||nt===void 0?void 0:nt.input)===null||Qe===void 0?void 0:Qe.value,Ne,{source:"input"})},M=Ne=>{Ot.current||$e||Ie(Ne)},ce=typeof Y=="boolean"?ge.createElement(X.Z,null):null,q=`${Vt}-button`;let le;const pe=Y||{},De=pe.type&&pe.type.__ANT_BUTTON===!0;De||pe.type==="button"?le=(0,Z.Tm)(pe,Object.assign({onMouseDown:W,onClick:Ne=>{var nt,Qe;(Qe=(nt=pe==null?void 0:pe.props)===null||nt===void 0?void 0:nt.onClick)===null||Qe===void 0||Qe.call(nt,Ne),Ie(Ne)},key:"enterButton"},De?{className:q,size:ne}:{})):le=ge.createElement(D.ZP,{className:q,type:Y?"primary":void 0,size:ne,disabled:We,key:"enterButton",onMouseDown:W,onClick:Ie,loading:$e,icon:ce},Y),me&&(le=[le,(0,Z.Tm)(me,{key:"addonAfter"})]);const Te=Q()(Vt,{[`${Vt}-rtl`]:un==="rtl",[`${Vt}-${ne}`]:!!ne,[`${Vt}-with-button`]:!!Y},G),ke=Ne=>{Ot.current=!0,gt==null||gt(Ne)},Oe=Ne=>{Ot.current=!1,_t==null||_t(Ne)};return ge.createElement(o.Z,Object.assign({ref:(0,x.sQ)(de,ue),onPressEnter:M},st,{size:ne,onCompositionStart:ke,onCompositionEnd:Oe,prefixCls:lt,addonAfter:le,suffix:E,onChange:se,className:Te,disabled:We}))}),Le=m(1643);const ye=o.Z;ye.Group=fe,ye.Search=Se,ye.TextArea=Le.Z,ye.Password=U;var te=ye},9937:function(ln,et,m){"use strict";m.d(et,{M1:function(){return be},TM:function(){return Z},Xy:function(){return fe},bi:function(){return N},e5:function(){return X},ik:function(){return v},nz:function(){return A},pU:function(){return p},s7:function(){return x},x0:function(){return k}});var L=m(17313),Q=m(74207),ge=m(37613),_e=m(83116);const A=D=>({"&::-moz-placeholder":{opacity:1},"&::placeholder":{color:D,userSelect:"none"},"&:placeholder-shown":{textOverflow:"ellipsis"}}),p=D=>({borderColor:D.hoverBorderColor}),be=D=>({borderColor:D.activeBorderColor,boxShadow:D.activeShadow,outline:0}),fe=D=>({color:D.colorTextDisabled,backgroundColor:D.colorBgContainerDisabled,borderColor:D.colorBorder,boxShadow:"none",cursor:"not-allowed",opacity:1,"&:hover":Object.assign({},p((0,ge.TS)(D,{hoverBorderColor:D.colorBorder})))}),o=D=>{const{paddingBlockLG:C,fontSizeLG:K,lineHeightLG:$,borderRadiusLG:ve,paddingInlineLG:Se}=D;return{padding:`${C}px ${Se}px`,fontSize:K,lineHeight:$,borderRadius:ve}},k=D=>({padding:`${D.paddingBlockSM}px ${D.paddingInlineSM}px`,borderRadius:D.borderRadiusSM}),N=(D,C)=>{const{componentCls:K,colorError:$,colorWarning:ve,errorActiveShadow:Se,warningActiveShadow:Le,colorErrorBorderHover:ye,colorWarningBorderHover:te}=D;return{[`&-status-error:not(${C}-disabled):not(${C}-borderless)${C}`]:{borderColor:$,"&:hover":{borderColor:ye},"&:focus, &-focused":Object.assign({},be((0,ge.TS)(D,{activeBorderColor:$,activeShadow:Se}))),[`${K}-prefix, ${K}-suffix`]:{color:$}},[`&-status-warning:not(${C}-disabled):not(${C}-borderless)${C}`]:{borderColor:ve,"&:hover":{borderColor:te},"&:focus, &-focused":Object.assign({},be((0,ge.TS)(D,{activeBorderColor:ve,activeShadow:Le}))),[`${K}-prefix, ${K}-suffix`]:{color:ve}}}},v=D=>Object.assign(Object.assign({position:"relative",display:"inline-block",width:"100%",minWidth:0,padding:`${D.paddingBlock}px ${D.paddingInline}px`,color:D.colorText,fontSize:D.fontSize,lineHeight:D.lineHeight,backgroundColor:D.colorBgContainer,backgroundImage:"none",borderWidth:D.lineWidth,borderStyle:D.lineType,borderColor:D.colorBorder,borderRadius:D.borderRadius,transition:`all ${D.motionDurationMid}`},A(D.colorTextPlaceholder)),{"&:hover":Object.assign({},p(D)),"&:focus, &-focused":Object.assign({},be(D)),"&-disabled, &[disabled]":Object.assign({},fe(D)),"&-borderless":{"&, &:hover, &:focus, &-focused, &-disabled, &[disabled]":{backgroundColor:"transparent",border:"none",boxShadow:"none"}},"textarea&":{maxWidth:"100%",height:"auto",minHeight:D.controlHeight,lineHeight:D.lineHeight,verticalAlign:"bottom",transition:`all ${D.motionDurationSlow}, height 0s`,resize:"vertical"},"&-lg":Object.assign({},o(D)),"&-sm":Object.assign({},k(D)),"&-rtl":{direction:"rtl"},"&-textarea-rtl":{direction:"rtl"}}),x=D=>{const{componentCls:C,antCls:K}=D;return{position:"relative",display:"table",width:"100%",borderCollapse:"separate",borderSpacing:0,"&[class*='col-']":{paddingInlineEnd:D.paddingXS,"&:last-child":{paddingInlineEnd:0}},[`&-lg ${C}, &-lg > ${C}-group-addon`]:Object.assign({},o(D)),[`&-sm ${C}, &-sm > ${C}-group-addon`]:Object.assign({},k(D)),[`&-lg ${K}-select-single ${K}-select-selector`]:{height:D.controlHeightLG},[`&-sm ${K}-select-single ${K}-select-selector`]:{height:D.controlHeightSM},[`> ${C}`]:{display:"table-cell","&:not(:first-child):not(:last-child)":{borderRadius:0}},[`${C}-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 ${D.paddingInline}px`,color:D.colorText,fontWeight:"normal",fontSize:D.fontSize,textAlign:"center",backgroundColor:D.colorFillAlter,border:`${D.lineWidth}px ${D.lineType} ${D.colorBorder}`,borderRadius:D.borderRadius,transition:`all ${D.motionDurationSlow}`,lineHeight:1,[`${K}-select`]:{margin:`-${D.paddingBlock+1}px -${D.paddingInline}px`,[`&${K}-select-single:not(${K}-select-customize-input)`]:{[`${K}-select-selector`]:{backgroundColor:"inherit",border:`${D.lineWidth}px ${D.lineType} transparent`,boxShadow:"none"}},"&-open, &-focused":{[`${K}-select-selector`]:{color:D.colorPrimary}}},[`${K}-cascader-picker`]:{margin:`-9px -${D.paddingInline}px`,backgroundColor:"transparent",[`${K}-cascader-input`]:{textAlign:"start",border:0,boxShadow:"none"}}},"&-addon:first-child":{borderInlineEnd:0},"&-addon:last-child":{borderInlineStart:0}},[`${C}`]:{width:"100%",marginBottom:0,textAlign:"inherit","&:focus":{zIndex:1,borderInlineEndWidth:1},"&:hover":{zIndex:1,borderInlineEndWidth:1,[`${C}-search-with-button &`]:{zIndex:0}}},[`> ${C}:first-child, ${C}-group-addon:first-child`]:{borderStartEndRadius:0,borderEndEndRadius:0,[`${K}-select ${K}-select-selector`]:{borderStartEndRadius:0,borderEndEndRadius:0}},[`> ${C}-affix-wrapper`]:{[`&:not(:first-child) ${C}`]:{borderStartStartRadius:0,borderEndStartRadius:0},[`&:not(:last-child) ${C}`]:{borderStartEndRadius:0,borderEndEndRadius:0}},[`> ${C}:last-child, ${C}-group-addon:last-child`]:{borderStartStartRadius:0,borderEndStartRadius:0,[`${K}-select ${K}-select-selector`]:{borderStartStartRadius:0,borderEndStartRadius:0}},[`${C}-affix-wrapper`]:{"&:not(:last-child)":{borderStartEndRadius:0,borderEndEndRadius:0,[`${C}-search &`]:{borderStartStartRadius:D.borderRadius,borderEndStartRadius:D.borderRadius}},[`&:not(:first-child), ${C}-search &:not(:first-child)`]:{borderStartStartRadius:0,borderEndStartRadius:0}},[`&${C}-group-compact`]:Object.assign(Object.assign({display:"block"},(0,L.dF)()),{[`${C}-group-addon, ${C}-group-wrap, > ${C}`]:{"&:not(:first-child):not(:last-child)":{borderInlineEndWidth:D.lineWidth,"&:hover":{zIndex:1},"&:focus":{zIndex:1}}},"& > *":{display:"inline-block",float:"none",verticalAlign:"top",borderRadius:0},[`
& > ${C}-affix-wrapper,
& > ${C}-number-affix-wrapper,
& > ${K}-picker-range
`]:{display:"inline-flex"},"& > *:not(:last-child)":{marginInlineEnd:-D.lineWidth,borderInlineEndWidth:D.lineWidth},[`${C}`]:{float:"none"},[`& > ${K}-select > ${K}-select-selector,
& > ${K}-select-auto-complete ${C},
& > ${K}-cascader-picker ${C},
& > ${C}-group-wrapper ${C}`]:{borderInlineEndWidth:D.lineWidth,borderRadius:0,"&:hover":{zIndex:1},"&:focus":{zIndex:1}},[`& > ${K}-select-focused`]:{zIndex:1},[`& > ${K}-select > ${K}-select-arrow`]:{zIndex:1},[`& > *:first-child,
& > ${K}-select:first-child > ${K}-select-selector,
& > ${K}-select-auto-complete:first-child ${C},
& > ${K}-cascader-picker:first-child ${C}`]:{borderStartStartRadius:D.borderRadius,borderEndStartRadius:D.borderRadius},[`& > *:last-child,
& > ${K}-select:last-child > ${K}-select-selector,
& > ${K}-cascader-picker:last-child ${C},
& > ${K}-cascader-picker-focused:last-child ${C}`]:{borderInlineEndWidth:D.lineWidth,borderStartEndRadius:D.borderRadius,borderEndEndRadius:D.borderRadius},[`& > ${K}-select-auto-complete ${C}`]:{verticalAlign:"top"},[`${C}-group-wrapper + ${C}-group-wrapper`]:{marginInlineStart:-D.lineWidth,[`${C}-affix-wrapper`]:{borderRadius:0}},[`${C}-group-wrapper:not(:last-child)`]:{[`&${C}-search > ${C}-group`]:{[`& > ${C}-group-addon > ${C}-search-button`]:{borderRadius:0},[`& > ${C}`]:{borderStartStartRadius:D.borderRadius,borderStartEndRadius:0,borderEndEndRadius:0,borderEndStartRadius:D.borderRadius}}}})}},S=D=>{const{componentCls:C,controlHeightSM:K,lineWidth:$}=D,Se=(K-$*2-16)/2;return{[C]:Object.assign(Object.assign(Object.assign(Object.assign({},(0,L.Wf)(D)),v(D)),N(D,C)),{'&[type="color"]':{height:D.controlHeight,[`&${C}-lg`]:{height:D.controlHeightLG},[`&${C}-sm`]:{height:K,paddingTop:Se,paddingBottom:Se}},'&[type="search"]::-webkit-search-cancel-button, &[type="search"]::-webkit-search-decoration':{"-webkit-appearance":"none"}})}},T=D=>{const{componentCls:C}=D;return{[`${C}-clear-icon`]:{margin:0,color:D.colorTextQuaternary,fontSize:D.fontSizeIcon,verticalAlign:-1,cursor:"pointer",transition:`color ${D.motionDurationSlow}`,"&:hover":{color:D.colorTextTertiary},"&:active":{color:D.colorText},"&-hidden":{visibility:"hidden"},"&-has-suffix":{margin:`0 ${D.inputAffixPadding}px`}}}},z=D=>{const{componentCls:C,inputAffixPadding:K,colorTextDescription:$,motionDurationSlow:ve,colorIcon:Se,colorIconHover:Le,iconCls:ye}=D;return{[`${C}-affix-wrapper`]:Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({},v(D)),{display:"inline-flex",[`&:not(${C}-affix-wrapper-disabled):hover`]:Object.assign(Object.assign({},p(D)),{zIndex:1,[`${C}-search-with-button &`]:{zIndex:0}}),"&-focused, &:focus":{zIndex:1},"&-disabled":{[`${C}[disabled]`]:{background:"transparent"}},[`> input${C}`]:{padding:0,fontSize:"inherit",border:"none",borderRadius:0,outline:"none","&::-ms-reveal":{display:"none"},"&:focus":{boxShadow:"none !important"}},"&::before":{display:"inline-block",width:0,visibility:"hidden",content:'"\\a0"'},[`${C}`]:{"&-prefix, &-suffix":{display:"flex",flex:"none",alignItems:"center","> *:not(:last-child)":{marginInlineEnd:D.paddingXS}},"&-show-count-suffix":{color:$},"&-show-count-has-suffix":{marginInlineEnd:D.paddingXXS},"&-prefix":{marginInlineEnd:K},"&-suffix":{marginInlineStart:K}}}),T(D)),{[`${ye}${C}-password-icon`]:{color:Se,cursor:"pointer",transition:`all ${ve}`,"&:hover":{color:Le}}}),N(D,`${C}-affix-wrapper`))}},ae=D=>{const{componentCls:C,colorError:K,colorWarning:$,borderRadiusLG:ve,borderRadiusSM:Se}=D;return{[`${C}-group`]:Object.assign(Object.assign(Object.assign({},(0,L.Wf)(D)),x(D)),{"&-rtl":{direction:"rtl"},"&-wrapper":{display:"inline-block",width:"100%",textAlign:"start",verticalAlign:"top","&-rtl":{direction:"rtl"},"&-lg":{[`${C}-group-addon`]:{borderRadius:ve,fontSize:D.fontSizeLG}},"&-sm":{[`${C}-group-addon`]:{borderRadius:Se}},"&-status-error":{[`${C}-group-addon`]:{color:K,borderColor:K}},"&-status-warning":{[`${C}-group-addon`]:{color:$,borderColor:$}},"&-disabled":{[`${C}-group-addon`]:Object.assign({},fe(D))},[`&:not(${C}-compact-first-item):not(${C}-compact-last-item)${C}-compact-item`]:{[`${C}, ${C}-group-addon`]:{borderRadius:0}},[`&:not(${C}-compact-last-item)${C}-compact-first-item`]:{[`${C}, ${C}-group-addon`]:{borderStartEndRadius:0,borderEndEndRadius:0}},[`&:not(${C}-compact-first-item)${C}-compact-last-item`]:{[`${C}, ${C}-group-addon`]:{borderStartStartRadius:0,borderEndStartRadius:0}}}})}},B=D=>{const{componentCls:C,antCls:K}=D,$=`${C}-search`;return{[$]:{[`${C}`]:{"&:hover, &:focus":{borderColor:D.colorPrimaryHover,[`+ ${C}-group-addon ${$}-button:not(${K}-btn-primary)`]:{borderInlineStartColor:D.colorPrimaryHover}}},[`${C}-affix-wrapper`]:{borderRadius:0},[`${C}-lg`]:{lineHeight:D.lineHeightLG-2e-4},[`> ${C}-group`]:{[`> ${C}-group-addon:last-child`]:{insetInlineStart:-1,padding:0,border:0,[`${$}-button`]:{paddingTop:0,paddingBottom:0,borderStartStartRadius:0,borderStartEndRadius:D.borderRadius,borderEndEndRadius:D.borderRadius,borderEndStartRadius:0,boxShadow:"none"},[`${$}-button:not(${K}-btn-primary)`]:{color:D.colorTextDescription,"&:hover":{color:D.colorPrimaryHover},"&:active":{color:D.colorPrimaryActive},[`&${K}-btn-loading::before`]:{insetInlineStart:0,insetInlineEnd:0,insetBlockStart:0,insetBlockEnd:0}}}},[`${$}-button`]:{height:D.controlHeight,"&:hover, &:focus":{zIndex:1}},[`&-large ${$}-button`]:{height:D.controlHeightLG},[`&-small ${$}-button`]:{height:D.controlHeightSM},"&-rtl":{direction:"rtl"},[`&${C}-compact-item`]:{[`&:not(${C}-compact-last-item)`]:{[`${C}-group-addon`]:{[`${C}-search-button`]:{marginInlineEnd:-D.lineWidth,borderRadius:0}}},[`&:not(${C}-compact-first-item)`]:{[`${C},${C}-affix-wrapper`]:{borderRadius:0}},[`> ${C}-group-addon ${C}-search-button,
> ${C},
${C}-affix-wrapper`]:{"&:hover,&:focus,&:active":{zIndex:2}},[`> ${C}-affix-wrapper-focused`]:{zIndex:2}}}}},U=D=>{const{componentCls:C,paddingLG:K}=D,$=`${C}-textarea`;return{[$]:{position:"relative","&-show-count":{[`> ${C}`]:{height:"100%"},[`${C}-data-count`]:{position:"absolute",bottom:-D.fontSize*D.lineHeight,insetInlineEnd:0,color:D.colorTextDescription,whiteSpace:"nowrap",pointerEvents:"none"}},"&-allow-clear":{[`> ${C}`]:{paddingInlineEnd:K}},[`&-affix-wrapper${$}-has-feedback`]:{[`${C}`]:{paddingInlineEnd:K}},[`&-affix-wrapper${C}-affix-wrapper`]:{padding:0,[`> textarea${C}`]:{fontSize:"inherit",border:"none",outline:"none","&:focus":{boxShadow:"none !important"}},[`${C}-suffix`]:{margin:0,"> *:not(:last-child)":{marginInline:0},[`${C}-clear-icon`]:{position:"absolute",insetInlineEnd:D.paddingXS,insetBlockStart:D.paddingXS},[`${$}-suffix`]:{position:"absolute",top:0,insetInlineEnd:D.paddingInline,bottom:0,zIndex:1,display:"inline-flex",alignItems:"center",margin:"auto",pointerEvents:"none"}}}}}};function X(D){return(0,ge.TS)(D,{inputAffixPadding:D.paddingXXS})}const Z=D=>{const{controlHeight:C,fontSize:K,lineHeight:$,lineWidth:ve,controlHeightSM:Se,controlHeightLG:Le,fontSizeLG:ye,lineHeightLG:te,paddingSM:j,controlPaddingHorizontalSM:ue,controlPaddingHorizontal:R,colorFillAlter:ee,colorPrimaryHover:G,controlOutlineWidth:y,controlOutline:E,colorErrorOutline:Y,colorWarningOutline:me}=D;return{paddingBlock:Math.max(Math.round((C-K*$)/2*10)/10-ve,3),paddingBlockSM:Math.max(Math.round((Se-K*$)/2*10)/10-ve,0),paddingBlockLG:Math.ceil((Le-ye*te)/2*10)/10-ve,paddingInline:j-ve,paddingInlineSM:ue-ve,paddingInlineLG:R-ve,addonBg:ee,activeBorderColor:G,hoverBorderColor:G,activeShadow:`0 0 0 ${y}px ${E}`,errorActiveShadow:`0 0 0 ${y}px ${Y}`,warningActiveShadow:`0 0 0 ${y}px ${me}`}};et.ZP=(0,_e.Z)("Input",D=>{const C=(0,ge.TS)(D,X(D));return[S(C),U(C),z(C),ae(C),B(C),(0,Q.c)(C)]},Z)},45818:function(ln,et,m){"use strict";m.d(et,{D:function(){return X},Z:function(){return C}});var L=m(72308),Q=m(59301),ge={icon:{tag:"svg",attrs:{viewBox:"0 0 1024 1024",focusable:"false"},children:[{tag:"path",attrs:{d:"M912 192H328c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h584c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8zm0 284H328c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h584c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8zm0 284H328c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h584c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8zM104 228a56 56 0 10112 0 56 56 0 10-112 0zm0 284a56 56 0 10112 0 56 56 0 10-112 0zm0 284a56 56 0 10112 0 56 56 0 10-112 0z"}}]},name:"bars",theme:"outlined"},_e=ge,A=m(7657),p=function($,ve){return Q.createElement(A.Z,(0,L.Z)({},$,{ref:ve,icon:_e}))},be=Q.forwardRef(p),fe=be,o=m(33853),k=m(38819),N=m(92310),v=m.n(N),x=m(2738),T=K=>!isNaN(parseFloat(K))&&isFinite(K),z=m(36355),ae=m(84966),B=function(K,$){var ve={};for(var Se in K)Object.prototype.hasOwnProperty.call(K,Se)&&$.indexOf(Se)<0&&(ve[Se]=K[Se]);if(K!=null&&typeof Object.getOwnPropertySymbols=="function")for(var Le=0,Se=Object.getOwnPropertySymbols(K);Le<Se.length;Le++)$.indexOf(Se[Le])<0&&Object.prototype.propertyIsEnumerable.call(K,Se[Le])&&(ve[Se[Le]]=K[Se[Le]]);return ve};const U={xs:"479.98px",sm:"575.98px",md:"767.98px",lg:"991.98px",xl:"1199.98px",xxl:"1599.98px"},X=Q.createContext({}),Z=(()=>{let K=0;return function(){let $=arguments.length>0&&arguments[0]!==void 0?arguments[0]:"";return K+=1,`${$}${K}`}})();var C=Q.forwardRef((K,$)=>{const{prefixCls:ve,className:Se,trigger:Le,children:ye,defaultCollapsed:te=!1,theme:j="dark",style:ue={},collapsible:R=!1,reverseArrow:ee=!1,width:G=200,collapsedWidth:y=80,zeroWidthTriggerStyle:E,breakpoint:Y,onCollapse:me,onBreakpoint:$e}=K,We=B(K,["prefixCls","className","trigger","children","defaultCollapsed","theme","style","collapsible","reverseArrow","width","collapsedWidth","zeroWidthTriggerStyle","breakpoint","onCollapse","onBreakpoint"]),{siderHook:qe}=(0,Q.useContext)(ae.Gs),[Xe,gt]=(0,Q.useState)("collapsed"in K?K.collapsed:te),[_t,st]=(0,Q.useState)(!1);(0,Q.useEffect)(()=>{"collapsed"in K&&gt(K.collapsed)},[K.collapsed]);const Kt=(ne,de)=>{"collapsed"in K||gt(ne),me==null||me(ne,de)},un=(0,Q.useRef)();un.current=ne=>{st(ne.matches),$e==null||$e(ne.matches),Xe!==ne.matches&&Kt(ne.matches,"responsive")},(0,Q.useEffect)(()=>{function ne(se){return un.current(se)}let de;if(typeof window!="undefined"){const{matchMedia:se}=window;if(se&&Y&&Y in U){de=se(`(max-width: ${U[Y]})`);try{de.addEventListener("change",ne)}catch(W){de.addListener(ne)}ne(de)}}return()=>{try{de==null||de.removeEventListener("change",ne)}catch(se){de==null||de.removeListener(ne)}}},[Y]),(0,Q.useEffect)(()=>{const ne=Z("ant-sider-");return qe.addSider(ne),()=>qe.removeSider(ne)},[]);const Ot=()=>{Kt(!Xe,"clickTrigger")},{getPrefixCls:Vt}=(0,Q.useContext)(z.E_),lt=()=>{const ne=Vt("layout-sider",ve),de=(0,x.Z)(We,["collapsed"]),se=Xe?y:G,W=T(se)?`${se}px`:String(se),Ie=parseFloat(String(y||0))===0?Q.createElement("span",{onClick:Ot,className:v()(`${ne}-zero-width-trigger`,`${ne}-zero-width-trigger-${ee?"right":"left"}`),style:E},Le||Q.createElement(fe,null)):null,q={expanded:ee?Q.createElement(k.Z,null):Q.createElement(o.Z,null),collapsed:ee?Q.createElement(o.Z,null):Q.createElement(k.Z,null)}[Xe?"collapsed":"expanded"],le=Le!==null?Ie||Q.createElement("div",{className:`${ne}-trigger`,onClick:Ot,style:{width:W}},Le||q):null,pe=Object.assign(Object.assign({},ue),{flex:`0 0 ${W}`,maxWidth:W,minWidth:W,width:W}),De=v()(ne,`${ne}-${j}`,{[`${ne}-collapsed`]:!!Xe,[`${ne}-has-trigger`]:R&&Le!==null&&!Ie,[`${ne}-below`]:!!_t,[`${ne}-zero-width`]:parseFloat(W)===0},Se);return Q.createElement("aside",Object.assign({className:De},de,{style:pe,ref:$}),Q.createElement("div",{className:`${ne}-children`},ye),R||_t&&Ie?le:null)},At=Q.useMemo(()=>({siderCollapsed:Xe}),[Xe]);return Q.createElement(X.Provider,{value:At},lt())})},84966:function(ln,et,m){"use strict";m.d(et,{VY:function(){return X},$_:function(){return U},h4:function(){return B},Gs:function(){return x},ZP:function(){return Z}});var L=m(80702),Q=m(92310),ge=m.n(Q),_e=m(2738),A=m(59301),p=m(36355),be=m(83116),o=D=>{const{componentCls:C,bodyBg:K,lightSiderBg:$,lightTriggerBg:ve,lightTriggerColor:Se}=D;return{[`${C}-sider-light`]:{background:$,[`${C}-sider-trigger`]:{color:Se,background:ve},[`${C}-sider-zero-width-trigger`]:{color:Se,background:ve,border:`1px solid ${K}`,borderInlineStart:0}}}};const k=D=>{const{antCls:C,componentCls:K,colorText:$,triggerColor:ve,footerBg:Se,triggerBg:Le,headerHeight:ye,headerPadding:te,headerColor:j,footerPadding:ue,triggerHeight:R,zeroTriggerHeight:ee,zeroTriggerWidth:G,motionDurationMid:y,motionDurationSlow:E,fontSize:Y,borderRadius:me,bodyBg:$e,headerBg:We,siderBg:qe}=D;return{[K]:Object.assign(Object.assign({display:"flex",flex:"auto",flexDirection:"column",minHeight:0,background:$e,"&, *":{boxSizing:"border-box"},[`&${K}-has-sider`]:{flexDirection:"row",[`> ${K}, > ${K}-content`]:{width:0}},[`${K}-header, &${K}-footer`]:{flex:"0 0 auto"},[`${K}-sider`]:{position:"relative",minWidth:0,background:qe,transition:`all ${y}, background 0s`,"&-children":{height:"100%",marginTop:-.1,paddingTop:.1,[`${C}-menu${C}-menu-inline-collapsed`]:{width:"auto"}},"&-has-trigger":{paddingBottom:R},"&-right":{order:1},"&-trigger":{position:"fixed",bottom:0,zIndex:1,height:R,color:ve,lineHeight:`${R}px`,textAlign:"center",background:Le,cursor:"pointer",transition:`all ${y}`},"&-zero-width":{"> *":{overflow:"hidden"},"&-trigger":{position:"absolute",top:ye,insetInlineEnd:-G,zIndex:1,width:G,height:ee,color:ve,fontSize:D.fontSizeXL,display:"flex",alignItems:"center",justifyContent:"center",background:qe,borderStartStartRadius:0,borderStartEndRadius:me,borderEndEndRadius:me,borderEndStartRadius:0,cursor:"pointer",transition:`background ${E} ease`,"&::after":{position:"absolute",inset:0,background:"transparent",transition:`all ${E}`,content:'""'},"&:hover::after":{background:"rgba(255, 255, 255, 0.2)"},"&-right":{insetInlineStart:-G,borderStartStartRadius:me,borderStartEndRadius:0,borderEndEndRadius:0,borderEndStartRadius:me}}}}},o(D)),{"&-rtl":{direction:"rtl"}}),[`${K}-header`]:{height:ye,padding:te,color:j,lineHeight:`${ye}px`,background:We,[`${C}-menu`]:{lineHeight:"inherit"}},[`${K}-footer`]:{padding:ue,color:$,fontSize:Y,background:Se},[`${K}-content`]:{flex:"auto",minHeight:0}}};var N=(0,be.Z)("Layout",D=>[k(D)],D=>{const{colorBgLayout:C,controlHeight:K,controlHeightLG:$,colorText:ve,controlHeightSM:Se,marginXXS:Le,colorTextLightSolid:ye,colorBgContainer:te}=D,j=$*1.25;return{colorBgHeader:"#001529",colorBgBody:C,colorBgTrigger:"#002140",bodyBg:C,headerBg:"#001529",headerHeight:K*2,headerPadding:`0 ${j}px`,headerColor:ve,footerPadding:`${Se}px ${j}px`,footerBg:C,siderBg:"#001529",triggerHeight:$+Le*2,triggerBg:"#002140",triggerColor:ye,zeroTriggerWidth:$,zeroTriggerHeight:$,lightSiderBg:te,lightTriggerBg:te,lightTriggerColor:ve}},{deprecatedTokens:[["colorBgBody","bodyBg"],["colorBgHeader","headerBg"],["colorBgTrigger","triggerBg"]]}),v=function(D,C){var K={};for(var $ in D)Object.prototype.hasOwnProperty.call(D,$)&&C.indexOf($)<0&&(K[$]=D[$]);if(D!=null&&typeof Object.getOwnPropertySymbols=="function")for(var ve=0,$=Object.getOwnPropertySymbols(D);ve<$.length;ve++)C.indexOf($[ve])<0&&Object.prototype.propertyIsEnumerable.call(D,$[ve])&&(K[$[ve]]=D[$[ve]]);return K};const x=A.createContext({siderHook:{addSider:()=>null,removeSider:()=>null}});function S(D){let{suffixCls:C,tagName:K,displayName:$}=D;return ve=>A.forwardRef((Le,ye)=>A.createElement(ve,Object.assign({ref:ye,suffixCls:C,tagName:K},Le)))}const T=A.forwardRef((D,C)=>{const{prefixCls:K,suffixCls:$,className:ve,tagName:Se}=D,Le=v(D,["prefixCls","suffixCls","className","tagName"]),{getPrefixCls:ye}=A.useContext(p.E_),te=ye("layout",K),[j,ue]=N(te),R=$?`${te}-${$}`:te;return j(A.createElement(Se,Object.assign({className:ge()(K||R,ve,ue),ref:C},Le)))}),z=A.forwardRef((D,C)=>{const{direction:K}=A.useContext(p.E_),[$,ve]=A.useState([]),{prefixCls:Se,className:Le,rootClassName:ye,children:te,hasSider:j,tagName:ue,style:R}=D,ee=v(D,["prefixCls","className","rootClassName","children","hasSider","tagName","style"]),G=(0,_e.Z)(ee,["suffixCls"]),{getPrefixCls:y,layout:E}=A.useContext(p.E_),Y=y("layout",Se),[me,$e]=N(Y),We=ge()(Y,{[`${Y}-has-sider`]:typeof j=="boolean"?j:$.length>0,[`${Y}-rtl`]:K==="rtl"},E==null?void 0:E.className,Le,ye,$e),qe=A.useMemo(()=>({siderHook:{addSider:Xe=>{ve(gt=>[].concat((0,L.Z)(gt),[Xe]))},removeSider:Xe=>{ve(gt=>gt.filter(_t=>_t!==Xe))}}}),[]);return me(A.createElement(x.Provider,{value:qe},A.createElement(ue,Object.assign({ref:C,className:We,style:Object.assign(Object.assign({},E==null?void 0:E.style),R)},G),te)))}),ae=S({tagName:"div",displayName:"Layout"})(z),B=S({suffixCls:"header",tagName:"header",displayName:"Header"})(T),U=S({suffixCls:"footer",tagName:"footer",displayName:"Footer"})(T),X=S({suffixCls:"content",tagName:"main",displayName:"Content"})(T);var Z=ae},40875:function(ln,et,m){"use strict";m.d(et,{J:function(){return p}});var L=m(59301),Q=m(33234),ge=m(70425),_e=function(be,fe){var o={};for(var k in be)Object.prototype.hasOwnProperty.call(be,k)&&fe.indexOf(k)<0&&(o[k]=be[k]);if(be!=null&&typeof Object.getOwnPropertySymbols=="function")for(var N=0,k=Object.getOwnPropertySymbols(be);N<k.length;N++)fe.indexOf(k[N])<0&&Object.prototype.propertyIsEnumerable.call(be,k[N])&&(o[k[N]]=be[k[N]]);return o};const A=L.createContext(null),p=L.forwardRef((be,fe)=>{const{children:o}=be,k=_e(be,["children"]),N=L.useContext(A),v=L.useMemo(()=>Object.assign(Object.assign({},N),k),[N,k.prefixCls,k.mode,k.selectable]);return L.createElement(A.Provider,{value:v},L.createElement(Q.BR,null,(0,ge.supportNodeRef)(o)?L.cloneElement(o,{ref:fe}):o))});et.Z=A},20834:function(ln,et,m){"use strict";m.d(et,{default:function(){return At}});var L=m(15285),Q=m(59301),ge=m(45818),_e=m(92310),A=m.n(_e),p=m(36355),be=function(ne,de){var se={};for(var W in ne)Object.prototype.hasOwnProperty.call(ne,W)&&de.indexOf(W)<0&&(se[W]=ne[W]);if(ne!=null&&typeof Object.getOwnPropertySymbols=="function")for(var Ie=0,W=Object.getOwnPropertySymbols(ne);Ie<W.length;Ie++)de.indexOf(W[Ie])<0&&Object.prototype.propertyIsEnumerable.call(ne,W[Ie])&&(se[W[Ie]]=ne[W[Ie]]);return se},o=ne=>{const{prefixCls:de,className:se,dashed:W}=ne,Ie=be(ne,["prefixCls","className","dashed"]),{getPrefixCls:M}=Q.useContext(p.E_),ce=M("menu",de),q=A()({[`${ce}-item-divider-dashed`]:!!W},se);return Q.createElement(L.iz,Object.assign({className:q},Ie))},k=m(11592),N=m(2738),v=m(6848),x=m(92343),T=(0,Q.createContext)({prefixCls:"",firstLevel:!0,inlineCollapsed:!1}),ae=ne=>{var de;const{className:se,children:W,icon:Ie,title:M,danger:ce}=ne,{prefixCls:q,firstLevel:le,direction:pe,disableMenuItemTitleTooltip:De,inlineCollapsed:Te}=Q.useContext(T),ke=pt=>{const vt=Q.createElement("span",{className:`${q}-title-content`},W);return(!Ie||(0,x.l$)(W)&&W.type==="span")&&W&&pt&&le&&typeof W=="string"?Q.createElement("div",{className:`${q}-inline-collapsed-noicon`},W.charAt(0)):vt},{siderCollapsed:Oe}=Q.useContext(ge.D);let Ne=M;typeof M=="undefined"?Ne=le?W:"":M===!1&&(Ne="");const nt={title:Ne};!Oe&&!Te&&(nt.title=null,nt.open=!1);const Qe=(0,k.Z)(W).length;let Ze=Q.createElement(L.ck,Object.assign({},(0,N.Z)(ne,["title","icon","danger"]),{className:A()({[`${q}-item-danger`]:ce,[`${q}-item-only-child`]:(Ie?Qe+1:Qe)===1},se),title:typeof M=="string"?M:void 0}),(0,x.Tm)(Ie,{className:A()((0,x.l$)(Ie)?(de=Ie.props)===null||de===void 0?void 0:de.className:"",`${q}-item-icon`)}),ke(Te));return De||(Ze=Q.createElement(v.Z,Object.assign({},nt,{placement:pe==="rtl"?"left":"right",overlayClassName:`${q}-inline-collapsed-tooltip`}),Ze)),Ze},U=ne=>{var de;const{popupClassName:se,icon:W,title:Ie,theme:M}=ne,ce=Q.useContext(T),{prefixCls:q,inlineCollapsed:le,theme:pe}=ce,De=(0,L.Xl)();let Te;if(!W)Te=le&&!De.length&&Ie&&typeof Ie=="string"?Q.createElement("div",{className:`${q}-inline-collapsed-noicon`},Ie.charAt(0)):Q.createElement("span",{className:`${q}-title-content`},Ie);else{const Oe=(0,x.l$)(Ie)&&Ie.type==="span";Te=Q.createElement(Q.Fragment,null,(0,x.Tm)(W,{className:A()((0,x.l$)(W)?(de=W.props)===null||de===void 0?void 0:de.className:"",`${q}-item-icon`)}),Oe?Ie:Q.createElement("span",{className:`${q}-title-content`},Ie))}const ke=Q.useMemo(()=>Object.assign(Object.assign({},ce),{firstLevel:!1}),[ce]);return Q.createElement(T.Provider,{value:ke},Q.createElement(L.Wd,Object.assign({},(0,N.Z)(ne,["icon"]),{title:Te,popupClassName:A()(q,se,`${q}-${M||pe}`)})))},X=m(18785),Z=m(70425),D=m(62892),C=m(40875),K=function(ne,de){var se={};for(var W in ne)Object.prototype.hasOwnProperty.call(ne,W)&&de.indexOf(W)<0&&(se[W]=ne[W]);if(ne!=null&&typeof Object.getOwnPropertySymbols=="function")for(var Ie=0,W=Object.getOwnPropertySymbols(ne);Ie<W.length;Ie++)de.indexOf(W[Ie])<0&&Object.prototype.propertyIsEnumerable.call(ne,W[Ie])&&(se[W[Ie]]=ne[W[Ie]]);return se};function $(ne){return(ne||[]).map((de,se)=>{if(de&&typeof de=="object"){const W=de,{label:Ie,children:M,key:ce,type:q}=W,le=K(W,["label","children","key","type"]),pe=ce!=null?ce:`tmp-${se}`;return M||q==="group"?q==="group"?Q.createElement(L.BW,Object.assign({key:pe},le,{title:Ie}),$(M)):Q.createElement(U,Object.assign({key:pe},le,{title:Ie}),$(M)):q==="divider"?Q.createElement(o,Object.assign({key:pe},le)):Q.createElement(ae,Object.assign({key:pe},le),Ie)}return null}).filter(de=>de)}function ve(ne){return Q.useMemo(()=>ne&&$(ne),[ne])}var Se=m(64993),Le=m(17313),ye=m(8378),te=m(13826),j=m(29878),ue=m(83116),R=m(37613),G=ne=>{const{componentCls:de,motionDurationSlow:se,horizontalLineHeight:W,colorSplit:Ie,lineWidth:M,lineType:ce,itemPaddingInline:q}=ne;return{[`${de}-horizontal`]:{lineHeight:W,border:0,borderBottom:`${M}px ${ce} ${Ie}`,boxShadow:"none","&::after":{display:"block",clear:"both",height:0,content:'"\\20"'},[`${de}-item, ${de}-submenu`]:{position:"relative",display:"inline-block",verticalAlign:"bottom",paddingInline:q},[`> ${de}-item:hover,
> ${de}-item-active,
> ${de}-submenu ${de}-submenu-title:hover`]:{backgroundColor:"transparent"},[`${de}-item, ${de}-submenu-title`]:{transition:[`border-color ${se}`,`background ${se}`].join(",")},[`${de}-submenu-arrow`]:{display:"none"}}}},E=ne=>{let{componentCls:de,menuArrowOffset:se}=ne;return{[`${de}-rtl`]:{direction:"rtl"},[`${de}-submenu-rtl`]:{transformOrigin:"100% 0"},[`${de}-rtl${de}-vertical,
${de}-submenu-rtl ${de}-vertical`]:{[`${de}-submenu-arrow`]:{"&::before":{transform:`rotate(-45deg) translateY(-${se})`},"&::after":{transform:`rotate(45deg) translateY(${se})`}}}}};const Y=ne=>Object.assign({},(0,Le.oN)(ne));var $e=(ne,de)=>{const{componentCls:se,itemColor:W,itemSelectedColor:Ie,groupTitleColor:M,itemBg:ce,subMenuItemBg:q,itemSelectedBg:le,activeBarHeight:pe,activeBarWidth:De,activeBarBorderWidth:Te,motionDurationSlow:ke,motionEaseInOut:Oe,motionEaseOut:Ne,itemPaddingInline:nt,motionDurationMid:Qe,itemHoverColor:Ze,lineType:pt,colorSplit:vt,itemDisabledColor:ct,dangerItemColor:Dt,dangerItemHoverColor:Ut,dangerItemSelectedColor:w,dangerItemActiveBg:I,dangerItemSelectedBg:dt,itemHoverBg:oe,itemActiveBg:Pe,menuSubMenuBg:vn,horizontalItemSelectedColor:je,horizontalItemSelectedBg:He,horizontalItemBorderRadius:tt,horizontalItemHoverBg:he,popupBg:ie}=ne;return{[`${se}-${de}, ${se}-${de} > ${se}`]:{color:W,background:ce,[`&${se}-root:focus-visible`]:Object.assign({},Y(ne)),[`${se}-item-group-title`]:{color:M},[`${se}-submenu-selected`]:{[`> ${se}-submenu-title`]:{color:Ie}},[`${se}-item-disabled, ${se}-submenu-disabled`]:{color:`${ct} !important`},[`${se}-item:not(${se}-item-selected):not(${se}-submenu-selected)`]:{[`&:hover, > ${se}-submenu-title:hover`]:{color:Ze}},[`&:not(${se}-horizontal)`]:{[`${se}-item:not(${se}-item-selected)`]:{"&:hover":{backgroundColor:oe},"&:active":{backgroundColor:Pe}},[`${se}-submenu-title`]:{"&:hover":{backgroundColor:oe},"&:active":{backgroundColor:Pe}}},[`${se}-item-danger`]:{color:Dt,[`&${se}-item:hover`]:{[`&:not(${se}-item-selected):not(${se}-submenu-selected)`]:{color:Ut}},[`&${se}-item:active`]:{background:I}},[`${se}-item a`]:{"&, &:hover":{color:"inherit"}},[`${se}-item-selected`]:{color:Ie,[`&${se}-item-danger`]:{color:w},"a, a:hover":{color:"inherit"}},[`& ${se}-item-selected`]:{backgroundColor:le,[`&${se}-item-danger`]:{backgroundColor:dt}},[`${se}-item, ${se}-submenu-title`]:{[`&:not(${se}-item-disabled):focus-visible`]:Object.assign({},Y(ne))},[`&${se}-submenu > ${se}`]:{backgroundColor:vn},[`&${se}-popup > ${se}`]:{backgroundColor:ie},[`&${se}-horizontal`]:Object.assign(Object.assign({},de==="dark"?{borderBottom:0}:{}),{[`> ${se}-item, > ${se}-submenu`]:{top:Te,marginTop:-Te,marginBottom:0,borderRadius:tt,"&::after":{position:"absolute",insetInline:nt,bottom:0,borderBottom:`${pe}px solid transparent`,transition:`border-color ${ke} ${Oe}`,content:'""'},"&:hover, &-active, &-open":{background:he,"&::after":{borderBottomWidth:pe,borderBottomColor:je}},"&-selected":{color:je,backgroundColor:He,"&:hover":{backgroundColor:He},"&::after":{borderBottomWidth:pe,borderBottomColor:je}}}}),[`&${se}-root`]:{[`&${se}-inline, &${se}-vertical`]:{borderInlineEnd:`${Te}px ${pt} ${vt}`}},[`&${se}-inline`]:{[`${se}-sub${se}-inline`]:{background:q},[`${se}-item, ${se}-submenu-title`]:Te&&De?{width:`calc(100% + ${Te}px)`}:{},[`${se}-item`]:{position:"relative","&::after":{position:"absolute",insetBlock:0,insetInlineEnd:0,borderInlineEnd:`${De}px solid ${Ie}`,transform:"scaleY(0.0001)",opacity:0,transition:[`transform ${Qe} ${Ne}`,`opacity ${Qe} ${Ne}`].join(","),content:'""'},[`&${se}-item-danger`]:{"&::after":{borderInlineEndColor:w}}},[`${se}-selected, ${se}-item-selected`]:{"&::after":{transform:"scaleY(1)",opacity:1,transition:[`transform ${Qe} ${Oe}`,`opacity ${Qe} ${Oe}`].join(",")}}}}}};const We=ne=>{const{componentCls:de,itemHeight:se,itemMarginInline:W,padding:Ie,menuArrowSize:M,marginXS:ce,itemMarginBlock:q}=ne,le=Ie+M+ce;return{[`${de}-item`]:{position:"relative",overflow:"hidden"},[`${de}-item, ${de}-submenu-title`]:{height:se,lineHeight:`${se}px`,paddingInline:Ie,overflow:"hidden",textOverflow:"ellipsis",marginInline:W,marginBlock:q,width:`calc(100% - ${W*2}px)`},[`> ${de}-item,
> ${de}-submenu > ${de}-submenu-title`]:{height:se,lineHeight:`${se}px`},[`${de}-item-group-list ${de}-submenu-title,
${de}-submenu-title`]:{paddingInlineEnd:le}}};var Xe=ne=>{const{componentCls:de,iconCls:se,itemHeight:W,colorTextLightSolid:Ie,dropdownWidth:M,controlHeightLG:ce,motionDurationMid:q,motionEaseOut:le,paddingXL:pe,itemMarginInline:De,fontSizeLG:Te,motionDurationSlow:ke,paddingXS:Oe,boxShadowSecondary:Ne,collapsedWidth:nt,collapsedIconSize:Qe}=ne,Ze={height:W,lineHeight:`${W}px`,listStylePosition:"inside",listStyleType:"disc"};return[{[de]:{"&-inline, &-vertical":Object.assign({[`&${de}-root`]:{boxShadow:"none"}},We(ne))},[`${de}-submenu-popup`]:{[`${de}-vertical`]:Object.assign(Object.assign({},We(ne)),{boxShadow:Ne})}},{[`${de}-submenu-popup ${de}-vertical${de}-sub`]:{minWidth:M,maxHeight:`calc(100vh - ${ce*2.5}px)`,padding:"0",overflow:"hidden",borderInlineEnd:0,"&:not([class*='-active'])":{overflowX:"hidden",overflowY:"auto"}}},{[`${de}-inline`]:{width:"100%",[`&${de}-root`]:{[`${de}-item, ${de}-submenu-title`]:{display:"flex",alignItems:"center",transition:[`border-color ${ke}`,`background ${ke}`,`padding ${q} ${le}`].join(","),[`> ${de}-title-content`]:{flex:"auto",minWidth:0,overflow:"hidden",textOverflow:"ellipsis"},"> *":{flex:"none"}}},[`${de}-sub${de}-inline`]:{padding:0,border:0,borderRadius:0,boxShadow:"none",[`& > ${de}-submenu > ${de}-submenu-title`]:Ze,[`& ${de}-item-group-title`]:{paddingInlineStart:pe}},[`${de}-item`]:Ze}},{[`${de}-inline-collapsed`]:{width:nt,[`&${de}-root`]:{[`${de}-item, ${de}-submenu ${de}-submenu-title`]:{[`> ${de}-inline-collapsed-noicon`]:{fontSize:Te,textAlign:"center"}}},[`> ${de}-item,
> ${de}-item-group > ${de}-item-group-list > ${de}-item,
> ${de}-item-group > ${de}-item-group-list > ${de}-submenu > ${de}-submenu-title,
> ${de}-submenu > ${de}-submenu-title`]:{insetInlineStart:0,paddingInline:`calc(50% - ${Te/2}px - ${De}px)`,textOverflow:"clip",[`
${de}-submenu-arrow,
${de}-submenu-expand-icon
`]:{opacity:0},[`${de}-item-icon, ${se}`]:{margin:0,fontSize:Qe,lineHeight:`${W}px`,"+ span":{display:"inline-block",opacity:0}}},[`${de}-item-icon, ${se}`]:{display:"inline-block"},"&-tooltip":{pointerEvents:"none",[`${de}-item-icon, ${se}`]:{display:"none"},"a, a:hover":{color:Ie}},[`${de}-item-group-title`]:Object.assign(Object.assign({},Le.vS),{paddingInline:Oe})}}]};const gt=ne=>{const{componentCls:de,motionDurationSlow:se,motionDurationMid:W,motionEaseInOut:Ie,motionEaseOut:M,iconCls:ce,iconSize:q,iconMarginInlineEnd:le}=ne;return{[`${de}-item, ${de}-submenu-title`]:{position:"relative",display:"block",margin:0,whiteSpace:"nowrap",cursor:"pointer",transition:[`border-color ${se}`,`background ${se}`,`padding ${se} ${Ie}`].join(","),[`${de}-item-icon, ${ce}`]:{minWidth:q,fontSize:q,transition:[`font-size ${W} ${M}`,`margin ${se} ${Ie}`,`color ${se}`].join(","),"+ span":{marginInlineStart:le,opacity:1,transition:[`opacity ${se} ${Ie}`,`margin ${se}`,`color ${se}`].join(",")}},[`${de}-item-icon`]:Object.assign({},(0,Le.Ro)()),[`&${de}-item-only-child`]:{[`> ${ce}, > ${de}-item-icon`]:{marginInlineEnd:0}}},[`${de}-item-disabled, ${de}-submenu-disabled`]:{background:"none !important",cursor:"not-allowed","&::after":{borderColor:"transparent !important"},a:{color:"inherit !important"},[`> ${de}-submenu-title`]:{color:"inherit !important",cursor:"not-allowed"}}}},_t=ne=>{const{componentCls:de,motionDurationSlow:se,motionEaseInOut:W,borderRadius:Ie,menuArrowSize:M,menuArrowOffset:ce}=ne;return{[`${de}-submenu`]:{"&-expand-icon, &-arrow":{position:"absolute",top:"50%",insetInlineEnd:ne.margin,width:M,color:"currentcolor",transform:"translateY(-50%)",transition:`transform ${se} ${W}, opacity ${se}`},"&-arrow":{"&::before, &::after":{position:"absolute",width:M*.6,height:M*.15,backgroundColor:"currentcolor",borderRadius:Ie,transition:[`background ${se} ${W}`,`transform ${se} ${W}`,`top ${se} ${W}`,`color ${se} ${W}`].join(","),content:'""'},"&::before":{transform:`rotate(45deg) translateY(-${ce})`},"&::after":{transform:`rotate(-45deg) translateY(${ce})`}}}}},st=ne=>{const{antCls:de,componentCls:se,fontSize:W,motionDurationSlow:Ie,motionDurationMid:M,motionEaseInOut:ce,paddingXS:q,padding:le,colorSplit:pe,lineWidth:De,zIndexPopup:Te,borderRadiusLG:ke,subMenuItemBorderRadius:Oe,menuArrowSize:Ne,menuArrowOffset:nt,lineType:Qe,menuPanelMaskInset:Ze,groupTitleLineHeight:pt,groupTitleFontSize:vt}=ne;return[{"":{[`${se}`]:Object.assign(Object.assign({},(0,Le.dF)()),{"&-hidden":{display:"none"}})},[`${se}-submenu-hidden`]:{display:"none"}},{[se]:Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({},(0,Le.Wf)(ne)),(0,Le.dF)()),{marginBottom:0,paddingInlineStart:0,fontSize:W,lineHeight:0,listStyle:"none",outline:"none",transition:`width ${Ie} cubic-bezier(0.2, 0, 0, 1) 0s`,"ul, ol":{margin:0,padding:0,listStyle:"none"},"&-overflow":{display:"flex",[`${se}-item`]:{flex:"none"}},[`${se}-item, ${se}-submenu, ${se}-submenu-title`]:{borderRadius:ne.itemBorderRadius},[`${se}-item-group-title`]:{padding:`${q}px ${le}px`,fontSize:vt,lineHeight:pt,transition:`all ${Ie}`},[`&-horizontal ${se}-submenu`]:{transition:[`border-color ${Ie} ${ce}`,`background ${Ie} ${ce}`].join(",")},[`${se}-submenu, ${se}-submenu-inline`]:{transition:[`border-color ${Ie} ${ce}`,`background ${Ie} ${ce}`,`padding ${M} ${ce}`].join(",")},[`${se}-submenu ${se}-sub`]:{cursor:"initial",transition:[`background ${Ie} ${ce}`,`padding ${Ie} ${ce}`].join(",")},[`${se}-title-content`]:{transition:`color ${Ie}`},[`${se}-item a`]:{"&::before":{position:"absolute",inset:0,backgroundColor:"transparent",content:'""'}},[`${se}-item-divider`]:{overflow:"hidden",lineHeight:0,borderColor:pe,borderStyle:Qe,borderWidth:0,borderTopWidth:De,marginBlock:De,padding:0,"&-dashed":{borderStyle:"dashed"}}}),gt(ne)),{[`${se}-item-group`]:{[`${se}-item-group-list`]:{margin:0,padding:0,[`${se}-item, ${se}-submenu-title`]:{paddingInline:`${W*2}px ${le}px`}}},"&-submenu":{"&-popup":{position:"absolute",zIndex:Te,borderRadius:ke,boxShadow:"none",transformOrigin:"0 0",[`&${se}-submenu`]:{background:"transparent"},"&::before":{position:"absolute",inset:`${Ze}px 0 0`,zIndex:-1,width:"100%",height:"100%",opacity:0,content:'""'}},"&-placement-rightTop::before":{top:0,insetInlineStart:Ze},"\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:ne.paddingXS},"\n &-placement-rightTop,\n &-placement-rightBottom\n ":{paddingInlineStart:ne.paddingXS},"\n &-placement-topRight,\n &-placement-topLeft\n ":{paddingBottom:ne.paddingXS},"\n &-placement-bottomRight,\n &-placement-bottomLeft\n ":{paddingTop:ne.paddingXS},[`> ${se}`]:Object.assign(Object.assign(Object.assign({borderRadius:ke},gt(ne)),_t(ne)),{[`${se}-item, ${se}-submenu > ${se}-submenu-title`]:{borderRadius:Oe},[`${se}-submenu-title::after`]:{transition:`transform ${Ie} ${ce}`}})}}),_t(ne)),{[`&-inline-collapsed ${se}-submenu-arrow,
&-inline ${se}-submenu-arrow`]:{"&::before":{transform:`rotate(-45deg) translateX(${nt})`},"&::after":{transform:`rotate(45deg) translateX(-${nt})`}},[`${se}-submenu-open${se}-submenu-inline > ${se}-submenu-title > ${se}-submenu-arrow`]:{transform:`translateY(-${Ne*.2}px)`,"&::after":{transform:`rotate(-45deg) translateX(-${nt})`},"&::before":{transform:`rotate(45deg) translateX(${nt})`}}})},{[`${de}-layout-header`]:{[se]:{lineHeight:"inherit"}}}]};var Kt=(ne,de)=>(0,ue.Z)("Menu",W=>{if(de===!1)return[];const{colorBgElevated:Ie,colorPrimary:M,colorTextLightSolid:ce,controlHeightLG:q,fontSize:le,darkItemColor:pe,darkDangerItemColor:De,darkItemBg:Te,darkSubMenuItemBg:ke,darkItemSelectedColor:Oe,darkItemSelectedBg:Ne,darkDangerItemSelectedBg:nt,darkItemHoverBg:Qe,darkGroupTitleColor:Ze,darkItemHoverColor:pt,darkItemDisabledColor:vt,darkDangerItemHoverColor:ct,darkDangerItemSelectedColor:Dt,darkDangerItemActiveBg:Ut}=W,w=le/7*5,I=(0,R.TS)(W,{menuArrowSize:w,menuHorizontalHeight:q*1.15,menuArrowOffset:`${w*.25}px`,menuPanelMaskInset:-7,menuSubMenuBg:Ie}),dt=(0,R.TS)(I,{itemColor:pe,itemHoverColor:pt,groupTitleColor:Ze,itemSelectedColor:Oe,itemBg:Te,popupBg:Te,subMenuItemBg:ke,itemActiveBg:"transparent",itemSelectedBg:Ne,activeBarHeight:0,activeBarBorderWidth:0,itemHoverBg:Qe,itemDisabledColor:vt,dangerItemColor:De,dangerItemHoverColor:ct,dangerItemSelectedColor:Dt,dangerItemActiveBg:Ut,dangerItemSelectedBg:nt,menuSubMenuBg:ke,horizontalItemSelectedColor:ce,horizontalItemSelectedBg:M});return[st(I),G(I),Xe(I),$e(I,"light"),$e(dt,"dark"),E(I),(0,ye.Z)(I),(0,te.oN)(I,"slide-up"),(0,te.oN)(I,"slide-down"),(0,j._y)(I,"zoom-big")]},W=>{const{colorPrimary:Ie,colorError:M,colorTextDisabled:ce,colorErrorBg:q,colorText:le,colorTextDescription:pe,colorBgContainer:De,colorFillAlter:Te,colorFillContent:ke,lineWidth:Oe,lineWidthBold:Ne,controlItemBgActive:nt,colorBgTextHover:Qe,controlHeightLG:Ze,lineHeight:pt,colorBgElevated:vt,marginXXS:ct,padding:Dt,fontSize:Ut,controlHeightSM:w,fontSizeLG:I,colorTextLightSolid:dt,colorErrorHover:oe}=W,Pe=new Se.C(dt).setAlpha(.65).toRgbString();return{dropdownWidth:160,zIndexPopup:W.zIndexPopupBase+50,radiusItem:W.borderRadiusLG,itemBorderRadius:W.borderRadiusLG,radiusSubMenuItem:W.borderRadiusSM,subMenuItemBorderRadius:W.borderRadiusSM,colorItemText:le,itemColor:le,colorItemTextHover:le,itemHoverColor:le,colorItemTextHoverHorizontal:Ie,horizontalItemHoverColor:Ie,colorGroupTitle:pe,groupTitleColor:pe,colorItemTextSelected:Ie,itemSelectedColor:Ie,colorItemTextSelectedHorizontal:Ie,horizontalItemSelectedColor:Ie,colorItemBg:De,itemBg:De,colorItemBgHover:Qe,itemHoverBg:Qe,colorItemBgActive:ke,itemActiveBg:nt,colorSubItemBg:Te,subMenuItemBg:Te,colorItemBgSelected:nt,itemSelectedBg:nt,colorItemBgSelectedHorizontal:"transparent",horizontalItemSelectedBg:"transparent",colorActiveBarWidth:0,activeBarWidth:0,colorActiveBarHeight:Ne,activeBarHeight:Ne,colorActiveBarBorderSize:Oe,activeBarBorderWidth:Oe,colorItemTextDisabled:ce,itemDisabledColor:ce,colorDangerItemText:M,dangerItemColor:M,colorDangerItemTextHover:M,dangerItemHoverColor:M,colorDangerItemTextSelected:M,dangerItemSelectedColor:M,colorDangerItemBgActive:q,dangerItemActiveBg:q,colorDangerItemBgSelected:q,dangerItemSelectedBg:q,itemMarginInline:W.marginXXS,horizontalItemBorderRadius:0,horizontalItemHoverBg:"transparent",itemHeight:Ze,groupTitleLineHeight:pt,collapsedWidth:Ze*2,popupBg:vt,itemMarginBlock:ct,itemPaddingInline:Dt,horizontalLineHeight:`${Ze*1.15}px`,iconSize:Ut,iconMarginInlineEnd:w-Ut,collapsedIconSize:I,groupTitleFontSize:Ut,darkItemDisabledColor:new Se.C(dt).setAlpha(.25).toRgbString(),darkItemColor:Pe,darkDangerItemColor:M,darkItemBg:"#001529",darkSubMenuItemBg:"#000c17",darkItemSelectedColor:dt,darkItemSelectedBg:Ie,darkDangerItemSelectedBg:M,darkItemHoverBg:"transparent",darkGroupTitleColor:Pe,darkItemHoverColor:dt,darkDangerItemHoverColor:oe,darkDangerItemSelectedColor:dt,darkDangerItemActiveBg:M}},{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"]]})(ne),un=function(ne,de){var se={};for(var W in ne)Object.prototype.hasOwnProperty.call(ne,W)&&de.indexOf(W)<0&&(se[W]=ne[W]);if(ne!=null&&typeof Object.getOwnPropertySymbols=="function")for(var Ie=0,W=Object.getOwnPropertySymbols(ne);Ie<W.length;Ie++)de.indexOf(W[Ie])<0&&Object.prototype.propertyIsEnumerable.call(ne,W[Ie])&&(se[W[Ie]]=ne[W[Ie]]);return se},Vt=(0,Q.forwardRef)((ne,de)=>{var se,W;const Ie=Q.useContext(C.Z),M=Ie||{},{getPrefixCls:ce,getPopupContainer:q,direction:le,menu:pe}=Q.useContext(p.E_),De=ce(),{prefixCls:Te,className:ke,style:Oe,theme:Ne="light",expandIcon:nt,_internalDisableMenuItemTitleTooltip:Qe,inlineCollapsed:Ze,siderCollapsed:pt,items:vt,children:ct,rootClassName:Dt,mode:Ut,selectable:w,onClick:I,overflowedIndicatorPopupClassName:dt}=ne,oe=un(ne,["prefixCls","className","style","theme","expandIcon","_internalDisableMenuItemTitleTooltip","inlineCollapsed","siderCollapsed","items","children","rootClassName","mode","selectable","onClick","overflowedIndicatorPopupClassName"]),Pe=(0,N.Z)(oe,["collapsedWidth"]),vn=ve(vt)||ct;(se=M.validator)===null||se===void 0||se.call(M,{mode:Ut});const je=(0,Z.useEvent)(function(){var Bt;I==null||I.apply(void 0,arguments),(Bt=M.onClick)===null||Bt===void 0||Bt.call(M)}),He=M.mode||Ut,tt=w!=null?w:M.selectable,he=Q.useMemo(()=>pt!==void 0?pt:Ze,[Ze,pt]),ie={horizontal:{motionName:`${De}-slide-up`},inline:(0,D.Z)(De),other:{motionName:`${De}-zoom-big`}},xe=ce("menu",Te||M.prefixCls),[Fe,V]=Kt(xe,!Ie),at=A()(`${xe}-${Ne}`,pe==null?void 0:pe.className,ke);let Ce;if(typeof nt=="function")Ce=nt;else if(nt===null||nt===!1)Ce=null;else if(M.expandIcon===null||M.expandIcon===!1)Ce=null;else{const Bt=nt!=null?nt:M.expandIcon;Ce=(0,x.Tm)(Bt,{className:A()(`${xe}-submenu-expand-icon`,(0,x.l$)(Bt)?(W=Bt.props)===null||W===void 0?void 0:W.className:"")})}const It=Q.useMemo(()=>({prefixCls:xe,inlineCollapsed:he||!1,direction:le,firstLevel:!0,theme:Ne,mode:He,disableMenuItemTitleTooltip:Qe}),[xe,he,le,Qe,Ne]);return Fe(Q.createElement(C.Z.Provider,{value:null},Q.createElement(T.Provider,{value:It},Q.createElement(L.ZP,Object.assign({getPopupContainer:q,overflowedIndicator:Q.createElement(X.Z,null),overflowedIndicatorPopupClassName:A()(xe,`${xe}-${Ne}`,dt),mode:He,selectable:tt,onClick:je},Pe,{inlineCollapsed:he,style:Object.assign(Object.assign({},pe==null?void 0:pe.style),Oe),className:at,prefixCls:xe,direction:le,defaultMotions:ie,expandIcon:Ce,ref:de,rootClassName:A()(Dt,V)}),vn))))});const lt=(0,Q.forwardRef)((ne,de)=>{const se=(0,Q.useRef)(null),W=Q.useContext(ge.D);return(0,Q.useImperativeHandle)(de,()=>({menu:se.current,focus:Ie=>{var M;(M=se.current)===null||M===void 0||M.focus(Ie)}})),Q.createElement(Vt,Object.assign({ref:se},ne,W))});lt.Item=ae,lt.SubMenu=U,lt.Divider=o,lt.ItemGroup=L.BW;var At=lt},39722:function(ln,et,m){"use strict";m.d(et,{t5:function(){return k}});var L=m(92310),Q=m.n(L),ge=m(55477),_e=m(59301),A=m(36355),p=m(77578),be=m(17356),fe=function(v,x){var S={};for(var T in v)Object.prototype.hasOwnProperty.call(v,T)&&x.indexOf(T)<0&&(S[T]=v[T]);if(v!=null&&typeof Object.getOwnPropertySymbols=="function")for(var z=0,T=Object.getOwnPropertySymbols(v);z<T.length;z++)x.indexOf(T[z])<0&&Object.prototype.propertyIsEnumerable.call(v,T[z])&&(S[T[z]]=v[T[z]]);return S};const o=(v,x,S)=>{if(!(!x&&!S))return _e.createElement(_e.Fragment,null,x&&_e.createElement("div",{className:`${v}-title`},(0,p.Z)(x)),_e.createElement("div",{className:`${v}-inner-content`},(0,p.Z)(S)))},k=v=>{const{hashId:x,prefixCls:S,className:T,style:z,placement:ae="top",title:B,content:U,children:X}=v;return _e.createElement("div",{className:Q()(x,S,`${S}-pure`,`${S}-placement-${ae}`,T),style:z},_e.createElement("div",{className:`${S}-arrow`}),_e.createElement(ge.G,Object.assign({},v,{className:x,prefixCls:S}),X||o(S,B,U)))},N=v=>{const{prefixCls:x}=v,S=fe(v,["prefixCls"]),{getPrefixCls:T}=_e.useContext(A.E_),z=T("popover",x),[ae,B]=(0,be.Z)(z);return ae(_e.createElement(k,Object.assign({},S,{prefixCls:z,hashId:B})))};et.ZP=N},60324:function(ln,et,m){"use strict";var L=m(92310),Q=m.n(L),ge=m(59301),_e=m(77578),A=m(62892),p=m(36355),be=m(6848),fe=m(39722),o=m(17356),k=function(x,S){var T={};for(var z in x)Object.prototype.hasOwnProperty.call(x,z)&&S.indexOf(z)<0&&(T[z]=x[z]);if(x!=null&&typeof Object.getOwnPropertySymbols=="function")for(var ae=0,z=Object.getOwnPropertySymbols(x);ae<z.length;ae++)S.indexOf(z[ae])<0&&Object.prototype.propertyIsEnumerable.call(x,z[ae])&&(T[z[ae]]=x[z[ae]]);return T};const N=x=>{let{title:S,content:T,prefixCls:z}=x;return ge.createElement(ge.Fragment,null,S&&ge.createElement("div",{className:`${z}-title`},(0,_e.Z)(S)),ge.createElement("div",{className:`${z}-inner-content`},(0,_e.Z)(T)))},v=ge.forwardRef((x,S)=>{const{prefixCls:T,title:z,content:ae,overlayClassName:B,placement:U="top",trigger:X="hover",mouseEnterDelay:Z=.1,mouseLeaveDelay:D=.1,overlayStyle:C={}}=x,K=k(x,["prefixCls","title","content","overlayClassName","placement","trigger","mouseEnterDelay","mouseLeaveDelay","overlayStyle"]),{getPrefixCls:$}=ge.useContext(p.E_),ve=$("popover",T),[Se,Le]=(0,o.Z)(ve),ye=$(),te=Q()(B,Le);return Se(ge.createElement(be.Z,Object.assign({placement:U,trigger:X,mouseEnterDelay:Z,mouseLeaveDelay:D,overlayStyle:C},K,{prefixCls:ve,overlayClassName:te,ref:S,overlay:z||ae?ge.createElement(N,{prefixCls:ve,title:z,content:ae}):null,transitionName:(0,A.m)(ye,"zoom-big",K.transitionName),"data-popover-inject":!0})))});v._InternalPanelDoNotUseOrYouWillBeFired=fe.ZP,et.Z=v},17356:function(ln,et,m){"use strict";var L=m(17313),Q=m(29878),ge=m(19447),_e=m(33166),A=m(83116),p=m(37613);const be=k=>{const{componentCls:N,popoverColor:v,minWidth:x,fontWeightStrong:S,popoverPadding:T,boxShadowSecondary:z,colorTextHeading:ae,borderRadiusLG:B,zIndexPopup:U,marginXS:X,colorBgElevated:Z,popoverBg:D}=k;return[{[N]:Object.assign(Object.assign({},(0,L.Wf)(k)),{position:"absolute",top:0,left:{_skip_check_:!0,value:0},zIndex:U,fontWeight:"normal",whiteSpace:"normal",textAlign:"start",cursor:"auto",userSelect:"text",transformOrigin:"var(--arrow-x, 50%) var(--arrow-y, 50%)","--antd-arrow-background-color":Z,"&-rtl":{direction:"rtl"},"&-hidden":{display:"none"},[`${N}-content`]:{position:"relative"},[`${N}-inner`]:{backgroundColor:D,backgroundClip:"padding-box",borderRadius:B,boxShadow:z,padding:T},[`${N}-title`]:{minWidth:x,marginBottom:X,color:ae,fontWeight:S},[`${N}-inner-content`]:{color:v}})},(0,ge.ZP)(k,{colorBg:"var(--antd-arrow-background-color)"}),{[`${N}-pure`]:{position:"relative",maxWidth:"none",margin:k.sizePopupArrow,display:"inline-block",[`${N}-content`]:{display:"inline-block"}}}]},fe=k=>{const{componentCls:N}=k;return{[N]:_e.i.map(v=>{const x=k[`${v}6`];return{[`&${N}-${v}`]:{"--antd-arrow-background-color":x,[`${N}-inner`]:{backgroundColor:x},[`${N}-arrow`]:{background:"transparent"}}}})}},o=k=>{const{componentCls:N,lineWidth:v,lineType:x,colorSplit:S,paddingSM:T,controlHeight:z,fontSize:ae,lineHeight:B,padding:U}=k,X=z-Math.round(ae*B),Z=X/2,D=X/2-v,C=U;return{[N]:{[`${N}-inner`]:{padding:0},[`${N}-title`]:{margin:0,padding:`${Z}px ${C}px ${D}px`,borderBottom:`${v}px ${x} ${S}`},[`${N}-inner-content`]:{padding:`${T}px ${C}px`}}}};et.Z=(0,A.Z)("Popover",k=>{const{colorBgElevated:N,colorText:v,wireframe:x}=k,S=(0,p.TS)(k,{popoverPadding:12,popoverBg:N,popoverColor:v});return[be(S),fe(S),x&&o(S),(0,Q._y)(S,"zoom-big")]},k=>({width:177,minWidth:177,zIndexPopup:k.zIndexPopupBase+30}),{resetStyle:!1,deprecatedTokens:[["width","minWidth"]]})},14154:function(ln,et,m){"use strict";m.d(et,{Z:function(){return D}});var L=m(17313),Q=m(74207),ge=m(37613),_e=m(83116),A=m(13826),p=m(92899);const be=C=>{const{optionHeight:K,optionFontSize:$,optionLineHeight:ve,optionPadding:Se}=C;return{position:"relative",display:"block",minHeight:K,padding:Se,color:C.colorText,fontWeight:"normal",fontSize:$,lineHeight:ve,boxSizing:"border-box"}};var o=C=>{const{antCls:K,componentCls:$}=C,ve=`${$}-item`,Se=`&${K}-slide-up-enter${K}-slide-up-enter-active`,Le=`&${K}-slide-up-appear${K}-slide-up-appear-active`,ye=`&${K}-slide-up-leave${K}-slide-up-leave-active`,te=`${$}-dropdown-placement-`;return[{[`${$}-dropdown`]:Object.assign(Object.assign({},(0,L.Wf)(C)),{position:"absolute",top:-9999,zIndex:C.zIndexPopup,boxSizing:"border-box",padding:C.paddingXXS,overflow:"hidden",fontSize:C.fontSize,fontVariant:"initial",backgroundColor:C.colorBgElevated,borderRadius:C.borderRadiusLG,outline:"none",boxShadow:C.boxShadowSecondary,[`
${Se}${te}bottomLeft,
${Le}${te}bottomLeft
`]:{animationName:A.fJ},[`
${Se}${te}topLeft,
${Le}${te}topLeft,
${Se}${te}topRight,
${Le}${te}topRight
`]:{animationName:A.Qt},[`${ye}${te}bottomLeft`]:{animationName:A.Uw},[`
${ye}${te}topLeft,
${ye}${te}topRight
`]:{animationName:A.ly},"&-hidden":{display:"none"},[`${ve}`]:Object.assign(Object.assign({},be(C)),{cursor:"pointer",transition:`background ${C.motionDurationSlow} ease`,borderRadius:C.borderRadiusSM,"&-group":{color:C.colorTextDescription,fontSize:C.fontSizeSM,cursor:"default"},"&-option":{display:"flex","&-content":Object.assign({flex:"auto"},L.vS),"&-state":{flex:"none",display:"flex",alignItems:"center"},[`&-active:not(${ve}-option-disabled)`]:{backgroundColor:C.optionActiveBg},[`&-selected:not(${ve}-option-disabled)`]:{color:C.optionSelectedColor,fontWeight:C.optionSelectedFontWeight,backgroundColor:C.optionSelectedBg,[`${ve}-option-state`]:{color:C.colorPrimary}},"&-disabled":{[`&${ve}-option-selected`]:{backgroundColor:C.colorBgContainerDisabled},color:C.colorTextDisabled,cursor:"not-allowed"},"&-grouped":{paddingInlineStart:C.controlPaddingHorizontal*2}}}),"&-rtl":{direction:"rtl"}})},(0,A.oN)(C,"slide-up"),(0,A.oN)(C,"slide-down"),(0,p.Fm)(C,"move-up"),(0,p.Fm)(C,"move-down")]};const k=2,N=C=>{let{controlHeightSM:K,controlHeight:$,lineWidth:ve}=C;const Se=($-K)/2-ve,Le=Math.ceil(Se/2);return[Se,Le]};function v(C,K){const{componentCls:$,iconCls:ve}=C,Se=`${$}-selection-overflow`,Le=C.multipleSelectItemHeight,[ye]=N(C),te=K?`${$}-${K}`:"";return{[`${$}-multiple${te}`]:{fontSize:C.fontSize,[Se]:{position:"relative",display:"flex",flex:"auto",flexWrap:"wrap",maxWidth:"100%","&-item":{flex:"none",alignSelf:"center",maxWidth:"100%",display:"inline-flex"}},[`${$}-selector`]:{display:"flex",flexWrap:"wrap",alignItems:"center",padding:`${ye-k}px ${k*2}px`,borderRadius:C.borderRadius,[`${$}-show-search&`]:{cursor:"text"},[`${$}-disabled&`]:{background:C.multipleSelectorBgDisabled,cursor:"not-allowed"},"&:after":{display:"inline-block",width:0,margin:`${k}px 0`,lineHeight:`${Le}px`,visibility:"hidden",content:'"\\a0"'}},[`
&${$}-show-arrow ${$}-selector,
&${$}-allow-clear ${$}-selector
`]:{paddingInlineEnd:C.fontSizeIcon+C.controlPaddingHorizontal},[`${$}-selection-item`]:{position:"relative",display:"flex",flex:"none",boxSizing:"border-box",maxWidth:"100%",height:Le,marginTop:k,marginBottom:k,lineHeight:`${Le-C.lineWidth*2}px`,background:C.multipleItemBg,border:`${C.lineWidth}px ${C.lineType} ${C.multipleItemBorderColor}`,borderRadius:C.borderRadiusSM,cursor:"default",transition:`font-size ${C.motionDurationSlow}, line-height ${C.motionDurationSlow}, height ${C.motionDurationSlow}`,userSelect:"none",marginInlineEnd:k*2,paddingInlineStart:C.paddingXS,paddingInlineEnd:C.paddingXS/2,[`${$}-disabled&`]:{color:C.multipleItemColorDisabled,borderColor:C.multipleItemBorderColorDisabled,cursor:"not-allowed"},"&-content":{display:"inline-block",marginInlineEnd:C.paddingXS/2,overflow:"hidden",whiteSpace:"pre",textOverflow:"ellipsis"},"&-remove":Object.assign(Object.assign({},(0,L.Ro)()),{display:"inline-flex",alignItems:"center",color:C.colorIcon,fontWeight:"bold",fontSize:10,lineHeight:"inherit",cursor:"pointer",[`> ${ve}`]:{verticalAlign:"-0.2em"},"&:hover":{color:C.colorIconHover}})},[`${Se}-item + ${Se}-item`]:{[`${$}-selection-search`]:{marginInlineStart:0}},[`${$}-selection-search`]:{display:"inline-flex",position:"relative",maxWidth:"100%",marginInlineStart:C.inputPaddingHorizontalBase-ye,"\n &-input,\n &-mirror\n ":{height:Le,fontFamily:C.fontFamily,lineHeight:`${Le}px`,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"}},[`${$}-selection-placeholder `]:{position:"absolute",top:"50%",insetInlineStart:C.inputPaddingHorizontalBase,insetInlineEnd:C.inputPaddingHorizontalBase,transform:"translateY(-50%)",transition:`all ${C.motionDurationSlow}`}}}}var S=C=>{const{componentCls:K}=C,$=(0,ge.TS)(C,{controlHeight:C.controlHeightSM,multipleSelectItemHeight:C.controlHeightXS,borderRadius:C.borderRadiusSM,borderRadiusSM:C.borderRadiusXS}),ve=(0,ge.TS)(C,{fontSize:C.fontSizeLG,controlHeight:C.controlHeightLG,multipleSelectItemHeight:C.multipleItemHeightLG,borderRadius:C.borderRadiusLG,borderRadiusSM:C.borderRadius}),[,Se]=N(C);return[v(C),v($,"sm"),{[`${K}-multiple${K}-sm`]:{[`${K}-selection-placeholder`]:{insetInline:C.controlPaddingHorizontalSM-C.lineWidth},[`${K}-selection-search`]:{marginInlineStart:Se}}},v(ve,"lg")]};function T(C,K){const{componentCls:$,inputPaddingHorizontalBase:ve,borderRadius:Se}=C,Le=C.controlHeight-C.lineWidth*2,ye=Math.ceil(C.fontSize*1.25),te=K?`${$}-${K}`:"";return{[`${$}-single${te}`]:{fontSize:C.fontSize,[`${$}-selector`]:Object.assign(Object.assign({},(0,L.Wf)(C)),{display:"flex",borderRadius:Se,[`${$}-selection-search`]:{position:"absolute",top:0,insetInlineStart:ve,insetInlineEnd:ve,bottom:0,"&-input":{width:"100%"}},[`
${$}-selection-item,
${$}-selection-placeholder
`]:{padding:0,lineHeight:`${Le}px`,transition:`all ${C.motionDurationSlow}, visibility 0s`,"@supports (-moz-appearance: meterbar)":{lineHeight:`${Le}px`}},[`${$}-selection-item`]:{position:"relative",userSelect:"none"},[`${$}-selection-placeholder`]:{transition:"none",pointerEvents:"none"},[["&:after",`${$}-selection-item:after`,`${$}-selection-placeholder:after`].join(",")]:{display:"inline-block",width:0,visibility:"hidden",content:'"\\a0"'}}),[`
&${$}-show-arrow ${$}-selection-item,
&${$}-show-arrow ${$}-selection-placeholder
`]:{paddingInlineEnd:ye},[`&${$}-open ${$}-selection-item`]:{color:C.colorTextPlaceholder},[`&:not(${$}-customize-input)`]:{[`${$}-selector`]:{width:"100%",height:C.controlHeight,padding:`0 ${ve}px`,[`${$}-selection-search-input`]:{height:Le},"&:after":{lineHeight:`${Le}px`}}},[`&${$}-customize-input`]:{[`${$}-selector`]:{"&:after":{display:"none"},[`${$}-selection-search`]:{position:"static",width:"100%"},[`${$}-selection-placeholder`]:{position:"absolute",insetInlineStart:0,insetInlineEnd:0,padding:`0 ${ve}px`,"&:after":{display:"none"}}}}}}}function z(C){const{componentCls:K}=C,$=C.controlPaddingHorizontalSM-C.lineWidth;return[T(C),T((0,ge.TS)(C,{controlHeight:C.controlHeightSM,borderRadius:C.borderRadiusSM}),"sm"),{[`${K}-single${K}-sm`]:{[`&:not(${K}-customize-input)`]:{[`${K}-selection-search`]:{insetInlineStart:$,insetInlineEnd:$},[`${K}-selector`]:{padding:`0 ${$}px`},[`&${K}-show-arrow ${K}-selection-search`]:{insetInlineEnd:$+C.fontSize*1.5},[`
&${K}-show-arrow ${K}-selection-item,
&${K}-show-arrow ${K}-selection-placeholder
`]:{paddingInlineEnd:C.fontSize*1.5}}}},T((0,ge.TS)(C,{controlHeight:C.singleItemHeightLG,fontSize:C.fontSizeLG,borderRadius:C.borderRadiusLG}),"lg")]}const ae=C=>{const{componentCls:K,selectorBg:$}=C;return{position:"relative",backgroundColor:$,border:`${C.lineWidth}px ${C.lineType} ${C.colorBorder}`,transition:`all ${C.motionDurationMid} ${C.motionEaseInOut}`,input:{cursor:"pointer"},[`${K}-show-search&`]:{cursor:"text",input:{cursor:"auto",color:"inherit"}},[`${K}-disabled&`]:{color:C.colorTextDisabled,background:C.colorBgContainerDisabled,cursor:"not-allowed",[`${K}-multiple&`]:{background:C.multipleSelectorBgDisabled},input:{cursor:"not-allowed"}}}},B=function(C,K){let $=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1;const{componentCls:ve,borderHoverColor:Se,outlineColor:Le,antCls:ye}=K,te=$?{[`${ve}-selector`]:{borderColor:Se}}:{};return{[C]:{[`&:not(${ve}-disabled):not(${ve}-customize-input):not(${ye}-pagination-size-changer)`]:Object.assign(Object.assign({},te),{[`${ve}-focused& ${ve}-selector`]:{borderColor:Se,boxShadow:`0 0 0 ${K.controlOutlineWidth}px ${Le}`,outline:0},[`&:hover ${ve}-selector`]:{borderColor:Se}})}}},U=C=>{const{componentCls:K}=C;return{[`${K}-selection-search-input`]:{margin:0,padding:0,background:"transparent",border:"none",outline:"none",appearance:"none","&::-webkit-search-cancel-button":{display:"none","-webkit-appearance":"none"}}}},X=C=>{const{componentCls:K,inputPaddingHorizontalBase:$,iconCls:ve}=C;return{[K]:Object.assign(Object.assign({},(0,L.Wf)(C)),{position:"relative",display:"inline-block",cursor:"pointer",[`&:not(${K}-customize-input) ${K}-selector`]:Object.assign(Object.assign({},ae(C)),U(C)),[`${K}-selection-item`]:Object.assign({flex:1,fontWeight:"normal"},L.vS),[`${K}-selection-placeholder`]:Object.assign(Object.assign({},L.vS),{flex:1,color:C.colorTextPlaceholder,pointerEvents:"none"}),[`${K}-arrow`]:Object.assign(Object.assign({},(0,L.Ro)()),{position:"absolute",top:"50%",insetInlineStart:"auto",insetInlineEnd:$,height:C.fontSizeIcon,marginTop:-C.fontSizeIcon/2,color:C.colorTextQuaternary,fontSize:C.fontSizeIcon,lineHeight:1,textAlign:"center",pointerEvents:"none",display:"flex",alignItems:"center",[ve]:{verticalAlign:"top",transition:`transform ${C.motionDurationSlow}`,"> svg":{verticalAlign:"top"},[`&:not(${K}-suffix)`]:{pointerEvents:"auto"}},[`${K}-disabled &`]:{cursor:"not-allowed"},"> *:not(:last-child)":{marginInlineEnd:8}}),[`${K}-clear`]:{position:"absolute",top:"50%",insetInlineStart:"auto",insetInlineEnd:$,zIndex:1,display:"inline-block",width:C.fontSizeIcon,height:C.fontSizeIcon,marginTop:-C.fontSizeIcon/2,color:C.colorTextQuaternary,fontSize:C.fontSizeIcon,fontStyle:"normal",lineHeight:1,textAlign:"center",textTransform:"none",background:C.clearBg,cursor:"pointer",opacity:0,transition:`color ${C.motionDurationMid} ease, opacity ${C.motionDurationSlow} ease`,textRendering:"auto","&:before":{display:"block"},"&:hover":{color:C.colorTextTertiary}},"&:hover":{[`${K}-clear`]:{opacity:1}}}),[`${K}-has-feedback`]:{[`${K}-clear`]:{insetInlineEnd:$+C.fontSize+C.paddingXS}}}},Z=C=>{const{componentCls:K}=C;return[{[K]:{[`&-borderless ${K}-selector`]:{backgroundColor:"transparent !important",borderColor:"transparent !important",boxShadow:"none !important"},[`&${K}-in-form-item`]:{width:"100%"}}},X(C),z(C),S(C),o(C),{[`${K}-rtl`]:{direction:"rtl"}},B(K,(0,ge.TS)(C,{borderHoverColor:C.colorPrimaryHover,outlineColor:C.controlOutline})),B(`${K}-status-error`,(0,ge.TS)(C,{borderHoverColor:C.colorErrorHover,outlineColor:C.colorErrorOutline}),!0),B(`${K}-status-warning`,(0,ge.TS)(C,{borderHoverColor:C.colorWarningHover,outlineColor:C.colorWarningOutline}),!0),(0,Q.c)(C,{borderElCls:`${K}-selector`,focusElCls:`${K}-focused`})]};var D=(0,_e.Z)("Select",(C,K)=>{let{rootPrefixCls:$}=K;const ve=(0,ge.TS)(C,{rootPrefixCls:$,inputPaddingHorizontalBase:C.paddingSM-1,multipleSelectItemHeight:C.multipleItemHeight});return[Z(ve)]},C=>{const{fontSize:K,lineHeight:$,controlHeight:ve,controlPaddingHorizontal:Se,zIndexPopupBase:Le,colorText:ye,fontWeightStrong:te,controlItemBgActive:j,controlItemBgHover:ue,colorBgContainer:R,colorFillSecondary:ee,controlHeightLG:G,controlHeightSM:y,colorBgContainerDisabled:E,colorTextDisabled:Y}=C;return{zIndexPopup:Le+50,optionSelectedColor:ye,optionSelectedFontWeight:te,optionSelectedBg:j,optionActiveBg:ue,optionPadding:`${(ve-K*$)/2}px ${Se}px`,optionFontSize:K,optionLineHeight:$,optionHeight:ve,selectorBg:R,clearBg:R,singleItemHeightLG:G,multipleItemBg:ee,multipleItemBorderColor:"transparent",multipleItemHeight:y,multipleItemHeightLG:ve,multipleSelectorBgDisabled:E,multipleItemColorDisabled:Y,multipleItemBorderColorDisabled:"transparent"}})},58582:function(ln,et,m){"use strict";m.d(et,{Z:function(){return Q}});const L=ge=>{const A={overflow:{adjustX:!0,adjustY:!0,shiftY:!0},htmlRegion:ge==="scroll"?"scroll":"visible",_experimental:{dynamicInset:!0}};return{bottomLeft:Object.assign(Object.assign({},A),{points:["tl","bl"],offset:[0,4]}),bottomRight:Object.assign(Object.assign({},A),{points:["tr","br"],offset:[0,4]}),topLeft:Object.assign(Object.assign({},A),{points:["bl","tl"],offset:[0,-4]}),topRight:Object.assign(Object.assign({},A),{points:["br","tr"],offset:[0,-4]})}};function Q(ge,_e){return ge||L(_e)}},84443:function(ln,et,m){"use strict";m.d(et,{Z:function(){return L}});function L(Q,ge){return ge!==void 0?ge:Q!==null}},66339:function(ln,et,m){"use strict";m.d(et,{Z:function(){return fe}});var L=m(40001),Q=m(19248),ge=m(99267),_e=m(84105),A=m(58617),p=m(47472),be=m(59301);function fe(o){let{suffixIcon:k,clearIcon:N,menuItemSelectedIcon:v,removeIcon:x,loading:S,multiple:T,hasFeedback:z,prefixCls:ae,showSuffixIcon:B,feedbackIcon:U,showArrow:X,componentName:Z}=o;const D=N!=null?N:be.createElement(Q.Z,null),C=Se=>k===null&&!z&&!X?null:be.createElement(be.Fragment,null,B!==!1&&Se,z&&U);let K=null;if(k!==void 0)K=C(k);else if(S)K=C(be.createElement(A.Z,{spin:!0}));else{const Se=`${ae}-suffix`;K=Le=>{let{open:ye,showSearch:te}=Le;return C(ye&&te?be.createElement(p.Z,{className:Se}):be.createElement(_e.Z,{className:Se}))}}let $=null;v!==void 0?$=v:T?$=be.createElement(L.Z,null):$=null;let ve=null;return x!==void 0?ve=x:ve=be.createElement(ge.Z,null),{clearIcon:D,suffixIcon:K,itemIcon:$,removeIcon:ve}}},8378:function(ln,et){"use strict";const m=L=>({[L.componentCls]:{[`${L.antCls}-motion-collapse-legacy`]:{overflow:"hidden","&-active":{transition:`height ${L.motionDurationMid} ${L.motionEaseInOut},
opacity ${L.motionDurationMid} ${L.motionEaseInOut} !important`}},[`${L.antCls}-motion-collapse`]:{overflow:"hidden",transition:`height ${L.motionDurationMid} ${L.motionEaseInOut},
opacity ${L.motionDurationMid} ${L.motionEaseInOut} !important`}}});et.Z=m},92899:function(ln,et,m){"use strict";m.d(et,{Fm:function(){return v}});var L=m(93083),Q=m(95406);const ge=new L.Keyframes("antMoveDownIn",{"0%":{transform:"translate3d(0, 100%, 0)",transformOrigin:"0 0",opacity:0},"100%":{transform:"translate3d(0, 0, 0)",transformOrigin:"0 0",opacity:1}}),_e=new L.Keyframes("antMoveDownOut",{"0%":{transform:"translate3d(0, 0, 0)",transformOrigin:"0 0",opacity:1},"100%":{transform:"translate3d(0, 100%, 0)",transformOrigin:"0 0",opacity:0}}),A=new L.Keyframes("antMoveLeftIn",{"0%":{transform:"translate3d(-100%, 0, 0)",transformOrigin:"0 0",opacity:0},"100%":{transform:"translate3d(0, 0, 0)",transformOrigin:"0 0",opacity:1}}),p=new L.Keyframes("antMoveLeftOut",{"0%":{transform:"translate3d(0, 0, 0)",transformOrigin:"0 0",opacity:1},"100%":{transform:"translate3d(-100%, 0, 0)",transformOrigin:"0 0",opacity:0}}),be=new L.Keyframes("antMoveRightIn",{"0%":{transform:"translate3d(100%, 0, 0)",transformOrigin:"0 0",opacity:0},"100%":{transform:"translate3d(0, 0, 0)",transformOrigin:"0 0",opacity:1}}),fe=new L.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 L.Keyframes("antMoveUpIn",{"0%":{transform:"translate3d(0, -100%, 0)",transformOrigin:"0 0",opacity:0},"100%":{transform:"translate3d(0, 0, 0)",transformOrigin:"0 0",opacity:1}}),k=new L.Keyframes("antMoveUpOut",{"0%":{transform:"translate3d(0, 0, 0)",transformOrigin:"0 0",opacity:1},"100%":{transform:"translate3d(0, -100%, 0)",transformOrigin:"0 0",opacity:0}}),N={"move-up":{inKeyframes:o,outKeyframes:k},"move-down":{inKeyframes:ge,outKeyframes:_e},"move-left":{inKeyframes:A,outKeyframes:p},"move-right":{inKeyframes:be,outKeyframes:fe}},v=(x,S)=>{const{antCls:T}=x,z=`${T}-${S}`,{inKeyframes:ae,outKeyframes:B}=N[S];return[(0,Q.R)(z,ae,B,x.motionDurationMid),{[`
${z}-enter,
${z}-appear
`]:{opacity:0,animationTimingFunction:x.motionEaseOutCirc},[`${z}-leave`]:{animationTimingFunction:x.motionEaseInOutCirc}}]}},13826:function(ln,et,m){"use strict";m.d(et,{Qt:function(){return A},Uw:function(){return _e},fJ:function(){return ge},ly:function(){return p},oN:function(){return v}});var L=m(93083),Q=m(95406);const ge=new L.Keyframes("antSlideUpIn",{"0%":{transform:"scaleY(0.8)",transformOrigin:"0% 0%",opacity:0},"100%":{transform:"scaleY(1)",transformOrigin:"0% 0%",opacity:1}}),_e=new L.Keyframes("antSlideUpOut",{"0%":{transform:"scaleY(1)",transformOrigin:"0% 0%",opacity:1},"100%":{transform:"scaleY(0.8)",transformOrigin:"0% 0%",opacity:0}}),A=new L.Keyframes("antSlideDownIn",{"0%":{transform:"scaleY(0.8)",transformOrigin:"100% 100%",opacity:0},"100%":{transform:"scaleY(1)",transformOrigin:"100% 100%",opacity:1}}),p=new L.Keyframes("antSlideDownOut",{"0%":{transform:"scaleY(1)",transformOrigin:"100% 100%",opacity:1},"100%":{transform:"scaleY(0.8)",transformOrigin:"100% 100%",opacity:0}}),be=new L.Keyframes("antSlideLeftIn",{"0%":{transform:"scaleX(0.8)",transformOrigin:"0% 0%",opacity:0},"100%":{transform:"scaleX(1)",transformOrigin:"0% 0%",opacity:1}}),fe=new L.Keyframes("antSlideLeftOut",{"0%":{transform:"scaleX(1)",transformOrigin:"0% 0%",opacity:1},"100%":{transform:"scaleX(0.8)",transformOrigin:"0% 0%",opacity:0}}),o=new L.Keyframes("antSlideRightIn",{"0%":{transform:"scaleX(0.8)",transformOrigin:"100% 0%",opacity:0},"100%":{transform:"scaleX(1)",transformOrigin:"100% 0%",opacity:1}}),k=new L.Keyframes("antSlideRightOut",{"0%":{transform:"scaleX(1)",transformOrigin:"100% 0%",opacity:1},"100%":{transform:"scaleX(0.8)",transformOrigin:"100% 0%",opacity:0}}),N={"slide-up":{inKeyframes:ge,outKeyframes:_e},"slide-down":{inKeyframes:A,outKeyframes:p},"slide-left":{inKeyframes:be,outKeyframes:fe},"slide-right":{inKeyframes:o,outKeyframes:k}},v=(x,S)=>{const{antCls:T}=x,z=`${T}-${S}`,{inKeyframes:ae,outKeyframes:B}=N[S];return[(0,Q.R)(z,ae,B,x.motionDurationMid),{[`
${z}-enter,
${z}-appear
`]:{transform:"scale(0)",transformOrigin:"0% 0%",opacity:0,animationTimingFunction:x.motionEaseOutQuint,"&-prepare":{transform:"scale(1)"}},[`${z}-leave`]:{animationTimingFunction:x.motionEaseInQuint}}]}},19447:function(ln,et,m){"use strict";m.d(et,{ZP:function(){return A},fS:function(){return ge},qN:function(){return Q}});var L=m(47585);const Q=8;function ge(p){const be=Q,{contentRadius:fe,limitVerticalRadius:o}=p,k=fe>12?fe+2:12;return{dropdownArrowOffset:k,dropdownArrowOffsetVertical:o?be:k}}function _e(p,be){return p?be:{}}function A(p,be){const{componentCls:fe,sizePopupArrow:o,borderRadiusXS:k,borderRadiusOuter:N,boxShadowPopoverArrow:v}=p,{colorBg:x,contentRadius:S=p.borderRadiusLG,limitVerticalRadius:T,arrowDistance:z=0,arrowPlacement:ae={left:!0,right:!0,top:!0,bottom:!0}}=be,{dropdownArrowOffsetVertical:B,dropdownArrowOffset:U}=ge({contentRadius:S,limitVerticalRadius:T});return{[fe]:Object.assign(Object.assign(Object.assign(Object.assign({[`${fe}-arrow`]:[Object.assign(Object.assign({position:"absolute",zIndex:1,display:"block"},(0,L.r)(o,k,N,x,v)),{"&:before":{background:x}})]},_e(!!ae.top,{[[`&-placement-top ${fe}-arrow`,`&-placement-topLeft ${fe}-arrow`,`&-placement-topRight ${fe}-arrow`].join(",")]:{bottom:z,transform:"translateY(100%) rotate(180deg)"},[`&-placement-top ${fe}-arrow`]:{left:{_skip_check_:!0,value:"50%"},transform:"translateX(-50%) translateY(100%) rotate(180deg)"},[`&-placement-topLeft ${fe}-arrow`]:{left:{_skip_check_:!0,value:U}},[`&-placement-topRight ${fe}-arrow`]:{right:{_skip_check_:!0,value:U}}})),_e(!!ae.bottom,{[[`&-placement-bottom ${fe}-arrow`,`&-placement-bottomLeft ${fe}-arrow`,`&-placement-bottomRight ${fe}-arrow`].join(",")]:{top:z,transform:"translateY(-100%)"},[`&-placement-bottom ${fe}-arrow`]:{left:{_skip_check_:!0,value:"50%"},transform:"translateX(-50%) translateY(-100%)"},[`&-placement-bottomLeft ${fe}-arrow`]:{left:{_skip_check_:!0,value:U}},[`&-placement-bottomRight ${fe}-arrow`]:{right:{_skip_check_:!0,value:U}}})),_e(!!ae.left,{[[`&-placement-left ${fe}-arrow`,`&-placement-leftTop ${fe}-arrow`,`&-placement-leftBottom ${fe}-arrow`].join(",")]:{right:{_skip_check_:!0,value:z},transform:"translateX(100%) rotate(90deg)"},[`&-placement-left ${fe}-arrow`]:{top:{_skip_check_:!0,value:"50%"},transform:"translateY(-50%) translateX(100%) rotate(90deg)"},[`&-placement-leftTop ${fe}-arrow`]:{top:B},[`&-placement-leftBottom ${fe}-arrow`]:{bottom:B}})),_e(!!ae.right,{[[`&-placement-right ${fe}-arrow`,`&-placement-rightTop ${fe}-arrow`,`&-placement-rightBottom ${fe}-arrow`].join(",")]:{left:{_skip_check_:!0,value:z},transform:"translateX(-100%) rotate(-90deg)"},[`&-placement-right ${fe}-arrow`]:{top:{_skip_check_:!0,value:"50%"},transform:"translateY(-50%) translateX(-100%) rotate(-90deg)"},[`&-placement-rightTop ${fe}-arrow`]:{top:B},[`&-placement-rightBottom ${fe}-arrow`]:{bottom:B}}))}}},47585:function(ln,et,m){"use strict";m.d(et,{r:function(){return L}});const L=(Q,ge,_e,A,p)=>{const be=Q/2,fe=0,o=be,k=_e*1/Math.sqrt(2),N=be-_e*(1-1/Math.sqrt(2)),v=be-ge*(1/Math.sqrt(2)),x=_e*(Math.sqrt(2)-1)+ge*(1/Math.sqrt(2)),S=2*be-v,T=x,z=2*be-k,ae=N,B=2*be-fe,U=o,X=be*Math.sqrt(2)+_e*(Math.sqrt(2)-2),Z=_e*(Math.sqrt(2)-1);return{pointerEvents:"none",width:Q,height:Q,overflow:"hidden","&::before":{position:"absolute",bottom:0,insetInlineStart:0,width:Q,height:Q/2,background:A,clipPath:{_multi_value_:!0,value:[`polygon(${Z}px 100%, 50% ${Z}px, ${2*be-Z}px 100%, ${Z}px 100%)`,`path('M ${fe} ${o} A ${_e} ${_e} 0 0 0 ${k} ${N} L ${v} ${x} A ${ge} ${ge} 0 0 1 ${S} ${T} L ${z} ${ae} A ${_e} ${_e} 0 0 0 ${B} ${U} Z')`]},content:'""'},"&::after":{content:'""',position:"absolute",width:X,height:X,bottom:0,insetInline:0,margin:"auto",borderRadius:{_skip_check_:!0,value:`0 0 ${ge}px 0`},transform:"translateY(50%) rotate(-135deg)",boxShadow:p,zIndex:0,background:"transparent"}}}},33166:function(ln,et,m){"use strict";m.d(et,{i:function(){return L}});const L=["blue","purple","cyan","green","magenta","pink","red","orange","yellow","volcano","geekblue","lime","gold"]},45157:function(ln,et,m){"use strict";m.d(et,{Z:function(){return Q}});var L=m(33166);function Q(ge,_e){return L.i.reduce((A,p)=>{const be=ge[`${p}1`],fe=ge[`${p}3`],o=ge[`${p}6`],k=ge[`${p}7`];return Object.assign(Object.assign({},A),_e(p,{lightColor:be,lightBorderColor:fe,darkColor:o,textColor:k}))},{})}},6848:function(ln,et,m){"use strict";m.d(et,{Z:function(){return Le}});var L=m(59301),Q=m(92310),ge=m.n(Q),_e=m(55477),A=m(18929),p=m(62892),be=m(79676),fe=m(92343),o=m(36355),k=m(33234),N=m(88088),v=m(17313),x=m(29878),S=m(19447),T=m(45157),z=m(37613),ae=m(83116);const B=ye=>{const{componentCls:te,tooltipMaxWidth:j,tooltipColor:ue,tooltipBg:R,tooltipBorderRadius:ee,zIndexPopup:G,controlHeight:y,boxShadowSecondary:E,paddingSM:Y,paddingXS:me,tooltipRadiusOuter:$e}=ye;return[{[te]:Object.assign(Object.assign(Object.assign(Object.assign({},(0,v.Wf)(ye)),{position:"absolute",zIndex:G,display:"block",width:"max-content",maxWidth:j,visibility:"visible",transformOrigin:"var(--arrow-x, 50%) var(--arrow-y, 50%)","&-hidden":{display:"none"},"--antd-arrow-background-color":R,[`${te}-inner`]:{minWidth:y,minHeight:y,padding:`${Y/2}px ${me}px`,color:ue,textAlign:"start",textDecoration:"none",wordWrap:"break-word",backgroundColor:R,borderRadius:ee,boxShadow:E,boxSizing:"border-box"},[["&-placement-left","&-placement-leftTop","&-placement-leftBottom","&-placement-right","&-placement-rightTop","&-placement-rightBottom"].join(",")]:{[`${te}-inner`]:{borderRadius:Math.min(ee,S.qN)}},[`${te}-content`]:{position:"relative"}}),(0,T.Z)(ye,(We,qe)=>{let{darkColor:Xe}=qe;return{[`&${te}-${We}`]:{[`${te}-inner`]:{backgroundColor:Xe},[`${te}-arrow`]:{"--antd-arrow-background-color":Xe}}}})),{"&-rtl":{direction:"rtl"}})},(0,S.ZP)((0,z.TS)(ye,{borderRadiusOuter:$e}),{colorBg:"var(--antd-arrow-background-color)",contentRadius:ee,limitVerticalRadius:!0}),{[`${te}-pure`]:{position:"relative",maxWidth:"none",margin:ye.sizePopupArrow}}]};var U=(ye,te)=>(0,ae.Z)("Tooltip",ue=>{if(te===!1)return[];const{borderRadius:R,colorTextLightSolid:ee,colorBgDefault:G,borderRadiusOuter:y}=ue,E=(0,z.TS)(ue,{tooltipMaxWidth:250,tooltipColor:ee,tooltipBorderRadius:R,tooltipBg:G,tooltipRadiusOuter:y>4?4:y});return[B(E),(0,x._y)(ue,"zoom-big-fast")]},ue=>{let{zIndexPopupBase:R,colorBgSpotlight:ee}=ue;return{zIndexPopup:R+70,colorBgDefault:ee}},{resetStyle:!1})(ye),X=m(36785);function Z(ye,te){const j=(0,X.o2)(te),ue=ge()({[`${ye}-${te}`]:te&&j}),R={},ee={};return te&&!j&&(R.background=te,ee["--antd-arrow-background-color"]=te),{className:ue,overlayStyle:R,arrowStyle:ee}}var C=ye=>{const{prefixCls:te,className:j,placement:ue="top",title:R,color:ee,overlayInnerStyle:G}=ye,{getPrefixCls:y}=L.useContext(o.E_),E=y("tooltip",te),[Y,me]=U(E,!0),$e=Z(E,ee),We=$e.arrowStyle,qe=Object.assign(Object.assign({},G),$e.overlayStyle),Xe=ge()(me,E,`${E}-pure`,`${E}-placement-${ue}`,j,$e.className);return Y(L.createElement("div",{className:Xe,style:We},L.createElement("div",{className:`${E}-arrow`}),L.createElement(_e.G,Object.assign({},ye,{className:me,prefixCls:E,overlayInnerStyle:qe}),R)))},K=function(ye,te){var j={};for(var ue in ye)Object.prototype.hasOwnProperty.call(ye,ue)&&te.indexOf(ue)<0&&(j[ue]=ye[ue]);if(ye!=null&&typeof Object.getOwnPropertySymbols=="function")for(var R=0,ue=Object.getOwnPropertySymbols(ye);R<ue.length;R++)te.indexOf(ue[R])<0&&Object.prototype.propertyIsEnumerable.call(ye,ue[R])&&(j[ue[R]]=ye[ue[R]]);return j};const $=(ye,te)=>{const j={},ue=Object.assign({},ye);return te.forEach(R=>{ye&&R in ye&&(j[R]=ye[R],delete ue[R])}),{picked:j,omitted:ue}};function ve(ye,te){const j=ye.type;if((j.__ANT_BUTTON===!0||ye.type==="button")&&ye.props.disabled||j.__ANT_SWITCH===!0&&(ye.props.disabled||ye.props.loading)||j.__ANT_RADIO===!0&&ye.props.disabled){const{picked:ue,omitted:R}=$(ye.props.style,["position","left","right","top","bottom","float","display","zIndex"]),ee=Object.assign(Object.assign({display:"inline-block"},ue),{cursor:"not-allowed",width:ye.props.block?"100%":void 0}),G=Object.assign(Object.assign({},R),{pointerEvents:"none"}),y=(0,fe.Tm)(ye,{style:G,className:null});return L.createElement("span",{style:ee,className:ge()(ye.props.className,`${te}-disabled-compatible-wrapper`)},y)}return ye}const Se=L.forwardRef((ye,te)=>{var j,ue;const{prefixCls:R,openClassName:ee,getTooltipContainer:G,overlayClassName:y,color:E,overlayInnerStyle:Y,children:me,afterOpenChange:$e,afterVisibleChange:We,destroyTooltipOnHide:qe,arrow:Xe=!0,title:gt,overlay:_t,builtinPlacements:st,arrowPointAtCenter:Kt=!1,autoAdjustOverflow:un=!0}=ye,Ot=!!Xe,[,Vt]=(0,N.Z)(),{getPopupContainer:lt,getPrefixCls:At,direction:ne}=L.useContext(o.E_),de=L.useRef(null),se=()=>{var He;(He=de.current)===null||He===void 0||He.forceAlign()};L.useImperativeHandle(te,()=>({forceAlign:se,forcePopupAlign:()=>{se()}}));const[W,Ie]=(0,A.Z)(!1,{value:(j=ye.open)!==null&&j!==void 0?j:ye.visible,defaultValue:(ue=ye.defaultOpen)!==null&&ue!==void 0?ue:ye.defaultVisible}),M=!gt&&!_t&&gt!==0,ce=He=>{var tt,he;Ie(M?!1:He),M||((tt=ye.onOpenChange)===null||tt===void 0||tt.call(ye,He),(he=ye.onVisibleChange)===null||he===void 0||he.call(ye,He))},q=L.useMemo(()=>{var He,tt;let he=Kt;return typeof Xe=="object"&&(he=(tt=(He=Xe.pointAtCenter)!==null&&He!==void 0?He:Xe.arrowPointAtCenter)!==null&&tt!==void 0?tt:Kt),st||(0,be.Z)({arrowPointAtCenter:he,autoAdjustOverflow:un,arrowWidth:Ot?Vt.sizePopupArrow:0,borderRadius:Vt.borderRadius,offset:Vt.marginXXS,visibleFirst:!0})},[Kt,Xe,st,Vt]),le=L.useMemo(()=>gt===0?gt:_t||gt||"",[_t,gt]),pe=L.createElement(k.BR,null,typeof le=="function"?le():le),{getPopupContainer:De,placement:Te="top",mouseEnterDelay:ke=.1,mouseLeaveDelay:Oe=.1,overlayStyle:Ne,rootClassName:nt}=ye,Qe=K(ye,["getPopupContainer","placement","mouseEnterDelay","mouseLeaveDelay","overlayStyle","rootClassName"]),Ze=At("tooltip",R),pt=At(),vt=ye["data-popover-inject"];let ct=W;!("open"in ye)&&!("visible"in ye)&&M&&(ct=!1);const Dt=ve((0,fe.l$)(me)&&!(0,fe.M2)(me)?me:L.createElement("span",null,me),Ze),Ut=Dt.props,w=!Ut.className||typeof Ut.className=="string"?ge()(Ut.className,ee||`${Ze}-open`):Ut.className,[I,dt]=U(Ze,!vt),oe=Z(Ze,E),Pe=oe.arrowStyle,vn=Object.assign(Object.assign({},Y),oe.overlayStyle),je=ge()(y,{[`${Ze}-rtl`]:ne==="rtl"},oe.className,nt,dt);return I(L.createElement(_e.Z,Object.assign({},Qe,{showArrow:Ot,placement:Te,mouseEnterDelay:ke,mouseLeaveDelay:Oe,prefixCls:Ze,overlayClassName:je,overlayStyle:Object.assign(Object.assign({},Pe),Ne),getTooltipContainer:De||G||lt,ref:de,builtinPlacements:q,overlay:pe,visible:ct,onVisibleChange:ce,afterVisibleChange:$e!=null?$e:We,overlayInnerStyle:vn,arrowContent:L.createElement("span",{className:`${Ze}-arrow-content`}),motion:{motionName:(0,p.m)(pt,"zoom-big-fast",ye.transitionName),motionDeadline:1e3},destroyTooltipOnHide:!!qe}),ct?(0,fe.Tm)(Dt,{className:w}):Dt))});Se._InternalPanelDoNotUseOrYouWillBeFired=C;var Le=Se},98228:function(ln,et,m){"use strict";m.d(et,{default:function(){return he}});var L=m(92310),Q=m.n(L),ge=m(72308),_e=m(80702),A=m(77321),p=m(52487),be=m(74416),fe=m(62853),o=m(77861),k=m(17115),N=m(90782),v=m(18929),x=m(48736),S=m(59301),T=function(ie){var xe=S.useRef({valueLabels:new Map});return S.useMemo(function(){var Fe=xe.current.valueLabels,V=new Map,at=ie.map(function(Ce){var It,Bt=Ce.value,an=(It=Ce.label)!==null&&It!==void 0?It:Fe.get(Bt);return V.set(Bt,an),(0,A.Z)((0,A.Z)({},Ce),{},{label:an})});return xe.current.valueLabels=V,[at]},[ie])},z=function(ie,xe,Fe,V){return S.useMemo(function(){var at=ie.map(function(an){var en=an.value;return en}),Ce=xe.map(function(an){var en=an.value;return en}),It=at.filter(function(an){return!V[an]});if(Fe){var Bt=(0,N.S)(at,!0,V);at=Bt.checkedKeys,Ce=Bt.halfCheckedKeys}return[Array.from(new Set([].concat((0,_e.Z)(It),(0,_e.Z)(at)))),Ce]},[ie,xe,Fe,V])},ae=m(71430),B=function(ie,xe){return S.useMemo(function(){var Fe=(0,ae.I8)(ie,{fieldNames:xe,initWrapper:function(at){return(0,A.Z)((0,A.Z)({},at),{},{valueEntities:new Map})},processEntity:function(at,Ce){var It=at.node[xe.value];if(0)var Bt;Ce.valueEntities.set(It,at)}});return Fe},[ie,xe])},U=m(49618),X=m(11592),Z=function(){return null},D=Z,C=["children","value"];function K(ie){return(0,X.Z)(ie).map(function(xe){if(!S.isValidElement(xe)||!xe.type)return null;var Fe=xe,V=Fe.key,at=Fe.props,Ce=at.children,It=at.value,Bt=(0,be.Z)(at,C),an=(0,A.Z)({key:V,value:It},Bt),en=K(Ce);return en.length&&(an.children=en),an}).filter(function(xe){return xe})}function $(ie){if(!ie)return ie;var xe=(0,A.Z)({},ie);return"props"in xe||Object.defineProperty(xe,"props",{get:function(){return(0,x.ZP)(!1,"New `rc-tree-select` not support return node instance as argument anymore. Please consider to remove `props` access."),xe}}),xe}function ve(ie,xe,Fe,V,at,Ce){var It=null,Bt=null;function an(){function en(Mt){var tn=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"0",Ue=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1;return Mt.map(function(bt,wt){var Me="".concat(tn,"-").concat(wt),Ae=bt[Ce.value],ut=Fe.includes(Ae),ft=en(bt[Ce.children]||[],Me,ut),Nt=S.createElement(D,bt,ft.map(function(Zt){return Zt.node}));if(xe===Ae&&(It=Nt),ut){var Pt={pos:Me,node:Nt,children:ft};return Ue||Bt.push(Pt),Pt}return null}).filter(function(bt){return bt})}Bt||(Bt=[],en(V),Bt.sort(function(Mt,tn){var Ue=Mt.node.props.value,bt=tn.node.props.value,wt=Fe.indexOf(Ue),Me=Fe.indexOf(bt);return wt-Me}))}Object.defineProperty(ie,"triggerNode",{get:function(){return(0,x.ZP)(!1,"`triggerNode` is deprecated. Please consider decoupling data with node."),an(),It}}),Object.defineProperty(ie,"allCheckedNodes",{get:function(){return(0,x.ZP)(!1,"`allCheckedNodes` is deprecated. Please consider decoupling data with node."),an(),at?Bt:Bt.map(function(Mt){var tn=Mt.node;return tn})}})}var Se=function(ie,xe,Fe){var V=Fe.treeNodeFilterProp,at=Fe.filterTreeNode,Ce=Fe.fieldNames,It=Ce.children;return S.useMemo(function(){if(!xe||at===!1)return ie;var Bt;if(typeof at=="function")Bt=at;else{var an=xe.toUpperCase();Bt=function(tn,Ue){var bt=Ue[V];return String(bt).toUpperCase().includes(an)}}function en(Mt){var tn=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;return Mt.reduce(function(Ue,bt){var wt=bt[It],Me=tn||Bt(xe,$(bt)),Ae=en(wt||[],Me);return(Me||Ae.length)&&Ue.push((0,A.Z)((0,A.Z)({},bt),{},(0,U.Z)({isLeaf:void 0},It,Ae))),Ue},[])}return en(ie)},[ie,xe,It,V,at])};function Le(ie){var xe=S.useRef();xe.current=ie;var Fe=S.useCallback(function(){return xe.current.apply(xe,arguments)},[]);return Fe}function ye(ie,xe){var Fe=xe.id,V=xe.pId,at=xe.rootPId,Ce={},It=[],Bt=ie.map(function(an){var en=(0,A.Z)({},an),Mt=en[Fe];return Ce[Mt]=en,en.key=en.key||Mt,en});return Bt.forEach(function(an){var en=an[V],Mt=Ce[en];Mt&&(Mt.children=Mt.children||[],Mt.children.push(an)),(en===at||!Mt&&at===null)&&It.push(an)}),It}function te(ie,xe,Fe){return S.useMemo(function(){return ie?Fe?ye(ie,(0,A.Z)({id:"id",pId:"pId",rootPId:null},Fe!==!0?Fe:{})):ie:K(xe)},[xe,Fe,ie])}var j=S.createContext(null),ue=j,R=m(10228),ee=m(80547),G=m(54844),y=S.createContext(null),E=y;function Y(ie){return Array.isArray(ie)?ie:ie!==void 0?[ie]:[]}function me(ie){var xe=ie||{},Fe=xe.label,V=xe.value,at=xe.children,Ce=V||"value";return{_title:Fe?[Fe]:["title","label"],value:Ce,key:Ce,children:at||"children"}}function $e(ie){return!ie||ie.disabled||ie.disableCheckbox||ie.checkable===!1}function We(ie,xe){var Fe=[];function V(at){at.forEach(function(Ce){var It=Ce[xe.children];It&&(Fe.push(Ce[xe.value]),V(It))})}return V(ie),Fe}function qe(ie){return ie==null}var Xe={width:0,height:0,display:"flex",overflow:"hidden",opacity:0,border:0,padding:0,margin:0},gt=function(xe,Fe){var V=(0,o.lk)(),at=V.prefixCls,Ce=V.multiple,It=V.searchValue,Bt=V.toggleOpen,an=V.open,en=V.notFoundContent,Mt=S.useContext(E),tn=Mt.virtual,Ue=Mt.listHeight,bt=Mt.listItemHeight,wt=Mt.treeData,Me=Mt.fieldNames,Ae=Mt.onSelect,ut=Mt.dropdownMatchSelectWidth,ft=Mt.treeExpandAction,Nt=S.useContext(ue),Pt=Nt.checkable,Zt=Nt.checkedKeys,Ht=Nt.halfCheckedKeys,sn=Nt.treeExpandedKeys,_n=Nt.treeDefaultExpandAll,hn=Nt.treeDefaultExpandedKeys,Lt=Nt.onTreeExpand,Ft=Nt.treeIcon,$t=Nt.showTreeIcon,Xt=Nt.switcherIcon,Wt=Nt.treeLine,Dn=Nt.treeNodeFilterProp,pn=Nt.loadData,Gt=Nt.treeLoadedKeys,Je=Nt.treeMotion,rt=Nt.onTreeLoad,ht=Nt.keyEntities,xt=S.useRef(),mt=(0,ee.Z)(function(){return wt},[an,wt],function(Ge,mn){return mn[0]&&Ge[1]!==mn[1]}),jt=S.useState(null),Et=(0,p.Z)(jt,2),Qt=Et[0],nn=Et[1],on=ht[Qt],In=S.useMemo(function(){return Pt?{checked:Zt,halfChecked:Ht}:null},[Pt,Zt,Ht]);S.useEffect(function(){if(an&&!Ce&&Zt.length){var Ge;(Ge=xt.current)===null||Ge===void 0||Ge.scrollTo({key:Zt[0]}),nn(Zt[0])}},[an]);var wn=String(It).toLowerCase(),Kn=function(mn){return wn?String(mn[Dn]).toLowerCase().includes(wn):!1},dn=S.useState(hn),fn=(0,p.Z)(dn,2),Hn=fn[0],Zn=fn[1],Yn=S.useState(null),On=(0,p.Z)(Yn,2),Fn=On[0],jn=On[1],Bn=S.useMemo(function(){return sn?(0,_e.Z)(sn):It?Fn:Hn},[Hn,Fn,sn,It]);S.useEffect(function(){It&&jn(We(wt,Me))},[It]);var Jn=function(mn){Zn(mn),jn(mn),Lt&&Lt(mn)},ur=function(mn){mn.preventDefault()},Pn=function(mn,Mn){var Tn=Mn.node;Pt&&$e(Tn)||(Ae(Tn.key,{selected:!Zt.includes(Tn.key)}),Ce||Bt(!1))};if(S.useImperativeHandle(Fe,function(){var Ge;return{scrollTo:(Ge=xt.current)===null||Ge===void 0?void 0:Ge.scrollTo,onKeyDown:function(Mn){var Tn,Xn=Mn.which;switch(Xn){case R.Z.UP:case R.Z.DOWN:case R.Z.LEFT:case R.Z.RIGHT:(Tn=xt.current)===null||Tn===void 0||Tn.onKeyDown(Mn);break;case R.Z.ENTER:{if(on){var sr=(on==null?void 0:on.node)||{},ar=sr.selectable,Un=sr.value;ar!==!1&&Pn(null,{node:{key:Qt},selected:!Zt.includes(Un)})}break}case R.Z.ESC:Bt(!1)}},onKeyUp:function(){}}}),mt.length===0)return S.createElement("div",{role:"listbox",className:"".concat(at,"-empty"),onMouseDown:ur},en);var bn={fieldNames:Me};return Gt&&(bn.loadedKeys=Gt),Bn&&(bn.expandedKeys=Bn),S.createElement("div",{onMouseDown:ur},on&&an&&S.createElement("span",{style:Xe,"aria-live":"assertive"},on.node.value),S.createElement(G.Z,(0,ge.Z)({ref:xt,focusable:!1,prefixCls:"".concat(at,"-tree"),treeData:mt,height:Ue,itemHeight:bt,virtual:tn!==!1&&ut!==!1,multiple:Ce,icon:Ft,showIcon:$t,switcherIcon:Xt,showLine:Wt,loadData:It?null:pn,motion:Je,activeKey:Qt,checkable:Pt,checkStrictly:!0,checkedKeys:In,selectedKeys:Pt?[]:Zt,defaultExpandAll:_n},bn,{onActiveChange:nn,onSelect:Pn,onCheck:Pn,onExpand:Jn,onLoad:rt,filterTreeNode:Kn,expandAction:ft})))},_t=S.forwardRef(gt);_t.displayName="OptionList";var st=_t,Kt="SHOW_ALL",un="SHOW_PARENT",Ot="SHOW_CHILD";function Vt(ie,xe,Fe,V){var at=new Set(ie);return xe===Ot?ie.filter(function(Ce){var It=Fe[Ce];return!(It&&It.children&&It.children.some(function(Bt){var an=Bt.node;return at.has(an[V.value])})&&It.children.every(function(Bt){var an=Bt.node;return $e(an)||at.has(an[V.value])}))}):xe===un?ie.filter(function(Ce){var It=Fe[Ce],Bt=It?It.parent:null;return!(Bt&&!$e(Bt.node)&&at.has(Bt.key))}):ie}function lt(ie){var xe=ie.searchPlaceholder,Fe=ie.treeCheckStrictly,V=ie.treeCheckable,at=ie.labelInValue,Ce=ie.value,It=ie.multiple;warning(!xe,"`searchPlaceholder` has been removed."),Fe&&at===!1&&warning(!1,"`treeCheckStrictly` will force set `labelInValue` to `true`."),(at||Fe)&&warning(toArray(Ce).every(function(Bt){return Bt&&_typeof(Bt)==="object"&&"value"in Bt}),"Invalid prop `value` supplied to `TreeSelect`. You should use { label: string, value: string | number } or [{ label: string, value: string | number }] instead."),Fe||It||V?warning(!Ce||Array.isArray(Ce),"`value` should be an array when `TreeSelect` is checkable or multiple."):warning(!Array.isArray(Ce),"`value` should not be array when `TreeSelect` is single mode.")}var At=null,ne=["id","prefixCls","value","defaultValue","onChange","onSelect","onDeselect","searchValue","inputValue","onSearch","autoClearSearchValue","filterTreeNode","treeNodeFilterProp","showCheckedStrategy","treeNodeLabelProp","multiple","treeCheckable","treeCheckStrictly","labelInValue","fieldNames","treeDataSimpleMode","treeData","children","loadData","treeLoadedKeys","onTreeLoad","treeDefaultExpandAll","treeExpandedKeys","treeDefaultExpandedKeys","onTreeExpand","treeExpandAction","virtual","listHeight","listItemHeight","onDropdownVisibleChange","dropdownMatchSelectWidth","treeLine","treeIcon","showTreeIcon","switcherIcon","treeMotion"];function de(ie){return!ie||(0,fe.Z)(ie)!=="object"}var se=S.forwardRef(function(ie,xe){var Fe=ie.id,V=ie.prefixCls,at=V===void 0?"rc-tree-select":V,Ce=ie.value,It=ie.defaultValue,Bt=ie.onChange,an=ie.onSelect,en=ie.onDeselect,Mt=ie.searchValue,tn=ie.inputValue,Ue=ie.onSearch,bt=ie.autoClearSearchValue,wt=bt===void 0?!0:bt,Me=ie.filterTreeNode,Ae=ie.treeNodeFilterProp,ut=Ae===void 0?"value":Ae,ft=ie.showCheckedStrategy,Nt=ie.treeNodeLabelProp,Pt=ie.multiple,Zt=ie.treeCheckable,Ht=ie.treeCheckStrictly,sn=ie.labelInValue,_n=ie.fieldNames,hn=ie.treeDataSimpleMode,Lt=ie.treeData,Ft=ie.children,$t=ie.loadData,Xt=ie.treeLoadedKeys,Wt=ie.onTreeLoad,Dn=ie.treeDefaultExpandAll,pn=ie.treeExpandedKeys,Gt=ie.treeDefaultExpandedKeys,Je=ie.onTreeExpand,rt=ie.treeExpandAction,ht=ie.virtual,xt=ie.listHeight,mt=xt===void 0?200:xt,jt=ie.listItemHeight,Et=jt===void 0?20:jt,Qt=ie.onDropdownVisibleChange,nn=ie.dropdownMatchSelectWidth,on=nn===void 0?!0:nn,In=ie.treeLine,wn=ie.treeIcon,Kn=ie.showTreeIcon,dn=ie.switcherIcon,fn=ie.treeMotion,Hn=(0,be.Z)(ie,ne),Zn=(0,k.ZP)(Fe),Yn=Zt&&!Ht,On=Zt||Ht,Fn=Ht||sn,jn=On||Pt,Bn=(0,v.Z)(It,{value:Ce}),Jn=(0,p.Z)(Bn,2),ur=Jn[0],Pn=Jn[1],bn=S.useMemo(function(){return Zt?ft||Ot:Kt},[ft,Zt]),Ge=S.useMemo(function(){return me(_n)},[JSON.stringify(_n)]),mn=(0,v.Z)("",{value:Mt!==void 0?Mt:tn,postState:function(qt){return qt||""}}),Mn=(0,p.Z)(mn,2),Tn=Mn[0],Xn=Mn[1],sr=function(qt){Xn(qt),Ue==null||Ue(qt)},ar=te(Lt,Ft,hn),Un=B(ar,Ge),tr=Un.keyEntities,xn=Un.valueEntities,gn=S.useCallback(function(Er){var qt=[],dr=[];return Er.forEach(function(Tr){xn.has(Tr)?dr.push(Tr):qt.push(Tr)}),{missingRawValues:qt,existRawValues:dr}},[xn]),Vn=Se(ar,Tn,{fieldNames:Ge,treeNodeFilterProp:ut,filterTreeNode:Me}),nr=S.useCallback(function(Er){if(Er){if(Nt)return Er[Nt];for(var qt=Ge._title,dr=0;dr<qt.length;dr+=1){var Tr=Er[qt[dr]];if(Tr!==void 0)return Tr}}},[Ge,Nt]),pr=S.useCallback(function(Er){var qt=Y(Er);return qt.map(function(dr){return de(dr)?{value:dr}:dr})},[]),Mr=S.useCallback(function(Er){var qt=pr(Er);return qt.map(function(dr){var Tr=dr.label,Nn=dr.value,kn=dr.halfChecked,Sn,En=xn.get(Nn);if(En){var Qn;Tr=(Qn=Tr)!==null&&Qn!==void 0?Qn:nr(En.node),Sn=En.node.disabled}else if(Tr===void 0){var gr=pr(ur).find(function(Kr){return Kr.value===Nn});Tr=gr.label}return{label:Tr,value:Nn,halfChecked:kn,disabled:Sn}})},[xn,nr,pr,ur]),Cn=S.useMemo(function(){return pr(ur)},[pr,ur]),Sr=S.useMemo(function(){var Er=[],qt=[];return Cn.forEach(function(dr){dr.halfChecked?qt.push(dr):Er.push(dr)}),[Er,qt]},[Cn]),mr=(0,p.Z)(Sr,2),_r=mr[0],zr=mr[1],Or=S.useMemo(function(){return _r.map(function(Er){return Er.value})},[_r]),wr=z(_r,zr,Yn,tr),Nr=(0,p.Z)(wr,2),vr=Nr[0],ei=Nr[1],qn=S.useMemo(function(){var Er=Vt(vr,bn,tr,Ge),qt=Er.map(function(kn){var Sn,En,Qn;return(Sn=(En=tr[kn])===null||En===void 0||(Qn=En.node)===null||Qn===void 0?void 0:Qn[Ge.value])!==null&&Sn!==void 0?Sn:kn}),dr=qt.map(function(kn){var Sn=_r.find(function(En){return En.value===kn});return{value:kn,label:Sn==null?void 0:Sn.label}}),Tr=Mr(dr),Nn=Tr[0];return!jn&&Nn&&qe(Nn.value)&&qe(Nn.label)?[]:Tr.map(function(kn){var Sn;return(0,A.Z)((0,A.Z)({},kn),{},{label:(Sn=kn.label)!==null&&Sn!==void 0?Sn:kn.value})})},[Ge,jn,vr,_r,Mr,bn,tr]),oi=T(qn),Xr=(0,p.Z)(oi,1),ti=Xr[0],cr=Le(function(Er,qt,dr){var Tr=Mr(Er);if(Pn(Tr),wt&&Xn(""),Bt){var Nn=Er;if(Yn){var kn=Vt(Er,bn,tr,Ge);Nn=kn.map(function(ni){var ci=xn.get(ni);return ci?ci.node[Ge.value]:ni})}var Sn=qt||{triggerValue:void 0,selected:void 0},En=Sn.triggerValue,Qn=Sn.selected,gr=Nn;if(Ht){var Kr=zr.filter(function(ni){return!Nn.includes(ni.value)});gr=[].concat((0,_e.Z)(gr),(0,_e.Z)(Kr))}var Pr=Mr(gr),Rr={preValue:_r,triggerValue:En},rr=!0;(Ht||dr==="selection"&&!Qn)&&(rr=!1),ve(Rr,En,Er,ar,rr,Ge),On?Rr.checked=Qn:Rr.selected=Qn;var Br=Fn?Pr:Pr.map(function(ni){return ni.value});Bt(jn?Br:Br[0],Fn?null:Pr.map(function(ni){return ni.label}),Rr)}}),fi=S.useCallback(function(Er,qt){var dr,Tr=qt.selected,Nn=qt.source,kn=tr[Er],Sn=kn==null?void 0:kn.node,En=(dr=Sn==null?void 0:Sn[Ge.value])!==null&&dr!==void 0?dr:Er;if(!jn)cr([En],{selected:!0,triggerValue:En},"option");else{var Qn=Tr?[].concat((0,_e.Z)(Or),[En]):vr.filter(function(ci){return ci!==En});if(Yn){var gr=gn(Qn),Kr=gr.missingRawValues,Pr=gr.existRawValues,Rr=Pr.map(function(ci){return xn.get(ci).key}),rr;if(Tr){var Br=(0,N.S)(Rr,!0,tr);rr=Br.checkedKeys}else{var ni=(0,N.S)(Rr,{checked:!1,halfCheckedKeys:ei},tr);rr=ni.checkedKeys}Qn=[].concat((0,_e.Z)(Kr),(0,_e.Z)(rr.map(function(ci){return tr[ci].node[Ge.value]})))}cr(Qn,{selected:Tr,triggerValue:En},Nn||"option")}Tr||!jn?an==null||an(En,$(Sn)):en==null||en(En,$(Sn))},[gn,xn,tr,Ge,jn,Or,cr,Yn,an,en,vr,ei]),xi=S.useCallback(function(Er){if(Qt){var qt={};Object.defineProperty(qt,"documentClickClose",{get:function(){return(0,x.ZP)(!1,"Second param of `onDropdownVisibleChange` has been removed."),!1}}),Qt(Er,qt)}},[Qt]),vi=Le(function(Er,qt){var dr=Er.map(function(Tr){return Tr.value});if(qt.type==="clear"){cr(dr,{},"selection");return}qt.values.length&&fi(qt.values[0].value,{selected:!1,source:"selection"})}),or=S.useMemo(function(){return{virtual:ht,dropdownMatchSelectWidth:on,listHeight:mt,listItemHeight:Et,treeData:Vn,fieldNames:Ge,onSelect:fi,treeExpandAction:rt}},[ht,on,mt,Et,Vn,Ge,fi,rt]),yi=S.useMemo(function(){return{checkable:On,loadData:$t,treeLoadedKeys:Xt,onTreeLoad:Wt,checkedKeys:vr,halfCheckedKeys:ei,treeDefaultExpandAll:Dn,treeExpandedKeys:pn,treeDefaultExpandedKeys:Gt,onTreeExpand:Je,treeIcon:wn,treeMotion:fn,showTreeIcon:Kn,switcherIcon:dn,treeLine:In,treeNodeFilterProp:ut,keyEntities:tr}},[On,$t,Xt,Wt,vr,ei,Dn,pn,Gt,Je,wn,fn,Kn,dn,In,ut,tr]);return S.createElement(E.Provider,{value:or},S.createElement(ue.Provider,{value:yi},S.createElement(o.Ac,(0,ge.Z)({ref:xe},Hn,{id:Zn,prefixCls:at,mode:jn?"multiple":void 0,displayValues:ti,onDisplayValuesChange:vi,searchValue:Tn,onSearch:sr,OptionList:st,emptyOptions:!ar.length,onDropdownVisibleChange:xi,dropdownMatchSelectWidth:on}))))}),W=se;W.TreeNode=D,W.SHOW_ALL=Kt,W.SHOW_PARENT=un,W.SHOW_CHILD=Ot;var Ie=W,M=Ie,ce=m(2738),q=m(53487),le=m(62892),pe=m(19080),De=m(36355),Te=m(1684),ke=m(93891),Oe=m(19716),Ne=m(32441),nt=m(14154),Qe=m(58582),Ze=m(84443),pt=m(66339),vt=m(33234),ct=m(71997),Dt=m(98447),Ut=m(37613),w=m(83116),I=m(20648);const dt=ie=>{const{componentCls:xe,treePrefixCls:Fe,colorBgElevated:V}=ie,at=`.${Fe}`;return[{[`${xe}-dropdown`]:[{padding:`${ie.paddingXS}px ${ie.paddingXS/2}px`},(0,I.Yk)(Fe,(0,Ut.TS)(ie,{colorBgContainer:V})),{[at]:{borderRadius:0,[`${at}-list-holder-inner`]:{alignItems:"stretch",[`${at}-treenode`]:{[`${at}-node-content-wrapper`]:{flex:"auto"}}}}},(0,Dt.C2)(`${Fe}-checkbox`,ie),{"&-rtl":{direction:"rtl",[`${at}-switcher${at}-switcher_close`]:{[`${at}-switcher-icon svg`]:{transform:"rotate(90deg)"}}}}]}]};function oe(ie,xe){return(0,w.Z)("TreeSelect",Fe=>{const V=(0,Ut.TS)(Fe,{treePrefixCls:xe});return[dt(V)]},I.TM)(ie)}var Pe=function(ie,xe){var Fe={};for(var V in ie)Object.prototype.hasOwnProperty.call(ie,V)&&xe.indexOf(V)<0&&(Fe[V]=ie[V]);if(ie!=null&&typeof Object.getOwnPropertySymbols=="function")for(var at=0,V=Object.getOwnPropertySymbols(ie);at<V.length;at++)xe.indexOf(V[at])<0&&Object.prototype.propertyIsEnumerable.call(ie,V[at])&&(Fe[V[at]]=ie[V[at]]);return Fe};const vn=(ie,xe)=>{var Fe,{prefixCls:V,size:at,disabled:Ce,bordered:It=!0,className:Bt,rootClassName:an,treeCheckable:en,multiple:Mt,listHeight:tn=256,listItemHeight:Ue=26,placement:bt,notFoundContent:wt,switcherIcon:Me,treeLine:Ae,getPopupContainer:ut,popupClassName:ft,dropdownClassName:Nt,treeIcon:Pt=!1,transitionName:Zt,choiceTransitionName:Ht="",status:sn,treeExpandAction:_n,builtinPlacements:hn,dropdownMatchSelectWidth:Lt,popupMatchSelectWidth:Ft,allowClear:$t}=ie,Xt=Pe(ie,["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"]);const{getPopupContainer:Wt,getPrefixCls:Dn,renderEmpty:pn,direction:Gt,virtual:Je,popupMatchSelectWidth:rt,popupOverflow:ht}=S.useContext(De.E_),xt=Dn(),mt=Dn("select",V),jt=Dn("select-tree",V),Et=Dn("tree-select",V),{compactSize:Qt,compactItemClassnames:nn}=(0,vt.ri)(mt,Gt),[on,In]=(0,nt.Z)(mt),[wn]=oe(Et,jt),Kn=Q()(ft||Nt,`${Et}-dropdown`,{[`${Et}-dropdown-rtl`]:Gt==="rtl"},an,In),dn=!!(en||Mt),fn=(0,Ze.Z)(Xt.suffixIcon,Xt.showArrow),Hn=(Fe=Ft!=null?Ft:Lt)!==null&&Fe!==void 0?Fe:rt,{status:Zn,hasFeedback:Yn,isFormItemInput:On,feedbackIcon:Fn}=S.useContext(Ne.aM),jn=(0,pe.F)(Zn,sn),{suffixIcon:Bn,removeIcon:Jn,clearIcon:ur}=(0,pt.Z)(Object.assign(Object.assign({},Xt),{multiple:dn,showSuffixIcon:fn,hasFeedback:Yn,feedbackIcon:Fn,prefixCls:mt,componentName:"TreeSelect"})),Pn=$t===!0?{clearIcon:ur}:$t;let bn;wt!==void 0?bn=wt:bn=(pn==null?void 0:pn("Select"))||S.createElement(ke.Z,{componentName:"Select"});const Ge=(0,ce.Z)(Xt,["suffixIcon","itemIcon","removeIcon","clearIcon","switcherIcon"]),mn=S.useMemo(()=>bt!==void 0?bt:Gt==="rtl"?"bottomRight":"bottomLeft",[bt,Gt]),Mn=(0,Qe.Z)(hn,ht),Tn=(0,Oe.Z)(xn=>{var gn;return(gn=at!=null?at:Qt)!==null&&gn!==void 0?gn:xn}),Xn=S.useContext(Te.Z),sr=Ce!=null?Ce:Xn,ar=Q()(!V&&Et,{[`${mt}-lg`]:Tn==="large",[`${mt}-sm`]:Tn==="small",[`${mt}-rtl`]:Gt==="rtl",[`${mt}-borderless`]:!It,[`${mt}-in-form-item`]:On},(0,pe.Z)(mt,jn,Yn),nn,Bt,an,In),Un=xn=>S.createElement(ct.Z,{prefixCls:jt,switcherIcon:Me,treeNodeProps:xn,showLine:Ae}),tr=S.createElement(M,Object.assign({virtual:Je,disabled:sr},Ge,{dropdownMatchSelectWidth:Hn,builtinPlacements:Mn,ref:xe,prefixCls:mt,className:ar,listHeight:tn,listItemHeight:Ue,treeCheckable:en&&S.createElement("span",{className:`${mt}-tree-checkbox-inner`}),treeLine:!!Ae,suffixIcon:Bn,multiple:dn,placement:mn,removeIcon:Jn,allowClear:Pn,switcherIcon:Un,showTreeIcon:Pt,notFoundContent:bn,getPopupContainer:ut||Wt,treeMotion:null,dropdownClassName:Kn,choiceTransitionName:(0,le.m)(xt,"",Ht),transitionName:(0,le.m)(xt,"slide-up",Zt),treeExpandAction:_n}));return on(wn(tr))},He=S.forwardRef(vn),tt=(0,q.Z)(He);He.TreeNode=D,He.SHOW_ALL=Kt,He.SHOW_PARENT=un,He.SHOW_CHILD=Ot,He._InternalPanelDoNotUseOrYouWillBeFired=tt;var he=He},17574:function(ln,et,m){"use strict";m.d(et,{default:function(){return E}});var L=m(54844),Q=m(80702),ge=m(52671),_e=m(8657),A=m(72308),p=m(59301),be={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"},fe=be,o=m(7657),k=function(me,$e){return p.createElement(o.Z,(0,A.Z)({},me,{ref:$e,icon:fe}))},N=p.forwardRef(k),v=N,x=m(92310),S=m.n(x),T=m(35654),z=m(71430),ae=m(36355),B=m(56082),U=m(62892),X=m(20648);const Z=4;function D(Y){const{dropPosition:me,dropLevelOffset:$e,prefixCls:We,indent:qe,direction:Xe="ltr"}=Y,gt=Xe==="ltr"?"left":"right",_t=Xe==="ltr"?"right":"left",st={[gt]:-$e*qe+Z,[_t]:0};switch(me){case-1:st.top=-3;break;case 1:st.bottom=-3;break;default:st.bottom=-3,st[gt]=qe+Z;break}return p.createElement("div",{style:st,className:`${We}-drop-indicator`})}var C=m(71997),$=p.forwardRef((Y,me)=>{const{getPrefixCls:$e,direction:We,virtual:qe,tree:Xe}=p.useContext(ae.E_),{prefixCls:gt,className:_t,showIcon:st=!1,showLine:Kt,switcherIcon:un,blockNode:Ot=!1,children:Vt,checkable:lt=!1,selectable:At=!0,draggable:ne,motion:de,style:se}=Y,W=$e("tree",gt),Ie=$e(),M=de!=null?de:Object.assign(Object.assign({},(0,U.Z)(Ie)),{motionAppear:!1}),ce=Object.assign(Object.assign({},Y),{checkable:lt,selectable:At,showIcon:st,motion:M,blockNode:Ot,showLine:!!Kt,dropIndicatorRender:D}),[q,le]=(0,X.ZP)(W),pe=p.useMemo(()=>{if(!ne)return!1;let Te={};switch(typeof ne){case"function":Te.nodeDraggable=ne;break;case"object":Te=Object.assign({},ne);break;default:break}return Te.icon!==!1&&(Te.icon=Te.icon||p.createElement(B.Z,null)),Te},[ne]),De=Te=>p.createElement(C.Z,{prefixCls:W,switcherIcon:un,treeNodeProps:Te,showLine:Kt});return q(p.createElement(L.Z,Object.assign({itemHeight:20,ref:me,virtual:qe},ce,{style:Object.assign(Object.assign({},Xe==null?void 0:Xe.style),se),prefixCls:W,className:S()({[`${W}-icon-hide`]:!st,[`${W}-block-node`]:Ot,[`${W}-unselectable`]:!At,[`${W}-rtl`]:We==="rtl"},Xe==null?void 0:Xe.className,_t,le),direction:We,checkable:lt&&p.createElement("span",{className:`${W}-checkbox-inner`}),selectable:At,switcherIcon:De,draggable:pe}),Vt))}),ve;(function(Y){Y[Y.None=0]="None",Y[Y.Start=1]="Start",Y[Y.End=2]="End"})(ve||(ve={}));function Se(Y,me){function $e(We){const{key:qe,children:Xe}=We;me(qe,We)!==!1&&Se(Xe||[],me)}Y.forEach($e)}function Le(Y){let{treeData:me,expandedKeys:$e,startKey:We,endKey:qe}=Y;const Xe=[];let gt=ve.None;if(We&&We===qe)return[We];if(!We||!qe)return[];function _t(st){return st===We||st===qe}return Se(me,st=>{if(gt===ve.End)return!1;if(_t(st)){if(Xe.push(st),gt===ve.None)gt=ve.Start;else if(gt===ve.Start)return gt=ve.End,!1}else gt===ve.Start&&Xe.push(st);return $e.includes(st)}),Xe}function ye(Y,me){const $e=(0,Q.Z)(me),We=[];return Se(Y,(qe,Xe)=>{const gt=$e.indexOf(qe);return gt!==-1&&(We.push(Xe),$e.splice(gt,1)),!!$e.length}),We}var te=function(Y,me){var $e={};for(var We in Y)Object.prototype.hasOwnProperty.call(Y,We)&&me.indexOf(We)<0&&($e[We]=Y[We]);if(Y!=null&&typeof Object.getOwnPropertySymbols=="function")for(var qe=0,We=Object.getOwnPropertySymbols(Y);qe<We.length;qe++)me.indexOf(We[qe])<0&&Object.prototype.propertyIsEnumerable.call(Y,We[qe])&&($e[We[qe]]=Y[We[qe]]);return $e};function j(Y){const{isLeaf:me,expanded:$e}=Y;return me?p.createElement(ge.Z,null):$e?p.createElement(_e.Z,null):p.createElement(v,null)}function ue(Y){let{treeData:me,children:$e}=Y;return me||(0,z.zn)($e)}const R=(Y,me)=>{var{defaultExpandAll:$e,defaultExpandParent:We,defaultExpandedKeys:qe}=Y,Xe=te(Y,["defaultExpandAll","defaultExpandParent","defaultExpandedKeys"]);const gt=p.useRef(),_t=p.useRef(),st=()=>{const{keyEntities:pe}=(0,z.I8)(ue(Xe));let De;return $e?De=Object.keys(pe):We?De=(0,T.r7)(Xe.expandedKeys||qe||[],pe):De=Xe.expandedKeys||qe,De},[Kt,un]=p.useState(Xe.selectedKeys||Xe.defaultSelectedKeys||[]),[Ot,Vt]=p.useState(()=>st());p.useEffect(()=>{"selectedKeys"in Xe&&un(Xe.selectedKeys)},[Xe.selectedKeys]),p.useEffect(()=>{"expandedKeys"in Xe&&Vt(Xe.expandedKeys)},[Xe.expandedKeys]);const lt=(pe,De)=>{var Te;return"expandedKeys"in Xe||Vt(pe),(Te=Xe.onExpand)===null||Te===void 0?void 0:Te.call(Xe,pe,De)},At=(pe,De)=>{var Te;const{multiple:ke}=Xe,{node:Oe,nativeEvent:Ne}=De,{key:nt=""}=Oe,Qe=ue(Xe),Ze=Object.assign(Object.assign({},De),{selected:!0}),pt=(Ne==null?void 0:Ne.ctrlKey)||(Ne==null?void 0:Ne.metaKey),vt=Ne==null?void 0:Ne.shiftKey;let ct;ke&&pt?(ct=pe,gt.current=nt,_t.current=ct,Ze.selectedNodes=ye(Qe,ct)):ke&&vt?(ct=Array.from(new Set([].concat((0,Q.Z)(_t.current||[]),(0,Q.Z)(Le({treeData:Qe,expandedKeys:Ot,startKey:nt,endKey:gt.current}))))),Ze.selectedNodes=ye(Qe,ct)):(ct=[nt],gt.current=nt,_t.current=ct,Ze.selectedNodes=ye(Qe,ct)),(Te=Xe.onSelect)===null||Te===void 0||Te.call(Xe,ct,Ze),"selectedKeys"in Xe||un(ct)},{getPrefixCls:ne,direction:de}=p.useContext(ae.E_),{prefixCls:se,className:W,showIcon:Ie=!0,expandAction:M="click"}=Xe,ce=te(Xe,["prefixCls","className","showIcon","expandAction"]),q=ne("tree",se),le=S()(`${q}-directory`,{[`${q}-directory-rtl`]:de==="rtl"},W);return p.createElement($,Object.assign({icon:j,ref:me,blockNode:!0},ce,{showIcon:Ie,expandAction:M,prefixCls:q,className:le,expandedKeys:Ot,selectedKeys:Kt,onSelect:At,onExpand:lt}))};var G=p.forwardRef(R);const y=$;y.DirectoryTree=G,y.TreeNode=L.O;var E=y},20648:function(ln,et,m){"use strict";m.d(et,{TM:function(){return x},Yk:function(){return v}});var L=m(93083),Q=m(98447),ge=m(17313),_e=m(8378),A=m(37613),p=m(83116);const be=new L.Keyframes("ant-tree-node-fx-do-not-use",{"0%":{opacity:0},"100%":{opacity:1}}),fe=(S,T)=>({[`.${S}-switcher-icon`]:{display:"inline-block",fontSize:10,verticalAlign:"baseline",svg:{transition:`transform ${T.motionDurationSlow}`}}}),o=(S,T)=>({[`.${S}-drop-indicator`]:{position:"absolute",zIndex:1,height:2,backgroundColor:T.colorPrimary,borderRadius:1,pointerEvents:"none","&:after":{position:"absolute",top:-3,insetInlineStart:-6,width:8,height:8,backgroundColor:"transparent",border:`${T.lineWidthBold}px solid ${T.colorPrimary}`,borderRadius:"50%",content:'""'}}}),k=(S,T)=>{const{treeCls:z,treeNodeCls:ae,treeNodePadding:B,titleHeight:U,nodeSelectedBg:X,nodeHoverBg:Z}=T,D=T.paddingXS;return{[z]:Object.assign(Object.assign({},(0,ge.Wf)(T)),{background:T.colorBgContainer,borderRadius:T.borderRadius,transition:`background-color ${T.motionDurationSlow}`,[`&${z}-rtl`]:{[`${z}-switcher`]:{"&_close":{[`${z}-switcher-icon`]:{svg:{transform:"rotate(90deg)"}}}}},[`&-focused:not(:hover):not(${z}-active-focused)`]:Object.assign({},(0,ge.oN)(T)),[`${z}-list-holder-inner`]:{alignItems:"flex-start"},[`&${z}-block-node`]:{[`${z}-list-holder-inner`]:{alignItems:"stretch",[`${z}-node-content-wrapper`]:{flex:"auto"},[`${ae}.dragging`]:{position:"relative","&:after":{position:"absolute",top:0,insetInlineEnd:0,bottom:B,insetInlineStart:0,border:`1px solid ${T.colorPrimary}`,opacity:0,animationName:be,animationDuration:T.motionDurationSlow,animationPlayState:"running",animationFillMode:"forwards",content:'""',pointerEvents:"none"}}}},[`${ae}`]:{display:"flex",alignItems:"flex-start",padding:`0 0 ${B}px 0`,outline:"none","&-rtl":{direction:"rtl"},"&-disabled":{[`${z}-node-content-wrapper`]:{color:T.colorTextDisabled,cursor:"not-allowed","&:hover":{background:"transparent"}}},[`&-active ${z}-node-content-wrapper`]:Object.assign({},(0,ge.oN)(T)),[`&:not(${ae}-disabled).filter-node ${z}-title`]:{color:"inherit",fontWeight:500},"&-draggable":{[`${z}-draggable-icon`]:{flexShrink:0,width:U,lineHeight:`${U}px`,textAlign:"center",visibility:"visible",opacity:.2,transition:`opacity ${T.motionDurationSlow}`,[`${ae}:hover &`]:{opacity:.45}},[`&${ae}-disabled`]:{[`${z}-draggable-icon`]:{visibility:"hidden"}}}},[`${z}-indent`]:{alignSelf:"stretch",whiteSpace:"nowrap",userSelect:"none","&-unit":{display:"inline-block",width:U}},[`${z}-draggable-icon`]:{visibility:"hidden"},[`${z}-switcher`]:Object.assign(Object.assign({},fe(S,T)),{position:"relative",flex:"none",alignSelf:"stretch",width:U,margin:0,lineHeight:`${U}px`,textAlign:"center",cursor:"pointer",userSelect:"none","&-noop":{cursor:"default"},"&_close":{[`${z}-switcher-icon`]:{svg:{transform:"rotate(-90deg)"}}},"&-loading-icon":{color:T.colorPrimary},"&-leaf-line":{position:"relative",zIndex:1,display:"inline-block",width:"100%",height:"100%","&:before":{position:"absolute",top:0,insetInlineEnd:U/2,bottom:-B,marginInlineStart:-1,borderInlineEnd:`1px solid ${T.colorBorder}`,content:'""'},"&:after":{position:"absolute",width:U/2*.8,height:U/2,borderBottom:`1px solid ${T.colorBorder}`,content:'""'}}}),[`${z}-checkbox`]:{top:"initial",marginInlineEnd:D},[`${z}-node-content-wrapper, ${z}-checkbox + span`]:{position:"relative",zIndex:"auto",minHeight:U,margin:0,padding:`0 ${T.paddingXS/2}px`,color:"inherit",lineHeight:`${U}px`,background:"transparent",borderRadius:T.borderRadius,cursor:"pointer",transition:`all ${T.motionDurationMid}, border 0s, line-height 0s, box-shadow 0s`,"&:hover":{backgroundColor:Z},[`&${z}-node-selected`]:{backgroundColor:X},[`${z}-iconEle`]:{display:"inline-block",width:U,height:U,lineHeight:`${U}px`,textAlign:"center",verticalAlign:"top","&:empty":{display:"none"}}},[`${z}-unselectable ${z}-node-content-wrapper:hover`]:{backgroundColor:"transparent"},[`${z}-node-content-wrapper`]:Object.assign({lineHeight:`${U}px`,userSelect:"none"},o(S,T)),[`${ae}.drop-container`]:{"> [draggable]":{boxShadow:`0 0 0 2px ${T.colorPrimary}`}},"&-show-line":{[`${z}-indent`]:{"&-unit":{position:"relative",height:"100%","&:before":{position:"absolute",top:0,insetInlineEnd:U/2,bottom:-B,borderInlineEnd:`1px solid ${T.colorBorder}`,content:'""'},"&-end":{"&:before":{display:"none"}}}},[`${z}-switcher`]:{background:"transparent","&-line-icon":{verticalAlign:"-0.15em"}}},[`${ae}-leaf-last`]:{[`${z}-switcher`]:{"&-leaf-line":{"&:before":{top:"auto !important",bottom:"auto !important",height:`${U/2}px !important`}}}}})}},N=S=>{const{treeCls:T,treeNodeCls:z,treeNodePadding:ae,directoryNodeSelectedBg:B,directoryNodeSelectedColor:U}=S;return{[`${T}${T}-directory`]:{[z]:{position:"relative","&:before":{position:"absolute",top:0,insetInlineEnd:0,bottom:ae,insetInlineStart:0,transition:`background-color ${S.motionDurationMid}`,content:'""',pointerEvents:"none"},"&:hover":{"&:before":{background:S.controlItemBgHover}},"> *":{zIndex:1},[`${T}-switcher`]:{transition:`color ${S.motionDurationMid}`},[`${T}-node-content-wrapper`]:{borderRadius:0,userSelect:"none","&:hover":{background:"transparent"},[`&${T}-node-selected`]:{color:U,background:"transparent"}},"&-selected":{"\n &:hover::before,\n &::before\n ":{background:B},[`${T}-switcher`]:{color:U},[`${T}-node-content-wrapper`]:{color:U,background:"transparent"}}}}}},v=(S,T)=>{const z=`.${S}`,ae=`${z}-treenode`,B=T.paddingXS/2,U=(0,A.TS)(T,{treeCls:z,treeNodeCls:ae,treeNodePadding:B});return[k(S,U),N(U)]},x=S=>{const{controlHeightSM:T}=S;return{titleHeight:T,nodeHoverBg:S.controlItemBgHover,nodeSelectedBg:S.controlItemBgActive}};et.ZP=(0,p.Z)("Tree",(S,T)=>{let{prefixCls:z}=T;return[{[S.componentCls]:(0,Q.C2)(`${z}-checkbox`,S)},v(z,S),(0,_e.Z)(S)]},S=>{const{colorTextLightSolid:T,colorPrimary:z}=S;return Object.assign(Object.assign({},x(S)),{directoryNodeSelectedColor:T,directoryNodeSelectedBg:z})})},71997:function(ln,et,m){"use strict";m.d(et,{Z:function(){return ae}});var L=m(72308),Q=m(59301),ge={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"},_e=ge,A=m(7657),p=function(U,X){return Q.createElement(A.Z,(0,L.Z)({},U,{ref:X,icon:_e}))},be=Q.forwardRef(p),fe=be,o=m(52671),k=m(58617),N=m(15075),v=m(43531),x=m(92310),S=m.n(x),T=m(92343),ae=B=>{const{prefixCls:U,switcherIcon:X,treeNodeProps:Z,showLine:D}=B,{isLeaf:C,expanded:K,loading:$}=Z;if($)return Q.createElement(k.Z,{className:`${U}-switcher-loading-icon`});let ve;if(D&&typeof D=="object"&&(ve=D.showLeafIcon),C){if(!D)return null;if(typeof ve!="boolean"&&ve){const ye=typeof ve=="function"?ve(Z):ve,te=`${U}-switcher-line-custom-icon`;return(0,T.l$)(ye)?(0,T.Tm)(ye,{className:S()(ye.props.className||"",te)}):ye}return ve?Q.createElement(o.Z,{className:`${U}-switcher-line-icon`}):Q.createElement("span",{className:`${U}-switcher-leaf-line`})}const Se=`${U}-switcher-icon`,Le=typeof X=="function"?X(Z):X;return(0,T.l$)(Le)?(0,T.Tm)(Le,{className:S()(Le.props.className||"",Se)}):Le!==void 0?Le:D?K?Q.createElement(N.Z,{className:`${U}-switcher-line-icon`}):Q.createElement(v.Z,{className:`${U}-switcher-line-icon`}):Q.createElement(fe,{className:Se})}},64018:function(){var ln,et,m,L=!1,Q,ge;window.PR_SHOULD_USE_CONTINUATION=!0;var _e,A;(function(){var p=window,be=["break,continue,do,else,for,if,return,while"],fe=[be,"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=[fe,"catch,class,delete,false,import,new,operator,private,protected,public,this,throw,true,try,typeof"],k=[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"],N=[o,"abstract,assert,boolean,byte,extends,finally,final,implements,import,instanceof,interface,null,native,package,strictfp,super,synchronized,throws,transient"],v=[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"],x="all,and,by,catch,class,else,extends,false,finally,for,if,in,is,isnt,loop,new,no,not,null,of,off,on,or,return,super,then,throw,true,try,unless,until,when,while,yes",S=[o,"abstract,async,await,constructor,debugger,enum,eval,export,function,get,implements,instanceof,interface,let,null,set,undefined,var,with,yield,Infinity,NaN"],T="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",z=[be,"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"],ae=[be,"alias,and,begin,case,class,def,defined,elsif,end,ensure,false,in,module,next,nil,not,or,redo,rescue,retry,self,super,then,true,undef,unless,until,when,yield,BEGIN,END"],B=[be,"case,done,elif,esac,eval,fi,function,in,local,set,then,until"],U=[k,v,N,S,T,z,ae,B],X=/^(DIR|FILE|array|vector|(de|priority_)?queue|(forward_)?list|stack|(const_)?(reverse_)?iterator|(unordered_)?(multi)?(set|map)|bitset|u?(int|float)\d*)\b/,Z="str",D="kwd",C="com",K="typ",$="lit",ve="pun",Se="pln",Le="tag",ye="dec",te="src",j="atn",ue="atv",R="nocode",ee="(?:^^\\.?|[+-]|[!=]=?=?|\\#|%=?|&&?=?|\\(|\\*=?|[+\\-]=|->|\\/=?|::?|<<?=?|>>?>?=?|,|;|\\?|@|\\[|~|{|\\^\\^?=?|\\|\\|?=?|break|case|continue|delete|do|else|finally|instanceof|return|throw|try|typeof)\\s*";function G(ne){for(var de=0,se=!1,W=!1,Ie=0,M=ne.length;Ie<M;++Ie){var ce=ne[Ie];if(ce.ignoreCase)W=!0;else if(/[a-z]/i.test(ce.source.replace(/\\u[0-9a-f]{4}|\\x[0-9a-f]{2}|\\[^ux]/gi,""))){se=!0,W=!1;break}}var q={b:8,t:9,n:10,v:11,f:12,r:13};function le(Oe){var Ne=Oe.charCodeAt(0);if(Ne!==92)return Ne;var nt=Oe.charAt(1);return Ne=q[nt],Ne||("0"<=nt&&nt<="7"?parseInt(Oe.substring(1),8):nt==="u"||nt==="x"?parseInt(Oe.substring(2),16):Oe.charCodeAt(1))}function pe(Oe){if(Oe<32)return(Oe<16?"\\x0":"\\x")+Oe.toString(16);var Ne=String.fromCharCode(Oe);return Ne==="\\"||Ne==="-"||Ne==="]"||Ne==="^"?"\\"+Ne:Ne}function De(Oe){var Ne=Oe.substring(1,Oe.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")),nt=[],Qe=Ne[0]==="^",Ze=["["];Qe&&Ze.push("^");for(var pt=Qe?1:0,vt=Ne.length;pt<vt;++pt){var ct=Ne[pt];if(/\\[bdsw]/i.test(ct))Ze.push(ct);else{var Dt=le(ct),Ut;pt+2<vt&&Ne[pt+1]==="-"?(Ut=le(Ne[pt+2]),pt+=2):Ut=Dt,nt.push([Dt,Ut]),Ut<65||Dt>122||(Ut<65||Dt>90||nt.push([Math.max(65,Dt)|32,Math.min(Ut,90)|32]),Ut<97||Dt>122||nt.push([Math.max(97,Dt)&-33,Math.min(Ut,122)&-33]))}}nt.sort(function(oe,Pe){return oe[0]-Pe[0]||Pe[1]-oe[1]});for(var w=[],I=[],pt=0;pt<nt.length;++pt){var dt=nt[pt];dt[0]<=I[1]+1?I[1]=Math.max(I[1],dt[1]):w.push(I=dt)}for(var pt=0;pt<w.length;++pt){var dt=w[pt];Ze.push(pe(dt[0])),dt[1]>dt[0]&&(dt[1]+1>dt[0]&&Ze.push("-"),Ze.push(pe(dt[1])))}return Ze.push("]"),Ze.join("")}function Te(Oe){for(var Ne=Oe.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")),nt=Ne.length,Qe=[],Ze=0,pt=0;Ze<nt;++Ze){var vt=Ne[Ze];if(vt==="(")++pt;else if(vt.charAt(0)==="\\"){var ct=+vt.substring(1);ct&&(ct<=pt?Qe[ct]=-1:Ne[Ze]=pe(ct))}}for(var Ze=1;Ze<Qe.length;++Ze)Qe[Ze]===-1&&(Qe[Ze]=++de);for(var Ze=0,pt=0;Ze<nt;++Ze){var vt=Ne[Ze];if(vt==="(")++pt,Qe[pt]||(Ne[Ze]="(?:");else if(vt.charAt(0)==="\\"){var ct=+vt.substring(1);ct&&ct<=pt&&(Ne[Ze]="\\"+Qe[ct])}}for(var Ze=0;Ze<nt;++Ze)Ne[Ze]==="^"&&Ne[Ze+1]!=="^"&&(Ne[Ze]="");if(Oe.ignoreCase&&se)for(var Ze=0;Ze<nt;++Ze){var vt=Ne[Ze],Dt=vt.charAt(0);vt.length>=2&&Dt==="["?Ne[Ze]=De(vt):Dt!=="\\"&&(Ne[Ze]=vt.replace(/[a-zA-Z]/g,function(I){var dt=I.charCodeAt(0);return"["+String.fromCharCode(dt&-33,dt|32)+"]"}))}return Ne.join("")}for(var ke=[],Ie=0,M=ne.length;Ie<M;++Ie){var ce=ne[Ie];if(ce.global||ce.multiline)throw new Error(""+ce);ke.push("(?:"+Te(ce)+")")}return new RegExp(ke.join("|"),W?"gi":"g")}function y(ne,de){var se=/(?:^|\s)nocode(?:\s|$)/,W=[],Ie=0,M=[],ce=0;function q(le){var pe=le.nodeType;if(pe==1){if(se.test(le.className))return;for(var De=le.firstChild;De;De=De.nextSibling)q(De);var Te=le.nodeName.toLowerCase();(Te==="br"||Te==="li")&&(W[ce]=`
`,M[ce<<1]=Ie++,M[ce++<<1|1]=le)}else if(pe==3||pe==4){var ke=le.nodeValue;ke.length&&(de?ke=ke.replace(/\r\n?/g,`
`):ke=ke.replace(/[ \t\r\n]+/g," "),W[ce]=ke,M[ce<<1]=Ie,Ie+=ke.length,M[ce++<<1|1]=le)}}return q(ne),{sourceCode:W.join("").replace(/\n$/,""),spans:M}}function E(ne,de,se,W,Ie){if(se){var M={sourceNode:ne,pre:1,langExtension:null,numberLines:null,sourceCode:se,spans:null,basePos:de,decorations:null};W(M),Ie.push.apply(Ie,M.decorations)}}var Y=/\S/;function me(ne){for(var de=void 0,se=ne.firstChild;se;se=se.nextSibling){var W=se.nodeType;de=W===1?de?ne:se:W===3&&Y.test(se.nodeValue)?ne:de}return de===ne?void 0:de}function $e(ne,de){var se={},W;(function(){for(var ce=ne.concat(de),q=[],le={},pe=0,De=ce.length;pe<De;++pe){var Te=ce[pe],ke=Te[3];if(ke)for(var Oe=ke.length;--Oe>=0;)se[ke.charAt(Oe)]=Te;var Ne=Te[1],nt=""+Ne;le.hasOwnProperty(nt)||(q.push(Ne),le[nt]=null)}q.push(/[\0-\uffff]/),W=G(q)})();var Ie=de.length,M=function(ce){for(var q=ce.sourceCode,le=ce.basePos,pe=ce.sourceNode,De=[le,Se],Te=0,ke=q.match(W)||[],Oe={},Ne=0,nt=ke.length;Ne<nt;++Ne){var Qe=ke[Ne],Ze=Oe[Qe],pt=void 0,vt;if(typeof Ze=="string")vt=!1;else{var ct=se[Qe.charAt(0)];if(ct)pt=Qe.match(ct[1]),Ze=ct[0];else{for(var Dt=0;Dt<Ie;++Dt)if(ct=de[Dt],pt=Qe.match(ct[1]),pt){Ze=ct[0];break}pt||(Ze=Se)}vt=Ze.length>=5&&Ze.substring(0,5)==="lang-",vt&&!(pt&&typeof pt[1]=="string")&&(vt=!1,Ze=te),vt||(Oe[Qe]=Ze)}var Ut=Te;if(Te+=Qe.length,!vt)De.push(le+Ut,Ze);else{var w=pt[1],I=Qe.indexOf(w),dt=I+w.length;pt[2]&&(dt=Qe.length-pt[2].length,I=dt-w.length);var oe=Ze.substring(5);E(pe,le+Ut,Qe.substring(0,I),M,De),E(pe,le+Ut+I,w,Kt(oe,w),De),E(pe,le+Ut+dt,Qe.substring(dt),M,De)}}ce.decorations=De};return M}function We(ne){var de=[],se=[];ne.tripleQuotedStrings?de.push([Z,/^(?:\'\'\'(?:[^\'\\]|\\[\s\S]|\'{1,2}(?=[^\']))*(?:\'\'\'|$)|\"\"\"(?:[^\"\\]|\\[\s\S]|\"{1,2}(?=[^\"]))*(?:\"\"\"|$)|\'(?:[^\\\']|\\[\s\S])*(?:\'|$)|\"(?:[^\\\"]|\\[\s\S])*(?:\"|$))/,null,`'"`]):ne.multiLineStrings?de.push([Z,/^(?:\'(?:[^\\\']|\\[\s\S])*(?:\'|$)|\"(?:[^\\\"]|\\[\s\S])*(?:\"|$)|\`(?:[^\\\`]|\\[\s\S])*(?:\`|$))/,null,"'\"`"]):de.push([Z,/^(?:\'(?:[^\\\'\r\n]|\\.)*(?:\'|$)|\"(?:[^\\\"\r\n]|\\.)*(?:\"|$))/,null,`"'`]),ne.verbatimStrings&&se.push([Z,/^@\"(?:[^\"]|\"\")*(?:\"|$)/,null]);var W=ne.hashComments;W&&(ne.cStyleComments?(W>1?de.push([C,/^#(?:##(?:[^#]|#(?!##))*(?:###|$)|.*)/,null,"#"]):de.push([C,/^#(?:(?:define|e(?:l|nd)if|else|error|ifn?def|include|line|pragma|undef|warning)\b|[^\r\n]*)/,null,"#"]),se.push([Z,/^<(?:(?:(?:\.\.\/)*|\/?)(?:[\w-]+(?:\/[\w-]+)+)?[\w-]+\.h(?:h|pp|\+\+)?|[a-z]\w*)>/,null])):de.push([C,/^#[^\r\n]*/,null,"#"])),ne.cStyleComments&&(se.push([C,/^\/\/[^\r\n]*/,null]),se.push([C,/^\/\*[\s\S]*?(?:\*\/|$)/,null]));var Ie=ne.regexLiterals;if(Ie){var M=Ie>1?"":`
\r`,ce=M?".":"[\\S\\s]",q="/(?=[^/*"+M+"])(?:[^/\\x5B\\x5C"+M+"]|\\x5C"+ce+"|\\x5B(?:[^\\x5C\\x5D"+M+"]|\\x5C"+ce+")*(?:\\x5D|$))+/";se.push(["lang-regex",RegExp("^"+ee+"("+q+")")])}var le=ne.types;le&&se.push([K,le]);var pe=(""+ne.keywords).replace(/^ | $/g,"");pe.length&&se.push([D,new RegExp("^(?:"+pe.replace(/[\s,]+/g,"|")+")\\b"),null]),de.push([Se,/^\s+/,null,` \r
\xA0`]);var De="^.[^\\s\\w.$@'\"`/\\\\]*";return ne.regexLiterals&&(De+="(?!s*/)"),se.push([$,/^@[a-z_$][a-z_$@0-9]*/i,null],[K,/^(?:[@_]?[A-Z]+[a-z][A-Za-z_$@0-9]*|\w+_t\b)/,null],[Se,/^[a-z_$][a-z_$@0-9]*/i,null],[$,new RegExp("^(?:0x[a-f0-9]+|(?:\\d(?:_\\d+)*\\d*(?:\\.\\d*)?|\\.\\d\\+)(?:e[+\\-]?\\d+)?)[a-z]*","i"),null,"0123456789"],[Se,/^\\[\s\S]?/,null],[ve,new RegExp(De),null]),$e(de,se)}var qe=We({keywords:U,hashComments:!0,cStyleComments:!0,multiLineStrings:!0,regexLiterals:!0});function Xe(ne,de,se){for(var W=/(?:^|\s)nocode(?:\s|$)/,Ie=/\r\n?|\n/,M=ne.ownerDocument,ce=M.createElement("li");ne.firstChild;)ce.appendChild(ne.firstChild);var q=[ce];function le(Ne){var nt=Ne.nodeType;if(nt==1&&!W.test(Ne.className))if(Ne.nodeName==="br")pe(Ne),Ne.parentNode&&Ne.parentNode.removeChild(Ne);else for(var Qe=Ne.firstChild;Qe;Qe=Qe.nextSibling)le(Qe);else if((nt==3||nt==4)&&se){var Ze=Ne.nodeValue,pt=Ze.match(Ie);if(pt){var vt=Ze.substring(0,pt.index);Ne.nodeValue=vt;var ct=Ze.substring(pt.index+pt[0].length);if(ct){var Dt=Ne.parentNode;Dt.insertBefore(M.createTextNode(ct),Ne.nextSibling)}pe(Ne),vt||Ne.parentNode.removeChild(Ne)}}}function pe(Ne){for(;!Ne.nextSibling;)if(Ne=Ne.parentNode,!Ne)return;function nt(pt,vt){var ct=vt?pt.cloneNode(!1):pt,Dt=pt.parentNode;if(Dt){var Ut=nt(Dt,1),w=pt.nextSibling;Ut.appendChild(ct);for(var I=w;I;I=w)w=I.nextSibling,Ut.appendChild(I)}return ct}for(var Qe=nt(Ne.nextSibling,0),Ze;(Ze=Qe.parentNode)&&Ze.nodeType===1;)Qe=Ze;q.push(Qe)}for(var De=0;De<q.length;++De)le(q[De]);de===(de|0)&&q[0].setAttribute("value",de);var Te=M.createElement("ol");Te.className="linenums";for(var ke=Math.max(0,de-1|0)||0,De=0,Oe=q.length;De<Oe;++De)ce=q[De],ce.className="L"+(De+ke)%10,ce.firstChild||ce.appendChild(M.createTextNode("\xA0")),Te.appendChild(ce);ne.appendChild(Te)}function gt(ne){var de=/\bMSIE\s(\d+)/.exec(navigator.userAgent);de=de&&+de[1]<=8;var se=/\n/g,W=ne.sourceCode,Ie=W.length,M=0,ce=ne.spans,q=ce.length,le=0,pe=ne.decorations,De=pe.length,Te=0;pe[De]=Ie;var ke,Oe;for(Oe=ke=0;Oe<De;)pe[Oe]!==pe[Oe+2]?(pe[ke++]=pe[Oe++],pe[ke++]=pe[Oe++]):Oe+=2;for(De=ke,Oe=ke=0;Oe<De;){for(var Ne=pe[Oe],nt=pe[Oe+1],Qe=Oe+2;Qe+2<=De&&pe[Qe+1]===nt;)Qe+=2;pe[ke++]=Ne,pe[ke++]=nt,Oe=Qe}De=pe.length=ke;var Ze=ne.sourceNode,pt="";Ze&&(pt=Ze.style.display,Ze.style.display="none");try{for(var vt=null;le<q;){var ct=ce[le],Dt=ce[le+2]||Ie,Ut=pe[Te+2]||Ie,Qe=Math.min(Dt,Ut),w=ce[le+1],I;if(w.nodeType!==1&&(I=W.substring(M,Qe))){de&&(I=I.replace(se,"\r")),w.nodeValue=I;var dt=w.ownerDocument,oe=dt.createElement("span");oe.className=pe[Te+1];var Pe=w.parentNode;Pe.replaceChild(oe,w),oe.appendChild(w),M<Dt&&(ce[le+1]=w=dt.createTextNode(W.substring(Qe,Dt)),Pe.insertBefore(w,oe.nextSibling))}M=Qe,M>=Dt&&(le+=2),M>=Ut&&(Te+=2)}}finally{Ze&&(Ze.style.display=pt)}}var _t={};function st(ne,de){for(var se=de.length;--se>=0;){var W=de[se];_t.hasOwnProperty(W)?p.console&&console.warn("cannot override language handler %s",W):_t[W]=ne}}function Kt(ne,de){return ne&&_t.hasOwnProperty(ne)||(ne=/^\s*</.test(de)?"default-markup":"default-code"),_t[ne]}st(qe,["default-code"]),st($e([],[[Se,/^[^<?]+/],[ye,/^<!\w[^>]*(?:>|$)/],[C,/^<\!--[\s\S]*?(?:-\->|$)/],["lang-",/^<\?([\s\S]+?)(?:\?>|$)/],["lang-",/^<%([\s\S]+?)(?:%>|$)/],[ve,/^(?:<[%?]|[%?]>)/],["lang-",/^<xmp\b[^>]*>([\s\S]+?)<\/xmp\b[^>]*>/i],["lang-js",/^<script\b[^>]*>([\s\S]*?)(<\/script\b[^>]*>)/i],["lang-css",/^<style\b[^>]*>([\s\S]*?)(<\/style\b[^>]*>)/i],["lang-in.tag",/^(<\/?[a-z][^<>]*>)/i]]),["default-markup","htm","html","mxml","xhtml","xml","xsl"]),st($e([[Se,/^[\s]+/,null,` \r
`],[ue,/^(?:\"[^\"]*\"?|\'[^\']*\'?)/,null,`"'`]],[[Le,/^^<\/?[a-z](?:[\w.:-]*\w)?|\/?>$/i],[j,/^(?!style[\s=]|on)[a-z](?:[\w:-]*\w)?/i],["lang-uq.val",/^=\s*([^>\'\"\s]*(?:[^>\'\"\s\/]|\/(?=\s)))/],[ve,/^[=<>\/]+/],["lang-js",/^on\w+\s*=\s*\"([^\"]+)\"/i],["lang-js",/^on\w+\s*=\s*\'([^\']+)\'/i],["lang-js",/^on\w+\s*=\s*([^\"\'>\s]+)/i],["lang-css",/^style\s*=\s*\"([^\"]+)\"/i],["lang-css",/^style\s*=\s*\'([^\']+)\'/i],["lang-css",/^style\s*=\s*([^\"\'>\s]+)/i]]),["in.tag"]),st($e([],[[ue,/^[\s\S]+/]]),["uq.val"]),st(We({keywords:k,hashComments:!0,cStyleComments:!0,types:X}),["c","cc","cpp","cxx","cyc","m"]),st(We({keywords:"null,true,false"}),["json"]),st(We({keywords:v,hashComments:!0,cStyleComments:!0,verbatimStrings:!0,types:X}),["cs"]),st(We({keywords:N,cStyleComments:!0}),["java"]),st(We({keywords:B,hashComments:!0,multiLineStrings:!0}),["bash","bsh","csh","sh"]),st(We({keywords:z,hashComments:!0,multiLineStrings:!0,tripleQuotedStrings:!0}),["cv","py","python"]),st(We({keywords:T,hashComments:!0,multiLineStrings:!0,regexLiterals:2}),["perl","pl","pm"]),st(We({keywords:ae,hashComments:!0,multiLineStrings:!0,regexLiterals:!0}),["rb","ruby"]),st(We({keywords:S,cStyleComments:!0,regexLiterals:!0}),["javascript","js","ts","typescript"]),st(We({keywords:x,hashComments:3,cStyleComments:!0,multilineStrings:!0,tripleQuotedStrings:!0,regexLiterals:!0}),["coffee"]),st($e([],[[Z,/^[\s\S]+/]]),["regex"]);function un(ne){var de=ne.langExtension;try{var se=y(ne.sourceNode,ne.pre),W=se.sourceCode;ne.sourceCode=W,ne.spans=se.spans,ne.basePos=0,Kt(de,W)(ne),gt(ne)}catch(Ie){p.console&&console.log(Ie&&Ie.stack||Ie)}}function Ot(ne,de,se){var W=se||!1,Ie=de||null,M=document.createElement("div");M.innerHTML="<pre>"+ne+"</pre>",M=M.firstChild,W&&Xe(M,W,!0);var ce={langExtension:Ie,numberLines:W,sourceNode:M,pre:1,sourceCode:null,basePos:null,spans:null,decorations:null};return un(ce),M.innerHTML}function Vt(ne,de){var se=de||document.body,W=se.ownerDocument||document;function Ie(ct){return se.getElementsByTagName(ct)}for(var M=[Ie("pre"),Ie("code"),Ie("xmp")],ce=[],q=0;q<M.length;++q)for(var le=0,pe=M[q].length;le<pe;++le)ce.push(M[q][le]);M=null;var De=Date;De.now||(De={now:function(){return+new Date}});var Te=0,ke=/\blang(?:uage)?-([\w.]+)(?!\S)/,Oe=/\bprettyprint\b/,Ne=/\bprettyprinted\b/,nt=/pre|xmp/i,Qe=/^code$/i,Ze=/^(?:pre|code|xmp)$/i,pt={};function vt(){for(var ct=p.PR_SHOULD_USE_CONTINUATION?De.now()+250:1/0;Te<ce.length&&De.now()<ct;Te++){for(var Dt=ce[Te],Ut=pt,w=Dt;w=w.previousSibling;){var I=w.nodeType,dt=(I===7||I===8)&&w.nodeValue;if(dt?!/^\??prettify\b/.test(dt):I!==3||/\S/.test(w.nodeValue))break;if(dt){Ut={},dt.replace(/\b(\w+)=([\w:.%+-]+)/g,function(Ce,It,Bt){Ut[It]=Bt});break}}var oe=Dt.className;if((Ut!==pt||Oe.test(oe))&&!Ne.test(oe)){for(var Pe=!1,vn=Dt.parentNode;vn;vn=vn.parentNode){var je=vn.tagName;if(Ze.test(je)&&vn.className&&Oe.test(vn.className)){Pe=!0;break}}if(!Pe){Dt.className+=" prettyprinted";var He=Ut.lang;if(!He){He=oe.match(ke);var tt;!He&&(tt=me(Dt))&&Qe.test(tt.tagName)&&(He=tt.className.match(ke)),He&&(He=He[1])}var he;if(nt.test(Dt.tagName))he=1;else{var ie=Dt.currentStyle,xe=W.defaultView,Fe=ie?ie.whiteSpace:xe&&xe.getComputedStyle?xe.getComputedStyle(Dt,null).getPropertyValue("white-space"):0;he=Fe&&Fe.substring(0,3)==="pre"}var V=Ut.linenums;(V=V==="true"||+V)||(V=oe.match(/\blinenums\b(?::(\d+))?/),V=V?V[1]&&V[1].length?+V[1]:!0:!1),V&&Xe(Dt,V,he);var at={langExtension:He,sourceNode:Dt,numberLines:V,pre:he,sourceCode:null,basePos:null,spans:null,decorations:null};un(at)}}}Te<ce.length?p.setTimeout(vt,250):typeof ne=="function"&&ne()}vt()}var lt=p.PR={createSimpleLexer:$e,registerLangHandler:st,sourceDecorator:We,PR_ATTRIB_NAME:j,PR_ATTRIB_VALUE:ue,PR_COMMENT:C,PR_DECLARATION:ye,PR_KEYWORD:D,PR_LITERAL:$,PR_NOCODE:R,PR_PLAIN:Se,PR_PUNCTUATION:ve,PR_SOURCE:te,PR_STRING:Z,PR_TAG:Le,PR_TYPE:K,prettyPrintOne:L?p.prettyPrintOne=Ot:_e=Ot,prettyPrint:A=L?p.prettyPrint=Vt:A=Vt},At=p.define;typeof At=="function"&&At.amd&&At("google-code-prettify",[],function(){return lt})})()},25769:function(ln,et,m){"use strict";var L=m(98040),Q={"text/plain":"Text","text/html":"Url",default:"Text"},ge="Copy to clipboard: #{key}, Enter";function _e(p){var be=(/mac os x/i.test(navigator.userAgent)?"\u2318":"Ctrl")+"+C";return p.replace(/#{\s*key\s*}/g,be)}function A(p,be){var fe,o,k,N,v,x,S=!1;be||(be={}),fe=be.debug||!1;try{k=L(),N=document.createRange(),v=document.getSelection(),x=document.createElement("span"),x.textContent=p,x.ariaHidden="true",x.style.all="unset",x.style.position="fixed",x.style.top=0,x.style.clip="rect(0, 0, 0, 0)",x.style.whiteSpace="pre",x.style.webkitUserSelect="text",x.style.MozUserSelect="text",x.style.msUserSelect="text",x.style.userSelect="text",x.addEventListener("copy",function(z){if(z.stopPropagation(),be.format)if(z.preventDefault(),typeof z.clipboardData=="undefined"){fe&&console.warn("unable to use e.clipboardData"),fe&&console.warn("trying IE specific stuff"),window.clipboardData.clearData();var ae=Q[be.format]||Q.default;window.clipboardData.setData(ae,p)}else z.clipboardData.clearData(),z.clipboardData.setData(be.format,p);be.onCopy&&(z.preventDefault(),be.onCopy(z.clipboardData))}),document.body.appendChild(x),N.selectNodeContents(x),v.addRange(N);var T=document.execCommand("copy");if(!T)throw new Error("copy command was unsuccessful");S=!0}catch(z){fe&&console.error("unable to copy using execCommand: ",z),fe&&console.warn("trying IE specific stuff");try{window.clipboardData.setData(be.format||"text",p),be.onCopy&&be.onCopy(window.clipboardData),S=!0}catch(ae){fe&&console.error("unable to copy using clipboardData: ",ae),fe&&console.error("falling back to prompt"),o=_e("message"in be?be.message:ge),window.prompt(o,p)}}finally{v&&(typeof v.removeRange=="function"?v.removeRange(N):v.removeAllRanges()),x&&document.body.removeChild(x),k()}return S}ln.exports=A},53184:function(ln,et,m){"use strict";var L,Q;function ge(_e,A,p){var be=function(fe,o){return _e.js_beautify(fe,o)};return be.js=_e.js_beautify,be.css=A.css_beautify,be.html=p.html_beautify,be.js_beautify=_e.js_beautify,be.css_beautify=A.css_beautify,be.html_beautify=p.html_beautify,be}L=[m(58553),m(87804),m(40998)],Q=function(_e,A,p){return ge(_e,A,p)}.apply(et,L),Q!==void 0&&(ln.exports=Q)},87804:function(ln,et){var m,L;(function(){var Q;(function(){"use strict";var _e=[,,function(fe){function o(v){this.__parent=v,this.__character_count=0,this.__indent_count=-1,this.__alignment_count=0,this.__wrap_point_index=0,this.__wrap_point_character_count=0,this.__wrap_point_indent_count=-1,this.__wrap_point_alignment_count=0,this.__items=[]}o.prototype.clone_empty=function(){var v=new o(this.__parent);return v.set_indent(this.__indent_count,this.__alignment_count),v},o.prototype.item=function(v){return v<0?this.__items[this.__items.length+v]:this.__items[v]},o.prototype.has_match=function(v){for(var x=this.__items.length-1;x>=0;x--)if(this.__items[x].match(v))return!0;return!1},o.prototype.set_indent=function(v,x){this.is_empty()&&(this.__indent_count=v||0,this.__alignment_count=x||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 v=this.__parent.current_line;return v.set_indent(this.__wrap_point_indent_count,this.__wrap_point_alignment_count),v.__items=this.__items.slice(this.__wrap_point_index),this.__items=this.__items.slice(0,this.__wrap_point_index),v.__character_count+=this.__character_count-this.__wrap_point_character_count,this.__character_count=this.__wrap_point_character_count,v.__items[0]===" "&&(v.__items.splice(0,1),v.__character_count-=1),!0}return!1},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(v){this.__items.push(v);var x=v.lastIndexOf(`
`);x!==-1?this.__character_count=v.length-x:this.__character_count+=v.length},o.prototype.pop=function(){var v=null;return this.is_empty()||(v=this.__items.pop(),this.__character_count-=v.length),v},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 v="";return this.is_empty()?this.__parent.indent_empty_lines&&(v=this.__parent.get_indent_string(this.__indent_count)):(v=this.__parent.get_indent_string(this.__indent_count,this.__alignment_count),v+=this.__items.join("")),v};function k(v,x){this.__cache=[""],this.__indent_size=v.indent_size,this.__indent_string=v.indent_char,v.indent_with_tabs||(this.__indent_string=new Array(v.indent_size+1).join(v.indent_char)),x=x||"",v.indent_level>0&&(x=new Array(v.indent_level+1).join(this.__indent_string)),this.__base_string=x,this.__base_string_length=x.length}k.prototype.get_indent_size=function(v,x){var S=this.__base_string_length;return x=x||0,v<0&&(S=0),S+=v*this.__indent_size,S+=x,S},k.prototype.get_indent_string=function(v,x){var S=this.__base_string;return x=x||0,v<0&&(v=0,S=""),x+=v*this.__indent_size,this.__ensure_cache(x),S+=this.__cache[x],S},k.prototype.__ensure_cache=function(v){for(;v>=this.__cache.length;)this.__add_column()},k.prototype.__add_column=function(){var v=this.__cache.length,x=0,S="";this.__indent_size&&v>=this.__indent_size&&(x=Math.floor(v/this.__indent_size),v-=x*this.__indent_size,S=new Array(x+1).join(this.__indent_string)),v&&(S+=new Array(v+1).join(" ")),this.__cache.push(S)};function N(v,x){this.__indent_cache=new k(v,x),this.raw=!1,this._end_with_newline=v.end_with_newline,this.indent_size=v.indent_size,this.wrap_line_length=v.wrap_line_length,this.indent_empty_lines=v.indent_empty_lines,this.__lines=[],this.previous_line=null,this.current_line=null,this.next_line=new o(this),this.space_before_token=!1,this.non_breaking_space=!1,this.previous_token_wrapped=!1,this.__add_outputline()}N.prototype.__add_outputline=function(){this.previous_line=this.current_line,this.current_line=this.next_line.clone_empty(),this.__lines.push(this.current_line)},N.prototype.get_line_number=function(){return this.__lines.length},N.prototype.get_indent_string=function(v,x){return this.__indent_cache.get_indent_string(v,x)},N.prototype.get_indent_size=function(v,x){return this.__indent_cache.get_indent_size(v,x)},N.prototype.is_empty=function(){return!this.previous_line&&this.current_line.is_empty()},N.prototype.add_new_line=function(v){return this.is_empty()||!v&&this.just_added_newline()?!1:(this.raw||this.__add_outputline(),!0)},N.prototype.get_code=function(v){this.trim(!0);var x=this.current_line.pop();x&&(x[x.length-1]===`
`&&(x=x.replace(/\n+$/g,"")),this.current_line.push(x)),this._end_with_newline&&this.__add_outputline();var S=this.__lines.join(`
`);return v!==`
`&&(S=S.replace(/[\n]/g,v)),S},N.prototype.set_wrap_point=function(){this.current_line._set_wrap_point()},N.prototype.set_indent=function(v,x){return v=v||0,x=x||0,this.next_line.set_indent(v,x),this.__lines.length>1?(this.current_line.set_indent(v,x),!0):(this.current_line.set_indent(),!1)},N.prototype.add_raw_token=function(v){for(var x=0;x<v.newlines;x++)this.__add_outputline();this.current_line.set_indent(-1),this.current_line.push(v.whitespace_before),this.current_line.push(v.text),this.space_before_token=!1,this.non_breaking_space=!1,this.previous_token_wrapped=!1},N.prototype.add_token=function(v){this.__add_space_before_token(),this.current_line.push(v),this.space_before_token=!1,this.non_breaking_space=!1,this.previous_token_wrapped=this.current_line._allow_wrap()},N.prototype.__add_space_before_token=function(){this.space_before_token&&!this.just_added_newline()&&(this.non_breaking_space||this.set_wrap_point(),this.current_line.push(" "))},N.prototype.remove_indent=function(v){for(var x=this.__lines.length;v<x;)this.__lines[v]._remove_indent(),v++;this.current_line._remove_wrap_indent()},N.prototype.trim=function(v){for(v=v===void 0?!1:v,this.current_line.trim();v&&this.__lines.length>1&&this.current_line.is_empty();)this.__lines.pop(),this.current_line=this.__lines[this.__lines.length-1],this.current_line.trim();this.previous_line=this.__lines.length>1?this.__lines[this.__lines.length-2]:null},N.prototype.just_added_newline=function(){return this.current_line.is_empty()},N.prototype.just_added_blankline=function(){return this.is_empty()||this.current_line.is_empty()&&this.previous_line.is_empty()},N.prototype.ensure_empty_line_above=function(v,x){for(var S=this.__lines.length-2;S>=0;){var T=this.__lines[S];if(T.is_empty())break;if(T.item(0).indexOf(v)!==0&&T.item(-1)!==x){this.__lines.splice(S+1,0,new o(this)),this.previous_line=this.__lines[this.__lines.length-2];break}S--}},fe.exports.Output=N},,,,function(fe){function o(v,x){this.raw_options=k(v,x),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(v,x){var S=this.raw_options[v],T=x||[];return typeof S=="object"?S!==null&&typeof S.concat=="function"&&(T=S.concat()):typeof S=="string"&&(T=S.split(/[^a-zA-Z0-9_\/\-]+/)),T},o.prototype._get_boolean=function(v,x){var S=this.raw_options[v],T=S===void 0?!!x:!!S;return T},o.prototype._get_characters=function(v,x){var S=this.raw_options[v],T=x||"";return typeof S=="string"&&(T=S.replace(/\\r/,"\r").replace(/\\n/,`
`).replace(/\\t/," ")),T},o.prototype._get_number=function(v,x){var S=this.raw_options[v];x=parseInt(x,10),isNaN(x)&&(x=0);var T=parseInt(S,10);return isNaN(T)&&(T=x),T},o.prototype._get_selection=function(v,x,S){var T=this._get_selection_list(v,x,S);if(T.length!==1)throw new Error("Invalid Option Value: The option '"+v+`' can only be one of the following values:
`+x+`
You passed in: '`+this.raw_options[v]+"'");return T[0]},o.prototype._get_selection_list=function(v,x,S){if(!x||x.length===0)throw new Error("Selection list cannot be empty.");if(S=S||[x[0]],!this._is_valid_selection(S,x))throw new Error("Invalid Default Value!");var T=this._get_array(v,S);if(!this._is_valid_selection(T,x))throw new Error("Invalid Option Value: The option '"+v+`' can contain only the following values:
`+x+`
You passed in: '`+this.raw_options[v]+"'");return T},o.prototype._is_valid_selection=function(v,x){return v.length&&x.length&&!v.some(function(S){return x.indexOf(S)===-1})};function k(v,x){var S={};v=N(v);var T;for(T in v)T!==x&&(S[T]=v[T]);if(x&&v[x])for(T in v[x])S[T]=v[x][T];return S}function N(v){var x={},S;for(S in v){var T=S.replace(/-/g,"_");x[T]=v[S]}return x}fe.exports.Options=o,fe.exports.normalizeOpts=N,fe.exports.mergeOpts=k},,function(fe){var o=RegExp.prototype.hasOwnProperty("sticky");function k(N){this.__input=N||"",this.__input_length=this.__input.length,this.__position=0}k.prototype.restart=function(){this.__position=0},k.prototype.back=function(){this.__position>0&&(this.__position-=1)},k.prototype.hasNext=function(){return this.__position<this.__input_length},k.prototype.next=function(){var N=null;return this.hasNext()&&(N=this.__input.charAt(this.__position),this.__position+=1),N},k.prototype.peek=function(N){var v=null;return N=N||0,N+=this.__position,N>=0&&N<this.__input_length&&(v=this.__input.charAt(N)),v},k.prototype.__match=function(N,v){N.lastIndex=v;var x=N.exec(this.__input);return x&&!(o&&N.sticky)&&x.index!==v&&(x=null),x},k.prototype.test=function(N,v){return v=v||0,v+=this.__position,v>=0&&v<this.__input_length?!!this.__match(N,v):!1},k.prototype.testChar=function(N,v){var x=this.peek(v);return N.lastIndex=0,x!==null&&N.test(x)},k.prototype.match=function(N){var v=this.__match(N,this.__position);return v?this.__position+=v[0].length:v=null,v},k.prototype.read=function(N,v,x){var S="",T;return N&&(T=this.match(N),T&&(S+=T[0])),v&&(T||!N)&&(S+=this.readUntil(v,x)),S},k.prototype.readUntil=function(N,v){var x="",S=this.__position;N.lastIndex=this.__position;var T=N.exec(this.__input);return T?(S=T.index,v&&(S+=T[0].length)):S=this.__input_length,x=this.__input.substring(this.__position,S),this.__position=S,x},k.prototype.readUntilAfter=function(N){return this.readUntil(N,!0)},k.prototype.get_regexp=function(N,v){var x=null,S="g";return v&&o&&(S="y"),typeof N=="string"&&N!==""?x=new RegExp(N,S):N&&(x=new RegExp(N.source,S)),x},k.prototype.get_literal_regexp=function(N){return RegExp(N.replace(/[-\/\\^$*+?.()|[\]{}]/g,"\\$&"))},k.prototype.peekUntilAfter=function(N){var v=this.__position,x=this.readUntilAfter(N);return this.__position=v,x},k.prototype.lookBack=function(N){var v=this.__position-1;return v>=N.length&&this.__input.substring(v-N.length,v).toLowerCase()===N},fe.exports.InputScanner=k},,,,,function(fe){function o(k,N){k=typeof k=="string"?k:k.source,N=typeof N=="string"?N:N.source,this.__directives_block_pattern=new RegExp(k+/ beautify( \w+[:]\w+)+ /.source+N,"g"),this.__directive_pattern=/ (\w+)[:](\w+)/g,this.__directives_end_ignore_pattern=new RegExp(k+/\sbeautify\signore:end\s/.source+N,"g")}o.prototype.get_directives=function(k){if(!k.match(this.__directives_block_pattern))return null;var N={};this.__directive_pattern.lastIndex=0;for(var v=this.__directive_pattern.exec(k);v;)N[v[1]]=v[2],v=this.__directive_pattern.exec(k);return N},o.prototype.readIgnored=function(k){return k.readUntilAfter(this.__directives_end_ignore_pattern)},fe.exports.Directives=o},,function(fe,o,k){var N=k(16).Beautifier,v=k(17).Options;function x(S,T){var z=new N(S,T);return z.beautify()}fe.exports=x,fe.exports.defaultOptions=function(){return new v}},function(fe,o,k){var N=k(17).Options,v=k(2).Output,x=k(8).InputScanner,S=k(13).Directives,T=new S(/\/\*/,/\*\//),z=/\r\n|[\r\n]/,ae=/\r\n|[\r\n]/g,B=/\s/,U=/(?:\s|\n)+/g,X=/\/\*(?:[\s\S]*?)((?:\*\/)|$)/g,Z=/\/\/(?:[^\n\r\u2028\u2029]*)/g;function D(C,K){this._source_text=C||"",this._options=new N(K),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"]}D.prototype.eatString=function(C){var K="";for(this._ch=this._input.next();this._ch;){if(K+=this._ch,this._ch==="\\")K+=this._input.next();else if(C.indexOf(this._ch)!==-1||this._ch===`
`)break;this._ch=this._input.next()}return K},D.prototype.eatWhitespace=function(C){for(var K=B.test(this._input.peek()),$=0;B.test(this._input.peek());)this._ch=this._input.next(),C&&this._ch===`
`&&($===0||$<this._options.max_preserve_newlines)&&($++,this._output.add_new_line(!0));return K},D.prototype.foundNestedPseudoClass=function(){for(var C=0,K=1,$=this._input.peek(K);$;){if($==="{")return!0;if($==="(")C+=1;else if($===")"){if(C===0)return!1;C-=1}else if($===";"||$==="}")return!1;K++,$=this._input.peek(K)}return!1},D.prototype.print_string=function(C){this._output.set_indent(this._indentLevel),this._output.non_breaking_space=!0,this._output.add_token(C)},D.prototype.preserveSingleSpace=function(C){C&&(this._output.space_before_token=!0)},D.prototype.indent=function(){this._indentLevel++},D.prototype.outdent=function(){this._indentLevel>0&&this._indentLevel--},D.prototype.beautify=function(){if(this._options.disabled)return this._source_text;var C=this._source_text,K=this._options.eol;K==="auto"&&(K=`
`,C&&z.test(C||"")&&(K=C.match(z)[0])),C=C.replace(ae,`
`);var $=C.match(/^[\t ]*/)[0];this._output=new v(this._options,$),this._input=new x(C),this._indentLevel=0,this._nestedLevel=0,this._ch=null;for(var ve=0,Se=!1,Le=!1,ye=!1,te=!1,j=!1,ue=this._ch,R=!1,ee,G,y;ee=this._input.read(U),G=ee!=="",y=ue,this._ch=this._input.next(),this._ch==="\\"&&this._input.hasNext()&&(this._ch+=this._input.next()),ue=this._ch,this._ch;)if(this._ch==="/"&&this._input.peek()==="*"){this._output.add_new_line(),this._input.back();var E=this._input.read(X),Y=T.get_directives(E);Y&&Y.ignore==="start"&&(E+=T.readIgnored(this._input)),this.print_string(E),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(Z)),this.eatWhitespace(!0);else if(this._ch==="$"){this.preserveSingleSpace(G),this.print_string(this._ch);var me=this._input.peekUntilAfter(/[: ,;{}()[\]\/='"]/g);me.match(/[ :]$/)&&(me=this.eatString(": ").replace(/\s+$/,""),this.print_string(me),this._output.space_before_token=!0),ve===0&&me.indexOf(":")!==-1&&(Le=!0,this.indent())}else if(this._ch==="@")if(this.preserveSingleSpace(G),this._input.peek()==="{")this.print_string(this._ch+this.eatString("}"));else{this.print_string(this._ch);var $e=this._input.peekUntilAfter(/[: ,;{}()[\]\/='"]/g);$e.match(/[ :]$/)&&($e=this.eatString(": ").replace(/\s+$/,""),this.print_string($e),this._output.space_before_token=!0),ve===0&&$e.indexOf(":")!==-1?(Le=!0,this.indent()):$e in this.NESTED_AT_RULE?(this._nestedLevel+=1,$e in this.CONDITIONAL_GROUP_RULE&&(ye=!0)):ve===0&&!Le&&(te=!0)}else if(this._ch==="#"&&this._input.peek()==="{")this.preserveSingleSpace(G),this.print_string(this._ch+this.eatString("}"));else if(this._ch==="{")Le&&(Le=!1,this.outdent()),te=!1,ye?(ye=!1,Se=this._indentLevel>=this._nestedLevel):Se=this._indentLevel>=this._nestedLevel-1,this._options.newline_between_rules&&Se&&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)):(y==="("?this._output.space_before_token=!1:y!==","&&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(),y==="{"&&this._output.trim(!0),Le&&(this.outdent(),Le=!1),this.print_string(this._ch),Se=!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 We=0;We<this.NON_SEMICOLON_NEWLINE_PROPERTY.length;We++)if(this._input.lookBack(this.NON_SEMICOLON_NEWLINE_PROPERTY[We])){R=!0;break}(Se||ye)&&!(this._input.lookBack("&")||this.foundNestedPseudoClass())&&!this._input.lookBack("(")&&!te&&ve===0?(this.print_string(":"),Le||(Le=!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 qe=y==='"'||y==="'";this.preserveSingleSpace(qe||G),this.print_string(this._ch+this.eatString(this._ch)),this.eatWhitespace(!0)}else if(this._ch===";")R=!1,ve===0?(Le&&(this.outdent(),Le=!1),te=!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(),ve++,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(")")),ve&&(ve--,this.outdent()));else{var Xe=!1;this._input.lookBack("with")&&(Xe=!0),this.preserveSingleSpace(G||Xe),this.print_string(this._ch),Le&&y==="$"&&this._options.selector_separator_newline?(this._output.add_new_line(),j=!0):(this.eatWhitespace(),ve++,this.indent())}else if(this._ch===")")ve&&(ve--,this.outdent()),j&&this._input.peek()===";"&&this._options.selector_separator_newline&&(j=!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&&(!Le||j)&&ve===0&&!te?this._output.add_new_line():this._output.space_before_token=!0;else if((this._ch===">"||this._ch==="+"||this._ch==="~")&&!Le&&ve===0)this._options.space_around_combinator?(this._output.space_before_token=!0,this.print_string(this._ch),this._output.space_before_token=!0):(this.print_string(this._ch),this.eatWhitespace(),this._ch&&B.test(this._ch)&&(this._ch=""));else if(this._ch==="]")this.print_string(this._ch);else if(this._ch==="[")this.preserveSingleSpace(G),this.print_string(this._ch);else if(this._ch==="=")this.eatWhitespace(),this.print_string("="),B.test(this._ch)&&(this._ch="");else if(this._ch==="!"&&!this._input.lookBack("\\"))this._output.space_before_token=!0,this.print_string(this._ch);else{var gt=y==='"'||y==="'";this.preserveSingleSpace(gt||G),this.print_string(this._ch),!this._output.just_added_newline()&&this._input.peek()===`
`&&R&&this._output.add_new_line()}var _t=this._output.get_code(K);return _t},fe.exports.Beautifier=D},function(fe,o,k){var N=k(6).Options;function v(x){N.call(this,x,"css"),this.selector_separator_newline=this._get_boolean("selector_separator_newline",!0),this.newline_between_rules=this._get_boolean("newline_between_rules",!0);var S=this._get_boolean("space_around_selector_separator");this.space_around_combinator=this._get_boolean("space_around_combinator")||S;var T=this._get_selection_list("brace_style",["collapse","expand","end-expand","none","preserve-inline"]);this.brace_style="collapse";for(var z=0;z<T.length;z++)T[z]!=="expand"?this.brace_style="collapse":this.brace_style=T[z]}v.prototype=new N,fe.exports.Options=v}],A={};function p(fe){var o=A[fe];if(o!==void 0)return o.exports;var k=A[fe]={exports:{}};return _e[fe](k,k.exports,p),k.exports}var be=p(15);Q=be})();var ge=Q;m=[],L=function(){return{css_beautify:ge}}.apply(et,m),L!==void 0&&(ln.exports=L)})()},40998:function(ln,et,m){var L,Q;(function(){var ge;(function(){"use strict";var be=[,,function(N){function v(T){this.__parent=T,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=[]}v.prototype.clone_empty=function(){var T=new v(this.__parent);return T.set_indent(this.__indent_count,this.__alignment_count),T},v.prototype.item=function(T){return T<0?this.__items[this.__items.length+T]:this.__items[T]},v.prototype.has_match=function(T){for(var z=this.__items.length-1;z>=0;z--)if(this.__items[z].match(T))return!0;return!1},v.prototype.set_indent=function(T,z){this.is_empty()&&(this.__indent_count=T||0,this.__alignment_count=z||0,this.__character_count=this.__parent.get_indent_size(this.__indent_count,this.__alignment_count))},v.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)},v.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},v.prototype._allow_wrap=function(){if(this._should_wrap()){this.__parent.add_new_line();var T=this.__parent.current_line;return T.set_indent(this.__wrap_point_indent_count,this.__wrap_point_alignment_count),T.__items=this.__items.slice(this.__wrap_point_index),this.__items=this.__items.slice(0,this.__wrap_point_index),T.__character_count+=this.__character_count-this.__wrap_point_character_count,this.__character_count=this.__wrap_point_character_count,T.__items[0]===" "&&(T.__items.splice(0,1),T.__character_count-=1),!0}return!1},v.prototype.is_empty=function(){return this.__items.length===0},v.prototype.last=function(){return this.is_empty()?null:this.__items[this.__items.length-1]},v.prototype.push=function(T){this.__items.push(T);var z=T.lastIndexOf(`
`);z!==-1?this.__character_count=T.length-z:this.__character_count+=T.length},v.prototype.pop=function(){var T=null;return this.is_empty()||(T=this.__items.pop(),this.__character_count-=T.length),T},v.prototype._remove_indent=function(){this.__indent_count>0&&(this.__indent_count-=1,this.__character_count-=this.__parent.indent_size)},v.prototype._remove_wrap_indent=function(){this.__wrap_point_indent_count>0&&(this.__wrap_point_indent_count-=1)},v.prototype.trim=function(){for(;this.last()===" ";)this.__items.pop(),this.__character_count-=1},v.prototype.toString=function(){var T="";return this.is_empty()?this.__parent.indent_empty_lines&&(T=this.__parent.get_indent_string(this.__indent_count)):(T=this.__parent.get_indent_string(this.__indent_count,this.__alignment_count),T+=this.__items.join("")),T};function x(T,z){this.__cache=[""],this.__indent_size=T.indent_size,this.__indent_string=T.indent_char,T.indent_with_tabs||(this.__indent_string=new Array(T.indent_size+1).join(T.indent_char)),z=z||"",T.indent_level>0&&(z=new Array(T.indent_level+1).join(this.__indent_string)),this.__base_string=z,this.__base_string_length=z.length}x.prototype.get_indent_size=function(T,z){var ae=this.__base_string_length;return z=z||0,T<0&&(ae=0),ae+=T*this.__indent_size,ae+=z,ae},x.prototype.get_indent_string=function(T,z){var ae=this.__base_string;return z=z||0,T<0&&(T=0,ae=""),z+=T*this.__indent_size,this.__ensure_cache(z),ae+=this.__cache[z],ae},x.prototype.__ensure_cache=function(T){for(;T>=this.__cache.length;)this.__add_column()},x.prototype.__add_column=function(){var T=this.__cache.length,z=0,ae="";this.__indent_size&&T>=this.__indent_size&&(z=Math.floor(T/this.__indent_size),T-=z*this.__indent_size,ae=new Array(z+1).join(this.__indent_string)),T&&(ae+=new Array(T+1).join(" ")),this.__cache.push(ae)};function S(T,z){this.__indent_cache=new x(T,z),this.raw=!1,this._end_with_newline=T.end_with_newline,this.indent_size=T.indent_size,this.wrap_line_length=T.wrap_line_length,this.indent_empty_lines=T.indent_empty_lines,this.__lines=[],this.previous_line=null,this.current_line=null,this.next_line=new v(this),this.space_before_token=!1,this.non_breaking_space=!1,this.previous_token_wrapped=!1,this.__add_outputline()}S.prototype.__add_outputline=function(){this.previous_line=this.current_line,this.current_line=this.next_line.clone_empty(),this.__lines.push(this.current_line)},S.prototype.get_line_number=function(){return this.__lines.length},S.prototype.get_indent_string=function(T,z){return this.__indent_cache.get_indent_string(T,z)},S.prototype.get_indent_size=function(T,z){return this.__indent_cache.get_indent_size(T,z)},S.prototype.is_empty=function(){return!this.previous_line&&this.current_line.is_empty()},S.prototype.add_new_line=function(T){return this.is_empty()||!T&&this.just_added_newline()?!1:(this.raw||this.__add_outputline(),!0)},S.prototype.get_code=function(T){this.trim(!0);var z=this.current_line.pop();z&&(z[z.length-1]===`
`&&(z=z.replace(/\n+$/g,"")),this.current_line.push(z)),this._end_with_newline&&this.__add_outputline();var ae=this.__lines.join(`
`);return T!==`
`&&(ae=ae.replace(/[\n]/g,T)),ae},S.prototype.set_wrap_point=function(){this.current_line._set_wrap_point()},S.prototype.set_indent=function(T,z){return T=T||0,z=z||0,this.next_line.set_indent(T,z),this.__lines.length>1?(this.current_line.set_indent(T,z),!0):(this.current_line.set_indent(),!1)},S.prototype.add_raw_token=function(T){for(var z=0;z<T.newlines;z++)this.__add_outputline();this.current_line.set_indent(-1),this.current_line.push(T.whitespace_before),this.current_line.push(T.text),this.space_before_token=!1,this.non_breaking_space=!1,this.previous_token_wrapped=!1},S.prototype.add_token=function(T){this.__add_space_before_token(),this.current_line.push(T),this.space_before_token=!1,this.non_breaking_space=!1,this.previous_token_wrapped=this.current_line._allow_wrap()},S.prototype.__add_space_before_token=function(){this.space_before_token&&!this.just_added_newline()&&(this.non_breaking_space||this.set_wrap_point(),this.current_line.push(" "))},S.prototype.remove_indent=function(T){for(var z=this.__lines.length;T<z;)this.__lines[T]._remove_indent(),T++;this.current_line._remove_wrap_indent()},S.prototype.trim=function(T){for(T=T===void 0?!1:T,this.current_line.trim();T&&this.__lines.length>1&&this.current_line.is_empty();)this.__lines.pop(),this.current_line=this.__lines[this.__lines.length-1],this.current_line.trim();this.previous_line=this.__lines.length>1?this.__lines[this.__lines.length-2]:null},S.prototype.just_added_newline=function(){return this.current_line.is_empty()},S.prototype.just_added_blankline=function(){return this.is_empty()||this.current_line.is_empty()&&this.previous_line.is_empty()},S.prototype.ensure_empty_line_above=function(T,z){for(var ae=this.__lines.length-2;ae>=0;){var B=this.__lines[ae];if(B.is_empty())break;if(B.item(0).indexOf(T)!==0&&B.item(-1)!==z){this.__lines.splice(ae+1,0,new v(this)),this.previous_line=this.__lines[this.__lines.length-2];break}ae--}},N.exports.Output=S},function(N){function v(x,S,T,z){this.type=x,this.text=S,this.comments_before=null,this.newlines=T||0,this.whitespace_before=z||"",this.parent=null,this.next=null,this.previous=null,this.opened=null,this.closed=null,this.directives=null}N.exports.Token=v},,,function(N){function v(T,z){this.raw_options=x(T,z),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"])}v.prototype._get_array=function(T,z){var ae=this.raw_options[T],B=z||[];return typeof ae=="object"?ae!==null&&typeof ae.concat=="function"&&(B=ae.concat()):typeof ae=="string"&&(B=ae.split(/[^a-zA-Z0-9_\/\-]+/)),B},v.prototype._get_boolean=function(T,z){var ae=this.raw_options[T],B=ae===void 0?!!z:!!ae;return B},v.prototype._get_characters=function(T,z){var ae=this.raw_options[T],B=z||"";return typeof ae=="string"&&(B=ae.replace(/\\r/,"\r").replace(/\\n/,`
`).replace(/\\t/," ")),B},v.prototype._get_number=function(T,z){var ae=this.raw_options[T];z=parseInt(z,10),isNaN(z)&&(z=0);var B=parseInt(ae,10);return isNaN(B)&&(B=z),B},v.prototype._get_selection=function(T,z,ae){var B=this._get_selection_list(T,z,ae);if(B.length!==1)throw new Error("Invalid Option Value: The option '"+T+`' can only be one of the following values:
`+z+`
You passed in: '`+this.raw_options[T]+"'");return B[0]},v.prototype._get_selection_list=function(T,z,ae){if(!z||z.length===0)throw new Error("Selection list cannot be empty.");if(ae=ae||[z[0]],!this._is_valid_selection(ae,z))throw new Error("Invalid Default Value!");var B=this._get_array(T,ae);if(!this._is_valid_selection(B,z))throw new Error("Invalid Option Value: The option '"+T+`' can contain only the following values:
`+z+`
You passed in: '`+this.raw_options[T]+"'");return B},v.prototype._is_valid_selection=function(T,z){return T.length&&z.length&&!T.some(function(ae){return z.indexOf(ae)===-1})};function x(T,z){var ae={};T=S(T);var B;for(B in T)B!==z&&(ae[B]=T[B]);if(z&&T[z])for(B in T[z])ae[B]=T[z][B];return ae}function S(T){var z={},ae;for(ae in T){var B=ae.replace(/-/g,"_");z[B]=T[ae]}return z}N.exports.Options=v,N.exports.normalizeOpts=S,N.exports.mergeOpts=x},,function(N){var v=RegExp.prototype.hasOwnProperty("sticky");function x(S){this.__input=S||"",this.__input_length=this.__input.length,this.__position=0}x.prototype.restart=function(){this.__position=0},x.prototype.back=function(){this.__position>0&&(this.__position-=1)},x.prototype.hasNext=function(){return this.__position<this.__input_length},x.prototype.next=function(){var S=null;return this.hasNext()&&(S=this.__input.charAt(this.__position),this.__position+=1),S},x.prototype.peek=function(S){var T=null;return S=S||0,S+=this.__position,S>=0&&S<this.__input_length&&(T=this.__input.charAt(S)),T},x.prototype.__match=function(S,T){S.lastIndex=T;var z=S.exec(this.__input);return z&&!(v&&S.sticky)&&z.index!==T&&(z=null),z},x.prototype.test=function(S,T){return T=T||0,T+=this.__position,T>=0&&T<this.__input_length?!!this.__match(S,T):!1},x.prototype.testChar=function(S,T){var z=this.peek(T);return S.lastIndex=0,z!==null&&S.test(z)},x.prototype.match=function(S){var T=this.__match(S,this.__position);return T?this.__position+=T[0].length:T=null,T},x.prototype.read=function(S,T,z){var ae="",B;return S&&(B=this.match(S),B&&(ae+=B[0])),T&&(B||!S)&&(ae+=this.readUntil(T,z)),ae},x.prototype.readUntil=function(S,T){var z="",ae=this.__position;S.lastIndex=this.__position;var B=S.exec(this.__input);return B?(ae=B.index,T&&(ae+=B[0].length)):ae=this.__input_length,z=this.__input.substring(this.__position,ae),this.__position=ae,z},x.prototype.readUntilAfter=function(S){return this.readUntil(S,!0)},x.prototype.get_regexp=function(S,T){var z=null,ae="g";return T&&v&&(ae="y"),typeof S=="string"&&S!==""?z=new RegExp(S,ae):S&&(z=new RegExp(S.source,ae)),z},x.prototype.get_literal_regexp=function(S){return RegExp(S.replace(/[-\/\\^$*+?.()|[\]{}]/g,"\\$&"))},x.prototype.peekUntilAfter=function(S){var T=this.__position,z=this.readUntilAfter(S);return this.__position=T,z},x.prototype.lookBack=function(S){var T=this.__position-1;return T>=S.length&&this.__input.substring(T-S.length,T).toLowerCase()===S},N.exports.InputScanner=x},function(N,v,x){var S=x(8).InputScanner,T=x(3).Token,z=x(10).TokenStream,ae=x(11).WhitespacePattern,B={START:"TK_START",RAW:"TK_RAW",EOF:"TK_EOF"},U=function(X,Z){this._input=new S(X),this._options=Z||{},this.__tokens=null,this._patterns={},this._patterns.whitespace=new ae(this._input)};U.prototype.tokenize=function(){this._input.restart(),this.__tokens=new z,this._reset();for(var X,Z=new T(B.START,""),D=null,C=[],K=new z;Z.type!==B.EOF;){for(X=this._get_next_token(Z,D);this._is_comment(X);)K.add(X),X=this._get_next_token(Z,D);K.isEmpty()||(X.comments_before=K,K=new z),X.parent=D,this._is_opening(X)?(C.push(D),D=X):D&&this._is_closing(X,D)&&(X.opened=D,D.closed=X,D=C.pop(),X.parent=D),X.previous=Z,Z.next=X,this.__tokens.add(X),Z=X}return this.__tokens},U.prototype._is_first_token=function(){return this.__tokens.isEmpty()},U.prototype._reset=function(){},U.prototype._get_next_token=function(X,Z){this._readWhitespace();var D=this._input.read(/.+/g);return D?this._create_token(B.RAW,D):this._create_token(B.EOF,"")},U.prototype._is_comment=function(X){return!1},U.prototype._is_opening=function(X){return!1},U.prototype._is_closing=function(X,Z){return!1},U.prototype._create_token=function(X,Z){var D=new T(X,Z,this._patterns.whitespace.newline_count,this._patterns.whitespace.whitespace_before_token);return D},U.prototype._readWhitespace=function(){return this._patterns.whitespace.read()},N.exports.Tokenizer=U,N.exports.TOKEN=B},function(N){function v(x){this.__tokens=[],this.__tokens_length=this.__tokens.length,this.__position=0,this.__parent_token=x}v.prototype.restart=function(){this.__position=0},v.prototype.isEmpty=function(){return this.__tokens_length===0},v.prototype.hasNext=function(){return this.__position<this.__tokens_length},v.prototype.next=function(){var x=null;return this.hasNext()&&(x=this.__tokens[this.__position],this.__position+=1),x},v.prototype.peek=function(x){var S=null;return x=x||0,x+=this.__position,x>=0&&x<this.__tokens_length&&(S=this.__tokens[x]),S},v.prototype.add=function(x){this.__parent_token&&(x.parent=this.__parent_token),this.__tokens.push(x),this.__tokens_length+=1},N.exports.TokenStream=v},function(N,v,x){var S=x(12).Pattern;function T(z,ae){S.call(this,z,ae),ae?this._line_regexp=this._input.get_regexp(ae._line_regexp):this.__set_whitespace_patterns("",""),this.newline_count=0,this.whitespace_before_token=""}T.prototype=new S,T.prototype.__set_whitespace_patterns=function(z,ae){z+="\\t ",ae+="\\n\\r",this._match_pattern=this._input.get_regexp("["+z+ae+"]+",!0),this._newline_regexp=this._input.get_regexp("\\r\\n|["+ae+"]")},T.prototype.read=function(){this.newline_count=0,this.whitespace_before_token="";var z=this._input.read(this._match_pattern);if(z===" ")this.whitespace_before_token=" ";else if(z){var ae=this.__split(this._newline_regexp,z);this.newline_count=ae.length-1,this.whitespace_before_token=ae[this.newline_count]}return z},T.prototype.matching=function(z,ae){var B=this._create();return B.__set_whitespace_patterns(z,ae),B._update(),B},T.prototype._create=function(){return new T(this._input,this)},T.prototype.__split=function(z,ae){z.lastIndex=0;for(var B=0,U=[],X=z.exec(ae);X;)U.push(ae.substring(B,X.index)),B=X.index+X[0].length,X=z.exec(ae);return B<ae.length?U.push(ae.substring(B,ae.length)):U.push(""),U},N.exports.WhitespacePattern=T},function(N){function v(x,S){this._input=x,this._starting_pattern=null,this._match_pattern=null,this._until_pattern=null,this._until_after=!1,S&&(this._starting_pattern=this._input.get_regexp(S._starting_pattern,!0),this._match_pattern=this._input.get_regexp(S._match_pattern,!0),this._until_pattern=this._input.get_regexp(S._until_pattern),this._until_after=S._until_after)}v.prototype.read=function(){var x=this._input.read(this._starting_pattern);return(!this._starting_pattern||x)&&(x+=this._input.read(this._match_pattern,this._until_pattern,this._until_after)),x},v.prototype.read_match=function(){return this._input.match(this._match_pattern)},v.prototype.until_after=function(x){var S=this._create();return S._until_after=!0,S._until_pattern=this._input.get_regexp(x),S._update(),S},v.prototype.until=function(x){var S=this._create();return S._until_after=!1,S._until_pattern=this._input.get_regexp(x),S._update(),S},v.prototype.starting_with=function(x){var S=this._create();return S._starting_pattern=this._input.get_regexp(x,!0),S._update(),S},v.prototype.matching=function(x){var S=this._create();return S._match_pattern=this._input.get_regexp(x,!0),S._update(),S},v.prototype._create=function(){return new v(this._input,this)},v.prototype._update=function(){},N.exports.Pattern=v},function(N){function v(x,S){x=typeof x=="string"?x:x.source,S=typeof S=="string"?S:S.source,this.__directives_block_pattern=new RegExp(x+/ beautify( \w+[:]\w+)+ /.source+S,"g"),this.__directive_pattern=/ (\w+)[:](\w+)/g,this.__directives_end_ignore_pattern=new RegExp(x+/\sbeautify\signore:end\s/.source+S,"g")}v.prototype.get_directives=function(x){if(!x.match(this.__directives_block_pattern))return null;var S={};this.__directive_pattern.lastIndex=0;for(var T=this.__directive_pattern.exec(x);T;)S[T[1]]=T[2],T=this.__directive_pattern.exec(x);return S},v.prototype.readIgnored=function(x){return x.readUntilAfter(this.__directives_end_ignore_pattern)},N.exports.Directives=v},function(N,v,x){var S=x(12).Pattern,T={django:!1,erb:!1,handlebars:!1,php:!1,smarty:!1,angular:!1};function z(ae,B){S.call(this,ae,B),this.__template_pattern=null,this._disabled=Object.assign({},T),this._excluded=Object.assign({},T),B&&(this.__template_pattern=this._input.get_regexp(B.__template_pattern),this._excluded=Object.assign(this._excluded,B._excluded),this._disabled=Object.assign(this._disabled,B._disabled));var U=new S(ae);this.__patterns={handlebars_comment:U.starting_with(/{{!--/).until_after(/--}}/),handlebars_unescaped:U.starting_with(/{{{/).until_after(/}}}/),handlebars:U.starting_with(/{{/).until_after(/}}/),php:U.starting_with(/<\?(?:[= ]|php)/).until_after(/\?>/),erb:U.starting_with(/<%[^%]/).until_after(/[^%]%>/),django:U.starting_with(/{%/).until_after(/%}/),django_value:U.starting_with(/{{/).until_after(/}}/),django_comment:U.starting_with(/{#/).until_after(/#}/),smarty:U.starting_with(/{(?=[^}{\s\n])/).until_after(/[^\s\n]}/),smarty_comment:U.starting_with(/{\*/).until_after(/\*}/),smarty_literal:U.starting_with(/{literal}/).until_after(/{\/literal}/)}}z.prototype=new S,z.prototype._create=function(){return new z(this._input,this)},z.prototype._update=function(){this.__set_templated_pattern()},z.prototype.disable=function(ae){var B=this._create();return B._disabled[ae]=!0,B._update(),B},z.prototype.read_options=function(ae){var B=this._create();for(var U in T)B._disabled[U]=ae.templating.indexOf(U)===-1;return B._update(),B},z.prototype.exclude=function(ae){var B=this._create();return B._excluded[ae]=!0,B._update(),B},z.prototype.read=function(){var ae="";this._match_pattern?ae=this._input.read(this._starting_pattern):ae=this._input.read(this._starting_pattern,this.__template_pattern);for(var B=this._read_template();B;)this._match_pattern?B+=this._input.read(this._match_pattern):B+=this._input.readUntil(this.__template_pattern),ae+=B,B=this._read_template();return this._until_after&&(ae+=this._input.readUntilAfter(this._until_pattern)),ae},z.prototype.__set_templated_pattern=function(){var ae=[];this._disabled.php||ae.push(this.__patterns.php._starting_pattern.source),this._disabled.handlebars||ae.push(this.__patterns.handlebars._starting_pattern.source),this._disabled.angular||ae.push(this.__patterns.handlebars._starting_pattern.source),this._disabled.erb||ae.push(this.__patterns.erb._starting_pattern.source),this._disabled.django||(ae.push(this.__patterns.django._starting_pattern.source),ae.push(this.__patterns.django_value._starting_pattern.source),ae.push(this.__patterns.django_comment._starting_pattern.source)),this._disabled.smarty||ae.push(this.__patterns.smarty._starting_pattern.source),this._until_pattern&&ae.push(this._until_pattern.source),this.__template_pattern=this._input.get_regexp("(?:"+ae.join("|")+")")},z.prototype._read_template=function(){var ae="",B=this._input.peek();if(B==="<"){var U=this._input.peek(1);!this._disabled.php&&!this._excluded.php&&U==="?"&&(ae=ae||this.__patterns.php.read()),!this._disabled.erb&&!this._excluded.erb&&U==="%"&&(ae=ae||this.__patterns.erb.read())}else B==="{"&&(!this._disabled.handlebars&&!this._excluded.handlebars&&(ae=ae||this.__patterns.handlebars_comment.read(),ae=ae||this.__patterns.handlebars_unescaped.read(),ae=ae||this.__patterns.handlebars.read()),this._disabled.django||(!this._excluded.django&&!this._excluded.handlebars&&(ae=ae||this.__patterns.django_value.read()),this._excluded.django||(ae=ae||this.__patterns.django_comment.read(),ae=ae||this.__patterns.django.read())),this._disabled.smarty||this._disabled.django&&this._disabled.handlebars&&(ae=ae||this.__patterns.smarty_comment.read(),ae=ae||this.__patterns.smarty_literal.read(),ae=ae||this.__patterns.smarty.read()));return ae},N.exports.TemplatablePattern=z},,,,function(N,v,x){var S=x(19).Beautifier,T=x(20).Options;function z(ae,B,U,X){var Z=new S(ae,B,U,X);return Z.beautify()}N.exports=z,N.exports.defaultOptions=function(){return new T}},function(N,v,x){var S=x(20).Options,T=x(2).Output,z=x(21).Tokenizer,ae=x(21).TOKEN,B=/\r\n|[\r\n]/,U=/\r\n|[\r\n]/g,X=function(te,j){this.indent_level=0,this.alignment_size=0,this.max_preserve_newlines=te.max_preserve_newlines,this.preserve_newlines=te.preserve_newlines,this._output=new T(te,j)};X.prototype.current_line_has_match=function(te){return this._output.current_line.has_match(te)},X.prototype.set_space_before_token=function(te,j){this._output.space_before_token=te,this._output.non_breaking_space=j},X.prototype.set_wrap_point=function(){this._output.set_indent(this.indent_level,this.alignment_size),this._output.set_wrap_point()},X.prototype.add_raw_token=function(te){this._output.add_raw_token(te)},X.prototype.print_preserved_newlines=function(te){var j=0;te.type!==ae.TEXT&&te.previous.type!==ae.TEXT&&(j=te.newlines?1:0),this.preserve_newlines&&(j=te.newlines<this.max_preserve_newlines+1?te.newlines:this.max_preserve_newlines+1);for(var ue=0;ue<j;ue++)this.print_newline(ue>0);return j!==0},X.prototype.traverse_whitespace=function(te){return te.whitespace_before||te.newlines?(this.print_preserved_newlines(te)||(this._output.space_before_token=!0),!0):!1},X.prototype.previous_token_wrapped=function(){return this._output.previous_token_wrapped},X.prototype.print_newline=function(te){this._output.add_new_line(te)},X.prototype.print_token=function(te){te.text&&(this._output.set_indent(this.indent_level,this.alignment_size),this._output.add_token(te.text))},X.prototype.indent=function(){this.indent_level++},X.prototype.deindent=function(){this.indent_level>0&&(this.indent_level--,this._output.set_indent(this.indent_level,this.alignment_size))},X.prototype.get_full_indent=function(te){return te=this.indent_level+(te||0),te<1?"":this._output.get_indent_string(te)};var Z=function(te){for(var j=null,ue=te.next;ue.type!==ae.EOF&&te.closed!==ue;){if(ue.type===ae.ATTRIBUTE&&ue.text==="type"){ue.next&&ue.next.type===ae.EQUALS&&ue.next.next&&ue.next.next.type===ae.VALUE&&(j=ue.next.next.text);break}ue=ue.next}return j},D=function(te,j){var ue=null,R=null;return j.closed?(te==="script"?ue="text/javascript":te==="style"&&(ue="text/css"),ue=Z(j)||ue,ue.search("text/css")>-1?R="css":ue.search(/module|((text|application|dojo)\/(x-)?(javascript|ecmascript|jscript|livescript|(ld\+)?json|method|aspect))/)>-1?R="javascript":ue.search(/(text|application|dojo)\/(x-)?(html)/)>-1?R="html":ue.search(/test\/null/)>-1&&(R="null"),R):null};function C(te,j){return j.indexOf(te)!==-1}function K(te,j,ue){this.parent=te||null,this.tag=j?j.tag_name:"",this.indent_level=ue||0,this.parser_token=j||null}function $(te){this._printer=te,this._current_frame=null}$.prototype.get_parser_token=function(){return this._current_frame?this._current_frame.parser_token:null},$.prototype.record_tag=function(te){var j=new K(this._current_frame,te,this._printer.indent_level);this._current_frame=j},$.prototype._try_pop_frame=function(te){var j=null;return te&&(j=te.parser_token,this._printer.indent_level=te.indent_level,this._current_frame=te.parent),j},$.prototype._get_frame=function(te,j){for(var ue=this._current_frame;ue&&te.indexOf(ue.tag)===-1;){if(j&&j.indexOf(ue.tag)!==-1){ue=null;break}ue=ue.parent}return ue},$.prototype.try_pop=function(te,j){var ue=this._get_frame([te],j);return this._try_pop_frame(ue)},$.prototype.indent_to_tag=function(te){var j=this._get_frame(te);j&&(this._printer.indent_level=j.indent_level)};function ve(te,j,ue,R){this._source_text=te||"",j=j||{},this._js_beautify=ue,this._css_beautify=R,this._tag_stack=null;var ee=new S(j,"html");this._options=ee,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"}ve.prototype.beautify=function(){if(this._options.disabled)return this._source_text;var te=this._source_text,j=this._options.eol;this._options.eol==="auto"&&(j=`
`,te&&B.test(te)&&(j=te.match(B)[0])),te=te.replace(U,`
`);var ue=te.match(/^[\t ]*/)[0],R={text:"",type:""},ee=new Se(this._options),G=new X(this._options,ue),y=new z(te,this._options).tokenize();this._tag_stack=new $(G);for(var E=null,Y=y.next();Y.type!==ae.EOF;)Y.type===ae.TAG_OPEN||Y.type===ae.COMMENT?(E=this._handle_tag_open(G,Y,ee,R,y),ee=E):Y.type===ae.ATTRIBUTE||Y.type===ae.EQUALS||Y.type===ae.VALUE||Y.type===ae.TEXT&&!ee.tag_complete?E=this._handle_inside_tag(G,Y,ee,R):Y.type===ae.TAG_CLOSE?E=this._handle_tag_close(G,Y,ee):Y.type===ae.TEXT?E=this._handle_text(G,Y,ee):Y.type===ae.CONTROL_FLOW_OPEN?E=this._handle_control_flow_open(G,Y):Y.type===ae.CONTROL_FLOW_CLOSE?E=this._handle_control_flow_close(G,Y):G.add_raw_token(Y),R=E,Y=y.next();var me=G._output.get_code(j);return me},ve.prototype._handle_control_flow_open=function(te,j){var ue={text:j.text,type:j.type};return te.set_space_before_token(j.newlines||j.whitespace_before!=="",!0),j.newlines?te.print_preserved_newlines(j):te.set_space_before_token(j.newlines||j.whitespace_before!=="",!0),te.print_token(j),te.indent(),ue},ve.prototype._handle_control_flow_close=function(te,j){var ue={text:j.text,type:j.type};return te.deindent(),j.newlines?te.print_preserved_newlines(j):te.set_space_before_token(j.newlines||j.whitespace_before!=="",!0),te.print_token(j),ue},ve.prototype._handle_tag_close=function(te,j,ue){var R={text:j.text,type:j.type};return te.alignment_size=0,ue.tag_complete=!0,te.set_space_before_token(j.newlines||j.whitespace_before!=="",!0),ue.is_unformatted?te.add_raw_token(j):(ue.tag_start_char==="<"&&(te.set_space_before_token(j.text[0]==="/",!0),this._is_wrap_attributes_force_expand_multiline&&ue.has_wrapped_attrs&&te.print_newline(!1)),te.print_token(j)),ue.indent_content&&!(ue.is_unformatted||ue.is_content_unformatted)&&(te.indent(),ue.indent_content=!1),!ue.is_inline_element&&!(ue.is_unformatted||ue.is_content_unformatted)&&te.set_wrap_point(),R},ve.prototype._handle_inside_tag=function(te,j,ue,R){var ee=ue.has_wrapped_attrs,G={text:j.text,type:j.type};return te.set_space_before_token(j.newlines||j.whitespace_before!=="",!0),ue.is_unformatted?te.add_raw_token(j):ue.tag_start_char==="{"&&j.type===ae.TEXT?te.print_preserved_newlines(j)?(j.newlines=0,te.add_raw_token(j)):te.print_token(j):(j.type===ae.ATTRIBUTE?te.set_space_before_token(!0):(j.type===ae.EQUALS||j.type===ae.VALUE&&j.previous.type===ae.EQUALS)&&te.set_space_before_token(!1),j.type===ae.ATTRIBUTE&&ue.tag_start_char==="<"&&((this._is_wrap_attributes_preserve||this._is_wrap_attributes_preserve_aligned)&&(te.traverse_whitespace(j),ee=ee||j.newlines!==0),this._is_wrap_attributes_force&&ue.attr_count>=this._options.wrap_attributes_min_attrs&&(R.type!==ae.TAG_OPEN||this._is_wrap_attributes_force_expand_multiline)&&(te.print_newline(!1),ee=!0)),te.print_token(j),ee=ee||te.previous_token_wrapped(),ue.has_wrapped_attrs=ee),G},ve.prototype._handle_text=function(te,j,ue){var R={text:j.text,type:"TK_CONTENT"};return ue.custom_beautifier_name?this._print_custom_beatifier_text(te,j,ue):ue.is_unformatted||ue.is_content_unformatted?te.add_raw_token(j):(te.traverse_whitespace(j),te.print_token(j)),R},ve.prototype._print_custom_beatifier_text=function(te,j,ue){var R=this;if(j.text!==""){var ee=j.text,G,y=1,E="",Y="";ue.custom_beautifier_name==="javascript"&&typeof this._js_beautify=="function"?G=this._js_beautify:ue.custom_beautifier_name==="css"&&typeof this._css_beautify=="function"?G=this._css_beautify:ue.custom_beautifier_name==="html"&&(G=function(gt,_t){var st=new ve(gt,_t,R._js_beautify,R._css_beautify);return st.beautify()}),this._options.indent_scripts==="keep"?y=0:this._options.indent_scripts==="separate"&&(y=-te.indent_level);var me=te.get_full_indent(y);if(ee=ee.replace(/\n[ \t]*$/,""),ue.custom_beautifier_name!=="html"&&ee[0]==="<"&&ee.match(/^(<!--|<!\[CDATA\[)/)){var $e=/^(<!--[^\n]*|<!\[CDATA\[)(\n?)([ \t\n]*)([\s\S]*)(-->|]]>)$/.exec(ee);if(!$e){te.add_raw_token(j);return}E=me+$e[1]+`
`,ee=$e[4],$e[5]&&(Y=me+$e[5]),ee=ee.replace(/\n[ \t]*$/,""),($e[2]||$e[3].indexOf(`
`)!==-1)&&($e=$e[3].match(/[ \t]+$/),$e&&(j.whitespace_before=$e[0]))}if(ee)if(G){var We=function(){this.eol=`
`};We.prototype=this._options.raw_options;var qe=new We;ee=G(me+ee,qe)}else{var Xe=j.whitespace_before;Xe&&(ee=ee.replace(new RegExp(`
(`+Xe+")?","g"),`
`)),ee=me+ee.replace(/\n/g,`
`+me)}E&&(ee?ee=E+ee+`
`+Y:ee=E+Y),te.print_newline(!1),ee&&(j.text=ee,j.whitespace_before="",j.newlines=0,te.add_raw_token(j),te.print_newline(!0))}},ve.prototype._handle_tag_open=function(te,j,ue,R,ee){var G=this._get_tag_open_token(j);if((ue.is_unformatted||ue.is_content_unformatted)&&!ue.is_empty_element&&j.type===ae.TAG_OPEN&&!G.is_start_tag?(te.add_raw_token(j),G.start_tag_token=this._tag_stack.try_pop(G.tag_name)):(te.traverse_whitespace(j),this._set_tag_position(te,j,G,ue,R),G.is_inline_element||te.set_wrap_point(),te.print_token(j)),G.is_start_tag&&this._is_wrap_attributes_force){var y=0,E;do E=ee.peek(y),E.type===ae.ATTRIBUTE&&(G.attr_count+=1),y+=1;while(E.type!==ae.EOF&&E.type!==ae.TAG_CLOSE)}return(this._is_wrap_attributes_force_aligned||this._is_wrap_attributes_aligned_multiple||this._is_wrap_attributes_preserve_aligned)&&(G.alignment_size=j.text.length+1),!G.tag_complete&&!G.is_unformatted&&(te.alignment_size=G.alignment_size),G};var Se=function(te,j,ue){if(this.parent=j||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="",!ue)this.tag_complete=!0;else{var R;this.tag_start_char=ue.text[0],this.text=ue.text,this.tag_start_char==="<"?(R=ue.text.match(/^<([^\s>]*)/),this.tag_check=R?R[1]:""):(R=ue.text.match(/^{{~?(?:[\^]|#\*?)?([^\s}]+)/),this.tag_check=R?R[1]:"",(ue.text.startsWith("{{#>")||ue.text.startsWith("{{~#>"))&&this.tag_check[0]===">"&&(this.tag_check===">"&&ue.next!==null?this.tag_check=ue.next.text.split(" ")[0]:this.tag_check=ue.text.split(">")[1])),this.tag_check=this.tag_check.toLowerCase(),ue.type===ae.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||ue.closed&&ue.closed.text==="/>";var ee=2;this.tag_start_char==="{"&&this.text.length>=3&&this.text.charAt(2)==="~"&&(ee=3),this.is_end_tag=this.is_end_tag||this.tag_start_char==="{"&&(!te.indent_handlebars||this.text.length<3||/[^#\^]/.test(this.text.charAt(ee)))}};ve.prototype._get_tag_open_token=function(te){var j=new Se(this._options,this._tag_stack.get_parser_token(),te);return j.alignment_size=this._options.wrap_attributes_indent_size,j.is_end_tag=j.is_end_tag||C(j.tag_check,this._options.void_elements),j.is_empty_element=j.tag_complete||j.is_start_tag&&j.is_end_tag,j.is_unformatted=!j.tag_complete&&C(j.tag_check,this._options.unformatted),j.is_content_unformatted=!j.is_empty_element&&C(j.tag_check,this._options.content_unformatted),j.is_inline_element=C(j.tag_name,this._options.inline)||this._options.inline_custom_elements&&j.tag_name.includes("-")||j.tag_start_char==="{",j},ve.prototype._set_tag_position=function(te,j,ue,R,ee){if(ue.is_empty_element||(ue.is_end_tag?ue.start_tag_token=this._tag_stack.try_pop(ue.tag_name):(this._do_optional_end_element(ue)&&(ue.is_inline_element||te.print_newline(!1)),this._tag_stack.record_tag(ue),(ue.tag_name==="script"||ue.tag_name==="style")&&!(ue.is_unformatted||ue.is_content_unformatted)&&(ue.custom_beautifier_name=D(ue.tag_check,j)))),C(ue.tag_check,this._options.extra_liners)&&(te.print_newline(!1),te._output.just_added_blankline()||te.print_newline(!0)),ue.is_empty_element){if(ue.tag_start_char==="{"&&ue.tag_check==="else"){this._tag_stack.indent_to_tag(["if","unless","each"]),ue.indent_content=!0;var G=te.current_line_has_match(/{{#if/);G||te.print_newline(!1)}ue.tag_name==="!--"&&ee.type===ae.TAG_CLOSE&&R.is_end_tag&&ue.text.indexOf(`
`)===-1||(ue.is_inline_element||ue.is_unformatted||te.print_newline(!1),this._calcluate_parent_multiline(te,ue))}else if(ue.is_end_tag){var y=!1;y=ue.start_tag_token&&ue.start_tag_token.multiline_content,y=y||!ue.is_inline_element&&!(R.is_inline_element||R.is_unformatted)&&!(ee.type===ae.TAG_CLOSE&&ue.start_tag_token===R)&&ee.type!=="TK_CONTENT",(ue.is_content_unformatted||ue.is_unformatted)&&(y=!1),y&&te.print_newline(!1)}else ue.indent_content=!ue.custom_beautifier_name,ue.tag_start_char==="<"&&(ue.tag_name==="html"?ue.indent_content=this._options.indent_inner_html:ue.tag_name==="head"?ue.indent_content=this._options.indent_head_inner_html:ue.tag_name==="body"&&(ue.indent_content=this._options.indent_body_inner_html)),!(ue.is_inline_element||ue.is_unformatted)&&(ee.type!=="TK_CONTENT"||ue.is_content_unformatted)&&te.print_newline(!1),this._calcluate_parent_multiline(te,ue)},ve.prototype._calcluate_parent_multiline=function(te,j){j.parent&&te._output.just_added_newline()&&!((j.is_inline_element||j.is_unformatted)&&j.parent.is_inline_element)&&(j.parent.multiline_content=!0)};var Le=["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"],ye=["a","audio","del","ins","map","noscript","video"];ve.prototype._do_optional_end_element=function(te){var j=null;if(!(te.is_empty_element||!te.is_start_tag||!te.parent)){if(te.tag_name==="body")j=j||this._tag_stack.try_pop("head");else if(te.tag_name==="li")j=j||this._tag_stack.try_pop("li",["ol","ul","menu"]);else if(te.tag_name==="dd"||te.tag_name==="dt")j=j||this._tag_stack.try_pop("dt",["dl"]),j=j||this._tag_stack.try_pop("dd",["dl"]);else if(te.parent.tag_name==="p"&&Le.indexOf(te.tag_name)!==-1){var ue=te.parent.parent;(!ue||ye.indexOf(ue.tag_name)===-1)&&(j=j||this._tag_stack.try_pop("p"))}else te.tag_name==="rp"||te.tag_name==="rt"?(j=j||this._tag_stack.try_pop("rt",["ruby","rtc"]),j=j||this._tag_stack.try_pop("rp",["ruby","rtc"])):te.tag_name==="optgroup"?j=j||this._tag_stack.try_pop("optgroup",["select"]):te.tag_name==="option"?j=j||this._tag_stack.try_pop("option",["select","datalist","optgroup"]):te.tag_name==="colgroup"?j=j||this._tag_stack.try_pop("caption",["table"]):te.tag_name==="thead"?(j=j||this._tag_stack.try_pop("caption",["table"]),j=j||this._tag_stack.try_pop("colgroup",["table"])):te.tag_name==="tbody"||te.tag_name==="tfoot"?(j=j||this._tag_stack.try_pop("caption",["table"]),j=j||this._tag_stack.try_pop("colgroup",["table"]),j=j||this._tag_stack.try_pop("thead",["table"]),j=j||this._tag_stack.try_pop("tbody",["table"])):te.tag_name==="tr"?(j=j||this._tag_stack.try_pop("caption",["table"]),j=j||this._tag_stack.try_pop("colgroup",["table"]),j=j||this._tag_stack.try_pop("tr",["table","thead","tbody","tfoot"])):(te.tag_name==="th"||te.tag_name==="td")&&(j=j||this._tag_stack.try_pop("td",["table","thead","tbody","tfoot","tr"]),j=j||this._tag_stack.try_pop("th",["table","thead","tbody","tfoot","tr"]));return te.parent=this._tag_stack.get_parser_token(),j}},N.exports.Beautifier=ve},function(N,v,x){var S=x(6).Options;function T(z){S.call(this,z,"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"])}T.prototype=new S,N.exports.Options=T},function(N,v,x){var S=x(9).Tokenizer,T=x(9).TOKEN,z=x(13).Directives,ae=x(14).TemplatablePattern,B=x(12).Pattern,U={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:T.START,RAW:T.RAW,EOF:T.EOF},X=new z(/<\!--/,/-->/),Z=function(D,C){S.call(this,D,C),this._current_tag_name="";var K=new ae(this._input).read_options(this._options),$=new B(this._input);if(this.__patterns={word:K.until(/[\n\r\t <]/),word_control_flow_close_excluded:K.until(/[\n\r\t <}]/),single_quote:K.until_after(/'/),double_quote:K.until_after(/"/),attribute:K.until(/[\n\r\t =>]|\/>/),element_name:K.until(/[\n\r\t >\/]/),angular_control_flow_start:$.matching(/\@[a-zA-Z]+[^({]*[({]/),handlebars_comment:$.starting_with(/{{!--/).until_after(/--}}/),handlebars:$.starting_with(/{{/).until_after(/}}/),handlebars_open:$.until(/[\n\r\t }]/),handlebars_raw_close:$.until(/}}/),comment:$.starting_with(/<!--/).until_after(/-->/),cdata:$.starting_with(/<!\[CDATA\[/).until_after(/]]>/),conditional_comment:$.starting_with(/<!\[/).until_after(/]>/),processing:$.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 ve=this._input.get_literal_regexp(this._options.unformatted_content_delimiter);this.__patterns.unformatted_content_delimiter=$.matching(ve).until_after(ve)}};Z.prototype=new S,Z.prototype._is_comment=function(D){return!1},Z.prototype._is_opening=function(D){return D.type===U.TAG_OPEN||D.type===U.CONTROL_FLOW_OPEN},Z.prototype._is_closing=function(D,C){return D.type===U.TAG_CLOSE&&C&&((D.text===">"||D.text==="/>")&&C.text[0]==="<"||D.text==="}}"&&C.text[0]==="{"&&C.text[1]==="{")||D.type===U.CONTROL_FLOW_CLOSE&&D.text==="}"&&C.text.endsWith("{")},Z.prototype._reset=function(){this._current_tag_name=""},Z.prototype._get_next_token=function(D,C){var K=null;this._readWhitespace();var $=this._input.peek();return $===null?this._create_token(U.EOF,""):(K=K||this._read_open_handlebars($,C),K=K||this._read_attribute($,D,C),K=K||this._read_close($,C),K=K||this._read_script_and_style($,D),K=K||this._read_control_flows($,C),K=K||this._read_raw_content($,D,C),K=K||this._read_content_word($,C),K=K||this._read_comment_or_cdata($),K=K||this._read_processing($),K=K||this._read_open($,C),K=K||this._create_token(U.UNKNOWN,this._input.next()),K)},Z.prototype._read_comment_or_cdata=function(D){var C=null,K=null,$=null;if(D==="<"){var ve=this._input.peek(1);ve==="!"&&(K=this.__patterns.comment.read(),K?($=X.get_directives(K),$&&$.ignore==="start"&&(K+=X.readIgnored(this._input))):K=this.__patterns.cdata.read()),K&&(C=this._create_token(U.COMMENT,K),C.directives=$)}return C},Z.prototype._read_processing=function(D){var C=null,K=null,$=null;if(D==="<"){var ve=this._input.peek(1);(ve==="!"||ve==="?")&&(K=this.__patterns.conditional_comment.read(),K=K||this.__patterns.processing.read()),K&&(C=this._create_token(U.COMMENT,K),C.directives=$)}return C},Z.prototype._read_open=function(D,C){var K=null,$=null;return(!C||C.type===U.CONTROL_FLOW_OPEN)&&D==="<"&&(K=this._input.next(),this._input.peek()==="/"&&(K+=this._input.next()),K+=this.__patterns.element_name.read(),$=this._create_token(U.TAG_OPEN,K)),$},Z.prototype._read_open_handlebars=function(D,C){var K=null,$=null;return(!C||C.type===U.CONTROL_FLOW_OPEN)&&(this._options.templating.includes("angular")||this._options.indent_handlebars)&&D==="{"&&this._input.peek(1)==="{"&&(this._options.indent_handlebars&&this._input.peek(2)==="!"?(K=this.__patterns.handlebars_comment.read(),K=K||this.__patterns.handlebars.read(),$=this._create_token(U.COMMENT,K)):(K=this.__patterns.handlebars_open.read(),$=this._create_token(U.TAG_OPEN,K))),$},Z.prototype._read_control_flows=function(D,C){var K="",$=null;if(!this._options.templating.includes("angular"))return $;if(D==="@"){if(K=this.__patterns.angular_control_flow_start.read(),K==="")return $;for(var ve=K.endsWith("(")?1:0,Se=0;!(K.endsWith("{")&&ve===Se);){var Le=this._input.next();if(Le===null)break;Le==="("?ve++:Le===")"&&Se++,K+=Le}$=this._create_token(U.CONTROL_FLOW_OPEN,K)}else D==="}"&&C&&C.type===U.CONTROL_FLOW_OPEN&&(K=this._input.next(),$=this._create_token(U.CONTROL_FLOW_CLOSE,K));return $},Z.prototype._read_close=function(D,C){var K=null,$=null;return C&&C.type===U.TAG_OPEN&&(C.text[0]==="<"&&(D===">"||D==="/"&&this._input.peek(1)===">")?(K=this._input.next(),D==="/"&&(K+=this._input.next()),$=this._create_token(U.TAG_CLOSE,K)):C.text[0]==="{"&&D==="}"&&this._input.peek(1)==="}"&&(this._input.next(),this._input.next(),$=this._create_token(U.TAG_CLOSE,"}}"))),$},Z.prototype._read_attribute=function(D,C,K){var $=null,ve="";if(K&&K.text[0]==="<")if(D==="=")$=this._create_token(U.EQUALS,this._input.next());else if(D==='"'||D==="'"){var Se=this._input.next();D==='"'?Se+=this.__patterns.double_quote.read():Se+=this.__patterns.single_quote.read(),$=this._create_token(U.VALUE,Se)}else ve=this.__patterns.attribute.read(),ve&&(C.type===U.EQUALS?$=this._create_token(U.VALUE,ve):$=this._create_token(U.ATTRIBUTE,ve));return $},Z.prototype._is_content_unformatted=function(D){return this._options.void_elements.indexOf(D)===-1&&(this._options.content_unformatted.indexOf(D)!==-1||this._options.unformatted.indexOf(D)!==-1)},Z.prototype._read_raw_content=function(D,C,K){var $="";if(K&&K.text[0]==="{")$=this.__patterns.handlebars_raw_close.read();else if(C.type===U.TAG_CLOSE&&C.opened.text[0]==="<"&&C.text[0]!=="/"){var ve=C.opened.text.substr(1).toLowerCase();this._is_content_unformatted(ve)&&($=this._input.readUntil(new RegExp("</"+ve+"[\\n\\r\\t ]*?>","ig")))}return $?this._create_token(U.TEXT,$):null},Z.prototype._read_script_and_style=function(D,C){if(C.type===U.TAG_CLOSE&&C.opened.text[0]==="<"&&C.text[0]!=="/"){var K=C.opened.text.substr(1).toLowerCase();if(K==="script"||K==="style"){var $=this._read_comment_or_cdata(D);if($)return $.type=U.TEXT,$;var ve=this._input.readUntil(new RegExp("</"+K+"[\\n\\r\\t ]*?>","ig"));if(ve)return this._create_token(U.TEXT,ve)}}return null},Z.prototype._read_content_word=function(D,C){var K="";return this._options.unformatted_content_delimiter&&D===this._options.unformatted_content_delimiter[0]&&(K=this.__patterns.unformatted_content_delimiter.read()),K||(K=C&&C.type===U.CONTROL_FLOW_OPEN?this.__patterns.word_control_flow_close_excluded.read():this.__patterns.word.read()),K?this._create_token(U.TEXT,K):null},N.exports.Tokenizer=Z,N.exports.TOKEN=U}],fe={};function o(N){var v=fe[N];if(v!==void 0)return v.exports;var x=fe[N]={exports:{}};return be[N](x,x.exports,o),x.exports}var k=o(18);ge=k})();var _e=ge;if(1)L=[m,m(58553),m(87804)],Q=function(be){var fe=m(58553),o=m(87804);return{html_beautify:function(k,N){return _e(k,N,fe.js_beautify,o.css_beautify)}}}.apply(et,L),Q!==void 0&&(ln.exports=Q);else var A,p})()},58553:function(ln,et){var m,L;(function(){var Q;(function(){"use strict";var _e=[function(fe,o,k){var N=k(1).Beautifier,v=k(5).Options;function x(S,T){var z=new N(S,T);return z.beautify()}fe.exports=x,fe.exports.defaultOptions=function(){return new v}},function(fe,o,k){var N=k(2).Output,v=k(3).Token,x=k(4),S=k(5).Options,T=k(7).Tokenizer,z=k(7).line_starters,ae=k(7).positionable_operators,B=k(7).TOKEN;function U(E,Y){return Y.indexOf(E)!==-1}function X(E){return E.replace(/^\s+/g,"")}function Z(E){for(var Y={},me=0;me<E.length;me++)Y[E[me].replace(/-/g,"_")]=E[me];return Y}function D(E,Y){return E&&E.type===B.RESERVED&&E.text===Y}function C(E,Y){return E&&E.type===B.RESERVED&&U(E.text,Y)}var K=["case","return","do","if","throw","else","await","break","continue","async"],$=["before-newline","after-newline","preserve-newline"],ve=Z($),Se=[ve.before_newline,ve.preserve_newline],Le={BlockStatement:"BlockStatement",Statement:"Statement",ObjectLiteral:"ObjectLiteral",ArrayLiteral:"ArrayLiteral",ForInitializer:"ForInitializer",Conditional:"Conditional",Expression:"Expression"};function ye(E,Y){Y.multiline_frame||Y.mode===Le.ForInitializer||Y.mode===Le.Conditional||E.remove_indent(Y.start_line_index)}function te(E){E=E.replace(x.allLineBreaks,`
`);for(var Y=[],me=E.indexOf(`
`);me!==-1;)Y.push(E.substring(0,me)),E=E.substring(me+1),me=E.indexOf(`
`);return E.length&&Y.push(E),Y}function j(E){return E===Le.ArrayLiteral}function ue(E){return U(E,[Le.Expression,Le.ForInitializer,Le.Conditional])}function R(E,Y){for(var me=0;me<E.length;me++){var $e=E[me].trim();if($e.charAt(0)!==Y)return!1}return!0}function ee(E,Y){for(var me=0,$e=E.length,We;me<$e;me++)if(We=E[me],We&&We.indexOf(Y)!==0)return!1;return!0}function G(E,Y){Y=Y||{},this._source_text=E||"",this._output=null,this._tokens=null,this._last_last_text=null,this._flags=null,this._previous_flags=null,this._flag_store=null,this._options=new S(Y)}G.prototype.create_flags=function(E,Y){var me=0;E&&(me=E.indentation_level,!this._output.just_added_newline()&&E.line_indent_level>me&&(me=E.line_indent_level));var $e={mode:Y,parent:E,last_token:E?E.last_token:new v(B.START_BLOCK,""),last_word:E?E.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:me,alignment:0,line_indent_level:E?E.line_indent_level:me,start_line_index:this._output.get_line_number(),ternary_depth:0};return $e},G.prototype._reset=function(E){var Y=E.match(/^[\t ]*/)[0];this._last_last_text="",this._output=new N(this._options,Y),this._output.raw=this._options.test_output_raw,this._flag_store=[],this.set_mode(Le.BlockStatement);var me=new T(E,this._options);return this._tokens=me.tokenize(),E},G.prototype.beautify=function(){if(this._options.disabled)return this._source_text;var E,Y=this._reset(this._source_text),me=this._options.eol;this._options.eol==="auto"&&(me=`
`,Y&&x.lineBreak.test(Y||"")&&(me=Y.match(x.lineBreak)[0]));for(var $e=this._tokens.next();$e;)this.handle_token($e),this._last_last_text=this._flags.last_token.text,this._flags.last_token=$e,$e=this._tokens.next();return E=this._output.get_code(me),E},G.prototype.handle_token=function(E,Y){E.type===B.START_EXPR?this.handle_start_expr(E):E.type===B.END_EXPR?this.handle_end_expr(E):E.type===B.START_BLOCK?this.handle_start_block(E):E.type===B.END_BLOCK?this.handle_end_block(E):E.type===B.WORD?this.handle_word(E):E.type===B.RESERVED?this.handle_word(E):E.type===B.SEMICOLON?this.handle_semicolon(E):E.type===B.STRING?this.handle_string(E):E.type===B.EQUALS?this.handle_equals(E):E.type===B.OPERATOR?this.handle_operator(E):E.type===B.COMMA?this.handle_comma(E):E.type===B.BLOCK_COMMENT?this.handle_block_comment(E,Y):E.type===B.COMMENT?this.handle_comment(E,Y):E.type===B.DOT?this.handle_dot(E):E.type===B.EOF?this.handle_eof(E):E.type===B.UNKNOWN?this.handle_unknown(E,Y):this.handle_unknown(E,Y)},G.prototype.handle_whitespace_and_comments=function(E,Y){var me=E.newlines,$e=this._options.keep_array_indentation&&j(this._flags.mode);if(E.comments_before)for(var We=E.comments_before.next();We;)this.handle_whitespace_and_comments(We,Y),this.handle_token(We,Y),We=E.comments_before.next();if($e)for(var qe=0;qe<me;qe+=1)this.print_newline(qe>0,Y);else if(this._options.max_preserve_newlines&&me>this._options.max_preserve_newlines&&(me=this._options.max_preserve_newlines),this._options.preserve_newlines&&me>1){this.print_newline(!1,Y);for(var Xe=1;Xe<me;Xe+=1)this.print_newline(!0,Y)}};var y=["async","break","continue","return","throw","yield"];G.prototype.allow_wrap_or_preserved_newline=function(E,Y){if(Y=Y===void 0?!1:Y,!this._output.just_added_newline()){var me=this._options.preserve_newlines&&E.newlines||Y,$e=U(this._flags.last_token.text,ae)||U(E.text,ae);if($e){var We=U(this._flags.last_token.text,ae)&&U(this._options.operator_position,Se)||U(E.text,ae);me=me&&We}if(me)this.print_newline(!1,!0);else if(this._options.wrap_line_length){if(C(this._flags.last_token,y))return;this._output.set_wrap_point()}}},G.prototype.print_newline=function(E,Y){if(!Y&&this._flags.last_token.text!==";"&&this._flags.last_token.text!==","&&this._flags.last_token.text!=="="&&(this._flags.last_token.type!==B.OPERATOR||this._flags.last_token.text==="--"||this._flags.last_token.text==="++"))for(var me=this._tokens.peek();this._flags.mode===Le.Statement&&!(this._flags.if_block&&D(me,"else"))&&!this._flags.do_block;)this.restore_mode();this._output.add_new_line(E)&&(this._flags.multiline_frame=!0)},G.prototype.print_token_line_indentation=function(E){this._output.just_added_newline()&&(this._options.keep_array_indentation&&E.newlines&&(E.text==="["||j(this._flags.mode))?(this._output.current_line.set_indent(-1),this._output.current_line.push(E.whitespace_before),this._output.space_before_token=!1):this._output.set_indent(this._flags.indentation_level,this._flags.alignment)&&(this._flags.line_indent_level=this._flags.indentation_level))},G.prototype.print_token=function(E){if(this._output.raw){this._output.add_raw_token(E);return}if(this._options.comma_first&&E.previous&&E.previous.type===B.COMMA&&this._output.just_added_newline()&&this._output.previous_line.last()===","){var Y=this._output.previous_line.pop();this._output.previous_line.is_empty()&&(this._output.previous_line.push(Y),this._output.trim(!0),this._output.current_line.pop(),this._output.trim()),this.print_token_line_indentation(E),this._output.add_token(","),this._output.space_before_token=!0}this.print_token_line_indentation(E),this._output.non_breaking_space=!0,this._output.add_token(E.text),this._output.previous_token_wrapped&&(this._flags.multiline_frame=!0)},G.prototype.indent=function(){this._flags.indentation_level+=1,this._output.set_indent(this._flags.indentation_level,this._flags.alignment)},G.prototype.deindent=function(){this._flags.indentation_level>0&&(!this._flags.parent||this._flags.indentation_level>this._flags.parent.indentation_level)&&(this._flags.indentation_level-=1,this._output.set_indent(this._flags.indentation_level,this._flags.alignment))},G.prototype.set_mode=function(E){this._flags?(this._flag_store.push(this._flags),this._previous_flags=this._flags):this._previous_flags=this.create_flags(null,E),this._flags=this.create_flags(this._previous_flags,E),this._output.set_indent(this._flags.indentation_level,this._flags.alignment)},G.prototype.restore_mode=function(){this._flag_store.length>0&&(this._previous_flags=this._flags,this._flags=this._flag_store.pop(),this._previous_flags.mode===Le.Statement&&ye(this._output,this._previous_flags),this._output.set_indent(this._flags.indentation_level,this._flags.alignment))},G.prototype.start_of_object_property=function(){return this._flags.parent.mode===Le.ObjectLiteral&&this._flags.mode===Le.Statement&&(this._flags.last_token.text===":"&&this._flags.ternary_depth===0||C(this._flags.last_token,["get","set"]))},G.prototype.start_of_statement=function(E){var Y=!1;return Y=Y||C(this._flags.last_token,["var","let","const"])&&E.type===B.WORD,Y=Y||D(this._flags.last_token,"do"),Y=Y||!(this._flags.parent.mode===Le.ObjectLiteral&&this._flags.mode===Le.Statement)&&C(this._flags.last_token,y)&&!E.newlines,Y=Y||D(this._flags.last_token,"else")&&!(D(E,"if")&&!E.comments_before),Y=Y||this._flags.last_token.type===B.END_EXPR&&(this._previous_flags.mode===Le.ForInitializer||this._previous_flags.mode===Le.Conditional),Y=Y||this._flags.last_token.type===B.WORD&&this._flags.mode===Le.BlockStatement&&!this._flags.in_case&&!(E.text==="--"||E.text==="++")&&this._last_last_text!=="function"&&E.type!==B.WORD&&E.type!==B.RESERVED,Y=Y||this._flags.mode===Le.ObjectLiteral&&(this._flags.last_token.text===":"&&this._flags.ternary_depth===0||C(this._flags.last_token,["get","set"])),Y?(this.set_mode(Le.Statement),this.indent(),this.handle_whitespace_and_comments(E,!0),this.start_of_object_property()||this.allow_wrap_or_preserved_newline(E,C(E,["do","for","if","while"])),!0):!1},G.prototype.handle_start_expr=function(E){this.start_of_statement(E)||this.handle_whitespace_and_comments(E);var Y=Le.Expression;if(E.text==="["){if(this._flags.last_token.type===B.WORD||this._flags.last_token.text===")"){C(this._flags.last_token,z)&&(this._output.space_before_token=!0),this.print_token(E),this.set_mode(Y),this.indent(),this._options.space_in_paren&&(this._output.space_before_token=!0);return}Y=Le.ArrayLiteral,j(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()),U(this._flags.last_token.type,[B.START_EXPR,B.END_EXPR,B.WORD,B.OPERATOR,B.DOT])||(this._output.space_before_token=!0)}else{if(this._flags.last_token.type===B.RESERVED)this._flags.last_token.text==="for"?(this._output.space_before_token=this._options.space_before_conditional,Y=Le.ForInitializer):U(this._flags.last_token.text,["if","while","switch"])?(this._output.space_before_token=this._options.space_before_conditional,Y=Le.Conditional):U(this._flags.last_word,["await","async"])?this._output.space_before_token=!0:this._flags.last_token.text==="import"&&E.whitespace_before===""?this._output.space_before_token=!1:(U(this._flags.last_token.text,z)||this._flags.last_token.text==="catch")&&(this._output.space_before_token=!0);else if(this._flags.last_token.type===B.EQUALS||this._flags.last_token.type===B.OPERATOR)this.start_of_object_property()||this.allow_wrap_or_preserved_newline(E);else if(this._flags.last_token.type===B.WORD){this._output.space_before_token=!1;var me=this._tokens.peek(-3);if(this._options.space_after_named_function&&me){var $e=this._tokens.peek(-4);C(me,["async","function"])||me.text==="*"&&C($e,["async","function"])?this._output.space_before_token=!0:this._flags.mode===Le.ObjectLiteral?(me.text==="{"||me.text===","||me.text==="*"&&($e.text==="{"||$e.text===","))&&(this._output.space_before_token=!0):this._flags.parent&&this._flags.parent.class_start_block&&(this._output.space_before_token=!0)}}else this.allow_wrap_or_preserved_newline(E);(this._flags.last_token.type===B.RESERVED&&(this._flags.last_word==="function"||this._flags.last_word==="typeof")||this._flags.last_token.text==="*"&&(U(this._last_last_text,["function","yield"])||this._flags.mode===Le.ObjectLiteral&&U(this._last_last_text,["{",","])))&&(this._output.space_before_token=this._options.space_after_anon_function)}this._flags.last_token.text===";"||this._flags.last_token.type===B.START_BLOCK?this.print_newline():(this._flags.last_token.type===B.END_EXPR||this._flags.last_token.type===B.START_EXPR||this._flags.last_token.type===B.END_BLOCK||this._flags.last_token.text==="."||this._flags.last_token.type===B.COMMA)&&this.allow_wrap_or_preserved_newline(E,E.newlines),this.print_token(E),this.set_mode(Y),this._options.space_in_paren&&(this._output.space_before_token=!0),this.indent()},G.prototype.handle_end_expr=function(E){for(;this._flags.mode===Le.Statement;)this.restore_mode();this.handle_whitespace_and_comments(E),this._flags.multiline_frame&&this.allow_wrap_or_preserved_newline(E,E.text==="]"&&j(this._flags.mode)&&!this._options.keep_array_indentation),this._options.space_in_paren&&(this._flags.last_token.type===B.START_EXPR&&!this._options.space_in_empty_paren?(this._output.trim(),this._output.space_before_token=!1):this._output.space_before_token=!0),this.deindent(),this.print_token(E),this.restore_mode(),ye(this._output,this._previous_flags),this._flags.do_while&&this._previous_flags.mode===Le.Conditional&&(this._previous_flags.mode=Le.Expression,this._flags.do_block=!1,this._flags.do_while=!1)},G.prototype.handle_start_block=function(E){this.handle_whitespace_and_comments(E);var Y=this._tokens.peek(),me=this._tokens.peek(1);this._flags.last_word==="switch"&&this._flags.last_token.type===B.END_EXPR?(this.set_mode(Le.BlockStatement),this._flags.in_case_statement=!0):this._flags.case_body?this.set_mode(Le.BlockStatement):me&&(U(me.text,[":",","])&&U(Y.type,[B.STRING,B.WORD,B.RESERVED])||U(Y.text,["get","set","..."])&&U(me.type,[B.WORD,B.RESERVED]))?U(this._last_last_text,["class","interface"])&&!U(me.text,[":",","])?this.set_mode(Le.BlockStatement):this.set_mode(Le.ObjectLiteral):this._flags.last_token.type===B.OPERATOR&&this._flags.last_token.text==="=>"?this.set_mode(Le.BlockStatement):U(this._flags.last_token.type,[B.EQUALS,B.START_EXPR,B.COMMA,B.OPERATOR])||C(this._flags.last_token,["return","throw","import","default"])?this.set_mode(Le.ObjectLiteral):this.set_mode(Le.BlockStatement),this._flags.last_token&&C(this._flags.last_token.previous,["class","extends"])&&(this._flags.class_start_block=!0);var $e=!Y.comments_before&&Y.text==="}",We=$e&&this._flags.last_word==="function"&&this._flags.last_token.type===B.END_EXPR;if(this._options.brace_preserve_inline){var qe=0,Xe=null;this._flags.inline_frame=!0;do if(qe+=1,Xe=this._tokens.peek(qe-1),Xe.newlines){this._flags.inline_frame=!1;break}while(Xe.type!==B.EOF&&!(Xe.type===B.END_BLOCK&&Xe.opened===E))}(this._options.brace_style==="expand"||this._options.brace_style==="none"&&E.newlines)&&!this._flags.inline_frame?this._flags.last_token.type!==B.OPERATOR&&(We||this._flags.last_token.type===B.EQUALS||C(this._flags.last_token,K)&&this._flags.last_token.text!=="else")?this._output.space_before_token=!0:this.print_newline(!1,!0):(j(this._previous_flags.mode)&&(this._flags.last_token.type===B.START_EXPR||this._flags.last_token.type===B.COMMA)&&((this._flags.last_token.type===B.COMMA||this._options.space_in_paren)&&(this._output.space_before_token=!0),(this._flags.last_token.type===B.COMMA||this._flags.last_token.type===B.START_EXPR&&this._flags.inline_frame)&&(this.allow_wrap_or_preserved_newline(E),this._previous_flags.multiline_frame=this._previous_flags.multiline_frame||this._flags.multiline_frame,this._flags.multiline_frame=!1)),this._flags.last_token.type!==B.OPERATOR&&this._flags.last_token.type!==B.START_EXPR&&(U(this._flags.last_token.type,[B.START_BLOCK,B.SEMICOLON])&&!this._flags.inline_frame?this.print_newline():this._output.space_before_token=!0)),this.print_token(E),this.indent(),!$e&&!(this._options.brace_preserve_inline&&this._flags.inline_frame)&&this.print_newline()},G.prototype.handle_end_block=function(E){for(this.handle_whitespace_and_comments(E);this._flags.mode===Le.Statement;)this.restore_mode();var Y=this._flags.last_token.type===B.START_BLOCK;this._flags.inline_frame&&!Y?this._output.space_before_token=!0:this._options.brace_style==="expand"?Y||this.print_newline():Y||(j(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(E)},G.prototype.handle_word=function(E){if(E.type===B.RESERVED){if(U(E.text,["set","get"])&&this._flags.mode!==Le.ObjectLiteral)E.type=B.WORD;else if(E.text==="import"&&U(this._tokens.peek().text,["(","."]))E.type=B.WORD;else if(U(E.text,["as","from"])&&!this._flags.import_block)E.type=B.WORD;else if(this._flags.mode===Le.ObjectLiteral){var Y=this._tokens.peek();Y.text===":"&&(E.type=B.WORD)}}if(this.start_of_statement(E)?C(this._flags.last_token,["var","let","const"])&&E.type===B.WORD&&(this._flags.declaration_statement=!0):E.newlines&&!ue(this._flags.mode)&&(this._flags.last_token.type!==B.OPERATOR||this._flags.last_token.text==="--"||this._flags.last_token.text==="++")&&this._flags.last_token.type!==B.EQUALS&&(this._options.preserve_newlines||!C(this._flags.last_token,["var","let","const","set","get"]))?(this.handle_whitespace_and_comments(E),this.print_newline()):this.handle_whitespace_and_comments(E),this._flags.do_block&&!this._flags.do_while)if(D(E,"while")){this._output.space_before_token=!0,this.print_token(E),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&&D(E,"else"))this._flags.else_block=!0;else{for(;this._flags.mode===Le.Statement;)this.restore_mode();this._flags.if_block=!1,this._flags.else_block=!1}if(this._flags.in_case_statement&&C(E,["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(E),this._flags.in_case=!0;return}if((this._flags.last_token.type===B.COMMA||this._flags.last_token.type===B.START_EXPR||this._flags.last_token.type===B.EQUALS||this._flags.last_token.type===B.OPERATOR)&&!this.start_of_object_property()&&!(U(this._flags.last_token.text,["+","-"])&&this._last_last_text===":"&&this._flags.parent.mode===Le.ObjectLiteral)&&this.allow_wrap_or_preserved_newline(E),D(E,"function")){(U(this._flags.last_token.text,["}",";"])||this._output.just_added_newline()&&!(U(this._flags.last_token.text,["(","[","{",":","=",","])||this._flags.last_token.type===B.OPERATOR))&&!this._output.just_added_blankline()&&!E.comments_before&&(this.print_newline(),this.print_newline(!0)),this._flags.last_token.type===B.RESERVED||this._flags.last_token.type===B.WORD?C(this._flags.last_token,["get","set","new","export"])||C(this._flags.last_token,y)?this._output.space_before_token=!0:D(this._flags.last_token,"default")&&this._last_last_text==="export"?this._output.space_before_token=!0:this._flags.last_token.text==="declare"?this._output.space_before_token=!0:this.print_newline():this._flags.last_token.type===B.OPERATOR||this._flags.last_token.text==="="?this._output.space_before_token=!0:!this._flags.multiline_frame&&(ue(this._flags.mode)||j(this._flags.mode))||this.print_newline(),this.print_token(E),this._flags.last_word=E.text;return}var me="NONE";if(this._flags.last_token.type===B.END_BLOCK?this._previous_flags.inline_frame?me="SPACE":C(E,["else","catch","finally","from"])?this._options.brace_style==="expand"||this._options.brace_style==="end-expand"||this._options.brace_style==="none"&&E.newlines?me="NEWLINE":(me="SPACE",this._output.space_before_token=!0):me="NEWLINE":this._flags.last_token.type===B.SEMICOLON&&this._flags.mode===Le.BlockStatement?me="NEWLINE":this._flags.last_token.type===B.SEMICOLON&&ue(this._flags.mode)?me="SPACE":this._flags.last_token.type===B.STRING?me="NEWLINE":this._flags.last_token.type===B.RESERVED||this._flags.last_token.type===B.WORD||this._flags.last_token.text==="*"&&(U(this._last_last_text,["function","yield"])||this._flags.mode===Le.ObjectLiteral&&U(this._last_last_text,["{",","]))?me="SPACE":this._flags.last_token.type===B.START_BLOCK?this._flags.inline_frame?me="SPACE":me="NEWLINE":this._flags.last_token.type===B.END_EXPR&&(this._output.space_before_token=!0,me="NEWLINE"),C(E,z)&&this._flags.last_token.text!==")"&&(this._flags.inline_frame||this._flags.last_token.text==="else"||this._flags.last_token.text==="export"?me="SPACE":me="NEWLINE"),C(E,["else","catch","finally"]))if((!(this._flags.last_token.type===B.END_BLOCK&&this._previous_flags.mode===Le.BlockStatement)||this._options.brace_style==="expand"||this._options.brace_style==="end-expand"||this._options.brace_style==="none"&&E.newlines)&&!this._flags.inline_frame)this.print_newline();else{this._output.trim(!0);var $e=this._output.current_line;$e.last()!=="}"&&this.print_newline(),this._output.space_before_token=!0}else me==="NEWLINE"?C(this._flags.last_token,K)?this._output.space_before_token=!0:this._flags.last_token.text==="declare"&&C(E,["var","let","const"])?this._output.space_before_token=!0:this._flags.last_token.type!==B.END_EXPR?(this._flags.last_token.type!==B.START_EXPR||!C(E,["var","let","const"]))&&this._flags.last_token.text!==":"&&(D(E,"if")&&D(E.previous,"else")?this._output.space_before_token=!0:this.print_newline()):C(E,z)&&this._flags.last_token.text!==")"&&this.print_newline():this._flags.multiline_frame&&j(this._flags.mode)&&this._flags.last_token.text===","&&this._last_last_text==="}"?this.print_newline():me==="SPACE"&&(this._output.space_before_token=!0);E.previous&&(E.previous.type===B.WORD||E.previous.type===B.RESERVED)&&(this._output.space_before_token=!0),this.print_token(E),this._flags.last_word=E.text,E.type===B.RESERVED&&(E.text==="do"?this._flags.do_block=!0:E.text==="if"?this._flags.if_block=!0:E.text==="import"?this._flags.import_block=!0:this._flags.import_block&&D(E,"from")&&(this._flags.import_block=!1))},G.prototype.handle_semicolon=function(E){this.start_of_statement(E)?this._output.space_before_token=!1:this.handle_whitespace_and_comments(E);for(var Y=this._tokens.peek();this._flags.mode===Le.Statement&&!(this._flags.if_block&&D(Y,"else"))&&!this._flags.do_block;)this.restore_mode();this._flags.import_block&&(this._flags.import_block=!1),this.print_token(E)},G.prototype.handle_string=function(E){E.text.startsWith("`")&&E.newlines===0&&E.whitespace_before===""&&(E.previous.text===")"||this._flags.last_token.type===B.WORD)||(this.start_of_statement(E)?this._output.space_before_token=!0:(this.handle_whitespace_and_comments(E),this._flags.last_token.type===B.RESERVED||this._flags.last_token.type===B.WORD||this._flags.inline_frame?this._output.space_before_token=!0:this._flags.last_token.type===B.COMMA||this._flags.last_token.type===B.START_EXPR||this._flags.last_token.type===B.EQUALS||this._flags.last_token.type===B.OPERATOR?this.start_of_object_property()||this.allow_wrap_or_preserved_newline(E):E.text.startsWith("`")&&this._flags.last_token.type===B.END_EXPR&&(E.previous.text==="]"||E.previous.text===")")&&E.newlines===0?this._output.space_before_token=!0:this.print_newline())),this.print_token(E)},G.prototype.handle_equals=function(E){this.start_of_statement(E)||this.handle_whitespace_and_comments(E),this._flags.declaration_statement&&(this._flags.declaration_assignment=!0),this._output.space_before_token=!0,this.print_token(E),this._output.space_before_token=!0},G.prototype.handle_comma=function(E){this.handle_whitespace_and_comments(E,!0),this.print_token(E),this._output.space_before_token=!0,this._flags.declaration_statement?(ue(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(E)):this._flags.mode===Le.ObjectLiteral||this._flags.mode===Le.Statement&&this._flags.parent.mode===Le.ObjectLiteral?(this._flags.mode===Le.Statement&&this.restore_mode(),this._flags.inline_frame||this.print_newline()):this._options.comma_first&&this.allow_wrap_or_preserved_newline(E)},G.prototype.handle_operator=function(E){var Y=E.text==="*"&&(C(this._flags.last_token,["function","yield"])||U(this._flags.last_token.type,[B.START_BLOCK,B.COMMA,B.END_BLOCK,B.SEMICOLON])),me=U(E.text,["-","+"])&&(U(this._flags.last_token.type,[B.START_BLOCK,B.START_EXPR,B.EQUALS,B.OPERATOR])||U(this._flags.last_token.text,z)||this._flags.last_token.text===",");if(!this.start_of_statement(E)){var $e=!Y;this.handle_whitespace_and_comments(E,$e)}if(E.text==="*"&&this._flags.last_token.type===B.DOT){this.print_token(E);return}if(E.text==="::"){this.print_token(E);return}if(U(E.text,["-","+"])&&this.start_of_object_property()){this.print_token(E);return}if(this._flags.last_token.type===B.OPERATOR&&U(this._options.operator_position,Se)&&this.allow_wrap_or_preserved_newline(E),E.text===":"&&this._flags.in_case){this.print_token(E),this._flags.in_case=!1,this._flags.case_body=!0,this._tokens.peek().type!==B.START_BLOCK?(this.indent(),this.print_newline(),this._flags.case_block=!1):(this._flags.case_block=!0,this._output.space_before_token=!0);return}var We=!0,qe=!0,Xe=!1;if(E.text===":"?this._flags.ternary_depth===0?We=!1:(this._flags.ternary_depth-=1,Xe=!0):E.text==="?"&&(this._flags.ternary_depth+=1),!me&&!Y&&this._options.preserve_newlines&&U(E.text,ae)){var gt=E.text===":",_t=gt&&Xe,st=gt&&!Xe;switch(this._options.operator_position){case ve.before_newline:this._output.space_before_token=!st,this.print_token(E),(!gt||_t)&&this.allow_wrap_or_preserved_newline(E),this._output.space_before_token=!0;return;case ve.after_newline:this._output.space_before_token=!0,!gt||_t?this._tokens.peek().newlines?this.print_newline(!1,!0):this.allow_wrap_or_preserved_newline(E):this._output.space_before_token=!1,this.print_token(E),this._output.space_before_token=!0;return;case ve.preserve_newline:st||this.allow_wrap_or_preserved_newline(E),We=!(this._output.just_added_newline()||st),this._output.space_before_token=We,this.print_token(E),this._output.space_before_token=!0;return}}if(Y){this.allow_wrap_or_preserved_newline(E),We=!1;var Kt=this._tokens.peek();qe=Kt&&U(Kt.type,[B.WORD,B.RESERVED])}else if(E.text==="...")this.allow_wrap_or_preserved_newline(E),We=this._flags.last_token.type===B.START_BLOCK,qe=!1;else if(U(E.text,["--","++","!","~"])||me){if((this._flags.last_token.type===B.COMMA||this._flags.last_token.type===B.START_EXPR)&&this.allow_wrap_or_preserved_newline(E),We=!1,qe=!1,E.newlines&&(E.text==="--"||E.text==="++"||E.text==="~")){var un=C(this._flags.last_token,K)&&E.newlines;un&&(this._previous_flags.if_block||this._previous_flags.else_block)&&this.restore_mode(),this.print_newline(un,!0)}this._flags.last_token.text===";"&&ue(this._flags.mode)&&(We=!0),this._flags.last_token.type===B.RESERVED?We=!0:this._flags.last_token.type===B.END_EXPR?We=!(this._flags.last_token.text==="]"&&(E.text==="--"||E.text==="++")):this._flags.last_token.type===B.OPERATOR&&(We=U(E.text,["--","-","++","+"])&&U(this._flags.last_token.text,["--","-","++","+"]),U(E.text,["+","-"])&&U(this._flags.last_token.text,["--","++"])&&(qe=!0)),(this._flags.mode===Le.BlockStatement&&!this._flags.inline_frame||this._flags.mode===Le.Statement)&&(this._flags.last_token.text==="{"||this._flags.last_token.text===";")&&this.print_newline()}this._output.space_before_token=this._output.space_before_token||We,this.print_token(E),this._output.space_before_token=qe},G.prototype.handle_block_comment=function(E,Y){if(this._output.raw){this._output.add_raw_token(E),E.directives&&E.directives.preserve==="end"&&(this._output.raw=this._options.test_output_raw);return}if(E.directives){this.print_newline(!1,Y),this.print_token(E),E.directives.preserve==="start"&&(this._output.raw=!0),this.print_newline(!1,!0);return}if(!x.newline.test(E.text)&&!E.newlines){this._output.space_before_token=!0,this.print_token(E),this._output.space_before_token=!0;return}else this.print_block_commment(E,Y)},G.prototype.print_block_commment=function(E,Y){var me=te(E.text),$e,We=!1,qe=!1,Xe=E.whitespace_before,gt=Xe.length;if(this.print_newline(!1,Y),this.print_token_line_indentation(E),this._output.add_token(me[0]),this.print_newline(!1,Y),me.length>1){for(me=me.slice(1),We=R(me,"*"),qe=ee(me,Xe),We&&(this._flags.alignment=1),$e=0;$e<me.length;$e++)We?(this.print_token_line_indentation(E),this._output.add_token(X(me[$e]))):qe&&me[$e]?(this.print_token_line_indentation(E),this._output.add_token(me[$e].substring(gt))):(this._output.current_line.set_indent(-1),this._output.add_token(me[$e])),this.print_newline(!1,Y);this._flags.alignment=0}},G.prototype.handle_comment=function(E,Y){E.newlines?this.print_newline(!1,Y):this._output.trim(!0),this._output.space_before_token=!0,this.print_token(E),this.print_newline(!1,Y)},G.prototype.handle_dot=function(E){this.start_of_statement(E)||this.handle_whitespace_and_comments(E,!0),this._flags.last_token.text.match("^[0-9]+$")&&(this._output.space_before_token=!0),C(this._flags.last_token,K)?this._output.space_before_token=!1:this.allow_wrap_or_preserved_newline(E,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(E)},G.prototype.handle_unknown=function(E,Y){this.print_token(E),E.text[E.text.length-1]===`
`&&this.print_newline(!1,Y)},G.prototype.handle_eof=function(E){for(;this._flags.mode===Le.Statement;)this.restore_mode();this.handle_whitespace_and_comments(E)},fe.exports.Beautifier=G},function(fe){function o(v){this.__parent=v,this.__character_count=0,this.__indent_count=-1,this.__alignment_count=0,this.__wrap_point_index=0,this.__wrap_point_character_count=0,this.__wrap_point_indent_count=-1,this.__wrap_point_alignment_count=0,this.__items=[]}o.prototype.clone_empty=function(){var v=new o(this.__parent);return v.set_indent(this.__indent_count,this.__alignment_count),v},o.prototype.item=function(v){return v<0?this.__items[this.__items.length+v]:this.__items[v]},o.prototype.has_match=function(v){for(var x=this.__items.length-1;x>=0;x--)if(this.__items[x].match(v))return!0;return!1},o.prototype.set_indent=function(v,x){this.is_empty()&&(this.__indent_count=v||0,this.__alignment_count=x||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 v=this.__parent.current_line;return v.set_indent(this.__wrap_point_indent_count,this.__wrap_point_alignment_count),v.__items=this.__items.slice(this.__wrap_point_index),this.__items=this.__items.slice(0,this.__wrap_point_index),v.__character_count+=this.__character_count-this.__wrap_point_character_count,this.__character_count=this.__wrap_point_character_count,v.__items[0]===" "&&(v.__items.splice(0,1),v.__character_count-=1),!0}return!1},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(v){this.__items.push(v);var x=v.lastIndexOf(`
`);x!==-1?this.__character_count=v.length-x:this.__character_count+=v.length},o.prototype.pop=function(){var v=null;return this.is_empty()||(v=this.__items.pop(),this.__character_count-=v.length),v},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 v="";return this.is_empty()?this.__parent.indent_empty_lines&&(v=this.__parent.get_indent_string(this.__indent_count)):(v=this.__parent.get_indent_string(this.__indent_count,this.__alignment_count),v+=this.__items.join("")),v};function k(v,x){this.__cache=[""],this.__indent_size=v.indent_size,this.__indent_string=v.indent_char,v.indent_with_tabs||(this.__indent_string=new Array(v.indent_size+1).join(v.indent_char)),x=x||"",v.indent_level>0&&(x=new Array(v.indent_level+1).join(this.__indent_string)),this.__base_string=x,this.__base_string_length=x.length}k.prototype.get_indent_size=function(v,x){var S=this.__base_string_length;return x=x||0,v<0&&(S=0),S+=v*this.__indent_size,S+=x,S},k.prototype.get_indent_string=function(v,x){var S=this.__base_string;return x=x||0,v<0&&(v=0,S=""),x+=v*this.__indent_size,this.__ensure_cache(x),S+=this.__cache[x],S},k.prototype.__ensure_cache=function(v){for(;v>=this.__cache.length;)this.__add_column()},k.prototype.__add_column=function(){var v=this.__cache.length,x=0,S="";this.__indent_size&&v>=this.__indent_size&&(x=Math.floor(v/this.__indent_size),v-=x*this.__indent_size,S=new Array(x+1).join(this.__indent_string)),v&&(S+=new Array(v+1).join(" ")),this.__cache.push(S)};function N(v,x){this.__indent_cache=new k(v,x),this.raw=!1,this._end_with_newline=v.end_with_newline,this.indent_size=v.indent_size,this.wrap_line_length=v.wrap_line_length,this.indent_empty_lines=v.indent_empty_lines,this.__lines=[],this.previous_line=null,this.current_line=null,this.next_line=new o(this),this.space_before_token=!1,this.non_breaking_space=!1,this.previous_token_wrapped=!1,this.__add_outputline()}N.prototype.__add_outputline=function(){this.previous_line=this.current_line,this.current_line=this.next_line.clone_empty(),this.__lines.push(this.current_line)},N.prototype.get_line_number=function(){return this.__lines.length},N.prototype.get_indent_string=function(v,x){return this.__indent_cache.get_indent_string(v,x)},N.prototype.get_indent_size=function(v,x){return this.__indent_cache.get_indent_size(v,x)},N.prototype.is_empty=function(){return!this.previous_line&&this.current_line.is_empty()},N.prototype.add_new_line=function(v){return this.is_empty()||!v&&this.just_added_newline()?!1:(this.raw||this.__add_outputline(),!0)},N.prototype.get_code=function(v){this.trim(!0);var x=this.current_line.pop();x&&(x[x.length-1]===`
`&&(x=x.replace(/\n+$/g,"")),this.current_line.push(x)),this._end_with_newline&&this.__add_outputline();var S=this.__lines.join(`
`);return v!==`
`&&(S=S.replace(/[\n]/g,v)),S},N.prototype.set_wrap_point=function(){this.current_line._set_wrap_point()},N.prototype.set_indent=function(v,x){return v=v||0,x=x||0,this.next_line.set_indent(v,x),this.__lines.length>1?(this.current_line.set_indent(v,x),!0):(this.current_line.set_indent(),!1)},N.prototype.add_raw_token=function(v){for(var x=0;x<v.newlines;x++)this.__add_outputline();this.current_line.set_indent(-1),this.current_line.push(v.whitespace_before),this.current_line.push(v.text),this.space_before_token=!1,this.non_breaking_space=!1,this.previous_token_wrapped=!1},N.prototype.add_token=function(v){this.__add_space_before_token(),this.current_line.push(v),this.space_before_token=!1,this.non_breaking_space=!1,this.previous_token_wrapped=this.current_line._allow_wrap()},N.prototype.__add_space_before_token=function(){this.space_before_token&&!this.just_added_newline()&&(this.non_breaking_space||this.set_wrap_point(),this.current_line.push(" "))},N.prototype.remove_indent=function(v){for(var x=this.__lines.length;v<x;)this.__lines[v]._remove_indent(),v++;this.current_line._remove_wrap_indent()},N.prototype.trim=function(v){for(v=v===void 0?!1:v,this.current_line.trim();v&&this.__lines.length>1&&this.current_line.is_empty();)this.__lines.pop(),this.current_line=this.__lines[this.__lines.length-1],this.current_line.trim();this.previous_line=this.__lines.length>1?this.__lines[this.__lines.length-2]:null},N.prototype.just_added_newline=function(){return this.current_line.is_empty()},N.prototype.just_added_blankline=function(){return this.is_empty()||this.current_line.is_empty()&&this.previous_line.is_empty()},N.prototype.ensure_empty_line_above=function(v,x){for(var S=this.__lines.length-2;S>=0;){var T=this.__lines[S];if(T.is_empty())break;if(T.item(0).indexOf(v)!==0&&T.item(-1)!==x){this.__lines.splice(S+1,0,new o(this)),this.previous_line=this.__lines[this.__lines.length-2];break}S--}},fe.exports.Output=N},function(fe){function o(k,N,v,x){this.type=k,this.text=N,this.comments_before=null,this.newlines=v||0,this.whitespace_before=x||"",this.parent=null,this.next=null,this.previous=null,this.opened=null,this.closed=null,this.directives=null}fe.exports.Token=o},function(fe,o){var k="\\x23\\x24\\x40\\x41-\\x5a\\x5f\\x61-\\x7a",N="\\x24\\x30-\\x39\\x41-\\x5a\\x5f\\x61-\\x7a",v="\\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",x="\\u0300-\\u036f\\u0483-\\u0487\\u0591-\\u05bd\\u05bf\\u05c1\\u05c2\\u05c4\\u05c5\\u05c7\\u0610-\\u061a\\u0620-\\u0649\\u0672-\\u06d3\\u06e7-\\u06e8\\u06fb-\\u06fc\\u0730-\\u074a\\u0800-\\u0814\\u081b-\\u0823\\u0825-\\u0827\\u0829-\\u082d\\u0840-\\u0857\\u08e4-\\u08fe\\u0900-\\u0903\\u093a-\\u093c\\u093e-\\u094f\\u0951-\\u0957\\u0962-\\u0963\\u0966-\\u096f\\u0981-\\u0983\\u09bc\\u09be-\\u09c4\\u09c7\\u09c8\\u09d7\\u09df-\\u09e0\\u0a01-\\u0a03\\u0a3c\\u0a3e-\\u0a42\\u0a47\\u0a48\\u0a4b-\\u0a4d\\u0a51\\u0a66-\\u0a71\\u0a75\\u0a81-\\u0a83\\u0abc\\u0abe-\\u0ac5\\u0ac7-\\u0ac9\\u0acb-\\u0acd\\u0ae2-\\u0ae3\\u0ae6-\\u0aef\\u0b01-\\u0b03\\u0b3c\\u0b3e-\\u0b44\\u0b47\\u0b48\\u0b4b-\\u0b4d\\u0b56\\u0b57\\u0b5f-\\u0b60\\u0b66-\\u0b6f\\u0b82\\u0bbe-\\u0bc2\\u0bc6-\\u0bc8\\u0bca-\\u0bcd\\u0bd7\\u0be6-\\u0bef\\u0c01-\\u0c03\\u0c46-\\u0c48\\u0c4a-\\u0c4d\\u0c55\\u0c56\\u0c62-\\u0c63\\u0c66-\\u0c6f\\u0c82\\u0c83\\u0cbc\\u0cbe-\\u0cc4\\u0cc6-\\u0cc8\\u0cca-\\u0ccd\\u0cd5\\u0cd6\\u0ce2-\\u0ce3\\u0ce6-\\u0cef\\u0d02\\u0d03\\u0d46-\\u0d48\\u0d57\\u0d62-\\u0d63\\u0d66-\\u0d6f\\u0d82\\u0d83\\u0dca\\u0dcf-\\u0dd4\\u0dd6\\u0dd8-\\u0ddf\\u0df2\\u0df3\\u0e34-\\u0e3a\\u0e40-\\u0e45\\u0e50-\\u0e59\\u0eb4-\\u0eb9\\u0ec8-\\u0ecd\\u0ed0-\\u0ed9\\u0f18\\u0f19\\u0f20-\\u0f29\\u0f35\\u0f37\\u0f39\\u0f41-\\u0f47\\u0f71-\\u0f84\\u0f86-\\u0f87\\u0f8d-\\u0f97\\u0f99-\\u0fbc\\u0fc6\\u1000-\\u1029\\u1040-\\u1049\\u1067-\\u106d\\u1071-\\u1074\\u1082-\\u108d\\u108f-\\u109d\\u135d-\\u135f\\u170e-\\u1710\\u1720-\\u1730\\u1740-\\u1750\\u1772\\u1773\\u1780-\\u17b2\\u17dd\\u17e0-\\u17e9\\u180b-\\u180d\\u1810-\\u1819\\u1920-\\u192b\\u1930-\\u193b\\u1951-\\u196d\\u19b0-\\u19c0\\u19c8-\\u19c9\\u19d0-\\u19d9\\u1a00-\\u1a15\\u1a20-\\u1a53\\u1a60-\\u1a7c\\u1a7f-\\u1a89\\u1a90-\\u1a99\\u1b46-\\u1b4b\\u1b50-\\u1b59\\u1b6b-\\u1b73\\u1bb0-\\u1bb9\\u1be6-\\u1bf3\\u1c00-\\u1c22\\u1c40-\\u1c49\\u1c5b-\\u1c7d\\u1cd0-\\u1cd2\\u1d00-\\u1dbe\\u1e01-\\u1f15\\u200c\\u200d\\u203f\\u2040\\u2054\\u20d0-\\u20dc\\u20e1\\u20e5-\\u20f0\\u2d81-\\u2d96\\u2de0-\\u2dff\\u3021-\\u3028\\u3099\\u309a\\ua640-\\ua66d\\ua674-\\ua67d\\ua69f\\ua6f0-\\ua6f1\\ua7f8-\\ua800\\ua806\\ua80b\\ua823-\\ua827\\ua880-\\ua881\\ua8b4-\\ua8c4\\ua8d0-\\ua8d9\\ua8f3-\\ua8f7\\ua900-\\ua909\\ua926-\\ua92d\\ua930-\\ua945\\ua980-\\ua983\\ua9b3-\\ua9c0\\uaa00-\\uaa27\\uaa40-\\uaa41\\uaa4c-\\uaa4d\\uaa50-\\uaa59\\uaa7b\\uaae0-\\uaae9\\uaaf2-\\uaaf3\\uabc0-\\uabe1\\uabec\\uabed\\uabf0-\\uabf9\\ufb20-\\ufb28\\ufe00-\\ufe0f\\ufe20-\\ufe26\\ufe33\\ufe34\\ufe4d-\\ufe4f\\uff10-\\uff19\\uff3f",S="\\\\u[0-9a-fA-F]{4}|\\\\u\\{[0-9a-fA-F]+\\}",T="(?:"+S+"|["+k+v+"])",z="(?:"+S+"|["+N+v+x+"])*";o.identifier=new RegExp(T+z,"g"),o.identifierStart=new RegExp(T),o.identifierMatch=new RegExp("(?:"+S+"|["+N+v+x+"])+");var ae=/[\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(fe,o,k){var N=k(6).Options,v=["before-newline","after-newline","preserve-newline"];function x(S){N.call(this,S,"js");var T=this.raw_options.brace_style||null;T==="expand-strict"?this.raw_options.brace_style="expand":T==="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 z=this._get_selection_list("brace_style",["collapse","expand","end-expand","none","preserve-inline"]);this.brace_preserve_inline=!1,this.brace_style="collapse";for(var ae=0;ae<z.length;ae++)z[ae]==="preserve-inline"?this.brace_preserve_inline=!0:this.brace_style=z[ae];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",v),this.test_output_raw=this._get_boolean("test_output_raw"),this.jslint_happy&&(this.space_after_anon_function=!0)}x.prototype=new N,fe.exports.Options=x},function(fe){function o(v,x){this.raw_options=k(v,x),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(v,x){var S=this.raw_options[v],T=x||[];return typeof S=="object"?S!==null&&typeof S.concat=="function"&&(T=S.concat()):typeof S=="string"&&(T=S.split(/[^a-zA-Z0-9_\/\-]+/)),T},o.prototype._get_boolean=function(v,x){var S=this.raw_options[v],T=S===void 0?!!x:!!S;return T},o.prototype._get_characters=function(v,x){var S=this.raw_options[v],T=x||"";return typeof S=="string"&&(T=S.replace(/\\r/,"\r").replace(/\\n/,`
`).replace(/\\t/," ")),T},o.prototype._get_number=function(v,x){var S=this.raw_options[v];x=parseInt(x,10),isNaN(x)&&(x=0);var T=parseInt(S,10);return isNaN(T)&&(T=x),T},o.prototype._get_selection=function(v,x,S){var T=this._get_selection_list(v,x,S);if(T.length!==1)throw new Error("Invalid Option Value: The option '"+v+`' can only be one of the following values:
`+x+`
You passed in: '`+this.raw_options[v]+"'");return T[0]},o.prototype._get_selection_list=function(v,x,S){if(!x||x.length===0)throw new Error("Selection list cannot be empty.");if(S=S||[x[0]],!this._is_valid_selection(S,x))throw new Error("Invalid Default Value!");var T=this._get_array(v,S);if(!this._is_valid_selection(T,x))throw new Error("Invalid Option Value: The option '"+v+`' can contain only the following values:
`+x+`
You passed in: '`+this.raw_options[v]+"'");return T},o.prototype._is_valid_selection=function(v,x){return v.length&&x.length&&!v.some(function(S){return x.indexOf(S)===-1})};function k(v,x){var S={};v=N(v);var T;for(T in v)T!==x&&(S[T]=v[T]);if(x&&v[x])for(T in v[x])S[T]=v[x][T];return S}function N(v){var x={},S;for(S in v){var T=S.replace(/-/g,"_");x[T]=v[S]}return x}fe.exports.Options=o,fe.exports.normalizeOpts=N,fe.exports.mergeOpts=k},function(fe,o,k){var N=k(8).InputScanner,v=k(9).Tokenizer,x=k(9).TOKEN,S=k(13).Directives,T=k(4),z=k(12).Pattern,ae=k(14).TemplatablePattern;function B(R,ee){return ee.indexOf(R)!==-1}var U={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:x.START,RAW:x.RAW,EOF:x.EOF},X=new S(/\/\*/,/\*\//),Z=/0[xX][0123456789abcdefABCDEF_]*n?|0[oO][01234567_]*n?|0[bB][01_]*n?|\d[\d_]*n|(?:\.\d[\d_]*|\d[\d_]*\.?[\d_]*)(?:[eE][+-]?[\d_]+)?/,D=/[0-9]/,C=/[^\d\.]/,K=">>> === !== &&= ??= ||= << && >= ** != == <= >> || ?? |> < / - + > : & % ? ^ | *".split(" "),$=">>>= ... >>= <<= === >>> !== **= &&= ??= ||= => ^= :: /= << <= == && -= >= >> != -- += ** || ?? ++ %= &= *= |= |> = ! ? > < : / ^ - + * & % ~ |";$=$.replace(/[-[\]{}()*+?.,\\^$|#]/g,"\\$&"),$="\\?\\.(?!\\d) "+$,$=$.replace(/ /g,"|");var ve=new RegExp($),Se="continue,try,throw,return,var,let,const,if,switch,case,default,for,while,break,function,import,export".split(","),Le=Se.concat(["do","in","of","else","get","set","new","catch","finally","typeof","yield","async","await","from","as","class","extends"]),ye=new RegExp("^(?:"+Le.join("|")+")$"),te,j=function(R,ee){v.call(this,R,ee),this._patterns.whitespace=this._patterns.whitespace.matching(/\u00A0\u1680\u180e\u2000-\u200a\u202f\u205f\u3000\ufeff/.source,/\u2028\u2029/.source);var G=new z(this._input),y=new ae(this._input).read_options(this._options);this.__patterns={template:y,identifier:y.starting_with(T.identifier).matching(T.identifierMatch),number:G.matching(Z),punct:G.matching(ve),comment:G.starting_with(/\/\//).until(/[\n\r\u2028\u2029]/),block_comment:G.starting_with(/\/\*/).until_after(/\*\//),html_comment_start:G.matching(/<!--/),html_comment_end:G.matching(/-->/),include:G.starting_with(/#include/).until_after(T.lineBreak),shebang:G.starting_with(/#!/).until_after(T.lineBreak),xml:G.matching(/[\s\S]*?<(\/?)([-a-zA-Z:0-9_.]+|{[^}]+?}|!\[CDATA\[[^\]]*?\]\]|)(\s*{[^}]+?}|\s+[-a-zA-Z:0-9_.]+|\s+[-a-zA-Z:0-9_.]+\s*=\s*('[^']*'|"[^"]*"|{([^{}]|{[^}]+?})+?}))*\s*(\/?)\s*>/),single_quote:y.until(/['\\\n\r\u2028\u2029]/),double_quote:y.until(/["\\\n\r\u2028\u2029]/),template_text:y.until(/[`\\$]/),template_expression:y.until(/[`}\\]/)}};j.prototype=new v,j.prototype._is_comment=function(R){return R.type===U.COMMENT||R.type===U.BLOCK_COMMENT||R.type===U.UNKNOWN},j.prototype._is_opening=function(R){return R.type===U.START_BLOCK||R.type===U.START_EXPR},j.prototype._is_closing=function(R,ee){return(R.type===U.END_BLOCK||R.type===U.END_EXPR)&&ee&&(R.text==="]"&&ee.text==="["||R.text===")"&&ee.text==="("||R.text==="}"&&ee.text==="{")},j.prototype._reset=function(){te=!1},j.prototype._get_next_token=function(R,ee){var G=null;this._readWhitespace();var y=this._input.peek();return y===null?this._create_token(U.EOF,""):(G=G||this._read_non_javascript(y),G=G||this._read_string(y),G=G||this._read_pair(y,this._input.peek(1)),G=G||this._read_word(R),G=G||this._read_singles(y),G=G||this._read_comment(y),G=G||this._read_regexp(y,R),G=G||this._read_xml(y,R),G=G||this._read_punctuation(),G=G||this._create_token(U.UNKNOWN,this._input.next()),G)},j.prototype._read_word=function(R){var ee;if(ee=this.__patterns.identifier.read(),ee!=="")return ee=ee.replace(T.allLineBreaks,`
`),!(R.type===U.DOT||R.type===U.RESERVED&&(R.text==="set"||R.text==="get"))&&ye.test(ee)?(ee==="in"||ee==="of")&&(R.type===U.WORD||R.type===U.STRING)?this._create_token(U.OPERATOR,ee):this._create_token(U.RESERVED,ee):this._create_token(U.WORD,ee);if(ee=this.__patterns.number.read(),ee!=="")return this._create_token(U.WORD,ee)},j.prototype._read_singles=function(R){var ee=null;return R==="("||R==="["?ee=this._create_token(U.START_EXPR,R):R===")"||R==="]"?ee=this._create_token(U.END_EXPR,R):R==="{"?ee=this._create_token(U.START_BLOCK,R):R==="}"?ee=this._create_token(U.END_BLOCK,R):R===";"?ee=this._create_token(U.SEMICOLON,R):R==="."&&C.test(this._input.peek(1))?ee=this._create_token(U.DOT,R):R===","&&(ee=this._create_token(U.COMMA,R)),ee&&this._input.next(),ee},j.prototype._read_pair=function(R,ee){var G=null;return R==="#"&&ee==="{"&&(G=this._create_token(U.START_BLOCK,R+ee)),G&&(this._input.next(),this._input.next()),G},j.prototype._read_punctuation=function(){var R=this.__patterns.punct.read();if(R!=="")return R==="="?this._create_token(U.EQUALS,R):R==="?."?this._create_token(U.DOT,R):this._create_token(U.OPERATOR,R)},j.prototype._read_non_javascript=function(R){var ee="";if(R==="#"){if(this._is_first_token()&&(ee=this.__patterns.shebang.read(),ee))return this._create_token(U.UNKNOWN,ee.trim()+`
`);if(ee=this.__patterns.include.read(),ee)return this._create_token(U.UNKNOWN,ee.trim()+`
`);R=this._input.next();var G="#";if(this._input.hasNext()&&this._input.testChar(D)){do R=this._input.next(),G+=R;while(this._input.hasNext()&&R!=="#"&&R!=="=");return R==="#"||(this._input.peek()==="["&&this._input.peek(1)==="]"?(G+="[]",this._input.next(),this._input.next()):this._input.peek()==="{"&&this._input.peek(1)==="}"&&(G+="{}",this._input.next(),this._input.next())),this._create_token(U.WORD,G)}this._input.back()}else if(R==="<"&&this._is_first_token()){if(ee=this.__patterns.html_comment_start.read(),ee){for(;this._input.hasNext()&&!this._input.testChar(T.newline);)ee+=this._input.next();return te=!0,this._create_token(U.COMMENT,ee)}}else if(te&&R==="-"&&(ee=this.__patterns.html_comment_end.read(),ee))return te=!1,this._create_token(U.COMMENT,ee);return null},j.prototype._read_comment=function(R){var ee=null;if(R==="/"){var G="";if(this._input.peek(1)==="*"){G=this.__patterns.block_comment.read();var y=X.get_directives(G);y&&y.ignore==="start"&&(G+=X.readIgnored(this._input)),G=G.replace(T.allLineBreaks,`
`),ee=this._create_token(U.BLOCK_COMMENT,G),ee.directives=y}else this._input.peek(1)==="/"&&(G=this.__patterns.comment.read(),ee=this._create_token(U.COMMENT,G))}return ee},j.prototype._read_string=function(R){if(R==="`"||R==="'"||R==='"'){var ee=this._input.next();return this.has_char_escapes=!1,R==="`"?ee+=this._read_string_recursive("`",!0,"${"):ee+=this._read_string_recursive(R),this.has_char_escapes&&this._options.unescape_strings&&(ee=ue(ee)),this._input.peek()===R&&(ee+=this._input.next()),ee=ee.replace(T.allLineBreaks,`
`),this._create_token(U.STRING,ee)}return null},j.prototype._allow_regexp_or_xml=function(R){return R.type===U.RESERVED&&B(R.text,["return","case","throw","else","do","typeof","yield"])||R.type===U.END_EXPR&&R.text===")"&&R.opened.previous.type===U.RESERVED&&B(R.opened.previous.text,["if","while","for"])||B(R.type,[U.COMMENT,U.START_EXPR,U.START_BLOCK,U.START,U.END_BLOCK,U.OPERATOR,U.EQUALS,U.EOF,U.SEMICOLON,U.COMMA])},j.prototype._read_regexp=function(R,ee){if(R==="/"&&this._allow_regexp_or_xml(ee)){for(var G=this._input.next(),y=!1,E=!1;this._input.hasNext()&&(y||E||this._input.peek()!==R)&&!this._input.testChar(T.newline);)G+=this._input.peek(),y?y=!1:(y=this._input.peek()==="\\",this._input.peek()==="["?E=!0:this._input.peek()==="]"&&(E=!1)),this._input.next();return this._input.peek()===R&&(G+=this._input.next(),G+=this._input.read(T.identifier)),this._create_token(U.STRING,G)}return null},j.prototype._read_xml=function(R,ee){if(this._options.e4x&&R==="<"&&this._allow_regexp_or_xml(ee)){var G="",y=this.__patterns.xml.read_match();if(y){for(var E=y[2].replace(/^{\s+/,"{").replace(/\s+}$/,"}"),Y=E.indexOf("{")===0,me=0;y;){var $e=!!y[1],We=y[2],qe=!!y[y.length-1]||We.slice(0,8)==="![CDATA[";if(!qe&&(We===E||Y&&We.replace(/^{\s+/,"{").replace(/\s+}$/,"}"))&&($e?--me:++me),G+=y[0],me<=0)break;y=this.__patterns.xml.read_match()}return y||(G+=this._input.match(/[\s\S]*/g)[0]),G=G.replace(T.allLineBreaks,`
`),this._create_token(U.STRING,G)}}return null};function ue(R){for(var ee="",G=0,y=new N(R),E=null;y.hasNext();)if(E=y.match(/([\s]|[^\\]|\\\\)+/g),E&&(ee+=E[0]),y.peek()==="\\"){if(y.next(),y.peek()==="x")E=y.match(/x([0-9A-Fa-f]{2})/g);else if(y.peek()==="u")E=y.match(/u([0-9A-Fa-f]{4})/g),E||(E=y.match(/u\{([0-9A-Fa-f]+)\}/g));else{ee+="\\",y.hasNext()&&(ee+=y.next());continue}if(!E||(G=parseInt(E[1],16),G>126&&G<=255&&E[0].indexOf("x")===0))return R;G>=0&&G<32||G>1114111?ee+="\\"+E[0]:G===34||G===39||G===92?ee+="\\"+String.fromCharCode(G):ee+=String.fromCharCode(G)}return ee}j.prototype._read_string_recursive=function(R,ee,G){var y,E;R==="'"?E=this.__patterns.single_quote:R==='"'?E=this.__patterns.double_quote:R==="`"?E=this.__patterns.template_text:R==="}"&&(E=this.__patterns.template_expression);for(var Y=E.read(),me="";this._input.hasNext();){if(me=this._input.next(),me===R||!ee&&T.newline.test(me)){this._input.back();break}else me==="\\"&&this._input.hasNext()?(y=this._input.peek(),y==="x"||y==="u"?this.has_char_escapes=!0:y==="\r"&&this._input.peek(1)===`
`&&this._input.next(),me+=this._input.next()):G&&(G==="${"&&me==="$"&&this._input.peek()==="{"&&(me+=this._input.next()),G===me&&(R==="`"?me+=this._read_string_recursive("}",ee,"`"):me+=this._read_string_recursive("`",ee,"${"),this._input.hasNext()&&(me+=this._input.next())));me+=E.read(),Y+=me}return Y},fe.exports.Tokenizer=j,fe.exports.TOKEN=U,fe.exports.positionable_operators=K.slice(),fe.exports.line_starters=Se.slice()},function(fe){var o=RegExp.prototype.hasOwnProperty("sticky");function k(N){this.__input=N||"",this.__input_length=this.__input.length,this.__position=0}k.prototype.restart=function(){this.__position=0},k.prototype.back=function(){this.__position>0&&(this.__position-=1)},k.prototype.hasNext=function(){return this.__position<this.__input_length},k.prototype.next=function(){var N=null;return this.hasNext()&&(N=this.__input.charAt(this.__position),this.__position+=1),N},k.prototype.peek=function(N){var v=null;return N=N||0,N+=this.__position,N>=0&&N<this.__input_length&&(v=this.__input.charAt(N)),v},k.prototype.__match=function(N,v){N.lastIndex=v;var x=N.exec(this.__input);return x&&!(o&&N.sticky)&&x.index!==v&&(x=null),x},k.prototype.test=function(N,v){return v=v||0,v+=this.__position,v>=0&&v<this.__input_length?!!this.__match(N,v):!1},k.prototype.testChar=function(N,v){var x=this.peek(v);return N.lastIndex=0,x!==null&&N.test(x)},k.prototype.match=function(N){var v=this.__match(N,this.__position);return v?this.__position+=v[0].length:v=null,v},k.prototype.read=function(N,v,x){var S="",T;return N&&(T=this.match(N),T&&(S+=T[0])),v&&(T||!N)&&(S+=this.readUntil(v,x)),S},k.prototype.readUntil=function(N,v){var x="",S=this.__position;N.lastIndex=this.__position;var T=N.exec(this.__input);return T?(S=T.index,v&&(S+=T[0].length)):S=this.__input_length,x=this.__input.substring(this.__position,S),this.__position=S,x},k.prototype.readUntilAfter=function(N){return this.readUntil(N,!0)},k.prototype.get_regexp=function(N,v){var x=null,S="g";return v&&o&&(S="y"),typeof N=="string"&&N!==""?x=new RegExp(N,S):N&&(x=new RegExp(N.source,S)),x},k.prototype.get_literal_regexp=function(N){return RegExp(N.replace(/[-\/\\^$*+?.()|[\]{}]/g,"\\$&"))},k.prototype.peekUntilAfter=function(N){var v=this.__position,x=this.readUntilAfter(N);return this.__position=v,x},k.prototype.lookBack=function(N){var v=this.__position-1;return v>=N.length&&this.__input.substring(v-N.length,v).toLowerCase()===N},fe.exports.InputScanner=k},function(fe,o,k){var N=k(8).InputScanner,v=k(3).Token,x=k(10).TokenStream,S=k(11).WhitespacePattern,T={START:"TK_START",RAW:"TK_RAW",EOF:"TK_EOF"},z=function(ae,B){this._input=new N(ae),this._options=B||{},this.__tokens=null,this._patterns={},this._patterns.whitespace=new S(this._input)};z.prototype.tokenize=function(){this._input.restart(),this.__tokens=new x,this._reset();for(var ae,B=new v(T.START,""),U=null,X=[],Z=new x;B.type!==T.EOF;){for(ae=this._get_next_token(B,U);this._is_comment(ae);)Z.add(ae),ae=this._get_next_token(B,U);Z.isEmpty()||(ae.comments_before=Z,Z=new x),ae.parent=U,this._is_opening(ae)?(X.push(U),U=ae):U&&this._is_closing(ae,U)&&(ae.opened=U,U.closed=ae,U=X.pop(),ae.parent=U),ae.previous=B,B.next=ae,this.__tokens.add(ae),B=ae}return this.__tokens},z.prototype._is_first_token=function(){return this.__tokens.isEmpty()},z.prototype._reset=function(){},z.prototype._get_next_token=function(ae,B){this._readWhitespace();var U=this._input.read(/.+/g);return U?this._create_token(T.RAW,U):this._create_token(T.EOF,"")},z.prototype._is_comment=function(ae){return!1},z.prototype._is_opening=function(ae){return!1},z.prototype._is_closing=function(ae,B){return!1},z.prototype._create_token=function(ae,B){var U=new v(ae,B,this._patterns.whitespace.newline_count,this._patterns.whitespace.whitespace_before_token);return U},z.prototype._readWhitespace=function(){return this._patterns.whitespace.read()},fe.exports.Tokenizer=z,fe.exports.TOKEN=T},function(fe){function o(k){this.__tokens=[],this.__tokens_length=this.__tokens.length,this.__position=0,this.__parent_token=k}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 k=null;return this.hasNext()&&(k=this.__tokens[this.__position],this.__position+=1),k},o.prototype.peek=function(k){var N=null;return k=k||0,k+=this.__position,k>=0&&k<this.__tokens_length&&(N=this.__tokens[k]),N},o.prototype.add=function(k){this.__parent_token&&(k.parent=this.__parent_token),this.__tokens.push(k),this.__tokens_length+=1},fe.exports.TokenStream=o},function(fe,o,k){var N=k(12).Pattern;function v(x,S){N.call(this,x,S),S?this._line_regexp=this._input.get_regexp(S._line_regexp):this.__set_whitespace_patterns("",""),this.newline_count=0,this.whitespace_before_token=""}v.prototype=new N,v.prototype.__set_whitespace_patterns=function(x,S){x+="\\t ",S+="\\n\\r",this._match_pattern=this._input.get_regexp("["+x+S+"]+",!0),this._newline_regexp=this._input.get_regexp("\\r\\n|["+S+"]")},v.prototype.read=function(){this.newline_count=0,this.whitespace_before_token="";var x=this._input.read(this._match_pattern);if(x===" ")this.whitespace_before_token=" ";else if(x){var S=this.__split(this._newline_regexp,x);this.newline_count=S.length-1,this.whitespace_before_token=S[this.newline_count]}return x},v.prototype.matching=function(x,S){var T=this._create();return T.__set_whitespace_patterns(x,S),T._update(),T},v.prototype._create=function(){return new v(this._input,this)},v.prototype.__split=function(x,S){x.lastIndex=0;for(var T=0,z=[],ae=x.exec(S);ae;)z.push(S.substring(T,ae.index)),T=ae.index+ae[0].length,ae=x.exec(S);return T<S.length?z.push(S.substring(T,S.length)):z.push(""),z},fe.exports.WhitespacePattern=v},function(fe){function o(k,N){this._input=k,this._starting_pattern=null,this._match_pattern=null,this._until_pattern=null,this._until_after=!1,N&&(this._starting_pattern=this._input.get_regexp(N._starting_pattern,!0),this._match_pattern=this._input.get_regexp(N._match_pattern,!0),this._until_pattern=this._input.get_regexp(N._until_pattern),this._until_after=N._until_after)}o.prototype.read=function(){var k=this._input.read(this._starting_pattern);return(!this._starting_pattern||k)&&(k+=this._input.read(this._match_pattern,this._until_pattern,this._until_after)),k},o.prototype.read_match=function(){return this._input.match(this._match_pattern)},o.prototype.until_after=function(k){var N=this._create();return N._until_after=!0,N._until_pattern=this._input.get_regexp(k),N._update(),N},o.prototype.until=function(k){var N=this._create();return N._until_after=!1,N._until_pattern=this._input.get_regexp(k),N._update(),N},o.prototype.starting_with=function(k){var N=this._create();return N._starting_pattern=this._input.get_regexp(k,!0),N._update(),N},o.prototype.matching=function(k){var N=this._create();return N._match_pattern=this._input.get_regexp(k,!0),N._update(),N},o.prototype._create=function(){return new o(this._input,this)},o.prototype._update=function(){},fe.exports.Pattern=o},function(fe){function o(k,N){k=typeof k=="string"?k:k.source,N=typeof N=="string"?N:N.source,this.__directives_block_pattern=new RegExp(k+/ beautify( \w+[:]\w+)+ /.source+N,"g"),this.__directive_pattern=/ (\w+)[:](\w+)/g,this.__directives_end_ignore_pattern=new RegExp(k+/\sbeautify\signore:end\s/.source+N,"g")}o.prototype.get_directives=function(k){if(!k.match(this.__directives_block_pattern))return null;var N={};this.__directive_pattern.lastIndex=0;for(var v=this.__directive_pattern.exec(k);v;)N[v[1]]=v[2],v=this.__directive_pattern.exec(k);return N},o.prototype.readIgnored=function(k){return k.readUntilAfter(this.__directives_end_ignore_pattern)},fe.exports.Directives=o},function(fe,o,k){var N=k(12).Pattern,v={django:!1,erb:!1,handlebars:!1,php:!1,smarty:!1,angular:!1};function x(S,T){N.call(this,S,T),this.__template_pattern=null,this._disabled=Object.assign({},v),this._excluded=Object.assign({},v),T&&(this.__template_pattern=this._input.get_regexp(T.__template_pattern),this._excluded=Object.assign(this._excluded,T._excluded),this._disabled=Object.assign(this._disabled,T._disabled));var z=new N(S);this.__patterns={handlebars_comment:z.starting_with(/{{!--/).until_after(/--}}/),handlebars_unescaped:z.starting_with(/{{{/).until_after(/}}}/),handlebars:z.starting_with(/{{/).until_after(/}}/),php:z.starting_with(/<\?(?:[= ]|php)/).until_after(/\?>/),erb:z.starting_with(/<%[^%]/).until_after(/[^%]%>/),django:z.starting_with(/{%/).until_after(/%}/),django_value:z.starting_with(/{{/).until_after(/}}/),django_comment:z.starting_with(/{#/).until_after(/#}/),smarty:z.starting_with(/{(?=[^}{\s\n])/).until_after(/[^\s\n]}/),smarty_comment:z.starting_with(/{\*/).until_after(/\*}/),smarty_literal:z.starting_with(/{literal}/).until_after(/{\/literal}/)}}x.prototype=new N,x.prototype._create=function(){return new x(this._input,this)},x.prototype._update=function(){this.__set_templated_pattern()},x.prototype.disable=function(S){var T=this._create();return T._disabled[S]=!0,T._update(),T},x.prototype.read_options=function(S){var T=this._create();for(var z in v)T._disabled[z]=S.templating.indexOf(z)===-1;return T._update(),T},x.prototype.exclude=function(S){var T=this._create();return T._excluded[S]=!0,T._update(),T},x.prototype.read=function(){var S="";this._match_pattern?S=this._input.read(this._starting_pattern):S=this._input.read(this._starting_pattern,this.__template_pattern);for(var T=this._read_template();T;)this._match_pattern?T+=this._input.read(this._match_pattern):T+=this._input.readUntil(this.__template_pattern),S+=T,T=this._read_template();return this._until_after&&(S+=this._input.readUntilAfter(this._until_pattern)),S},x.prototype.__set_templated_pattern=function(){var S=[];this._disabled.php||S.push(this.__patterns.php._starting_pattern.source),this._disabled.handlebars||S.push(this.__patterns.handlebars._starting_pattern.source),this._disabled.angular||S.push(this.__patterns.handlebars._starting_pattern.source),this._disabled.erb||S.push(this.__patterns.erb._starting_pattern.source),this._disabled.django||(S.push(this.__patterns.django._starting_pattern.source),S.push(this.__patterns.django_value._starting_pattern.source),S.push(this.__patterns.django_comment._starting_pattern.source)),this._disabled.smarty||S.push(this.__patterns.smarty._starting_pattern.source),this._until_pattern&&S.push(this._until_pattern.source),this.__template_pattern=this._input.get_regexp("(?:"+S.join("|")+")")},x.prototype._read_template=function(){var S="",T=this._input.peek();if(T==="<"){var z=this._input.peek(1);!this._disabled.php&&!this._excluded.php&&z==="?"&&(S=S||this.__patterns.php.read()),!this._disabled.erb&&!this._excluded.erb&&z==="%"&&(S=S||this.__patterns.erb.read())}else T==="{"&&(!this._disabled.handlebars&&!this._excluded.handlebars&&(S=S||this.__patterns.handlebars_comment.read(),S=S||this.__patterns.handlebars_unescaped.read(),S=S||this.__patterns.handlebars.read()),this._disabled.django||(!this._excluded.django&&!this._excluded.handlebars&&(S=S||this.__patterns.django_value.read()),this._excluded.django||(S=S||this.__patterns.django_comment.read(),S=S||this.__patterns.django.read())),this._disabled.smarty||this._disabled.django&&this._disabled.handlebars&&(S=S||this.__patterns.smarty_comment.read(),S=S||this.__patterns.smarty_literal.read(),S=S||this.__patterns.smarty.read()));return S},fe.exports.TemplatablePattern=x}],A={};function p(fe){var o=A[fe];if(o!==void 0)return o.exports;var k=A[fe]={exports:{}};return _e[fe](k,k.exports,p),k.exports}var be=p(0);Q=be})();var ge=Q;m=[],L=function(){return{js_beautify:ge}}.apply(et,m),L!==void 0&&(ln.exports=L)})()},15342:function(ln){(function(m,L){ln.exports=L()})(typeof self!="undefined"?self:this,function(){return function(et){var m={};function L(Q){if(m[Q])return m[Q].exports;var ge=m[Q]={i:Q,l:!1,exports:{}};return et[Q].call(ge.exports,ge,ge.exports,L),ge.l=!0,ge.exports}return L.m=et,L.c=m,L.d=function(Q,ge,_e){L.o(Q,ge)||Object.defineProperty(Q,ge,{enumerable:!0,get:_e})},L.r=function(Q){typeof Symbol!="undefined"&&Symbol.toStringTag&&Object.defineProperty(Q,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(Q,"__esModule",{value:!0})},L.t=function(Q,ge){if(ge&1&&(Q=L(Q)),ge&8||ge&4&&typeof Q=="object"&&Q&&Q.__esModule)return Q;var _e=Object.create(null);if(L.r(_e),Object.defineProperty(_e,"default",{enumerable:!0,value:Q}),ge&2&&typeof Q!="string")for(var A in Q)L.d(_e,A,function(p){return Q[p]}.bind(null,A));return _e},L.n=function(Q){var ge=Q&&Q.__esModule?function(){return Q.default}:function(){return Q};return L.d(ge,"a",ge),ge},L.o=function(Q,ge){return Object.prototype.hasOwnProperty.call(Q,ge)},L.p="",L(L.s=1)}([function(et,m,L){},function(et,m,L){"use strict";L.r(m);var Q=L(0),ge=function(){function re(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 re.range=function(f,h){return h?!f||!f.loc||!h.loc||f.loc.lexer!==h.loc.lexer?null:new re(f.loc.lexer,f.loc.start,h.loc.end):f&&f.loc},re}(),_e=function(){function re(f,h){this.text=void 0,this.loc=void 0,this.text=f,this.loc=h}var u=re.prototype;return u.range=function(h,_){return new re(_,ge.range(this,h))},re}(),A=function re(u,f){this.position=void 0;var h="KaTeX parse error: "+u,_,P=f&&f.loc;if(P&&P.start<=P.end){var J=P.lexer.input;_=P.start;var Re=P.end;_===J.length?h+=" at end of input: ":h+=" at position "+(_+1)+": ";var Be=J.slice(_,Re).replace(/[^]/g,"$&\u0332"),Ve;_>15?Ve="\u2026"+J.slice(_-15,_):Ve=J.slice(0,_);var yt;Re+15<J.length?yt=J.slice(Re,Re+15)+"\u2026":yt=J.slice(Re),h+=Ve+Be+yt}var Rt=new Error(h);return Rt.name="ParseError",Rt.__proto__=re.prototype,Rt.position=_,Rt};A.prototype.__proto__=Error.prototype;var p=A,be=function(u,f){return u.indexOf(f)!==-1},fe=function(u,f){return u===void 0?f:u},o=/([A-Z])/g,k=function(u){return u.replace(o,"-$1").toLowerCase()},N={"&":"&amp;",">":"&gt;","<":"&lt;",'"':"&quot;","'":"&#x27;"},v=/[&><"']/g;function x(re){return String(re).replace(v,function(u){return N[u]})}var S=function re(u){return u.type==="ordgroup"||u.type==="color"?u.body.length===1?re(u.body[0]):u:u.type==="font"?re(u.body):u},T=function(u){var f=S(u);return f.type==="mathord"||f.type==="textord"||f.type==="atom"},z=function(u){if(!u)throw new Error("Expected non-null, but got "+String(u));return u},ae=function(u){var f=/^\s*([^\\/#]*?)(?::|&#0*58|&#x0*3a)/i.exec(u);return f!=null?f[1]:"_relative"},B={contains:be,deflt:fe,escape:x,hyphenate:k,getBaseElem:S,isCharacterBox:T,protocolFromUrl:ae},U=function(){function re(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=B.deflt(f.displayMode,!1),this.output=B.deflt(f.output,"htmlAndMathml"),this.leqno=B.deflt(f.leqno,!1),this.fleqn=B.deflt(f.fleqn,!1),this.throwOnError=B.deflt(f.throwOnError,!0),this.errorColor=B.deflt(f.errorColor,"#cc0000"),this.macros=f.macros||{},this.minRuleThickness=Math.max(0,B.deflt(f.minRuleThickness,0)),this.colorIsTextColor=B.deflt(f.colorIsTextColor,!1),this.strict=B.deflt(f.strict,"warn"),this.trust=B.deflt(f.trust,!1),this.maxSize=Math.max(0,B.deflt(f.maxSize,1/0)),this.maxExpand=Math.max(0,B.deflt(f.maxExpand,1e3))}var u=re.prototype;return u.reportNonstrict=function(h,_,P){var J=this.strict;if(typeof J=="function"&&(J=J(h,_,P)),!(!J||J==="ignore")){if(J===!0||J==="error")throw new p("LaTeX-incompatible input and strict mode is set to 'error': "+(_+" ["+h+"]"),P);J==="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 '"+J+"': "+_+" ["+h+"]"))}},u.useStrictBehavior=function(h,_,P){var J=this.strict;if(typeof J=="function")try{J=J(h,_,P)}catch(Re){J="error"}return!J||J==="ignore"?!1:J===!0||J==="error"?!0:J==="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 '"+J+"': "+_+" ["+h+"]")),!1)},u.isTrusted=function(h){h.url&&!h.protocol&&(h.protocol=B.protocolFromUrl(h.url));var _=typeof this.trust=="function"?this.trust(h):this.trust;return!!_},re}(),X=function(){function re(f,h,_){this.id=void 0,this.size=void 0,this.cramped=void 0,this.id=f,this.size=h,this.cramped=_}var u=re.prototype;return u.sup=function(){return ye[te[this.id]]},u.sub=function(){return ye[j[this.id]]},u.fracNum=function(){return ye[ue[this.id]]},u.fracDen=function(){return ye[R[this.id]]},u.cramp=function(){return ye[ee[this.id]]},u.text=function(){return ye[G[this.id]]},u.isTight=function(){return this.size>=2},re}(),Z=0,D=1,C=2,K=3,$=4,ve=5,Se=6,Le=7,ye=[new X(Z,0,!1),new X(D,0,!0),new X(C,1,!1),new X(K,1,!0),new X($,2,!1),new X(ve,2,!0),new X(Se,3,!1),new X(Le,3,!0)],te=[$,ve,$,ve,Se,Le,Se,Le],j=[ve,ve,ve,ve,Le,Le,Le,Le],ue=[C,K,$,ve,Se,Le,Se,Le],R=[K,K,ve,ve,Le,Le,Le,Le],ee=[D,D,K,K,ve,ve,Le,Le],G=[Z,D,C,K,C,K,C,K],y={DISPLAY:ye[Z],TEXT:ye[C],SCRIPT:ye[$],SCRIPTSCRIPT:ye[Se]},E=[{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 Y(re){for(var u=0;u<E.length;u++)for(var f=E[u],h=0;h<f.blocks.length;h++){var _=f.blocks[h];if(re>=_[0]&&re<=_[1])return f.name}return null}var me=[];E.forEach(function(re){return re.blocks.forEach(function(u){return me.push.apply(me,u)})});function $e(re){for(var u=0;u<me.length;u+=2)if(re>=me[u]&&re<=me[u+1])return!0;return!1}var We=80,qe=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"},Xe=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"},gt=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"},_t=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"},st=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"},Kt=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"},un=function(u,f,h){f=1e3*f;var _="";switch(u){case"sqrtMain":_=qe(f,We);break;case"sqrtSize1":_=Xe(f,We);break;case"sqrtSize2":_=gt(f,We);break;case"sqrtSize3":_=_t(f,We);break;case"sqrtSize4":_=st(f,We);break;case"sqrtTall":_=Kt(f,We,h)}return _},Ot={doubleleftarrow:`M262 157
l10-10c34-36 62.7-77 86-123 3.3-8 5-13.3 5-16 0-5.3-6.7-8-20-8-7.3
0-12.2.5-14.5 1.5-2.3 1-4.8 4.5-7.5 10.5-49.3 97.3-121.7 169.3-217 216-28
14-57.3 25-88 33-6.7 2-11 3.8-13 5.5-2 1.7-3 4.2-3 7.5s1 5.8 3 7.5
c2 1.7 6.3 3.5 13 5.5 68 17.3 128.2 47.8 180.5 91.5 52.3 43.7 93.8 96.2 124.5
157.5 9.3 8 15.3 12.3 18 13h6c12-.7 18-4 18-10 0-2-1.7-7-5-15-23.3-46-52-87
-86-123l-10-10h399738v-40H218c328 0 0 0 0 0l-10-8c-26.7-20-65.7-43-117-69 2.7
-2 6-3.7 10-5 36.7-16 72.3-37.3 107-64l10-8h399782v-40z
m8 0v40h399730v-40zm0 194v40h399730v-40z`,doublerightarrow:`M399738 392l
-10 10c-34 36-62.7 77-86 123-3.3 8-5 13.3-5 16 0 5.3 6.7 8 20 8 7.3 0 12.2-.5
14.5-1.5 2.3-1 4.8-4.5 7.5-10.5 49.3-97.3 121.7-169.3 217-216 28-14 57.3-25 88
-33 6.7-2 11-3.8 13-5.5 2-1.7 3-4.2 3-7.5s-1-5.8-3-7.5c-2-1.7-6.3-3.5-13-5.5-68
-17.3-128.2-47.8-180.5-91.5-52.3-43.7-93.8-96.2-124.5-157.5-9.3-8-15.3-12.3-18
-13h-6c-12 .7-18 4-18 10 0 2 1.7 7 5 15 23.3 46 52 87 86 123l10 10H0v40h399782
c-328 0 0 0 0 0l10 8c26.7 20 65.7 43 117 69-2.7 2-6 3.7-10 5-36.7 16-72.3 37.3
-107 64l-10 8H0v40zM0 157v40h399730v-40zm0 194v40h399730v-40z`,leftarrow:`M400000 241H110l3-3c68.7-52.7 113.7-120
135-202 4-14.7 6-23 6-25 0-7.3-7-11-21-11-8 0-13.2.8-15.5 2.5-2.3 1.7-4.2 5.8
-5.5 12.5-1.3 4.7-2.7 10.3-4 17-12 48.7-34.8 92-68.5 130S65.3 228.3 18 247
c-10 4-16 7.7-18 11 0 8.7 6 14.3 18 17 47.3 18.7 87.8 47 121.5 85S196 441.3 208
490c.7 2 1.3 5 2 9s1.2 6.7 1.5 8c.3 1.3 1 3.3 2 6s2.2 4.5 3.5 5.5c1.3 1 3.3
1.8 6 2.5s6 1 10 1c14 0 21-3.7 21-11 0-2-2-10.3-6-25-20-79.3-65-146.7-135-202
l-3-3h399890zM100 241v40h399900v-40z`,leftbrace:`M6 548l-6-6v-35l6-11c56-104 135.3-181.3 238-232 57.3-28.7 117
-45 179-50h399577v120H403c-43.3 7-81 15-113 26-100.7 33-179.7 91-237 174-2.7
5-6 9-10 13-.7 1-7.3 1-20 1H6z`,leftbraceunder:`M0 6l6-6h17c12.688 0 19.313.3 20 1 4 4 7.313 8.3 10 13
35.313 51.3 80.813 93.8 136.5 127.5 55.688 33.7 117.188 55.8 184.5 66.5.688
0 2 .3 4 1 18.688 2.7 76 4.3 172 5h399450v120H429l-6-1c-124.688-8-235-61.7
-331-161C60.687 138.7 32.312 99.3 7 54L0 41V6z`,leftgroup:`M400000 80
H435C64 80 168.3 229.4 21 260c-5.9 1.2-18 0-18 0-2 0-3-1-3-3v-38C76 61 257 0
435 0h399565z`,leftgroupunder:`M400000 262
H435C64 262 168.3 112.6 21 82c-5.9-1.2-18 0-18 0-2 0-3 1-3 3v38c76 158 257 219
435 219h399565z`,leftharpoon:`M0 267c.7 5.3 3 10 7 14h399993v-40H93c3.3
-3.3 10.2-9.5 20.5-18.5s17.8-15.8 22.5-20.5c50.7-52 88-110.3 112-175 4-11.3 5
-18.3 3-21-1.3-4-7.3-6-18-6-8 0-13 .7-15 2s-4.7 6.7-8 16c-42 98.7-107.3 174.7
-196 228-6.7 4.7-10.7 8-12 10-1.3 2-2 5.7-2 11zm100-26v40h399900v-40z`,leftharpoonplus:`M0 267c.7 5.3 3 10 7 14h399993v-40H93c3.3-3.3 10.2-9.5
20.5-18.5s17.8-15.8 22.5-20.5c50.7-52 88-110.3 112-175 4-11.3 5-18.3 3-21-1.3
-4-7.3-6-18-6-8 0-13 .7-15 2s-4.7 6.7-8 16c-42 98.7-107.3 174.7-196 228-6.7 4.7
-10.7 8-12 10-1.3 2-2 5.7-2 11zm100-26v40h399900v-40zM0 435v40h400000v-40z
m0 0v40h400000v-40z`,leftharpoondown:`M7 241c-4 4-6.333 8.667-7 14 0 5.333.667 9 2 11s5.333
5.333 12 10c90.667 54 156 130 196 228 3.333 10.667 6.333 16.333 9 17 2 .667 5
1 9 1h5c10.667 0 16.667-2 18-6 2-2.667 1-9.667-3-21-32-87.333-82.667-157.667
-152-211l-3-3h399907v-40zM93 281 H400000 v-40L7 241z`,leftharpoondownplus:`M7 435c-4 4-6.3 8.7-7 14 0 5.3.7 9 2 11s5.3 5.3 12
10c90.7 54 156 130 196 228 3.3 10.7 6.3 16.3 9 17 2 .7 5 1 9 1h5c10.7 0 16.7
-2 18-6 2-2.7 1-9.7-3-21-32-87.3-82.7-157.7-152-211l-3-3h399907v-40H7zm93 0
v40h399900v-40zM0 241v40h399900v-40zm0 0v40h399900v-40z`,lefthook:`M400000 281 H103s-33-11.2-61-33.5S0 197.3 0 164s14.2-61.2 42.5
-83.5C70.8 58.2 104 47 142 47 c16.7 0 25 6.7 25 20 0 12-8.7 18.7-26 20-40 3.3
-68.7 15.7-86 37-10 12-15 25.3-15 40 0 22.7 9.8 40.7 29.5 54 19.7 13.3 43.5 21
71.5 23h399859zM103 281v-40h399897v40z`,leftlinesegment:`M40 281 V428 H0 V94 H40 V241 H400000 v40z
M40 281 V428 H0 V94 H40 V241 H400000 v40z`,leftmapsto:`M40 281 V448H0V74H40V241H400000v40z
M40 281 V448H0V74H40V241H400000v40z`,leftToFrom:`M0 147h400000v40H0zm0 214c68 40 115.7 95.7 143 167h22c15.3 0 23
-.3 23-1 0-1.3-5.3-13.7-16-37-18-35.3-41.3-69-70-101l-7-8h399905v-40H95l7-8
c28.7-32 52-65.7 70-101 10.7-23.3 16-35.7 16-37 0-.7-7.7-1-23-1h-22C115.7 265.3
68 321 0 361zm0-174v-40h399900v40zm100 154v40h399900v-40z`,longequal:`M0 50 h400000 v40H0z m0 194h40000v40H0z
M0 50 h400000 v40H0z m0 194h40000v40H0z`,midbrace:`M200428 334
c-100.7-8.3-195.3-44-280-108-55.3-42-101.7-93-139-153l-9-14c-2.7 4-5.7 8.7-9 14
-53.3 86.7-123.7 153-211 199-66.7 36-137.3 56.3-212 62H0V214h199568c178.3-11.7
311.7-78.3 403-201 6-8 9.7-12 11-12 .7-.7 6.7-1 18-1s17.3.3 18 1c1.3 0 5 4 11
12 44.7 59.3 101.3 106.3 170 141s145.3 54.3 229 60h199572v120z`,midbraceunder:`M199572 214
c100.7 8.3 195.3 44 280 108 55.3 42 101.7 93 139 153l9 14c2.7-4 5.7-8.7 9-14
53.3-86.7 123.7-153 211-199 66.7-36 137.3-56.3 212-62h199568v120H200432c-178.3
11.7-311.7 78.3-403 201-6 8-9.7 12-11 12-.7.7-6.7 1-18 1s-17.3-.3-18-1c-1.3 0
-5-4-11-12-44.7-59.3-101.3-106.3-170-141s-145.3-54.3-229-60H0V214z`,oiintSize1:`M512.6 71.6c272.6 0 320.3 106.8 320.3 178.2 0 70.8-47.7 177.6
-320.3 177.6S193.1 320.6 193.1 249.8c0-71.4 46.9-178.2 319.5-178.2z
m368.1 178.2c0-86.4-60.9-215.4-368.1-215.4-306.4 0-367.3 129-367.3 215.4 0 85.8
60.9 214.8 367.3 214.8 307.2 0 368.1-129 368.1-214.8z`,oiintSize2:`M757.8 100.1c384.7 0 451.1 137.6 451.1 230 0 91.3-66.4 228.8
-451.1 228.8-386.3 0-452.7-137.5-452.7-228.8 0-92.4 66.4-230 452.7-230z
m502.4 230c0-111.2-82.4-277.2-502.4-277.2s-504 166-504 277.2
c0 110 84 276 504 276s502.4-166 502.4-276z`,oiiintSize1:`M681.4 71.6c408.9 0 480.5 106.8 480.5 178.2 0 70.8-71.6 177.6
-480.5 177.6S202.1 320.6 202.1 249.8c0-71.4 70.5-178.2 479.3-178.2z
m525.8 178.2c0-86.4-86.8-215.4-525.7-215.4-437.9 0-524.7 129-524.7 215.4 0
85.8 86.8 214.8 524.7 214.8 438.9 0 525.7-129 525.7-214.8z`,oiiintSize2:`M1021.2 53c603.6 0 707.8 165.8 707.8 277.2 0 110-104.2 275.8
-707.8 275.8-606 0-710.2-165.8-710.2-275.8C311 218.8 415.2 53 1021.2 53z
m770.4 277.1c0-131.2-126.4-327.6-770.5-327.6S248.4 198.9 248.4 330.1
c0 130 128.8 326.4 772.7 326.4s770.5-196.4 770.5-326.4z`,rightarrow:`M0 241v40h399891c-47.3 35.3-84 78-110 128
-16.7 32-27.7 63.7-33 95 0 1.3-.2 2.7-.5 4-.3 1.3-.5 2.3-.5 3 0 7.3 6.7 11 20
11 8 0 13.2-.8 15.5-2.5 2.3-1.7 4.2-5.5 5.5-11.5 2-13.3 5.7-27 11-41 14.7-44.7
39-84.5 73-119.5s73.7-60.2 119-75.5c6-2 9-5.7 9-11s-3-9-9-11c-45.3-15.3-85
-40.5-119-75.5s-58.3-74.8-73-119.5c-4.7-14-8.3-27.3-11-40-1.3-6.7-3.2-10.8-5.5
-12.5-2.3-1.7-7.5-2.5-15.5-2.5-14 0-21 3.7-21 11 0 2 2 10.3 6 25 20.7 83.3 67
151.7 139 205zm0 0v40h399900v-40z`,rightbrace:`M400000 542l
-6 6h-17c-12.7 0-19.3-.3-20-1-4-4-7.3-8.3-10-13-35.3-51.3-80.8-93.8-136.5-127.5
s-117.2-55.8-184.5-66.5c-.7 0-2-.3-4-1-18.7-2.7-76-4.3-172-5H0V214h399571l6 1
c124.7 8 235 61.7 331 161 31.3 33.3 59.7 72.7 85 118l7 13v35z`,rightbraceunder:`M399994 0l6 6v35l-6 11c-56 104-135.3 181.3-238 232-57.3
28.7-117 45-179 50H-300V214h399897c43.3-7 81-15 113-26 100.7-33 179.7-91 237
-174 2.7-5 6-9 10-13 .7-1 7.3-1 20-1h17z`,rightgroup:`M0 80h399565c371 0 266.7 149.4 414 180 5.9 1.2 18 0 18 0 2 0
3-1 3-3v-38c-76-158-257-219-435-219H0z`,rightgroupunder:`M0 262h399565c371 0 266.7-149.4 414-180 5.9-1.2 18 0 18
0 2 0 3 1 3 3v38c-76 158-257 219-435 219H0z`,rightharpoon:`M0 241v40h399993c4.7-4.7 7-9.3 7-14 0-9.3
-3.7-15.3-11-18-92.7-56.7-159-133.7-199-231-3.3-9.3-6-14.7-8-16-2-1.3-7-2-15-2
-10.7 0-16.7 2-18 6-2 2.7-1 9.7 3 21 15.3 42 36.7 81.8 64 119.5 27.3 37.7 58
69.2 92 94.5zm0 0v40h399900v-40z`,rightharpoonplus:`M0 241v40h399993c4.7-4.7 7-9.3 7-14 0-9.3-3.7-15.3-11
-18-92.7-56.7-159-133.7-199-231-3.3-9.3-6-14.7-8-16-2-1.3-7-2-15-2-10.7 0-16.7
2-18 6-2 2.7-1 9.7 3 21 15.3 42 36.7 81.8 64 119.5 27.3 37.7 58 69.2 92 94.5z
m0 0v40h399900v-40z m100 194v40h399900v-40zm0 0v40h399900v-40z`,rightharpoondown:`M399747 511c0 7.3 6.7 11 20 11 8 0 13-.8 15-2.5s4.7-6.8
8-15.5c40-94 99.3-166.3 178-217 13.3-8 20.3-12.3 21-13 5.3-3.3 8.5-5.8 9.5
-7.5 1-1.7 1.5-5.2 1.5-10.5s-2.3-10.3-7-15H0v40h399908c-34 25.3-64.7 57-92 95
-27.3 38-48.7 77.7-64 119-3.3 8.7-5 14-5 16zM0 241v40h399900v-40z`,rightharpoondownplus:`M399747 705c0 7.3 6.7 11 20 11 8 0 13-.8
15-2.5s4.7-6.8 8-15.5c40-94 99.3-166.3 178-217 13.3-8 20.3-12.3 21-13 5.3-3.3
8.5-5.8 9.5-7.5 1-1.7 1.5-5.2 1.5-10.5s-2.3-10.3-7-15H0v40h399908c-34 25.3
-64.7 57-92 95-27.3 38-48.7 77.7-64 119-3.3 8.7-5 14-5 16zM0 435v40h399900v-40z
m0-194v40h400000v-40zm0 0v40h400000v-40z`,righthook:`M399859 241c-764 0 0 0 0 0 40-3.3 68.7-15.7 86-37 10-12 15-25.3
15-40 0-22.7-9.8-40.7-29.5-54-19.7-13.3-43.5-21-71.5-23-17.3-1.3-26-8-26-20 0
-13.3 8.7-20 26-20 38 0 71 11.2 99 33.5 0 0 7 5.6 21 16.7 14 11.2 21 33.5 21
66.8s-14 61.2-42 83.5c-28 22.3-61 33.5-99 33.5L0 241z M0 281v-40h399859v40z`,rightlinesegment:`M399960 241 V94 h40 V428 h-40 V281 H0 v-40z
M399960 241 V94 h40 V428 h-40 V281 H0 v-40z`,rightToFrom:`M400000 167c-70.7-42-118-97.7-142-167h-23c-15.3 0-23 .3-23
1 0 1.3 5.3 13.7 16 37 18 35.3 41.3 69 70 101l7 8H0v40h399905l-7 8c-28.7 32
-52 65.7-70 101-10.7 23.3-16 35.7-16 37 0 .7 7.7 1 23 1h23c24-69.3 71.3-125 142
-167z M100 147v40h399900v-40zM0 341v40h399900v-40z`,twoheadleftarrow:`M0 167c68 40
115.7 95.7 143 167h22c15.3 0 23-.3 23-1 0-1.3-5.3-13.7-16-37-18-35.3-41.3-69
-70-101l-7-8h125l9 7c50.7 39.3 85 86 103 140h46c0-4.7-6.3-18.7-19-42-18-35.3
-40-67.3-66-96l-9-9h399716v-40H284l9-9c26-28.7 48-60.7 66-96 12.7-23.333 19
-37.333 19-42h-46c-18 54-52.3 100.7-103 140l-9 7H95l7-8c28.7-32 52-65.7 70-101
10.7-23.333 16-35.7 16-37 0-.7-7.7-1-23-1h-22C115.7 71.3 68 127 0 167z`,twoheadrightarrow:`M400000 167
c-68-40-115.7-95.7-143-167h-22c-15.3 0-23 .3-23 1 0 1.3 5.3 13.7 16 37 18 35.3
41.3 69 70 101l7 8h-125l-9-7c-50.7-39.3-85-86-103-140h-46c0 4.7 6.3 18.7 19 42
18 35.3 40 67.3 66 96l9 9H0v40h399716l-9 9c-26 28.7-48 60.7-66 96-12.7 23.333
-19 37.333-19 42h46c18-54 52.3-100.7 103-140l9-7h125l-7 8c-28.7 32-52 65.7-70
101-10.7 23.333-16 35.7-16 37 0 .7 7.7 1 23 1h22c27.3-71.3 75-127 143-167z`,tilde1:`M200 55.538c-77 0-168 73.953-177 73.953-3 0-7
-2.175-9-5.437L2 97c-1-2-2-4-2-6 0-4 2-7 5-9l20-12C116 12 171 0 207 0c86 0
114 68 191 68 78 0 168-68 177-68 4 0 7 2 9 5l12 19c1 2.175 2 4.35 2 6.525 0
4.35-2 7.613-5 9.788l-19 13.05c-92 63.077-116.937 75.308-183 76.128
-68.267.847-113-73.952-191-73.952z`,tilde2:`M344 55.266c-142 0-300.638 81.316-311.5 86.418
-8.01 3.762-22.5 10.91-23.5 5.562L1 120c-1-2-1-3-1-4 0-5 3-9 8-10l18.4-9C160.9
31.9 283 0 358 0c148 0 188 122 331 122s314-97 326-97c4 0 8 2 10 7l7 21.114
c1 2.14 1 3.21 1 4.28 0 5.347-3 9.626-7 10.696l-22.3 12.622C852.6 158.372 751
181.476 676 181.476c-149 0-189-126.21-332-126.21z`,tilde3:`M786 59C457 59 32 175.242 13 175.242c-6 0-10-3.457
-11-10.37L.15 138c-1-7 3-12 10-13l19.2-6.4C378.4 40.7 634.3 0 804.3 0c337 0
411.8 157 746.8 157 328 0 754-112 773-112 5 0 10 3 11 9l1 14.075c1 8.066-.697
16.595-6.697 17.492l-21.052 7.31c-367.9 98.146-609.15 122.696-778.15 122.696
-338 0-409-156.573-744-156.573z`,tilde4:`M786 58C457 58 32 177.487 13 177.487c-6 0-10-3.345
-11-10.035L.15 143c-1-7 3-12 10-13l22-6.7C381.2 35 637.15 0 807.15 0c337 0 409
177 744 177 328 0 754-127 773-127 5 0 10 3 11 9l1 14.794c1 7.805-3 13.38-9
14.495l-20.7 5.574c-366.85 99.79-607.3 139.372-776.3 139.372-338 0-409
-175.236-744-175.236z`,vec:`M377 20c0-5.333 1.833-10 5.5-14S391 0 397 0c4.667 0 8.667 1.667 12 5
3.333 2.667 6.667 9 10 19 6.667 24.667 20.333 43.667 41 57 7.333 4.667 11
10.667 11 18 0 6-1 10-3 12s-6.667 5-14 9c-28.667 14.667-53.667 35.667-75 63
-1.333 1.333-3.167 3.5-5.5 6.5s-4 4.833-5 5.5c-1 .667-2.5 1.333-4.5 2s-4.333 1
-7 1c-4.667 0-9.167-1.833-13.5-5.5S337 184 337 178c0-12.667 15.667-32.333 47-59
H213l-171-1c-8.667-6-13-12.333-13-19 0-4.667 4.333-11.333 13-20h359
c-16-25.333-24-45-24-59z`,widehat1:`M529 0h5l519 115c5 1 9 5 9 10 0 1-1 2-1 3l-4 22
c-1 5-5 9-11 9h-2L532 67 19 159h-2c-5 0-9-4-11-9l-5-22c-1-6 2-12 8-13z`,widehat2:`M1181 0h2l1171 176c6 0 10 5 10 11l-2 23c-1 6-5 10
-11 10h-1L1182 67 15 220h-1c-6 0-10-4-11-10l-2-23c-1-6 4-11 10-11z`,widehat3:`M1181 0h2l1171 236c6 0 10 5 10 11l-2 23c-1 6-5 10
-11 10h-1L1182 67 15 280h-1c-6 0-10-4-11-10l-2-23c-1-6 4-11 10-11z`,widehat4:`M1181 0h2l1171 296c6 0 10 5 10 11l-2 23c-1 6-5 10
-11 10h-1L1182 67 15 340h-1c-6 0-10-4-11-10l-2-23c-1-6 4-11 10-11z`,widecheck1:`M529,159h5l519,-115c5,-1,9,-5,9,-10c0,-1,-1,-2,-1,-3l-4,-22c-1,
-5,-5,-9,-11,-9h-2l-512,92l-513,-92h-2c-5,0,-9,4,-11,9l-5,22c-1,6,2,12,8,13z`,widecheck2:`M1181,220h2l1171,-176c6,0,10,-5,10,-11l-2,-23c-1,-6,-5,-10,
-11,-10h-1l-1168,153l-1167,-153h-1c-6,0,-10,4,-11,10l-2,23c-1,6,4,11,10,11z`,widecheck3:`M1181,280h2l1171,-236c6,0,10,-5,10,-11l-2,-23c-1,-6,-5,-10,
-11,-10h-1l-1168,213l-1167,-213h-1c-6,0,-10,4,-11,10l-2,23c-1,6,4,11,10,11z`,widecheck4:`M1181,340h2l1171,-296c6,0,10,-5,10,-11l-2,-23c-1,-6,-5,-10,
-11,-10h-1l-1168,273l-1167,-273h-1c-6,0,-10,4,-11,10l-2,23c-1,6,4,11,10,11z`,baraboveleftarrow:`M400000 620h-399890l3 -3c68.7 -52.7 113.7 -120 135 -202
c4 -14.7 6 -23 6 -25c0 -7.3 -7 -11 -21 -11c-8 0 -13.2 0.8 -15.5 2.5
c-2.3 1.7 -4.2 5.8 -5.5 12.5c-1.3 4.7 -2.7 10.3 -4 17c-12 48.7 -34.8 92 -68.5 130
s-74.2 66.3 -121.5 85c-10 4 -16 7.7 -18 11c0 8.7 6 14.3 18 17c47.3 18.7 87.8 47
121.5 85s56.5 81.3 68.5 130c0.7 2 1.3 5 2 9s1.2 6.7 1.5 8c0.3 1.3 1 3.3 2 6
s2.2 4.5 3.5 5.5c1.3 1 3.3 1.8 6 2.5s6 1 10 1c14 0 21 -3.7 21 -11
c0 -2 -2 -10.3 -6 -25c-20 -79.3 -65 -146.7 -135 -202l-3 -3h399890z
M100 620v40h399900v-40z M0 241v40h399900v-40zM0 241v40h399900v-40z`,rightarrowabovebar:`M0 241v40h399891c-47.3 35.3-84 78-110 128-16.7 32
-27.7 63.7-33 95 0 1.3-.2 2.7-.5 4-.3 1.3-.5 2.3-.5 3 0 7.3 6.7 11 20 11 8 0
13.2-.8 15.5-2.5 2.3-1.7 4.2-5.5 5.5-11.5 2-13.3 5.7-27 11-41 14.7-44.7 39
-84.5 73-119.5s73.7-60.2 119-75.5c6-2 9-5.7 9-11s-3-9-9-11c-45.3-15.3-85-40.5
-119-75.5s-58.3-74.8-73-119.5c-4.7-14-8.3-27.3-11-40-1.3-6.7-3.2-10.8-5.5
-12.5-2.3-1.7-7.5-2.5-15.5-2.5-14 0-21 3.7-21 11 0 2 2 10.3 6 25 20.7 83.3 67
151.7 139 205zm96 379h399894v40H0zm0 0h399904v40H0z`,baraboveshortleftharpoon:`M507,435c-4,4,-6.3,8.7,-7,14c0,5.3,0.7,9,2,11
c1.3,2,5.3,5.3,12,10c90.7,54,156,130,196,228c3.3,10.7,6.3,16.3,9,17
c2,0.7,5,1,9,1c0,0,5,0,5,0c10.7,0,16.7,-2,18,-6c2,-2.7,1,-9.7,-3,-21
c-32,-87.3,-82.7,-157.7,-152,-211c0,0,-3,-3,-3,-3l399351,0l0,-40
c-398570,0,-399437,0,-399437,0z M593 435 v40 H399500 v-40z
M0 281 v-40 H399908 v40z M0 281 v-40 H399908 v40z`,rightharpoonaboveshortbar:`M0,241 l0,40c399126,0,399993,0,399993,0
c4.7,-4.7,7,-9.3,7,-14c0,-9.3,-3.7,-15.3,-11,-18c-92.7,-56.7,-159,-133.7,-199,
-231c-3.3,-9.3,-6,-14.7,-8,-16c-2,-1.3,-7,-2,-15,-2c-10.7,0,-16.7,2,-18,6
c-2,2.7,-1,9.7,3,21c15.3,42,36.7,81.8,64,119.5c27.3,37.7,58,69.2,92,94.5z
M0 241 v40 H399908 v-40z M0 475 v-40 H399500 v40z M0 475 v-40 H399500 v40z`,shortbaraboveleftharpoon:`M7,435c-4,4,-6.3,8.7,-7,14c0,5.3,0.7,9,2,11
c1.3,2,5.3,5.3,12,10c90.7,54,156,130,196,228c3.3,10.7,6.3,16.3,9,17c2,0.7,5,1,9,
1c0,0,5,0,5,0c10.7,0,16.7,-2,18,-6c2,-2.7,1,-9.7,-3,-21c-32,-87.3,-82.7,-157.7,
-152,-211c0,0,-3,-3,-3,-3l399907,0l0,-40c-399126,0,-399993,0,-399993,0z
M93 435 v40 H400000 v-40z M500 241 v40 H400000 v-40z M500 241 v40 H400000 v-40z`,shortrightharpoonabovebar:`M53,241l0,40c398570,0,399437,0,399437,0
c4.7,-4.7,7,-9.3,7,-14c0,-9.3,-3.7,-15.3,-11,-18c-92.7,-56.7,-159,-133.7,-199,
-231c-3.3,-9.3,-6,-14.7,-8,-16c-2,-1.3,-7,-2,-15,-2c-10.7,0,-16.7,2,-18,6
c-2,2.7,-1,9.7,3,21c15.3,42,36.7,81.8,64,119.5c27.3,37.7,58,69.2,92,94.5z
M500 241 v40 H399408 v-40z M500 435 v40 H400000 v-40z`},Vt=function(){function re(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=re.prototype;return u.hasClass=function(h){return B.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(P){return P.toText()};return this.children.map(h).join("")},re}(),lt=function(u){return u.filter(function(f){return f}).join(" ")},At=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=_)}},ne=function(u){var f=document.createElement(u);f.className=lt(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 P=0;P<this.children.length;P++)f.appendChild(this.children[P].toNode());return f},de=function(u){var f="<"+u;this.classes.length&&(f+=' class="'+B.escape(lt(this.classes))+'"');var h="";for(var _ in this.style)this.style.hasOwnProperty(_)&&(h+=B.hyphenate(_)+":"+this.style[_]+";");h&&(f+=' style="'+B.escape(h)+'"');for(var P in this.attributes)this.attributes.hasOwnProperty(P)&&(f+=" "+P+'="'+B.escape(this.attributes[P])+'"');f+=">";for(var J=0;J<this.children.length;J++)f+=this.children[J].toMarkup();return f+="</"+u+">",f},se=function(){function re(f,h,_,P){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,At.call(this,f,_,P),this.children=h||[]}var u=re.prototype;return u.setAttribute=function(h,_){this.attributes[h]=_},u.hasClass=function(h){return B.contains(this.classes,h)},u.toNode=function(){return ne.call(this,"span")},u.toMarkup=function(){return de.call(this,"span")},re}(),W=function(){function re(f,h,_,P){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,At.call(this,h,P),this.children=_||[],this.setAttribute("href",f)}var u=re.prototype;return u.setAttribute=function(h,_){this.attributes[h]=_},u.hasClass=function(h){return B.contains(this.classes,h)},u.toNode=function(){return ne.call(this,"a")},u.toMarkup=function(){return de.call(this,"a")},re}(),Ie=function(){function re(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=re.prototype;return u.hasClass=function(h){return B.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 P in this.style)this.style.hasOwnProperty(P)&&(_+=B.hyphenate(P)+":"+this.style[P]+";");return _&&(h+=' style="'+B.escape(_)+'"'),h+="'/>",h},re}(),M={\u00EE:"\u0131\u0302",\u00EF:"\u0131\u0308",\u00ED:"\u0131\u0301",\u00EC:"\u0131\u0300"},ce=function(){function re(f,h,_,P,J,Re,Be,Ve){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=P||0,this.skew=J||0,this.width=Re||0,this.classes=Be||[],this.style=Ve||{},this.maxFontSize=0;var yt=Y(this.text.charCodeAt(0));yt&&this.classes.push(yt+"_fallback"),/[îïíì]/.test(this.text)&&(this.text=M[this.text])}var u=re.prototype;return u.hasClass=function(h){return B.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=lt(this.classes));for(var P in this.style)this.style.hasOwnProperty(P)&&(_=_||document.createElement("span"),_.style[P]=this.style[P]);return _?(_.appendChild(h),_):h},u.toMarkup=function(){var h=!1,_="<span";this.classes.length&&(h=!0,_+=' class="',_+=B.escape(lt(this.classes)),_+='"');var P="";this.italic>0&&(P+="margin-right:"+this.italic+"em;");for(var J in this.style)this.style.hasOwnProperty(J)&&(P+=B.hyphenate(J)+":"+this.style[J]+";");P&&(h=!0,_+=' style="'+B.escape(P)+'"');var Re=B.escape(this.text);return h?(_+=">",_+=Re,_+="</span>",_):Re},re}(),q=function(){function re(f,h){this.children=void 0,this.attributes=void 0,this.children=f||[],this.attributes=h||{}}var u=re.prototype;return u.toNode=function(){var h="http://www.w3.org/2000/svg",_=document.createElementNS(h,"svg");for(var P in this.attributes)Object.prototype.hasOwnProperty.call(this.attributes,P)&&_.setAttribute(P,this.attributes[P]);for(var J=0;J<this.children.length;J++)_.appendChild(this.children[J].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 P=0;P<this.children.length;P++)h+=this.children[P].toMarkup();return h+="</svg>",h},re}(),le=function(){function re(f,h){this.pathName=void 0,this.alternate=void 0,this.pathName=f,this.alternate=h}var u=re.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",Ot[this.pathName]),_},u.toMarkup=function(){return this.alternate?"<path d='"+this.alternate+"'/>":"<path d='"+Ot[this.pathName]+"'/>"},re}(),pe=function(){function re(f){this.attributes=void 0,this.attributes=f||{}}var u=re.prototype;return u.toNode=function(){var h="http://www.w3.org/2000/svg",_=document.createElementNS(h,"line");for(var P in this.attributes)Object.prototype.hasOwnProperty.call(this.attributes,P)&&_.setAttribute(P,this.attributes[P]);return _},u.toMarkup=function(){var h="<line";for(var _ in this.attributes)Object.prototype.hasOwnProperty.call(this.attributes,_)&&(h+=" "+_+"='"+this.attributes[_]+"'");return h+="/>",h},re}();function De(re){if(re instanceof ce)return re;throw new Error("Expected symbolNode but got "+String(re)+".")}function Te(re){if(re instanceof se)return re;throw new Error("Expected span<HtmlDomNode> but got "+String(re)+".")}var ke={"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]}},Oe={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]},Ne={\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 nt(re,u){ke[re]=u}function Qe(re,u,f){if(!ke[u])throw new Error("Font metrics not found for font: "+u+".");var h=re.charCodeAt(0),_=ke[u][h];if(!_&&re[0]in Ne&&(h=Ne[re[0]].charCodeAt(0),_=ke[u][h]),!_&&f==="text"&&$e(h)&&(_=ke[u][77]),_)return{depth:_[0],height:_[1],italic:_[2],skew:_[3],width:_[4]}}var Ze={};function pt(re){var u;if(re>=5?u=0:re>=3?u=1:u=2,!Ze[u]){var f=Ze[u]={cssEmPerMu:Oe.quad[u]/18};for(var h in Oe)Oe.hasOwnProperty(h)&&(f[h]=Oe[h][u])}return Ze[u]}var vt={bin:1,close:1,inner:1,open:1,punct:1,rel:1},ct={"accent-token":1,mathord:1,"op-token":1,spacing:1,textord:1},Dt={math:{},text:{}},Ut=Dt;function w(re,u,f,h,_,P){Dt[re][_]={font:u,group:f,replace:h},P&&h&&(Dt[re][h]=Dt[re][_])}var I="math",dt="text",oe="main",Pe="ams",vn="accent-token",je="bin",He="close",tt="inner",he="mathord",ie="op-token",xe="open",Fe="punct",V="rel",at="spacing",Ce="textord";w(I,oe,V,"\u2261","\\equiv",!0),w(I,oe,V,"\u227A","\\prec",!0),w(I,oe,V,"\u227B","\\succ",!0),w(I,oe,V,"\u223C","\\sim",!0),w(I,oe,V,"\u22A5","\\perp"),w(I,oe,V,"\u2AAF","\\preceq",!0),w(I,oe,V,"\u2AB0","\\succeq",!0),w(I,oe,V,"\u2243","\\simeq",!0),w(I,oe,V,"\u2223","\\mid",!0),w(I,oe,V,"\u226A","\\ll",!0),w(I,oe,V,"\u226B","\\gg",!0),w(I,oe,V,"\u224D","\\asymp",!0),w(I,oe,V,"\u2225","\\parallel"),w(I,oe,V,"\u22C8","\\bowtie",!0),w(I,oe,V,"\u2323","\\smile",!0),w(I,oe,V,"\u2291","\\sqsubseteq",!0),w(I,oe,V,"\u2292","\\sqsupseteq",!0),w(I,oe,V,"\u2250","\\doteq",!0),w(I,oe,V,"\u2322","\\frown",!0),w(I,oe,V,"\u220B","\\ni",!0),w(I,oe,V,"\u221D","\\propto",!0),w(I,oe,V,"\u22A2","\\vdash",!0),w(I,oe,V,"\u22A3","\\dashv",!0),w(I,oe,V,"\u220B","\\owns"),w(I,oe,Fe,".","\\ldotp"),w(I,oe,Fe,"\u22C5","\\cdotp"),w(I,oe,Ce,"#","\\#"),w(dt,oe,Ce,"#","\\#"),w(I,oe,Ce,"&","\\&"),w(dt,oe,Ce,"&","\\&"),w(I,oe,Ce,"\u2135","\\aleph",!0),w(I,oe,Ce,"\u2200","\\forall",!0),w(I,oe,Ce,"\u210F","\\hbar",!0),w(I,oe,Ce,"\u2203","\\exists",!0),w(I,oe,Ce,"\u2207","\\nabla",!0),w(I,oe,Ce,"\u266D","\\flat",!0),w(I,oe,Ce,"\u2113","\\ell",!0),w(I,oe,Ce,"\u266E","\\natural",!0),w(I,oe,Ce,"\u2663","\\clubsuit",!0),w(I,oe,Ce,"\u2118","\\wp",!0),w(I,oe,Ce,"\u266F","\\sharp",!0),w(I,oe,Ce,"\u2662","\\diamondsuit",!0),w(I,oe,Ce,"\u211C","\\Re",!0),w(I,oe,Ce,"\u2661","\\heartsuit",!0),w(I,oe,Ce,"\u2111","\\Im",!0),w(I,oe,Ce,"\u2660","\\spadesuit",!0),w(dt,oe,Ce,"\xA7","\\S",!0),w(dt,oe,Ce,"\xB6","\\P",!0),w(I,oe,Ce,"\u2020","\\dag"),w(dt,oe,Ce,"\u2020","\\dag"),w(dt,oe,Ce,"\u2020","\\textdagger"),w(I,oe,Ce,"\u2021","\\ddag"),w(dt,oe,Ce,"\u2021","\\ddag"),w(dt,oe,Ce,"\u2021","\\textdaggerdbl"),w(I,oe,He,"\u23B1","\\rmoustache",!0),w(I,oe,xe,"\u23B0","\\lmoustache",!0),w(I,oe,He,"\u27EF","\\rgroup",!0),w(I,oe,xe,"\u27EE","\\lgroup",!0),w(I,oe,je,"\u2213","\\mp",!0),w(I,oe,je,"\u2296","\\ominus",!0),w(I,oe,je,"\u228E","\\uplus",!0),w(I,oe,je,"\u2293","\\sqcap",!0),w(I,oe,je,"\u2217","\\ast"),w(I,oe,je,"\u2294","\\sqcup",!0),w(I,oe,je,"\u25EF","\\bigcirc"),w(I,oe,je,"\u2219","\\bullet"),w(I,oe,je,"\u2021","\\ddagger"),w(I,oe,je,"\u2240","\\wr",!0),w(I,oe,je,"\u2A3F","\\amalg"),w(I,oe,je,"&","\\And"),w(I,oe,V,"\u27F5","\\longleftarrow",!0),w(I,oe,V,"\u21D0","\\Leftarrow",!0),w(I,oe,V,"\u27F8","\\Longleftarrow",!0),w(I,oe,V,"\u27F6","\\longrightarrow",!0),w(I,oe,V,"\u21D2","\\Rightarrow",!0),w(I,oe,V,"\u27F9","\\Longrightarrow",!0),w(I,oe,V,"\u2194","\\leftrightarrow",!0),w(I,oe,V,"\u27F7","\\longleftrightarrow",!0),w(I,oe,V,"\u21D4","\\Leftrightarrow",!0),w(I,oe,V,"\u27FA","\\Longleftrightarrow",!0),w(I,oe,V,"\u21A6","\\mapsto",!0),w(I,oe,V,"\u27FC","\\longmapsto",!0),w(I,oe,V,"\u2197","\\nearrow",!0),w(I,oe,V,"\u21A9","\\hookleftarrow",!0),w(I,oe,V,"\u21AA","\\hookrightarrow",!0),w(I,oe,V,"\u2198","\\searrow",!0),w(I,oe,V,"\u21BC","\\leftharpoonup",!0),w(I,oe,V,"\u21C0","\\rightharpoonup",!0),w(I,oe,V,"\u2199","\\swarrow",!0),w(I,oe,V,"\u21BD","\\leftharpoondown",!0),w(I,oe,V,"\u21C1","\\rightharpoondown",!0),w(I,oe,V,"\u2196","\\nwarrow",!0),w(I,oe,V,"\u21CC","\\rightleftharpoons",!0),w(I,Pe,V,"\u226E","\\nless",!0),w(I,Pe,V,"\uE010","\\@nleqslant"),w(I,Pe,V,"\uE011","\\@nleqq"),w(I,Pe,V,"\u2A87","\\lneq",!0),w(I,Pe,V,"\u2268","\\lneqq",!0),w(I,Pe,V,"\uE00C","\\@lvertneqq"),w(I,Pe,V,"\u22E6","\\lnsim",!0),w(I,Pe,V,"\u2A89","\\lnapprox",!0),w(I,Pe,V,"\u2280","\\nprec",!0),w(I,Pe,V,"\u22E0","\\npreceq",!0),w(I,Pe,V,"\u22E8","\\precnsim",!0),w(I,Pe,V,"\u2AB9","\\precnapprox",!0),w(I,Pe,V,"\u2241","\\nsim",!0),w(I,Pe,V,"\uE006","\\@nshortmid"),w(I,Pe,V,"\u2224","\\nmid",!0),w(I,Pe,V,"\u22AC","\\nvdash",!0),w(I,Pe,V,"\u22AD","\\nvDash",!0),w(I,Pe,V,"\u22EA","\\ntriangleleft"),w(I,Pe,V,"\u22EC","\\ntrianglelefteq",!0),w(I,Pe,V,"\u228A","\\subsetneq",!0),w(I,Pe,V,"\uE01A","\\@varsubsetneq"),w(I,Pe,V,"\u2ACB","\\subsetneqq",!0),w(I,Pe,V,"\uE017","\\@varsubsetneqq"),w(I,Pe,V,"\u226F","\\ngtr",!0),w(I,Pe,V,"\uE00F","\\@ngeqslant"),w(I,Pe,V,"\uE00E","\\@ngeqq"),w(I,Pe,V,"\u2A88","\\gneq",!0),w(I,Pe,V,"\u2269","\\gneqq",!0),w(I,Pe,V,"\uE00D","\\@gvertneqq"),w(I,Pe,V,"\u22E7","\\gnsim",!0),w(I,Pe,V,"\u2A8A","\\gnapprox",!0),w(I,Pe,V,"\u2281","\\nsucc",!0),w(I,Pe,V,"\u22E1","\\nsucceq",!0),w(I,Pe,V,"\u22E9","\\succnsim",!0),w(I,Pe,V,"\u2ABA","\\succnapprox",!0),w(I,Pe,V,"\u2246","\\ncong",!0),w(I,Pe,V,"\uE007","\\@nshortparallel"),w(I,Pe,V,"\u2226","\\nparallel",!0),w(I,Pe,V,"\u22AF","\\nVDash",!0),w(I,Pe,V,"\u22EB","\\ntriangleright"),w(I,Pe,V,"\u22ED","\\ntrianglerighteq",!0),w(I,Pe,V,"\uE018","\\@nsupseteqq"),w(I,Pe,V,"\u228B","\\supsetneq",!0),w(I,Pe,V,"\uE01B","\\@varsupsetneq"),w(I,Pe,V,"\u2ACC","\\supsetneqq",!0),w(I,Pe,V,"\uE019","\\@varsupsetneqq"),w(I,Pe,V,"\u22AE","\\nVdash",!0),w(I,Pe,V,"\u2AB5","\\precneqq",!0),w(I,Pe,V,"\u2AB6","\\succneqq",!0),w(I,Pe,V,"\uE016","\\@nsubseteqq"),w(I,Pe,je,"\u22B4","\\unlhd"),w(I,Pe,je,"\u22B5","\\unrhd"),w(I,Pe,V,"\u219A","\\nleftarrow",!0),w(I,Pe,V,"\u219B","\\nrightarrow",!0),w(I,Pe,V,"\u21CD","\\nLeftarrow",!0),w(I,Pe,V,"\u21CF","\\nRightarrow",!0),w(I,Pe,V,"\u21AE","\\nleftrightarrow",!0),w(I,Pe,V,"\u21CE","\\nLeftrightarrow",!0),w(I,Pe,V,"\u25B3","\\vartriangle"),w(I,Pe,Ce,"\u210F","\\hslash"),w(I,Pe,Ce,"\u25BD","\\triangledown"),w(I,Pe,Ce,"\u25CA","\\lozenge"),w(I,Pe,Ce,"\u24C8","\\circledS"),w(I,Pe,Ce,"\xAE","\\circledR"),w(dt,Pe,Ce,"\xAE","\\circledR"),w(I,Pe,Ce,"\u2221","\\measuredangle",!0),w(I,Pe,Ce,"\u2204","\\nexists"),w(I,Pe,Ce,"\u2127","\\mho"),w(I,Pe,Ce,"\u2132","\\Finv",!0),w(I,Pe,Ce,"\u2141","\\Game",!0),w(I,Pe,Ce,"\u2035","\\backprime"),w(I,Pe,Ce,"\u25B2","\\blacktriangle"),w(I,Pe,Ce,"\u25BC","\\blacktriangledown"),w(I,Pe,Ce,"\u25A0","\\blacksquare"),w(I,Pe,Ce,"\u29EB","\\blacklozenge"),w(I,Pe,Ce,"\u2605","\\bigstar"),w(I,Pe,Ce,"\u2222","\\sphericalangle",!0),w(I,Pe,Ce,"\u2201","\\complement",!0),w(I,Pe,Ce,"\xF0","\\eth",!0),w(I,Pe,Ce,"\u2571","\\diagup"),w(I,Pe,Ce,"\u2572","\\diagdown"),w(I,Pe,Ce,"\u25A1","\\square"),w(I,Pe,Ce,"\u25A1","\\Box"),w(I,Pe,Ce,"\u25CA","\\Diamond"),w(I,Pe,Ce,"\xA5","\\yen",!0),w(dt,Pe,Ce,"\xA5","\\yen",!0),w(I,Pe,Ce,"\u2713","\\checkmark",!0),w(dt,Pe,Ce,"\u2713","\\checkmark"),w(I,Pe,Ce,"\u2136","\\beth",!0),w(I,Pe,Ce,"\u2138","\\daleth",!0),w(I,Pe,Ce,"\u2137","\\gimel",!0),w(I,Pe,Ce,"\u03DD","\\digamma",!0),w(I,Pe,Ce,"\u03F0","\\varkappa"),w(I,Pe,xe,"\u250C","\\ulcorner",!0),w(I,Pe,He,"\u2510","\\urcorner",!0),w(I,Pe,xe,"\u2514","\\llcorner",!0),w(I,Pe,He,"\u2518","\\lrcorner",!0),w(I,Pe,V,"\u2266","\\leqq",!0),w(I,Pe,V,"\u2A7D","\\leqslant",!0),w(I,Pe,V,"\u2A95","\\eqslantless",!0),w(I,Pe,V,"\u2272","\\lesssim",!0),w(I,Pe,V,"\u2A85","\\lessapprox",!0),w(I,Pe,V,"\u224A","\\approxeq",!0),w(I,Pe,je,"\u22D6","\\lessdot"),w(I,Pe,V,"\u22D8","\\lll",!0),w(I,Pe,V,"\u2276","\\lessgtr",!0),w(I,Pe,V,"\u22DA","\\lesseqgtr",!0),w(I,Pe,V,"\u2A8B","\\lesseqqgtr",!0),w(I,Pe,V,"\u2251","\\doteqdot"),w(I,Pe,V,"\u2253","\\risingdotseq",!0),w(I,Pe,V,"\u2252","\\fallingdotseq",!0),w(I,Pe,V,"\u223D","\\backsim",!0),w(I,Pe,V,"\u22CD","\\backsimeq",!0),w(I,Pe,V,"\u2AC5","\\subseteqq",!0),w(I,Pe,V,"\u22D0","\\Subset",!0),w(I,Pe,V,"\u228F","\\sqsubset",!0),w(I,Pe,V,"\u227C","\\preccurlyeq",!0),w(I,Pe,V,"\u22DE","\\curlyeqprec",!0),w(I,Pe,V,"\u227E","\\precsim",!0),w(I,Pe,V,"\u2AB7","\\precapprox",!0),w(I,Pe,V,"\u22B2","\\vartriangleleft"),w(I,Pe,V,"\u22B4","\\trianglelefteq"),w(I,Pe,V,"\u22A8","\\vDash",!0),w(I,Pe,V,"\u22AA","\\Vvdash",!0),w(I,Pe,V,"\u2323","\\smallsmile"),w(I,Pe,V,"\u2322","\\smallfrown"),w(I,Pe,V,"\u224F","\\bumpeq",!0),w(I,Pe,V,"\u224E","\\Bumpeq",!0),w(I,Pe,V,"\u2267","\\geqq",!0),w(I,Pe,V,"\u2A7E","\\geqslant",!0),w(I,Pe,V,"\u2A96","\\eqslantgtr",!0),w(I,Pe,V,"\u2273","\\gtrsim",!0),w(I,Pe,V,"\u2A86","\\gtrapprox",!0),w(I,Pe,je,"\u22D7","\\gtrdot"),w(I,Pe,V,"\u22D9","\\ggg",!0),w(I,Pe,V,"\u2277","\\gtrless",!0),w(I,Pe,V,"\u22DB","\\gtreqless",!0),w(I,Pe,V,"\u2A8C","\\gtreqqless",!0),w(I,Pe,V,"\u2256","\\eqcirc",!0),w(I,Pe,V,"\u2257","\\circeq",!0),w(I,Pe,V,"\u225C","\\triangleq",!0),w(I,Pe,V,"\u223C","\\thicksim"),w(I,Pe,V,"\u2248","\\thickapprox"),w(I,Pe,V,"\u2AC6","\\supseteqq",!0),w(I,Pe,V,"\u22D1","\\Supset",!0),w(I,Pe,V,"\u2290","\\sqsupset",!0),w(I,Pe,V,"\u227D","\\succcurlyeq",!0),w(I,Pe,V,"\u22DF","\\curlyeqsucc",!0),w(I,Pe,V,"\u227F","\\succsim",!0),w(I,Pe,V,"\u2AB8","\\succapprox",!0),w(I,Pe,V,"\u22B3","\\vartriangleright"),w(I,Pe,V,"\u22B5","\\trianglerighteq"),w(I,Pe,V,"\u22A9","\\Vdash",!0),w(I,Pe,V,"\u2223","\\shortmid"),w(I,Pe,V,"\u2225","\\shortparallel"),w(I,Pe,V,"\u226C","\\between",!0),w(I,Pe,V,"\u22D4","\\pitchfork",!0),w(I,Pe,V,"\u221D","\\varpropto"),w(I,Pe,V,"\u25C0","\\blacktriangleleft"),w(I,Pe,V,"\u2234","\\therefore",!0),w(I,Pe,V,"\u220D","\\backepsilon"),w(I,Pe,V,"\u25B6","\\blacktriangleright"),w(I,Pe,V,"\u2235","\\because",!0),w(I,Pe,V,"\u22D8","\\llless"),w(I,Pe,V,"\u22D9","\\gggtr"),w(I,Pe,je,"\u22B2","\\lhd"),w(I,Pe,je,"\u22B3","\\rhd"),w(I,Pe,V,"\u2242","\\eqsim",!0),w(I,oe,V,"\u22C8","\\Join"),w(I,Pe,V,"\u2251","\\Doteq",!0),w(I,Pe,je,"\u2214","\\dotplus",!0),w(I,Pe,je,"\u2216","\\smallsetminus"),w(I,Pe,je,"\u22D2","\\Cap",!0),w(I,Pe,je,"\u22D3","\\Cup",!0),w(I,Pe,je,"\u2A5E","\\doublebarwedge",!0),w(I,Pe,je,"\u229F","\\boxminus",!0),w(I,Pe,je,"\u229E","\\boxplus",!0),w(I,Pe,je,"\u22C7","\\divideontimes",!0),w(I,Pe,je,"\u22C9","\\ltimes",!0),w(I,Pe,je,"\u22CA","\\rtimes",!0),w(I,Pe,je,"\u22CB","\\leftthreetimes",!0),w(I,Pe,je,"\u22CC","\\rightthreetimes",!0),w(I,Pe,je,"\u22CF","\\curlywedge",!0),w(I,Pe,je,"\u22CE","\\curlyvee",!0),w(I,Pe,je,"\u229D","\\circleddash",!0),w(I,Pe,je,"\u229B","\\circledast",!0),w(I,Pe,je,"\u22C5","\\centerdot"),w(I,Pe,je,"\u22BA","\\intercal",!0),w(I,Pe,je,"\u22D2","\\doublecap"),w(I,Pe,je,"\u22D3","\\doublecup"),w(I,Pe,je,"\u22A0","\\boxtimes",!0),w(I,Pe,V,"\u21E2","\\dashrightarrow",!0),w(I,Pe,V,"\u21E0","\\dashleftarrow",!0),w(I,Pe,V,"\u21C7","\\leftleftarrows",!0),w(I,Pe,V,"\u21C6","\\leftrightarrows",!0),w(I,Pe,V,"\u21DA","\\Lleftarrow",!0),w(I,Pe,V,"\u219E","\\twoheadleftarrow",!0),w(I,Pe,V,"\u21A2","\\leftarrowtail",!0),w(I,Pe,V,"\u21AB","\\looparrowleft",!0),w(I,Pe,V,"\u21CB","\\leftrightharpoons",!0),w(I,Pe,V,"\u21B6","\\curvearrowleft",!0),w(I,Pe,V,"\u21BA","\\circlearrowleft",!0),w(I,Pe,V,"\u21B0","\\Lsh",!0),w(I,Pe,V,"\u21C8","\\upuparrows",!0),w(I,Pe,V,"\u21BF","\\upharpoonleft",!0),w(I,Pe,V,"\u21C3","\\downharpoonleft",!0),w(I,Pe,V,"\u22B8","\\multimap",!0),w(I,Pe,V,"\u21AD","\\leftrightsquigarrow",!0),w(I,Pe,V,"\u21C9","\\rightrightarrows",!0),w(I,Pe,V,"\u21C4","\\rightleftarrows",!0),w(I,Pe,V,"\u21A0","\\twoheadrightarrow",!0),w(I,Pe,V,"\u21A3","\\rightarrowtail",!0),w(I,Pe,V,"\u21AC","\\looparrowright",!0),w(I,Pe,V,"\u21B7","\\curvearrowright",!0),w(I,Pe,V,"\u21BB","\\circlearrowright",!0),w(I,Pe,V,"\u21B1","\\Rsh",!0),w(I,Pe,V,"\u21CA","\\downdownarrows",!0),w(I,Pe,V,"\u21BE","\\upharpoonright",!0),w(I,Pe,V,"\u21C2","\\downharpoonright",!0),w(I,Pe,V,"\u21DD","\\rightsquigarrow",!0),w(I,Pe,V,"\u21DD","\\leadsto"),w(I,Pe,V,"\u21DB","\\Rrightarrow",!0),w(I,Pe,V,"\u21BE","\\restriction"),w(I,oe,Ce,"\u2018","`"),w(I,oe,Ce,"$","\\$"),w(dt,oe,Ce,"$","\\$"),w(dt,oe,Ce,"$","\\textdollar"),w(I,oe,Ce,"%","\\%"),w(dt,oe,Ce,"%","\\%"),w(I,oe,Ce,"_","\\_"),w(dt,oe,Ce,"_","\\_"),w(dt,oe,Ce,"_","\\textunderscore"),w(I,oe,Ce,"\u2220","\\angle",!0),w(I,oe,Ce,"\u221E","\\infty",!0),w(I,oe,Ce,"\u2032","\\prime"),w(I,oe,Ce,"\u25B3","\\triangle"),w(I,oe,Ce,"\u0393","\\Gamma",!0),w(I,oe,Ce,"\u0394","\\Delta",!0),w(I,oe,Ce,"\u0398","\\Theta",!0),w(I,oe,Ce,"\u039B","\\Lambda",!0),w(I,oe,Ce,"\u039E","\\Xi",!0),w(I,oe,Ce,"\u03A0","\\Pi",!0),w(I,oe,Ce,"\u03A3","\\Sigma",!0),w(I,oe,Ce,"\u03A5","\\Upsilon",!0),w(I,oe,Ce,"\u03A6","\\Phi",!0),w(I,oe,Ce,"\u03A8","\\Psi",!0),w(I,oe,Ce,"\u03A9","\\Omega",!0),w(I,oe,Ce,"A","\u0391"),w(I,oe,Ce,"B","\u0392"),w(I,oe,Ce,"E","\u0395"),w(I,oe,Ce,"Z","\u0396"),w(I,oe,Ce,"H","\u0397"),w(I,oe,Ce,"I","\u0399"),w(I,oe,Ce,"K","\u039A"),w(I,oe,Ce,"M","\u039C"),w(I,oe,Ce,"N","\u039D"),w(I,oe,Ce,"O","\u039F"),w(I,oe,Ce,"P","\u03A1"),w(I,oe,Ce,"T","\u03A4"),w(I,oe,Ce,"X","\u03A7"),w(I,oe,Ce,"\xAC","\\neg",!0),w(I,oe,Ce,"\xAC","\\lnot"),w(I,oe,Ce,"\u22A4","\\top"),w(I,oe,Ce,"\u22A5","\\bot"),w(I,oe,Ce,"\u2205","\\emptyset"),w(I,Pe,Ce,"\u2205","\\varnothing"),w(I,oe,he,"\u03B1","\\alpha",!0),w(I,oe,he,"\u03B2","\\beta",!0),w(I,oe,he,"\u03B3","\\gamma",!0),w(I,oe,he,"\u03B4","\\delta",!0),w(I,oe,he,"\u03F5","\\epsilon",!0),w(I,oe,he,"\u03B6","\\zeta",!0),w(I,oe,he,"\u03B7","\\eta",!0),w(I,oe,he,"\u03B8","\\theta",!0),w(I,oe,he,"\u03B9","\\iota",!0),w(I,oe,he,"\u03BA","\\kappa",!0),w(I,oe,he,"\u03BB","\\lambda",!0),w(I,oe,he,"\u03BC","\\mu",!0),w(I,oe,he,"\u03BD","\\nu",!0),w(I,oe,he,"\u03BE","\\xi",!0),w(I,oe,he,"\u03BF","\\omicron",!0),w(I,oe,he,"\u03C0","\\pi",!0),w(I,oe,he,"\u03C1","\\rho",!0),w(I,oe,he,"\u03C3","\\sigma",!0),w(I,oe,he,"\u03C4","\\tau",!0),w(I,oe,he,"\u03C5","\\upsilon",!0),w(I,oe,he,"\u03D5","\\phi",!0),w(I,oe,he,"\u03C7","\\chi",!0),w(I,oe,he,"\u03C8","\\psi",!0),w(I,oe,he,"\u03C9","\\omega",!0),w(I,oe,he,"\u03B5","\\varepsilon",!0),w(I,oe,he,"\u03D1","\\vartheta",!0),w(I,oe,he,"\u03D6","\\varpi",!0),w(I,oe,he,"\u03F1","\\varrho",!0),w(I,oe,he,"\u03C2","\\varsigma",!0),w(I,oe,he,"\u03C6","\\varphi",!0),w(I,oe,je,"\u2217","*"),w(I,oe,je,"+","+"),w(I,oe,je,"\u2212","-"),w(I,oe,je,"\u22C5","\\cdot",!0),w(I,oe,je,"\u2218","\\circ"),w(I,oe,je,"\xF7","\\div",!0),w(I,oe,je,"\xB1","\\pm",!0),w(I,oe,je,"\xD7","\\times",!0),w(I,oe,je,"\u2229","\\cap",!0),w(I,oe,je,"\u222A","\\cup",!0),w(I,oe,je,"\u2216","\\setminus"),w(I,oe,je,"\u2227","\\land"),w(I,oe,je,"\u2228","\\lor"),w(I,oe,je,"\u2227","\\wedge",!0),w(I,oe,je,"\u2228","\\vee",!0),w(I,oe,Ce,"\u221A","\\surd"),w(I,oe,xe,"(","("),w(I,oe,xe,"[","["),w(I,oe,xe,"\u27E8","\\langle",!0),w(I,oe,xe,"\u2223","\\lvert"),w(I,oe,xe,"\u2225","\\lVert"),w(I,oe,He,")",")"),w(I,oe,He,"]","]"),w(I,oe,He,"?","?"),w(I,oe,He,"!","!"),w(I,oe,He,"\u27E9","\\rangle",!0),w(I,oe,He,"\u2223","\\rvert"),w(I,oe,He,"\u2225","\\rVert"),w(I,oe,V,"=","="),w(I,oe,V,"<","<"),w(I,oe,V,">",">"),w(I,oe,V,":",":"),w(I,oe,V,"\u2248","\\approx",!0),w(I,oe,V,"\u2245","\\cong",!0),w(I,oe,V,"\u2265","\\ge"),w(I,oe,V,"\u2265","\\geq",!0),w(I,oe,V,"\u2190","\\gets"),w(I,oe,V,">","\\gt"),w(I,oe,V,"\u2208","\\in",!0),w(I,oe,V,"\uE020","\\@not"),w(I,oe,V,"\u2282","\\subset",!0),w(I,oe,V,"\u2283","\\supset",!0),w(I,oe,V,"\u2286","\\subseteq",!0),w(I,oe,V,"\u2287","\\supseteq",!0),w(I,Pe,V,"\u2288","\\nsubseteq",!0),w(I,Pe,V,"\u2289","\\nsupseteq",!0),w(I,oe,V,"\u22A8","\\models"),w(I,oe,V,"\u2190","\\leftarrow",!0),w(I,oe,V,"\u2264","\\le"),w(I,oe,V,"\u2264","\\leq",!0),w(I,oe,V,"<","\\lt"),w(I,oe,V,"\u2192","\\rightarrow",!0),w(I,oe,V,"\u2192","\\to"),w(I,Pe,V,"\u2271","\\ngeq",!0),w(I,Pe,V,"\u2270","\\nleq",!0),w(I,oe,at,"\xA0","\\ "),w(I,oe,at,"\xA0","~"),w(I,oe,at,"\xA0","\\space"),w(I,oe,at,"\xA0","\\nobreakspace"),w(dt,oe,at,"\xA0","\\ "),w(dt,oe,at,"\xA0","~"),w(dt,oe,at,"\xA0","\\space"),w(dt,oe,at,"\xA0","\\nobreakspace"),w(I,oe,at,null,"\\nobreak"),w(I,oe,at,null,"\\allowbreak"),w(I,oe,Fe,",",","),w(I,oe,Fe,";",";"),w(I,Pe,je,"\u22BC","\\barwedge",!0),w(I,Pe,je,"\u22BB","\\veebar",!0),w(I,oe,je,"\u2299","\\odot",!0),w(I,oe,je,"\u2295","\\oplus",!0),w(I,oe,je,"\u2297","\\otimes",!0),w(I,oe,Ce,"\u2202","\\partial",!0),w(I,oe,je,"\u2298","\\oslash",!0),w(I,Pe,je,"\u229A","\\circledcirc",!0),w(I,Pe,je,"\u22A1","\\boxdot",!0),w(I,oe,je,"\u25B3","\\bigtriangleup"),w(I,oe,je,"\u25BD","\\bigtriangledown"),w(I,oe,je,"\u2020","\\dagger"),w(I,oe,je,"\u22C4","\\diamond"),w(I,oe,je,"\u22C6","\\star"),w(I,oe,je,"\u25C3","\\triangleleft"),w(I,oe,je,"\u25B9","\\triangleright"),w(I,oe,xe,"{","\\{"),w(dt,oe,Ce,"{","\\{"),w(dt,oe,Ce,"{","\\textbraceleft"),w(I,oe,He,"}","\\}"),w(dt,oe,Ce,"}","\\}"),w(dt,oe,Ce,"}","\\textbraceright"),w(I,oe,xe,"{","\\lbrace"),w(I,oe,He,"}","\\rbrace"),w(I,oe,xe,"[","\\lbrack"),w(dt,oe,Ce,"[","\\lbrack"),w(I,oe,He,"]","\\rbrack"),w(dt,oe,Ce,"]","\\rbrack"),w(I,oe,xe,"(","\\lparen"),w(I,oe,He,")","\\rparen"),w(dt,oe,Ce,"<","\\textless"),w(dt,oe,Ce,">","\\textgreater"),w(I,oe,xe,"\u230A","\\lfloor",!0),w(I,oe,He,"\u230B","\\rfloor",!0),w(I,oe,xe,"\u2308","\\lceil",!0),w(I,oe,He,"\u2309","\\rceil",!0),w(I,oe,Ce,"\\","\\backslash"),w(I,oe,Ce,"\u2223","|"),w(I,oe,Ce,"\u2223","\\vert"),w(dt,oe,Ce,"|","\\textbar"),w(I,oe,Ce,"\u2225","\\|"),w(I,oe,Ce,"\u2225","\\Vert"),w(dt,oe,Ce,"\u2225","\\textbardbl"),w(dt,oe,Ce,"~","\\textasciitilde"),w(dt,oe,Ce,"\\","\\textbackslash"),w(dt,oe,Ce,"^","\\textasciicircum"),w(I,oe,V,"\u2191","\\uparrow",!0),w(I,oe,V,"\u21D1","\\Uparrow",!0),w(I,oe,V,"\u2193","\\downarrow",!0),w(I,oe,V,"\u21D3","\\Downarrow",!0),w(I,oe,V,"\u2195","\\updownarrow",!0),w(I,oe,V,"\u21D5","\\Updownarrow",!0),w(I,oe,ie,"\u2210","\\coprod"),w(I,oe,ie,"\u22C1","\\bigvee"),w(I,oe,ie,"\u22C0","\\bigwedge"),w(I,oe,ie,"\u2A04","\\biguplus"),w(I,oe,ie,"\u22C2","\\bigcap"),w(I,oe,ie,"\u22C3","\\bigcup"),w(I,oe,ie,"\u222B","\\int"),w(I,oe,ie,"\u222B","\\intop"),w(I,oe,ie,"\u222C","\\iint"),w(I,oe,ie,"\u222D","\\iiint"),w(I,oe,ie,"\u220F","\\prod"),w(I,oe,ie,"\u2211","\\sum"),w(I,oe,ie,"\u2A02","\\bigotimes"),w(I,oe,ie,"\u2A01","\\bigoplus"),w(I,oe,ie,"\u2A00","\\bigodot"),w(I,oe,ie,"\u222E","\\oint"),w(I,oe,ie,"\u222F","\\oiint"),w(I,oe,ie,"\u2230","\\oiiint"),w(I,oe,ie,"\u2A06","\\bigsqcup"),w(I,oe,ie,"\u222B","\\smallint"),w(dt,oe,tt,"\u2026","\\textellipsis"),w(I,oe,tt,"\u2026","\\mathellipsis"),w(dt,oe,tt,"\u2026","\\ldots",!0),w(I,oe,tt,"\u2026","\\ldots",!0),w(I,oe,tt,"\u22EF","\\@cdots",!0),w(I,oe,tt,"\u22F1","\\ddots",!0),w(I,oe,Ce,"\u22EE","\\varvdots"),w(I,oe,vn,"\u02CA","\\acute"),w(I,oe,vn,"\u02CB","\\grave"),w(I,oe,vn,"\xA8","\\ddot"),w(I,oe,vn,"~","\\tilde"),w(I,oe,vn,"\u02C9","\\bar"),w(I,oe,vn,"\u02D8","\\breve"),w(I,oe,vn,"\u02C7","\\check"),w(I,oe,vn,"^","\\hat"),w(I,oe,vn,"\u20D7","\\vec"),w(I,oe,vn,"\u02D9","\\dot"),w(I,oe,vn,"\u02DA","\\mathring"),w(I,oe,he,"\u0131","\\imath",!0),w(I,oe,he,"\u0237","\\jmath",!0),w(dt,oe,Ce,"\u0131","\\i",!0),w(dt,oe,Ce,"\u0237","\\j",!0),w(dt,oe,Ce,"\xDF","\\ss",!0),w(dt,oe,Ce,"\xE6","\\ae",!0),w(dt,oe,Ce,"\xE6","\\ae",!0),w(dt,oe,Ce,"\u0153","\\oe",!0),w(dt,oe,Ce,"\xF8","\\o",!0),w(dt,oe,Ce,"\xC6","\\AE",!0),w(dt,oe,Ce,"\u0152","\\OE",!0),w(dt,oe,Ce,"\xD8","\\O",!0),w(dt,oe,vn,"\u02CA","\\'"),w(dt,oe,vn,"\u02CB","\\`"),w(dt,oe,vn,"\u02C6","\\^"),w(dt,oe,vn,"\u02DC","\\~"),w(dt,oe,vn,"\u02C9","\\="),w(dt,oe,vn,"\u02D8","\\u"),w(dt,oe,vn,"\u02D9","\\."),w(dt,oe,vn,"\u02DA","\\r"),w(dt,oe,vn,"\u02C7","\\v"),w(dt,oe,vn,"\xA8",'\\"'),w(dt,oe,vn,"\u02DD","\\H"),w(dt,oe,vn,"\u25EF","\\textcircled");var It={"--":!0,"---":!0,"``":!0,"''":!0};w(dt,oe,Ce,"\u2013","--"),w(dt,oe,Ce,"\u2013","\\textendash"),w(dt,oe,Ce,"\u2014","---"),w(dt,oe,Ce,"\u2014","\\textemdash"),w(dt,oe,Ce,"\u2018","`"),w(dt,oe,Ce,"\u2018","\\textquoteleft"),w(dt,oe,Ce,"\u2019","'"),w(dt,oe,Ce,"\u2019","\\textquoteright"),w(dt,oe,Ce,"\u201C","``"),w(dt,oe,Ce,"\u201C","\\textquotedblleft"),w(dt,oe,Ce,"\u201D","''"),w(dt,oe,Ce,"\u201D","\\textquotedblright"),w(I,oe,Ce,"\xB0","\\degree",!0),w(dt,oe,Ce,"\xB0","\\degree"),w(dt,oe,Ce,"\xB0","\\textdegree",!0),w(I,oe,he,"\xA3","\\pounds"),w(I,oe,he,"\xA3","\\mathsterling",!0),w(dt,oe,he,"\xA3","\\pounds"),w(dt,oe,he,"\xA3","\\textsterling",!0),w(I,Pe,Ce,"\u2720","\\maltese"),w(dt,Pe,Ce,"\u2720","\\maltese"),w(dt,oe,at,"\xA0","\\ "),w(dt,oe,at,"\xA0"," "),w(dt,oe,at,"\xA0","~");for(var Bt='0123456789/@."',an=0;an<Bt.length;an++){var en=Bt.charAt(an);w(I,oe,Ce,en,en)}for(var Mt='0123456789!@*()-=+[]<>|";:?/.,',tn=0;tn<Mt.length;tn++){var Ue=Mt.charAt(tn);w(dt,oe,Ce,Ue,Ue)}for(var bt="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz",wt=0;wt<bt.length;wt++){var Me=bt.charAt(wt);w(I,oe,he,Me,Me),w(dt,oe,Ce,Me,Me)}w(I,Pe,Ce,"C","\u2102"),w(dt,Pe,Ce,"C","\u2102"),w(I,Pe,Ce,"H","\u210D"),w(dt,Pe,Ce,"H","\u210D"),w(I,Pe,Ce,"N","\u2115"),w(dt,Pe,Ce,"N","\u2115"),w(I,Pe,Ce,"P","\u2119"),w(dt,Pe,Ce,"P","\u2119"),w(I,Pe,Ce,"Q","\u211A"),w(dt,Pe,Ce,"Q","\u211A"),w(I,Pe,Ce,"R","\u211D"),w(dt,Pe,Ce,"R","\u211D"),w(I,Pe,Ce,"Z","\u2124"),w(dt,Pe,Ce,"Z","\u2124"),w(I,oe,he,"h","\u210E"),w(dt,oe,he,"h","\u210E");for(var Ae="",ut=0;ut<bt.length;ut++){var ft=bt.charAt(ut);Ae=String.fromCharCode(55349,56320+ut),w(I,oe,he,ft,Ae),w(dt,oe,Ce,ft,Ae),Ae=String.fromCharCode(55349,56372+ut),w(I,oe,he,ft,Ae),w(dt,oe,Ce,ft,Ae),Ae=String.fromCharCode(55349,56424+ut),w(I,oe,he,ft,Ae),w(dt,oe,Ce,ft,Ae),Ae=String.fromCharCode(55349,56580+ut),w(I,oe,he,ft,Ae),w(dt,oe,Ce,ft,Ae),Ae=String.fromCharCode(55349,56736+ut),w(I,oe,he,ft,Ae),w(dt,oe,Ce,ft,Ae),Ae=String.fromCharCode(55349,56788+ut),w(I,oe,he,ft,Ae),w(dt,oe,Ce,ft,Ae),Ae=String.fromCharCode(55349,56840+ut),w(I,oe,he,ft,Ae),w(dt,oe,Ce,ft,Ae),Ae=String.fromCharCode(55349,56944+ut),w(I,oe,he,ft,Ae),w(dt,oe,Ce,ft,Ae),ut<26&&(Ae=String.fromCharCode(55349,56632+ut),w(I,oe,he,ft,Ae),w(dt,oe,Ce,ft,Ae),Ae=String.fromCharCode(55349,56476+ut),w(I,oe,he,ft,Ae),w(dt,oe,Ce,ft,Ae))}Ae="\u{1D55C}",w(I,oe,he,"k",Ae),w(dt,oe,Ce,"k",Ae);for(var Nt=0;Nt<10;Nt++){var Pt=Nt.toString();Ae=String.fromCharCode(55349,57294+Nt),w(I,oe,he,Pt,Ae),w(dt,oe,Ce,Pt,Ae),Ae=String.fromCharCode(55349,57314+Nt),w(I,oe,he,Pt,Ae),w(dt,oe,Ce,Pt,Ae),Ae=String.fromCharCode(55349,57324+Nt),w(I,oe,he,Pt,Ae),w(dt,oe,Ce,Pt,Ae),Ae=String.fromCharCode(55349,57334+Nt),w(I,oe,he,Pt,Ae),w(dt,oe,Ce,Pt,Ae)}for(var Zt="\xC7\xD0\xDE\xE7\xFE",Ht=0;Ht<Zt.length;Ht++){var sn=Zt.charAt(Ht);w(I,oe,he,sn,sn),w(dt,oe,Ce,sn,sn)}w(dt,oe,Ce,"\xF0","\xF0"),w(dt,oe,Ce,"\u2013","\u2013"),w(dt,oe,Ce,"\u2014","\u2014"),w(dt,oe,Ce,"\u2018","\u2018"),w(dt,oe,Ce,"\u2019","\u2019"),w(dt,oe,Ce,"\u201C","\u201C"),w(dt,oe,Ce,"\u201D","\u201D");var _n=[["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"]],hn=[["mathbf","textbf","Main-Bold"],["","",""],["mathsf","textsf","SansSerif-Regular"],["mathboldsf","textboldsf","SansSerif-Bold"],["mathtt","texttt","Typewriter-Regular"]],Lt=function(u,f){var h=u.charCodeAt(0),_=u.charCodeAt(1),P=(h-55296)*1024+(_-56320)+65536,J=f==="math"?0:1;if(119808<=P&&P<120484){var Re=Math.floor((P-119808)/26);return[_n[Re][2],_n[Re][J]]}else if(120782<=P&&P<=120831){var Be=Math.floor((P-120782)/10);return[hn[Be][2],hn[Be][J]]}else{if(P===120485||P===120486)return[_n[0][2],_n[0][J]];if(120486<P&&P<120782)return["",""];throw new p("Unsupported character: "+u)}},Ft=[[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],Xt=function(u,f){return f.size<2?u:Ft[u-1][f.size-1]},Wt=function(){function re(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||re.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=re.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 P in h)h.hasOwnProperty(P)&&(_[P]=h[P]);return new re(_)},u.havingStyle=function(h){return this.style===h?this:this.extend({style:h,size:Xt(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 _=Xt(re.BASESIZE,h);return this.size===_&&this.textSize===re.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!==re.BASESIZE?["sizing","reset-size"+this.size,"size"+re.BASESIZE]:[]},u.fontMetrics=function(){return this._fontMetrics||(this._fontMetrics=pt(this.size)),this._fontMetrics},u.getColor=function(){return this.phantom?"transparent":this.color},re}();Wt.BASESIZE=6;var Dn=Wt,pn={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},Gt={ex:!0,em:!0,mu:!0},Je=function(u){return typeof u!="string"&&(u=u.unit),u in pn||u in Gt||u==="ex"},rt=function(u,f){var h;if(u.unit in pn)h=pn[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 p("Invalid unit: '"+u.unit+"'");_!==f&&(h*=_.sizeMultiplier/f.sizeMultiplier)}return Math.min(u.number*h,f.maxSize)},ht=["\\imath","\u0131","\\jmath","\u0237","\\pounds","\\mathsterling","\\textsterling","\xA3"],xt=function(u,f,h){return Ut[h][u]&&Ut[h][u].replace&&(u=Ut[h][u].replace),{value:u,metrics:Qe(u,f,h)}},mt=function(u,f,h,_,P){var J=xt(u,f,h),Re=J.metrics;u=J.value;var Be;if(Re){var Ve=Re.italic;(h==="text"||_&&_.font==="mathit")&&(Ve=0),Be=new ce(u,Re.height,Re.depth,Ve,Re.skew,Re.width,P)}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,P);if(_){Be.maxFontSize=_.sizeMultiplier,_.style.isTight()&&Be.classes.push("mtight");var yt=_.getColor();yt&&(Be.style.color=yt)}return Be},jt=function(u,f,h,_){return _===void 0&&(_=[]),h.font==="boldsymbol"&&xt(u,"Main-Bold",f).metrics?mt(u,"Main-Bold",f,h,_.concat(["mathbf"])):u==="\\"||Ut[f][u].font==="main"?mt(u,"Main-Regular",f,h,_):mt(u,"AMS-Regular",f,h,_.concat(["amsrm"]))},Et=function(u,f,h,_){return/[0-9]/.test(u.charAt(0))||B.contains(ht,u)?{fontName:"Main-Italic",fontClass:"mathit"}:{fontName:"Math-Italic",fontClass:"mathdefault"}},Qt=function(u,f,h,_){return B.contains(ht,u)?{fontName:"Main-Italic",fontClass:"mathit"}:/[0-9]/.test(u.charAt(0))?{fontName:"Caligraphic-Regular",fontClass:"mathcal"}:{fontName:"Math-Italic",fontClass:"mathdefault"}},nn=function(u,f,h,_){return xt(u,"Math-BoldItalic",f).metrics?{fontName:"Math-BoldItalic",fontClass:"boldsymbol"}:{fontName:"Main-Bold",fontClass:"mathbf"}},on=function(u,f,h){var _=u.mode,P=u.text,J=["mord"],Re=_==="math"||_==="text"&&f.font,Be=Re?f.font:f.fontFamily;if(P.charCodeAt(0)===55349){var Ve=Lt(P,_),yt=Ve[0],Rt=Ve[1];return mt(P,yt,_,f,J.concat(Rt))}else if(Be){var Yt,yn;if(Be==="boldsymbol"||Be==="mathnormal"){var An=Be==="boldsymbol"?nn(P,_,f,J):Qt(P,_,f,J);Yt=An.fontName,yn=[An.fontClass]}else B.contains(ht,P)?(Yt="Main-Italic",yn=["mathit"]):Re?(Yt=ur[Be].fontName,yn=[Be]):(Yt=Jn(Be,f.fontWeight,f.fontShape),yn=[Be,f.fontWeight,f.fontShape]);if(xt(P,Yt,_).metrics)return mt(P,Yt,_,f,J.concat(yn));if(It.hasOwnProperty(P)&&Yt.substr(0,10)==="Typewriter"){for(var zn=[],ot=0;ot<P.length;ot++)zn.push(mt(P[ot],Yt,_,f,J.concat(yn)));return Yn(zn)}}if(h==="mathord"){var Cr=Et(P,_,f,J);return mt(P,Cr.fontName,_,f,J.concat([Cr.fontClass]))}else if(h==="textord"){var Ar=Ut[_][P]&&Ut[_][P].font;if(Ar==="ams"){var Lr=Jn("amsrm",f.fontWeight,f.fontShape);return mt(P,Lr,_,f,J.concat("amsrm",f.fontWeight,f.fontShape))}else if(Ar==="main"||!Ar){var Gr=Jn("textrm",f.fontWeight,f.fontShape);return mt(P,Gr,_,f,J.concat(f.fontWeight,f.fontShape))}else{var Jr=Jn(Ar,f.fontWeight,f.fontShape);return mt(P,Jr,_,f,J.concat(Jr,f.fontWeight,f.fontShape))}}else throw new Error("unexpected type: "+h+" in makeOrd")},In=function(u,f){if(lt(u.classes)!==lt(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&&In(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},Kn=function(u){for(var f=0,h=0,_=0,P=0;P<u.children.length;P++){var J=u.children[P];J.height>f&&(f=J.height),J.depth>h&&(h=J.depth),J.maxFontSize>_&&(_=J.maxFontSize)}u.height=f,u.depth=h,u.maxFontSize=_},dn=function(u,f,h,_){var P=new se(u,f,h,_);return Kn(P),P},fn=function(u,f,h,_){return new se(u,f,h,_)},Hn=function(u,f,h){var _=dn([u],[],f);return _.height=Math.max(h||f.fontMetrics().defaultRuleThickness,f.minRuleThickness),_.style.borderBottomWidth=_.height+"em",_.maxFontSize=1,_},Zn=function(u,f,h,_){var P=new W(u,f,h,_);return Kn(P),P},Yn=function(u){var f=new Vt(u);return Kn(f),f},On=function(u,f){return u instanceof Vt?dn([],[u],f):u},Fn=function(u){if(u.positionType==="individualShift"){for(var f=u.children,h=[f[0]],_=-f[0].shift-f[0].elem.depth,P=_,J=1;J<f.length;J++){var Re=-f[J].shift-P-f[J].elem.depth,Be=Re-(f[J-1].elem.height+f[J-1].elem.depth);P=P+Re,h.push({type:"kern",size:Be}),h.push(f[J])}return{children:h,depth:_}}var Ve;if(u.positionType==="top"){for(var yt=u.positionData,Rt=0;Rt<u.children.length;Rt++){var Yt=u.children[Rt];yt-=Yt.type==="kern"?Yt.size:Yt.elem.height+Yt.elem.depth}Ve=yt}else if(u.positionType==="bottom")Ve=-u.positionData;else{var yn=u.children[0];if(yn.type!=="elem")throw new Error('First child must have type "elem".');if(u.positionType==="shift")Ve=-yn.elem.depth-u.positionData;else if(u.positionType==="firstBaseline")Ve=-yn.elem.depth;else throw new Error("Invalid positionType "+u.positionType+".")}return{children:u.children,depth:Ve}},jn=function(u,f){for(var h=Fn(u),_=h.children,P=h.depth,J=0,Re=0;Re<_.length;Re++){var Be=_[Re];if(Be.type==="elem"){var Ve=Be.elem;J=Math.max(J,Ve.maxFontSize,Ve.height)}}J+=2;var yt=dn(["pstrut"],[]);yt.style.height=J+"em";for(var Rt=[],Yt=P,yn=P,An=P,zn=0;zn<_.length;zn++){var ot=_[zn];if(ot.type==="kern")An+=ot.size;else{var Cr=ot.elem,Ar=ot.wrapperClasses||[],Lr=ot.wrapperStyle||{},Gr=dn(Ar,[yt,Cr],void 0,Lr);Gr.style.top=-J-An-Cr.depth+"em",ot.marginLeft&&(Gr.style.marginLeft=ot.marginLeft),ot.marginRight&&(Gr.style.marginRight=ot.marginRight),Rt.push(Gr),An+=Cr.height+Cr.depth}Yt=Math.min(Yt,An),yn=Math.max(yn,An)}var Jr=dn(["vlist"],Rt);Jr.style.height=yn+"em";var li;if(Yt<0){var ui=dn([],[]),pi=dn(["vlist"],[ui]);pi.style.height=-Yt+"em";var Ci=dn(["vlist-s"],[new ce("\u200B")]);li=[dn(["vlist-r"],[Jr,Ci]),dn(["vlist-r"],[pi])]}else li=[dn(["vlist-r"],[Jr])];var mi=dn(["vlist-t"],li);return li.length===2&&mi.classes.push("vlist-t2"),mi.height=yn,mi.depth=-Yt,mi},Bn=function(u,f){var h=dn(["mspace"],[],f),_=rt(u,f);return h.style.marginRight=_+"em",h},Jn=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 P;return f==="textbf"&&h==="textit"?P="BoldItalic":f==="textbf"?P="Bold":f==="textit"?P="Italic":P="Regular",_+"-"+P},ur={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"}},Pn={vec:["vec",.471,.714],oiintSize1:["oiintSize1",.957,.499],oiintSize2:["oiintSize2",1.472,.659],oiiintSize1:["oiiintSize1",1.304,.499],oiiintSize2:["oiiintSize2",1.98,.659]},bn=function(u,f){var h=Pn[u],_=h[0],P=h[1],J=h[2],Re=new le(_),Be=new q([Re],{width:P+"em",height:J+"em",style:"width:"+P+"em",viewBox:"0 0 "+1e3*P+" "+1e3*J,preserveAspectRatio:"xMinYMin"}),Ve=fn(["overlay"],[Be],f);return Ve.height=J,Ve.style.height=J+"em",Ve.style.width=P+"em",Ve},Ge={fontMap:ur,makeSymbol:mt,mathsym:jt,makeSpan:dn,makeSvgSpan:fn,makeLineSpan:Hn,makeAnchor:Zn,makeFragment:Yn,wrapFragment:On,makeVList:jn,makeOrd:on,makeGlue:Bn,staticSvg:bn,svgData:Pn,tryCombineChars:wn};function mn(re,u){var f=Mn(re,u);if(!f)throw new Error("Expected node of type "+u+", but got "+(re?"node of type "+re.type:String(re)));return f}function Mn(re,u){return re&&re.type===u?re:null}function Tn(re,u){var f=Xn(re,u);if(!f)throw new Error('Expected node of type "atom" and family "'+u+'", but got '+(re?re.type==="atom"?"atom of family "+re.family:"node of type "+re.type:String(re)));return f}function Xn(re,u){return re&&re.type==="atom"&&re.family===u?re:null}function sr(re){var u=ar(re);if(!u)throw new Error("Expected node of symbol group type, but got "+(re?"node of type "+re.type:String(re)));return u}function ar(re){return re&&(re.type==="atom"||ct.hasOwnProperty(re.type))?re:null}var Un={number:3,unit:"mu"},tr={number:4,unit:"mu"},xn={number:5,unit:"mu"},gn={mord:{mop:Un,mbin:tr,mrel:xn,minner:Un},mop:{mord:Un,mop:Un,mrel:xn,minner:Un},mbin:{mord:tr,mop:tr,mopen:tr,minner:tr},mrel:{mord:xn,mop:xn,mopen:xn,minner:xn},mopen:{},mclose:{mop:Un,mbin:tr,mrel:xn,minner:Un},mpunct:{mord:Un,mop:Un,mrel:xn,mopen:Un,mclose:Un,mpunct:Un,minner:Un},minner:{mord:Un,mop:Un,mbin:tr,mrel:xn,mopen:Un,mpunct:Un,minner:Un}},Vn={mord:{mop:Un},mop:{mord:Un,mop:Un},mbin:{},mrel:{},mopen:{},mclose:{mop:Un},mpunct:{},minner:{mop:Un}},nr={},pr={},Mr={};function Cn(re){for(var u=re.type,f=re.names,h=re.props,_=re.handler,P=re.htmlBuilder,J=re.mathmlBuilder,Re={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)nr[f[Be]]=Re;u&&(P&&(pr[u]=P),J&&(Mr[u]=J))}function Sr(re){var u=re.type,f=re.htmlBuilder,h=re.mathmlBuilder;Cn({type:u,names:[],props:{numArgs:0},handler:function(){throw new Error("Should never be called.")},htmlBuilder:f,mathmlBuilder:h})}var mr=function(u){var f=Mn(u,"ordgroup");return f?f.body:[u]},_r=Ge.makeSpan,zr=["leftmost","mbin","mopen","mrel","mop","mpunct"],Or=["rightmost","mrel","mclose","mpunct"],wr={display:y.DISPLAY,text:y.TEXT,script:y.SCRIPT,scriptscript:y.SCRIPTSCRIPT},Nr={mord:"mord",mop:"mop",mbin:"mbin",mrel:"mrel",mopen:"mopen",mclose:"mclose",mpunct:"mpunct",minner:"minner"},vr=function(u,f,h,_){_===void 0&&(_=[null,null]);for(var P=[],J=0;J<u.length;J++){var Re=cr(u[J],f);if(Re instanceof Vt){var Be=Re.children;P.push.apply(P,Be)}else P.push(Re)}if(!h)return P;var Ve=f;if(u.length===1){var yt=Mn(u[0],"sizing")||Mn(u[0],"styling");yt&&(yt.type==="sizing"?Ve=f.havingSize(yt.size):yt.type==="styling"&&(Ve=f.havingStyle(wr[yt.style])))}var Rt=_r([_[0]||"leftmost"],[],f),Yt=_r([_[1]||"rightmost"],[],f);return ei(P,function(yn,An){var zn=An.classes[0],ot=yn.classes[0];zn==="mbin"&&B.contains(Or,ot)?An.classes[0]="mord":ot==="mbin"&&B.contains(zr,zn)&&(yn.classes[0]="mord")},{node:Rt},Yt),ei(P,function(yn,An){var zn=Xr(An),ot=Xr(yn),Cr=zn&&ot?yn.hasClass("mtight")?Vn[zn][ot]:gn[zn][ot]:null;if(Cr)return Ge.makeGlue(Cr,Ve)},{node:Rt},Yt),P},ei=function re(u,f,h,_){_&&u.push(_);for(var P=0;P<u.length;P++){var J=u[P],Re=qn(J);if(Re){re(Re.children,f,h);continue}if(J.classes[0]!=="mspace"){var Be=f(J,h.node);Be&&(h.insertAfter?h.insertAfter(Be):(u.unshift(Be),P++)),h.node=J,h.insertAfter=function(Ve){return function(yt){u.splice(Ve+1,0,yt),P++}}(P)}}_&&u.pop()},qn=function(u){return u instanceof Vt||u instanceof W?u:null},oi=function re(u,f){var h=qn(u);if(h){var _=h.children;if(_.length){if(f==="right")return re(_[_.length-1],"right");if(f==="left")return re(_[0],"left")}}return u},Xr=function(u,f){return u?(f&&(u=oi(u,f)),Nr[u.classes[0]]||null):null},ti=function(u,f){var h=["nulldelimiter"].concat(u.baseSizingClasses());return _r(f.concat(h))},cr=function(u,f,h){if(!u)return _r();if(pr[u.type]){var _=pr[u.type](u,f);if(h&&f.size!==h.size){_=_r(f.sizingClasses(h),[_],f);var P=f.sizeMultiplier/h.sizeMultiplier;_.height*=P,_.depth*=P}return _}else throw new p("Got group of unknown type: '"+u.type+"'")};function fi(re,u){var f=_r(["base"],re,u),h=_r(["strut"]);return h.style.height=f.height+f.depth+"em",h.style.verticalAlign=-f.depth+"em",f.children.unshift(h),f}function xi(re,u){var f=null;re.length===1&&re[0].type==="tag"&&(f=re[0].tag,re=re[0].body);for(var h=vr(re,u,!0),_=[],P=[],J=0;J<h.length;J++)if(P.push(h[J]),h[J].hasClass("mbin")||h[J].hasClass("mrel")||h[J].hasClass("allowbreak")){for(var Re=!1;J<h.length-1&&h[J+1].hasClass("mspace")&&!h[J+1].hasClass("newline");)J++,P.push(h[J]),h[J].hasClass("nobreak")&&(Re=!0);Re||(_.push(fi(P,u)),P=[])}else h[J].hasClass("newline")&&(P.pop(),P.length>0&&(_.push(fi(P,u)),P=[]),_.push(h[J]));P.length>0&&_.push(fi(P,u));var Be;f&&(Be=fi(vr(f,u,!0)),Be.classes=["tag"],_.push(Be));var Ve=_r(["katex-html"],_);if(Ve.setAttribute("aria-hidden","true"),Be){var yt=Be.children[0];yt.style.height=Ve.height+Ve.depth+"em",yt.style.verticalAlign=-Ve.depth+"em"}return Ve}function vi(re){return new Vt(re)}var or=function(){function re(f,h){this.type=void 0,this.attributes=void 0,this.children=void 0,this.type=f,this.attributes={},this.children=h||[]}var u=re.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 P=0;P<this.children.length;P++)h.appendChild(this.children[P].toNode());return h},u.toMarkup=function(){var h="<"+this.type;for(var _ in this.attributes)Object.prototype.hasOwnProperty.call(this.attributes,_)&&(h+=" "+_+'="',h+=B.escape(this.attributes[_]),h+='"');h+=">";for(var P=0;P<this.children.length;P++)h+=this.children[P].toMarkup();return h+="</"+this.type+">",h},u.toText=function(){return this.children.map(function(h){return h.toText()}).join("")},re}(),yi=function(){function re(f){this.text=void 0,this.text=f}var u=re.prototype;return u.toNode=function(){return document.createTextNode(this.text)},u.toMarkup=function(){return B.escape(this.toText())},u.toText=function(){return this.text},re}(),Er=function(){function re(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=re.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:" "},re}(),qt={MathNode:or,TextNode:yi,SpaceNode:Er,newDocumentFragment:vi},dr=function(u,f,h){return Ut[f][u]&&Ut[f][u].replace&&u.charCodeAt(0)!==55349&&!(It.hasOwnProperty(u)&&h&&(h.fontFamily&&h.fontFamily.substr(4,2)==="tt"||h.font&&h.font.substr(4,2)==="tt"))&&(u=Ut[f][u].replace),new qt.TextNode(u)},Tr=function(u){return u.length===1?u[0]:new qt.MathNode("mrow",u)},Nn=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 P=u.text;if(B.contains(["\\imath","\\jmath"],P))return null;Ut[_][P]&&Ut[_][P].replace&&(P=Ut[_][P].replace);var J=Ge.fontMap[h].fontName;return Qe(P,J,_)?Ge.fontMap[h].variant:null},kn=function(u,f,h){if(u.length===1){var _=En(u[0],f);return h&&_ instanceof or&&_.type==="mo"&&(_.setAttribute("lspace","0em"),_.setAttribute("rspace","0em")),[_]}for(var P=[],J,Re=0;Re<u.length;Re++){var Be=En(u[Re],f);if(Be instanceof or&&J instanceof or){if(Be.type==="mtext"&&J.type==="mtext"&&Be.getAttribute("mathvariant")===J.getAttribute("mathvariant")){var Ve;(Ve=J.children).push.apply(Ve,Be.children);continue}else if(Be.type==="mn"&&J.type==="mn"){var yt;(yt=J.children).push.apply(yt,Be.children);continue}else if(Be.type==="mi"&&Be.children.length===1&&J.type==="mn"){var Rt=Be.children[0];if(Rt instanceof yi&&Rt.text==="."){var Yt;(Yt=J.children).push.apply(Yt,Be.children);continue}}else if(J.type==="mi"&&J.children.length===1){var yn=J.children[0];if(yn instanceof yi&&yn.text==="\u0338"&&(Be.type==="mo"||Be.type==="mi"||Be.type==="mn")){var An=Be.children[0];An instanceof yi&&An.text.length>0&&(An.text=An.text.slice(0,1)+"\u0338"+An.text.slice(1),P.pop())}}}P.push(Be),J=Be}return P},Sn=function(u,f,h){return Tr(kn(u,f,h))},En=function(u,f){if(!u)return new qt.MathNode("mrow");if(Mr[u.type]){var h=Mr[u.type](u,f);return h}else throw new p("Got group of unknown type: '"+u.type+"'")};function Qn(re,u,f,h){var _=kn(re,f),P;_.length===1&&_[0]instanceof or&&B.contains(["mrow","mtable"],_[0].type)?P=_[0]:P=new qt.MathNode("mrow",_);var J=new qt.MathNode("annotation",[new qt.TextNode(u)]);J.setAttribute("encoding","application/x-tex");var Re=new qt.MathNode("semantics",[P,J]),Be=new qt.MathNode("math",[Re]);Be.setAttribute("xmlns","http://www.w3.org/1998/Math/MathML");var Ve=h?"katex":"katex-mathml";return Ge.makeSpan([Ve],[Be])}var gr=function(u){return new Dn({style:u.displayMode?y.DISPLAY:y.TEXT,maxSize:u.maxSize,minRuleThickness:u.minRuleThickness})},Kr=function(u,f){if(f.displayMode){var h=["katex-display"];f.leqno&&h.push("leqno"),f.fleqn&&h.push("fleqn"),u=Ge.makeSpan(h,[u])}return u},Pr=function(u,f,h){var _=gr(h),P;if(h.output==="mathml")return Qn(u,f,_,!0);if(h.output==="html"){var J=xi(u,_);P=Ge.makeSpan(["katex"],[J])}else{var Re=Qn(u,f,_,!1),Be=xi(u,_);P=Ge.makeSpan(["katex"],[Re,Be])}return Kr(P,h)},Rr=function(u,f,h){var _=gr(h),P=xi(u,_),J=Ge.makeSpan(["katex"],[P]);return Kr(J,h)},rr=Pr,Br={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"},ni=function(u){var f=new qt.MathNode("mo",[new qt.TextNode(Br[u.substr(1)])]);return f.setAttribute("stretchy","true"),f},ci={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]},Ni=function(u){return u.type==="ordgroup"?u.body.length:1},_i=function(u,f){function h(){var Be=4e5,Ve=u.label.substr(1);if(B.contains(["widehat","widecheck","widetilde","utilde"],Ve)){var yt=u,Rt=Ni(yt.base),Yt,yn,An;if(Rt>5)Ve==="widehat"||Ve==="widecheck"?(Yt=420,Be=2364,An=.42,yn=Ve+"4"):(Yt=312,Be=2340,An=.34,yn="tilde4");else{var zn=[1,1,2,2,3,3][Rt];Ve==="widehat"||Ve==="widecheck"?(Be=[0,1062,2364,2364,2364][zn],Yt=[0,239,300,360,420][zn],An=[0,.24,.3,.3,.36,.42][zn],yn=Ve+zn):(Be=[0,600,1033,2339,2340][zn],Yt=[0,260,286,306,312][zn],An=[0,.26,.286,.3,.306,.34][zn],yn="tilde"+zn)}var ot=new le(yn),Cr=new q([ot],{width:"100%",height:An+"em",viewBox:"0 0 "+Be+" "+Yt,preserveAspectRatio:"none"});return{span:Ge.makeSvgSpan([],[Cr],f),minWidth:0,height:An}}else{var Ar=[],Lr=ci[Ve],Gr=Lr[0],Jr=Lr[1],li=Lr[2],ui=li/1e3,pi=Gr.length,Ci,mi;if(pi===1){var Vr=Lr[3];Ci=["hide-tail"],mi=[Vr]}else if(pi===2)Ci=["halfarrow-left","halfarrow-right"],mi=["xMinYMin","xMaxYMin"];else if(pi===3)Ci=["brace-left","brace-center","brace-right"],mi=["xMinYMin","xMidYMin","xMaxYMin"];else throw new Error(`Correct katexImagesData or update code here to support
`+pi+" children.");for(var $i=0;$i<pi;$i++){var Zi=new le(Gr[$i]),gi=new q([Zi],{width:"400em",height:ui+"em",viewBox:"0 0 "+Be+" "+li,preserveAspectRatio:mi[$i]+" slice"}),Ai=Ge.makeSvgSpan([Ci[$i]],[gi],f);if(pi===1)return{span:Ai,minWidth:Jr,height:ui};Ai.style.height=ui+"em",Ar.push(Ai)}return{span:Ge.makeSpan(["stretchy"],Ar,f),minWidth:Jr,height:ui}}}var _=h(),P=_.span,J=_.minWidth,Re=_.height;return P.height=Re,P.style.height=Re+"em",J>0&&(P.style.minWidth=J+"em"),P},Wn=function(u,f,h,_){var P,J=u.height+u.depth+2*h;if(/fbox|color/.test(f)){if(P=Ge.makeSpan(["stretchy",f],[],_),f==="fbox"){var Re=_.color&&_.getColor();Re&&(P.style.borderColor=Re)}}else{var Be=[];/^[bx]cancel$/.test(f)&&Be.push(new pe({x1:"0",y1:"0",x2:"100%",y2:"100%","stroke-width":"0.046em"})),/^x?cancel$/.test(f)&&Be.push(new pe({x1:"0",y1:"100%",x2:"100%",y2:"0","stroke-width":"0.046em"}));var Ve=new q(Be,{width:"100%",height:J+"em"});P=Ge.makeSvgSpan([],[Ve],_)}return P.height=J,P.style.height=J+"em",P},ir={encloseSpan:Wn,mathMLnode:ni,svgSpan:_i},$r=function(u,f){var h,_,P=Mn(u,"supsub"),J;P?(_=mn(P.base,"accent"),h=_.base,P.base=h,J=Te(cr(P,f)),P.base=_):(_=mn(u,"accent"),h=_.base);var Re=cr(h,f.havingCrampedStyle()),Be=_.isShifty&&B.isCharacterBox(h),Ve=0;if(Be){var yt=B.getBaseElem(h),Rt=cr(yt,f.havingCrampedStyle());Ve=De(Rt).skew}var Yt=Math.min(Re.height,f.fontMetrics().xHeight),yn;if(_.isStretchy)yn=ir.svgSpan(_,f),yn=Ge.makeVList({positionType:"firstBaseline",children:[{type:"elem",elem:Re},{type:"elem",elem:yn,wrapperClasses:["svg-align"],wrapperStyle:Ve>0?{width:"calc(100% - "+2*Ve+"em)",marginLeft:2*Ve+"em"}:void 0}]},f);else{var An,zn;_.label==="\\vec"?(An=Ge.staticSvg("vec",f),zn=Ge.svgData.vec[1]):(An=Ge.makeOrd({mode:_.mode,text:_.label},f,"textord"),An=De(An),An.italic=0,zn=An.width),yn=Ge.makeSpan(["accent-body"],[An]);var ot=_.label==="\\textcircled";ot&&(yn.classes.push("accent-full"),Yt=Re.height);var Cr=Ve;ot||(Cr-=zn/2),yn.style.left=Cr+"em",_.label==="\\textcircled"&&(yn.style.top=".2em"),yn=Ge.makeVList({positionType:"firstBaseline",children:[{type:"elem",elem:Re},{type:"kern",size:-Yt},{type:"elem",elem:yn}]},f)}var Ar=Ge.makeSpan(["mord","accent"],[yn],f);return J?(J.children[0]=Ar,J.height=Math.max(Ar.height,J.height),J.classes[0]="mord",J):Ar},ri=function(u,f){var h=u.isStretchy?ir.mathMLnode(u.label):new qt.MathNode("mo",[dr(u.label,u.mode)]),_=new qt.MathNode("mover",[En(u.base,f),h]);return _.setAttribute("accent","true"),_},Ur=new RegExp(["\\acute","\\grave","\\ddot","\\tilde","\\bar","\\breve","\\check","\\hat","\\vec","\\dot","\\mathring"].map(function(re){return"\\"+re}).join("|"));Cn({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],_=!Ur.test(u.funcName),P=!_||u.funcName==="\\widehat"||u.funcName==="\\widetilde"||u.funcName==="\\widecheck";return{type:"accent",mode:u.parser.mode,label:u.funcName,isStretchy:_,isShifty:P,base:h}},htmlBuilder:$r,mathmlBuilder:ri}),Cn({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:$r,mathmlBuilder:ri}),Cn({type:"accentUnder",names:["\\underleftarrow","\\underrightarrow","\\underleftrightarrow","\\undergroup","\\underlinesegment","\\utilde"],props:{numArgs:1},handler:function(u,f){var h=u.parser,_=u.funcName,P=f[0];return{type:"accentUnder",mode:h.mode,label:_,base:P}},htmlBuilder:function(u,f){var h=cr(u.base,f),_=ir.svgSpan(u,f),P=u.label==="\\utilde"?.12:0,J=Ge.makeVList({positionType:"bottom",positionData:_.height+P,children:[{type:"elem",elem:_,wrapperClasses:["svg-align"]},{type:"kern",size:P},{type:"elem",elem:h}]},f);return Ge.makeSpan(["mord","accentunder"],[J],f)},mathmlBuilder:function(u,f){var h=ir.mathMLnode(u.label),_=new qt.MathNode("munder",[En(u.base,f),h]);return _.setAttribute("accentunder","true"),_}});var Ri=function(u){var f=new qt.MathNode("mpadded",u?[u]:[]);return f.setAttribute("width","+0.6em"),f.setAttribute("lspace","0.3em"),f};Cn({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,P=u.funcName;return{type:"xArrow",mode:_.mode,label:P,body:f[0],below:h[0]}},htmlBuilder:function(u,f){var h=f.style,_=f.havingStyle(h.sup()),P=Ge.wrapFragment(cr(u.body,_,f),f);P.classes.push("x-arrow-pad");var J;u.below&&(_=f.havingStyle(h.sub()),J=Ge.wrapFragment(cr(u.below,_,f),f),J.classes.push("x-arrow-pad"));var Re=ir.svgSpan(u,f),Be=-f.fontMetrics().axisHeight+.5*Re.height,Ve=-f.fontMetrics().axisHeight-.5*Re.height-.111;(P.depth>.25||u.label==="\\xleftequilibrium")&&(Ve-=P.depth);var yt;if(J){var Rt=-f.fontMetrics().axisHeight+J.height+.5*Re.height+.111;yt=Ge.makeVList({positionType:"individualShift",children:[{type:"elem",elem:P,shift:Ve},{type:"elem",elem:Re,shift:Be},{type:"elem",elem:J,shift:Rt}]},f)}else yt=Ge.makeVList({positionType:"individualShift",children:[{type:"elem",elem:P,shift:Ve},{type:"elem",elem:Re,shift:Be}]},f);return yt.children[0].children[0].children[1].classes.push("svg-align"),Ge.makeSpan(["mrel","x-arrow"],[yt],f)},mathmlBuilder:function(u,f){var h=ir.mathMLnode(u.label),_;if(u.body){var P=Ri(En(u.body,f));if(u.below){var J=Ri(En(u.below,f));_=new qt.MathNode("munderover",[h,J,P])}else _=new qt.MathNode("mover",[h,P])}else if(u.below){var Re=Ri(En(u.below,f));_=new qt.MathNode("munder",[h,Re])}else _=Ri(),_=new qt.MathNode("mover",[h,_]);return _}}),Cn({type:"textord",names:["\\@char"],props:{numArgs:1,allowedInText:!0},handler:function(u,f){for(var h=u.parser,_=mn(f[0],"ordgroup"),P=_.body,J="",Re=0;Re<P.length;Re++){var Be=mn(P[Re],"textord");J+=Be.text}var Ve=parseInt(J);if(isNaN(Ve))throw new p("\\@char has non-numeric argument "+J);return{type:"textord",mode:h.mode,text:String.fromCharCode(Ve)}}});var Fi=function(u,f){var h=vr(u.body,f.withColor(u.color),!1);return Ge.makeFragment(h)},Li=function(u,f){var h=kn(u.body,f.withColor(u.color)),_=new qt.MathNode("mstyle",h);return _.setAttribute("mathcolor",u.color),_};Cn({type:"color",names:["\\textcolor"],props:{numArgs:2,allowedInText:!0,greediness:3,argTypes:["color","original"]},handler:function(u,f){var h=u.parser,_=mn(f[0],"color-token").color,P=f[1];return{type:"color",mode:h.mode,color:_,body:mr(P)}},htmlBuilder:Fi,mathmlBuilder:Li}),Cn({type:"color",names:["\\color"],props:{numArgs:1,allowedInText:!0,greediness:3,argTypes:["color"]},handler:function(u,f){var h=u.parser,_=u.breakOnTokenText,P=mn(f[0],"color-token").color;h.gullet.macros.set("\\current@color",P);var J=h.parseExpression(!0,_);return{type:"color",mode:h.mode,color:P,body:J}},htmlBuilder:Fi,mathmlBuilder:Li}),Cn({type:"cr",names:["\\cr","\\newline"],props:{numArgs:0,numOptionalArgs:1,argTypes:["size"],allowedInText:!0},handler:function(u,f,h){var _=u.parser,P=u.funcName,J=h[0],Re=P==="\\cr",Be=!1;return Re||(_.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:Re,size:J&&mn(J,"size").value}},htmlBuilder:function(u,f){if(u.newRow)throw new p("\\cr valid only within a tabular/array environment");var h=Ge.makeSpan(["mspace"],[],f);return u.newLine&&(h.classes.push("newline"),u.size&&(h.style.marginTop=rt(u.size,f)+"em")),h},mathmlBuilder:function(u,f){var h=new qt.MathNode("mspace");return u.newLine&&(h.setAttribute("linebreak","newline"),u.size&&h.setAttribute("height",rt(u.size,f)+"em")),h}});var Di=function(u,f,h){var _=Ut.math[u]&&Ut.math[u].replace,P=Qe(_||u,f,h);if(!P)throw new Error("Unsupported symbol "+u+" and font size "+f+".");return P},is=function(u,f,h,_){var P=h.havingBaseStyle(f),J=Ge.makeSpan(_.concat(P.sizingClasses(h)),[u],h),Re=P.sizeMultiplier/h.sizeMultiplier;return J.height*=Re,J.depth*=Re,J.maxFontSize=P.sizeMultiplier,J},ss=function(u,f,h){var _=f.havingBaseStyle(h),P=(1-f.sizeMultiplier/_.sizeMultiplier)*f.fontMetrics().axisHeight;u.classes.push("delimcenter"),u.style.top=P+"em",u.height-=P,u.depth+=P},cs=function(u,f,h,_,P,J){var Re=Ge.makeSymbol(u,"Main-Regular",P,_),Be=is(Re,f,_,J);return h&&ss(Be,_,f),Be},Wi=function(u,f,h,_){return Ge.makeSymbol(u,"Size"+f+"-Regular",h,_)},ds=function(u,f,h,_,P,J){var Re=Wi(u,f,P,_),Be=is(Ge.makeSpan(["delimsizing","size"+f],[Re],_),y.TEXT,_,J);return h&&ss(Be,_,y.TEXT),Be},di=function(u,f,h){var _;f==="Size1-Regular"?_="delim-size1":_="delim-size4";var P=Ge.makeSpan(["delimsizinginner",_],[Ge.makeSpan([],[Ge.makeSymbol(u,f,h)])]);return{type:"elem",elem:P}},Si={type:"kern",size:-.005},fs=function(u,f,h,_,P,J){var Re,Be,Ve,yt;Re=Ve=yt=u,Be=null;var Rt="Size1-Regular";u==="\\uparrow"?Ve=yt="\u23D0":u==="\\Uparrow"?Ve=yt="\u2016":u==="\\downarrow"?Re=Ve="\u23D0":u==="\\Downarrow"?Re=Ve="\u2016":u==="\\updownarrow"?(Re="\\uparrow",Ve="\u23D0",yt="\\downarrow"):u==="\\Updownarrow"?(Re="\\Uparrow",Ve="\u2016",yt="\\Downarrow"):u==="["||u==="\\lbrack"?(Re="\u23A1",Ve="\u23A2",yt="\u23A3",Rt="Size4-Regular"):u==="]"||u==="\\rbrack"?(Re="\u23A4",Ve="\u23A5",yt="\u23A6",Rt="Size4-Regular"):u==="\\lfloor"||u==="\u230A"?(Ve=Re="\u23A2",yt="\u23A3",Rt="Size4-Regular"):u==="\\lceil"||u==="\u2308"?(Re="\u23A1",Ve=yt="\u23A2",Rt="Size4-Regular"):u==="\\rfloor"||u==="\u230B"?(Ve=Re="\u23A5",yt="\u23A6",Rt="Size4-Regular"):u==="\\rceil"||u==="\u2309"?(Re="\u23A4",Ve=yt="\u23A5",Rt="Size4-Regular"):u==="("||u==="\\lparen"?(Re="\u239B",Ve="\u239C",yt="\u239D",Rt="Size4-Regular"):u===")"||u==="\\rparen"?(Re="\u239E",Ve="\u239F",yt="\u23A0",Rt="Size4-Regular"):u==="\\{"||u==="\\lbrace"?(Re="\u23A7",Be="\u23A8",yt="\u23A9",Ve="\u23AA",Rt="Size4-Regular"):u==="\\}"||u==="\\rbrace"?(Re="\u23AB",Be="\u23AC",yt="\u23AD",Ve="\u23AA",Rt="Size4-Regular"):u==="\\lgroup"||u==="\u27EE"?(Re="\u23A7",yt="\u23A9",Ve="\u23AA",Rt="Size4-Regular"):u==="\\rgroup"||u==="\u27EF"?(Re="\u23AB",yt="\u23AD",Ve="\u23AA",Rt="Size4-Regular"):u==="\\lmoustache"||u==="\u23B0"?(Re="\u23A7",yt="\u23AD",Ve="\u23AA",Rt="Size4-Regular"):(u==="\\rmoustache"||u==="\u23B1")&&(Re="\u23AB",yt="\u23A9",Ve="\u23AA",Rt="Size4-Regular");var Yt=Di(Re,Rt,P),yn=Yt.height+Yt.depth,An=Di(Ve,Rt,P),zn=An.height+An.depth,ot=Di(yt,Rt,P),Cr=ot.height+ot.depth,Ar=0,Lr=1;if(Be!==null){var Gr=Di(Be,Rt,P);Ar=Gr.height+Gr.depth,Lr=2}var Jr=yn+Cr+Ar,li=Math.max(0,Math.ceil((f-Jr)/(Lr*zn))),ui=Jr+li*Lr*zn,pi=_.fontMetrics().axisHeight;h&&(pi*=_.sizeMultiplier);var Ci=ui/2-pi,mi=(li+1)*.005-zn,Vr=[];if(Vr.push(di(yt,Rt,P)),Be===null)for(var $i=0;$i<li;$i++)Vr.push(Si),Vr.push(di(Ve,Rt,P));else{for(var Zi=0;Zi<li;Zi++)Vr.push(Si),Vr.push(di(Ve,Rt,P));Vr.push({type:"kern",size:mi}),Vr.push(di(Ve,Rt,P)),Vr.push(Si),Vr.push(di(Be,Rt,P));for(var gi=0;gi<li;gi++)Vr.push(Si),Vr.push(di(Ve,Rt,P))}Vr.push({type:"kern",size:mi}),Vr.push(di(Ve,Rt,P)),Vr.push(Si),Vr.push(di(Re,Rt,P));var Ai=_.havingBaseStyle(y.TEXT),es=Ge.makeVList({positionType:"bottom",positionData:Ci,children:Vr},Ai);return is(Ge.makeSpan(["delimsizing","mult"],[es],Ai),y.TEXT,_,J)},Qi=80,Ji=.08,Hi=function(u,f,h,_,P){var J=un(u,_,h),Re=new le(u,J),Be=new q([Re],{width:"400em",height:f+"em",viewBox:"0 0 400000 "+h,preserveAspectRatio:"xMinYMin slice"});return Ge.makeSvgSpan(["hide-tail"],[Be],P)},Ir=function(u,f){var h=f.havingBaseSizing(),_=Bi("\\surd",u*h.sizeMultiplier,wi,h),P=h.sizeMultiplier,J=Math.max(0,f.minRuleThickness-f.fontMetrics().sqrtRuleThickness),Re,Be=0,Ve=0,yt=0,Rt;return _.type==="small"?(yt=1e3+1e3*J+Qi,u<1?P=1:u<1.4&&(P=.7),Be=(1+J+Ji)/P,Ve=(1+J)/P,Re=Hi("sqrtMain",Be,yt,J,f),Re.style.minWidth="0.853em",Rt=.833/P):_.type==="large"?(yt=(1e3+Qi)*Qr[_.size],Ve=(Qr[_.size]+J)/P,Be=(Qr[_.size]+J+Ji)/P,Re=Hi("sqrtSize"+_.size,Be,yt,J,f),Re.style.minWidth="1.02em",Rt=1/P):(Be=u+J+Ji,Ve=u+J,yt=Math.floor(1e3*u+J)+Qi,Re=Hi("sqrtTall",Be,yt,J,f),Re.style.minWidth="0.742em",Rt=1.056),Re.height=Ve,Re.style.height=Be+"em",{span:Re,advanceWidth:Rt,ruleWidth:(f.fontMetrics().sqrtRuleThickness+J)*P}},br=["(","\\lparen",")","\\rparen","[","\\lbrack","]","\\rbrack","\\{","\\lbrace","\\}","\\rbrace","\\lfloor","\\rfloor","\u230A","\u230B","\\lceil","\\rceil","\u2308","\u2309","\\surd"],hi=["\\uparrow","\\downarrow","\\updownarrow","\\Uparrow","\\Downarrow","\\Updownarrow","|","\\|","\\vert","\\Vert","\\lvert","\\rvert","\\lVert","\\rVert","\\lgroup","\\rgroup","\u27EE","\u27EF","\\lmoustache","\\rmoustache","\u23B0","\u23B1"],bi=["<",">","\\langle","\\rangle","/","\\backslash","\\lt","\\gt"],Qr=[0,1.2,1.8,2.4,3],ii=function(u,f,h,_,P){if(u==="<"||u==="\\lt"||u==="\u27E8"?u="\\langle":(u===">"||u==="\\gt"||u==="\u27E9")&&(u="\\rangle"),B.contains(br,u)||B.contains(bi,u))return ds(u,f,!1,h,_,P);if(B.contains(hi,u))return fs(u,Qr[f],!1,h,_,P);throw new p("Illegal delimiter: '"+u+"'")},Ei=[{type:"small",style:y.SCRIPTSCRIPT},{type:"small",style:y.SCRIPT},{type:"small",style:y.TEXT},{type:"large",size:1},{type:"large",size:2},{type:"large",size:3},{type:"large",size:4}],Ii=[{type:"small",style:y.SCRIPTSCRIPT},{type:"small",style:y.SCRIPT},{type:"small",style:y.TEXT},{type:"stack"}],wi=[{type:"small",style:y.SCRIPTSCRIPT},{type:"small",style:y.SCRIPT},{type:"small",style:y.TEXT},{type:"large",size:1},{type:"large",size:2},{type:"large",size:3},{type:"large",size:4},{type:"stack"}],Gi=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.")},Bi=function(u,f,h,_){for(var P=Math.min(2,3-_.style.size),J=P;J<h.length&&h[J].type!=="stack";J++){var Re=Di(u,Gi(h[J]),"math"),Be=Re.height+Re.depth;if(h[J].type==="small"){var Ve=_.havingBaseStyle(h[J].style);Be*=Ve.sizeMultiplier}if(Be>f)return h[J]}return h[h.length-1]},hs=function(u,f,h,_,P,J){u==="<"||u==="\\lt"||u==="\u27E8"?u="\\langle":(u===">"||u==="\\gt"||u==="\u27E9")&&(u="\\rangle");var Re;B.contains(bi,u)?Re=Ei:B.contains(br,u)?Re=wi:Re=Ii;var Be=Bi(u,f,Re,_);return Be.type==="small"?cs(u,Be.style,h,_,P,J):Be.type==="large"?ds(u,Be.size,h,_,P,J):fs(u,f,h,_,P,J)},Ws=function(u,f,h,_,P,J){var Re=_.fontMetrics().axisHeight*_.sizeMultiplier,Be=901,Ve=5/_.fontMetrics().ptPerEm,yt=Math.max(f-Re,h+Re),Rt=Math.max(yt/500*Be,2*yt-Ve);return hs(u,Rt,!0,_,P,J)},Oi={sqrtImage:Ir,sizedDelim:ii,customSizedDelim:hs,leftRightDelim:Ws},Os={"\\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}},Ps=["(","\\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 ps(re,u){var f=ar(re);if(f&&B.contains(Ps,f.text))return f;throw new p("Invalid delimiter: '"+(f?f.text:JSON.stringify(re))+"' after '"+u.funcName+"'",re)}Cn({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=ps(f[0],u);return{type:"delimsizing",mode:u.parser.mode,size:Os[u.funcName].size,mclass:Os[u.funcName].mclass,delim:h.text}},htmlBuilder:function(u,f){return u.delim==="."?Ge.makeSpan([u.mclass]):Oi.sizedDelim(u.delim,u.size,f,u.mode,[u.mclass])},mathmlBuilder:function(u){var f=[];u.delim!=="."&&f.push(dr(u.delim,u.mode));var h=new qt.MathNode("mo",f);return u.mclass==="mopen"||u.mclass==="mclose"?h.setAttribute("fence","true"):h.setAttribute("fence","false"),h}});function ks(re){if(!re.body)throw new Error("Bug: The leftright ParseNode wasn't fully parsed.")}Cn({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 p("\\current@color set to non-string in \\right");return{type:"leftright-right",mode:u.parser.mode,delim:ps(f[0],u).text,color:h}}}),Cn({type:"leftright",names:["\\left"],props:{numArgs:1},handler:function(u,f){var h=ps(f[0],u),_=u.parser;++_.leftrightDepth;var P=_.parseExpression(!1);--_.leftrightDepth,_.expect("\\right",!1);var J=mn(_.parseFunction(),"leftright-right");return{type:"leftright",mode:_.mode,body:P,left:h.text,right:J.delim,rightColor:J.color}},htmlBuilder:function(u,f){ks(u);for(var h=vr(u.body,f,!0,["mopen","mclose"]),_=0,P=0,J=!1,Re=0;Re<h.length;Re++)h[Re].isMiddle?J=!0:(_=Math.max(h[Re].height,_),P=Math.max(h[Re].depth,P));_*=f.sizeMultiplier,P*=f.sizeMultiplier;var Be;if(u.left==="."?Be=ti(f,["mopen"]):Be=Oi.leftRightDelim(u.left,_,P,f,u.mode,["mopen"]),h.unshift(Be),J)for(var Ve=1;Ve<h.length;Ve++){var yt=h[Ve],Rt=yt.isMiddle;Rt&&(h[Ve]=Oi.leftRightDelim(Rt.delim,_,P,Rt.options,u.mode,[]))}var Yt;if(u.right===".")Yt=ti(f,["mclose"]);else{var yn=u.rightColor?f.withColor(u.rightColor):f;Yt=Oi.leftRightDelim(u.right,_,P,yn,u.mode,["mclose"])}return h.push(Yt),Ge.makeSpan(["minner"],h,f)},mathmlBuilder:function(u,f){ks(u);var h=kn(u.body,f);if(u.left!=="."){var _=new qt.MathNode("mo",[dr(u.left,u.mode)]);_.setAttribute("fence","true"),h.unshift(_)}if(u.right!=="."){var P=new qt.MathNode("mo",[dr(u.right,u.mode)]);P.setAttribute("fence","true"),u.rightColor&&P.setAttribute("mathcolor",u.rightColor),h.push(P)}return Tr(h)}}),Cn({type:"middle",names:["\\middle"],props:{numArgs:1},handler:function(u,f){var h=ps(f[0],u);if(!u.parser.leftrightDepth)throw new p("\\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=ti(f,[]);else{h=Oi.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==="|"?dr("|","text"):dr(u.delim,u.mode),_=new qt.MathNode("mo",[h]);return _.setAttribute("fence","true"),_.setAttribute("lspace","0.05em"),_.setAttribute("rspace","0.05em"),_}});var xs=function(u,f){var h=Ge.wrapFragment(cr(u.body,f),f),_=u.label.substr(1),P=f.sizeMultiplier,J,Re=0,Be=B.isCharacterBox(u.body);if(_==="sout")J=Ge.makeSpan(["stretchy","sout"]),J.height=f.fontMetrics().defaultRuleThickness/P,Re=-.5*f.fontMetrics().xHeight;else{/cancel/.test(_)?Be||h.classes.push("cancel-pad"):h.classes.push("boxpad");var Ve=0,yt=0;/box/.test(_)?(yt=Math.max(f.fontMetrics().fboxrule,f.minRuleThickness),Ve=f.fontMetrics().fboxsep+(_==="colorbox"?0:yt)):Ve=Be?.2:0,J=ir.encloseSpan(h,_,Ve,f),/fbox|boxed|fcolorbox/.test(_)&&(J.style.borderStyle="solid",J.style.borderWidth=yt+"em"),Re=h.depth+Ve,u.backgroundColor&&(J.style.backgroundColor=u.backgroundColor,u.borderColor&&(J.style.borderColor=u.borderColor))}var Rt;return u.backgroundColor?Rt=Ge.makeVList({positionType:"individualShift",children:[{type:"elem",elem:J,shift:Re},{type:"elem",elem:h,shift:0}]},f):Rt=Ge.makeVList({positionType:"individualShift",children:[{type:"elem",elem:h,shift:0},{type:"elem",elem:J,shift:Re,wrapperClasses:/cancel/.test(_)?["svg-align"]:[]}]},f),/cancel/.test(_)&&(Rt.height=h.height,Rt.depth=h.depth),/cancel/.test(_)&&!Be?Ge.makeSpan(["mord","cancel-lap"],[Rt],f):Ge.makeSpan(["mord"],[Rt],f)},Es=function(u,f){var h=0,_=new qt.MathNode(u.label.indexOf("colorbox")>-1?"mpadded":"menclose",[En(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 P=Math.max(f.fontMetrics().fboxrule,f.minRuleThickness);_.setAttribute("style","border: "+P+"em solid "+String(u.borderColor))}break;case"\\xcancel":_.setAttribute("notation","updiagonalstrike downdiagonalstrike");break}return u.backgroundColor&&_.setAttribute("mathbackground",u.backgroundColor),_};Cn({type:"enclose",names:["\\colorbox"],props:{numArgs:2,allowedInText:!0,greediness:3,argTypes:["color","text"]},handler:function(u,f,h){var _=u.parser,P=u.funcName,J=mn(f[0],"color-token").color,Re=f[1];return{type:"enclose",mode:_.mode,label:P,backgroundColor:J,body:Re}},htmlBuilder:xs,mathmlBuilder:Es}),Cn({type:"enclose",names:["\\fcolorbox"],props:{numArgs:3,allowedInText:!0,greediness:3,argTypes:["color","color","text"]},handler:function(u,f,h){var _=u.parser,P=u.funcName,J=mn(f[0],"color-token").color,Re=mn(f[1],"color-token").color,Be=f[2];return{type:"enclose",mode:_.mode,label:P,backgroundColor:Re,borderColor:J,body:Be}},htmlBuilder:xs,mathmlBuilder:Es}),Cn({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]}}}),Cn({type:"enclose",names:["\\cancel","\\bcancel","\\xcancel","\\sout"],props:{numArgs:1},handler:function(u,f,h){var _=u.parser,P=u.funcName,J=f[0];return{type:"enclose",mode:_.mode,label:P,body:J}},htmlBuilder:xs,mathmlBuilder:Es});var Ms={};function Pi(re){for(var u=re.type,f=re.names,h=re.props,_=re.handler,P=re.htmlBuilder,J=re.mathmlBuilder,Re={type:u,numArgs:h.numArgs||0,greediness:1,allowedInText:!1,numOptionalArgs:0,handler:_},Be=0;Be<f.length;++Be)Ms[f[Be]]=Re;P&&(pr[u]=P),J&&(Mr[u]=J)}function Gs(re){var u=[];re.consumeSpaces();for(var f=re.fetch().text;f==="\\hline"||f==="\\hdashline";)re.consume(),u.push(f==="\\hdashline"),re.consumeSpaces(),f=re.fetch().text;return u}function Zr(re,u,f){var h=u.hskipBeforeAndAfter,_=u.addJot,P=u.cols,J=u.arraystretch,Re=u.colSeparationType;if(re.gullet.beginGroup(),re.gullet.macros.set("\\\\","\\cr"),!J){var Be=re.gullet.expandMacroAsText("\\arraystretch");if(Be==null)J=1;else if(J=parseFloat(Be),!J||J<0)throw new p("Invalid \\arraystretch: "+Be)}re.gullet.beginGroup();var Ve=[],yt=[Ve],Rt=[],Yt=[];for(Yt.push(Gs(re));;){var yn=re.parseExpression(!1,"\\cr");re.gullet.endGroup(),re.gullet.beginGroup(),yn={type:"ordgroup",mode:re.mode,body:yn},f&&(yn={type:"styling",mode:re.mode,style:f,body:[yn]}),Ve.push(yn);var An=re.fetch().text;if(An==="&")re.consume();else if(An==="\\end"){Ve.length===1&&yn.type==="styling"&&yn.body[0].body.length===0&&yt.pop(),Yt.length<yt.length+1&&Yt.push([]);break}else if(An==="\\cr"){var zn=mn(re.parseFunction(),"cr");Rt.push(zn.size),Yt.push(Gs(re)),Ve=[],yt.push(Ve)}else throw new p("Expected & or \\\\ or \\cr or \\end",re.nextToken)}return re.gullet.endGroup(),re.gullet.endGroup(),{type:"array",mode:re.mode,addJot:_,arraystretch:J,body:yt,cols:P,rowGaps:Rt,hskipBeforeAndAfter:h,hLinesBeforeRow:Yt,colSeparationType:Re}}function Hr(re){return re.substr(0,1)==="d"?"display":"text"}var jr=function(u,f){var h,_,P=u.body.length,J=u.hLinesBeforeRow,Re=0,Be=new Array(P),Ve=[],yt=Math.max(f.fontMetrics().arrayRuleWidth,f.minRuleThickness),Rt=1/f.fontMetrics().ptPerEm,Yt=5*Rt;if(u.colSeparationType&&u.colSeparationType==="small"){var yn=f.havingStyle(y.SCRIPT).sizeMultiplier;Yt=.2778*(yn/f.sizeMultiplier)}var An=12*Rt,zn=3*Rt,ot=u.arraystretch*An,Cr=.7*ot,Ar=.3*ot,Lr=0;function Gr(Ca){for(var ta=0;ta<Ca.length;++ta)ta>0&&(Lr+=.25),Ve.push({pos:Lr,isDashed:Ca[ta]})}for(Gr(J[0]),h=0;h<u.body.length;++h){var Jr=u.body[h],li=Cr,ui=Ar;Re<Jr.length&&(Re=Jr.length);var pi=new Array(Jr.length);for(_=0;_<Jr.length;++_){var Ci=cr(Jr[_],f);ui<Ci.depth&&(ui=Ci.depth),li<Ci.height&&(li=Ci.height),pi[_]=Ci}var mi=u.rowGaps[h],Vr=0;mi&&(Vr=rt(mi,f),Vr>0&&(Vr+=Ar,ui<Vr&&(ui=Vr),Vr=0)),u.addJot&&(ui+=zn),pi.height=li,pi.depth=ui,Lr+=li,pi.pos=Lr,Lr+=ui+Vr,Be[h]=pi,Gr(J[h+1])}var $i=Lr/2+f.fontMetrics().axisHeight,Zi=u.cols||[],gi=[],Ai,es;for(_=0,es=0;_<Re||es<Zi.length;++_,++es){for(var Vi=Zi[es]||{},no=!0;Vi.type==="separator";){if(no||(Ai=Ge.makeSpan(["arraycolsep"],[]),Ai.style.width=f.fontMetrics().doubleRuleSep+"em",gi.push(Ai)),Vi.separator==="|"||Vi.separator===":"){var To=Vi.separator==="|"?"solid":"dashed",ys=Ge.makeSpan(["vertical-separator"],[],f);ys.style.height=Lr+"em",ys.style.borderRightWidth=yt+"em",ys.style.borderRightStyle=To,ys.style.margin="0 -"+yt/2+"em",ys.style.verticalAlign=-(Lr-$i)+"em",gi.push(ys)}else throw new p("Invalid separator type: "+Vi.separator);es++,Vi=Zi[es]||{},no=!1}if(!(_>=Re)){var ki=void 0;(_>0||u.hskipBeforeAndAfter)&&(ki=B.deflt(Vi.pregap,Yt),ki!==0&&(Ai=Ge.makeSpan(["arraycolsep"],[]),Ai.style.width=ki+"em",gi.push(Ai)));var ts=[];for(h=0;h<P;++h){var zs=Be[h],ea=zs[_];if(ea){var Ea=zs.pos-$i;ea.depth=zs.depth,ea.height=zs.height,ts.push({type:"elem",elem:ea,shift:Ea})}}ts=Ge.makeVList({positionType:"individualShift",children:ts},f),ts=Ge.makeSpan(["col-align-"+(Vi.align||"c")],[ts]),gi.push(ts),(_<Re-1||u.hskipBeforeAndAfter)&&(ki=B.deflt(Vi.postgap,Yt),ki!==0&&(Ai=Ge.makeSpan(["arraycolsep"],[]),Ai.style.width=ki+"em",gi.push(Ai)))}}if(Be=Ge.makeSpan(["mtable"],gi),Ve.length>0){for(var Ks=Ge.makeLineSpan("hline",f,yt),Co=Ge.makeLineSpan("hdashline",f,yt),Sa=[{type:"elem",elem:Be,shift:0}];Ve.length>0;){var wa=Ve.pop(),Ta=wa.pos-$i;wa.isDashed?Sa.push({type:"elem",elem:Co,shift:Ta}):Sa.push({type:"elem",elem:Ks,shift:Ta})}Be=Ge.makeVList({positionType:"individualShift",children:Sa},f)}return Ge.makeSpan(["mord"],[Be],f)},Ti={c:"center ",l:"left ",r:"right "},si=function(u,f){var h=new qt.MathNode("mtable",u.body.map(function(Lr){return new qt.MathNode("mtr",Lr.map(function(Gr){return new qt.MathNode("mtd",[En(Gr,f)])}))})),_=u.arraystretch===.5?.1:.16+u.arraystretch-1+(u.addJot?.09:0);h.setAttribute("rowspacing",_+"em");var P="",J="";if(u.cols){var Re=u.cols,Be="",Ve=!1,yt=0,Rt=Re.length;Re[0].type==="separator"&&(P+="top ",yt=1),Re[Re.length-1].type==="separator"&&(P+="bottom ",Rt-=1);for(var Yt=yt;Yt<Rt;Yt++)Re[Yt].type==="align"?(J+=Ti[Re[Yt].align],Ve&&(Be+="none "),Ve=!0):Re[Yt].type==="separator"&&Ve&&(Be+=Re[Yt].separator==="|"?"solid ":"dashed ",Ve=!1);h.setAttribute("columnalign",J.trim()),/[sd]/.test(Be)&&h.setAttribute("columnlines",Be.trim())}if(u.colSeparationType==="align"){for(var yn=u.cols||[],An="",zn=1;zn<yn.length;zn++)An+=zn%2?"0em ":"1em ";h.setAttribute("columnspacing",An.trim())}else u.colSeparationType==="alignat"?h.setAttribute("columnspacing","0em"):u.colSeparationType==="small"?h.setAttribute("columnspacing","0.2778em"):h.setAttribute("columnspacing","1em");var ot="",Cr=u.hLinesBeforeRow;P+=Cr[0].length>0?"left ":"",P+=Cr[Cr.length-1].length>0?"right ":"";for(var Ar=1;Ar<Cr.length-1;Ar++)ot+=Cr[Ar].length===0?"none ":Cr[Ar][0]?"dashed ":"solid ";return/[sd]/.test(ot)&&h.setAttribute("rowlines",ot.trim()),P!==""&&(h=new qt.MathNode("menclose",[h]),h.setAttribute("notation",P.trim())),u.arraystretch&&u.arraystretch<1&&(h=new qt.MathNode("mstyle",[h]),h.setAttribute("scriptlevel","1")),h},ms=function(u,f){var h=[],_=Zr(u.parser,{cols:h,addJot:!0},"display"),P,J=0,Re={type:"ordgroup",mode:u.mode,body:[]},Be=Mn(f[0],"ordgroup");if(Be){for(var Ve="",yt=0;yt<Be.body.length;yt++){var Rt=mn(Be.body[yt],"textord");Ve+=Rt.text}P=Number(Ve),J=P*2}var Yt=!J;_.body.forEach(function(ot){for(var Cr=1;Cr<ot.length;Cr+=2){var Ar=mn(ot[Cr],"styling"),Lr=mn(Ar.body[0],"ordgroup");Lr.body.unshift(Re)}if(Yt)J<ot.length&&(J=ot.length);else{var Gr=ot.length/2;if(P<Gr)throw new p("Too many math in a row: "+("expected "+P+", but got "+Gr),ot[0])}});for(var yn=0;yn<J;++yn){var An="r",zn=0;yn%2===1?An="l":yn>0&&Yt&&(zn=1),h[yn]={type:"align",align:An,pregap:zn,postgap:0}}return _.colSeparationType=Yt?"align":"alignat",_};Pi({type:"array",names:["array","darray"],props:{numArgs:1},handler:function(u,f){var h=ar(f[0]),_=h?[f[0]]:mn(f[0],"ordgroup").body,P=_.map(function(Re){var Be=sr(Re),Ve=Be.text;if("lcr".indexOf(Ve)!==-1)return{type:"align",align:Ve};if(Ve==="|")return{type:"separator",separator:"|"};if(Ve===":")return{type:"separator",separator:":"};throw new p("Unknown column alignment: "+Ve,Re)}),J={cols:P,hskipBeforeAndAfter:!0};return Zr(u.parser,J,Hr(u.envName))},htmlBuilder:jr,mathmlBuilder:si}),Pi({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},_=Zr(u.parser,h,Hr(u.envName));return f?{type:"leftright",mode:u.mode,body:[_],left:f[0],right:f[1],rightColor:void 0}:_},htmlBuilder:jr,mathmlBuilder:si}),Pi({type:"array",names:["smallmatrix"],props:{numArgs:0},handler:function(u){var f={arraystretch:.5},h=Zr(u.parser,f,"script");return h.colSeparationType="small",h},htmlBuilder:jr,mathmlBuilder:si}),Pi({type:"array",names:["subarray"],props:{numArgs:1},handler:function(u,f){var h=ar(f[0]),_=h?[f[0]]:mn(f[0],"ordgroup").body,P=_.map(function(Re){var Be=sr(Re),Ve=Be.text;if("lc".indexOf(Ve)!==-1)return{type:"align",align:Ve};throw new p("Unknown column alignment: "+Ve,Re)});if(P.length>1)throw new p("{subarray} can contain only one column");var J={cols:P,hskipBeforeAndAfter:!1,arraystretch:.5};if(J=Zr(u.parser,J,"script"),J.body[0].length>1)throw new p("{subarray} can contain only one column");return J},htmlBuilder:jr,mathmlBuilder:si}),Pi({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=Zr(u.parser,f,Hr(u.envName));return{type:"leftright",mode:u.mode,body:[h],left:"\\{",right:".",rightColor:void 0}},htmlBuilder:jr,mathmlBuilder:si}),Pi({type:"array",names:["aligned"],props:{numArgs:0},handler:ms,htmlBuilder:jr,mathmlBuilder:si}),Pi({type:"array",names:["gathered"],props:{numArgs:0},handler:function(u){var f={cols:[{type:"align",align:"c"}],addJot:!0};return Zr(u.parser,f,"display")},htmlBuilder:jr,mathmlBuilder:si}),Pi({type:"array",names:["alignedat"],props:{numArgs:1},handler:ms,htmlBuilder:jr,mathmlBuilder:si}),Cn({type:"text",names:["\\hline","\\hdashline"],props:{numArgs:0,allowedInText:!0,allowedInMath:!0},handler:function(u,f){throw new p(u.funcName+" valid only within array environment")}});var cn=Ms,Ss=cn;Cn({type:"environment",names:["\\begin","\\end"],props:{numArgs:1,argTypes:["text"]},handler:function(u,f){var h=u.parser,_=u.funcName,P=f[0];if(P.type!=="ordgroup")throw new p("Invalid environment name",P);for(var J="",Re=0;Re<P.body.length;++Re)J+=mn(P.body[Re],"textord").text;if(_==="\\begin"){if(!Ss.hasOwnProperty(J))throw new p("No such environment: "+J,P);var Be=Ss[J],Ve=h.parseArguments("\\begin{"+J+"}",Be),yt=Ve.args,Rt=Ve.optArgs,Yt={mode:h.mode,envName:J,parser:h},yn=Be.handler(Yt,yt,Rt);h.expect("\\end",!1);var An=h.nextToken,zn=mn(h.parseFunction(),"environment");if(zn.name!==J)throw new p("Mismatch: \\begin{"+J+"} matched by \\end{"+zn.name+"}",An);return yn}return{type:"environment",mode:h.mode,name:J,nameGroup:P}}});var Ns=Ge.makeSpan;function ws(re,u){var f=vr(re.body,u,!0);return Ns([re.mclass],f,u)}function as(re,u){var f,h=kn(re.body,u);return re.mclass==="minner"?qt.newDocumentFragment(h):(re.mclass==="mord"?re.isCharacterBox?(f=h[0],f.type="mi"):f=new qt.MathNode("mi",h):(re.isCharacterBox?(f=h[0],f.type="mo"):f=new qt.MathNode("mo",h),re.mclass==="mbin"?(f.attributes.lspace="0.22em",f.attributes.rspace="0.22em"):re.mclass==="mpunct"?(f.attributes.lspace="0em",f.attributes.rspace="0.17em"):(re.mclass==="mopen"||re.mclass==="mclose")&&(f.attributes.lspace="0em",f.attributes.rspace="0em")),f)}Cn({type:"mclass",names:["\\mathord","\\mathbin","\\mathrel","\\mathopen","\\mathclose","\\mathpunct","\\mathinner"],props:{numArgs:1},handler:function(u,f){var h=u.parser,_=u.funcName,P=f[0];return{type:"mclass",mode:h.mode,mclass:"m"+_.substr(5),body:mr(P),isCharacterBox:B.isCharacterBox(P)}},htmlBuilder:ws,mathmlBuilder:as});var qi=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"};Cn({type:"mclass",names:["\\@binrel"],props:{numArgs:2},handler:function(u,f){var h=u.parser;return{type:"mclass",mode:h.mode,mclass:qi(f[0]),body:[f[1]],isCharacterBox:B.isCharacterBox(f[1])}}}),Cn({type:"mclass",names:["\\stackrel","\\overset","\\underset"],props:{numArgs:2},handler:function(u,f){var h=u.parser,_=u.funcName,P=f[1],J=f[0],Re;_!=="\\stackrel"?Re=qi(P):Re="mrel";var Be={type:"op",mode:P.mode,limits:!0,alwaysHandleSupSub:!0,parentIsSupSub:!1,symbol:!1,suppressBaseShift:_!=="\\stackrel",body:mr(P)},Ve={type:"supsub",mode:J.mode,base:Be,sup:_==="\\underset"?null:J,sub:_==="\\underset"?J:null};return{type:"mclass",mode:h.mode,mclass:Re,body:[Ve],isCharacterBox:B.isCharacterBox(Ve)}},htmlBuilder:ws,mathmlBuilder:as});var Fs=function(u,f){var h=u.font,_=f.withFont(h);return cr(u.body,_)},Oa=function(u,f){var h=u.font,_=f.withFont(h);return En(u.body,_)},Pa={"\\Bbb":"\\mathbb","\\bold":"\\mathbf","\\frak":"\\mathfrak","\\bm":"\\boldsymbol"};Cn({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,P=f[0],J=_;return J in Pa&&(J=Pa[J]),{type:"font",mode:h.mode,font:J.slice(1),body:P}},htmlBuilder:Fs,mathmlBuilder:Oa}),Cn({type:"mclass",names:["\\boldsymbol","\\bm"],props:{numArgs:1,greediness:2},handler:function(u,f){var h=u.parser,_=f[0],P=B.isCharacterBox(_);return{type:"mclass",mode:h.mode,mclass:qi(_),body:[{type:"font",mode:h.mode,font:"boldsymbol",body:_}],isCharacterBox:P}}}),Cn({type:"font",names:["\\rm","\\sf","\\tt","\\bf","\\it"],props:{numArgs:0,allowedInText:!0},handler:function(u,f){var h=u.parser,_=u.funcName,P=u.breakOnTokenText,J=h.mode,Re=h.parseExpression(!0,P),Be="math"+_.slice(1);return{type:"font",mode:J,font:Be,body:{type:"ordgroup",mode:h.mode,body:Re}}},htmlBuilder:Fs,mathmlBuilder:Oa});var Vs=function(u,f){var h=f;return u==="display"?h=h.id>=y.SCRIPT.id?h.text():y.DISPLAY:u==="text"&&h.size===y.DISPLAY.size?h=y.TEXT:u==="script"?h=y.SCRIPT:u==="scriptscript"&&(h=y.SCRIPTSCRIPT),h},gs=function(u,f){var h=Vs(u.size,f.style),_=h.fracNum(),P=h.fracDen(),J;J=f.havingStyle(_);var Re=cr(u.numer,J,f);if(u.continued){var Be=8.5/f.fontMetrics().ptPerEm,Ve=3.5/f.fontMetrics().ptPerEm;Re.height=Re.height<Be?Be:Re.height,Re.depth=Re.depth<Ve?Ve:Re.depth}J=f.havingStyle(P);var yt=cr(u.denom,J,f),Rt,Yt,yn;u.hasBarLine?(u.barSize?(Yt=rt(u.barSize,f),Rt=Ge.makeLineSpan("frac-line",f,Yt)):Rt=Ge.makeLineSpan("frac-line",f),Yt=Rt.height,yn=Rt.height):(Rt=null,Yt=0,yn=f.fontMetrics().defaultRuleThickness);var An,zn,ot;h.size===y.DISPLAY.size||u.size==="display"?(An=f.fontMetrics().num1,Yt>0?zn=3*yn:zn=7*yn,ot=f.fontMetrics().denom1):(Yt>0?(An=f.fontMetrics().num2,zn=yn):(An=f.fontMetrics().num3,zn=3*yn),ot=f.fontMetrics().denom2);var Cr;if(Rt){var Lr=f.fontMetrics().axisHeight;An-Re.depth-(Lr+.5*Yt)<zn&&(An+=zn-(An-Re.depth-(Lr+.5*Yt))),Lr-.5*Yt-(yt.height-ot)<zn&&(ot+=zn-(Lr-.5*Yt-(yt.height-ot)));var Gr=-(Lr-.5*Yt);Cr=Ge.makeVList({positionType:"individualShift",children:[{type:"elem",elem:yt,shift:ot},{type:"elem",elem:Rt,shift:Gr},{type:"elem",elem:Re,shift:-An}]},f)}else{var Ar=An-Re.depth-(yt.height-ot);Ar<zn&&(An+=.5*(zn-Ar),ot+=.5*(zn-Ar)),Cr=Ge.makeVList({positionType:"individualShift",children:[{type:"elem",elem:yt,shift:ot},{type:"elem",elem:Re,shift:-An}]},f)}J=f.havingStyle(h),Cr.height*=J.sizeMultiplier/f.sizeMultiplier,Cr.depth*=J.sizeMultiplier/f.sizeMultiplier;var Jr;h.size===y.DISPLAY.size?Jr=f.fontMetrics().delim1:Jr=f.fontMetrics().delim2;var li,ui;return u.leftDelim==null?li=ti(f,["mopen"]):li=Oi.customSizedDelim(u.leftDelim,Jr,!0,f.havingStyle(h),u.mode,["mopen"]),u.continued?ui=Ge.makeSpan([]):u.rightDelim==null?ui=ti(f,["mclose"]):ui=Oi.customSizedDelim(u.rightDelim,Jr,!0,f.havingStyle(h),u.mode,["mclose"]),Ge.makeSpan(["mord"].concat(J.sizingClasses(f)),[li,Ge.makeSpan(["mfrac"],[Cr]),ui],f)},os=function(u,f){var h=new qt.MathNode("mfrac",[En(u.numer,f),En(u.denom,f)]);if(!u.hasBarLine)h.setAttribute("linethickness","0px");else if(u.barSize){var _=rt(u.barSize,f);h.setAttribute("linethickness",_+"em")}var P=Vs(u.size,f.style);if(P.size!==f.style.size){h=new qt.MathNode("mstyle",[h]);var J=P.size===y.DISPLAY.size?"true":"false";h.setAttribute("displaystyle",J),h.setAttribute("scriptlevel","0")}if(u.leftDelim!=null||u.rightDelim!=null){var Re=[];if(u.leftDelim!=null){var Be=new qt.MathNode("mo",[new qt.TextNode(u.leftDelim.replace("\\",""))]);Be.setAttribute("fence","true"),Re.push(Be)}if(Re.push(h),u.rightDelim!=null){var Ve=new qt.MathNode("mo",[new qt.TextNode(u.rightDelim.replace("\\",""))]);Ve.setAttribute("fence","true"),Re.push(Ve)}return Tr(Re)}return h};Cn({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,P=f[0],J=f[1],Re,Be=null,Ve=null,yt="auto";switch(_){case"\\cfrac":case"\\dfrac":case"\\frac":case"\\tfrac":Re=!0;break;case"\\\\atopfrac":Re=!1;break;case"\\dbinom":case"\\binom":case"\\tbinom":Re=!1,Be="(",Ve=")";break;case"\\\\bracefrac":Re=!1,Be="\\{",Ve="\\}";break;case"\\\\brackfrac":Re=!1,Be="[",Ve="]";break;default:throw new Error("Unrecognized genfrac command")}switch(_){case"\\cfrac":case"\\dfrac":case"\\dbinom":yt="display";break;case"\\tfrac":case"\\tbinom":yt="text";break}return{type:"genfrac",mode:h.mode,continued:_==="\\cfrac",numer:P,denom:J,hasBarLine:Re,leftDelim:Be,rightDelim:Ve,size:yt,barSize:null}},htmlBuilder:gs,mathmlBuilder:os}),Cn({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,P;switch(h){case"\\over":P="\\frac";break;case"\\choose":P="\\binom";break;case"\\atop":P="\\\\atopfrac";break;case"\\brace":P="\\\\bracefrac";break;case"\\brack":P="\\\\brackfrac";break;default:throw new Error("Unrecognized infix genfrac command")}return{type:"infix",mode:f.mode,replaceWith:P,token:_}}});var ka=["display","text","script","scriptscript"],Ma=function(u){var f=null;return u.length>0&&(f=u,f=f==="."?null:f),f};Cn({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],P=f[5],J=Mn(f[0],"atom");J&&(J=Tn(f[0],"open"));var Re=J?Ma(J.text):null,Be=Mn(f[1],"atom");Be&&(Be=Tn(f[1],"close"));var Ve=Be?Ma(Be.text):null,yt=mn(f[2],"size"),Rt,Yt=null;yt.isBlank?Rt=!0:(Yt=yt.value,Rt=Yt.number>0);var yn="auto",An=Mn(f[3],"ordgroup");if(An){if(An.body.length>0){var zn=mn(An.body[0],"textord");yn=ka[Number(zn.text)]}}else An=mn(f[3],"textord"),yn=ka[Number(An.text)];return{type:"genfrac",mode:h.mode,numer:_,denom:P,continued:!1,hasBarLine:Rt,barSize:Yt,leftDelim:Re,rightDelim:Ve,size:yn}},htmlBuilder:gs,mathmlBuilder:os}),Cn({type:"infix",names:["\\above"],props:{numArgs:1,argTypes:["size"],infix:!0},handler:function(u,f){var h=u.parser,_=u.funcName,P=u.token;return{type:"infix",mode:h.mode,replaceWith:"\\\\abovefrac",size:mn(f[0],"size").value,token:P}}}),Cn({type:"genfrac",names:["\\\\abovefrac"],props:{numArgs:3,argTypes:["math","size","math"]},handler:function(u,f){var h=u.parser,_=u.funcName,P=f[0],J=z(mn(f[1],"infix").size),Re=f[2],Be=J.number>0;return{type:"genfrac",mode:h.mode,numer:P,denom:Re,continued:!1,hasBarLine:Be,barSize:J,leftDelim:null,rightDelim:null,size:"auto"}},htmlBuilder:gs,mathmlBuilder:os});var Na=function(u,f){var h=f.style,_,P,J=Mn(u,"supsub");J?(_=J.sup?cr(J.sup,f.havingStyle(h.sup()),f):cr(J.sub,f.havingStyle(h.sub()),f),P=mn(J.base,"horizBrace")):P=mn(u,"horizBrace");var Re=cr(P.base,f.havingBaseStyle(y.DISPLAY)),Be=ir.svgSpan(P,f),Ve;if(P.isOver?(Ve=Ge.makeVList({positionType:"firstBaseline",children:[{type:"elem",elem:Re},{type:"kern",size:.1},{type:"elem",elem:Be}]},f),Ve.children[0].children[0].children[1].classes.push("svg-align")):(Ve=Ge.makeVList({positionType:"bottom",positionData:Re.depth+.1+Be.height,children:[{type:"elem",elem:Be},{type:"kern",size:.1},{type:"elem",elem:Re}]},f),Ve.children[0].children[0].children[0].classes.push("svg-align")),_){var yt=Ge.makeSpan(["mord",P.isOver?"mover":"munder"],[Ve],f);P.isOver?Ve=Ge.makeVList({positionType:"firstBaseline",children:[{type:"elem",elem:yt},{type:"kern",size:.2},{type:"elem",elem:_}]},f):Ve=Ge.makeVList({positionType:"bottom",positionData:yt.depth+.2+_.height+_.depth,children:[{type:"elem",elem:_},{type:"kern",size:.2},{type:"elem",elem:yt}]},f)}return Ge.makeSpan(["mord",P.isOver?"mover":"munder"],[Ve],f)},po=function(u,f){var h=ir.mathMLnode(u.label);return new qt.MathNode(u.isOver?"mover":"munder",[En(u.base,f),h])};Cn({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:Na,mathmlBuilder:po}),Cn({type:"href",names:["\\href"],props:{numArgs:2,argTypes:["url","original"],allowedInText:!0},handler:function(u,f){var h=u.parser,_=f[1],P=mn(f[0],"url").url;return h.settings.isTrusted({command:"\\href",url:P})?{type:"href",mode:h.mode,href:P,body:mr(_)}:h.formatUnsupportedCmd("\\href")},htmlBuilder:function(u,f){var h=vr(u.body,f,!1);return Ge.makeAnchor(u.href,[],h,f)},mathmlBuilder:function(u,f){var h=Sn(u.body,f);return h instanceof or||(h=new or("mrow",[h])),h.setAttribute("href",u.href),h}}),Cn({type:"href",names:["\\url"],props:{numArgs:1,argTypes:["url"],allowedInText:!0},handler:function(u,f){var h=u.parser,_=mn(f[0],"url").url;if(!h.settings.isTrusted({command:"\\url",url:_}))return h.formatUnsupportedCmd("\\url");for(var P=[],J=0;J<_.length;J++){var Re=_[J];Re==="~"&&(Re="\\textasciitilde"),P.push({type:"textord",mode:"text",text:Re})}var Be={type:"text",mode:h.mode,font:"\\texttt",body:P};return{type:"href",mode:h.mode,href:_,body:mr(Be)}}}),Cn({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:mr(f[0]),mathml:mr(f[1])}},htmlBuilder:function(u,f){var h=vr(u.html,f,!1);return Ge.makeFragment(h)},mathmlBuilder:function(u,f){return Sn(u.mathml,f)}});var Ys=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 p("Invalid size: '"+u+"' in \\includegraphics");var h={number:+(f[1]+f[2]),unit:f[3]};if(!Je(h))throw new p("Invalid unit: '"+h.unit+"' in \\includegraphics.");return h};Cn({type:"includegraphics",names:["\\includegraphics"],props:{numArgs:1,numOptionalArgs:1,argTypes:["raw","url"],allowedInText:!1},handler:function(u,f,h){var _=u.parser,P={number:0,unit:"em"},J={number:.9,unit:"em"},Re={number:0,unit:"em"},Be="";if(h[0])for(var Ve=mn(h[0],"raw").string,yt=Ve.split(","),Rt=0;Rt<yt.length;Rt++){var Yt=yt[Rt].split("=");if(Yt.length===2){var yn=Yt[1].trim();switch(Yt[0].trim()){case"alt":Be=yn;break;case"width":P=Ys(yn);break;case"height":J=Ys(yn);break;case"totalheight":Re=Ys(yn);break;default:throw new p("Invalid key: '"+Yt[0]+"' in \\includegraphics.")}}}var An=mn(f[0],"url").url;return Be===""&&(Be=An,Be=Be.replace(/^.*[\\/]/,""),Be=Be.substring(0,Be.lastIndexOf("."))),_.settings.isTrusted({command:"\\includegraphics",url:An})?{type:"includegraphics",mode:_.mode,alt:Be,width:P,height:J,totalheight:Re,src:An}:_.formatUnsupportedCmd("\\includegraphics")},htmlBuilder:function(u,f){var h=rt(u.height,f),_=0;u.totalheight.number>0&&(_=rt(u.totalheight,f)-h,_=Number(_.toFixed(2)));var P=0;u.width.number>0&&(P=rt(u.width,f));var J={height:h+_+"em"};P>0&&(J.width=P+"em"),_>0&&(J.verticalAlign=-_+"em");var Re=new Ie(u.src,u.alt,J);return Re.height=h,Re.depth=_,Re},mathmlBuilder:function(u,f){var h=new qt.MathNode("mglyph",[]);h.setAttribute("alt",u.alt);var _=rt(u.height,f),P=0;if(u.totalheight.number>0&&(P=rt(u.totalheight,f)-_,P=P.toFixed(2),h.setAttribute("valign","-"+P+"em")),h.setAttribute("height",_+P+"em"),u.width.number>0){var J=rt(u.width,f);h.setAttribute("width",J+"em")}return h.setAttribute("src",u.src),h}}),Cn({type:"kern",names:["\\kern","\\mkern","\\hskip","\\mskip"],props:{numArgs:1,argTypes:["size"],allowedInText:!0},handler:function(u,f){var h=u.parser,_=u.funcName,P=mn(f[0],"size");if(h.settings.strict){var J=_[1]==="m",Re=P.value.unit==="mu";J?(Re||h.settings.reportNonstrict("mathVsTextUnits","LaTeX's "+_+" supports only mu units, "+("not "+P.value.unit+" units")),h.mode!=="math"&&h.settings.reportNonstrict("mathVsTextUnits","LaTeX's "+_+" works only in math mode")):Re&&h.settings.reportNonstrict("mathVsTextUnits","LaTeX's "+_+" doesn't support mu units")}return{type:"kern",mode:h.mode,dimension:P.value}},htmlBuilder:function(u,f){return Ge.makeGlue(u.dimension,f)},mathmlBuilder:function(u,f){var h=rt(u.dimension,f);return new qt.SpaceNode(h)}}),Cn({type:"lap",names:["\\mathllap","\\mathrlap","\\mathclap"],props:{numArgs:1,allowedInText:!0},handler:function(u,f){var h=u.parser,_=u.funcName,P=f[0];return{type:"lap",mode:h.mode,alignment:_.slice(5),body:P}},htmlBuilder:function(u,f){var h;u.alignment==="clap"?(h=Ge.makeSpan([],[cr(u.body,f)]),h=Ge.makeSpan(["inner"],[h],f)):h=Ge.makeSpan(["inner"],[cr(u.body,f)]);var _=Ge.makeSpan(["fix"],[]),P=Ge.makeSpan([u.alignment],[h,_],f),J=Ge.makeSpan(["strut"]);return J.style.height=P.height+P.depth+"em",J.style.verticalAlign=-P.depth+"em",P.children.unshift(J),P=Ge.makeVList({positionType:"firstBaseline",children:[{type:"elem",elem:P}]},f),Ge.makeSpan(["mord"],[P],f)},mathmlBuilder:function(u,f){var h=new qt.MathNode("mpadded",[En(u.body,f)]);if(u.alignment!=="rlap"){var _=u.alignment==="llap"?"-1":"-0.5";h.setAttribute("lspace",_+"width")}return h.setAttribute("width","0px"),h}}),Cn({type:"styling",names:["\\(","$"],props:{numArgs:0,allowedInText:!0,allowedInMath:!1},handler:function(u,f){var h=u.funcName,_=u.parser,P=_.mode;_.switchMode("math");var J=h==="\\("?"\\)":"$",Re=_.parseExpression(!1,J);return _.expect(J),_.switchMode(P),{type:"styling",mode:_.mode,style:"text",body:Re}}}),Cn({type:"text",names:["\\)","\\]"],props:{numArgs:0,allowedInText:!0,allowedInMath:!1},handler:function(u,f){throw new p("Mismatched "+u.funcName)}});var Xs=function(u,f){switch(f.style.size){case y.DISPLAY.size:return u.display;case y.TEXT.size:return u.text;case y.SCRIPT.size:return u.script;case y.SCRIPTSCRIPT.size:return u.scriptscript;default:return u.text}};Cn({type:"mathchoice",names:["\\mathchoice"],props:{numArgs:4},handler:function(u,f){var h=u.parser;return{type:"mathchoice",mode:h.mode,display:mr(f[0]),text:mr(f[1]),script:mr(f[2]),scriptscript:mr(f[3])}},htmlBuilder:function(u,f){var h=Xs(u,f),_=vr(h,f,!1);return Ge.makeFragment(_)},mathmlBuilder:function(u,f){var h=Xs(u,f);return Sn(h,f)}});var Bs=function(u,f,h,_,P,J,Re){u=Ge.makeSpan([],[u]);var Be,Ve;if(f){var yt=cr(f,_.havingStyle(P.sup()),_);Ve={elem:yt,kern:Math.max(_.fontMetrics().bigOpSpacing1,_.fontMetrics().bigOpSpacing3-yt.depth)}}if(h){var Rt=cr(h,_.havingStyle(P.sub()),_);Be={elem:Rt,kern:Math.max(_.fontMetrics().bigOpSpacing2,_.fontMetrics().bigOpSpacing4-Rt.height)}}var Yt;if(Ve&&Be){var yn=_.fontMetrics().bigOpSpacing5+Be.elem.height+Be.elem.depth+Be.kern+u.depth+Re;Yt=Ge.makeVList({positionType:"bottom",positionData:yn,children:[{type:"kern",size:_.fontMetrics().bigOpSpacing5},{type:"elem",elem:Be.elem,marginLeft:-J+"em"},{type:"kern",size:Be.kern},{type:"elem",elem:u},{type:"kern",size:Ve.kern},{type:"elem",elem:Ve.elem,marginLeft:J+"em"},{type:"kern",size:_.fontMetrics().bigOpSpacing5}]},_)}else if(Be){var An=u.height-Re;Yt=Ge.makeVList({positionType:"top",positionData:An,children:[{type:"kern",size:_.fontMetrics().bigOpSpacing5},{type:"elem",elem:Be.elem,marginLeft:-J+"em"},{type:"kern",size:Be.kern},{type:"elem",elem:u}]},_)}else if(Ve){var zn=u.depth+Re;Yt=Ge.makeVList({positionType:"bottom",positionData:zn,children:[{type:"elem",elem:u},{type:"kern",size:Ve.kern},{type:"elem",elem:Ve.elem,marginLeft:J+"em"},{type:"kern",size:_.fontMetrics().bigOpSpacing5}]},_)}else return u;return Ge.makeSpan(["mop","op-limits"],[Yt],_)},Ts=["\\smallint"],Cs=function(u,f){var h,_,P=!1,J,Re=Mn(u,"supsub");Re?(h=Re.sup,_=Re.sub,J=mn(Re.base,"op"),P=!0):J=mn(u,"op");var Be=f.style,Ve=!1;Be.size===y.DISPLAY.size&&J.symbol&&!B.contains(Ts,J.name)&&(Ve=!0);var yt;if(J.symbol){var Rt=Ve?"Size2-Regular":"Size1-Regular",Yt="";if((J.name==="\\oiint"||J.name==="\\oiiint")&&(Yt=J.name.substr(1),J.name=Yt==="oiint"?"\\iint":"\\iiint"),yt=Ge.makeSymbol(J.name,Rt,"math",f,["mop","op-symbol",Ve?"large-op":"small-op"]),Yt.length>0){var yn=yt.italic,An=Ge.staticSvg(Yt+"Size"+(Ve?"2":"1"),f);yt=Ge.makeVList({positionType:"individualShift",children:[{type:"elem",elem:yt,shift:0},{type:"elem",elem:An,shift:Ve?.08:0}]},f),J.name="\\"+Yt,yt.classes.unshift("mop"),yt.italic=yn}}else if(J.body){var zn=vr(J.body,f,!0);zn.length===1&&zn[0]instanceof ce?(yt=zn[0],yt.classes[0]="mop"):yt=Ge.makeSpan(["mop"],Ge.tryCombineChars(zn),f)}else{for(var ot=[],Cr=1;Cr<J.name.length;Cr++)ot.push(Ge.mathsym(J.name[Cr],J.mode,f));yt=Ge.makeSpan(["mop"],ot,f)}var Ar=0,Lr=0;return(yt instanceof ce||J.name==="\\oiint"||J.name==="\\oiiint")&&!J.suppressBaseShift&&(Ar=(yt.height-yt.depth)/2-f.fontMetrics().axisHeight,Lr=yt.italic),P?Bs(yt,h,_,f,Be,Lr,Ar):(Ar&&(yt.style.position="relative",yt.style.top=Ar+"em"),yt)},As=function(u,f){var h;if(u.symbol)h=new or("mo",[dr(u.name,u.mode)]),B.contains(Ts,u.name)&&h.setAttribute("largeop","false");else if(u.body)h=new or("mo",kn(u.body,f));else{h=new or("mi",[new yi(u.name.slice(1))]);var _=new or("mo",[dr("\u2061","text")]);u.parentIsSupSub?h=new or("mo",[h,_]):h=vi([h,_])}return h},Fa={"\u220F":"\\prod","\u2210":"\\coprod","\u2211":"\\sum","\u22C0":"\\bigwedge","\u22C1":"\\bigvee","\u22C2":"\\bigcap","\u22C3":"\\bigcup","\u2A00":"\\bigodot","\u2A01":"\\bigoplus","\u2A02":"\\bigotimes","\u2A04":"\\biguplus","\u2A06":"\\bigsqcup"};Cn({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,P=_;return P.length===1&&(P=Fa[P]),{type:"op",mode:h.mode,limits:!0,parentIsSupSub:!1,symbol:!0,name:P}},htmlBuilder:Cs,mathmlBuilder:As}),Cn({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:mr(_)}},htmlBuilder:Cs,mathmlBuilder:As});var oa={"\u222B":"\\int","\u222C":"\\iint","\u222D":"\\iiint","\u222E":"\\oint","\u222F":"\\oiint","\u2230":"\\oiiint"};Cn({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:Cs,mathmlBuilder:As}),Cn({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:Cs,mathmlBuilder:As}),Cn({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&&(_=oa[_]),{type:"op",mode:f.mode,limits:!1,parentIsSupSub:!1,symbol:!0,name:_}},htmlBuilder:Cs,mathmlBuilder:As});var Ba=function(u,f){var h,_,P=!1,J,Re=Mn(u,"supsub");Re?(h=Re.sup,_=Re.sub,J=mn(Re.base,"operatorname"),P=!0):J=mn(u,"operatorname");var Be;if(J.body.length>0){for(var Ve=J.body.map(function(yn){var An=yn.text;return typeof An=="string"?{type:"textord",mode:yn.mode,text:An}:yn}),yt=vr(Ve,f.withFont("mathrm"),!0),Rt=0;Rt<yt.length;Rt++){var Yt=yt[Rt];Yt instanceof ce&&(Yt.text=Yt.text.replace(/\u2212/,"-").replace(/\u2217/,"*"))}Be=Ge.makeSpan(["mop"],yt,f)}else Be=Ge.makeSpan(["mop"],[],f);return P?Bs(Be,h,_,f,f.style,0,0):Be},Qs=function(u,f){for(var h=kn(u.body,f.withFont("mathrm")),_=!0,P=0;P<h.length;P++){var J=h[P];if(!(J instanceof qt.SpaceNode))if(J instanceof qt.MathNode)switch(J.type){case"mi":case"mn":case"ms":case"mspace":case"mtext":break;case"mo":{var Re=J.children[0];J.children.length===1&&Re instanceof qt.TextNode?Re.text=Re.text.replace(/\u2212/,"-").replace(/\u2217/,"*"):_=!1;break}default:_=!1}else _=!1}if(_){var Be=h.map(function(Rt){return Rt.toText()}).join("");h=[new qt.TextNode(Be)]}var Ve=new qt.MathNode("mi",h);Ve.setAttribute("mathvariant","normal");var yt=new qt.MathNode("mo",[dr("\u2061","text")]);return u.parentIsSupSub?new qt.MathNode("mo",[Ve,yt]):qt.newDocumentFragment([Ve,yt])};Cn({type:"operatorname",names:["\\operatorname","\\operatorname*"],props:{numArgs:1},handler:function(u,f){var h=u.parser,_=u.funcName,P=f[0];return{type:"operatorname",mode:h.mode,body:mr(P),alwaysHandleSupSub:_==="\\operatorname*",limits:!1,parentIsSupSub:!1}},htmlBuilder:Ba,mathmlBuilder:Qs}),Sr({type:"ordgroup",htmlBuilder:function(u,f){return u.semisimple?Ge.makeFragment(vr(u.body,f,!1)):Ge.makeSpan(["mord"],vr(u.body,f,!0),f)},mathmlBuilder:function(u,f){return Sn(u.body,f,!0)}}),Cn({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=cr(u.body,f.havingCrampedStyle()),_=Ge.makeLineSpan("overline-line",f),P=f.fontMetrics().defaultRuleThickness,J=Ge.makeVList({positionType:"firstBaseline",children:[{type:"elem",elem:h},{type:"kern",size:3*P},{type:"elem",elem:_},{type:"kern",size:P}]},f);return Ge.makeSpan(["mord","overline"],[J],f)},mathmlBuilder:function(u,f){var h=new qt.MathNode("mo",[new qt.TextNode("\u203E")]);h.setAttribute("stretchy","true");var _=new qt.MathNode("mover",[En(u.body,f),h]);return _.setAttribute("accent","true"),_}}),Cn({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:mr(_)}},htmlBuilder:function(u,f){var h=vr(u.body,f.withPhantom(),!1);return Ge.makeFragment(h)},mathmlBuilder:function(u,f){var h=kn(u.body,f);return new qt.MathNode("mphantom",h)}}),Cn({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=Ge.makeSpan([],[cr(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=Ge.makeVList({positionType:"firstBaseline",children:[{type:"elem",elem:h}]},f),Ge.makeSpan(["mord"],[h],f)},mathmlBuilder:function(u,f){var h=kn(mr(u.body),f),_=new qt.MathNode("mphantom",h),P=new qt.MathNode("mpadded",[_]);return P.setAttribute("height","0px"),P.setAttribute("depth","0px"),P}}),Cn({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=Ge.makeSpan(["inner"],[cr(u.body,f.withPhantom())]),_=Ge.makeSpan(["fix"],[]);return Ge.makeSpan(["mord","rlap"],[h,_],f)},mathmlBuilder:function(u,f){var h=kn(mr(u.body),f),_=new qt.MathNode("mphantom",h),P=new qt.MathNode("mpadded",[_]);return P.setAttribute("width","0px"),P}}),Cn({type:"raisebox",names:["\\raisebox"],props:{numArgs:2,argTypes:["size","hbox"],allowedInText:!0},handler:function(u,f){var h=u.parser,_=mn(f[0],"size").value,P=f[1];return{type:"raisebox",mode:h.mode,dy:_,body:P}},htmlBuilder:function(u,f){var h=cr(u.body,f),_=rt(u.dy,f);return Ge.makeVList({positionType:"shift",positionData:-_,children:[{type:"elem",elem:h}]},f)},mathmlBuilder:function(u,f){var h=new qt.MathNode("mpadded",[En(u.body,f)]),_=u.dy.number+u.dy.unit;return h.setAttribute("voffset",_),h}}),Cn({type:"rule",names:["\\rule"],props:{numArgs:2,numOptionalArgs:1,argTypes:["size","size","size"]},handler:function(u,f,h){var _=u.parser,P=h[0],J=mn(f[0],"size"),Re=mn(f[1],"size");return{type:"rule",mode:_.mode,shift:P&&mn(P,"size").value,width:J.value,height:Re.value}},htmlBuilder:function(u,f){var h=Ge.makeSpan(["mord","rule"],[],f),_=rt(u.width,f),P=rt(u.height,f),J=u.shift?rt(u.shift,f):0;return h.style.borderRightWidth=_+"em",h.style.borderTopWidth=P+"em",h.style.bottom=J+"em",h.width=_,h.height=P+J,h.depth=-J,h.maxFontSize=P*1.125*f.sizeMultiplier,h},mathmlBuilder:function(u,f){var h=rt(u.width,f),_=rt(u.height,f),P=u.shift?rt(u.shift,f):0,J=f.color&&f.getColor()||"black",Re=new qt.MathNode("mspace");Re.setAttribute("mathbackground",J),Re.setAttribute("width",h+"em"),Re.setAttribute("height",_+"em");var Be=new qt.MathNode("mpadded",[Re]);return P>=0?Be.setAttribute("height","+"+P+"em"):(Be.setAttribute("height",P+"em"),Be.setAttribute("depth","+"+-P+"em")),Be.setAttribute("voffset",P+"em"),Be}});function $a(re,u,f){for(var h=vr(re,u,!1),_=u.sizeMultiplier/f.sizeMultiplier,P=0;P<h.length;P++){var J=h[P].classes.indexOf("sizing");J<0?Array.prototype.push.apply(h[P].classes,u.sizingClasses(f)):h[P].classes[J+1]==="reset-size"+u.size&&(h[P].classes[J+1]="reset-size"+f.size),h[P].height*=_,h[P].depth*=_}return Ge.makeFragment(h)}var Ua=["\\tiny","\\sixptsize","\\scriptsize","\\footnotesize","\\small","\\normalsize","\\large","\\Large","\\LARGE","\\huge","\\Huge"],za=function(u,f){var h=f.havingSize(u.size);return $a(u.body,h,f)};Cn({type:"sizing",names:Ua,props:{numArgs:0,allowedInText:!0},handler:function(u,f){var h=u.breakOnTokenText,_=u.funcName,P=u.parser,J=P.parseExpression(!1,h);return{type:"sizing",mode:P.mode,size:Ua.indexOf(_)+1,body:J}},htmlBuilder:za,mathmlBuilder:function(u,f){var h=f.havingSize(u.size),_=kn(u.body,h),P=new qt.MathNode("mstyle",_);return P.setAttribute("mathsize",h.sizeMultiplier+"em"),P}}),Cn({type:"smash",names:["\\smash"],props:{numArgs:1,numOptionalArgs:1,allowedInText:!0},handler:function(u,f,h){var _=u.parser,P=!1,J=!1,Re=h[0]&&mn(h[0],"ordgroup");if(Re)for(var Be="",Ve=0;Ve<Re.body.length;++Ve){var yt=Re.body[Ve];if(Be=yt.text,Be==="t")P=!0;else if(Be==="b")J=!0;else{P=!1,J=!1;break}}else P=!0,J=!0;var Rt=f[0];return{type:"smash",mode:_.mode,body:Rt,smashHeight:P,smashDepth:J}},htmlBuilder:function(u,f){var h=Ge.makeSpan([],[cr(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 P=0;P<h.children.length;P++)h.children[P].depth=0;var J=Ge.makeVList({positionType:"firstBaseline",children:[{type:"elem",elem:h}]},f);return Ge.makeSpan(["mord"],[J],f)},mathmlBuilder:function(u,f){var h=new qt.MathNode("mpadded",[En(u.body,f)]);return u.smashHeight&&h.setAttribute("height","0px"),u.smashDepth&&h.setAttribute("depth","0px"),h}}),Cn({type:"sqrt",names:["\\sqrt"],props:{numArgs:1,numOptionalArgs:1},handler:function(u,f,h){var _=u.parser,P=h[0],J=f[0];return{type:"sqrt",mode:_.mode,body:J,index:P}},htmlBuilder:function(u,f){var h=cr(u.body,f.havingCrampedStyle());h.height===0&&(h.height=f.fontMetrics().xHeight),h=Ge.wrapFragment(h,f);var _=f.fontMetrics(),P=_.defaultRuleThickness,J=P;f.style.id<y.TEXT.id&&(J=f.fontMetrics().xHeight);var Re=P+J/4,Be=h.height+h.depth+Re+P,Ve=Oi.sqrtImage(Be,f),yt=Ve.span,Rt=Ve.ruleWidth,Yt=Ve.advanceWidth,yn=yt.height-Rt;yn>h.height+h.depth+Re&&(Re=(Re+yn-h.height-h.depth)/2);var An=yt.height-h.height-Re-Rt;h.style.paddingLeft=Yt+"em";var zn=Ge.makeVList({positionType:"firstBaseline",children:[{type:"elem",elem:h,wrapperClasses:["svg-align"]},{type:"kern",size:-(h.height+An)},{type:"elem",elem:yt},{type:"kern",size:Rt}]},f);if(u.index){var ot=f.havingStyle(y.SCRIPTSCRIPT),Cr=cr(u.index,ot,f),Ar=.6*(zn.height-zn.depth),Lr=Ge.makeVList({positionType:"shift",positionData:-Ar,children:[{type:"elem",elem:Cr}]},f),Gr=Ge.makeSpan(["root"],[Lr]);return Ge.makeSpan(["mord","sqrt"],[Gr,zn],f)}else return Ge.makeSpan(["mord","sqrt"],[zn],f)},mathmlBuilder:function(u,f){var h=u.body,_=u.index;return _?new qt.MathNode("mroot",[En(h,f),En(_,f)]):new qt.MathNode("msqrt",[En(h,f)])}});var la={display:y.DISPLAY,text:y.TEXT,script:y.SCRIPT,scriptscript:y.SCRIPTSCRIPT};Cn({type:"styling",names:["\\displaystyle","\\textstyle","\\scriptstyle","\\scriptscriptstyle"],props:{numArgs:0,allowedInText:!0},handler:function(u,f){var h=u.breakOnTokenText,_=u.funcName,P=u.parser,J=P.parseExpression(!0,h),Re=_.slice(1,_.length-5);return{type:"styling",mode:P.mode,style:Re,body:J}},htmlBuilder:function(u,f){var h=la[u.style],_=f.havingStyle(h).withFont("");return $a(u.body,_,f)},mathmlBuilder:function(u,f){var h=la[u.style],_=f.havingStyle(h),P=kn(u.body,_),J=new qt.MathNode("mstyle",P),Re={display:["0","true"],text:["0","false"],script:["1","false"],scriptscript:["2","false"]},Be=Re[u.style];return J.setAttribute("scriptlevel",Be[0]),J.setAttribute("displaystyle",Be[1]),J}});var mo=function(u,f){var h=u.base;if(h)if(h.type==="op"){var _=h.limits&&(f.style.size===y.DISPLAY.size||h.alwaysHandleSupSub);return _?Cs:null}else if(h.type==="operatorname"){var P=h.alwaysHandleSupSub&&(f.style.size===y.DISPLAY.size||h.limits);return P?Ba:null}else{if(h.type==="accent")return B.isCharacterBox(h.base)?$r:null;if(h.type==="horizBrace"){var J=!u.sub;return J===h.isOver?Na:null}else return null}else return null};Sr({type:"supsub",htmlBuilder:function(u,f){var h=mo(u,f);if(h)return h(u,f);var _=u.base,P=u.sup,J=u.sub,Re=cr(_,f),Be,Ve,yt=f.fontMetrics(),Rt=0,Yt=0,yn=_&&B.isCharacterBox(_);if(P){var An=f.havingStyle(f.style.sup());Be=cr(P,An,f),yn||(Rt=Re.height-An.fontMetrics().supDrop*An.sizeMultiplier/f.sizeMultiplier)}if(J){var zn=f.havingStyle(f.style.sub());Ve=cr(J,zn,f),yn||(Yt=Re.depth+zn.fontMetrics().subDrop*zn.sizeMultiplier/f.sizeMultiplier)}var ot;f.style===y.DISPLAY?ot=yt.sup1:f.style.cramped?ot=yt.sup3:ot=yt.sup2;var Cr=f.sizeMultiplier,Ar=.5/yt.ptPerEm/Cr+"em",Lr=null;if(Ve){var Gr=u.base&&u.base.type==="op"&&u.base.name&&(u.base.name==="\\oiint"||u.base.name==="\\oiiint");(Re instanceof ce||Gr)&&(Lr=-Re.italic+"em")}var Jr;if(Be&&Ve){Rt=Math.max(Rt,ot,Be.depth+.25*yt.xHeight),Yt=Math.max(Yt,yt.sub2);var li=yt.defaultRuleThickness,ui=4*li;if(Rt-Be.depth-(Ve.height-Yt)<ui){Yt=ui-(Rt-Be.depth)+Ve.height;var pi=.8*yt.xHeight-(Rt-Be.depth);pi>0&&(Rt+=pi,Yt-=pi)}var Ci=[{type:"elem",elem:Ve,shift:Yt,marginRight:Ar,marginLeft:Lr},{type:"elem",elem:Be,shift:-Rt,marginRight:Ar}];Jr=Ge.makeVList({positionType:"individualShift",children:Ci},f)}else if(Ve){Yt=Math.max(Yt,yt.sub1,Ve.height-.8*yt.xHeight);var mi=[{type:"elem",elem:Ve,marginLeft:Lr,marginRight:Ar}];Jr=Ge.makeVList({positionType:"shift",positionData:Yt,children:mi},f)}else if(Be)Rt=Math.max(Rt,ot,Be.depth+.25*yt.xHeight),Jr=Ge.makeVList({positionType:"shift",positionData:-Rt,children:[{type:"elem",elem:Be,marginRight:Ar}]},f);else throw new Error("supsub must have either sup or sub.");var Vr=Xr(Re,"right")||"mord";return Ge.makeSpan([Vr],[Re,Ge.makeSpan(["msupsub"],[Jr])],f)},mathmlBuilder:function(u,f){var h=!1,_,P,J=Mn(u.base,"horizBrace");J&&(P=!!u.sup,P===J.isOver&&(h=!0,_=J.isOver)),u.base&&(u.base.type==="op"||u.base.type==="operatorname")&&(u.base.parentIsSupSub=!0);var Re=[En(u.base,f)];u.sub&&Re.push(En(u.sub,f)),u.sup&&Re.push(En(u.sup,f));var Be;if(h)Be=_?"mover":"munder";else if(u.sub)if(u.sup){var Rt=u.base;Rt&&Rt.type==="op"&&Rt.limits&&f.style===y.DISPLAY||Rt&&Rt.type==="operatorname"&&Rt.alwaysHandleSupSub&&(f.style===y.DISPLAY||Rt.limits)?Be="munderover":Be="msubsup"}else{var yt=u.base;yt&&yt.type==="op"&&yt.limits&&(f.style===y.DISPLAY||yt.alwaysHandleSupSub)||yt&&yt.type==="operatorname"&&yt.alwaysHandleSupSub&&(yt.limits||f.style===y.DISPLAY)?Be="munder":Be="msub"}else{var Ve=u.base;Ve&&Ve.type==="op"&&Ve.limits&&(f.style===y.DISPLAY||Ve.alwaysHandleSupSub)||Ve&&Ve.type==="operatorname"&&Ve.alwaysHandleSupSub&&(Ve.limits||f.style===y.DISPLAY)?Be="mover":Be="msup"}var Yt=new qt.MathNode(Be,Re);return Yt}}),Sr({type:"atom",htmlBuilder:function(u,f){return Ge.mathsym(u.text,u.mode,f,["m"+u.family])},mathmlBuilder:function(u,f){var h=new qt.MathNode("mo",[dr(u.text,u.mode)]);if(u.family==="bin"){var _=Nn(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 ua={mi:"italic",mn:"normal",mtext:"normal"};Sr({type:"mathord",htmlBuilder:function(u,f){return Ge.makeOrd(u,f,"mathord")},mathmlBuilder:function(u,f){var h=new qt.MathNode("mi",[dr(u.text,u.mode,f)]),_=Nn(u,f)||"italic";return _!==ua[h.type]&&h.setAttribute("mathvariant",_),h}}),Sr({type:"textord",htmlBuilder:function(u,f){return Ge.makeOrd(u,f,"textord")},mathmlBuilder:function(u,f){var h=dr(u.text,u.mode,f),_=Nn(u,f)||"normal",P;return u.mode==="text"?P=new qt.MathNode("mtext",[h]):/[0-9]/.test(u.text)?P=new qt.MathNode("mn",[h]):u.text==="\\prime"?P=new qt.MathNode("mo",[h]):P=new qt.MathNode("mi",[h]),_!==ua[P.type]&&P.setAttribute("mathvariant",_),P}});var ca={"\\nobreak":"nobreak","\\allowbreak":"allowbreak"},da={" ":{},"\\ ":{},"~":{className:"nobreak"},"\\space":{},"\\nobreakspace":{className:"nobreak"}};Sr({type:"spacing",htmlBuilder:function(u,f){if(da.hasOwnProperty(u.text)){var h=da[u.text].className||"";if(u.mode==="text"){var _=Ge.makeOrd(u,f,"textord");return _.classes.push(h),_}else return Ge.makeSpan(["mspace",h],[Ge.mathsym(u.text,u.mode,f)],f)}else{if(ca.hasOwnProperty(u.text))return Ge.makeSpan(["mspace",ca[u.text]],[],f);throw new p('Unknown type of space "'+u.text+'"')}},mathmlBuilder:function(u,f){var h;if(da.hasOwnProperty(u.text))h=new qt.MathNode("mtext",[new qt.TextNode("\xA0")]);else{if(ca.hasOwnProperty(u.text))return new qt.MathNode("mspace");throw new p('Unknown type of space "'+u.text+'"')}return h}});var Ka=function(){var u=new qt.MathNode("mtd",[]);return u.setAttribute("width","50%"),u};Sr({type:"tag",mathmlBuilder:function(u,f){var h=new qt.MathNode("mtable",[new qt.MathNode("mtr",[Ka(),new qt.MathNode("mtd",[Sn(u.body,f)]),Ka(),new qt.MathNode("mtd",[Sn(u.tag,f)])])]);return h.setAttribute("width","100%"),h}});var Ha={"\\text":void 0,"\\textrm":"textrm","\\textsf":"textsf","\\texttt":"texttt","\\textnormal":"textrm"},ja={"\\textbf":"textbf","\\textmd":"textmd"},Za={"\\textit":"textit","\\textup":"textup"},Wa=function(u,f){var h=u.font;return h?Ha[h]?f.withTextFontFamily(Ha[h]):ja[h]?f.withTextFontWeight(ja[h]):f.withTextFontShape(Za[h]):f};Cn({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,P=f[0];return{type:"text",mode:h.mode,body:mr(P),font:_}},htmlBuilder:function(u,f){var h=Wa(u,f),_=vr(u.body,h,!0);return Ge.makeSpan(["mord","text"],Ge.tryCombineChars(_),h)},mathmlBuilder:function(u,f){var h=Wa(u,f);return Sn(u.body,h)}}),Cn({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=cr(u.body,f),_=Ge.makeLineSpan("underline-line",f),P=f.fontMetrics().defaultRuleThickness,J=Ge.makeVList({positionType:"top",positionData:h.height,children:[{type:"kern",size:P},{type:"elem",elem:_},{type:"kern",size:3*P},{type:"elem",elem:h}]},f);return Ge.makeSpan(["mord","underline"],[J],f)},mathmlBuilder:function(u,f){var h=new qt.MathNode("mo",[new qt.TextNode("\u203E")]);h.setAttribute("stretchy","true");var _=new qt.MathNode("munder",[En(u.body,f),h]);return _.setAttribute("accentunder","true"),_}}),Cn({type:"verb",names:["\\verb"],props:{numArgs:0,allowedInText:!0},handler:function(u,f,h){throw new p("\\verb ended by end of line instead of matching delimiter")},htmlBuilder:function(u,f){for(var h=Ga(u),_=[],P=f.havingStyle(f.style.text()),J=0;J<h.length;J++){var Re=h[J];Re==="~"&&(Re="\\textasciitilde"),_.push(Ge.makeSymbol(Re,"Typewriter-Regular",u.mode,P,["mord","texttt"]))}return Ge.makeSpan(["mord","text"].concat(P.sizingClasses(f)),Ge.tryCombineChars(_),P)},mathmlBuilder:function(u,f){var h=new qt.TextNode(Ga(u)),_=new qt.MathNode("mtext",[h]);return _.setAttribute("mathvariant","monospace"),_}});var Ga=function(u){return u.body.replace(/ /g,u.star?"\u2423":"\xA0")},go=nr,vs=go,fa=`[ \r
]`,Va="\\\\[a-zA-Z@]+",vo="\\\\[^\uD800-\uDFFF]",yo=""+Va+fa+"*",_o=new RegExp("^("+Va+")"+fa+"*$"),ha="[\u0300-\u036F]",Js=new RegExp(ha+"+$"),bo="("+fa+"+)|([!-\\[\\]-\u2027\u202A-\uD7FF\uF900-\uFFFF]"+(ha+"*")+"|[\uD800-\uDBFF][\uDC00-\uDFFF]"+(ha+"*")+"|\\\\verb\\*([^]).*?\\3|\\\\verb([^*a-zA-Z]).*?\\4|\\\\operatorname\\*"+("|"+yo)+("|"+vo+")"),pa=function(){function re(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(bo,"g"),this.catcodes={"%":14}}var u=re.prototype;return u.setCatcode=function(h,_){this.catcodes[h]=_},u.lex=function(){var h=this.input,_=this.tokenRegex.lastIndex;if(_===h.length)return new _e("EOF",new ge(this,_,_));var P=this.tokenRegex.exec(h);if(P===null||P.index!==_)throw new p("Unexpected character: '"+h[_]+"'",new _e(h[_],new ge(this,_,_+1)));var J=P[2]||" ";if(this.catcodes[J]===14){var Re=h.indexOf(`
`,this.tokenRegex.lastIndex);return Re===-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=Re+1,this.lex()}var Be=J.match(_o);return Be&&(J=Be[1]),new _e(J,new ge(this,_,this.tokenRegex.lastIndex))},re}(),Ya=function(){function re(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=re.prototype;return u.beginGroup=function(){this.undefStack.push({})},u.endGroup=function(){if(this.undefStack.length===0)throw new p("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,_,P){if(P===void 0&&(P=!1),P){for(var J=0;J<this.undefStack.length;J++)delete this.undefStack[J][h];this.undefStack.length>0&&(this.undefStack[this.undefStack.length-1][h]=_)}else{var Re=this.undefStack[this.undefStack.length-1];Re&&!Re.hasOwnProperty(h)&&(Re[h]=this.current[h])}this.current[h]=_},re}(),Xa={},ma=Xa;function ze(re,u){Xa[re]=u}ze("\\@firstoftwo",function(re){var u=re.consumeArgs(2);return{tokens:u[0],numArgs:0}}),ze("\\@secondoftwo",function(re){var u=re.consumeArgs(2);return{tokens:u[1],numArgs:0}}),ze("\\@ifnextchar",function(re){var u=re.consumeArgs(3),f=re.future();return u[0].length===1&&u[0][0].text===f.text?{tokens:u[1],numArgs:0}:{tokens:u[2],numArgs:0}}),ze("\\@ifstar","\\@ifnextchar *{\\@firstoftwo{#1}}"),ze("\\TextOrMath",function(re){var u=re.consumeArgs(2);return re.mode==="text"?{tokens:u[0],numArgs:0}:{tokens:u[1],numArgs:0}});var ji={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};ze("\\char",function(re){var u=re.popToken(),f,h="";if(u.text==="'")f=8,u=re.popToken();else if(u.text==='"')f=16,u=re.popToken();else if(u.text==="`")if(u=re.popToken(),u.text[0]==="\\")h=u.text.charCodeAt(1);else{if(u.text==="EOF")throw new p("\\char` missing argument");h=u.text.charCodeAt(0)}else f=10;if(f){if(h=ji[u.text],h==null||h>=f)throw new p("Invalid base-"+f+" digit "+u.text);for(var _;(_=ji[re.future().text])!=null&&_<f;)h*=f,h+=_,re.popToken()}return"\\@char{"+h+"}"});var $s=function(u,f){var h=u.consumeArgs(1)[0];if(h.length!==1)throw new p("\\gdef's first argument must be a macro name");var _=h[0].text,P=0;for(h=u.consumeArgs(1)[0];h.length===1&&h[0].text==="#";){if(h=u.consumeArgs(1)[0],h.length!==1)throw new p('Invalid argument number length "'+h.length+'"');if(!/^[1-9]$/.test(h[0].text))throw new p('Invalid argument number "'+h[0].text+'"');if(P++,parseInt(h[0].text)!==P)throw new p('Argument number "'+h[0].text+'" out of order');h=u.consumeArgs(1)[0]}return u.macros.set(_,{tokens:h,numArgs:P},f),""};ze("\\gdef",function(re){return $s(re,!0)}),ze("\\def",function(re){return $s(re,!1)}),ze("\\global",function(re){var u=re.consumeArgs(1)[0];if(u.length!==1)throw new p("Invalid command after \\global");var f=u[0].text;if(f==="\\def")return $s(re,!0);throw new p("Invalid command '"+f+"' after \\global")});var ga=function(u,f,h){var _=u.consumeArgs(1)[0];if(_.length!==1)throw new p("\\newcommand's first argument must be a macro name");var P=_[0].text,J=u.isDefined(P);if(J&&!f)throw new p("\\newcommand{"+P+"} attempting to redefine "+(P+"; use \\renewcommand"));if(!J&&!h)throw new p("\\renewcommand{"+P+"} when command "+P+" does not yet exist; use \\newcommand");var Re=0;if(_=u.consumeArgs(1)[0],_.length===1&&_[0].text==="["){for(var Be="",Ve=u.expandNextToken();Ve.text!=="]"&&Ve.text!=="EOF";)Be+=Ve.text,Ve=u.expandNextToken();if(!Be.match(/^\s*[0-9]+\s*$/))throw new p("Invalid number of arguments: "+Be);Re=parseInt(Be),_=u.consumeArgs(1)[0]}return u.macros.set(P,{tokens:_,numArgs:Re}),""};ze("\\newcommand",function(re){return ga(re,!1,!0)}),ze("\\renewcommand",function(re){return ga(re,!0,!1)}),ze("\\providecommand",function(re){return ga(re,!0,!0)}),ze("\\bgroup","{"),ze("\\egroup","}"),ze("\\lq","`"),ze("\\rq","'"),ze("\\aa","\\r a"),ze("\\AA","\\r A"),ze("\\textcopyright","\\html@mathml{\\textcircled{c}}{\\char`\xA9}"),ze("\\copyright","\\TextOrMath{\\textcopyright}{\\text{\\textcopyright}}"),ze("\\textregistered","\\html@mathml{\\textcircled{\\scriptsize R}}{\\char`\xAE}"),ze("\u212C","\\mathscr{B}"),ze("\u2130","\\mathscr{E}"),ze("\u2131","\\mathscr{F}"),ze("\u210B","\\mathscr{H}"),ze("\u2110","\\mathscr{I}"),ze("\u2112","\\mathscr{L}"),ze("\u2133","\\mathscr{M}"),ze("\u211B","\\mathscr{R}"),ze("\u212D","\\mathfrak{C}"),ze("\u210C","\\mathfrak{H}"),ze("\u2128","\\mathfrak{Z}"),ze("\\Bbbk","\\Bbb{k}"),ze("\xB7","\\cdotp"),ze("\\llap","\\mathllap{\\textrm{#1}}"),ze("\\rlap","\\mathrlap{\\textrm{#1}}"),ze("\\clap","\\mathclap{\\textrm{#1}}"),ze("\\not",'\\html@mathml{\\mathrel{\\mathrlap\\@not}}{\\char"338}'),ze("\\neq","\\html@mathml{\\mathrel{\\not=}}{\\mathrel{\\char`\u2260}}"),ze("\\ne","\\neq"),ze("\u2260","\\neq"),ze("\\notin","\\html@mathml{\\mathrel{{\\in}\\mathllap{/\\mskip1mu}}}{\\mathrel{\\char`\u2209}}"),ze("\u2209","\\notin"),ze("\u2258","\\html@mathml{\\mathrel{=\\kern{-1em}\\raisebox{0.4em}{$\\scriptsize\\frown$}}}{\\mathrel{\\char`\u2258}}"),ze("\u2259","\\html@mathml{\\stackrel{\\tiny\\wedge}{=}}{\\mathrel{\\char`\u2258}}"),ze("\u225A","\\html@mathml{\\stackrel{\\tiny\\vee}{=}}{\\mathrel{\\char`\u225A}}"),ze("\u225B","\\html@mathml{\\stackrel{\\scriptsize\\star}{=}}{\\mathrel{\\char`\u225B}}"),ze("\u225D","\\html@mathml{\\stackrel{\\tiny\\mathrm{def}}{=}}{\\mathrel{\\char`\u225D}}"),ze("\u225E","\\html@mathml{\\stackrel{\\tiny\\mathrm{m}}{=}}{\\mathrel{\\char`\u225E}}"),ze("\u225F","\\html@mathml{\\stackrel{\\tiny?}{=}}{\\mathrel{\\char`\u225F}}"),ze("\u27C2","\\perp"),ze("\u203C","\\mathclose{!\\mkern-0.8mu!}"),ze("\u220C","\\notni"),ze("\u231C","\\ulcorner"),ze("\u231D","\\urcorner"),ze("\u231E","\\llcorner"),ze("\u231F","\\lrcorner"),ze("\xA9","\\copyright"),ze("\xAE","\\textregistered"),ze("\uFE0F","\\textregistered"),ze("\\vdots","\\mathord{\\varvdots\\rule{0pt}{15pt}}"),ze("\u22EE","\\vdots"),ze("\\varGamma","\\mathit{\\Gamma}"),ze("\\varDelta","\\mathit{\\Delta}"),ze("\\varTheta","\\mathit{\\Theta}"),ze("\\varLambda","\\mathit{\\Lambda}"),ze("\\varXi","\\mathit{\\Xi}"),ze("\\varPi","\\mathit{\\Pi}"),ze("\\varSigma","\\mathit{\\Sigma}"),ze("\\varUpsilon","\\mathit{\\Upsilon}"),ze("\\varPhi","\\mathit{\\Phi}"),ze("\\varPsi","\\mathit{\\Psi}"),ze("\\varOmega","\\mathit{\\Omega}"),ze("\\substack","\\begin{subarray}{c}#1\\end{subarray}"),ze("\\colon","\\nobreak\\mskip2mu\\mathpunct{}\\mathchoice{\\mkern-3mu}{\\mkern-3mu}{}{}{:}\\mskip6mu"),ze("\\boxed","\\fbox{$\\displaystyle{#1}$}"),ze("\\iff","\\DOTSB\\;\\Longleftrightarrow\\;"),ze("\\implies","\\DOTSB\\;\\Longrightarrow\\;"),ze("\\impliedby","\\DOTSB\\;\\Longleftarrow\\;");var Us={",":"\\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"};ze("\\dots",function(re){var u="\\dotso",f=re.expandAfterFuture().text;return f in Us?u=Us[f]:(f.substr(0,4)==="\\not"||f in Ut.math&&B.contains(["bin","rel"],Ut.math[f].group))&&(u="\\dotsb"),u});var va={")":!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};ze("\\dotso",function(re){var u=re.future().text;return u in va?"\\ldots\\,":"\\ldots"}),ze("\\dotsc",function(re){var u=re.future().text;return u in va&&u!==","?"\\ldots\\,":"\\ldots"}),ze("\\cdots",function(re){var u=re.future().text;return u in va?"\\@cdots\\,":"\\@cdots"}),ze("\\dotsb","\\cdots"),ze("\\dotsm","\\cdots"),ze("\\dotsi","\\!\\cdots"),ze("\\dotsx","\\ldots\\,"),ze("\\DOTSI","\\relax"),ze("\\DOTSB","\\relax"),ze("\\DOTSX","\\relax"),ze("\\tmspace","\\TextOrMath{\\kern#1#3}{\\mskip#1#2}\\relax"),ze("\\,","\\tmspace+{3mu}{.1667em}"),ze("\\thinspace","\\,"),ze("\\>","\\mskip{4mu}"),ze("\\:","\\tmspace+{4mu}{.2222em}"),ze("\\medspace","\\:"),ze("\\;","\\tmspace+{5mu}{.2777em}"),ze("\\thickspace","\\;"),ze("\\!","\\tmspace-{3mu}{.1667em}"),ze("\\negthinspace","\\!"),ze("\\negmedspace","\\tmspace-{4mu}{.2222em}"),ze("\\negthickspace","\\tmspace-{5mu}{.277em}"),ze("\\enspace","\\kern.5em "),ze("\\enskip","\\hskip.5em\\relax"),ze("\\quad","\\hskip1em\\relax"),ze("\\qquad","\\hskip2em\\relax"),ze("\\tag","\\@ifstar\\tag@literal\\tag@paren"),ze("\\tag@paren","\\tag@literal{({#1})}"),ze("\\tag@literal",function(re){if(re.macros.get("\\df@tag"))throw new p("Multiple \\tag");return"\\gdef\\df@tag{\\text{#1}}"}),ze("\\bmod","\\mathchoice{\\mskip1mu}{\\mskip1mu}{\\mskip5mu}{\\mskip5mu}\\mathbin{\\rm mod}\\mathchoice{\\mskip1mu}{\\mskip1mu}{\\mskip5mu}{\\mskip5mu}"),ze("\\pod","\\allowbreak\\mathchoice{\\mkern18mu}{\\mkern8mu}{\\mkern8mu}{\\mkern8mu}(#1)"),ze("\\pmod","\\pod{{\\rm mod}\\mkern6mu#1}"),ze("\\mod","\\allowbreak\\mathchoice{\\mkern18mu}{\\mkern12mu}{\\mkern12mu}{\\mkern12mu}{\\rm mod}\\,\\,#1"),ze("\\pmb","\\html@mathml{\\@binrel{#1}{\\mathrlap{#1}\\kern0.5px#1}}{\\mathbf{#1}}"),ze("\\\\","\\newline"),ze("\\TeX","\\textrm{\\html@mathml{T\\kern-.1667em\\raisebox{-.5ex}{E}\\kern-.125emX}{TeX}}");var Qa=ke["Main-Regular"][84][1]-.7*ke["Main-Regular"][65][1]+"em";ze("\\LaTeX","\\textrm{\\html@mathml{"+("L\\kern-.36em\\raisebox{"+Qa+"}{\\scriptstyle A}")+"\\kern-.15em\\TeX}{LaTeX}}"),ze("\\KaTeX","\\textrm{\\html@mathml{"+("K\\kern-.17em\\raisebox{"+Qa+"}{\\scriptstyle A}")+"\\kern-.15em\\TeX}{KaTeX}}"),ze("\\hspace","\\@ifstar\\@hspacer\\@hspace"),ze("\\@hspace","\\hskip #1\\relax"),ze("\\@hspacer","\\rule{0pt}{0pt}\\hskip #1\\relax"),ze("\\ordinarycolon",":"),ze("\\vcentcolon","\\mathrel{\\mathop\\ordinarycolon}"),ze("\\dblcolon",'\\html@mathml{\\mathrel{\\vcentcolon\\mathrel{\\mkern-.9mu}\\vcentcolon}}{\\mathop{\\char"2237}}'),ze("\\coloneqq",'\\html@mathml{\\mathrel{\\vcentcolon\\mathrel{\\mkern-1.2mu}=}}{\\mathop{\\char"2254}}'),ze("\\Coloneqq",'\\html@mathml{\\mathrel{\\dblcolon\\mathrel{\\mkern-1.2mu}=}}{\\mathop{\\char"2237\\char"3d}}'),ze("\\coloneq",'\\html@mathml{\\mathrel{\\vcentcolon\\mathrel{\\mkern-1.2mu}\\mathrel{-}}}{\\mathop{\\char"3a\\char"2212}}'),ze("\\Coloneq",'\\html@mathml{\\mathrel{\\dblcolon\\mathrel{\\mkern-1.2mu}\\mathrel{-}}}{\\mathop{\\char"2237\\char"2212}}'),ze("\\eqqcolon",'\\html@mathml{\\mathrel{=\\mathrel{\\mkern-1.2mu}\\vcentcolon}}{\\mathop{\\char"2255}}'),ze("\\Eqqcolon",'\\html@mathml{\\mathrel{=\\mathrel{\\mkern-1.2mu}\\dblcolon}}{\\mathop{\\char"3d\\char"2237}}'),ze("\\eqcolon",'\\html@mathml{\\mathrel{\\mathrel{-}\\mathrel{\\mkern-1.2mu}\\vcentcolon}}{\\mathop{\\char"2239}}'),ze("\\Eqcolon",'\\html@mathml{\\mathrel{\\mathrel{-}\\mathrel{\\mkern-1.2mu}\\dblcolon}}{\\mathop{\\char"2212\\char"2237}}'),ze("\\colonapprox",'\\html@mathml{\\mathrel{\\vcentcolon\\mathrel{\\mkern-1.2mu}\\approx}}{\\mathop{\\char"3a\\char"2248}}'),ze("\\Colonapprox",'\\html@mathml{\\mathrel{\\dblcolon\\mathrel{\\mkern-1.2mu}\\approx}}{\\mathop{\\char"2237\\char"2248}}'),ze("\\colonsim",'\\html@mathml{\\mathrel{\\vcentcolon\\mathrel{\\mkern-1.2mu}\\sim}}{\\mathop{\\char"3a\\char"223c}}'),ze("\\Colonsim",'\\html@mathml{\\mathrel{\\dblcolon\\mathrel{\\mkern-1.2mu}\\sim}}{\\mathop{\\char"2237\\char"223c}}'),ze("\u2237","\\dblcolon"),ze("\u2239","\\eqcolon"),ze("\u2254","\\coloneqq"),ze("\u2255","\\eqqcolon"),ze("\u2A74","\\Coloneqq"),ze("\\ratio","\\vcentcolon"),ze("\\coloncolon","\\dblcolon"),ze("\\colonequals","\\coloneqq"),ze("\\coloncolonequals","\\Coloneqq"),ze("\\equalscolon","\\eqqcolon"),ze("\\equalscoloncolon","\\Eqqcolon"),ze("\\colonminus","\\coloneq"),ze("\\coloncolonminus","\\Coloneq"),ze("\\minuscolon","\\eqcolon"),ze("\\minuscoloncolon","\\Eqcolon"),ze("\\coloncolonapprox","\\Colonapprox"),ze("\\coloncolonsim","\\Colonsim"),ze("\\simcolon","\\mathrel{\\sim\\mathrel{\\mkern-1.2mu}\\vcentcolon}"),ze("\\simcoloncolon","\\mathrel{\\sim\\mathrel{\\mkern-1.2mu}\\dblcolon}"),ze("\\approxcolon","\\mathrel{\\approx\\mathrel{\\mkern-1.2mu}\\vcentcolon}"),ze("\\approxcoloncolon","\\mathrel{\\approx\\mathrel{\\mkern-1.2mu}\\dblcolon}"),ze("\\notni","\\html@mathml{\\not\\ni}{\\mathrel{\\char`\u220C}}"),ze("\\limsup","\\DOTSB\\operatorname*{lim\\,sup}"),ze("\\liminf","\\DOTSB\\operatorname*{lim\\,inf}"),ze("\\gvertneqq","\\html@mathml{\\@gvertneqq}{\u2269}"),ze("\\lvertneqq","\\html@mathml{\\@lvertneqq}{\u2268}"),ze("\\ngeqq","\\html@mathml{\\@ngeqq}{\u2271}"),ze("\\ngeqslant","\\html@mathml{\\@ngeqslant}{\u2271}"),ze("\\nleqq","\\html@mathml{\\@nleqq}{\u2270}"),ze("\\nleqslant","\\html@mathml{\\@nleqslant}{\u2270}"),ze("\\nshortmid","\\html@mathml{\\@nshortmid}{\u2224}"),ze("\\nshortparallel","\\html@mathml{\\@nshortparallel}{\u2226}"),ze("\\nsubseteqq","\\html@mathml{\\@nsubseteqq}{\u2288}"),ze("\\nsupseteqq","\\html@mathml{\\@nsupseteqq}{\u2289}"),ze("\\varsubsetneq","\\html@mathml{\\@varsubsetneq}{\u228A}"),ze("\\varsubsetneqq","\\html@mathml{\\@varsubsetneqq}{\u2ACB}"),ze("\\varsupsetneq","\\html@mathml{\\@varsupsetneq}{\u228B}"),ze("\\varsupsetneqq","\\html@mathml{\\@varsupsetneqq}{\u2ACC}"),ze("\\llbracket","\\html@mathml{\\mathopen{[\\mkern-3.2mu[}}{\\mathopen{\\char`\u27E6}}"),ze("\\rrbracket","\\html@mathml{\\mathclose{]\\mkern-3.2mu]}}{\\mathclose{\\char`\u27E7}}"),ze("\u27E6","\\llbracket"),ze("\u27E7","\\rrbracket"),ze("\\lBrace","\\html@mathml{\\mathopen{\\{\\mkern-3.2mu[}}{\\mathopen{\\char`\u2983}}"),ze("\\rBrace","\\html@mathml{\\mathclose{]\\mkern-3.2mu\\}}}{\\mathclose{\\char`\u2984}}"),ze("\u2983","\\lBrace"),ze("\u2984","\\rBrace"),ze("\\darr","\\downarrow"),ze("\\dArr","\\Downarrow"),ze("\\Darr","\\Downarrow"),ze("\\lang","\\langle"),ze("\\rang","\\rangle"),ze("\\uarr","\\uparrow"),ze("\\uArr","\\Uparrow"),ze("\\Uarr","\\Uparrow"),ze("\\N","\\mathbb{N}"),ze("\\R","\\mathbb{R}"),ze("\\Z","\\mathbb{Z}"),ze("\\alef","\\aleph"),ze("\\alefsym","\\aleph"),ze("\\Alpha","\\mathrm{A}"),ze("\\Beta","\\mathrm{B}"),ze("\\bull","\\bullet"),ze("\\Chi","\\mathrm{X}"),ze("\\clubs","\\clubsuit"),ze("\\cnums","\\mathbb{C}"),ze("\\Complex","\\mathbb{C}"),ze("\\Dagger","\\ddagger"),ze("\\diamonds","\\diamondsuit"),ze("\\empty","\\emptyset"),ze("\\Epsilon","\\mathrm{E}"),ze("\\Eta","\\mathrm{H}"),ze("\\exist","\\exists"),ze("\\harr","\\leftrightarrow"),ze("\\hArr","\\Leftrightarrow"),ze("\\Harr","\\Leftrightarrow"),ze("\\hearts","\\heartsuit"),ze("\\image","\\Im"),ze("\\infin","\\infty"),ze("\\Iota","\\mathrm{I}"),ze("\\isin","\\in"),ze("\\Kappa","\\mathrm{K}"),ze("\\larr","\\leftarrow"),ze("\\lArr","\\Leftarrow"),ze("\\Larr","\\Leftarrow"),ze("\\lrarr","\\leftrightarrow"),ze("\\lrArr","\\Leftrightarrow"),ze("\\Lrarr","\\Leftrightarrow"),ze("\\Mu","\\mathrm{M}"),ze("\\natnums","\\mathbb{N}"),ze("\\Nu","\\mathrm{N}"),ze("\\Omicron","\\mathrm{O}"),ze("\\plusmn","\\pm"),ze("\\rarr","\\rightarrow"),ze("\\rArr","\\Rightarrow"),ze("\\Rarr","\\Rightarrow"),ze("\\real","\\Re"),ze("\\reals","\\mathbb{R}"),ze("\\Reals","\\mathbb{R}"),ze("\\Rho","\\mathrm{P}"),ze("\\sdot","\\cdot"),ze("\\sect","\\S"),ze("\\spades","\\spadesuit"),ze("\\sub","\\subset"),ze("\\sube","\\subseteq"),ze("\\supe","\\supseteq"),ze("\\Tau","\\mathrm{T}"),ze("\\thetasym","\\vartheta"),ze("\\weierp","\\wp"),ze("\\Zeta","\\mathrm{Z}"),ze("\\argmin","\\DOTSB\\operatorname*{arg\\,min}"),ze("\\argmax","\\DOTSB\\operatorname*{arg\\,max}"),ze("\\plim","\\DOTSB\\mathop{\\operatorname{plim}}\\limits"),ze("\\blue","\\textcolor{##6495ed}{#1}"),ze("\\orange","\\textcolor{##ffa500}{#1}"),ze("\\pink","\\textcolor{##ff00af}{#1}"),ze("\\red","\\textcolor{##df0030}{#1}"),ze("\\green","\\textcolor{##28ae7b}{#1}"),ze("\\gray","\\textcolor{gray}{#1}"),ze("\\purple","\\textcolor{##9d38bd}{#1}"),ze("\\blueA","\\textcolor{##ccfaff}{#1}"),ze("\\blueB","\\textcolor{##80f6ff}{#1}"),ze("\\blueC","\\textcolor{##63d9ea}{#1}"),ze("\\blueD","\\textcolor{##11accd}{#1}"),ze("\\blueE","\\textcolor{##0c7f99}{#1}"),ze("\\tealA","\\textcolor{##94fff5}{#1}"),ze("\\tealB","\\textcolor{##26edd5}{#1}"),ze("\\tealC","\\textcolor{##01d1c1}{#1}"),ze("\\tealD","\\textcolor{##01a995}{#1}"),ze("\\tealE","\\textcolor{##208170}{#1}"),ze("\\greenA","\\textcolor{##b6ffb0}{#1}"),ze("\\greenB","\\textcolor{##8af281}{#1}"),ze("\\greenC","\\textcolor{##74cf70}{#1}"),ze("\\greenD","\\textcolor{##1fab54}{#1}"),ze("\\greenE","\\textcolor{##0d923f}{#1}"),ze("\\goldA","\\textcolor{##ffd0a9}{#1}"),ze("\\goldB","\\textcolor{##ffbb71}{#1}"),ze("\\goldC","\\textcolor{##ff9c39}{#1}"),ze("\\goldD","\\textcolor{##e07d10}{#1}"),ze("\\goldE","\\textcolor{##a75a05}{#1}"),ze("\\redA","\\textcolor{##fca9a9}{#1}"),ze("\\redB","\\textcolor{##ff8482}{#1}"),ze("\\redC","\\textcolor{##f9685d}{#1}"),ze("\\redD","\\textcolor{##e84d39}{#1}"),ze("\\redE","\\textcolor{##bc2612}{#1}"),ze("\\maroonA","\\textcolor{##ffbde0}{#1}"),ze("\\maroonB","\\textcolor{##ff92c6}{#1}"),ze("\\maroonC","\\textcolor{##ed5fa6}{#1}"),ze("\\maroonD","\\textcolor{##ca337c}{#1}"),ze("\\maroonE","\\textcolor{##9e034e}{#1}"),ze("\\purpleA","\\textcolor{##ddd7ff}{#1}"),ze("\\purpleB","\\textcolor{##c6b9fc}{#1}"),ze("\\purpleC","\\textcolor{##aa87ff}{#1}"),ze("\\purpleD","\\textcolor{##7854ab}{#1}"),ze("\\purpleE","\\textcolor{##543b78}{#1}"),ze("\\mintA","\\textcolor{##f5f9e8}{#1}"),ze("\\mintB","\\textcolor{##edf2df}{#1}"),ze("\\mintC","\\textcolor{##e0e5cc}{#1}"),ze("\\grayA","\\textcolor{##f6f7f7}{#1}"),ze("\\grayB","\\textcolor{##f0f1f2}{#1}"),ze("\\grayC","\\textcolor{##e3e5e6}{#1}"),ze("\\grayD","\\textcolor{##d6d8da}{#1}"),ze("\\grayE","\\textcolor{##babec2}{#1}"),ze("\\grayF","\\textcolor{##888d93}{#1}"),ze("\\grayG","\\textcolor{##626569}{#1}"),ze("\\grayH","\\textcolor{##3b3e40}{#1}"),ze("\\grayI","\\textcolor{##21242c}{#1}"),ze("\\kaBlue","\\textcolor{##314453}{#1}"),ze("\\kaGreen","\\textcolor{##71B307}{#1}");var Ja={"\\relax":!0,"^":!0,_:!0,"\\limits":!0,"\\nolimits":!0},xo=function(){function re(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 Ya(ma,h.macros),this.mode=_,this.stack=[]}var u=re.prototype;return u.feed=function(h){this.lexer=new pa(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 _=[],P=0;P<h;++P){this.consumeSpaces();var J=this.popToken();if(J.text==="{"){for(var Re=[],Be=1;Be!==0;){var Ve=this.popToken();if(Re.push(Ve),Ve.text==="{")++Be;else if(Ve.text==="}")--Be;else if(Ve.text==="EOF")throw new p("End of input in macro argument",J)}Re.pop(),Re.reverse(),_[P]=Re}else{if(J.text==="EOF")throw new p("End of input expecting macro argument");_[P]=[J]}}return _},u.expandOnce=function(){var h=this.popToken(),_=h.text,P=this._getExpansion(_);if(P==null)return this.pushToken(h),h;if(this.expansionCount++,this.expansionCount>this.settings.maxExpand)throw new p("Too many expansions: infinite loop or need to increase maxExpand setting");var J=P.tokens;if(P.numArgs){var Re=this.consumeArgs(P.numArgs);J=J.slice();for(var Be=J.length-1;Be>=0;--Be){var Ve=J[Be];if(Ve.text==="#"){if(Be===0)throw new p("Incomplete placeholder at end of macro body",Ve);if(Ve=J[--Be],Ve.text==="#")J.splice(Be+1,1);else if(/^[1-9]$/.test(Ve.text)){var yt;(yt=J).splice.apply(yt,[Be,2].concat(Re[+Ve.text-1]))}else throw new p("Not a valid argument number",Ve)}}}return this.pushTokens(J),J},u.expandAfterFuture=function(){return this.expandOnce(),this.future()},u.expandNextToken=function(){for(;;){var h=this.expandOnce();if(h instanceof _e)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 _=[],P=this.stack.length;for(this.pushToken(new _e(h));this.stack.length>P;){var J=this.expandOnce();J instanceof _e&&_.push(this.stack.pop())}return _}},u.expandMacroAsText=function(h){var _=this.expandMacro(h);return _&&_.map(function(P){return P.text}).join("")},u._getExpansion=function(h){var _=this.macros.get(h);if(_==null)return _;var P=typeof _=="function"?_(this):_;if(typeof P=="string"){var J=0;if(P.indexOf("#")!==-1)for(var Re=P.replace(/##/g,"");Re.indexOf("#"+(J+1))!==-1;)++J;for(var Be=new pa(P,this.settings),Ve=[],yt=Be.lex();yt.text!=="EOF";)Ve.push(yt),yt=Be.lex();Ve.reverse();var Rt={tokens:Ve,numArgs:J};return Rt}return P},u.isDefined=function(h){return this.macros.has(h)||vs.hasOwnProperty(h)||Ut.math.hasOwnProperty(h)||Ut.text.hasOwnProperty(h)||Ja.hasOwnProperty(h)},re}(),ya={"\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"}},_a={\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"},Ds=function(){function re(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 xo(f,h,this.mode),this.settings=h,this.leftrightDepth=0}var u=re.prototype;return u.expect=function(h,_){if(_===void 0&&(_=!0),this.fetch().text!==h)throw new p("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 P=[];;){this.mode==="math"&&this.consumeSpaces();var J=this.fetch();if(re.endOfExpression.indexOf(J.text)!==-1||_&&J.text===_||h&&vs[J.text]&&vs[J.text].infix)break;var Re=this.parseAtom(_);if(!Re)break;P.push(Re)}return this.mode==="text"&&this.formLigatures(P),this.handleInfixNodes(P)},u.handleInfixNodes=function(h){for(var _=-1,P,J=0;J<h.length;J++){var Re=Mn(h[J],"infix");if(Re){if(_!==-1)throw new p("only one infix operator per group",Re.token);_=J,P=Re.replaceWith}}if(_!==-1&&P){var Be,Ve,yt=h.slice(0,_),Rt=h.slice(_+1);yt.length===1&&yt[0].type==="ordgroup"?Be=yt[0]:Be={type:"ordgroup",mode:this.mode,body:yt},Rt.length===1&&Rt[0].type==="ordgroup"?Ve=Rt[0]:Ve={type:"ordgroup",mode:this.mode,body:Rt};var Yt;return P==="\\\\abovefrac"?Yt=this.callFunction(P,[Be,h[_],Ve],[]):Yt=this.callFunction(P,[Be,Ve],[]),[Yt]}else return h},u.handleSupSubscript=function(h){var _=this.fetch(),P=_.text;this.consume();var J=this.parseGroup(h,!1,re.SUPSUB_GREEDINESS,void 0,void 0,!0);if(!J)throw new p("Expected group after '"+P+"'",_);return J},u.formatUnsupportedCmd=function(h){for(var _=[],P=0;P<h.length;P++)_.push({type:"textord",mode:"text",text:h[P]});var J={type:"text",mode:this.mode,body:_},Re={type:"color",mode:this.mode,color:this.settings.errorColor,body:[J]};return Re},u.parseAtom=function(h){var _=this.parseGroup("atom",!1,null,h);if(this.mode==="text")return _;for(var P,J;;){this.consumeSpaces();var Re=this.fetch();if(Re.text==="\\limits"||Re.text==="\\nolimits"){var Be=Mn(_,"op");if(Be){var Ve=Re.text==="\\limits";Be.limits=Ve,Be.alwaysHandleSupSub=!0}else if(Be=Mn(_,"operatorname"),Be&&Be.alwaysHandleSupSub){var yt=Re.text==="\\limits";Be.limits=yt}else throw new p("Limit controls must follow a math operator",Re);this.consume()}else if(Re.text==="^"){if(P)throw new p("Double superscript",Re);P=this.handleSupSubscript("superscript")}else if(Re.text==="_"){if(J)throw new p("Double subscript",Re);J=this.handleSupSubscript("subscript")}else if(Re.text==="'"){if(P)throw new p("Double superscript",Re);var Rt={type:"textord",mode:this.mode,text:"\\prime"},Yt=[Rt];for(this.consume();this.fetch().text==="'";)Yt.push(Rt),this.consume();this.fetch().text==="^"&&Yt.push(this.handleSupSubscript("superscript")),P={type:"ordgroup",mode:this.mode,body:Yt}}else break}return P||J?{type:"supsub",mode:this.mode,base:_,sup:P,sub:J}:_},u.parseFunction=function(h,_,P){var J=this.fetch(),Re=J.text,Be=vs[Re];if(!Be)return null;if(this.consume(),P!=null&&Be.greediness<=P)throw new p("Got function '"+Re+"' with no arguments"+(_?" as "+_:""),J);if(this.mode==="text"&&!Be.allowedInText)throw new p("Can't use function '"+Re+"' in text mode",J);if(this.mode==="math"&&Be.allowedInMath===!1)throw new p("Can't use function '"+Re+"' in math mode",J);var Ve=this.parseArguments(Re,Be),yt=Ve.args,Rt=Ve.optArgs;return this.callFunction(Re,yt,Rt,J,h)},u.callFunction=function(h,_,P,J,Re){var Be={funcName:h,parser:this,token:J,breakOnTokenText:Re},Ve=vs[h];if(Ve&&Ve.handler)return Ve.handler(Be,_,P);throw new p("No function handler for "+h)},u.parseArguments=function(h,_){var P=_.numArgs+_.numOptionalArgs;if(P===0)return{args:[],optArgs:[]};for(var J=_.greediness,Re=[],Be=[],Ve=0;Ve<P;Ve++){var yt=_.argTypes&&_.argTypes[Ve],Rt=Ve<_.numOptionalArgs,Yt=Ve>0&&!Rt||Ve===0&&!Rt&&this.mode==="math",yn=this.parseGroupOfType("argument to '"+h+"'",yt,Rt,J,Yt);if(!yn){if(Rt){Be.push(null);continue}throw new p("Expected group after '"+h+"'",this.fetch())}(Rt?Be:Re).push(yn)}return{args:Re,optArgs:Be}},u.parseGroupOfType=function(h,_,P,J,Re){switch(_){case"color":return Re&&this.consumeSpaces(),this.parseColorGroup(P);case"size":return Re&&this.consumeSpaces(),this.parseSizeGroup(P);case"url":return this.parseUrlGroup(P,Re);case"math":case"text":return this.parseGroup(h,P,J,void 0,_,Re);case"hbox":{var Be=this.parseGroup(h,P,J,void 0,"text",Re);if(!Be)return Be;var Ve={type:"styling",mode:Be.mode,body:[Be],style:"text"};return Ve}case"raw":{if(Re&&this.consumeSpaces(),P&&this.fetch().text==="{")return null;var yt=this.parseStringGroup("raw",P,!0);if(yt)return{type:"raw",mode:"text",string:yt.text};throw new p("Expected raw group",this.fetch())}case"original":case null:case void 0:return this.parseGroup(h,P,J,void 0,void 0,Re);default:throw new p("Unknown group type as "+h,this.fetch())}},u.consumeSpaces=function(){for(;this.fetch().text===" ";)this.consume()},u.parseStringGroup=function(h,_,P){var J=_?"[":"{",Re=_?"]":"}",Be=this.fetch();if(Be.text!==J){if(_)return null;if(P&&Be.text!=="EOF"&&/[^{}[\]]/.test(Be.text))return this.consume(),Be}var Ve=this.mode;this.mode="text",this.expect(J);for(var yt="",Rt=this.fetch(),Yt=0,yn=Rt,An;(An=this.fetch()).text!==Re||P&&Yt>0;){switch(An.text){case"EOF":throw new p("Unexpected end of input in "+h,Rt.range(yn,yt));case J:Yt++;break;case Re:Yt--;break}yn=An,yt+=yn.text,this.consume()}return this.expect(Re),this.mode=Ve,Rt.range(yn,yt)},u.parseRegexGroup=function(h,_){var P=this.mode;this.mode="text";for(var J=this.fetch(),Re=J,Be="",Ve;(Ve=this.fetch()).text!=="EOF"&&h.test(Be+Ve.text);)Re=Ve,Be+=Re.text,this.consume();if(Be==="")throw new p("Invalid "+_+": '"+J.text+"'",J);return this.mode=P,J.range(Re,Be)},u.parseColorGroup=function(h){var _=this.parseStringGroup("color",h);if(!_)return null;var P=/^(#[a-f0-9]{3}|#?[a-f0-9]{6}|[a-z]+)$/i.exec(_.text);if(!P)throw new p("Invalid color: '"+_.text+"'",_);var J=P[0];return/^[0-9a-f]{6}$/i.test(J)&&(J="#"+J),{type:"color-token",mode:this.mode,color:J}},u.parseSizeGroup=function(h){var _,P=!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",P=!0);var J=/([-+]?) *(\d+(?:\.\d*)?|\.\d+) *([a-z]{2})/.exec(_.text);if(!J)throw new p("Invalid size: '"+_.text+"'",_);var Re={number:+(J[1]+J[2]),unit:J[3]};if(!Je(Re))throw new p("Invalid unit: '"+Re.unit+"'",_);return{type:"size",mode:this.mode,value:Re,isBlank:P}},u.parseUrlGroup=function(h,_){this.gullet.lexer.setCatcode("%",13);var P=this.parseStringGroup("url",h,!0);if(this.gullet.lexer.setCatcode("%",14),!P)return null;var J=P.text.replace(/\\([#$%&~_^{}])/g,"$1");return{type:"url",mode:this.mode,url:J}},u.parseGroup=function(h,_,P,J,Re,Be){var Ve=this.mode;Re&&this.switchMode(Re),Be&&this.consumeSpaces();var yt=this.fetch(),Rt=yt.text,Yt;if(_?Rt==="[":Rt==="{"||Rt==="\\begingroup"){this.consume();var yn=re.endOfGroup[Rt];this.gullet.beginGroup();var An=this.parseExpression(!1,yn),zn=this.fetch();this.expect(yn),this.gullet.endGroup(),Yt={type:"ordgroup",mode:this.mode,loc:ge.range(yt,zn),body:An,semisimple:Rt==="\\begingroup"||void 0}}else if(_)Yt=null;else if(Yt=this.parseFunction(J,h,P)||this.parseSymbol(),Yt==null&&Rt[0]==="\\"&&!Ja.hasOwnProperty(Rt)){if(this.settings.throwOnError)throw new p("Undefined control sequence: "+Rt,yt);Yt=this.formatUnsupportedCmd(Rt),this.consume()}return Re&&this.switchMode(Ve),Yt},u.formLigatures=function(h){for(var _=h.length-1,P=0;P<_;++P){var J=h[P],Re=J.text;Re==="-"&&h[P+1].text==="-"&&(P+1<_&&h[P+2].text==="-"?(h.splice(P,3,{type:"textord",mode:"text",loc:ge.range(J,h[P+2]),text:"---"}),_-=2):(h.splice(P,2,{type:"textord",mode:"text",loc:ge.range(J,h[P+1]),text:"--"}),_-=1)),(Re==="'"||Re==="`")&&h[P+1].text===Re&&(h.splice(P,2,{type:"textord",mode:"text",loc:ge.range(J,h[P+1]),text:Re+Re}),_-=1)}},u.parseSymbol=function(){var h=this.fetch(),_=h.text;if(/^\\verb[^a-zA-Z]/.test(_)){this.consume();var P=_.slice(5),J=P.charAt(0)==="*";if(J&&(P=P.slice(1)),P.length<2||P.charAt(0)!==P.slice(-1))throw new p(`\\verb assertion failed --
please report what input caused this bug`);return P=P.slice(1,-1),{type:"verb",mode:"text",body:P,star:J}}_a.hasOwnProperty(_[0])&&!Ut[this.mode][_[0]]&&(this.settings.strict&&this.mode==="math"&&this.settings.reportNonstrict("unicodeTextInMathMode",'Accented Unicode text character "'+_[0]+'" used in math mode',h),_=_a[_[0]]+_.substr(1));var Re=Js.exec(_);Re&&(_=_.substring(0,Re.index),_==="i"?_="\u0131":_==="j"&&(_="\u0237"));var Be;if(Ut[this.mode][_]){this.settings.strict&&this.mode==="math"&&Zt.indexOf(_)>=0&&this.settings.reportNonstrict("unicodeTextInMathMode",'Latin-1/Unicode text character "'+_[0]+'" used in math mode',h);var Ve=Ut[this.mode][_].group,yt=ge.range(h),Rt;if(vt.hasOwnProperty(Ve)){var Yt=Ve;Rt={type:"atom",mode:this.mode,family:Yt,loc:yt,text:_}}else Rt={type:Ve,mode:this.mode,loc:yt,text:_};Be=Rt}else if(_.charCodeAt(0)>=128)this.settings.strict&&($e(_.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:ge.range(h),text:_};else return null;if(this.consume(),Re)for(var yn=0;yn<Re[0].length;yn++){var An=Re[0][yn];if(!ya[An])throw new p("Unknown accent ' "+An+"'",h);var zn=ya[An][this.mode];if(!zn)throw new p("Accent "+An+" unsupported in "+this.mode+" mode",h);Be={type:"accent",mode:this.mode,loc:ge.range(h),label:zn,isStretchy:!1,isShifty:!0,base:Be}}return Be},re}();Ds.endOfExpression=["}","\\endgroup","\\end","\\right","&"],Ds.endOfGroup={"[":"]","{":"}","\\begingroup":"\\endgroup"},Ds.SUPSUB_GREEDINESS=1;var qa=function(u,f){if(!(typeof u=="string"||u instanceof String))throw new TypeError("KaTeX can only parse string typed expression");var h=new Ds(u,f);delete h.gullet.macros.current["\\df@tag"];var _=h.parse();if(h.gullet.macros.get("\\df@tag")){if(!f.displayMode)throw new p("\\tag works only in display equations");h.gullet.feed("\\df@tag"),_=[{type:"tag",mode:"text",body:_,tag:h.parse()}]}return _},ba=qa,xa=function(u,f,h){f.textContent="";var _=qs(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."),xa=function(){throw new p("KaTeX doesn't work in quirks mode.")});var Eo=function(u,f){var h=qs(u,f).toMarkup();return h},eo=function(u,f){var h=new U(f);return ba(u,h)},to=function(u,f,h){if(h.throwOnError||!(u instanceof p))throw u;var _=Ge.makeSpan(["katex-error"],[new ce(f)]);return _.setAttribute("title",u.toString()),_.setAttribute("style","color:"+h.errorColor),_},qs=function(u,f){var h=new U(f);try{var _=ba(u,h);return Pr(_,u,h)}catch(P){return to(P,u,h)}},So=function(u,f){var h=new U(f);try{var _=ba(u,h);return Rr(_,u,h)}catch(P){return to(P,u,h)}},wo={version:"0.11.1",render:xa,renderToString:Eo,ParseError:p,__parse:eo,__renderToDomTree:qs,__renderToHTMLTree:So,__setFontMetrics:nt,__defineSymbol:w,__defineMacro:ze,__domTree:{Span:se,Anchor:W,SymbolNode:ce,SvgNode:q,PathNode:le,LineNode:pe}},Qo=m.default=wo}]).default})},32834:function(ln){(function(et,m){ln.exports=m()})(this,function(){"use strict";function et(je,He){for(var tt=0;tt<He.length;tt++){var he=He[tt];he.enumerable=he.enumerable||!1,he.configurable=!0,"value"in he&&(he.writable=!0),Object.defineProperty(je,he.key,he)}}function m(je,He,tt){return He&&et(je.prototype,He),tt&&et(je,tt),je}function L(je,He){if(je){if(typeof je=="string")return Q(je,He);var tt=Object.prototype.toString.call(je).slice(8,-1);if(tt==="Object"&&je.constructor&&(tt=je.constructor.name),tt==="Map"||tt==="Set")return Array.from(je);if(tt==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(tt))return Q(je,He)}}function Q(je,He){(He==null||He>je.length)&&(He=je.length);for(var tt=0,he=new Array(He);tt<He;tt++)he[tt]=je[tt];return he}function ge(je,He){var tt=typeof Symbol!="undefined"&&je[Symbol.iterator]||je["@@iterator"];if(tt)return(tt=tt.call(je)).next.bind(tt);if(Array.isArray(je)||(tt=L(je))||He&&je&&typeof je.length=="number"){tt&&(je=tt);var he=0;return function(){return he>=je.length?{done:!0}:{done:!1,value:je[he++]}}}throw new TypeError(`Invalid attempt to iterate non-iterable instance.
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}var _e={exports:{}};function A(){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 p(je){_e.exports.defaults=je}_e.exports={defaults:A(),getDefaults:A,changeDefaults:p};var be=/[&<>"']/,fe=/[&<>"']/g,o=/[<>"']|&(?!#?\w+;)/,k=/[<>"']|&(?!#?\w+;)/g,N={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;"},v=function(He){return N[He]};function x(je,He){if(He){if(be.test(je))return je.replace(fe,v)}else if(o.test(je))return je.replace(k,v);return je}var S=/&(#(?:\d+)|(?:#x[0-9A-Fa-f]+)|(?:\w+));?/ig;function T(je){return je.replace(S,function(He,tt){return tt=tt.toLowerCase(),tt==="colon"?":":tt.charAt(0)==="#"?tt.charAt(1)==="x"?String.fromCharCode(parseInt(tt.substring(2),16)):String.fromCharCode(+tt.substring(1)):""})}var z=/(^|[^\[])\^/g;function ae(je,He){je=je.source||je,He=He||"";var tt={replace:function(ie,xe){return xe=xe.source||xe,xe=xe.replace(z,"$1"),je=je.replace(ie,xe),tt},getRegex:function(){return new RegExp(je,He)}};return tt}var B=/[^\w:]/g,U=/^$|^[a-z][a-z0-9+.-]*:|^[?#]/i;function X(je,He,tt){if(je){var he;try{he=decodeURIComponent(T(tt)).replace(B,"").toLowerCase()}catch(ie){return null}if(he.indexOf("javascript:")===0||he.indexOf("vbscript:")===0||he.indexOf("data:")===0)return null}He&&!U.test(tt)&&(tt=$(He,tt));try{tt=encodeURI(tt).replace(/%25/g,"%")}catch(ie){return null}return tt}var Z={},D=/^[^:]+:\/*[^/]*$/,C=/^([^:]+:)[\s\S]*$/,K=/^([^:]+:\/*[^/]*)[\s\S]*$/;function $(je,He){Z[" "+je]||(D.test(je)?Z[" "+je]=je+"/":Z[" "+je]=ye(je,"/",!0)),je=Z[" "+je];var tt=je.indexOf(":")===-1;return He.substring(0,2)==="//"?tt?He:je.replace(C,"$1")+He:He.charAt(0)==="/"?tt?He:je.replace(K,"$1")+He:je+He}var ve={exec:function(){}};function Se(je){for(var He=1,tt,he;He<arguments.length;He++){tt=arguments[He];for(he in tt)Object.prototype.hasOwnProperty.call(tt,he)&&(je[he]=tt[he])}return je}function Le(je,He){var tt=je.replace(/\|/g,function(xe,Fe,V){for(var at=!1,Ce=Fe;--Ce>=0&&V[Ce]==="\\";)at=!at;return at?"|":" |"}),he=tt.split(/ \|/),ie=0;if(he.length>He)he.splice(He);else for(;he.length<He;)he.push("");for(;ie<he.length;ie++)he[ie]=he[ie].trim().replace(/\\\|/g,"|");return he}function ye(je,He,tt){var he=je.length;if(he===0)return"";for(var ie=0;ie<he;){var xe=je.charAt(he-ie-1);if(xe===He&&!tt)ie++;else if(xe!==He&&tt)ie++;else break}return je.substr(0,he-ie)}function te(je,He){if(je.indexOf(He[1])===-1)return-1;for(var tt=je.length,he=0,ie=0;ie<tt;ie++)if(je[ie]==="\\")ie++;else if(je[ie]===He[0])he++;else if(je[ie]===He[1]&&(he--,he<0))return ie;return-1}function j(je){je&&je.sanitize&&!je.silent&&console.warn("marked(): sanitize and sanitizer parameters are deprecated since version 0.7.0, should not be used and will be removed in the future. Read more here: https://marked.js.org/#/USING_ADVANCED.md#options")}function ue(je,He){if(He<1)return"";for(var tt="";He>1;)He&1&&(tt+=je),He>>=1,je+=je;return tt+je}var R={escape:x,unescape:T,edit:ae,cleanUrl:X,resolveUrl:$,noopTest:ve,merge:Se,splitCells:Le,rtrim:ye,findClosingBracket:te,checkSanitizeDeprecation:j,repeatString:ue},ee=_e.exports.defaults,G=R.rtrim,y=R.splitCells,E=R.escape,Y=R.findClosingBracket;function me(je,He,tt){var he=He.href,ie=He.title?E(He.title):null,xe=je[1].replace(/\\([\[\]])/g,"$1");return je[0].charAt(0)!=="!"?{type:"link",raw:tt,href:he,title:ie,text:xe}:{type:"image",raw:tt,href:he,title:ie,text:E(xe)}}function $e(je,He){var tt=je.match(/^(\s+)(?:```)/);if(tt===null)return He;var he=tt[1];return He.split(`
`).map(function(ie){var xe=ie.match(/^\s+/);if(xe===null)return ie;var Fe=xe[0];return Fe.length>=he.length?ie.slice(he.length):ie}).join(`
`)}var We=function(){function je(tt){this.options=tt||ee}var He=je.prototype;return He.space=function(he){var ie=this.rules.block.newline.exec(he);if(ie)return ie[0].length>1?{type:"space",raw:ie[0]}:{raw:`
`}},He.code=function(he){var ie=this.rules.block.code.exec(he);if(ie){var xe=ie[0].replace(/^ {1,4}/gm,"");return{type:"code",raw:ie[0],codeBlockStyle:"indented",text:this.options.pedantic?xe:G(xe,`
`)}}},He.fences=function(he){var ie=this.rules.block.fences.exec(he);if(ie){var xe=ie[0],Fe=$e(xe,ie[3]||"");return{type:"code",raw:xe,lang:ie[2]?ie[2].trim():ie[2],text:Fe}}},He.heading=function(he){var ie=this.rules.block.heading.exec(he);if(ie){var xe=ie[2].trim();if(/#$/.test(xe)){var Fe=G(xe,"#");(this.options.pedantic||!Fe||/ $/.test(Fe))&&(xe=Fe.trim())}return{type:"heading",raw:ie[0],depth:ie[1].length,text:xe}}},He.nptable=function(he){var ie=this.rules.block.nptable.exec(he);if(ie){var xe={type:"table",header:y(ie[1].replace(/^ *| *\| *$/g,"")),align:ie[2].replace(/^ *|\| *$/g,"").split(/ *\| */),cells:ie[3]?ie[3].replace(/\n$/,"").split(`
`):[],raw:ie[0]};if(xe.header.length===xe.align.length){var Fe=xe.align.length,V;for(V=0;V<Fe;V++)/^ *-+: *$/.test(xe.align[V])?xe.align[V]="right":/^ *:-+: *$/.test(xe.align[V])?xe.align[V]="center":/^ *:-+ *$/.test(xe.align[V])?xe.align[V]="left":xe.align[V]=null;for(Fe=xe.cells.length,V=0;V<Fe;V++)xe.cells[V]=y(xe.cells[V],xe.header.length);return xe}}},He.hr=function(he){var ie=this.rules.block.hr.exec(he);if(ie)return{type:"hr",raw:ie[0]}},He.blockquote=function(he){var ie=this.rules.block.blockquote.exec(he);if(ie){var xe=ie[0].replace(/^ *> ?/gm,"");return{type:"blockquote",raw:ie[0],text:xe}}},He.list=function(he){var ie=this.rules.block.list.exec(he);if(ie){var xe=ie[0],Fe=ie[2],V=Fe.length>1,at={type:"list",raw:xe,ordered:V,start:V?+Fe.slice(0,-1):"",loose:!1,items:[]},Ce=ie[0].match(this.rules.block.item),It=!1,Bt,an,en,Mt,tn,Ue,bt,wt,Me,Ae=Ce.length;en=this.rules.block.listItemStart.exec(Ce[0]);for(var ut=0;ut<Ae;ut++){if(Bt=Ce[ut],xe=Bt,this.options.pedantic||(Me=Bt.match(new RegExp("\\n\\s*\\n {0,"+(en[0].length-1)+"}\\S")),Me&&(tn=Bt.length-Me.index+Ce.slice(ut+1).join(`
`).length,at.raw=at.raw.substring(0,at.raw.length-tn),Bt=Bt.substring(0,Me.index),xe=Bt,Ae=ut+1)),ut!==Ae-1){if(Mt=this.rules.block.listItemStart.exec(Ce[ut+1]),this.options.pedantic?Mt[1].length>en[1].length:Mt[1].length>=en[0].length||Mt[1].length>3){Ce.splice(ut,2,Ce[ut]+(!this.options.pedantic&&Mt[1].length<en[0].length&&!Ce[ut].match(/\n$/)?"":`
`)+Ce[ut+1]),ut--,Ae--;continue}else(!this.options.pedantic||this.options.smartLists?Mt[2][Mt[2].length-1]!==Fe[Fe.length-1]:V===(Mt[2].length===1))&&(tn=Ce.slice(ut+1).join(`
`).length,at.raw=at.raw.substring(0,at.raw.length-tn),ut=Ae-1);en=Mt}an=Bt.length,Bt=Bt.replace(/^ *([*+-]|\d+[.)]) ?/,""),~Bt.indexOf(`
`)&&(an-=Bt.length,Bt=this.options.pedantic?Bt.replace(/^ {1,4}/gm,""):Bt.replace(new RegExp("^ {1,"+an+"}","gm"),"")),Bt=G(Bt,`
`),ut!==Ae-1&&(xe=xe+`
`),Ue=It||/\n\n(?!\s*$)/.test(xe),ut!==Ae-1&&(It=xe.slice(-2)===`
`,Ue||(Ue=It)),Ue&&(at.loose=!0),this.options.gfm&&(bt=/^\[[ xX]\] /.test(Bt),wt=void 0,bt&&(wt=Bt[1]!==" ",Bt=Bt.replace(/^\[[ xX]\] +/,""))),at.items.push({type:"list_item",raw:xe,task:bt,checked:wt,loose:Ue,text:Bt})}return at}},He.html=function(he){var ie=this.rules.block.html.exec(he);if(ie)return{type:this.options.sanitize?"paragraph":"html",raw:ie[0],pre:!this.options.sanitizer&&(ie[1]==="pre"||ie[1]==="script"||ie[1]==="style"),text:this.options.sanitize?this.options.sanitizer?this.options.sanitizer(ie[0]):E(ie[0]):ie[0]}},He.def=function(he){var ie=this.rules.block.def.exec(he);if(ie){ie[3]&&(ie[3]=ie[3].substring(1,ie[3].length-1));var xe=ie[1].toLowerCase().replace(/\s+/g," ");return{type:"def",tag:xe,raw:ie[0],href:ie[2],title:ie[3]}}},He.table=function(he){var ie=this.rules.block.table.exec(he);if(ie){var xe={type:"table",header:y(ie[1].replace(/^ *| *\| *$/g,"")),align:ie[2].replace(/^ *|\| *$/g,"").split(/ *\| */),cells:ie[3]?ie[3].replace(/\n$/,"").split(`
`):[]};if(xe.header.length===xe.align.length){xe.raw=ie[0];var Fe=xe.align.length,V;for(V=0;V<Fe;V++)/^ *-+: *$/.test(xe.align[V])?xe.align[V]="right":/^ *:-+: *$/.test(xe.align[V])?xe.align[V]="center":/^ *:-+ *$/.test(xe.align[V])?xe.align[V]="left":xe.align[V]=null;for(Fe=xe.cells.length,V=0;V<Fe;V++)xe.cells[V]=y(xe.cells[V].replace(/^ *\| *| *\| *$/g,""),xe.header.length);return xe}}},He.lheading=function(he){var ie=this.rules.block.lheading.exec(he);if(ie)return{type:"heading",raw:ie[0],depth:ie[2].charAt(0)==="="?1:2,text:ie[1]}},He.paragraph=function(he){var ie=this.rules.block.paragraph.exec(he);if(ie)return{type:"paragraph",raw:ie[0],text:ie[1].charAt(ie[1].length-1)===`
`?ie[1].slice(0,-1):ie[1]}},He.text=function(he){var ie=this.rules.block.text.exec(he);if(ie)return{type:"text",raw:ie[0],text:ie[0]}},He.escape=function(he){var ie=this.rules.inline.escape.exec(he);if(ie)return{type:"escape",raw:ie[0],text:E(ie[1])}},He.tag=function(he,ie,xe){var Fe=this.rules.inline.tag.exec(he);if(Fe)return!ie&&/^<a /i.test(Fe[0])?ie=!0:ie&&/^<\/a>/i.test(Fe[0])&&(ie=!1),!xe&&/^<(pre|code|kbd|script)(\s|>)/i.test(Fe[0])?xe=!0:xe&&/^<\/(pre|code|kbd|script)(\s|>)/i.test(Fe[0])&&(xe=!1),{type:this.options.sanitize?"text":"html",raw:Fe[0],inLink:ie,inRawBlock:xe,text:this.options.sanitize?this.options.sanitizer?this.options.sanitizer(Fe[0]):E(Fe[0]):Fe[0]}},He.link=function(he){var ie=this.rules.inline.link.exec(he);if(ie){var xe=ie[2].trim();if(!this.options.pedantic&&/^</.test(xe)){if(!/>$/.test(xe))return;var Fe=G(xe.slice(0,-1),"\\");if((xe.length-Fe.length)%2===0)return}else{var V=Y(ie[2],"()");if(V>-1){var at=ie[0].indexOf("!")===0?5:4,Ce=at+ie[1].length+V;ie[2]=ie[2].substring(0,V),ie[0]=ie[0].substring(0,Ce).trim(),ie[3]=""}}var It=ie[2],Bt="";if(this.options.pedantic){var an=/^([^'"]*[^\s])\s+(['"])(.*)\2/.exec(It);an&&(It=an[1],Bt=an[3])}else Bt=ie[3]?ie[3].slice(1,-1):"";return It=It.trim(),/^</.test(It)&&(this.options.pedantic&&!/>$/.test(xe)?It=It.slice(1):It=It.slice(1,-1)),me(ie,{href:It&&It.replace(this.rules.inline._escapes,"$1"),title:Bt&&Bt.replace(this.rules.inline._escapes,"$1")},ie[0])}},He.reflink=function(he,ie){var xe;if((xe=this.rules.inline.reflink.exec(he))||(xe=this.rules.inline.nolink.exec(he))){var Fe=(xe[2]||xe[1]).replace(/\s+/g," ");if(Fe=ie[Fe.toLowerCase()],!Fe||!Fe.href){var V=xe[0].charAt(0);return{type:"text",raw:V,text:V}}return me(xe,Fe,xe[0])}},He.emStrong=function(he,ie,xe){xe===void 0&&(xe="");var Fe=this.rules.inline.emStrong.lDelim.exec(he);if(Fe&&!(Fe[3]&&xe.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 V=Fe[1]||Fe[2]||"";if(!V||V&&(xe===""||this.rules.inline.punctuation.exec(xe))){var at=Fe[0].length-1,Ce,It,Bt=at,an=0,en=Fe[0][0]==="*"?this.rules.inline.emStrong.rDelimAst:this.rules.inline.emStrong.rDelimUnd;for(en.lastIndex=0,ie=ie.slice(-1*he.length+at);(Fe=en.exec(ie))!=null;)if(Ce=Fe[1]||Fe[2]||Fe[3]||Fe[4]||Fe[5]||Fe[6],!!Ce){if(It=Ce.length,Fe[3]||Fe[4]){Bt+=It;continue}else if((Fe[5]||Fe[6])&&at%3&&!((at+It)%3)){an+=It;continue}if(Bt-=It,!(Bt>0))return It=Math.min(It,It+Bt+an),Math.min(at,It)%2?{type:"em",raw:he.slice(0,at+Fe.index+It+1),text:he.slice(1,at+Fe.index+It)}:{type:"strong",raw:he.slice(0,at+Fe.index+It+1),text:he.slice(2,at+Fe.index+It-1)}}}}},He.codespan=function(he){var ie=this.rules.inline.code.exec(he);if(ie){var xe=ie[2].replace(/\n/g," "),Fe=/[^ ]/.test(xe),V=/^ /.test(xe)&&/ $/.test(xe);return Fe&&V&&(xe=xe.substring(1,xe.length-1)),xe=E(xe,!0),{type:"codespan",raw:ie[0],text:xe}}},He.br=function(he){var ie=this.rules.inline.br.exec(he);if(ie)return{type:"br",raw:ie[0]}},He.del=function(he){var ie=this.rules.inline.del.exec(he);if(ie)return{type:"del",raw:ie[0],text:ie[2]}},He.autolink=function(he,ie){var xe=this.rules.inline.autolink.exec(he);if(xe){var Fe,V;return xe[2]==="@"?(Fe=E(this.options.mangle?ie(xe[1]):xe[1]),V="mailto:"+Fe):(Fe=E(xe[1]),V=Fe),{type:"link",raw:xe[0],text:Fe,href:V,tokens:[{type:"text",raw:Fe,text:Fe}]}}},He.url=function(he,ie){var xe;if(xe=this.rules.inline.url.exec(he)){var Fe,V;if(xe[2]==="@")Fe=E(this.options.mangle?ie(xe[0]):xe[0]),V="mailto:"+Fe;else{var at;do at=xe[0],xe[0]=this.rules.inline._backpedal.exec(xe[0])[0];while(at!==xe[0]);Fe=E(xe[0]),xe[1]==="www."?V="http://"+Fe:V=Fe}return{type:"link",raw:xe[0],text:Fe,href:V,tokens:[{type:"text",raw:Fe,text:Fe}]}}},He.inlineText=function(he,ie,xe){var Fe=this.rules.inline.text.exec(he);if(Fe){var V;return ie?V=this.options.sanitize?this.options.sanitizer?this.options.sanitizer(Fe[0]):E(Fe[0]):Fe[0]:V=E(this.options.smartypants?xe(Fe[0]):Fe[0]),{type:"text",raw:Fe[0],text:V}}},je}(),qe=R.noopTest,Xe=R.edit,gt=R.merge,_t={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:qe,table:qe,lheading:/^([^\n]+)\n {0,3}(=+|-+) *(?:\n+|$)/,_paragraph:/^([^\n]+(?:\n(?!hr|heading|lheading|blockquote|fences|list|html| +\n)[^\n]+)*)/,text:/^[^\n]+/};_t._label=/(?!\s*\])(?:\\[\[\]]|[^\[\]])+/,_t._title=/(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/,_t.def=Xe(_t.def).replace("label",_t._label).replace("title",_t._title).getRegex(),_t.bullet=/(?:[*+-]|\d{1,9}[.)])/,_t.item=/^( *)(bull) ?[^\n]*(?:\n(?! *bull ?)[^\n]*)*/,_t.item=Xe(_t.item,"gm").replace(/bull/g,_t.bullet).getRegex(),_t.listItemStart=Xe(/^( *)(bull) */).replace("bull",_t.bullet).getRegex(),_t.list=Xe(_t.list).replace(/bull/g,_t.bullet).replace("hr","\\n+(?=\\1?(?:(?:- *){3,}|(?:_ *){3,}|(?:\\* *){3,})(?:\\n+|$))").replace("def","\\n+(?="+_t.def.source+")").getRegex(),_t._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",_t._comment=/<!--(?!-?>)[\s\S]*?(?:-->|$)/,_t.html=Xe(_t.html,"i").replace("comment",_t._comment).replace("tag",_t._tag).replace("attribute",/ +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex(),_t.paragraph=Xe(_t._paragraph).replace("hr",_t.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",_t._tag).getRegex(),_t.blockquote=Xe(_t.blockquote).replace("paragraph",_t.paragraph).getRegex(),_t.normal=gt({},_t),_t.gfm=gt({},_t.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*|$)"}),_t.gfm.nptable=Xe(_t.gfm.nptable).replace("hr",_t.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",_t._tag).getRegex(),_t.gfm.table=Xe(_t.gfm.table).replace("hr",_t.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",_t._tag).getRegex(),_t.pedantic=gt({},_t.normal,{html:Xe(`^ *(?:comment *(?:\\n|\\s*$)|<(tag)[\\s\\S]+?</\\1> *(?:\\n{2,}|\\s*$)|<tag(?:"[^"]*"|'[^']*'|\\s[^'"/>\\s]*)*?/?> *(?:\\n{2,}|\\s*$))`).replace("comment",_t._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:qe,paragraph:Xe(_t.normal._paragraph).replace("hr",_t.hr).replace("heading",` *#{1,6} *[^
]`).replace("lheading",_t.lheading).replace("blockquote"," {0,3}>").replace("|fences","").replace("|list","").replace("|html","").getRegex()});var st={escape:/^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/,autolink:/^<(scheme:[^\s\x00-\x1f<>]*|email)>/,url:qe,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:qe,text:/^(`+|[^`])(?:(?= {2,}\n)|[\s\S]*?(?:(?=[\\<!\[`*_]|\b_|$)|[^ ](?= {2,}\n)))/,punctuation:/^([\spunctuation])/};st._punctuation="!\"#$%&'()+\\-.,/:;<=>?@\\[\\]`^{|}~",st.punctuation=Xe(st.punctuation).replace(/punctuation/g,st._punctuation).getRegex(),st.blockSkip=/\[[^\]]*?\]\([^\)]*?\)|`[^`]*?`|<[^>]*?>/g,st.escapedEmSt=/\\\*|\\_/g,st._comment=Xe(_t._comment).replace("(?:-->|$)","-->").getRegex(),st.emStrong.lDelim=Xe(st.emStrong.lDelim).replace(/punct/g,st._punctuation).getRegex(),st.emStrong.rDelimAst=Xe(st.emStrong.rDelimAst,"g").replace(/punct/g,st._punctuation).getRegex(),st.emStrong.rDelimUnd=Xe(st.emStrong.rDelimUnd,"g").replace(/punct/g,st._punctuation).getRegex(),st._escapes=/\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/g,st._scheme=/[a-zA-Z][a-zA-Z0-9+.-]{1,31}/,st._email=/[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+(@)[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)+(?![-_])/,st.autolink=Xe(st.autolink).replace("scheme",st._scheme).replace("email",st._email).getRegex(),st._attribute=/\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/,st.tag=Xe(st.tag).replace("comment",st._comment).replace("attribute",st._attribute).getRegex(),st._label=/(?:\[(?:\\.|[^\[\]\\])*\]|\\.|`[^`]*`|[^\[\]\\`])*?/,st._href=/<(?:\\.|[^\n<>\\])+>|[^\s\x00-\x1f]*/,st._title=/"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/,st.link=Xe(st.link).replace("label",st._label).replace("href",st._href).replace("title",st._title).getRegex(),st.reflink=Xe(st.reflink).replace("label",st._label).getRegex(),st.reflinkSearch=Xe(st.reflinkSearch,"g").replace("reflink",st.reflink).replace("nolink",st.nolink).getRegex(),st.normal=gt({},st),st.pedantic=gt({},st.normal,{strong:{start:/^__|\*\*/,middle:/^__(?=\S)([\s\S]*?\S)__(?!_)|^\*\*(?=\S)([\s\S]*?\S)\*\*(?!\*)/,endAst:/\*\*(?!\*)/g,endUnd:/__(?!_)/g},em:{start:/^_|\*/,middle:/^()\*(?=\S)([\s\S]*?\S)\*(?!\*)|^_(?=\S)([\s\S]*?\S)_(?!_)/,endAst:/\*(?!\*)/g,endUnd:/_(?!_)/g},link:Xe(/^!?\[(label)\]\((.*?)\)/).replace("label",st._label).getRegex(),reflink:Xe(/^!?\[(label)\]\s*\[([^\]]*)\]/).replace("label",st._label).getRegex()}),st.gfm=gt({},st.normal,{escape:Xe(st.escape).replace("])","~|])").getRegex(),_extended_email:/[A-Za-z0-9._+-]+(@)[a-zA-Z0-9-_]+(?:\.[a-zA-Z0-9-_]*[a-zA-Z0-9])+(?![-_])/,url:/^((?:ftp|https?):\/\/|www\.)(?:[a-zA-Z0-9\-]+\.?)+[^\s<]*|^email/,_backpedal:/(?:[^?!.,:;*_~()&]+|\([^)]*\)|&(?![a-zA-Z0-9]+;$)|[?!.,:;*_~)]+(?!$))+/,del:/^(~~?)(?=[^\s~])([\s\S]*?[^\s~])\1(?=[^~]|$)/,text:/^([`~]+|[^`~])(?:(?= {2,}\n)|(?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)|[\s\S]*?(?:(?=[\\<!\[`*~_]|\b_|https?:\/\/|ftp:\/\/|www\.|$)|[^ ](?= {2,}\n)|[^a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-](?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)))/}),st.gfm.url=Xe(st.gfm.url,"i").replace("email",st.gfm._extended_email).getRegex(),st.breaks=gt({},st.gfm,{br:Xe(st.br).replace("{2,}","*").getRegex(),text:Xe(st.gfm.text).replace("\\b_","\\b_| {2,}\\n").replace(/\{2,\}/g,"*").getRegex()});var Kt={block:_t,inline:st},un=We,Ot=_e.exports.defaults,Vt=Kt.block,lt=Kt.inline,At=R.repeatString;function ne(je){return je.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 de(je){var He="",tt,he,ie=je.length;for(tt=0;tt<ie;tt++)he=je.charCodeAt(tt),Math.random()>.5&&(he="x"+he.toString(16)),He+="&#"+he+";";return He}var se=function(){function je(tt){this.tokens=[],this.tokens.links=Object.create(null),this.options=tt||Ot,this.options.tokenizer=this.options.tokenizer||new un,this.tokenizer=this.options.tokenizer,this.tokenizer.options=this.options;var he={block:Vt.normal,inline:lt.normal};this.options.pedantic?(he.block=Vt.pedantic,he.inline=lt.pedantic):this.options.gfm&&(he.block=Vt.gfm,this.options.breaks?he.inline=lt.breaks:he.inline=lt.gfm),this.tokenizer.rules=he}je.lex=function(he,ie){var xe=new je(ie);return xe.lex(he)},je.lexInline=function(he,ie){var xe=new je(ie);return xe.inlineTokens(he)};var He=je.prototype;return He.lex=function(he){return he=he.replace(/\r\n|\r/g,`
`).replace(/\t/g," "),this.blockTokens(he,this.tokens,!0),this.inline(this.tokens),this.tokens},He.blockTokens=function(he,ie,xe){ie===void 0&&(ie=[]),xe===void 0&&(xe=!0),this.options.pedantic&&(he=he.replace(/^ +$/gm,""));for(var Fe,V,at,Ce;he;){if(Fe=this.tokenizer.space(he)){he=he.substring(Fe.raw.length),Fe.type&&ie.push(Fe);continue}if(Fe=this.tokenizer.code(he)){he=he.substring(Fe.raw.length),Ce=ie[ie.length-1],Ce&&Ce.type==="paragraph"?(Ce.raw+=`
`+Fe.raw,Ce.text+=`
`+Fe.text):ie.push(Fe);continue}if(Fe=this.tokenizer.fences(he)){he=he.substring(Fe.raw.length),ie.push(Fe);continue}if(Fe=this.tokenizer.heading(he)){he=he.substring(Fe.raw.length),ie.push(Fe);continue}if(Fe=this.tokenizer.nptable(he)){he=he.substring(Fe.raw.length),ie.push(Fe);continue}if(Fe=this.tokenizer.hr(he)){he=he.substring(Fe.raw.length),ie.push(Fe);continue}if(Fe=this.tokenizer.blockquote(he)){he=he.substring(Fe.raw.length),Fe.tokens=this.blockTokens(Fe.text,[],xe),ie.push(Fe);continue}if(Fe=this.tokenizer.list(he)){for(he=he.substring(Fe.raw.length),at=Fe.items.length,V=0;V<at;V++)Fe.items[V].tokens=this.blockTokens(Fe.items[V].text,[],!1);ie.push(Fe);continue}if(Fe=this.tokenizer.html(he)){he=he.substring(Fe.raw.length),ie.push(Fe);continue}if(xe&&(Fe=this.tokenizer.def(he))){he=he.substring(Fe.raw.length),this.tokens.links[Fe.tag]||(this.tokens.links[Fe.tag]={href:Fe.href,title:Fe.title});continue}if(Fe=this.tokenizer.table(he)){he=he.substring(Fe.raw.length),ie.push(Fe);continue}if(Fe=this.tokenizer.lheading(he)){he=he.substring(Fe.raw.length),ie.push(Fe);continue}if(xe&&(Fe=this.tokenizer.paragraph(he))){he=he.substring(Fe.raw.length),ie.push(Fe);continue}if(Fe=this.tokenizer.text(he)){he=he.substring(Fe.raw.length),Ce=ie[ie.length-1],Ce&&Ce.type==="text"?(Ce.raw+=`
`+Fe.raw,Ce.text+=`
`+Fe.text):ie.push(Fe);continue}if(he){var It="Infinite loop on byte: "+he.charCodeAt(0);if(this.options.silent){console.error(It);break}else throw new Error(It)}}return ie},He.inline=function(he){var ie,xe,Fe,V,at,Ce,It=he.length;for(ie=0;ie<It;ie++)switch(Ce=he[ie],Ce.type){case"paragraph":case"text":case"heading":{Ce.tokens=[],this.inlineTokens(Ce.text,Ce.tokens);break}case"table":{for(Ce.tokens={header:[],cells:[]},V=Ce.header.length,xe=0;xe<V;xe++)Ce.tokens.header[xe]=[],this.inlineTokens(Ce.header[xe],Ce.tokens.header[xe]);for(V=Ce.cells.length,xe=0;xe<V;xe++)for(at=Ce.cells[xe],Ce.tokens.cells[xe]=[],Fe=0;Fe<at.length;Fe++)Ce.tokens.cells[xe][Fe]=[],this.inlineTokens(at[Fe],Ce.tokens.cells[xe][Fe]);break}case"blockquote":{this.inline(Ce.tokens);break}case"list":{for(V=Ce.items.length,xe=0;xe<V;xe++)this.inline(Ce.items[xe].tokens);break}}return he},He.inlineTokens=function(he,ie,xe,Fe){ie===void 0&&(ie=[]),xe===void 0&&(xe=!1),Fe===void 0&&(Fe=!1);var V,at,Ce=he,It,Bt,an;if(this.tokens.links){var en=Object.keys(this.tokens.links);if(en.length>0)for(;(It=this.tokenizer.rules.inline.reflinkSearch.exec(Ce))!=null;)en.includes(It[0].slice(It[0].lastIndexOf("[")+1,-1))&&(Ce=Ce.slice(0,It.index)+"["+At("a",It[0].length-2)+"]"+Ce.slice(this.tokenizer.rules.inline.reflinkSearch.lastIndex))}for(;(It=this.tokenizer.rules.inline.blockSkip.exec(Ce))!=null;)Ce=Ce.slice(0,It.index)+"["+At("a",It[0].length-2)+"]"+Ce.slice(this.tokenizer.rules.inline.blockSkip.lastIndex);for(;(It=this.tokenizer.rules.inline.escapedEmSt.exec(Ce))!=null;)Ce=Ce.slice(0,It.index)+"++"+Ce.slice(this.tokenizer.rules.inline.escapedEmSt.lastIndex);for(;he;){if(Bt||(an=""),Bt=!1,V=this.tokenizer.escape(he)){he=he.substring(V.raw.length),ie.push(V);continue}if(V=this.tokenizer.tag(he,xe,Fe)){he=he.substring(V.raw.length),xe=V.inLink,Fe=V.inRawBlock;var Mt=ie[ie.length-1];Mt&&V.type==="text"&&Mt.type==="text"?(Mt.raw+=V.raw,Mt.text+=V.text):ie.push(V);continue}if(V=this.tokenizer.link(he)){he=he.substring(V.raw.length),V.type==="link"&&(V.tokens=this.inlineTokens(V.text,[],!0,Fe)),ie.push(V);continue}if(V=this.tokenizer.reflink(he,this.tokens.links)){he=he.substring(V.raw.length);var tn=ie[ie.length-1];V.type==="link"?(V.tokens=this.inlineTokens(V.text,[],!0,Fe),ie.push(V)):tn&&V.type==="text"&&tn.type==="text"?(tn.raw+=V.raw,tn.text+=V.text):ie.push(V);continue}if(V=this.tokenizer.emStrong(he,Ce,an)){he=he.substring(V.raw.length),V.tokens=this.inlineTokens(V.text,[],xe,Fe),ie.push(V);continue}if(V=this.tokenizer.codespan(he)){he=he.substring(V.raw.length),ie.push(V);continue}if(V=this.tokenizer.br(he)){he=he.substring(V.raw.length),ie.push(V);continue}if(V=this.tokenizer.del(he)){he=he.substring(V.raw.length),V.tokens=this.inlineTokens(V.text,[],xe,Fe),ie.push(V);continue}if(V=this.tokenizer.autolink(he,de)){he=he.substring(V.raw.length),ie.push(V);continue}if(!xe&&(V=this.tokenizer.url(he,de))){he=he.substring(V.raw.length),ie.push(V);continue}if(V=this.tokenizer.inlineText(he,Fe,ne)){he=he.substring(V.raw.length),V.raw.slice(-1)!=="_"&&(an=V.raw.slice(-1)),Bt=!0,at=ie[ie.length-1],at&&at.type==="text"?(at.raw+=V.raw,at.text+=V.text):ie.push(V);continue}if(he){var Ue="Infinite loop on byte: "+he.charCodeAt(0);if(this.options.silent){console.error(Ue);break}else throw new Error(Ue)}}return ie},m(je,null,[{key:"rules",get:function(){return{block:Vt,inline:lt}}}]),je}(),W=_e.exports.defaults,Ie=R.cleanUrl,M=R.escape,ce=function(){function je(tt){this.options=tt||W}var He=je.prototype;return He.code=function(he,ie,xe){var Fe=(ie||"").match(/\S*/)[0];if(this.options.highlight){var V=this.options.highlight(he,Fe);V!=null&&V!==he&&(xe=!0,he=V)}return he=he.replace(/\n$/,"")+`
`,Fe?'<pre><code class="'+this.options.langPrefix+M(Fe,!0)+'">'+(xe?he:M(he,!0))+`</code></pre>
`:"<pre><code>"+(xe?he:M(he,!0))+`</code></pre>
`},He.blockquote=function(he){return`<blockquote>
`+he+`</blockquote>
`},He.html=function(he){return he},He.heading=function(he,ie,xe,Fe){return this.options.headerIds?"<h"+ie+' id="'+this.options.headerPrefix+Fe.slug(xe)+'">'+he+"</h"+ie+`>
`:"<h"+ie+">"+he+"</h"+ie+`>
`},He.hr=function(){return this.options.xhtml?`<hr/>
`:`<hr>
`},He.list=function(he,ie,xe){var Fe=ie?"ol":"ul",V=ie&&xe!==1?' start="'+xe+'"':"";return"<"+Fe+V+`>
`+he+"</"+Fe+`>
`},He.listitem=function(he){return"<li>"+he+`</li>
`},He.checkbox=function(he){return"<input "+(he?'checked="" ':"")+'disabled="" type="checkbox"'+(this.options.xhtml?" /":"")+"> "},He.paragraph=function(he){return"<p>"+he+`</p>
`},He.table=function(he,ie){return ie&&(ie="<tbody>"+ie+"</tbody>"),`<table>
<thead>
`+he+`</thead>
`+ie+`</table>
`},He.tablerow=function(he){return`<tr>
`+he+`</tr>
`},He.tablecell=function(he,ie){var xe=ie.header?"th":"td",Fe=ie.align?"<"+xe+' align="'+ie.align+'">':"<"+xe+">";return Fe+he+"</"+xe+`>
`},He.strong=function(he){return"<strong>"+he+"</strong>"},He.em=function(he){return"<em>"+he+"</em>"},He.codespan=function(he){return"<code>"+he+"</code>"},He.br=function(){return this.options.xhtml?"<br/>":"<br>"},He.del=function(he){return"<del>"+he+"</del>"},He.link=function(he,ie,xe){if(he=Ie(this.options.sanitize,this.options.baseUrl,he),he===null)return xe;var Fe='<a href="'+M(he)+'"';return ie&&(Fe+=' title="'+ie+'"'),Fe+=">"+xe+"</a>",Fe},He.image=function(he,ie,xe){if(he=Ie(this.options.sanitize,this.options.baseUrl,he),he===null)return xe;var Fe='<img src="'+he+'" alt="'+xe+'"';return ie&&(Fe+=' title="'+ie+'"'),Fe+=this.options.xhtml?"/>":">",Fe},He.text=function(he){return he},je}(),q=function(){function je(){}var He=je.prototype;return He.strong=function(he){return he},He.em=function(he){return he},He.codespan=function(he){return he},He.del=function(he){return he},He.html=function(he){return he},He.text=function(he){return he},He.link=function(he,ie,xe){return""+xe},He.image=function(he,ie,xe){return""+xe},He.br=function(){return""},je}(),le=function(){function je(){this.seen={}}var He=je.prototype;return He.serialize=function(he){return he.toLowerCase().trim().replace(/<[!\/a-z].*?>/ig,"").replace(/[\u2000-\u206F\u2E00-\u2E7F\\'!"#$%&()*+,./:;<=>?@[\]^`{|}~]/g,"").replace(/\s/g,"-")},He.getNextSafeSlug=function(he,ie){var xe=he,Fe=0;if(this.seen.hasOwnProperty(xe)){Fe=this.seen[he];do Fe++,xe=he+"-"+Fe;while(this.seen.hasOwnProperty(xe))}return ie||(this.seen[he]=Fe,this.seen[xe]=0),xe},He.slug=function(he,ie){ie===void 0&&(ie={});var xe=this.serialize(he);return this.getNextSafeSlug(xe,ie.dryrun)},je}(),pe=ce,De=q,Te=le,ke=_e.exports.defaults,Oe=R.unescape,Ne=function(){function je(tt){this.options=tt||ke,this.options.renderer=this.options.renderer||new pe,this.renderer=this.options.renderer,this.renderer.options=this.options,this.textRenderer=new De,this.slugger=new Te}je.parse=function(he,ie){var xe=new je(ie);return xe.parse(he)},je.parseInline=function(he,ie){var xe=new je(ie);return xe.parseInline(he)};var He=je.prototype;return He.parse=function(he,ie){ie===void 0&&(ie=!0);var xe="",Fe,V,at,Ce,It,Bt,an,en,Mt,tn,Ue,bt,wt,Me,Ae,ut,ft,Nt,Pt=he.length;for(Fe=0;Fe<Pt;Fe++)switch(tn=he[Fe],tn.type){case"space":continue;case"hr":{xe+=this.renderer.hr();continue}case"heading":{xe+=this.renderer.heading(this.parseInline(tn.tokens),tn.depth,Oe(this.parseInline(tn.tokens,this.textRenderer)),this.slugger);continue}case"code":{xe+=this.renderer.code(tn.text,tn.lang,tn.escaped);continue}case"table":{for(en="",an="",Ce=tn.header.length,V=0;V<Ce;V++)an+=this.renderer.tablecell(this.parseInline(tn.tokens.header[V]),{header:!0,align:tn.align[V]});for(en+=this.renderer.tablerow(an),Mt="",Ce=tn.cells.length,V=0;V<Ce;V++){for(Bt=tn.tokens.cells[V],an="",It=Bt.length,at=0;at<It;at++)an+=this.renderer.tablecell(this.parseInline(Bt[at]),{header:!1,align:tn.align[at]});Mt+=this.renderer.tablerow(an)}xe+=this.renderer.table(en,Mt);continue}case"blockquote":{Mt=this.parse(tn.tokens),xe+=this.renderer.blockquote(Mt);continue}case"list":{for(Ue=tn.ordered,bt=tn.start,wt=tn.loose,Ce=tn.items.length,Mt="",V=0;V<Ce;V++)Ae=tn.items[V],ut=Ae.checked,ft=Ae.task,Me="",Ae.task&&(Nt=this.renderer.checkbox(ut),wt?Ae.tokens.length>0&&Ae.tokens[0].type==="text"?(Ae.tokens[0].text=Nt+" "+Ae.tokens[0].text,Ae.tokens[0].tokens&&Ae.tokens[0].tokens.length>0&&Ae.tokens[0].tokens[0].type==="text"&&(Ae.tokens[0].tokens[0].text=Nt+" "+Ae.tokens[0].tokens[0].text)):Ae.tokens.unshift({type:"text",text:Nt}):Me+=Nt),Me+=this.parse(Ae.tokens,wt),Mt+=this.renderer.listitem(Me,ft,ut);xe+=this.renderer.list(Mt,Ue,bt);continue}case"html":{xe+=this.renderer.html(tn.text);continue}case"paragraph":{xe+=this.renderer.paragraph(this.parseInline(tn.tokens));continue}case"text":{for(Mt=tn.tokens?this.parseInline(tn.tokens):tn.text;Fe+1<Pt&&he[Fe+1].type==="text";)tn=he[++Fe],Mt+=`
`+(tn.tokens?this.parseInline(tn.tokens):tn.text);xe+=ie?this.renderer.paragraph(Mt):Mt;continue}default:{var Zt='Token with "'+tn.type+'" type was not found.';if(this.options.silent){console.error(Zt);return}else throw new Error(Zt)}}return xe},He.parseInline=function(he,ie){ie=ie||this.renderer;var xe="",Fe,V,at=he.length;for(Fe=0;Fe<at;Fe++)switch(V=he[Fe],V.type){case"escape":{xe+=ie.text(V.text);break}case"html":{xe+=ie.html(V.text);break}case"link":{xe+=ie.link(V.href,V.title,this.parseInline(V.tokens,ie));break}case"image":{xe+=ie.image(V.href,V.title,V.text);break}case"strong":{xe+=ie.strong(this.parseInline(V.tokens,ie));break}case"em":{xe+=ie.em(this.parseInline(V.tokens,ie));break}case"codespan":{xe+=ie.codespan(V.text);break}case"br":{xe+=ie.br();break}case"del":{xe+=ie.del(this.parseInline(V.tokens,ie));break}case"text":{xe+=ie.text(V.text);break}default:{var Ce='Token with "'+V.type+'" type was not found.';if(this.options.silent){console.error(Ce);return}else throw new Error(Ce)}}return xe},je}(),nt=se,Qe=Ne,Ze=We,pt=ce,vt=q,ct=le,Dt=R.merge,Ut=R.checkSanitizeDeprecation,w=R.escape,I=_e.exports.getDefaults,dt=_e.exports.changeDefaults,oe=_e.exports.defaults;function Pe(je,He,tt){if(typeof je=="undefined"||je===null)throw new Error("marked(): input parameter is undefined or null");if(typeof je!="string")throw new Error("marked(): input parameter is of type "+Object.prototype.toString.call(je)+", string expected");if(typeof He=="function"&&(tt=He,He=null),He=Dt({},Pe.defaults,He||{}),Ut(He),tt){var he=He.highlight,ie;try{ie=nt.lex(je,He)}catch(at){return tt(at)}var xe=function(Ce){var It;if(!Ce)try{He.walkTokens&&Pe.walkTokens(ie,He.walkTokens),It=Qe.parse(ie,He)}catch(Bt){Ce=Bt}return He.highlight=he,Ce?tt(Ce):tt(null,It)};if(!he||he.length<3||(delete He.highlight,!ie.length))return xe();var Fe=0;Pe.walkTokens(ie,function(at){at.type==="code"&&(Fe++,setTimeout(function(){he(at.text,at.lang,function(Ce,It){if(Ce)return xe(Ce);It!=null&&It!==at.text&&(at.text=It,at.escaped=!0),Fe--,Fe===0&&xe()})},0))}),Fe===0&&xe();return}try{var V=nt.lex(je,He);return He.walkTokens&&Pe.walkTokens(V,He.walkTokens),Qe.parse(V,He)}catch(at){if(at.message+=`
Please report this to https://github.com/markedjs/marked.`,He.silent)return"<p>An error occurred:</p><pre>"+w(at.message+"",!0)+"</pre>";throw at}}Pe.options=Pe.setOptions=function(je){return Dt(Pe.defaults,je),dt(Pe.defaults),Pe},Pe.getDefaults=I,Pe.defaults=oe,Pe.use=function(je){var He=Dt({},je);if(je.renderer&&function(){var he=Pe.defaults.renderer||new pt,ie=function(V){var at=he[V];he[V]=function(){for(var Ce=arguments.length,It=new Array(Ce),Bt=0;Bt<Ce;Bt++)It[Bt]=arguments[Bt];var an=je.renderer[V].apply(he,It);return an===!1&&(an=at.apply(he,It)),an}};for(var xe in je.renderer)ie(xe);He.renderer=he}(),je.tokenizer&&function(){var he=Pe.defaults.tokenizer||new Ze,ie=function(V){var at=he[V];he[V]=function(){for(var Ce=arguments.length,It=new Array(Ce),Bt=0;Bt<Ce;Bt++)It[Bt]=arguments[Bt];var an=je.tokenizer[V].apply(he,It);return an===!1&&(an=at.apply(he,It)),an}};for(var xe in je.tokenizer)ie(xe);He.tokenizer=he}(),je.walkTokens){var tt=Pe.defaults.walkTokens;He.walkTokens=function(he){je.walkTokens(he),tt&&tt(he)}}Pe.setOptions(He)},Pe.walkTokens=function(je,He){for(var tt=ge(je),he;!(he=tt()).done;){var ie=he.value;switch(He(ie),ie.type){case"table":{for(var xe=ge(ie.tokens.header),Fe;!(Fe=xe()).done;){var V=Fe.value;Pe.walkTokens(V,He)}for(var at=ge(ie.tokens.cells),Ce;!(Ce=at()).done;)for(var It=Ce.value,Bt=ge(It),an;!(an=Bt()).done;){var en=an.value;Pe.walkTokens(en,He)}break}case"list":{Pe.walkTokens(ie.items,He);break}default:ie.tokens&&Pe.walkTokens(ie.tokens,He)}}},Pe.parseInline=function(je,He){if(typeof je=="undefined"||je===null)throw new Error("marked.parseInline(): input parameter is undefined or null");if(typeof je!="string")throw new Error("marked.parseInline(): input parameter is of type "+Object.prototype.toString.call(je)+", string expected");He=Dt({},Pe.defaults,He||{}),Ut(He);try{var tt=nt.lexInline(je,He);return He.walkTokens&&Pe.walkTokens(tt,He.walkTokens),Qe.parseInline(tt,He)}catch(he){if(he.message+=`
Please report this to https://github.com/markedjs/marked.`,He.silent)return"<p>An error occurred:</p><pre>"+w(he.message+"",!0)+"</pre>";throw he}},Pe.Parser=Qe,Pe.parser=Qe.parse,Pe.Renderer=pt,Pe.TextRenderer=vt,Pe.Lexer=nt,Pe.lexer=nt.lex,Pe.Tokenizer=Ze,Pe.Slugger=ct,Pe.parse=Pe;var vn=Pe;return vn})},11690:function(ln){const et=/[&<>"']/,m=/[&<>"']/g,L=/[<>"']|&(?!#?\w+;)/,Q=/[<>"']|&(?!#?\w+;)/g,ge={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;"},_e=$=>ge[$];function A($,ve){if(ve){if(et.test($))return $.replace(m,_e)}else if(L.test($))return $.replace(Q,_e);return $}const p=/&(#(?:\d+)|(?:#x[0-9A-Fa-f]+)|(?:\w+));?/ig;function be($){return $.replace(p,(ve,Se)=>(Se=Se.toLowerCase(),Se==="colon"?":":Se.charAt(0)==="#"?Se.charAt(1)==="x"?String.fromCharCode(parseInt(Se.substring(2),16)):String.fromCharCode(+Se.substring(1)):""))}const fe=/(^|[^\[])\^/g;function o($,ve){$=$.source||$,ve=ve||"";const Se={replace:(Le,ye)=>(ye=ye.source||ye,ye=ye.replace(fe,"$1"),$=$.replace(Le,ye),Se),getRegex:()=>new RegExp($,ve)};return Se}const k=/[^\w:]/g,N=/^$|^[a-z][a-z0-9+.-]*:|^[?#]/i;function v($,ve,Se){if($){let Le;try{Le=decodeURIComponent(be(Se)).replace(k,"").toLowerCase()}catch(ye){return null}if(Le.indexOf("javascript:")===0||Le.indexOf("vbscript:")===0||Le.indexOf("data:")===0)return null}ve&&!N.test(Se)&&(Se=ae(ve,Se));try{Se=encodeURI(Se).replace(/%25/g,"%")}catch(Le){return null}return Se}const x={},S=/^[^:]+:\/*[^/]*$/,T=/^([^:]+:)[\s\S]*$/,z=/^([^:]+:\/*[^/]*)[\s\S]*$/;function ae($,ve){x[" "+$]||(S.test($)?x[" "+$]=$+"/":x[" "+$]=Z($,"/",!0)),$=x[" "+$];const Se=$.indexOf(":")===-1;return ve.substring(0,2)==="//"?Se?ve:$.replace(T,"$1")+ve:ve.charAt(0)==="/"?Se?ve:$.replace(z,"$1")+ve:$+ve}const B={exec:function(){}};function U($){let ve=1,Se,Le;for(;ve<arguments.length;ve++){Se=arguments[ve];for(Le in Se)Object.prototype.hasOwnProperty.call(Se,Le)&&($[Le]=Se[Le])}return $}function X($,ve){const Se=$.replace(/\|/g,(te,j,ue)=>{let R=!1,ee=j;for(;--ee>=0&&ue[ee]==="\\";)R=!R;return R?"|":" |"}),Le=Se.split(/ \|/);let ye=0;if(Le.length>ve)Le.splice(ve);else for(;Le.length<ve;)Le.push("");for(;ye<Le.length;ye++)Le[ye]=Le[ye].trim().replace(/\\\|/g,"|");return Le}function Z($,ve,Se){const Le=$.length;if(Le===0)return"";let ye=0;for(;ye<Le;){const te=$.charAt(Le-ye-1);if(te===ve&&!Se)ye++;else if(te!==ve&&Se)ye++;else break}return $.substr(0,Le-ye)}function D($,ve){if($.indexOf(ve[1])===-1)return-1;const Se=$.length;let Le=0,ye=0;for(;ye<Se;ye++)if($[ye]==="\\")ye++;else if($[ye]===ve[0])Le++;else if($[ye]===ve[1]&&(Le--,Le<0))return ye;return-1}function C($){$&&$.sanitize&&!$.silent&&console.warn("marked(): sanitize and sanitizer parameters are deprecated since version 0.7.0, should not be used and will be removed in the future. Read more here: https://marked.js.org/#/USING_ADVANCED.md#options")}function K($,ve){if(ve<1)return"";let Se="";for(;ve>1;)ve&1&&(Se+=$),ve>>=1,$+=$;return Se+$}ln.exports={escape:A,unescape:be,edit:o,cleanUrl:v,resolveUrl:ae,noopTest:B,merge:U,splitCells:X,rtrim:Z,findClosingBracket:D,checkSanitizeDeprecation:C,repeatString:K}},75918:function(ln,et,m){"use strict";m.d(et,{Wi:function(){return p},Z0:function(){return be},aU:function(){return A},eZ:function(){return o},wY:function(){return fe}});var L=m(4348),Q=m(69323),ge=m(13268),_e=function(k,N,v,x){function S(T){return T instanceof v?T:new v(function(z){z(T)})}return new(v||(v=Promise))(function(T,z){function ae(X){try{U(x.next(X))}catch(Z){z(Z)}}function B(X){try{U(x.throw(X))}catch(Z){z(Z)}}function U(X){X.done?T(X.value):S(X.value).then(ae,B)}U((x=x.apply(k,N||[])).next())})};class A extends Q.JT{constructor(N,v="",x="",S=!0,T){super(),this._onDidChange=this._register(new L.Q5),this.onDidChange=this._onDidChange.event,this._enabled=!0,this._id=N,this._label=v,this._cssClass=x,this._enabled=S,this._actionCallback=T}get id(){return this._id}get label(){return this._label}set label(N){this._setLabel(N)}_setLabel(N){this._label!==N&&(this._label=N,this._onDidChange.fire({label:N}))}get tooltip(){return this._tooltip||""}set tooltip(N){this._setTooltip(N)}_setTooltip(N){this._tooltip!==N&&(this._tooltip=N,this._onDidChange.fire({tooltip:N}))}get class(){return this._cssClass}set class(N){this._setClass(N)}_setClass(N){this._cssClass!==N&&(this._cssClass=N,this._onDidChange.fire({class:N}))}get enabled(){return this._enabled}set enabled(N){this._setEnabled(N)}_setEnabled(N){this._enabled!==N&&(this._enabled=N,this._onDidChange.fire({enabled:N}))}get checked(){return this._checked}set checked(N){this._setChecked(N)}_setChecked(N){this._checked!==N&&(this._checked=N,this._onDidChange.fire({checked:N}))}run(N,v){return _e(this,void 0,void 0,function*(){this._actionCallback&&(yield this._actionCallback(N))})}}class p extends Q.JT{constructor(){super(...arguments),this._onBeforeRun=this._register(new L.Q5),this.onBeforeRun=this._onBeforeRun.event,this._onDidRun=this._register(new L.Q5),this.onDidRun=this._onDidRun.event}run(N,v){return _e(this,void 0,void 0,function*(){if(!N.enabled)return;this._onBeforeRun.fire({action:N});let x;try{yield this.runAction(N,v)}catch(S){x=S}this._onDidRun.fire({action:N,error:x})})}runAction(N,v){return _e(this,void 0,void 0,function*(){yield N.run(v)})}}class be extends A{constructor(N){super(be.ID,N,N?"separator text":"separator"),this.checked=!1,this.enabled=!1}}be.ID="vs.actions.separator";class fe{constructor(N,v,x,S){this.tooltip="",this.enabled=!0,this.checked=!1,this.id=N,this.label=v,this.class=S,this._actions=x}get actions(){return this._actions}dispose(){}run(){return _e(this,void 0,void 0,function*(){})}}class o extends A{constructor(){super(o.ID,ge.N("submenu.empty","(empty)"),void 0,!1)}}o.ID="vs.actions.empty"},76068:function(ln,et,m){"use strict";m.d(et,{ok:function(){return L}});function L(Q,ge){if(!Q)throw new Error(ge?`Assertion failed (${ge})`:"Assertion Failed")}},52615:function(ln,et,m){"use strict";m.d(et,{CM:function(){return A},JL:function(){return p},dT:function(){return fe},fK:function(){return _e},lA:function(){return be}});var L=m(4348);class Q{constructor(){this._icons=new Map,this._onDidRegister=new L.Q5}add(k){const N=this._icons.get(k.id);N?k.description?N.description=k.description:console.error(`Duplicate registration of codicon ${k.id}`):(this._icons.set(k.id,k),this._onDidRegister.fire(k))}get(k){return this._icons.get(k)}get all(){return this._icons.values()}get onDidRegister(){return this._onDidRegister.event}}const ge=new Q,_e=ge;function A(o,k){return new be(o,k)}function p(o){return o?o.replace(/\$\((.*?)\)/g,(k,N)=>` ${N} `).trim():""}class be{constructor(k,N,v){this.id=k,this.definition=N,this.description=v,ge.add(this)}get classNames(){return"codicon codicon-"+this.id}get classNamesArray(){return["codicon","codicon-"+this.id]}get cssSelector(){return".codicon.codicon-"+this.id}}var fe;(function(o){o.iconNameSegment="[A-Za-z0-9]+",o.iconNameExpression="[A-Za-z0-9\\-]+",o.iconModifierExpression="~[A-Za-z]+";const k=new RegExp(`^(${o.iconNameExpression})(${o.iconModifierExpression})?$`);function N(S){if(S instanceof be)return["codicon","codicon-"+S.id];const T=k.exec(S.id);if(!T)return N(be.error);let[,z,ae]=T;const B=["codicon","codicon-"+z];return ae&&B.push("codicon-modifier-"+ae.substr(1)),B}o.asClassNameArray=N;function v(S){return N(S).join(" ")}o.asClassName=v;function x(S){return"."+N(S).join(".")}o.asCSSSelector=x})(fe||(fe={})),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"})}(be||(be={}))},79881:function(ln,et,m){"use strict";m.d(et,{B8:function(){return N},Cp:function(){return _e},F0:function(){return fe},L6:function(){return k},VV:function(){return be},b1:function(){return o},dL:function(){return ge},ri:function(){return A}});class L{constructor(){this.listeners=[],this.unexpectedErrorHandler=function(x){setTimeout(()=>{throw x.stack?new Error(x.message+`
`+x.stack):x},0)}}emit(x){this.listeners.forEach(S=>{S(x)})}onUnexpectedError(x){this.unexpectedErrorHandler(x),this.emit(x)}onUnexpectedExternalError(x){this.unexpectedErrorHandler(x)}}const Q=new L;function ge(v){be(v)||Q.onUnexpectedError(v)}function _e(v){be(v)||Q.onUnexpectedExternalError(v)}function A(v){if(v instanceof Error){let{name:x,message:S}=v;const T=v.stacktrace||v.stack;return{$isError:!0,name:x,message:S,stack:T}}return v}const p="Canceled";function be(v){return v instanceof Error&&v.name===p&&v.message===p}function fe(){const v=new Error(p);return v.name=v.message,v}function o(v){return v?new Error(`Illegal argument: ${v}`):new Error("Illegal argument")}function k(v){return v?new Error(`Illegal state: ${v}`):new Error("Illegal state")}class N extends Error{constructor(x){super("NotSupported"),x&&(this.message=x)}}},4348:function(ln,et,m){"use strict";m.d(et,{D0:function(){return N},E7:function(){return v},K3:function(){return k},Q5:function(){return o},ZD:function(){return x},ju:function(){return A}});var L=m(79881),Q=m(69323),ge=m(34502),_e=m(95830),A;(function(S){S.None=()=>Q.JT.None;function T(ue){return(R,ee=null,G)=>{let y=!1,E;return E=ue(Y=>{if(!y)return E?E.dispose():y=!0,R.call(ee,Y)},null,G),y&&E.dispose(),E}}S.once=T;function z(ue,R){return D((ee,G=null,y)=>ue(E=>ee.call(G,R(E)),null,y))}S.map=z;function ae(ue,R){return D((ee,G=null,y)=>ue(E=>{R(E),ee.call(G,E)},null,y))}S.forEach=ae;function B(ue,R){return D((ee,G=null,y)=>ue(E=>R(E)&&ee.call(G,E),null,y))}S.filter=B;function U(ue){return ue}S.signal=U;function X(...ue){return(R,ee=null,G)=>(0,Q.F8)(...ue.map(y=>y(E=>R.call(ee,E),null,G)))}S.any=X;function Z(ue,R,ee){let G=ee;return z(ue,y=>(G=R(G,y),G))}S.reduce=Z;function D(ue){let R;const ee=new o({onFirstListenerAdd(){R=ue(ee.fire,ee)},onLastListenerRemove(){R.dispose()}});return ee.event}function C(ue,R,ee=100,G=!1,y){let E,Y,me,$e=0;const We=new o({leakWarningThreshold:y,onFirstListenerAdd(){E=ue(qe=>{$e++,Y=R(Y,qe),G&&!me&&(We.fire(Y),Y=void 0),clearTimeout(me),me=setTimeout(()=>{const Xe=Y;Y=void 0,me=void 0,(!G||$e>1)&&We.fire(Xe),$e=0},ee)})},onLastListenerRemove(){E.dispose()}});return We.event}S.debounce=C;function K(ue,R=(ee,G)=>ee===G){let ee=!0,G;return B(ue,y=>{const E=ee||!R(y,G);return ee=!1,G=y,E})}S.latch=K;function $(ue,R){return[S.filter(ue,R),S.filter(ue,ee=>!R(ee))]}S.split=$;function ve(ue,R=!1,ee=[]){let G=ee.slice(),y=ue(me=>{G?G.push(me):Y.fire(me)});const E=()=>{G&&G.forEach(me=>Y.fire(me)),G=null},Y=new o({onFirstListenerAdd(){y||(y=ue(me=>Y.fire(me)))},onFirstListenerDidAdd(){G&&(R?setTimeout(E):E())},onLastListenerRemove(){y&&y.dispose(),y=null}});return Y.event}S.buffer=ve;class Se{constructor(R){this.event=R}map(R){return new Se(z(this.event,R))}forEach(R){return new Se(ae(this.event,R))}filter(R){return new Se(B(this.event,R))}reduce(R,ee){return new Se(Z(this.event,R,ee))}latch(){return new Se(K(this.event))}debounce(R,ee=100,G=!1,y){return new Se(C(this.event,R,ee,G,y))}on(R,ee,G){return this.event(R,ee,G)}once(R,ee,G){return T(this.event)(R,ee,G)}}function Le(ue){return new Se(ue)}S.chain=Le;function ye(ue,R,ee=G=>G){const G=(...me)=>Y.fire(ee(...me)),y=()=>ue.on(R,G),E=()=>ue.removeListener(R,G),Y=new o({onFirstListenerAdd:y,onLastListenerRemove:E});return Y.event}S.fromNodeEventEmitter=ye;function te(ue,R,ee=G=>G){const G=(...me)=>Y.fire(ee(...me)),y=()=>ue.addEventListener(R,G),E=()=>ue.removeEventListener(R,G),Y=new o({onFirstListenerAdd:y,onLastListenerRemove:E});return Y.event}S.fromDOMEventEmitter=te;function j(ue){return new Promise(R=>T(ue)(R))}S.toPromise=j})(A||(A={}));class p{constructor(T){this._listenerCount=0,this._invocationCount=0,this._elapsedOverall=0,this._name=`${T}_${p._idPool++}`}start(T){this._stopWatch=new _e.G(!0),this._listenerCount=T}stop(){if(this._stopWatch){const T=this._stopWatch.elapsed();this._elapsedOverall+=T,this._invocationCount+=1,console.info(`did FIRE ${this._name}: elapsed_ms: ${T.toFixed(5)}, listener: ${this._listenerCount} (elapsed_overall: ${this._elapsedOverall.toFixed(2)}, invocations: ${this._invocationCount})`),this._stopWatch=void 0}}}p._idPool=0;let be=-1;class fe{constructor(T,z=Math.random().toString(18).slice(2,5)){this.customThreshold=T,this.name=z,this._warnCountdown=0}dispose(){this._stacks&&this._stacks.clear()}check(T){let z=be;if(typeof this.customThreshold=="number"&&(z=this.customThreshold),z<=0||T<z)return;this._stacks||(this._stacks=new Map);const ae=new Error().stack.split(`
`).slice(3).join(`
`),B=this._stacks.get(ae)||0;if(this._stacks.set(ae,B+1),this._warnCountdown-=1,this._warnCountdown<=0){this._warnCountdown=z*.5;let U,X=0;for(const[Z,D]of this._stacks)(!U||X<D)&&(U=Z,X=D);console.warn(`[${this.name}] potential listener LEAK detected, having ${T} listeners already. MOST frequent listener (${X}):`),console.warn(U)}return()=>{const U=this._stacks.get(ae)||0;this._stacks.set(ae,U-1)}}}class o{constructor(T){var z;this._disposed=!1,this._options=T,this._leakageMon=be>0?new fe(this._options&&this._options.leakWarningThreshold):void 0,this._perfMon=!((z=this._options)===null||z===void 0)&&z._profName?new p(this._options._profName):void 0}get event(){return this._event||(this._event=(T,z,ae)=>{var B;this._listeners||(this._listeners=new ge.S);const U=this._listeners.isEmpty();U&&this._options&&this._options.onFirstListenerAdd&&this._options.onFirstListenerAdd(this);const X=this._listeners.push(z?[T,z]:T);U&&this._options&&this._options.onFirstListenerDidAdd&&this._options.onFirstListenerDidAdd(this),this._options&&this._options.onListenerDidAdd&&this._options.onListenerDidAdd(this,T,z);const Z=(B=this._leakageMon)===null||B===void 0?void 0:B.check(this._listeners.size),D=(0,Q.OF)(()=>{Z&&Z(),this._disposed||(X(),this._options&&this._options.onLastListenerRemove&&(this._listeners&&!this._listeners.isEmpty()||this._options.onLastListenerRemove(this)))});return ae instanceof Q.SL?ae.add(D):Array.isArray(ae)&&ae.push(D),D}),this._event}fire(T){var z,ae;if(this._listeners){this._deliveryQueue||(this._deliveryQueue=new ge.S);for(let B of this._listeners)this._deliveryQueue.push([B,T]);for((z=this._perfMon)===null||z===void 0||z.start(this._deliveryQueue.size);this._deliveryQueue.size>0;){const[B,U]=this._deliveryQueue.shift();try{typeof B=="function"?B.call(void 0,U):B[0].call(B[1],U)}catch(X){(0,L.dL)(X)}}(ae=this._perfMon)===null||ae===void 0||ae.stop()}}dispose(){var T,z,ae,B,U;this._disposed||(this._disposed=!0,(T=this._listeners)===null||T===void 0||T.clear(),(z=this._deliveryQueue)===null||z===void 0||z.clear(),(B=(ae=this._options)===null||ae===void 0?void 0:ae.onLastListenerRemove)===null||B===void 0||B.call(ae),(U=this._leakageMon)===null||U===void 0||U.dispose())}}class k extends o{constructor(T){super(T),this._isPaused=0,this._eventQueue=new ge.S,this._mergeFn=T==null?void 0:T.merge}pause(){this._isPaused++}resume(){if(this._isPaused!==0&&--this._isPaused===0)if(this._mergeFn){const T=Array.from(this._eventQueue);this._eventQueue.clear(),super.fire(this._mergeFn(T))}else for(;!this._isPaused&&this._eventQueue.size!==0;)super.fire(this._eventQueue.shift())}fire(T){this._listeners&&(this._isPaused!==0?this._eventQueue.push(T):super.fire(T))}}class N extends k{constructor(T){var z;super(T),this._delay=(z=T.delay)!==null&&z!==void 0?z:100}fire(T){this._handle||(this.pause(),this._handle=setTimeout(()=>{this._handle=void 0,this.resume()},this._delay)),super.fire(T)}}class v{constructor(){this.buffers=[]}wrapEvent(T){return(z,ae,B)=>T(U=>{const X=this.buffers[this.buffers.length-1];X?X.push(()=>z.call(ae,U)):z.call(ae,U)},void 0,B)}bufferEvents(T){const z=[];this.buffers.push(z);const ae=T();return this.buffers.pop(),z.forEach(B=>B()),ae}}class x{constructor(){this.listening=!1,this.inputEvent=A.None,this.inputEventListener=Q.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(T){this.inputEvent=T,this.listening&&(this.inputEventListener.dispose(),this.inputEventListener=T(this.emitter.fire,this.emitter))}dispose(){this.inputEventListener.dispose(),this.emitter.dispose()}}},17845:function(ln,et,m){"use strict";m.d(et,{I:function(){return L}});function L(Q){const ge=this;let _e=!1,A;return function(){return _e||(_e=!0,A=Q.apply(ge,arguments)),A}}},88226:function(ln,et,m){"use strict";m.d(et,{$:function(){return L}});var L;(function(Q){function ge(X){return X&&typeof X=="object"&&typeof X[Symbol.iterator]=="function"}Q.is=ge;const _e=Object.freeze([]);function A(){return _e}Q.empty=A;function*p(X){yield X}Q.single=p;function be(X){return X||_e}Q.from=be;function fe(X){return!X||X[Symbol.iterator]().next().done===!0}Q.isEmpty=fe;function o(X){return X[Symbol.iterator]().next().value}Q.first=o;function k(X,Z){for(const D of X)if(Z(D))return!0;return!1}Q.some=k;function N(X,Z){for(const D of X)if(Z(D))return D}Q.find=N;function*v(X,Z){for(const D of X)Z(D)&&(yield D)}Q.filter=v;function*x(X,Z){let D=0;for(const C of X)yield Z(C,D++)}Q.map=x;function*S(...X){for(const Z of X)for(const D of Z)yield D}Q.concat=S;function*T(X){for(const Z of X)for(const D of Z)yield D}Q.concatNested=T;function z(X,Z,D){let C=D;for(const K of X)C=Z(C,K);return C}Q.reduce=z;function*ae(X,Z,D=X.length){for(Z<0&&(Z+=X.length),D<0?D+=X.length:D>X.length&&(D=X.length);Z<D;Z++)yield X[Z]}Q.slice=ae;function B(X,Z=Number.POSITIVE_INFINITY){const D=[];if(Z===0)return[D,X];const C=X[Symbol.iterator]();for(let K=0;K<Z;K++){const $=C.next();if($.done)return[D,Q.empty()];D.push($.value)}return[D,{[Symbol.iterator](){return C}}]}Q.consume=B;function U(X,Z,D=(C,K)=>C===K){const C=X[Symbol.iterator](),K=Z[Symbol.iterator]();for(;;){const $=C.next(),ve=K.next();if($.done!==ve.done)return!1;if($.done)return!0;if(!D($.value,ve.value))return!1}}Q.equals=U})(L||(L={}))},69323:function(ln,et,m){"use strict";m.d(et,{B9:function(){return x},F8:function(){return S},JT:function(){return ae},Jz:function(){return U},OF:function(){return T},SL:function(){return z},Wf:function(){return v},XK:function(){return B},dk:function(){return k}});var L=m(17845),Q=m(88226);const ge=!1;let _e=null;function A(X){_e=X}if(ge){const X="__is_disposable_tracked__";A(new class{trackDisposable(Z){const D=new Error("Potentially leaked disposable").stack;setTimeout(()=>{Z[X]||console.log(D)},3e3)}setParent(Z,D){if(Z&&Z!==ae.None)try{Z[X]=!0}catch(C){}}markAsDisposed(Z){if(Z&&Z!==ae.None)try{Z[X]=!0}catch(D){}}markAsSingleton(Z){}})}function p(X){return _e==null||_e.trackDisposable(X),X}function be(X){_e==null||_e.markAsDisposed(X)}function fe(X,Z){_e==null||_e.setParent(X,Z)}function o(X,Z){if(_e)for(const D of X)_e.setParent(D,Z)}function k(X){return _e==null||_e.markAsSingleton(X),X}class N extends Error{constructor(Z){super(`Encountered errors while disposing of store. Errors: [${Z.join(", ")}]`),this.errors=Z}}function v(X){return typeof X.dispose=="function"&&X.dispose.length===0}function x(X){if(Q.$.is(X)){let Z=[];for(const D of X)if(D)try{D.dispose()}catch(C){Z.push(C)}if(Z.length===1)throw Z[0];if(Z.length>1)throw new N(Z);return Array.isArray(X)?[]:X}else if(X)return X.dispose(),X}function S(...X){const Z=T(()=>x(X));return o(X,Z),Z}function T(X){const Z=p({dispose:(0,L.I)(()=>{be(Z),X()})});return Z}class z{constructor(){this._toDispose=new Set,this._isDisposed=!1,p(this)}dispose(){this._isDisposed||(be(this),this._isDisposed=!0,this.clear())}clear(){try{x(this._toDispose.values())}finally{this._toDispose.clear()}}add(Z){if(!Z)return Z;if(Z===this)throw new Error("Cannot register a disposable on itself!");return fe(Z,this),this._isDisposed?z.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(Z),Z}}z.DISABLE_DISPOSED_WARNING=!1;class ae{constructor(){this._store=new z,p(this),fe(this._store,this)}dispose(){be(this),this._store.dispose()}_register(Z){if(Z===this)throw new Error("Cannot register a disposable on itself!");return this._store.add(Z)}}ae.None=Object.freeze({dispose(){}});class B{constructor(){this._isDisposed=!1,p(this)}get value(){return this._isDisposed?void 0:this._value}set value(Z){var D;this._isDisposed||Z===this._value||((D=this._value)===null||D===void 0||D.dispose(),Z&&fe(Z,this),this._value=Z)}clear(){this.value=void 0}dispose(){var Z;this._isDisposed=!0,be(this),(Z=this._value)===null||Z===void 0||Z.dispose(),this._value=void 0}clearAndLeak(){const Z=this._value;return this._value=void 0,Z&&fe(Z,null),Z}}class U{constructor(Z){this.object=Z}dispose(){}}},34502:function(ln,et,m){"use strict";m.d(et,{S:function(){return Q}});class L{constructor(_e){this.element=_e,this.next=L.Undefined,this.prev=L.Undefined}}L.Undefined=new L(void 0);class Q{constructor(){this._first=L.Undefined,this._last=L.Undefined,this._size=0}get size(){return this._size}isEmpty(){return this._first===L.Undefined}clear(){let _e=this._first;for(;_e!==L.Undefined;){const A=_e.next;_e.prev=L.Undefined,_e.next=L.Undefined,_e=A}this._first=L.Undefined,this._last=L.Undefined,this._size=0}unshift(_e){return this._insert(_e,!1)}push(_e){return this._insert(_e,!0)}_insert(_e,A){const p=new L(_e);if(this._first===L.Undefined)this._first=p,this._last=p;else if(A){const fe=this._last;this._last=p,p.prev=fe,fe.next=p}else{const fe=this._first;this._first=p,p.next=fe,fe.prev=p}this._size+=1;let be=!1;return()=>{be||(be=!0,this._remove(p))}}shift(){if(this._first!==L.Undefined){const _e=this._first.element;return this._remove(this._first),_e}}pop(){if(this._last!==L.Undefined){const _e=this._last.element;return this._remove(this._last),_e}}_remove(_e){if(_e.prev!==L.Undefined&&_e.next!==L.Undefined){const A=_e.prev;A.next=_e.next,_e.next.prev=A}else _e.prev===L.Undefined&&_e.next===L.Undefined?(this._first=L.Undefined,this._last=L.Undefined):_e.next===L.Undefined?(this._last=this._last.prev,this._last.next=L.Undefined):_e.prev===L.Undefined&&(this._first=this._first.next,this._first.prev=L.Undefined);this._size-=1}*[Symbol.iterator](){let _e=this._first;for(;_e!==L.Undefined;)yield _e.element,_e=_e.next}}},23345:function(ln,et,m){"use strict";m.d(et,{$L:function(){return C},ED:function(){return U},IJ:function(){return Z},OS:function(){return Se},WE:function(){return $},dz:function(){return X},gn:function(){return K},li:function(){return T},r:function(){return te},tY:function(){return D},xS:function(){return ve}});var L=m(97671),Q;const ge="en";let _e=!1,A=!1,p=!1,be=!1,fe=!1,o=!1,k=!1,N,v=null,x=null,S;const T=typeof self=="object"?self:typeof m.g=="object"?m.g:{};let z;typeof T.vscode!="undefined"&&typeof T.vscode.process!="undefined"?z=T.vscode.process:typeof L!="undefined"&&(z=L);const ae=typeof((Q=z==null?void 0:z.versions)===null||Q===void 0?void 0:Q.electron)=="string"&&z.type==="renderer";if(typeof navigator=="object"&&!ae)S=navigator.userAgent,_e=S.indexOf("Windows")>=0,A=S.indexOf("Macintosh")>=0,k=(S.indexOf("Macintosh")>=0||S.indexOf("iPad")>=0||S.indexOf("iPhone")>=0)&&!!navigator.maxTouchPoints&&navigator.maxTouchPoints>0,p=S.indexOf("Linux")>=0,o=!0,N=navigator.language,v=N;else if(typeof z=="object"){_e=z.platform==="win32",A=z.platform==="darwin",p=z.platform==="linux",be=p&&!!z.env.SNAP&&!!z.env.SNAP_REVISION,N=ge,v=ge;const j=z.env.VSCODE_NLS_CONFIG;if(j)try{const ue=JSON.parse(j),R=ue.availableLanguages["*"];N=ue.locale,v=R||ge,x=ue._translationsConfigFile}catch(ue){}fe=!0}else console.error("Unable to resolve platform.");let B=0;A?B=1:_e?B=3:p&&(B=2);const U=_e,X=A,Z=p,D=fe,C=o,K=k,$=S,ve=function(){if(T.setImmediate)return T.setImmediate.bind(T);if(typeof T.postMessage=="function"&&!T.importScripts){let R=[];T.addEventListener("message",G=>{if(G.data&&G.data.vscodeSetImmediateId)for(let y=0,E=R.length;y<E;y++){const Y=R[y];if(Y.id===G.data.vscodeSetImmediateId){R.splice(y,1),Y.callback();return}}});let ee=0;return G=>{const y=++ee;R.push({id:y,callback:G}),T.postMessage({vscodeSetImmediateId:y},"*")}}if(typeof(z==null?void 0:z.nextTick)=="function")return z.nextTick.bind(z);const ue=Promise.resolve();return R=>ue.then(R)}(),Se=A||k?2:_e?1:3;let Le=!0,ye=!1;function te(){if(!ye){ye=!0;const j=new Uint8Array(2);j[0]=1,j[1]=2,Le=new Uint16Array(j.buffer)[0]===513}return Le}},95830:function(ln,et,m){"use strict";m.d(et,{G:function(){return ge}});var L=m(23345);const Q=L.li.performance&&typeof L.li.performance.now=="function";class ge{constructor(A){this._highResolution=Q&&A,this._startTime=this._now(),this._stopTime=-1}static create(A=!0){return new ge(A)}stop(){this._stopTime=this._now()}elapsed(){return this._stopTime!==-1?this._stopTime-this._startTime:this._now()-this._startTime}_now(){return this._highResolution?L.li.performance.now():Date.now()}}},82983:function(ln,et,m){"use strict";m.d(et,{$i:function(){return $e},C8:function(){return _t},GF:function(){return N},HO:function(){return ee},IO:function(){return v},K7:function(){return gt},Kw:function(){return un},LC:function(){return T},Mh:function(){return ve},P1:function(){return Se},PJ:function(){return Ot},Qe:function(){return We},R1:function(){return k},RP:function(){return Y},S6:function(){return Vt},TT:function(){return U},Ut:function(){return y},V8:function(){return z},WU:function(){return ge},YK:function(){return ye},YU:function(){return _e},ZG:function(){return Le},ZH:function(){return j},ab:function(){return qe},c1:function(){return st},df:function(){return C},ec:function(){return A},fi:function(){return lt},fy:function(){return p},j3:function(){return be},j_:function(){return Z},m5:function(){return L},mK:function(){return D},mr:function(){return x},oH:function(){return de},oL:function(){return fe},ok:function(){return $},ow:function(){return ae},qq:function(){return K},qu:function(){return B},rL:function(){return te},uS:function(){return Kt},un:function(){return o},uq:function(){return S},vH:function(){return R},xe:function(){return Xe},zY:function(){return X}});function L(M){return!M||typeof M!="string"?!0:M.trim().length===0}const Q=/{(\d+)}/g;function ge(M,...ce){return ce.length===0?M:M.replace(Q,function(q,le){const pe=parseInt(le,10);return isNaN(pe)||pe<0||pe>=ce.length?q:ce[pe]})}function _e(M){return M.replace(/[<>&]/g,function(ce){switch(ce){case"<":return"&lt;";case">":return"&gt;";case"&":return"&amp;";default:return ce}})}function A(M){return M.replace(/[\\\{\}\*\+\?\|\^\$\.\[\]\(\)]/g,"\\$&")}function p(M,ce=" "){const q=be(M,ce);return fe(q,ce)}function be(M,ce){if(!M||!ce)return M;const q=ce.length;if(q===0||M.length===0)return M;let le=0;for(;M.indexOf(ce,le)===le;)le=le+q;return M.substring(le)}function fe(M,ce){if(!M||!ce)return M;const q=ce.length,le=M.length;if(q===0||le===0)return M;let pe=le,De=-1;for(;De=M.lastIndexOf(ce,pe-1),!(De===-1||De+q!==pe);){if(De===0)return"";pe=De}return M.substring(0,pe)}function o(M){return M.replace(/[\-\\\{\}\+\?\|\^\$\.\,\[\]\(\)\#\s]/g,"\\$&").replace(/[\*]/g,".*")}function k(M){return M.replace(/\*/g,"")}function N(M,ce,q={}){if(!M)throw new Error("Cannot create regex from empty string");ce||(M=A(M)),q.wholeWord&&(/\B/.test(M.charAt(0))||(M="\\b"+M),/\B/.test(M.charAt(M.length-1))||(M=M+"\\b"));let le="";return q.global&&(le+="g"),q.matchCase||(le+="i"),q.multiline&&(le+="m"),q.unicode&&(le+="u"),new RegExp(M,le)}function v(M){return M.source==="^"||M.source==="^$"||M.source==="$"||M.source==="^\\s*$"?!1:!!(M.exec("")&&M.lastIndex===0)}function x(M){return(M.global?"g":"")+(M.ignoreCase?"i":"")+(M.multiline?"m":"")+(M.unicode?"u":"")}function S(M){return M.split(/\r\n|\r|\n/)}function T(M){for(let ce=0,q=M.length;ce<q;ce++){const le=M.charCodeAt(ce);if(le!==32&&le!==9)return ce}return-1}function z(M,ce=0,q=M.length){for(let le=ce;le<q;le++){const pe=M.charCodeAt(le);if(pe!==32&&pe!==9)return M.substring(ce,le)}return M.substring(ce,q)}function ae(M,ce=M.length-1){for(let q=ce;q>=0;q--){const le=M.charCodeAt(q);if(le!==32&&le!==9)return q}return-1}function B(M,ce){return M<ce?-1:M>ce?1:0}function U(M,ce,q=0,le=M.length,pe=0,De=ce.length){for(;q<le&&pe<De;q++,pe++){let Oe=M.charCodeAt(q),Ne=ce.charCodeAt(pe);if(Oe<Ne)return-1;if(Oe>Ne)return 1}const Te=le-q,ke=De-pe;return Te<ke?-1:Te>ke?1:0}function X(M,ce){return Z(M,ce,0,M.length,0,ce.length)}function Z(M,ce,q=0,le=M.length,pe=0,De=ce.length){for(;q<le&&pe<De;q++,pe++){let Oe=M.charCodeAt(q),Ne=ce.charCodeAt(pe);if(Oe===Ne)continue;if(Oe>=128||Ne>=128)return U(M.toLowerCase(),ce.toLowerCase(),q,le,pe,De);D(Oe)&&(Oe-=32),D(Ne)&&(Ne-=32);const nt=Oe-Ne;if(nt!==0)return nt}const Te=le-q,ke=De-pe;return Te<ke?-1:Te>ke?1:0}function D(M){return M>=97&&M<=122}function C(M){return M>=65&&M<=90}function K(M,ce){return M.length===ce.length&&Z(M,ce)===0}function $(M,ce){const q=ce.length;return ce.length>M.length?!1:Z(M,ce,0,q)===0}function ve(M,ce){let q,le=Math.min(M.length,ce.length);for(q=0;q<le;q++)if(M.charCodeAt(q)!==ce.charCodeAt(q))return q;return le}function Se(M,ce){let q,le=Math.min(M.length,ce.length);const pe=M.length-1,De=ce.length-1;for(q=0;q<le;q++)if(M.charCodeAt(pe-q)!==ce.charCodeAt(De-q))return q;return le}function Le(M){return 55296<=M&&M<=56319}function ye(M){return 56320<=M&&M<=57343}function te(M,ce){return(M-55296<<10)+(ce-56320)+65536}function j(M,ce,q){const le=M.charCodeAt(q);if(Le(le)&&q+1<ce){const pe=M.charCodeAt(q+1);if(ye(pe))return te(le,pe)}return le}function ue(M,ce){const q=M.charCodeAt(ce-1);if(ye(q)&&ce>1){const le=M.charCodeAt(ce-2);if(Le(le))return te(le,q)}return q}function R(M,ce){const q=At.getInstance(),le=ce,pe=M.length,De=j(M,pe,ce);ce+=De>=65536?2:1;let Te=q.getGraphemeBreakType(De);for(;ce<pe;){const ke=j(M,pe,ce),Oe=q.getGraphemeBreakType(ke);if(lt(Te,Oe))break;ce+=ke>=65536?2:1,Te=Oe}return ce-le}function ee(M,ce){const q=At.getInstance(),le=ce,pe=ue(M,ce);ce-=pe>=65536?2:1;let De=q.getGraphemeBreakType(pe);for(;ce>0;){const Te=ue(M,ce),ke=q.getGraphemeBreakType(Te);if(lt(ke,De))break;ce-=Te>=65536?2:1,De=ke}return le-ce}const G=/(?:[\u05BE\u05C0\u05C3\u05C6\u05D0-\u05F4\u0608\u060B\u060D\u061B-\u064A\u066D-\u066F\u0671-\u06D5\u06E5\u06E6\u06EE\u06EF\u06FA-\u0710\u0712-\u072F\u074D-\u07A5\u07B1-\u07EA\u07F4\u07F5\u07FA-\u0815\u081A\u0824\u0828\u0830-\u0858\u085E-\u08BD\u200F\uFB1D\uFB1F-\uFB28\uFB2A-\uFD3D\uFD50-\uFDFC\uFE70-\uFEFC]|\uD802[\uDC00-\uDD1B\uDD20-\uDE00\uDE10-\uDE33\uDE40-\uDEE4\uDEEB-\uDF35\uDF40-\uDFFF]|\uD803[\uDC00-\uDCFF]|\uD83A[\uDC00-\uDCCF\uDD00-\uDD43\uDD50-\uDFFF]|\uD83B[\uDC00-\uDEBB])/;function y(M){return G.test(M)}const E=/(?:[\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 Y(M){return E.test(M)}const me=/^[\t\n\r\x20-\x7E]*$/;function $e(M){return me.test(M)}const We=/[\u2028\u2029]/;function qe(M){return We.test(M)}function Xe(M){for(let ce=0,q=M.length;ce<q;ce++)if(gt(M.charCodeAt(ce)))return!0;return!1}function gt(M){return M=+M,M>=11904&&M<=55215||M>=63744&&M<=64255||M>=65281&&M<=65374}function _t(M){return M>=127462&&M<=127487||M===8986||M===8987||M===9200||M===9203||M>=9728&&M<=10175||M===11088||M===11093||M>=127744&&M<=128591||M>=128640&&M<=128764||M>=128992&&M<=129003||M>=129280&&M<=129535||M>=129648&&M<=129750}const st="\uFEFF";function Kt(M){return!!(M&&M.length>0&&M.charCodeAt(0)===65279)}function un(M,ce=!1){return M?(ce&&(M=M.replace(/\\./g,"")),M.toLowerCase()!==M):!1}function Ot(M){return M=M%(2*26),M<26?String.fromCharCode(97+M):String.fromCharCode(65+M-26)}function Vt(M){return At.getInstance().getGraphemeBreakType(M)}function lt(M,ce){return M===0?ce!==5&&ce!==7:M===2&&ce===3?!1:M===4||M===2||M===3||ce===4||ce===2||ce===3?!0:!(M===8&&(ce===8||ce===9||ce===11||ce===12)||(M===11||M===9)&&(ce===9||ce===10)||(M===12||M===10)&&ce===10||ce===5||ce===13||ce===7||M===1||M===13&&ce===14||M===6&&ce===6)}class At{constructor(){this._data=ne()}static getInstance(){return At._INSTANCE||(At._INSTANCE=new At),At._INSTANCE}getGraphemeBreakType(ce){if(ce<32)return ce===10?3:ce===13?2:4;if(ce<127)return 0;const q=this._data,le=q.length/3;let pe=1;for(;pe<=le;)if(ce<q[3*pe])pe=2*pe;else if(ce>q[3*pe+1])pe=2*pe+1;else return q[3*pe+2];return 0}}At._INSTANCE=null;function ne(){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 de(M,ce){if(M===0)return 0;const q=se(M,ce);if(q!==void 0)return q;const le=ue(ce,M);return M-=W(le),M}function se(M,ce){let q=ue(ce,M);for(M-=W(q);Ie(q)||q===65039||q===8419;){if(M===0)return;q=ue(ce,M),M-=W(q)}if(_t(q)){if(M>=0){const le=ue(ce,M);le===8205&&(M-=W(le))}return M}}function W(M){return M>=65536?2:1}function Ie(M){return 127995<=M&&M<=127999}},72999:function(ln,et,m){"use strict";m.d(et,{$E:function(){return T},$K:function(){return be},D8:function(){return v},HD:function(){return Q},IU:function(){return z},Jp:function(){return fe},Kn:function(){return ge},cW:function(){return k},f6:function(){return ae},hj:function(){return _e},jn:function(){return A},kJ:function(){return L},mf:function(){return N},o8:function(){return p},p_:function(){return o},vE:function(){return B}});function L(U){return Array.isArray(U)}function Q(U){return typeof U=="string"}function ge(U){return typeof U=="object"&&U!==null&&!Array.isArray(U)&&!(U instanceof RegExp)&&!(U instanceof Date)}function _e(U){return typeof U=="number"&&!isNaN(U)}function A(U){return U===!0||U===!1}function p(U){return typeof U=="undefined"}function be(U){return!fe(U)}function fe(U){return p(U)||U===null}function o(U,X){if(!U)throw new Error(X?`Unexpected type, expected '${X}'`:"Unexpected type")}function k(U){if(fe(U))throw new Error("Assertion Failed: argument is undefined or null");return U}function N(U){return typeof U=="function"}function v(U,X){const Z=Math.min(U.length,X.length);for(let D=0;D<Z;D++)x(U[D],X[D])}function x(U,X){if(Q(X)){if(typeof U!==X)throw new Error(`argument does not match constraint: typeof ${X}`)}else if(N(X)){try{if(U instanceof X)return}catch(Z){}if(!fe(U)&&U.constructor===X||X.length===1&&X.call(void 0,U)===!0)return;throw new Error("argument does not match one of these constraints: arg instanceof constraint, arg.constructor === constraint, nor constraint(arg) === true")}}function S(U){let X=[],Z=Object.getPrototypeOf(U);for(;Object.prototype!==Z;)X=X.concat(Object.getOwnPropertyNames(Z)),Z=Object.getPrototypeOf(Z);return X}function T(U){const X=[];for(const Z of S(U))typeof U[Z]=="function"&&X.push(Z);return X}function z(U,X){const Z=C=>function(){const K=Array.prototype.slice.call(arguments,0);return X(C,K)};let D={};for(const C of U)D[C]=Z(C);return D}function ae(U){return U===null?void 0:U}function B(U,X="Unreachable"){throw new Error(X)}},13268:function(ln,et,m){"use strict";m.d(et,{N:function(){return Q}});function L(ge,_e){let A;return _e.length===0?A=ge:A=ge.replace(/\{(\d+)\}/g,function(p,be){const fe=be[0];return typeof _e[fe]!="undefined"?_e[fe]:p}),A}function Q(ge,_e,...A){return L(_e,A)}},96236:function(ln,et,m){"use strict";m.d(et,{BH:function(){return z},NZ:function(){return ae},U8:function(){return B},co:function(){return T},eH:function(){return S},vr:function(){return x}});var L=m(75918),Q=m(52615),ge=m(4348),_e=m(88226),A=m(69323),p=m(34502),be=m(35884),fe=m(90689),o=m(16925),k=m(49055),N=function(U,X,Z,D){var C=arguments.length,K=C<3?X:D===null?D=Object.getOwnPropertyDescriptor(X,Z):D,$;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")K=Reflect.decorate(U,X,Z,D);else for(var ve=U.length-1;ve>=0;ve--)($=U[ve])&&(K=(C<3?$(K):C>3?$(X,Z,K):$(X,Z))||K);return C>3&&K&&Object.defineProperty(X,Z,K),K},v=function(U,X){return function(Z,D){X(Z,D,U)}};function x(U){return U.command!==void 0}class S{constructor(X){this.id=S._idPool++,this._debugName=X}}S._idPool=0,S.CommandPalette=new S("CommandPalette"),S.EditorContext=new S("EditorContext"),S.SimpleEditorContext=new S("SimpleEditorContext"),S.EditorContextCopy=new S("EditorContextCopy"),S.EditorContextPeek=new S("EditorContextPeek"),S.MenubarEditMenu=new S("MenubarEditMenu"),S.MenubarCopy=new S("MenubarCopy"),S.MenubarGoMenu=new S("MenubarGoMenu"),S.MenubarSelectionMenu=new S("MenubarSelectionMenu"),S.InlineCompletionsActions=new S("InlineCompletionsActions");const T=(0,o.yh)("menuService"),z=new class{constructor(){this._commands=new Map,this._menuItems=new Map,this._onDidChangeMenu=new ge.Q5,this.onDidChangeMenu=this._onDidChangeMenu.event,this._commandPaletteChangeEvent={has:U=>U===S.CommandPalette}}addCommand(U){return this.addCommands(_e.$.single(U))}addCommands(U){for(const X of U)this._commands.set(X.id,X);return this._onDidChangeMenu.fire(this._commandPaletteChangeEvent),(0,A.OF)(()=>{let X=!1;for(const Z of U)X=this._commands.delete(Z.id)||X;X&&this._onDidChangeMenu.fire(this._commandPaletteChangeEvent)})}getCommand(U){return this._commands.get(U)}getCommands(){const U=new Map;return this._commands.forEach((X,Z)=>U.set(Z,X)),U}appendMenuItem(U,X){return this.appendMenuItems(_e.$.single({id:U,item:X}))}appendMenuItems(U){const X=new Set,Z=new p.S;for(const{id:D,item:C}of U){let K=this._menuItems.get(D);K||(K=new p.S,this._menuItems.set(D,K)),Z.push(K.push(C)),X.add(D)}return this._onDidChangeMenu.fire(X),(0,A.OF)(()=>{if(Z.size>0){for(let D of Z)D();this._onDidChangeMenu.fire(X),Z.clear()}})}getMenuItems(U){let X;return this._menuItems.has(U)?X=[...this._menuItems.get(U)]:X=[],U===S.CommandPalette&&this._appendImplicitItems(X),X}_appendImplicitItems(U){const X=new Set;for(const Z of U)x(Z)&&(X.add(Z.command.id),Z.alt&&X.add(Z.alt.id));this._commands.forEach((Z,D)=>{X.has(D)||U.push({command:Z})})}};class ae extends L.wY{constructor(X,Z,D,C){super(`submenuitem.${X.submenu.id}`,typeof X.title=="string"?X.title:X.title.value,[],"submenu"),this.item=X,this._menuService=Z,this._contextKeyService=D,this._options=C}get actions(){const X=[],Z=this._menuService.createMenu(this.item.submenu,this._contextKeyService),D=Z.getActions(this._options);Z.dispose();for(const[,C]of D)C.length>0&&(X.push(...C),X.push(new L.Z0));return X.length&&X.pop(),X}}let B=class Xl{constructor(X,Z,D,C,K){var $,ve;if(this._commandService=K,this.id=X.id,this.label=D!=null&&D.renderShortTitle&&X.shortTitle?typeof X.shortTitle=="string"?X.shortTitle:X.shortTitle.value:typeof X.title=="string"?X.title:X.title.value,this.tooltip=(ve=typeof X.tooltip=="string"?X.tooltip:($=X.tooltip)===null||$===void 0?void 0:$.value)!==null&&ve!==void 0?ve:"",this.enabled=!X.precondition||C.contextMatchesRules(X.precondition),this.checked=void 0,X.toggled){const Se=X.toggled.condition?X.toggled:{condition:X.toggled};this.checked=C.contextMatchesRules(Se.condition),this.checked&&Se.tooltip&&(this.tooltip=typeof Se.tooltip=="string"?Se.tooltip:Se.tooltip.value),Se.title&&(this.label=typeof Se.title=="string"?Se.title:Se.title.value)}this.item=X,this.alt=Z?new Xl(Z,void 0,D,C,K):void 0,this._options=D,k.kS.isThemeIcon(X.icon)&&(this.class=Q.dT.asClassName(X.icon))}dispose(){}run(...X){var Z,D;let C=[];return!((Z=this._options)===null||Z===void 0)&&Z.arg&&(C=[...C,this._options.arg]),!((D=this._options)===null||D===void 0)&&D.shouldForwardArgs&&(C=[...C,...X]),this._commandService.executeCommand(this.id,...C)}};B=N([v(3,fe.i6),v(4,be.H)],B)},35884:function(ln,et,m){"use strict";m.d(et,{H:function(){return be},P:function(){return fe}});var L=m(4348),Q=m(88226),ge=m(69323),_e=m(34502),A=m(72999),p=m(16925);const be=(0,p.yh)("commandService"),fe=new class{constructor(){this._commands=new Map,this._onDidRegisterCommand=new L.Q5,this.onDidRegisterCommand=this._onDidRegisterCommand.event}registerCommand(o,k){if(!o)throw new Error("invalid command");if(typeof o=="string"){if(!k)throw new Error("invalid command");return this.registerCommand({id:o,handler:k})}if(o.description){const T=[];for(let ae of o.description.args)T.push(ae.constraint);const z=o.handler;o.handler=function(ae,...B){return(0,A.D8)(B,T),z(ae,...B)}}const{id:N}=o;let v=this._commands.get(N);v||(v=new _e.S,this._commands.set(N,v));let x=v.unshift(o),S=(0,ge.OF)(()=>{x();const T=this._commands.get(N);T!=null&&T.isEmpty()&&this._commands.delete(N)});return this._onDidRegisterCommand.fire(N),S}registerCommandAlias(o,k){return fe.registerCommand(o,(N,...v)=>N.get(be).executeCommand(k,...v))}getCommand(o){const k=this._commands.get(o);if(!(!k||k.isEmpty()))return Q.$.first(k)}getCommands(){const o=new Map;for(const k of this._commands.keys()){const N=this.getCommand(k);N&&o.set(k,N)}return o}};fe.registerCommand("noop",()=>{})},90689:function(ln,et,m){"use strict";m.d(et,{Ao:function(){return be},Eq:function(){return te},Fb:function(){return fe},K8:function(){return R},i6:function(){return ye},uy:function(){return Le}});var L=m(23345),Q=m(82983),ge=m(16925);let _e=L.WE||"";const A=new Map;A.set("false",!1),A.set("true",!0),A.set("isMac",L.dz),A.set("isLinux",L.IJ),A.set("isWindows",L.ED),A.set("isWeb",L.$L),A.set("isMacNative",L.dz&&!L.$L),A.set("isEdge",_e.indexOf("Edg/")>=0),A.set("isFirefox",_e.indexOf("Firefox")>=0),A.set("isChrome",_e.indexOf("Chrome")>=0),A.set("isSafari",_e.indexOf("Safari")>=0);const p=Object.prototype.hasOwnProperty;class be{static has(y){return v.create(y)}static equals(y,E){return x.create(y,E)}static regex(y,E){return C.create(y,E)}static not(y){return ae.create(y)}static and(...y){return ve.create(y,null)}static or(...y){return Se.create(y,null,!0)}static deserialize(y,E=!1){if(y)return this._deserializeOrExpression(y,E)}static _deserializeOrExpression(y,E){let Y=y.split("||");return Se.create(Y.map(me=>this._deserializeAndExpression(me,E)),null,!0)}static _deserializeAndExpression(y,E){let Y=y.split("&&");return ve.create(Y.map(me=>this._deserializeOne(me,E)),null)}static _deserializeOne(y,E){if(y=y.trim(),y.indexOf("!=")>=0){let Y=y.split("!=");return z.create(Y[0].trim(),this._deserializeValue(Y[1],E))}if(y.indexOf("==")>=0){let Y=y.split("==");return x.create(Y[0].trim(),this._deserializeValue(Y[1],E))}if(y.indexOf("=~")>=0){let Y=y.split("=~");return C.create(Y[0].trim(),this._deserializeRegexValue(Y[1],E))}if(y.indexOf(" in ")>=0){let Y=y.split(" in ");return S.create(Y[0].trim(),Y[1].trim())}if(/^[^<=>]+>=[^<=>]+$/.test(y)){const Y=y.split(">=");return X.create(Y[0].trim(),Y[1].trim())}if(/^[^<=>]+>[^<=>]+$/.test(y)){const Y=y.split(">");return U.create(Y[0].trim(),Y[1].trim())}if(/^[^<=>]+<=[^<=>]+$/.test(y)){const Y=y.split("<=");return D.create(Y[0].trim(),Y[1].trim())}if(/^[^<=>]+<[^<=>]+$/.test(y)){const Y=y.split("<");return Z.create(Y[0].trim(),Y[1].trim())}return/^\!\s*/.test(y)?ae.create(y.substr(1).trim()):v.create(y)}static _deserializeValue(y,E){if(y=y.trim(),y==="true")return!0;if(y==="false")return!1;let Y=/^'([^']*)'$/.exec(y);return Y?Y[1].trim():y}static _deserializeRegexValue(y,E){if((0,Q.m5)(y)){if(E)throw new Error("missing regexp-value for =~-expression");return console.warn("missing regexp-value for =~-expression"),null}let Y=y.indexOf("/"),me=y.lastIndexOf("/");if(Y===me||Y<0){if(E)throw new Error(`bad regexp-value '${y}', missing /-enclosure`);return console.warn(`bad regexp-value '${y}', missing /-enclosure`),null}let $e=y.slice(Y+1,me),We=y[me+1]==="i"?"i":"";try{return new RegExp($e,We)}catch(qe){if(E)throw new Error(`bad regexp-value '${y}', parse error: ${qe}`);return console.warn(`bad regexp-value '${y}', parse error: ${qe}`),null}}}function fe(G,y){const E=G?G.substituteConstants():void 0,Y=y?y.substituteConstants():void 0;return!E&&!Y?!0:!E||!Y?!1:E.equals(Y)}function o(G,y){return G.cmp(y)}class k{constructor(){this.type=0}cmp(y){return this.type-y.type}equals(y){return y.type===this.type}substituteConstants(){return this}evaluate(y){return!1}serialize(){return"false"}keys(){return[]}negate(){return N.INSTANCE}}k.INSTANCE=new k;class N{constructor(){this.type=1}cmp(y){return this.type-y.type}equals(y){return y.type===this.type}substituteConstants(){return this}evaluate(y){return!0}serialize(){return"true"}keys(){return[]}negate(){return k.INSTANCE}}N.INSTANCE=new N;class v{constructor(y,E){this.key=y,this.negated=E,this.type=2}static create(y,E=null){const Y=A.get(y);return typeof Y=="boolean"?Y?N.INSTANCE:k.INSTANCE:new v(y,E)}cmp(y){return y.type!==this.type?this.type-y.type:j(this.key,y.key)}equals(y){return y.type===this.type?this.key===y.key:!1}substituteConstants(){const y=A.get(this.key);return typeof y=="boolean"?y?N.INSTANCE:k.INSTANCE:this}evaluate(y){return!!y.getValue(this.key)}serialize(){return this.key}keys(){return[this.key]}negate(){return this.negated||(this.negated=ae.create(this.key,this)),this.negated}}class x{constructor(y,E,Y){this.key=y,this.value=E,this.negated=Y,this.type=4}static create(y,E,Y=null){if(typeof E=="boolean")return E?v.create(y,Y):ae.create(y,Y);const me=A.get(y);return typeof me=="boolean"?E===(me?"true":"false")?N.INSTANCE:k.INSTANCE:new x(y,E,Y)}cmp(y){return y.type!==this.type?this.type-y.type:ue(this.key,this.value,y.key,y.value)}equals(y){return y.type===this.type?this.key===y.key&&this.value===y.value:!1}substituteConstants(){const y=A.get(this.key);if(typeof y=="boolean"){const E=y?"true":"false";return this.value===E?N.INSTANCE:k.INSTANCE}return this}evaluate(y){return y.getValue(this.key)==this.value}serialize(){return`${this.key} == '${this.value}'`}keys(){return[this.key]}negate(){return this.negated||(this.negated=z.create(this.key,this.value,this)),this.negated}}class S{constructor(y,E){this.key=y,this.valueKey=E,this.type=10,this.negated=null}static create(y,E){return new S(y,E)}cmp(y){return y.type!==this.type?this.type-y.type:ue(this.key,this.valueKey,y.key,y.valueKey)}equals(y){return y.type===this.type?this.key===y.key&&this.valueKey===y.valueKey:!1}substituteConstants(){return this}evaluate(y){const E=y.getValue(this.valueKey),Y=y.getValue(this.key);return Array.isArray(E)?E.indexOf(Y)>=0:typeof Y=="string"&&typeof E=="object"&&E!==null?p.call(E,Y):!1}serialize(){return`${this.key} in '${this.valueKey}'`}keys(){return[this.key,this.valueKey]}negate(){return this.negated||(this.negated=T.create(this)),this.negated}}class T{constructor(y){this._actual=y,this.type=11}static create(y){return new T(y)}cmp(y){return y.type!==this.type?this.type-y.type:this._actual.cmp(y._actual)}equals(y){return y.type===this.type?this._actual.equals(y._actual):!1}substituteConstants(){return this}evaluate(y){return!this._actual.evaluate(y)}serialize(){throw new Error("Method not implemented.")}keys(){return this._actual.keys()}negate(){return this._actual}}class z{constructor(y,E,Y){this.key=y,this.value=E,this.negated=Y,this.type=5}static create(y,E,Y=null){if(typeof E=="boolean")return E?ae.create(y,Y):v.create(y,Y);const me=A.get(y);return typeof me=="boolean"?E===(me?"true":"false")?k.INSTANCE:N.INSTANCE:new z(y,E,Y)}cmp(y){return y.type!==this.type?this.type-y.type:ue(this.key,this.value,y.key,y.value)}equals(y){return y.type===this.type?this.key===y.key&&this.value===y.value:!1}substituteConstants(){const y=A.get(this.key);if(typeof y=="boolean"){const E=y?"true":"false";return this.value===E?k.INSTANCE:N.INSTANCE}return this}evaluate(y){return y.getValue(this.key)!=this.value}serialize(){return`${this.key} != '${this.value}'`}keys(){return[this.key]}negate(){return this.negated||(this.negated=x.create(this.key,this.value,this)),this.negated}}class ae{constructor(y,E){this.key=y,this.negated=E,this.type=3}static create(y,E=null){const Y=A.get(y);return typeof Y=="boolean"?Y?k.INSTANCE:N.INSTANCE:new ae(y,E)}cmp(y){return y.type!==this.type?this.type-y.type:j(this.key,y.key)}equals(y){return y.type===this.type?this.key===y.key:!1}substituteConstants(){const y=A.get(this.key);return typeof y=="boolean"?y?k.INSTANCE:N.INSTANCE:this}evaluate(y){return!y.getValue(this.key)}serialize(){return`!${this.key}`}keys(){return[this.key]}negate(){return this.negated||(this.negated=v.create(this.key,this)),this.negated}}function B(G,y){if(typeof G=="string"){const E=parseFloat(G);isNaN(E)||(G=E)}return typeof G=="string"||typeof G=="number"?y(G):k.INSTANCE}class U{constructor(y,E,Y){this.key=y,this.value=E,this.negated=Y,this.type=12}static create(y,E,Y=null){return B(E,me=>new U(y,me,Y))}cmp(y){return y.type!==this.type?this.type-y.type:ue(this.key,this.value,y.key,y.value)}equals(y){return y.type===this.type?this.key===y.key&&this.value===y.value:!1}substituteConstants(){return this}evaluate(y){return typeof this.value=="string"?!1:parseFloat(y.getValue(this.key))>this.value}serialize(){return`${this.key} > ${this.value}`}keys(){return[this.key]}negate(){return this.negated||(this.negated=D.create(this.key,this.value,this)),this.negated}}class X{constructor(y,E,Y){this.key=y,this.value=E,this.negated=Y,this.type=13}static create(y,E,Y=null){return B(E,me=>new X(y,me,Y))}cmp(y){return y.type!==this.type?this.type-y.type:ue(this.key,this.value,y.key,y.value)}equals(y){return y.type===this.type?this.key===y.key&&this.value===y.value:!1}substituteConstants(){return this}evaluate(y){return typeof this.value=="string"?!1:parseFloat(y.getValue(this.key))>=this.value}serialize(){return`${this.key} >= ${this.value}`}keys(){return[this.key]}negate(){return this.negated||(this.negated=Z.create(this.key,this.value,this)),this.negated}}class Z{constructor(y,E,Y){this.key=y,this.value=E,this.negated=Y,this.type=14}static create(y,E,Y=null){return B(E,me=>new Z(y,me,Y))}cmp(y){return y.type!==this.type?this.type-y.type:ue(this.key,this.value,y.key,y.value)}equals(y){return y.type===this.type?this.key===y.key&&this.value===y.value:!1}substituteConstants(){return this}evaluate(y){return typeof this.value=="string"?!1:parseFloat(y.getValue(this.key))<this.value}serialize(){return`${this.key} < ${this.value}`}keys(){return[this.key]}negate(){return this.negated||(this.negated=X.create(this.key,this.value,this)),this.negated}}class D{constructor(y,E,Y){this.key=y,this.value=E,this.negated=Y,this.type=15}static create(y,E,Y=null){return B(E,me=>new D(y,me,Y))}cmp(y){return y.type!==this.type?this.type-y.type:ue(this.key,this.value,y.key,y.value)}equals(y){return y.type===this.type?this.key===y.key&&this.value===y.value:!1}substituteConstants(){return this}evaluate(y){return typeof this.value=="string"?!1:parseFloat(y.getValue(this.key))<=this.value}serialize(){return`${this.key} <= ${this.value}`}keys(){return[this.key]}negate(){return this.negated||(this.negated=U.create(this.key,this.value,this)),this.negated}}class C{constructor(y,E){this.key=y,this.regexp=E,this.type=7,this.negated=null}static create(y,E){return new C(y,E)}cmp(y){if(y.type!==this.type)return this.type-y.type;if(this.key<y.key)return-1;if(this.key>y.key)return 1;const E=this.regexp?this.regexp.source:"",Y=y.regexp?y.regexp.source:"";return E<Y?-1:E>Y?1:0}equals(y){if(y.type===this.type){const E=this.regexp?this.regexp.source:"",Y=y.regexp?y.regexp.source:"";return this.key===y.key&&E===Y}return!1}substituteConstants(){return this}evaluate(y){let E=y.getValue(this.key);return this.regexp?this.regexp.test(E):!1}serialize(){const y=this.regexp?`/${this.regexp.source}/${this.regexp.ignoreCase?"i":""}`:"/invalid/";return`${this.key} =~ ${y}`}keys(){return[this.key]}negate(){return this.negated||(this.negated=K.create(this)),this.negated}}class K{constructor(y){this._actual=y,this.type=8}static create(y){return new K(y)}cmp(y){return y.type!==this.type?this.type-y.type:this._actual.cmp(y._actual)}equals(y){return y.type===this.type?this._actual.equals(y._actual):!1}substituteConstants(){return this}evaluate(y){return!this._actual.evaluate(y)}serialize(){throw new Error("Method not implemented.")}keys(){return this._actual.keys()}negate(){return this._actual}}function $(G){let y=null;for(let E=0,Y=G.length;E<Y;E++){const me=G[E].substituteConstants();if(G[E]!==me&&y===null){y=[];for(let $e=0;$e<E;$e++)y[$e]=G[$e]}y!==null&&(y[E]=me)}return y===null?G:y}class ve{constructor(y,E){this.expr=y,this.negated=E,this.type=6}static create(y,E){return ve._normalizeArr(y,E)}cmp(y){if(y.type!==this.type)return this.type-y.type;if(this.expr.length<y.expr.length)return-1;if(this.expr.length>y.expr.length)return 1;for(let E=0,Y=this.expr.length;E<Y;E++){const me=o(this.expr[E],y.expr[E]);if(me!==0)return me}return 0}equals(y){if(y.type===this.type){if(this.expr.length!==y.expr.length)return!1;for(let E=0,Y=this.expr.length;E<Y;E++)if(!this.expr[E].equals(y.expr[E]))return!1;return!0}return!1}substituteConstants(){const y=$(this.expr);return y===this.expr?this:ve.create(y,this.negated)}evaluate(y){for(let E=0,Y=this.expr.length;E<Y;E++)if(!this.expr[E].evaluate(y))return!1;return!0}static _normalizeArr(y,E){const Y=[];let me=!1;for(const $e of y)if($e){if($e.type===1){me=!0;continue}if($e.type===0)return k.INSTANCE;if($e.type===6){Y.push(...$e.expr);continue}Y.push($e)}if(Y.length===0&&me)return N.INSTANCE;if(Y.length!==0){if(Y.length===1)return Y[0];Y.sort(o);for(let $e=1;$e<Y.length;$e++)Y[$e-1].equals(Y[$e])&&(Y.splice($e,1),$e--);if(Y.length===1)return Y[0];for(;Y.length>1;){const $e=Y[Y.length-1];if($e.type!==9)break;Y.pop();const We=Y.pop(),qe=Y.length===0,Xe=Se.create($e.expr.map(gt=>ve.create([gt,We],null)),null,qe);Xe&&(Y.push(Xe),Y.sort(o))}return Y.length===1?Y[0]:new ve(Y,E)}}serialize(){return this.expr.map(y=>y.serialize()).join(" && ")}keys(){const y=[];for(let E of this.expr)y.push(...E.keys());return y}negate(){if(!this.negated){const y=[];for(let E of this.expr)y.push(E.negate());this.negated=Se.create(y,this,!0)}return this.negated}}class Se{constructor(y,E){this.expr=y,this.negated=E,this.type=9}static create(y,E,Y){return Se._normalizeArr(y,E,Y)}cmp(y){if(y.type!==this.type)return this.type-y.type;if(this.expr.length<y.expr.length)return-1;if(this.expr.length>y.expr.length)return 1;for(let E=0,Y=this.expr.length;E<Y;E++){const me=o(this.expr[E],y.expr[E]);if(me!==0)return me}return 0}equals(y){if(y.type===this.type){if(this.expr.length!==y.expr.length)return!1;for(let E=0,Y=this.expr.length;E<Y;E++)if(!this.expr[E].equals(y.expr[E]))return!1;return!0}return!1}substituteConstants(){const y=$(this.expr);return y===this.expr?this:Se.create(y,this.negated,!1)}evaluate(y){for(let E=0,Y=this.expr.length;E<Y;E++)if(this.expr[E].evaluate(y))return!0;return!1}static _normalizeArr(y,E,Y){let me=[],$e=!1;if(y){for(let We=0,qe=y.length;We<qe;We++){const Xe=y[We];if(Xe){if(Xe.type===0){$e=!0;continue}if(Xe.type===1)return N.INSTANCE;if(Xe.type===9){me=me.concat(Xe.expr);continue}me.push(Xe)}}if(me.length===0&&$e)return k.INSTANCE;me.sort(o)}if(me.length!==0){if(me.length===1)return me[0];for(let We=1;We<me.length;We++)me[We-1].equals(me[We])&&(me.splice(We,1),We--);if(me.length===1)return me[0];if(Y){for(let We=0;We<me.length;We++)for(let qe=We+1;qe<me.length;qe++)R(me[We],me[qe])&&(me.splice(qe,1),qe--);if(me.length===1)return me[0]}return new Se(me,E)}}serialize(){return this.expr.map(y=>y.serialize()).join(" || ")}keys(){const y=[];for(let E of this.expr)y.push(...E.keys());return y}negate(){if(!this.negated){let y=[];for(let E of this.expr)y.push(E.negate());for(;y.length>1;){const E=y.shift(),Y=y.shift(),me=[];for(const We of ee(E))for(const qe of ee(Y))me.push(ve.create([We,qe],null));const $e=y.length===0;y.unshift(Se.create(me,null,$e))}this.negated=y[0]}return this.negated}}class Le extends v{constructor(y,E,Y){super(y,null),this._defaultValue=E,typeof Y=="object"?Le._info.push(Object.assign(Object.assign({},Y),{key:y})):Y!==!0&&Le._info.push({key:y,description:Y,type:E!=null?typeof E:void 0})}static all(){return Le._info.values()}bindTo(y){return y.createKey(this.key,this._defaultValue)}getValue(y){return y.getContextKeyValue(this.key)}toNegated(){return this.negate()}isEqualTo(y){return x.create(this.key,y)}}Le._info=[];const ye=(0,ge.yh)("contextKeyService"),te="setContext";function j(G,y){return G<y?-1:G>y?1:0}function ue(G,y,E,Y){return G<E?-1:G>E?1:y<Y?-1:y>Y?1:0}function R(G,y){if(y.type===6&&G.type!==9&&G.type!==6){for(const me of y.expr)if(G.equals(me))return!0}const E=G.negate(),Y=ee(E).concat(ee(y));Y.sort(o);for(let me=0;me<Y.length;me++){const We=Y[me].negate();for(let qe=me+1;qe<Y.length;qe++){const Xe=Y[qe];if(We.equals(Xe))return!0}}return!1}function ee(G){return G.type===9?G.expr:[G]}},16925:function(ln,et,m){"use strict";m.d(et,{I8:function(){return L},TG:function(){return Q},jt:function(){return A},yh:function(){return _e}});var L;(function(p){p.serviceIds=new Map,p.DI_TARGET="$di$target",p.DI_DEPENDENCIES="$di$dependencies";function be(fe){return fe[p.DI_DEPENDENCIES]||[]}p.getServiceDependencies=be})(L||(L={}));const Q=_e("instantiationService");function ge(p,be,fe,o){be[L.DI_TARGET]===be?be[L.DI_DEPENDENCIES].push({id:p,index:fe,optional:o}):(be[L.DI_DEPENDENCIES]=[{id:p,index:fe,optional:o}],be[L.DI_TARGET]=be)}function _e(p){if(L.serviceIds.has(p))return L.serviceIds.get(p);const be=function(fe,o,k){if(arguments.length!==3)throw new Error("@IServiceName-decorator can only be used to decorate a parameter");ge(be,fe,k,!1)};return be.toString=()=>p,L.serviceIds.set(p,be),be}function A(p){return function(be,fe,o){if(arguments.length!==3)throw new Error("@optional-decorator can only be used to decorate a parameter");ge(p,be,o,!0)}}},44650:function(ln,et,m){"use strict";m.d(et,{B:function(){return _e}});var L=m(76068),Q=m(72999);class ge{constructor(){this.data=new Map}add(p,be){L.ok(Q.HD(p)),L.ok(Q.Kn(be)),L.ok(!this.data.has(p),"There is already an extension with this id"),this.data.set(p,be)}as(p){return this.data.get(p)||null}}const _e=new ge},66213:function(ln,et,m){"use strict";m.d(et,{e:function(){return L}});var L;(function(Q){Q.DARK="dark",Q.LIGHT="light",Q.HIGH_CONTRAST="hc"})(L||(L={}))},49055:function(ln,et,m){"use strict";m.d(et,{EN:function(){return o},IP:function(){return v},Ic:function(){return T},XE:function(){return be},bB:function(){return z},kS:function(){return k},m6:function(){return N}});var L=m(52615),Q=m(4348),ge=m(69323),_e=m(16925),A=m(44650),p=m(66213);const be=(0,_e.yh)("themeService");var fe;(function(ae){function B(U){return U&&typeof U=="object"&&typeof U.id=="string"}ae.isThemeColor=B})(fe||(fe={}));function o(ae){return{id:ae}}var k;(function(ae){function B(K){return K&&typeof K=="object"&&typeof K.id=="string"&&(typeof K.color=="undefined"||fe.isThemeColor(K.color))}ae.isThemeIcon=B;const U=new RegExp(`^\\$\\((${L.dT.iconNameExpression}(?:${L.dT.iconModifierExpression})?)\\)$`);function X(K){const $=U.exec(K);if(!$)return;let[,ve]=$;return{id:ve}}ae.fromString=X;function Z(K,$){let ve=K.id;const Se=ve.lastIndexOf("~");return Se!==-1&&(ve=ve.substring(0,Se)),$&&(ve=`${ve}~${$}`),{id:ve}}ae.modify=Z;function D(K,$){var ve,Se;return K.id===$.id&&((ve=K.color)===null||ve===void 0?void 0:ve.id)===((Se=$.color)===null||Se===void 0?void 0:Se.id)}ae.isEqual=D;function C(K,$){return{id:K.id,color:$?o($):void 0}}ae.asThemeIcon=C,ae.asClassNameArray=L.dT.asClassNameArray,ae.asClassName=L.dT.asClassName,ae.asCSSSelector=L.dT.asCSSSelector})(k||(k={}));function N(ae){switch(ae){case p.e.DARK:return"vs-dark";case p.e.HIGH_CONTRAST:return"hc-black";default:return"vs"}}const v={ThemingContribution:"base.contributions.theming"};class x{constructor(){this.themingParticipants=[],this.themingParticipants=[],this.onThemingParticipantAddedEmitter=new Q.Q5}onColorThemeChange(B){return this.themingParticipants.push(B),this.onThemingParticipantAddedEmitter.fire(B),(0,ge.OF)(()=>{const U=this.themingParticipants.indexOf(B);this.themingParticipants.splice(U,1)})}getThemingParticipants(){return this.themingParticipants}}let S=new x;A.B.add(v.ThemingContribution,S);function T(ae){return S.onColorThemeChange(ae)}class z extends ge.JT{constructor(B){super(),this.themeService=B,this.theme=B.getColorTheme(),this._register(this.themeService.onDidColorThemeChange(U=>this.onThemeChange(U)))}onThemeChange(B){this.theme=B,this.updateStyles()}updateStyles(){}}},31561:function(ln,et,m){"use strict";m.d(et,{Z:function(){return K}});var L=m(72308),Q=m(49618),ge=m(52487),_e=m(74416),A=m(35593),p=m(92310),be=m.n(p),fe=m(8654),o=m(59301),k=m(10228),N=m(16089),v=k.Z.ESC,x=k.Z.TAB;function S($){var ve=$.visible,Se=$.triggerRef,Le=$.onVisibleChange,ye=$.autoFocus,te=$.overlayRef,j=o.useRef(!1),ue=function(){if(ve){var y,E;(y=Se.current)===null||y===void 0||(E=y.focus)===null||E===void 0||E.call(y),Le==null||Le(!1)}},R=function(){var y;return(y=te.current)!==null&&y!==void 0&&y.focus?(te.current.focus(),j.current=!0,!0):!1},ee=function(y){switch(y.keyCode){case v:ue();break;case x:{var E=!1;j.current||(E=R()),E?y.preventDefault():ue();break}}};o.useEffect(function(){return ve?(window.addEventListener("keydown",ee),ye&&(0,N.Z)(R,3),function(){window.removeEventListener("keydown",ee),j.current=!1}):function(){j.current=!1}},[ve])}var T=(0,o.forwardRef)(function($,ve){var Se=$.overlay,Le=$.arrow,ye=$.prefixCls,te=(0,o.useMemo)(function(){var ue;return typeof Se=="function"?ue=Se():ue=Se,ue},[Se]),j=(0,fe.sQ)(ve,te==null?void 0:te.ref);return o.createElement(o.Fragment,null,Le&&o.createElement("div",{className:"".concat(ye,"-arrow")}),o.cloneElement(te,{ref:(0,fe.Yr)(te)?j:void 0}))}),z=T,ae={adjustX:1,adjustY:1},B=[0,0],U={topLeft:{points:["bl","tl"],overflow:ae,offset:[0,-4],targetOffset:B},top:{points:["bc","tc"],overflow:ae,offset:[0,-4],targetOffset:B},topRight:{points:["br","tr"],overflow:ae,offset:[0,-4],targetOffset:B},bottomLeft:{points:["tl","bl"],overflow:ae,offset:[0,4],targetOffset:B},bottom:{points:["tc","bc"],overflow:ae,offset:[0,4],targetOffset:B},bottomRight:{points:["tr","br"],overflow:ae,offset:[0,4],targetOffset:B}},X=U,Z=["arrow","prefixCls","transitionName","animation","align","placement","placements","getPopupContainer","showAction","hideAction","overlayClassName","overlayStyle","visible","trigger","autoFocus","overlay","children","onVisibleChange"];function D($,ve){var Se,Le=$.arrow,ye=Le===void 0?!1:Le,te=$.prefixCls,j=te===void 0?"rc-dropdown":te,ue=$.transitionName,R=$.animation,ee=$.align,G=$.placement,y=G===void 0?"bottomLeft":G,E=$.placements,Y=E===void 0?X:E,me=$.getPopupContainer,$e=$.showAction,We=$.hideAction,qe=$.overlayClassName,Xe=$.overlayStyle,gt=$.visible,_t=$.trigger,st=_t===void 0?["hover"]:_t,Kt=$.autoFocus,un=$.overlay,Ot=$.children,Vt=$.onVisibleChange,lt=(0,_e.Z)($,Z),At=o.useState(),ne=(0,ge.Z)(At,2),de=ne[0],se=ne[1],W="visible"in $?gt:de,Ie=o.useRef(null),M=o.useRef(null),ce=o.useRef(null);o.useImperativeHandle(ve,function(){return Ie.current});var q=function(Qe){se(Qe),Vt==null||Vt(Qe)};S({visible:W,triggerRef:ce,onVisibleChange:q,autoFocus:Kt,overlayRef:M});var le=function(Qe){var Ze=$.onOverlayClick;se(!1),Ze&&Ze(Qe)},pe=function(){return o.createElement(z,{ref:M,overlay:un,prefixCls:j,arrow:ye})},De=function(){return typeof un=="function"?pe:pe()},Te=function(){var Qe=$.minOverlayWidthMatchTrigger,Ze=$.alignPoint;return"minOverlayWidthMatchTrigger"in $?Qe:!Ze},ke=function(){var Qe=$.openClassName;return Qe!==void 0?Qe:"".concat(j,"-open")},Oe=o.cloneElement(Ot,{className:be()((Se=Ot.props)===null||Se===void 0?void 0:Se.className,W&&ke()),ref:(0,fe.Yr)(Ot)?(0,fe.sQ)(ce,Ot.ref):void 0}),Ne=We;return!Ne&&st.indexOf("contextMenu")!==-1&&(Ne=["click"]),o.createElement(A.Z,(0,L.Z)({builtinPlacements:Y},lt,{prefixCls:j,ref:Ie,popupClassName:be()(qe,(0,Q.Z)({},"".concat(j,"-show-arrow"),ye)),popupStyle:Xe,action:st,showAction:$e,hideAction:Ne,popupPlacement:y,popupAlign:ee,popupTransitionName:ue,popupAnimation:R,popupVisible:W,stretch:Te()?"minWidth":"",popup:De(),onPopupVisibleChange:q,onPopupClick:le,getPopupContainer:me}),Oe)}var C=o.forwardRef(D),K=C},93681:function(ln,et,m){"use strict";m.r(et),m.d(et,{BaseInput:function(){return k},default:function(){return U}});var L=m(72308),Q=m(77321),ge=m(49618),_e=m(62853),A=m(92310),p=m.n(A),be=m(59301),fe=m(5643),o=function(Z){var D,C,K=Z.inputElement,$=Z.prefixCls,ve=Z.prefix,Se=Z.suffix,Le=Z.addonBefore,ye=Z.addonAfter,te=Z.className,j=Z.style,ue=Z.disabled,R=Z.readOnly,ee=Z.focused,G=Z.triggerFocus,y=Z.allowClear,E=Z.value,Y=Z.handleReset,me=Z.hidden,$e=Z.classes,We=Z.classNames,qe=Z.dataAttrs,Xe=Z.styles,gt=Z.components,_t=(gt==null?void 0:gt.affixWrapper)||"span",st=(gt==null?void 0:gt.groupWrapper)||"span",Kt=(gt==null?void 0:gt.wrapper)||"span",un=(gt==null?void 0:gt.groupAddon)||"span",Ot=(0,be.useRef)(null),Vt=function(pe){var De;(De=Ot.current)!==null&&De!==void 0&&De.contains(pe.target)&&(G==null||G())},lt=function(){var pe;if(!y)return null;var De=!ue&&!R&&E,Te="".concat($,"-clear-icon"),ke=(0,_e.Z)(y)==="object"&&y!==null&&y!==void 0&&y.clearIcon?y.clearIcon:"\u2716";return be.createElement("span",{onClick:Y,onMouseDown:function(Ne){return Ne.preventDefault()},className:p()(Te,(pe={},(0,ge.Z)(pe,"".concat(Te,"-hidden"),!De),(0,ge.Z)(pe,"".concat(Te,"-has-suffix"),!!Se),pe)),role:"button",tabIndex:-1},ke)},At=(0,be.cloneElement)(K,{value:E,hidden:me,className:p()((D=K.props)===null||D===void 0?void 0:D.className,!(0,fe.X3)(Z)&&!(0,fe.He)(Z)&&te)||null,style:(0,Q.Z)((0,Q.Z)({},(C=K.props)===null||C===void 0?void 0:C.style),!(0,fe.X3)(Z)&&!(0,fe.He)(Z)?j:{})});if((0,fe.X3)(Z)){var ne,de="".concat($,"-affix-wrapper"),se=p()(de,(ne={},(0,ge.Z)(ne,"".concat(de,"-disabled"),ue),(0,ge.Z)(ne,"".concat(de,"-focused"),ee),(0,ge.Z)(ne,"".concat(de,"-readonly"),R),(0,ge.Z)(ne,"".concat(de,"-input-with-clear-btn"),Se&&y&&E),ne),!(0,fe.He)(Z)&&te,$e==null?void 0:$e.affixWrapper,We==null?void 0:We.affixWrapper),W=(Se||y)&&be.createElement("span",{className:p()("".concat($,"-suffix"),We==null?void 0:We.suffix),style:Xe==null?void 0:Xe.suffix},lt(),Se);At=be.createElement(_t,(0,L.Z)({className:se,style:(0,Q.Z)((0,Q.Z)({},(0,fe.He)(Z)?void 0:j),Xe==null?void 0:Xe.affixWrapper),hidden:!(0,fe.He)(Z)&&me,onClick:Vt},qe==null?void 0:qe.affixWrapper,{ref:Ot}),ve&&be.createElement("span",{className:p()("".concat($,"-prefix"),We==null?void 0:We.prefix),style:Xe==null?void 0:Xe.prefix},ve),(0,be.cloneElement)(K,{value:E,hidden:null}),W)}if((0,fe.He)(Z)){var Ie="".concat($,"-group"),M="".concat(Ie,"-addon"),ce=p()("".concat($,"-wrapper"),Ie,$e==null?void 0:$e.wrapper),q=p()("".concat($,"-group-wrapper"),te,$e==null?void 0:$e.group);return be.createElement(st,{className:q,style:j,hidden:me},be.createElement(Kt,{className:ce},Le&&be.createElement(un,{className:M},Le),(0,be.cloneElement)(At,{hidden:null}),ye&&be.createElement(un,{className:M},ye)))}return At},k=o,N=m(80702),v=m(52487),x=m(74416),S=m(18929),T=m(2738),z=["autoComplete","onChange","onFocus","onBlur","onPressEnter","onKeyDown","prefixCls","disabled","htmlSize","className","maxLength","suffix","showCount","type","classes","classNames","styles"],ae=(0,be.forwardRef)(function(X,Z){var D=X.autoComplete,C=X.onChange,K=X.onFocus,$=X.onBlur,ve=X.onPressEnter,Se=X.onKeyDown,Le=X.prefixCls,ye=Le===void 0?"rc-input":Le,te=X.disabled,j=X.htmlSize,ue=X.className,R=X.maxLength,ee=X.suffix,G=X.showCount,y=X.type,E=y===void 0?"text":y,Y=X.classes,me=X.classNames,$e=X.styles,We=(0,x.Z)(X,z),qe=(0,S.Z)(X.defaultValue,{value:X.value}),Xe=(0,v.Z)(qe,2),gt=Xe[0],_t=Xe[1],st=(0,be.useState)(!1),Kt=(0,v.Z)(st,2),un=Kt[0],Ot=Kt[1],Vt=(0,be.useRef)(null),lt=function(q){Vt.current&&(0,fe.nH)(Vt.current,q)};(0,be.useImperativeHandle)(Z,function(){return{focus:lt,blur:function(){var q;(q=Vt.current)===null||q===void 0||q.blur()},setSelectionRange:function(q,le,pe){var De;(De=Vt.current)===null||De===void 0||De.setSelectionRange(q,le,pe)},select:function(){var q;(q=Vt.current)===null||q===void 0||q.select()},input:Vt.current}}),(0,be.useEffect)(function(){Ot(function(ce){return ce&&te?!1:ce})},[te]);var At=function(q){X.value===void 0&&_t(q.target.value),Vt.current&&(0,fe.rJ)(Vt.current,q,C)},ne=function(q){ve&&q.key==="Enter"&&ve(q),Se==null||Se(q)},de=function(q){Ot(!0),K==null||K(q)},se=function(q){Ot(!1),$==null||$(q)},W=function(q){_t(""),lt(),Vt.current&&(0,fe.rJ)(Vt.current,q,C)},Ie=function(){var q=(0,T.Z)(X,["prefixCls","onPressEnter","addonBefore","addonAfter","prefix","suffix","allowClear","defaultValue","showCount","classes","htmlSize","styles","classNames"]);return be.createElement("input",(0,L.Z)({autoComplete:D},q,{onChange:At,onFocus:de,onBlur:se,onKeyDown:ne,className:p()(ye,(0,ge.Z)({},"".concat(ye,"-disabled"),te),me==null?void 0:me.input),style:$e==null?void 0:$e.input,ref:Vt,size:j,type:E}))},M=function(){var q=Number(R)>0;if(ee||G){var le=(0,fe.D7)(gt),pe=(0,N.Z)(le).length,De=(0,_e.Z)(G)==="object"?G.formatter({value:le,count:pe,maxLength:R}):"".concat(pe).concat(q?" / ".concat(R):"");return be.createElement(be.Fragment,null,!!G&&be.createElement("span",{className:p()("".concat(ye,"-show-count-suffix"),(0,ge.Z)({},"".concat(ye,"-show-count-has-suffix"),!!ee),me==null?void 0:me.count),style:(0,Q.Z)({},$e==null?void 0:$e.count)},De),ee)}return null};return be.createElement(k,(0,L.Z)({},We,{prefixCls:ye,className:ue,inputElement:Ie(),handleReset:W,value:(0,fe.D7)(gt),focused:un,triggerFocus:lt,suffix:M(),disabled:te,classes:Y,classNames:me,styles:$e}))}),B=ae,U=B},5643:function(ln,et,m){"use strict";m.d(et,{D7:function(){return A},He:function(){return L},X3:function(){return Q},nH:function(){return _e},rJ:function(){return ge}});function L(p){return!!(p.addonBefore||p.addonAfter)}function Q(p){return!!(p.prefix||p.suffix||p.allowClear)}function ge(p,be,fe,o){if(fe){var k=be;if(be.type==="click"){var N=p.cloneNode(!0);k=Object.create(be,{target:{value:N},currentTarget:{value:N}}),N.value="",fe(k);return}if(o!==void 0){k=Object.create(be,{target:{value:p},currentTarget:{value:p}}),p.value=o,fe(k);return}fe(k)}}function _e(p,be){if(p){p.focus(be);var fe=be||{},o=fe.cursor;if(o){var k=p.value.length;switch(o){case"start":p.setSelectionRange(0,0);break;case"end":p.setSelectionRange(k,k);break;default:p.setSelectionRange(0,k)}}}}function A(p){return typeof p=="undefined"||p===null?"":String(p)}},15285:function(ln,et,m){"use strict";m.d(et,{iz:function(){return _n},ck:function(){return tt},BW:function(){return sn},sN:function(){return tt},Wd:function(){return ft},ZP:function(){return Gt},Xl:function(){return Se}});var L=m(72308),Q=m(49618),ge=m(77321),_e=m(80702),A=m(52487),p=m(74416),be=m(92310),fe=m.n(be),o=m(11780),k=m(18929),N=m(13697),v=m(48736),x=m(59301),S=m(4676),T=x.createContext(null);function z(Je,rt){return Je===void 0?null:"".concat(Je,"-").concat(rt)}function ae(Je){var rt=x.useContext(T);return z(rt,Je)}var B=m(80547),U=["children","locked"],X=x.createContext(null);function Z(Je,rt){var ht=(0,ge.Z)({},Je);return Object.keys(rt).forEach(function(xt){var mt=rt[xt];mt!==void 0&&(ht[xt]=mt)}),ht}function D(Je){var rt=Je.children,ht=Je.locked,xt=(0,p.Z)(Je,U),mt=x.useContext(X),jt=(0,B.Z)(function(){return Z(mt,xt)},[mt,xt],function(Et,Qt){return!ht&&(Et[0]!==Qt[0]||!(0,N.Z)(Et[1],Qt[1],!0))});return x.createElement(X.Provider,{value:jt},rt)}var C=[],K=x.createContext(null);function $(){return x.useContext(K)}var ve=x.createContext(C);function Se(Je){var rt=x.useContext(ve);return x.useMemo(function(){return Je!==void 0?[].concat((0,_e.Z)(rt),[Je]):rt},[rt,Je])}var Le=x.createContext(null),ye=x.createContext({}),te=ye,j=m(29194);function ue(Je){var rt=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;if((0,j.Z)(Je)){var ht=Je.nodeName.toLowerCase(),xt=["input","select","textarea","button"].includes(ht)||Je.isContentEditable||ht==="a"&&!!Je.getAttribute("href"),mt=Je.getAttribute("tabindex"),jt=Number(mt),Et=null;return mt&&!Number.isNaN(jt)?Et=jt:xt&&Et===null&&(Et=0),xt&&Je.disabled&&(Et=null),Et!==null&&(Et>=0||rt&&Et<0)}return!1}function R(Je){var rt=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,ht=(0,_e.Z)(Je.querySelectorAll("*")).filter(function(xt){return ue(xt,rt)});return ue(Je,rt)&&ht.unshift(Je),ht}var ee=null;function G(){ee=document.activeElement}function y(){ee=null}function E(){if(ee)try{ee.focus()}catch(Je){}}function Y(Je,rt){if(rt.keyCode===9){var ht=R(Je),xt=ht[rt.shiftKey?0:ht.length-1],mt=xt===document.activeElement||Je===document.activeElement;if(mt){var jt=ht[rt.shiftKey?ht.length-1:0];jt.focus(),rt.preventDefault()}}}var me=m(10228),$e=m(16089),We=me.Z.LEFT,qe=me.Z.RIGHT,Xe=me.Z.UP,gt=me.Z.DOWN,_t=me.Z.ENTER,st=me.Z.ESC,Kt=me.Z.HOME,un=me.Z.END,Ot=[Xe,gt,We,qe];function Vt(Je,rt,ht,xt){var mt,jt,Et,Qt,nn="prev",on="next",In="children",wn="parent";if(Je==="inline"&&xt===_t)return{inlineTrigger:!0};var Kn=(mt={},(0,Q.Z)(mt,Xe,nn),(0,Q.Z)(mt,gt,on),mt),dn=(jt={},(0,Q.Z)(jt,We,ht?on:nn),(0,Q.Z)(jt,qe,ht?nn:on),(0,Q.Z)(jt,gt,In),(0,Q.Z)(jt,_t,In),jt),fn=(Et={},(0,Q.Z)(Et,Xe,nn),(0,Q.Z)(Et,gt,on),(0,Q.Z)(Et,_t,In),(0,Q.Z)(Et,st,wn),(0,Q.Z)(Et,We,ht?In:wn),(0,Q.Z)(Et,qe,ht?wn:In),Et),Hn={inline:Kn,horizontal:dn,vertical:fn,inlineSub:Kn,horizontalSub:fn,verticalSub:fn},Zn=(Qt=Hn["".concat(Je).concat(rt?"":"Sub")])===null||Qt===void 0?void 0:Qt[xt];switch(Zn){case nn:return{offset:-1,sibling:!0};case on:return{offset:1,sibling:!0};case wn:return{offset:-1,sibling:!1};case In:return{offset:1,sibling:!1};default:return null}}function lt(Je){for(var rt=Je;rt;){if(rt.getAttribute("data-menu-list"))return rt;rt=rt.parentElement}return null}function At(Je,rt){for(var ht=Je||document.activeElement;ht;){if(rt.has(ht))return ht;ht=ht.parentElement}return null}function ne(Je,rt){var ht=R(Je,!0);return ht.filter(function(xt){return rt.has(xt)})}function de(Je,rt,ht){var xt=arguments.length>3&&arguments[3]!==void 0?arguments[3]:1;if(!Je)return null;var mt=ne(Je,rt),jt=mt.length,Et=mt.findIndex(function(Qt){return ht===Qt});return xt<0?Et===-1?Et=jt-1:Et-=1:xt>0&&(Et+=1),Et=(Et+jt)%jt,mt[Et]}var se=function(rt,ht){var xt=new Set,mt=new Map,jt=new Map;return rt.forEach(function(Et){var Qt=document.querySelector("[data-menu-id='".concat(z(ht,Et),"']"));Qt&&(xt.add(Qt),jt.set(Qt,Et),mt.set(Et,Qt))}),{elements:xt,key2element:mt,element2key:jt}};function W(Je,rt,ht,xt,mt,jt,Et,Qt,nn,on){var In=x.useRef(),wn=x.useRef();wn.current=rt;var Kn=function(){$e.Z.cancel(In.current)};return x.useEffect(function(){return function(){Kn()}},[]),function(dn){var fn=dn.which;if([].concat(Ot,[_t,st,Kt,un]).includes(fn)){var Hn=jt(),Zn=se(Hn,xt),Yn=Zn,On=Yn.elements,Fn=Yn.key2element,jn=Yn.element2key,Bn=Fn.get(rt),Jn=At(Bn,On),ur=jn.get(Jn),Pn=Vt(Je,Et(ur,!0).length===1,ht,fn);if(!Pn&&fn!==Kt&&fn!==un)return;(Ot.includes(fn)||[Kt,un].includes(fn))&&dn.preventDefault();var bn=function(Un){if(Un){var tr=Un,xn=Un.querySelector("a");xn!=null&&xn.getAttribute("href")&&(tr=xn);var gn=jn.get(Un);Qt(gn),Kn(),In.current=(0,$e.Z)(function(){wn.current===gn&&tr.focus()})}};if([Kt,un].includes(fn)||Pn.sibling||!Jn){var Ge;!Jn||Je==="inline"?Ge=mt.current:Ge=lt(Jn);var mn,Mn=ne(Ge,On);fn===Kt?mn=Mn[0]:fn===un?mn=Mn[Mn.length-1]:mn=de(Ge,On,Jn,Pn.offset),bn(mn)}else if(Pn.inlineTrigger)nn(ur);else if(Pn.offset>0)nn(ur,!0),Kn(),In.current=(0,$e.Z)(function(){Zn=se(Hn,xt);var ar=Jn.getAttribute("aria-controls"),Un=document.getElementById(ar),tr=de(Un,Zn.elements);bn(tr)},5);else if(Pn.offset<0){var Tn=Et(ur,!0),Xn=Tn[Tn.length-2],sr=Fn.get(Xn);nn(Xn,!1),bn(sr)}}on==null||on(dn)}}function Ie(Je){Promise.resolve().then(Je)}var M="__RC_UTIL_PATH_SPLIT__",ce=function(rt){return rt.join(M)},q=function(rt){return rt.split(M)},le="rc-menu-more";function pe(){var Je=x.useState({}),rt=(0,A.Z)(Je,2),ht=rt[1],xt=(0,x.useRef)(new Map),mt=(0,x.useRef)(new Map),jt=x.useState([]),Et=(0,A.Z)(jt,2),Qt=Et[0],nn=Et[1],on=(0,x.useRef)(0),In=(0,x.useRef)(!1),wn=function(){In.current||ht({})},Kn=(0,x.useCallback)(function(Fn,jn){var Bn=ce(jn);mt.current.set(Bn,Fn),xt.current.set(Fn,Bn),on.current+=1;var Jn=on.current;Ie(function(){Jn===on.current&&wn()})},[]),dn=(0,x.useCallback)(function(Fn,jn){var Bn=ce(jn);mt.current.delete(Bn),xt.current.delete(Fn)},[]),fn=(0,x.useCallback)(function(Fn){nn(Fn)},[]),Hn=(0,x.useCallback)(function(Fn,jn){var Bn=xt.current.get(Fn)||"",Jn=q(Bn);return jn&&Qt.includes(Jn[0])&&Jn.unshift(le),Jn},[Qt]),Zn=(0,x.useCallback)(function(Fn,jn){return Fn.some(function(Bn){var Jn=Hn(Bn,!0);return Jn.includes(jn)})},[Hn]),Yn=function(){var jn=(0,_e.Z)(xt.current.keys());return Qt.length&&jn.push(le),jn},On=(0,x.useCallback)(function(Fn){var jn="".concat(xt.current.get(Fn)).concat(M),Bn=new Set;return(0,_e.Z)(mt.current.keys()).forEach(function(Jn){Jn.startsWith(jn)&&Bn.add(mt.current.get(Jn))}),Bn},[]);return x.useEffect(function(){return function(){In.current=!0}},[]),{registerPath:Kn,unregisterPath:dn,refreshOverflowKeys:fn,isSubPathKey:Zn,getKeyPath:Hn,getKeys:Yn,getSubPathKeys:On}}function De(Je){var rt=x.useRef(Je);rt.current=Je;var ht=x.useCallback(function(){for(var xt,mt=arguments.length,jt=new Array(mt),Et=0;Et<mt;Et++)jt[Et]=arguments[Et];return(xt=rt.current)===null||xt===void 0?void 0:xt.call.apply(xt,[rt].concat(jt))},[]);return Je?ht:void 0}var Te=Math.random().toFixed(5).toString().slice(2),ke=0;function Oe(Je){var rt=(0,k.Z)(Je,{value:Je}),ht=(0,A.Z)(rt,2),xt=ht[0],mt=ht[1];return x.useEffect(function(){ke+=1;var jt="".concat(Te,"-").concat(ke);mt("rc-menu-uuid-".concat(jt))},[]),xt}var Ne=m(96949),nt=m(55090),Qe=m(77205),Ze=m(38793),pt=m(2738),vt=m(8654);function ct(Je,rt,ht,xt){var mt=x.useContext(X),jt=mt.activeKey,Et=mt.onActive,Qt=mt.onInactive,nn={active:jt===Je};return rt||(nn.onMouseEnter=function(on){ht==null||ht({key:Je,domEvent:on}),Et(Je)},nn.onMouseLeave=function(on){xt==null||xt({key:Je,domEvent:on}),Qt(Je)}),nn}function Dt(Je){var rt=x.useContext(X),ht=rt.mode,xt=rt.rtl,mt=rt.inlineIndent;if(ht!=="inline")return null;var jt=Je;return xt?{paddingRight:jt*mt}:{paddingLeft:jt*mt}}function Ut(Je){var rt=Je.icon,ht=Je.props,xt=Je.children,mt;return rt===null||rt===!1?null:(typeof rt=="function"?mt=x.createElement(rt,(0,ge.Z)({},ht)):typeof rt!="boolean"&&(mt=rt),mt||xt||null)}var w=["item"];function I(Je){var rt=Je.item,ht=(0,p.Z)(Je,w);return Object.defineProperty(ht,"item",{get:function(){return(0,v.ZP)(!1,"`info.item` is deprecated since we will move to function component that not provides React Node instance in future."),rt}}),ht}var dt=["title","attribute","elementRef"],oe=["style","className","eventKey","warnKey","disabled","itemIcon","children","role","onMouseEnter","onMouseLeave","onClick","onKeyDown","onFocus"],Pe=["active"],vn=function(Je){(0,Qe.Z)(ht,Je);var rt=(0,Ze.Z)(ht);function ht(){return(0,Ne.Z)(this,ht),rt.apply(this,arguments)}return(0,nt.Z)(ht,[{key:"render",value:function(){var mt=this.props,jt=mt.title,Et=mt.attribute,Qt=mt.elementRef,nn=(0,p.Z)(mt,dt),on=(0,pt.Z)(nn,["eventKey","popupClassName","popupOffset","onTitleClick"]);return(0,v.ZP)(!Et,"`attribute` of Menu.Item is deprecated. Please pass attribute directly."),x.createElement(o.Z.Item,(0,L.Z)({},Et,{title:typeof jt=="string"?jt:void 0},on,{ref:Qt}))}}]),ht}(x.Component),je=x.forwardRef(function(Je,rt){var ht,xt=Je.style,mt=Je.className,jt=Je.eventKey,Et=Je.warnKey,Qt=Je.disabled,nn=Je.itemIcon,on=Je.children,In=Je.role,wn=Je.onMouseEnter,Kn=Je.onMouseLeave,dn=Je.onClick,fn=Je.onKeyDown,Hn=Je.onFocus,Zn=(0,p.Z)(Je,oe),Yn=ae(jt),On=x.useContext(X),Fn=On.prefixCls,jn=On.onItemClick,Bn=On.disabled,Jn=On.overflowDisabled,ur=On.itemIcon,Pn=On.selectedKeys,bn=On.onActive,Ge=x.useContext(te),mn=Ge._internalRenderMenuItem,Mn="".concat(Fn,"-item"),Tn=x.useRef(),Xn=x.useRef(),sr=Bn||Qt,ar=(0,vt.x1)(rt,Xn),Un=Se(jt),tr=function(wr){return{key:jt,keyPath:(0,_e.Z)(Un).reverse(),item:Tn.current,domEvent:wr}},xn=nn||ur,gn=ct(jt,sr,wn,Kn),Vn=gn.active,nr=(0,p.Z)(gn,Pe),pr=Pn.includes(jt),Mr=Dt(Un.length),Cn=function(wr){if(!sr){var Nr=tr(wr);dn==null||dn(I(Nr)),jn(Nr)}},Sr=function(wr){if(fn==null||fn(wr),wr.which===me.Z.ENTER){var Nr=tr(wr);dn==null||dn(I(Nr)),jn(Nr)}},mr=function(wr){bn(jt),Hn==null||Hn(wr)},_r={};Je.role==="option"&&(_r["aria-selected"]=pr);var zr=x.createElement(vn,(0,L.Z)({ref:Tn,elementRef:ar,role:In===null?"none":In||"menuitem",tabIndex:Qt?null:-1,"data-menu-id":Jn&&Yn?null:Yn},Zn,nr,_r,{component:"li","aria-disabled":Qt,style:(0,ge.Z)((0,ge.Z)({},Mr),xt),className:fe()(Mn,(ht={},(0,Q.Z)(ht,"".concat(Mn,"-active"),Vn),(0,Q.Z)(ht,"".concat(Mn,"-selected"),pr),(0,Q.Z)(ht,"".concat(Mn,"-disabled"),sr),ht),mt),onClick:Cn,onKeyDown:Sr,onFocus:mr}),on,x.createElement(Ut,{props:(0,ge.Z)((0,ge.Z)({},Je),{},{isSelected:pr}),icon:xn}));return mn&&(zr=mn(zr,Je,{selected:pr})),zr});function He(Je,rt){var ht=Je.eventKey,xt=$(),mt=Se(ht);return x.useEffect(function(){if(xt)return xt.registerPath(ht,mt),function(){xt.unregisterPath(ht,mt)}},[mt]),xt?null:x.createElement(je,(0,L.Z)({},Je,{ref:rt}))}var tt=x.forwardRef(He),he=["className","children"],ie=function(rt,ht){var xt=rt.className,mt=rt.children,jt=(0,p.Z)(rt,he),Et=x.useContext(X),Qt=Et.prefixCls,nn=Et.mode,on=Et.rtl;return x.createElement("ul",(0,L.Z)({className:fe()(Qt,on&&"".concat(Qt,"-rtl"),"".concat(Qt,"-sub"),"".concat(Qt,"-").concat(nn==="inline"?"inline":"vertical"),xt),role:"menu"},jt,{"data-menu-list":!0,ref:ht}),mt)},xe=x.forwardRef(ie);xe.displayName="SubMenuList";var Fe=xe,V=m(11592);function at(Je,rt){return(0,V.Z)(Je).map(function(ht,xt){if(x.isValidElement(ht)){var mt,jt,Et=ht.key,Qt=(mt=(jt=ht.props)===null||jt===void 0?void 0:jt.eventKey)!==null&&mt!==void 0?mt:Et,nn=Qt==null;nn&&(Qt="tmp_key-".concat([].concat((0,_e.Z)(rt),[xt]).join("-")));var on={key:Qt,eventKey:Qt};return x.cloneElement(ht,on)}return ht})}var Ce=m(35593),It={adjustX:1,adjustY:1},Bt={topLeft:{points:["bl","tl"],overflow:It},topRight:{points:["br","tr"],overflow:It},bottomLeft:{points:["tl","bl"],overflow:It},bottomRight:{points:["tr","br"],overflow:It},leftTop:{points:["tr","tl"],overflow:It},leftBottom:{points:["br","bl"],overflow:It},rightTop:{points:["tl","tr"],overflow:It},rightBottom:{points:["bl","br"],overflow:It}},an={topLeft:{points:["bl","tl"],overflow:It},topRight:{points:["br","tr"],overflow:It},bottomLeft:{points:["tl","bl"],overflow:It},bottomRight:{points:["tr","br"],overflow:It},rightTop:{points:["tr","tl"],overflow:It},rightBottom:{points:["br","bl"],overflow:It},leftTop:{points:["tl","tr"],overflow:It},leftBottom:{points:["bl","br"],overflow:It}},en=null;function Mt(Je,rt,ht){if(rt)return rt;if(ht)return ht[Je]||ht.other}var tn={horizontal:"bottomLeft",vertical:"rightTop","vertical-left":"rightTop","vertical-right":"leftTop"};function Ue(Je){var rt=Je.prefixCls,ht=Je.visible,xt=Je.children,mt=Je.popup,jt=Je.popupStyle,Et=Je.popupClassName,Qt=Je.popupOffset,nn=Je.disabled,on=Je.mode,In=Je.onVisibleChange,wn=x.useContext(X),Kn=wn.getPopupContainer,dn=wn.rtl,fn=wn.subMenuOpenDelay,Hn=wn.subMenuCloseDelay,Zn=wn.builtinPlacements,Yn=wn.triggerSubMenuAction,On=wn.forceSubMenuRender,Fn=wn.rootClassName,jn=wn.motion,Bn=wn.defaultMotions,Jn=x.useState(!1),ur=(0,A.Z)(Jn,2),Pn=ur[0],bn=ur[1],Ge=dn?(0,ge.Z)((0,ge.Z)({},an),Zn):(0,ge.Z)((0,ge.Z)({},Bt),Zn),mn=tn[on],Mn=Mt(on,jn,Bn),Tn=x.useRef(Mn);on!=="inline"&&(Tn.current=Mn);var Xn=(0,ge.Z)((0,ge.Z)({},Tn.current),{},{leavedClassName:"".concat(rt,"-hidden"),removeOnLeave:!1,motionAppear:!0}),sr=x.useRef();return x.useEffect(function(){return sr.current=(0,$e.Z)(function(){bn(ht)}),function(){$e.Z.cancel(sr.current)}},[ht]),x.createElement(Ce.Z,{prefixCls:rt,popupClassName:fe()("".concat(rt,"-popup"),(0,Q.Z)({},"".concat(rt,"-rtl"),dn),Et,Fn),stretch:on==="horizontal"?"minWidth":null,getPopupContainer:Kn,builtinPlacements:Ge,popupPlacement:mn,popupVisible:Pn,popup:mt,popupStyle:jt,popupAlign:Qt&&{offset:Qt},action:nn?[]:[Yn],mouseEnterDelay:fn,mouseLeaveDelay:Hn,onPopupVisibleChange:In,forceRender:On,popupMotion:Xn,fresh:!0},xt)}var bt=m(77900);function wt(Je){var rt=Je.id,ht=Je.open,xt=Je.keyPath,mt=Je.children,jt="inline",Et=x.useContext(X),Qt=Et.prefixCls,nn=Et.forceSubMenuRender,on=Et.motion,In=Et.defaultMotions,wn=Et.mode,Kn=x.useRef(!1);Kn.current=wn===jt;var dn=x.useState(!Kn.current),fn=(0,A.Z)(dn,2),Hn=fn[0],Zn=fn[1],Yn=Kn.current?ht:!1;x.useEffect(function(){Kn.current&&Zn(!1)},[wn]);var On=(0,ge.Z)({},Mt(jt,on,In));xt.length>1&&(On.motionAppear=!1);var Fn=On.onVisibleChanged;return On.onVisibleChanged=function(jn){return!Kn.current&&!jn&&Zn(!0),Fn==null?void 0:Fn(jn)},Hn?null:x.createElement(D,{mode:jt,locked:!Kn.current},x.createElement(bt.default,(0,L.Z)({visible:Yn},On,{forceRender:nn,removeOnLeave:!1,leavedClassName:"".concat(Qt,"-hidden")}),function(jn){var Bn=jn.className,Jn=jn.style;return x.createElement(Fe,{id:rt,className:Bn,style:Jn},mt)}))}var Me=["style","className","title","eventKey","warnKey","disabled","internalPopupClose","children","itemIcon","expandIcon","popupClassName","popupOffset","popupStyle","onClick","onMouseEnter","onMouseLeave","onTitleClick","onTitleMouseEnter","onTitleMouseLeave"],Ae=["active"],ut=function(rt){var ht,xt=rt.style,mt=rt.className,jt=rt.title,Et=rt.eventKey,Qt=rt.warnKey,nn=rt.disabled,on=rt.internalPopupClose,In=rt.children,wn=rt.itemIcon,Kn=rt.expandIcon,dn=rt.popupClassName,fn=rt.popupOffset,Hn=rt.popupStyle,Zn=rt.onClick,Yn=rt.onMouseEnter,On=rt.onMouseLeave,Fn=rt.onTitleClick,jn=rt.onTitleMouseEnter,Bn=rt.onTitleMouseLeave,Jn=(0,p.Z)(rt,Me),ur=ae(Et),Pn=x.useContext(X),bn=Pn.prefixCls,Ge=Pn.mode,mn=Pn.openKeys,Mn=Pn.disabled,Tn=Pn.overflowDisabled,Xn=Pn.activeKey,sr=Pn.selectedKeys,ar=Pn.itemIcon,Un=Pn.expandIcon,tr=Pn.onItemClick,xn=Pn.onOpenChange,gn=Pn.onActive,Vn=x.useContext(te),nr=Vn._internalRenderSubMenuItem,pr=x.useContext(Le),Mr=pr.isSubPathKey,Cn=Se(),Sr="".concat(bn,"-submenu"),mr=Mn||nn,_r=x.useRef(),zr=x.useRef(),Or=wn!=null?wn:ar,wr=Kn!=null?Kn:Un,Nr=mn.includes(Et),vr=!Tn&&Nr,ei=Mr(sr,Et),qn=ct(Et,mr,jn,Bn),oi=qn.active,Xr=(0,p.Z)(qn,Ae),ti=x.useState(!1),cr=(0,A.Z)(ti,2),fi=cr[0],xi=cr[1],vi=function(Rr){mr||xi(Rr)},or=function(Rr){vi(!0),Yn==null||Yn({key:Et,domEvent:Rr})},yi=function(Rr){vi(!1),On==null||On({key:Et,domEvent:Rr})},Er=x.useMemo(function(){return oi||(Ge!=="inline"?fi||Mr([Xn],Et):!1)},[Ge,oi,Xn,fi,Et,Mr]),qt=Dt(Cn.length),dr=function(Rr){mr||(Fn==null||Fn({key:Et,domEvent:Rr}),Ge==="inline"&&xn(Et,!Nr))},Tr=De(function(Pr){Zn==null||Zn(I(Pr)),tr(Pr)}),Nn=function(Rr){Ge!=="inline"&&xn(Et,Rr)},kn=function(){gn(Et)},Sn=ur&&"".concat(ur,"-popup"),En=x.createElement("div",(0,L.Z)({role:"menuitem",style:qt,className:"".concat(Sr,"-title"),tabIndex:mr?null:-1,ref:_r,title:typeof jt=="string"?jt:null,"data-menu-id":Tn&&ur?null:ur,"aria-expanded":vr,"aria-haspopup":!0,"aria-controls":Sn,"aria-disabled":mr,onClick:dr,onFocus:kn},Xr),jt,x.createElement(Ut,{icon:Ge!=="horizontal"?wr:void 0,props:(0,ge.Z)((0,ge.Z)({},rt),{},{isOpen:vr,isSubMenu:!0})},x.createElement("i",{className:"".concat(Sr,"-arrow")}))),Qn=x.useRef(Ge);if(Ge!=="inline"&&Cn.length>1?Qn.current="vertical":Qn.current=Ge,!Tn){var gr=Qn.current;En=x.createElement(Ue,{mode:gr,prefixCls:Sr,visible:!on&&vr&&Ge!=="inline",popupClassName:dn,popupOffset:fn,popupStyle:Hn,popup:x.createElement(D,{mode:gr==="horizontal"?"vertical":gr},x.createElement(Fe,{id:Sn,ref:zr},In)),disabled:mr,onVisibleChange:Nn},En)}var Kr=x.createElement(o.Z.Item,(0,L.Z)({role:"none"},Jn,{component:"li",style:xt,className:fe()(Sr,"".concat(Sr,"-").concat(Ge),mt,(ht={},(0,Q.Z)(ht,"".concat(Sr,"-open"),vr),(0,Q.Z)(ht,"".concat(Sr,"-active"),Er),(0,Q.Z)(ht,"".concat(Sr,"-selected"),ei),(0,Q.Z)(ht,"".concat(Sr,"-disabled"),mr),ht)),onMouseEnter:or,onMouseLeave:yi}),En,!Tn&&x.createElement(wt,{id:Sn,open:vr,keyPath:Cn},In));return nr&&(Kr=nr(Kr,rt,{selected:ei,active:Er,open:vr,disabled:mr})),x.createElement(D,{onItemClick:Tr,mode:Ge==="horizontal"?"vertical":Ge,itemIcon:Or,expandIcon:wr},Kr)};function ft(Je){var rt=Je.eventKey,ht=Je.children,xt=Se(rt),mt=at(ht,xt),jt=$();x.useEffect(function(){if(jt)return jt.registerPath(rt,xt),function(){jt.unregisterPath(rt,xt)}},[xt]);var Et;return jt?Et=mt:Et=x.createElement(ut,Je,mt),x.createElement(ve.Provider,{value:xt},Et)}var Nt=m(62853),Pt=["className","title","eventKey","children"],Zt=["children"],Ht=function(rt){var ht=rt.className,xt=rt.title,mt=rt.eventKey,jt=rt.children,Et=(0,p.Z)(rt,Pt),Qt=x.useContext(X),nn=Qt.prefixCls,on="".concat(nn,"-item-group");return x.createElement("li",(0,L.Z)({role:"presentation"},Et,{onClick:function(wn){return wn.stopPropagation()},className:fe()(on,ht)}),x.createElement("div",{role:"presentation",className:"".concat(on,"-title"),title:typeof xt=="string"?xt:void 0},xt),x.createElement("ul",{role:"group",className:"".concat(on,"-list")},jt))};function sn(Je){var rt=Je.children,ht=(0,p.Z)(Je,Zt),xt=Se(ht.eventKey),mt=at(rt,xt),jt=$();return jt?mt:x.createElement(Ht,(0,pt.Z)(ht,["warnKey"]),mt)}function _n(Je){var rt=Je.className,ht=Je.style,xt=x.useContext(X),mt=xt.prefixCls,jt=$();return jt?null:x.createElement("li",{role:"separator",className:fe()("".concat(mt,"-item-divider"),rt),style:ht})}var hn=["label","children","key","type"];function Lt(Je){return(Je||[]).map(function(rt,ht){if(rt&&(0,Nt.Z)(rt)==="object"){var xt=rt,mt=xt.label,jt=xt.children,Et=xt.key,Qt=xt.type,nn=(0,p.Z)(xt,hn),on=Et!=null?Et:"tmp-".concat(ht);return jt||Qt==="group"?Qt==="group"?x.createElement(sn,(0,L.Z)({key:on},nn,{title:mt}),Lt(jt)):x.createElement(ft,(0,L.Z)({key:on},nn,{title:mt}),Lt(jt)):Qt==="divider"?x.createElement(_n,(0,L.Z)({key:on},nn)):x.createElement(tt,(0,L.Z)({key:on},nn),mt)}return null}).filter(function(rt){return rt})}function Ft(Je,rt,ht){var xt=Je;return rt&&(xt=Lt(rt)),at(xt,ht)}var $t=["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"],Xt=[],Wt=x.forwardRef(function(Je,rt){var ht,xt,mt=Je,jt=mt.prefixCls,Et=jt===void 0?"rc-menu":jt,Qt=mt.rootClassName,nn=mt.style,on=mt.className,In=mt.tabIndex,wn=In===void 0?0:In,Kn=mt.items,dn=mt.children,fn=mt.direction,Hn=mt.id,Zn=mt.mode,Yn=Zn===void 0?"vertical":Zn,On=mt.inlineCollapsed,Fn=mt.disabled,jn=mt.disabledOverflow,Bn=mt.subMenuOpenDelay,Jn=Bn===void 0?.1:Bn,ur=mt.subMenuCloseDelay,Pn=ur===void 0?.1:ur,bn=mt.forceSubMenuRender,Ge=mt.defaultOpenKeys,mn=mt.openKeys,Mn=mt.activeKey,Tn=mt.defaultActiveFirst,Xn=mt.selectable,sr=Xn===void 0?!0:Xn,ar=mt.multiple,Un=ar===void 0?!1:ar,tr=mt.defaultSelectedKeys,xn=mt.selectedKeys,gn=mt.onSelect,Vn=mt.onDeselect,nr=mt.inlineIndent,pr=nr===void 0?24:nr,Mr=mt.motion,Cn=mt.defaultMotions,Sr=mt.triggerSubMenuAction,mr=Sr===void 0?"hover":Sr,_r=mt.builtinPlacements,zr=mt.itemIcon,Or=mt.expandIcon,wr=mt.overflowedIndicator,Nr=wr===void 0?"...":wr,vr=mt.overflowedIndicatorPopupClassName,ei=mt.getPopupContainer,qn=mt.onClick,oi=mt.onOpenChange,Xr=mt.onKeyDown,ti=mt.openAnimation,cr=mt.openTransitionName,fi=mt._internalRenderMenuItem,xi=mt._internalRenderSubMenuItem,vi=(0,p.Z)(mt,$t),or=x.useMemo(function(){return Ft(dn,Kn,Xt)},[dn,Kn]),yi=x.useState(!1),Er=(0,A.Z)(yi,2),qt=Er[0],dr=Er[1],Tr=x.useRef(),Nn=Oe(Hn),kn=fn==="rtl",Sn=(0,k.Z)(Ge,{value:mn,postState:function(Hr){return Hr||Xt}}),En=(0,A.Z)(Sn,2),Qn=En[0],gr=En[1],Kr=function(Hr){var jr=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;function Ti(){gr(Hr),oi==null||oi(Hr)}jr?(0,S.flushSync)(Ti):Ti()},Pr=x.useState(Qn),Rr=(0,A.Z)(Pr,2),rr=Rr[0],Br=Rr[1],ni=x.useRef(!1),ci=x.useMemo(function(){return(Yn==="inline"||Yn==="vertical")&&On?["vertical",On]:[Yn,!1]},[Yn,On]),Ni=(0,A.Z)(ci,2),_i=Ni[0],Wn=Ni[1],ir=_i==="inline",$r=x.useState(_i),ri=(0,A.Z)($r,2),Ur=ri[0],Ri=ri[1],Fi=x.useState(Wn),Li=(0,A.Z)(Fi,2),Di=Li[0],is=Li[1];x.useEffect(function(){Ri(_i),is(Wn),ni.current&&(ir?gr(rr):Kr(Xt))},[_i,Wn]);var ss=x.useState(0),cs=(0,A.Z)(ss,2),Wi=cs[0],ds=cs[1],di=Wi>=or.length-1||Ur!=="horizontal"||jn;x.useEffect(function(){ir&&Br(Qn)},[Qn]),x.useEffect(function(){return ni.current=!0,function(){ni.current=!1}},[]);var Si=pe(),fs=Si.registerPath,Qi=Si.unregisterPath,Ji=Si.refreshOverflowKeys,Hi=Si.isSubPathKey,Ir=Si.getKeyPath,br=Si.getKeys,hi=Si.getSubPathKeys,bi=x.useMemo(function(){return{registerPath:fs,unregisterPath:Qi}},[fs,Qi]),Qr=x.useMemo(function(){return{isSubPathKey:Hi}},[Hi]);x.useEffect(function(){Ji(di?Xt:or.slice(Wi+1).map(function(Zr){return Zr.key}))},[Wi,di]);var ii=(0,k.Z)(Mn||Tn&&((ht=or[0])===null||ht===void 0?void 0:ht.key),{value:Mn}),Ei=(0,A.Z)(ii,2),Ii=Ei[0],wi=Ei[1],Gi=De(function(Zr){wi(Zr)}),Bi=De(function(){wi(void 0)});(0,x.useImperativeHandle)(rt,function(){return{list:Tr.current,focus:function(Hr){var jr,Ti=br(),si=se(Ti,Nn),ms=si.elements,cn=si.key2element,Ss=si.element2key,Ns=ne(Tr.current,ms),ws=Ii!=null?Ii:Ns[0]?Ss.get(Ns[0]):(jr=or.find(function(Fs){return!Fs.props.disabled}))===null||jr===void 0?void 0:jr.key,as=cn.get(ws);if(ws&&as){var qi;as==null||(qi=as.focus)===null||qi===void 0||qi.call(as,Hr)}}}});var hs=(0,k.Z)(tr||[],{value:xn,postState:function(Hr){return Array.isArray(Hr)?Hr:Hr==null?Xt:[Hr]}}),Ws=(0,A.Z)(hs,2),Oi=Ws[0],Os=Ws[1],Ps=function(Hr){if(sr){var jr=Hr.key,Ti=Oi.includes(jr),si;Un?Ti?si=Oi.filter(function(cn){return cn!==jr}):si=[].concat((0,_e.Z)(Oi),[jr]):si=[jr],Os(si);var ms=(0,ge.Z)((0,ge.Z)({},Hr),{},{selectedKeys:si});Ti?Vn==null||Vn(ms):gn==null||gn(ms)}!Un&&Qn.length&&Ur!=="inline"&&Kr(Xt)},ps=De(function(Zr){qn==null||qn(I(Zr)),Ps(Zr)}),ks=De(function(Zr,Hr){var jr=Qn.filter(function(si){return si!==Zr});if(Hr)jr.push(Zr);else if(Ur!=="inline"){var Ti=hi(Zr);jr=jr.filter(function(si){return!Ti.has(si)})}(0,N.Z)(Qn,jr,!0)||Kr(jr,!0)}),xs=function(Hr,jr){var Ti=jr!=null?jr:!Qn.includes(Hr);ks(Hr,Ti)},Es=W(Ur,Ii,kn,Nn,Tr,br,Ir,wi,xs,Xr);x.useEffect(function(){dr(!0)},[]);var Ms=x.useMemo(function(){return{_internalRenderMenuItem:fi,_internalRenderSubMenuItem:xi}},[fi,xi]),Pi=Ur!=="horizontal"||jn?or:or.map(function(Zr,Hr){return x.createElement(D,{key:Zr.key,overflowDisabled:Hr>Wi},Zr)}),Gs=x.createElement(o.Z,(0,L.Z)({id:Hn,ref:Tr,prefixCls:"".concat(Et,"-overflow"),component:"ul",itemComponent:tt,className:fe()(Et,"".concat(Et,"-root"),"".concat(Et,"-").concat(Ur),on,(xt={},(0,Q.Z)(xt,"".concat(Et,"-inline-collapsed"),Di),(0,Q.Z)(xt,"".concat(Et,"-rtl"),kn),xt),Qt),dir:fn,style:nn,role:"menu",tabIndex:wn,data:Pi,renderRawItem:function(Hr){return Hr},renderRawRest:function(Hr){var jr=Hr.length,Ti=jr?or.slice(-jr):null;return x.createElement(ft,{eventKey:le,title:Nr,disabled:di,internalPopupClose:jr===0,popupClassName:vr},Ti)},maxCount:Ur!=="horizontal"||jn?o.Z.INVALIDATE:o.Z.RESPONSIVE,ssr:"full","data-menu-list":!0,onVisibleChange:function(Hr){ds(Hr)},onKeyDown:Es},vi));return x.createElement(te.Provider,{value:Ms},x.createElement(T.Provider,{value:Nn},x.createElement(D,{prefixCls:Et,rootClassName:Qt,mode:Ur,openKeys:Qn,rtl:kn,disabled:Fn,motion:qt?Mr:null,defaultMotions:qt?Cn:null,activeKey:Ii,onActive:Gi,onInactive:Bi,selectedKeys:Oi,inlineIndent:pr,subMenuOpenDelay:Jn,subMenuCloseDelay:Pn,forceSubMenuRender:bn,builtinPlacements:_r,triggerSubMenuAction:mr,getPopupContainer:ei,itemIcon:zr,expandIcon:Or,onItemClick:ps,onOpenChange:ks},x.createElement(Le.Provider,{value:Qr},Gs),x.createElement("div",{style:{display:"none"},"aria-hidden":!0},x.createElement(K.Provider,{value:bi},or)))))}),Dn=Wt,pn=Dn;pn.Item=tt,pn.SubMenu=ft,pn.ItemGroup=sn,pn.Divider=_n;var Gt=pn},11780:function(ln,et,m){"use strict";m.d(et,{Z:function(){return G}});var L=m(72308),Q=m(77321),ge=m(52487),_e=m(74416),A=m(59301),p=m(92310),be=m.n(p),fe=m(29301),o=m(34280),k=["prefixCls","invalidate","item","renderItem","responsive","responsiveDisabled","registerSize","itemKey","className","style","children","display","order","component"],N=void 0;function v(y,E){var Y=y.prefixCls,me=y.invalidate,$e=y.item,We=y.renderItem,qe=y.responsive,Xe=y.responsiveDisabled,gt=y.registerSize,_t=y.itemKey,st=y.className,Kt=y.style,un=y.children,Ot=y.display,Vt=y.order,lt=y.component,At=lt===void 0?"div":lt,ne=(0,_e.Z)(y,k),de=qe&&!Ot;function se(q){gt(_t,q)}A.useEffect(function(){return function(){se(null)}},[]);var W=We&&$e!==N?We($e,{index:Vt}):un,Ie;me||(Ie={opacity:de?0:1,height:de?0:N,overflowY:de?"hidden":N,order:qe?Vt:N,pointerEvents:de?"none":N,position:de?"absolute":N});var M={};de&&(M["aria-hidden"]=!0);var ce=A.createElement(At,(0,L.Z)({className:be()(!me&&Y,st),style:(0,Q.Z)((0,Q.Z)({},Ie),Kt)},M,ne,{ref:E}),W);return qe&&(ce=A.createElement(fe.Z,{onResize:function(le){var pe=le.offsetWidth;se(pe)},disabled:Xe},ce)),ce}var x=A.forwardRef(v);x.displayName="Item";var S=x,T=m(6089),z=m(4676),ae=m(16089);function B(y){if(typeof MessageChannel=="undefined")(0,ae.Z)(y);else{var E=new MessageChannel;E.port1.onmessage=function(){return y()},E.port2.postMessage(void 0)}}function U(){var y=A.useRef(null),E=function(me){y.current||(y.current=[],B(function(){(0,z.unstable_batchedUpdates)(function(){y.current.forEach(function($e){$e()}),y.current=null})})),y.current.push(me)};return E}function X(y,E){var Y=A.useState(E),me=(0,ge.Z)(Y,2),$e=me[0],We=me[1],qe=(0,T.Z)(function(Xe){y(function(){We(Xe)})});return[$e,qe]}var Z=A.createContext(null),D=["component"],C=["className"],K=["className"],$=function(E,Y){var me=A.useContext(Z);if(!me){var $e=E.component,We=$e===void 0?"div":$e,qe=(0,_e.Z)(E,D);return A.createElement(We,(0,L.Z)({},qe,{ref:Y}))}var Xe=me.className,gt=(0,_e.Z)(me,C),_t=E.className,st=(0,_e.Z)(E,K);return A.createElement(Z.Provider,{value:null},A.createElement(S,(0,L.Z)({ref:Y,className:be()(Xe,_t)},gt,st)))},ve=A.forwardRef($);ve.displayName="RawItem";var Se=ve,Le=["prefixCls","data","renderItem","renderRawItem","itemKey","itemWidth","ssr","style","className","maxCount","renderRest","renderRawRest","suffix","component","itemComponent","onVisibleChange"],ye="responsive",te="invalidate";function j(y){return"+ ".concat(y.length," ...")}function ue(y,E){var Y=y.prefixCls,me=Y===void 0?"rc-overflow":Y,$e=y.data,We=$e===void 0?[]:$e,qe=y.renderItem,Xe=y.renderRawItem,gt=y.itemKey,_t=y.itemWidth,st=_t===void 0?10:_t,Kt=y.ssr,un=y.style,Ot=y.className,Vt=y.maxCount,lt=y.renderRest,At=y.renderRawRest,ne=y.suffix,de=y.component,se=de===void 0?"div":de,W=y.itemComponent,Ie=y.onVisibleChange,M=(0,_e.Z)(y,Le),ce=Kt==="full",q=U(),le=X(q,null),pe=(0,ge.Z)(le,2),De=pe[0],Te=pe[1],ke=De||0,Oe=X(q,new Map),Ne=(0,ge.Z)(Oe,2),nt=Ne[0],Qe=Ne[1],Ze=X(q,0),pt=(0,ge.Z)(Ze,2),vt=pt[0],ct=pt[1],Dt=X(q,0),Ut=(0,ge.Z)(Dt,2),w=Ut[0],I=Ut[1],dt=X(q,0),oe=(0,ge.Z)(dt,2),Pe=oe[0],vn=oe[1],je=(0,A.useState)(null),He=(0,ge.Z)(je,2),tt=He[0],he=He[1],ie=(0,A.useState)(null),xe=(0,ge.Z)(ie,2),Fe=xe[0],V=xe[1],at=A.useMemo(function(){return Fe===null&&ce?Number.MAX_SAFE_INTEGER:Fe||0},[Fe,De]),Ce=(0,A.useState)(!1),It=(0,ge.Z)(Ce,2),Bt=It[0],an=It[1],en="".concat(me,"-item"),Mt=Math.max(vt,w),tn=Vt===ye,Ue=We.length&&tn,bt=Vt===te,wt=Ue||typeof Vt=="number"&&We.length>Vt,Me=(0,A.useMemo)(function(){var Gt=We;return Ue?De===null&&ce?Gt=We:Gt=We.slice(0,Math.min(We.length,ke/st)):typeof Vt=="number"&&(Gt=We.slice(0,Vt)),Gt},[We,st,De,Vt,Ue]),Ae=(0,A.useMemo)(function(){return Ue?We.slice(at+1):We.slice(Me.length)},[We,Me,Ue,at]),ut=(0,A.useCallback)(function(Gt,Je){var rt;return typeof gt=="function"?gt(Gt):(rt=gt&&(Gt==null?void 0:Gt[gt]))!==null&&rt!==void 0?rt:Je},[gt]),ft=(0,A.useCallback)(qe||function(Gt){return Gt},[qe]);function Nt(Gt,Je,rt){Fe===Gt&&(Je===void 0||Je===tt)||(V(Gt),rt||(an(Gt<We.length-1),Ie==null||Ie(Gt)),Je!==void 0&&he(Je))}function Pt(Gt,Je){Te(Je.clientWidth)}function Zt(Gt,Je){Qe(function(rt){var ht=new Map(rt);return Je===null?ht.delete(Gt):ht.set(Gt,Je),ht})}function Ht(Gt,Je){I(Je),ct(w)}function sn(Gt,Je){vn(Je)}function _n(Gt){return nt.get(ut(Me[Gt],Gt))}(0,o.Z)(function(){if(ke&&typeof Mt=="number"&&Me){var Gt=Pe,Je=Me.length,rt=Je-1;if(!Je){Nt(0,null);return}for(var ht=0;ht<Je;ht+=1){var xt=_n(ht);if(ce&&(xt=xt||0),xt===void 0){Nt(ht-1,void 0,!0);break}if(Gt+=xt,rt===0&&Gt<=ke||ht===rt-1&&Gt+_n(rt)<=ke){Nt(rt,null);break}else if(Gt+Mt>ke){Nt(ht-1,Gt-xt-Pe+w);break}}ne&&_n(0)+Pe>ke&&he(null)}},[ke,nt,w,Pe,ut,Me]);var hn=Bt&&!!Ae.length,Lt={};tt!==null&&Ue&&(Lt={position:"absolute",left:tt,top:0});var Ft={prefixCls:en,responsive:Ue,component:W,invalidate:bt},$t=Xe?function(Gt,Je){var rt=ut(Gt,Je);return A.createElement(Z.Provider,{key:rt,value:(0,Q.Z)((0,Q.Z)({},Ft),{},{order:Je,item:Gt,itemKey:rt,registerSize:Zt,display:Je<=at})},Xe(Gt,Je))}:function(Gt,Je){var rt=ut(Gt,Je);return A.createElement(S,(0,L.Z)({},Ft,{order:Je,key:rt,item:Gt,renderItem:ft,itemKey:rt,registerSize:Zt,display:Je<=at}))},Xt={order:hn?at:Number.MAX_SAFE_INTEGER,className:"".concat(en,"-rest"),registerSize:Ht,display:hn},Wt=lt||j,Dn=At?A.createElement(Z.Provider,{value:(0,Q.Z)((0,Q.Z)({},Ft),Xt)},At(Ae)):A.createElement(S,(0,L.Z)({},Ft,Xt),typeof Wt=="function"?Wt(Ae):Wt),pn=A.createElement(se,(0,L.Z)({className:be()(!bt&&me,Ot),style:un,ref:E},M),Me.map($t),wt?Dn:null,ne&&A.createElement(S,(0,L.Z)({},Ft,{responsive:tn,responsiveDisabled:!Ue,order:at,className:"".concat(en,"-suffix"),registerSize:sn,display:!0,style:Lt}),ne));return tn?A.createElement(fe.Z,{onResize:Pt,disabled:!Ue},pn):pn}var R=A.forwardRef(ue);R.displayName="Overflow",R.Item=Se,R.RESPONSIVE=ye,R.INVALIDATE=te;var ee=R,G=ee},29301:function(ln,et,m){"use strict";m.d(et,{Z:function(){return te}});var L=m(72308),Q=m(59301),ge=m(11592),_e=m(48736),A=m(77321),p=m(62853),be=m(76846),fe=m(8654),o=Q.createContext(null);function k(j){var ue=j.children,R=j.onBatchResize,ee=Q.useRef(0),G=Q.useRef([]),y=Q.useContext(o),E=Q.useCallback(function(Y,me,$e){ee.current+=1;var We=ee.current;G.current.push({size:Y,element:me,data:$e}),Promise.resolve().then(function(){We===ee.current&&(R==null||R(G.current),G.current=[])}),y==null||y(Y,me,$e)},[R,y]);return Q.createElement(o.Provider,{value:E},ue)}var N=m(76374),v=new Map;function x(j){j.forEach(function(ue){var R,ee=ue.target;(R=v.get(ee))===null||R===void 0||R.forEach(function(G){return G(ee)})})}var S=new N.Z(x),T=null,z=null;function ae(j,ue){v.has(j)||(v.set(j,new Set),S.observe(j)),v.get(j).add(ue)}function B(j,ue){v.has(j)&&(v.get(j).delete(ue),v.get(j).size||(S.unobserve(j),v.delete(j)))}var U=m(96949),X=m(55090),Z=m(77205),D=m(38793),C=function(j){(0,Z.Z)(R,j);var ue=(0,D.Z)(R);function R(){return(0,U.Z)(this,R),ue.apply(this,arguments)}return(0,X.Z)(R,[{key:"render",value:function(){return this.props.children}}]),R}(Q.Component);function K(j,ue){var R=j.children,ee=j.disabled,G=Q.useRef(null),y=Q.useRef(null),E=Q.useContext(o),Y=typeof R=="function",me=Y?R(G):R,$e=Q.useRef({width:-1,height:-1,offsetWidth:-1,offsetHeight:-1}),We=!Y&&Q.isValidElement(me)&&(0,fe.Yr)(me),qe=We?(0,fe.C4)(me):null,Xe=(0,fe.x1)(qe,G),gt=function(){var un;return(0,be.ZP)(G.current)||(G.current&&(0,p.Z)(G.current)==="object"?(0,be.ZP)((un=G.current)===null||un===void 0?void 0:un.nativeElement):null)||(0,be.ZP)(y.current)};Q.useImperativeHandle(ue,function(){return gt()});var _t=Q.useRef(j);_t.current=j;var st=Q.useCallback(function(Kt){var un=_t.current,Ot=un.onResize,Vt=un.data,lt=Kt.getBoundingClientRect(),At=lt.width,ne=lt.height,de=Kt.offsetWidth,se=Kt.offsetHeight,W=Math.floor(At),Ie=Math.floor(ne);if($e.current.width!==W||$e.current.height!==Ie||$e.current.offsetWidth!==de||$e.current.offsetHeight!==se){var M={width:W,height:Ie,offsetWidth:de,offsetHeight:se};$e.current=M;var ce=de===Math.round(At)?At:de,q=se===Math.round(ne)?ne:se,le=(0,A.Z)((0,A.Z)({},M),{},{offsetWidth:ce,offsetHeight:q});E==null||E(le,Kt,Vt),Ot&&Promise.resolve().then(function(){Ot(le,Kt)})}},[]);return Q.useEffect(function(){var Kt=gt();return Kt&&!ee&&ae(Kt,st),function(){return B(Kt,st)}},[G.current,ee]),Q.createElement(C,{ref:y},We?Q.cloneElement(me,{ref:Xe}):me)}var $=Q.forwardRef(K),ve=$,Se="rc-observer-key";function Le(j,ue){var R=j.children,ee=typeof R=="function"?[R]:(0,ge.Z)(R);return ee.map(function(G,y){var E=(G==null?void 0:G.key)||"".concat(Se,"-").concat(y);return Q.createElement(ve,(0,L.Z)({},j,{key:E,ref:y===0?ue:void 0}),G)})}var ye=Q.forwardRef(Le);ye.Collection=k;var te=ye},17115:function(ln,et,m){"use strict";m.d(et,{ZP:function(){return be}});var L=m(52487),Q=m(59301),ge=m(47273),_e=0,A=(0,ge.Z)();function p(){var fe;return A?(fe=_e,_e+=1):fe="TEST_OR_SSR",fe}function be(fe){var o=Q.useState(),k=(0,L.Z)(o,2),N=k[0],v=k[1];return Q.useEffect(function(){v("rc_select_".concat(p()))},[]),fe||N}},77861:function(ln,et,m){"use strict";m.d(et,{Ac:function(){return Te},Xo:function(){return I},Wx:function(){return oe},ZP:function(){return wt},lk:function(){return Z}});var L=m(72308),Q=m(80702),ge=m(49618),_e=m(77321),A=m(52487),p=m(74416),be=m(62853),fe=m(18929),o=m(48736),k=m(59301),N=m(92310),v=m.n(N),x=m(34280),S=m(49658),T=m(10228),z=m(8654),ae=function(Ae){var ut=Ae.className,ft=Ae.customizeIcon,Nt=Ae.customizeIconProps,Pt=Ae.onMouseDown,Zt=Ae.onClick,Ht=Ae.children,sn;return typeof ft=="function"?sn=ft(Nt):sn=ft,k.createElement("span",{className:ut,onMouseDown:function(hn){hn.preventDefault(),Pt&&Pt(hn)},style:{userSelect:"none",WebkitUserSelect:"none"},unselectable:"on",onClick:Zt,"aria-hidden":!0},sn!==void 0?sn:k.createElement("span",{className:v()(ut.split(/\s+/).map(function(_n){return"".concat(_n,"-icon")}))},Ht))},B=ae;function U(Me,Ae,ut,ft,Nt){var Pt=arguments.length>5&&arguments[5]!==void 0?arguments[5]:!1,Zt=arguments.length>6?arguments[6]:void 0,Ht=arguments.length>7?arguments[7]:void 0,sn=k.useMemo(function(){if((0,be.Z)(ft)==="object")return ft.clearIcon;if(Nt)return Nt},[ft,Nt]),_n=k.useMemo(function(){return!!(!Pt&&ft&&(ut.length||Zt)&&!(Ht==="combobox"&&Zt===""))},[ft,Pt,ut.length,Zt,Ht]);return{allowClear:_n,clearIcon:k.createElement(B,{className:"".concat(Me,"-clear"),onMouseDown:Ae,customizeIcon:sn},"\xD7")}}var X=k.createContext(null);function Z(){return k.useContext(X)}function D(){var Me=arguments.length>0&&arguments[0]!==void 0?arguments[0]:10,Ae=k.useState(!1),ut=(0,A.Z)(Ae,2),ft=ut[0],Nt=ut[1],Pt=k.useRef(null),Zt=function(){window.clearTimeout(Pt.current)};k.useEffect(function(){return Zt},[]);var Ht=function(_n,hn){Zt(),Pt.current=window.setTimeout(function(){Nt(_n),hn&&hn()},Me)};return[ft,Ht,Zt]}function C(){var Me=arguments.length>0&&arguments[0]!==void 0?arguments[0]:250,Ae=k.useRef(null),ut=k.useRef(null);k.useEffect(function(){return function(){window.clearTimeout(ut.current)}},[]);function ft(Nt){(Nt||Ae.current===null)&&(Ae.current=Nt),window.clearTimeout(ut.current),ut.current=window.setTimeout(function(){Ae.current=null},Me)}return[function(){return Ae.current},ft]}function K(Me,Ae,ut,ft){var Nt=k.useRef(null);Nt.current={open:Ae,triggerOpen:ut,customizedTrigger:ft},k.useEffect(function(){function Pt(Zt){var Ht;if(!((Ht=Nt.current)!==null&&Ht!==void 0&&Ht.customizedTrigger)){var sn=Zt.target;sn.shadowRoot&&Zt.composed&&(sn=Zt.composedPath()[0]||sn),Nt.current.open&&Me().filter(function(_n){return _n}).every(function(_n){return!_n.contains(sn)&&_n!==sn})&&Nt.current.triggerOpen(!1)}}return window.addEventListener("mousedown",Pt),function(){return window.removeEventListener("mousedown",Pt)}},[])}var $=m(26112),ve=m(11780),Se=function(Ae,ut){var ft,Nt,Pt=Ae.prefixCls,Zt=Ae.id,Ht=Ae.inputElement,sn=Ae.disabled,_n=Ae.tabIndex,hn=Ae.autoFocus,Lt=Ae.autoComplete,Ft=Ae.editable,$t=Ae.activeDescendantId,Xt=Ae.value,Wt=Ae.maxLength,Dn=Ae.onKeyDown,pn=Ae.onMouseDown,Gt=Ae.onChange,Je=Ae.onPaste,rt=Ae.onCompositionStart,ht=Ae.onCompositionEnd,xt=Ae.open,mt=Ae.attrs,jt=Ht||k.createElement("input",null),Et=jt,Qt=Et.ref,nn=Et.props,on=nn.onKeyDown,In=nn.onChange,wn=nn.onMouseDown,Kn=nn.onCompositionStart,dn=nn.onCompositionEnd,fn=nn.style;return(0,o.Kp)(!("maxLength"in jt.props),"Passing 'maxLength' to input element directly may not work because input in BaseSelect is controlled."),jt=k.cloneElement(jt,(0,_e.Z)((0,_e.Z)((0,_e.Z)({type:"search"},nn),{},{id:Zt,ref:(0,z.sQ)(ut,Qt),disabled:sn,tabIndex:_n,autoComplete:Lt||"off",autoFocus:hn,className:v()("".concat(Pt,"-selection-search-input"),(ft=jt)===null||ft===void 0||(Nt=ft.props)===null||Nt===void 0?void 0:Nt.className),role:"combobox","aria-label":"Search","aria-expanded":xt||!1,"aria-haspopup":"listbox","aria-owns":"".concat(Zt,"_list"),"aria-autocomplete":"list","aria-controls":"".concat(Zt,"_list"),"aria-activedescendant":xt?$t:void 0},mt),{},{value:Ft?Xt:"",maxLength:Wt,readOnly:!Ft,unselectable:Ft?null:"on",style:(0,_e.Z)((0,_e.Z)({},fn),{},{opacity:Ft?null:0}),onKeyDown:function(Zn){Dn(Zn),on&&on(Zn)},onMouseDown:function(Zn){pn(Zn),wn&&wn(Zn)},onChange:function(Zn){Gt(Zn),In&&In(Zn)},onCompositionStart:function(Zn){rt(Zn),Kn&&Kn(Zn)},onCompositionEnd:function(Zn){ht(Zn),dn&&dn(Zn)},onPaste:Je})),jt},Le=k.forwardRef(Se);Le.displayName="Input";var ye=Le;function te(Me){return Array.isArray(Me)?Me:Me!==void 0?[Me]:[]}var j=typeof window!="undefined"&&window.document&&window.document.documentElement,ue=j;function R(Me){return Me!=null}function ee(Me){return!Me&&Me!==0}function G(Me){return["string","number"].includes((0,be.Z)(Me))}function y(Me){var Ae=void 0;return Me&&(G(Me.title)?Ae=Me.title.toString():G(Me.label)&&(Ae=Me.label.toString())),Ae}function E(Me,Ae){ue?k.useLayoutEffect(Me,Ae):k.useEffect(Me,Ae)}function Y(Me){var Ae;return(Ae=Me.key)!==null&&Ae!==void 0?Ae:Me.value}var me=function(Ae){Ae.preventDefault(),Ae.stopPropagation()},$e=function(Ae){var ut=Ae.id,ft=Ae.prefixCls,Nt=Ae.values,Pt=Ae.open,Zt=Ae.searchValue,Ht=Ae.autoClearSearchValue,sn=Ae.inputRef,_n=Ae.placeholder,hn=Ae.disabled,Lt=Ae.mode,Ft=Ae.showSearch,$t=Ae.autoFocus,Xt=Ae.autoComplete,Wt=Ae.activeDescendantId,Dn=Ae.tabIndex,pn=Ae.removeIcon,Gt=Ae.maxTagCount,Je=Ae.maxTagTextLength,rt=Ae.maxTagPlaceholder,ht=rt===void 0?function(Xn){return"+ ".concat(Xn.length," ...")}:rt,xt=Ae.tagRender,mt=Ae.onToggleOpen,jt=Ae.onRemove,Et=Ae.onInputChange,Qt=Ae.onInputPaste,nn=Ae.onInputKeyDown,on=Ae.onInputMouseDown,In=Ae.onInputCompositionStart,wn=Ae.onInputCompositionEnd,Kn=k.useRef(null),dn=(0,k.useState)(0),fn=(0,A.Z)(dn,2),Hn=fn[0],Zn=fn[1],Yn=(0,k.useState)(!1),On=(0,A.Z)(Yn,2),Fn=On[0],jn=On[1],Bn="".concat(ft,"-selection"),Jn=Pt||Lt==="multiple"&&Ht===!1||Lt==="tags"?Zt:"",ur=Lt==="tags"||Lt==="multiple"&&Ht===!1||Ft&&(Pt||Fn);E(function(){Zn(Kn.current.scrollWidth)},[Jn]);function Pn(Xn,sr,ar,Un,tr){return k.createElement("span",{className:v()("".concat(Bn,"-item"),(0,ge.Z)({},"".concat(Bn,"-item-disabled"),ar)),title:y(Xn)},k.createElement("span",{className:"".concat(Bn,"-item-content")},sr),Un&&k.createElement(B,{className:"".concat(Bn,"-item-remove"),onMouseDown:me,onClick:tr,customizeIcon:pn},"\xD7"))}function bn(Xn,sr,ar,Un,tr){var xn=function(Vn){me(Vn),mt(!Pt)};return k.createElement("span",{onMouseDown:xn},xt({label:sr,value:Xn,disabled:ar,closable:Un,onClose:tr}))}function Ge(Xn){var sr=Xn.disabled,ar=Xn.label,Un=Xn.value,tr=!hn&&!sr,xn=ar;if(typeof Je=="number"&&(typeof ar=="string"||typeof ar=="number")){var gn=String(xn);gn.length>Je&&(xn="".concat(gn.slice(0,Je),"..."))}var Vn=function(pr){pr&&pr.stopPropagation(),jt(Xn)};return typeof xt=="function"?bn(Un,xn,sr,tr,Vn):Pn(Xn,xn,sr,tr,Vn)}function mn(Xn){var sr=typeof ht=="function"?ht(Xn):ht;return Pn({title:sr},sr,!1)}var Mn=k.createElement("div",{className:"".concat(Bn,"-search"),style:{width:Hn},onFocus:function(){jn(!0)},onBlur:function(){jn(!1)}},k.createElement(ye,{ref:sn,open:Pt,prefixCls:ft,id:ut,inputElement:null,disabled:hn,autoFocus:$t,autoComplete:Xt,editable:ur,activeDescendantId:Wt,value:Jn,onKeyDown:nn,onMouseDown:on,onChange:Et,onPaste:Qt,onCompositionStart:In,onCompositionEnd:wn,tabIndex:Dn,attrs:(0,$.Z)(Ae,!0)}),k.createElement("span",{ref:Kn,className:"".concat(Bn,"-search-mirror"),"aria-hidden":!0},Jn,"\xA0")),Tn=k.createElement(ve.Z,{prefixCls:"".concat(Bn,"-overflow"),data:Nt,renderItem:Ge,renderRest:mn,suffix:Mn,itemKey:Y,maxCount:Gt});return k.createElement(k.Fragment,null,Tn,!Nt.length&&!Jn&&k.createElement("span",{className:"".concat(Bn,"-placeholder")},_n))},We=$e,qe=function(Ae){var ut=Ae.inputElement,ft=Ae.prefixCls,Nt=Ae.id,Pt=Ae.inputRef,Zt=Ae.disabled,Ht=Ae.autoFocus,sn=Ae.autoComplete,_n=Ae.activeDescendantId,hn=Ae.mode,Lt=Ae.open,Ft=Ae.values,$t=Ae.placeholder,Xt=Ae.tabIndex,Wt=Ae.showSearch,Dn=Ae.searchValue,pn=Ae.activeValue,Gt=Ae.maxLength,Je=Ae.onInputKeyDown,rt=Ae.onInputMouseDown,ht=Ae.onInputChange,xt=Ae.onInputPaste,mt=Ae.onInputCompositionStart,jt=Ae.onInputCompositionEnd,Et=Ae.title,Qt=k.useState(!1),nn=(0,A.Z)(Qt,2),on=nn[0],In=nn[1],wn=hn==="combobox",Kn=wn||Wt,dn=Ft[0],fn=Dn||"";wn&&pn&&!on&&(fn=pn),k.useEffect(function(){wn&&In(!1)},[wn,pn]);var Hn=hn!=="combobox"&&!Lt&&!Wt?!1:!!fn,Zn=Et===void 0?y(dn):Et,Yn=function(){if(dn)return null;var Fn=Hn?{visibility:"hidden"}:void 0;return k.createElement("span",{className:"".concat(ft,"-selection-placeholder"),style:Fn},$t)};return k.createElement(k.Fragment,null,k.createElement("span",{className:"".concat(ft,"-selection-search")},k.createElement(ye,{ref:Pt,prefixCls:ft,id:Nt,open:Lt,inputElement:ut,disabled:Zt,autoFocus:Ht,autoComplete:sn,editable:Kn,activeDescendantId:_n,value:fn,onKeyDown:Je,onMouseDown:rt,onChange:function(Fn){In(!0),ht(Fn)},onPaste:xt,onCompositionStart:mt,onCompositionEnd:jt,tabIndex:Xt,attrs:(0,$.Z)(Ae,!0),maxLength:wn?Gt:void 0})),!wn&&dn?k.createElement("span",{className:"".concat(ft,"-selection-item"),title:Zn,style:Hn?{visibility:"hidden"}:void 0},dn.label):null,Yn())},Xe=qe;function gt(Me){return![T.Z.ESC,T.Z.SHIFT,T.Z.BACKSPACE,T.Z.TAB,T.Z.WIN_KEY,T.Z.ALT,T.Z.META,T.Z.WIN_KEY_RIGHT,T.Z.CTRL,T.Z.SEMICOLON,T.Z.EQUALS,T.Z.CAPS_LOCK,T.Z.CONTEXT_MENU,T.Z.F1,T.Z.F2,T.Z.F3,T.Z.F4,T.Z.F5,T.Z.F6,T.Z.F7,T.Z.F8,T.Z.F9,T.Z.F10,T.Z.F11,T.Z.F12].includes(Me)}var _t=function(Ae,ut){var ft=(0,k.useRef)(null),Nt=(0,k.useRef)(!1),Pt=Ae.prefixCls,Zt=Ae.open,Ht=Ae.mode,sn=Ae.showSearch,_n=Ae.tokenWithEnter,hn=Ae.autoClearSearchValue,Lt=Ae.onSearch,Ft=Ae.onSearchSubmit,$t=Ae.onToggleOpen,Xt=Ae.onInputKeyDown,Wt=Ae.domRef;k.useImperativeHandle(ut,function(){return{focus:function(){ft.current.focus()},blur:function(){ft.current.blur()}}});var Dn=C(0),pn=(0,A.Z)(Dn,2),Gt=pn[0],Je=pn[1],rt=function(fn){var Hn=fn.which;(Hn===T.Z.UP||Hn===T.Z.DOWN)&&fn.preventDefault(),Xt&&Xt(fn),Hn===T.Z.ENTER&&Ht==="tags"&&!Nt.current&&!Zt&&(Ft==null||Ft(fn.target.value)),gt(Hn)&&$t(!0)},ht=function(){Je(!0)},xt=(0,k.useRef)(null),mt=function(fn){Lt(fn,!0,Nt.current)!==!1&&$t(!0)},jt=function(){Nt.current=!0},Et=function(fn){Nt.current=!1,Ht!=="combobox"&&mt(fn.target.value)},Qt=function(fn){var Hn=fn.target.value;if(_n&&xt.current&&/[\r\n]/.test(xt.current)){var Zn=xt.current.replace(/[\r\n]+$/,"").replace(/\r\n/g," ").replace(/[\r\n]/g," ");Hn=Hn.replace(Zn,xt.current)}xt.current=null,mt(Hn)},nn=function(fn){var Hn=fn.clipboardData,Zn=Hn.getData("text");xt.current=Zn},on=function(fn){var Hn=fn.target;if(Hn!==ft.current){var Zn=document.body.style.msTouchAction!==void 0;Zn?setTimeout(function(){ft.current.focus()}):ft.current.focus()}},In=function(fn){var Hn=Gt();fn.target!==ft.current&&!Hn&&Ht!=="combobox"&&fn.preventDefault(),(Ht!=="combobox"&&(!sn||!Hn)||!Zt)&&(Zt&&hn!==!1&&Lt("",!0,!1),$t())},wn={inputRef:ft,onInputKeyDown:rt,onInputMouseDown:ht,onInputChange:Qt,onInputPaste:nn,onInputCompositionStart:jt,onInputCompositionEnd:Et},Kn=Ht==="multiple"||Ht==="tags"?k.createElement(We,(0,L.Z)({},Ae,wn)):k.createElement(Xe,(0,L.Z)({},Ae,wn));return k.createElement("div",{ref:Wt,className:"".concat(Pt,"-selector"),onClick:on,onMouseDown:In},Kn)},st=k.forwardRef(_t);st.displayName="Selector";var Kt=st,un=m(35593),Ot=["prefixCls","disabled","visible","children","popupElement","animation","transitionName","dropdownStyle","dropdownClassName","direction","placement","builtinPlacements","dropdownMatchSelectWidth","dropdownRender","dropdownAlign","getPopupContainer","empty","getTriggerDOMNode","onPopupVisibleChange","onPopupMouseEnter"],Vt=function(Ae){var ut=Ae===!0?0:1;return{bottomLeft:{points:["tl","bl"],offset:[0,4],overflow:{adjustX:ut,adjustY:1},htmlRegion:"scroll"},bottomRight:{points:["tr","br"],offset:[0,4],overflow:{adjustX:ut,adjustY:1},htmlRegion:"scroll"},topLeft:{points:["bl","tl"],offset:[0,-4],overflow:{adjustX:ut,adjustY:1},htmlRegion:"scroll"},topRight:{points:["br","tr"],offset:[0,-4],overflow:{adjustX:ut,adjustY:1},htmlRegion:"scroll"}}},lt=function(Ae,ut){var ft=Ae.prefixCls,Nt=Ae.disabled,Pt=Ae.visible,Zt=Ae.children,Ht=Ae.popupElement,sn=Ae.animation,_n=Ae.transitionName,hn=Ae.dropdownStyle,Lt=Ae.dropdownClassName,Ft=Ae.direction,$t=Ft===void 0?"ltr":Ft,Xt=Ae.placement,Wt=Ae.builtinPlacements,Dn=Ae.dropdownMatchSelectWidth,pn=Ae.dropdownRender,Gt=Ae.dropdownAlign,Je=Ae.getPopupContainer,rt=Ae.empty,ht=Ae.getTriggerDOMNode,xt=Ae.onPopupVisibleChange,mt=Ae.onPopupMouseEnter,jt=(0,p.Z)(Ae,Ot),Et="".concat(ft,"-dropdown"),Qt=Ht;pn&&(Qt=pn(Ht));var nn=k.useMemo(function(){return Wt||Vt(Dn)},[Wt,Dn]),on=sn?"".concat(Et,"-").concat(sn):_n,In=typeof Dn=="number",wn=k.useMemo(function(){return In?null:Dn===!1?"minWidth":"width"},[Dn,In]),Kn=hn;In&&(Kn=(0,_e.Z)((0,_e.Z)({},Kn),{},{width:Dn}));var dn=k.useRef(null);return k.useImperativeHandle(ut,function(){return{getPopupElement:function(){return dn.current}}}),k.createElement(un.Z,(0,L.Z)({},jt,{showAction:xt?["click"]:[],hideAction:xt?["click"]:[],popupPlacement:Xt||($t==="rtl"?"bottomRight":"bottomLeft"),builtinPlacements:nn,prefixCls:Et,popupTransitionName:on,popup:k.createElement("div",{ref:dn,onMouseEnter:mt},Qt),stretch:wn,popupAlign:Gt,popupVisible:Pt,getPopupContainer:Je,popupClassName:v()(Lt,(0,ge.Z)({},"".concat(Et,"-empty"),rt)),popupStyle:Kn,getTriggerDOMNode:ht,onPopupVisibleChange:xt}),Zt)},At=k.forwardRef(lt);At.displayName="SelectTrigger";var ne=At,de=m(68413);function se(Me,Ae){var ut=Me.key,ft;return"value"in Me&&(ft=Me.value),ut!=null?ut:ft!==void 0?ft:"rc-index-key-".concat(Ae)}function W(Me,Ae){var ut=Me||{},ft=ut.label,Nt=ut.value,Pt=ut.options,Zt=ut.groupLabel,Ht=ft||(Ae?"children":"label");return{label:Ht,value:Nt||"value",options:Pt||"options",groupLabel:Zt||Ht}}function Ie(Me){var Ae=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},ut=Ae.fieldNames,ft=Ae.childrenAsData,Nt=[],Pt=W(ut,!1),Zt=Pt.label,Ht=Pt.value,sn=Pt.options,_n=Pt.groupLabel;function hn(Lt,Ft){Lt.forEach(function($t){if(Ft||!(sn in $t)){var Xt=$t[Ht];Nt.push({key:se($t,Nt.length),groupOption:Ft,data:$t,label:$t[Zt],value:Xt})}else{var Wt=$t[_n];Wt===void 0&&ft&&(Wt=$t.label),Nt.push({key:se($t,Nt.length),group:!0,data:$t,label:Wt}),hn($t[sn],!0)}})}return hn(Me,!1),Nt}function M(Me){var Ae=(0,_e.Z)({},Me);return"props"in Ae||Object.defineProperty(Ae,"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`."),Ae}}),Ae}function ce(Me,Ae){if(!Ae||!Ae.length)return null;var ut=!1;function ft(Pt,Zt){var Ht=(0,de.Z)(Zt),sn=Ht[0],_n=Ht.slice(1);if(!sn)return[Pt];var hn=Pt.split(sn);return ut=ut||hn.length>1,hn.reduce(function(Lt,Ft){return[].concat((0,Q.Z)(Lt),(0,Q.Z)(ft(Ft,_n)))},[]).filter(function(Lt){return Lt})}var Nt=ft(Me,Ae);return ut?Nt:null}var q=["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","suffixIcon","clearIcon","OptionList","animation","transitionName","dropdownStyle","dropdownClassName","dropdownMatchSelectWidth","dropdownRender","dropdownAlign","placement","builtinPlacements","getPopupContainer","showAction","onFocus","onBlur","onKeyUp","onKeyDown","onMouseDown"],le=["value","onChange","removeIcon","placeholder","autoFocus","maxTagCount","maxTagTextLength","maxTagPlaceholder","choiceTransitionName","onInputKeyDown","onPopupScroll","tabIndex"];function pe(Me){return Me==="tags"||Me==="multiple"}var De=k.forwardRef(function(Me,Ae){var ut,ft,Nt=Me.id,Pt=Me.prefixCls,Zt=Me.className,Ht=Me.showSearch,sn=Me.tagRender,_n=Me.direction,hn=Me.omitDomProps,Lt=Me.displayValues,Ft=Me.onDisplayValuesChange,$t=Me.emptyOptions,Xt=Me.notFoundContent,Wt=Xt===void 0?"Not Found":Xt,Dn=Me.onClear,pn=Me.mode,Gt=Me.disabled,Je=Me.loading,rt=Me.getInputElement,ht=Me.getRawInputElement,xt=Me.open,mt=Me.defaultOpen,jt=Me.onDropdownVisibleChange,Et=Me.activeValue,Qt=Me.onActiveValueChange,nn=Me.activeDescendantId,on=Me.searchValue,In=Me.autoClearSearchValue,wn=Me.onSearch,Kn=Me.onSearchSplit,dn=Me.tokenSeparators,fn=Me.allowClear,Hn=Me.suffixIcon,Zn=Me.clearIcon,Yn=Me.OptionList,On=Me.animation,Fn=Me.transitionName,jn=Me.dropdownStyle,Bn=Me.dropdownClassName,Jn=Me.dropdownMatchSelectWidth,ur=Me.dropdownRender,Pn=Me.dropdownAlign,bn=Me.placement,Ge=Me.builtinPlacements,mn=Me.getPopupContainer,Mn=Me.showAction,Tn=Mn===void 0?[]:Mn,Xn=Me.onFocus,sr=Me.onBlur,ar=Me.onKeyUp,Un=Me.onKeyDown,tr=Me.onMouseDown,xn=(0,p.Z)(Me,q),gn=pe(pn),Vn=(Ht!==void 0?Ht:gn)||pn==="combobox",nr=(0,_e.Z)({},xn);le.forEach(function(Ir){delete nr[Ir]}),hn==null||hn.forEach(function(Ir){delete nr[Ir]});var pr=k.useState(!1),Mr=(0,A.Z)(pr,2),Cn=Mr[0],Sr=Mr[1];k.useEffect(function(){Sr((0,S.Z)())},[]);var mr=k.useRef(null),_r=k.useRef(null),zr=k.useRef(null),Or=k.useRef(null),wr=k.useRef(null),Nr=D(),vr=(0,A.Z)(Nr,3),ei=vr[0],qn=vr[1],oi=vr[2];k.useImperativeHandle(Ae,function(){var Ir,br;return{focus:(Ir=Or.current)===null||Ir===void 0?void 0:Ir.focus,blur:(br=Or.current)===null||br===void 0?void 0:br.blur,scrollTo:function(bi){var Qr;return(Qr=wr.current)===null||Qr===void 0?void 0:Qr.scrollTo(bi)}}});var Xr=k.useMemo(function(){var Ir;if(pn!=="combobox")return on;var br=(Ir=Lt[0])===null||Ir===void 0?void 0:Ir.value;return typeof br=="string"||typeof br=="number"?String(br):""},[on,pn,Lt]),ti=pn==="combobox"&&typeof rt=="function"&&rt()||null,cr=typeof ht=="function"&&ht(),fi=(0,z.x1)(_r,cr==null||(ut=cr.props)===null||ut===void 0?void 0:ut.ref),xi=k.useState(!1),vi=(0,A.Z)(xi,2),or=vi[0],yi=vi[1];(0,x.Z)(function(){yi(!0)},[]);var Er=(0,fe.Z)(!1,{defaultValue:mt,value:xt}),qt=(0,A.Z)(Er,2),dr=qt[0],Tr=qt[1],Nn=or?dr:!1,kn=!Wt&&$t;(Gt||kn&&Nn&&pn==="combobox")&&(Nn=!1);var Sn=kn?!1:Nn,En=k.useCallback(function(Ir){var br=Ir!==void 0?Ir:!Nn;Gt||(Tr(br),Nn!==br&&(jt==null||jt(br)))},[Gt,Nn,Tr,jt]),Qn=k.useMemo(function(){return(dn||[]).some(function(Ir){return[`
`,`\r
`].includes(Ir)})},[dn]),gr=function(br,hi,bi){var Qr=!0,ii=br;Qt==null||Qt(null);var Ei=bi?null:ce(br,dn);return pn!=="combobox"&&Ei&&(ii="",Kn==null||Kn(Ei),En(!1),Qr=!1),wn&&Xr!==ii&&wn(ii,{source:hi?"typing":"effect"}),Qr},Kr=function(br){!br||!br.trim()||wn(br,{source:"submit"})};k.useEffect(function(){!Nn&&!gn&&pn!=="combobox"&&gr("",!1,!1)},[Nn]),k.useEffect(function(){dr&&Gt&&Tr(!1),Gt&&qn(!1)},[Gt]);var Pr=C(),Rr=(0,A.Z)(Pr,2),rr=Rr[0],Br=Rr[1],ni=function(br){var hi=rr(),bi=br.which;if(bi===T.Z.ENTER&&(pn!=="combobox"&&br.preventDefault(),Nn||En(!0)),Br(!!Xr),bi===T.Z.BACKSPACE&&!hi&&gn&&!Xr&&Lt.length){for(var Qr=(0,Q.Z)(Lt),ii=null,Ei=Qr.length-1;Ei>=0;Ei-=1){var Ii=Qr[Ei];if(!Ii.disabled){Qr.splice(Ei,1),ii=Ii;break}}ii&&Ft(Qr,{type:"remove",values:[ii]})}for(var wi=arguments.length,Gi=new Array(wi>1?wi-1:0),Bi=1;Bi<wi;Bi++)Gi[Bi-1]=arguments[Bi];if(Nn&&wr.current){var hs;(hs=wr.current).onKeyDown.apply(hs,[br].concat(Gi))}Un==null||Un.apply(void 0,[br].concat(Gi))},ci=function(br){for(var hi=arguments.length,bi=new Array(hi>1?hi-1:0),Qr=1;Qr<hi;Qr++)bi[Qr-1]=arguments[Qr];if(Nn&&wr.current){var ii;(ii=wr.current).onKeyUp.apply(ii,[br].concat(bi))}ar==null||ar.apply(void 0,[br].concat(bi))},Ni=function(br){var hi=Lt.filter(function(bi){return bi!==br});Ft(hi,{type:"remove",values:[br]})},_i=k.useRef(!1),Wn=function(){qn(!0),Gt||(Xn&&!_i.current&&Xn.apply(void 0,arguments),Tn.includes("focus")&&En(!0)),_i.current=!0},ir=function(){qn(!1,function(){_i.current=!1,En(!1)}),!Gt&&(Xr&&(pn==="tags"?wn(Xr,{source:"submit"}):pn==="multiple"&&wn("",{source:"blur"})),sr&&sr.apply(void 0,arguments))},$r=[];k.useEffect(function(){return function(){$r.forEach(function(Ir){return clearTimeout(Ir)}),$r.splice(0,$r.length)}},[]);var ri=function(br){var hi,bi=br.target,Qr=(hi=zr.current)===null||hi===void 0?void 0:hi.getPopupElement();if(Qr&&Qr.contains(bi)){var ii=setTimeout(function(){var Gi=$r.indexOf(ii);if(Gi!==-1&&$r.splice(Gi,1),oi(),!Cn&&!Qr.contains(document.activeElement)){var Bi;(Bi=Or.current)===null||Bi===void 0||Bi.focus()}});$r.push(ii)}for(var Ei=arguments.length,Ii=new Array(Ei>1?Ei-1:0),wi=1;wi<Ei;wi++)Ii[wi-1]=arguments[wi];tr==null||tr.apply(void 0,[br].concat(Ii))},Ur=k.useState({}),Ri=(0,A.Z)(Ur,2),Fi=Ri[1];function Li(){Fi({})}var Di;cr&&(Di=function(br){En(br)}),K(function(){var Ir;return[mr.current,(Ir=zr.current)===null||Ir===void 0?void 0:Ir.getPopupElement()]},Sn,En,!!cr);var is=k.useMemo(function(){return(0,_e.Z)((0,_e.Z)({},Me),{},{notFoundContent:Wt,open:Nn,triggerOpen:Sn,id:Nt,showSearch:Vn,multiple:gn,toggleOpen:En})},[Me,Wt,Sn,Nn,Nt,Vn,gn,En]),ss=!!Hn||Je,cs;ss&&(cs=k.createElement(B,{className:v()("".concat(Pt,"-arrow"),(0,ge.Z)({},"".concat(Pt,"-arrow-loading"),Je)),customizeIcon:Hn,customizeIconProps:{loading:Je,searchValue:Xr,open:Nn,focused:ei,showSearch:Vn}}));var Wi=function(){var br;Dn==null||Dn(),(br=Or.current)===null||br===void 0||br.focus(),Ft([],{type:"clear",values:Lt}),gr("",!1,!1)},ds=U(Pt,Wi,Lt,fn,Zn,Gt,Xr,pn),di=ds.allowClear,Si=ds.clearIcon,fs=k.createElement(Yn,{ref:wr}),Qi=v()(Pt,Zt,(ft={},(0,ge.Z)(ft,"".concat(Pt,"-focused"),ei),(0,ge.Z)(ft,"".concat(Pt,"-multiple"),gn),(0,ge.Z)(ft,"".concat(Pt,"-single"),!gn),(0,ge.Z)(ft,"".concat(Pt,"-allow-clear"),fn),(0,ge.Z)(ft,"".concat(Pt,"-show-arrow"),ss),(0,ge.Z)(ft,"".concat(Pt,"-disabled"),Gt),(0,ge.Z)(ft,"".concat(Pt,"-loading"),Je),(0,ge.Z)(ft,"".concat(Pt,"-open"),Nn),(0,ge.Z)(ft,"".concat(Pt,"-customize-input"),ti),(0,ge.Z)(ft,"".concat(Pt,"-show-search"),Vn),ft)),Ji=k.createElement(ne,{ref:zr,disabled:Gt,prefixCls:Pt,visible:Sn,popupElement:fs,animation:On,transitionName:Fn,dropdownStyle:jn,dropdownClassName:Bn,direction:_n,dropdownMatchSelectWidth:Jn,dropdownRender:ur,dropdownAlign:Pn,placement:bn,builtinPlacements:Ge,getPopupContainer:mn,empty:$t,getTriggerDOMNode:function(){return _r.current},onPopupVisibleChange:Di,onPopupMouseEnter:Li},cr?k.cloneElement(cr,{ref:fi}):k.createElement(Kt,(0,L.Z)({},Me,{domRef:_r,prefixCls:Pt,inputElement:ti,ref:Or,id:Nt,showSearch:Vn,autoClearSearchValue:In,mode:pn,activeDescendantId:nn,tagRender:sn,values:Lt,open:Nn,onToggleOpen:En,activeValue:Et,searchValue:Xr,onSearch:gr,onSearchSubmit:Kr,onRemove:Ni,tokenWithEnter:Qn}))),Hi;return cr?Hi=Ji:Hi=k.createElement("div",(0,L.Z)({className:Qi},nr,{ref:mr,onMouseDown:ri,onKeyDown:ni,onKeyUp:ci,onFocus:Wn,onBlur:ir}),ei&&!Nn&&k.createElement("span",{style:{width:0,height:0,position:"absolute",overflow:"hidden",opacity:0},"aria-live":"polite"},"".concat(Lt.map(function(Ir){var br=Ir.label,hi=Ir.value;return["number","string"].includes((0,be.Z)(br))?br:hi}).join(", "))),Ji,cs,di&&Si),k.createElement(X.Provider,{value:is},Hi)}),Te=De,ke=function(Me,Ae){var ut=k.useRef({values:new Map,options:new Map}),ft=k.useMemo(function(){var Pt=ut.current,Zt=Pt.values,Ht=Pt.options,sn=Me.map(function(Lt){if(Lt.label===void 0){var Ft;return(0,_e.Z)((0,_e.Z)({},Lt),{},{label:(Ft=Zt.get(Lt.value))===null||Ft===void 0?void 0:Ft.label})}return Lt}),_n=new Map,hn=new Map;return sn.forEach(function(Lt){_n.set(Lt.value,Lt),hn.set(Lt.value,Ae.get(Lt.value)||Ht.get(Lt.value))}),ut.current.values=_n,ut.current.options=hn,sn},[Me,Ae]),Nt=k.useCallback(function(Pt){return Ae.get(Pt)||ut.current.options.get(Pt)},[Ae]);return[ft,Nt]};function Oe(Me,Ae){return te(Me).join("").toUpperCase().includes(Ae)}var Ne=function(Me,Ae,ut,ft,Nt){return k.useMemo(function(){if(!ut||ft===!1)return Me;var Pt=Ae.options,Zt=Ae.label,Ht=Ae.value,sn=[],_n=typeof ft=="function",hn=ut.toUpperCase(),Lt=_n?ft:function($t,Xt){return Nt?Oe(Xt[Nt],hn):Xt[Pt]?Oe(Xt[Zt!=="children"?Zt:"label"],hn):Oe(Xt[Ht],hn)},Ft=_n?function($t){return M($t)}:function($t){return $t};return Me.forEach(function($t){if($t[Pt]){var Xt=Lt(ut,Ft($t));if(Xt)sn.push($t);else{var Wt=$t[Pt].filter(function(Dn){return Lt(ut,Ft(Dn))});Wt.length&&sn.push((0,_e.Z)((0,_e.Z)({},$t),{},(0,ge.Z)({},Pt,Wt)))}return}Lt(ut,Ft($t))&&sn.push($t)}),sn},[Me,ft,Nt,ut,Ae])},nt=m(17115),Qe=m(11592),Ze=["children","value"],pt=["children"];function vt(Me){var Ae=Me,ut=Ae.key,ft=Ae.props,Nt=ft.children,Pt=ft.value,Zt=(0,p.Z)(ft,Ze);return(0,_e.Z)({key:ut,value:Pt!==void 0?Pt:ut,children:Nt},Zt)}function ct(Me){var Ae=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;return(0,Qe.Z)(Me).map(function(ut,ft){if(!k.isValidElement(ut)||!ut.type)return null;var Nt=ut,Pt=Nt.type.isSelectOptGroup,Zt=Nt.key,Ht=Nt.props,sn=Ht.children,_n=(0,p.Z)(Ht,pt);return Ae||!Pt?vt(ut):(0,_e.Z)((0,_e.Z)({key:"__RC_SELECT_GRP__".concat(Zt===null?ft:Zt,"__"),label:Zt},_n),{},{options:ct(sn)})}).filter(function(ut){return ut})}function Dt(Me,Ae,ut,ft,Nt){return k.useMemo(function(){var Pt=Me,Zt=!Me;Zt&&(Pt=ct(Ae));var Ht=new Map,sn=new Map,_n=function(Ft,$t,Xt){Xt&&typeof Xt=="string"&&Ft.set($t[Xt],$t)};function hn(Lt){for(var Ft=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,$t=0;$t<Lt.length;$t+=1){var Xt=Lt[$t];!Xt[ut.options]||Ft?(Ht.set(Xt[ut.value],Xt),_n(sn,Xt,ut.label),_n(sn,Xt,ft),_n(sn,Xt,Nt)):hn(Xt[ut.options],!0)}}return hn(Pt),{options:Pt,valueOptions:Ht,labelOptions:sn}},[Me,Ae,ut,ft,Nt])}function Ut(Me){var Ae=k.useRef();Ae.current=Me;var ut=k.useCallback(function(){return Ae.current.apply(Ae,arguments)},[]);return ut}var w=function(){return null};w.isSelectOptGroup=!0;var I=w,dt=function(){return null};dt.isSelectOption=!0;var oe=dt,Pe=m(80547),vn=m(2738),je=m(45680),He=k.createContext(null),tt=He;function he(){return/(mac\sos|macintosh)/i.test(navigator.appVersion)}var ie=["disabled","title","children","style","className"];function xe(Me){return typeof Me=="string"||typeof Me=="number"}var Fe=function(Ae,ut){var ft=Z(),Nt=ft.prefixCls,Pt=ft.id,Zt=ft.open,Ht=ft.multiple,sn=ft.mode,_n=ft.searchValue,hn=ft.toggleOpen,Lt=ft.notFoundContent,Ft=ft.onPopupScroll,$t=k.useContext(tt),Xt=$t.flattenOptions,Wt=$t.onActiveValue,Dn=$t.defaultActiveFirstOption,pn=$t.onSelect,Gt=$t.menuItemSelectedIcon,Je=$t.rawValues,rt=$t.fieldNames,ht=$t.virtual,xt=$t.direction,mt=$t.listHeight,jt=$t.listItemHeight,Et="".concat(Nt,"-item"),Qt=(0,Pe.Z)(function(){return Xt},[Zt,Xt],function(Pn,bn){return bn[0]&&Pn[1]!==bn[1]}),nn=k.useRef(null),on=function(bn){bn.preventDefault()},In=function(bn){nn.current&&nn.current.scrollTo(typeof bn=="number"?{index:bn}:bn)},wn=function(bn){for(var Ge=arguments.length>1&&arguments[1]!==void 0?arguments[1]:1,mn=Qt.length,Mn=0;Mn<mn;Mn+=1){var Tn=(bn+Mn*Ge+mn)%mn,Xn=Qt[Tn],sr=Xn.group,ar=Xn.data;if(!sr&&!ar.disabled)return Tn}return-1},Kn=k.useState(function(){return wn(0)}),dn=(0,A.Z)(Kn,2),fn=dn[0],Hn=dn[1],Zn=function(bn){var Ge=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;Hn(bn);var mn={source:Ge?"keyboard":"mouse"},Mn=Qt[bn];if(!Mn){Wt(null,-1,mn);return}Wt(Mn.value,bn,mn)};(0,k.useEffect)(function(){Zn(Dn!==!1?wn(0):-1)},[Qt.length,_n]);var Yn=k.useCallback(function(Pn){return Je.has(Pn)&&sn!=="combobox"},[sn,(0,Q.Z)(Je).toString(),Je.size]);(0,k.useEffect)(function(){var Pn=setTimeout(function(){if(!Ht&&Zt&&Je.size===1){var Ge=Array.from(Je)[0],mn=Qt.findIndex(function(Mn){var Tn=Mn.data;return Tn.value===Ge});mn!==-1&&(Zn(mn),In(mn))}});if(Zt){var bn;(bn=nn.current)===null||bn===void 0||bn.scrollTo(void 0)}return function(){return clearTimeout(Pn)}},[Zt,_n,Xt.length]);var On=function(bn){bn!==void 0&&pn(bn,{selected:!Je.has(bn)}),Ht||hn(!1)};if(k.useImperativeHandle(ut,function(){return{onKeyDown:function(bn){var Ge=bn.which,mn=bn.ctrlKey;switch(Ge){case T.Z.N:case T.Z.P:case T.Z.UP:case T.Z.DOWN:{var Mn=0;if(Ge===T.Z.UP?Mn=-1:Ge===T.Z.DOWN?Mn=1:he()&&mn&&(Ge===T.Z.N?Mn=1:Ge===T.Z.P&&(Mn=-1)),Mn!==0){var Tn=wn(fn+Mn,Mn);In(Tn),Zn(Tn,!0)}break}case T.Z.ENTER:{var Xn=Qt[fn];Xn&&!Xn.data.disabled?On(Xn.value):On(void 0),Zt&&bn.preventDefault();break}case T.Z.ESC:hn(!1),Zt&&bn.stopPropagation()}},onKeyUp:function(){},scrollTo:function(bn){In(bn)}}}),Qt.length===0)return k.createElement("div",{role:"listbox",id:"".concat(Pt,"_list"),className:"".concat(Et,"-empty"),onMouseDown:on},Lt);var Fn=Object.keys(rt).map(function(Pn){return rt[Pn]}),jn=function(bn){return bn.label};function Bn(Pn,bn){var Ge=Pn.group;return{role:Ge?"presentation":"option",id:"".concat(Pt,"_list_").concat(bn)}}var Jn=function(bn){var Ge=Qt[bn];if(!Ge)return null;var mn=Ge.data||{},Mn=mn.value,Tn=Ge.group,Xn=(0,$.Z)(mn,!0),sr=jn(Ge);return Ge?k.createElement("div",(0,L.Z)({"aria-label":typeof sr=="string"&&!Tn?sr:null},Xn,{key:bn},Bn(Ge,bn),{"aria-selected":Yn(Mn)}),Mn):null},ur={role:"listbox",id:"".concat(Pt,"_list")};return k.createElement(k.Fragment,null,ht&&k.createElement("div",(0,L.Z)({},ur,{style:{height:0,width:0,overflow:"hidden"}}),Jn(fn-1),Jn(fn),Jn(fn+1)),k.createElement(je.Z,{itemKey:"key",ref:nn,data:Qt,height:mt,itemHeight:jt,fullHeight:!1,onMouseDown:on,onScroll:Ft,virtual:ht,direction:xt,innerProps:ht?null:ur},function(Pn,bn){var Ge,mn=Pn.group,Mn=Pn.groupOption,Tn=Pn.data,Xn=Pn.label,sr=Pn.value,ar=Tn.key;if(mn){var Un,tr=(Un=Tn.title)!==null&&Un!==void 0?Un:xe(Xn)?Xn.toString():void 0;return k.createElement("div",{className:v()(Et,"".concat(Et,"-group")),title:tr},Xn!==void 0?Xn:ar)}var xn=Tn.disabled,gn=Tn.title,Vn=Tn.children,nr=Tn.style,pr=Tn.className,Mr=(0,p.Z)(Tn,ie),Cn=(0,vn.Z)(Mr,Fn),Sr=Yn(sr),mr="".concat(Et,"-option"),_r=v()(Et,mr,pr,(Ge={},(0,ge.Z)(Ge,"".concat(mr,"-grouped"),Mn),(0,ge.Z)(Ge,"".concat(mr,"-active"),fn===bn&&!xn),(0,ge.Z)(Ge,"".concat(mr,"-disabled"),xn),(0,ge.Z)(Ge,"".concat(mr,"-selected"),Sr),Ge)),zr=jn(Pn),Or=!Gt||typeof Gt=="function"||Sr,wr=typeof zr=="number"?zr:zr||sr,Nr=xe(wr)?wr.toString():void 0;return gn!==void 0&&(Nr=gn),k.createElement("div",(0,L.Z)({},(0,$.Z)(Cn),ht?{}:Bn(Pn,bn),{"aria-selected":Sr,className:_r,title:Nr,onMouseMove:function(){fn===bn||xn||Zn(bn)},onClick:function(){xn||On(sr)},style:nr}),k.createElement("div",{className:"".concat(mr,"-content")},wr),k.isValidElement(Gt)||Sr,Or&&k.createElement(B,{className:"".concat(Et,"-option-state"),customizeIcon:Gt,customizeIconProps:{isSelected:Sr}},Sr?"\u2713":null))}))},V=k.forwardRef(Fe);V.displayName="OptionList";var at=V;function Ce(Me){var Ae=Me.mode,ut=Me.options,ft=Me.children,Nt=Me.backfill,Pt=Me.allowClear,Zt=Me.placeholder,Ht=Me.getInputElement,sn=Me.showSearch,_n=Me.onSearch,hn=Me.defaultOpen,Lt=Me.autoFocus,Ft=Me.labelInValue,$t=Me.value,Xt=Me.inputValue,Wt=Me.optionLabelProp,Dn=isMultiple(Ae),pn=sn!==void 0?sn:Dn||Ae==="combobox",Gt=ut||convertChildrenToData(ft);if(warning(Ae!=="tags"||Gt.every(function(xt){return!xt.disabled}),"Please avoid setting option to disabled in tags mode since user can always type text as tag."),Ae==="tags"||Ae==="combobox"){var Je=Gt.some(function(xt){return xt.options?xt.options.some(function(mt){return typeof("value"in mt?mt.value:mt.key)=="number"}):typeof("value"in xt?xt.value:xt.key)=="number"});warning(!Je,"`value` of Option should not use number type when `mode` is `tags` or `combobox`.")}if(warning(Ae!=="combobox"||!Wt,"`combobox` mode not support `optionLabelProp`. Please set `value` on Option directly."),warning(Ae==="combobox"||!Nt,"`backfill` only works with `combobox` mode."),warning(Ae==="combobox"||!Ht,"`getInputElement` only work with `combobox` mode."),noteOnce(Ae!=="combobox"||!Ht||!Pt||!Zt,"Customize `getInputElement` should customize clear and placeholder logic instead of configuring `allowClear` and `placeholder`."),_n&&!pn&&Ae!=="combobox"&&Ae!=="tags"&&warning(!1,"`onSearch` should work with `showSearch` instead of use alone."),noteOnce(!hn||Lt,"`defaultOpen` makes Select open without focus which means it will not close by click outside. You can set `autoFocus` if needed."),$t!=null){var rt=toArray($t);warning(!Ft||rt.every(function(xt){return _typeof(xt)==="object"&&("key"in xt||"value"in xt)}),"`value` should in shape of `{ value: string | number, label?: ReactNode }` when you set `labelInValue` to `true`"),warning(!Dn||Array.isArray($t),"`value` should be array when `mode` is `multiple` or `tags`")}if(ft){var ht=null;toNodeArray(ft).some(function(xt){if(!React.isValidElement(xt)||!xt.type)return!1;var mt=xt,jt=mt.type;if(jt.isSelectOption)return!1;if(jt.isSelectOptGroup){var Et=toNodeArray(xt.props.children).every(function(Qt){return!React.isValidElement(Qt)||!xt.type||Qt.type.isSelectOption?!0:(ht=Qt.type,!1)});return!Et}return ht=jt,!0}),ht&&warning(!1,"`children` should be `Select.Option` or `Select.OptGroup` instead of `".concat(ht.displayName||ht.name||ht,"`.")),warning(Xt===void 0,"`inputValue` is deprecated, please use `searchValue` instead.")}}function It(Me,Ae){if(Me){var ut=function ft(Nt){for(var Pt=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,Zt=0;Zt<Nt.length;Zt++){var Ht=Nt[Zt];if(Ht[Ae==null?void 0:Ae.value]===null)return warning(!1,"`value` in Select options should not be `null`."),!0;if(!Pt&&Array.isArray(Ht[Ae==null?void 0:Ae.options])&&ft(Ht[Ae==null?void 0:Ae.options],!0))break}};ut(Me)}}var Bt=null,an=["id","mode","prefixCls","backfill","fieldNames","inputValue","searchValue","onSearch","autoClearSearchValue","onSelect","onDeselect","dropdownMatchSelectWidth","filterOption","filterSort","optionFilterProp","optionLabelProp","options","children","defaultActiveFirstOption","menuItemSelectedIcon","virtual","direction","listHeight","listItemHeight","value","defaultValue","labelInValue","onChange"],en=["inputValue"];function Mt(Me){return!Me||(0,be.Z)(Me)!=="object"}var tn=k.forwardRef(function(Me,Ae){var ut=Me.id,ft=Me.mode,Nt=Me.prefixCls,Pt=Nt===void 0?"rc-select":Nt,Zt=Me.backfill,Ht=Me.fieldNames,sn=Me.inputValue,_n=Me.searchValue,hn=Me.onSearch,Lt=Me.autoClearSearchValue,Ft=Lt===void 0?!0:Lt,$t=Me.onSelect,Xt=Me.onDeselect,Wt=Me.dropdownMatchSelectWidth,Dn=Wt===void 0?!0:Wt,pn=Me.filterOption,Gt=Me.filterSort,Je=Me.optionFilterProp,rt=Me.optionLabelProp,ht=Me.options,xt=Me.children,mt=Me.defaultActiveFirstOption,jt=Me.menuItemSelectedIcon,Et=Me.virtual,Qt=Me.direction,nn=Me.listHeight,on=nn===void 0?200:nn,In=Me.listItemHeight,wn=In===void 0?20:In,Kn=Me.value,dn=Me.defaultValue,fn=Me.labelInValue,Hn=Me.onChange,Zn=(0,p.Z)(Me,an),Yn=(0,nt.ZP)(ut),On=pe(ft),Fn=!!(!ht&&xt),jn=k.useMemo(function(){return pn===void 0&&ft==="combobox"?!1:pn},[pn,ft]),Bn=k.useMemo(function(){return W(Ht,Fn)},[JSON.stringify(Ht),Fn]),Jn=(0,fe.Z)("",{value:_n!==void 0?_n:sn,postState:function(kn){return kn||""}}),ur=(0,A.Z)(Jn,2),Pn=ur[0],bn=ur[1],Ge=Dt(ht,xt,Bn,Je,rt),mn=Ge.valueOptions,Mn=Ge.labelOptions,Tn=Ge.options,Xn=k.useCallback(function(Nn){var kn=te(Nn);return kn.map(function(Sn){var En,Qn,gr,Kr,Pr;if(Mt(Sn))En=Sn;else{var Rr;gr=Sn.key,Qn=Sn.label,En=(Rr=Sn.value)!==null&&Rr!==void 0?Rr:gr}var rr=mn.get(En);if(rr){var Br;if(Qn===void 0&&(Qn=rr==null?void 0:rr[rt||Bn.label]),gr===void 0&&(gr=(Br=rr==null?void 0:rr.key)!==null&&Br!==void 0?Br:En),Kr=rr==null?void 0:rr.disabled,Pr=rr==null?void 0:rr.title,0)var ni}return{label:Qn,value:En,key:gr,disabled:Kr,title:Pr}})},[Bn,rt,mn]),sr=(0,fe.Z)(dn,{value:Kn}),ar=(0,A.Z)(sr,2),Un=ar[0],tr=ar[1],xn=k.useMemo(function(){var Nn,kn=Xn(Un);return ft==="combobox"&&ee((Nn=kn[0])===null||Nn===void 0?void 0:Nn.value)?[]:kn},[Un,Xn,ft]),gn=ke(xn,mn),Vn=(0,A.Z)(gn,2),nr=Vn[0],pr=Vn[1],Mr=k.useMemo(function(){if(!ft&&nr.length===1){var Nn=nr[0];if(Nn.value===null&&(Nn.label===null||Nn.label===void 0))return[]}return nr.map(function(kn){var Sn;return(0,_e.Z)((0,_e.Z)({},kn),{},{label:(Sn=kn.label)!==null&&Sn!==void 0?Sn:kn.value})})},[ft,nr]),Cn=k.useMemo(function(){return new Set(nr.map(function(Nn){return Nn.value}))},[nr]);k.useEffect(function(){if(ft==="combobox"){var Nn,kn=(Nn=nr[0])===null||Nn===void 0?void 0:Nn.value;bn(R(kn)?String(kn):"")}},[nr]);var Sr=Ut(function(Nn,kn){var Sn,En=kn!=null?kn:Nn;return Sn={},(0,ge.Z)(Sn,Bn.value,Nn),(0,ge.Z)(Sn,Bn.label,En),Sn}),mr=k.useMemo(function(){if(ft!=="tags")return Tn;var Nn=(0,Q.Z)(Tn),kn=function(En){return mn.has(En)};return(0,Q.Z)(nr).sort(function(Sn,En){return Sn.value<En.value?-1:1}).forEach(function(Sn){var En=Sn.value;kn(En)||Nn.push(Sr(En,Sn.label))}),Nn},[Sr,Tn,mn,nr,ft]),_r=Ne(mr,Bn,Pn,jn,Je),zr=k.useMemo(function(){return ft!=="tags"||!Pn||_r.some(function(Nn){return Nn[Je||"value"]===Pn})||_r.some(function(Nn){return Nn[Bn.value]===Pn})?_r:[Sr(Pn)].concat((0,Q.Z)(_r))},[Sr,Je,ft,_r,Pn,Bn]),Or=k.useMemo(function(){return Gt?(0,Q.Z)(zr).sort(function(Nn,kn){return Gt(Nn,kn)}):zr},[zr,Gt]),wr=k.useMemo(function(){return Ie(Or,{fieldNames:Bn,childrenAsData:Fn})},[Or,Bn,Fn]),Nr=function(kn){var Sn=Xn(kn);if(tr(Sn),Hn&&(Sn.length!==nr.length||Sn.some(function(gr,Kr){var Pr;return((Pr=nr[Kr])===null||Pr===void 0?void 0:Pr.value)!==(gr==null?void 0:gr.value)}))){var En=fn?Sn:Sn.map(function(gr){return gr.value}),Qn=Sn.map(function(gr){return M(pr(gr.value))});Hn(On?En:En[0],On?Qn:Qn[0])}},vr=k.useState(null),ei=(0,A.Z)(vr,2),qn=ei[0],oi=ei[1],Xr=k.useState(0),ti=(0,A.Z)(Xr,2),cr=ti[0],fi=ti[1],xi=mt!==void 0?mt:ft!=="combobox",vi=k.useCallback(function(Nn,kn){var Sn=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},En=Sn.source,Qn=En===void 0?"keyboard":En;fi(kn),Zt&&ft==="combobox"&&Nn!==null&&Qn==="keyboard"&&oi(String(Nn))},[Zt,ft]),or=function(kn,Sn,En){var Qn=function(){var _i,Wn=pr(kn);return[fn?{label:Wn==null?void 0:Wn[Bn.label],value:kn,key:(_i=Wn==null?void 0:Wn.key)!==null&&_i!==void 0?_i:kn}:kn,M(Wn)]};if(Sn&&$t){var gr=Qn(),Kr=(0,A.Z)(gr,2),Pr=Kr[0],Rr=Kr[1];$t(Pr,Rr)}else if(!Sn&&Xt&&En!=="clear"){var rr=Qn(),Br=(0,A.Z)(rr,2),ni=Br[0],ci=Br[1];Xt(ni,ci)}},yi=Ut(function(Nn,kn){var Sn,En=On?kn.selected:!0;En?Sn=On?[].concat((0,Q.Z)(nr),[Nn]):[Nn]:Sn=nr.filter(function(Qn){return Qn.value!==Nn}),Nr(Sn),or(Nn,En),ft==="combobox"?oi(""):(!pe||Ft)&&(bn(""),oi(""))}),Er=function(kn,Sn){Nr(kn);var En=Sn.type,Qn=Sn.values;(En==="remove"||En==="clear")&&Qn.forEach(function(gr){or(gr.value,!1,En)})},qt=function(kn,Sn){if(bn(kn),oi(null),Sn.source==="submit"){var En=(kn||"").trim();if(En){var Qn=Array.from(new Set([].concat((0,Q.Z)(Cn),[En])));Nr(Qn),or(En,!0),bn("")}return}Sn.source!=="blur"&&(ft==="combobox"&&Nr(kn),hn==null||hn(kn))},dr=function(kn){var Sn=kn;ft!=="tags"&&(Sn=kn.map(function(Qn){var gr=Mn.get(Qn);return gr==null?void 0:gr.value}).filter(function(Qn){return Qn!==void 0}));var En=Array.from(new Set([].concat((0,Q.Z)(Cn),(0,Q.Z)(Sn))));Nr(En),En.forEach(function(Qn){or(Qn,!0)})},Tr=k.useMemo(function(){var Nn=Et!==!1&&Dn!==!1;return(0,_e.Z)((0,_e.Z)({},Ge),{},{flattenOptions:wr,onActiveValue:vi,defaultActiveFirstOption:xi,onSelect:yi,menuItemSelectedIcon:jt,rawValues:Cn,fieldNames:Bn,virtual:Nn,direction:Qt,listHeight:on,listItemHeight:wn,childrenAsData:Fn})},[Ge,wr,vi,xi,yi,jt,Cn,Bn,Et,Dn,on,wn,Fn]);return k.createElement(tt.Provider,{value:Tr},k.createElement(Te,(0,L.Z)({},Zn,{id:Yn,prefixCls:Pt,ref:Ae,omitDomProps:en,mode:ft,displayValues:Mr,onDisplayValuesChange:Er,direction:Qt,searchValue:Pn,onSearch:qt,autoClearSearchValue:Ft,onSearchSplit:dr,dropdownMatchSelectWidth:Dn,OptionList:at,emptyOptions:!wr.length,activeValue:qn,activeDescendantId:"".concat(Yn,"_list_").concat(cr)})))}),Ue=tn;Ue.Option=oe,Ue.OptGroup=I;var bt=Ue,wt=bt},9296:function(ln,et,m){"use strict";m.r(et),m.d(et,{ResizableTextArea:function(){return Le},default:function(){return ee}});var L=m(72308),Q=m(77321),ge=m(49618),_e=m(62853),A=m(52487),p=m(74416),be=m(80702),fe=m(92310),o=m.n(fe),k=m(93681),N=m(5643),v=m(18929),x=m(59301),S=m(29301),T=m(34280),z=m(16089),ae=`
min-height:0 !important;
max-height:none !important;
height:0 !important;
visibility:hidden !important;
overflow:hidden !important;
position:absolute !important;
z-index:-1000 !important;
top:0 !important;
right:0 !important;
pointer-events: none !important;
`,B=["letter-spacing","line-height","padding-top","padding-bottom","font-family","font-weight","font-size","font-variant","text-rendering","text-transform","width","text-indent","padding-left","padding-right","border-width","box-sizing","word-break","white-space"],U={},X;function Z(G){var y=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,E=G.getAttribute("id")||G.getAttribute("data-reactid")||G.getAttribute("name");if(y&&U[E])return U[E];var Y=window.getComputedStyle(G),me=Y.getPropertyValue("box-sizing")||Y.getPropertyValue("-moz-box-sizing")||Y.getPropertyValue("-webkit-box-sizing"),$e=parseFloat(Y.getPropertyValue("padding-bottom"))+parseFloat(Y.getPropertyValue("padding-top")),We=parseFloat(Y.getPropertyValue("border-bottom-width"))+parseFloat(Y.getPropertyValue("border-top-width")),qe=B.map(function(gt){return"".concat(gt,":").concat(Y.getPropertyValue(gt))}).join(";"),Xe={sizingStyle:qe,paddingSize:$e,borderSize:We,boxSizing:me};return y&&E&&(U[E]=Xe),Xe}function D(G){var y=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,E=arguments.length>2&&arguments[2]!==void 0?arguments[2]:null,Y=arguments.length>3&&arguments[3]!==void 0?arguments[3]:null;X||(X=document.createElement("textarea"),X.setAttribute("tab-index","-1"),X.setAttribute("aria-hidden","true"),document.body.appendChild(X)),G.getAttribute("wrap")?X.setAttribute("wrap",G.getAttribute("wrap")):X.removeAttribute("wrap");var me=Z(G,y),$e=me.paddingSize,We=me.borderSize,qe=me.boxSizing,Xe=me.sizingStyle;X.setAttribute("style","".concat(Xe,";").concat(ae)),X.value=G.value||G.placeholder||"";var gt=void 0,_t=void 0,st,Kt=X.scrollHeight;if(qe==="border-box"?Kt+=We:qe==="content-box"&&(Kt-=$e),E!==null||Y!==null){X.value=" ";var un=X.scrollHeight-$e;E!==null&&(gt=un*E,qe==="border-box"&&(gt=gt+$e+We),Kt=Math.max(gt,Kt)),Y!==null&&(_t=un*Y,qe==="border-box"&&(_t=_t+$e+We),st=Kt>_t?"":"hidden",Kt=Math.min(_t,Kt))}var Ot={height:Kt,overflowY:st,resize:"none"};return gt&&(Ot.minHeight=gt),_t&&(Ot.maxHeight=_t),Ot}var C=["prefixCls","onPressEnter","defaultValue","value","autoSize","onResize","className","style","disabled","onChange","onInternalAutoSize"],K=0,$=1,ve=2,Se=x.forwardRef(function(G,y){var E=G,Y=E.prefixCls,me=E.onPressEnter,$e=E.defaultValue,We=E.value,qe=E.autoSize,Xe=E.onResize,gt=E.className,_t=E.style,st=E.disabled,Kt=E.onChange,un=E.onInternalAutoSize,Ot=(0,p.Z)(E,C),Vt=(0,v.Z)($e,{value:We,postState:function(I){return I!=null?I:""}}),lt=(0,A.Z)(Vt,2),At=lt[0],ne=lt[1],de=function(I){ne(I.target.value),Kt==null||Kt(I)},se=x.useRef();x.useImperativeHandle(y,function(){return{textArea:se.current}});var W=x.useMemo(function(){return qe&&(0,_e.Z)(qe)==="object"?[qe.minRows,qe.maxRows]:[]},[qe]),Ie=(0,A.Z)(W,2),M=Ie[0],ce=Ie[1],q=!!qe,le=function(){try{if(document.activeElement===se.current){var I=se.current,dt=I.selectionStart,oe=I.selectionEnd,Pe=I.scrollTop;se.current.setSelectionRange(dt,oe),se.current.scrollTop=Pe}}catch(vn){}},pe=x.useState(ve),De=(0,A.Z)(pe,2),Te=De[0],ke=De[1],Oe=x.useState(),Ne=(0,A.Z)(Oe,2),nt=Ne[0],Qe=Ne[1],Ze=function(){ke(K)};(0,T.Z)(function(){q&&Ze()},[We,M,ce,q]),(0,T.Z)(function(){if(Te===K)ke($);else if(Te===$){var w=D(se.current,!1,M,ce);ke(ve),Qe(w)}else le()},[Te]);var pt=x.useRef(),vt=function(){z.Z.cancel(pt.current)},ct=function(I){Te===ve&&(Xe==null||Xe(I),qe&&(vt(),pt.current=(0,z.Z)(function(){Ze()})))};x.useEffect(function(){return vt},[]);var Dt=q?nt:null,Ut=(0,Q.Z)((0,Q.Z)({},_t),Dt);return(Te===K||Te===$)&&(Ut.overflowY="hidden",Ut.overflowX="hidden"),x.createElement(S.Z,{onResize:ct,disabled:!(qe||Xe)},x.createElement("textarea",(0,L.Z)({},Ot,{ref:se,style:Ut,className:o()(Y,gt,(0,ge.Z)({},"".concat(Y,"-disabled"),st)),disabled:st,value:At,onChange:de})))}),Le=Se,ye=["defaultValue","value","onFocus","onBlur","onChange","allowClear","maxLength","onCompositionStart","onCompositionEnd","suffix","prefixCls","classes","showCount","className","style","disabled","hidden","classNames","styles","onResize"];function te(G,y){return(0,be.Z)(G||"").slice(0,y).join("")}function j(G,y,E,Y){var me=E;return G?me=te(E,Y):(0,be.Z)(y||"").length<E.length&&(0,be.Z)(E||"").length>Y&&(me=y),me}var ue=x.forwardRef(function(G,y){var E,Y=G.defaultValue,me=G.value,$e=G.onFocus,We=G.onBlur,qe=G.onChange,Xe=G.allowClear,gt=G.maxLength,_t=G.onCompositionStart,st=G.onCompositionEnd,Kt=G.suffix,un=G.prefixCls,Ot=un===void 0?"rc-textarea":un,Vt=G.classes,lt=G.showCount,At=G.className,ne=G.style,de=G.disabled,se=G.hidden,W=G.classNames,Ie=G.styles,M=G.onResize,ce=(0,p.Z)(G,ye),q=(0,v.Z)(Y,{value:me,defaultValue:Y}),le=(0,A.Z)(q,2),pe=le[0],De=le[1],Te=(0,x.useRef)(null),ke=x.useState(!1),Oe=(0,A.Z)(ke,2),Ne=Oe[0],nt=Oe[1],Qe=x.useState(!1),Ze=(0,A.Z)(Qe,2),pt=Ze[0],vt=Ze[1],ct=x.useRef(),Dt=x.useRef(0),Ut=x.useState(null),w=(0,A.Z)(Ut,2),I=w[0],dt=w[1],oe=function(){var Mt;(Mt=Te.current)===null||Mt===void 0||Mt.textArea.focus()};(0,x.useImperativeHandle)(y,function(){return{resizableTextArea:Te.current,focus:oe,blur:function(){var Mt;(Mt=Te.current)===null||Mt===void 0||Mt.textArea.blur()}}}),(0,x.useEffect)(function(){nt(function(en){return!de&&en})},[de]);var Pe=Number(gt)>0,vn=function(Mt){vt(!0),ct.current=pe,Dt.current=Mt.currentTarget.selectionStart,_t==null||_t(Mt)},je=function(Mt){vt(!1);var tn=Mt.currentTarget.value;if(Pe){var Ue,bt=Dt.current>=gt+1||Dt.current===((Ue=ct.current)===null||Ue===void 0?void 0:Ue.length);tn=j(bt,ct.current,tn,gt)}tn!==pe&&(De(tn),(0,N.rJ)(Mt.currentTarget,Mt,qe,tn)),st==null||st(Mt)},He=function(Mt){var tn=Mt.target.value;if(!pt&&Pe){var Ue=Mt.target.selectionStart>=gt+1||Mt.target.selectionStart===tn.length||!Mt.target.selectionStart;tn=j(Ue,pe,tn,gt)}De(tn),(0,N.rJ)(Mt.currentTarget,Mt,qe,tn)},tt=function(Mt){var tn=ce.onPressEnter,Ue=ce.onKeyDown;Mt.key==="Enter"&&tn&&tn(Mt),Ue==null||Ue(Mt)},he=function(Mt){nt(!0),$e==null||$e(Mt)},ie=function(Mt){nt(!1),We==null||We(Mt)},xe=function(Mt){var tn;De(""),oe(),(0,N.rJ)((tn=Te.current)===null||tn===void 0?void 0:tn.textArea,Mt,qe)},Fe=(0,N.D7)(pe);!pt&&Pe&&me==null&&(Fe=te(Fe,gt));var V=Kt,at;if(lt){var Ce=(0,be.Z)(Fe).length;(0,_e.Z)(lt)==="object"?at=lt.formatter({value:Fe,count:Ce,maxLength:gt}):at="".concat(Ce).concat(Pe?" / ".concat(gt):""),V=x.createElement(x.Fragment,null,V,x.createElement("span",{className:o()("".concat(Ot,"-data-count"),W==null?void 0:W.count),style:Ie==null?void 0:Ie.count},at))}var It=function(Mt){var tn;M==null||M(Mt),(tn=Te.current)!==null&&tn!==void 0&&tn.textArea.style.height&&dt(!0)},Bt=!ce.autoSize&&!lt&&!Xe,an=x.createElement(k.BaseInput,{value:Fe,allowClear:Xe,handleReset:xe,suffix:V,prefixCls:Ot,classes:{affixWrapper:o()(Vt==null?void 0:Vt.affixWrapper,(E={},(0,ge.Z)(E,"".concat(Ot,"-show-count"),lt),(0,ge.Z)(E,"".concat(Ot,"-textarea-allow-clear"),Xe),E))},disabled:de,focused:Ne,className:At,style:(0,Q.Z)((0,Q.Z)({},ne),I&&!Bt?{height:"auto"}:{}),dataAttrs:{affixWrapper:{"data-count":typeof at=="string"?at:void 0}},hidden:se,inputElement:x.createElement(Le,(0,L.Z)({},ce,{onKeyDown:tt,onChange:He,onFocus:he,onBlur:ie,onCompositionStart:vn,onCompositionEnd:je,className:W==null?void 0:W.textarea,style:(0,Q.Z)((0,Q.Z)({},Ie==null?void 0:Ie.textarea),{},{resize:ne==null?void 0:ne.resize}),disabled:de,prefixCls:Ot,onResize:It,ref:Te}))});return an}),R=ue,ee=R},55477:function(ln,et,m){"use strict";m.d(et,{G:function(){return x},Z:function(){return ae}});var L=m(72308),Q=m(77321),ge=m(74416),_e=m(35593),A=m(59301),p={shiftX:64,adjustY:1},be={adjustX:1,shiftY:!0},fe=[0,0],o={left:{points:["cr","cl"],overflow:be,offset:[-4,0],targetOffset:fe},right:{points:["cl","cr"],overflow:be,offset:[4,0],targetOffset:fe},top:{points:["bc","tc"],overflow:p,offset:[0,-4],targetOffset:fe},bottom:{points:["tc","bc"],overflow:p,offset:[0,4],targetOffset:fe},topLeft:{points:["bl","tl"],overflow:p,offset:[0,-4],targetOffset:fe},leftTop:{points:["tr","tl"],overflow:be,offset:[-4,0],targetOffset:fe},topRight:{points:["br","tr"],overflow:p,offset:[0,-4],targetOffset:fe},rightTop:{points:["tl","tr"],overflow:be,offset:[4,0],targetOffset:fe},bottomRight:{points:["tr","br"],overflow:p,offset:[0,4],targetOffset:fe},rightBottom:{points:["bl","br"],overflow:be,offset:[4,0],targetOffset:fe},bottomLeft:{points:["tl","bl"],overflow:p,offset:[0,4],targetOffset:fe},leftBottom:{points:["br","bl"],overflow:be,offset:[-4,0],targetOffset:fe}},k=null,N=m(92310),v=m.n(N);function x(B){var U=B.children,X=B.prefixCls,Z=B.id,D=B.overlayInnerStyle,C=B.className,K=B.style;return A.createElement("div",{className:v()("".concat(X,"-content"),C),style:K},A.createElement("div",{className:"".concat(X,"-inner"),id:Z,role:"tooltip",style:D},typeof U=="function"?U():U))}var S=["overlayClassName","trigger","mouseEnterDelay","mouseLeaveDelay","overlayStyle","prefixCls","children","onVisibleChange","afterVisibleChange","transitionName","animation","motion","placement","align","destroyTooltipOnHide","defaultVisible","getTooltipContainer","overlayInnerStyle","arrowContent","overlay","id","showArrow"],T=function(U,X){var Z=U.overlayClassName,D=U.trigger,C=D===void 0?["hover"]:D,K=U.mouseEnterDelay,$=K===void 0?0:K,ve=U.mouseLeaveDelay,Se=ve===void 0?.1:ve,Le=U.overlayStyle,ye=U.prefixCls,te=ye===void 0?"rc-tooltip":ye,j=U.children,ue=U.onVisibleChange,R=U.afterVisibleChange,ee=U.transitionName,G=U.animation,y=U.motion,E=U.placement,Y=E===void 0?"right":E,me=U.align,$e=me===void 0?{}:me,We=U.destroyTooltipOnHide,qe=We===void 0?!1:We,Xe=U.defaultVisible,gt=U.getTooltipContainer,_t=U.overlayInnerStyle,st=U.arrowContent,Kt=U.overlay,un=U.id,Ot=U.showArrow,Vt=Ot===void 0?!0:Ot,lt=(0,ge.Z)(U,S),At=(0,A.useRef)(null);(0,A.useImperativeHandle)(X,function(){return At.current});var ne=(0,Q.Z)({},lt);"visible"in U&&(ne.popupVisible=U.visible);var de=function(){return A.createElement(x,{key:"content",prefixCls:te,id:un,overlayInnerStyle:_t},Kt)};return A.createElement(_e.Z,(0,L.Z)({popupClassName:Z,prefixCls:te,popup:de,action:C,builtinPlacements:o,popupPlacement:Y,ref:At,popupAlign:$e,getPopupContainer:gt,onPopupVisibleChange:ue,afterPopupVisibleChange:R,popupTransitionName:ee,popupAnimation:G,popupMotion:y,defaultPopupVisible:Xe,autoDestroy:qe,mouseLeaveDelay:Se,popupStyle:Le,mouseEnterDelay:$,arrow:Vt},ne),j)},z=(0,A.forwardRef)(T),ae=z},39417:function(ln,et,m){"use strict";m.d(et,{Z:function(){return $}});var L=m(72308),Q=m(49618),ge=m(74416),_e=m(77321),A=m(96949),p=m(55090),be=m(80237),fe=m(77205),o=m(38793),k=m(92310),N=m.n(k),v=m(26112),x=m(59301),S=m(39378),T=function(Se){for(var Le=Se.prefixCls,ye=Se.level,te=Se.isStart,j=Se.isEnd,ue="".concat(Le,"-indent-unit"),R=[],ee=0;ee<ye;ee+=1){var G;R.push(x.createElement("span",{key:ee,className:N()(ue,(G={},(0,Q.Z)(G,"".concat(ue,"-start"),te[ee]),(0,Q.Z)(G,"".concat(ue,"-end"),j[ee]),G))}))}return x.createElement("span",{"aria-hidden":"true",className:"".concat(Le,"-indent")},R)},z=x.memo(T),ae=m(67841),B=m(71430),U=["eventKey","className","style","dragOver","dragOverGapTop","dragOverGapBottom","isLeaf","isStart","isEnd","expanded","selected","checked","halfChecked","loading","domRef","active","data","onMouseMove","selectable"],X="open",Z="close",D="---",C=function(ve){(0,fe.Z)(Le,ve);var Se=(0,o.Z)(Le);function Le(){var ye;(0,A.Z)(this,Le);for(var te=arguments.length,j=new Array(te),ue=0;ue<te;ue++)j[ue]=arguments[ue];return ye=Se.call.apply(Se,[this].concat(j)),ye.state={dragNodeHighlight:!1},ye.selectHandle=void 0,ye.cacheIndent=void 0,ye.onSelectorClick=function(R){var ee=ye.props.context.onNodeClick;ee(R,(0,B.F)(ye.props)),ye.isSelectable()?ye.onSelect(R):ye.onCheck(R)},ye.onSelectorDoubleClick=function(R){var ee=ye.props.context.onNodeDoubleClick;ee(R,(0,B.F)(ye.props))},ye.onSelect=function(R){if(!ye.isDisabled()){var ee=ye.props.context.onNodeSelect;ee(R,(0,B.F)(ye.props))}},ye.onCheck=function(R){if(!ye.isDisabled()){var ee=ye.props,G=ee.disableCheckbox,y=ee.checked,E=ye.props.context.onNodeCheck;if(!(!ye.isCheckable()||G)){var Y=!y;E(R,(0,B.F)(ye.props),Y)}}},ye.onMouseEnter=function(R){var ee=ye.props.context.onNodeMouseEnter;ee(R,(0,B.F)(ye.props))},ye.onMouseLeave=function(R){var ee=ye.props.context.onNodeMouseLeave;ee(R,(0,B.F)(ye.props))},ye.onContextMenu=function(R){var ee=ye.props.context.onNodeContextMenu;ee(R,(0,B.F)(ye.props))},ye.onDragStart=function(R){var ee=ye.props.context.onNodeDragStart;R.stopPropagation(),ye.setState({dragNodeHighlight:!0}),ee(R,(0,be.Z)(ye));try{R.dataTransfer.setData("text/plain","")}catch(G){}},ye.onDragEnter=function(R){var ee=ye.props.context.onNodeDragEnter;R.preventDefault(),R.stopPropagation(),ee(R,(0,be.Z)(ye))},ye.onDragOver=function(R){var ee=ye.props.context.onNodeDragOver;R.preventDefault(),R.stopPropagation(),ee(R,(0,be.Z)(ye))},ye.onDragLeave=function(R){var ee=ye.props.context.onNodeDragLeave;R.stopPropagation(),ee(R,(0,be.Z)(ye))},ye.onDragEnd=function(R){var ee=ye.props.context.onNodeDragEnd;R.stopPropagation(),ye.setState({dragNodeHighlight:!1}),ee(R,(0,be.Z)(ye))},ye.onDrop=function(R){var ee=ye.props.context.onNodeDrop;R.preventDefault(),R.stopPropagation(),ye.setState({dragNodeHighlight:!1}),ee(R,(0,be.Z)(ye))},ye.onExpand=function(R){var ee=ye.props,G=ee.loading,y=ee.context.onNodeExpand;G||y(R,(0,B.F)(ye.props))},ye.setSelectHandle=function(R){ye.selectHandle=R},ye.getNodeState=function(){var R=ye.props.expanded;return ye.isLeaf()?null:R?X:Z},ye.hasChildren=function(){var R=ye.props.eventKey,ee=ye.props.context.keyEntities,G=(0,ae.Z)(ee,R)||{},y=G.children;return!!(y||[]).length},ye.isLeaf=function(){var R=ye.props,ee=R.isLeaf,G=R.loaded,y=ye.props.context.loadData,E=ye.hasChildren();return ee===!1?!1:ee||!y&&!E||y&&G&&!E},ye.isDisabled=function(){var R=ye.props.disabled,ee=ye.props.context.disabled;return!!(ee||R)},ye.isCheckable=function(){var R=ye.props.checkable,ee=ye.props.context.checkable;return!ee||R===!1?!1:ee},ye.syncLoadData=function(R){var ee=R.expanded,G=R.loading,y=R.loaded,E=ye.props.context,Y=E.loadData,me=E.onNodeLoad;G||Y&&ee&&!ye.isLeaf()&&!ye.hasChildren()&&!y&&me((0,B.F)(ye.props))},ye.isDraggable=function(){var R=ye.props,ee=R.data,G=R.context.draggable;return!!(G&&(!G.nodeDraggable||G.nodeDraggable(ee)))},ye.renderDragHandler=function(){var R=ye.props.context,ee=R.draggable,G=R.prefixCls;return ee!=null&&ee.icon?x.createElement("span",{className:"".concat(G,"-draggable-icon")},ee.icon):null},ye.renderSwitcherIconDom=function(R){var ee=ye.props.switcherIcon,G=ye.props.context.switcherIcon,y=ee||G;return typeof y=="function"?y((0,_e.Z)((0,_e.Z)({},ye.props),{},{isLeaf:R})):y},ye.renderSwitcher=function(){var R=ye.props.expanded,ee=ye.props.context.prefixCls;if(ye.isLeaf()){var G=ye.renderSwitcherIconDom(!0);return G!==!1?x.createElement("span",{className:N()("".concat(ee,"-switcher"),"".concat(ee,"-switcher-noop"))},G):null}var y=N()("".concat(ee,"-switcher"),"".concat(ee,"-switcher_").concat(R?X:Z)),E=ye.renderSwitcherIconDom(!1);return E!==!1?x.createElement("span",{onClick:ye.onExpand,className:y},E):null},ye.renderCheckbox=function(){var R=ye.props,ee=R.checked,G=R.halfChecked,y=R.disableCheckbox,E=ye.props.context.prefixCls,Y=ye.isDisabled(),me=ye.isCheckable();if(!me)return null;var $e=typeof me!="boolean"?me:null;return x.createElement("span",{className:N()("".concat(E,"-checkbox"),ee&&"".concat(E,"-checkbox-checked"),!ee&&G&&"".concat(E,"-checkbox-indeterminate"),(Y||y)&&"".concat(E,"-checkbox-disabled")),onClick:ye.onCheck},$e)},ye.renderIcon=function(){var R=ye.props.loading,ee=ye.props.context.prefixCls;return x.createElement("span",{className:N()("".concat(ee,"-iconEle"),"".concat(ee,"-icon__").concat(ye.getNodeState()||"docu"),R&&"".concat(ee,"-icon_loading"))})},ye.renderSelector=function(){var R=ye.state.dragNodeHighlight,ee=ye.props,G=ee.title,y=G===void 0?D:G,E=ee.selected,Y=ee.icon,me=ee.loading,$e=ee.data,We=ye.props.context,qe=We.prefixCls,Xe=We.showIcon,gt=We.icon,_t=We.loadData,st=We.titleRender,Kt=ye.isDisabled(),un="".concat(qe,"-node-content-wrapper"),Ot;if(Xe){var Vt=Y||gt;Ot=Vt?x.createElement("span",{className:N()("".concat(qe,"-iconEle"),"".concat(qe,"-icon__customize"))},typeof Vt=="function"?Vt(ye.props):Vt):ye.renderIcon()}else _t&&me&&(Ot=ye.renderIcon());var lt;typeof y=="function"?lt=y($e):st?lt=st($e):lt=y;var At=x.createElement("span",{className:"".concat(qe,"-title")},lt);return x.createElement("span",{ref:ye.setSelectHandle,title:typeof y=="string"?y:"",className:N()("".concat(un),"".concat(un,"-").concat(ye.getNodeState()||"normal"),!Kt&&(E||R)&&"".concat(qe,"-node-selected")),onMouseEnter:ye.onMouseEnter,onMouseLeave:ye.onMouseLeave,onContextMenu:ye.onContextMenu,onClick:ye.onSelectorClick,onDoubleClick:ye.onSelectorDoubleClick},Ot,At,ye.renderDropIndicator())},ye.renderDropIndicator=function(){var R=ye.props,ee=R.disabled,G=R.eventKey,y=ye.props.context,E=y.draggable,Y=y.dropLevelOffset,me=y.dropPosition,$e=y.prefixCls,We=y.indent,qe=y.dropIndicatorRender,Xe=y.dragOverNodeKey,gt=y.direction,_t=!!E,st=!ee&&_t&&Xe===G,Kt=We!=null?We:ye.cacheIndent;return ye.cacheIndent=We,st?qe({dropPosition:me,dropLevelOffset:Y,indent:Kt,prefixCls:$e,direction:gt}):null},ye}return(0,p.Z)(Le,[{key:"componentDidMount",value:function(){this.syncLoadData(this.props)}},{key:"componentDidUpdate",value:function(){this.syncLoadData(this.props)}},{key:"isSelectable",value:function(){var te=this.props.selectable,j=this.props.context.selectable;return typeof te=="boolean"?te:j}},{key:"render",value:function(){var te,j=this.props,ue=j.eventKey,R=j.className,ee=j.style,G=j.dragOver,y=j.dragOverGapTop,E=j.dragOverGapBottom,Y=j.isLeaf,me=j.isStart,$e=j.isEnd,We=j.expanded,qe=j.selected,Xe=j.checked,gt=j.halfChecked,_t=j.loading,st=j.domRef,Kt=j.active,un=j.data,Ot=j.onMouseMove,Vt=j.selectable,lt=(0,ge.Z)(j,U),At=this.props.context,ne=At.prefixCls,de=At.filterTreeNode,se=At.keyEntities,W=At.dropContainerKey,Ie=At.dropTargetKey,M=At.draggingNodeKey,ce=this.isDisabled(),q=(0,v.Z)(lt,{aria:!0,data:!0}),le=(0,ae.Z)(se,ue)||{},pe=le.level,De=$e[$e.length-1],Te=this.isDraggable(),ke=!ce&&Te,Oe=M===ue,Ne=Vt!==void 0?{"aria-selected":!!Vt}:void 0;return x.createElement("div",(0,L.Z)({ref:st,className:N()(R,"".concat(ne,"-treenode"),(te={},(0,Q.Z)(te,"".concat(ne,"-treenode-disabled"),ce),(0,Q.Z)(te,"".concat(ne,"-treenode-switcher-").concat(We?"open":"close"),!Y),(0,Q.Z)(te,"".concat(ne,"-treenode-checkbox-checked"),Xe),(0,Q.Z)(te,"".concat(ne,"-treenode-checkbox-indeterminate"),gt),(0,Q.Z)(te,"".concat(ne,"-treenode-selected"),qe),(0,Q.Z)(te,"".concat(ne,"-treenode-loading"),_t),(0,Q.Z)(te,"".concat(ne,"-treenode-active"),Kt),(0,Q.Z)(te,"".concat(ne,"-treenode-leaf-last"),De),(0,Q.Z)(te,"".concat(ne,"-treenode-draggable"),Te),(0,Q.Z)(te,"dragging",Oe),(0,Q.Z)(te,"drop-target",Ie===ue),(0,Q.Z)(te,"drop-container",W===ue),(0,Q.Z)(te,"drag-over",!ce&&G),(0,Q.Z)(te,"drag-over-gap-top",!ce&&y),(0,Q.Z)(te,"drag-over-gap-bottom",!ce&&E),(0,Q.Z)(te,"filter-node",de&&de((0,B.F)(this.props))),te)),style:ee,draggable:ke,"aria-grabbed":Oe,onDragStart:ke?this.onDragStart:void 0,onDragEnter:Te?this.onDragEnter:void 0,onDragOver:Te?this.onDragOver:void 0,onDragLeave:Te?this.onDragLeave:void 0,onDrop:Te?this.onDrop:void 0,onDragEnd:Te?this.onDragEnd:void 0,onMouseMove:Ot},Ne,q),x.createElement(z,{prefixCls:ne,level:pe,isStart:me,isEnd:$e}),this.renderDragHandler(),this.renderSwitcher(),this.renderCheckbox(),this.renderSelector())}}]),Le}(x.Component),K=function(Se){return x.createElement(S.k.Consumer,null,function(Le){return x.createElement(C,(0,L.Z)({},Se,{context:Le}))})};K.displayName="TreeNode",K.isTreeNode=1;var $=K},39378:function(ln,et,m){"use strict";m.d(et,{k:function(){return Q}});var L=m(59301),Q=L.createContext(null)},54844:function(ln,et,m){"use strict";m.d(et,{O:function(){return $.Z},Z:function(){return At}});var L=m(72308),Q=m(49618),ge=m(62853),_e=m(77321),A=m(80702),p=m(96949),be=m(55090),fe=m(80237),o=m(77205),k=m(38793),N=m(92310),v=m.n(N),x=m(10228),S=m(26112),T=m(48736),z=m(59301),ae=m(39378);function B(ne){var de=ne.dropPosition,se=ne.dropLevelOffset,W=ne.indent,Ie={pointerEvents:"none",position:"absolute",right:0,backgroundColor:"red",height:2};switch(de){case-1:Ie.top=0,Ie.left=-se*W;break;case 1:Ie.bottom=0,Ie.left=-se*W;break;case 0:Ie.bottom=0,Ie.left=W;break}return z.createElement("div",{style:Ie})}function U(ne){if(ne==null)throw new TypeError("Cannot destructure "+ne)}var X=m(52487),Z=m(74416),D=m(34280),C=m(45680),K=m(77900),$=m(39417);function ve(ne,de){var se=z.useState(!1),W=(0,X.Z)(se,2),Ie=W[0],M=W[1];z.useLayoutEffect(function(){if(Ie)return ne(),function(){de()}},[Ie]),z.useLayoutEffect(function(){return M(!0),function(){M(!1)}},[])}var Se=m(71430),Le=["className","style","motion","motionNodes","motionType","onMotionStart","onMotionEnd","active","treeNodeRequiredProps"],ye=function(de,se){var W=de.className,Ie=de.style,M=de.motion,ce=de.motionNodes,q=de.motionType,le=de.onMotionStart,pe=de.onMotionEnd,De=de.active,Te=de.treeNodeRequiredProps,ke=(0,Z.Z)(de,Le),Oe=z.useState(!0),Ne=(0,X.Z)(Oe,2),nt=Ne[0],Qe=Ne[1],Ze=z.useContext(ae.k),pt=Ze.prefixCls,vt=ce&&q!=="hide";(0,D.Z)(function(){ce&&vt!==nt&&Qe(vt)},[ce]);var ct=function(){ce&&le()},Dt=z.useRef(!1),Ut=function(){ce&&!Dt.current&&(Dt.current=!0,pe())};ve(ct,Ut);var w=function(dt){vt===dt&&Ut()};return ce?z.createElement(K.default,(0,L.Z)({ref:se,visible:nt},M,{motionAppear:q==="show",onVisibleChanged:w}),function(I,dt){var oe=I.className,Pe=I.style;return z.createElement("div",{ref:dt,className:v()("".concat(pt,"-treenode-motion"),oe),style:Pe},ce.map(function(vn){var je=(0,L.Z)({},(U(vn.data),vn.data)),He=vn.title,tt=vn.key,he=vn.isStart,ie=vn.isEnd;delete je.children;var xe=(0,Se.H8)(tt,Te);return z.createElement($.Z,(0,L.Z)({},je,xe,{title:He,active:De,data:vn.data,key:tt,isStart:he,isEnd:ie}))}))}):z.createElement($.Z,(0,L.Z)({domRef:se,className:W,style:Ie},ke,{active:De}))};ye.displayName="MotionTreeNode";var te=z.forwardRef(ye),j=te;function ue(){var ne=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[],de=arguments.length>1&&arguments[1]!==void 0?arguments[1]:[],se=ne.length,W=de.length;if(Math.abs(se-W)!==1)return{add:!1,key:null};function Ie(M,ce){var q=new Map;M.forEach(function(pe){q.set(pe,!0)});var le=ce.filter(function(pe){return!q.has(pe)});return le.length===1?le[0]:null}return se<W?{add:!0,key:Ie(ne,de)}:{add:!1,key:Ie(de,ne)}}function R(ne,de,se){var W=ne.findIndex(function(q){return q.key===se}),Ie=ne[W+1],M=de.findIndex(function(q){return q.key===se});if(Ie){var ce=de.findIndex(function(q){return q.key===Ie.key});return de.slice(M+1,ce)}return de.slice(M+1)}var ee=["prefixCls","data","selectable","checkable","expandedKeys","selectedKeys","checkedKeys","loadedKeys","loadingKeys","halfCheckedKeys","keyEntities","disabled","dragging","dragOverNodeKey","dropPosition","motion","height","itemHeight","virtual","focusable","activeItem","focused","tabIndex","onKeyDown","onFocus","onBlur","onActiveChange","onListChangeStart","onListChangeEnd"],G={width:0,height:0,display:"flex",overflow:"hidden",opacity:0,border:0,padding:0,margin:0},y=function(){},E="RC_TREE_MOTION_".concat(Math.random()),Y={key:E},me={key:E,level:0,index:0,pos:"0",node:Y,nodes:[Y]},$e={parent:null,children:[],pos:me.pos,data:Y,title:null,key:E,isStart:[],isEnd:[]};function We(ne,de,se,W){return de===!1||!se?ne:ne.slice(0,Math.ceil(se/W)+1)}function qe(ne){var de=ne.key,se=ne.pos;return(0,Se.km)(de,se)}function Xe(ne){for(var de=String(ne.data.key),se=ne;se.parent;)se=se.parent,de="".concat(se.data.key," > ").concat(de);return de}var gt=z.forwardRef(function(ne,de){var se=ne.prefixCls,W=ne.data,Ie=ne.selectable,M=ne.checkable,ce=ne.expandedKeys,q=ne.selectedKeys,le=ne.checkedKeys,pe=ne.loadedKeys,De=ne.loadingKeys,Te=ne.halfCheckedKeys,ke=ne.keyEntities,Oe=ne.disabled,Ne=ne.dragging,nt=ne.dragOverNodeKey,Qe=ne.dropPosition,Ze=ne.motion,pt=ne.height,vt=ne.itemHeight,ct=ne.virtual,Dt=ne.focusable,Ut=ne.activeItem,w=ne.focused,I=ne.tabIndex,dt=ne.onKeyDown,oe=ne.onFocus,Pe=ne.onBlur,vn=ne.onActiveChange,je=ne.onListChangeStart,He=ne.onListChangeEnd,tt=(0,Z.Z)(ne,ee),he=z.useRef(null),ie=z.useRef(null);z.useImperativeHandle(de,function(){return{scrollTo:function(Lt){he.current.scrollTo(Lt)},getIndentWidth:function(){return ie.current.offsetWidth}}});var xe=z.useState(ce),Fe=(0,X.Z)(xe,2),V=Fe[0],at=Fe[1],Ce=z.useState(W),It=(0,X.Z)(Ce,2),Bt=It[0],an=It[1],en=z.useState(W),Mt=(0,X.Z)(en,2),tn=Mt[0],Ue=Mt[1],bt=z.useState([]),wt=(0,X.Z)(bt,2),Me=wt[0],Ae=wt[1],ut=z.useState(null),ft=(0,X.Z)(ut,2),Nt=ft[0],Pt=ft[1],Zt=z.useRef(W);Zt.current=W;function Ht(){var hn=Zt.current;an(hn),Ue(hn),Ae([]),Pt(null),He()}(0,D.Z)(function(){at(ce);var hn=ue(V,ce);if(hn.key!==null)if(hn.add){var Lt=Bt.findIndex(function(pn){var Gt=pn.key;return Gt===hn.key}),Ft=We(R(Bt,W,hn.key),ct,pt,vt),$t=Bt.slice();$t.splice(Lt+1,0,$e),Ue($t),Ae(Ft),Pt("show")}else{var Xt=W.findIndex(function(pn){var Gt=pn.key;return Gt===hn.key}),Wt=We(R(W,Bt,hn.key),ct,pt,vt),Dn=W.slice();Dn.splice(Xt+1,0,$e),Ue(Dn),Ae(Wt),Pt("hide")}else Bt!==W&&(an(W),Ue(W))},[ce,W]),z.useEffect(function(){Ne||Ht()},[Ne]);var sn=Ze?tn:W,_n={expandedKeys:ce,selectedKeys:q,loadedKeys:pe,loadingKeys:De,checkedKeys:le,halfCheckedKeys:Te,dragOverNodeKey:nt,dropPosition:Qe,keyEntities:ke};return z.createElement(z.Fragment,null,w&&Ut&&z.createElement("span",{style:G,"aria-live":"assertive"},Xe(Ut)),z.createElement("div",null,z.createElement("input",{style:G,disabled:Dt===!1||Oe,tabIndex:Dt!==!1?I:null,onKeyDown:dt,onFocus:oe,onBlur:Pe,value:"",onChange:y,"aria-label":"for screen reader"})),z.createElement("div",{className:"".concat(se,"-treenode"),"aria-hidden":!0,style:{position:"absolute",pointerEvents:"none",visibility:"hidden",height:0,overflow:"hidden",border:0,padding:0}},z.createElement("div",{className:"".concat(se,"-indent")},z.createElement("div",{ref:ie,className:"".concat(se,"-indent-unit")}))),z.createElement(C.Z,(0,L.Z)({},tt,{data:sn,itemKey:qe,height:pt,fullHeight:!1,virtual:ct,itemHeight:vt,prefixCls:"".concat(se,"-list"),ref:he,onVisibleChange:function(Lt,Ft){var $t=new Set(Lt),Xt=Ft.filter(function(Wt){return!$t.has(Wt)});Xt.some(function(Wt){return qe(Wt)===E})&&Ht()}}),function(hn){var Lt=hn.pos,Ft=(0,L.Z)({},(U(hn.data),hn.data)),$t=hn.title,Xt=hn.key,Wt=hn.isStart,Dn=hn.isEnd,pn=(0,Se.km)(Xt,Lt);delete Ft.key,delete Ft.children;var Gt=(0,Se.H8)(pn,_n);return z.createElement(j,(0,L.Z)({},Ft,Gt,{title:$t,active:!!Ut&&Xt===Ut.key,pos:Lt,data:hn.data,isStart:Wt,isEnd:Dn,motion:Ze,motionNodes:Xt===E?Me:null,motionType:Nt,onMotionStart:je,onMotionEnd:Ht,treeNodeRequiredProps:_n,onMouseMove:function(){vn(null)}}))}))});gt.displayName="NodeList";var _t=gt,st=m(35654),Kt=m(90782),un=m(67841),Ot=10,Vt=function(ne){(0,o.Z)(se,ne);var de=(0,k.Z)(se);function se(){var W;(0,p.Z)(this,se);for(var Ie=arguments.length,M=new Array(Ie),ce=0;ce<Ie;ce++)M[ce]=arguments[ce];return W=de.call.apply(de,[this].concat(M)),W.destroyed=!1,W.delayedDragEnterLogic=void 0,W.loadingRetryTimes={},W.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,Se.w$)()},W.dragStartMousePosition=null,W.dragNode=void 0,W.currentMouseOverDroppableNodeKey=null,W.listRef=z.createRef(),W.onNodeDragStart=function(q,le){var pe=W.state,De=pe.expandedKeys,Te=pe.keyEntities,ke=W.props.onDragStart,Oe=le.props.eventKey;W.dragNode=le,W.dragStartMousePosition={x:q.clientX,y:q.clientY};var Ne=(0,st._5)(De,Oe);W.setState({draggingNodeKey:Oe,dragChildrenKeys:(0,st.wA)(Oe,Te),indent:W.listRef.current.getIndentWidth()}),W.setExpandedKeys(Ne),window.addEventListener("dragend",W.onWindowDragEnd),ke==null||ke({event:q,node:(0,Se.F)(le.props)})},W.onNodeDragEnter=function(q,le){var pe=W.state,De=pe.expandedKeys,Te=pe.keyEntities,ke=pe.dragChildrenKeys,Oe=pe.flattenNodes,Ne=pe.indent,nt=W.props,Qe=nt.onDragEnter,Ze=nt.onExpand,pt=nt.allowDrop,vt=nt.direction,ct=le.props,Dt=ct.pos,Ut=ct.eventKey,w=(0,fe.Z)(W),I=w.dragNode;if(W.currentMouseOverDroppableNodeKey!==Ut&&(W.currentMouseOverDroppableNodeKey=Ut),!I){W.resetDragState();return}var dt=(0,st.OM)(q,I,le,Ne,W.dragStartMousePosition,pt,Oe,Te,De,vt),oe=dt.dropPosition,Pe=dt.dropLevelOffset,vn=dt.dropTargetKey,je=dt.dropContainerKey,He=dt.dropTargetPos,tt=dt.dropAllowed,he=dt.dragOverNodeKey;if(ke.indexOf(vn)!==-1||!tt){W.resetDragState();return}if(W.delayedDragEnterLogic||(W.delayedDragEnterLogic={}),Object.keys(W.delayedDragEnterLogic).forEach(function(ie){clearTimeout(W.delayedDragEnterLogic[ie])}),I.props.eventKey!==le.props.eventKey&&(q.persist(),W.delayedDragEnterLogic[Dt]=window.setTimeout(function(){if(W.state.draggingNodeKey!==null){var ie=(0,A.Z)(De),xe=(0,un.Z)(Te,le.props.eventKey);xe&&(xe.children||[]).length&&(ie=(0,st.L0)(De,le.props.eventKey)),"expandedKeys"in W.props||W.setExpandedKeys(ie),Ze==null||Ze(ie,{node:(0,Se.F)(le.props),expanded:!0,nativeEvent:q.nativeEvent})}},800)),I.props.eventKey===vn&&Pe===0){W.resetDragState();return}W.setState({dragOverNodeKey:he,dropPosition:oe,dropLevelOffset:Pe,dropTargetKey:vn,dropContainerKey:je,dropTargetPos:He,dropAllowed:tt}),Qe==null||Qe({event:q,node:(0,Se.F)(le.props),expandedKeys:De})},W.onNodeDragOver=function(q,le){var pe=W.state,De=pe.dragChildrenKeys,Te=pe.flattenNodes,ke=pe.keyEntities,Oe=pe.expandedKeys,Ne=pe.indent,nt=W.props,Qe=nt.onDragOver,Ze=nt.allowDrop,pt=nt.direction,vt=(0,fe.Z)(W),ct=vt.dragNode;if(ct){var Dt=(0,st.OM)(q,ct,le,Ne,W.dragStartMousePosition,Ze,Te,ke,Oe,pt),Ut=Dt.dropPosition,w=Dt.dropLevelOffset,I=Dt.dropTargetKey,dt=Dt.dropContainerKey,oe=Dt.dropAllowed,Pe=Dt.dropTargetPos,vn=Dt.dragOverNodeKey;De.indexOf(I)!==-1||!oe||(ct.props.eventKey===I&&w===0?W.state.dropPosition===null&&W.state.dropLevelOffset===null&&W.state.dropTargetKey===null&&W.state.dropContainerKey===null&&W.state.dropTargetPos===null&&W.state.dropAllowed===!1&&W.state.dragOverNodeKey===null||W.resetDragState():Ut===W.state.dropPosition&&w===W.state.dropLevelOffset&&I===W.state.dropTargetKey&&dt===W.state.dropContainerKey&&Pe===W.state.dropTargetPos&&oe===W.state.dropAllowed&&vn===W.state.dragOverNodeKey||W.setState({dropPosition:Ut,dropLevelOffset:w,dropTargetKey:I,dropContainerKey:dt,dropTargetPos:Pe,dropAllowed:oe,dragOverNodeKey:vn}),Qe==null||Qe({event:q,node:(0,Se.F)(le.props)}))}},W.onNodeDragLeave=function(q,le){W.currentMouseOverDroppableNodeKey===le.props.eventKey&&!q.currentTarget.contains(q.relatedTarget)&&(W.resetDragState(),W.currentMouseOverDroppableNodeKey=null);var pe=W.props.onDragLeave;pe==null||pe({event:q,node:(0,Se.F)(le.props)})},W.onWindowDragEnd=function(q){W.onNodeDragEnd(q,null,!0),window.removeEventListener("dragend",W.onWindowDragEnd)},W.onNodeDragEnd=function(q,le){var pe=W.props.onDragEnd;W.setState({dragOverNodeKey:null}),W.cleanDragState(),pe==null||pe({event:q,node:(0,Se.F)(le.props)}),W.dragNode=null,window.removeEventListener("dragend",W.onWindowDragEnd)},W.onNodeDrop=function(q,le){var pe,De=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1,Te=W.state,ke=Te.dragChildrenKeys,Oe=Te.dropPosition,Ne=Te.dropTargetKey,nt=Te.dropTargetPos,Qe=Te.dropAllowed;if(Qe){var Ze=W.props.onDrop;if(W.setState({dragOverNodeKey:null}),W.cleanDragState(),Ne!==null){var pt=(0,_e.Z)((0,_e.Z)({},(0,Se.H8)(Ne,W.getTreeNodeRequiredProps())),{},{active:((pe=W.getActiveItem())===null||pe===void 0?void 0:pe.key)===Ne,data:(0,un.Z)(W.state.keyEntities,Ne).node}),vt=ke.indexOf(Ne)!==-1;(0,T.ZP)(!vt,"Can not drop to dragNode's children node. This is a bug of rc-tree. Please report an issue.");var ct=(0,st.yx)(nt),Dt={event:q,node:(0,Se.F)(pt),dragNode:W.dragNode?(0,Se.F)(W.dragNode.props):null,dragNodesKeys:[W.dragNode.props.eventKey].concat(ke),dropToGap:Oe!==0,dropPosition:Oe+Number(ct[ct.length-1])};De||Ze==null||Ze(Dt),W.dragNode=null}}},W.cleanDragState=function(){var q=W.state.draggingNodeKey;q!==null&&W.setState({draggingNodeKey:null,dropPosition:null,dropContainerKey:null,dropTargetKey:null,dropLevelOffset:null,dropAllowed:!0,dragOverNodeKey:null}),W.dragStartMousePosition=null,W.currentMouseOverDroppableNodeKey=null},W.triggerExpandActionExpand=function(q,le){var pe=W.state,De=pe.expandedKeys,Te=pe.flattenNodes,ke=le.expanded,Oe=le.key,Ne=le.isLeaf;if(!(Ne||q.shiftKey||q.metaKey||q.ctrlKey)){var nt=Te.filter(function(Ze){return Ze.key===Oe})[0],Qe=(0,Se.F)((0,_e.Z)((0,_e.Z)({},(0,Se.H8)(Oe,W.getTreeNodeRequiredProps())),{},{data:nt.data}));W.setExpandedKeys(ke?(0,st._5)(De,Oe):(0,st.L0)(De,Oe)),W.onNodeExpand(q,Qe)}},W.onNodeClick=function(q,le){var pe=W.props,De=pe.onClick,Te=pe.expandAction;Te==="click"&&W.triggerExpandActionExpand(q,le),De==null||De(q,le)},W.onNodeDoubleClick=function(q,le){var pe=W.props,De=pe.onDoubleClick,Te=pe.expandAction;Te==="doubleClick"&&W.triggerExpandActionExpand(q,le),De==null||De(q,le)},W.onNodeSelect=function(q,le){var pe=W.state.selectedKeys,De=W.state,Te=De.keyEntities,ke=De.fieldNames,Oe=W.props,Ne=Oe.onSelect,nt=Oe.multiple,Qe=le.selected,Ze=le[ke.key],pt=!Qe;pt?nt?pe=(0,st.L0)(pe,Ze):pe=[Ze]:pe=(0,st._5)(pe,Ze);var vt=pe.map(function(ct){var Dt=(0,un.Z)(Te,ct);return Dt?Dt.node:null}).filter(function(ct){return ct});W.setUncontrolledState({selectedKeys:pe}),Ne==null||Ne(pe,{event:"select",selected:pt,node:le,selectedNodes:vt,nativeEvent:q.nativeEvent})},W.onNodeCheck=function(q,le,pe){var De=W.state,Te=De.keyEntities,ke=De.checkedKeys,Oe=De.halfCheckedKeys,Ne=W.props,nt=Ne.checkStrictly,Qe=Ne.onCheck,Ze=le.key,pt,vt={event:"check",node:le,checked:pe,nativeEvent:q.nativeEvent};if(nt){var ct=pe?(0,st.L0)(ke,Ze):(0,st._5)(ke,Ze),Dt=(0,st._5)(Oe,Ze);pt={checked:ct,halfChecked:Dt},vt.checkedNodes=ct.map(function(Pe){return(0,un.Z)(Te,Pe)}).filter(function(Pe){return Pe}).map(function(Pe){return Pe.node}),W.setUncontrolledState({checkedKeys:ct})}else{var Ut=(0,Kt.S)([].concat((0,A.Z)(ke),[Ze]),!0,Te),w=Ut.checkedKeys,I=Ut.halfCheckedKeys;if(!pe){var dt=new Set(w);dt.delete(Ze);var oe=(0,Kt.S)(Array.from(dt),{checked:!1,halfCheckedKeys:I},Te);w=oe.checkedKeys,I=oe.halfCheckedKeys}pt=w,vt.checkedNodes=[],vt.checkedNodesPositions=[],vt.halfCheckedKeys=I,w.forEach(function(Pe){var vn=(0,un.Z)(Te,Pe);if(vn){var je=vn.node,He=vn.pos;vt.checkedNodes.push(je),vt.checkedNodesPositions.push({node:je,pos:He})}}),W.setUncontrolledState({checkedKeys:w},!1,{halfCheckedKeys:I})}Qe==null||Qe(pt,vt)},W.onNodeLoad=function(q){var le=q.key,pe=new Promise(function(De,Te){W.setState(function(ke){var Oe=ke.loadedKeys,Ne=Oe===void 0?[]:Oe,nt=ke.loadingKeys,Qe=nt===void 0?[]:nt,Ze=W.props,pt=Ze.loadData,vt=Ze.onLoad;if(!pt||Ne.indexOf(le)!==-1||Qe.indexOf(le)!==-1)return null;var ct=pt(q);return ct.then(function(){var Dt=W.state.loadedKeys,Ut=(0,st.L0)(Dt,le);vt==null||vt(Ut,{event:"load",node:q}),W.setUncontrolledState({loadedKeys:Ut}),W.setState(function(w){return{loadingKeys:(0,st._5)(w.loadingKeys,le)}}),De()}).catch(function(Dt){if(W.setState(function(w){return{loadingKeys:(0,st._5)(w.loadingKeys,le)}}),W.loadingRetryTimes[le]=(W.loadingRetryTimes[le]||0)+1,W.loadingRetryTimes[le]>=Ot){var Ut=W.state.loadedKeys;(0,T.ZP)(!1,"Retry for `loadData` many times but still failed. No more retry."),W.setUncontrolledState({loadedKeys:(0,st.L0)(Ut,le)}),De()}Te(Dt)}),{loadingKeys:(0,st.L0)(Qe,le)}})});return pe.catch(function(){}),pe},W.onNodeMouseEnter=function(q,le){var pe=W.props.onMouseEnter;pe==null||pe({event:q,node:le})},W.onNodeMouseLeave=function(q,le){var pe=W.props.onMouseLeave;pe==null||pe({event:q,node:le})},W.onNodeContextMenu=function(q,le){var pe=W.props.onRightClick;pe&&(q.preventDefault(),pe({event:q,node:le}))},W.onFocus=function(){var q=W.props.onFocus;W.setState({focused:!0});for(var le=arguments.length,pe=new Array(le),De=0;De<le;De++)pe[De]=arguments[De];q==null||q.apply(void 0,pe)},W.onBlur=function(){var q=W.props.onBlur;W.setState({focused:!1}),W.onActiveChange(null);for(var le=arguments.length,pe=new Array(le),De=0;De<le;De++)pe[De]=arguments[De];q==null||q.apply(void 0,pe)},W.getTreeNodeRequiredProps=function(){var q=W.state,le=q.expandedKeys,pe=q.selectedKeys,De=q.loadedKeys,Te=q.loadingKeys,ke=q.checkedKeys,Oe=q.halfCheckedKeys,Ne=q.dragOverNodeKey,nt=q.dropPosition,Qe=q.keyEntities;return{expandedKeys:le||[],selectedKeys:pe||[],loadedKeys:De||[],loadingKeys:Te||[],checkedKeys:ke||[],halfCheckedKeys:Oe||[],dragOverNodeKey:Ne,dropPosition:nt,keyEntities:Qe}},W.setExpandedKeys=function(q){var le=W.state,pe=le.treeData,De=le.fieldNames,Te=(0,Se.oH)(pe,q,De);W.setUncontrolledState({expandedKeys:q,flattenNodes:Te},!0)},W.onNodeExpand=function(q,le){var pe=W.state.expandedKeys,De=W.state,Te=De.listChanging,ke=De.fieldNames,Oe=W.props,Ne=Oe.onExpand,nt=Oe.loadData,Qe=le.expanded,Ze=le[ke.key];if(!Te){var pt=pe.indexOf(Ze),vt=!Qe;if((0,T.ZP)(Qe&&pt!==-1||!Qe&&pt===-1,"Expand state not sync with index check"),vt?pe=(0,st.L0)(pe,Ze):pe=(0,st._5)(pe,Ze),W.setExpandedKeys(pe),Ne==null||Ne(pe,{node:le,expanded:vt,nativeEvent:q.nativeEvent}),vt&&nt){var ct=W.onNodeLoad(le);ct&&ct.then(function(){var Dt=(0,Se.oH)(W.state.treeData,pe,ke);W.setUncontrolledState({flattenNodes:Dt})}).catch(function(){var Dt=W.state.expandedKeys,Ut=(0,st._5)(Dt,Ze);W.setExpandedKeys(Ut)})}}},W.onListChangeStart=function(){W.setUncontrolledState({listChanging:!0})},W.onListChangeEnd=function(){setTimeout(function(){W.setUncontrolledState({listChanging:!1})})},W.onActiveChange=function(q){var le=W.state.activeKey,pe=W.props.onActiveChange;le!==q&&(W.setState({activeKey:q}),q!==null&&W.scrollTo({key:q}),pe==null||pe(q))},W.getActiveItem=function(){var q=W.state,le=q.activeKey,pe=q.flattenNodes;return le===null?null:pe.find(function(De){var Te=De.key;return Te===le})||null},W.offsetActiveKey=function(q){var le=W.state,pe=le.flattenNodes,De=le.activeKey,Te=pe.findIndex(function(Ne){var nt=Ne.key;return nt===De});Te===-1&&q<0&&(Te=pe.length),Te=(Te+q+pe.length)%pe.length;var ke=pe[Te];if(ke){var Oe=ke.key;W.onActiveChange(Oe)}else W.onActiveChange(null)},W.onKeyDown=function(q){var le=W.state,pe=le.activeKey,De=le.expandedKeys,Te=le.checkedKeys,ke=le.fieldNames,Oe=W.props,Ne=Oe.onKeyDown,nt=Oe.checkable,Qe=Oe.selectable;switch(q.which){case x.Z.UP:{W.offsetActiveKey(-1),q.preventDefault();break}case x.Z.DOWN:{W.offsetActiveKey(1),q.preventDefault();break}}var Ze=W.getActiveItem();if(Ze&&Ze.data){var pt=W.getTreeNodeRequiredProps(),vt=Ze.data.isLeaf===!1||!!(Ze.data[ke.children]||[]).length,ct=(0,Se.F)((0,_e.Z)((0,_e.Z)({},(0,Se.H8)(pe,pt)),{},{data:Ze.data,active:!0}));switch(q.which){case x.Z.LEFT:{vt&&De.includes(pe)?W.onNodeExpand({},ct):Ze.parent&&W.onActiveChange(Ze.parent.key),q.preventDefault();break}case x.Z.RIGHT:{vt&&!De.includes(pe)?W.onNodeExpand({},ct):Ze.children&&Ze.children.length&&W.onActiveChange(Ze.children[0].key),q.preventDefault();break}case x.Z.ENTER:case x.Z.SPACE:{nt&&!ct.disabled&&ct.checkable!==!1&&!ct.disableCheckbox?W.onNodeCheck({},ct,!Te.includes(pe)):!nt&&Qe&&!ct.disabled&&ct.selectable!==!1&&W.onNodeSelect({},ct);break}}}Ne==null||Ne(q)},W.setUncontrolledState=function(q){var le=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,pe=arguments.length>2&&arguments[2]!==void 0?arguments[2]:null;if(!W.destroyed){var De=!1,Te=!0,ke={};Object.keys(q).forEach(function(Oe){if(Oe in W.props){Te=!1;return}De=!0,ke[Oe]=q[Oe]}),De&&(!le||Te)&&W.setState((0,_e.Z)((0,_e.Z)({},ke),pe))}},W.scrollTo=function(q){W.listRef.current.scrollTo(q)},W}return(0,be.Z)(se,[{key:"componentDidMount",value:function(){this.destroyed=!1,this.onUpdated()}},{key:"componentDidUpdate",value:function(){this.onUpdated()}},{key:"onUpdated",value:function(){var Ie=this.props.activeKey;Ie!==void 0&&Ie!==this.state.activeKey&&(this.setState({activeKey:Ie}),Ie!==null&&this.scrollTo({key:Ie}))}},{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 Ie,M=this.state,ce=M.focused,q=M.flattenNodes,le=M.keyEntities,pe=M.draggingNodeKey,De=M.activeKey,Te=M.dropLevelOffset,ke=M.dropContainerKey,Oe=M.dropTargetKey,Ne=M.dropPosition,nt=M.dragOverNodeKey,Qe=M.indent,Ze=this.props,pt=Ze.prefixCls,vt=Ze.className,ct=Ze.style,Dt=Ze.showLine,Ut=Ze.focusable,w=Ze.tabIndex,I=w===void 0?0:w,dt=Ze.selectable,oe=Ze.showIcon,Pe=Ze.icon,vn=Ze.switcherIcon,je=Ze.draggable,He=Ze.checkable,tt=Ze.checkStrictly,he=Ze.disabled,ie=Ze.motion,xe=Ze.loadData,Fe=Ze.filterTreeNode,V=Ze.height,at=Ze.itemHeight,Ce=Ze.virtual,It=Ze.titleRender,Bt=Ze.dropIndicatorRender,an=Ze.onContextMenu,en=Ze.onScroll,Mt=Ze.direction,tn=Ze.rootClassName,Ue=Ze.rootStyle,bt=(0,S.Z)(this.props,{aria:!0,data:!0}),wt;return je&&((0,ge.Z)(je)==="object"?wt=je:typeof je=="function"?wt={nodeDraggable:je}:wt={}),z.createElement(ae.k.Provider,{value:{prefixCls:pt,selectable:dt,showIcon:oe,icon:Pe,switcherIcon:vn,draggable:wt,draggingNodeKey:pe,checkable:He,checkStrictly:tt,disabled:he,keyEntities:le,dropLevelOffset:Te,dropContainerKey:ke,dropTargetKey:Oe,dropPosition:Ne,dragOverNodeKey:nt,indent:Qe,direction:Mt,dropIndicatorRender:Bt,loadData:xe,filterTreeNode:Fe,titleRender:It,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}},z.createElement("div",{role:"tree",className:v()(pt,vt,tn,(Ie={},(0,Q.Z)(Ie,"".concat(pt,"-show-line"),Dt),(0,Q.Z)(Ie,"".concat(pt,"-focused"),ce),(0,Q.Z)(Ie,"".concat(pt,"-active-focused"),De!==null),Ie)),style:Ue},z.createElement(_t,(0,L.Z)({ref:this.listRef,prefixCls:pt,style:ct,data:q,disabled:he,selectable:dt,checkable:!!He,motion:ie,dragging:pe!==null,height:V,itemHeight:at,virtual:Ce,focusable:Ut,focused:ce,tabIndex:I,activeItem:this.getActiveItem(),onFocus:this.onFocus,onBlur:this.onBlur,onKeyDown:this.onKeyDown,onActiveChange:this.onActiveChange,onListChangeStart:this.onListChangeStart,onListChangeEnd:this.onListChangeEnd,onContextMenu:an,onScroll:en},this.getTreeNodeRequiredProps(),bt))))}}],[{key:"getDerivedStateFromProps",value:function(Ie,M){var ce=M.prevProps,q={prevProps:Ie};function le(Ut){return!ce&&Ut in Ie||ce&&ce[Ut]!==Ie[Ut]}var pe,De=M.fieldNames;if(le("fieldNames")&&(De=(0,Se.w$)(Ie.fieldNames),q.fieldNames=De),le("treeData")?pe=Ie.treeData:le("children")&&((0,T.ZP)(!1,"`children` of Tree is deprecated. Please use `treeData` instead."),pe=(0,Se.zn)(Ie.children)),pe){q.treeData=pe;var Te=(0,Se.I8)(pe,{fieldNames:De});q.keyEntities=(0,_e.Z)((0,Q.Z)({},E,me),Te.keyEntities)}var ke=q.keyEntities||M.keyEntities;if(le("expandedKeys")||ce&&le("autoExpandParent"))q.expandedKeys=Ie.autoExpandParent||!ce&&Ie.defaultExpandParent?(0,st.r7)(Ie.expandedKeys,ke):Ie.expandedKeys;else if(!ce&&Ie.defaultExpandAll){var Oe=(0,_e.Z)({},ke);delete Oe[E],q.expandedKeys=Object.keys(Oe).map(function(Ut){return Oe[Ut].key})}else!ce&&Ie.defaultExpandedKeys&&(q.expandedKeys=Ie.autoExpandParent||Ie.defaultExpandParent?(0,st.r7)(Ie.defaultExpandedKeys,ke):Ie.defaultExpandedKeys);if(q.expandedKeys||delete q.expandedKeys,pe||q.expandedKeys){var Ne=(0,Se.oH)(pe||M.treeData,q.expandedKeys||M.expandedKeys,De);q.flattenNodes=Ne}if(Ie.selectable&&(le("selectedKeys")?q.selectedKeys=(0,st.BT)(Ie.selectedKeys,Ie):!ce&&Ie.defaultSelectedKeys&&(q.selectedKeys=(0,st.BT)(Ie.defaultSelectedKeys,Ie))),Ie.checkable){var nt;if(le("checkedKeys")?nt=(0,st.E6)(Ie.checkedKeys)||{}:!ce&&Ie.defaultCheckedKeys?nt=(0,st.E6)(Ie.defaultCheckedKeys)||{}:pe&&(nt=(0,st.E6)(Ie.checkedKeys)||{checkedKeys:M.checkedKeys,halfCheckedKeys:M.halfCheckedKeys}),nt){var Qe=nt,Ze=Qe.checkedKeys,pt=Ze===void 0?[]:Ze,vt=Qe.halfCheckedKeys,ct=vt===void 0?[]:vt;if(!Ie.checkStrictly){var Dt=(0,Kt.S)(pt,!0,ke);pt=Dt.checkedKeys,ct=Dt.halfCheckedKeys}q.checkedKeys=pt,q.halfCheckedKeys=ct}}return le("loadedKeys")&&(q.loadedKeys=Ie.loadedKeys),q}}]),se}(z.Component);Vt.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:B,allowDrop:function(){return!0},expandAction:!1},Vt.TreeNode=$.Z;var lt=Vt,At=lt},35654:function(ln,et,m){"use strict";m.d(et,{BT:function(){return z},E6:function(){return U},L0:function(){return k},OM:function(){return T},_5:function(){return o},r7:function(){return X},wA:function(){return v},yx:function(){return N}});var L=m(80702),Q=m(62853),ge=m(48736),_e=m(59301),A=m(39417),p=m(67841),be=m(71430),fe=null;function o(Z,D){if(!Z)return[];var C=Z.slice(),K=C.indexOf(D);return K>=0&&C.splice(K,1),C}function k(Z,D){var C=(Z||[]).slice();return C.indexOf(D)===-1&&C.push(D),C}function N(Z){return Z.split("-")}function v(Z,D){var C=[],K=(0,p.Z)(D,Z);function $(){var ve=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[];ve.forEach(function(Se){var Le=Se.key,ye=Se.children;C.push(Le),$(ye)})}return $(K.children),C}function x(Z){if(Z.parent){var D=N(Z.pos);return Number(D[D.length-1])===Z.parent.children.length-1}return!1}function S(Z){var D=N(Z.pos);return Number(D[D.length-1])===0}function T(Z,D,C,K,$,ve,Se,Le,ye,te){var j,ue=Z.clientX,R=Z.clientY,ee=Z.target.getBoundingClientRect(),G=ee.top,y=ee.height,E=(te==="rtl"?-1:1)*((($==null?void 0:$.x)||0)-ue),Y=(E-12)/K,me=(0,p.Z)(Le,C.props.eventKey);if(R<G+y/2){var $e=Se.findIndex(function(At){return At.key===me.key}),We=$e<=0?0:$e-1,qe=Se[We].key;me=(0,p.Z)(Le,qe)}var Xe=me.key,gt=me,_t=me.key,st=0,Kt=0;if(!ye.includes(Xe))for(var un=0;un<Y&&x(me);un+=1)me=me.parent,Kt+=1;var Ot=D.props.data,Vt=me.node,lt=!0;return S(me)&&me.level===0&&R<G+y/2&&ve({dragNode:Ot,dropNode:Vt,dropPosition:-1})&&me.key===C.props.eventKey?st=-1:(gt.children||[]).length&&ye.includes(_t)?ve({dragNode:Ot,dropNode:Vt,dropPosition:0})?st=0:lt=!1:Kt===0?Y>-1.5?ve({dragNode:Ot,dropNode:Vt,dropPosition:1})?st=1:lt=!1:ve({dragNode:Ot,dropNode:Vt,dropPosition:0})?st=0:ve({dragNode:Ot,dropNode:Vt,dropPosition:1})?st=1:lt=!1:ve({dragNode:Ot,dropNode:Vt,dropPosition:1})?st=1:lt=!1,{dropPosition:st,dropLevelOffset:Kt,dropTargetKey:me.key,dropTargetPos:me.pos,dragOverNodeKey:_t,dropContainerKey:st===0?null:((j=me.parent)===null||j===void 0?void 0:j.key)||null,dropAllowed:lt}}function z(Z,D){if(Z){var C=D.multiple;return C?Z.slice():Z.length?[Z[0]]:Z}}var ae=function(D){return D};function B(Z,D){if(!Z)return[];var C=D||{},K=C.processProps,$=K===void 0?ae:K,ve=Array.isArray(Z)?Z:[Z];return ve.map(function(Se){var Le=Se.children,ye=_objectWithoutProperties(Se,fe),te=B(Le,D);return React.createElement(TreeNode,_extends({key:ye.key},$(ye)),te)})}function U(Z){if(!Z)return null;var D;if(Array.isArray(Z))D={checkedKeys:Z,halfCheckedKeys:void 0};else if((0,Q.Z)(Z)==="object")D={checkedKeys:Z.checked||void 0,halfCheckedKeys:Z.halfChecked||void 0};else return(0,ge.ZP)(!1,"`checkedKeys` is not an array or an object"),null;return D}function X(Z,D){var C=new Set;function K($){if(!C.has($)){var ve=(0,p.Z)(D,$);if(ve){C.add($);var Se=ve.parent,Le=ve.node;Le.disabled||Se&&K(Se.key)}}}return(Z||[]).forEach(function($){K($)}),(0,L.Z)(C)}},90782:function(ln,et,m){"use strict";m.d(et,{S:function(){return be}});var L=m(48736),Q=m(67841);function ge(fe,o){var k=new Set;return fe.forEach(function(N){o.has(N)||k.add(N)}),k}function _e(fe){var o=fe||{},k=o.disabled,N=o.disableCheckbox,v=o.checkable;return!!(k||N)||v===!1}function A(fe,o,k,N){for(var v=new Set(fe),x=new Set,S=0;S<=k;S+=1){var T=o.get(S)||new Set;T.forEach(function(U){var X=U.key,Z=U.node,D=U.children,C=D===void 0?[]:D;v.has(X)&&!N(Z)&&C.filter(function(K){return!N(K.node)}).forEach(function(K){v.add(K.key)})})}for(var z=new Set,ae=k;ae>=0;ae-=1){var B=o.get(ae)||new Set;B.forEach(function(U){var X=U.parent,Z=U.node;if(!(N(Z)||!U.parent||z.has(U.parent.key))){if(N(U.parent.node)){z.add(X.key);return}var D=!0,C=!1;(X.children||[]).filter(function(K){return!N(K.node)}).forEach(function(K){var $=K.key,ve=v.has($);D&&!ve&&(D=!1),!C&&(ve||x.has($))&&(C=!0)}),D&&v.add(X.key),C&&x.add(X.key),z.add(X.key)}})}return{checkedKeys:Array.from(v),halfCheckedKeys:Array.from(ge(x,v))}}function p(fe,o,k,N,v){for(var x=new Set(fe),S=new Set(o),T=0;T<=N;T+=1){var z=k.get(T)||new Set;z.forEach(function(X){var Z=X.key,D=X.node,C=X.children,K=C===void 0?[]:C;!x.has(Z)&&!S.has(Z)&&!v(D)&&K.filter(function($){return!v($.node)}).forEach(function($){x.delete($.key)})})}S=new Set;for(var ae=new Set,B=N;B>=0;B-=1){var U=k.get(B)||new Set;U.forEach(function(X){var Z=X.parent,D=X.node;if(!(v(D)||!X.parent||ae.has(X.parent.key))){if(v(X.parent.node)){ae.add(Z.key);return}var C=!0,K=!1;(Z.children||[]).filter(function($){return!v($.node)}).forEach(function($){var ve=$.key,Se=x.has(ve);C&&!Se&&(C=!1),!K&&(Se||S.has(ve))&&(K=!0)}),C||x.delete(Z.key),K&&S.add(Z.key),ae.add(Z.key)}})}return{checkedKeys:Array.from(x),halfCheckedKeys:Array.from(ge(S,x))}}function be(fe,o,k,N){var v=[],x;N?x=N:x=_e;var S=new Set(fe.filter(function(B){var U=!!(0,Q.Z)(k,B);return U||v.push(B),U})),T=new Map,z=0;Object.keys(k).forEach(function(B){var U=k[B],X=U.level,Z=T.get(X);Z||(Z=new Set,T.set(X,Z)),Z.add(U),z=Math.max(z,X)}),(0,L.ZP)(!v.length,"Tree missing follow keys: ".concat(v.slice(0,100).map(function(B){return"'".concat(B,"'")}).join(", ")));var ae;return o===!0?ae=A(S,T,z,x):ae=p(S,o.halfCheckedKeys,T,z,x),ae}},67841:function(ln,et,m){"use strict";m.d(et,{Z:function(){return L}});function L(Q,ge){return Q[ge]}},71430:function(ln,et,m){"use strict";m.d(et,{F:function(){return X},H8:function(){return U},I8:function(){return B},km:function(){return v},oH:function(){return z},w$:function(){return x},zn:function(){return T}});var L=m(62853),Q=m(80702),ge=m(77321),_e=m(74416),A=m(11592),p=m(2738),be=m(48736),fe=m(67841),o=["children"];function k(Z,D){return"".concat(Z,"-").concat(D)}function N(Z){return Z&&Z.type&&Z.type.isTreeNode}function v(Z,D){return Z!=null?Z:D}function x(Z){var D=Z||{},C=D.title,K=D._title,$=D.key,ve=D.children,Se=C||"title";return{title:Se,_title:K||[Se],key:$||"key",children:ve||"children"}}function S(Z,D){var C=new Map;function K($){var ve=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"";($||[]).forEach(function(Se){var Le=Se[D.key],ye=Se[D.children];warning(Le!=null,"Tree node must have a certain key: [".concat(ve).concat(Le,"]"));var te=String(Le);warning(!C.has(te)||Le===null||Le===void 0,"Same 'key' exist in the Tree: ".concat(te)),C.set(te,!0),K(ye,"".concat(ve).concat(te," > "))})}K(Z)}function T(Z){function D(C){var K=(0,A.Z)(C);return K.map(function($){if(!N($))return(0,be.ZP)(!$,"Tree/TreeNode can only accept TreeNode as children."),null;var ve=$.key,Se=$.props,Le=Se.children,ye=(0,_e.Z)(Se,o),te=(0,ge.Z)({key:ve},ye),j=D(Le);return j.length&&(te.children=j),te}).filter(function($){return $})}return D(Z)}function z(Z,D,C){var K=x(C),$=K._title,ve=K.key,Se=K.children,Le=new Set(D===!0?[]:D),ye=[];function te(j){var ue=arguments.length>1&&arguments[1]!==void 0?arguments[1]:null;return j.map(function(R,ee){for(var G=k(ue?ue.pos:"0",ee),y=v(R[ve],G),E,Y=0;Y<$.length;Y+=1){var me=$[Y];if(R[me]!==void 0){E=R[me];break}}var $e=(0,ge.Z)((0,ge.Z)({},(0,p.Z)(R,[].concat((0,Q.Z)($),[ve,Se]))),{},{title:E,key:y,parent:ue,pos:G,children:null,data:R,isStart:[].concat((0,Q.Z)(ue?ue.isStart:[]),[ee===0]),isEnd:[].concat((0,Q.Z)(ue?ue.isEnd:[]),[ee===j.length-1])});return ye.push($e),D===!0||Le.has(y)?$e.children=te(R[Se]||[],$e):$e.children=[],$e})}return te(Z),ye}function ae(Z,D,C){var K={};(0,L.Z)(C)==="object"?K=C:K={externalGetKey:C},K=K||{};var $=K,ve=$.childrenPropName,Se=$.externalGetKey,Le=$.fieldNames,ye=x(Le),te=ye.key,j=ye.children,ue=ve||j,R;Se?typeof Se=="string"?R=function(y){return y[Se]}:typeof Se=="function"&&(R=function(y){return Se(y)}):R=function(y,E){return v(y[te],E)};function ee(G,y,E,Y){var me=G?G[ue]:Z,$e=G?k(E.pos,y):"0",We=G?[].concat((0,Q.Z)(Y),[G]):[];if(G){var qe=R(G,$e),Xe={node:G,index:y,pos:$e,key:qe,parentPos:E.node?E.pos:null,level:E.level+1,nodes:We};D(Xe)}me&&me.forEach(function(gt,_t){ee(gt,_t,{node:G,pos:$e,level:E?E.level+1:-1},We)})}ee(null)}function B(Z){var D=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},C=D.initWrapper,K=D.processEntity,$=D.onProcessFinished,ve=D.externalGetKey,Se=D.childrenPropName,Le=D.fieldNames,ye=arguments.length>2?arguments[2]:void 0,te=ve||ye,j={},ue={},R={posEntities:j,keyEntities:ue};return C&&(R=C(R)||R),ae(Z,function(ee){var G=ee.node,y=ee.index,E=ee.pos,Y=ee.key,me=ee.parentPos,$e=ee.level,We=ee.nodes,qe={node:G,nodes:We,index:y,key:Y,pos:E,level:$e},Xe=v(Y,E);j[E]=qe,ue[Xe]=qe,qe.parent=j[me],qe.parent&&(qe.parent.children=qe.parent.children||[],qe.parent.children.push(qe)),K&&K(qe,R)},{externalGetKey:te,childrenPropName:Se,fieldNames:Le}),$&&$(R),R}function U(Z,D){var C=D.expandedKeys,K=D.selectedKeys,$=D.loadedKeys,ve=D.loadingKeys,Se=D.checkedKeys,Le=D.halfCheckedKeys,ye=D.dragOverNodeKey,te=D.dropPosition,j=D.keyEntities,ue=(0,fe.Z)(j,Z),R={eventKey:Z,expanded:C.indexOf(Z)!==-1,selected:K.indexOf(Z)!==-1,loaded:$.indexOf(Z)!==-1,loading:ve.indexOf(Z)!==-1,checked:Se.indexOf(Z)!==-1,halfChecked:Le.indexOf(Z)!==-1,pos:String(ue?ue.pos:""),dragOver:ye===Z&&te===0,dragOverGapTop:ye===Z&&te===-1,dragOverGapBottom:ye===Z&&te===1};return R}function X(Z){var D=Z.data,C=Z.expanded,K=Z.selected,$=Z.checked,ve=Z.loaded,Se=Z.loading,Le=Z.halfChecked,ye=Z.dragOver,te=Z.dragOverGapTop,j=Z.dragOverGapBottom,ue=Z.pos,R=Z.active,ee=Z.eventKey,G=(0,ge.Z)((0,ge.Z)({},D),{},{expanded:C,selected:K,checked:$,loaded:ve,loading:Se,halfChecked:Le,dragOver:ye,dragOverGapTop:te,dragOverGapBottom:j,pos:ue,active:R,key:ee});return"props"in G||Object.defineProperty(G,"props",{get:function(){return(0,be.ZP)(!1,"Second param return from event is node data instead of TreeNode instance. Please read value directly instead of reading from `props`."),Z}}),G}},49658:function(ln,et){"use strict";et.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))}},45680:function(ln,et,m){"use strict";m.d(et,{Z:function(){return Vt}});var L=m(72308),Q=m(62853),ge=m(77321),_e=m(49618),A=m(52487),p=m(74416),be=m(92310),fe=m.n(be),o=m(29301),k=m(70425),N=m(34280),v=m(59301),x=m(4676),S=v.forwardRef(function(lt,At){var ne=lt.height,de=lt.offsetY,se=lt.offsetX,W=lt.children,Ie=lt.prefixCls,M=lt.onInnerResize,ce=lt.innerProps,q=lt.rtl,le=lt.extra,pe={},De={display:"flex",flexDirection:"column"};return de!==void 0&&(pe={height:ne,position:"relative",overflow:"hidden"},De=(0,ge.Z)((0,ge.Z)({},De),{},(0,_e.Z)((0,_e.Z)((0,_e.Z)((0,_e.Z)((0,_e.Z)({transform:"translateY(".concat(de,"px)")},q?"marginRight":"marginLeft",-se),"position","absolute"),"left",0),"right",0),"top",0))),v.createElement("div",{style:pe},v.createElement(o.Z,{onResize:function(ke){var Oe=ke.offsetHeight;Oe&&M&&M()}},v.createElement("div",(0,L.Z)({style:De,className:fe()((0,_e.Z)({},"".concat(Ie,"-holder-inner"),Ie)),ref:At},ce),W,le)))});S.displayName="Filler";var T=S;function z(lt){var At=lt.children,ne=lt.setRef,de=v.useCallback(function(se){ne(se)},[]);return v.cloneElement(At,{ref:de})}function ae(lt,At,ne,de,se,W,Ie,M){var ce=M.getKey;return lt.slice(At,ne+1).map(function(q,le){var pe=At+le,De=Ie(q,pe,{style:{width:de},offsetX:se}),Te=ce(q);return v.createElement(z,{key:Te,setRef:function(Oe){return W(q,Oe)}},De)})}function B(lt,At,ne,de){var se=ne-lt,W=At-ne,Ie=Math.min(se,W)*2;if(de<=Ie){var M=Math.floor(de/2);return de%2?ne+M+1:ne-M}return se>W?ne-(de-W):ne+(de-se)}function U(lt,At,ne){var de=lt.length,se=At.length,W,Ie;if(de===0&&se===0)return null;de<se?(W=lt,Ie=At):(W=At,Ie=lt);var M={__EMPTY_ITEM__:!0};function ce(ke){return ke!==void 0?ne(ke):M}for(var q=null,le=Math.abs(de-se)!==1,pe=0;pe<Ie.length;pe+=1){var De=ce(W[pe]),Te=ce(Ie[pe]);if(De!==Te){q=pe,le=le||De!==ce(Ie[pe+1]);break}}return q===null?null:{index:q,multiple:le}}function X(lt,At,ne){var de=v.useState(lt),se=(0,A.Z)(de,2),W=se[0],Ie=se[1],M=v.useState(null),ce=(0,A.Z)(M,2),q=ce[0],le=ce[1];return v.useEffect(function(){var pe=U(W||[],lt||[],At);(pe==null?void 0:pe.index)!==void 0&&(ne==null||ne(pe.index),le(lt[pe.index])),Ie(lt)},[lt]),[q]}var Z=m(16089),D=(typeof navigator=="undefined"?"undefined":(0,Q.Z)(navigator))==="object"&&/Firefox/i.test(navigator.userAgent),C=D,K=function(lt,At,ne,de){var se=(0,v.useRef)(!1),W=(0,v.useRef)(null);function Ie(){clearTimeout(W.current),se.current=!0,W.current=setTimeout(function(){se.current=!1},50)}var M=(0,v.useRef)({top:lt,bottom:At,left:ne,right:de});return M.current.top=lt,M.current.bottom=At,M.current.left=ne,M.current.right=de,function(ce,q){var le=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1,pe=ce?q<0&&M.current.left||q>0&&M.current.right:q<0&&M.current.top||q>0&&M.current.bottom;return le&&pe?(clearTimeout(W.current),se.current=!1):(!pe||se.current)&&Ie(),!se.current&&pe}};function $(lt,At,ne,de,se,W,Ie){var M=(0,v.useRef)(0),ce=(0,v.useRef)(null),q=(0,v.useRef)(null),le=(0,v.useRef)(!1),pe=K(At,ne,de,se);function De(Qe,Ze){if(Z.Z.cancel(ce.current),!pe(!1,Ze)){var pt=Qe;if(!pt._virtualHandled)pt._virtualHandled=!0;else return;M.current+=Ze,q.current=Ze,C||pt.preventDefault(),ce.current=(0,Z.Z)(function(){var vt=le.current?10:1;Ie(M.current*vt,!1),M.current=0})}}function Te(Qe,Ze){Ie(Ze,!0),C||Qe.preventDefault()}var ke=(0,v.useRef)(null),Oe=(0,v.useRef)(null);function Ne(Qe){if(lt){Z.Z.cancel(Oe.current),Oe.current=(0,Z.Z)(function(){ke.current=null},2);var Ze=Qe.deltaX,pt=Qe.deltaY,vt=Qe.shiftKey,ct=Ze,Dt=pt;(ke.current==="sx"||!ke.current&&vt&&pt&&!Ze)&&(ct=pt,Dt=0,ke.current="sx");var Ut=Math.abs(ct),w=Math.abs(Dt);ke.current===null&&(ke.current=W&&Ut>w?"x":"y"),ke.current==="y"?De(Qe,Dt):Te(Qe,ct)}}function nt(Qe){lt&&(le.current=Qe.detail===q.current)}return[Ne,nt]}function ve(lt,At,ne,de){var se=v.useMemo(function(){return[new Map,[]]},[lt,ne.id,de]),W=(0,A.Z)(se,2),Ie=W[0],M=W[1],ce=function(le){var pe=arguments.length>1&&arguments[1]!==void 0?arguments[1]:le,De=Ie.get(le),Te=Ie.get(pe);if(De===void 0||Te===void 0)for(var ke=lt.length,Oe=M.length;Oe<ke;Oe+=1){var Ne,nt=lt[Oe],Qe=At(nt);Ie.set(Qe,Oe);var Ze=(Ne=ne.get(Qe))!==null&&Ne!==void 0?Ne:de;if(M[Oe]=(M[Oe-1]||0)+Ze,Qe===le&&(De=Oe),Qe===pe&&(Te=Oe),De!==void 0&&Te!==void 0)break}return{top:M[De-1]||0,bottom:M[Te]}};return ce}var Se=m(96949),Le=m(55090),ye=function(){function lt(){(0,Se.Z)(this,lt),(0,_e.Z)(this,"maps",void 0),(0,_e.Z)(this,"id",0),(0,_e.Z)(this,"diffKeys",new Set),this.maps=Object.create(null)}return(0,Le.Z)(lt,[{key:"set",value:function(ne,de){this.maps[ne]=de,this.id+=1,this.diffKeys.add(ne)}},{key:"get",value:function(ne){return this.maps[ne]}},{key:"resetRecord",value:function(){this.diffKeys.clear()}},{key:"getRecord",value:function(){return this.diffKeys}}]),lt}(),te=ye;function j(lt){var At=parseFloat(lt);return isNaN(At)?0:At}function ue(lt,At,ne){var de=v.useState(0),se=(0,A.Z)(de,2),W=se[0],Ie=se[1],M=(0,v.useRef)(new Map),ce=(0,v.useRef)(new te),q=(0,v.useRef)(0);function le(){q.current+=1}function pe(){var Te=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!1;le();var ke=function(){var nt=!1;M.current.forEach(function(Qe,Ze){if(Qe&&Qe.offsetParent){var pt=Qe.offsetHeight,vt=getComputedStyle(Qe),ct=vt.marginTop,Dt=vt.marginBottom,Ut=j(ct),w=j(Dt),I=pt+Ut+w;ce.current.get(Ze)!==I&&(ce.current.set(Ze,I),nt=!0)}}),nt&&Ie(function(Qe){return Qe+1})};if(Te)ke();else{q.current+=1;var Oe=q.current;Promise.resolve().then(function(){Oe===q.current&&ke()})}}function De(Te,ke){var Oe=lt(Te),Ne=M.current.get(Oe);ke?(M.current.set(Oe,ke),pe()):M.current.delete(Oe),!Ne!=!ke&&(ke?At==null||At(Te):ne==null||ne(Te))}return(0,v.useEffect)(function(){return le},[]),[De,pe,ce.current,W]}var R=14/15;function ee(lt,At,ne){var de=(0,v.useRef)(!1),se=(0,v.useRef)(0),W=(0,v.useRef)(0),Ie=(0,v.useRef)(null),M=(0,v.useRef)(null),ce,q=function(Te){if(de.current){var ke=Math.ceil(Te.touches[0].pageX),Oe=Math.ceil(Te.touches[0].pageY),Ne=se.current-ke,nt=W.current-Oe,Qe=Math.abs(Ne)>Math.abs(nt);Qe?se.current=ke:W.current=Oe;var Ze=ne(Qe,Qe?Ne:nt,!1,Te);Ze&&Te.preventDefault(),clearInterval(M.current),Ze&&(M.current=setInterval(function(){Qe?Ne*=R:nt*=R;var pt=Math.floor(Qe?Ne:nt);(!ne(Qe,pt,!0)||Math.abs(pt)<=.1)&&clearInterval(M.current)},16))}},le=function(){de.current=!1,ce()},pe=function(Te){ce(),Te.touches.length===1&&!de.current&&(de.current=!0,se.current=Math.ceil(Te.touches[0].pageX),W.current=Math.ceil(Te.touches[0].pageY),Ie.current=Te.target,Ie.current.addEventListener("touchmove",q,{passive:!1}),Ie.current.addEventListener("touchend",le,{passive:!0}))};ce=function(){Ie.current&&(Ie.current.removeEventListener("touchmove",q),Ie.current.removeEventListener("touchend",le))},(0,N.Z)(function(){return lt&&At.current.addEventListener("touchstart",pe,{passive:!0}),function(){var De;(De=At.current)===null||De===void 0||De.removeEventListener("touchstart",pe),ce(),clearInterval(M.current)}},[lt])}function G(lt){return Math.floor(Math.pow(lt,.5))}function y(lt,At){var ne="touches"in lt?lt.touches[0]:lt;return ne[At?"pageX":"pageY"]-window[At?"scrollX":"scrollY"]}function E(lt,At,ne){v.useEffect(function(){var de=At.current;if(lt&&de){var se=!1,W,Ie,M=function(){Z.Z.cancel(W)},ce=function De(){M(),W=(0,Z.Z)(function(){ne(Ie),De()})},q=function(Te){if(!(Te.target.draggable||Te.button!==0)){var ke=Te;ke._virtualHandled||(ke._virtualHandled=!0,se=!0)}},le=function(){se=!1,M()},pe=function(Te){if(se){var ke=y(Te,!1),Oe=de.getBoundingClientRect(),Ne=Oe.top,nt=Oe.bottom;if(ke<=Ne){var Qe=Ne-ke;Ie=-G(Qe),ce()}else if(ke>=nt){var Ze=ke-nt;Ie=G(Ze),ce()}else M()}};return de.addEventListener("mousedown",q),de.ownerDocument.addEventListener("mouseup",le),de.ownerDocument.addEventListener("mousemove",pe),function(){de.removeEventListener("mousedown",q),de.ownerDocument.removeEventListener("mouseup",le),de.ownerDocument.removeEventListener("mousemove",pe),M()}}},[lt])}var Y=10;function me(lt,At,ne,de,se,W,Ie,M){var ce=v.useRef(),q=v.useState(null),le=(0,A.Z)(q,2),pe=le[0],De=le[1];return(0,N.Z)(function(){if(pe&&pe.times<Y){if(!lt.current){De(function(ie){return(0,ge.Z)({},ie)});return}W();var Te=pe.targetAlign,ke=pe.originAlign,Oe=pe.index,Ne=pe.offset,nt=lt.current.clientHeight,Qe=!1,Ze=Te,pt=null;if(nt){for(var vt=Te||ke,ct=0,Dt=0,Ut=0,w=Math.min(At.length-1,Oe),I=0;I<=w;I+=1){var dt=se(At[I]);Dt=ct;var oe=ne.get(dt);Ut=Dt+(oe===void 0?de:oe),ct=Ut}for(var Pe=vt==="top"?Ne:nt-Ne,vn=w;vn>=0;vn-=1){var je=se(At[vn]),He=ne.get(je);if(He===void 0){Qe=!0;break}if(Pe-=He,Pe<=0)break}switch(vt){case"top":pt=Dt-Ne;break;case"bottom":pt=Ut-nt+Ne;break;default:{var tt=lt.current.scrollTop,he=tt+nt;Dt<tt?Ze="top":Ut>he&&(Ze="bottom")}}pt!==null&&Ie(pt),pt!==pe.lastTop&&(Qe=!0)}Qe&&De((0,ge.Z)((0,ge.Z)({},pe),{},{times:pe.times+1,targetAlign:Ze,lastTop:pt}))}},[pe,lt.current]),function(Te){if(Te==null){M();return}if(Z.Z.cancel(ce.current),typeof Te=="number")Ie(Te);else if(Te&&(0,Q.Z)(Te)==="object"){var ke,Oe=Te.align;"index"in Te?ke=Te.index:ke=At.findIndex(function(Qe){return se(Qe)===Te.key});var Ne=Te.offset,nt=Ne===void 0?0:Ne;De({times:0,index:ke,offset:nt,originAlign:Oe})}}}var $e=v.forwardRef(function(lt,At){var ne=lt.prefixCls,de=lt.rtl,se=lt.scrollOffset,W=lt.scrollRange,Ie=lt.onStartMove,M=lt.onStopMove,ce=lt.onScroll,q=lt.horizontal,le=lt.spinSize,pe=lt.containerSize,De=lt.style,Te=lt.thumbStyle,ke=lt.showScrollBar,Oe=v.useState(!1),Ne=(0,A.Z)(Oe,2),nt=Ne[0],Qe=Ne[1],Ze=v.useState(null),pt=(0,A.Z)(Ze,2),vt=pt[0],ct=pt[1],Dt=v.useState(null),Ut=(0,A.Z)(Dt,2),w=Ut[0],I=Ut[1],dt=!de,oe=v.useRef(),Pe=v.useRef(),vn=v.useState(ke),je=(0,A.Z)(vn,2),He=je[0],tt=je[1],he=v.useRef(),ie=function(){ke===!0||ke===!1||(clearTimeout(he.current),tt(!0),he.current=setTimeout(function(){tt(!1)},3e3))},xe=W-pe||0,Fe=pe-le||0,V=v.useMemo(function(){if(se===0||xe===0)return 0;var Ue=se/xe;return Ue*Fe},[se,xe,Fe]),at=function(bt){bt.stopPropagation(),bt.preventDefault()},Ce=v.useRef({top:V,dragging:nt,pageY:vt,startTop:w});Ce.current={top:V,dragging:nt,pageY:vt,startTop:w};var It=function(bt){Qe(!0),ct(y(bt,q)),I(Ce.current.top),Ie(),bt.stopPropagation(),bt.preventDefault()};v.useEffect(function(){var Ue=function(Ae){Ae.preventDefault()},bt=oe.current,wt=Pe.current;return bt.addEventListener("touchstart",Ue,{passive:!1}),wt.addEventListener("touchstart",It,{passive:!1}),function(){bt.removeEventListener("touchstart",Ue),wt.removeEventListener("touchstart",It)}},[]);var Bt=v.useRef();Bt.current=xe;var an=v.useRef();an.current=Fe,v.useEffect(function(){if(nt){var Ue,bt=function(Ae){var ut=Ce.current,ft=ut.dragging,Nt=ut.pageY,Pt=ut.startTop;Z.Z.cancel(Ue);var Zt=oe.current.getBoundingClientRect(),Ht=pe/(q?Zt.width:Zt.height);if(ft){var sn=(y(Ae,q)-Nt)*Ht,_n=Pt;!dt&&q?_n-=sn:_n+=sn;var hn=Bt.current,Lt=an.current,Ft=Lt?_n/Lt:0,$t=Math.ceil(Ft*hn);$t=Math.max($t,0),$t=Math.min($t,hn),Ue=(0,Z.Z)(function(){ce($t,q)})}},wt=function(){Qe(!1),M()};return window.addEventListener("mousemove",bt,{passive:!0}),window.addEventListener("touchmove",bt,{passive:!0}),window.addEventListener("mouseup",wt,{passive:!0}),window.addEventListener("touchend",wt,{passive:!0}),function(){window.removeEventListener("mousemove",bt),window.removeEventListener("touchmove",bt),window.removeEventListener("mouseup",wt),window.removeEventListener("touchend",wt),Z.Z.cancel(Ue)}}},[nt]),v.useEffect(function(){return ie(),function(){clearTimeout(he.current)}},[se]),v.useImperativeHandle(At,function(){return{delayHidden:ie}});var en="".concat(ne,"-scrollbar"),Mt={position:"absolute",visibility:He?null:"hidden"},tn={position:"absolute",background:"rgba(0, 0, 0, 0.5)",borderRadius:99,cursor:"pointer",userSelect:"none"};return q?(Mt.height=8,Mt.left=0,Mt.right=0,Mt.bottom=0,tn.height="100%",tn.width=le,dt?tn.left=V:tn.right=V):(Mt.width=8,Mt.top=0,Mt.bottom=0,dt?Mt.right=0:Mt.left=0,tn.width="100%",tn.height=le,tn.top=V),v.createElement("div",{ref:oe,className:fe()(en,(0,_e.Z)((0,_e.Z)((0,_e.Z)({},"".concat(en,"-horizontal"),q),"".concat(en,"-vertical"),!q),"".concat(en,"-visible"),He)),style:(0,ge.Z)((0,ge.Z)({},Mt),De),onMouseDown:at,onMouseMove:ie},v.createElement("div",{ref:Pe,className:fe()("".concat(en,"-thumb"),(0,_e.Z)({},"".concat(en,"-thumb-moving"),nt)),style:(0,ge.Z)((0,ge.Z)({},tn),Te),onMouseDown:It}))}),We=$e,qe=20;function Xe(){var lt=arguments.length>0&&arguments[0]!==void 0?arguments[0]:0,At=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,ne=lt/At*lt;return isNaN(ne)&&(ne=0),ne=Math.max(ne,qe),Math.floor(ne)}var gt=["prefixCls","className","height","itemHeight","fullHeight","style","data","children","itemKey","virtual","direction","scrollWidth","component","onScroll","onVirtualScroll","onVisibleChange","innerProps","extraRender","styles","showScrollBar"],_t=[],st={overflowY:"auto",overflowAnchor:"none"};function Kt(lt,At){var ne=lt.prefixCls,de=ne===void 0?"rc-virtual-list":ne,se=lt.className,W=lt.height,Ie=lt.itemHeight,M=lt.fullHeight,ce=M===void 0?!0:M,q=lt.style,le=lt.data,pe=lt.children,De=lt.itemKey,Te=lt.virtual,ke=lt.direction,Oe=lt.scrollWidth,Ne=lt.component,nt=Ne===void 0?"div":Ne,Qe=lt.onScroll,Ze=lt.onVirtualScroll,pt=lt.onVisibleChange,vt=lt.innerProps,ct=lt.extraRender,Dt=lt.styles,Ut=lt.showScrollBar,w=Ut===void 0?"optional":Ut,I=(0,p.Z)(lt,gt),dt=v.useCallback(function(xn){return typeof De=="function"?De(xn):xn==null?void 0:xn[De]},[De]),oe=ue(dt,null,null),Pe=(0,A.Z)(oe,4),vn=Pe[0],je=Pe[1],He=Pe[2],tt=Pe[3],he=!!(Te!==!1&&W&&Ie),ie=v.useMemo(function(){return Object.values(He.maps).reduce(function(xn,gn){return xn+gn},0)},[He.id,He.maps]),xe=he&&le&&(Math.max(Ie*le.length,ie)>W||!!Oe),Fe=ke==="rtl",V=fe()(de,(0,_e.Z)({},"".concat(de,"-rtl"),Fe),se),at=le||_t,Ce=(0,v.useRef)(),It=(0,v.useRef)(),Bt=(0,v.useRef)(),an=(0,v.useState)(0),en=(0,A.Z)(an,2),Mt=en[0],tn=en[1],Ue=(0,v.useState)(0),bt=(0,A.Z)(Ue,2),wt=bt[0],Me=bt[1],Ae=(0,v.useState)(!1),ut=(0,A.Z)(Ae,2),ft=ut[0],Nt=ut[1],Pt=function(){Nt(!0)},Zt=function(){Nt(!1)},Ht={getKey:dt};function sn(xn){tn(function(gn){var Vn;typeof xn=="function"?Vn=xn(gn):Vn=xn;var nr=wn(Vn);return Ce.current.scrollTop=nr,nr})}var _n=(0,v.useRef)({start:0,end:at.length}),hn=(0,v.useRef)(),Lt=X(at,dt),Ft=(0,A.Z)(Lt,1),$t=Ft[0];hn.current=$t;var Xt=v.useMemo(function(){if(!he)return{scrollHeight:void 0,start:0,end:at.length-1,offset:void 0};if(!xe){var xn;return{scrollHeight:((xn=It.current)===null||xn===void 0?void 0:xn.offsetHeight)||0,start:0,end:at.length-1,offset:void 0}}for(var gn=0,Vn,nr,pr,Mr=at.length,Cn=0;Cn<Mr;Cn+=1){var Sr=at[Cn],mr=dt(Sr),_r=He.get(mr),zr=gn+(_r===void 0?Ie:_r);zr>=Mt&&Vn===void 0&&(Vn=Cn,nr=gn),zr>Mt+W&&pr===void 0&&(pr=Cn),gn=zr}return Vn===void 0&&(Vn=0,nr=0,pr=Math.ceil(W/Ie)),pr===void 0&&(pr=at.length-1),pr=Math.min(pr+1,at.length-1),{scrollHeight:gn,start:Vn,end:pr,offset:nr}},[xe,he,Mt,at,tt,W]),Wt=Xt.scrollHeight,Dn=Xt.start,pn=Xt.end,Gt=Xt.offset;_n.current.start=Dn,_n.current.end=pn,v.useLayoutEffect(function(){var xn=He.getRecord();if(xn.size===1){var gn=Array.from(xn)[0],Vn=at[Dn];if(Vn){var nr=dt(Vn);if(nr===gn){var pr=He.get(gn),Mr=pr-Ie;sn(function(Cn){return Cn+Mr})}}}He.resetRecord()},[Wt]);var Je=v.useState({width:0,height:W}),rt=(0,A.Z)(Je,2),ht=rt[0],xt=rt[1],mt=function(gn){xt({width:gn.offsetWidth,height:gn.offsetHeight})},jt=(0,v.useRef)(),Et=(0,v.useRef)(),Qt=v.useMemo(function(){return Xe(ht.width,Oe)},[ht.width,Oe]),nn=v.useMemo(function(){return Xe(ht.height,Wt)},[ht.height,Wt]),on=Wt-W,In=(0,v.useRef)(on);In.current=on;function wn(xn){var gn=xn;return Number.isNaN(In.current)||(gn=Math.min(gn,In.current)),gn=Math.max(gn,0),gn}var Kn=Mt<=0,dn=Mt>=on,fn=wt<=0,Hn=wt>=Oe,Zn=K(Kn,dn,fn,Hn),Yn=function(){return{x:Fe?-wt:wt,y:Mt}},On=(0,v.useRef)(Yn()),Fn=(0,k.useEvent)(function(xn){if(Ze){var gn=(0,ge.Z)((0,ge.Z)({},Yn()),xn);(On.current.x!==gn.x||On.current.y!==gn.y)&&(Ze(gn),On.current=gn)}});function jn(xn,gn){var Vn=xn;gn?((0,x.flushSync)(function(){Me(Vn)}),Fn()):sn(Vn)}function Bn(xn){var gn=xn.currentTarget.scrollTop;gn!==Mt&&sn(gn),Qe==null||Qe(xn),Fn()}var Jn=function(gn){var Vn=gn,nr=Oe?Oe-ht.width:0;return Vn=Math.max(Vn,0),Vn=Math.min(Vn,nr),Vn},ur=(0,k.useEvent)(function(xn,gn){gn?((0,x.flushSync)(function(){Me(function(Vn){var nr=Vn+(Fe?-xn:xn);return Jn(nr)})}),Fn()):sn(function(Vn){var nr=Vn+xn;return nr})}),Pn=$(he,Kn,dn,fn,Hn,!!Oe,ur),bn=(0,A.Z)(Pn,2),Ge=bn[0],mn=bn[1];ee(he,Ce,function(xn,gn,Vn,nr){var pr=nr;return Zn(xn,gn,Vn)?!1:!pr||!pr._virtualHandled?(pr&&(pr._virtualHandled=!0),Ge({preventDefault:function(){},deltaX:xn?gn:0,deltaY:xn?0:gn}),!0):!1}),E(xe,Ce,function(xn){sn(function(gn){return gn+xn})}),(0,N.Z)(function(){function xn(Vn){var nr=Kn&&Vn.detail<0,pr=dn&&Vn.detail>0;he&&!nr&&!pr&&Vn.preventDefault()}var gn=Ce.current;return gn.addEventListener("wheel",Ge,{passive:!1}),gn.addEventListener("DOMMouseScroll",mn,{passive:!0}),gn.addEventListener("MozMousePixelScroll",xn,{passive:!1}),function(){gn.removeEventListener("wheel",Ge),gn.removeEventListener("DOMMouseScroll",mn),gn.removeEventListener("MozMousePixelScroll",xn)}},[he,Kn,dn]),(0,N.Z)(function(){if(Oe){var xn=Jn(wt);Me(xn),Fn({x:xn})}},[ht.width,Oe]);var Mn=function(){var gn,Vn;(gn=jt.current)===null||gn===void 0||gn.delayHidden(),(Vn=Et.current)===null||Vn===void 0||Vn.delayHidden()},Tn=me(Ce,at,He,Ie,dt,function(){return je(!0)},sn,Mn);v.useImperativeHandle(At,function(){return{nativeElement:Bt.current,getScrollInfo:Yn,scrollTo:function(gn){function Vn(nr){return nr&&(0,Q.Z)(nr)==="object"&&("left"in nr||"top"in nr)}Vn(gn)?(gn.left!==void 0&&Me(Jn(gn.left)),Tn(gn.top)):Tn(gn)}}}),(0,N.Z)(function(){if(pt){var xn=at.slice(Dn,pn+1);pt(xn,at)}},[Dn,pn,at]);var Xn=ve(at,dt,He,Ie),sr=ct==null?void 0:ct({start:Dn,end:pn,virtual:xe,offsetX:wt,offsetY:Gt,rtl:Fe,getSize:Xn}),ar=ae(at,Dn,pn,Oe,wt,vn,pe,Ht),Un=null;W&&(Un=(0,ge.Z)((0,_e.Z)({},ce?"height":"maxHeight",W),st),he&&(Un.overflowY="hidden",Oe&&(Un.overflowX="hidden"),ft&&(Un.pointerEvents="none")));var tr={};return Fe&&(tr.dir="rtl"),v.createElement("div",(0,L.Z)({ref:Bt,style:(0,ge.Z)((0,ge.Z)({},q),{},{position:"relative"}),className:V},tr,I),v.createElement(o.Z,{onResize:mt},v.createElement(nt,{className:"".concat(de,"-holder"),style:Un,ref:Ce,onScroll:Bn,onMouseEnter:Mn},v.createElement(T,{prefixCls:de,height:Wt,offsetX:wt,offsetY:Gt,scrollWidth:Oe,onInnerResize:je,ref:It,innerProps:vt,rtl:Fe,extra:sr},ar))),xe&&Wt>W&&v.createElement(We,{ref:jt,prefixCls:de,scrollOffset:Mt,scrollRange:Wt,rtl:Fe,onScroll:jn,onStartMove:Pt,onStopMove:Zt,spinSize:nn,containerSize:ht.height,style:Dt==null?void 0:Dt.verticalScrollBar,thumbStyle:Dt==null?void 0:Dt.verticalScrollBarThumb,showScrollBar:w}),xe&&Oe>ht.width&&v.createElement(We,{ref:Et,prefixCls:de,scrollOffset:wt,scrollRange:Oe,rtl:Fe,onScroll:jn,onStartMove:Pt,onStopMove:Zt,spinSize:Qt,containerSize:ht.width,horizontal:!0,style:Dt==null?void 0:Dt.horizontalScrollBar,thumbStyle:Dt==null?void 0:Dt.horizontalScrollBarThumb,showScrollBar:w}))}var un=v.forwardRef(Kt);un.displayName="List";var Ot=un,Vt=Ot},83145:function(ln,et,m){"use strict";Object.defineProperty(et,"__esModule",{value:!0}),et.CopyToClipboard=void 0;var L=ge(m(59301)),Q=ge(m(25769));function ge(U){return U&&U.__esModule?U:{default:U}}function _e(U){return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?_e=function(Z){return typeof Z}:_e=function(Z){return Z&&typeof Symbol=="function"&&Z.constructor===Symbol&&Z!==Symbol.prototype?"symbol":typeof Z},_e(U)}function A(U,X){var Z=Object.keys(U);if(Object.getOwnPropertySymbols){var D=Object.getOwnPropertySymbols(U);X&&(D=D.filter(function(C){return Object.getOwnPropertyDescriptor(U,C).enumerable})),Z.push.apply(Z,D)}return Z}function p(U){for(var X=1;X<arguments.length;X++){var Z=arguments[X]!=null?arguments[X]:{};X%2?A(Z,!0).forEach(function(D){ae(U,D,Z[D])}):Object.getOwnPropertyDescriptors?Object.defineProperties(U,Object.getOwnPropertyDescriptors(Z)):A(Z).forEach(function(D){Object.defineProperty(U,D,Object.getOwnPropertyDescriptor(Z,D))})}return U}function be(U,X){if(U==null)return{};var Z=fe(U,X),D,C;if(Object.getOwnPropertySymbols){var K=Object.getOwnPropertySymbols(U);for(C=0;C<K.length;C++)D=K[C],!(X.indexOf(D)>=0)&&Object.prototype.propertyIsEnumerable.call(U,D)&&(Z[D]=U[D])}return Z}function fe(U,X){if(U==null)return{};var Z={},D=Object.keys(U),C,K;for(K=0;K<D.length;K++)C=D[K],!(X.indexOf(C)>=0)&&(Z[C]=U[C]);return Z}function o(U,X){if(!(U instanceof X))throw new TypeError("Cannot call a class as a function")}function k(U,X){for(var Z=0;Z<X.length;Z++){var D=X[Z];D.enumerable=D.enumerable||!1,D.configurable=!0,"value"in D&&(D.writable=!0),Object.defineProperty(U,D.key,D)}}function N(U,X,Z){return X&&k(U.prototype,X),Z&&k(U,Z),U}function v(U,X){return X&&(_e(X)==="object"||typeof X=="function")?X:S(U)}function x(U){return x=Object.setPrototypeOf?Object.getPrototypeOf:function(Z){return Z.__proto__||Object.getPrototypeOf(Z)},x(U)}function S(U){if(U===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return U}function T(U,X){if(typeof X!="function"&&X!==null)throw new TypeError("Super expression must either be null or a function");U.prototype=Object.create(X&&X.prototype,{constructor:{value:U,writable:!0,configurable:!0}}),X&&z(U,X)}function z(U,X){return z=Object.setPrototypeOf||function(D,C){return D.__proto__=C,D},z(U,X)}function ae(U,X,Z){return X in U?Object.defineProperty(U,X,{value:Z,enumerable:!0,configurable:!0,writable:!0}):U[X]=Z,U}var B=function(U){T(X,U);function X(){var Z,D;o(this,X);for(var C=arguments.length,K=new Array(C),$=0;$<C;$++)K[$]=arguments[$];return D=v(this,(Z=x(X)).call.apply(Z,[this].concat(K))),ae(S(D),"onClick",function(ve){var Se=D.props,Le=Se.text,ye=Se.onCopy,te=Se.children,j=Se.options,ue=L.default.Children.only(te),R=(0,Q.default)(Le,j);ye&&ye(Le,R),ue&&ue.props&&typeof ue.props.onClick=="function"&&ue.props.onClick(ve)}),D}return N(X,[{key:"render",value:function(){var D=this.props,C=D.text,K=D.onCopy,$=D.options,ve=D.children,Se=be(D,["text","onCopy","options","children"]),Le=L.default.Children.only(ve);return L.default.cloneElement(Le,p({},Se,{onClick:this.onClick}))}}]),X}(L.default.PureComponent);et.CopyToClipboard=B,ae(B,"defaultProps",{onCopy:void 0,options:void 0})},56102:function(ln,et,m){"use strict";var L=m(83145),Q=L.CopyToClipboard;Q.CopyToClipboard=Q,ln.exports=Q},76374:function(ln,et,m){"use strict";var L=function(){if(typeof Map!="undefined")return Map;function te(j,ue){var R=-1;return j.some(function(ee,G){return ee[0]===ue?(R=G,!0):!1}),R}return function(){function j(){this.__entries__=[]}return Object.defineProperty(j.prototype,"size",{get:function(){return this.__entries__.length},enumerable:!0,configurable:!0}),j.prototype.get=function(ue){var R=te(this.__entries__,ue),ee=this.__entries__[R];return ee&&ee[1]},j.prototype.set=function(ue,R){var ee=te(this.__entries__,ue);~ee?this.__entries__[ee][1]=R:this.__entries__.push([ue,R])},j.prototype.delete=function(ue){var R=this.__entries__,ee=te(R,ue);~ee&&R.splice(ee,1)},j.prototype.has=function(ue){return!!~te(this.__entries__,ue)},j.prototype.clear=function(){this.__entries__.splice(0)},j.prototype.forEach=function(ue,R){R===void 0&&(R=null);for(var ee=0,G=this.__entries__;ee<G.length;ee++){var y=G[ee];ue.call(R,y[1],y[0])}},j}()}(),Q=typeof window!="undefined"&&typeof document!="undefined"&&window.document===document,ge=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")()}(),_e=function(){return typeof requestAnimationFrame=="function"?requestAnimationFrame.bind(ge):function(te){return setTimeout(function(){return te(Date.now())},1e3/60)}}(),A=2;function p(te,j){var ue=!1,R=!1,ee=0;function G(){ue&&(ue=!1,te()),R&&E()}function y(){_e(G)}function E(){var Y=Date.now();if(ue){if(Y-ee<A)return;R=!0}else ue=!0,R=!1,setTimeout(y,j);ee=Y}return E}var be=20,fe=["top","right","bottom","left","width","height","size","weight"],o=typeof MutationObserver!="undefined",k=function(){function te(){this.connected_=!1,this.mutationEventsAdded_=!1,this.mutationsObserver_=null,this.observers_=[],this.onTransitionEnd_=this.onTransitionEnd_.bind(this),this.refresh=p(this.refresh.bind(this),be)}return te.prototype.addObserver=function(j){~this.observers_.indexOf(j)||this.observers_.push(j),this.connected_||this.connect_()},te.prototype.removeObserver=function(j){var ue=this.observers_,R=ue.indexOf(j);~R&&ue.splice(R,1),!ue.length&&this.connected_&&this.disconnect_()},te.prototype.refresh=function(){var j=this.updateObservers_();j&&this.refresh()},te.prototype.updateObservers_=function(){var j=this.observers_.filter(function(ue){return ue.gatherActive(),ue.hasActive()});return j.forEach(function(ue){return ue.broadcastActive()}),j.length>0},te.prototype.connect_=function(){!Q||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)},te.prototype.disconnect_=function(){!Q||!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)},te.prototype.onTransitionEnd_=function(j){var ue=j.propertyName,R=ue===void 0?"":ue,ee=fe.some(function(G){return!!~R.indexOf(G)});ee&&this.refresh()},te.getInstance=function(){return this.instance_||(this.instance_=new te),this.instance_},te.instance_=null,te}(),N=function(te,j){for(var ue=0,R=Object.keys(j);ue<R.length;ue++){var ee=R[ue];Object.defineProperty(te,ee,{value:j[ee],enumerable:!1,writable:!1,configurable:!0})}return te},v=function(te){var j=te&&te.ownerDocument&&te.ownerDocument.defaultView;return j||ge},x=C(0,0,0,0);function S(te){return parseFloat(te)||0}function T(te){for(var j=[],ue=1;ue<arguments.length;ue++)j[ue-1]=arguments[ue];return j.reduce(function(R,ee){var G=te["border-"+ee+"-width"];return R+S(G)},0)}function z(te){for(var j=["top","right","bottom","left"],ue={},R=0,ee=j;R<ee.length;R++){var G=ee[R],y=te["padding-"+G];ue[G]=S(y)}return ue}function ae(te){var j=te.getBBox();return C(0,0,j.width,j.height)}function B(te){var j=te.clientWidth,ue=te.clientHeight;if(!j&&!ue)return x;var R=v(te).getComputedStyle(te),ee=z(R),G=ee.left+ee.right,y=ee.top+ee.bottom,E=S(R.width),Y=S(R.height);if(R.boxSizing==="border-box"&&(Math.round(E+G)!==j&&(E-=T(R,"left","right")+G),Math.round(Y+y)!==ue&&(Y-=T(R,"top","bottom")+y)),!X(te)){var me=Math.round(E+G)-j,$e=Math.round(Y+y)-ue;Math.abs(me)!==1&&(E-=me),Math.abs($e)!==1&&(Y-=$e)}return C(ee.left,ee.top,E,Y)}var U=function(){return typeof SVGGraphicsElement!="undefined"?function(te){return te instanceof v(te).SVGGraphicsElement}:function(te){return te instanceof v(te).SVGElement&&typeof te.getBBox=="function"}}();function X(te){return te===v(te).document.documentElement}function Z(te){return Q?U(te)?ae(te):B(te):x}function D(te){var j=te.x,ue=te.y,R=te.width,ee=te.height,G=typeof DOMRectReadOnly!="undefined"?DOMRectReadOnly:Object,y=Object.create(G.prototype);return N(y,{x:j,y:ue,width:R,height:ee,top:ue,right:j+R,bottom:ee+ue,left:j}),y}function C(te,j,ue,R){return{x:te,y:j,width:ue,height:R}}var K=function(){function te(j){this.broadcastWidth=0,this.broadcastHeight=0,this.contentRect_=C(0,0,0,0),this.target=j}return te.prototype.isActive=function(){var j=Z(this.target);return this.contentRect_=j,j.width!==this.broadcastWidth||j.height!==this.broadcastHeight},te.prototype.broadcastRect=function(){var j=this.contentRect_;return this.broadcastWidth=j.width,this.broadcastHeight=j.height,j},te}(),$=function(){function te(j,ue){var R=D(ue);N(this,{target:j,contentRect:R})}return te}(),ve=function(){function te(j,ue,R){if(this.activeObservations_=[],this.observations_=new L,typeof j!="function")throw new TypeError("The callback provided as parameter 1 is not a function.");this.callback_=j,this.controller_=ue,this.callbackCtx_=R}return te.prototype.observe=function(j){if(!arguments.length)throw new TypeError("1 argument required, but only 0 present.");if(!(typeof Element=="undefined"||!(Element instanceof Object))){if(!(j instanceof v(j).Element))throw new TypeError('parameter 1 is not of type "Element".');var ue=this.observations_;ue.has(j)||(ue.set(j,new K(j)),this.controller_.addObserver(this),this.controller_.refresh())}},te.prototype.unobserve=function(j){if(!arguments.length)throw new TypeError("1 argument required, but only 0 present.");if(!(typeof Element=="undefined"||!(Element instanceof Object))){if(!(j instanceof v(j).Element))throw new TypeError('parameter 1 is not of type "Element".');var ue=this.observations_;ue.has(j)&&(ue.delete(j),ue.size||this.controller_.removeObserver(this))}},te.prototype.disconnect=function(){this.clearActive(),this.observations_.clear(),this.controller_.removeObserver(this)},te.prototype.gatherActive=function(){var j=this;this.clearActive(),this.observations_.forEach(function(ue){ue.isActive()&&j.activeObservations_.push(ue)})},te.prototype.broadcastActive=function(){if(this.hasActive()){var j=this.callbackCtx_,ue=this.activeObservations_.map(function(R){return new $(R.target,R.broadcastRect())});this.callback_.call(j,ue,j),this.clearActive()}},te.prototype.clearActive=function(){this.activeObservations_.splice(0)},te.prototype.hasActive=function(){return this.activeObservations_.length>0},te}(),Se=typeof WeakMap!="undefined"?new WeakMap:new L,Le=function(){function te(j){if(!(this instanceof te))throw new TypeError("Cannot call a class as a function.");if(!arguments.length)throw new TypeError("1 argument required, but only 0 present.");var ue=k.getInstance(),R=new ve(j,ue,this);Se.set(this,R)}return te}();["observe","unobserve","disconnect"].forEach(function(te){Le.prototype[te]=function(){var j;return(j=Se.get(this))[te].apply(j,arguments)}});var ye=function(){return typeof ge.ResizeObserver!="undefined"?ge.ResizeObserver:Le}();et.Z=ye},98040:function(ln){ln.exports=function(){var et=document.getSelection();if(!et.rangeCount)return function(){};for(var m=document.activeElement,L=[],Q=0;Q<et.rangeCount;Q++)L.push(et.getRangeAt(Q));switch(m.tagName.toUpperCase()){case"INPUT":case"TEXTAREA":m.blur();break;default:m=null;break}return et.removeAllRanges(),function(){et.type==="Caret"&&et.removeAllRanges(),et.rangeCount||L.forEach(function(ge){et.addRange(ge)}),m&&m.focus()}}},93314: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=="},46284:function(ln,et,m){"use strict";m.d(et,{ZP:function(){return Rs}});const L=Number.isFinite||function(a){return typeof a=="number"&&isFinite(a)},Q=Number.isSafeInteger||function(a){return typeof a=="number"&&Math.abs(a)<=ge},ge=Number.MAX_SAFE_INTEGER||9007199254740991;let _e=function(a){return a.NETWORK_ERROR="networkError",a.MEDIA_ERROR="mediaError",a.KEY_SYSTEM_ERROR="keySystemError",a.MUX_ERROR="muxError",a.OTHER_ERROR="otherError",a}({}),A=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}({}),p=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 be={MANIFEST:"manifest",LEVEL:"level",AUDIO_TRACK:"audioTrack",SUBTITLE_TRACK:"subtitleTrack"},fe={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 k{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 N(a,e,t){return(e=z(e))in a?Object.defineProperty(a,e,{value:t,enumerable:!0,configurable:!0,writable:!0}):a[e]=t,a}function v(){return v=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},v.apply(null,arguments)}function x(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 S(a){for(var e=1;e<arguments.length;e++){var t=arguments[e]!=null?arguments[e]:{};e%2?x(Object(t),!0).forEach(function(n){N(a,n,t[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(a,Object.getOwnPropertyDescriptors(t)):x(Object(t)).forEach(function(n){Object.defineProperty(a,n,Object.getOwnPropertyDescriptor(t,n))})}return a}function T(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 z(a){var e=T(a,"string");return typeof e=="symbol"?e:e+""}class ae{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=B,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 B=function(){},U={trace:B,debug:B,log:B,warn:B,info:B,error:B};function X(){return v({},U)}function Z(a,e){const t=self.console[a];return t?t.bind(self.console,`${e?"["+e+"] ":""}[${a}] >`):B}function D(a,e,t){return e[a]?e[a].bind(e):Z(a,t)}const C=X();function K(a,e,t){const n=X();if(typeof console=="object"&&a===!0||typeof a=="object"){const r=["debug","log","info","warn","error"];r.forEach(i=>{n[i]=D(i,a,t)});try{n.log(`Debug logs enabled for "${e}" in hls.js version 1.6.1`)}catch(i){return X()}r.forEach(i=>{C[i]=D(i,a)})}else v(C,n);return n}const $=C;function ve(a=!0){return typeof self=="undefined"?void 0:(a||!self.MediaSource)&&self.ManagedMediaSource||self.MediaSource||self.WebKitMediaSource}function Se(a){return typeof self!="undefined"&&a===self.ManagedMediaSource}function Le(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 ye(a,e=!1){if(typeof TextDecoder!="undefined"){const c=new TextDecoder("utf-8").decode(a);if(e){const g=c.indexOf("\0");return g!==-1?c.substring(0,g):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}const te={hexDump:function(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 j(a){return a&&a.__esModule&&Object.prototype.hasOwnProperty.call(a,"default")?a.default:a}var ue={exports:{}},R;function ee(){return R||(R=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,g){if(g=g||{},d=d.trim(),c=c.trim(),!c){if(!g.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 O=l.parseURL(c);if(!O)throw new Error("Error trying to parse relative URL.");if(O.scheme)return g.alwaysNormalize?(O.path=l.normalizePath(O.path),l.buildURLFromParts(O)):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 H=r.exec(F.path);F.netLoc=H[1],F.path=H[2]}F.netLoc&&!F.path&&(F.path="/");var we={scheme:F.scheme,netLoc:O.netLoc,path:null,params:O.params,query:O.query,fragment:O.fragment};if(!O.netLoc&&(we.netLoc=F.netLoc,O.path[0]!=="/"))if(!O.path)we.path=F.path,O.params||(we.params=F.params,O.query||(we.query=F.query));else{var Ee=F.path,Ke=Ee.substring(0,Ee.lastIndexOf("/")+1)+O.path;we.path=l.normalizePath(Ke)}return we.path===null&&(we.path=g.alwaysNormalize?l.normalizePath(O.path):O.path),l.buildURLFromParts(we)},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})()}(ue)),ue.exports}var G=ee();class y{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 E={AUDIO:"audio",VIDEO:"video",AUDIOVIDEO:"audiovideo"};class Y{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,Xe(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={[E.AUDIO]:null,[E.VIDEO]:null,[E.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 y),this._stats}set stats(e){this._stats=e}get url(){return!this._url&&this.baseurl&&this.relurl&&(this._url=G.buildAbsoluteURL(this.baseurl,this.relurl,{alwaysNormalize:!0})),this._url||""}set url(e){this._url=e}clearElementaryStreamInfo(){const{elementaryStreams:e}=this;e[E.AUDIO]=null,e[E.VIDEO]=null,e[E.AUDIOVIDEO]=null}}function me(a){return a.sn!=="initSegment"}class $e extends Y{constructor(e,t){super(t),this._decryptdata=null,this._programDateTime=null,this._ref=null,this._bitrate=void 0,this.rawProgramDateTime=null,this.tagList=[],this.duration=0,this.sn=0,this.levelkeys=void 0,this.type=void 0,this.loader=null,this.keyLoader=null,this.level=-1,this.cc=0,this.startPTS=void 0,this.endPTS=void 0,this.startDTS=void 0,this.endDTS=void 0,this.start=0,this.playlistOffset=0,this.deltaPTS=void 0,this.maxStartPTS=void 0,this.minEndPTS=void 0,this.data=void 0,this.bitrateTest=!1,this.title=null,this.initSegment=null,this.endList=void 0,this.gap=void 0,this.urlId=0,this.type=e}get byteLength(){if(this.hasStats){const e=this.stats.total;if(e)return e}if(this.byteRange){const e=this.byteRange[0],t=this.byteRange[1];if(L(e)&&L(t))return t-e}return null}get bitrate(){return this.byteLength?this.byteLength*8/this.duration:this._bitrate?this._bitrate:null}set bitrate(e){this._bitrate=e}get decryptdata(){const{levelkeys:e}=this;if(!e&&!this._decryptdata)return null;if(!this._decryptdata&&this.levelkeys&&!this.levelkeys.NONE){const t=this.levelkeys.identity;if(t)this._decryptdata=t.getDecryptData(this.sn);else{const n=Object.keys(this.levelkeys);if(n.length===1)return this._decryptdata=this.levelkeys[n[0]].getDecryptData(this.sn)}}return this._decryptdata}get end(){return this.start+this.duration}get endProgramDateTime(){if(this.programDateTime===null)return null;const e=L(this.duration)?this.duration:0;return this.programDateTime+e*1e3}get encrypted(){var e;if((e=this._decryptdata)!=null&&e.encrypted)return!0;if(this.levelkeys){const t=Object.keys(this.levelkeys),n=t.length;if(n>1||n===1&&this.levelkeys[t[0]].encrypted)return!0}return!1}get programDateTime(){return this._programDateTime===null&&this.rawProgramDateTime&&(this.programDateTime=Date.parse(this.rawProgramDateTime)),this._programDateTime}set programDateTime(e){if(!L(e)){this._programDateTime=this.rawProgramDateTime=null;return}this._programDateTime=e}get ref(){return me(this)?(this._ref||(this._ref={base:this.base,start:this.start,duration:this.duration,sn:this.sn,programDateTime:this.programDateTime}),this._ref):null}addStart(e){this.setStart(this.start+e)}setStart(e){this.start=e,this._ref&&(this._ref.start=e)}setDuration(e){this.duration=e,this._ref&&(this._ref.duration=e)}setKeyFormat(e){if(this.levelkeys){const t=this.levelkeys[e];t&&!this._decryptdata&&(this._decryptdata=t.getDecryptData(this.sn))}}abortRequests(){var e,t;(e=this.loader)==null||e.abort(),(t=this.keyLoader)==null||t.abort()}setElementaryStreamInfo(e,t,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 We extends Y{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 qe(a,e){const t=Object.getPrototypeOf(a);if(t){const n=Object.getOwnPropertyDescriptor(t,e);return n||qe(t,e)}}function Xe(a,e){const t=qe(a,e);t&&(t.enumerable=!0,Object.defineProperty(a,e,t))}const gt=Math.pow(2,32)-1,_t=[].push,st={video:1,audio:2,id3:3,text:4};function Kt(a){return String.fromCharCode.apply(null,a)}function un(a,e){const t=a[e]<<8|a[e+1];return t<0?65536+t:t}function Ot(a,e){const t=lt(a,e);return t<0?4294967296+t:t}function Vt(a,e){let t=Ot(a,e);return t*=Math.pow(2,32),t+=Ot(a,e+4),t}function lt(a,e){return a[e]<<24|a[e+1]<<16|a[e+2]<<8|a[e+3]}function At(a,e,t){a[e]=t>>24,a[e+1]=t>>16&255,a[e+2]=t>>8&255,a[e+3]=t&255}function ne(a){const e=a.byteLength;for(let t=0;t<e;){const n=Ot(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 de(a,e){const t=[];if(!e.length)return t;const n=a.byteLength;for(let r=0;r<n;){const i=Ot(a,r),s=Kt(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=de(a.subarray(r+8,l),e.slice(1));d.length&&_t.apply(t,d)}r=l}return t}function se(a){const e=[],t=a[0];let n=8;const r=Ot(a,n);n+=4;let i=0,s=0;t===0?(i=Ot(a,n),s=Ot(a,n+4),n+=8):(i=Vt(a,n),s=Vt(a,n+8),n+=16),n+=2;let l=a.length+s;const d=un(a,n);n+=2;for(let c=0;c<d;c++){let g=n;const b=Ot(a,g);g+=4;const O=b&2147483647;if((b&2147483648)>>>31===1)return $.warn("SIDX has hierarchical references (not supported)"),null;const H=Ot(a,g);g+=4,e.push({referenceSize:O,subsegmentDuration:H,info:{duration:H/r,start:l,end:l+O-1}}),l+=O,g+=4,n=g}return{earliestPresentationTime:i,timescale:r,version:t,referencesCount:d,references:e}}function W(a){const e=[],t=de(a,["moov","trak"]);for(let r=0;r<t.length;r++){const i=t[r],s=de(i,["tkhd"])[0];if(s){let l=s[0];const d=Ot(s,l===0?12:20),c=de(i,["mdia","mdhd"])[0];if(c){l=c[0];const g=Ot(c,l===0?12:20),b=de(i,["mdia","hdlr"])[0];if(b){const O=Kt(b.subarray(8,12)),F={soun:E.AUDIO,vide:E.VIDEO}[O],H=de(i,["mdia","minf","stbl","stsd"])[0],we=Ie(H);F?(e[d]={timescale:g,type:F,stsd:we},e[F]=S({timescale:g,id:d},we)):e[d]={timescale:g,type:O,stsd:we}}}}}return de(a,["moov","mvex","trex"]).forEach(r=>{const i=Ot(r,4),s=e[i];s&&(s.default={duration:Ot(r,12),flags:Ot(r,20)})}),e}function Ie(a){const e=a.subarray(8),t=e.subarray(86),n=Kt(e.subarray(4,8));let r=n,i;const s=n==="enca"||n==="encv";if(s){const c=de(e,[n])[0].subarray(n==="enca"?28:78);de(c,["sinf"]).forEach(b=>{const O=de(b,["schm"])[0];if(O){const F=Kt(O.subarray(4,8));if(F==="cbcs"||F==="cenc"){const H=de(b,["frma"])[0];H&&(r=Kt(H))}}})}const l=r;switch(r){case"avc1":case"avc2":case"avc3":case"avc4":{const d=de(t,["avcC"])[0];d&&d.length>3&&(r+="."+q(d[1])+q(d[2])+q(d[3]),i=M(l==="avc1"?"dva1":"dvav",t));break}case"mp4a":{const d=de(e,[n])[0],c=de(d.subarray(28),["esds"])[0];if(c&&c.length>7){let g=4;if(c[g++]!==3)break;g=ce(c,g),g+=2;const b=c[g++];if(b&128&&(g+=2),b&64&&(g+=c[g++]),c[g++]!==4)break;g=ce(c,g);const O=c[g++];if(O===64)r+="."+q(O);else break;if(g+=12,c[g++]!==5)break;g=ce(c,g);const F=c[g++];let H=(F&248)>>3;H===31&&(H+=1+((F&7)<<3)+((c[g]&224)>>5)),r+="."+H}break}case"hvc1":case"hev1":{const d=de(t,["hvcC"])[0];if(d&&d.length>12){const c=d[1],g=["","A","B","C"][c>>6],b=c&31,O=Ot(d,2),F=(c&32)>>5?"H":"L",H=d[12],we=d.subarray(6,12);r+="."+g+b,r+="."+O.toString(16).toUpperCase(),r+="."+F+H;let Ee="";for(let Ke=we.length;Ke--;){const it=we[Ke];(it||Ee)&&(Ee="."+it.toString(16).toUpperCase()+Ee)}r+=Ee}i=M(l=="hev1"?"dvhe":"dvh1",t);break}case"dvh1":case"dvhe":case"dvav":case"dva1":case"dav1":{r=M(r,t)||r;break}case"vp09":{const d=de(t,["vpcC"])[0];if(d&&d.length>6){const c=d[4],g=d[5],b=d[6]>>4&15;r+="."+le(c)+"."+le(g)+"."+le(b)}break}case"av01":{const d=de(t,["av1C"])[0];if(d&&d.length>2){const c=d[1]>>>5,g=d[1]&31,b=d[2]>>>7?"H":"M",O=(d[2]&64)>>6,F=(d[2]&32)>>5,H=c===2&&O?F?12:10:O?10:8,we=(d[2]&16)>>4,Ee=(d[2]&8)>>3,Ke=(d[2]&4)>>2,it=d[2]&3;r+="."+c+"."+le(g)+b+"."+le(H)+"."+we+"."+Ee+Ke+it+"."+le(1)+"."+le(1)+"."+le(1)+"."+0,i=M("dav1",t)}break}}return{codec:r,encrypted:s,supplemental:i}}function M(a,e){const t=de(e,["dvvC"]),n=t.length?t[0]:de(e,["dvcC"])[0];if(n){const r=n[2]>>1&127,i=n[2]<<5&32|n[3]>>3&31;return a+"."+le(r)+"."+le(i)}}function ce(a,e){const t=e+5;for(;a[e++]&128&&e<t;);return e}function q(a){return("0"+a.toString(16).toUpperCase()).slice(-2)}function le(a){return(a<10?"0":"")+a}function pe(a,e){if(!a||!e)return a;const t=e.keyId;return t&&e.isCommonEncryption&&de(a,["moov","trak"]).forEach(r=>{const s=de(r,["mdia","minf","stbl","stsd"])[0].subarray(8);let l=de(s,["enca"]);const d=l.length>0;d||(l=de(s,["encv"])),l.forEach(c=>{const g=d?c.subarray(28):c.subarray(78);de(g,["sinf"]).forEach(O=>{const F=De(O);if(F){const H=F.subarray(8,24);H.some(we=>we!==0)||($.log(`[eme] Patching keyId in 'enc${d?"a":"v"}>sinf>>tenc' box: ${te.hexDump(H)} -> ${te.hexDump(t)}`),F.set(t,8))}})})}),a}function De(a){const e=de(a,["schm"])[0];if(e){const t=Kt(e.subarray(4,8));if(t==="cbcs"||t==="cenc")return de(a,["schi","tenc"])[0]}return null}function Te(a,e){return de(e,["moof","traf"]).reduce((t,n)=>{const r=de(n,["tfdt"])[0],i=r[0],s=de(n,["tfhd"]).reduce((l,d)=>{const c=Ot(d,4),g=a[c];if(g){let b=Ot(r,4);if(i===1){if(b===gt)return $.warn("[mp4-demuxer]: Ignoring assumed invalid signed 64-bit track fragment decode time"),l;b*=gt+1,b+=Ot(r,8)}const O=g.timescale||9e4,F=b/O;if(L(F)&&(l===null||F<l))return F}return l},null);return s!==null&&L(s)&&(t===null||s<t)?s:t},null)}function ke(a,e){let t=0,n=0,r=0;const i=de(a,["moof","traf"]);for(let s=0;s<i.length;s++){const l=i[s],d=de(l,["tfhd"])[0],c=Ot(d,4),g=e[c];if(!g)continue;const b=g.default,O=Ot(d,0)|(b==null?void 0:b.flags);let F=b==null?void 0:b.duration;O&8&&(O&2?F=Ot(d,12):F=Ot(d,8));const H=g.timescale||9e4,we=de(l,["trun"]);for(let Ee=0;Ee<we.length;Ee++){if(t=Oe(we[Ee]),!t&&F){const Ke=Ot(we[Ee],4);t=F*Ke}g.type===E.VIDEO?n+=t/H:g.type===E.AUDIO&&(r+=t/H)}}if(n===0&&r===0){let s=1/0,l=0,d=0;const c=de(a,["sidx"]);for(let g=0;g<c.length;g++){const b=se(c[g]);if(b!=null&&b.references){s=Math.min(s,b.earliestPresentationTime/b.timescale);const O=b.references.reduce((F,H)=>F+H.info.duration||0,0);l=Math.max(l,O+b.earliestPresentationTime/b.timescale),d=l-s}}if(d&&L(d))return d}return n||r}function Oe(a){const e=Ot(a,0);let t=8;e&1&&(t+=4),e&4&&(t+=4);let n=0;const r=Ot(a,4);for(let i=0;i<r;i++){if(e&256){const s=Ot(a,t);n+=s,t+=4}e&512&&(t+=4),e&1024&&(t+=4),e&2048&&(t+=4)}return n}function Ne(a,e,t){de(e,["moof","traf"]).forEach(n=>{de(n,["tfhd"]).forEach(r=>{const i=Ot(r,4),s=a[i];if(!s)return;const l=s.timescale||9e4;de(n,["tfdt"]).forEach(d=>{const c=d[0],g=t*l;if(g){let b=Ot(d,4);if(c===0)b-=g,b=Math.max(b,0),At(d,4,b);else{b*=Math.pow(2,32),b+=Ot(d,8),b-=g,b=Math.max(b,0);const O=Math.floor(b/(gt+1)),F=Math.floor(b%(gt+1));At(d,4,O),At(d,8,F)}}})})})}function nt(a){const e={valid:null,remainder:null},t=de(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 Qe(a,e){const t=new Uint8Array(a.length+e.length);return t.set(a),t.set(e,a.length),t}function Ze(a,e){const t=[],n=e.samples,r=e.timescale,i=e.id;let s=!1;return de(n,["moof"]).map(d=>{const c=d.byteOffset-8;de(d,["traf"]).map(b=>{const O=de(b,["tfdt"]).map(F=>{const H=F[0];let we=Ot(F,4);return H===1&&(we*=Math.pow(2,32),we+=Ot(F,8)),we/r})[0];return O!==void 0&&(a=O),de(b,["tfhd"]).map(F=>{const H=Ot(F,4),we=Ot(F,0)&16777215,Ee=(we&1)!==0,Ke=(we&2)!==0,it=(we&8)!==0;let Ye=0;const St=(we&16)!==0;let Tt=0;const Jt=(we&32)!==0;let Ct=8;H===i&&(Ee&&(Ct+=8),Ke&&(Ct+=4),it&&(Ye=Ot(F,Ct),Ct+=4),St&&(Tt=Ot(F,Ct),Ct+=4),Jt&&(Ct+=4),e.type==="video"&&(s=pt(e.codec)),de(b,["trun"]).map(zt=>{const rn=zt[0],kt=Ot(zt,0)&16777215,Rn=(kt&1)!==0;let Gn=0;const Fr=(kt&4)!==0,yr=(kt&256)!==0;let fr=0;const er=(kt&512)!==0;let hr=0;const lr=(kt&1024)!==0,Ln=(kt&2048)!==0;let $n=0;const Dr=Ot(zt,4);let xr=8;Rn&&(Gn=Ot(zt,xr),xr+=4),Fr&&(xr+=4);let kr=Gn+c;for(let Wr=0;Wr<Dr;Wr++){if(yr?(fr=Ot(zt,xr),xr+=4):fr=Ye,er?(hr=Ot(zt,xr),xr+=4):hr=Tt,lr&&(xr+=4),Ln&&(rn===0?$n=Ot(zt,xr):$n=lt(zt,xr),xr+=4),e.type===E.VIDEO){let qr=0;for(;qr<hr;){const ai=Ot(n,kr);if(kr+=4,vt(s,n[kr])){const Ui=n.subarray(kr,kr+ai);ct(Ui,s?2:1,a+$n/r,t)}kr+=ai,qr+=ai+4}}a+=fr/r}}))})})}),t}function pt(a){if(!a)return!1;const e=a.substring(0,4);return e==="hvc1"||e==="hev1"||e==="dvh1"||e==="dvhe"}function vt(a,e){if(a){const t=e>>1&63;return t===39||t===40}else return(e&31)===6}function ct(a,e,t,n){const r=Dt(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 g=i;if(l<c)i+=l;else if(l>c){$.error(`Malformed SEI payload. ${l} is too small, only ${c} bytes left to parse.`);break}if(s===4){if(r[g++]===181){const O=un(r,g);if(g+=2,O===49){const F=Ot(r,g);if(g+=4,F===1195456820){const H=r[g++];if(H===3){const we=r[g++],Ee=31&we,Ke=64&we,it=Ke?2+Ee*3:0,Ye=new Uint8Array(it);if(Ke){Ye[0]=we;for(let St=1;St<it;St++)Ye[St]=r[g++]}n.push({type:H,payloadType:s,pts:t,bytes:Ye})}}}}}else if(s===5&&l>16){const b=[];for(let H=0;H<16;H++){const we=r[g++].toString(16);b.push(we.length==1?"0"+we:we),(H===3||H===5||H===7||H===9)&&b.push("-")}const O=l-16,F=new Uint8Array(O);for(let H=0;H<O;H++)F[H]=r[g++];n.push({payloadType:s,pts:t,uuid:b.join(""),userData:ye(F),userDataBytes:F})}}}function Dt(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 Ut(a){const e=a[0];let t="",n="",r=0,i=0,s=0,l=0,d=0,c=0;if(e===0){for(;Kt(a.subarray(c,c+1))!=="\0";)t+=Kt(a.subarray(c,c+1)),c+=1;for(t+=Kt(a.subarray(c,c+1)),c+=1;Kt(a.subarray(c,c+1))!=="\0";)n+=Kt(a.subarray(c,c+1)),c+=1;n+=Kt(a.subarray(c,c+1)),c+=1,r=Ot(a,12),i=Ot(a,16),l=Ot(a,20),d=Ot(a,24),c=28}else if(e===1){c+=4,r=Ot(a,c),c+=4;const b=Ot(a,c);c+=4;const O=Ot(a,c);for(c+=4,s=Vl(2,32)*b+O,Q(s)||(s=Number.MAX_SAFE_INTEGER,$.warn("Presentation time exceeds safe integer limit and wrapped to max safe integer in parsing emsg box")),l=Ot(a,c),c+=4,d=Ot(a,c),c+=4;Kt(a.subarray(c,c+1))!=="\0";)t+=Kt(a.subarray(c,c+1)),c+=1;for(t+=Kt(a.subarray(c,c+1)),c+=1;Kt(a.subarray(c,c+1))!=="\0";)n+=Kt(a.subarray(c,c+1)),c+=1;n+=Kt(a.subarray(c,c+1)),c+=1}const g=a.subarray(c,a.byteLength);return{schemeIdUri:t,value:n,timeScale:r,presentationTime:s,presentationTimeDelta:i,eventDuration:l,id:d,payload:g}}function w(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 I(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&&t.byteLength>0&&new DataView(s.buffer).setUint32(0,t.byteLength,!1),w([112,115,115,104],new Uint8Array([n,0,0,0]),a,i,r,s,t||new Uint8Array)}function dt(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=oe(r);e.push(i),n+=i.size}}return e}function oe(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=te.hexDump(new Uint8Array(s,t+12,16)),d=a.getUint32(28);let c=null,g=null;if(i===0){if(e-32<d||d<22)return{offset:t,size:e};g=new Uint8Array(s,t+32,d)}else if(i===1){if(!d||n<t+32+d*16+16)return{offset:t,size:e};c=[];for(let b=0;b<d;b++)c.push(new Uint8Array(s,t+32+b*16,16))}return{version:i,systemId:l,kids:c,data:g,offset:t,size:e}}const Pe=()=>/\(Windows.+Firefox\//i.test(navigator.userAgent),vn={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 je(a,e){const t=vn[e];return!!t&&!!t[a.slice(0,4)]}function He(a,e,t=!0){return!a.split(",").some(n=>!tt(n,e,t))}function tt(a,e,t=!0){var n;const r=ve(t);return(n=r==null?void 0:r.isTypeSupported(he(a,e)))!=null?n:!1}function he(a,e){return`${e}/mp4;codecs=${a}`}function ie(a){if(a){const e=a.substring(0,4);return vn.video[e]}return 2}function xe(a){const e=Pe();return a.split(",").reduce((t,n)=>{const i=e&&pt(n)?9:vn.video[n];return i?(i*2+t)/(t?3:2):(vn.audio[n]+t)/(t?2:1)},0)}const Fe={};function V(a,e=!0){if(Fe[a])return Fe[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(tt(t[r],"audio",e))return Fe[a]=t[r],t[r];if(t[r]==="mp3"&&(n=ve(e))!=null&&n.isTypeSupported("audio/mpeg"))return""}return a}const at=/flac|opus|mp4a\.40\.34/i;function Ce(a,e=!0){return a.replace(at,t=>V(t.toLowerCase(),e))}function It(a,e){const t=[];if(a){const n=a.split(",");for(let r=0;r<n.length;r++)je(n[r],"video")||t.push(n[r])}return e&&t.push(e),t.join(",")}function Bt(a,e){if(a&&(a.length>4||["ac-3","ec-3","alac","fLaC","Opus"].indexOf(a)!==-1))return a;if(e){const t=e.split(",");if(t.length>1){if(a){for(let n=t.length;n--;)if(t[n].substring(0,4)===a.substring(0,4))return t[n]}return t[0]}}return e||a}function an(a){const e=a.split(",");for(let t=0;t<e.length;t++){const n=e[t].split(".");if(n.length>2){let r=n.shift()+".";r+=parseInt(n.shift()).toString(16),r+=("000"+parseInt(n.shift()).toString(16)).slice(-4),e[t]=r}}return e.join(",")}function en(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 Mt(a){const e=ve(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 tn(a){return a.replace(/^.+codecs=["']?([^"']+).*$/,"$1")}const Ue={supported:!0,configurations:[],decodingInfoResults:[{supported:!0,powerEfficient:!0,smooth:!0}]};function bt(a,e){return{supported:!1,configurations:e,decodingInfoResults:[{supported:!1,smooth:!1,powerEfficient:!1}],error:a}}const wt={};function Me(a,e,t,n,r,i){const s=a.audioCodec?a.audioGroups:null,l=i==null?void 0:i.audioCodec,d=i==null?void 0:i.channels,c=d?parseInt(d):l?1/0:2;let g=null;if(s!=null&&s.length)try{s.length===1&&s[0]?g=e.groups[s[0]].channels:g=s.reduce((b,O)=>{if(O){const F=e.groups[O];if(!F)throw new Error(`Audio track group ${O} not found`);Object.keys(F.channels).forEach(H=>{b[H]=(b[H]||0)+F.channels[H]})}return b},{2:0})}catch(b){return!0}return a.videoCodec!==void 0&&(a.width>1920&&a.height>1088||a.height>1920&&a.width>1088||a.frameRate>Math.max(n,30)||a.videoRange!=="SDR"&&a.videoRange!==t||a.bitrate>Math.max(r,8e6))||!!g&&L(c)&&Object.keys(g).some(b=>parseInt(b)>c)}function Ae(a,e,t){const n=a.videoCodec,r=a.audioCodec;if(!n&&!r||!t)return Promise.resolve(Ue);const i=[];if(n){const s={width:a.width,height:a.height,bitrate:Math.ceil(Math.max(a.bitrate*.9,a.averageBitrate)),framerate:a.frameRate||30},l=a.videoRange;l!=="SDR"&&(s.transferFunction=l.toLowerCase());const d=n.split(","),c=navigator.userAgent;if(d.some(g=>pt(g))&&Pe())return Promise.resolve(bt(new Error(`Overriding Windows Firefox HEVC MediaCapabilities result based on user-agent sting: (${c})`),i));i.push.apply(i,d.map(g=>({type:"media-source",video:S(S({},s),{},{contentType:he(en(g),"video")})})))}return r&&a.audioGroups&&a.audioGroups.forEach(s=>{var l;s&&((l=e.groups[s])==null||l.tracks.forEach(d=>{if(d.groupId===s){const c=d.channels||"",g=parseFloat(c);L(g)&&g>2&&i.push.apply(i,r.split(",").map(b=>({type:"media-source",audio:{contentType:he(b,"audio"),channels:""+g}})))}}))}),Promise.all(i.map(s=>{const l=ut(s);return wt[l]||(wt[l]=t.decodingInfo(s))})).then(s=>({supported:!s.some(l=>!l.supported),configurations:i,decodingInfoResults:s})).catch(s=>({supported:!1,configurations:i,decodingInfoResults:[],error:s}))}function ut(a){const{audio:e,video:t}=a,n=t||e;if(n){const r=tn(n.contentType);if(t)return`r${t.height}x${t.width}f${Math.ceil(t.framerate)}${t.transferFunction||"sd"}_${r}_${Math.ceil(t.bitrate/1e5)}`;if(e)return`c${e.channels}${e.spatialRendering?"s":"n"}_${r}`}return""}const ft=["NONE","TYPE-0","TYPE-1",null];function Nt(a){return ft.indexOf(a)>-1}const Pt=["SDR","PQ","HLG"];function Zt(a){return!!a&&Pt.indexOf(a)>-1}var Ht={No:"",Yes:"YES",v2:"v2"};function sn(a){const{canSkipUntil:e,canSkipDateRanges:t,age:n}=a,r=n<e/2;return e&&r?t?Ht.v2:Ht.Yes:Ht.No}class _n{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 hn{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 Lt(this._audioGroups,e)}hasSubtitleGroup(e){return Lt(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 Lt(a,e){return!e||!a?!1:a.indexOf(e)!==-1}function Ft(){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 $t(a,e){let t=!1,n=[];if(a&&(t=a!=="SDR",n=[a]),e){n=e.allowedVideoRanges||Pt.slice(0);const r=n.join("")!=="SDR"&&!e.videoCodec;t=e.preferHDR!==void 0?e.preferHDR:r&&Ft(),t||(n=["SDR"])}return{preferHDR:t,allowedVideoRanges:n}}const Xt=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}},Wt=(a,e)=>JSON.stringify(a,Xt(e));function Dn(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 g=!1,b=!1,O=1/0,F=1/0,H=1/0,we=1/0,Ee=0,Ke=[];const{preferHDR:it,allowedVideoRanges:Ye}=$t(e,r);for(let zt=i.length;zt--;){const rn=a[i[zt]];g||(g=rn.channels[2]>0),O=Math.min(O,rn.minHeight),F=Math.min(F,rn.minFramerate),H=Math.min(H,rn.minBitrate),Ye.filter(Rn=>rn.videoRanges[Rn]>0).length>0&&(b=!0)}O=L(O)?O:0,F=L(F)?F:0;const St=Math.max(1080,O),Tt=Math.max(30,F);H=L(H)?H:t,t=Math.max(H,t),b||(e=void 0);const Jt=i.length>1;return{codecSet:i.reduce((zt,rn)=>{const kt=a[rn];if(rn===zt)return zt;if(Ke=b?Ye.filter(Rn=>kt.videoRanges[Rn]>0):[],Jt){if(kt.minBitrate>t)return pn(rn,`min bitrate of ${kt.minBitrate} > current estimate of ${t}`),zt;if(!kt.hasDefaultAudio)return pn(rn,"no renditions with default or auto-select sound found"),zt;if(l&&rn.indexOf(l.substring(0,4))%5!==0)return pn(rn,`audio codec preference "${l}" not found`),zt;if(s&&!c){if(!kt.channels[s])return pn(rn,`no renditions with ${s} channel sound found (channels options: ${Object.keys(kt.channels)})`),zt}else if((!l||c)&&g&&kt.channels[2]===0)return pn(rn,"no renditions with stereo sound found"),zt;if(kt.minHeight>St)return pn(rn,`min resolution of ${kt.minHeight} > maximum of ${St}`),zt;if(kt.minFramerate>Tt)return pn(rn,`min framerate of ${kt.minFramerate} > maximum of ${Tt}`),zt;if(!Ke.some(Rn=>kt.videoRanges[Rn]>0))return pn(rn,`no variants with VIDEO-RANGE of ${Wt(Ke)} found`),zt;if(d&&rn.indexOf(d.substring(0,4))%5!==0)return pn(rn,`video codec preference "${d}" not found`),zt;if(kt.maxScore<Ee)return pn(rn,`max score of ${kt.maxScore} < selected max of ${Ee}`),zt}return zt&&(xe(rn)>=xe(zt)||kt.fragmentError>a[zt].fragmentError)?zt:(we=kt.minIndex,Ee=kt.maxScore,rn)},void 0),videoRanges:Ke,preferHDR:it,minFramerate:F,minBitrate:H,minIndex:we}}function pn(a,e){$.log(`[abr] start candidates with "${a}" ignored because ${e}`)}function Gt(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 Je(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(g=>{if(!g)return;const b=e.groups[g];b&&(d.hasDefaultAudio=d.hasDefaultAudio||e.hasDefaultAudio?b.hasDefault:b.hasAutoSelect||!e.hasDefaultAudio&&!e.hasAutoSelectAudio,Object.keys(b.channels).forEach(O=>{d.channels[O]=(d.channels[O]||0)+b.channels[O]}))}),r},{})}function rt(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 ht(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(xt(a,r,t))return n}return-1}function xt(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||mt(i,e.lang))&&(i===void 0||e.assocLang===s)&&(l===void 0||e.default===l)&&(d===void 0||e.forced===d)&&(!("characteristics"in a)||jt(a.characteristics||"",e.characteristics))&&(t===void 0||t(a,e))}function mt(a,e="--"){return a.length===e.length?a===e:a.startsWith(e)||e.startsWith(a)}function jt(a,e=""){const t=a.split(","),n=e.split(",");return t.length===n.length&&!t.some(r=>n.indexOf(r)===-1)}function Et(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 Qt(a,e,t,n,r){const i=e[n],l=e.reduce((O,F,H)=>{const we=F.uri;return(O[we]||(O[we]=[])).push(H),O},{})[i.uri];l.length>1&&(n=Math.max.apply(Math,l));const d=i.videoRange,c=i.frameRate,g=i.codecSet.substring(0,4),b=nn(e,n,O=>{if(O.videoRange!==d||O.frameRate!==c||O.codecSet.substring(0,4)!==g)return!1;const F=O.audioGroups,H=t.filter(we=>!F||F.indexOf(we.groupId)!==-1);return ht(a,H,r)>-1});return b>-1?b:nn(e,n,O=>{const F=O.audioGroups,H=t.filter(we=>!F||F.indexOf(we.groupId)!==-1);return ht(a,H,r)>-1})}function nn(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 In extends ae{constructor(e){super("abr",e.logger),this.hls=void 0,this.lastLevelLoadSec=0,this.lastLoadedFragLevel=-1,this.firstSelection=-1,this._nextAutoLevel=-1,this.nextAutoLevelKey="",this.audioTracksByGroup=null,this.codecTiers=null,this.timer=-1,this.fragCurrent=null,this.partCurrent=null,this.bitrateTestDelay=0,this.rebufferNotice=-1,this.bwEstimator=void 0,this._abandonRulesCheck=t=>{var n;const{fragCurrent:r,partCurrent:i,hls:s}=this,{autoLevelEnabled:l,media:d}=s;if(!r||!d)return;const c=performance.now(),g=i?i.stats:r.stats,b=i?i.duration:r.duration,O=c-g.loading.start,F=s.minAutoLevel,H=r.level,we=this._nextAutoLevel;if(g.aborted||g.loaded&&g.loaded===g.total||H<=F){this.clearTimer(),this._nextAutoLevel=-1;return}if(!l)return;const Ee=we>-1&&we!==H,Ke=!!t||Ee;if(!Ke&&(d.paused||!d.playbackRate||!d.readyState))return;const it=s.mainForwardBufferInfo;if(!Ke&&it===null)return;const Ye=this.bwEstimator.getEstimateTTFB(),St=Math.abs(d.playbackRate);if(O<=Math.max(Ye,1e3*(b/(St*2))))return;const Tt=it?it.len/St:0,Jt=g.loading.first?g.loading.first-g.loading.start:-1,Ct=g.loaded&&Jt>-1,zt=this.getBwEstimate(),rn=s.levels,kt=rn[H],Rn=Math.max(g.loaded,Math.round(b*(r.bitrate||kt.averageBitrate)/8));let Gn=Ct?O-Jt:O;Gn<1&&Ct&&(Gn=Math.min(O,g.loaded*8/zt));const Fr=Ct?g.loaded*1e3/Gn:0,yr=Ye/1e3,fr=Fr?(Rn-g.loaded)/Fr:Rn*8/zt+yr;if(fr<=Tt)return;const er=Fr?Fr*8:zt,hr=((n=(t==null?void 0:t.details)||this.hls.latestLevelDetails)==null?void 0:n.live)===!0,lr=this.hls.config.abrBandWidthUpFactor;let Ln=Number.POSITIVE_INFINITY,$n;for($n=H-1;$n>F;$n--){const Wr=rn[$n].maxBitrate,qr=!rn[$n].details||hr;if(Ln=this.getTimeToLoadFrag(yr,er,b*Wr,qr),Ln<Math.min(Tt,b+yr))break}if(Ln>=fr||Ln>b*10)return;Ct?this.bwEstimator.sample(O-Math.min(Ye,Jt),g.loaded):this.bwEstimator.sampleTTFB(O);const Dr=rn[$n].maxBitrate;this.getBwEstimate()*lr>Dr&&this.resetEstimator(Dr);const xr=this.findBestLevel(Dr,F,$n,0,Tt,1,1);xr>-1&&($n=xr),this.warn(`Fragment ${r.sn}${i?" part "+i.index:""} of level ${H} is loading too slowly;
Fragment duration: ${r.duration.toFixed(3)}
Time to underbuffer: ${Tt.toFixed(3)} s
Estimated load time for current fragment: ${fr.toFixed(3)} s
Estimated load time for down switch fragment: ${Ln.toFixed(3)} s
TTFB estimate: ${Jt|0} ms
Current BW estimate: ${L(zt)?zt|0:"Unknown"} bps
New BW estimate: ${this.getBwEstimate()|0} bps
Switching to level ${$n} @ ${Dr|0} bps`),s.nextLoadLevel=s.nextAutoLevel=$n,this.clearTimer();const kr=()=>{if(this.clearTimer(),this.fragCurrent===r&&this.hls.loadLevel===$n&&$n>0){const Wr=this.getStarvationDelay();if(this.warn(`Aborting inflight request ${$n>0?"and switching down":""}
Fragment duration: ${r.duration.toFixed(3)} s
Time to underbuffer: ${Wr.toFixed(3)} s`),r.abortRequests(),this.fragCurrent=this.partCurrent=null,$n>F){let qr=this.findBestLevel(this.hls.levels[F].bitrate,F,$n,0,Wr,1,1);qr===-1&&(qr=F),this.hls.nextLoadLevel=this.hls.nextAutoLevel=qr,this.resetEstimator(this.hls.levels[qr].bitrate)}}};Ee||fr>Ln*2?kr():this.timer=self.setInterval(kr,Ln*1e3),s.trigger(p.FRAG_LOAD_EMERGENCY_ABORTED,{frag:r,part:i,stats:g})},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 k(e.abrEwmaSlowVoD,e.abrEwmaFastVoD,e.abrEwmaDefaultEstimate)}registerListeners(){const{hls:e}=this;e.on(p.MANIFEST_LOADING,this.onManifestLoading,this),e.on(p.FRAG_LOADING,this.onFragLoading,this),e.on(p.FRAG_LOADED,this.onFragLoaded,this),e.on(p.FRAG_BUFFERED,this.onFragBuffered,this),e.on(p.LEVEL_SWITCHING,this.onLevelSwitching,this),e.on(p.LEVEL_LOADED,this.onLevelLoaded,this),e.on(p.LEVELS_UPDATED,this.onLevelsUpdated,this),e.on(p.MAX_AUTO_LEVEL_UPDATED,this.onMaxAutoLevelUpdated,this),e.on(p.ERROR,this.onError,this)}unregisterListeners(){const{hls:e}=this;e&&(e.off(p.MANIFEST_LOADING,this.onManifestLoading,this),e.off(p.FRAG_LOADING,this.onFragLoading,this),e.off(p.FRAG_LOADED,this.onFragLoaded,this),e.off(p.FRAG_BUFFERED,this.onFragBuffered,this),e.off(p.LEVEL_SWITCHING,this.onLevelSwitching,this),e.off(p.LEVEL_LOADED,this.onLevelLoaded,this),e.off(p.LEVELS_UPDATED,this.onLevelsUpdated,this),e.off(p.MAX_AUTO_LEVEL_UPDATED,this.onMaxAutoLevelUpdated,this),e.off(p.ERROR,this.onError,this))}destroy(){this.unregisterListeners(),this.clearTimer(),this.hls=this._abandonRulesCheck=null,this.fragCurrent=this.partCurrent=null}onManifestLoading(e,t){this.lastLoadedFragLevel=-1,this.firstSelection=-1,this.lastLevelLoadSec=0,this.fragCurrent=this.partCurrent=null,this.onLevelsUpdated(),this.clearTimer()}onLevelsUpdated(){this.lastLoadedFragLevel>-1&&this.fragCurrent&&(this.lastLoadedFragLevel=this.fragCurrent.level),this._nextAutoLevel=-1,this.onMaxAutoLevelUpdated(),this.codecTiers=null,this.audioTracksByGroup=null}onMaxAutoLevelUpdated(){this.firstSelection=-1,this.nextAutoLevelKey=""}onFragLoading(e,t){const 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 A.BUFFER_ADD_CODEC_ERROR:case A.BUFFER_APPEND_ERROR:this.lastLoadedFragLevel=-1,this.firstSelection=-1;break;case A.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;L(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===fe.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(p.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!==fe.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 g=i.abrBandWidthFactor,b=i.abrBandWidthUpFactor;if(c){const Ee=this.findBestLevel(d,s,r,c,0,g,b);if(Ee>=0)return this.rebufferNotice=-1,Ee}let O=l?Math.min(l,i.maxStarvationDelay):i.maxStarvationDelay;if(!c){const Ee=this.bitrateTestDelay;Ee&&(O=(l?Math.min(l,i.maxLoadingDelay):i.maxLoadingDelay)-Ee,this.info(`bitrate test took ${Math.round(1e3*Ee)}ms, set first fragment max fetchDuration to ${Math.round(1e3*O)} ms`),g=b=1)}const F=this.findBestLevel(d,s,r,c,O,g,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 H=n.levels[s],we=n.loadLevelObj;return we&&(H==null?void 0:H.bitrate)<we.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,g=this.lastLoadedFragLevel,b=g===-1?this.hls.firstLevel:g,{fragCurrent:O,partCurrent:F}=this,{levels:H,allAudioTracks:we,loadLevel:Ee,config:Ke}=this.hls;if(H.length===1)return 0;const it=H[b],Ye=!!((d=this.hls.latestLevelDetails)!=null&&d.live),St=Ee===-1||g===-1;let Tt,Jt="SDR",Ct=(it==null?void 0:it.frameRate)||0;const{audioPreference:zt,videoPreference:rn}=Ke,kt=this.audioTracksByGroup||(this.audioTracksByGroup=Gt(we));let Rn=-1;if(St){if(this.firstSelection!==-1)return this.firstSelection;const er=this.codecTiers||(this.codecTiers=Je(H,kt,t,n)),hr=Dn(er,Jt,e,zt,rn),{codecSet:lr,videoRanges:Ln,minFramerate:$n,minBitrate:Dr,minIndex:xr,preferHDR:kr}=hr;Rn=xr,Tt=lr,Jt=kr?Ln[Ln.length-1]:Ln[0],Ct=$n,e=Math.max(e,Dr),this.log(`picked start tier ${Wt(hr)}`)}else Tt=it==null?void 0:it.codecSet,Jt=it==null?void 0:it.videoRange;const Gn=F?F.duration:O?O.duration:0,Fr=this.bwEstimator.getEstimateTTFB()/1e3,yr=[];for(let er=n;er>=t;er--){var fr;const hr=H[er],lr=er>b;if(!hr)continue;if(Ke.useMediaCapabilities&&!hr.supportedResult&&!hr.supportedPromise){const qr=navigator.mediaCapabilities;typeof(qr==null?void 0:qr.decodingInfo)=="function"&&(Me(hr,kt,Jt,Ct,e,zt)||pt(hr.videoCodec))?(hr.supportedPromise=Ae(hr,kt,qr),hr.supportedPromise.then(ai=>{if(!this.hls)return;hr.supportedResult=ai;const Ui=this.hls.levels,Ki=Ui.indexOf(hr);ai.error?this.warn(`MediaCapabilities decodingInfo error: "${ai.error}" for level ${Ki} ${Wt(ai)}`):ai.supported||(this.warn(`Unsupported MediaCapabilities decodingInfo result for level ${Ki} ${Wt(ai)}`),Ki>-1&&Ui.length>1&&(this.log(`Removing unsupported level ${Ki}`),this.hls.removeLevel(Ki),this.hls.loadLevel===-1&&(this.hls.nextLoadLevel=0)))})):hr.supportedResult=Ue}if((Tt&&hr.codecSet!==Tt||Jt&&hr.videoRange!==Jt||lr&&Ct>hr.frameRate||!lr&&Ct>0&&Ct<hr.frameRate||hr.supportedResult&&!((fr=hr.supportedResult.decodingInfoResults)!=null&&fr[0].smooth))&&(!St||er!==Rn)){yr.push(er);continue}const Ln=hr.details,$n=(F?Ln==null?void 0:Ln.partTarget:Ln==null?void 0:Ln.averagetargetduration)||Gn;let Dr;lr?Dr=l*e:Dr=s*e;const xr=Gn&&r>=Gn*2&&i===0?hr.averageBitrate:hr.maxBitrate,kr=this.getTimeToLoadFrag(Fr,Dr,xr*$n,Ln===void 0);if(Dr>=xr&&(er===g||hr.loadError===0&&hr.fragmentError===0)&&(kr<=Fr||!L(kr)||Ye&&!this.bitrateTestDelay||kr<c)){const qr=this.forcedAutoLevel;return er!==Ee&&(qr===-1||qr!==Ee)&&(yr.length&&this.trace(`Skipped level(s) ${yr.join(",")} of ${n} max with CODECS and VIDEO-RANGE:"${H[yr[0]].codecs}" ${H[yr[0]].videoRange}; not compatible with "${Tt}" ${Jt}`),this.info(`switch candidate:${b}->${er} adjustedbw(${Math.round(Dr)})-bitrate=${Math.round(Dr-xr)} ttfb:${Fr.toFixed(1)} avgDuration:${$n.toFixed(1)} maxFetchDuration:${c.toFixed(1)} fetchDuration:${kr.toFixed(1)} firstSelection:${St} codecSet:${hr.codecSet} videoRange:${hr.videoRange} hls.loadLevel:${Ee}`)),St&&(this.firstSelection=er),er}}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 wn={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 Kn(a,e,t){if(e===null||!Array.isArray(a)||!a.length||!L(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;t=t||0;for(let i=0;i<a.length;++i){const s=a[i];if(Zn(e,t,s))return s}return null}function dn(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)&&Hn(t,n,i)===0||fn(i,a,Math.min(r,n))))return i;const s=wn.search(e,Hn.bind(null,t,n));return s&&(s!==a||!i)?s:i}function fn(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 Hn(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 Zn(a,e,t){const n=Math.min(e,t.duration+(t.deltaPTS?t.deltaPTS:0))*1e3;return(t.endProgramDateTime||0)-n>a}function Yn(a,e){return wn.search(a,t=>t.cc<e?1:t.cc>e?-1:0)}function On(a,e,t){if(a&&a.startCC<=e&&a.endCC>=e){const n=t.start,r=t.end;let i=a.fragments;if(!t.relurl){const{fragmentHint:s}=a;s&&(i=i.concat(s))}return wn.search(i,s=>s.cc<e||s.end<=n?1:s.cc>e||s.start>=r?-1:0)}return null}function Fn(a){switch(a.details){case A.FRAG_LOAD_TIMEOUT:case A.KEY_LOAD_TIMEOUT:case A.LEVEL_LOAD_TIMEOUT:case A.MANIFEST_LOAD_TIMEOUT:return!0}return!1}function jn(a,e){const t=Fn(e);return a.default[`${t?"timeout":"error"}Retry`]}function Bn(a,e){const t=a.backoff==="linear"?1:Math.pow(2,e);return Math.min(t*a.retryDelayMs,a.maxRetryDelayMs)}function Jn(a){return S(S({},a),{errorRetry:null,timeoutRetry:null})}function ur(a,e,t,n){if(!a)return!1;const r=n==null?void 0:n.code,i=e<a.maxNumRetry&&(Pn(r)||!!t);return a.shouldRetry?a.shouldRetry(a,e,t,n,i):i}function Pn(a){return a===0&&navigator.onLine===!1||!!a&&(a<400||a>499)}var bn={DoNothing:0,SendEndCallback:1,SendAlternateToPenaltyBox:2,RemoveAlternatePermanently:3,InsertDiscontinuity:4,RetryRequest:5},Ge={None:0,MoveAllAlternatesMatchingHost:1,MoveAllAlternatesMatchingHDCP:2,SwitchToSDR:4};class mn extends ae{constructor(e){super("error-controller",e.logger),this.hls=void 0,this.playlistError=0,this.penalizedRenditions={},this.hls=e,this.registerListeners()}registerListeners(){const e=this.hls;e.on(p.ERROR,this.onError,this),e.on(p.MANIFEST_LOADING,this.onManifestLoading,this),e.on(p.LEVEL_UPDATED,this.onLevelUpdated,this)}unregisterListeners(){const e=this.hls;e&&(e.off(p.ERROR,this.onError,this),e.off(p.ERROR,this.onErrorOut,this),e.off(p.MANIFEST_LOADING,this.onManifestLoading,this),e.off(p.LEVEL_UPDATED,this.onLevelUpdated,this))}destroy(){this.unregisterListeners(),this.hls=null,this.penalizedRenditions={}}startLoad(e){}stopLoad(){this.playlistError=0}getVariantLevelIndex(e){return(e==null?void 0:e.type)===fe.MAIN?e.level:this.hls.loadLevel}onManifestLoading(){this.playlistError=0,this.penalizedRenditions={}}onLevelUpdated(){this.playlistError=0}onError(e,t){var n;if(t.fatal)return;const r=this.hls,i=t.context;switch(t.details){case A.FRAG_LOAD_ERROR:case A.FRAG_LOAD_TIMEOUT:case A.KEY_LOAD_ERROR:case A.KEY_LOAD_TIMEOUT:t.errorAction=this.getFragRetryOrSwitchAction(t);return;case A.FRAG_PARSING_ERROR:if((n=t.frag)!=null&&n.gap){t.errorAction=Mn();return}case A.FRAG_GAP:case A.FRAG_DECRYPT_ERROR:{t.errorAction=this.getFragRetryOrSwitchAction(t),t.errorAction.action=bn.SendAlternateToPenaltyBox;return}case A.LEVEL_EMPTY_ERROR:case A.LEVEL_PARSING_ERROR:{var s,l;const c=t.parent===fe.MAIN?t.level:r.loadLevel;t.details===A.LEVEL_EMPTY_ERROR&&((s=t.context)!=null&&(l=s.levelDetails)!=null&&l.live)?t.errorAction=this.getPlaylistRetryOrSwitchAction(t,c):(t.levelRetry=!1,t.errorAction=this.getLevelSwitchAction(t,c))}return;case A.LEVEL_LOAD_ERROR:case A.LEVEL_LOAD_TIMEOUT:typeof(i==null?void 0:i.level)=="number"&&(t.errorAction=this.getPlaylistRetryOrSwitchAction(t,i.level));return;case A.AUDIO_TRACK_LOAD_ERROR:case A.AUDIO_TRACK_LOAD_TIMEOUT:case A.SUBTITLE_LOAD_ERROR:case A.SUBTITLE_TRACK_LOAD_TIMEOUT:if(i){const c=r.loadLevelObj;if(c&&(i.type===be.AUDIO_TRACK&&c.hasAudioGroup(i.groupId)||i.type===be.SUBTITLE_TRACK&&c.hasSubtitleGroup(i.groupId))){t.errorAction=this.getPlaylistRetryOrSwitchAction(t,r.loadLevel),t.errorAction.action=bn.SendAlternateToPenaltyBox,t.errorAction.flags=Ge.MoveAllAlternatesMatchingHost;return}}return;case A.KEY_SYSTEM_STATUS_OUTPUT_RESTRICTED:{const c=r.loadLevelObj,g=c==null?void 0:c.attrs["HDCP-LEVEL"];g?t.errorAction={action:bn.SendAlternateToPenaltyBox,flags:Ge.MoveAllAlternatesMatchingHDCP,hdcpLevel:g}:this.keySystemError(t)}return;case A.BUFFER_ADD_CODEC_ERROR:case A.REMUX_ALLOC_ERROR:case A.BUFFER_APPEND_ERROR:if(!t.errorAction){var d;t.errorAction=this.getLevelSwitchAction(t,(d=t.level)!=null?d:r.loadLevel)}return;case A.INTERNAL_EXCEPTION:case A.BUFFER_APPENDING_ERROR:case A.BUFFER_FULL_ERROR:case A.LEVEL_SWITCH_ERROR:case A.BUFFER_STALLED_ERROR:case A.BUFFER_SEEK_OVER_HOLE:case A.BUFFER_NUDGE_ON_STALL:t.errorAction=Mn();return}t.type===_e.KEY_SYSTEM_ERROR&&this.keySystemError(t)}keySystemError(e){const t=this.getVariantLevelIndex(e.frag);e.levelRetry=!1,e.errorAction=this.getLevelSwitchAction(e,t)}getPlaylistRetryOrSwitchAction(e,t){const n=this.hls,r=jn(n.config.playlistLoadPolicy,e),i=this.playlistError++;if(ur(r,i,Fn(e),e.response))return{action:bn.RetryRequest,flags:Ge.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=jn(e.details.startsWith("key")?s:i,e),d=t.levels.reduce((g,b)=>g+b.fragmentError,0);if(r&&(e.details!==A.FRAG_GAP&&r.fragmentError++,ur(l,d,Fn(e),e.response)))return{action:bn.RetryRequest,flags:Ge.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===A.BUFFER_APPEND_ERROR&&r.fragmentError++;let g=-1;const{levels:b,loadLevel:O,minAutoLevel:F,maxAutoLevel:H}=n;n.autoLevelEnabled||(n.loadLevel=-1);const we=(i=e.frag)==null?void 0:i.type,Ke=(we===fe.AUDIO&&c===A.FRAG_PARSING_ERROR||e.sourceBufferName==="audio"&&(c===A.BUFFER_ADD_CODEC_ERROR||c===A.BUFFER_APPEND_ERROR))&&b.some(({audioCodec:Jt})=>r.audioCodec!==Jt),Ye=e.sourceBufferName==="video"&&(c===A.BUFFER_ADD_CODEC_ERROR||c===A.BUFFER_APPEND_ERROR)&&b.some(({codecSet:Jt,audioCodec:Ct})=>r.codecSet!==Jt&&r.audioCodec===Ct),{type:St,groupId:Tt}=(s=e.context)!=null?s:{};for(let Jt=b.length;Jt--;){const Ct=(Jt+O)%b.length;if(Ct!==O&&Ct>=F&&Ct<=H&&b[Ct].loadError===0){var l,d;const zt=b[Ct];if(c===A.FRAG_GAP&&we===fe.MAIN&&e.frag){const rn=b[Ct].details;if(rn){const kt=dn(e.frag,rn.fragments,e.frag.start);if(kt!=null&&kt.gap)continue}}else{if(St===be.AUDIO_TRACK&&zt.hasAudioGroup(Tt)||St===be.SUBTITLE_TRACK&&zt.hasSubtitleGroup(Tt))continue;if(we===fe.AUDIO&&(l=r.audioGroups)!=null&&l.some(rn=>zt.hasAudioGroup(rn))||we===fe.SUBTITLE&&(d=r.subtitleGroups)!=null&&d.some(rn=>zt.hasSubtitleGroup(rn))||Ke&&r.audioCodec===zt.audioCodec||!Ke&&r.audioCodec!==zt.audioCodec||Ye&&r.codecSet===zt.codecSet)continue}g=Ct;break}}if(g>-1&&n.loadLevel!==g)return e.levelRetry=!0,this.playlistError=0,{action:bn.SendAlternateToPenaltyBox,flags:Ge.None,nextAutoLevel:g}}return{action:bn.SendAlternateToPenaltyBox,flags:Ge.MoveAllAlternatesMatchingHost}}onErrorOut(e,t){var n;switch((n=t.errorAction)==null?void 0:n.action){case bn.DoNothing:break;case bn.SendAlternateToPenaltyBox:this.sendAlternateToPenaltyBox(t),!t.errorAction.resolved&&t.details!==A.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 bn.RetryRequest:break}if(t.fatal){this.hls.stopLoad();return}}sendAlternateToPenaltyBox(e){const t=this.hls,n=e.errorAction;if(!n)return;const{flags:r,hdcpLevel:i,nextAutoLevel:s}=n;switch(r){case Ge.None:this.switchLevel(e,s);break;case Ge.MoveAllAlternatesMatchingHDCP:i&&(t.maxHdcpLevel=ft[ft.indexOf(i)-1],n.resolved=!0),this.warn(`Restricting playback to HDCP-LEVEL of "${t.maxHdcpLevel}" or lower`);break}n.resolved||this.switchLevel(e,s)}switchLevel(e,t){if(t!==void 0&&e.errorAction&&(this.warn(`switching to level ${t} after ${e.details}`),this.hls.nextAutoLevel=t,e.errorAction.resolved=!0,this.hls.nextLoadLevel=this.hls.nextAutoLevel,e.details===A.BUFFER_ADD_CODEC_ERROR&&e.mimeType&&e.sourceBufferName!=="audiovideo")){const n=tn(e.mimeType),r=this.hls.levels;for(let i=r.length;i--;)r[i][`${e.sourceBufferName}Codec`]===n&&this.hls.removeLevel(i)}}}function Mn(a){const e={action:bn.DoNothing,flags:Ge.None};return a&&(e.resolved=!0),e}var Tn={NOT_LOADED:"NOT_LOADED",APPENDING:"APPENDING",PARTIAL:"PARTIAL",OK:"OK"};class Xn{constructor(e){this.activePartLists=Object.create(null),this.endListFragments=Object.create(null),this.fragments=Object.create(null),this.timeRanges=Object.create(null),this.bufferPadding=.2,this.hls=void 0,this.hasGaps=!1,this.hls=e,this._registerListeners()}_registerListeners(){const{hls:e}=this;e.on(p.MANIFEST_LOADING,this.onManifestLoading,this),e.on(p.BUFFER_APPENDED,this.onBufferAppended,this),e.on(p.FRAG_BUFFERED,this.onFragBuffered,this),e.on(p.FRAG_LOADED,this.onFragLoaded,this)}_unregisterListeners(){const{hls:e}=this;e.off(p.MANIFEST_LOADING,this.onManifestLoading,this),e.off(p.BUFFER_APPENDED,this.onBufferAppended,this),e.off(p.FRAG_BUFFERED,this.onFragBuffered,this),e.off(p.FRAG_LOADED,this.onFragLoaded,this)}destroy(){this._unregisterListeners(),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;const s=i.end;if(i.start<=e&&s!==null&&e<=s)return i}return this.getBufferedFrag(e,t)}getBufferedFrag(e,t){return this.getFragAtPos(e,t,!0)}getFragAtPos(e,t,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(g=>{const b=!this.isTimeBuffered(g.startPTS,g.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=ar(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],g=s||d.partial===!0;i.range[l]=this.getBufferedTimes(n,e.part,g,c)}),i.loaded=null,Object.keys(i.range).length?(i.buffered=!0,(i.body.endList=n.endList||i.body.endList)&&(this.endListFragments[i.body.type]=i),sr(i)||this.removeParts(n.sn-1,n.type)):this.removeFragment(i.body)}removeParts(e,t){const n=this.activePartLists[t];n&&(this.activePartLists[t]=n.filter(r=>r.fragment.sn>=e))}fragBuffered(e,t){const n=ar(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,r.buffered=!0)}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 g=0;g<r.length;g++){const b=r.start(g)-this.bufferPadding,O=r.end(g)+this.bufferPadding;if(c>=b&&d<=O){i.time.push({startPTS:Math.max(s,r.start(g)),endPTS:Math.min(l,r.end(g))});break}else if(s<O&&l>b){const F=Math.max(s,r.start(g)),H=Math.min(l,r.end(g));H>F&&(i.partial=!0,i.time.push({startPTS:F,endPTS:H}))}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 g=d[c];g&&sr(g)&&(r=g.body.start-l,i=g.body.end+l,e>=r&&e<=i&&(n=Math.min(e-r,i-e),s<=n&&(t=g.body,s=n)))}),t}isEndListAppended(e){const t=this.endListFragments[e];return t!==void 0&&(t.buffered||sr(t))}getState(e){const t=ar(e),n=this.fragments[t];return n?n.buffered?sr(n)?Tn.PARTIAL:Tn.OK:Tn.APPENDING:Tn.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=ar(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=ar(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=ar(e);e.clearElementaryStreamInfo();const n=this.activePartLists[e.type];if(n){const r=e.sn;this.activePartLists[e.type]=n.filter(i=>i.fragment.sn!==r)}delete this.fragments[t],e.endList&&delete this.endListFragments[e.type]}removeAllFragments(){var e,t;this.fragments=Object.create(null),this.endListFragments=Object.create(null),this.activePartLists=Object.create(null),this.hasGaps=!1;const n=(e=this.hls)==null||(t=e.latestLevelDetails)==null?void 0:t.partList;n&&n.forEach(r=>r.clearElementaryStreamInfo())}}function sr(a){var e,t,n;return a.buffered&&(a.body.gap||((e=a.range.video)==null?void 0:e.partial)||((t=a.range.audio)==null?void 0:t.partial)||((n=a.range.audiovideo)==null?void 0:n.partial))}function ar(a){return`${a.type}_${a.level}_${a.sn}`}var Un={cbc:0,ctr:1};class tr{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 Un.cbc:return this.subtle.decrypt({name:"AES-CBC",iv:this.aesIV},t,e);case Un.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 xn(a){const e=a.byteLength,t=e&&new DataView(a.buffer).getUint8(e-1);return t?a.slice(0,e-t):a}class gn{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],g=d[1],b=d[2],O=d[3],F=new Uint32Array(256);let H=0,we=0,Ee=0;for(Ee=0;Ee<256;Ee++)Ee<128?F[Ee]=Ee<<1:F[Ee]=Ee<<1^283;for(Ee=0;Ee<256;Ee++){let Ke=we^we<<1^we<<2^we<<3^we<<4;Ke=Ke>>>8^Ke&255^99,e[H]=Ke,t[Ke]=H;const it=F[H],Ye=F[it],St=F[Ye];let Tt=F[Ke]*257^Ke*16843008;r[H]=Tt<<24|Tt>>>8,i[H]=Tt<<16|Tt>>>16,s[H]=Tt<<8|Tt>>>24,l[H]=Tt,Tt=St*16843009^Ye*65537^it*257^H*16843008,c[Ke]=Tt<<24|Tt>>>8,g[Ke]=Tt<<16|Tt>>>16,b[Ke]=Tt<<8|Tt>>>24,O[Ke]=Tt,H?(H=it^F[F[F[St^it]]],we^=F[F[we]]):H=we=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),g=this.invKeySchedule=new Uint32Array(s),b=this.sBox,O=this.rcon,F=this.invSubMix,H=F[0],we=F[1],Ee=F[2],Ke=F[3];let it,Ye;for(l=0;l<s;l++){if(l<i){it=c[l]=t[l];continue}Ye=it,l%i===0?(Ye=Ye<<8|Ye>>>24,Ye=b[Ye>>>24]<<24|b[Ye>>>16&255]<<16|b[Ye>>>8&255]<<8|b[Ye&255],Ye^=O[l/i|0]<<24):i>6&&l%i===4&&(Ye=b[Ye>>>24]<<24|b[Ye>>>16&255]<<16|b[Ye>>>8&255]<<8|b[Ye&255]),c[l]=it=(c[l-i]^Ye)>>>0}for(d=0;d<s;d++)l=s-d,d&3?Ye=c[l]:Ye=c[l-4],d<4||l<=4?g[d]=Ye:g[d]=H[b[Ye>>>24]]^we[b[Ye>>>16&255]]^Ee[b[Ye>>>8&255]]^Ke[b[Ye&255]],g[d]=g[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],g=l[2],b=l[3],O=this.uint8ArrayToUint32Array_(n);let F=O[0],H=O[1],we=O[2],Ee=O[3];const Ke=new Int32Array(e),it=new Int32Array(Ke.length);let Ye,St,Tt,Jt,Ct,zt,rn,kt,Rn,Gn,Fr,yr,fr,er;const hr=this.networkToHostOrderSwap;for(;t<Ke.length;){for(Rn=hr(Ke[t]),Gn=hr(Ke[t+1]),Fr=hr(Ke[t+2]),yr=hr(Ke[t+3]),Ct=Rn^i[0],zt=yr^i[1],rn=Fr^i[2],kt=Gn^i[3],fr=4,er=1;er<r;er++)Ye=d[Ct>>>24]^c[zt>>16&255]^g[rn>>8&255]^b[kt&255]^i[fr],St=d[zt>>>24]^c[rn>>16&255]^g[kt>>8&255]^b[Ct&255]^i[fr+1],Tt=d[rn>>>24]^c[kt>>16&255]^g[Ct>>8&255]^b[zt&255]^i[fr+2],Jt=d[kt>>>24]^c[Ct>>16&255]^g[zt>>8&255]^b[rn&255]^i[fr+3],Ct=Ye,zt=St,rn=Tt,kt=Jt,fr=fr+4;Ye=s[Ct>>>24]<<24^s[zt>>16&255]<<16^s[rn>>8&255]<<8^s[kt&255]^i[fr],St=s[zt>>>24]<<24^s[rn>>16&255]<<16^s[kt>>8&255]<<8^s[Ct&255]^i[fr+1],Tt=s[rn>>>24]<<24^s[kt>>16&255]<<16^s[Ct>>8&255]<<8^s[zt&255]^i[fr+2],Jt=s[kt>>>24]<<24^s[Ct>>16&255]<<16^s[zt>>8&255]<<8^s[rn&255]^i[fr+3],it[t]=hr(Ye^F),it[t+1]=hr(Jt^H),it[t+2]=hr(Tt^we),it[t+3]=hr(St^Ee),F=Rn,H=Gn,we=Fr,Ee=yr,t=t+4}return it.buffer}}class Vn{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=nr(this.aesMode);return this.subtle.importKey("raw",this.key,{name:e},!1,["encrypt","decrypt"])}}function nr(a){switch(a){case Un.cbc:return"AES-CBC";case Un.ctr:return"AES-CTR";default:throw new Error(`[FastAESKey] invalid aes mode ${a}`)}}const pr=16;class Mr{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?xn(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!==Un.cbc||t.byteLength!==16)return $.warn("SoftwareDecrypt: can only handle AES-128-CBC"),null;this.logOnce("JS AES decrypt"),l&&(e=Qe(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 gn),c.expandKey(t);const g=s;return this.currentResult=c.decrypt(d.buffer,0,n),this.currentIV=d.slice(-16).buffer,g||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 Vn(this.subtle,t,r)}return this.fastAesKey.expandKey().then(i=>this.subtle?(this.logOnce("WebCrypto AES decrypt"),new tr(this.subtle,new Uint8Array(n),r).decrypt(e.buffer,i)):Promise.reject(new Error("web crypto not initialized"))).catch(i=>($.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%pr;return n!==e.length&&(t=e.slice(0,n),this.remainderData=e.slice(n)),t}logOnce(e){this.logEnabled&&($.log(`[decrypter]: ${e}`),this.logEnabled=!1)}}const Cn=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 Or({type:_e.NETWORK_ERROR,details:A.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(H=>H[0]==="GAP")){d(_r(e));return}else e.gap=!1;const c=this.loader=i?new i(r):new s(r),g=mr(e);e.loader=c;const b=Jn(r.fragLoadPolicy.default),O={loadPolicy:b,timeout:b.maxLoadTimeMs,maxRetry:0,retryDelay:0,maxRetryDelay:0,highWaterMark:e.sn==="initSegment"?1/0:Cn};e.stats=c.stats;const F={onSuccess:(H,we,Ee,Ke)=>{this.resetLoader(e,c);let it=H.data;Ee.resetIV&&e.decryptdata&&(e.decryptdata.iv=new Uint8Array(it.slice(0,16)),it=it.slice(16)),l({frag:e,part:null,payload:it,networkDetails:Ke})},onError:(H,we,Ee,Ke)=>{this.resetLoader(e,c),d(new Or({type:_e.NETWORK_ERROR,details:A.FRAG_LOAD_ERROR,fatal:!1,frag:e,response:S({url:n,data:void 0},H),error:new Error(`HTTP Error ${H.code} ${H.text}`),networkDetails:Ee,stats:Ke}))},onAbort:(H,we,Ee)=>{this.resetLoader(e,c),d(new Or({type:_e.NETWORK_ERROR,details:A.INTERNAL_ABORTED,fatal:!1,frag:e,error:new Error("Aborted"),networkDetails:Ee,stats:H}))},onTimeout:(H,we,Ee)=>{this.resetLoader(e,c),d(new Or({type:_e.NETWORK_ERROR,details:A.FRAG_LOAD_TIMEOUT,fatal:!1,frag:e,error:new Error(`Timeout after ${O.timeout}ms`),networkDetails:Ee,stats:H}))}};t&&(F.onProgress=(H,we,Ee,Ke)=>t({frag:e,part:null,payload:Ee,networkDetails:Ke})),c.load(g,O,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(_r(e,t));return}const c=this.loader=i?new i(r):new s(r),g=mr(e,t);e.loader=c;const b=Jn(r.fragLoadPolicy.default),O={loadPolicy:b,timeout:b.maxLoadTimeMs,maxRetry:0,retryDelay:0,maxRetryDelay:0,highWaterMark:Cn};t.stats=c.stats,c.load(g,O,{onSuccess:(F,H,we,Ee)=>{this.resetLoader(e,c),this.updateStatsFromPart(e,t);const Ke={frag:e,part:t,payload:F.data,networkDetails:Ee};n(Ke),l(Ke)},onError:(F,H,we,Ee)=>{this.resetLoader(e,c),d(new Or({type:_e.NETWORK_ERROR,details:A.FRAG_LOAD_ERROR,fatal:!1,frag:e,part:t,response:S({url:g.url,data:void 0},F),error:new Error(`HTTP Error ${F.code} ${F.text}`),networkDetails:we,stats:Ee}))},onAbort:(F,H,we)=>{e.stats.aborted=t.stats.aborted,this.resetLoader(e,c),d(new Or({type:_e.NETWORK_ERROR,details:A.INTERNAL_ABORTED,fatal:!1,frag:e,part:t,error:new Error("Aborted"),networkDetails:we,stats:F}))},onTimeout:(F,H,we)=>{this.resetLoader(e,c),d(new Or({type:_e.NETWORK_ERROR,details:A.FRAG_LOAD_TIMEOUT,fatal:!1,frag:e,part:t,error:new Error(`Timeout after ${O.timeout}ms`),networkDetails:we,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 mr(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(L(r)&&L(i)){var s;let l=r,d=i;if(a.sn==="initSegment"&&zr((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 _r(a,e){const t=new Error(`GAP ${a.gap?"tag":"attribute"} found`),n={type:_e.MEDIA_ERROR,details:A.FRAG_GAP,fatal:!1,frag:a,error:t,networkDetails:null};return e&&(n.part=e),(e||a).stats.aborted=!0,new Or(n)}function zr(a){return a==="AES-128"||a==="AES-256"}class Or extends Error{constructor(e){super(e.error.message),this.data=void 0,this.data=e}}class wr extends ae{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 Nr{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=vr(),this.buffering={audio:vr(),video:vr(),audiovideo:vr()},this.level=e,this.sn=t,this.id=n,this.size=r,this.part=i,this.partial=s}}function vr(){return{start:0,executeStart:0,executeEnd:0,end:0}}const ei={length:0,start:()=>0,end:()=>0};class qn{static isBuffered(e,t){if(e){const n=qn.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=qn.getBuffered(e);return qn.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=qn.bufferedRanges(e);if(r.length)return qn.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((g,b)=>g.start-b.start||b.end-g.end);let r=-1,i=[];if(n)for(let g=0;g<e.length;g++){t>=e[g].start&&t<=e[g].end&&(r=g);const b=i.length;if(b){const O=i[b-1].end;e[g].start-O<n?e[g].end>O&&(i[b-1].end=e[g].end):i.push(e[g])}else i.push(e[g])}else i=e;let s=0,l,d=t,c=t;for(let g=0;g<i.length;g++){const b=i[g].start,O=i[g].end;if(r===-1&&t>=b&&t<=O&&(r=g),t+n>=b&&t<O)d=b,c=O,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||ei}catch(t){return $.log("failed to get media.buffered",t),ei}}}const oi=/\{\$([a-zA-Z0-9-_]+)\}/g;function Xr(a){return oi.test(a)}function ti(a,e){if(a.variableList!==null||a.hasVariableRefs){const t=a.variableList;return e.replace(oi,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 cr(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 fi(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 xi=/^(\d+)x(\d+)$/,vi=/(.+?)=(".*?"|.*?)(?:,|$)/g;class or{constructor(e,t){typeof e=="string"&&(e=or.parseAttrList(e,t)),v(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=xi.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(vi.lastIndex=0;(n=vi.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=ti(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":$.warn(`${e}: attribute ${s} is missing quotes`)}r[s]=l}return r}}const yi="com.apple.hls.interstitial";function Er(a){return a!=="ID"&&a!=="CLASS"&&a!=="CUE"&&a!=="START-DATE"&&a!=="DURATION"&&a!=="END-DATE"&&a!=="END-ON-NEXT"}function qt(a){return a==="SCTE35-OUT"||a==="SCTE35-IN"||a==="SCTE35-CMD"}class dr{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]){$.warn(`DATERANGE tag attribute: "${s}" does not match for tags with ID: "${e.ID}"`),this._badValueForSameId=s;break}e=v(new or({}),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"]);L(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?($.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(L(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===yi}get isValid(){return!!this.id&&!this._badValueForSameId&&L(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 Tr=10;class Nn{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}get hasProgramDateTime(){return this.fragments.length?L(this.fragments[this.fragments.length-1].programDateTime):!1}get levelTargetDuration(){return this.averagetargetduration||this.targetduration||Tr}get drift(){const e=this.driftEndTime-this.driftStartTime;return e>0?(this.driftEnd-this.driftStart)*1e3/e:1}get edge(){return this.partEnd||this.fragmentEnd}get partEnd(){var e;return(e=this.partList)!=null&&e.length?this.partList[this.partList.length-1].end:this.fragmentEnd}get fragmentEnd(){var e;return(e=this.fragments)!=null&&e.length?this.fragments[this.fragments.length-1].end:0}get fragmentStart(){var e;return(e=this.fragments)!=null&&e.length?this.fragments[0].start:0}get age(){return this.advancedDateTime?Math.max(Date.now()-this.advancedDateTime,0)/1e3:0}get lastPartIndex(){var e;return(e=this.partList)!=null&&e.length?this.partList[this.partList.length-1].index:-1}get maxPartIndex(){const e=this.partList;if(e){const t=this.lastPartIndex;if(t!==-1){for(let 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 kn(a){return a==="AES-128"||a==="AES-256"||a==="AES-256-CTR"}function Sn(a){switch(a){case"AES-128":case"AES-256":return Un.cbc;case"AES-256-CTR":return Un.ctr;default:throw new Error(`invalid full segment method ${a}`)}}function En(a){return Uint8Array.from(atob(a),e=>e.charCodeAt(0))}function Qn(a){return Uint8Array.from(unescape(encodeURIComponent(a)),e=>e.charCodeAt(0))}function gr(a){const e=Qn(a).subarray(0,16),t=new Uint8Array(16);return t.set(e,16-e.length),t}function Kr(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 Pr(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=En(s)):t=gr(s)}}return t}const Rr=typeof self!="undefined"?self:void 0;var rr={CLEARKEY:"org.w3.clearkey",FAIRPLAY:"com.apple.fps",PLAYREADY:"com.microsoft.playready",WIDEVINE:"com.widevine.alpha"},Br={CLEARKEY:"org.w3.clearkey",FAIRPLAY:"com.apple.streamingkeydelivery",PLAYREADY:"com.microsoft.playready",WIDEVINE:"urn:uuid:edef8ba9-79d6-4ace-a3c8-27dcd51d21ed"};function ni(a){switch(a){case Br.FAIRPLAY:return rr.FAIRPLAY;case Br.PLAYREADY:return rr.PLAYREADY;case Br.WIDEVINE:return rr.WIDEVINE;case Br.CLEARKEY:return rr.CLEARKEY}}var ci={CENC:"1077efecc0b24d02ace33c1e52e2fb4b",CLEARKEY:"e2719d58a985b3c9781ab030af78d30e",PLAYREADY:"9a04f07998404286ab92e65be0885f95",WIDEVINE:"edef8ba979d64acea3c827dcd51d21ed"};function Ni(a){if(a===ci.WIDEVINE)return rr.WIDEVINE;if(a===ci.PLAYREADY)return rr.PLAYREADY;if(a===ci.CENC||a===ci.CLEARKEY)return rr.CLEARKEY}function _i(a){switch(a){case rr.FAIRPLAY:return Br.FAIRPLAY;case rr.PLAYREADY:return Br.PLAYREADY;case rr.WIDEVINE:return Br.WIDEVINE;case rr.CLEARKEY:return Br.CLEARKEY}}function Wn(a){const{drmSystems:e,widevineLicenseUrl:t}=a,n=e?[rr.FAIRPLAY,rr.WIDEVINE,rr.PLAYREADY,rr.CLEARKEY].filter(r=>!!e[r]):[];return!n[rr.WIDEVINE]&&t&&n.push(rr.WIDEVINE),n}const ir=function(a){return Rr!=null&&(a=Rr.navigator)!=null&&a.requestMediaKeySystemAccess?self.navigator.requestMediaKeySystemAccess.bind(self.navigator):null}();function $r(a,e,t,n){let r;switch(a){case rr.FAIRPLAY:r=["cenc","sinf"];break;case rr.WIDEVINE:case rr.PLAYREADY:r=["cenc"];break;case rr.CLEARKEY:r=["cenc","keyids"];break;default:throw new Error(`Unknown key-system: ${a}`)}return ri(r,e,t,n)}function ri(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 Ur(a){var e;return a.sessionType==="persistent-license"||!!((e=a.sessionTypes)!=null&&e.some(t=>t==="persistent-license"))}function Ri(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=En(l).subarray(0,16);return Kr(d),d}}return null}let Fi={};class Li{static clearKeyUriToKeyIdMap(){Fi={}}constructor(e,t,n,r=[1],i=null){this.uri=void 0,this.method=void 0,this.keyFormat=void 0,this.keyFormatVersions=void 0,this.encrypted=void 0,this.isCommonEncryption=void 0,this.iv=null,this.key=null,this.keyId=null,this.pssh=null,this.method=e,this.uri=t,this.keyFormat=n,this.keyFormatVersions=r,this.iv=i,this.encrypted=e?e!=="NONE":!1,this.isCommonEncryption=this.encrypted&&!kn(e)}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 Br.FAIRPLAY:case Br.WIDEVINE:case Br.PLAYREADY:case Br.CLEARKEY:return["ISO-23001-7","SAMPLE-AES","SAMPLE-AES-CENC","SAMPLE-AES-CTR"].indexOf(this.method)!==-1}}return!1}getDecryptData(e){if(!this.encrypted||!this.uri)return null;if(kn(this.method)&&this.uri&&!this.iv){typeof e!="number"&&($.warn(`missing IV for initialization segment with method="${this.method}" - compliance issue`),e=0);const n=Di(e);return new Li(this.method,this.uri,"identity",this.keyFormatVersions,n)}const t=Pr(this.uri);if(t)switch(this.keyFormat){case Br.WIDEVINE:this.pssh=t,t.length>=22&&(this.keyId=t.subarray(t.length-22,t.length-6));break;case Br.PLAYREADY:{const n=new Uint8Array([154,4,240,121,152,64,66,134,171,146,230,91,224,136,95,149]);this.pssh=I(n,null,t),this.keyId=Ri(t);break}default:{let n=t.subarray(0,16);if(n.length!==16){const r=new Uint8Array(16);r.set(n,16-n.length),n=r}this.keyId=n;break}}if(!this.keyId||this.keyId.byteLength!==16){let n=Fi[this.uri];if(!n){const r=Object.keys(Fi).length%Number.MAX_SAFE_INTEGER;n=new Uint8Array(16),new DataView(n.buffer,12,4).setUint32(0,r),Fi[this.uri]=n}this.keyId=n}return this}}function Di(a){const e=new Uint8Array(16);for(let t=12;t<16;t++)e[t]=a>>8*(15-t)&255;return e}const is=/#EXT-X-STREAM-INF:([^\r\n]*)(?:[\r\n](?:#[^\r\n]*)?)*([^\r\n]+)|#EXT-X-(SESSION-DATA|SESSION-KEY|DEFINE|CONTENT-STEERING|START):([^\r\n]*)[\r\n]+/g,ss=/#EXT-X-MEDIA:(.*)/g,cs=/^#EXT(?:INF|-X-TARGETDURATION):/m,Wi=new RegExp([/#EXTINF:\s*(\d*(?:\.\d+)?)(?:,(.*)\s+)?/.source,/(?!#) *(\S[^\r\n]*)/.source,/#.*/.source].join("|"),"g"),ds=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 di{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 G.buildAbsoluteURL(t,e,{alwaysNormalize:!0})}static isMediaPlaylist(e){return cs.test(e)}static parseMasterPlaylist(e,t){const n=Xr(e),r={contentSteering:null,levels:[],playlistParsingError:null,sessionData:null,sessionKeys:null,startTimeOffset:null,variableList:null,hasVariableRefs:n},i=[];is.lastIndex=0;let s;for(;(s=is.exec(e))!=null;)if(s[1]){var l;const c=new or(s[1],r),g=ti(r,s[2]),b={attrs:c,bitrate:c.decimalInteger("BANDWIDTH")||c.decimalInteger("AVERAGE-BANDWIDTH"),name:c.NAME,url:di.resolve(g,t)},O=c.decimalResolution("RESOLUTION");O&&(b.width=O.width,b.height=O.height),Hi(c.CODECS,b);const F=c["SUPPLEMENTAL-CODECS"];F&&(b.supplemental={},Hi(F,b.supplemental)),(l=b.unknownCodecs)!=null&&l.length||i.push(b),r.levels.push(b)}else if(s[3]){const c=s[3],g=s[4];switch(c){case"SESSION-DATA":{const b=new or(g,r),O=b["DATA-ID"];O&&(r.sessionData===null&&(r.sessionData={}),r.sessionData[O]=b);break}case"SESSION-KEY":{const b=Qi(g,t,r);b.encrypted&&b.isSupported()?(r.sessionKeys===null&&(r.sessionKeys=[]),r.sessionKeys.push(b)):$.warn(`[Keys] Ignoring invalid EXT-X-SESSION-KEY tag: "${g}"`);break}case"DEFINE":{{const b=new or(g,r);cr(r,b,t)}break}case"CONTENT-STEERING":{const b=new or(g,r);r.contentSteering={uri:di.resolve(b["SERVER-URI"],t),pathwayId:b["PATHWAY-ID"]||"."};break}case"START":{r.startTimeOffset=Ji(g);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(ss.lastIndex=0;(r=ss.exec(e))!==null;){const c=new or(r[1],n),g=c.TYPE;if(g){const b=l[g],O=i[g]||[];i[g]=O;const F=c.LANGUAGE,H=c["ASSOC-LANGUAGE"],we=c.CHANNELS,Ee=c.CHARACTERISTICS,Ke=c["INSTREAM-ID"],it={attrs:c,bitrate:0,id:d++,groupId:c["GROUP-ID"]||"",name:c.NAME||F||"",type:g,default:c.bool("DEFAULT"),autoselect:c.bool("AUTOSELECT"),forced:c.bool("FORCED"),lang:F,url:c.URI?di.resolve(c.URI,t):""};if(H&&(it.assocLang=H),we&&(it.channels=we),Ee&&(it.characteristics=Ee),Ke&&(it.instreamId=Ke),b!=null&&b.length){const Ye=di.findGroup(b,it.groupId)||b[0];Ir(it,Ye,"audioCodec"),Ir(it,Ye,"textCodec")}O.push(it)}}return i}static parseLevelPlaylist(e,t,n,r,i,s){var l;const d={url:t},c=new Nn(t),g=c.fragments,b=[];let O=null,F=0,H=0,we=0,Ee=0,Ke=0,it=null,Ye=new $e(r,d),St,Tt,Jt,Ct=-1,zt=!1,rn=null,kt;if(Wi.lastIndex=0,c.m3u8=e,c.hasVariableRefs=Xr(e),((l=Wi.exec(e))==null?void 0:l[0])!=="#EXTM3U")return c.playlistParsingError=new Error("Missing format identifier #EXTM3U"),c;for(;(St=Wi.exec(e))!==null;){zt&&(zt=!1,Ye=new $e(r,d),Ye.playlistOffset=we,Ye.start=we,Ye.sn=F,Ye.cc=Ee,Ke&&(Ye.bitrate=Ke),Ye.level=n,O&&(Ye.initSegment=O,O.rawProgramDateTime&&(Ye.rawProgramDateTime=O.rawProgramDateTime,O.rawProgramDateTime=null),rn&&(Ye.setByteRange(rn),rn=null)));const yr=St[1];if(yr){Ye.duration=parseFloat(yr);const fr=(" "+St[2]).slice(1);Ye.title=fr||null,Ye.tagList.push(fr?["INF",yr,fr]:["INF",yr])}else if(St[3]){if(L(Ye.duration)){Ye.playlistOffset=we,Ye.start=we,Jt&&Qr(Ye,Jt,c),Ye.sn=F,Ye.level=n,Ye.cc=Ee,g.push(Ye);const fr=(" "+St[3]).slice(1);Ye.relurl=ti(c,fr),hi(Ye,it,b),it=Ye,we+=Ye.duration,F++,H=0,zt=!0}}else{if(St=St[0].match(ds),!St){$.warn("No matches on slow regex match for level playlist!");continue}for(Tt=1;Tt<St.length&&St[Tt]===void 0;Tt++);const fr=(" "+St[Tt]).slice(1),er=(" "+St[Tt+1]).slice(1),hr=St[Tt+2]?(" "+St[Tt+2]).slice(1):null;switch(fr){case"BYTERANGE":it?Ye.setByteRange(er,it):Ye.setByteRange(er);break;case"PROGRAM-DATE-TIME":Ye.rawProgramDateTime=er,Ye.tagList.push(["PROGRAM-DATE-TIME",er]),Ct===-1&&(Ct=g.length);break;case"PLAYLIST-TYPE":c.type&&ii(c,fr,St),c.type=er.toUpperCase();break;case"MEDIA-SEQUENCE":c.startSN!==0?ii(c,fr,St):g.length>0&&Ei(c,fr,St),F=c.startSN=parseInt(er);break;case"SKIP":{c.skippedSegments&&ii(c,fr,St);const lr=new or(er,c),Ln=lr.decimalInteger("SKIPPED-SEGMENTS");if(L(Ln)){c.skippedSegments+=Ln;for(let Dr=Ln;Dr--;)g.push(null);F+=Ln}const $n=lr.enumeratedString("RECENTLY-REMOVED-DATERANGES");$n&&(c.recentlyRemovedDateranges=(c.recentlyRemovedDateranges||[]).concat($n.split(" ")));break}case"TARGETDURATION":c.targetduration!==0&&ii(c,fr,St),c.targetduration=Math.max(parseInt(er),1);break;case"VERSION":c.version!==null&&ii(c,fr,St),c.version=parseInt(er);break;case"INDEPENDENT-SEGMENTS":break;case"ENDLIST":c.live||ii(c,fr,St),c.live=!1;break;case"#":(er||hr)&&Ye.tagList.push(hr?[er,hr]:[er]);break;case"DISCONTINUITY":Ee++,Ye.tagList.push(["DIS"]);break;case"GAP":Ye.gap=!0,Ye.tagList.push([fr]);break;case"BITRATE":Ye.tagList.push([fr,er]),Ke=parseInt(er)*1e3,L(Ke)?Ye.bitrate=Ke:Ke=0;break;case"DATERANGE":{const lr=new or(er,c),Ln=new dr(lr,c.dateRanges[lr.ID],c.dateRangeTagCount);c.dateRangeTagCount++,Ln.isValid||c.skippedSegments?c.dateRanges[Ln.id]=Ln:$.warn(`Ignoring invalid DATERANGE tag: "${er}"`),Ye.tagList.push(["EXT-X-DATERANGE",er]);break}case"DEFINE":{{const lr=new or(er,c);"IMPORT"in lr?fi(c,lr,s):cr(c,lr,t)}break}case"DISCONTINUITY-SEQUENCE":c.startCC!==0?ii(c,fr,St):g.length>0&&Ei(c,fr,St),c.startCC=Ee=parseInt(er);break;case"KEY":{const lr=Qi(er,t,c);if(lr.isSupported()){if(lr.method==="NONE"){Jt=void 0;break}Jt||(Jt={}),Jt[lr.keyFormat]&&(Jt=v({},Jt)),Jt[lr.keyFormat]=lr}else $.warn(`[Keys] Ignoring invalid EXT-X-KEY tag: "${er}"`);break}case"START":c.startTimeOffset=Ji(er);break;case"MAP":{const lr=new or(er,c);if(Ye.duration){const Ln=new $e(r,d);bi(Ln,lr,n,Jt),O=Ln,Ye.initSegment=O,O.rawProgramDateTime&&!Ye.rawProgramDateTime&&(Ye.rawProgramDateTime=O.rawProgramDateTime)}else{const Ln=Ye.byteRangeEndOffset;if(Ln){const $n=Ye.byteRangeStartOffset;rn=`${Ln-$n}@${$n}`}else rn=null;bi(Ye,lr,n,Jt),O=Ye,zt=!0}O.cc=Ee;break}case"SERVER-CONTROL":{kt&&ii(c,fr,St),kt=new or(er),c.canBlockReload=kt.bool("CAN-BLOCK-RELOAD"),c.canSkipUntil=kt.optionalFloat("CAN-SKIP-UNTIL",0),c.canSkipDateRanges=c.canSkipUntil>0&&kt.bool("CAN-SKIP-DATERANGES"),c.partHoldBack=kt.optionalFloat("PART-HOLD-BACK",0),c.holdBack=kt.optionalFloat("HOLD-BACK",0);break}case"PART-INF":{c.partTarget&&ii(c,fr,St);const lr=new or(er);c.partTarget=lr.decimalFloatingPoint("PART-TARGET");break}case"PART":{let lr=c.partList;lr||(lr=c.partList=[]);const Ln=H>0?lr[lr.length-1]:void 0,$n=H++,Dr=new or(er,c),xr=new We(Dr,Ye,d,$n,Ln);lr.push(xr),Ye.duration+=xr.duration;break}case"PRELOAD-HINT":{const lr=new or(er,c);c.preloadHint=lr;break}case"RENDITION-REPORT":{const lr=new or(er,c);c.renditionReports=c.renditionReports||[],c.renditionReports.push(lr);break}default:$.warn(`line parsed but not handled: ${St}`);break}}}it&&!it.relurl?(g.pop(),we-=it.duration,c.partList&&(c.fragmentHint=it)):c.partList&&(hi(Ye,it,b),Ye.cc=Ee,c.fragmentHint=Ye,Jt&&Qr(Ye,Jt,c)),c.targetduration||(c.playlistParsingError=new Error("#EXT-X-TARGETDURATION is required"));const Rn=g.length,Gn=g[0],Fr=g[Rn-1];if(we+=c.skippedSegments*c.targetduration,we>0&&Rn&&Fr){c.averagetargetduration=we/Rn;const yr=Fr.sn;c.endSN=yr!=="initSegment"?yr:0,c.live||(Fr.endList=!0),Gn&&c.startCC===void 0&&(c.startCC=Gn.cc),Ct>0&&(br(g,Ct),Gn&&b.unshift(Gn))}else c.endSN=0,c.startCC=0;return c.fragmentHint&&(we+=c.fragmentHint.duration),c.totalduration=we,b.length&&c.dateRangeTagCount&&Gn&&Si(b,c),c.endCC=Ee,c}}function Si(a,e){const t=a.length,n=a[t-1],r=e.live?1/0:e.totalduration,i=Object.keys(e.dateRanges);for(let s=i.length;s--;){const l=e.dateRanges[i[s]],d=l.startDate.getTime();l.tagAnchor=n.ref;for(let c=t;c--;){const g=fs(e,d,a,c,r);if(g!==-1){l.tagAnchor=e.fragments[g].ref;break}}}}function fs(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,g=a.fragments;if(g.length>t.length){const O=(t[n+1]||g[g.length-1]).sn-a.startSN;for(let F=O;F>c;F--){const H=g[F].programDateTime;if(e>=H&&e<H+g[F].duration*1e3)return F}}return c}}}return-1}function Qi(a,e,t){var n,r;const i=new or(a,t),s=(n=i.METHOD)!=null?n:"",l=i.URI,d=i.hexadecimalInteger("IV"),c=i.KEYFORMATVERSIONS,g=(r=i.KEYFORMAT)!=null?r:"identity";l&&i.IV&&!d&&$.error(`Invalid IV: ${i.IV}`);const b=l?di.resolve(l,e):"",O=(c||"1").split("/").map(Number).filter(Number.isFinite);return new Li(s,b,g,O,d)}function Ji(a){const t=new or(a).decimalFloatingPoint("TIME-OFFSET");return L(t)?t:null}function Hi(a,e){let t=(a||"").split(/[ ,]+/).filter(n=>n);["video","audio","text"].forEach(n=>{const r=t.filter(i=>je(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 Ir(a,e,t){const n=e[t];n&&(a[t]=n)}function br(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 hi(a,e,t){a.rawProgramDateTime?t.push(a):e!=null&&e.programDateTime&&(a.programDateTime=e.endProgramDateTime)}function bi(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 Qr(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 ii(a,e,t){a.playlistParsingError=new Error(`#EXT-X-${e} must not appear more than once (${t[0]})`)}function Ei(a,e,t){a.playlistParsingError=new Error(`#EXT-X-${e} must appear before the first Media Segment (${t[0]})`)}function Ii(a,e){const t=e.startPTS;if(L(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 wi(a,e,t,n,r,i){n-t<=0&&($.warn("Fragment should have a positive duration",e),n=t+e.duration,i=r+e.duration);let l=t,d=n;const c=e.startPTS,g=e.endPTS;if(L(c)){const Ee=Math.abs(c-t);L(e.deltaPTS)?e.deltaPTS=Math.max(Ee,e.deltaPTS):e.deltaPTS=Ee,l=Math.max(t,c),t=Math.min(t,c),r=Math.min(r,e.startDTS),d=Math.min(n,g),n=Math.max(n,g),i=Math.max(i,e.endDTS)}const b=t-e.start;e.start!==0&&e.setStart(t),e.setDuration(n-e.start),e.startPTS=t,e.maxStartPTS=l,e.startDTS=r,e.endPTS=n,e.minEndPTS=d,e.endDTS=i;const O=e.sn;if(!a||O<a.startSN||O>a.endSN)return 0;let F;const H=O-a.startSN,we=a.fragments;for(we[H]=e,F=H;F>0;F--)Ii(we[F],we[F-1]);for(F=H;F<we.length-1;F++)Ii(we[F],we[F+1]);return a.fragmentHint&&Ii(we[we.length-1],a.fragmentHint),a.PTSKnown=a.alignedSliding=!0,b}function Gi(a,e){if(a===e)return;let t=null;const n=a.fragments;for(let d=n.length-1;d>=0;d--){const c=n[d].initSegment;if(c){t=c;break}}a.fragmentHint&&delete a.fragmentHint.endPTS;let r;Ws(a,e,(d,c,g,b)=>{if(e.skippedSegments&&c.cc!==d.cc){const O=d.cc-c.cc;for(let F=g;F<b.length;F++)b[F].cc+=O}L(d.startPTS)&&L(d.endPTS)&&(c.setStart(c.startPTS=d.startPTS),c.startDTS=d.startDTS,c.maxStartPTS=d.maxStartPTS,c.endPTS=d.endPTS,c.endDTS=d.endDTS,c.minEndPTS=d.minEndPTS,c.setDuration(d.endPTS-d.startPTS),c.duration&&(r=c),e.PTSKnown=e.alignedSliding=!0),d.hasStreams&&(c.elementaryStreams=d.elementaryStreams),c.loader=d.loader,d.hasStats&&(c.stats=d.stats),d.initSegment&&(c.initSegment=d.initSegment,t=d.initSegment)});const i=e.fragments,s=e.fragmentHint?i.concat(e.fragmentHint):i;if(t&&s.forEach(d=>{var c;d&&(!d.initSegment||d.initSegment.relurl===((c=t)==null?void 0:c.relurl))&&(d.initSegment=t)}),e.skippedSegments)if(e.deltaUpdateFailed=i.some(d=>!d),e.deltaUpdateFailed){$.warn("[level-helper] Previous playlist missing segments skipped in delta playlist");for(let d=e.skippedSegments;d--;)i.shift();e.startSN=i[0].sn}else{e.endCC=i[i.length-1].cc,e.canSkipDateRanges&&(e.dateRanges=Bi(a.dateRanges,e));const d=a.fragments.filter(c=>c.rawProgramDateTime);if(a.hasProgramDateTime&&!e.hasProgramDateTime)for(let c=1;c<s.length;c++)s[c].programDateTime===null&&hi(s[c],s[c-1],d);Si(d,e)}hs(a.partList,e.partList,(d,c)=>{c.elementaryStreams=d.elementaryStreams,c.stats=d.stats}),r?wi(e,r,r.startPTS,r.endPTS,r.startDTS,r.endDTS):Os(a,e),i.length&&(e.totalduration=e.edge-i[0].start),e.driftStartTime=a.driftStartTime,e.driftStart=a.driftStart;const l=e.advancedDateTime;if(e.advanced&&l){const d=e.edge;e.driftStart||(e.driftStartTime=l,e.driftStart=d),e.driftEndTime=l,e.driftEnd=d}else e.driftEndTime=a.driftEndTime,e.driftEnd=a.driftEnd,e.advancedDateTime=a.advancedDateTime;e.requestScheduled===-1&&(e.requestScheduled=a.requestScheduled)}function Bi(a,e){const{dateRanges:t,recentlyRemovedDateranges:n}=e,r=v({},a);n&&n.forEach(l=>{delete r[l]});const s=Object.keys(r).length;return s&&Object.keys(t).forEach(l=>{const d=r[l],c=new dr(t[l].attr,d);c.isValid?(r[l]=c,d||(c.tagOrder+=s)):$.warn(`Ignoring invalid Playlist Delta Update DATERANGE tag: "${Wt(t[l].attr)}"`)}),r}function hs(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 Ws(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 g=d[s+c];let b=l[c];if(n&&!b&&g&&(b=e.fragments[c]=g),g&&b){if(t(g,b,c,l),g.url&&g.url!==b.url){e.playlistParsingError=Oi(`media sequence mismatch ${b.sn}:`,a,e,g,b);return}else if(g.cc!==b.cc){e.playlistParsingError=Oi(`discontinuity sequence mismatch (${g.cc}!=${b.cc})`,a,e,g,b);return}}}}function Oi(a,e,t,n,r){return new Error(`${a} ${r.url}
Playlist starting @${e.startSN}
${e.m3u8}
Playlist starting @${t.startSN}
${t.m3u8}`)}function Os(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;Ps(e,s)}function Ps(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 ps(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 ks(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 xs(a,e,t){return a?Es(a.partList,e,t):null}function Es(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 Ms(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 Pi(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 Gs(a,e){return!!(a&&e.startCC<a.endCC&&e.endCC>a.startCC)}function Zr(a,e){if(a){const t=a.start+e;a.start=a.startPTS=t,a.endPTS=t+a.duration}}function Hr(a,e){const t=e.fragments;for(let n=0,r=t.length;n<r;n++)Zr(t[n],a);e.fragmentHint&&Zr(e.fragmentHint,a),e.alignedSliding=!0}function jr(a,e){a&&(Ti(e,a),!e.alignedSliding&&a&&si(e,a),!e.alignedSliding&&a&&!e.skippedSegments&&Os(a,e,!1))}function Ti(a,e){if(!Gs(e,a))return;const t=Math.min(e.endCC,a.endCC),n=Pi(e.fragments,t),r=Pi(a.fragments,t);if(!n||!r)return;$.log(`Aligning playlist at start of dicontinuity sequence ${t}`);const i=n.start-r.start;Hr(i,a)}function si(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=Pi(n,s),i=Pi(t,s)),(!r||!i)&&(r=n[Math.floor(n.length/2)],i=Pi(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);Hr(c,a)}const ms={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}},cn={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 Ss extends wr{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=cn.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:g}=this,b=d?d.currentTime:0,O=qn.bufferInfo(c||d,b,s.maxBufferHole);if(this.log(`media seeking to ${L(b)?b.toFixed(3):b}, state: ${g}`),this.state===cn.ENDED)this.resetLoadingState();else if(l){const F=s.maxFragLookUpTolerance,H=l.start-F,we=l.start+l.duration+F;if(!O.len||we<O.start||H>O.end){const Ee=b>we;(b<H||Ee)&&(Ee&&l.loader&&(this.log("seeking outside of buffer while fragment load in progress, cancel fragment load"),l.abortRequests(),this.resetLoadingState()),this.fragPrevious=null)}}if(d){this.fragmentTracker.removeFragmentsInRange(b,1/0,this.playlistType,!0);const F=this.lastCurrentTime;if(b>F&&(this.lastCurrentTime=b),!this.loadingParts){const H=Math.max(O.end,b),we=this.shouldLoadParts(this.getLevelDetails(),H);we&&(this.log(`LL-Part loading ON after seeking to ${b.toFixed(2)} with buffer @${H.toFixed(2)}`),this.loadingParts=we)}}!this.hls.hasEnoughToStart&&!O.len&&(this.log(`setting startPosition to ${b} because of seek before start`),this.nextLoadPosition=this.startPosition=b),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 Mr(e.config)}registerListeners(){const{hls:e}=this;e.on(p.MEDIA_ATTACHED,this.onMediaAttached,this),e.on(p.MEDIA_DETACHING,this.onMediaDetaching,this),e.on(p.MANIFEST_LOADING,this.onManifestLoading,this),e.on(p.MANIFEST_LOADED,this.onManifestLoaded,this),e.on(p.ERROR,this.onError,this)}unregisterListeners(){const{hls:e}=this;e.off(p.MEDIA_ATTACHED,this.onMediaAttached,this),e.off(p.MEDIA_DETACHING,this.onMediaDetaching,this),e.off(p.MANIFEST_LOADING,this.onManifestLoading,this),e.off(p.MANIFEST_LOADED,this.onManifestLoaded,this),e.off(p.ERROR,this.onError,this)}doTick(){this.onTickEnd()}onTickEnd(){}startLoad(e){}stopLoad(){if(this.state===cn.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=cn.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.nextStart;if(i&&i>r&&i<t.edge||this.media.currentTime<e.start)return!1;const l=t.partList;if(l!=null&&l.length){const c=l[l.length-1];return qn.isBuffered(this.media,c.start+c.duration/2)}const d=t.fragments[t.fragments.length-1].type;return this.fragmentTracker.isEndListAppended(d)}getLevelDetails(){if(this.levels&&this.levelLastLoaded!==null){var e;return(e=this.levelLastLoaded)==null?void 0:e.details}}get timelineOffset(){const e=this.config.timelineOffset;if(e){var t;return((t=this.getLevelDetails())==null?void 0:t.appliedTimelineOffset)||e}return 0}onMediaAttached(e,t){const n=this.media=this.mediaBuffer=t.media;n.removeEventListener("seeking",this.onMediaSeeking),n.removeEventListener("ended",this.onMediaEnded),n.addEventListener("seeking",this.onMediaSeeking),n.addEventListener("ended",this.onMediaEnded);const r=this.config;this.levels&&r.autoStartLoad&&this.state===cn.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),r.removeEventListener("seeking",this.onMediaSeeking),r.removeEventListener("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=cn.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===cn.FRAG_LOADING||!this.fragCurrent&&s===cn.PARSING)&&(this.fragmentTracker.removeFragment(l),this.state=cn.IDLE);return}"payload"in i&&(this.log(`Loaded ${l.type} sn: ${l.sn} of ${this.playlistLabel()} ${l.level}`),this.hls.trigger(p.FRAG_LOADED,i)),this._handleFragmentLoadComplete(i)}).catch(i=>{this.state===cn.STOPPED||this.state===cn.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)===Tn.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)===Tn.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(p.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,Sn(l.method)).catch(c=>{throw r.trigger(p.ERROR,{type:_e.MEDIA_ERROR,details:A.FRAG_DECRYPT_ERROR,fatal:!1,error:c,reason:c.message,frag:i}),c}).then(c=>{const g=self.performance.now();return r.trigger(p.FRAG_DECRYPTED,{frag:i,payload:c,stats:{tstart:d,tdecrypt:g}}),n.payload=c,this.completeInitSegmentLoad(n)})}return this.completeInitSegmentLoad(n)}).catch(n=>{this.state===cn.STOPPED||this.state===cn.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!==cn.STOPPED&&(this.state=cn.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()}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?ms.toString(qn.getBuffered(n)):"(detached)"})`),me(e)){var r;if(e.type!==fe.SUBTITLE){const s=e.elementaryStreams;if(!Object.keys(s).some(l=>!!s[l])){this.state=cn.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=cn.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 Nr(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==null?void 0:t.details;if(!this.levels||!s)throw new Error(`frag load aborted, missing level${s?"":" detail"}s`);let l=null;e.encrypted&&!((i=e.decryptdata)!=null&&i.key)?(this.log(`Loading key for ${e.sn} of [${s.startSN}-${s.endSN}], ${this.playlistLabel()} ${e.level}`),this.state=cn.KEY_LOADING,this.fragCurrent=e,l=this.keyLoader.load(e).then(b=>{if(!this.fragContextChanged(b.frag))return this.hls.trigger(p.KEY_LOADED,b),this.state===cn.KEY_LOADING&&(this.state=cn.IDLE),b}),this.hls.trigger(p.KEY_LOADING,{frag:e}),this.fragCurrent===null&&(l=Promise.reject(new Error("frag load aborted, context changed in KEY_LOADING")))):!e.encrypted&&s.encryptedFragments.length&&this.keyLoader.loadClear(e,s.encryptedFragments);const d=this.fragPrevious;if(me(e)&&(!d||e.sn!==d.sn)){const b=this.shouldLoadParts(t.details,e.end);b!==this.loadingParts&&(this.log(`LL-Part loading ${b?"ON":"OFF"} loading sn ${d==null?void 0:d.sn}->${e.sn}`),this.loadingParts=b)}if(n=Math.max(e.start,n||0),this.loadingParts&&me(e)){const b=s.partList;if(b&&r){n>e.end&&s.fragmentHint&&(e=s.fragmentHint);const O=this.getNextPart(b,e,n);if(O>-1){const F=b[O];e=this.fragCurrent=F.fragment,this.log(`Loading ${e.type} sn: ${e.sn} part: ${F.index} (${O}/${b.length-1}) of ${this.fragInfo(e,!1,F)}) cc: ${e.cc} [${s.startSN}-${s.endSN}], target: ${parseFloat(n.toFixed(3))}`),this.nextLoadPosition=F.start+F.duration,this.state=cn.FRAG_LOADING;let H;return l?H=l.then(we=>!we||this.fragContextChanged(we.frag)?null:this.doFragPartsLoad(e,F,t,r)).catch(we=>this.handleFragLoadError(we)):H=this.doFragPartsLoad(e,F,t,r).catch(we=>this.handleFragLoadError(we)),this.hls.trigger(p.FRAG_LOADING,{frag:e,part:F,targetBufferTime:n}),this.fragCurrent===null?Promise.reject(new Error("frag load aborted, context changed in FRAG_LOADING parts")):H}else if(!e.url||this.loadedEndOfParts(b,n))return Promise.resolve(null)}}if(me(e)&&this.loadingParts)this.log(`LL-Part loading OFF after next part miss @${n.toFixed(2)}`),this.loadingParts=!1;else if(!e.url)return Promise.resolve(null);this.log(`Loading ${e.type} sn: ${e.sn} of ${this.fragInfo(e,!1)}) cc: ${e.cc} ${s?"["+s.startSN+"-"+s.endSN+"]":""}, target: ${parseFloat(n.toFixed(3))}`),L(e.sn)&&!this.bitrateTest&&(this.nextLoadPosition=e.start+e.duration),this.state=cn.FRAG_LOADING;const c=this.config.progressive;let g;return c&&l?g=l.then(b=>!b||this.fragContextChanged(b==null?void 0:b.frag)?null:this.fragmentLoader.load(e,r)).catch(b=>this.handleFragLoadError(b)):g=Promise.all([this.fragmentLoader.load(e,c?r:void 0),l]).then(([b])=>(!c&&b&&r&&r(b),b)).catch(b=>this.handleFragLoadError(b)),this.hls.trigger(p.FRAG_LOADING,{frag:e,targetBufferTime:n}),this.fragCurrent===null?Promise.reject(new Error("frag load aborted, context changed in FRAG_LOADING")):g}doFragPartsLoad(e,t,n,r){return new Promise((i,s)=>{var l;const d=[],c=(l=n.details)==null?void 0:l.partList,g=b=>{this.fragmentLoader.loadPart(e,b,r).then(O=>{d[b.index]=O;const F=O.part;this.hls.trigger(p.FRAG_LOADED,O);const H=xs(n.details,e.sn,b.index+1)||Es(c,e.sn,b.index+1);if(H)g(H);else return i({frag:e,part:F,partsLoaded:d})}).catch(s)};g(t)})}handleFragLoadError(e){if("data"in e){const t=e.data;e.data&&t.details===A.INTERNAL_ABORTED?this.handleFragLoadAborted(t.frag,t.part):this.hls.trigger(p.ERROR,t)}else this.hls.trigger(p.ERROR,{type:_e.OTHER_ERROR,details:A.INTERNAL_EXCEPTION,err:e,error:e,fatal:!0});return null}_handleTransmuxerFlush(e){const t=this.getCurrentContext(e);if(!t||this.state!==cn.PARSING){!this.fragCurrent&&this.state!==cn.STOPPED&&this.state!==cn.ERROR&&(this.state=cn.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!=null&&e.partList){var n;const i=e.partList[0],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?xs(d,i,s):null,g=c?c.fragment:ks(d,i,n);return g?(n&&n!==g&&(g.stats=n.stats),{frag:g,part:c,level:l}):null}bufferFragmentData(e,t,n,r,i){var s;if(!e||this.state!==cn.PARSING)return;const{data1:l,data2:d}=e;let c=l;if(l&&d&&(c=Qe(l,d)),!((s=c)!=null&&s.length))return;const g={type:e.type,frag:t,part:n,chunkMeta:r,parent:t.type,data:c};if(this.hls.trigger(p.BUFFER_APPENDING,g),e.dropped&&e.independent&&!n){if(i)return;this.flushBufferGap(t)}}flushBufferGap(e){const t=this.media;if(!t)return;if(!qn.isBuffered(t,t.currentTime)){this.flushMainBuffer(0,e.start);return}const n=t.currentTime,r=qn.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(!L(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=qn.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 qn.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=fe.MAIN){var n;const r=(n=this.fragmentTracker)==null?void 0:n.getAppendedFrag(e,t);return r&&"fragment"in r?r.fragment:r}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,n);const O=this.hls.startPosition,F=this.hls.liveSyncPosition,H=d?(O!==-1&&O>=s?O:F)||d.start:e;this.log(`Setting startPosition to ${H} to match start frag at live edge. mainStart: ${O} liveSyncPosition: ${F} frag.start: ${(c=d)==null?void 0:c.start}`),this.startPosition=this.nextLoadPosition=H}}else e<=s&&(d=n[0]);if(!d){const b=this.loadingParts?t.partEnd:t.fragmentEnd;d=this.getFragmentAtPosition(e,b,t)}let g=this.filterReplacedPrimary(d,t);if(!g&&d){const b=d.sn-t.startSN;g=this.filterReplacedPrimary(n[b+1]||null,t)}return this.mapToInitFragWhenRequired(g)}isLoopLoading(e,t){const n=this.fragmentTracker.getState(e);return(n===Tn.OK||n===Tn.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(Ns(this.hls.config)){var e,t;if((e=this.hls.interstitialsManager)==null||(t=e.playingItem)==null?void 0:t.event)return!0}return!1}filterReplacedPrimary(e,t){if(!e)return e;if(Ns(this.hls.config)&&e.type!==fe.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!=null&&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 g=c.loaded;g?r=-1:(i||c.independent||s)&&c.fragment===t&&(r=l),i=g}return r}loadedEndOfParts(e,t){const n=e[e.length-1];return n&&t>n.start&&n.loaded}getInitialLiveFragment(e,t){const 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=Kn(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=Yn(t,n.cc),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,g=n.partList,b=!!(this.loadingParts&&g!=null&&g.length&&d);b&&d&&!this.bitrateTest&&g[g.length-1].fragment.sn===d.sn&&(s=s.concat(d),l=d.sn);let O;if(e<t){var F;const we=e<this.lastCurrentTime||e>t-c||(F=this.media)!=null&&F.paused||!this.startFragRequested?0:c;O=dn(i,s,e,we)}else O=s[s.length-1];if(O){const H=O.sn-n.startSN,we=this.fragmentTracker.getState(O);if((we===Tn.OK||we===Tn.PARTIAL&&O.gap)&&(i=O),i&&O.sn===i.sn&&(!b||g[0].fragment.sn>O.sn||!n.live&&!b)&&i&&O.level===i.level){const Ke=s[H+1];O.sn<l&&this.fragmentTracker.getState(Ke)!==Tn.OK?O=Ke:O=null}}return O}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&&L(i);if(s||!l&&!i){jr(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&&L(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&&me(e)&&e.stats.aborted&&(this.warn(`Fragment ${e.sn}${t?" part "+t.index:""} of ${this.playlistLabel()} ${e.level} was aborted`),this.resetFragmentLoading(e))}resetFragmentLoading(e){(!this.fragCurrent||!this.fragContextChanged(e)&&this.state!==cn.FRAG_LOADING_WAITING_RETRY)&&(this.state=cn.IDLE)}onFragmentOrKeyLoadError(e,t){if(t.chunkMeta&&!t.frag){const H=this.getCurrentContext(t.chunkMeta);H&&(t.frag=H.frag)}const n=t.frag;if(!n||n.type!==e||!this.levels)return;if(this.fragContextChanged(n)){var r;this.warn(`Frag load error must match current frag to retry ${n.url} > ${(r=this.fragCurrent)==null?void 0:r.url}`);return}const i=t.details===A.FRAG_GAP;i&&this.fragmentTracker.fragBuffered(n,!0);const s=t.errorAction,{action:l,flags:d,retryCount:c=0,retryConfig:g}=s||{},b=!!s&&!!g,O=b&&l===bn.RetryRequest,F=b&&!s.resolved&&d===Ge.MoveAllAlternatesMatchingHost;if(!O&&F&&me(n)&&!n.endList)this.resetFragmentErrors(e),this.treatAsGap(n),s.resolved=!0;else if((O||F)&&c<g.maxNumRetry){this.resetStartWhenNotLoaded(this.levelLastLoaded);const H=Bn(g,c);this.warn(`Fragment ${n.sn} of ${e} ${n.level} errored with ${t.details}, retrying loading ${c+1}/${g.maxNumRetry} in ${H}ms`),s.resolved=!0,this.retryDate=self.performance.now()+H,this.state=cn.FRAG_LOADING_WAITING_RETRY}else if(g&&s)if(this.resetFragmentErrors(e),c<g.maxNumRetry)!i&&l!==bn.RemoveAlternatePermanently&&(s.resolved=!0);else{this.warn(`${t.details} reached or exceeded max retry (${c})`);return}else l===bn.SendAlternateToPenaltyBox?this.state=cn.WAITING_LEVEL:this.state=cn.ERROR;this.tickImmediate()}reduceLengthAndFlushBuffer(e){if(this.state===cn.PARSING||this.state===cn.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 is not buffered, flush ${n} buffer`),t&&(this.fragmentTracker.removeFragment(t),this.nextLoadPosition=t.start),this.resetLoadingState(),s}return!1}resetFragmentErrors(e){e===fe.AUDIO&&(this.fragCurrent=null),this.hls.hasEnoughToStart||(this.startFragRequested=!1),this.state!==cn.STOPPED&&(this.state=cn.IDLE)}afterBufferFlushed(e,t,n){if(!e)return;const r=qn.getBuffered(e);this.fragmentTracker.detectEvictedFragments(t,r,n),this.state===cn.ENDED&&this.resetLoadingState()}resetLoadingState(){this.log("Reset loading state"),this.fragCurrent=null,this.fragPrevious=null,this.state!==cn.STOPPED&&(this.state=cn.IDLE)}resetStartWhenNotLoaded(e){if(!this.hls.hasEnoughToStart){this.startFragRequested=!1;const t=e?e.details:null;t!=null&&t.live?(this.log("resetting startPosition for live start"),this.startPosition=-1,this.setStartPosition(t,t.fragmentStart),this.resetLoadingState()):this.nextLoadPosition=this.startPosition}}resetWhenMissingContext(e){this.warn(`The loading context changed while buffering fragment ${e.sn} of ${this.playlistLabel()} ${e.level}. This chunk will not be buffered.`),this.removeUnbufferedFrags(),this.resetStartWhenNotLoaded(this.levelLastLoaded),this.resetLoadingState()}removeUnbufferedFrags(e=0){this.fragmentTracker.removeFragmentsInRange(e,1/0,this.playlistType,!1,!0)}updateLevelTiming(e,t,n,r){const i=n.details;if(!i){this.warn("level.details undefined");return}if(!Object.keys(e.elementaryStreams).reduce((d,c)=>{const g=e.elementaryStreams[c];if(g){const b=g.endPTS-g.startPTS;if(b<=0)return this.warn(`Could not parse fragment ${e.sn} ${c} duration reliably (${b})`),d||!1;const O=r?0:wi(i,e,g.startPTS,g.endPTS,g.startDTS,g.endDTS);return this.hls.trigger(p.LEVEL_PTS_UPDATED,{details:i,level:n,drift:O,type:c,frag:e,start:g.startPTS,end:g.endPTS}),!0}return d},!1)){var l;if(n.fragmentError===0&&this.treatAsGap(e,n),((l=this.transmuxer)==null?void 0:l.error)===null){const d=new Error(`Found no media in fragment ${e.sn} of ${this.playlistLabel()} ${e.level} resetting transmuxer to fallback to playlist timing`);if(this.warn(d.message),this.hls.trigger(p.ERROR,{type:_e.MEDIA_ERROR,details:A.FRAG_PARSING_ERROR,fatal:!1,error:d,frag:e,reason:`Found no media in msn ${e.sn} of ${this.playlistLabel()} "${n.url}"`}),!this.hls)return;this.resetTransmuxer()}}this.state=cn.PARSED,this.log(`Parsed ${e.type} sn: ${e.sn}${t?" part: "+t.index:""} of ${this.fragInfo(e,!1,t)})`),this.hls.trigger(p.FRAG_PARSED,{frag:e,part:t})}playlistLabel(){return this.playlistType===fe.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.levelLastLoaded),this.resetLoadingState())}set state(e){const t=this._state;t!==e&&(this._state=e,this.log(`${t}->${e}`))}get state(){return this._state}}function Ns(a){return!!a.interstitialsController&&a.enableInterstitialPlayback!==!1}class ws{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=as(e,t);else return new Uint8Array(0);return this.reset(),n}reset(){this.chunks.length=0,this.dataLength=0}}function as(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 qi={exports:{}},Fs;function Oa(){return Fs||(Fs=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,g){this.fn=d,this.context=c,this.once=g||!1}function i(d,c,g,b,O){if(typeof g!="function")throw new TypeError("The listener must be a function");var F=new r(g,b||d,O),H=t?t+c:c;return d._events[H]?d._events[H].fn?d._events[H]=[d._events[H],F]:d._events[H].push(F):(d._events[H]=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=[],g,b;if(this._eventsCount===0)return c;for(b in g=this._events)e.call(g,b)&&c.push(t?b.slice(1):b);return Object.getOwnPropertySymbols?c.concat(Object.getOwnPropertySymbols(g)):c},l.prototype.listeners=function(c){var g=t?t+c:c,b=this._events[g];if(!b)return[];if(b.fn)return[b.fn];for(var O=0,F=b.length,H=new Array(F);O<F;O++)H[O]=b[O].fn;return H},l.prototype.listenerCount=function(c){var g=t?t+c:c,b=this._events[g];return b?b.fn?1:b.length:0},l.prototype.emit=function(c,g,b,O,F,H){var we=t?t+c:c;if(!this._events[we])return!1;var Ee=this._events[we],Ke=arguments.length,it,Ye;if(Ee.fn){switch(Ee.once&&this.removeListener(c,Ee.fn,void 0,!0),Ke){case 1:return Ee.fn.call(Ee.context),!0;case 2:return Ee.fn.call(Ee.context,g),!0;case 3:return Ee.fn.call(Ee.context,g,b),!0;case 4:return Ee.fn.call(Ee.context,g,b,O),!0;case 5:return Ee.fn.call(Ee.context,g,b,O,F),!0;case 6:return Ee.fn.call(Ee.context,g,b,O,F,H),!0}for(Ye=1,it=new Array(Ke-1);Ye<Ke;Ye++)it[Ye-1]=arguments[Ye];Ee.fn.apply(Ee.context,it)}else{var St=Ee.length,Tt;for(Ye=0;Ye<St;Ye++)switch(Ee[Ye].once&&this.removeListener(c,Ee[Ye].fn,void 0,!0),Ke){case 1:Ee[Ye].fn.call(Ee[Ye].context);break;case 2:Ee[Ye].fn.call(Ee[Ye].context,g);break;case 3:Ee[Ye].fn.call(Ee[Ye].context,g,b);break;case 4:Ee[Ye].fn.call(Ee[Ye].context,g,b,O);break;default:if(!it)for(Tt=1,it=new Array(Ke-1);Tt<Ke;Tt++)it[Tt-1]=arguments[Tt];Ee[Ye].fn.apply(Ee[Ye].context,it)}}return!0},l.prototype.on=function(c,g,b){return i(this,c,g,b,!1)},l.prototype.once=function(c,g,b){return i(this,c,g,b,!0)},l.prototype.removeListener=function(c,g,b,O){var F=t?t+c:c;if(!this._events[F])return this;if(!g)return s(this,F),this;var H=this._events[F];if(H.fn)H.fn===g&&(!O||H.once)&&(!b||H.context===b)&&s(this,F);else{for(var we=0,Ee=[],Ke=H.length;we<Ke;we++)(H[we].fn!==g||O&&!H[we].once||b&&H[we].context!==b)&&Ee.push(H[we]);Ee.length?this._events[F]=Ee.length===1?Ee[0]:Ee:s(this,F)}return this},l.prototype.removeAllListeners=function(c){var g;return c?(g=t?t+c:c,this._events[g]&&s(this,g)):(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}(qi)),qi.exports}var Pa=Oa(),Vs=j(Pa);const gs="1.6.1",os={};function ka(){return typeof __HLS_WORKER_BUNDLE__=="function"}function Ma(){const a=os[gs];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[gs]=r,r}function Na(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 po(a){const e=os[a||gs];if(e&&e.clientCount--===1){const{worker:n,objectURL:r}=e;delete os[a||gs],r&&self.URL.revokeObjectURL(r),n.terminate()}}function Ys(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 Xs(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 Bs(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 Ts(a,e){const t=e;let n=0;for(;Xs(a,e);){n+=10;const r=Bs(a,e+6);n+=r,Ys(a,e+10)&&(n+=10),e+=n}if(n>0)return a.subarray(t,t+n)}function Cs(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(p.ERROR,p.ERROR,{type:_e.MEDIA_ERROR,details:A.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,g=r[s];let b=s;(l===5||l===29)&&(b-=3);const O=[l<<3|(b&14)>>1,(b&1)<<7|d<<3];return $.log(`manifest codec:${n}, parsed codec:${c}, channels:${d}, rate:${g} (ADTS object type:${l} sampling index:${s})`),{config:O,samplerate:g,channelCount:d,codec:c,parsedCodec:c,manifestCodec:n}}function As(a,e){return a[e]===255&&(a[e+1]&246)===240}function Fa(a,e){return a[e+1]&1?7:9}function oa(a,e){return(a[e+3]&3)<<11|a[e+4]<<3|(a[e+5]&224)>>>5}function Ba(a,e){return e+5<a.length}function Qs(a,e){return e+1<a.length&&As(a,e)}function $a(a,e){return Ba(a,e)&&As(a,e)&&oa(a,e)<=a.length-e}function Ua(a,e){if(Qs(a,e)){const t=Fa(a,e);if(e+t>=a.length)return!1;const n=oa(a,e);if(n<=t)return!1;const r=e+n;return r===a.length||Qs(a,r)}return!1}function za(a,e,t,n,r){if(!a.samplerate){const i=Cs(e,t,n,r);if(!i)return;v(a,i)}}function la(a){return 1024*9e4/a}function mo(a,e){const t=Fa(a,e);if(e+t<=a.length){const n=oa(a,e)-t;if(n>0)return{headerLength:t,frameLength:n}}}function ua(a,e,t,n,r){const i=la(a.samplerate),s=n+r*i,l=mo(e,t);let d;if(l){const{frameLength:b,headerLength:O}=l,F=O+b,H=Math.max(0,t+F-e.length);H?(d=new Uint8Array(F-O),d.set(e.subarray(t+O,e.length),0)):d=e.subarray(t+O,t+F);const we={unit:d,pts:s};return H||a.samples.push(we),{sample:we,length:F,missing:H}}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 ca(a,e){return Xs(a,e)&&Bs(a,e+6)+10<=a.length-e}function da(a){if(a.size<2)return;const e=ye(a.data,!0),t=new Uint8Array(a.data.subarray(e.length+1));return{key:a.type,info:e,data:t.buffer}}function Ka(a){if(a.size<2)return;if(a.type==="TXXX"){let t=1;const n=ye(a.data.subarray(t),!0);t+=n.length+1;const r=ye(a.data.subarray(t));return{key:a.type,info:n,data:r}}const e=ye(a.data.subarray(1));return{key:a.type,info:"",data:e}}function Ha(a){if(a.type==="WXXX"){if(a.size<2)return;let t=1;const n=ye(a.data.subarray(t),!0);t+=n.length+1;const r=ye(a.data.subarray(t));return{key:a.type,info:n,data:r}}const e=ye(a.data);return{key:a.type,info:"",data:e}}function ja(a){return btoa(String.fromCharCode(...a))}function Za(a,e){if(a<0)return-Za(-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}function Wa(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("/")}function Ga(){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 go(a){return a instanceof ArrayBuffer?a:a.byteOffset==0&&a.byteLength==a.buffer.byteLength?a.buffer:new Uint8Array(a).buffer}function vs(a,e=0,t=1/0){return fa(a,e,t,Uint8Array)}function fa(a,e,t,n){const r=Va(a);let i=1;"BYTES_PER_ELEMENT"in n&&(i=n.BYTES_PER_ELEMENT);const s=vo(a)?a.byteOffset:0,l=(s+a.byteLength)/i,d=(s+e)/i,c=Math.floor(Math.max(0,Math.min(d,l))),g=Math.floor(Math.min(c+Math.max(t,0),l));return new n(r,c,g-c)}function Va(a){return a instanceof ArrayBuffer?a:a.buffer}function vo(a){return a&&a.buffer instanceof ArrayBuffer&&a.byteLength!==void 0&&a.byteOffset!==void 0}function yo(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=ye(vs(a.data,1,n)),i=a.data[2+n],s=a.data.subarray(3+n).indexOf(0);if(s===-1)return;const l=ye(vs(a.data,3+n,s));let d;return r==="-->"?d=ye(vs(a.data,4+n+s)):d=go(a.data.subarray(4+n+s)),e.mimeType=r,e.pictureType=i,e.description=l,e.data=d,e}function _o(a){return a.type==="PRIV"?da(a):a.type[0]==="W"?Ha(a):a.type==="APIC"?yo(a):Ka(a)}function ha(a){const e=String.fromCharCode(a[0],a[1],a[2],a[3]),t=Bs(a,4),n=10;return{type:e,size:t,data:a.subarray(n,n+t)}}const Js=10,bo=10;function pa(a){let e=0;const t=[];for(;Xs(a,e);){const n=Bs(a,e+6);a[e+5]>>6&1&&(e+=Js),e+=Js;const r=e+n;for(;e+bo<r;){const i=ha(a.subarray(e)),s=_o(i);s&&t.push(s),e+=i.size+Js}Ys(a,e)&&(e+=Js)}return t}function Ya(a){return a&&a.key==="PRIV"&&a.info==="com.apple.streaming.transportStreamTimestamp"}function Xa(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 ma(a){const e=pa(a);for(let t=0;t<e.length;t++){const n=e[t];if(Ya(n))return Xa(n)}}let ze=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 ji(a="",e=9e4){return{type:a,id:-1,pid:-1,inputTimeScale:e,sequenceNumber:-1,samples:[],dropped:0}}class $s{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=Qe(this.cachedData,e),this.cachedData=null);let n=Ts(e,0),r=n?n.length:0,i;const s=this._audioTrack,l=this._id3Track,d=n?ma(n):void 0,c=e.length;for((this.basePTS===null||this.frameIndex===0&&L(d))&&(this.basePTS=ga(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:ze.audioId3,duration:Number.POSITIVE_INFINITY});r<c;){if(this.canParse(e,r)){const g=this.appendFrame(s,e,r);g?(this.frameIndex++,this.lastPTS=g.sample.pts,r+=g.length,i=r):r=c}else ca(e,r)?(n=Ts(e,r),l.samples.push({pts:this.lastPTS,dts:this.lastPTS,data:n,type:ze.audioId3,duration:Number.POSITIVE_INFINITY}),r+=n.length,i=r):r++;if(r===c&&i!==c){const g=e.slice(i);this.cachedData?this.cachedData=Qe(this.cachedData,g):this.cachedData=g}}return{audioTrack:s,videoTrack:ji(),id3Track:l,textTrack:ji()}}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:ji(),id3Track:this._id3Track,textTrack:ji()}}destroy(){this.cachedData=null,this._audioTrack=this._id3Track=void 0}}const ga=(a,e,t)=>{if(L(a))return a*90;const n=t?t.baseTime*9e4/t.timescale:0;return e*9e4+n};let Us=null;const va=[32,64,96,128,160,192,224,256,288,320,352,384,416,448,32,48,56,64,80,96,112,128,160,192,224,256,320,384,32,40,48,56,64,80,96,112,128,160,192,224,256,320,32,48,56,64,80,96,112,128,144,160,176,192,224,256,8,16,24,32,40,48,56,64,80,96,112,128,144,160],Qa=[44100,48e3,32e3,22050,24e3,16e3,11025,12e3,8e3],Ja=[[0,72,144,12],[0,0,0,0],[0,72,144,12],[0,144,144,12]],xo=[0,1,1,4];function ya(a,e,t,n,r){if(t+24>e.length)return;const i=_a(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 _a(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=va[d*14+r-1]*1e3,b=Qa[(t===3?0:t===2?1:2)*3+i],O=l===3?1:2,F=Ja[t][n],H=xo[n],we=F*8*H,Ee=Math.floor(F*c/b+s)*H;if(Us===null){const Ye=(navigator.userAgent||"").match(/Chrome\/(\d+)/i);Us=Ye?parseInt(Ye[1]):0}return!!Us&&Us<=87&&n===2&&c>=224e3&&l===0&&(a[e+3]=a[e+3]|128),{sampleRate:b,channelCount:O,frameLength:Ee,samplesPerFrame:we}}}function Ds(a,e){return a[e]===255&&(a[e+1]&224)===224&&(a[e+1]&6)!==0}function qa(a,e){return e+1<a.length&&Ds(a,e)}function ba(a,e){return Ds(a,e)&&4<=a.length-e}function xa(a,e){if(e+1<a.length&&Ds(a,e)){const n=_a(a,e);let r=4;n!=null&&n.frameLength&&(r=n.frameLength);const i=e+r;return i===a.length||qa(a,i)}return!1}class Eo extends $s{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=Ts(e,0);let r=(n==null?void 0:n.length)||0;if(xa(e,r))return!1;for(let i=e.length;r<i;r++)if(Ua(e,r))return t.log("ADTS sync word found !"),!0;return!1}canParse(e,t){return $a(e,t)}appendFrame(e,t,n){za(e,this.observer,t,n,e.manifestCodec);const r=ua(e,t,n,this.basePTS,this.frameIndex);if(r&&r.missing===0)return r}}const eo=(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 to extends $s{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=qs(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=Ts(e,0);if(!t)return!1;const n=t.length;return e[n]===11&&e[n+1]===119&&ma(t)!==void 0&&eo(e,n)<16}}function qs(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,g=[64,69,96,64,70,96,80,87,120,80,88,120,96,104,144,96,105,144,112,121,168,112,122,168,128,139,192,128,140,192,160,174,240,160,175,240,192,208,288,192,209,288,224,243,336,224,244,336,256,278,384,256,279,384,320,348,480,320,349,480,384,417,576,384,418,576,448,487,672,448,488,672,512,557,768,512,558,768,640,696,960,640,697,960,768,835,1152,768,836,1152,896,975,1344,896,976,1344,1024,1114,1536,1024,1115,1536,1152,1253,1728,1152,1254,1728,1280,1393,1920,1280,1394,1920][d*3+i]*2;if(t+g>e.length)return-1;const b=e[t+6]>>5;let O=0;b===2?O+=2:(b&1&&b!==1&&(O+=2),b&4&&(O+=2));const F=(e[t+6]<<8|e[t+7])>>12-O&1,we=[2,1,2,3,3,4,4,5][b]+F,Ee=e[t+5]>>3,Ke=e[t+5]&7,it=new Uint8Array([i<<6|Ee<<1|Ke>>2,(Ke&3)<<6|b<<3|F<<2|d>>4,d<<4&224]),Ye=1536/l*9e4,St=n+r*Ye,Tt=e.subarray(t,t+g);return a.config=it,a.channelCount=we,a.samplerate=l,a.samples.push({unit:Tt,pts:St}),g}class So extends $s{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=Ts(e,0);let n=(t==null?void 0:t.length)||0;if(t&&e[n]===11&&e[n+1]===119&&ma(t)!==void 0&&eo(e,n)<=16)return!1;for(let r=e.length;n<r;n++)if(xa(e,n))return $.log("MPEG Audio sync word found !"),!0;return!1}canParse(e,t){return ba(e,t)}appendFrame(e,t,n){if(this.basePTS!==null)return ya(e,t,n,this.basePTS,this.frameIndex)}}const wo=/\/emsg[-/]ID3/i;class Qo{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=ji("video",1),s=this.audioTrack=ji("audio",1),l=this.txtTrack=ji("text",1);if(this.id3Track=ji("id3",1),this.timeOffset=0,!(e!=null&&e.byteLength))return;const d=W(e);if(d.video){const{id:c,timescale:g,codec:b,supplemental:O}=d.video;i.id=c,i.timescale=l.timescale=g,i.codec=b,i.supplemental=O}if(d.audio){const{id:c,timescale:g,codec:b}=d.audio;s.id=c,s.timescale=g,s.codec=b}l.id=st.text,i.sampleDuration=0,i.duration=s.duration=r}resetContiguity(){this.remainderData=null}static probe(e){return ne(e)}demux(e,t){this.timeOffset=t;let n=e;const r=this.videoTrack,i=this.txtTrack;if(this.config.progressive){this.remainderData&&(n=Qe(this.remainderData,e));const l=nt(n);this.remainderData=l.remainder,r.samples=l.valid||new Uint8Array}else r.samples=n;const s=this.extractID3Track(r,t);return i.samples=Ze(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=Ze(e,t),{videoTrack:t,audioTrack:ji(),id3Track:r,textTrack:ji()}}extractID3Track(e,t){const n=this.id3Track;if(e.samples.length){const r=de(e.samples,["emsg"]);r&&r.forEach(i=>{const s=Ut(i);if(wo.test(s.schemeIdUri)){const l=re(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:ze.emsg,duration:d})}else if(this.config.enableEmsgKLVMetadata&&s.schemeIdUri.startsWith("urn:misb:KLV:bin:1910.1")){const l=re(s,t);n.samples.push({data:s.payload,len:s.payload.byteLength,dts:l,pts:l,type:ze.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 re(a,e){return L(a.presentationTime)?a.presentationTime/a.timeScale:e+a.presentationTimeDelta/a.timeScale}class u{constructor(e,t,n){this.keyData=void 0,this.decrypter=void 0,this.keyData=n,this.decrypter=new Mr(t,{removePKCS7Padding:!1})}decryptBuffer(e){return this.decrypter.decrypt(e,this.keyData.key.buffer,this.keyData.iv.buffer,Un.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)})}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=Dt(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)})}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 f{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,g,b,O=-1,F=0;for(i===-1&&(O=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(g=d-i-1,O>=0){const H={data:t.subarray(O,g),type:F};l.push(H)}else{const H=this.getLastNalUnit(e.samples);H&&(s&&d<=4-s&&H.state&&(H.data=H.data.subarray(0,H.data.byteLength-s)),g>0&&(H.data=Qe(H.data,t.subarray(0,g)),H.state=0))}d<r?(b=this.getNALuType(t,d),O=d,F=b,i=0):i=-1}else i=0}if(O>=0&&i>=0){const H={data:t.subarray(O,r),type:F,state:i};l.push(H)}if(l.length===0){const H=this.getLastNalUnit(e.samples);H&&(H.data=Qe(H.data,t))}return e.naluState=i,l}}class h{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&&$.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 _ extends f{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 g,b;switch(c.type){case 1:{let we=!1;l=!0;const Ee=c.data;if(d&&Ee.length>4){const Ke=this.readSliceType(Ee);(Ke===2||Ke===4||Ke===7||Ke===9)&&(we=!0)}if(we){var O;(O=s)!=null&&O.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=we;break}case 5:l=!0,(g=s)!=null&&g.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,ct(c.data,1,n.pts,t.samples);break}case 7:{var F,H;l=!0,d=!0;const we=c.data,Ee=this.readSPS(we);if(!e.sps||e.width!==Ee.width||e.height!==Ee.height||((F=e.pixelRatio)==null?void 0:F[0])!==Ee.pixelRatio[0]||((H=e.pixelRatio)==null?void 0:H[1])!==Ee.pixelRatio[1]){e.width=Ee.width,e.height=Ee.height,e.pixelRatio=Ee.pixelRatio,e.sps=[we];const Ke=we.subarray(1,4);let it="avc1.";for(let Ye=0;Ye<3;Ye++){let St=Ke[Ye].toString(16);St.length<2&&(St="0"+St),it+=St}e.codec=it}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 h(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 h(e);let n=0,r=0,i=0,s=0,l,d,c;const g=t.readUByte.bind(t),b=t.readBits.bind(t),O=t.readUEG.bind(t),F=t.readBoolean.bind(t),H=t.skipBits.bind(t),we=t.skipEG.bind(t),Ee=t.skipUEG.bind(t),Ke=this.skipScalingList.bind(this);g();const it=g();if(b(5),H(3),g(),Ee(),it===100||it===110||it===122||it===244||it===44||it===83||it===86||it===118||it===128){const zt=O();if(zt===3&&H(1),Ee(),Ee(),H(1),F())for(d=zt!==3?8:12,c=0;c<d;c++)F()&&(c<6?Ke(16,t):Ke(64,t))}Ee();const Ye=O();if(Ye===0)O();else if(Ye===1)for(H(1),we(),we(),l=O(),c=0;c<l;c++)we();Ee(),H(1);const St=O(),Tt=O(),Jt=b(1);Jt===0&&H(1),H(1),F()&&(n=O(),r=O(),i=O(),s=O());let Ct=[1,1];if(F()&&F())switch(g()){case 1:Ct=[1,1];break;case 2:Ct=[12,11];break;case 3:Ct=[10,11];break;case 4:Ct=[16,11];break;case 5:Ct=[40,33];break;case 6:Ct=[24,11];break;case 7:Ct=[20,11];break;case 8:Ct=[32,11];break;case 9:Ct=[80,33];break;case 10:Ct=[18,11];break;case 11:Ct=[15,11];break;case 12:Ct=[64,33];break;case 13:Ct=[160,99];break;case 14:Ct=[4,3];break;case 15:Ct=[3,2];break;case 16:Ct=[2,1];break;case 255:{Ct=[g()<<8|g(),g()<<8|g()];break}}return{width:Math.ceil((St+1)*16-n*2-r*2),height:(2-Jt)*(Tt+1)*16-(Jt?2:4)*(i+s),pixelRatio:Ct}}}class P extends f{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 g,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 O;(O=s)!=null&&O.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,(g=s)!=null&&g.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,ct(c.data,2,n.pts,t.samples);break;case 32:l=!0,e.vps||(typeof e.params!="object"&&(e.params={}),e.params=v(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 H in F.params)e.params[H]=F.params[H]}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 H in F)e.params[H]=F[H]}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 h(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 h(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(),g=t.readUByte(),b=t.readUByte(),O=t.readUByte(),F=t.readUByte(),H=t.readUByte(),we=t.readUByte(),Ee=t.readUByte(),Ke=t.readUByte(),it=[],Ye=[];for(let Yr=0;Yr<n;Yr++)it.push(t.readBoolean()),Ye.push(t.readBoolean());if(n>0)for(let Yr=n;Yr<8;Yr++)t.readBits(2);for(let Yr=0;Yr<n;Yr++)it[Yr]&&(t.readUByte(),t.readUByte(),t.readUByte(),t.readUByte(),t.readUByte(),t.readUByte(),t.readUByte(),t.readUByte(),t.readUByte(),t.readUByte(),t.readUByte()),Ye[Yr]&&t.readUByte();t.readUEG();const St=t.readUEG();St==3&&t.skipBits(1);const Tt=t.readUEG(),Jt=t.readUEG(),Ct=t.readBoolean();let zt=0,rn=0,kt=0,Rn=0;Ct&&(zt+=t.readUEG(),rn+=t.readUEG(),kt+=t.readUEG(),Rn+=t.readUEG());const Gn=t.readUEG(),Fr=t.readUEG(),yr=t.readUEG(),fr=t.readBoolean();for(let Yr=fr?0:n;Yr<=n;Yr++)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 Mi=0;Mi<4;Mi++)for(let Xi=0;Xi<(Mi===3?2:6);Xi++)if(!t.readBoolean())t.readUEG();else{const rs=Math.min(64,1<<4+(Mi<<1));Mi>1&&t.readEG();for(let aa=0;aa<rs;aa++)t.readEG()}t.readBoolean(),t.readBoolean(),t.readBoolean()&&(t.readUByte(),t.skipUEG(),t.skipUEG(),t.readBoolean());const lr=t.readUEG();let Ln=0;for(let Yr=0;Yr<lr;Yr++){let Mi=!1;if(Yr!==0&&(Mi=t.readBoolean()),Mi){Yr===lr&&t.readUEG(),t.readBoolean(),t.readUEG();let Xi=0;for(let js=0;js<=Ln;js++){const rs=t.readBoolean();let aa=!1;rs||(aa=t.readBoolean()),(rs||aa)&&Xi++}Ln=Xi}else{const Xi=t.readUEG(),js=t.readUEG();Ln=Xi+js;for(let rs=0;rs<Xi;rs++)t.readUEG(),t.readBoolean();for(let rs=0;rs<js;rs++)t.readUEG(),t.readBoolean()}}if(t.readBoolean()){const Yr=t.readUEG();for(let Mi=0;Mi<Yr;Mi++){for(let Xi=0;Xi<yr+4;Xi++)t.readBits(1);t.readBits(1)}}let Dr=0,xr=1,kr=1,Wr=!0,qr=1,ai=0;t.readBoolean(),t.readBoolean();let Ui=!1;if(t.readBoolean()){if(t.readBoolean()){const Zs=t.readUByte(),Hl=[1,12,10,16,40,24,20,32,80,18,15,64,160,4,3,2],ho=[1,11,11,11,33,11,11,11,33,11,11,33,99,3,2,1];Zs>0&&Zs<16?(xr=Hl[Zs-1],kr=ho[Zs-1]):Zs===255&&(xr=t.readBits(16),kr=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(),Ui=t.readBoolean(),Ui&&(zt+=t.readUEG(),rn+=t.readUEG(),kt+=t.readUEG(),Rn+=t.readUEG()),t.readBoolean()&&(qr=t.readBits(32),ai=t.readBits(32),t.readBoolean()&&t.readUEG(),t.readBoolean())){const ho=t.readBoolean(),jl=t.readBoolean();let Ra=!1;(ho||jl)&&(Ra=t.readBoolean(),Ra&&(t.readUByte(),t.readBits(5),t.readBoolean(),t.readBits(5)),t.readBits(4),t.readBits(4),Ra&&t.readBits(4),t.readBits(5),t.readBits(5),t.readBits(5));for(let Zl=0;Zl<=n;Zl++){Wr=t.readBoolean();const t0=Wr||t.readBoolean();let Wl=!1;t0?t.readEG():Wl=t.readBoolean();const Gl=Wl?1:t.readUEG()+1;if(ho)for(let La=0;La<Gl;La++)t.readUEG(),t.readUEG(),Ra&&(t.readUEG(),t.readUEG()),t.skipBits(1);if(jl)for(let La=0;La<Gl;La++)t.readUEG(),t.readUEG(),Ra&&(t.readUEG(),t.readUEG()),t.skipBits(1)}}t.readBoolean()&&(t.readBoolean(),t.readBoolean(),t.readBoolean(),Dr=t.readUEG())}let Ls=Tt,Kl=Jt;if(Ct||Ui){let Yr=1,Mi=1;St===1?Yr=Mi=2:St==2&&(Yr=2),Ls=Tt-Yr*rn-Yr*zt,Kl=Jt-Mi*Rn-Mi*kt}const qc=r?["A","B","C"][r]:"",e0=l<<24|d<<16|c<<8|g;let Yo=0;for(let Yr=0;Yr<32;Yr++)Yo=(Yo|(e0>>Yr&1)<<31-Yr)>>>0;let Xo=Yo.toString(16);return s===1&&Xo==="2"&&(Xo="6"),{codecString:`hvc1.${qc}${s}.${Xo}.${i?"H":"L"}${Ke}.B0`,params:{general_tier_flag:i,general_profile_idc:s,general_profile_space:r,general_profile_compatibility_flags:[l,d,c,g],general_constraint_indicator_flags:[b,O,F,H,we,Ee],general_level_idc:Ke,bit_depth:Gn+8,bit_depth_luma_minus8:Gn,bit_depth_chroma_minus8:Fr,min_spatial_segmentation_idc:Dr,chroma_format_idc:St,frame_rate:{fixed:Wr,fps:ai/qr}},width:Ls,height:Kl,pixelRatio:[xr,kr]}}readPPS(e){const t=new h(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 J=188;class Re{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=Re.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(J*5,t-J)+1,r=0;for(;r<n;){let i=!1,s=-1,l=0;for(let d=r;d<t;d+=J)if(e[d]===71&&(t-d===J||e[d+J]===71)){if(l++,s===-1&&(s=d,s!==0&&(n=Math.min(s+J*99,e.length-J)+1)),i||(i=Be(e,d)===0),i&&l>1&&(s===0&&l>2||d+J>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=Re.createTrack("video"),this._videoTrack.duration=r,this._audioTrack=Re.createTrack("audio",r),this._id3Track=Re.createTrack("id3"),this._txtTrack=Re.createTrack("text"),this._audioTrack.segmentCodec="aac",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 g=s.pid,b=s.pesData,O=l.pid,F=d.pid,H=l.pesData,we=d.pesData,Ee=null,Ke=this.pmtParsed,it=this._pmtId,Ye=e.length;if(this.remainderData&&(e=Qe(this.remainderData,e),Ye=e.length,this.remainderData=null),Ye<J&&!r)return this.remainderData=e,{audioTrack:l,videoTrack:s,id3Track:d,textTrack:c};const St=Math.max(0,Re.syncOffset(e));Ye-=(Ye-St)%J,Ye<e.byteLength&&!r&&(this.remainderData=new Uint8Array(e.buffer,Ye,e.buffer.byteLength-Ye));let Tt=0;for(let Ct=St;Ct<Ye;Ct+=J)if(e[Ct]===71){const zt=!!(e[Ct+1]&64),rn=Be(e,Ct),kt=(e[Ct+3]&48)>>4;let Rn;if(kt>1){if(Rn=Ct+5+e[Ct+4],Rn===Ct+J)continue}else Rn=Ct+4;switch(rn){case g:if(zt){if(b&&(i=yn(b,this.logger))){if(this.videoParser===null)switch(s.segmentCodec){case"avc":this.videoParser=new _;break;case"hevc":this.videoParser=new P;break}this.videoParser!==null&&this.videoParser.parsePES(s,c,i,!1)}b={data:[],size:0}}b&&(b.data.push(e.subarray(Rn,Ct+J)),b.size+=Ct+J-Rn);break;case O:if(zt){if(H&&(i=yn(H,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}H={data:[],size:0}}H&&(H.data.push(e.subarray(Rn,Ct+J)),H.size+=Ct+J-Rn);break;case F:zt&&(we&&(i=yn(we,this.logger))&&this.parseID3PES(d,i),we={data:[],size:0}),we&&(we.data.push(e.subarray(Rn,Ct+J)),we.size+=Ct+J-Rn);break;case 0:zt&&(Rn+=e[Rn]+1),it=this._pmtId=Ve(e,Rn);break;case it:{zt&&(Rn+=e[Rn]+1);const Gn=yt(e,Rn,this.typeSupported,n,this.observer,this.logger);g=Gn.videoPid,g>0&&(s.pid=g,s.segmentCodec=Gn.segmentVideoCodec),O=Gn.audioPid,O>0&&(l.pid=O,l.segmentCodec=Gn.segmentAudioCodec),F=Gn.id3Pid,F>0&&(d.pid=F),Ee!==null&&!Ke&&(this.logger.warn(`MPEG-TS PMT found at ${Ct} after unknown PID '${Ee}'. Backtracking to sync byte @${St} to parse all TS packets.`),Ee=null,Ct=St-188),Ke=this.pmtParsed=!0;break}case 17:case 8191:break;default:Ee=rn;break}}else Tt++;Tt>0&&Rt(this.observer,new Error(`Found ${Tt} TS packet/s that do not start with 0x47`),void 0,this.logger),s.pesData=b,l.pesData=H,d.pesData=we;const Jt={audioTrack:l,videoTrack:s,id3Track:d,textTrack:c};return r&&this.extractRemainingSamples(Jt),Jt}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=yn(s,this.logger))){if(this.videoParser===null)switch(n.segmentCodec){case"avc":this.videoParser=new _;break;case"hevc":this.videoParser=new P;break}this.videoParser!==null&&(this.videoParser.parsePES(n,i,c,!0),n.pesData=null)}else n.pesData=s;if(l&&(c=yn(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=yn(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 u(this.observer,this.config,t);return this.decrypt(r,i)}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,O=r.sample.unit.byteLength;if(b===-1)i=Qe(r.sample.unit,i);else{const F=O-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&&!Qs(i,s);s++);if(s!==n){let b;const O=s<l-1;if(O?b=`AAC PES did not start with ADTS header,offset:${s}`:b="No ADTS header found in AAC PES",Rt(this.observer,new Error(b),O,this.logger),!O)return}za(e,this.observer,i,s,this.audioCodec);let d;if(t.pts!==void 0)d=t.pts;else if(r){const b=la(e.samplerate);d=r.sample.pts+b}else{this.logger.warn("[tsdemuxer]: AAC PES unknown PTS");return}let c=0,g;for(;s<l;)if(g=ua(e,i,s,d,c),s+=g.length,g.missing){this.aacOverFlow=g;break}else for(c++;s<l-1&&!Qs(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(qa(n,s)){const d=ya(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=qs(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=v({},t,{type:this._videoTrack?ze.emsg:ze.audioId3,duration:Number.POSITIVE_INFINITY});e.samples.push(n)}}function Be(a,e){return((a[e+1]&31)<<8)+a[e+2]}function Ve(a,e){return(a[e+10]&31)<<8|a[e+11]}function yt(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 g=Be(a,e),b=(a[e+3]&15)<<8|a[e+4];switch(a[e]){case 207:if(!n){Yt("ADTS AAC",i);break}case 15:s.audioPid===-1&&(s.audioPid=g);break;case 21:s.id3Pid===-1&&(s.id3Pid=g);break;case 219:if(!n){Yt("H.264",i);break}case 27:s.videoPid===-1&&(s.videoPid=g);break;case 3:case 4:!t.mpeg&&!t.mp3?i.log("MPEG audio found, not supported in this browser"):s.audioPid===-1&&(s.audioPid=g,s.segmentAudioCodec="mp3");break;case 193:if(!n){Yt("AC-3",i);break}case 129:t.ac3?s.audioPid===-1&&(s.audioPid=g,s.segmentAudioCodec="ac3"):i.log("AC-3 audio found, not supported in this browser");break;case 6:if(s.audioPid===-1&&b>0){let O=e+5,F=b;for(;F>2;){switch(a[O]){case 106:t.ac3!==!0?i.log("AC-3 audio found, not supported in this browser for now"):(s.audioPid=g,s.segmentAudioCodec="ac3");break}const we=a[O+1]+2;O+=we,F-=we}}break;case 194:case 135:return Rt(r,new Error("Unsupported EC-3 in M2TS found"),void 0,i),s;case 36:s.videoPid===-1&&(s.videoPid=g,s.segmentVideoCodec="hevc",i.log("HEVC in M2TS found"));break}e+=b+5}return s}function Rt(a,e,t,n){n.warn(`parsing error: ${e.message}`),a.emit(p.ERROR,p.ERROR,{type:_e.MEDIA_ERROR,details:A.FRAG_PARSING_ERROR,fatal:!1,levelRetry:t,error:e,reason:e.message})}function Yt(a,e){e.log(`${a} with AES-128-CBC encryption found in unencrypted stream`)}function yn(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]=Qe(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 g=n[7];g&192&&(s=(n[9]&14)*536870912+(n[10]&255)*4194304+(n[11]&254)*16384+(n[12]&255)*128+(n[13]&254)/2,g&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 O=new Uint8Array(a.size);for(let F=0,H=d.length;F<H;F++){n=d[F];let we=n.byteLength;if(b)if(b>we){b-=we;continue}else n=n.subarray(b),we-=b,b=0;O.set(n,t),t+=we}return r&&(r-=i+3),{data:O,pts:s,dts:l,len:r}}return null}class An{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 zn=Math.pow(2,32)-1;class ot{static init(){ot.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 ot.types)ot.types.hasOwnProperty(e)&&(ot.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]);ot.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]);ot.STTS=ot.STSC=ot.STCO=i,ot.STSZ=new Uint8Array([0,0,0,0,0,0,0,0,0,0,0,0]),ot.VMHD=new Uint8Array([0,0,0,1,0,0,0,0,0,0,0,0]),ot.SMHD=new Uint8Array([0,0,0,0,0,0,0,0]),ot.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]);ot.FTYP=ot.box(ot.types.ftyp,s,d,s,l),ot.DINF=ot.box(ot.types.dinf,ot.box(ot.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 ot.box(ot.types.hdlr,ot.HDLR_TYPES[e])}static mdat(e){return ot.box(ot.types.mdat,e)}static mdhd(e,t){t*=e;const n=Math.floor(t/(zn+1)),r=Math.floor(t%(zn+1));return ot.box(ot.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 ot.box(ot.types.mdia,ot.mdhd(e.timescale||0,e.duration||0),ot.hdlr(e.type),ot.minf(e))}static mfhd(e){return ot.box(ot.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"?ot.box(ot.types.minf,ot.box(ot.types.smhd,ot.SMHD),ot.DINF,ot.stbl(e)):ot.box(ot.types.minf,ot.box(ot.types.vmhd,ot.VMHD),ot.DINF,ot.stbl(e))}static moof(e,t,n){return ot.box(ot.types.moof,ot.mfhd(e),ot.traf(n,t))}static moov(e){let t=e.length;const n=[];for(;t--;)n[t]=ot.trak(e[t]);return ot.box.apply(null,[ot.types.moov,ot.mvhd(e[0].timescale||0,e[0].duration||0)].concat(n).concat(ot.mvex(e)))}static mvex(e){let t=e.length;const n=[];for(;t--;)n[t]=ot.trex(e[t]);return ot.box.apply(null,[ot.types.mvex,...n])}static mvhd(e,t){t*=e;const n=Math.floor(t/(zn+1)),r=Math.floor(t%(zn+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 ot.box(ot.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 ot.box(ot.types.sdtp,n)}static stbl(e){return ot.box(ot.types.stbl,ot.stsd(e),ot.box(ot.types.stts,ot.STTS),ot.box(ot.types.stsc,ot.STSC),ot.box(ot.types.stsz,ot.STSZ),ot.box(ot.types.stco,ot.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=ot.box(ot.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,g=e.pixelRatio[0],b=e.pixelRatio[1];return ot.box(ot.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,ot.box(ot.types.btrt,new Uint8Array([0,28,156,128,0,45,198,192,0,45,198,192])),ot.box(ot.types.pasp,new Uint8Array([g>>24,g>>16&255,g>>8&255,g&255,b>>24,b>>16&255,b>>8&255,b&255])))}static esds(e){const t=e.config;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 ot.box(ot.types.mp4a,ot.audioStsd(e),ot.box(ot.types.esds,ot.esds(e)))}static mp3(e){return ot.box(ot.types[".mp3"],ot.audioStsd(e))}static ac3(e){return ot.box(ot.types["ac-3"],ot.audioStsd(e),ot.box(ot.types.dac3,e.config))}static stsd(e){const{segmentCodec:t}=e;if(e.type==="audio"){if(t==="aac")return ot.box(ot.types.stsd,ot.STSD,ot.mp4a(e));if(t==="ac3"&&e.config)return ot.box(ot.types.stsd,ot.STSD,ot.ac3(e));if(t==="mp3"&&e.codec==="mp3")return ot.box(ot.types.stsd,ot.STSD,ot.mp3(e))}else if(e.pps&&e.sps){if(t==="avc")return ot.box(ot.types.stsd,ot.STSD,ot.avc1(e));if(t==="hevc"&&e.vps)return ot.box(ot.types.stsd,ot.STSD,ot.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/(zn+1)),l=Math.floor(n%(zn+1));return ot.box(ot.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=ot.sdtp(e),r=e.id,i=Math.floor(t/(zn+1)),s=Math.floor(t%(zn+1));return ot.box(ot.types.traf,ot.box(ot.types.tfhd,new Uint8Array([0,0,0,0,r>>24,r>>16&255,r>>8&255,r&255])),ot.box(ot.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])),ot.trun(e,n.length+16+20+8+16+8+8),n)}static trak(e){return e.duration=e.duration||4294967295,ot.box(ot.types.trak,ot.tkhd(e),ot.mdia(e))}static trex(e){const t=e.id;return ot.box(ot.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,g,b,O;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,g=d.size,b=d.flags,O=d.cts,s.set([c>>>24&255,c>>>16&255,c>>>8&255,c&255,g>>>24&255,g>>>16&255,g>>>8&255,g&255,b.isLeading<<2|b.dependsOn,b.isDependedOn<<6|b.hasRedundancy<<4|b.paddingValue<<1|b.isNonSync,b.degradPrio&61440,b.degradPrio&15,O>>>24&255,O>>>16&255,O>>>8&255,O&255],12+16*l);return ot.box(ot.types.trun,s)}static initSegment(e){ot.types||ot.init();const t=ot.moov(e);return Qe(ot.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 H=0;H<n.length;H+=1){s+=3;for(let we=0;we<n[H].length;we+=1)s+=2+n[H][we].length}const l=new Uint8Array(s);l.set(i,0),s=i.length;const d=n.length-1;for(let H=0;H<n.length;H+=1){l.set(new Uint8Array([32+H|(H===d?128:0),0,n[H].length]),s),s+=3;for(let we=0;we<n[H].length;we+=1)l.set(new Uint8Array([n[H][we].length>>8,n[H][we].length&255]),s),s+=2,l.set(n[H][we],s),s+=n[H][we].length}const c=ot.box(ot.types.hvcC,l),g=e.width,b=e.height,O=e.pixelRatio[0],F=e.pixelRatio[1];return ot.box(ot.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,g>>8&255,g&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,ot.box(ot.types.btrt,new Uint8Array([0,28,156,128,0,45,198,192,0,45,198,192])),ot.box(ot.types.pasp,new Uint8Array([O>>24,O>>16&255,O>>8&255,O&255,F>>24,F>>16&255,F>>8&255,F&255])))}}ot.types=void 0,ot.HDLR_TYPES=void 0,ot.STTS=void 0,ot.STSC=void 0,ot.STCO=void 0,ot.STSZ=void 0,ot.VMHD=void 0,ot.SMHD=void 0,ot.STSD=void 0,ot.FTYP=void 0,ot.DINF=void 0;const Cr=9e4;function Ar(a,e,t=1,n=!1){const r=a*e*t;return n?Math.round(r):r}function Lr(a,e,t=1,n=!1){return Ar(a,e,1/t,n)}function Gr(a,e=!1){return Ar(a,1e3,1/Cr,e)}function Jr(a,e=1){return Ar(a,Cr,1/e)}const li=10*1e3,ui=1024,pi=1152,Ci=1536;let mi=null,Vr=null;function $i(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 Zi{constructor(e,t,n,r){if(this.logger=void 0,this.observer=void 0,this.config=void 0,this.typeSupported=void 0,this.ISGenerated=!1,this._initPTS=null,this._initDTS=null,this.nextAvcDts=null,this.nextAudioPts=null,this.videoSampleDuration=null,this.isAudioContiguous=!1,this.isVideoContiguous=!1,this.videoTrackConfig=void 0,this.observer=e,this.config=t,this.typeSupported=n,this.logger=r,this.ISGenerated=!1,mi===null){const s=(navigator.userAgent||"").match(/Chrome\/(\d+)/i);mi=s?parseInt(s[1]):0}if(Vr===null){const i=navigator.userAgent.match(/Safari\/(\d+)/i);Vr=i?parseInt(i[1]):0}}destroy(){this.config=this.videoTrackConfig=this._initPTS=this._initDTS=null}resetTimeStamp(e){this.logger.log("[mp4-remuxer]: initPTS & initDTS reset"),this._initPTS=this._initDTS=e}resetNextTimestamp(){this.logger.log("[mp4-remuxer]: reset next timestamp"),this.isVideoContiguous=!1,this.isAudioContiguous=!1}resetInitSegment(){this.logger.log("[mp4-remuxer]: ISGenerated flag reset"),this.ISGenerated=!1,this.videoTrackConfig=void 0}getVideoStartPts(e){let t=!1;const n=e[0].pts,r=e.reduce((i,s)=>{let l=s.pts,d=l-i;return d<-4294967296&&(t=!0,l=gi(l,n),d=l-i),d>0?i:l},n);return t&&this.logger.debug("PTS rollover detected"),r}remux(e,t,n,r,i,s,l,d){let c,g,b,O,F,H,we=i,Ee=i;const Ke=e.pid>-1,it=t.pid>-1,Ye=t.samples.length,St=e.samples.length>0,Tt=l&&Ye>0||Ye>1;if((!Ke||St)&&(!it||Tt)||this.ISGenerated||l){if(this.ISGenerated){var Ct,zt,rn,kt;const yr=this.videoTrackConfig;(yr&&(t.width!==yr.width||t.height!==yr.height||((Ct=t.pixelRatio)==null?void 0:Ct[0])!==((zt=yr.pixelRatio)==null?void 0:zt[0])||((rn=t.pixelRatio)==null?void 0:rn[1])!==((kt=yr.pixelRatio)==null?void 0:kt[1]))||!yr&&Tt||this.nextAudioPts===null&&St)&&this.resetInitSegment()}this.ISGenerated||(b=this.generateIS(e,t,i,s));const Rn=this.isVideoContiguous;let Gn=-1,Fr;if(Tt&&(Gn=Ai(t.samples),!Rn&&this.config.forceKeyFrameOnDiscontinuity))if(H=!0,Gn>0){this.logger.warn(`[mp4-remuxer]: Dropped ${Gn} out of ${Ye} video samples due to a missing keyframe`);const yr=this.getVideoStartPts(t.samples);t.samples=t.samples.slice(Gn),t.dropped+=Gn,Ee+=(t.samples[0].pts-yr)/t.inputTimeScale,Fr=Ee}else Gn===-1&&(this.logger.warn(`[mp4-remuxer]: No keyframe found out of ${Ye} video samples`),H=!1);if(this.ISGenerated){if(St&&Tt){const yr=this.getVideoStartPts(t.samples),er=(gi(e.samples[0].pts,yr)-yr)/t.inputTimeScale;we+=Math.max(0,er),Ee+=Math.max(0,-er)}if(St){if(e.samplerate||(this.logger.warn("[mp4-remuxer]: regenerate InitSegment as audio detected"),b=this.generateIS(e,t,i,s)),g=this.remuxAudio(e,we,this.isAudioContiguous,s,it||Tt||d===fe.AUDIO?Ee:void 0),Tt){const yr=g?g.endPTS-g.startPTS:0;t.inputTimeScale||(this.logger.warn("[mp4-remuxer]: regenerate InitSegment as video detected"),b=this.generateIS(e,t,i,s)),c=this.remuxVideo(t,Ee,Rn,yr)}}else Tt&&(c=this.remuxVideo(t,Ee,Rn,0));c&&(c.firstKeyFrame=Gn,c.independent=Gn!==-1,c.firstKeyFramePTS=Fr)}}return this.ISGenerated&&this._initPTS&&this._initDTS&&(n.samples.length&&(F=es(n,i,this._initPTS,this._initDTS)),r.samples.length&&(O=Vi(r,i,this._initPTS))),{audio:g,video:c,initSegment:b,independent:H,text:O,id3:F}}generateIS(e,t,n,r){const i=e.samples,s=t.samples,l=this.typeSupported,d={},c=this._initPTS;let g=!c||r,b="audio/mp4",O,F,H;if(g&&(O=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):ot.initSegment([e]),metadata:{channelCount:e.channelCount}},g&&(H=e.inputTimeScale,!c||H!==c.timescale?O=F=i[0].pts-Math.round(H*n):g=!1)}if(t.sps&&t.pps&&s.length){if(t.timescale=t.inputTimeScale,d.video={id:"main",container:"video/mp4",codec:t.codec,initSegment:ot.initSegment([t]),metadata:{width:t.width,height:t.height}},g)if(H=t.inputTimeScale,!c||H!==c.timescale){const we=this.getVideoStartPts(s),Ee=Math.round(H*n);F=Math.min(F,gi(s[0].dts,we)-Ee),O=Math.min(O,we-Ee)}else g=!1;this.videoTrackConfig={width:t.width,height:t.height,pixelRatio:t.pixelRatio}}if(Object.keys(d).length)return this.ISGenerated=!0,g?(this._initPTS={baseTime:O,timescale:H},this._initDTS={baseTime:F,timescale:H}):O=H=void 0,{tracks:d,initPTS:O,timescale:H}}remuxVideo(e,t,n,r){const i=e.inputTimeScale,s=e.samples,l=[],d=s.length,c=this._initPTS;let g=this.nextAvcDts,b=8,O=this.videoSampleDuration,F,H,we=Number.POSITIVE_INFINITY,Ee=Number.NEGATIVE_INFINITY,Ke=!1;if(!n||g===null){const Ln=t*i,$n=s[0].pts-gi(s[0].dts,s[0].pts);mi&&g!==null&&Math.abs(Ln-$n-g)<15e3?n=!0:g=Ln-$n}const it=c.baseTime*i/c.timescale;for(let Ln=0;Ln<d;Ln++){const $n=s[Ln];$n.pts=gi($n.pts-it,g),$n.dts=gi($n.dts-it,g),$n.dts<s[Ln>0?Ln-1:Ln].dts&&(Ke=!0)}Ke&&s.sort(function(Ln,$n){const Dr=Ln.dts-$n.dts,xr=Ln.pts-$n.pts;return Dr||xr}),F=s[0].dts,H=s[s.length-1].dts;const Ye=H-F,St=Ye?Math.round(Ye/(d-1)):O||e.inputTimeScale/30;if(n){const Ln=F-g,$n=Ln>St,Dr=Ln<-1;if(($n||Dr)&&($n?this.logger.warn(`${(e.segmentCodec||"").toUpperCase()}: ${Gr(Ln,!0)} ms (${Ln}dts) hole between fragments detected at ${t.toFixed(3)}`):this.logger.warn(`${(e.segmentCodec||"").toUpperCase()}: ${Gr(-Ln,!0)} ms (${Ln}dts) overlapping between fragments detected at ${t.toFixed(3)}`),!Dr||g>=s[0].pts||mi)){F=g;const xr=s[0].pts-Ln;if($n)s[0].dts=F,s[0].pts=xr;else{let kr=!0;for(let Wr=0;Wr<s.length&&!(s[Wr].dts>xr&&kr);Wr++){const qr=s[Wr].pts;if(s[Wr].dts-=Ln,s[Wr].pts-=Ln,Wr<s.length-1){const ai=s[Wr+1].pts,Ui=s[Wr].pts,Ki=ai<=Ui,Ls=ai<=qr;kr=Ki==Ls}}}this.logger.log(`Video: Initial PTS/DTS adjusted: ${Gr(xr,!0)}/${Gr(F,!0)}, delta: ${Gr(Ln,!0)} ms`)}}F=Math.max(0,F);let Tt=0,Jt=0,Ct=F;for(let Ln=0;Ln<d;Ln++){const $n=s[Ln],Dr=$n.units,xr=Dr.length;let kr=0;for(let Wr=0;Wr<xr;Wr++)kr+=Dr[Wr].data.length;Jt+=kr,Tt+=xr,$n.length=kr,$n.dts<Ct?($n.dts=Ct,Ct+=St/4|0||1):Ct=$n.dts,we=Math.min($n.pts,we),Ee=Math.max($n.pts,Ee)}H=s[d-1].dts;const zt=Jt+4*Tt+8;let rn;try{rn=new Uint8Array(zt)}catch(Ln){this.observer.emit(p.ERROR,p.ERROR,{type:_e.MUX_ERROR,details:A.REMUX_ALLOC_ERROR,fatal:!1,error:Ln,bytes:zt,reason:`fail allocating video mdat ${zt}`});return}const kt=new DataView(rn.buffer);kt.setUint32(0,zt),rn.set(ot.types.mdat,4);let Rn=!1,Gn=Number.POSITIVE_INFINITY,Fr=Number.POSITIVE_INFINITY,yr=Number.NEGATIVE_INFINITY,fr=Number.NEGATIVE_INFINITY;for(let Ln=0;Ln<d;Ln++){const $n=s[Ln],Dr=$n.units;let xr=0;for(let qr=0,ai=Dr.length;qr<ai;qr++){const Ui=Dr[qr],Ki=Ui.data,Ls=Ui.data.byteLength;kt.setUint32(b,Ls),b+=4,rn.set(Ki,b),b+=Ls,xr+=4+Ls}let kr;if(Ln<d-1)O=s[Ln+1].dts-$n.dts,kr=s[Ln+1].pts-$n.pts;else{const qr=this.config,ai=Ln>0?$n.dts-s[Ln-1].dts:St;if(kr=Ln>0?$n.pts-s[Ln-1].pts:St,qr.stretchShortVideoTrack&&this.nextAudioPts!==null){const Ui=Math.floor(qr.maxBufferHole*i),Ki=(r?we+r*i:this.nextAudioPts)-$n.pts;Ki>Ui?(O=Ki-ai,O<0?O=ai:Rn=!0,this.logger.log(`[mp4-remuxer]: It is approximately ${Ki/90} ms to the next segment; using duration ${O/90} ms for the last video frame.`)):O=ai}else O=ai}const Wr=Math.round($n.pts-$n.dts);Gn=Math.min(Gn,O),yr=Math.max(yr,O),Fr=Math.min(Fr,kr),fr=Math.max(fr,kr),l.push($i($n.key,O,xr,Wr))}if(l.length){if(mi){if(mi<70){const Ln=l[0].flags;Ln.dependsOn=2,Ln.isNonSync=0}}else if(Vr&&fr-Fr<yr-Gn&&St/yr<.025&&l[0].cts===0){this.logger.warn("Found irregular gaps in sample duration. Using PTS instead of DTS to determine MP4 sample duration.");let Ln=F;for(let $n=0,Dr=l.length;$n<Dr;$n++){const xr=Ln+l[$n].duration,kr=Ln+l[$n].cts;if($n<Dr-1){const Wr=xr+l[$n+1].cts;l[$n].duration=Wr-kr}else l[$n].duration=$n?l[$n-1].duration:St;l[$n].cts=0,Ln=xr}}}O=Rn||!O?St:O,this.nextAvcDts=g=H+O,this.videoSampleDuration=O,this.isVideoContiguous=!0;const lr={data1:ot.moof(e.sequenceNumber++,F,v(e,{samples:l})),data2:rn,startPTS:we/i,endPTS:(Ee+O)/i,startDTS:F/i,endDTS:g/i,type:"video",hasAudio:!1,hasVideo:!0,nb:l.length,dropped:e.dropped};return e.samples=[],e.dropped=0,lr}getSamplesPerFrame(e){switch(e.segmentCodec){case"mp3":return pi;case"ac3":return Ci;default:return ui}}remuxAudio(e,t,n,r,i){const s=e.inputTimeScale,l=e.samplerate?e.samplerate:s,d=s/l,c=this.getSamplesPerFrame(e),g=c*d,b=this._initPTS,O=e.segmentCodec==="mp3"&&this.typeSupported.mpeg,F=[],H=i!==void 0;let we=e.samples,Ee=O?0:8,Ke=this.nextAudioPts||-1;const it=t*s,Ye=b.baseTime*s/b.timescale;if(this.isAudioContiguous=n=n||we.length&&Ke>0&&(r&&Math.abs(it-Ke)<9e3||Math.abs(gi(we[0].pts-Ye,it)-Ke)<20*g),we.forEach(function(er){er.pts=gi(er.pts-Ye,it)}),!n||Ke<0){if(we=we.filter(er=>er.pts>=0),!we.length)return;i===0?Ke=0:r&&!H?Ke=Math.max(0,it):Ke=we[0].pts}if(e.segmentCodec==="aac"){const er=this.config.maxAudioFramesDrift;for(let hr=0,lr=Ke;hr<we.length;hr++){const Ln=we[hr],$n=Ln.pts,Dr=$n-lr,xr=Math.abs(1e3*Dr/s);if(Dr<=-er*g&&H)hr===0&&(this.logger.warn(`Audio frame @ ${($n/s).toFixed(3)}s overlaps nextAudioPts by ${Math.round(1e3*Dr/s)} ms.`),this.nextAudioPts=Ke=lr=$n);else if(Dr>=er*g&&xr<li&&H){let kr=Math.round(Dr/g);lr=$n-kr*g,lr<0&&(kr--,lr+=g),hr===0&&(this.nextAudioPts=Ke=lr),this.logger.warn(`[mp4-remuxer]: Injecting ${kr} audio frame @ ${(lr/s).toFixed(3)}s due to ${Math.round(1e3*Dr/s)} ms gap.`);for(let Wr=0;Wr<kr;Wr++){const qr=Math.max(lr,0);let ai=An.getSilentFrame(e.parsedCodec||e.manifestCodec||e.codec,e.channelCount);ai||(this.logger.log("[mp4-remuxer]: Unable to get silent frame for given audio codec; duplicating last frame instead."),ai=Ln.unit.subarray()),we.splice(hr,0,{unit:ai,pts:qr}),lr+=g,hr++}}Ln.pts=lr,lr+=g}}let St=null,Tt=null,Jt,Ct=0,zt=we.length;for(;zt--;)Ct+=we[zt].unit.byteLength;for(let er=0,hr=we.length;er<hr;er++){const lr=we[er],Ln=lr.unit;let $n=lr.pts;if(Tt!==null){const xr=F[er-1];xr.duration=Math.round(($n-Tt)/d)}else if(n&&e.segmentCodec==="aac"&&($n=Ke),St=$n,Ct>0){Ct+=Ee;try{Jt=new Uint8Array(Ct)}catch(xr){this.observer.emit(p.ERROR,p.ERROR,{type:_e.MUX_ERROR,details:A.REMUX_ALLOC_ERROR,fatal:!1,error:xr,bytes:Ct,reason:`fail allocating audio mdat ${Ct}`});return}O||(new DataView(Jt.buffer).setUint32(0,Ct),Jt.set(ot.types.mdat,4))}else return;Jt.set(Ln,Ee);const Dr=Ln.byteLength;Ee+=Dr,F.push($i(!0,c,Dr,0)),Tt=$n}const rn=F.length;if(!rn)return;const kt=F[F.length-1];this.nextAudioPts=Ke=Tt+d*kt.duration;const Rn=O?new Uint8Array(0):ot.moof(e.sequenceNumber++,St/d,v({},e,{samples:F}));e.samples=[];const Gn=St/s,Fr=Ke/s,fr={data1:Rn,data2:Jt,startPTS:Gn,endPTS:Fr,startDTS:Gn,endDTS:Fr,type:"audio",hasAudio:!0,hasVideo:!1,nb:rn};return this.isAudioContiguous=!0,fr}}function gi(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 Ai(a){for(let e=0;e<a.length;e++)if(a[e].key)return e;return-1}function es(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=gi(d.pts-t.baseTime*i/t.timescale,e*i)/i,d.dts=gi(d.dts-n.baseTime*i/n.timescale,e*i)/i}const s=a.samples;return a.samples=[],{samples:s}}function Vi(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=gi(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 no{constructor(e,t,n,r){this.logger=void 0,this.emitInitSegment=!1,this.audioCodec=void 0,this.videoCodec=void 0,this.initData=void 0,this.initPTS=null,this.initTracks=void 0,this.lastEndTime=null,this.logger=r}destroy(){}resetTimeStamp(e){this.initPTS=e,this.lastEndTime=null}resetNextTimestamp(){this.lastEndTime=null}resetInitSegment(e,t,n,r){this.audioCodec=t,this.videoCodec=n,this.generateInitSegment(pe(e,r)),this.emitInitSegment=!0}generateInitSegment(e){let{audioCodec:t,videoCodec:n}=this;if(!(e!=null&&e.byteLength)){this.initTracks=void 0,this.initData=void 0;return}const r=this.initData=W(e);r.audio&&(t=ys(r.audio,E.AUDIO)),r.video&&(n=ys(r.video,E.VIDEO));const i={};r.audio&&r.video?i.audiovideo={container:"video/mp4",codec:t+","+n,supplemental:r.video.supplemental,initSegment:e,id:"main"}:r.audio?i.audio={container:"audio/mp4",codec:t,initSegment:e,id:"audio"}:r.video?i.video={container:"video/mp4",codec:n,supplemental:r.video.supplemental,initSegment:e,id:"main"}:this.logger.warn("[passthrough-remuxer.ts]: initSegment does not contain moov or trak boxes."),this.initTracks=i}remux(e,t,n,r,i,s){var l,d;let{initPTS:c,lastEndTime:g}=this;const b={audio:void 0,video:void 0,text:r,id3:n,initSegment:void 0};L(g)||(g=this.lastEndTime=i||0);const O=t.samples;if(!(O!=null&&O.length))return b;const F={initPTS:void 0,timescale:1};let H=this.initData;if((l=H)!=null&&l.length||(this.generateInitSegment(O),H=this.initData),!((d=H)!=null&&d.length))return this.logger.warn("[passthrough-remuxer.ts]: Failed to generate initSegment."),b;this.emitInitSegment&&(F.tracks=this.initTracks,this.emitInitSegment=!1);const we=ke(O,H),Ee=Te(H,O),Ke=Ee===null?i:Ee;(s||!c)&&(To(c,Ke,i,we)||F.timescale!==c.timescale)&&(F.initPTS=Ke-i,c&&c.timescale===1&&this.logger.warn(`Adjusting initPTS @${i} from ${c.baseTime/c.timescale} to ${F.initPTS}`),this.initPTS=c={baseTime:F.initPTS,timescale:1});const it=e?Ke-c.baseTime/c.timescale:g,Ye=it+we;Ne(H,O,c.baseTime/c.timescale),we>0?this.lastEndTime=Ye:(this.logger.warn("Duration parsed from mp4 should be greater than zero"),this.resetNextTimestamp());const St=!!H.audio,Tt=!!H.video;let Jt="";St&&(Jt+="audio"),Tt&&(Jt+="video");const Ct={data1:O,startPTS:it,startDTS:it,endPTS:Ye,endDTS:Ye,type:Jt,hasAudio:St,hasVideo:Tt,nb:1,dropped:0};return b.audio=Ct.type==="audio"?Ct:void 0,b.video=Ct.type!=="audio"?Ct:void 0,b.initSegment=F,b.id3=es(n,i,c,c),r.samples.length&&(b.text=Vi(r,i,c)),b}}function To(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 ys(a,e){const t=a==null?void 0:a.codec;return t&&t.length>4?t:e===E.AUDIO?t==="ec-3"||t==="ac-3"||t==="alac"?t:t==="fLaC"||t==="Opus"?Ce(t,!1):($.warn(`Unhandled audio codec "${t}" in mp4 MAP`),t||"mp4a"):($.warn(`Unhandled video codec "${t}" in mp4 MAP`),t||"avc1")}let ki;try{ki=self.performance.now.bind(self.performance)}catch(a){ki=Date.now}const ts=[{demux:Qo,remux:no},{demux:Re,remux:Zi},{demux:Eo,remux:Zi},{demux:So,remux:Zi}];ts.splice(2,0,{demux:to,remux:Zi});class zs{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=ki();let s=new Uint8Array(e);const{currentTransmuxState:l,transmuxConfig:d}=this;r&&(this.currentTransmuxState=r);const{contiguous:c,discontinuity:g,trackSwitch:b,accurateTimeOffset:O,timeOffset:F,initSegmentChange:H}=r||l,{audioCodec:we,videoCodec:Ee,defaultInitPts:Ke,duration:it,initSegmentData:Ye}=d,St=ea(s,t);if(St&&kn(St.method)){const zt=this.getDecrypter(),rn=Sn(St.method);if(zt.isSync()){let kt=zt.softwareDecrypt(s,St.key.buffer,St.iv.buffer,rn);if(n.part>-1){const Gn=zt.flush();kt=Gn&&Gn.buffer}if(!kt)return i.executeEnd=ki(),Ea(n);s=new Uint8Array(kt)}else return this.asyncResult=!0,this.decryptionPromise=zt.webCryptoDecrypt(s,St.key.buffer,St.iv.buffer,rn).then(kt=>{const Rn=this.push(kt,null,n);return this.decryptionPromise=null,Rn}),this.decryptionPromise}const Tt=this.needsProbing(g,b);if(Tt){const zt=this.configureTransmuxer(s);if(zt)return this.logger.warn(`[transmuxer] ${zt.message}`),this.observer.emit(p.ERROR,p.ERROR,{type:_e.MEDIA_ERROR,details:A.FRAG_PARSING_ERROR,fatal:!1,error:zt,reason:zt.message}),i.executeEnd=ki(),Ea(n)}(g||b||H||Tt)&&this.resetInitSegment(Ye,we,Ee,it,t),(g||H||Tt)&&this.resetInitialTimestamp(Ke),c||this.resetContiguity();const Jt=this.transmux(s,St,F,O,n);this.asyncResult=Ks(Jt);const Ct=this.currentTransmuxState;return Ct.contiguous=!0,Ct.discontinuity=!1,Ct.trackSwitch=!1,i.executeEnd=ki(),Jt}flush(e){const t=e.transmuxing;t.executeStart=ki();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=ki();const b=[Ea(e)];return this.asyncResult?Promise.resolve(b):b}const g=d.flush(l);return Ks(g)?(this.asyncResult=!0,g.then(b=>(this.flushRemux(s,b,e),s))):(this.flushRemux(s,g,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===fe.MAIN?"level":"track"} ${n.level}`);const g=this.remuxer.remux(r,i,s,l,c,d,!0,this.id);e.push({remuxResult:g,chunkMeta:n}),n.transmuxing.executeEnd=ki()}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,O=ts.length;b<O;b++){var s;if((s=ts[b].demux)!=null&&s.probe(e,this.logger)){i=ts[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,g=i.demux;(!d||!(d instanceof c))&&(this.remuxer=new c(n,t,r,this.logger)),(!l||!(l instanceof g))&&(this.demuxer=new g(n,t,r,this.logger),this.probe=g.probe)}needsProbing(e,t){return!this.demuxer||!this.remuxer||e||t}getDecrypter(){let e=this.decrypter;return e||(e=this.decrypter=new Mr(this.config)),e}}function ea(a,e){let t=null;return a.byteLength>0&&(e==null?void 0:e.key)!=null&&e.iv!==null&&e.method!=null&&(t=e),t}const Ea=a=>({remuxResult:{},chunkMeta:a});function Ks(a){return"then"in a&&a.then instanceof Function}class Co{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 Sa{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 wa=0;class Ta{constructor(e,t,n,r){this.error=null,this.hls=void 0,this.id=void 0,this.instanceNo=wa++,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,g=this.hls;if(!(!g||!(c!=null&&c.event)||c.instanceNo!==this.instanceNo))switch(c.event){case"init":{var b;const O=(b=this.workerContext)==null?void 0:b.objectURL;O&&self.URL.revokeObjectURL(O);break}case"transmuxComplete":{this.handleTransmuxComplete(c.data);break}case"flush":{this.onFlush(c.data);break}case"workerLog":{g.logger[c.data.logType]&&g.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,g.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(p.ERROR,{type:_e.OTHER_ERROR,details:A.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===p.ERROR&&(c=c,c.parent=this.id,c.part=this.part,this.error=c.error),this.hls.trigger(d,c)};this.observer=new Vs,this.observer.on(p.FRAG_DECRYPTED,s),this.observer.on(p.ERROR,s);const l=Mt(i.preferManagedMediaSource);if(this.useWorker&&typeof Worker!="undefined"){const d=this.hls.logger;if(i.workerPath||ka()){try{i.workerPath?(d.log(`loading Web Worker ${i.workerPath} for "${t}"`),this.workerContext=Na(i.workerPath)):(d.log(`injecting Web Worker for "${t}"`),this.workerContext=Ma());const{worker:g}=this.workerContext;g.addEventListener("message",this.onWorkerMessage),g.addEventListener("error",this.onWorkerError),g.postMessage({instanceNo:this.instanceNo,cmd:"init",typeSupported:l,id:t,config:Wt(i)})}catch(g){d.warn(`Error setting up "${t}" Web Worker, fallback to inline`,g),this.terminateWorker(),this.error=null,this.transmuxer=new zs(this.observer,l,i,"",t,e.logger)}return}}this.transmuxer=new zs(this.observer,l,i,"",t,e.logger)}reset(){if(this.frag=null,this.part=null,this.workerContext){const e=this.instanceNo;this.instanceNo=wa++;const t=this.hls.config,n=Mt(t.preferManagedMediaSource);this.workerContext.worker.postMessage({instanceNo:this.instanceNo,cmd:"reset",resetNo:e,typeSupported:n,id:this.id,config:Wt(t)})}}terminateWorker(){if(this.workerContext){const{worker:e}=this.workerContext;this.workerContext=null,e.removeEventListener("message",this.onWorkerMessage),e.removeEventListener("error",this.onWorkerError),po(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,g){var b,O;c.transmuxing.start=self.performance.now();const{instanceNo:F,transmuxer:H}=this,we=s?s.start:i.start,Ee=i.decryptdata,Ke=this.frag,it=!(Ke&&i.cc===Ke.cc),Ye=!(Ke&&c.level===Ke.level),St=Ke?c.sn-Ke.sn:-1,Tt=this.part?c.part-this.part.index:-1,Jt=St===0&&c.id>1&&c.id===(Ke==null?void 0:Ke.stats.chunkCount),Ct=!Ye&&(St===1||St===0&&(Tt===1||Jt&&Tt<=0)),zt=self.performance.now();(Ye||St||i.stats.parsing.start===0)&&(i.stats.parsing.start=zt),s&&(Tt||!Ct)&&(s.stats.parsing.start=zt);const rn=!(Ke&&((b=i.initSegment)==null?void 0:b.url)===((O=Ke.initSegment)==null?void 0:O.url)),kt=new Sa(it,Ct,d,Ye,we,rn);if(!Ct||it||rn){this.hls.logger.log(`[transmuxer-interface]: Starting new transmux session for ${i.type} sn: ${c.sn}${c.part>-1?" part: "+c.part:""} ${this.id===fe.MAIN?"level":"track"}: ${c.level} id: ${c.id}
discontinuity: ${it}
trackSwitch: ${Ye}
contiguous: ${Ct}
accurateTimeOffset: ${d}
timeOffset: ${we}
initSegmentChange: ${rn}`);const Rn=new Co(n,r,t,l,g);this.configureTransmuxer(Rn)}if(this.frag=i,this.part=s,this.workerContext)this.workerContext.worker.postMessage({instanceNo:F,cmd:"demux",data:e,decryptdata:Ee,chunkMeta:c,state:kt},e instanceof ArrayBuffer?[e]:[]);else if(H){const Rn=H.push(e,Ee,c,kt);Ks(Rn)?Rn.then(Gn=>{this.handleTransmuxComplete(Gn)}).catch(Gn=>{this.transmuxerError(Gn,c,"transmuxer-interface push error")}):this.handleTransmuxComplete(Rn)}}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);Ks(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(p.ERROR,{type:_e.MEDIA_ERROR,details:A.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 Ca=100;class ta extends Ss{constructor(e,t,n){super(e,t,n,"audio-stream-controller",fe.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(p.LEVEL_LOADED,this.onLevelLoaded,this),e.on(p.AUDIO_TRACKS_UPDATED,this.onAudioTracksUpdated,this),e.on(p.AUDIO_TRACK_SWITCHING,this.onAudioTrackSwitching,this),e.on(p.AUDIO_TRACK_LOADED,this.onAudioTrackLoaded,this),e.on(p.BUFFER_RESET,this.onBufferReset,this),e.on(p.BUFFER_CREATED,this.onBufferCreated,this),e.on(p.BUFFER_FLUSHING,this.onBufferFlushing,this),e.on(p.BUFFER_FLUSHED,this.onBufferFlushed,this),e.on(p.INIT_PTS_FOUND,this.onInitPtsFound,this),e.on(p.FRAG_LOADING,this.onFragLoading,this),e.on(p.FRAG_BUFFERED,this.onFragBuffered,this)}unregisterListeners(){const{hls:e}=this;e&&(super.unregisterListeners(),e.off(p.LEVEL_LOADED,this.onLevelLoaded,this),e.off(p.AUDIO_TRACKS_UPDATED,this.onAudioTracksUpdated,this),e.off(p.AUDIO_TRACK_SWITCHING,this.onAudioTrackSwitching,this),e.off(p.AUDIO_TRACK_LOADED,this.onAudioTrackLoaded,this),e.off(p.BUFFER_RESET,this.onBufferReset,this),e.off(p.BUFFER_CREATED,this.onBufferCreated,this),e.off(p.BUFFER_FLUSHING,this.onBufferFlushing,this),e.off(p.BUFFER_FLUSHED,this.onBufferFlushed,this),e.off(p.INIT_PTS_FOUND,this.onInitPtsFound,this),e.off(p.FRAG_LOADING,this.onFragLoading,this),e.off(p.FRAG_BUFFERED,this.onFragBuffered,this))}onInitPtsFound(e,{frag:t,id:n,initPTS:r,timescale:i}){if(n===fe.MAIN){const s=t.cc,l=this.fragCurrent;if(this.initPTS[s]={baseTime:r,timescale:i},this.log(`InitPTS for cc: ${s} found from main: ${r}/${i}`),this.mainAnchor=t,this.state===cn.WAITING_INIT_PTS){const d=this.waitingData;(!d&&!this.loadingParts||d&&d.frag.cc!==s)&&(this.nextLoadPosition=this.findSyncFrag(t).start),this.tick()}else!this.hls.hasEnoughToStart&&l&&l.cc!==s?(this.startFragRequested=!1,this.nextLoadPosition=this.findSyncFrag(t).start,l.abortRequests(),this.resetLoadingState()):this.state===cn.IDLE&&this.tick()}}findSyncFrag(e){const t=this.getLevelDetails(),n=e.cc;return On(t,n,e)||t&&Yn(t.fragments,n)||e}startLoad(e,t){if(!this.levels){this.startPosition=e,this.state=cn.STOPPED;return}const n=this.lastCurrentTime;this.stopLoad(),this.setInterval(Ca),n>0&&e===-1?(this.log(`Override startPosition with lastCurrentTime @${n.toFixed(3)}`),e=n,this.state=cn.IDLE):this.state=cn.WAITING_TRACK,this.nextLoadPosition=this.lastCurrentTime=e+this.timelineOffset,this.startPosition=t?-1:e,this.tick()}doTick(){switch(this.state){case cn.IDLE:this.doTickIdle();break;case cn.WAITING_TRACK:{const{levels:t,trackId:n}=this,r=t==null?void 0:t[n],i=r==null?void 0:r.details;if(i&&!this.waitForLive(r)){if(this.waitForCdnTuneIn(i))break;this.state=cn.WAITING_INIT_PTS}break}case cn.FRAG_LOADING_WAITING_RETRY:{var e;const t=performance.now(),n=this.retryDate;if(!n||t>=n||(e=this.media)!=null&&e.seeking){const{levels:r,trackId:i}=this;this.log("RetryDate reached, switch back to IDLE state"),this.resetStartWhenNotLoaded((r==null?void 0:r[i])||null),this.state=cn.IDLE}break}case cn.WAITING_INIT_PTS:{const t=this.waitingData;if(t){const{frag:n,part:r,cache:i,complete:s}=t,l=this.mainAnchor;if(this.initPTS[n.cc]!==void 0){this.waitingData=null,this.state=cn.FRAG_LOADING;const d=i.flush().buffer,c={frag:n,part:r,payload:d,networkDetails:null};this._handleFragmentLoadProgress(c),s&&super._handleFragmentLoadComplete(c)}else l&&l.cc!==t.frag.cc&&(this.log(`Waiting fragment cc (${n.cc}) cancelled because video is at cc ${l.cc}`),this.nextLoadPosition=this.findSyncFrag(l).start,this.clearWaitingFragment())}else this.state=cn.IDLE}}this.onTickEnd()}clearWaitingFragment(){const e=this.waitingData;e&&(this.hls.hasEnoughToStart||(this.startFragRequested=!1),this.fragmentTracker.removeFragment(e.frag),this.waitingData=null,this.state!==cn.STOPPED&&(this.state=cn.IDLE))}resetLoadingState(){this.clearWaitingFragment(),super.resetLoadingState()}onTickEnd(){const{media:e}=this;e!=null&&e.readyState&&(this.lastCurrentTime=e.currentTime)}doTickIdle(){var e;const{hls:t,levels: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=cn.WAITING_TRACK,this.startFragRequested=!1;return}const c=this.mediaBuffer?this.mediaBuffer:this.media;this.bufferFlushed&&c&&(this.bufferFlushed=!1,this.afterBufferFlushed(c,E.AUDIO,fe.AUDIO));const g=this.getFwdBufferInfo(c,fe.AUDIO);if(g===null)return;if(!this.switchingTrack&&this._streamEnded(g,d)){t.trigger(p.BUFFER_EOS,{type:"audio"}),this.state=cn.ENDED;return}const b=g.len,O=t.maxBufferLength,F=d.fragments,H=F[0].start,we=this.getLoadPosition(),Ee=this.flushing?we:g.end;if(this.switchingTrack&&r){const Ye=we;d.PTSKnown&&Ye<H&&(g.end>H||g.nextStart)&&(this.log("Alt audio track ahead of main track, seek to start of alt audio track"),r.currentTime=H+.05)}if(b>=O&&!this.switchingTrack&&Ee<F[F.length-1].start)return;let Ke=this.getNextFragment(Ee,d);if(Ke&&this.isLoopLoading(Ke,Ee)&&(Ke=this.getNextFragmentLoopLoading(Ke,d,g,fe.MAIN,O)),!Ke){this.bufferFlushed=!0;return}let it=((e=this.mainFragLoading)==null?void 0:e.frag)||null;if(!this.audioOnly&&this.startFragRequested&&it&&me(Ke)&&!Ke.endList&&(!d.live||!this.loadingParts&&Ee<this.hls.liveSyncPosition)&&(this.fragmentTracker.getState(it)===Tn.OK&&(this.mainFragLoading=it=null),it&&me(it))){if(Ke.start>it.end){const St=this.fragmentTracker.getFragAtPos(Ee,fe.MAIN);St&&St.end>it.end&&(it=St,this.mainFragLoading={frag:St,targetBufferTime:null})}if(Ke.start>it.end)return}this.loadFragment(Ke,l,Ee)}onMediaDetaching(e,t){this.bufferFlushed=this.flushing=!1,super.onMediaDetaching(e,t)}onAudioTracksUpdated(e,{audioTracks:t}){this.resetTransmuxer(),this.levels=t.map(n=>new hn(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!==cn.STOPPED&&(this.setInterval(Ca),this.state=cn.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(p.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!==cn.STOPPED&&(this.state=cn.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 g=r[s];let b=0;if(i.live||(n=g.details)!=null&&n.live){if(this.checkLiveUpdate(i),i.deltaUpdateFailed)return;if(g.details){var O;b=this.alignPlaylists(i,g.details,(O=this.levelLastLoaded)==null?void 0:O.details)}i.alignedSliding||(Ti(i,c),i.alignedSliding||si(i,c),b=i.fragmentStart)}g.details=i,this.levelLastLoaded=g,this.startFragRequested||this.setStartPosition(c,b),this.hls.trigger(p.AUDIO_TRACK_UPDATED,{details:i,id:s,groupId:t.groupId}),this.state===cn.WAITING_TRACK&&!this.waitForCdnTuneIn(i)&&(this.state=cn.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 g=c.details;if(!g){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 O=this.transmuxer;O||(O=this.transmuxer=new Ta(this.hls,fe.AUDIO,this._handleTransmuxComplete.bind(this),this._handleTransmuxerFlush.bind(this)));const F=this.initPTS[n.cc],H=(t=n.initSegment)==null?void 0:t.data;if(F!==void 0){const Ee=r?r.index:-1,Ke=Ee!==-1,it=new Nr(n.level,n.sn,n.stats.chunkCount,i.byteLength,Ee,Ke);O.push(i,H,b,"",n,r,g.totalduration,!1,it,F)}else{this.log(`Unknown video PTS for cc ${n.cc}, waiting for video PTS before demuxing audio frag ${n.sn} of [${g.startSN} ,${g.endSN}],track ${l}`);const{cache:we}=this.waitingData=this.waitingData||{frag:n,part:r,cache:new ws,complete:!1};we.push(new Uint8Array(i)),this.state!==cn.STOPPED&&(this.state=cn.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===fe.MAIN&&me(t.frag)&&(this.mainFragLoading=t,this.state===cn.IDLE&&this.tick())}onFragBuffered(e,t){const{frag:n,part:r}=t;if(n.type!==fe.AUDIO){!this.audioOnly&&n.type===fe.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(me(n)){this.fragPrevious=n;const i=this.switchingTrack;i&&(this.bufferedTrack=i,this.switchingTrack=null,this.hls.trigger(p.AUDIO_TRACK_SWITCHED,S({},i)))}this.fragBufferedComplete(n,r),this.media&&this.tick()}onError(e,t){var n;if(t.fatal){this.state=cn.ERROR;return}switch(t.details){case A.FRAG_GAP:case A.FRAG_PARSING_ERROR:case A.FRAG_DECRYPT_ERROR:case A.FRAG_LOAD_ERROR:case A.FRAG_LOAD_TIMEOUT:case A.KEY_LOAD_ERROR:case A.KEY_LOAD_TIMEOUT:this.onFragmentOrKeyLoadError(fe.AUDIO,t);break;case A.AUDIO_TRACK_LOAD_ERROR:case A.AUDIO_TRACK_LOAD_TIMEOUT:case A.LEVEL_PARSING_ERROR:!t.levelRetry&&this.state===cn.WAITING_TRACK&&((n=t.context)==null?void 0:n.type)===be.AUDIO_TRACK&&(this.state=cn.IDLE);break;case A.BUFFER_ADD_CODEC_ERROR:case A.BUFFER_APPEND_ERROR:if(t.parent!=="audio")return;this.resetLoadingState();break;case A.BUFFER_FULL_ERROR:if(t.parent!=="audio")return;this.reduceLengthAndFlushBuffer(t)&&(this.bufferedTrack=null,super.flushMainBuffer(0,Number.POSITIVE_INFINITY,"audio"));break;case A.INTERNAL_EXCEPTION:this.recoverWorkerError(t);break}}onBufferFlushing(e,{type:t}){t!==E.VIDEO&&(this.flushing=!0)}onBufferFlushed(e,{type:t}){if(t!==E.VIDEO){this.flushing=!1,this.bufferFlushed=!0,this.state===cn.ENDED&&(this.state=cn.IDLE);const n=this.mediaBuffer||this.media;n&&(this.afterBufferFlushed(n,t,fe.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:g}=l,{details:b}=g,{audio:O,text:F,id3:H,initSegment:we}=i;if(this.fragContextChanged(d)||!b){this.fragmentTracker.removeFragment(d);return}if(this.state=cn.PARSING,this.switchingTrack&&O&&this.completeAudioSwitch(this.switchingTrack),we!=null&&we.tracks){const Ee=d.initSegment||d;this._bufferInitSegment(g,we.tracks,Ee,s),r.trigger(p.FRAG_PARSING_INIT_SEGMENT,{frag:Ee,id:n,tracks:we.tracks})}if(O){const{startPTS:Ee,endPTS:Ke,startDTS:it,endDTS:Ye}=O;c&&(c.elementaryStreams[E.AUDIO]={startPTS:Ee,endPTS:Ke,startDTS:it,endDTS:Ye}),d.setElementaryStreamInfo(E.AUDIO,Ee,Ke,it,Ye),this.bufferFragmentData(O,d,c,s)}if(H!=null&&(t=H.samples)!=null&&t.length){const Ee=v({id:n,frag:d,details:b},H);r.trigger(p.FRAG_PARSING_METADATA,Ee)}if(F){const Ee=v({id:n,frag:d,details:b},F);r.trigger(p.FRAG_PARSING_USERDATA,Ee)}}_bufferInitSegment(e,t,n,r){if(this.state!==cn.PARSING||(t.video&&delete t.video,t.audiovideo&&delete t.audiovideo,!t.audio))return;const i=t.audio;i.id=fe.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(p.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(p.BUFFER_APPENDING,d)}this.tickImmediate()}loadFragment(e,t,n){const r=this.fragmentTracker.getState(e);if(this.switchingTrack||r===Tn.NOT_LOADED||r===Tn.PARTIAL){var i;if(!me(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=cn.WAITING_INIT_PTS;const s=this.mainDetails;s&&s.fragmentStart!==t.details.fragmentStart&&si(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;xt({name:t,lang:n,assocLang:r,characteristics:i,audioCodec:s,channels:l},e,Et)||(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(p.AUDIO_TRACK_SWITCHED,S({},e))}}class Ao extends ae{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==null?void 0:t.lastPartSn);let d=parseInt(s["LAST-PART"])||(t==null?void 0:t.lastPartIndex);if(this.hls.config.lowLatencyMode){const g=Math.min(t.age-t.partTarget,t.targetduration);d>=0&&g>t.partTarget&&(d+=1)}const c=n&&sn(n);return new _n(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 g=Math.max(d||0,0);r.appliedTimelineOffset=g,r.fragments.forEach(b=>{b.start=b.playlistOffset+g})}if(r.live||n!=null&&n.live){const g="levelInfo"in t?t.levelInfo:t.track;if(r.reloaded(n),n&&r.fragments.length>0){Gi(n,r);const it=r.playlistParsingError;if(it){this.warn(it);const Ye=this.hls;if(!Ye.config.ignorePlaylistParsingErrors){var c;const{networkDetails:St}=t;Ye.trigger(p.ERROR,{type:_e.NETWORK_ERROR,details:A.LEVEL_PARSING_ERROR,fatal:!1,url:r.url,error:it,reason:it.message,level:t.level||void 0,parent:(c=r.fragments[0])==null?void 0:c.type,networkDetails:St,stats:i});return}r.playlistParsingError=null}}r.requestScheduled===-1&&(r.requestScheduled=i.loading.start);const b=this.hls.mainForwardBufferInfo,O=b?b.end-b.len:0,F=(r.edge-O)*1e3,H=ps(r,F);if(r.requestScheduled+H<s?r.requestScheduled=s:r.requestScheduled+=H,this.log(`live playlist ${e} ${r.advanced?"REFRESHED "+r.lastPartSn+"-"+r.lastPartIndex:r.updated?"UPDATED":"MISSED"}`),!this.canLoad||!r.live)return;let we,Ee,Ke;if(r.canBlockReload&&r.endSN&&r.advanced){const it=this.hls.config.lowLatencyMode,Ye=r.lastPartSn,St=r.endSN,Tt=r.lastPartIndex,Jt=Tt!==-1,Ct=Ye===St;Jt?Ct?(Ee=St+1,Ke=it?0:Tt):(Ee=Ye,Ke=it?Tt+1:r.maxPartIndex):Ee=St+1;const zt=r.age,rn=zt+r.ageHeader;let kt=Math.min(rn-r.partTarget,r.targetduration*1.5);if(kt>0){if(rn>r.targetduration*3)this.log(`Playlist last advanced ${zt.toFixed(2)}s ago. Omitting segment and part directives.`),Ee=void 0,Ke=void 0;else if(n!=null&&n.tuneInGoal&&rn-r.partTarget>n.tuneInGoal)this.warn(`CDN Tune-in goal increased from: ${n.tuneInGoal} to: ${kt} with playlist age: ${r.age}`),kt=0;else{const Rn=Math.floor(kt/r.targetduration);if(Ee+=Rn,Ke!==void 0){const Gn=Math.round(kt%r.targetduration/r.partTarget);Ke+=Gn}this.log(`CDN Tune-in age: ${r.ageHeader}s last advanced ${zt.toFixed(2)}s goal: ${kt} skip sn ${Rn} to part ${Ke}`)}r.tuneInGoal=kt}if(we=this.getDeliveryDirectives(r,t.deliveryDirectives,Ee,Ke),it||!Ct){r.requestScheduled=s,this.loadingPlaylist(g,we);return}}else(r.canBlockReload||r.canSkipUntil)&&(we=this.getDeliveryDirectives(r,t.deliveryDirectives,Ee,Ke));we&&Ee!==void 0&&r.canBlockReload&&(r.requestScheduled=i.loading.first+Math.max(H-l*2,H/2)),this.scheduleLoading(g,we,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=sn(e);return t!=null&&t.skip&&e.deltaUpdateFailed&&(n=t.msn,r=t.part,i=Ht.No),new _n(n,r,i)}checkRetry(e){const t=e.details,n=Fn(e),r=e.errorAction,{action:i,retryCount:s=0,retryConfig:l}=r||{},d=!!r&&!!l&&(i===bn.RetryRequest||!r.resolved&&i===bn.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 g=Bn(l,s);this.clearTimer(),this.timer=self.setTimeout(()=>this.loadPlaylist(),g),this.warn(`Retrying playlist loading ${s+1}/${l.maxNumRetry} after "${t}" in ${g}ms`)}e.levelRetry=!0,r.resolved=!0}return d}}function Jo(a,e){if(a.length!==e.length)return!1;for(let t=0;t<a.length;t++)if(!Aa(a[t].attrs,e[t].attrs))return!1;return!0}function Aa(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 Do(a,e){return e.label.toLowerCase()===a.name.toLowerCase()&&(!e.language||e.language.toLowerCase()===(a.lang||"").toLowerCase())}class Ql extends Ao{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(p.MANIFEST_LOADING,this.onManifestLoading,this),e.on(p.MANIFEST_PARSED,this.onManifestParsed,this),e.on(p.LEVEL_LOADING,this.onLevelLoading,this),e.on(p.LEVEL_SWITCHING,this.onLevelSwitching,this),e.on(p.AUDIO_TRACK_LOADED,this.onAudioTrackLoaded,this),e.on(p.ERROR,this.onError,this)}unregisterListeners(){const{hls:e}=this;e.off(p.MANIFEST_LOADING,this.onManifestLoading,this),e.off(p.MANIFEST_PARSED,this.onManifestParsed,this),e.off(p.LEVEL_LOADING,this.onLevelLoading,this),e.off(p.LEVEL_SWITCHING,this.onLevelSwitching,this),e.off(p.AUDIO_TRACK_LOADED,this.onAudioTrackLoaded,this),e.off(p.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(O=>!n||n.indexOf(O.groupId)!==-1);if(l.length)this.selectDefaultTrack&&!l.some(O=>O.default)&&(this.selectDefaultTrack=!1),l.forEach((O,F)=>{O.id=F});else if(!i&&!this.tracksInGroup.length)return;this.tracksInGroup=l;const d=this.hls.config.audioPreference;if(!i&&d){const O=ht(d,l,Et);if(O>-1)i=l[O];else{const F=ht(d,this.tracks);i=this.tracks[F]}}let c=this.findTrackId(i);c===-1&&i&&(c=this.findTrackId(null));const g={audioTracks:l};this.log(`Updating audio tracks, ${l.length} track(s) found in group(s): ${n==null?void 0:n.join(",")}`),this.hls.trigger(p.AUDIO_TRACKS_UPDATED,g);const b=this.trackId;if(c!==-1&&b===-1)this.setAudioTrack(c);else if(l.length&&b===-1){var s;const O=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(O.message),this.hls.trigger(p.ERROR,{type:_e.MEDIA_ERROR,details:A.AUDIO_TRACK_LOAD_ERROR,fatal:!0,error:O})}}}onError(e,t){t.fatal||!t.context||t.context.type===be.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&&xt(e,r,Et))return r;const i=ht(e,this.tracksInGroup,Et);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=Qt(e,t.levels,n,s,Et);if(l===-1)return null;t.nextLoadLevel=l}if(e.channels||e.audioCodec){const s=ht(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(p.AUDIO_TRACK_SWITCHING,S({},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||xt(e,r,Et)))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 g=t[c];if(xt({name:n,lang:r,assocLang:i,characteristics:s,audioCodec:l,channels:d},g,Et))return c}for(let c=0;c<t.length;c++){const g=t[c];if(Aa(e.attrs,g.attrs,["LANGUAGE","ASSOC-LANGUAGE","CHARACTERISTICS"]))return c}for(let c=0;c<t.length;c++){const g=t[c];if(Aa(e.attrs,g.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(p.AUDIO_TRACK_LOADING,{url:i,id:n,groupId:r,deliveryDirectives:t||null,track:e})}}class Jl{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 qo=/(avc[1234]|hvc1|hev1|dvh[1e]|vp09|av01)(?:\.[^.,]+)+/,el="HlsJsTrackRemovedError";class ql extends Error{constructor(e){super(e),this.name=el}}class eu extends ae{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(p.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=Se(ve(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(p.MEDIA_ATTACHING,this.onMediaAttaching,this),e.on(p.MEDIA_DETACHING,this.onMediaDetaching,this),e.on(p.MANIFEST_LOADING,this.onManifestLoading,this),e.on(p.MANIFEST_PARSED,this.onManifestParsed,this),e.on(p.BUFFER_RESET,this.onBufferReset,this),e.on(p.BUFFER_APPENDING,this.onBufferAppending,this),e.on(p.BUFFER_CODECS,this.onBufferCodecs,this),e.on(p.BUFFER_EOS,this.onBufferEos,this),e.on(p.BUFFER_FLUSHING,this.onBufferFlushing,this),e.on(p.LEVEL_UPDATED,this.onLevelUpdated,this),e.on(p.FRAG_PARSED,this.onFragParsed,this),e.on(p.FRAG_CHANGED,this.onFragChanged,this),e.on(p.ERROR,this.onError,this)}unregisterListeners(){const{hls:e}=this;e.off(p.MEDIA_ATTACHING,this.onMediaAttaching,this),e.off(p.MEDIA_DETACHING,this.onMediaDetaching,this),e.off(p.MANIFEST_LOADING,this.onManifestLoading,this),e.off(p.MANIFEST_PARSED,this.onManifestParsed,this),e.off(p.BUFFER_RESET,this.onBufferReset,this),e.off(p.BUFFER_APPENDING,this.onBufferAppending,this),e.off(p.BUFFER_CODECS,this.onBufferCodecs,this),e.off(p.BUFFER_EOS,this.onBufferEos,this),e.off(p.BUFFER_FLUSHING,this.onBufferFlushing,this),e.off(p.LEVEL_UPDATED,this.onLevelUpdated,this),e.off(p.FRAG_PARSED,this.onFragParsed,this),e.off(p.FRAG_CHANGED,this.onFragChanged,this),e.off(p.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?v(n,r.tracks):this.sourceBuffers.forEach(i=>{const[s]=i;s&&(n[s]=v({},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,r=ve(this.appendSource);if(this.transferData=this.overrides=void 0,n&&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,tl(n),tu(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=()=>{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: ${Wt(n,(d,c)=>d==="initSegment"?void 0:c)};
transfer tracks: ${Wt(r,(d,c)=>d==="initSegment"?void 0:c)}}`),!Le(r,n)){t.mediaSource=null,t.tracks=void 0;const d=e.currentTime,c=this.details,g=Math.max(d,(c==null?void 0:c.fragments[0].start)||0);if(g-d>1){this.log(`attachTransferred: waiting for playback to reach new tracks start time ${d} -> ${g}`);return}this.warn(`attachTransferred: resetting MediaSource for incompatible tracks ("${Object.keys(r)}"->"${Object.keys(n)}") start time: ${g} currentTime: ${d}`),this.onMediaDetaching(p.MEDIA_DETACHING,{}),this.onMediaAttaching(p.MEDIA_ATTACHING,t),e.currentTime=g;return}this.transferData=void 0,i.forEach(d=>{const c=d,g=r[c];if(g){const b=g.buffer;if(b){const O=this.fragmentTracker,F=g.id;if(O.hasFragments(F)||O.hasParts(F)){const Ee=qn.getBuffered(b);O.detectEvictedFragments(c,Ee,F,null,!0)}const H=Io(c),we=[c,b];this.sourceBuffers[H]=we,b.updating&&this.operationQueue&&this.operationQueue.prependBlocker(c),this.trackSourceBuffer(c,g)}}}),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&&tl(r),r.load()):this.warn("media|source.src was changed by a third party - skip cleanup")),this.media=null),this.hls.trigger(p.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[Io(e)]=[null,null];const t=this.tracks[e];t&&(t.buffer=void 0)}resetQueue(){this.operationQueue&&this.operationQueue.destroy(),this.operationQueue=new Jl(this.tracks)}onBufferCodecs(e,t){const n=this.tracks,r=Object.keys(t);this.log(`BUFFER_CODECS: "${r}" (current SB count ${this.sourceBufferCount})`);const i="audiovideo"in t&&(n.audio||n.video)||n.audiovideo&&("audio"in t||"video"in t),s=!i&&this.sourceBufferCount&&this.media&&r.some(l=>!n[l]);if(i||s){this.warn(`Unsupported transition between "${Object.keys(n)}" and "${r}" SourceBuffers`);return}r.forEach(l=>{var d,c,g;const b=t[l],{id:O,codec:F,levelCodec:H,container:we,metadata:Ee,supplemental:Ke}=b;let it=n[l];const Ye=(d=this.transferData)==null||(c=d.tracks)==null?void 0:c[l],St=Ye!=null&&Ye.buffer?Ye:it,Tt=(St==null?void 0:St.pendingCodec)||(St==null?void 0:St.codec),Jt=St==null?void 0:St.levelCodec;it||(it=n[l]={buffer:void 0,listeners:[],codec:F,supplemental:Ke,container:we,levelCodec:H,metadata:Ee,id:O});const Ct=Bt(Tt,Jt),zt=Ct==null?void 0:Ct.replace(qo,"$1");let rn=Bt(F,H);const kt=(g=rn)==null?void 0:g.replace(qo,"$1");rn&&Ct&&zt!==kt&&(l.slice(0,5)==="audio"&&(rn=Ce(rn,this.appendSource)),this.log(`switching codec ${Tt} to ${rn}`),rn!==(it.pendingCodec||it.codec)&&(it.pendingCodec=rn),it.container=we,this.appendChangeType(l,we,rn))}),(this.tracksReady||this.sourceBufferCount)&&(t.tracks=this.sourceBufferTracks),!this.sourceBufferCount&&this.mediaSourceOpenOrEnded&&this.checkPendingTracks()}get sourceBufferTracks(){return Object.keys(this.tracks).reduce((e,t)=>{const 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,fe.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&&qn.isBuffered(d.buffer,r)||((l=this.fragmentTracker.getAppendedFrag(r,fe.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}=t,g=c.buffering[i],b=l.sn,O=self.performance.now();g.start=O;const F=l.stats.buffering,H=d?d.stats.buffering:null;F.start===0&&(F.start=O),H&&H.start===0&&(H.start=O);const we=n.audio;let Ee=!1;i==="audio"&&(we==null?void 0:we.container)==="audio/mpeg"&&(Ee=!this.lastMpegAudioChunk||c.id===1||this.lastMpegAudioChunk.sn!==c.sn,this.lastMpegAudioChunk=c);const Ke=this.tracks.video,it=Ke==null?void 0:Ke.buffer;if(it&&b!=="initSegment"){const Tt=d||l,Jt=this.blockedAudioAppend;if(i==="audio"&&s!=="main"&&!this.blockedAudioAppend){const zt=Tt.start+Tt.duration*.05,rn=it.buffered,kt=this.currentOp("video");!rn.length&&!kt?this.blockAudio(Tt):!kt&&!qn.isBuffered(it,zt)&&this.lastVideoAppendEnd<zt&&this.blockAudio(Tt)}else if(i==="video"){const Ct=Tt.end;if(Jt){const zt=Jt.frag.start;(Ct>zt||Ct<this.lastVideoAppendEnd||qn.isBuffered(it,zt))&&this.unblockAudio()}this.lastVideoAppendEnd=Ct}}const Ye=(d||l).start,St={label:`append-${i}`,execute:()=>{if(g.executeStart=self.performance.now(),Ee){const Tt=this.tracks[i];if(Tt){const Jt=Tt.buffer;if(Jt){const Ct=Ye-Jt.timestampOffset;Math.abs(Ct)>=.1&&(this.log(`Updating audio SourceBuffer timestampOffset to ${Ye} (delta: ${Ct}) sn: ${b})`),Jt.timestampOffset=Ye)}}}this.appendExecutor(r,i)},onStart:()=>{},onComplete:()=>{const Tt=self.performance.now();g.executeEnd=g.end=Tt,F.first===0&&(F.first=Tt),H&&H.first===0&&(H.first=Tt);const Jt={};this.sourceBuffers.forEach(([Ct,zt])=>{Ct&&(Jt[Ct]=qn.getBuffered(zt))}),this.appendErrors[i]=0,i==="audio"||i==="video"?this.appendErrors.audiovideo=0:(this.appendErrors.audio=0,this.appendErrors.video=0),this.hls.trigger(p.BUFFER_APPENDED,{type:i,frag:l,part:d,chunkMeta:c,parent:l.type,timeRanges:Jt})},onError:Tt=>{var Jt;const Ct={type:_e.MEDIA_ERROR,parent:l.type,details:A.BUFFER_APPEND_ERROR,sourceBufferName:i,frag:l,part:d,chunkMeta:c,error:Tt,err:Tt,fatal:!1},zt=(Jt=this.media)==null?void 0:Jt.error;if(Tt.code===DOMException.QUOTA_EXCEEDED_ERR)Ct.details=A.BUFFER_FULL_ERROR;else if(Tt.code===DOMException.INVALID_STATE_ERR&&this.mediaSourceOpenOrEnded&&!zt)Ct.errorAction=Mn(!0);else if(Tt.name===el&&this.sourceBufferCount===0)Ct.errorAction=Mn(!0);else{const rn=++this.appendErrors[i];this.warn(`Failed ${rn}/${this.hls.config.appendErrorMaxRetry} times to append segment in "${i}" sourceBuffer (${zt||"no media error"})`),(rn>=this.hls.config.appendErrorMaxRetry||zt)&&(Ct.fatal=!0)}this.hls.trigger(p.ERROR,Ct)}};this.append(St,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(p.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[E.AUDIOVIDEO]?i.push("audiovideo"):(s[E.AUDIO]&&i.push("audio"),s[E.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(p.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])=>{var t,n;return e&&(!((t=this.tracks[e])!=null&&t.ended)||((n=this.tracks[e])==null?void 0:n.ending))})}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(p.BUFFERED_TO_END,void 0)})):(this.tracksEnded(),this.hls.trigger(p.BUFFERED_TO_END,void 0)))}tracksEnded(){this.sourceBuffers.forEach(([e])=>{if(e!==null){const t=this.tracks[e];t&&(t.ending=!1)}})}onLevelUpdated(e,{details:t}){t.fragments.length&&(this.details=t,this.updateDuration())}updateDuration(){const e=this.getDurationAndRange();e&&this.blockUntilOpen(()=>this.updateMediaSource(e))}onError(e,t){if(t.details===A.BUFFER_APPEND_ERROR&&t.frag){var n;const r=(n=t.errorAction)==null?void 0:n.nextAutoLevel;L(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(L(l)&&l>=0){const d=Math.max(l,s),c=Math.floor(i/s)*s-d;this.flushBackBuffer(i,s,c)}if(L(r.frontBufferFlushThreshold)&&r.frontBufferFlushThreshold>0){const d=Math.max(r.maxBufferLength,r.frontBufferFlushThreshold),c=Math.max(d,s),g=Math.floor(i/s)*s+c;this.flushFrontBuffer(i,s,g)}}flushBackBuffer(e,t,n){this.sourceBuffers.forEach(([r,i])=>{if(i){const l=qn.getBuffered(i);if(l.length>0&&n>l.start(0)){var s;this.hls.trigger(p.BACK_BUFFER_REACHED,{bufferEnd:n});const d=this.tracks[r];if((s=this.details)!=null&&s.live)this.hls.trigger(p.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(p.BUFFER_FLUSHING,{startOffset:0,endOffset:n,type:r})}}})}flushFrontBuffer(e,t,n){this.sourceBuffers.forEach(([r,i])=>{if(i){const s=qn.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(p.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&&t.live&&n.setLiveSeekableRange){const c=Math.max(0,t.fragmentStart),g=Math.max(c,r);return{duration:1/0,start:c,end:g}}return{duration:1/0}}const i=(e=this.overrides)==null?void 0:e.duration;if(i)return L(i)?{duration:i}:null;const s=this.media.duration,l=L(n.duration)?n.duration:0;return r>l&&r>s||!L(s)?{duration:r}:null}updateMediaSource({duration:e,start:t,end:n}){const r=this.mediaSource;!this.media||!r||r.readyState!=="open"||(r.duration!==e&&(L(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}) ${Wt(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(p.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(p.ERROR,{type:_e.MEDIA_ERROR,details:A.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":""} ${Wt(l)}`);try{const g=n.addSourceBuffer(c),b=Io(s),O=[s,g];t[b]=O,l.buffer=g}catch(g){var r;this.error(`error while trying to add sourceBuffer: ${g.message}`),this.shiftAndExecuteNext(s),(r=this.operationQueue)==null||r.removeBlockers(),delete this.tracks[s],this.hls.trigger(p.ERROR,{type:_e.MEDIA_ERROR,details:A.BUFFER_ADD_CODEC_ERROR,fatal:!1,error:g,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")&&He(n,"video")&&(r=It(r,n));const i=Bt(r,e.levelCodec);return i?t.slice(0,5)==="audio"?Ce(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(p.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(p.ERROR,{type:_e.MEDIA_ERROR,details:A.BUFFER_APPENDING_ERROR,sourceBufferName:e,error:r,fatal:!1});const i=this.currentOp(e);i&&i.onError(r)}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=L(r.duration)?r.duration:1/0,c=L(i.duration)?i.duration:1/0,g=Math.max(0,t),b=Math.min(n,d,c);b>g&&(!s.ending||s.ended)?(s.ended=!1,this.log(`Removing [${g},${b}] from the ${e} SourceBuffer`),l.remove(g,b)):this.shiftAndExecuteNext(e)}appendExecutor(e,t){const n=this.tracks[t],r=n==null?void 0:n.buffer;if(!r)throw new ql(`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 tl(a){const e=a.querySelectorAll("source");[].slice.call(e).forEach(t=>{a.removeChild(t)})}function tu(a,e){const t=self.document.createElement("source");t.type="video/mp4",t.src=e,a.appendChild(t)}function Io(a){return a==="audio"?1:0}class Ro{constructor(e){this.hls=void 0,this.autoLevelCapping=void 0,this.firstLevel=void 0,this.media=void 0,this.restrictedLevels=void 0,this.timer=void 0,this.clientRect=void 0,this.streamController=void 0,this.hls=e,this.autoLevelCapping=Number.POSITIVE_INFINITY,this.firstLevel=-1,this.media=null,this.restrictedLevels=[],this.timer=void 0,this.clientRect=null,this.registerListeners()}setStreamController(e){this.streamController=e}destroy(){this.hls&&this.unregisterListener(),this.timer&&this.stopCapping(),this.media=null,this.clientRect=null,this.hls=this.streamController=null}registerListeners(){const{hls:e}=this;e.on(p.FPS_DROP_LEVEL_CAPPING,this.onFpsDropLevelCapping,this),e.on(p.MEDIA_ATTACHING,this.onMediaAttaching,this),e.on(p.MANIFEST_PARSED,this.onManifestParsed,this),e.on(p.LEVELS_UPDATED,this.onLevelsUpdated,this),e.on(p.BUFFER_CODECS,this.onBufferCodecs,this),e.on(p.MEDIA_DETACHING,this.onMediaDetaching,this)}unregisterListener(){const{hls:e}=this;e.off(p.FPS_DROP_LEVEL_CAPPING,this.onFpsDropLevelCapping,this),e.off(p.MEDIA_ATTACHING,this.onMediaAttaching,this),e.off(p.MANIFEST_PARSED,this.onManifestParsed,this),e.off(p.LEVELS_UPDATED,this.onLevelsUpdated,this),e.off(p.BUFFER_CODECS,this.onBufferCodecs,this),e.off(p.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&&L(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,Ro.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 zi={MANIFEST:"m",AUDIO:"a",VIDEO:"v",MUXED:"av",INIT:"i",CAPTION:"c",TIMED_TEXT:"tt",KEY:"k",OTHER:"o"},nu={HLS:"h"},Da={OBJECT:"CMCD-Object",REQUEST:"CMCD-Request",SESSION:"CMCD-Session",STATUS:"CMCD-Status"},ru={[Da.OBJECT]:["br","d","ot","tb"],[Da.REQUEST]:["bl","dl","mtp","nor","nrr","su"],[Da.SESSION]:["cid","pr","sf","sid","st","v"],[Da.STATUS]:["bs","rtp"]};class na{constructor(e,t){Array.isArray(e)&&(e=e.map(n=>n instanceof na?n:new na(n))),this.value=e,this.params=t}}const iu="Dict";function su(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 au(a,e,t,n){return new Error(`failed to ${a} "${su(e)}" as ${t}`,{cause:n})}function ls(a,e,t){return au("serialize",a,e,t)}class nl{constructor(e){this.description=e}}const rl="Bare Item",ou="Boolean";function lu(a){if(typeof a!="boolean")throw ls(a,ou);return a?"?1":"?0"}const uu="Byte Sequence";function cu(a){if(ArrayBuffer.isView(a)===!1)throw ls(a,uu);return`:${ja(a)}:`}const du="Integer";function fu(a){return a<-999999999999999||999999999999999<a}function il(a){if(fu(a))throw ls(a,du);return a.toString()}function hu(a){return`@${il(a.getTime()/1e3)}`}const pu="Decimal";function mu(a){const e=Za(a,3);if(Math.floor(Math.abs(e)).toString().length>12)throw ls(a,pu);const t=e.toString();return t.includes(".")?t:`${t}.0`}const gu="String",vu=/[\x00-\x1f\x7f]+/;function yu(a){if(vu.test(a))throw ls(a,gu);return`"${a.replace(/\\/g,"\\\\").replace(/"/g,'\\"')}"`}function _u(a){return a.description||a.toString().slice(7,-1)}const bu="Token";function sl(a){const e=_u(a);if(/^([a-zA-Z*])([!#$%&'*+\-.^_`|~\w:/]*)$/.test(e)===!1)throw ls(e,bu);return e}function Lo(a){switch(typeof a){case"number":if(!L(a))throw ls(a,rl);return Number.isInteger(a)?il(a):mu(a);case"string":return yu(a);case"symbol":return sl(a);case"boolean":return lu(a);case"object":if(a instanceof Date)return hu(a);if(a instanceof Uint8Array)return cu(a);if(a instanceof nl)return sl(a);default:throw ls(a,rl)}}const xu="Key";function Oo(a){if(/^[a-z*][a-z0-9\-_.*]*$/.test(a)===!1)throw ls(a,xu);return a}function Po(a){return a==null?"":Object.entries(a).map(([e,t])=>t===!0?`;${Oo(e)}`:`;${Oo(e)}=${Lo(t)}`).join("")}function al(a){return a instanceof na?`${Lo(a.value)}${Po(a.params)}`:Lo(a)}function Eu(a){return`(${a.value.map(al).join(" ")})${Po(a.params)}`}function Su(a,e={whitespace:!0}){if(typeof a!="object")throw ls(a,iu);const t=a instanceof Map?a.entries():Object.entries(a),n=e!=null&&e.whitespace?" ":"";return Array.from(t).map(([r,i])=>{i instanceof na||(i=new na(i));let s=Oo(r);return i.value===!0?s+=Po(i.params):(s+="=",Array.isArray(i.value)?s+=Eu(i):s+=al(i)),s}).join(`,${n}`)}function wu(a,e){return Su(a,e)}function Tu(a){return a==="ot"||a==="sf"||a==="st"}function Cu(a){return typeof a=="number"?L(a):a!=null&&a!==""&&a!==!1}const ro=a=>Math.round(a),Au=(a,e)=>(e!=null&&e.baseUrl&&(a=Wa(a,e.baseUrl)),encodeURIComponent(a)),io=a=>ro(a/100)*100,Du={br:ro,d:ro,bl:io,dl:io,mtp:io,nor:Au,rtp:io,tb:ro};function Iu(a,e){const t={};if(a==null||typeof a!="object")return t;const n=Object.keys(a).sort(),r=v({},Du,e==null?void 0:e.formatters),i=e==null?void 0:e.filter;return n.forEach(s=>{if(i!=null&&i(s))return;let l=a[s];const d=r[s];d&&(l=d(l,e)),!(s==="v"&&l===1)&&(s=="pr"&&l===1||Cu(l)&&(Tu(s)&&typeof l=="string"&&(l=new nl(l)),t[s]=l))}),t}function ol(a,e={}){return a?wu(Iu(a,e),v({whitespace:!1},e)):""}function Ru(a,e={}){const t={};if(!a)return t;const n=Object.entries(a),r=Object.entries(ru).concat(Object.entries((e==null?void 0:e.customHeaderMap)||{})),i=n.reduce((s,l)=>{var d,c;const[g,b]=l,O=((d=r.find(F=>F[1].includes(g)))===null||d===void 0?void 0:d[0])||Da.REQUEST;return(c=s[O])!==null&&c!==void 0||(s[O]={}),s[O][g]=b,s},{});return Object.entries(i).reduce((s,[l,d])=>(s[l]=ol(d,e),s),t)}function Lu(a,e,t){return v(a,Ru(e,t))}const Ou="CMCD";function Pu(a,e={}){if(!a)return"";const t=ol(a,e);return`${Ou}=${encodeURIComponent(t)}`}const ll=/CMCD=[^&#]+/;function ku(a,e,t){const n=Pu(e,t);if(!n)return a;if(ll.test(a))return a.replace(ll,n);const r=a.includes("?")?"&":"?";return`${a}${r}${n}`}class Mu{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:zi.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===zi.VIDEO||d===zi.AUDIO||d==zi.MUXED)&&(c.br=l.bitrate/1e3,c.tb=this.getTopBandwidth(d)/1e3,c.bl=this.getBufferLength(d));const g=s?this.getNextPart(s):this.getNextFrag(i);g!=null&&g.url&&g.url!==i.url&&(c.nor=g.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(p.MEDIA_ATTACHED,this.onMediaAttached,this),e.on(p.MEDIA_DETACHED,this.onMediaDetached,this),e.on(p.BUFFER_CREATED,this.onBufferCreated,this)}unregisterListeners(){const e=this.hls;e.off(p.MEDIA_ATTACHED,this.onMediaAttached,this),e.off(p.MEDIA_DETACHED,this.onMediaDetached,this),e.off(p.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:nu.HLS,sid:this.sid,cid:this.cid,pr:(e=this.media)==null?void 0:e.playbackRate,mtp:this.hls.bandwidthEstimate/1e3}}apply(e,t={}){v(t,this.createData());const n=t.ot===zi.INIT||t.ot===zi.VIDEO||t.ot===zi.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={}),Lu(e.headers,t,i)):e.url=ku(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,n;const{index:r,fragment:i}=e,s=(t=this.hls.levels[i.level])==null||(n=t.details)==null?void 0:n.partList;if(s){const{sn:l}=i;for(let d=s.length-1;d>=0;d--){const c=s[d];if(c.index===r&&c.fragment.sn===l)return s[d+1]}}}getObjectType(e){const{type:t}=e;if(t==="subtitle")return zi.TIMED_TEXT;if(e.sn==="initSegment")return zi.INIT;if(t==="audio")return zi.AUDIO;if(t==="main")return this.hls.audioTracks.length?zi.VIDEO:zi.MUXED}getTopBandwidth(e){let t=0,n;const r=this.hls;if(e===zi.AUDIO)n=r.audioTracks;else{const i=r.maxAutoLevel,s=i>-1?i+1:r.levels.length;n=r.levels.slice(0,s)}for(const i of n)i.bitrate>t&&(t=i.bitrate);return t>0?t:NaN}getBufferLength(e){const t=this.media,n=e===zi.AUDIO?this.audioBuffer:this.videoBuffer;return!n||!t?NaN:qn.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 Nu=3e5;class Fu extends ae{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(p.MANIFEST_LOADING,this.onManifestLoading,this),e.on(p.MANIFEST_LOADED,this.onManifestLoaded,this),e.on(p.MANIFEST_PARSED,this.onManifestParsed,this),e.on(p.ERROR,this.onError,this)}unregisterListeners(){const e=this.hls;e&&(e.off(p.MANIFEST_LOADING,this.onManifestLoading,this),e.off(p.MANIFEST_LOADED,this.onManifestLoaded,this),e.off(p.MANIFEST_PARSED,this.onManifestParsed,this),e.off(p.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)===bn.SendAlternateToPenaltyBox&&n.flags===Ge.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),n.resolved||this.warn(`Could not resolve ${t.details} ("${t.error.message}") with content-steering for Pathway: ${s} levels: ${r&&r.length} priorities: ${Wt(i)} penalized: ${Wt(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]>Nu&&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,Ms(t),this.hls.trigger(p.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===be.AUDIO_TRACK&&r[i].hasAudioGroup(e)||t===be.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(g=>g.pathwayId===s))return;const c=this.getLevelsForPathway(l).map(g=>{const b=new or(g.attrs);b["PATHWAY-ID"]=s;const O=b.AUDIO&&`${b.AUDIO}_clone_${s}`,F=b.SUBTITLES&&`${b.SUBTITLES}_clone_${s}`;O&&(n[b.AUDIO]=O,b.AUDIO=O),F&&(r[b.SUBTITLES]=F,b.SUBTITLES=F);const H=cl(g.uri,b["STABLE-VARIANT-ID"],"PER-VARIANT-URIS",d),we=new hn({attrs:b,audioCodec:g.audioCodec,bitrate:g.bitrate,height:g.height,name:g.name,url:H,videoCodec:g.videoCodec,width:g.width});if(g.audioGroups)for(let Ee=1;Ee<g.audioGroups.length;Ee++)we.addGroupId("audio",`${g.audioGroups[Ee]}_clone_${s}`);if(g.subtitleGroups)for(let Ee=1;Ee<g.subtitleGroups.length;Ee++)we.addGroupId("text",`${g.subtitleGroups[Ee]}_clone_${s}`);return we});t.push(...c),ul(this.audioTracks,n,d,s),ul(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(g){this.enabled=!1,this.log(`Failed to parse Steering Manifest URI: ${e}`);return}if(r.protocol!=="data:"){const g=(this.hls.bandwidthEstimate||t.abrEwmaDefaultEstimate)|0;r.searchParams.set("_HLS_pathway",this.pathwayId),r.searchParams.set("_HLS_throughput",""+g)}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:(g,b,O,F)=>{this.log(`Loaded steering manifest: "${r}"`);const H=g.data;if((H==null?void 0:H.VERSION)!==1){this.log(`Steering VERSION ${H.VERSION} not supported!`);return}this.updated=performance.now(),this.timeToLoad=H.TTL;const{"RELOAD-URI":we,"PATHWAY-CLONES":Ee,"PATHWAY-PRIORITY":Ke}=H;if(we)try{this.uri=new self.URL(we,r).href}catch(Ye){this.enabled=!1,this.log(`Failed to parse Steering Manifest RELOAD-URI: ${we}`);return}this.scheduleRefresh(this.uri||O.url),Ee&&this.clonePathways(Ee);const it={steeringManifest:H,url:r.toString()};this.hls.trigger(p.STEERING_MANIFEST_LOADED,it),Ke&&this.updatePathwayPriority(Ke)},onError:(g,b,O,F)=>{if(this.log(`Error loading steering manifest: ${g.code} ${g.text} (${b.url})`),this.stopLoad(),g.code===410){this.enabled=!1,this.log(`Steering manifest ${b.url} no longer available`);return}let H=this.timeToLoad*1e3;if(g.code===429){const we=this.loader;if(typeof(we==null?void 0:we.getResponseHeader)=="function"){const Ee=we.getResponseHeader("Retry-After");Ee&&(H=parseFloat(Ee)*1e3)}this.log(`Steering manifest ${b.url} rate limited`);return}this.scheduleRefresh(this.uri||b.url,H)},onTimeout:(g,b,O)=>{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 ul(a,e,t,n){a&&Object.keys(e).forEach(r=>{const i=a.filter(s=>s.groupId===r).map(s=>{const l=v({},s);return l.details=void 0,l.attrs=new or(l.attrs),l.url=l.attrs.URI=cl(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 cl(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 ra extends ae{constructor(e){super("eme",e.logger),this.hls=void 0,this.config=void 0,this.media=null,this.keyFormatPromise=null,this.keySystemAccessPromises={},this._requestLicenseFailureCount=0,this.mediaKeySessions=[],this.keyIdToKeySessionPromise={},this.setMediaKeysQueue=ra.CDMCleanupPromise?[ra.CDMCleanupPromise]:[],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=Wn(this.config));const l=s.map(_i).filter(d=>!!d);this.keyFormatPromise=this.getKeyFormatPromise(l)}this.keyFormatPromise.then(s=>{const l=ni(s);let d,c;if(n==="sinf"){if(l!==rr.FAIRPLAY){this.warn(`Ignoring unexpected "${t.type}" event with init data type: "${n}" for selected key-system ${l}`);return}const H=Kt(new Uint8Array(r));try{const we=En(JSON.parse(H).sinf),Ee=De(we);if(!Ee)throw new Error("'schm' box missing or not cbcs/cenc with schi > tenc");d=new Uint8Array(Ee.subarray(8,24)),c=rr.FAIRPLAY}catch(we){this.warn(`${i} Failed to parse sinf: ${we}`);return}}else{if(l!==rr.WIDEVINE&&l!==rr.PLAYREADY){this.warn(`Ignoring unexpected "${t.type}" event with init data type: "${n}" for selected key-system ${l}`);return}const H=dt(r),we=H.filter(Ke=>!!Ke.systemId&&Ni(Ke.systemId)===l);we.length>1&&this.warn(`${i} Using first of ${we.length} pssh found for selected key-system ${l}`);const Ee=we[0];if(!Ee){H.length===0||H.some(Ke=>!Ke.systemId)?this.warn(`${i} contains incomplete or invalid pssh data`):this.log(`ignoring ${i} for ${H.map(Ke=>Ni(Ke.systemId)).join(",")} pssh data in favor of playlist keys`);return}if(c=Ni(Ee.systemId),Ee.version===0&&Ee.data)if(c===rr.WIDEVINE){const Ke=Ee.data.length-22;d=new Uint8Array(Ee.data.subarray(Ke,Ke+16))}else c===rr.PLAYREADY&&(d=Ri(Ee.data))}if(!c||!d)return;const g=te.hexDump(d),{keyIdToKeySessionPromise:b,mediaKeySessions:O}=this;let F=b[g];for(let H=0;H<O.length;H++){const we=O[H],Ee=we.decryptdata;if(!Ee.keyId)continue;const Ke=te.hexDump(Ee.keyId);if(g===Ke||Ee.uri.replace(/-/g,"").indexOf(g)!==-1){if(F=b[Ke],Ee.pssh)break;delete b[Ke],Ee.pssh=new Uint8Array(r),Ee.keyId=d,F=b[g]=F.then(()=>this.generateRequestWithPreferredKeySession(we,n,r,"encrypted-event-key-match")),F.catch(it=>this.handleError(it));break}}if(!F){if(c!==l){this.log(`Ignoring "${t.type}" event with ${c} init data for selected key-system ${l}`);return}F=b[g]=this.getKeySystemSelectionPromise([c]).then(({keySystem:H,mediaKeys:we})=>{var Ee;this.throwIfDestroyed();const Ke=new Li("ISO-23001-7",g,(Ee=_i(H))!=null?Ee:"");return Ke.pssh=new Uint8Array(r),Ke.keyId=d,this.attemptSetMediaKeys(H,we).then(()=>{this.throwIfDestroyed();const it=this.createMediaKeySessionContext({decryptdata:Ke,keySystem:H,mediaKeys:we});return this.generateRequestWithPreferredKeySession(it,n,r,"encrypted-event-no-match")})}),F.catch(H=>this.handleError(H))}})}},this.onWaitingForKey=t=>{this.log(`"${t.type}" event`)},this.hls=e,this.config=e.config,this.registerListeners()}destroy(){const e=this.media;this.unregisterListeners(),this.onMediaDetached(),this._clear(e);const t=this.config;t.requestMediaKeySystemAccessFunc=null,t.licenseXhrSetup=t.licenseResponseCallback=void 0,t.drmSystems=t.drmSystemOptions={},this.hls=this.config=this.keyIdToKeySessionPromise=null,this.onMediaEncrypted=this.onWaitingForKey=null}registerListeners(){this.hls.on(p.MEDIA_ATTACHED,this.onMediaAttached,this),this.hls.on(p.MEDIA_DETACHED,this.onMediaDetached,this),this.hls.on(p.MANIFEST_LOADING,this.onManifestLoading,this),this.hls.on(p.MANIFEST_LOADED,this.onManifestLoaded,this)}unregisterListeners(){this.hls.off(p.MEDIA_ATTACHED,this.onMediaAttached,this),this.hls.off(p.MEDIA_DETACHED,this.onMediaDetached,this),this.hls.off(p.MANIFEST_LOADING,this.onManifestLoading,this),this.hls.off(p.MANIFEST_LOADED,this.onManifestLoaded,this)}getLicenseServerUrl(e){const{drmSystems:t,widevineLicenseUrl:n}=this.config,r=t[e];if(r)return r.licenseUrl;if(e===rr.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[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 g=c.shift();this.getMediaKeysPromise(g,r,i).then(b=>s({keySystem:g,mediaKeys:b})).catch(b=>{c.length?d(c):b instanceof Yi?l(b):l(new Yi({type:_e.KEY_SYSTEM_ERROR,details:A.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 ir===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){const r=$r(e,t,n,this.config.drmSystemOptions),i=this.keySystemAccessPromises[e];let s=i==null?void 0:i.keySystemAccess;if(!s){this.log(`Requesting encrypted media "${e}" key-system access with config: ${Wt(r)}`),s=this.requestMediaKeySystemAccess(e,r);const l=this.keySystemAccessPromises[e]={keySystemAccess:s};return s.catch(d=>{this.log(`Failed to obtain access to key-system "${e}": ${d}`)}),s.then(d=>{this.log(`Access for key-system "${d.keySystem}" obtained`);const c=this.fetchServerCertificate(e);return this.log(`Create media-keys for "${e}"`),l.mediaKeys=d.createMediaKeys().then(g=>(this.log(`Media-keys created for "${e}"`),c.then(b=>b?this.setMediaKeysServerCertificate(g,e,b):g))),l.mediaKeys.catch(g=>{this.error(`Failed to create media-keys for "${e}"}: ${g}`)}),l.mediaKeys})}return s.then(()=>i.mediaKeys)}createMediaKeySessionContext({decryptdata:e,keySystem:t,mediaKeys:n}){this.log(`Creating key-system session "${t}" keyId: ${te.hexDump(e.keyId||[])}`);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=this.getKeyIdString(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)}getKeyIdString(e){if(!e)throw new Error("Could not read keyId of undefined decryptdata");if(e.keyId===null)throw new Error("keyId is null");return te.hexDump(e.keyId)}updateKeySession(e,t){var n;const r=e.mediaKeysSession;return this.log(`Updating key-session "${r.sessionId}" for keyID ${te.hexDump(((n=e.decryptdata)==null?void 0:n.keyId)||[])}
} (data length: ${t&&t.byteLength})`),r.update(t)}selectKeySystemFormat(e){const t=Object.keys(e.levelkeys||{});return this.keyFormatPromise||(this.log(`Selecting key-system from fragment (sn: ${e.sn} ${e.type}: ${e.level}) key formats ${t.join(", ")}`),this.keyFormatPromise=this.getKeyFormatPromise(t)),this.keyFormatPromise}getKeyFormatPromise(e){return new Promise((t,n)=>{const r=Wn(this.config),i=e.map(ni).filter(s=>!!s&&r.indexOf(s)!==-1);return this.getKeySystemSelectionPromise(i).then(({keySystem:s})=>{const l=_i(s);l?t(l):n(new Error(`Unable to find format for key-system "${s}"`))}).catch(n)})}loadKey(e){const t=e.keyInfo.decryptdata,n=this.getKeyIdString(t),r=`(keyId: ${n} format: "${t.keyFormat}" method: ${t.method} uri: ${t.uri})`;this.log(`Starting session for key ${r}`);let i=this.keyIdToKeySessionPromise[n];return i||(i=this.getKeySystemForKeyPromise(t).then(({keySystem:l,mediaKeys:d})=>(this.throwIfDestroyed(),this.log(`Handle encrypted media sn: ${e.frag.sn} ${e.frag.type}: ${e.frag.level} using key ${r}`),this.attemptSetMediaKeys(l,d).then(()=>(this.throwIfDestroyed(),this.createMediaKeySessionContext({keySystem:l,mediaKeys:d,decryptdata:t}))))),(this.keyIdToKeySessionPromise[n]=i.then(l=>{const d="cenc",c=t.pssh?t.pssh.buffer:null;return this.generateRequestWithPreferredKeySession(l,d,c,"playlist-key")})).catch(l=>this.handleError(l))),i}throwIfDestroyed(e="Invalid state"){if(!this.hls)throw new Error("invalid state")}handleError(e){this.hls&&(this.error(e.message),e instanceof Yi?this.hls.trigger(p.ERROR,e.data):this.hls.trigger(p.ERROR,{type:_e.KEY_SYSTEM_ERROR,details:A.KEY_SYSTEM_NO_KEYS,error:e,fatal:!0}))}getKeySystemForKeyPromise(e){const t=this.getKeyIdString(e),n=this.keyIdToKeySessionPromise[t];if(!n){const r=ni(e.keyFormat),i=r?[r]:Wn(this.config);return this.attemptKeySystemAccess(i)}return n}getKeySystemSelectionPromise(e){if(e.length||(e=Wn(this.config)),e.length===0)throw new Yi({type:_e.KEY_SYSTEM_ERROR,details:A.KEY_SYSTEM_NO_CONFIGURED_LICENSE,fatal:!0},`Missing key-system license configuration options ${Wt({drmSystems:this.config.drmSystems})}`);return this.attemptKeySystemAccess(e)}attemptSetMediaKeys(e,t){const n=this.setMediaKeysQueue.slice();this.log(`Setting media-keys for "${e}"`);const r=Promise.all(n).then(()=>{if(!this.media)throw new Error("Attempted to set mediaKeys without media element attached");return this.media.setMediaKeys(t)});return 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,s;const l=(i=this.config.drmSystems)==null||(s=i[e.keySystem])==null?void 0:s.generateRequest;if(l)try{const H=l.call(this.hls,t,n,e);if(!H)throw new Error("Invalid response from configured generateRequest filter");t=H.initDataType,n=H.initData?H.initData:null,e.decryptdata.pssh=n?new Uint8Array(n):null}catch(H){var d;if(this.warn(H.message),(d=this.hls)!=null&&d.config.debug)throw H}if(n===null)return this.log(`Skipping key-session request for "${r}" (no initData)`),Promise.resolve(e);const c=this.getKeyIdString(e.decryptdata);this.log(`Generating key-session request for "${r}": ${c} (init data type: ${t} length: ${n?n.byteLength:null})`);const g=new Vs,b=e._onmessage=H=>{const we=e.mediaKeysSession;if(!we){g.emit("error",new Error("invalid state"));return}const{messageType:Ee,message:Ke}=H;this.log(`"${Ee}" message event for session "${we.sessionId}" message size: ${Ke.byteLength}`),Ee==="license-request"||Ee==="license-renewal"?this.renewLicense(e,Ke).catch(it=>{g.eventNames().length?g.emit("error",it):this.handleError(it)}):Ee==="license-release"?e.keySystem===rr.FAIRPLAY&&(this.updateKeySession(e,Qn("acknowledged")),this.removeSession(e)):this.warn(`unhandled media key message type "${Ee}"`)},O=e._onkeystatuseschange=H=>{if(!e.mediaKeysSession){g.emit("error",new Error("invalid state"));return}this.onKeyStatusChange(e);const Ee=e.keyStatus;g.emit("keyStatus",Ee),Ee==="expired"&&(this.warn(`${e.keySystem} expired for key ${c}`),this.renewKeySession(e))};e.mediaKeysSession.addEventListener("message",b),e.mediaKeysSession.addEventListener("keystatuseschange",O);const F=new Promise((H,we)=>{g.on("error",we),g.on("keyStatus",Ee=>{Ee.startsWith("usable")?H():Ee==="output-restricted"?we(new Yi({type:_e.KEY_SYSTEM_ERROR,details:A.KEY_SYSTEM_STATUS_OUTPUT_RESTRICTED,fatal:!1},"HDCP level output restricted")):Ee==="internal-error"?we(new Yi({type:_e.KEY_SYSTEM_ERROR,details:A.KEY_SYSTEM_STATUS_INTERNAL_ERROR,fatal:!0},`key status changed to "${Ee}"`)):Ee==="expired"?we(new Error("key expired while generating request")):this.warn(`unhandled key status change "${Ee}"`)})});return e.mediaKeysSession.generateRequest(t,n).then(()=>{var H;this.log(`Request generated for key-session "${(H=e.mediaKeysSession)==null?void 0:H.sessionId}" keyId: ${c}`)}).catch(H=>{throw new Yi({type:_e.KEY_SYSTEM_ERROR,details:A.KEY_SYSTEM_NO_SESSION,error:H,fatal:!1},`Error generating key-session request: ${H}`)}).then(()=>F).catch(H=>{throw g.removeAllListeners(),this.removeSession(e),H}).then(()=>(g.removeAllListeners(),e))}onKeyStatusChange(e){e.mediaKeysSession.keyStatuses.forEach((t,n)=>{if(typeof n=="string"&&typeof t=="object"){const r=n;n=t,t=r}this.log(`key status change "${t}" for keyStatuses keyId: ${te.hexDump("buffer"in n?new Uint8Array(n.buffer,n.byteOffset,n.byteLength):new Uint8Array(n))} session keyId: ${te.hexDump(new Uint8Array(e.decryptdata.keyId||[]))} uri: ${e.decryptdata.uri}`),e.keyStatus=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,g={loadPolicy:c,timeout:c.maxLoadTimeMs,maxRetry:0,retryDelay:0,maxRetryDelay:0},b={onSuccess:(O,F,H,we)=>{s(O.data)},onError:(O,F,H,we)=>{l(new Yi({type:_e.KEY_SYSTEM_ERROR,details:A.KEY_SYSTEM_SERVER_CERTIFICATE_REQUEST_FAILED,fatal:!0,networkDetails:H,response:S({url:d.url,data:void 0},O)},`"${e}" certificate request failed (${i}). Status: ${O.code} (${O.text})`))},onTimeout:(O,F,H)=>{l(new Yi({type:_e.KEY_SYSTEM_ERROR,details:A.KEY_SYSTEM_SERVER_CERTIFICATE_REQUEST_FAILED,fatal:!0,networkDetails:H,response:{url:d.url,data:void 0}},`"${e}" certificate request timed out (${i})`))},onAbort:(O,F,H)=>{l(new Error("aborted"))}};r.load(d,g,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==null?void 0:n.byteLength}) on "${t}"`),r(e)}).catch(s=>{i(new Yi({type:_e.KEY_SYSTEM_ERROR,details:A.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 Yi({type:_e.KEY_SYSTEM_ERROR,details:A.KEY_SYSTEM_SESSION_UPDATE_FAILED,error:r,fatal:!0},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 g;for(let b=0,O=i.length;b<O;b++){var s,l;g=i[b];const F=(s=g.querySelector("name"))==null?void 0:s.textContent,H=(l=g.querySelector("value"))==null?void 0:l.textContent;F&&H&&e.setRequestHeader(F,H)}}const d=r.querySelector("Challenge"),c=d==null?void 0:d.textContent;if(!c)throw new Error("Cannot find <Challenge> in key message");return Qn(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(g){this.error(g)}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 Yi({type:_e.KEY_SYSTEM_ERROR,details:A.KEY_SYSTEM_LICENSE_REQUEST_FAILED,fatal:!0,networkDetails:l,response:{url:s,data:void 0,code:l.status,text:l.statusText}},`License Request XHR failed (${s}). Status: ${l.status} (${l.statusText})`));else{const g=c-this._requestLicenseFailureCount+1;this.warn(`Retrying license request, ${g} 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==rr.PLAYREADY&&(c=this.unpackPlayReadyKeyMessage(d,c)),d.send(c)})})}onMediaAttached(e,t){if(!this.config.emeEnabled)return;const n=t.media;this.media=n,n.removeEventListener("encrypted",this.onMediaEncrypted),n.removeEventListener("waitingforkey",this.onWaitingForKey),n.addEventListener("encrypted",this.onMediaEncrypted),n.addEventListener("waitingforkey",this.onWaitingForKey)}onMediaDetached(){const e=this.media;e&&(e.removeEventListener("encrypted",this.onMediaEncrypted),e.removeEventListener("waitingforkey",this.onWaitingForKey),this.media=null)}_clear(e){var t;const n=this.mediaKeySessions;this._requestLicenseFailureCount=0,this.setMediaKeysQueue=[],this.mediaKeySessions=[],this.keyIdToKeySessionPromise={},Li.clearKeyUriToKeyIdMap();const r=n.length;ra.CDMCleanupPromise=Promise.all(n.map(i=>this.removeSession(i)).concat(e==null||(t=e.setMediaKeys(null))==null?void 0:t.catch(i=>{var s;this.log(`Could not clear media keys: ${i}`),(s=this.hls)==null||s.trigger(p.ERROR,{type:_e.OTHER_ERROR,details:A.KEY_SYSTEM_DESTROY_MEDIA_KEYS_ERROR,fatal:!1,error:new Error(`Could not clear media keys: ${i}`)})}))).then(()=>{r&&(this.log("finished closing key sessions and clearing media keys"),n.length=0)}).catch(i=>{var s;this.log(`Could not close sessions and clear media keys: ${i}`),(s=this.hls)==null||s.trigger(p.ERROR,{type:_e.OTHER_ERROR,details:A.KEY_SYSTEM_DESTROY_CLOSE_SESSION_ERROR,fatal:!1,error:new Error(`Could not close sessions and clear media keys: ${i}`)})})}onManifestLoading(){this.keyFormatPromise=null}onManifestLoaded(e,{sessionKeys:t}){if(!(!t||!this.config.emeEnabled)&&!this.keyFormatPromise){const 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}=e;if(t){this.log(`Remove licenses and keys and close session ${t.sessionId}`),e._onmessage&&(t.removeEventListener("message",e._onmessage),e._onmessage=void 0),e._onkeystatuseschange&&(t.removeEventListener("keystatuseschange",e._onkeystatuseschange),e._onkeystatuseschange=void 0),n&&n.readyState!==XMLHttpRequest.DONE&&n.abort(),e.mediaKeysSession=e.decryptdata=e.licenseXhr=void 0;const r=this.mediaKeySessions.indexOf(e);r>-1&&this.mediaKeySessions.splice(r,1);const{drmSystemOptions:i}=this.config;return(Ur(i)?new Promise((l,d)=>{self.setTimeout(()=>d(new Error("MediaKeySession.remove() timeout")),8e3),t.remove().then(l)}):Promise.resolve()).catch(l=>{var d;this.log(`Could not remove session: ${l}`),(d=this.hls)==null||d.trigger(p.ERROR,{type:_e.OTHER_ERROR,details:A.KEY_SYSTEM_DESTROY_REMOVE_SESSION_ERROR,fatal:!1,error:new Error(`Could not remove session: ${l}`)})}).then(()=>t.close()).catch(l=>{var d;this.log(`Could not close session: ${l}`),(d=this.hls)==null||d.trigger(p.ERROR,{type:_e.OTHER_ERROR,details:A.KEY_SYSTEM_DESTROY_CLOSE_SESSION_ERROR,fatal:!1,error:new Error(`Could not close session: ${l}`)})})}}}ra.CDMCleanupPromise=void 0;class Yi extends Error{constructor(e,t){super(t),this.data=void 0,e.error||(e.error=new Error(t)),this.data=e,e.err=e.error}}class Bu{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(p.MEDIA_ATTACHING,this.onMediaAttaching,this),this.hls.on(p.MEDIA_DETACHING,this.onMediaDetaching,this)}unregisterListeners(){this.hls.off(p.MEDIA_ATTACHING,this.onMediaAttaching,this),this.hls.off(p.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(p.FPS_DROP,{currentDropped:s,currentDecoded:l,totalDroppedFrames:n}),d>0&&s>c.config.fpsDroppedMonitoringThreshold*l){let g=c.currentLevel;c.logger.warn("drop FPS ratio greater than max allowed value for currentLevel: "+g),g>0&&(c.autoLevelCapping===-1||c.autoLevelCapping>=g)&&(g=g-1,c.trigger(p.FPS_DROP_LEVEL_CAPPING,{level:g,droppedLevel:c.currentLevel}),c.autoLevelCapping=g,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 dl(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 fl(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){$.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){$.debug(`[texttrack-utils]: Legacy TextTrackCue fallback failed: ${r}`)}}t==="disabled"&&(a.mode=t)}function ia(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 ko(a,e,t,n){const r=a.mode;if(r==="disabled"&&(a.mode="hidden"),a.cues&&a.cues.length>0){const i=Uu(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 $u(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 Uu(a,e,t){const n=[],r=$u(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 so(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 zu extends Ao{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=so(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(p.MEDIA_ATTACHED,this.onMediaAttached,this),e.on(p.MEDIA_DETACHING,this.onMediaDetaching,this),e.on(p.MANIFEST_LOADING,this.onManifestLoading,this),e.on(p.MANIFEST_PARSED,this.onManifestParsed,this),e.on(p.LEVEL_LOADING,this.onLevelLoading,this),e.on(p.LEVEL_SWITCHING,this.onLevelSwitching,this),e.on(p.SUBTITLE_TRACK_LOADED,this.onSubtitleTrackLoaded,this),e.on(p.ERROR,this.onError,this)}unregisterListeners(){const{hls:e}=this;e.off(p.MEDIA_ATTACHED,this.onMediaAttached,this),e.off(p.MEDIA_DETACHING,this.onMediaDetaching,this),e.off(p.MANIFEST_LOADING,this.onManifestLoading,this),e.off(p.MANIFEST_PARSED,this.onManifestParsed,this),e.off(p.LEVEL_LOADING,this.onLevelLoading,this),e.off(p.LEVEL_SWITCHING,this.onLevelSwitching,this),e.off(p.SUBTITLE_TRACK_LOADED,this.onSubtitleTrackLoaded,this),e.off(p.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;so(n.textTracks).forEach(s=>{ia(s)})}onManifestLoading(){this.tracks=[],this.groupIds=null,this.tracksInGroup=[],this.trackId=-1,this.currentTrack=null,this.selectDefaultTrack=!0}onManifestParsed(e,t){this.tracks=t.subtitleTracks}onSubtitleTrackLoaded(e,t){const{id: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(g=>!n||n.indexOf(g.groupId)!==-1);if(s.length)this.selectDefaultTrack&&!s.some(g=>g.default)&&(this.selectDefaultTrack=!1),s.forEach((g,b)=>{g.id=b});else if(!i&&!this.tracksInGroup.length)return;this.tracksInGroup=s;const l=this.hls.config.subtitlePreference;if(!i&&l){this.selectDefaultTrack=!1;const g=ht(l,s);if(g>-1)i=s[g];else{const b=ht(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(p.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||xt(i,e)))return r}if(e){for(let r=0;r<t.length;r++){const i=t[r];if(Aa(e.attrs,i.attrs,["LANGUAGE","ASSOC-LANGUAGE","CHARACTERISTICS"]))return r}for(let r=0;r<t.length;r++){const i=t[r];if(Aa(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(Do(r,e))return n}}return-1}onError(e,t){t.fatal||!t.context||t.context.type===be.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&&xt(e,n))return n;const r=ht(e,this.tracksInGroup);if(r>-1){const i=this.tracksInGroup[r];return this.setSubtitleTrack(r),i}else{if(n)return null;{const i=ht(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(p.SUBTITLE_TRACK_LOADING,{url:i,id:n,groupId:r,deliveryDirectives:t||null,track:e})}toggleTrackModes(){const{media:e}=this;if(!e)return;const t=so(e.textTracks),n=this.currentTrack;let r;if(n&&(r=t.filter(i=>Do(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||!L(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(p.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:g}=r;this.hls.trigger(p.SUBTITLE_TRACK_SWITCH,{id:s,groupId:l,name:d,type:c,url:g});const b=this.switchParams(r.url,n==null?void 0:n.details,r.details);this.loadPlaylist(b)}}function Ia(a){let e=5381,t=a.length;for(;t;)e=e*33^a.charCodeAt(--t);return(e>>>0).toString()}const sa=.025;let ao=function(a){return a[a.Point=0]="Point",a[a.Range=1]="Range",a}({});function Ku(a,e,t){return`${a.identifier}-${t+1}-${Ia(e)}`}class Hu{constructor(e,t){this.base=void 0,this._duration=null,this._timelineStart=null,this.appendInPlaceDisabled=void 0,this.appendInPlaceStarted=void 0,this.dateRange=void 0,this.hasPlayed=!1,this.cumulativeDuration=0,this.resumeOffset=NaN,this.playoutLimit=NaN,this.restrictions={skip:!1,jump:!1},this.snapOptions={out:!1,in:!1},this.assetList=[],this.assetListLoader=void 0,this.assetListResponse=null,this.resumeAnchor=void 0,this.error=void 0,this.resetOnResume=void 0,this.base=t,this.dateRange=e,this.setDateRange(e)}setDateRange(e){this.dateRange=e,this.resumeOffset=e.attr.optionalFloat("X-RESUME-OFFSET",this.resumeOffset),this.playoutLimit=e.attr.optionalFloat("X-PLAYOUT-LIMIT",this.playoutLimit),this.restrictions=e.attr.enumeratedStringList("X-RESTRICT",this.restrictions),this.snapOptions=e.attr.enumeratedStringList("X-SNAP",this.snapOptions)}reset(){var e;this.appendInPlaceStarted=!1,(e=this.assetListLoader)==null||e.destroy(),this.assetListLoader=void 0,this.supplementsPrimary||(this.assetListResponse=null,this.assetList=[],this._duration=null)}isAssetPastPlayoutLimit(e){if(e>=this.assetList.length)return!0;const t=this.playoutLimit;return e<=0||isNaN(t)?!1:this.assetList[e].startOffset>t}findAssetIndex(e){return this.assetList.indexOf(e)}get identifier(){return this.dateRange.id}get startDate(){return this.dateRange.startDate}get startTime(){const e=this.dateRange.startTime;if(this.snapOptions.out){const t=this.dateRange.tagAnchor;if(t)return Mo(e,t)}return e}get startOffset(){return this.cue.pre?0:this.startTime}get startIsAligned(){if(this.startTime===0||this.snapOptions.out)return!0;const e=this.dateRange.tagAnchor;if(e){const t=this.dateRange.startTime,n=Mo(t,e);return t-n<.1}return!1}get resumptionOffset(){const e=this.resumeOffset,t=L(e)?e:this.duration;return this.cumulativeDuration+t}get resumeTime(){const e=this.startOffset+this.resumptionOffset;if(this.snapOptions.in){const t=this.resumeAnchor;if(t)return Mo(e,t)}return e}get appendInPlace(){return this.appendInPlaceStarted?!0:this.appendInPlaceDisabled?!1:!!(!this.cue.once&&!this.cue.pre&&this.startIsAligned&&(isNaN(this.playoutLimit)&&isNaN(this.resumeOffset)||this.resumeOffset&&this.duration&&Math.abs(this.resumeOffset-this.duration)<sa))}set appendInPlace(e){if(this.appendInPlaceStarted){this.resetOnResume=!e;return}this.appendInPlaceDisabled=!e}get timelineStart(){return this._timelineStart!==null?this._timelineStart:this.startTime}set timelineStart(e){this._timelineStart=e}get duration(){const e=this.playoutLimit;let t;return this._duration!==null?t=this._duration:this.dateRange.duration?t=this.dateRange.duration:t=this.dateRange.plannedDuration||0,!isNaN(e)&&e<t&&(t=e),t}set duration(e){this._duration=e}get cue(){return this.dateRange.cue}get timelineOccupancy(){return this.dateRange.attr["X-TIMELINE-OCCUPIES"]==="RANGE"?ao.Range:ao.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 ju(this)}}function Mo(a,e){return a-e.start<e.duration/2&&!(Math.abs(a-(e.start+e.duration))<sa)?e.start:e.start+e.duration}function hl(a,e,t){const n=new self.URL(a,t);return n.protocol!=="data:"&&n.searchParams.set("_HLS_primary_id",e),n}function ju(a){return`["${a.identifier}" ${a.cue.pre?"<pre>":a.cue.post?"<post>":""}${a.timelineStart.toFixed(2)}-${a.resumeTime.toFixed(2)}]`}function No(a){const e=a.timelineStart,t=a.duration||0;return`["${a.identifier}" ${e.toFixed(2)}-${(e+t).toFixed(2)}]`}class Zu{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=()=>{const c=this.interstitial.playoutLimit,g=this.currentTime;this.startOffset+g>=c&&this.hls.trigger(p.PLAYOUT_LIMIT_REACHED,{})};const i=this.hls=new e(t);this.interstitial=n,this.assetItem=r;let s=r.uri;try{s=hl(s,i.sessionId).href}catch(d){}i.loadSource(s);const l=()=>{this.hasDetails=!0};i.once(p.LEVEL_LOADED,l),i.once(p.AUDIO_TRACK_LOADED,l),i.once(p.SUBTITLE_TRACK_LOADED,l),i.on(p.MEDIA_ATTACHING,(d,{media:c})=>{this.removeMediaListeners(),this.mediaAttached=c,this.interstitial.playoutLimit&&c.addEventListener("timeupdate",this.checkPlayout)})}bufferedInPlaceToEnd(e){var t;if(!this.interstitial.appendInPlace)return!1;if((t=this.hls)!=null&&t.bufferedToEnd)return!0;if(!e||!this._bufferedEosTime)return!1;const n=this.timelineOffset,r=qn.bufferInfo(e,n,0);return this.getAssetTime(r.end)>=this._bufferedEosTime-.02}get destroyed(){var e;return!((e=this.hls)!=null&&e.userConfig)}get assetId(){return this.assetItem.identifier}get interstitialId(){return this.assetItem.parentIdentifier}get media(){var e;return((e=this.hls)==null?void 0:e.media)||null}get bufferedEnd(){const e=this.media||this.mediaAttached;if(!e)return this._bufferedEosTime?this._bufferedEosTime:this.currentTime;const t=qn.bufferInfo(e,e.currentTime,.001);return this.getAssetTime(t.end)}get currentTime(){const e=this.media||this.mediaAttached;return e?this.getAssetTime(e.currentTime):this._currentTime||0}get duration(){const e=this.assetItem.duration;return e||0}get remaining(){const e=this.duration;return e?Math.max(0,e-this.currentTime):0}get startOffset(){return this.assetItem.startOffset}get timelineOffset(){var e;return((e=this.hls)==null?void 0:e.config.timelineOffset)||0}set timelineOffset(e){const t=this.timelineOffset;if(e!==t){const n=e-t;if(Math.abs(n)>1/9e4){if(this.hasDetails)throw new Error("Cannot set timelineOffset after playlists are loaded");this.hls.config.timelineOffset=e}}}getAssetTime(e){const t=this.timelineOffset,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.destroy(),this.hls=this.interstitial=null,this.tracks=this.mediaAttached=this.checkPlayout=null}attachMedia(e){this.hls.attachMedia(e)}detachMedia(){this.removeMediaListeners(),this.mediaAttached=null,this.hls.detachMedia()}resumeBuffering(){this.hls.resumeBuffering()}pauseBuffering(){this.hls.pauseBuffering()}transferMedia(){return this.bufferSnapShot(),this.hls.transferMedia()}on(e,t,n){this.hls.on(e,t)}once(e,t,n){this.hls.once(e,t)}off(e,t,n){this.hls.off(e,t)}toString(){var e,t;return`HlsAssetPlayer: ${No(this.assetItem)} ${(e=this.hls)==null?void 0:e.sessionId} ${(t=this.interstitial)!=null&&t.appendInPlace?"append-in-place":""}`}}const pl=.033;class Wu extends ae{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))return i}}return 0}get assetIdAtEnd(){var e,t;const n=(e=this.items)==null||(t=e[this.length-1])==null?void 0:t.event;if(n){const r=n.assetList,i=r[r.length-1];if(i)return i.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,g)=>{const b=c.cue.pre,O=c.cue.post,F=g.cue.pre,H=g.cue.post;if(b&&!F)return-1;if(F&&!b||O&&!H)return 1;if(H&&!O)return-1;if(!b&&!F&&!O&&!H){const we=c.startTime,Ee=g.startTime;if(we!==Ee)return we-Ee}return c.dateRange.tagOrder-g.dateRange.tagOrder}),this.events=s,d.forEach(c=>{this.removeEvent(c)}),this.updateSchedule(e,d)}updateSchedule(e,t=[]){const n=this.events||[];if(n.length||t.length||this.length<2){const r=this.items,i=this.parseSchedule(n,e);(t.length||(r==null?void 0:r.length)!==i.length||i.some((l,d)=>Math.abs(l.playout.start-r[d].playout.start)>.005||Math.abs(l.playout.end-r[d].playout.end)>.005))&&(this.items=i,this.onScheduleUpdate(t,r))}}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 Hu(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((g,b)=>{const O=g.cue.pre,F=g.cue.post,H=e[b-1]||null,we=g.appendInPlace,Ee=F?i:g.startOffset,Ke=g.duration,it=g.timelineOccupancy===ao.Range?Ke:0,Ye=g.resumptionOffset,St=(H==null?void 0:H.startTime)===Ee,Tt=Ee+g.cumulativeDuration;let Jt=we?Tt+Ke:Ee+Ye;if(O||!F&&Ee<=0){const zt=c;c+=it,g.timelineStart=Tt;const rn=s;s+=Ke,n.push({event:g,start:Tt,end:Jt,playout:{start:rn,end:s},integrated:{start:zt,end:c}})}else if(Ee<=i){if(!St){const kt=Ee-d;if(kt>pl){const Rn=d,Gn=c;c+=kt;const Fr=s;s+=kt;const yr={previousEvent:e[b-1]||null,nextEvent:g,start:Rn,end:Rn+kt,playout:{start:Fr,end:s},integrated:{start:Gn,end:c}};n.push(yr)}else kt>0&&H&&(H.cumulativeDuration+=kt,n[n.length-1].end=Ee)}F&&(Jt=Tt),g.timelineStart=Tt;const zt=c;c+=it;const rn=s;s+=Ke,n.push({event:g,start:Tt,end:Jt,playout:{start:rn,end:s},integrated:{start:zt,end:c}})}else return;const Ct=g.resumeTime;F||Ct>i?d=i:d=Ct}),d<i){var l;const g=d,b=c,O=i-d;c+=O;const F=s;s+=O,n.push({previousEvent:((l=n[n.length-1])==null?void 0:l.event)||null,nextEvent:null,start:d,end:g+O,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,g=l.cue.post,b=c?0:g?r:l.startTime;this.updateAssetDurations(l),s===b?l.cumulativeDuration=i:(i=0,s=b),!g&&l.snapOptions.in&&(l.resumeAnchor=dn(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<pl&&(e[d+1].appendInPlace=!1,e[d+1].appendInPlace&&this.warn(`Could not change append strategy for abutting event ${l}`));const F=L(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)>sa?(this.log(`"${e.identifier}" resumption ${n} not aligned with estimated timeline end ${r}`),!1):t?!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=dn(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 g=s==="audio"?.175:0;return Math.abs(c.start-n)<sa+g||Math.abs(c.end-n)<sa+g?!1:(this.log(`"${e.identifier}" resumption ${n} not aligned with ${s} fragment bounds (${c.start}-${c.end} sn: ${c.sn} cc: ${c.cc})`),!0)}):(this.log(`"${e.identifier}" resumption ${n} can not be aligned with media (none selected)`),!1)}updateAssetDurations(e){if(!e.assetListLoaded)return;const t=e.timelineStart;let n=0,r=!1,i=!1;e.assetList.forEach((s,l)=>{const d=t+n;s.startOffset=n,s.timelineStart=d,r||(r=s.duration===null),i||(i=!!s.error);const c=s.error?0:s.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 Is(a){return`[${a.event?'"'+a.event.identifier+'"':"primary"}: ${a.start.toFixed(2)}-${a.end.toFixed(2)}]`}class Gu{constructor(e){this.hls=void 0,this.hls=e}destroy(){this.hls=null}loadAssetList(e,t){const n=e.assetListUrl;let r;try{r=hl(n,this.hls.sessionId,e.baseUrl)}catch(O){const F=this.assignAssetListError(e,A.ASSET_LIST_LOAD_ERROR,O,n);this.hls.trigger(p.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,g={loadPolicy:c,timeout:c.maxLoadTimeMs,maxRetry:0,retryDelay:0,maxRetryDelay:0},b={onSuccess:(O,F,H,we)=>{const Ee=O.data,Ke=Ee==null?void 0:Ee.ASSETS;if(!Array.isArray(Ke)){const it=this.assignAssetListError(e,A.ASSET_LIST_PARSING_ERROR,new Error("Invalid interstitial asset list"),H.url,F,we);this.hls.trigger(p.ERROR,it);return}e.assetListResponse=Ee,this.hls.trigger(p.ASSET_LIST_LOADED,{event:e,assetListResponse:Ee,networkDetails:we})},onError:(O,F,H,we)=>{const Ee=this.assignAssetListError(e,A.ASSET_LIST_LOAD_ERROR,new Error(`Error loading X-ASSET-LIST: HTTP status ${O.code} ${O.text} (${F.url})`),F.url,we,H);this.hls.trigger(p.ERROR,Ee)},onTimeout:(O,F,H)=>{const we=this.assignAssetListError(e,A.ASSET_LIST_LOAD_TIMEOUT,new Error(`Timeout loading X-ASSET-LIST (${F.url})`),F.url,O,H);this.hls.trigger(p.ERROR,we)}};return l.load(d,g,b),this.hls.trigger(p.ASSET_LIST_LOADING,{event:e}),l}assignAssetListError(e,t,n,r,i,s){return e.error=n,{type:_e.NETWORK_ERROR,details:t,fatal:!1,interstitial:e,url:r,error:n,networkDetails:s,stats:i}}}function _s(a,e,t){us(a,e,t),a.addEventListener(e,t)}function us(a,e,t){a.removeEventListener(e,t)}function ml(a){a==null||a.play().catch(()=>{})}class Vu extends ae{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)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(),this.checkBuffer(),s&&n<l.start||n>=l.end){var d;const O=this.schedule.findItemIndexAtTime(this.timelinePos);if(!this.isInterstitial(l)&&(d=this.media)!=null&&d.paused&&(this.shouldPlay=!1),!s){const F=this.findItemIndex(l);if(O>F){const H=this.schedule.findJumpRestrictedIndex(F+1,O);if(H>F){this.setSchedulePosition(H);return}}}this.setSchedulePosition(O);return}const c=this.playingAsset;if(!c){if(this.playingLastItem&&this.isInterstitial(l)){const O=l.event.assetList[0];O&&(this.endedItem=this.playingItem,this.playingItem=null,this.setScheduleToAssetAtTime(n,O))}return}const g=c.timelineStart,b=c.duration||0;(s&&n<g||n>=g+b)&&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,s=this.playingItem,l=i.events||[],d=i.items||[],c=i.durations,g=n.map(F=>F.identifier),b=!!(l.length||g.length);if(b&&this.log(`INTERSTITIALS_UPDATED (${l.length}): ${l}
Schedule: ${d.map(F=>Is(F))}`),g.length&&this.log(`Removed events ${g}`),this.playerQueue.forEach(F=>{if(F.interstitial.appendInPlace){const H=F.assetItem.timelineStart,we=F.timelineOffset-H;if(we)try{F.timelineOffset=H}catch(Ee){Math.abs(we)>sa&&this.warn(`${Ee} ("${F.assetId}" ${F.timelineOffset}->${H})`)}}}),s){const F=this.updateItem(s,this.timelinePos);this.itemsMatch(s,F)&&(this.playingItem=F,this.waitingItem=this.endedItem=null)}else this.waitingItem=this.updateItem(this.waitingItem),this.endedItem=this.updateItem(this.endedItem);const O=this.bufferingItem;if(O){const F=this.updateItem(O,this.bufferedPos);this.itemsMatch(O,F)?this.bufferingItem=F:O.event&&(this.bufferingItem=this.playingItem,this.clearInterstitial(O.event,null))}if(n.forEach(F=>{F.assetList.forEach(H=>{this.clearAssetPlayer(H.identifier,null)})}),b||r){if(this.hls.trigger(p.INTERSTITIALS_UPDATED,{events:l.slice(0),schedule:d.slice(0),durations:c,removedIds:g}),this.isInterstitial(s)&&g.includes(s.event.identifier)){this.warn(`Interstitial "${s.event.identifier}" removed while playing`),this.primaryFallback(s.event);return}this.checkBuffer()}},this.hls=e,this.HlsPlayerClass=t,this.assetListLoader=new Gu(e),this.schedule=new Wu(this.onScheduleUpdate,e.logger),this.registerListeners()}registerListeners(){const e=this.hls;e.on(p.MEDIA_ATTACHING,this.onMediaAttaching,this),e.on(p.MEDIA_ATTACHED,this.onMediaAttached,this),e.on(p.MEDIA_DETACHING,this.onMediaDetaching,this),e.on(p.MANIFEST_LOADING,this.onManifestLoading,this),e.on(p.LEVEL_UPDATED,this.onLevelUpdated,this),e.on(p.AUDIO_TRACK_SWITCHING,this.onAudioTrackSwitching,this),e.on(p.AUDIO_TRACK_UPDATED,this.onAudioTrackUpdated,this),e.on(p.SUBTITLE_TRACK_SWITCH,this.onSubtitleTrackSwitch,this),e.on(p.SUBTITLE_TRACK_UPDATED,this.onSubtitleTrackUpdated,this),e.on(p.EVENT_CUE_ENTER,this.onInterstitialCueEnter,this),e.on(p.ASSET_LIST_LOADED,this.onAssetListLoaded,this),e.on(p.BUFFER_APPENDED,this.onBufferAppended,this),e.on(p.BUFFER_FLUSHED,this.onBufferFlushed,this),e.on(p.BUFFERED_TO_END,this.onBufferedToEnd,this),e.on(p.MEDIA_ENDED,this.onMediaEnded,this),e.on(p.ERROR,this.onError,this),e.on(p.DESTROYING,this.onDestroying,this)}unregisterListeners(){const e=this.hls;e&&(e.off(p.MEDIA_ATTACHING,this.onMediaAttaching,this),e.off(p.MEDIA_ATTACHED,this.onMediaAttached,this),e.off(p.MEDIA_DETACHING,this.onMediaDetaching,this),e.off(p.MANIFEST_LOADING,this.onManifestLoading,this),e.off(p.LEVEL_UPDATED,this.onLevelUpdated,this),e.off(p.AUDIO_TRACK_SWITCHING,this.onAudioTrackSwitching,this),e.off(p.AUDIO_TRACK_UPDATED,this.onAudioTrackUpdated,this),e.off(p.SUBTITLE_TRACK_SWITCH,this.onSubtitleTrackSwitch,this),e.off(p.SUBTITLE_TRACK_UPDATED,this.onSubtitleTrackUpdated,this),e.off(p.EVENT_CUE_ENTER,this.onInterstitialCueEnter,this),e.off(p.ASSET_LIST_LOADED,this.onAssetListLoaded,this),e.off(p.BUFFER_CODECS,this.onBufferCodecs,this),e.off(p.BUFFER_APPENDED,this.onBufferAppended,this),e.off(p.BUFFER_FLUSHED,this.onBufferFlushed,this),e.off(p.BUFFERED_TO_END,this.onBufferedToEnd,this),e.off(p.MEDIA_ENDED,this.onMediaEnded,this),e.off(p.ERROR,this.onError,this),e.off(p.DESTROYING,this.onDestroying,this))}startLoad(){this.resumeBuffering()}stopLoad(){this.pauseBuffering()}resumeBuffering(){var e;(e=this.getBufferingPlayer())==null||e.resumeBuffering()}pauseBuffering(){var e;(e=this.getBufferingPlayer())==null||e.pauseBuffering()}destroy(){this.unregisterListeners(),this.stopLoad(),this.assetListLoader&&this.assetListLoader.destroy(),this.emptyPlayerQueue(),this.clearScheduleState(),this.schedule&&this.schedule.destroy(),this.media=this.detachedData=this.mediaSelection=this.requiredTracks=this.altSelection=this.manager=null,this.hls=this.HlsPlayerClass=this.schedule=this.log=null,this.assetListLoader=null,this.onPlay=this.onPause=this.onSeeking=this.onTimeupdate=null,this.onScheduleUpdate=null}onDestroying(){const e=this.primaryMedia||this.media;e&&this.removeMediaListeners(e)}removeMediaListeners(e){us(e,"play",this.onPlay),us(e,"pause",this.onPause),us(e,"seeking",this.onSeeking),us(e,"timeupdate",this.onTimeupdate)}onMediaAttaching(e,t){const n=this.media=t.media;_s(n,"seeking",this.onSeeking),_s(n,"timeupdate",this.onTimeupdate),_s(n,"play",this.onPlay),_s(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.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.playingAsset=this.endedAsset=this.bufferingAsset=this.bufferingItem=this.waitingItem=this.detachedData=null,i.detachMedia()),this.shouldPlay=!1}}get interstitialsManager(){if(!this.manager){if(!this.hls)return null;const e=this,t=()=>e.bufferingItem||e.waitingItem,n=b=>b&&e.getAssetPlayer(b.identifier),r=(b,O,F,H,we)=>{if(b){let Ee=b[O].start;const Ke=b.event;if(Ke){if(O==="playout"||Ke.timelineOccupancy!==ao.Point){const it=n(F);(it==null?void 0:it.interstitial)===Ke&&(Ee+=it.assetItem.startOffset+it[we])}}else{const it=H==="bufferedPos"?s():e[H];Ee+=it-b.start}return Ee}return 0},i=(b,O)=>{if(b!==0&&O!=="primary"&&e.schedule.length){var F;const H=e.schedule.findItemIndexAtTime(b),we=(F=e.schedule.items)==null?void 0:F[H];if(we){const Ee=we[O].start-we.start;return b+Ee}}return b},s=()=>{const b=e.bufferedPos;return b===Number.MAX_VALUE?l("primary"):Math.max(b,0)},l=b=>{var O;return(O=e.primaryDetails)!=null&&O.live?e.primaryDetails.edge:e.schedule.durations[b]},d=(b,O)=>{var F,H;const we=e.effectivePlayingItem;if(we!=null&&(F=we.event)!=null&&F.restrictions.skip)return;e.log(`seek to ${b} "${O}"`);const Ee=e.effectivePlayingItem,Ke=e.schedule.findItemIndexAtTime(b,O),it=(H=e.schedule.items)==null?void 0:H[Ke],Ye=e.getBufferingPlayer(),St=Ye==null?void 0:Ye.interstitial,Tt=St==null?void 0:St.appendInPlace,Jt=Ee&&e.itemsMatch(Ee,it);if(Ee&&(Tt||Jt)){const zt=n(e.playingAsset),rn=(zt==null?void 0:zt.media)||e.primaryMedia;if(rn){const kt=O==="primary"?rn.currentTime:r(Ee,O,e.playingAsset,"timelinePos","currentTime"),Rn=b-kt,Gn=(Tt?kt:rn.currentTime)+Rn;if(Gn>=0&&(!zt||Tt||Gn<=zt.duration)){rn.currentTime=Gn;return}}}if(it){let zt=b;if(O!=="primary"){const kt=it[O].start,Rn=b-kt;zt=it.start+Rn}const rn=!e.isInterstitial(it);if((!e.isInterstitial(Ee)||Ee.event.appendInPlace)&&(rn||it.event.appendInPlace)){const kt=e.media||(Tt?Ye==null?void 0:Ye.media:null);kt&&(kt.currentTime=zt)}else if(Ee){const kt=e.findItemIndex(Ee);if(Ke>kt){const Gn=e.schedule.findJumpRestrictedIndex(kt+1,Ke);if(Gn>kt){e.setSchedulePosition(Gn);return}}let Rn=0;if(rn)e.timelinePos=zt,e.checkBuffer();else{var Ct;const Gn=it==null||(Ct=it.event)==null?void 0:Ct.assetList;if(Gn){const Fr=b-(it[O]||it).start;for(let yr=Gn.length;yr--;){const fr=Gn[yr];if(fr.duration&&Fr>=fr.startOffset&&Fr<fr.startOffset+fr.duration){Rn=yr;break}}}}e.setSchedulePosition(Ke,Rn)}}},c=()=>{const b=e.effectivePlayingItem;if(e.isInterstitial(b))return b;const O=t();return e.isInterstitial(O)?O:null},g={get currentTime(){const b=c(),O=e.effectivePlayingItem;return O&&O===b?r(O,"playout",e.effectivePlayingAsset,"timelinePos","currentTime")-O.playout.start:0},set currentTime(b){const O=c(),F=e.effectivePlayingItem;F&&F===O&&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 O=(b=c())==null?void 0:b.event.assetList;return O?O.map(F=>e.getAssetPlayer(F.identifier)):[]},get playingIndex(){var b;const O=(b=c())==null?void 0:b.event;return O&&e.effectivePlayingAsset?O.findAssetIndex(e.effectivePlayingAsset):-1},get scheduleItem(){return c()}};this.manager={get events(){var b,O;return((b=e.schedule)==null||(O=b.events)==null?void 0:O.slice(0))||[]},get schedule(){var b,O;return((b=e.schedule)==null||(O=b.items)==null?void 0:O.slice(0))||[]},get interstitialPlayer(){return c()?g: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,O=b==null?void 0:b.event;if(O&&!O.restrictions.skip){const F=e.findItemIndex(b);if(O.appendInPlace){const H=b.playout.start+b.event.duration;d(H+.001,"playout")}else e.advanceAfterAssetEnded(O,F,1/0)}}}}return this.manager}get effectivePlayingItem(){return this.waitingItem||this.playingItem||this.endedItem}get effectivePlayingAsset(){return this.playingAsset||this.endedAsset}get playingLastItem(){var e;const t=this.playingItem,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,n;if(this.mediaSelection===null)return;const r=this.waitingItem||this.playingItem;if(this.isInterstitial(r)&&!r.event.appendInPlace)return;let i=this.media;!i&&(e=this.bufferingItem)!=null&&(t=e.event)!=null&&t.appendInPlace&&(i=this.primaryMedia);const s=(n=i)==null?void 0:n.currentTime;if(!(s===void 0||!L(s)))return s}get primaryMedia(){var e;return this.media||((e=this.detachedData)==null?void 0:e.media)||null}isInterstitial(e){return!!(e!=null&&e.event)}retreiveMediaSource(e,t){const 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} ${Wt(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 g;if(s.media)d&&(i=s.transferMedia(),this.detachedData=i),g="Primary";else if(c){const F=this.getBufferingPlayer();F?(i=F.transferMedia(),g=`${F}`):g="detached MediaSource"}else g="detached media";if(!i){if(c)i=this.detachedData,this.log(`using detachedData: MediaSource ${Wt(i)}`);else if(!this.detachedData||s.media===t){const F=this.playerQueue;F.length>1&&F.forEach(H=>{if(l&&H.interstitial.appendInPlace!==d){const we=H.interstitial;this.clearInterstitial(H.interstitial,null),we.appendInPlace=!1,we.appendInPlace&&this.warn(`Could not change append strategy for queued assets ${we}`)}}),this.hls.detachMedia(),this.detachedData={media:t}}}const b=i&&"mediaSource"in i&&((r=i.mediaSource)==null?void 0:r.readyState)!=="closed",O=b&&i?i:t;if(this.log(`${b?"transfering MediaSource":"attaching media"} to ${l?e:"Primary"} from ${g}`),O===i){const F=l&&e.assetId===this.schedule.assetIdAtEnd;O.overrides={duration:this.schedule.duration,endOfStream:!l||F,cueRemoval:!l}}e.attachMedia(O)}onInterstitialCueEnter(){this.onTimeupdate()}checkStart(){const e=this.schedule,t=e.events;if(!t||this.playbackDisabled||!this.media)return;this.bufferedPos===-1&&(this.bufferedPos=0);const n=this.timelinePos,r=this.effectivePlayingItem;if(n===-1){const i=this.hls.startPosition;if(this.timelinePos=i,t.length&&t[0].cue.pre){const s=e.findEventIndex(t[0].identifier);this.setSchedulePosition(s)}else if(i>=0||!this.primaryLive){const s=this.timelinePos=i>0?i:0,l=e.findItemIndexAtTime(s);this.setSchedulePosition(l)}}else if(r&&!this.playingItem){const i=e.findItemIndex(r);this.setSchedulePosition(i)}}advanceAfterAssetEnded(e,t,n){const r=n+1;if(!e.isAssetPastPlayoutLimit(r)&&!e.assetList[r].error)this.setSchedulePosition(t,r);else{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.timelinePos=d,this.checkBuffer()),this.setSchedulePosition(s)}}}setScheduleToAssetAtTime(e,t){const n=this.schedule,r=t.parentIdentifier,i=n.getEvent(r);if(i){const s=n.findEventIndex(r),l=n.findAssetIndex(i,e);this.setSchedulePosition(s,l)}}setSchedulePosition(e,t){const n=this.schedule.items;if(!n||this.playbackDisabled)return;this.log(`setSchedulePosition ${e}, ${t}`);const r=e>=0?n[e]:null,i=this.playingItem,s=this.playingLastItem;if(this.isInterstitial(i)){var l;const c=i.event,g=this.playingAsset,b=g==null?void 0:g.identifier,O=b?this.getAssetPlayer(b):null;if(O&&b&&(!this.eventItemsMatch(i,r)||t!==void 0&&b!==((l=c.assetList)==null?void 0:l[t].identifier))){var d;const F=c.findAssetIndex(g);this.log(`INTERSTITIAL_ASSET_ENDED ${F+1}/${c.assetList.length} ${No(g)}`),this.endedAsset=g,this.playingAsset=null,this.hls.trigger(p.INTERSTITIAL_ASSET_ENDED,{asset:g,assetListIndex:F,event:c,schedule:n.slice(0),scheduleIndex:e,player:O}),this.retreiveMediaSource(b,r),O.media&&!((d=this.detachedData)!=null&&d.mediaSource)&&O.detachMedia()}if(!this.eventItemsMatch(i,r)&&(this.endedItem=i,this.playingItem=null,this.log(`INTERSTITIAL_ENDED ${c} ${Is(i)}`),c.hasPlayed=!0,this.hls.trigger(p.INTERSTITIAL_ENDED,{event:c,schedule:n.slice(0),scheduleIndex:e}),c.cue.once)){this.updateSchedule();const F=this.schedule.items;if(r&&F){const H=this.schedule.findItemIndex(r);this.advanceSchedule(H,F,t,i,s)}return}}this.advanceSchedule(e,n,t,i,s)}advanceSchedule(e,t,n,r,i){const s=e>=0?t[e]:null,l=this.primaryMedia,d=this.playerQueue;if(d.length&&d.forEach(c=>{const g=c.interstitial,b=this.schedule.findEventIndex(g.identifier);(b<e||b>e+1)&&this.clearInterstitial(g,s)}),this.isInterstitial(s)){this.timelinePos=Math.min(Math.max(this.timelinePos,s.start),s.end);const c=s.event;n===void 0&&(n=this.schedule.findAssetIndex(c,this.timelinePos));const g=this.waitingItem;this.assetsBuffered(s,l)||this.setBufferingItem(s);let b=this.preloadAssets(c,n);if(this.eventItemsMatch(s,g||r)||(this.waitingItem=s,this.log(`INTERSTITIAL_STARTED ${Is(s)} ${c.appendInPlace?"append in place":""}`),this.hls.trigger(p.INTERSTITIAL_STARTED,{event:c,schedule:t.slice(0),scheduleIndex:e})),!c.assetListLoaded){this.log(`Waiting for ASSET-LIST to complete loading ${c}`);return}if(c.assetListLoader&&(c.assetListLoader.destroy(),c.assetListLoader=void 0),!l){this.log(`Waiting for attachMedia to start Interstitial ${c}`);return}this.waitingItem=this.endedItem=null,this.playingItem=s;const O=c.assetList[n];if(!O){const F=t[e+1],H=this.media;F&&H&&!this.isInterstitial(F)&&H.currentTime<F.start&&(H.currentTime=this.timelinePos=F.start),this.advanceAfterAssetEnded(c,e,n||0);return}if(b||(b=this.getAssetPlayer(O.identifier)),b===null||b.destroyed){const F=c.assetList.length;this.warn(`asset ${n+1}/${F} player destroyed ${c}`),b=this.createAssetPlayer(c,O,n)}if(!this.eventItemsMatch(s,this.bufferingItem)&&c.appendInPlace&&this.isAssetBuffered(O))return;this.startAssetPlayer(b,n,t,e,l),this.shouldPlay&&ml(b.media)}else s!==null?(this.resumePrimary(s,e,r),this.shouldPlay&&ml(this.hls.media)):i&&this.isInterstitial(r)&&(this.endedItem=null,this.playingItem=r,r.event.appendInPlace||this.attachPrimary(this.schedule.durations.primary,null))}get playbackDisabled(){return this.hls.config.enableInterstitialPlayback===!1}get primaryDetails(){var e,t;return(e=this.mediaSelection)==null||(t=e.main)==null?void 0:t.details}get primaryLive(){var e;return!!((e=this.primaryDetails)!=null&&e.live)}resumePrimary(e,t,n){var r;if(this.playingItem=e,this.playingAsset=this.endedAsset=null,this.waitingItem=this.endedItem=null,this.bufferedToItem(e),this.log(`resuming ${Is(e)}`),!((r=this.detachedData)!=null&&r.mediaSource)){let s=this.timelinePos;(s<e.start||s>=e.end)&&(s=this.getPrimaryResumption(e,t),this.timelinePos=s),this.attachPrimary(s,e)}if(!n)return;const i=this.schedule.items;i&&(this.log(`resumed ${Is(e)}`),this.hls.trigger(p.INTERSTITIALS_PRIMARY_RESUMED,{schedule:i.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:qn.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.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(){this.stopLoad(),this.schedule.reset(),this.emptyPlayerQueue(),this.clearScheduleState(),this.shouldPlay=!1,this.bufferedPos=this.timelinePos=-1,this.mediaSelection=this.altSelection=this.manager=this.requiredTracks=null,this.hls.off(p.BUFFER_CODECS,this.onBufferCodecs,this),this.hls.on(p.BUFFER_CODECS,this.onBufferCodecs,this)}onLevelUpdated(e,t){if(t.level===-1)return;const n=this.hls.levels[t.level],r=S(S({},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=S(S({},this.altSelection),{},{audio:n});return}const i=S(S({},r),{},{audio:n});this.mediaSelection=i}onSubtitleTrackUpdated(e,t){const n=this.hls.subtitleTracks[t.id],r=this.mediaSelection;if(!r){this.altSelection=S(S({},this.altSelection),{},{subtitles:n});return}const i=S(S({},r),{},{subtitles:n});this.mediaSelection=i}onAudioTrackSwitching(e,t){const n=rt(t);this.playerQueue.forEach(r=>r.hls.setAudioOption(t)||r.hls.setAudioOption(n))}onSubtitleTrackSwitch(e,t){const n=rt(t);this.playerQueue.forEach(r=>r.hls.setSubtitleOption(t)||t.id!==-1&&r.hls.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){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){const n=this.schedule.items;if(e&&n){const r=this.findItemIndex(e,t);return n[r]||null}return null}itemsMatch(e,t){return!!t&&(e===t||e.event&&t.event&&this.eventItemsMatch(e,t)||!e.event&&!t.event&&this.findItemIndex(e)===this.findItemIndex(t))}eventItemsMatch(e,t){var n;return!!t&&(e===t||e.event.identifier===((n=t.event)==null?void 0:n.identifier))}findItemIndex(e,t){return e?this.schedule.findItemIndex(e,t):-1}updateSchedule(){const e=this.mediaSelection;e&&this.schedule.updateSchedule(e,[])}checkBuffer(e){const t=this.schedule.items;if(!t)return;const n=qn.bufferInfo(this.primaryMedia,this.timelinePos,0);e&&(this.bufferedPos=this.timelinePos),e||(e=n.len<1),this.updateBufferedPos(n.end,t,e)}updateBufferedPos(e,t,n){const r=this.schedule,i=this.bufferingItem;if(this.bufferedPos>e)return;if(t.length===1&&this.itemsMatch(t[0],i)){this.bufferedPos=e;return}const s=this.playingItem,l=this.findItemIndex(s);let d=r.findItemIndexAtTime(e);if(this.bufferedPos<e){var c,g;const b=this.findItemIndex(i),O=Math.min(b+1,t.length-1),F=t[O];if((d===-1&&i&&e>=i.end||(c=F.event)!=null&&c.appendInPlace&&e+.01>=F.start)&&(d=O),O-l>1&&(i==null||(g=i.event)==null?void 0:g.appendInPlace)===!1)return;if(this.bufferedPos=e,d>b&&d>l)this.bufferedToItem(F);else{const H=this.primaryDetails;this.primaryLive&&H&&e>H.edge-H.targetduration&&F.start<H.edge+this.hls.config.interstitialLiveLookAhead&&this.isInterstitial(F)&&this.preloadAssets(F.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))this.bufferingItem!==e&&(this.bufferingItem=e);else{const{items:r,events:i}=n;if(!r||!i)return t;const s=this.isInterstitial(e),l=this.getBufferingPlayer();if(this.bufferingItem=e,this.bufferedPos=Math.max(e.start,Math.min(e.end,this.timelinePos)),!this.playbackDisabled){const d=l?l.remaining:t?t.end-this.timelinePos:0;this.log(`buffered to boundary ${Is(e)}`+(t?` (${d.toFixed(2)} remaining)`:"")),s?e.event.assetList.forEach(c=>{const g=this.getAssetPlayer(c.identifier);g&&g.resumeBuffering()}):(this.hls.resumeBuffering(),this.playerQueue.forEach(c=>c.pauseBuffering()))}this.hls.trigger(p.INTERSTITIALS_BUFFERED_TO_BOUNDARY,{events:i.slice(0),schedule:r.slice(0),bufferingIndex:this.findItemIndex(e),playingIndex:this.findItemIndex(this.playingItem)})}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=n.assetList[t],d=this.primaryMedia;l&&d&&this.bufferAssetPlayer(s,d)}}}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 O=this.playingItem;!this.isInterstitial(O)&&(O==null||(l=O.nextEvent)==null?void 0:l.identifier)===e.identifier&&this.flushFrontBuffer(d+.25)}let c,g=0;if(!this.playingItem&&this.primaryLive&&(g=this.hls.startPosition,g===-1&&(g=this.hls.liveSyncPosition||0)),g&&!(e.cue.pre||e.cue.post)){const O=g-d;O>0&&(c=Math.round(O*1e3)/1e3)}if(this.log(`Load interstitial asset ${t+1}/${n?1:r} ${e}${c?` live-start: ${g} 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 d=t;d<r;d++){const c=e.assetList[d],g=this.getAssetPlayerQueueIndex(c.identifier);(g===-1||this.playerQueue[g].destroyed)&&!c.error&&this.createAssetPlayer(e,c,d)}return this.getAssetPlayer(e.assetList[t].identifier)}return null}flushFrontBuffer(e){const t=this.requiredTracks;if(!t)return;this.log(`Removing front buffer starting at ${e}`),Object.keys(t).forEach(r=>{this.hls.trigger(p.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:Ku(e,s,t),duration:i,startOffset:n,timelineStart:r,uri:s};return this.createAssetPlayer(e,l,t)}createAssetPlayer(e,t,n){this.log(`create HLSAssetPlayer for ${No(t)}`);const r=this.hls,i=r.userConfig;let s=i.videoPreference;const l=r.loadLevelObj||r.levels[r.currentLevel];(s||l)&&(s=v({},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 g=0;if(this.primaryLive||e.appendInPlace){const Ye=this.timelinePos-t.timelineStart;if(Ye>1){const St=t.duration;St&&Ye<St&&(g=Ye)}}const b=t.identifier,O=S(S({},i),{},{autoStartLoad:!0,startFragPrefetch:!0,primarySessionId:r.sessionId,assetPlayerId:b,abrEwmaDefaultEstimate:r.bandwidthEstimate,interstitialsController:void 0,startPosition:g,liveDurationInfinity:!1,testBandwidth:!1,videoPreference:s,audioPreference:d||i.audioPreference,subtitlePreference:c||i.subtitlePreference});e.appendInPlace&&(e.appendInPlaceStarted=!0,t.timelineStart&&(O.timelineOffset=t.timelineStart));const F=O.cmcd;F!=null&&F.sessionId&&F.contentId&&(O.cmcd=v({},F,{contentId:Ia(t.uri)})),this.getAssetPlayer(b)&&this.warn(`Duplicate date range identifier ${e} and asset ${b}`);const H=new Zu(this.HlsPlayerClass,O,e,t);this.playerQueue.push(H),e.assetList[n]=t;const we=Ye=>{if(Ye.live){const Jt=new Error(`Interstitials MUST be VOD assets ${e}`),Ct={fatal:!0,type:_e.OTHER_ERROR,details:A.INTERSTITIAL_ASSET_ITEM_ERROR,error:Jt};this.handleAssetItemError(Ct,e,this.schedule.findEventIndex(e.identifier),n,Jt.message);return}const St=Ye.edge-Ye.fragmentStart,Tt=t.duration;(Tt===null||St>Tt)&&(this.log(`Interstitial asset "${b}" duration change ${Tt} > ${St}`),t.duration=St,this.updateSchedule())};H.on(p.LEVEL_UPDATED,(Ye,{details:St})=>we(St)),H.on(p.LEVEL_PTS_UPDATED,(Ye,{details:St})=>we(St));const Ee=(Ye,St)=>{const Tt=this.getAssetPlayer(b);if(Tt&&St.tracks){Tt.off(p.BUFFER_CODECS,Ee),Tt.tracks=St.tracks;const Jt=this.primaryMedia;this.bufferingAsset===Tt.assetItem&&Jt&&!Tt.media&&this.bufferAssetPlayer(Tt,Jt)}};H.on(p.BUFFER_CODECS,Ee);const Ke=()=>{var Ye;const St=this.getAssetPlayer(b);if(this.log(`buffered to end of asset ${St}`),!St)return;const Tt=this.schedule.findEventIndex(e.identifier),Jt=e.findAssetIndex(t),Ct=Jt+1,zt=(Ye=this.schedule.items)==null?void 0:Ye[Tt];if(this.isInterstitial(zt))if(Jt!==-1&&!e.isAssetPastPlayoutLimit(Ct)&&!e.assetList[Ct].error)this.bufferedToItem(zt,Ct);else{var rn;const kt=(rn=this.schedule.items)==null?void 0:rn[Tt+1];kt&&this.bufferedToItem(kt)}};H.on(p.BUFFERED_TO_END,Ke);const it=Ye=>()=>{if(!this.getAssetPlayer(b))return;this.shouldPlay=!0;const Tt=this.schedule.findEventIndex(e.identifier);this.advanceAfterAssetEnded(e,Tt,Ye)};return H.once(p.MEDIA_ENDED,it(n)),H.once(p.PLAYOUT_LIMIT_REACHED,it(1/0)),H.on(p.ERROR,(Ye,St)=>{const Tt=this.getAssetPlayer(b);if(St.details===A.BUFFER_STALLED_ERROR){if(Tt!=null&&Tt.media){const Jt=Tt.currentTime,Ct=Tt.duration-Jt;Jt&&e.appendInPlace&&Ct/Tt.media.playbackRate<.5?(this.log(`Advancing buffer past end of asset ${b} ${e} at ${Tt.media.currentTime}`),Ke()):(this.warn(`Stalled at ${Jt} of ${Jt+Ct} in asset ${b} ${e}`),this.onTimeupdate(),this.checkBuffer(!0))}return}this.handleAssetItemError(St,e,this.schedule.findEventIndex(e.identifier),n,`Asset player error ${St.error} ${e}`)}),H.on(p.DESTROYING,()=>{if(!this.getAssetPlayer(b))return;const St=new Error(`Asset player destroyed unexpectedly ${b}`),Tt={fatal:!0,type:_e.OTHER_ERROR,details:A.INTERSTITIAL_ASSET_ITEM_ERROR,error:St};this.handleAssetItemError(Tt,e,this.schedule.findEventIndex(e.identifier),n,St.message)}),this.hls.trigger(p.INTERSTITIAL_ASSET_PLAYER_CREATED,{asset:t,assetListIndex:n,event:e,player:H}),H}clearInterstitial(e,t){e.assetList.forEach(n=>{this.clearAssetPlayer(n.identifier,t)}),e.reset()}clearAssetPlayer(e,t){const n=this.getAssetPlayerQueueIndex(e);if(n!==-1){this.log(`clearAssetPlayer "${e}" toSegment: ${t&&Is(t)}`);const r=this.playerQueue[n];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,g=this.playingAsset;this.endedAsset=null,this.playingAsset=l,(!g||g.identifier!==d)&&(g&&(this.clearAssetPlayer(g.identifier,n[r]),delete g.error),this.log(`INTERSTITIAL_ASSET_STARTED ${t+1}/${c} ${e}`),this.hls.trigger(p.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;const{interstitial:i,assetItem:s,assetId:l}=e,d=this.schedule.findEventIndex(i.identifier),c=(n=this.schedule.items)==null?void 0:n[d];if(!c)return;this.setBufferingItem(c),this.bufferingAsset=s;const g=this.getBufferingPlayer();if(g===e)return;const b=i.appendInPlace;if(b&&(g==null?void 0:g.interstitial.appendInPlace)===!1)return;const O=(g==null?void 0:g.tracks)||((r=this.detachedData)==null?void 0:r.tracks)||this.requiredTracks;if(b&&s!==this.playingAsset){if(!e.tracks)return;if(O&&!Le(O,e.tracks)){const F=new Error(`Asset "${l}" SourceBuffer tracks ('${Object.keys(e.tracks)}') are not compatible with primary content tracks ('${Object.keys(O)}')`),H={fatal:!0,type:_e.OTHER_ERROR,details:A.INTERSTITIAL_ASSET_ITEM_ERROR,error:F},we=i.findAssetIndex(s);this.handleAssetItemError(H,i,d,we,F.message);return}}this.transferMediaTo(e,t)}handleAssetItemError(e,t,n,r,i){if(e.details===A.BUFFER_STALLED_ERROR)return;const s=t.assetList[r]||null;let l=null;if(s){const b=this.getAssetPlayerQueueIndex(s.identifier);l=this.playerQueue[b]||null}const d=this.schedule.items,c=v({},e,{fatal:!1,errorAction:Mn(!0),asset:s,assetListIndex:r,event:t,schedule:d,scheduleIndex:n,player:l});if(this.warn(`Asset item error: ${e.error}`),this.hls.trigger(p.INTERSTITIAL_ASSET_ERROR,c),!e.fatal)return;const g=new Error(i);s&&(this.playingAsset!==s&&this.clearAssetPlayer(s.identifier,null),s.error=g),t.assetList.some(b=>!b.error)?t.appendInPlace&&(t.error=g):t.error=g,this.primaryFallback(t)}primaryFallback(e){const t=e.timelineStart,n=this.effectivePlayingItem;if(this.updateSchedule(),n){this.log(`Fallback to primary from event "${e.identifier}" start: ${t} pos: ${this.timelinePos} playing: ${n?Is(n):"<none>"} error: ${e.error}`),e.appendInPlace&&(this.attachPrimary(t,null),this.flushFrontBuffer(t));let r=this.timelinePos;r===-1&&(r=this.hls.startPosition);const i=this.updateItem(n,r);if(this.itemsMatch(n,i))this.clearInterstitial(e,null);else{const s=this.schedule.findItemIndexAtTime(r);this.setSchedulePosition(s)}}else this.checkStart()}onAssetListLoaded(e,t){var n;const r=t.event,i=r.identifier,s=t.assetListResponse.ASSETS;if(!this.schedule.hasEvent(i))return;const l=r.timelineStart,d=r.duration;let c=0;s.forEach((H,we)=>{const Ee=parseFloat(H.DURATION);this.createAsset(r,we,c,l+c,Ee,H.URI),c+=Ee}),r.duration=c,this.log(`Loaded asset-list with duration: ${c} (was: ${d}) ${r}`);const g=this.waitingItem,b=(g==null?void 0:g.event.identifier)===i;this.updateSchedule();const O=(n=this.bufferingItem)==null?void 0:n.event;if(b){var F;const H=this.schedule.findEventIndex(i),we=(F=this.schedule.items)==null?void 0:F[H];if(we){if(!this.playingItem&&this.timelinePos>we.end&&this.schedule.findItemIndexAtTime(this.timelinePos)!==H){r.error=new Error(`Interstitial no longer within playback range ${this.timelinePos} ${r}`),this.primaryFallback(r);return}this.setBufferingItem(we)}this.setSchedulePosition(H)}else if((O==null?void 0:O.identifier)===i&&O.appendInPlace){const H=r.assetList[0],we=this.getAssetPlayer(H.identifier),Ee=this.primaryMedia;H&&we&&Ee&&this.bufferAssetPlayer(we,Ee)}}onError(e,t){switch(t.details){case A.ASSET_LIST_PARSING_ERROR:case A.ASSET_LIST_LOAD_ERROR:case A.ASSET_LIST_LOAD_TIMEOUT:{const n=t.interstitial;n&&this.primaryFallback(n);break}case A.BUFFER_STALLED_ERROR:{this.onTimeupdate(),this.checkBuffer(!0);break}}}}const gl=500;class Yu extends Ss{constructor(e,t,n){super(e,t,n,"subtitle-stream-controller",fe.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(p.LEVEL_LOADED,this.onLevelLoaded,this),e.on(p.SUBTITLE_TRACKS_UPDATED,this.onSubtitleTracksUpdated,this),e.on(p.SUBTITLE_TRACK_SWITCH,this.onSubtitleTrackSwitch,this),e.on(p.SUBTITLE_TRACK_LOADED,this.onSubtitleTrackLoaded,this),e.on(p.SUBTITLE_FRAG_PROCESSED,this.onSubtitleFragProcessed,this),e.on(p.BUFFER_FLUSHING,this.onBufferFlushing,this)}unregisterListeners(){super.unregisterListeners();const{hls:e}=this;e.off(p.LEVEL_LOADED,this.onLevelLoaded,this),e.off(p.SUBTITLE_TRACKS_UPDATED,this.onSubtitleTracksUpdated,this),e.off(p.SUBTITLE_TRACK_SWITCH,this.onSubtitleTrackSwitch,this),e.off(p.SUBTITLE_TRACK_LOADED,this.onSubtitleTrackLoaded,this),e.off(p.SUBTITLE_FRAG_PROCESSED,this.onSubtitleFragProcessed,this),e.off(p.BUFFER_FLUSHING,this.onBufferFlushing,this)}startLoad(e,t){this.stopLoad(),this.state=cn.IDLE,this.setInterval(gl),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(me(n)&&(this.fragPrevious=n),this.state=cn.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,fe.SUBTITLE)}}onError(e,t){const n=t.frag;(n==null?void 0:n.type)===fe.SUBTITLE&&(t.details===A.FRAG_GAP&&this.fragmentTracker.fragBuffered(n,!0),this.fragCurrent&&this.fragCurrent.abortRequests(),this.state!==cn.STOPPED&&(this.state=cn.IDLE))}onSubtitleTracksUpdated(e,{subtitleTracks:t}){if(this.levels&&Jo(this.levels,t)){this.levels=t.map(n=>new hn(n));return}this.tracksBuffered=[],this.levels=t.map(n=>{const r=new hn(n);return this.tracksBuffered[r.id]=[],r}),this.fragmentTracker.removeFragmentsInRange(0,Number.POSITIVE_INFINITY,fe.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!==cn.STOPPED&&this.setInterval(gl)}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){const b=this.mainDetails;if(s.deltaUpdateFailed||!b)return;const O=b.fragments[0];if(!d.details)s.hasProgramDateTime&&b.hasProgramDateTime?(si(s,b),c=s.fragmentStart):O&&(c=O.start,Ps(s,c));else{var g;c=this.alignPlaylists(s,d.details,(g=this.levelLastLoaded)==null?void 0:g.details),c===0&&O&&(c=O.start,Ps(s,c))}}d.details=s,this.levelLastLoaded=d,l===r&&(this.hls.trigger(p.SUBTITLE_TRACK_UPDATED,{details:s,id:l,groupId:t.groupId}),this.tick(),s.live&&!this.fragCurrent&&this.media&&this.state===cn.IDLE&&(dn(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,Sn(r.method)).catch(l=>{throw i.trigger(p.ERROR,{type:_e.MEDIA_ERROR,details:A.FRAG_DECRYPT_ERROR,fatal:!1,error:l,reason:l.message,frag:t}),l}).then(l=>{const d=performance.now();i.trigger(p.FRAG_DECRYPTED,{frag:t,payload:l,stats:{tstart:s,tdecrypt:d}})}).catch(l=>{this.warn(`${l.name}: ${l.message}`),this.state=cn.IDLE})}}doTick(){if(!this.media){this.state=cn.IDLE;return}if(this.state===cn.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=qn.bufferedInfo(this.tracksBuffered[this.currentTrackId]||[],i,r.maxBufferHole),{end:l,len:d}=s,c=n.details,g=this.hls.maxBufferLength+c.levelTargetDuration;if(d>g)return;const b=c.fragments,O=b.length,F=c.edge;let H=null;const we=this.fragPrevious;if(l<F){const it=r.maxFragLookUpTolerance,Ye=l>F-it?0:it;H=dn(we,b,Math.max(b[0].start,l),Ye),!H&&we&&we.start<b[0].start&&(H=b[0])}else H=b[O-1];if(H=this.filterReplacedPrimary(H,n.details),!H)return;const Ee=H.sn-c.startSN,Ke=b[Ee-1];if(Ke&&Ke.cc===H.cc&&this.fragmentTracker.getState(Ke)===Tn.NOT_LOADED&&(H=Ke),this.fragmentTracker.getState(H)===Tn.NOT_LOADED){const it=this.mapToInitFragWhenRequired(H);it&&this.loadFragment(it,n,l)}}}loadFragment(e,t,n){me(e)?super.loadFragment(e,t,n):this._loadInitSegment(e,t)}get mediaBufferTimeRanges(){return new Xu(this.tracksBuffered[this.currentTrackId]||[])}}class Xu{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 Qu={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},vl=a=>String.fromCharCode(Qu[a]||a),ns=15,bs=100,Ju={17:1,18:3,21:5,22:7,23:9,16:11,19:12,20:14},qu={17:2,18:4,21:6,22:8,23:10,19:13,20:15},ec={25:1,26:3,29:5,30:7,31:9,24:11,27:12,28:14},tc={25:2,26:4,29:6,30:8,31:10,27:13,28:15},nc=["white","green","blue","cyan","red","yellow","magenta","black","transparent"];class rc{constructor(){this.time=null,this.verboseLevel=0}log(e,t){if(this.verboseLevel>=e){const n=typeof t=="function"?t():t;$.log(`${this.time} [${e}] ${n}`)}}}const Hs=function(e){const t=[];for(let n=0;n<e.length;n++)t.push(e[n].toString(16));return t};class yl{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 ic{constructor(){this.uchar=" ",this.penState=new yl}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 sc{constructor(e){this.chars=[],this.pos=0,this.currPenState=new yl,this.cueStartTime=null,this.logger=void 0;for(let t=0;t<bs;t++)this.chars.push(new ic);this.logger=e}equals(e){for(let t=0;t<bs;t++)if(!this.chars[t].equals(e.chars[t]))return!1;return!0}copy(e){for(let t=0;t<bs;t++)this.chars[t].copy(e.chars[t])}isEmpty(){let e=!0;for(let t=0;t<bs;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>bs&&(this.logger.log(3,"Too large cursor position "+this.pos),this.pos=bs)}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=vl(e);if(this.pos>=bs){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<bs;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<bs;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 Fo{constructor(e){this.rows=[],this.currRow=ns-1,this.nrRollUpRows=null,this.lastOutputScreen=null,this.logger=void 0;for(let t=0;t<ns;t++)this.rows.push(new sc(e));this.logger=e}reset(){for(let e=0;e<ns;e++)this.rows[e].clear();this.currRow=ns-1}equals(e){let t=!0;for(let n=0;n<ns;n++)if(!this.rows[n].equals(e.rows[n])){t=!1;break}return t}copy(e){for(let t=0;t<ns;t++)this.rows[t].copy(e.rows[t])}isEmpty(){let e=!0;for(let t=0;t<ns;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 = "+Wt(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<ns;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 = "+Wt(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<ns;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 _l{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 Fo(n),this.nonDisplayedMemory=new Fo(n),this.lastOutputScreen=new Fo(n),this.currRollUpRow=this.displayedMemory.rows[ns-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[ns-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: "+Wt(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 bl{constructor(e,t,n){this.channels=void 0,this.currentChannel=0,this.cmdHistory=oc(),this.logger=void 0;const r=this.logger=new rc;this.channels=[null,new _l(e,t,r),new _l(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,()=>"["+Hs([t[n],t[n+1]])+"] -> ("+Hs([r,i])+")");const d=this.cmdHistory;if(r>=16&&r<=31){if(ac(r,i,d)){oo(null,null,d),this.logger.log(3,()=>"Repeated command ("+Hs([r,i])+") is dropped");continue}oo(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 oo(null,null,d);if(!s&&(l=this.parseChars(r,i),l)){const g=this.currentChannel;g&&g>0?this.channels[g].insertChars(l):this.logger.log(2,"No channel found yet. TEXT-MODE?")}!s&&!l&&this.logger.log(2,()=>"Couldn't parse cleaned data "+Hs([r,i])+" orig: "+Hs([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 ("+Hs([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?Ju[e]:ec[e]:n=s===1?qu[e]:tc[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 '"+vl(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 = "+Hs(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=nc[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()}oo(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 oo(a,e,t){t.a=a,t.b=e}function ac(a,e,t){return t.a===a&&t.b===e}function oc(){return{a:null,b:null}}var Bo=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 g=arguments[c];for(const b in g)l[b]=g[b]}return l}function s(l,d,c){const g=this,b={enumerable:!0};g.hasBeenReset=!1;let O="",F=!1,H=l,we=d,Ee=c,Ke=null,it="",Ye=!0,St="auto",Tt="start",Jt=50,Ct="middle",zt=50,rn="middle";Object.defineProperty(g,"id",i({},b,{get:function(){return O},set:function(kt){O=""+kt}})),Object.defineProperty(g,"pauseOnExit",i({},b,{get:function(){return F},set:function(kt){F=!!kt}})),Object.defineProperty(g,"startTime",i({},b,{get:function(){return H},set:function(kt){if(typeof kt!="number")throw new TypeError("Start time must be set to a number.");H=kt,this.hasBeenReset=!0}})),Object.defineProperty(g,"endTime",i({},b,{get:function(){return we},set:function(kt){if(typeof kt!="number")throw new TypeError("End time must be set to a number.");we=kt,this.hasBeenReset=!0}})),Object.defineProperty(g,"text",i({},b,{get:function(){return Ee},set:function(kt){Ee=""+kt,this.hasBeenReset=!0}})),Object.defineProperty(g,"region",i({},b,{get:function(){return Ke},set:function(kt){Ke=kt,this.hasBeenReset=!0}})),Object.defineProperty(g,"vertical",i({},b,{get:function(){return it},set:function(kt){const Rn=n(kt);if(Rn===!1)throw new SyntaxError("An invalid or illegal string was specified.");it=Rn,this.hasBeenReset=!0}})),Object.defineProperty(g,"snapToLines",i({},b,{get:function(){return Ye},set:function(kt){Ye=!!kt,this.hasBeenReset=!0}})),Object.defineProperty(g,"line",i({},b,{get:function(){return St},set:function(kt){if(typeof kt!="number"&&kt!=="auto")throw new SyntaxError("An invalid number or illegal string was specified.");St=kt,this.hasBeenReset=!0}})),Object.defineProperty(g,"lineAlign",i({},b,{get:function(){return Tt},set:function(kt){const Rn=r(kt);if(!Rn)throw new SyntaxError("An invalid or illegal string was specified.");Tt=Rn,this.hasBeenReset=!0}})),Object.defineProperty(g,"position",i({},b,{get:function(){return Jt},set:function(kt){if(kt<0||kt>100)throw new Error("Position must be between 0 and 100.");Jt=kt,this.hasBeenReset=!0}})),Object.defineProperty(g,"positionAlign",i({},b,{get:function(){return Ct},set:function(kt){const Rn=r(kt);if(!Rn)throw new SyntaxError("An invalid or illegal string was specified.");Ct=Rn,this.hasBeenReset=!0}})),Object.defineProperty(g,"size",i({},b,{get:function(){return zt},set:function(kt){if(kt<0||kt>100)throw new Error("Size must be between 0 and 100.");zt=kt,this.hasBeenReset=!0}})),Object.defineProperty(g,"align",i({},b,{get:function(){return rn},set:function(kt){const Rn=r(kt);if(!Rn)throw new SyntaxError("An invalid or illegal string was specified.");rn=Rn,this.hasBeenReset=!0}})),g.displayState=void 0}return s.prototype.getCueAsHTML=function(){return self.WebVTT.convertCueToDOMTree(self,this.text)},s}();class lc{decode(e,t){if(!e)return"";if(typeof e!="string")throw new Error("Error - expected string data.");return decodeURIComponent(encodeURIComponent(e))}}function xl(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 uc{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 El(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 $o=new Bo(0,0,""),lo=$o.align==="middle"?"middle":"center";function cc(a,e,t){const n=a;function r(){const l=xl(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 uc;El(l,function(O,F){let H;switch(O){case"region":for(let we=t.length-1;we>=0;we--)if(t[we].id===F){c.set(O,t[we].region);break}break;case"vertical":c.alt(O,F,["rl","lr"]);break;case"line":H=F.split(","),c.integer(O,H[0]),c.percent(O,H[0])&&c.set("snapToLines",!1),c.alt(O,H[0],["auto"]),H.length===2&&c.alt("lineAlign",H[1],["start",lo,"end"]);break;case"position":H=F.split(","),c.percent(O,H[0]),H.length===2&&c.alt("positionAlign",H[1],["start",lo,"end","line-left","line-right","auto"]);break;case"size":c.percent(O,F);break;case"align":c.alt(O,F,["start",lo,"end","left","right"]);break}},/:/,/\s/),d.region=c.get("region",null),d.vertical=c.get("vertical","");let g=c.get("line","auto");g==="auto"&&$o.line===-1&&(g=-1),d.line=g,d.lineAlign=c.get("lineAlign","start"),d.snapToLines=c.get("snapToLines",!0),d.size=c.get("size",100),d.align=c.get("align",lo);let b=c.get("position","auto");b==="auto"&&$o.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 Sl(a){return a.replace(/<br(?: \/)?>/gi,`
`)}class dc{constructor(){this.state="INITIAL",this.buffer="",this.decoder=new lc,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=Sl(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){El(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 Bo(0,0,""),t.state="CUE",i.indexOf("-->")===-1){t.cue.id=i;continue}case"CUE":if(!t.cue){t.state="BADCUE";continue}try{cc(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 fc=/\r\n|\n\r|\n|\r/g,Uo=function(e,t,n=0){return e.slice(n,n+t.length)===t},hc=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(!L(t)||!L(n)||!L(r)||!L(i))throw Error(`Malformed X-TIMESTAMP-MAP: Local:${e}`);return t+=1e3*n,t+=60*1e3*r,t+=60*60*1e3*i,t};function zo(a,e,t){return Ia(a.toString())+Ia(e.toString())+Ia(t)}const pc=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 mc(a,e,t,n,r,i,s){const l=new dc,d=ye(new Uint8Array(a)).trim().replace(fc,`
`).split(`
`),c=[],g=e?Jr(e.baseTime,e.timescale):0;let b="00:00.000",O=0,F=0,H,we=!0;l.oncue=function(Ee){const Ke=t[n];let it=t.ccOffset;const Ye=(O-g)/9e4;if(Ke!=null&&Ke.new&&(F!==void 0?it=t.ccOffset=Ke.start:pc(t,n,Ye)),Ye){if(!e){H=new Error("Missing initPTS for VTT MPEGTS");return}it=Ye-t.presentationOffset}const St=Ee.endTime-Ee.startTime,Tt=gi((Ee.startTime+it-F)*9e4,r*9e4)/9e4;Ee.startTime=Math.max(Tt,0),Ee.endTime=Math.max(Tt+St,0);const Jt=Ee.text.trim();Ee.text=decodeURIComponent(encodeURIComponent(Jt)),Ee.id||(Ee.id=zo(Ee.startTime,Ee.endTime,Jt)),Ee.endTime>0&&c.push(Ee)},l.onparsingerror=function(Ee){H=Ee},l.onflush=function(){if(H){s(H);return}i(c)},d.forEach(Ee=>{if(we)if(Uo(Ee,"X-TIMESTAMP-MAP=")){we=!1,Ee.slice(16).split(",").forEach(Ke=>{Uo(Ke,"LOCAL:")?b=Ke.slice(6):Uo(Ke,"MPEGTS:")&&(O=parseInt(Ke.slice(7)))});try{F=hc(b)/1e3}catch(Ke){H=Ke}return}else Ee===""&&(we=!1);l.parse(Ee+`
`)}),l.flush()}const Ko="stpp.ttml.im1t",wl=/^(\d{2,}):(\d{2}):(\d{2}):(\d{2})\.?(\d+)?$/,Tl=/^(\d*(?:\.\d*)?)(h|m|s|ms|f|t)$/,gc={left:"start",center:"center",right:"end",start:"start",end:"end"};function Cl(a,e,t,n){const r=de(new Uint8Array(a),["mdat"]);if(r.length===0){n(new Error("Could not parse IMSC1 mdat"));return}const i=r.map(l=>ye(l)),s=Lr(e.baseTime,1,e.timescale);try{i.forEach(l=>t(vc(l,s)))}catch(l){n(l)}}function vc(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,O)=>(b[O]=r.getAttribute(`ttp:${O}`)||i[O],b),{}),l=r.getAttribute("xml:space")!=="preserve",d=Al(Ho(r,"styling","style")),c=Al(Ho(r,"layout","region")),g=Ho(r,"body","[begin]");return[].map.call(g,b=>{const O=Dl(b,l);if(!O||!b.hasAttribute("begin"))return null;const F=Zo(b.getAttribute("begin"),s),H=Zo(b.getAttribute("dur"),s);let we=Zo(b.getAttribute("end"),s);if(F===null)throw Il(b);if(we===null){if(H===null)throw Il(b);we=F+H}const Ee=new Bo(F-e,we-e,O);Ee.id=zo(Ee.startTime,Ee.endTime,Ee.text);const Ke=c[b.getAttribute("region")],it=d[b.getAttribute("style")],Ye=yc(Ke,it,d),{textAlign:St}=Ye;if(St){const Tt=gc[St];Tt&&(Ee.lineAlign=Tt),Ee.align=St}return v(Ee,Ye),Ee}).filter(b=>b!==null)}function Ho(a,e,t){const n=a.getElementsByTagName(e)[0];return n?[].slice.call(n.querySelectorAll(t)):[]}function Al(a){return a.reduce((e,t)=>{const n=t.getAttribute("xml:id");return n&&(e[n]=t),e},{})}function Dl(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?Dl(n,e):e?t+n.textContent.trim().replace(/\s+/g," "):t+n.textContent},"")}function yc(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=jo(e,n,d)||jo(a,n,d)||jo(r,n,d);return c&&(l[d]=c),l},{})}function jo(a,e,t){return a&&a.hasAttributeNS(e,t)?a.getAttributeNS(e,t):null}function Il(a){return new Error(`Could not parse ttml timestamp ${a}`)}function Zo(a,e){if(!a)return null;let t=xl(a);return t===null&&(wl.test(a)?t=_c(a,e):Tl.test(a)&&(t=bc(a,e))),t}function _c(a,e){const t=wl.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 bc(a,e){const t=Tl.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 uo{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 xc{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=Ol(),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(p.MEDIA_ATTACHING,this.onMediaAttaching,this),e.on(p.MEDIA_DETACHING,this.onMediaDetaching,this),e.on(p.MANIFEST_LOADING,this.onManifestLoading,this),e.on(p.MANIFEST_LOADED,this.onManifestLoaded,this),e.on(p.SUBTITLE_TRACKS_UPDATED,this.onSubtitleTracksUpdated,this),e.on(p.FRAG_LOADING,this.onFragLoading,this),e.on(p.FRAG_LOADED,this.onFragLoaded,this),e.on(p.FRAG_PARSING_USERDATA,this.onFragParsingUserdata,this),e.on(p.FRAG_DECRYPTED,this.onFragDecrypted,this),e.on(p.INIT_PTS_FOUND,this.onInitPtsFound,this),e.on(p.SUBTITLE_TRACKS_CLEARED,this.onSubtitleTracksCleared,this),e.on(p.BUFFER_FLUSHING,this.onBufferFlushing,this)}destroy(){const{hls:e}=this;e.off(p.MEDIA_ATTACHING,this.onMediaAttaching,this),e.off(p.MEDIA_DETACHING,this.onMediaDetaching,this),e.off(p.MANIFEST_LOADING,this.onManifestLoading,this),e.off(p.MANIFEST_LOADED,this.onManifestLoaded,this),e.off(p.SUBTITLE_TRACKS_UPDATED,this.onSubtitleTracksUpdated,this),e.off(p.FRAG_LOADING,this.onFragLoading,this),e.off(p.FRAG_LOADED,this.onFragLoaded,this),e.off(p.FRAG_PARSING_USERDATA,this.onFragParsingUserdata,this),e.off(p.FRAG_DECRYPTED,this.onFragDecrypted,this),e.off(p.INIT_PTS_FOUND,this.onInitPtsFound,this),e.off(p.SUBTITLE_TRACKS_CLEARED,this.onSubtitleTracksCleared,this),e.off(p.BUFFER_FLUSHING,this.onBufferFlushing,this),this.hls=this.config=this.media=null,this.cea608Parser1=this.cea608Parser2=void 0}initCea608Parsers(){const e=new uo(this,"textTrack1"),t=new uo(this,"textTrack2"),n=new uo(this,"textTrack3"),r=new uo(this,"textTrack4");this.cea608Parser1=new bl(1,e,t),this.cea608Parser2=new bl(3,n,r)}addCues(e,t,n,r,i){let s=!1;for(let l=i.length;l--;){const d=i[l],c=Ec(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(p.CUES_PARSED,{type:"captions",cues:l,track:e})}}onInitPtsFound(e,{frag:t,id:n,initPTS:r,timescale:i}){const{unparsedVttFrags:s}=this;n===fe.MAIN&&(this.initPTS[t.cc]={baseTime:r,timescale:i}),s.length&&(this.unparsedVttFrags=[],s.forEach(l=>{this.onFragLoaded(p.FRAG_LOADED,l)}))}getExistingTrack(e,t){const{media:n}=this;if(n)for(let r=0;r<n.textTracks.length;r++){const i=n.textTracks[r];if(Ll(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,ia(n[e]),dl(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(p.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=>{ia(r[i]),delete r[i]}),this.nonNativeCaptionsTracks={}}onManifestLoading(){this.lastCc=-1,this.lastSn=-1,this.lastPartIndex=-1,this.prevCC=-1,this.vttCCs=Ol(),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++)ia(t[n])}onSubtitleTracksUpdated(e,t){const n=t.subtitleTracks||[],r=n.some(i=>i.textCodec===Ko);if(this.config.enableWebVTT||r&&this.config.enableIMSC1){if(Jo(this.tracks,n)){this.tracks=n;return}if(this.textTracks=[],this.tracks=n,this.config.renderTextTracksNatively){const s=this.media,l=s?so(s.textTracks):null;if(this.tracks.forEach((d,c)=>{let g;if(l){let b=null;for(let O=0;O<l.length;O++)if(l[O]&&Ll(l[O],d)){b=l[O],l[O]=null;break}b&&(g=b)}if(g)ia(g);else{const b=Rl(d);g=this.createTextTrack(b,d.name,d.lang),g&&(g.mode="disabled")}g&&this.textTracks.push(g)}),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(p.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===fe.MAIN){var n,r;const{cea608Parser1:i,cea608Parser2:s,lastSn:l}=this,{cc:d,sn:c}=t.frag,g=(n=(r=t.part)==null?void 0:r.index)!=null?n:-1;i&&s&&(c!==l+1||c===l&&g!==this.lastPartIndex+1||d!==this.lastCc)&&(i.reset(),s.reset()),this.lastCc=d,this.lastSn=c,this.lastPartIndex=g}}onFragLoaded(e,t){const{frag:n,payload:r}=t;if(n.type===fe.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===Ko?this._parseIMSC1(n,r):this._parseVTTs(t)}}else this.hls.trigger(p.SUBTITLE_FRAG_PROCESSED,{success:!1,frag:n,error:new Error("Empty subtitle payload")})}_parseIMSC1(e,t){const n=this.hls;Cl(t,this.initPTS[e.cc],r=>{this._appendCues(r,e.level),n.trigger(p.SUBTITLE_FRAG_PROCESSED,{success:!0,frag:e})},r=>{n.logger.log(`Failed to parse IMSC1: ${r}`),n.trigger(p.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?Qe(n.initSegment.data,new Uint8Array(r)).buffer:r;mc(c,this.initPTS[n.cc],this.vttCCs,n.cc,n.start,g=>{this._appendCues(g,n.level),d.trigger(p.SUBTITLE_FRAG_PROCESSED,{success:!0,frag:n})},g=>{const b=g.message==="Missing initPTS for VTT MPEGTS";b?s.push(e):this._fallbackToIMSC1(n,r),d.logger.log(`Failed to parse VTT cue: ${g}`),!(b&&l>n.cc)&&d.trigger(p.SUBTITLE_FRAG_PROCESSED,{success:!1,frag:n,error:g})})}_fallbackToIMSC1(e,t){const n=this.tracks[e.level];n.textCodec||Cl(t,this.initPTS[e.cc],()=>{n.textCodec=Ko,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=>fl(r,i))}else{const r=this.tracks[t];if(!r)return;const i=r.default?"default":"subtitles"+t;n.trigger(p.CUES_PARSED,{type:"subtitles",cues:e,track:i})}}onFragDecrypted(e,t){const{frag:n}=t;n.type===fe.SUBTITLE&&this.onFragLoaded(p.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===fe.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=>ko(l[d],t,n))}if(this.config.renderTextTracksNatively&&t===0&&r!==void 0){const{textTracks:l}=this;Object.keys(l).forEach(d=>ko(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 g=3&s;(g===0||g===1)&&(t[g].push(l),t[g].push(d))}}return t}}function Rl(a){return a.characteristics&&/transcribes-spoken-dialog/gi.test(a.characteristics)&&/describes-music-and-sound/gi.test(a.characteristics)?"captions":"subtitles"}function Ll(a,e){return!!a&&a.kind===Rl(e)&&Do(e,a)}function Ec(a,e,t,n){return Math.min(e,n)-Math.max(a,t)}function Ol(){return{ccOffset:0,presentationOffset:0,0:{start:0,prevCC:-1,new:!0}}}const Sc=/\s/,wc={newCue(a,e,t,n){const r=[];let i,s,l,d,c;const g=self.VTTCue||self.TextTrackCue;for(let O=0;O<n.rows.length;O++)if(i=n.rows[O],l=!0,d=0,c="",!i.isEmpty()){var b;for(let we=0;we<i.chars.length;we++)Sc.test(i.chars[we].uchar)&&l?d++:(c+=i.chars[we].uchar,l=!1);i.cueStartTime=e,e===t&&(t+=1e-4),d>=16?d--:d++;const F=Sl(c.trim()),H=zo(e,t,F);a!=null&&(b=a.cues)!=null&&b.getCueById(H)||(s=new g(e,t,F),s.id=H,s.line=O+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((O,F)=>O.line==="auto"||F.line==="auto"?0:O.line>8&&F.line>8?F.line-O.line:O.line-F.line),r.forEach(O=>fl(a,O))),r}};function Tc(){if(self.fetch&&self.AbortController&&self.ReadableStream&&self.Request)try{return new self.ReadableStream({}),!0}catch(a){}return!1}const Cc=/(\d+)-(\d+)\/(\d+)/;class Pl{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||Rc,this.controller=new self.AbortController,this.stats=new y}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=Ac(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&&L(d)?d:c,this.requestTimeout=self.setTimeout(()=>{this.callbacks&&(this.abortInternal(),this.callbacks.onTimeout(r,e,this.response))},t.timeout),(Ks(this.request)?this.request.then(self.fetch):self.fetch(this.request)).then(b=>{var O;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:we,statusText:Ee}=b;throw new Lc(Ee||"fetch, bad network response",we,b)}r.loading.first=F,r.total=Ic(b.headers)||r.total;const H=(O=this.callbacks)==null?void 0:O.onProgress;return H&&L(t.highWaterMark)?this.loadProgressively(b,r,e,t.highWaterMark,H):s?b.arrayBuffer():e.responseType==="json"?b.json():b.text()}).then(b=>{var O,F;const H=this.response;if(!H)throw new Error("loader destroyed");self.clearTimeout(this.requestTimeout),r.loading.end=Math.max(self.performance.now(),r.loading.first);const we=b[l];we&&(r.loaded=r.total=we);const Ee={url:H.url,data:b,code:H.status},Ke=(O=this.callbacks)==null?void 0:O.onProgress;Ke&&!L(t.highWaterMark)&&Ke(r,e,b,H),(F=this.callbacks)==null||F.onSuccess(Ee,r,e,H)}).catch(b=>{var O;if(self.clearTimeout(this.requestTimeout),r.aborted)return;const F=b&&b.code||0,H=b?b.message:null;(O=this.callbacks)==null||O.onError({code:F,text:H},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 ws,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 g=c.value,b=g.length;return t.loaded+=b,b<r||s.dataLength?(s.push(g),s.dataLength>=r&&i(t,n,s.flush().buffer,e)):i(t,n,g.buffer,e),d()}).catch(()=>Promise.reject());return d()}}function Ac(a,e){const t={method:"GET",mode:"cors",credentials:"same-origin",signal:e,headers:new self.Headers(v({},a.headers))};return a.rangeEnd&&t.headers.set("Range","bytes="+a.rangeStart+"-"+String(a.rangeEnd-1)),t}function Dc(a){const e=Cc.exec(a);if(e)return parseInt(e[2])-parseInt(e[1])+1}function Ic(a){const e=a.get("Content-Range");if(e){const n=Dc(e);if(L(n))return n}const t=a.get("Content-Length");if(t)return parseInt(t)}function Rc(a,e){return new self.Request(a.url,e)}class Lc extends Error{constructor(e,t,n){super(e),this.code=void 0,this.details=void 0,this.code=t,this.details=n}}const Oc=/^age:\s*[\d.]+\s*$/im;class kl{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 y,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&&L(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,g=t.responseType==="text"?t.responseText:null;if(c>=200&&c<300){const H=g!=null?g:t.response;if(H!=null){var s,l;n.loading.end=Math.max(self.performance.now(),n.loading.first);const we=t.responseType==="arraybuffer"?H.byteLength:H.length;n.loaded=n.total=we,n.bwEstimate=n.total*8e3/(n.loading.end-n.loading.first);const Ee=(s=this.callbacks)==null?void 0:s.onProgress;Ee&&Ee(n,e,H,t);const Ke={url:t.responseURL,data:H,code:c};(l=this.callbacks)==null||l.onSuccess(Ke,n,e,t);return}}const b=i.loadPolicy.errorRetry,O=n.retry,F={url:e.url,data:void 0,code:c};if(ur(b,O,!1,F))this.retry(b);else{var d;$.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(ur(e,t,!0))this.retry(e);else{var n;$.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=Bn(e,n.retry),n.retry++,$.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&&Oc.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 Pc={maxTimeToFirstByteMs:8e3,maxLoadTimeMs:2e4,timeoutRetry:null,errorRetry:null},kc=S(S({autoStartLoad:!0,startPosition:-1,defaultAudioCodec:void 0,debug:!1,capLevelOnFPSDrop:!1,capLevelToPlayerSize:!1,ignoreDevicePixelRatio:!1,maxDevicePixelRatio:Number.POSITIVE_INFINITY,preferManagedMediaSource:!0,initialLiveManifestSize:1,maxBufferLength:30,backBufferLength:1/0,frontBufferFlushThreshold:1/0,maxBufferSize:60*1e3*1e3,maxFragLookUpTolerance:.25,maxBufferHole:.1,detectStallWithCurrentTimeMs:1250,highBufferWatchdogPeriod:2,nudgeOffset:.1,nudgeMaxRetry:3,nudgeOnVideoHole:!0,liveSyncDurationCount:3,liveSyncOnStallIncrease:1,liveMaxLatencyDurationCount:1/0,liveSyncDuration:void 0,liveMaxLatencyDuration:void 0,maxLiveSyncPlaybackRate:1,liveDurationInfinity:!1,liveBackBufferLength:null,maxMaxBufferLength:600,enableWorker:!0,workerPath:null,enableSoftwareAES:!0,startLevel:void 0,startFragPrefetch:!1,fpsDroppedMonitoringPeriod:5e3,fpsDroppedMonitoringThreshold:.2,appendErrorMaxRetry:3,ignorePlaylistParsingErrors:!1,loader:kl,fLoader:void 0,pLoader:void 0,xhrSetup:void 0,licenseXhrSetup:void 0,licenseResponseCallback:void 0,abrController:In,bufferController:eu,capLevelController:Ro,errorController:mn,fpsController:Bu,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:ir,testBandwidth:!0,progressive:!1,lowLatencyMode:!0,cmcd:void 0,enableDateRangeMetadataCues:!0,enableEmsgMetadataCues:!0,enableEmsgKLVMetadata:!1,enableID3MetadataCues:!0,enableInterstitialPlayback:!0,interstitialAppendInPlace:!0,interstitialLiveLookAhead:10,useMediaCapabilities:!0,certLoadPolicy:{default:Pc},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},Mc()),{},{subtitleStreamController:Yu,subtitleTrackController:zu,timelineController:xc,audioStreamController:ta,audioTrackController:Ql,emeController:ra,cmcdController:Mu,contentSteeringController:Fu,interstitialsController:Vu});function Mc(){return{cueHandler:wc,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 Nc(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=Wo(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(g=>{const b=`${s}Loading${g}`,O=e[b];if(O!==void 0&&d){c.push(b);const F=n[l].default;switch(e[l]={default:F},g){case"TimeOut":F.maxLoadTimeMs=O,F.maxTimeToFirstByteMs=O;break;case"MaxRetry":F.errorRetry.maxNumRetry=O,F.timeoutRetry.maxNumRetry=O;break;case"RetryDelay":F.errorRetry.retryDelayMs=O,F.timeoutRetry.retryDelayMs=O;break;case"MaxRetryTimeout":F.errorRetry.maxRetryDelayMs=O,F.timeoutRetry.maxRetryDelayMs=O;break}}}),c.length&&t.warn(`hls.js config: "${c.join('", "')}" setting(s) are deprecated, use "${l}": ${Wt(e[l])}`)}),S(S({},n),e)}function Wo(a){return a&&typeof a=="object"?Array.isArray(a)?a.map(Wo):Object.keys(a).reduce((e,t)=>(e[t]=Wo(a[t]),e),{}):a}function Fc(a,e){const t=a.loader;t!==Pl&&t!==kl?(e.log("[config]: Custom loader detected, cannot enable progressive streaming"),a.progressive=!1):Tc()&&(a.loader=Pl,a.progressive=!0,a.enableSoftwareAES=!0,e.log("[config]: Progressive streaming enabled, using FetchLoader"))}const co=2,Bc=.1,$c=.05,Uc=100;class zc extends wr{constructor(e,t){super("gap-controller",e.logger),this.hls=null,this.fragmentTracker=null,this.media=null,this.mediaSource=void 0,this.nudgeRetry=0,this.stallReported=!1,this.stalled=null,this.moved=!1,this.seeking=!1,this.buffered={},this.lastCurrentTime=0,this.ended=0,this.waiting=0,this.onMediaPlaying=()=>{this.ended=0,this.waiting=0},this.onMediaWaiting=()=>{var 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(p.MEDIA_ENDED,{stalled:!1})}},this.hls=e,this.fragmentTracker=t,this.registerListeners()}registerListeners(){const{hls:e}=this;e&&(e.on(p.MEDIA_ATTACHED,this.onMediaAttached,this),e.on(p.MEDIA_DETACHING,this.onMediaDetaching,this),e.on(p.BUFFER_APPENDED,this.onBufferAppended,this))}unregisterListeners(){const{hls:e}=this;e&&(e.off(p.MEDIA_ATTACHED,this.onMediaAttached,this),e.off(p.MEDIA_DETACHING,this.onMediaDetaching,this),e.off(p.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(Uc),this.mediaSource=t.mediaSource;const n=this.media=t.media;_s(n,"playing",this.onMediaPlaying),_s(n,"waiting",this.onMediaWaiting),_s(n,"ended",this.onMediaEnded)}onMediaDetaching(e,t){this.clearInterval();const{media:n}=this;n&&(us(n,"playing",this.onMediaPlaying),us(n,"waiting",this.onMediaWaiting),us(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{media:s,stalled:l}=this;if(!s)return;const{seeking:d}=s,c=this.seeking&&!d,g=!this.seeking&&d,b=s.paused&&!d||s.ended||s.playbackRate===0;if(this.seeking=d,e!==t){t&&(this.ended=0),this.moved=!0,d||(this.nudgeRetry=0,i.nudgeOnVideoHole&&!b&&e>t&&this.nudgeOnVideoHole(e,t)),this.waiting===0&&this.stallResolved(e);return}if(g||c){c&&this.stallResolved(e);return}if(b){this.nudgeRetry=0,this.stallResolved(e),!this.ended&&s.ended&&this.hls&&(this.ended=e||1,this.hls.trigger(p.MEDIA_ENDED,{stalled:!1}));return}if(!qn.getBuffered(s).length){this.nudgeRetry=0;return}const O=qn.bufferInfo(s,e,0),F=O.nextStart||0,H=this.fragmentTracker;if(d&&H&&this.hls){const Jt=Ml(this.hls.inFlightFragments,e),Ct=O.len>co,zt=!F||Jt||F-e>co&&!H.getPartialFragment(e);if(Ct||zt)return;this.moved=!1}const we=(r=this.hls)==null?void 0:r.latestLevelDetails;if(!this.moved&&this.stalled!==null&&H){if(!(O.len>0)&&!F)return;const Ct=Math.max(F,O.start||0)-e,rn=!!(we!=null&&we.live)?we.targetduration*2:co,kt=H.getPartialFragment(e);if(Ct>0&&(Ct<=rn||kt)){s.paused||this._trySkipBufferHole(kt);return}}const Ee=i.detectStallWithCurrentTimeMs,Ke=self.performance.now(),it=this.waiting;if(l===null){it>0&&Ke-it<Ee?this.stalled=it:this.stalled=Ke;return}const Ye=Ke-l;if(!d&&(Ye>=Ee||it)&&this.hls){var St;if(((St=this.mediaSource)==null?void 0:St.readyState)==="ended"&&!(we!=null&&we.live)&&Math.abs(e-((we==null?void 0:we.edge)||0))<1){if(this.ended)return;this.ended=e||1,this.hls.trigger(p.MEDIA_ENDED,{stalled:!0});return}if(this._reportStall(O),!this.media||!this.hls)return}const Tt=qn.bufferInfo(s,e,i.maxBufferHole);this._tryFixBufferStall(Tt,Ye)}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(p.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=qn.bufferedInfo(qn.timeRangesToArray(this.buffered.audio),e,0);if(i.len>1&&t>=i.start){const s=qn.timeRangesToArray(r),l=qn.bufferedInfo(s,t,0).bufferedIndex;if(l>-1&&l<s.length-1){const d=qn.bufferedInfo(s,e,0).bufferedIndex,c=s[l].end,g=s[l+1].start;if((d===-1||d>l)&&g-c<1&&e-c<2){const b=new Error(`nudging playhead to flush pipeline after video hole. currentTime: ${e} hole: ${c} -> ${g} buffered index: ${d}`);this.warn(b.message),this.media.currentTime+=1e-6;const O=this.fragmentTracker.getPartialFragment(e)||void 0,F=qn.bufferInfo(this.media,e,0);this.hls.trigger(p.ERROR,{type:_e.MEDIA_ERROR,details:A.BUFFER_SEEK_OVER_HOLE,fatal:!1,error:b,reason:b.message,frag:O,buffer:F.len,bufferInfo:F})}}}}}_tryFixBufferStall(e,t){var n,r;const{fragmentTracker:i,media:s}=this,l=(n=this.hls)==null?void 0:n.config;if(!s||!i||!l)return;const d=s.currentTime,c=(r=this.hls)==null?void 0:r.latestLevelDetails,g=i.getPartialFragment(d);if((g||c!=null&&c.live&&d<c.fragmentStart)&&(this._trySkipBufferHole(g)||!this.media))return;const b=e.buffered;(b&&b.length>1&&e.len>l.maxBufferHole||e.nextStart&&e.nextStart-d<l.maxBufferHole)&&(t>l.highBufferWatchdogPeriod*1e3||this.waiting)&&(this.warn("Trying to nudge playhead over buffer-hole"),this._tryNudgeBuffer(e))}_reportStall(e){const{hls:t,media: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 (${Wt(e)})`);this.warn(s.message),t.trigger(p.ERROR,{type:_e.MEDIA_ERROR,details:A.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=qn.bufferInfo(r,s,0),d=s<l.start?l.start:l.nextStart;if(d&&this.hls){const g=l.len<=i.maxBufferHole,b=l.len>0&&l.len<1&&r.readyState<3,O=d-s;if(O>0&&(g||b)){if(O>i.maxBufferHole){let H=!1;if(s===0){const we=n.getAppendedFrag(0,fe.MAIN);we&&d<we.end&&(H=!0)}if(!H){const we=e||n.getAppendedFrag(s,fe.MAIN);if(we){var c;if(!((c=this.hls.loadLevelObj)!=null&&c.details)||Ml(this.hls.inFlightFragments,d))return 0;let Ke=!1,it=we.end;for(;it<d;){const Ye=n.getPartialFragment(it);if(Ye)it+=Ye.duration;else{Ke=!0;break}}if(Ke)return 0}}}const F=Math.max(d+$c,s+Bc);if(this.warn(`skipping hole, adjusting currentTime from ${s} to ${F}`),this.moved=!0,r.currentTime=F,!(e!=null&&e.gap)){const H=new Error(`fragment loaded with buffer holes, seeking from ${s} to ${F}`);this.hls.trigger(p.ERROR,{type:_e.MEDIA_ERROR,details:A.BUFFER_SEEK_OVER_HOLE,fatal:!1,error:H,reason:H.message,frag:e||void 0,buffer:l.len,bufferInfo:l})}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(p.ERROR,{type:_e.MEDIA_ERROR,details:A.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(p.ERROR,{type:_e.MEDIA_ERROR,details:A.BUFFER_STALLED_ERROR,error:l,fatal:!0,buffer:e.len,bufferInfo:e})}}}function Ml(a,e){const t=Nl(a.main);if(t&&t.start<=e)return t;const n=Nl(a.audio);return n&&n.start<=e?n:null}function Nl(a){if(!a)return null;switch(a.state){case cn.IDLE:case cn.STOPPED:case cn.ENDED:case cn.ERROR:return null}return a.frag}const Kc=.25;function Go(){if(typeof self!="undefined")return self.VTTCue||self.TextTrackCue}function Fl(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,Wt(r?S({type:r},n):n))}return i}const fo=(()=>{const a=Go();try{a&&new a(0,Number.POSITIVE_INFINITY,"")}catch(e){return Number.MAX_VALUE}return Number.POSITIVE_INFINITY})();function Hc(a){return Uint8Array.from(a.replace(/^0x/,"").replace(/([\da-fA-F]{2}) ?/g,"0x$1 ").replace(/ +$/,"").split(" ")).buffer}class jc{constructor(e){this.hls=void 0,this.id3Track=null,this.media=null,this.dateRangeCuesAppended={},this.removeCues=!0,this.onEventCueEnter=()=>{this.hls&&this.hls.trigger(p.EVENT_CUE_ENTER,{})},this.hls=e,this._registerListeners()}destroy(){this._unregisterListeners(),this.id3Track=null,this.media=null,this.dateRangeCuesAppended={},this.hls=this.onEventCueEnter=null}_registerListeners(){const{hls:e}=this;e.on(p.MEDIA_ATTACHING,this.onMediaAttaching,this),e.on(p.MEDIA_ATTACHED,this.onMediaAttached,this),e.on(p.MEDIA_DETACHING,this.onMediaDetaching,this),e.on(p.MANIFEST_LOADING,this.onManifestLoading,this),e.on(p.FRAG_PARSING_METADATA,this.onFragParsingMetadata,this),e.on(p.BUFFER_FLUSHING,this.onBufferFlushing,this),e.on(p.LEVEL_UPDATED,this.onLevelUpdated,this),e.on(p.LEVEL_PTS_UPDATED,this.onLevelPtsUpdated,this)}_unregisterListeners(){const{hls:e}=this;e.off(p.MEDIA_ATTACHING,this.onMediaAttaching,this),e.off(p.MEDIA_ATTACHED,this.onMediaAttached,this),e.off(p.MEDIA_DETACHING,this.onMediaDetaching,this),e.off(p.MANIFEST_LOADING,this.onManifestLoading,this),e.off(p.FRAG_PARSING_METADATA,this.onFragParsingMetadata,this),e.off(p.BUFFER_FLUSHING,this.onBufferFlushing,this),e.off(p.LEVEL_UPDATED,this.onLevelUpdated,this),e.off(p.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(){const e=this.hls.latestLevelDetails;e&&this.updateDateRangeCues(e)}onMediaDetaching(e,t){this.media=null,!t.transferMedia&&(this.id3Track&&(this.removeCues&&ia(this.id3Track,this.onEventCueEnter),this.id3Track=null),this.dateRangeCuesAppended={})}onManifestLoading(){this.dateRangeCuesAppended={}}createTrack(e){const t=this.getID3Track(e.textTracks);return t.mode="hidden",t}getID3Track(e){if(this.media){for(let t=0;t<e.length;t++){const n=e[t];if(n.kind==="metadata"&&n.label==="id3")return dl(n,this.media),n}return this.media.addTextTrack("metadata","id3")}}onFragParsingMetadata(e,t){if(!this.media)return;const{hls:{config:{enableEmsgMetadataCues:n,enableID3MetadataCues:r}}}=this;if(!n&&!r)return;const{samples:i}=t;this.id3Track||(this.id3Track=this.createTrack(this.media));const s=Go();if(s)for(let l=0;l<i.length;l++){const d=i[l].type;if(d===ze.emsg&&!n||!r)continue;const c=pa(i[l].data);if(c){const g=i[l].pts;let b=g+i[l].duration;b>fo&&(b=fo),b-g<=0&&(b=g+Kc);for(let F=0;F<c.length;F++){const H=c[F];if(!Ya(H)){this.updateId3CueEnds(g,d);const we=Fl(s,g,b,H,d);we&&this.id3Track.addCue(we)}}}}}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===fo&&(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=g=>g.type===ze.audioId3&&d:r==="video"?c=g=>g.type===ze.emsg&&l:c=g=>g.type===ze.audioId3&&d||g.type===ze.emsg&&l,ko(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.media||!e.hasProgramDateTime||!this.hls.config.enableDateRangeMetadataCues)return;const{id3Track:n}=this,{dateRanges:r}=e,i=Object.keys(r);let s=this.dateRangeCuesAppended;if(n&&t){var l;if((l=n.cues)!=null&&l.length){const g=Object.keys(s).filter(b=>!i.includes(b));for(let b=g.length;b--;){const O=g[b],F=s[O].cues;delete s[O],Object.keys(F).forEach(H=>{try{const we=F[H];we.removeEventListener("enter",this.onEventCueEnter),n.removeCue(we)}catch(we){}})}}else s=this.dateRangeCuesAppended={}}const d=e.fragments[e.fragments.length-1];if(i.length===0||!L(d==null?void 0:d.programDateTime))return;this.id3Track||(this.id3Track=this.createTrack(this.media));const c=Go();for(let g=0;g<i.length;g++){const b=i[g],O=r[b],F=O.startTime,H=s[b],we=(H==null?void 0:H.cues)||{};let Ee=(H==null?void 0:H.durationKnown)||!1,Ke=fo;const{duration:it,endDate:Ye}=O;if(Ye&&it!==null)Ke=F+it,Ee=!0;else if(O.endOnNext&&!Ee){const Tt=i.reduce((Jt,Ct)=>{if(Ct!==O.id){const zt=r[Ct];if(zt.class===O.class&&zt.startDate>O.startDate&&(!Jt||O.startDate<Jt.startDate))return zt}return Jt},null);Tt&&(Ke=Tt.startTime,Ee=!0)}const St=Object.keys(O.attr);for(let Tt=0;Tt<St.length;Tt++){const Jt=St[Tt];if(!Er(Jt))continue;const Ct=we[Jt];if(Ct)Ee&&!H.durationKnown?Ct.endTime=Ke:Math.abs(Ct.startTime-F)>.01&&(Ct.startTime=F,Ct.endTime=Ke);else if(c){let zt=O.attr[Jt];qt(Jt)&&(zt=Hc(zt));const kt=Fl(c,F,Ke,{key:Jt,data:zt},ze.dateRange);kt&&(kt.id=b,this.id3Track.addCue(kt),we[Jt]=kt,this.hls.config.interstitialsController&&(Jt==="X-ASSET-LIST"||Jt==="X-ASSET-URL")&&kt.addEventListener("enter",this.onEventCueEnter))}}s[b]={cues:we,dateRange:O,durationKnown:Ee}}}}class Zc{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)),O=Math.round(2/(1+Math.exp(-.75*d-this.edgeStalled))*20)/20,F=Math.min(b,Math.max(1,O));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 g=r;return c+Math.min(this.stallCount*this.config.liveSyncOnStallIncrease,g)}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(p.MEDIA_ATTACHED,this.onMediaAttached,this),e.on(p.MEDIA_DETACHING,this.onMediaDetaching,this),e.on(p.MANIFEST_LOADING,this.onManifestLoading,this),e.on(p.LEVEL_UPDATED,this.onLevelUpdated,this),e.on(p.ERROR,this.onError,this))}unregisterListeners(){const{hls:e}=this;e&&(e.off(p.MEDIA_ATTACHED,this.onMediaAttached,this),e.off(p.MEDIA_DETACHING,this.onMediaDetaching,this),e.off(p.MANIFEST_LOADING,this.onManifestLoading,this),e.off(p.LEVEL_UPDATED,this.onLevelUpdated,this),e.off(p.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===A.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 Wc extends Ao{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(p.MANIFEST_LOADING,this.onManifestLoading,this),e.on(p.MANIFEST_LOADED,this.onManifestLoaded,this),e.on(p.LEVEL_LOADED,this.onLevelLoaded,this),e.on(p.LEVELS_UPDATED,this.onLevelsUpdated,this),e.on(p.FRAG_BUFFERED,this.onFragBuffered,this),e.on(p.ERROR,this.onError,this)}_unregisterListeners(){const{hls:e}=this;e.off(p.MANIFEST_LOADING,this.onManifestLoading,this),e.off(p.MANIFEST_LOADED,this.onManifestLoaded,this),e.off(p.LEVEL_LOADED,this.onLevelLoaded,this),e.off(p.LEVELS_UPDATED,this.onLevelsUpdated,this),e.off(p.FRAG_BUFFERED,this.onFragBuffered,this),e.off(p.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(g=>{var b;const O=g.attrs;let{audioCodec:F,videoCodec:H}=g;F&&(g.audioCodec=F=Ce(F,n)||void 0),((b=H)==null?void 0:b.indexOf("avc1"))===0&&(H=g.videoCodec=an(H));const{width:we,height:Ee,unknownCodecs:Ke}=g;let it=Ke?Ke.length:0;if(Ke)for(let Rn=it;Rn--;){const Gn=Ke[Rn];this.isAudioSupported(Gn)?(g.audioCodec=F=F?`${F},${Gn}`:Gn,it--,vn.audio[F.substring(0,4)]=2):this.isVideoSupported(Gn)&&(g.videoCodec=H=H?`${H},${Gn}`:Gn,it--,vn.video[H.substring(0,4)]=2)}if(l||(l=!!(we&&Ee)),d||(d=!!H),c||(c=!!F),it||F&&!this.isAudioSupported(F)||H&&!this.isVideoSupported(H)){this.log(`Some or all CODECS not supported "${O.CODECS}"`);return}const{CODECS:Ye,"FRAME-RATE":St,"HDCP-LEVEL":Tt,"PATHWAY-ID":Jt,RESOLUTION:Ct,"VIDEO-RANGE":zt}=O,kt=`${`${Jt||"."}-`}${g.bitrate}-${Ct}-${St}-${Ye}-${zt}-${Tt}`;if(i[kt])if(i[kt].uri!==g.url&&!g.attrs["PATHWAY-ID"]){const Rn=s[kt]+=1;g.attrs["PATHWAY-ID"]=new Array(Rn+1).join(".");const Gn=this.createLevel(g);i[kt]=Gn,r.push(Gn)}else i[kt].addGroupId("audio",O.AUDIO),i[kt].addGroupId("text",O.SUBTITLES);else{const Rn=this.createLevel(g);i[kt]=Rn,s[kt]=1,r.push(Rn)}}),this.filterAndSortMediaOptions(r,t,l,d,c)}createLevel(e){const t=new hn(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=bt(r,[])}return t}isAudioSupported(e){return He(e,"audio",this.hls.config.preferManagedMediaSource)}isVideoSupported(e){return He(e,"video",this.hls.config.preferManagedMediaSource)}filterAndSortMediaOptions(e,t,n,r,i){let s=[],l=[],d=e;if((n||r)&&i&&(d=d.filter(({videoCodec:Ee,videoRange:Ke,width:it,height:Ye})=>(!!Ee||!!(it&&Ye))&&Zt(Ke))),d.length===0){Promise.resolve().then(()=>{if(this.hls){let Ee="no level with compatible codecs found in manifest",Ke=Ee;t.levels.length&&(Ke=`one or more CODECS in variant not supported: ${Wt(t.levels.map(Ye=>Ye.attrs.CODECS).filter((Ye,St,Tt)=>Tt.indexOf(Ye)===St))}`,this.warn(Ke),Ee+=` (${Ke})`);const it=new Error(Ee);this.hls.trigger(p.ERROR,{type:_e.MEDIA_ERROR,details:A.MANIFEST_INCOMPATIBLE_CODECS_ERROR,fatal:!0,url:t.url,error:it,reason:Ke})}});return}t.audioTracks&&(s=t.audioTracks.filter(Ee=>!Ee.audioCodec||this.isAudioSupported(Ee.audioCodec)),Bl(s)),t.subtitles&&(l=t.subtitles,Bl(l));const c=d.slice(0);d.sort((Ee,Ke)=>{if(Ee.attrs["HDCP-LEVEL"]!==Ke.attrs["HDCP-LEVEL"])return(Ee.attrs["HDCP-LEVEL"]||"")>(Ke.attrs["HDCP-LEVEL"]||"")?1:-1;if(n&&Ee.height!==Ke.height)return Ee.height-Ke.height;if(Ee.frameRate!==Ke.frameRate)return Ee.frameRate-Ke.frameRate;if(Ee.videoRange!==Ke.videoRange)return Pt.indexOf(Ee.videoRange)-Pt.indexOf(Ke.videoRange);if(Ee.videoCodec!==Ke.videoCodec){const it=ie(Ee.videoCodec),Ye=ie(Ke.videoCodec);if(it!==Ye)return Ye-it}if(Ee.uri===Ke.uri&&Ee.codecSet!==Ke.codecSet){const it=xe(Ee.codecSet),Ye=xe(Ke.codecSet);if(it!==Ye)return Ye-it}return Ee.averageBitrate!==Ke.averageBitrate?Ee.averageBitrate-Ke.averageBitrate:0});let g=c[0];if(this.steering&&(d=this.steering.filterParsedLevels(d),d.length!==c.length)){for(let Ee=0;Ee<c.length;Ee++)if(c[Ee].pathwayId===d[0].pathwayId){g=c[Ee];break}}this._levels=d;for(let Ee=0;Ee<d.length;Ee++)if(d[Ee]===g){var b;this._firstLevel=Ee;const Ke=g.bitrate,it=this.hls.bandwidthEstimate;if(this.log(`manifest loaded, ${d.length} level(s) found, first bitrate: ${Ke}`),((b=this.hls.userConfig)==null?void 0:b.abrEwmaDefaultEstimate)===void 0){const Ye=Math.min(Ke,this.hls.config.abrEwmaDefaultEstimateMax);Ye>it&&it===this.hls.abrEwmaDefaultEstimate&&(this.hls.bandwidthEstimate=Ye)}break}const O=i&&!r,F=this.hls.config,H=!!(F.audioStreamController&&F.audioTrackController),we={levels:d,audioTracks:s,subtitleTracks:l,sessionData:t.sessionData,sessionKeys:t.sessionKeys,firstLevel:this._firstLevel,stats:t.stats,audio:i,video:r,altAudio:H&&!O&&s.some(Ee=>!!Ee.url)};this.hls.trigger(p.MANIFEST_PARSED,we)}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 g=new Error("invalid level idx"),b=e<0;if(this.hls.trigger(p.ERROR,{type:_e.OTHER_ERROR,details:A.LEVEL_SWITCH_ERROR,level:e,fatal:b,error:g,reason:g.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(p.LEVEL_SWITCHING,d);const c=s.details;if(!c||c.live){const g=this.switchParams(s.uri,r==null?void 0:r.details,c);this.loadPlaylist(g)}}get manualLevel(){return this.manualLevelIndex}set manualLevel(e){this.manualLevelIndex=e,this._startLevel===void 0&&(this._startLevel=e),e!==-1&&(this.level=e)}get firstLevel(){return this._firstLevel}set firstLevel(e){this._firstLevel=e}get startLevel(){if(this._startLevel===void 0){const e=this.hls.config.startLevel;return e!==void 0?e:this.hls.firstAutoLevel}return this._startLevel}set startLevel(e){this._startLevel=e}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===be.LEVEL&&t.context.level===this.level&&this.checkRetry(t)}onFragBuffered(e,{frag:t}){if(t!==void 0&&t.type===fe.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(p.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));Ms(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(p.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(p.MAX_AUTO_LEVEL_UPDATED,{autoLevelCapping:e,levels:this.levels,maxAutoLevel:t,minAutoLevel:this.hls.minAutoLevel,maxHdcpLevel:n}))}}function Bl(a){const e={};a.forEach(t=>{const n=t.groupId||"";t.id=e[n]=e[n]||0,e[n]++})}function $l(){return self.SourceBuffer||self.WebKitSourceBuffer}function Ul(){if(!ve())return!1;const e=$l();return!e||e.prototype&&typeof e.prototype.appendBuffer=="function"&&typeof e.prototype.remove=="function"}function Gc(){if(!Ul())return!1;const a=ve();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(he(e,"video")))||["mp4a.40.2","fLaC"].some(e=>a.isTypeSupported(he(e,"audio"))))}function Vc(){var a;const e=$l();return typeof(e==null||(a=e.prototype)==null?void 0:a.changeType)=="function"}const Yc=100;class Xc extends Ss{constructor(e,t,n){super(e,t,n,"stream-controller",fe.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||!L(i)||(this.log(`Media seeked to ${i.toFixed(3)}`),!this.getBufferedFrag(i)))return;const s=this.getFwdBufferInfoAtPos(r,i,fe.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(p.MANIFEST_PARSED,this.onManifestParsed,this),e.on(p.LEVEL_LOADING,this.onLevelLoading,this),e.on(p.LEVEL_LOADED,this.onLevelLoaded,this),e.on(p.FRAG_LOAD_EMERGENCY_ABORTED,this.onFragLoadEmergencyAborted,this),e.on(p.AUDIO_TRACK_SWITCHING,this.onAudioTrackSwitching,this),e.on(p.AUDIO_TRACK_SWITCHED,this.onAudioTrackSwitched,this),e.on(p.BUFFER_CREATED,this.onBufferCreated,this),e.on(p.BUFFER_FLUSHED,this.onBufferFlushed,this),e.on(p.LEVELS_UPDATED,this.onLevelsUpdated,this),e.on(p.FRAG_BUFFERED,this.onFragBuffered,this)}unregisterListeners(){super.unregisterListeners();const{hls:e}=this;e.off(p.MANIFEST_PARSED,this.onManifestParsed,this),e.off(p.LEVEL_LOADED,this.onLevelLoaded,this),e.off(p.FRAG_LOAD_EMERGENCY_ABORTED,this.onFragLoadEmergencyAborted,this),e.off(p.AUDIO_TRACK_SWITCHING,this.onAudioTrackSwitching,this),e.off(p.AUDIO_TRACK_SWITCHED,this.onAudioTrackSwitched,this),e.off(p.BUFFER_CREATED,this.onBufferCreated,this),e.off(p.BUFFER_FLUSHED,this.onBufferFlushed,this),e.off(p.LEVELS_UPDATED,this.onLevelsUpdated,this),e.off(p.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(Yc),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=cn.IDLE,this.nextLoadPosition=this.lastCurrentTime=e+this.timelineOffset,this.startPosition=t?-1:e,this.tick()}else this._forceStartLoad=!0,this.state=cn.STOPPED}stopLoad(){this._forceStartLoad=!1,super.stopLoad()}doTick(){switch(this.state){case cn.WAITING_LEVEL:{const{levels:t,level:n}=this,r=t==null?void 0:t[n],i=r==null?void 0:r.details;if(i&&(!i.live||this.levelLastLoaded===r&&!this.waitForLive(r))){if(this.waitForCdnTuneIn(i))break;this.state=cn.IDLE;break}else if(this.hls.nextLoadLevel!==this.level){this.state=cn.IDLE;break}break}case cn.FRAG_LOADING_WAITING_RETRY:{var e;const t=self.performance.now(),n=this.retryDate;if(!n||t>=n||(e=this.media)!=null&&e.seeking){const{levels:r,level:i}=this,s=r==null?void 0:r[i];this.resetStartWhenNotLoaded(s||null),this.state=cn.IDLE}}break}this.state===cn.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 we={};this.altAudio===2&&(we.type="video"),this.hls.trigger(p.BUFFER_EOS,we),this.state=cn.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===cn.WAITING_LEVEL||this.waitForLive(s)){this.level=i,this.state=cn.WAITING_LEVEL,this.startFragRequested=!1;return}const g=l.len,b=this.getMaxBufferLength(s.maxBitrate);if(g>=b)return;this.backtrackFragment&&this.backtrackFragment.start>l.end&&(this.backtrackFragment=null);const O=this.backtrackFragment?this.backtrackFragment.start:l.end;let F=this.getNextFragment(O,c);if(this.couldBacktrack&&!this.fragPrevious&&F&&me(F)&&this.fragmentTracker.getState(F)!==Tn.OK){var H;const Ee=((H=this.backtrackFragment)!=null?H:F).sn-c.startSN,Ke=c.fragments[Ee-1];Ke&&F.cc===Ke.cc&&(F=Ke,this.fragmentTracker.removeFragment(Ke))}else this.backtrackFragment&&l.len&&(this.backtrackFragment=null);if(F&&this.isLoopLoading(F,O)){if(!F.gap){const Ee=this.audioOnly&&!this.altAudio?E.AUDIO:E.VIDEO,Ke=(Ee===E.VIDEO?this.videoBuffer:this.mediaBuffer)||this.media;Ke&&this.afterBufferFlushed(Ke,Ee,fe.MAIN)}F=this.getNextFragmentLoopLoading(F,c,l,fe.MAIN,b)}F&&(F.initSegment&&!F.initSegment.data&&!this.bitrateTest&&(F=F.initSegment),this.loadFragment(F,s,O))}loadFragment(e,t,n){const r=this.fragmentTracker.getState(e);r===Tn.NOT_LOADED||r===Tn.PARTIAL?me(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,fe.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,g=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(g,Number.POSITIVE_INFINITY)}}}}abortCurrentFrag(){const e=this.fragCurrent;switch(this.fragCurrent=null,this.backtrackFragment=null,e&&(e.abortRequests(),this.fragmentTracker.removeFragment(e)),this.state){case cn.KEY_LOADING:case cn.FRAG_LOADING:case cn.FRAG_LOADING_WAITING_RETRY:case cn.PARSING:case cn.PARSED:this.state=cn.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;_s(n,"playing",this.onMediaPlaying),_s(n,"seeked",this.onMediaSeeked)}onMediaDetaching(e,t){const{media:n}=this;n&&(us(n,"playing",this.onMediaPlaying),us(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(p.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;t.levels.forEach(i=>{const s=i.audioCodec;s&&(n=n||s.indexOf("mp4a.40.2")!==-1,r=r||s.indexOf("mp4a.40.5")!==-1)}),this.audioCodecSwitch=n&&r&&!Vc(),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!==cn.IDLE)return;const r=t.levelInfo;(!r.details||r.details.live&&(this.levelLastLoaded!==r||r.details.expired)||this.waitForCdnTuneIn(r.details))&&(this.state=cn.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,g=this.fragCurrent;g&&(this.state===cn.FRAG_LOADING||this.state===cn.FRAG_LOADING_WAITING_RETRY)&&g.level!==t.level&&g.loader&&this.abortCurrentFrag();let b=0;if(l.live||(n=c.details)!=null&&n.live){var O;if(this.checkLiveUpdate(l),l.deltaUpdateFailed)return;b=this.alignPlaylists(l,c.details,(O=this.levelLastLoaded)==null?void 0:O.details)}if(c.details=l,this.levelLastLoaded=c,i||this.setStartPosition(l,b),this.hls.trigger(p.LEVEL_UPDATED,{details:l,level:s}),this.state===cn.WAITING_LEVEL){if(this.waitForCdnTuneIn(l))return;this.state=cn.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 c=t.liveMaxLatencyDuration!==void 0?t.liveMaxLatencyDuration:t.liveMaxLatencyDurationCount*e.targetduration;(!d&&n.readyState<4||i<l-c)&&(this._hasEnoughToStart||(this.nextLoadPosition=r),n.readyState&&(this.warn(`Playback: ${i.toFixed(3)} is located too far from the end of live sliding playlist: ${l}, reset currentTime to : ${r.toFixed(3)}`),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,g=d.PTSKnown||!d.live,b=(t=n.initSegment)==null?void 0:t.data,O=this._getAudioCodec(l),F=this.transmuxer=this.transmuxer||new Ta(this.hls,fe.MAIN,this._handleTransmuxComplete.bind(this),this._handleTransmuxerFlush.bind(this)),H=r?r.index:-1,we=H!==-1,Ee=new Nr(n.level,n.sn,n.stats.chunkCount,i.byteLength,H,we),Ke=this.initPTS[n.cc];F.push(i,b,O,c,n,r,d.totalduration,g,Ee,Ke)}onAudioTrackSwitching(e,t){const n=this.hls,r=this.altAudio===2;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.fragmentTracker.removeAllFragments(),n.once(p.BUFFER_FLUSHED,()=>{var s;(s=this.hls)==null||s.trigger(p.AUDIO_TRACK_SWITCHED,t)}),n.trigger(p.BUFFER_FLUSHING,{startOffset:0,endOffset:Number.POSITIVE_INFINITY,type:null});return}n.trigger(p.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===fe.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===cn.PARSED&&(this.state=cn.IDLE);return}const l=r?r.stats:n.stats;this.fragLastKbps=Math.round(8*l.total/(l.buffering.end-l.loading.first)),me(n)&&(this.fragPrevious=n),this.fragBufferedComplete(n,r)}const s=this.media;s&&(!this._hasEnoughToStart&&qn.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=cn.ERROR;return}switch(t.details){case A.FRAG_GAP:case A.FRAG_PARSING_ERROR:case A.FRAG_DECRYPT_ERROR:case A.FRAG_LOAD_ERROR:case A.FRAG_LOAD_TIMEOUT:case A.KEY_LOAD_ERROR:case A.KEY_LOAD_TIMEOUT:this.onFragmentOrKeyLoadError(fe.MAIN,t);break;case A.LEVEL_LOAD_ERROR:case A.LEVEL_LOAD_TIMEOUT:case A.LEVEL_PARSING_ERROR:!t.levelRetry&&this.state===cn.WAITING_LEVEL&&((n=t.context)==null?void 0:n.type)===be.LEVEL&&(this.state=cn.IDLE);break;case A.BUFFER_ADD_CODEC_ERROR:case A.BUFFER_APPEND_ERROR:if(t.parent!=="main")return;this.resetLoadingState();break;case A.BUFFER_FULL_ERROR:if(t.parent!=="main")return;this.reduceLengthAndFlushBuffer(t)&&this.flushMainBuffer(0,Number.POSITIVE_INFINITY);break;case A.INTERNAL_EXCEPTION:this.recoverWorkerError(t);break}}onFragLoadEmergencyAborted(){this.state=cn.IDLE,this._hasEnoughToStart||(this.startFragRequested=!1,this.nextLoadPosition=this.lastCurrentTime),this.tickImmediate()}onBufferFlushed(e,{type:t}){if(t!==E.AUDIO||!this.altAudio){const n=(t===E.VIDEO?this.videoBuffer:this.mediaBuffer)||this.media;n&&(this.afterBufferFlushed(n,t,fe.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=qn.getBuffered(e),l=s.length?s.start(0):0,d=l-n,c=Math.max(this.config.maxBufferHole,this.config.maxFragLookUpTolerance);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=cn.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(p.FRAG_LOADED,n),i.bitrateTest=!1})}_handleTransmuxComplete(e){var t;const n=this.playlistType,{hls:r}=this,{remuxResult:i,chunkMeta:s}=e,l=this.getCurrentContext(s);if(!l){this.resetWhenMissingContext(s);return}const{frag:d,part:c,level:g}=l,{video:b,text:O,id3:F,initSegment:H}=i,{details:we}=g,Ee=this.altAudio?void 0:i.audio;if(this.fragContextChanged(d)){this.fragmentTracker.removeFragment(d);return}if(this.state=cn.PARSING,H){if(H!=null&&H.tracks){const Ye=d.initSegment||d;this._bufferInitSegment(g,H.tracks,Ye,s),r.trigger(p.FRAG_PARSING_INIT_SEGMENT,{frag:Ye,id:n,tracks:H.tracks})}const Ke=H.initPTS,it=H.timescale;L(Ke)&&(this.initPTS[d.cc]={baseTime:Ke,timescale:it},r.trigger(p.INIT_PTS_FOUND,{frag:d,id:n,initPTS:Ke,timescale:it}))}if(b&&we){!Ee&&b.type==="audiovideo"&&this.logMuxedErr(d);const Ke=we.fragments[d.sn-1-we.startSN],it=d.sn===we.startSN,Ye=!Ke||d.cc>Ke.cc;if(i.independent!==!1){const{startPTS:St,endPTS:Tt,startDTS:Jt,endDTS:Ct}=b;if(c)c.elementaryStreams[b.type]={startPTS:St,endPTS:Tt,startDTS:Jt,endDTS:Ct};else if(b.firstKeyFrame&&b.independent&&s.id===1&&!Ye&&(this.couldBacktrack=!0),b.dropped&&b.independent){const zt=this.getMainFwdBufferInfo(),rn=(zt?zt.end:this.getLoadPosition())+this.config.maxBufferHole,kt=b.firstKeyFramePTS?b.firstKeyFramePTS:St;if(!it&&rn<kt-this.config.maxBufferHole&&!Ye){this.backtrack(d);return}else Ye&&(d.gap=!0);d.setElementaryStreamInfo(b.type,d.start,Tt,d.start,Ct,!0)}else it&&St-(we.appliedTimelineOffset||0)>co&&(d.gap=!0);d.setElementaryStreamInfo(b.type,St,Tt,Jt,Ct),this.backtrackFragment&&(this.backtrackFragment=d),this.bufferFragmentData(b,d,c,s,it||Ye)}else if(it||Ye)d.gap=!0;else{this.backtrack(d);return}}if(Ee){const{startPTS:Ke,endPTS:it,startDTS:Ye,endDTS:St}=Ee;c&&(c.elementaryStreams[E.AUDIO]={startPTS:Ke,endPTS:it,startDTS:Ye,endDTS:St}),d.setElementaryStreamInfo(E.AUDIO,Ke,it,Ye,St),this.bufferFragmentData(Ee,d,c,s)}if(we&&F!=null&&(t=F.samples)!=null&&t.length){const Ke={id:n,frag:d,details:we,samples:F.samples};r.trigger(p.FRAG_PARSING_METADATA,Ke)}if(we&&O){const Ke={id:n,frag:d,details:we,samples:O.samples};r.trigger(p.FRAG_PARSING_USERDATA,Ke)}}logMuxedErr(e){this.warn(`${me(e)?"Media":"Init"} segment with muxed audiovideo where only video expected: ${e.url}`)}_bufferInitSegment(e,t,n,r){if(this.state!==cn.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){let c=Bt(i.codec,e.audioCodec);c==="mp4a"&&(c="mp4a.40.5");const g=navigator.userAgent.toLowerCase();if(this.audioCodecSwitch){c&&(c.indexOf("mp4a.40.5")!==-1?c="mp4a.40.2":c="mp4a.40.5");const b=i.metadata;b&&"channelCount"in b&&(b.channelCount||1)!==1&&g.indexOf("firefox")===-1&&(c="mp4a.40.5")}c&&c.indexOf("mp4a.40.5")!==-1&&g.indexOf("android")!==-1&&i.container!=="audio/mpeg"&&(c="mp4a.40.2",this.log(`Android: force audio codec to ${c}`)),e.audioCodec&&e.audioCodec!==c&&this.log(`Swapping manifest audio codec "${e.audioCodec}" for "${c}"`),i.levelCodec=c,i.id=fe.MAIN,this.log(`Init audio buffer, container:${i.container}, codecs[selected/level/parsed]=[${c||""}/${e.audioCodec||""}/${i.codec}]`),delete t.audiovideo}if(s){s.levelCodec=e.videoCodec,s.id=fe.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(p.BUFFER_CODECS,t),!this.hls)return;d.forEach(c=>{const b=t[c].initSegment;b!=null&&b.byteLength&&this.hls.trigger(p.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,fe.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=cn.IDLE}checkFragmentChanged(){const e=this.media;let t=null;if(e&&e.readyState>1&&e.seeking===!1){const n=e.currentTime;if(qn.isBuffered(e,n)?t=this.getAppendedFrag(n):qn.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(p.FRAG_CHANGED,{frag:t}),(!r||r.level!==i)&&this.hls.trigger(p.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 L(t)?this.getAppendedFrag(t):null}get currentProgramDateTime(){var e;const t=((e=this.media)==null?void 0:e.currentTime)||this.lastCurrentTime;if(L(t)){const n=this.getLevelDetails(),r=this.currentFrag||(n?dn(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 Qc{constructor(e){this.config=void 0,this.keyUriToKeyInfo={},this.emeController=null,this.config=e}abort(e){for(const n in this.keyUriToKeyInfo){const r=this.keyUriToKeyInfo[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.keyUriToKeyInfo){const t=this.keyUriToKeyInfo[e];(t.mediaKeySessionContext||t.decryptdata.isCommonEncryption)&&delete this.keyUriToKeyInfo[e]}}destroy(){this.detach();for(const e in this.keyUriToKeyInfo){const t=this.keyUriToKeyInfo[e].loader;t&&t.destroy()}this.keyUriToKeyInfo={}}createKeyLoadError(e,t=A.KEY_LOAD_ERROR,n,r,i){return new Or({type:_e.NETWORK_ERROR,details:t,fatal:!1,frag:e,response:i,error:n,networkDetails:r})}loadClear(e,t){if(this.emeController&&this.config.emeEnabled){const{sn:n,cc:r}=e;for(let i=0;i<t.length;i++){const s=t[i];if(r<=s.cc&&(n==="initSegment"||s.sn==="initSegment"||n<s.sn)){this.emeController.selectKeySystemFormat(s).then(l=>{s.setKeyFormat(l)});break}}}}load(e){return!e.decryptdata&&e.encrypted&&this.emeController&&this.config.emeEnabled?this.emeController.selectKeySystemFormat(e).then(t=>this.loadInternal(e,t)):this.loadInternal(e)}loadInternal(e,t){var 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");return Promise.reject(this.createKeyLoadError(e,A.KEY_LOAD_ERROR,c))}const s=i.uri;if(!s)return Promise.reject(this.createKeyLoadError(e,A.KEY_LOAD_ERROR,new Error(`Invalid key URI: "${s}"`)));let l=this.keyUriToKeyInfo[s];if((n=l)!=null&&n.decryptdata.key)return i.key=l.decryptdata.key,Promise.resolve({frag:e,keyInfo:l});if((r=l)!=null&&r.keyLoadPromise){var d;switch((d=l.mediaKeySessionContext)==null?void 0:d.keyStatus){case void 0:case"status-pending":case"usable":case"usable-in-future":return l.keyLoadPromise.then(c=>(i.key=c.keyInfo.decryptdata.key,{frag:e,keyInfo:l}))}}switch(l=this.keyUriToKeyInfo[s]={decryptdata:i,keyLoadPromise:null,loader:null,mediaKeySessionContext:null},i.method){case"ISO-23001-7":case"SAMPLE-AES":case"SAMPLE-AES-CENC":case"SAMPLE-AES-CTR":return i.keyFormat==="identity"?this.loadKeyHTTP(l,e):this.loadKeyEME(l,e);case"AES-128":case"AES-256":case"AES-256-CTR":return this.loadKeyHTTP(l,e);default:return Promise.reject(this.createKeyLoadError(e,A.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){const r=this.emeController.loadKey(n);if(r)return(e.keyLoadPromise=r.then(i=>(e.mediaKeySessionContext=i,n))).catch(i=>{throw e.keyLoadPromise=null,i})}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,g={loadPolicy:c,timeout:c.maxLoadTimeMs,maxRetry:0,retryDelay:0,maxRetryDelay:0},b={onSuccess:(O,F,H,we)=>{const{frag:Ee,keyInfo:Ke,url:it}=H;if(!Ee.decryptdata||Ke!==this.keyUriToKeyInfo[it])return l(this.createKeyLoadError(Ee,A.KEY_LOAD_ERROR,new Error("after key load, decryptdata unset or changed"),we));Ke.decryptdata.key=Ee.decryptdata.key=new Uint8Array(O.data),Ee.keyLoader=null,Ke.loader=null,s({frag:Ee,keyInfo:Ke})},onError:(O,F,H,we)=>{this.resetLoader(F),l(this.createKeyLoadError(t,A.KEY_LOAD_ERROR,new Error(`HTTP Error ${O.code} loading key ${O.text}`),H,S({url:d.url,data:void 0},O)))},onTimeout:(O,F,H)=>{this.resetLoader(F),l(this.createKeyLoadError(t,A.KEY_LOAD_TIMEOUT,new Error("key loading timed out"),H))},onAbort:(O,F,H)=>{this.resetLoader(F),l(this.createKeyLoadError(t,A.INTERNAL_ABORTED,new Error("key loading aborted"),H))}};i.load(d,g,b)})}resetLoader(e){const{frag:t,keyInfo:n,url:r}=e,i=n.loader;t.keyLoader===i&&(t.keyLoader=null,n.loader=null),delete this.keyUriToKeyInfo[r],i&&i.destroy()}}function zl(a){const{type:e}=a;switch(e){case be.AUDIO_TRACK:return fe.AUDIO;case be.SUBTITLE_TRACK:return fe.SUBTITLE;default:return fe.MAIN}}function Vo(a,e){let t=a.url;return(t===void 0||t.indexOf("data:")===0)&&(t=e.url),t}class Jc{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(p.MANIFEST_LOADING,this.onManifestLoading,this),e.on(p.LEVEL_LOADING,this.onLevelLoading,this),e.on(p.AUDIO_TRACK_LOADING,this.onAudioTrackLoading,this),e.on(p.SUBTITLE_TRACK_LOADING,this.onSubtitleTrackLoading,this),e.on(p.LEVELS_UPDATED,this.onLevelsUpdated,this)}unregisterListeners(){const{hls:e}=this;e.off(p.MANIFEST_LOADING,this.onManifestLoading,this),e.off(p.LEVEL_LOADING,this.onLevelLoading,this),e.off(p.AUDIO_TRACK_LOADING,this.onAudioTrackLoading,this),e.off(p.SUBTITLE_TRACK_LOADING,this.onSubtitleTrackLoading,this),e.off(p.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:be.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:be.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:be.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:be.SUBTITLE_TRACK,url:i,deliveryDirectives:s,levelOrTrack:l})}onLevelsUpdated(e,t){const n=this.loaders[be.LEVEL];if(n){const r=n.context;r&&!t.levels.some(i=>i===r.levelOrTrack)&&(n.abort(),delete this.loaders[be.LEVEL])}}load(e){var t;const n=this.hls.config;let r=this.getInternalLoader(e);if(r){const c=this.hls.logger,g=r.context;if(g&&g.levelOrTrack===e.levelOrTrack&&(g.url===e.url||g.deliveryDirectives&&!e.deliveryDirectives)){g.url===e.url?c.log(`[playlist-loader]: ignore ${e.url} ongoing request`):c.log(`[playlist-loader]: ignore ${e.url} in favor of ${g.url}`);return}c.log(`[playlist-loader]: aborting previous loader for type: ${e.type}`),r.abort()}let i;if(e.type===be.MANIFEST?i=n.manifestLoadPolicy.default:i=v({},n.playlistLoadPolicy.default,{timeoutRetry:null,errorRetry:null}),r=this.createInternalLoader(e),L((t=e.deliveryDirectives)==null?void 0:t.part)){let c;if(e.type===be.LEVEL&&e.level!==null?c=this.hls.levels[e.level].details:e.type===be.AUDIO_TRACK&&e.id!==null?c=this.hls.audioTracks[e.id].details:e.type===be.SUBTITLE_TRACK&&e.id!==null&&(c=this.hls.subtitleTracks[e.id].details),c){const g=c.partTarget,b=c.targetduration;if(g&&b){const O=Math.max(g*3,b*.8)*1e3;i=v({},i,{maxTimeToFirstByteMs:Math.min(O,i.maxTimeToFirstByteMs),maxLoadTimeMs:Math.min(O,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,g,b,O)=>{const F=this.getInternalLoader(b);this.resetInternalLoader(b.type);const H=c.data;if(H.indexOf("#EXTM3U")!==0){this.handleManifestParsingError(c,b,new Error("no EXTM3U delimiter"),O||null,g);return}g.parsing.start=performance.now(),di.isMediaPlaylist(H)||b.type!==be.MANIFEST?this.handleTrackOrLevelPlaylist(c,g,b,O||null,F):this.handleMasterPlaylist(c,g,b,O)},onError:(c,g,b,O)=>{this.handleNetworkError(g,b,!1,c,O)},onTimeout:(c,g,b)=>{this.handleNetworkError(g,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=Vo(e,n),d=di.parseMasterPlaylist(s,l);if(d.playlistParsingError){this.handleManifestParsingError(e,n,d.playlistParsingError,r,t);return}const{contentSteering:c,levels:g,sessionData:b,sessionKeys:O,startTimeOffset:F,variableList:H}=d;this.variableList=H;const{AUDIO:we=[],SUBTITLES:Ee,"CLOSED-CAPTIONS":Ke}=di.parseMasterPlaylistMedia(s,l,d);we.length&&!we.some(Ye=>!Ye.url)&&g[0].audioCodec&&!g[0].attrs.AUDIO&&(this.hls.logger.log("[playlist-loader]: audio codec signaled in quality level, but no embedded audio track signaled, create one"),we.unshift({type:"main",name:"main",groupId:"main",default:!1,autoselect:!1,forced:!1,id:-1,attrs:new or({}),bitrate:0,url:""})),i.trigger(p.MANIFEST_LOADED,{levels:g,audioTracks:we,subtitles:Ee,captions:Ke,contentSteering:c,url:l,stats:t,networkDetails:r,sessionData:b,sessionKeys:O,startTimeOffset:F,variableList:H})}handleTrackOrLevelPlaylist(e,t,n,r,i){const s=this.hls,{id:l,level:d,type:c}=n,g=Vo(e,n),b=L(d)?d:L(l)?l:0,O=zl(n),F=di.parseLevelPlaylist(e.data,g,b,O,0,this.variableList);if(c===be.MANIFEST){const H={attrs:new or({}),bitrate:0,details:F,name:"",url:g};F.requestScheduled=t.loading.start+ps(F,0),s.trigger(p.MANIFEST_LOADED,{levels:[H],audioTracks:[],url:g,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(p.ERROR,{type:_e.NETWORK_ERROR,details:A.MANIFEST_PARSING_ERROR,fatal:t.type===be.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===be.LEVEL?s+=`: ${e.level} id: ${e.id}`:(e.type===be.AUDIO_TRACK||e.type===be.SUBTITLE_TRACK)&&(s+=` id: ${e.id} group-id: "${e.groupId}"`);const l=new Error(s);this.hls.logger.warn(`[playlist-loader]: ${s}`);let d=A.UNKNOWN,c=!1;const g=this.getInternalLoader(e);switch(e.type){case be.MANIFEST:d=n?A.MANIFEST_LOAD_TIMEOUT:A.MANIFEST_LOAD_ERROR,c=!0;break;case be.LEVEL:d=n?A.LEVEL_LOAD_TIMEOUT:A.LEVEL_LOAD_ERROR,c=!1;break;case be.AUDIO_TRACK:d=n?A.AUDIO_TRACK_LOAD_TIMEOUT:A.AUDIO_TRACK_LOAD_ERROR,c=!1;break;case be.SUBTITLE_TRACK:d=n?A.SUBTITLE_TRACK_LOAD_TIMEOUT:A.SUBTITLE_LOAD_ERROR,c=!1;break}g&&this.resetInternalLoader(e.type);const b={type:_e.NETWORK_ERROR,details:d,fatal:c,url:e.url,loader:g,context:e,error:l,networkDetails:t,stats:i};if(r){const O=(t==null?void 0:t.url)||e.url;b.response=S({url:O,data:void 0},r)}this.hls.trigger(p.ERROR,b)}handlePlaylistLoaded(e,t,n,r,i,s){const l=this.hls,{type:d,level:c,id:g,groupId:b,deliveryDirectives:O}=r,F=Vo(t,r),H=zl(r),we=typeof r.level=="number"&&H===fe.MAIN?c:void 0;if(!e.fragments.length){const Ke=e.playlistParsingError=new Error("No Segments found in Playlist");l.trigger(p.ERROR,{type:_e.NETWORK_ERROR,details:A.LEVEL_EMPTY_ERROR,fatal:!1,url:F,error:Ke,reason:Ke.message,response:t,context:r,level:we,parent:H,networkDetails:i,stats:n});return}e.targetduration||(e.playlistParsingError=new Error("Missing Target Duration"));const Ee=e.playlistParsingError;if(Ee){if(this.hls.logger.warn(Ee),!l.config.ignorePlaylistParsingErrors){l.trigger(p.ERROR,{type:_e.NETWORK_ERROR,details:A.LEVEL_PARSING_ERROR,fatal:!1,url:F,error:Ee,reason:Ee.message,response:t,context:r,level:we,parent:H,networkDetails:i,stats:n});return}e.playlistParsingError=null}switch(e.live&&s&&(s.getCacheAge&&(e.ageHeader=s.getCacheAge()||0),(!s.getCacheAge||isNaN(e.ageHeader))&&(e.ageHeader=0)),d){case be.MANIFEST:case be.LEVEL:l.trigger(p.LEVEL_LOADED,{details:e,levelInfo:r.levelOrTrack||l.levels[0],level:we||0,id:g||0,stats:n,networkDetails:i,deliveryDirectives:O,withoutMultiVariant:d===be.MANIFEST});break;case be.AUDIO_TRACK:l.trigger(p.AUDIO_TRACK_LOADED,{details:e,track:r.levelOrTrack,id:g||0,groupId:b||"",stats:n,networkDetails:i,deliveryDirectives:O});break;case be.SUBTITLE_TRACK:l.trigger(p.SUBTITLE_TRACK_LOADED,{details:e,track:r.levelOrTrack,id:g||0,groupId:b||"",stats:n,networkDetails:i,deliveryDirectives:O});break}}}class Rs{static get version(){return gs}static isMSESupported(){return Ul()}static isSupported(){return Gc()}static getMediaSource(){return ve()}static get Events(){return p}static get MetadataSchema(){return ze}static get ErrorTypes(){return _e}static get ErrorDetails(){return A}static get DefaultConfig(){return Rs.defaultConfig?Rs.defaultConfig:kc}static set DefaultConfig(e){Rs.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 Vs,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=K(e.debug||!1,"Hls instance",e.assetPlayerId),n=this.config=Nc(Rs.DefaultConfig,e,t);this.userConfig=e,n.progressive&&Fc(n,t);const{abrController:r,bufferController:i,capLevelController:s,errorController:l,fpsController:d}=n,c=new l(this),g=this.abrController=new r(this),b=new Xn(this),O=n.interstitialsController,F=O?this.interstitialsController=new O(this,Rs):null,H=this.bufferController=new i(this,b),we=this.capLevelController=new s(this),Ee=new d(this),Ke=new Jc(this),it=n.contentSteeringController,Ye=it?new it(this):null,St=this.levelController=new Wc(this,Ye),Tt=new jc(this),Jt=new Qc(this.config),Ct=this.streamController=new Xc(this,b,Jt),zt=this.gapController=new zc(this,b);we.setStreamController(Ct),Ee.setStreamController(Ct);const rn=[Ke,St,Ct];F&&rn.splice(1,0,F),Ye&&rn.splice(1,0,Ye),this.networkControllers=rn;const kt=[g,H,zt,we,Ee,Tt,b];this.audioTrackController=this.createController(n.audioTrackController,rn);const Rn=n.audioStreamController;Rn&&rn.push(this.audioStreamController=new Rn(this,b,Jt)),this.subtitleTrackController=this.createController(n.subtitleTrackController,rn);const Gn=n.subtitleStreamController;Gn&&rn.push(this.subtititleStreamController=new Gn(this,b,Jt)),this.createController(n.timelineController,kt),Jt.emeController=this.emeController=this.createController(n.emeController,kt),this.cmcdController=this.createController(n.cmcdController,kt),this.latencyController=this.createController(Zc,kt),this.coreComponents=kt,rn.push(c);const Fr=c.onErrorOut;typeof Fr=="function"&&this.on(p.ERROR,Fr,c),this.on(p.MANIFEST_LOADED,Ke.onManifestLoaded,Ke)}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===p.ERROR;this.trigger(p.ERROR,{type:_e.OTHER_ERROR,details:A.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(p.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(p.ERROR,{type:_e.OTHER_ERROR,details:A.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(p.MEDIA_ATTACHING,r)}detachMedia(){this.logger.log("detachMedia"),this.trigger(p.MEDIA_DETACHING,{}),this._media=null}transferMedia(){this._media=null;const e=this.bufferController.transferMedia();return this.trigger(p.MEDIA_DETACHING,{transferMedia:e}),e}loadSource(e){this.stopLoad();const t=this.media,n=this._url,r=this._url=G.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(p.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={[fe.MAIN]:this.streamController.inFlightFrag};return this.audioStreamController&&(e[fe.AUDIO]=this.audioStreamController.inFlightFrag),this.subtititleStreamController&&(e[fe.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=Ga()),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){Nt(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=Gt(t);return Ae(e,n,navigator.mediaCapabilities)}}Rs.defaultConfig=void 0},16722:function(ln,et,m){"use strict";m.d(et,{Z:function(){return fe}});const L=o=>typeof o=="object"&&o!=null&&o.nodeType===1,Q=(o,k)=>(!k||o!=="hidden")&&o!=="visible"&&o!=="clip",ge=(o,k)=>{if(o.clientHeight<o.scrollHeight||o.clientWidth<o.scrollWidth){const N=getComputedStyle(o,null);return Q(N.overflowY,k)||Q(N.overflowX,k)||(v=>{const x=(S=>{if(!S.ownerDocument||!S.ownerDocument.defaultView)return null;try{return S.ownerDocument.defaultView.frameElement}catch(T){return null}})(v);return!!x&&(x.clientHeight<v.scrollHeight||x.clientWidth<v.scrollWidth)})(o)}return!1},_e=(o,k,N,v,x,S,T,z)=>S<o&&T>k||S>o&&T<k?0:S<=o&&z<=N||T>=k&&z>=N?S-o-v:T>k&&z<N||S<o&&z>N?T-k+x:0,A=o=>{const k=o.parentElement;return k==null?o.getRootNode().host||null:k},p=(o,k)=>{var N,v,x,S;if(typeof document=="undefined")return[];const{scrollMode:T,block:z,inline:ae,boundary:B,skipOverflowHiddenElements:U}=k,X=typeof B=="function"?B:We=>We!==B;if(!L(o))throw new TypeError("Invalid target");const Z=document.scrollingElement||document.documentElement,D=[];let C=o;for(;L(C)&&X(C);){if(C=A(C),C===Z){D.push(C);break}C!=null&&C===document.body&&ge(C)&&!ge(document.documentElement)||C!=null&&ge(C,U)&&D.push(C)}const K=(v=(N=window.visualViewport)==null?void 0:N.width)!=null?v:innerWidth,$=(S=(x=window.visualViewport)==null?void 0:x.height)!=null?S:innerHeight,{scrollX:ve,scrollY:Se}=window,{height:Le,width:ye,top:te,right:j,bottom:ue,left:R}=o.getBoundingClientRect(),{top:ee,right:G,bottom:y,left:E}=(We=>{const qe=window.getComputedStyle(We);return{top:parseFloat(qe.scrollMarginTop)||0,right:parseFloat(qe.scrollMarginRight)||0,bottom:parseFloat(qe.scrollMarginBottom)||0,left:parseFloat(qe.scrollMarginLeft)||0}})(o);let Y=z==="start"||z==="nearest"?te-ee:z==="end"?ue+y:te+Le/2-ee+y,me=ae==="center"?R+ye/2-E+G:ae==="end"?j+G:R-E;const $e=[];for(let We=0;We<D.length;We++){const qe=D[We],{height:Xe,width:gt,top:_t,right:st,bottom:Kt,left:un}=qe.getBoundingClientRect();if(T==="if-needed"&&te>=0&&R>=0&&ue<=$&&j<=K&&(qe===Z&&!ge(qe)||te>=_t&&ue<=Kt&&R>=un&&j<=st))return $e;const Ot=getComputedStyle(qe),Vt=parseInt(Ot.borderLeftWidth,10),lt=parseInt(Ot.borderTopWidth,10),At=parseInt(Ot.borderRightWidth,10),ne=parseInt(Ot.borderBottomWidth,10);let de=0,se=0;const W="offsetWidth"in qe?qe.offsetWidth-qe.clientWidth-Vt-At:0,Ie="offsetHeight"in qe?qe.offsetHeight-qe.clientHeight-lt-ne:0,M="offsetWidth"in qe?qe.offsetWidth===0?0:gt/qe.offsetWidth:0,ce="offsetHeight"in qe?qe.offsetHeight===0?0:Xe/qe.offsetHeight:0;if(Z===qe)de=z==="start"?Y:z==="end"?Y-$:z==="nearest"?_e(Se,Se+$,$,lt,ne,Se+Y,Se+Y+Le,Le):Y-$/2,se=ae==="start"?me:ae==="center"?me-K/2:ae==="end"?me-K:_e(ve,ve+K,K,Vt,At,ve+me,ve+me+ye,ye),de=Math.max(0,de+Se),se=Math.max(0,se+ve);else{de=z==="start"?Y-_t-lt:z==="end"?Y-Kt+ne+Ie:z==="nearest"?_e(_t,Kt,Xe,lt,ne+Ie,Y,Y+Le,Le):Y-(_t+Xe/2)+Ie/2,se=ae==="start"?me-un-Vt:ae==="center"?me-(un+gt/2)+W/2:ae==="end"?me-st+At+W:_e(un,st,gt,Vt,At+W,me,me+ye,ye);const{scrollLeft:q,scrollTop:le}=qe;de=ce===0?0:Math.max(0,Math.min(le+de/ce,qe.scrollHeight-Xe/ce+Ie)),se=M===0?0:Math.max(0,Math.min(q+se/M,qe.scrollWidth-gt/M+W)),Y+=le-de,me+=q-se}$e.push({el:qe,top:de,left:se})}return $e},be=o=>o===!1?{block:"end",inline:"nearest"}:(k=>k===Object(k)&&Object.keys(k).length!==0)(o)?o:{block:"start",inline:"nearest"};function fe(o,k){if(!o.isConnected||!(x=>{let S=x;for(;S&&S.parentNode;){if(S.parentNode===document)return!0;S=S.parentNode instanceof ShadowRoot?S.parentNode.host:S.parentNode}return!1})(o))return;const N=(x=>{const S=window.getComputedStyle(x);return{top:parseFloat(S.scrollMarginTop)||0,right:parseFloat(S.scrollMarginRight)||0,bottom:parseFloat(S.scrollMarginBottom)||0,left:parseFloat(S.scrollMarginLeft)||0}})(o);if((x=>typeof x=="object"&&typeof x.behavior=="function")(k))return k.behavior(p(o,k));const v=typeof k=="boolean"||k==null?void 0:k.behavior;for(const{el:x,top:S,left:T}of p(o,be(k))){const z=S-N.top+N.bottom,ae=T-N.left+N.right;x.scroll({top:z,left:ae,behavior:v})}}}}]);
}());