!(function(){var Ya=Math.pow;(self.webpackChunk=self.webpackChunk||[]).push([[2412],{40001:function(Ht,lt,u){"use strict";u.d(lt,{Z:function(){return ce}});var v=u(96663),O=u(59301),H={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"},se=H,R=u(7657),B=function(M,Ze){return O.createElement(R.Z,(0,v.Z)({},M,{ref:Ze,icon:se}))},ee=O.forwardRef(B),ce=ee},26227:function(Ht,lt,u){"use strict";u.d(lt,{Z:function(){return ce}});var v=u(96663),O=u(59301),H={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M360 184h-8c4.4 0 8-3.6 8-8v8h304v-8c0 4.4 3.6 8 8 8h-8v72h72v-80c0-35.3-28.7-64-64-64H352c-35.3 0-64 28.7-64 64v80h72v-72zm504 72H160c-17.7 0-32 14.3-32 32v32c0 4.4 3.6 8 8 8h60.4l24.7 523c1.6 34.1 29.8 61 63.9 61h454c34.2 0 62.3-26.8 63.9-61l24.7-523H888c4.4 0 8-3.6 8-8v-32c0-17.7-14.3-32-32-32zM731.3 840H292.7l-24.2-512h487l-24.2 512z"}}]},name:"delete",theme:"outlined"},se=H,R=u(7657),B=function(M,Ze){return O.createElement(R.Z,(0,v.Z)({},M,{ref:Ze,icon:se}))},ee=O.forwardRef(B),ce=ee},49198:function(Ht,lt,u){"use strict";u.d(lt,{Z:function(){return ce}});var v=u(96663),O=u(59301),H={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M533.2 492.3L277.9 166.1c-3-3.9-7.7-6.1-12.6-6.1H188c-6.7 0-10.4 7.7-6.3 12.9L447.1 512 181.7 851.1A7.98 7.98 0 00188 864h77.3c4.9 0 9.6-2.3 12.6-6.1l255.3-326.1c9.1-11.7 9.1-27.9 0-39.5zm304 0L581.9 166.1c-3-3.9-7.7-6.1-12.6-6.1H492c-6.7 0-10.4 7.7-6.3 12.9L751.1 512 485.7 851.1A7.98 7.98 0 00492 864h77.3c4.9 0 9.6-2.3 12.6-6.1l255.3-326.1c9.1-11.7 9.1-27.9 0-39.5z"}}]},name:"double-right",theme:"outlined"},se=H,R=u(7657),B=function(M,Ze){return O.createElement(R.Z,(0,v.Z)({},M,{ref:Ze,icon:se}))},ee=O.forwardRef(B),ce=ee},84105:function(Ht,lt,u){"use strict";u.d(lt,{Z:function(){return ce}});var v=u(96663),O=u(59301),H={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"},se=H,R=u(7657),B=function(M,Ze){return O.createElement(R.Z,(0,v.Z)({},M,{ref:Ze,icon:se}))},ee=O.forwardRef(B),ce=ee},41464:function(Ht,lt,u){"use strict";u.d(lt,{Z:function(){return ce}});var v=u(96663),O=u(59301),H={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M505.7 661a8 8 0 0012.6 0l112-141.7c4.1-5.2.4-12.9-6.3-12.9h-74.1V168c0-4.4-3.6-8-8-8h-60c-4.4 0-8 3.6-8 8v338.3H400c-6.7 0-10.4 7.7-6.3 12.9l112 141.8zM878 626h-60c-4.4 0-8 3.6-8 8v154H214V634c0-4.4-3.6-8-8-8h-60c-4.4 0-8 3.6-8 8v198c0 17.7 14.3 32 32 32h684c17.7 0 32-14.3 32-32V634c0-4.4-3.6-8-8-8z"}}]},name:"download",theme:"outlined"},se=H,R=u(7657),B=function(M,Ze){return O.createElement(R.Z,(0,v.Z)({},M,{ref:Ze,icon:se}))},ee=O.forwardRef(B),ce=ee},18785:function(Ht,lt,u){"use strict";u.d(lt,{Z:function(){return ce}});var v=u(96663),O=u(59301),H={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"},se=H,R=u(7657),B=function(M,Ze){return O.createElement(R.Z,(0,v.Z)({},M,{ref:Ze,icon:se}))},ee=O.forwardRef(B),ce=ee},87169:function(Ht,lt,u){"use strict";u.d(lt,{Z:function(){return ce}});var v=u(96663),O=u(59301),H={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:"M464 688a48 48 0 1096 0 48 48 0 10-96 0zm24-112h48c4.4 0 8-3.6 8-8V296c0-4.4-3.6-8-8-8h-48c-4.4 0-8 3.6-8 8v272c0 4.4 3.6 8 8 8z"}}]},name:"exclamation-circle",theme:"outlined"},se=H,R=u(7657),B=function(M,Ze){return O.createElement(R.Z,(0,v.Z)({},M,{ref:Ze,icon:se}))},ee=O.forwardRef(B),ce=ee},73331:function(Ht,lt,u){"use strict";u.d(lt,{Z:function(){return ce}});var v=u(96663),O=u(59301),H={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"},se=H,R=u(7657),B=function(M,Ze){return O.createElement(R.Z,(0,v.Z)({},M,{ref:Ze,icon:se}))},ee=O.forwardRef(B),ce=ee},15277:function(Ht,lt,u){"use strict";u.d(lt,{Z:function(){return ce}});var v=u(96663),O=u(59301),H={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"},se=H,R=u(7657),B=function(M,Ze){return O.createElement(R.Z,(0,v.Z)({},M,{ref:Ze,icon:se}))},ee=O.forwardRef(B),ce=ee},33853:function(Ht,lt,u){"use strict";u.d(lt,{Z:function(){return ce}});var v=u(96663),O=u(59301),H={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"},se=H,R=u(7657),B=function(M,Ze){return O.createElement(R.Z,(0,v.Z)({},M,{ref:Ze,icon:se}))},ee=O.forwardRef(B),ce=ee},62772:function(Ht,lt,u){"use strict";u.d(lt,{Z:function(){return ce}});var v=u(96663),O=u(59301),H={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M482 152h60q8 0 8 8v704q0 8-8 8h-60q-8 0-8-8V160q0-8 8-8z"}},{tag:"path",attrs:{d:"M192 474h672q8 0 8 8v60q0 8-8 8H160q-8 0-8-8v-60q0-8 8-8z"}}]},name:"plus",theme:"outlined"},se=H,R=u(7657),B=function(M,Ze){return O.createElement(R.Z,(0,v.Z)({},M,{ref:Ze,icon:se}))},ee=O.forwardRef(B),ce=ee},61485:function(Ht,lt,u){"use strict";u.d(lt,{Z:function(){return ce}});var v=u(96663),O=u(59301),H={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"},se=H,R=u(7657),B=function(M,Ze){return O.createElement(R.Z,(0,v.Z)({},M,{ref:Ze,icon:se}))},ee=O.forwardRef(B),ce=ee},38819:function(Ht,lt,u){"use strict";u.d(lt,{Z:function(){return ce}});var v=u(96663),O=u(59301),H={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"},se=H,R=u(7657),B=function(M,Ze){return O.createElement(R.Z,(0,v.Z)({},M,{ref:Ze,icon:se}))},ee=O.forwardRef(B),ce=ee},47472:function(Ht,lt,u){"use strict";u.d(lt,{Z:function(){return ce}});var v=u(96663),O=u(59301),H={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"},se=H,R=u(7657),B=function(M,Ze){return O.createElement(R.Z,(0,v.Z)({},M,{ref:Ze,icon:se}))},ee=O.forwardRef(B),ce=ee},35593:function(Ht,lt,u){"use strict";u.d(lt,{Z:function(){return yt}});var v=u(44127),O=u(72071),H=u(6620),se=u(43403),R=u(92310),B=u.n(R),ee=u(29301),ce=u(76846),fe=u(96452),M=u(6089),Ze=u(80402),P=u(34280),g=u(49658),X=u(59301),z=u(96663),Ce=u(77900),st=u(8654);function Re(V){var Z=V.prefixCls,L=V.align,U=V.arrow,J=V.arrowPos,Se=U||{},x=Se.className,C=Se.content,Q=J.x,I=Q===void 0?0:Q,F=J.y,pe=F===void 0?0:F,je=X.useRef();if(!L||!L.points)return null;var Be={position:"absolute"};if(L.autoArrow!==!1){var it=L.points[0],_e=L.points[1],Ye=it[0],re=it[1],Pe=_e[0],et=_e[1];Ye===Pe||!["t","b"].includes(Ye)?Be.top=pe:Ye==="t"?Be.top=0:Be.bottom=0,re===et||!["l","r"].includes(re)?Be.left=I:re==="l"?Be.left=0:Be.right=0}return X.createElement("div",{ref:je,className:B()("".concat(Z,"-arrow"),x),style:Be},C)}function de(V){var Z=V.prefixCls,L=V.open,U=V.zIndex,J=V.mask,Se=V.motion;return J?X.createElement(Ce.default,(0,z.Z)({},Se,{motionAppear:!0,visible:L,removeOnLeave:!0}),function(x){var C=x.className;return X.createElement("div",{style:{zIndex:U},className:B()("".concat(Z,"-mask"),C)})}):null}var ae=X.memo(function(V){var Z=V.children;return Z},function(V,Z){return Z.cache}),ue=ae,A=X.forwardRef(function(V,Z){var L=V.popup,U=V.className,J=V.prefixCls,Se=V.style,x=V.target,C=V.onVisibleChanged,Q=V.open,I=V.keepDom,F=V.fresh,pe=V.onClick,je=V.mask,Be=V.arrow,it=V.arrowPos,_e=V.align,Ye=V.motion,re=V.maskMotion,Pe=V.forceRender,et=V.getPopupContainer,oe=V.autoDestroy,dt=V.portal,pt=V.zIndex,ft=V.onMouseEnter,ot=V.onMouseLeave,_t=V.onPointerEnter,jt=V.ready,Zt=V.offsetX,Yt=V.offsetY,Mt=V.offsetR,$t=V.offsetB,xt=V.onAlign,Ft=V.onPrepare,qt=V.stretch,Bt=V.targetWidth,Kt=V.targetHeight,hn=typeof L=="function"?L():L,en=Q||I,xn=(et==null?void 0:et.length)>0,an=X.useState(!et||!xn),mn=(0,O.Z)(an,2),Ot=mn[0],Xe=mn[1];if((0,P.Z)(function(){!Ot&&xn&&x&&Xe(!0)},[Ot,xn,x]),!Ot)return null;var l="auto",h={left:"-1000vw",top:"-1000vh",right:l,bottom:l};if(jt||!Q){var f,d=_e.points,p=_e.dynamicInset||((f=_e._experimental)===null||f===void 0?void 0:f.dynamicInset),b=p&&d[0][1]==="r",E=p&&d[0][0]==="b";b?(h.right=Mt,h.left=l):(h.left=Zt,h.right=l),E?(h.bottom=$t,h.top=l):(h.top=Yt,h.bottom=l)}var q={};return qt&&(qt.includes("height")&&Kt?q.height=Kt:qt.includes("minHeight")&&Kt&&(q.minHeight=Kt),qt.includes("width")&&Bt?q.width=Bt:qt.includes("minWidth")&&Bt&&(q.minWidth=Bt)),Q||(q.pointerEvents="none"),X.createElement(dt,{open:Pe||en,getContainer:et&&function(){return et(x)},autoDestroy:oe},X.createElement(de,{prefixCls:J,open:Q,zIndex:pt,mask:je,motion:re}),X.createElement(ee.Z,{onResize:xt,disabled:!Q},function(K){return X.createElement(Ce.default,(0,z.Z)({motionAppear:!0,motionEnter:!0,motionLeave:!0,removeOnLeave:!1,forceRender:Pe,leavedClassName:"".concat(J,"-hidden")},Ye,{onAppearPrepare:Ft,onEnterPrepare:Ft,visible:Q,onVisibleChanged:function(Ue){var Ge;Ye==null||(Ge=Ye.onVisibleChanged)===null||Ge===void 0||Ge.call(Ye,Ue),C(Ue)}}),function(ye,Ue){var Ge=ye.className,Le=ye.style,rt=B()(J,Ge,U);return X.createElement("div",{ref:(0,st.sQ)(K,Z,Ue),className:rt,style:(0,v.Z)((0,v.Z)((0,v.Z)((0,v.Z)({"--arrow-x":"".concat(it.x||0,"px"),"--arrow-y":"".concat(it.y||0,"px")},h),q),Le),{},{boxSizing:"border-box",zIndex:pt},Se),onMouseEnter:ft,onMouseLeave:ot,onPointerEnter:_t,onClick:pe},Be&&X.createElement(Re,{prefixCls:J,arrow:Be,arrowPos:it,align:_e}),X.createElement(ue,{cache:!Q&&!F},hn))})}))}),w=A,j=X.forwardRef(function(V,Z){var L=V.children,U=V.getTriggerDOMNode,J=(0,st.Yr)(L),Se=X.useCallback(function(C){(0,st.mH)(Z,U?U(C):C)},[U]),x=(0,st.x1)(Se,L.ref);return J?X.cloneElement(L,{ref:x}):L}),N=j,De=X.createContext(null),Te=De;function ze(V){return V?Array.isArray(V)?V:[V]:[]}function Me(V,Z,L,U){return X.useMemo(function(){var J=ze(L!=null?L:Z),Se=ze(U!=null?U:Z),x=new Set(J),C=new Set(Se);return V&&(x.has("hover")&&(x.delete("hover"),x.add("click")),C.has("hover")&&(C.delete("hover"),C.add("click"))),[x,C]},[V,Z,L,U])}var he=u(29194);function _(){var V=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[],Z=arguments.length>1&&arguments[1]!==void 0?arguments[1]:[],L=arguments.length>2?arguments[2]:void 0;return L?V[0]===Z[0]:V[0]===Z[0]&&V[1]===Z[1]}function me(V,Z,L,U){for(var J=L.points,Se=Object.keys(V),x=0;x1&&arguments[1]!==void 0?arguments[1]:1;return Number.isNaN(V)?Z:V}function Oe(V){return ne(parseFloat(V),0)}function xe(V,Z){var L=(0,v.Z)({},V);return(Z||[]).forEach(function(U){if(!(U instanceof HTMLBodyElement||U instanceof HTMLHtmlElement)){var J=ve(U).getComputedStyle(U),Se=J.overflow,x=J.overflowClipMargin,C=J.borderTopWidth,Q=J.borderBottomWidth,I=J.borderLeftWidth,F=J.borderRightWidth,pe=U.getBoundingClientRect(),je=U.offsetHeight,Be=U.clientHeight,it=U.offsetWidth,_e=U.clientWidth,Ye=Oe(C),re=Oe(Q),Pe=Oe(I),et=Oe(F),oe=ne(Math.round(pe.width/it*1e3)/1e3),dt=ne(Math.round(pe.height/je*1e3)/1e3),pt=(it-_e-Pe-et)*oe,ft=(je-Be-Ye-re)*dt,ot=Ye*dt,_t=re*dt,jt=Pe*oe,Zt=et*oe,Yt=0,Mt=0;if(Se==="clip"){var $t=Oe(x);Yt=$t*oe,Mt=$t*dt}var xt=pe.x+jt-Yt,Ft=pe.y+ot-Mt,qt=xt+pe.width+2*Yt-jt-Zt-pt,Bt=Ft+pe.height+2*Mt-ot-_t-ft;L.left=Math.max(L.left,xt),L.top=Math.max(L.top,Ft),L.right=Math.min(L.right,qt),L.bottom=Math.min(L.bottom,Bt)}}),L}function te(V){var Z=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,L="".concat(Z),U=L.match(/^(.*)\%$/);return U?V*(parseFloat(U[1])/100):parseFloat(L)}function Fe(V,Z){var L=Z||[],U=(0,O.Z)(L,2),J=U[0],Se=U[1];return[te(V.width,J),te(V.height,Se)]}function Ae(){var V=arguments.length>0&&arguments[0]!==void 0?arguments[0]:"";return[V[0],V[1]]}function le(V,Z){var L=Z[0],U=Z[1],J,Se;return L==="t"?Se=V.y:L==="b"?Se=V.y+V.height:Se=V.y+V.height/2,U==="l"?J=V.x:U==="r"?J=V.x+V.width:J=V.x+V.width/2,{x:J,y:Se}}function $e(V,Z){var L={t:"b",b:"t",l:"r",r:"l"};return V.map(function(U,J){return J===Z?L[U]||"c":U}).join("")}function nt(V,Z,L,U,J,Se,x){var C=X.useState({ready:!1,offsetX:0,offsetY:0,offsetR:0,offsetB:0,arrowX:0,arrowY:0,scaleX:1,scaleY:1,align:J[U]||{}}),Q=(0,O.Z)(C,2),I=Q[0],F=Q[1],pe=X.useRef(0),je=X.useMemo(function(){return Z?Ee(Z):[]},[Z]),Be=X.useRef({}),it=function(){Be.current={}};V||it();var _e=(0,M.Z)(function(){if(Z&&L&&V){let Tn=function(jn,Yn){var br=arguments.length>2&&arguments[2]!==void 0?arguments[2]:rt,fr=hn.x+jn,vr=hn.y+Yn,Sr=fr+f,ar=vr+h,Xn=Math.max(fr,br.left),Ir=Math.max(vr,br.top),Rr=Math.min(Sr,br.right),Mr=Math.min(ar,br.bottom);return Math.max(0,(Rr-Xn)*(Mr-Ir))},Fn=function(){Rn=hn.y+bt,Ln=Rn+h,Cn=hn.x+Ut,Sn=Cn+f};var Pe,et,oe=Z,dt=oe.ownerDocument,pt=ve(oe),ft=pt.getComputedStyle(oe),ot=ft.width,_t=ft.height,jt=ft.position,Zt=oe.style.left,Yt=oe.style.top,Mt=oe.style.right,$t=oe.style.bottom,xt=oe.style.overflow,Ft=(0,v.Z)((0,v.Z)({},J[U]),Se),qt=dt.createElement("div");(Pe=oe.parentElement)===null||Pe===void 0||Pe.appendChild(qt),qt.style.left="".concat(oe.offsetLeft,"px"),qt.style.top="".concat(oe.offsetTop,"px"),qt.style.position=jt,qt.style.height="".concat(oe.offsetHeight,"px"),qt.style.width="".concat(oe.offsetWidth,"px"),oe.style.left="0",oe.style.top="0",oe.style.right="auto",oe.style.bottom="auto",oe.style.overflow="hidden";var Bt;if(Array.isArray(L))Bt={x:L[0],y:L[1],width:0,height:0};else{var Kt=L.getBoundingClientRect();Bt={x:Kt.x,y:Kt.y,width:Kt.width,height:Kt.height}}var hn=oe.getBoundingClientRect(),en=dt.documentElement,xn=en.clientWidth,an=en.clientHeight,mn=en.scrollWidth,Ot=en.scrollHeight,Xe=en.scrollTop,l=en.scrollLeft,h=hn.height,f=hn.width,d=Bt.height,p=Bt.width,b={left:0,top:0,right:xn,bottom:an},E={left:-l,top:-Xe,right:mn-l,bottom:Ot-Xe},q=Ft.htmlRegion,K="visible",ye="visibleFirst";q!=="scroll"&&q!==ye&&(q=K);var Ue=q===ye,Ge=xe(E,je),Le=xe(b,je),rt=q===K?Le:Ge,Qe=Ue?Le:rt;oe.style.left="auto",oe.style.top="auto",oe.style.right="0",oe.style.bottom="0";var tt=oe.getBoundingClientRect();oe.style.left=Zt,oe.style.top=Yt,oe.style.right=Mt,oe.style.bottom=$t,oe.style.overflow=xt,(et=oe.parentElement)===null||et===void 0||et.removeChild(qt);var Je=ne(Math.round(f/parseFloat(ot)*1e3)/1e3),$=ne(Math.round(h/parseFloat(_t)*1e3)/1e3);if(Je===0||$===0||(0,ce.Sh)(L)&&!(0,he.Z)(L))return;var ge=Ft.offset,we=Ft.targetOffset,He=Fe(hn,ge),at=(0,O.Z)(He,2),Ne=at[0],ke=at[1],Y=Fe(Bt,we),be=(0,O.Z)(Y,2),Ie=be[0],Ke=be[1];Bt.x-=Ie,Bt.y-=Ke;var Ve=Ft.points||[],ct=(0,O.Z)(Ve,2),ut=ct[0],Ct=ct[1],Lt=Ae(Ct),Dt=Ae(ut),Nt=le(Bt,Lt),Vt=le(hn,Dt),tn=(0,v.Z)({},Ft),Ut=Nt.x-Vt.x+Ne,bt=Nt.y-Vt.y+ke,ln=Tn(Ut,bt),Qt=Tn(Ut,bt,Le),cn=le(Bt,["t","l"]),Gt=le(hn,["t","l"]),rn=le(Bt,["b","r"]),pn=le(hn,["b","r"]),un=Ft.overflow||{},wn=un.adjustX,kn=un.adjustY,on=un.shiftX,Pt=un.shiftY,Tt=function(Yn){return typeof Yn=="boolean"?Yn:Yn>=0},Rn,Ln,Cn,Sn;Fn();var En=Tt(kn),dn=Dt[0]===Lt[0];if(En&&Dt[0]==="t"&&(Ln>Qe.bottom||Be.current.bt)){var An=bt;dn?An-=h-d:An=cn.y-pn.y-ke;var Wn=Tn(Ut,An),sn=Tn(Ut,An,Le);Wn>ln||Wn===ln&&(!Ue||sn>=Qt)?(Be.current.bt=!0,bt=An,ke=-ke,tn.points=[$e(Dt,0),$e(Lt,0)]):Be.current.bt=!1}if(En&&Dt[0]==="b"&&(Rnln||fn===ln&&(!Ue||On>=Qt)?(Be.current.tb=!0,bt=Wt,ke=-ke,tn.points=[$e(Dt,0),$e(Lt,0)]):Be.current.tb=!1}var Vn=Tt(wn),Kn=Dt[1]===Lt[1];if(Vn&&Dt[1]==="l"&&(Sn>Qe.right||Be.current.rl)){var Nn=Ut;Kn?Nn-=f-p:Nn=cn.x-pn.x-Ne;var zn=Tn(Nn,bt),lr=Tn(Nn,bt,Le);zn>ln||zn===ln&&(!Ue||lr>=Qt)?(Be.current.rl=!0,Ut=Nn,Ne=-Ne,tn.points=[$e(Dt,1),$e(Lt,1)]):Be.current.rl=!1}if(Vn&&Dt[1]==="r"&&(Cnln||ir===ln&&(!Ue||mr>=Qt)?(Be.current.lr=!0,Ut=er,Ne=-Ne,tn.points=[$e(Dt,1),$e(Lt,1)]):Be.current.lr=!1}Fn();var $n=on===!0?0:on;typeof $n=="number"&&(CnLe.right&&(Ut-=Sn-Le.right-Ne,Bt.x>Le.right-$n&&(Ut+=Bt.x-Le.right+$n)));var cr=Pt===!0?0:Pt;typeof cr=="number"&&(RnLe.bottom&&(bt-=Ln-Le.bottom-ke,Bt.y>Le.bottom-cr&&(bt+=Bt.y-Le.bottom+cr)));var Cr=hn.x+Ut,wr=Cr+f,Tr=hn.y+bt,Lr=Tr+h,dr=Bt.x,kr=dr+p,Or=Bt.y,jr=Or+d,Wr=Math.max(Cr,dr),_n=Math.min(wr,kr),Hn=(Wr+_n)/2,sr=Hn-Cr,Zn=Math.max(Tr,Or),Jn=Math.min(Lr,jr),pr=(Zn+Jn)/2,Pr=pr-Tr;x==null||x(Z,tn);var bn=tt.right-hn.x-(Ut+hn.width),Pn=tt.bottom-hn.y-(bt+hn.height);F({ready:!0,offsetX:Ut/Je,offsetY:bt/$,offsetR:bn/Je,offsetB:Pn/$,arrowX:sr/Je,arrowY:Pr/$,scaleX:Je,scaleY:$,align:tn})}}),Ye=function(){pe.current+=1;var et=pe.current;Promise.resolve().then(function(){pe.current===et&&_e()})},re=function(){F(function(et){return(0,v.Z)((0,v.Z)({},et),{},{ready:!1})})};return(0,P.Z)(re,[U]),(0,P.Z)(function(){V||re()},[V]),[I.ready,I.offsetX,I.offsetY,I.offsetR,I.offsetB,I.arrowX,I.arrowY,I.scaleX,I.scaleY,I.align,Ye]}var St=u(19127);function Rt(V,Z,L,U,J){(0,P.Z)(function(){if(V&&Z&&L){let pe=function(){U(),J()};var Se=Z,x=L,C=Ee(Se),Q=Ee(x),I=ve(x),F=new Set([I].concat((0,St.Z)(C),(0,St.Z)(Q)));return F.forEach(function(je){je.addEventListener("scroll",pe,{passive:!0})}),I.addEventListener("resize",pe,{passive:!0}),U(),function(){F.forEach(function(je){je.removeEventListener("scroll",pe),I.removeEventListener("resize",pe)})}}},[V,Z,L])}var Et=u(48736),vt=u(16089);function It(V,Z,L,U,J,Se,x,C){var Q=X.useRef(V),I=X.useRef(!1);Q.current!==V&&(I.current=!0,Q.current=V),X.useEffect(function(){var F=(0,vt.Z)(function(){I.current=!1});return function(){vt.Z.cancel(F)}},[V]),X.useEffect(function(){if(Z&&U&&(!J||Se)){var F=function(){var jt=!1,Zt=function($t){var xt=$t.target;jt=x(xt)},Yt=function($t){var xt=$t.target;!I.current&&Q.current&&!jt&&!x(xt)&&C(!1)};return[Zt,Yt]},pe=F(),je=(0,O.Z)(pe,2),Be=je[0],it=je[1],_e=F(),Ye=(0,O.Z)(_e,2),re=Ye[0],Pe=Ye[1],et=ve(U);et.addEventListener("mousedown",Be,!0),et.addEventListener("click",it,!0),et.addEventListener("contextmenu",it,!0);var oe=(0,fe.A)(L);if(oe&&(oe.addEventListener("mousedown",re,!0),oe.addEventListener("click",Pe,!0),oe.addEventListener("contextmenu",Pe,!0)),0)var dt,pt,ft,ot;return function(){et.removeEventListener("mousedown",Be,!0),et.removeEventListener("click",it,!0),et.removeEventListener("contextmenu",it,!0),oe&&(oe.removeEventListener("mousedown",re,!0),oe.removeEventListener("click",Pe,!0),oe.removeEventListener("contextmenu",Pe,!0))}}},[Z,L,U,J,Se])}var gt=["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 qe(){var V=arguments.length>0&&arguments[0]!==void 0?arguments[0]:se.Z,Z=X.forwardRef(function(L,U){var J=L.prefixCls,Se=J===void 0?"rc-trigger-popup":J,x=L.children,C=L.action,Q=C===void 0?"hover":C,I=L.showAction,F=L.hideAction,pe=L.popupVisible,je=L.defaultPopupVisible,Be=L.onPopupVisibleChange,it=L.afterPopupVisibleChange,_e=L.mouseEnterDelay,Ye=L.mouseLeaveDelay,re=Ye===void 0?.1:Ye,Pe=L.focusDelay,et=L.blurDelay,oe=L.mask,dt=L.maskClosable,pt=dt===void 0?!0:dt,ft=L.getPopupContainer,ot=L.forceRender,_t=L.autoDestroy,jt=L.destroyPopupOnHide,Zt=L.popup,Yt=L.popupClassName,Mt=L.popupStyle,$t=L.popupPlacement,xt=L.builtinPlacements,Ft=xt===void 0?{}:xt,qt=L.popupAlign,Bt=L.zIndex,Kt=L.stretch,hn=L.getPopupClassNameFromAlign,en=L.fresh,xn=L.alignPoint,an=L.onPopupClick,mn=L.onPopupAlign,Ot=L.arrow,Xe=L.popupMotion,l=L.maskMotion,h=L.popupTransitionName,f=L.popupAnimation,d=L.maskTransitionName,p=L.maskAnimation,b=L.className,E=L.getTriggerDOMNode,q=(0,H.Z)(L,gt),K=_t||jt||!1,ye=X.useState(!1),Ue=(0,O.Z)(ye,2),Ge=Ue[0],Le=Ue[1];(0,P.Z)(function(){Le((0,g.Z)())},[]);var rt=X.useRef({}),Qe=X.useContext(Te),tt=X.useMemo(function(){return{registerSubPopup:function(Dn,nr){rt.current[Dn]=nr,Qe==null||Qe.registerSubPopup(Dn,nr)}}},[Qe]),Je=(0,Ze.Z)(),$=X.useState(null),ge=(0,O.Z)($,2),we=ge[0],He=ge[1],at=(0,M.Z)(function(yn){(0,ce.Sh)(yn)&&we!==yn&&He(yn),Qe==null||Qe.registerSubPopup(Je,yn)}),Ne=X.useState(null),ke=(0,O.Z)(Ne,2),Y=ke[0],be=ke[1],Ie=X.useRef(null),Ke=(0,M.Z)(function(yn){(0,ce.Sh)(yn)&&Y!==yn&&(be(yn),Ie.current=yn)}),Ve=X.Children.only(x),ct=(Ve==null?void 0:Ve.props)||{},ut={},Ct=(0,M.Z)(function(yn){var Dn,nr,Nr=Y;return(Nr==null?void 0:Nr.contains(yn))||((Dn=(0,fe.A)(Nr))===null||Dn===void 0?void 0:Dn.host)===yn||yn===Nr||(we==null?void 0:we.contains(yn))||((nr=(0,fe.A)(we))===null||nr===void 0?void 0:nr.host)===yn||yn===we||Object.values(rt.current).some(function(hr){return(hr==null?void 0:hr.contains(yn))||yn===hr})}),Lt=T(Se,Xe,f,h),Dt=T(Se,l,p,d),Nt=X.useState(je||!1),Vt=(0,O.Z)(Nt,2),tn=Vt[0],Ut=Vt[1],bt=pe!=null?pe:tn,ln=(0,M.Z)(function(yn){pe===void 0&&Ut(yn)});(0,P.Z)(function(){Ut(pe||!1)},[pe]);var Qt=X.useRef(bt);Qt.current=bt;var cn=X.useRef([]);cn.current=[];var Gt=(0,M.Z)(function(yn){var Dn;ln(yn),((Dn=cn.current[cn.current.length-1])!==null&&Dn!==void 0?Dn:bt)!==yn&&(cn.current.push(yn),Be==null||Be(yn))}),rn=X.useRef(),pn=function(){clearTimeout(rn.current)},un=function(Dn){var nr=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0;pn(),nr===0?Gt(Dn):rn.current=setTimeout(function(){Gt(Dn)},nr*1e3)};X.useEffect(function(){return pn},[]);var wn=X.useState(!1),kn=(0,O.Z)(wn,2),on=kn[0],Pt=kn[1];(0,P.Z)(function(yn){(!yn||bt)&&Pt(!0)},[bt]);var Tt=X.useState(null),Rn=(0,O.Z)(Tt,2),Ln=Rn[0],Cn=Rn[1],Sn=X.useState([0,0]),En=(0,O.Z)(Sn,2),dn=En[0],An=En[1],Wn=function(Dn){An([Dn.clientX,Dn.clientY])},sn=nt(bt,we,xn?dn:Y,$t,Ft,qt,mn),Wt=(0,O.Z)(sn,11),fn=Wt[0],On=Wt[1],Vn=Wt[2],Kn=Wt[3],Nn=Wt[4],zn=Wt[5],lr=Wt[6],er=Wt[7],ir=Wt[8],mr=Wt[9],$n=Wt[10],cr=Me(Ge,Q,I,F),Cr=(0,O.Z)(cr,2),wr=Cr[0],Tr=Cr[1],Lr=wr.has("click"),dr=Tr.has("click")||Tr.has("contextMenu"),kr=(0,M.Z)(function(){on||$n()}),Or=function(){Qt.current&&xn&&dr&&un(!1)};Rt(bt,Y,we,kr,Or),(0,P.Z)(function(){kr()},[dn,$t]),(0,P.Z)(function(){bt&&!(Ft!=null&&Ft[$t])&&kr()},[JSON.stringify(qt)]);var jr=X.useMemo(function(){var yn=me(Ft,Se,mr,xn);return B()(yn,hn==null?void 0:hn(mr))},[mr,hn,Ft,Se,xn]);X.useImperativeHandle(U,function(){return{nativeElement:Ie.current,forceAlign:kr}});var Wr=X.useState(0),_n=(0,O.Z)(Wr,2),Hn=_n[0],sr=_n[1],Zn=X.useState(0),Jn=(0,O.Z)(Zn,2),pr=Jn[0],Pr=Jn[1],bn=function(){if(Kt&&Y){var Dn=Y.getBoundingClientRect();sr(Dn.width),Pr(Dn.height)}},Pn=function(){bn(),kr()},Tn=function(Dn){Pt(!1),$n(),it==null||it(Dn)},Fn=function(){return new Promise(function(Dn){bn(),Cn(function(){return Dn})})};(0,P.Z)(function(){Ln&&($n(),Ln(),Cn(null))},[Ln]);function jn(yn,Dn,nr,Nr){ut[yn]=function(hr){var qr;Nr==null||Nr(hr),un(Dn,nr);for(var mi=arguments.length,di=new Array(mi>1?mi-1:0),si=1;si1?nr-1:0),hr=1;hr1?nr-1:0),hr=1;hrz in X?se(X,z,{enumerable:!0,configurable:!0,writable:!0,value:Ce}):X[z]=Ce,Ze=(X,z)=>{for(var Ce in z||(z={}))ce.call(z,Ce)&&M(X,Ce,z[Ce]);if(ee)for(var Ce of ee(z))fe.call(z,Ce)&&M(X,Ce,z[Ce]);return X},P=(X,z)=>R(X,B(z));const g=({img:X,buttonProps:z={},styles:Ce={},customText:st,ButtonText:Re,ButtonClick:de,Buttonclass:ae,ButtonTwo:ue,imgStyles:A,loading:w=!1})=>v.createElement("section",{className:"tc animated fadeIn",style:Ze(Ze({},{color:"#999",margin:"100px auto",visibility:w?"hidden":"visible"}),Ce)},v.createElement("img",{src:X||O,style:P(Ze({},A),{pointerEvents:"none",userSelect:"none"})}),v.createElement("p",{className:"mt20 font14"},st||"\u6682\u65F6\u8FD8\u6CA1\u6709\u76F8\u5173\u6570\u636E\u54E6!"),Re&&v.createElement(H.ZP,Ze({className:ae,onClick:de},z),Re),ue&&ue);lt.Z=g},46134:function(Ht,lt,u){"use strict";u.d(lt,{K:function(){return B}});var v=u(59301),O=u(43418),H=u(71839),se={modal:"modal___LGwws",closeIcon:"closeIcon___vsUXI",wrap:"wrap___tDzbl",input:"input___aikQk"},R=u(24334);const B=({visible:ee,width:ce,videoId:fe,file_url:M,course_id:Ze,copyUrl:P,toLog:g=!0,logWatchHistory:X=()=>{},allow_skip:z,onClose:Ce=()=>{},autoPlay:st=!1,onPlayEnded:Re=()=>{}})=>v.createElement(O.default,{centered:!0,keyboard:!1,closable:!1,destroyOnClose:!0,open:ee,title:null,footer:null,width:ce,className:se.modal},v.createElement("i",{className:`${se.closeIcon} iconfont icon-guanbi10`,onClick:Ce}),ee&&v.createElement(H.Z,{onPlayEnded:Re,autoPlay:st,allow_skip:z,courseId:Ze,src:M!=null&&M.startsWith("http")?M:R.Base64.decode(M),videoId:fe,toLog:g,logWatchHistory:X}))},71839:function(Ht,lt,u){"use strict";u.d(lt,{Z:function(){return z}});var v=u(59301),O=u(8591),H=u(38854),se=u(29382),R=u(40846),B=u(24065),ee=u(56102),ce=u(4901),fe={watermark:"watermark___hNYlv",videovideo:"videovideo___ovOkV",animate__loop:"animate__loop___mvL6s",upDown:"upDown___SlgHv",container:"container___g1WYG","video-container":"video-container___XPkWR","video-controls":"video-controls___to0Zq",hide:"hide___NA3DV","video-progress":"video-progress___gqHsd",seek:"seek___iZHBm","seek-tooltip":"seek-tooltip___uWyXx","bottom-controls":"bottom-controls___uoIBm","left-controls":"left-controls___mBEx4","right-controls":"right-controls___e9L6r",rateOverlay:"rateOverlay___HHBWe",controlText:"controlText___M_BWR","volume-controls":"volume-controls___fa3mE","fullscreen-button":"fullscreen-button___ur0es","fullscreen-button1":"fullscreen-button1___rfaXm","pip-button":"pip-button___GFO8W","playback-animation":"playback-animation___ndURq",volume:"volume___OTmpP",hidden:"hidden___o7GkT"},M=(Ce,st,Re)=>new Promise((de,ae)=>{var ue=j=>{try{w(Re.next(j))}catch(N){ae(N)}},A=j=>{try{w(Re.throw(j))}catch(N){ae(N)}},w=j=>j.done?de(j.value):Promise.resolve(j.value).then(ue,A);w((Re=Re.apply(Ce,st)).next())});function Ze(Ce){if(isNaN(Ce))return{minutes:"00",seconds:"00"};const st=new Date(Ce*1e3).toISOString().substr(11,8);return{hour:st.substr(0,2),minutes:st.substr(3,2),seconds:st.substr(6,2)}}Object.defineProperty(HTMLMediaElement.prototype,"playing",{get:function(){return this.currentTime>0&&!this.paused&&!this.ended&&this.readyState>2}});function P(Ce,st){return Ce-st}function g(Ce){Ce.sort(P);let st=0;for(let Re=0;Re{},handlePlay:j=()=>{},handlePlayEnded:N=()=>{},autoPlay:De=!1,onPlayEnded:Te=()=>{},isShowWaterMark:ze=!0},Me)=>{var he;st=st==null?void 0:st.replace("http://","https://");const me=((he=st==null?void 0:st.split("."))==null?void 0:he.pop())==="flv",T=(0,v.useRef)(),ve=(0,v.useRef)(),Ee=(0,v.useRef)(),ne=(0,v.useRef)(),Oe=(0,v.useRef)(),xe=(0,v.useRef)(),te=(0,v.useRef)(),Fe=(0,v.useRef)(),Ae=(0,v.useRef)(),le=(0,v.useRef)(),$e=(0,v.useRef)(),nt=(0,v.useRef)(),St=(0,v.useRef)(),Rt=(0,v.useRef)(),Et=navigator.userAgent.toLowerCase().match(X),vt=Et?Et[0]:"pc",It=(0,v.useRef)(!1),gt=(0,B.eY)();let qe=0,yt=0,V=0,Z=null,L=!1,U=20,J=1,Se=!1,x=!1,C=[];(0,v.useImperativeHandle)(Me,()=>({getLastUpdatedTime:()=>T.current.currentTime,getDuration:()=>T.current.duration})),O.ZP.config({maxCount:1,getContainer:()=>Ee.current});const Q=(0,v.useCallback)((_e,Ye=!1)=>{let re={point:T.current.currentTime};Z?(re.log_id=Z,re.watch_duration=g(C),re.total_duration=yt):(ue?(re.video_id=parseInt(de,10),re.course_id=ue):re.video_id=de,re.duration=qe,re.device=vt),Ye&&(re.ed="1");function Pe(){return M(this,null,function*(){Se=!0,Z=yield ae==null?void 0:ae(re),Se=!1,_e&&_e()})}Pe()},[de,ue]);(0,v.useEffect)(()=>{T.current&&(ne.current.style.display="none",Oe.current.style.display="block"),O.ZP.destroy();let _e=null;return se.Z.isSupported&&me&&st&&(st==null?void 0:st.indexOf(".m3u8"))<0?(_e=se.Z.createPlayer({type:"flv",volume:.8,cors:!0,url:st,muted:!1}),T.current&&(_e.attachMediaElement(T.current),_e.load())):T.current.setAttribute("src",st),F(),()=>{_e&&(_e.unload(),_e.pause(),_e.destroy(),_e=null)}},[T,me,st]);function I(){T.current.paused?(ne.current.style.display="none",Oe.current.style.display="block"):(ne.current.style.display="block",Oe.current.style.display="none")}function F(){$e.current.style.display="none",St.current.style.display="none",nt.current.style.display="none",T.current.muted||T.current.volume===0?$e.current.style.display="block":T.current.volume>0&&T.current.volume<=.5?St.current.style.display="block":nt.current.style.display="block"}(0,v.useEffect)(()=>{const _e=document.getElementById("play"),Ye=document.querySelectorAll(".playback-icons use");function re(){j(),A&&!It.current&&(T.current.currentTime=A),It.current=!0,C.push(T.current.currentTime),L||(L=!0,Re&&Q())}function Pe(){return M(this,null,function*(){I(),C.push(T.current.currentTime),Re&&Q(()=>{Z=null,V=0,L=!1,Se=!1,x=!1,C=[],yt=0,J=1},!0),Te()})}function et(){xe.current.value=Math.round(T.current.currentTime),te.current.value=Math.round(T.current.currentTime)}function oe(){const xt=Ze(Math.round(T.current.currentTime));Ae.current.innerText=`${xt.hour>0?xt.hour+":":""}${xt.minutes}:${xt.seconds}`,Ae.current.setAttribute("datetime",`${xt.hour>0?" "+xt.hour+" ":""}${xt.minutes}m ${xt.seconds}s`)}function dt(){var xt,Ft,qt,Bt,Kt,hn,en;const xn=Math.round((xt=T.current)==null?void 0:xt.duration);(qt=(Ft=xe.current)==null?void 0:Ft.setAttribute)==null||qt.call(Ft,"max",xn),(Kt=(Bt=te.current)==null?void 0:Bt.setAttribute)==null||Kt.call(Bt,"max",xn);const an=Ze(xn);Fe.current&&(Fe.current.innerText=`${an.hour>0?an.hour+":":""}${an.minutes}:${an.seconds}`,(en=(hn=Fe.current).setAttribute)==null||en.call(hn,"datetime",`${an.hour>0?" "+an.hour+" ":""}${an.minutes}m ${an.seconds}s`))}function pt(){try{const xt=Math.round(T.current.duration);xe.current.setAttribute("max",xt),te.current.setAttribute("max",xt);const Ft=Ze(xt);Fe.current.innerText=`${Ft.hour>0?Ft.hour+":":""}${Ft.minutes}:${Ft.seconds}`,Fe.current.setAttribute("datetime",`${Ft.hour>0?" "+Ft.hour+" ":""}${Ft.minutes}m ${Ft.seconds}s`),et(),oe();const{width:qt,height:Bt,x:Kt,y:hn}=ve.current.getBoundingClientRect();if(Kt<0||hn<0||!qt)return;if(!x){let en=T.current.currentTime,xn=en-V;Math.abs(xn)<10?(yt+=Math.abs(xn),V=en,Se||yt-J*U>=0&&(J++,C.push(V),Re&&Q())):(V=en,Re&&Q())}}catch(xt){console.log(xt)}}function ft(){x=!0}function ot(){T.current.playing&&C.push(T.current.currentTime,V),V=T.current.currentTime,x=!1}function _t(){qe=T.current.duration,qe<=20&&(U=qe/3),T.current.addEventListener("play",re)}function jt(xt){xt.preventDefault(),(0,ce.vp)()?(T.current.style.width="100%",T.current.style.height="100%"):T.current.style.cssText=""}function Zt(){w()}function Yt(xt){if(!Ce){O.ZP.warning("\u8BE5\u89C6\u9891\u7981\u6B62\u5FEB\u8FDB/\u540E\u9000\u64AD\u653E");return}const Ft=xt.target.dataset.seek?xt.target.dataset.seek:xt.target.value;T.current.currentTime=Ft,te.current.value=Ft,xe.current.value=Ft}function Mt(xt){const Ft=Math.round(xt.offsetX/xt.target.clientWidth*parseInt(xt.target.getAttribute("max"),10));xe.current.setAttribute("data-seek",Ft);const qt=Ze(Ft);le.current.textContent=`${qt.hour>0?qt.hour+":":""}${qt.minutes}:${qt.seconds}`;const Bt=T.current.getBoundingClientRect();le.current.style.left=`${xt.pageX-Bt.left}px`}function $t(xt){switch(xt.code){case"Space":xt.preventDefault(),Be();break;case"ArrowRight":if(xt.preventDefault(),!Ce){O.ZP.warning("\u8BE5\u89C6\u9891\u7981\u6B62\u5FEB\u8FDB/\u540E\u9000\u64AD\u653E");break}if(T.current.currentTime>=T.current.duration)break;T.current.currentTime=parseInt(T.current.currentTime)+5,et();break;case"ArrowLeft":if(xt.preventDefault(),!Ce){O.ZP.warning("\u8BE5\u89C6\u9891\u7981\u6B62\u5FEB\u8FDB/\u540E\u9000\u64AD\u653E");break}if(T.current.currentTime===0)break;T.current.currentTime=parseInt(T.current.currentTime)-5,et();break;case"ArrowUp":xt.preventDefault(),T.current.volume<1&&(T.current.volume=(parseInt(T.current.volume*10)+1)/10);break;case"ArrowDown":xt.preventDefault(),T.current.volume>0&&(T.current.volume=(parseInt(T.current.volume*10)-1)/10);break}}return Ee.current.addEventListener((0,ce.gH)(),jt),T.current.addEventListener("canplay",_t),T.current.addEventListener("ended",Pe),T.current.addEventListener("seeking",ft),T.current.addEventListener("seeked",ot),T.current.addEventListener("loadedmetadata",dt),xe.current.addEventListener("mousemove",Mt),xe.current.addEventListener("input",Yt),T.current.addEventListener("timeupdate",pt),T.current.addEventListener("pause",Zt),T.current.addEventListener("volumechange",F),document.addEventListener("keydown",$t),()=>{var xt,Ft,qt,Bt,Kt,hn,en,xn,an,mn,Ot,Xe;(xt=T.current)==null||xt.removeEventListener("canplay",_t),(Ft=T.current)==null||Ft.removeEventListener("play",re),(qt=T.current)==null||qt.removeEventListener("ended",Pe),(Bt=T.current)==null||Bt.removeEventListener("seeking",ft),(Kt=T.current)==null||Kt.removeEventListener("seeked",ot),(hn=xe.current)==null||hn.removeEventListener("mousemove",Mt),(en=xe.current)==null||en.removeEventListener("input",Yt),(xn=T.current)==null||xn.removeEventListener("timeupdate",pt),(an=T.current)==null||an.removeEventListener("pause",Zt),(mn=T.current)==null||mn.removeEventListener("loadedmetadata",dt),(Ot=T.current)==null||Ot.removeEventListener("volumechange",F),document.removeEventListener("keydown",$t),(Xe=T.current)!=null&&Xe.playing&&(C.push(V,T.current.currentTime),Re&&Q())}},[T,st]),(0,v.useEffect)(()=>{if(T.current.onended=()=>{N(T)},T.current.oncontextmenu=()=>!1,(st==null?void 0:st.indexOf(".m3u8"))>-1){if(T.current.canPlayType("application/vnd.apple.mpegurl"))T.current.src=st;else if(R.ZP.isSupported()){var _e=new R.ZP;_e.loadSource(st),_e.attachMedia(T.current)}}},[st]);const[pe,je]=(0,v.useState)(1),Be=()=>{T.current.paused||T.current.ended?T.current.play():T.current.pause(),I()};function it(){T.current.muted=!T.current.muted,T.current.muted?(Rt.current.setAttribute("data-volume",volume.value),Rt.current.value=0):Rt.current.value=Rt.current.dataset.volume}return v.createElement("div",{style:{position:"relative"},ref:Ee},v.createElement("div",{ref:ve,className:`${fe.watermark} animated_alternate animate__animated_10s animate__infinite animate__stepstart ${fe.animate__loop}`},ze&>?gt.login:" "),v.createElement("div",{className:fe.container},v.createElement("div",{className:fe["video-container"],id:"video-container"},v.createElement("div",{className:fe["playback-animation"],id:"playback-animation"},v.createElement("svg",{className:fe["playback-icons"]},v.createElement("use",{className:"hidden",href:"#play-icon"}),v.createElement("use",{href:"#pause"}))),v.createElement("video",{className:fe.video,id:"video",preload:"auto",disablePictureInPicture:!0,ref:T,autoPlay:De}),v.createElement("div",{className:`${fe["video-controls"]} `,id:"video-controls"},v.createElement("div",{className:fe["bottom-controls"]},v.createElement("div",{className:fe["left-controls"]},v.createElement("button",{"data-title":"\u64AD\u653E/\u6682\u505C",id:"play",onClick:Be},v.createElement("svg",{className:fe["playback-icons"]},v.createElement("use",{ref:Oe,href:"#play-icon"}),v.createElement("use",{ref:ne,style:{display:"none"},href:"#pause"}))),v.createElement("div",{className:fe.time},v.createElement("time",{id:"time-elapsed",ref:Ae},"00:00"),v.createElement("span",null," / "),v.createElement("time",{id:"duration",ref:Fe},"00:00"))),v.createElement("div",{className:fe["right-controls"]},Ce&&v.createElement(H.Z,{placement:"top",overlayClassName:fe.rateOverlay,getPopupContainer:_e=>_e.parentNode,menu:{items:[{key:"1",label:v.createElement("span",{onClick:()=>{je(1),T.current.playbackRate=1}},"1.0x")},{key:"2",label:v.createElement("span",{onClick:()=>{je(1.5),T.current.playbackRate=1.5}},"1.5x")},{key:"3",label:v.createElement("span",{onClick:()=>{je(2),T.current.playbackRate=2}},"2.0x")}]}},v.createElement("div",{className:`${fe.controlText} mr5`},"\u500D\u901F")),v.createElement(ee.CopyToClipboard,{text:st,onCopy:()=>O.ZP.success("\u590D\u5236\u6210\u529F")},v.createElement("button",{"data-title":"\u590D\u5236\u94FE\u63A5"},v.createElement("i",{className:"icon-lianjie2 iconfont",style:{fontSize:"12px",color:"white"}}))),v.createElement("div",{className:fe["volume-controls"]},v.createElement("button",{"data-title":"\u5F00\u542F/\u5173\u95ED\u58F0\u97F3",className:fe["volume-button"],id:"volume-button",onClick:it},v.createElement("i",{ref:$e,className:"icon-a-bianzu8 iconfont",style:{fontSize:"14px",color:"white"}}),v.createElement("i",{ref:St,className:"icon-shengyinkaibeifen iconfont",style:{fontSize:"14px",color:"white"}}),v.createElement("i",{ref:nt,className:"icon-shengyinkai iconfont",style:{fontSize:"14px",color:"white"}})),v.createElement("input",{className:fe.volume,id:"volume",value:"1","data-mute":"0.5",type:"range",max:"1",min:"0",step:"0.01",ref:Rt,style:{display:"none"},onClick:F})),v.createElement("button",{"data-title":"\u5168\u5C4F/\u9000\u51FA\u5168\u5C4F",className:fe["fullscreen-button"],onClick:()=>{(0,ce.vp)()?(0,ce.BU)():(0,ce.Dj)(Ee.current)}},v.createElement("i",{className:"icon-fangda1 iconfont",style:{fontSize:"12px",color:"white"}})))),v.createElement("div",{className:fe["video-progress"]},v.createElement("progress",{ref:te,value:"0",min:"0"}),v.createElement("input",{className:fe.seek,ref:xe,value:"0",min:"0",type:"range",step:"1"}),v.createElement("div",{className:fe["seek-tooltip"],ref:le,id:"seek-tooltip"},"00:00"))))),v.createElement("svg",{style:{display:"none"}},v.createElement("defs",null,v.createElement("symbol",{id:"pause",viewBox:"0 0 24 24"},v.createElement("path",{d:"M14.016 5.016h3.984v13.969h-3.984v-13.969zM6 18.984v-13.969h3.984v13.969h-3.984z"})),v.createElement("symbol",{id:"play-icon",viewBox:"0 0 24 24"},v.createElement("path",{d:"M8.016 5.016l10.969 6.984-10.969 6.984v-13.969z"})),v.createElement("symbol",{id:"volume-high",viewBox:"0 0 24 24"},v.createElement("path",{d:"M14.016 3.234q3.047 0.656 5.016 3.117t1.969 5.648-1.969 5.648-5.016 3.117v-2.063q2.203-0.656 3.586-2.484t1.383-4.219-1.383-4.219-3.586-2.484v-2.063zM16.5 12q0 2.813-2.484 4.031v-8.063q1.031 0.516 1.758 1.688t0.727 2.344zM3 9h3.984l5.016-5.016v16.031l-5.016-5.016h-3.984v-6z"})),v.createElement("symbol",{id:"volume-low",viewBox:"0 0 24 24"},v.createElement("path",{d:"M5.016 9h3.984l5.016-5.016v16.031l-5.016-5.016h-3.984v-6zM18.516 12q0 2.766-2.531 4.031v-8.063q1.031 0.516 1.781 1.711t0.75 2.32z"})),v.createElement("symbol",{id:"volume-mute",viewBox:"0 0 24 24"},v.createElement("path",{d:"M12 3.984v4.219l-2.109-2.109zM4.266 3l16.734 16.734-1.266 1.266-2.063-2.063q-1.547 1.313-3.656 1.828v-2.063q1.172-0.328 2.25-1.172l-4.266-4.266v6.75l-5.016-5.016h-3.984v-6h4.734l-4.734-4.734zM18.984 12q0-2.391-1.383-4.219t-3.586-2.484v-2.063q3.047 0.656 5.016 3.117t1.969 5.648q0 2.203-1.031 4.172l-1.5-1.547q0.516-1.266 0.516-2.625zM16.5 12q0 0.422-0.047 0.609l-2.438-2.438v-2.203q1.031 0.516 1.758 1.688t0.727 2.344z"})),v.createElement("symbol",{id:"fullscreen",viewBox:"0 0 24 24"},v.createElement("path",{d:"M14.016 5.016h4.969v4.969h-1.969v-3h-3v-1.969zM17.016 17.016v-3h1.969v4.969h-4.969v-1.969h3zM5.016 9.984v-4.969h4.969v1.969h-3v3h-1.969zM6.984 14.016v3h3v1.969h-4.969v-4.969h1.969z"})),v.createElement("symbol",{id:"fullscreen-exit",viewBox:"0 0 24 24"},v.createElement("path",{d:"M15.984 8.016h3v1.969h-4.969v-4.969h1.969v3zM14.016 18.984v-4.969h4.969v1.969h-3v3h-1.969zM8.016 8.016v-3h1.969v4.969h-4.969v-1.969h3zM5.016 15.984v-1.969h4.969v4.969h-1.969v-3h-3z"})),v.createElement("symbol",{id:"pip",viewBox:"0 0 24 24"},v.createElement("path",{d:"M21 19.031v-14.063h-18v14.063h18zM23.016 18.984q0 0.797-0.609 1.406t-1.406 0.609h-18q-0.797 0-1.406-0.609t-0.609-1.406v-14.016q0-0.797 0.609-1.383t1.406-0.586h18q0.797 0 1.406 0.586t0.609 1.383v14.016zM18.984 11.016v6h-7.969v-6h7.969z"})))))})},85057:function(Ht,lt,u){"use strict";u.d(lt,{jL:function(){return R},w9:function(){return $e},QD:function(){return oe},cQ:function(){return xe},op:function(){return it},O5:function(){return mn},_b:function(){return jt},t7:function(){return Re},Gi:function(){return It},YG:function(){return Et},qp:function(){return Ze},vr:function(){return ft},qE:function(){return re},Je:function(){return ue},wb:function(){return T},cq:function(){return L},tp:function(){return X}});var v=u(59301),O={flex_box_center:"flex_box_center___NeSU8",flex_space_between:"flex_space_between___ImTGl",flex_box_vertical_center:"flex_box_vertical_center___BtRd9",flex_box_center_end:"flex_box_center_end___qcLe3",flex_box_column:"flex_box_column___Ze_3q",banner:"banner___PoUBO",content:"content___XoDjy",btns:"btns___Pb35j"},H="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAE4AAAA0CAYAAAAkEw66AAAAAXNSR0IArs4c6QAAGNVJREFUeF7VmwmwHVWdxr9zuvvu9+3ZXsxCiNkIQZOwEzMgyADjggsWgzPqOAJaMiCjYiGKqDBQAo4iWGAxA+ooMm7gBhSyhBBRIIBSAQlrHuTt7913t97PmfpOd4cXlLAFGO6rW9237719+/z6+6/nPIHX+XHttddaex38nlW2lLO1svq1wJ4aeFMM9CqFnNKoaYVapDAOicfjGEMKqKk2nrx59Lbt5xx6aPR6DEG8Hj/K3xwY0YtjSx2vYnlspLEsX0BRKUBrINtyX+PZp0r3fR+IIgzFSo9EsahFUfSHWIj7Pa919zvf2vlo+rFXdWivObjHJvR8S6vTJORHckV0+4GBAF4InwQlBCAIkEMXgCLA9Mn9WCef4ft8HWkgVIDn6ckwUA/HQfCzoFX71TsP6n/41aL3moHTWotnJnGysPEFx8ZcAtMqGTjh2NmVTL+iDB6BZurjsRSe2SogjhNwMZIngbZbqgXom8N26/KjV3femB7ebRxfE3DbRnW/k8c3LQvv5yCjOFVVqhgCyNnJmAhoxyOFasz1OeCM2lLTJryI4BQQUn1RAhI24Lc1dBjc2K6Nnv2edfP+sLvIvergxqb0vpHA1fk8lre9xBZpZsYKU9sMYiDvAHKaqU4HuANcZrIpcILiezRdo7z0aUw3BoJYI4gELAeI/bjZmBq9+PGNd5x/+unHua8U4KsKbriujxUSV9gW+rwg9WPTfpHgpEgUQgAFJwU6LSDwjSxA8F2jslSBBJaZKwVGJRv1pSAJLyQ8qlwLOA4Q1us31Z58+OTj3rX/E68E3qsGbmhK/6Nt40oIFMJwZ5URFh/cZoGgHQKODeSsaUEiA5iSy6IqYRnfmPq66YojPILbYbqpGXuhRhRrFPMSUaP+6OTAtuPff8ze97xceK8KuJGG/oBl4XsaKMTTsiwDKVXZjm1qsgRBU84TXi5VXqo24/syP5ce2xEg0gBDeAZWFijo79JnpLQxXSo7iICiIyD8qUfdxuQRRx24x5MvB95uBzfW1G+XFn4GoMMojQNOYWUK45b+jG9mW+PvFNAKEkqVYgI583VZcOB7WRrCqGwiaQovU1lAlaXKM/BMQNIGbN0FLGh0lySCVv0OP3aPOnKf2a2XCm+3ghuc1AvzOdwmLSwIwkQlBoxMtgZYCkvwQLafBYo0l2v6gBcCxRxQyifwM9PckRCniXIGbjo8wiI4bgnRRFul0XAZMABbaggVoytvo12vff7Qt/Rc8LqBm5jQndrBr3MFHOwyemaJbGaaAKzMp00zV2O+6VVnSTCPcYCNdrItEGAOcKxpVUQKLjPZ6VHVgEuf3Kf/rLk0Y4ViTpiAEUYKJaEgVDg2OTq1+j3r5w68FHi7TXFDU/El1Yr8VLudDM4IjUpLVWW2Mg0GgubybATNfN/0C5+eqjQ9oO0ngAmR0ZF5X2bKjLRZBUFgNE03AKhcPqk62wJsm+qjvyM4Aa0idFN1zcmvHraq90uvObihqej4YsH6nzCEyHwRB0WFZeZJ05xupsZSp6sty+2mXX2a/5rP0fT8MAHRZpmWph48J38zi6xUF1Vqft9KAg2BES6PmyChGGFTBVJ1kb/dq7XeeuTBs0deLLxXrLhHn2nP6+4s3Gk7Yl6Q5mpZMMjAGWjT0o+dgkR6BVnUzJSW2PpzhpHVqIygdPiEET3rzwiHP2QCSlrjUm1epE0el+R1/E6SmjDa2nGEat5Bu9089bC9O7/1moDT0GJkMv5eR6f1oVY7MRfjp2SiNgOO5pkFBpnkadmD/qflRrAtiUrBhJFdPnauJhI6SU6noXSyb2BmUZUqzYKEqSSSZ6SUSU34WagYVUsg9N27R7DtkONWrmRcf8HHK1Lc4EjrqHJn6ZdxBIsXkXU2MqVZqU/ja5ZU/MyWR5/Bps1/wfD2p+G7TUy1QziWRHfZgVXsREd3H1YtnoW+vl709nSjv7f0V4MwPnRaRUGlxSm8rG7N0pAMlim/CE4Jk+tRbTxmAoYK4Qit/Mhb9/a9eze9ILW/YQwv5jvmM/fcs720YMnMDeWStabtJrmVUVaqtsy3sRqgAm+96yH85qbb4DZqWNjfi57uHlRKJViWjSCM0Wr5aDRaqDebqDeaqLkRLFugp7OIQudMrFn+JvT3z8Ee8+dgVldxp+tkpUB42ZZgqLrEnyUq89MkODkunjVVoREFMao5G367een6lZ2fejEQXrbiBgbbn+qZUbyETcWs2KZ/Ynsoi6aMgEPjLVz6Xz/B1OjT2P8tyzB7Zm/i6IMQYRghDGk2ielkLaKIPiiM4PshGk0XzWYDU40a6m6Ickmi3N2Lt+y1B5a+eQ+sXLIQM7rLxi1QiR47I2l3xPizFFyitsQnmqhq8juNks1go2BrDRG4WwMv3veItT1TLwTvZYH7w0NP9y7sn3NPqSgXMiCYRuNz1MbE9eEnRnDhpVdh1fxu7L1iCYIwghcECKMYUfaMY4Rh8jogxJgQNQjP+CECpUK4H8bwPR8tgmzW0Ao8lEsW+vrn4sA1S7Fs2VKsXDIP1UrO3BymMD7PEwvj6wJjnjTTJFAEsUJOJj4y8iMUWIfE8bp1Kzs2virgtg23PtHTV7os9JI0wASFNPWg4vI54LGBMZz/je/i71YvQv/sWXA9D2EYIooiAzCOYoRxDM/z4Xo+PC+Az2MR31NpkU4fpKGUQKRkoiSCjCSiSCAKVPLddgON9hQsK0TXjA7su3YVDjt0Hdbu82ZzbQYgVZb6OJOW0GQjZW54XtACInTkHXjt5kXr9+r4zG4Hd/bZZ8uTTz1rY7liHxiHiR9h+sFAQHNxJMulCGed/x2jtHlv6ofruogILaZpEl6MIAiML2u1XQRhaIDxeKZGqoEAObgoTkBGkUp7bvRRfC0QRpZRkYqk6SjHcYDQryNXVNj/oLX4yIc/iMULZyVVSFr0GxVmlQWDg0xSFG5j372rV1fXr1wpdhldX7Kpbn2mtbqrs7jRkqLIC6VDzgIBwZUKwGXfuwFjA49g331WoO26CSwDh/BieK6HyakaPM9LTZbv0WQJL0r2o9ioMkhN2gDka0JkDhYpExW1FtCQEMKGlg6gbWhTxjPFaKBvZgUfP/njOHz9WrRS5QXG9AkvzeXoHxXrVw0n9puxEm8+dGVlaFeqe8ngBifiT1Y65aUha7+0+M7Sj0IeeOixYXznO1fiHQfvY1REs4wiBoIAcRQZkBOTk/B9P1GSCRBBoraQn/dTmDxOiATGLV+nioxjA49wINjAY4YtIaQFwX1hQYtkn/AtW+Okfzsdf/+OA9H2Uj+XdoiZltBebaGh2a9DrONYvfdtK8q/2L3gaurXxaI4WqUJJH2ETTPltVsaX73wvzG7IjGrrwce4RhoieKCMMDY+LiBZ2AwGJjAQKg0Sx6jCrWBmQAlTJo3vx+ZvIvOXLBEEAJCMPFNQrkBBwnNfcuGMFAFlIqRyxdw+he/gv1WL0PDTftzSicd41jBYaURa/SUHLTrjc+vX9mxy47JS1LcpoGB4qKOuZvzebFMpyUPT0BoTD023P0wfvWL67DfPsvhut4O80z8Woip+hQma41UWVQRDMwEXIQ43Se4OApSYEAYeAijwADSmp1RghPGt3Kb5MMJxEx9VJ2QNu8mYNlQUYj+hUtx9nnnolIpw83KrrSSMOCURmfOQejWr37bis6P7DbFba/ptZal77SlyPFy6WC5ZedBKYWLLrkKs6oOCvl8AoR+zWwjeL6L4dFRuJ5CEGpTsEeBQBD4iFWMWEWIwjpU6Ca+kNswNll+zCgECSkcKM02CQtS/nK0oxPDFDzRIYFSfYRIcFRfzgDktRz7z5/E8Scci7ar0g4xc0aePen0VaSAiLxHutVTe6/cRfn1khQ3OBEdU6xYv4oZbzjJopJISrX96aFtuOaH12D5ogXw/QABVZQFhCDC5NQ4xienEIQCbijh+RKTvXPhVYrIPTGAXLOOOJ4AwhAxzTKomTTEdHy1l/guc5voWTmXSPWFSVAwf7FRH83YuD5jxgQooS3HqE9Bomf2fJx9wcXo7KjAp3swLSZApjPeJUvDioLBkttYvHZtf/v5VPeSwD09Fp9Z7pDnEhzvD1MEqo2d2ut+swEPbr4fM3p7jIqYbhjlBKHxdcMjQ0ZtXmjDbSsMLFqJx048AWDWv/kvWPjNy2DXB5hXAHEIpZqwZNVct1INSFkyoJRyE1g6hjaFnp2IDyrxezqFaMClHQdjsjljsrzuk8/4Cg46ZF9zPQYc05k0qpYswFH+uCW9VYcsm7F994CbiL5fKlkf4lyC1nSswnRlWcBfftVP0RgZRqGQR2jKKd/4JZrpxOQExicmEIQWvDCHhu9gyz99FN76VQCt0AZmnnUxSg/cAUuGEKoJaBdSZjVpBCk7EnDahxRlKHCfjbccNPMis29mWSGMH6TqNKQxWStJVayccQvrjv4ATj7lRLTcpL1k2kym0GUJJlASvuvo6JADV3RtfsngbtXa3gsoBA3k3Rakb8GtiuiaUtk+xveUqRjoU9gmKuYFLr/yGkwMjSBH5xrQ4dNPBaYiGBwehOu24QUCXuhgSnTjsTPOQDxvRjqjrNB31tdRfvwB5O0cEI9BaA9SVhCpGqA56+NAa/oIC5AER2XlmfdDhT60FLBoxlYAof0UnjLukAo1arPyxhev2vcAnHbWOSaJNmWe6elRCAm4TukrS0XvOGivrt+9aHDba8GaQt56r4A8XADztYIVKgimXH6M7iDUebackzJLIm8LlIsSP/jRz/HU1ieQcywDLnHwAWq1BsbGR5M6lYrzJEZmLsHw5z8LlOm0AWwfQ885X0Ol/oypHRFPwpZF2FYXwngEgoBEHpEaNwpTyJsqROsCgupMtFeshLt8Oap/ug8d998CKQgvgICfRFppm/QEBAdg1oIlOOMrF6BcLsAPlCnHIjPvClQcgW4nhFThPxy8ovPXLwjugaGh8uxyzwXlvPOxsoPC9PUaZpYoLZobHtAMtAEhoVDKSXSUHdy+YSN+d9MGFKm4NK0gwKHhUTSaNZPL+ZEFzwXGVrwNk6edlkDjHMLmrei78DzkLR8W18qoEUiRgxR5xKoJ2+ox4EJVh5B9UDqPel8vWgccAW/Naug5Myk84OkJzDn3FOTbIwacFASXJMSC/XOZhxISHTP6ceZ5F6GzuxNekEb5IKlIOvISvU7AhPiog5ZVbtgluE0DurigHPx4RnfunXQXbNJm8wEZQAYCphDs99c9YMqDKbALtjJNyNGRQVx++dWwtDA5GHMyz/ewfXAYntdE4AfwjFkINHsXY+JzXwPmdptGXunKH6D79uuRzxVhqwBKDSFnzTTRNIrHIQXz+RAxTVF1obFqPcY/ehLQVU2CLG+AApwNGzHjR99GTk0Bqg0pvCQ9sRxIY6o5aGmjWOnCmed/A70zZ8INmCpxbGwoAF0Fgd5cEBVkfNj+Szvu2CW4rUPumTN6C+faCijwxqTTeNmXssV+bM1w9oiqm2wToELgt1AtSHQULVxzzU/w5/u2mKUMcRCg3W7hmeFhBF4rKaPY6WDGJDrQnrcUrdX7wRkcQuXe22HHU7CFgDT+zE/AKR9au7CsPkSqAWWiaieG3nkCvPe9G+DSGQrqwUdRuHUjylvvQS4ahaObELoBAVqFSCsJzto4Jkg4OQdn/sd/ord/Plw/MtAIj5Y1oywxq+DXrThae8CKzq3PC+6ux4dndRZ67uut2nM68sn6jWxtx/QvZebKiWKCq7WAmtm2IZSPGR0FjI9uxxVXfB+tqTokYgNu++AQVOSZ1EErunSWRBXTyYASkLIAbdGnMBhI6Lhu5COlA61Ck39JUTHRVAtO73ej0TMbEyeeBj1vjlGauP8RVL7/A+SDQdiowVF1SN02UVaa2fAkl2NU5TNnC5z+5QswY/5iuG4EN1KmhtWxwNwuBws7w+G85S1ftaBr8nnB3f1Y8/hqtfzDzhzQU0qm0v4WOLam6ecIjl2GWhuYaFF5IcamJtFZtNDX4WDzvZvxv9dej9BzoaIIo+Oj0FEAzSxfhyYSa50W5iAU20RNafIuwmol/k0yGPAGJJ0OZSJqHkqWEcU22vPegua/nAR0dxvVWZv+iI6fXomcrsNRDWhNU9UmAWZoVVYOgsFBOCjlLXzqjC+ia+6eaHsRmp5GMScxu8NCf4eF7qKIRBQ8mnfkz4PQ/83SuX/d2BSbHmne3Fktv72vDHQUEsWxGnjuIwPH3hf93FQbGKnTXDUeGhiCFDFmVHPoKlu49dYN+O1vb4alYozXpqBjggvNBHDyYIHDhJVQ+IiSYolFuXHqBQhGT+VCWiUTGaOYQIuIhYWQ34tLcBeugH/ch4DuXmBkEJXvXoB8ewwWXGiT77GWSBoA9G9cKBcLB92dFZx02umI8r0m9Vszv4QVsx10FYUZu7GuNHeuN1XkB9FN7Xbwmb0XVh/KuIhNWwOvs2Tn+6rCZAecITezU9PWc5i0Ml0JZKbfwsTHDU0Bky6wYcs20w7qrThGeaW8xJ0bN+HW2+5Eo9k0lQT9jWkEMVHl2dnhoNp4VLBc4uI4JrKRAcgEO7HDXFLQE64oGNz0k0pUkvUhCxZDrz4A4tEHkXvwLtgihNSJa0gEQNfAXp0NZTnGVSxeuADHHHcCpJXD+9f0YcUc2zRgn6sXnr9O3yeBlqeGJyfDE1cvKlxvkuvfP6512QF6y8kCFwYHllHZsgSezAwh7ZhyPIRHH/fMJDDWAn72x8dQb7XRVbZNoKgWLBRyAvfe/wBuuf0u1CYnIWVaQ9K5pRMrdNw8v5khM2rjZ2iYVGJWfxJunJbwBGjm0kx6ohj/zQpryyS82lKQpopgI0AnLodmaop9C4rVAwTWH3wgluy9Fh/cbxbWLSqa6idbJfpcS3PNupNkQnuioVrDk976I1eV7xW3b2lvL5eKczoLQKWQrIqk6rIeWwYuWw1kymwFTLaAgQlgsK5xxa1bUGu66ChYqOSpXMss4Ms5EtsGnsatGzahMTaWhutsLWsaug2s7F5nix7S/CKZ/08L+7RlZMqpDJ4hk62JShWbLj805Ve2II9zlCbJQqW7C/sftA4HrZiPUw/vRweD7S7A0a/XXW1SsLYSeGpIbxiZeOpIccufG8dVOys/5r2o5JNVQaw9WUrxhDRbk46k62/5moobbySKu397gK/9ZgsKFlDNSZQJzhHI2xKOJVDISTRbbfzpwS0YePxxxL73rJzNwNJZ62yG2dzydNlOUqVnK4PTdpKRWLqfLe/JPpO9nuZnTFRNyFj5Apbtswr5rpn4wpELcPiyqhHKrhTHsTJ4TLnCWNdgA3Dr/lHiuo2j1XJf7x2VvNiHTbZyBs9OA8U02zcTMjKJrsNTwEgT+NE9ow9864Ytt/dVZVDNW6LsSBT5XUsgZ7P7L5BzbDPX+qeHH8HAlr+YZQeJjSWpwk4P2pdhk05mcHfHa3YyzXKa9GD6mez9hOiOhHjHwjzzOzZ65s3B/D2XolSt7nnh+5a9a0mfZcZLkTz3MrJronVxoQ+ziPEWsL3GXDZ60NjIr/6sjynk8EsHEPRxDBK8E1ztw+k+njhHFTqJCTMl4Qm21eDd/KR7+NePLt35fPnO/8fj592ljz5sPn49rwBUC4mF0bqmp2HZMguKhOC4kpPpF8fNgLEjkPzyz/qzjo3zcwKSyqOfy2avePKuNHgwUjEB3j4FbB1R973/3zfsh9ten/+nerk35RM36MPfswdu2qMDoqOY9BO59jhb6zJdbVneyhSMixPpnphR7BSBr3tAf9i2cH45j9k0Dy58Zreitwr0dSRK5J0YbwJDLfo39eWTDrTOebkDeL2+13e5nnPZfrh/UTdmVvOJb6fq6OsIzziK9H8lCI6RldtMcX46ZbDT9V//oJ6fAz4iBI7VMfYp5SBmEFw1uTNcezFcB56YQPv329qHfPXo8n2vF4BX8rsXbdS/WD0L72ZThfA4NrqiLIdlMGSfjtBYn1Nx9HH1wDQ7Nj9v6/zGB3S5HWCvUlFfvWiGWMYFQpQzzXSoAfxlWD1w0X1y33tPEkyy33CPk6/TBx8yF7f05pDjuIrOzuaaVUoExxKT43a5akFCtVys3+Wcwweu1dbHV+LxN3VhPsEx8jANGfOAh4eiL5x0iHPeG47YtAv+9I3xp9f0yIvLDAw6ySIY/ExSnpkqVcels/x/syLgtXHpx9bhlF2CO/tanVuzHHfPqmJVOf0nNdr5SFP7D02Eb/3iEfkdtdsbFeCXbtYfXlDGueU85iKZsjXZklnpyZdpGmgWFcS4pGsQnzvuOBG/4CzXFX/Qp+zZi28pPzkZHeNIS337X2+Qp+IckWajb1RsyXWffqOeN8tRH+rKyWOhsSBnYyYziiCAa0k8EQKb2kF01acPc3akXS8IbsW1Onf6AnVib16ewqWz21vq9qu2yNPeqL7thW7xZ65391jcV1jE/1qKFcaeCfDwOYeK9D83nv32/wHzrWgvjJ8Q7AAAAABJRU5ErkJggg==",R=({dataSource:Ot=[],img:Xe,imgWidth:l=346,title:h,sunTitle:f,bannerExtraContent:d})=>v.createElement("div",{className:O.banner},v.createElement("div",{className:O.content},v.createElement("aside",null,v.createElement("p",null,v.createElement("b",null,h),v.createElement("span",null,f)),Ot.length>0&&v.createElement("div",{className:O.btns},Ot.map((p,b)=>v.createElement("div",{key:b,onClick:p.click},p.name,p.sign?v.createElement("img",{src:H,width:39}):null))),d),Xe&&v.createElement("img",{style:{marginTop:33,marginRight:38},src:Xe,width:l}))),B={flex_box_center:"flex_box_center___hG6RI",flex_space_between:"flex_space_between___ss3Fh",flex_box_vertical_center:"flex_box_vertical_center___K80p9",flex_box_center_end:"flex_box_center_end___qmXX3",flex_box_column:"flex_box_column___GFV8F",row:"row___aXJjm",title:"title___HUKL0",tagsWrap:"tagsWrap___XB2W3",action:"action___VdHb1",bar:"bar___t1kKC",tag:"tag___V7Eft",name:"name___Hk1Ip",num:"num___xQpcH",active:"active___XryTX",tagsBorderWrap:"tagsBorderWrap___OMxjs"},ee=u(92310),ce=u.n(ee),fe=u(89392),Ze=({dataSource:Ot=[],value:Xe,onChange:l,onTitleChange:h,className:f,title:d,titleWidth:p=41,style:b={},fontColor:E="#6A7283",showCount:q})=>{const[K,ye]=(0,v.useState)(0),[Ue,Ge]=(0,v.useState)(!1),Le=(0,v.useRef)(null),rt=(0,v.useRef)(null);return(0,v.useEffect)(()=>{var Qe;Ot.length!==0&&(((Qe=Le==null?void 0:Le.current)==null?void 0:Qe.clientHeight)>97?ye(1):ye(0)),Ot.length===0&&ye(0),Ge(!1)},[Ot]),v.createElement("div",{className:ce()(B.row,f),style:b},v.createElement("div",{onClick:(0,fe.throttle)(()=>h==null?void 0:h(),2e3),style:{width:p,marginTop:Ue?12:4},className:`${B.title} ${h?"current":""}`},d),v.createElement("div",{className:Ue?`${B.tagsWrap} ${B.tagsBorderWrap}`:B.tagsWrap},v.createElement("div",{className:B.bar,ref:rt,style:K>0?{height:K===1?97:"auto",overflow:K===1?"hidden":"auto",paddingRight:55}:{paddingRight:0}},v.createElement("div",{className:B.tag,ref:Le},Ot==null?void 0:Ot.map(Qe=>v.createElement("span",{onClick:()=>l(Qe.id),key:Qe.id,style:{color:E},className:Xe===Qe.id?B.active:""},v.createElement("span",{title:Qe.name,className:B.name},Qe.name),!!q&&v.createElement("span",{className:B.num},Qe.count))))),!!K&&v.createElement(v.Fragment,null,K===1?v.createElement("div",{onClick:()=>{var Qe;ye(2),((Qe=Le==null?void 0:Le.current)==null?void 0:Qe.clientHeight)>245?Ge(!0):Ge(!1)},className:B.action},"\u5C55\u5F00",v.createElement("i",{style:{transform:"translateY(1px) scale(0.6)"},className:"iconfont icon-zhankai4"})):v.createElement("div",{onClick:()=>{rt.current.scrollTop=0,ye(1),Ge(!1)},className:B.action},"\u6536\u8D77",v.createElement("i",{style:{transform:"translateY(0px) scale(0.6)"},className:"iconfont icon-shouqi3"})))))},P={flex_box_center:"flex_box_center___aK2n3",flex_space_between:"flex_space_between___HX0Oh",flex_box_vertical_center:"flex_box_vertical_center___LJOJr",flex_box_center_end:"flex_box_center_end___SCakF",flex_box_column:"flex_box_column___AYv4m",tabs:"tabs___GTqPV",active:"active___F26E8"},X=({dataSource:Ot=[],value:Xe,onChange:l,className:h,style:f={}})=>v.createElement("div",{style:f,className:ce()(P.tabs,h)},Ot.map(d=>v.createElement("span",{onClick:()=>l(d.id),className:Xe===d.id?P.active:"",key:d.id},d.name))),z={flex_box_center:"flex_box_center___yX6Oa",flex_space_between:"flex_space_between___t7oqF",flex_box_vertical_center:"flex_box_vertical_center___dEIHy",flex_box_center_end:"flex_box_center_end___taQDF",flex_box_column:"flex_box_column___xY_Lr",input:"input___PW2zI",dropdown:"dropdown___vSy8B",menu:"menu___NiyBu",text:"text___Grueu",b1:"b1___ZKryM",b2:"b2___aKyGa"},Ce=u(92832),Re=({dataSource:Ot=[],value:Xe="",onChange:l,onInputChange:h=()=>{},className:f,style:d={},placeholder:p,allowClear:b=!1})=>{var E;const[q,K]=(0,v.useState)(""),[ye,Ue]=(0,v.useState)("");(0,v.useEffect)(()=>{var rt;let Qe=Xe;(rt=JSON.stringify(Xe))!=null&&rt.includes("{")&&(K(Xe.id),Qe=Xe.value||"");try{Ue(decodeURIComponent(Qe||""))}catch(tt){Ue(decodeURIComponent(Qe||""))}},[Xe]);const Ge=()=>{l(encodeURIComponent(ye),q||null)},Le=rt=>{rt!==q&&(K(rt),l(encodeURIComponent(ye),rt))};return v.createElement("div",{className:ce()(z.input,f),style:d},!!Ot.length&&v.createElement("div",{className:z.dropdown},v.createElement("div",{className:z.text},(E=Ot.find(rt=>rt.id===q))==null?void 0:E.name,v.createElement("i",{className:"iconfont icon-zhankai4"}),v.createElement("b",{className:z.b1}),v.createElement("b",{className:z.b2})),v.createElement("div",{className:z.menu},Ot.map((rt,Qe)=>v.createElement("div",{key:Qe,onClick:()=>Le(rt.id)},rt.name)))),v.createElement(Ce.default,{onPressEnter:Ge,value:ye,onChange:rt=>{Ue(rt.target.value),h(encodeURIComponent(rt.target.value),q||null)},bordered:!1,placeholder:p}),v.createElement("i",{onClick:Ge,className:"iconfont icon-sousuo9 font14 pl10 current"}))},de={flex_box_center:"flex_box_center___tol8o",flex_space_between:"flex_space_between___Z235C",flex_box_vertical_center:"flex_box_vertical_center___Wq1sZ",flex_box_center_end:"flex_box_center_end___LLxom",flex_box_column:"flex_box_column___DbMSN",quickPager:"quickPager___GM30J",disabled:"disabled___Ozc8I"},ue=({value:Ot,onChange:Xe,className:l,total:h,pageSize:f,style:d={}})=>{const p=Ot<2,b=Ot>=Math.ceil(h/f);return h<=f?v.createElement(v.Fragment,null):v.createElement("div",{className:ce()(de.quickPager,l),style:d},v.createElement("div",{onClick:()=>{p||Xe(Ot-1,"prev")},className:p?de.disabled:""},"\u4E0A\u4E00\u9875"),v.createElement("div",{onClick:()=>{b||Xe(Ot+1,"next")},className:b?de.disabled:""},"\u4E0B\u4E00\u9875"))},A={flex_box_center:"flex_box_center___FO7TP",flex_space_between:"flex_space_between___LotYx",flex_box_vertical_center:"flex_box_vertical_center___bWdaw",flex_box_center_end:"flex_box_center_end___mVJ1o",flex_box_column:"flex_box_column___M83Mm",list:"list___oOsiS",wrap:"wrap___G6T7F",lockWrap:"lockWrap___Rl79E",li:"li___oZZ7l",cover:"cover___b2bYW",img:"img___IQX7w",sign:"sign___HkT6C",name:"name___SsJx8",e:"e___TMqq0",tags:"tags___bcjyo",rate:"rate___YACg7"},w=u(71418),j=u(6848),N=u(13570),De=u(3294),Te=u(955),ze=u(96908),Me=u(57177),he=u(81378),_=u(8797),T=({className:Ot,dataSource:Xe=[],col:l=4,right:h,bottom:f=23,precision:d=0,wrapWidth:p=1200,trackEventItems:b,loading:E})=>{const q=Math.floor((p-(l-1)*h)/l);return v.createElement(w.Z,{spinning:E},v.createElement("div",{className:ce()(A.list,Ot)},!!Xe.length&&Xe.map((K,ye)=>{const{name:Ue,id:Ge,identifier:Le,power:rt,cover_image_id:Qe,pic:tt}=K;return v.createElement("div",{className:A.wrap,key:Ge,style:{width:q,marginRight:(1+ye)%l===0?0:h+d,marginBottom:f}},v.createElement("a",{target:"_blank",href:`/shixuns/${Le}/challenges`,className:A.li,onClick:Je=>{Je.preventDefault(),b&&(0,Te.L9)([b]),rt&&(0,Te.xg)(`/shixuns/${Le}/challenges`)}},v.createElement("div",{className:A.img},v.createElement("img",{className:A.cover,src:`${tt}`}),K.is_jupyter&&v.createElement("img",{className:A.sign,src:ze}),K.is_jupyter_lab&&v.createElement("img",{className:A.sign,src:Me}),K.is_unity_3d&&v.createElement("img",{className:A.sign,src:he})),v.createElement("div",{className:A.name},v.createElement(j.Z,{title:Ue||"\u5B9E\u8DF5\u9879\u76EE\u540D\u79F0-\u672A\u586B\u5199"},v.createElement("span",{className:A.e},Ue||"\u5B9E\u8DF5\u9879\u76EE\u540D\u79F0-\u672A\u586B\u5199"))),v.createElement("div",{className:A.tags},v.createElement(j.Z,{placement:"bottom",title:"\u5173\u5361\u6570"},v.createElement("span",null,v.createElement("i",{className:"iconfont icon-shixunguanqia font14 mr2"}),v.createElement("span",null,K.challenges_count))),!!K.myshixuns_count&&v.createElement(j.Z,{placement:"bottom",title:"\u5B66\u4E60\u4EBA\u6570"},v.createElement("span",null,v.createElement("i",{className:"iconfont icon-chengyuan font14 mr2"}),v.createElement("span",null,K.myshixuns_count))),v.createElement(j.Z,{placement:"bottom",title:"\u96BE\u5EA6\u7B49\u7EA7"},v.createElement("span",null,v.createElement("span",null,K.level))),v.createElement("div",{className:A.rate},v.createElement(N.Z,{allowHalf:!0,disabled:!0,defaultValue:K.score_info}),v.createElement("span",null,"\xA0",K.score_info?`${K.score_info}\u5206`:"5\u5206")))),!rt&&v.createElement("div",{className:A.lockWrap},v.createElement("img",{src:`${De.Z.IMG_SERVER}/images/educoder/icon/lockclose.svg`}),v.createElement("span",{className:"mt15 font16 c-white"},"\u5B9A\u5411\u5F00\u653E\u5185\u5BB9\uFF0C\u9700\u8981\u6388\u6743")))}),!Xe.length&&v.createElement(_.Z,null)))},ve={flex_box_center:"flex_box_center___AQ53o",flex_space_between:"flex_space_between___i2aIa",flex_box_vertical_center:"flex_box_vertical_center___sPEKB",flex_box_center_end:"flex_box_center_end___GhSSH",flex_box_column:"flex_box_column___R9_Hb",list:"list___jb2Ay",wrap:"wrap___VsQDr",lockWrap:"lockWrap___g1k1T",li:"li___IxCLC",cover:"cover___Mu8wr",img:"img___IpFLA",movebq:"movebq___mF7wt",bq:"bq___Bil0T",sign:"sign___DXJ4d",name:"name___l7FoJ",e:"e___pXQUG",unit:"unit___wCIFR",tags:"tags___w_Mil",tag1:"tag1___dxm7r",tag2:"tag2___llZkf"},Ee=u(24065),ne=u(59301),xe=({className:Ot,dataSource:Xe=[],col:l=4,right:h,bottom:f=23,precision:d=0,wrapWidth:p=1200,trackEventItems:b,loading:E,onRemove:q=()=>{},isCurrent:K=!0,showAlias:ye=!1})=>{const Ue=Math.floor((p-(l-1)*h)/l),Ge=[{name:"\u63A8\u8350\u81EA\u5B66",ptimg:"/images/tjzx.png",swimg:"/images/sw_tjzx.png"},{name:"101\u8BA1\u5212",ptimg:"/images/jh.png",swimg:"/images/sw_jh.png"},{name:"\u56FD\u5BB6\u4E00\u6D41",ptimg:"/images/gjyl.png",swimg:"/images/sw_gjyl.png"},{name:"\u7701\u7EA7\u4E00\u6D41",ptimg:"/images/sjyl.png",swimg:"/images/sw_sjyl.png"},{name:"\u7CBE\u54C1\u8BFE\u7A0B",ptimg:"/images/jpkc.png",swimg:"/images/sw_jpkc.png"},{name:"\u519B\u961F\u4E00\u6D41",ptimg:"/images/jdyl.png",swimg:"/images/sw_jdyl.png"},{name:"\u65B0\u578B\u6559\u6750",ptimg:"/images/xxjc.png",swimg:"/images/sw_xxjc.png"}];return ne.createElement(w.Z,{spinning:E},ne.createElement("div",{className:ce()(ve.list,Ot)},!!(Xe!=null&&Xe.length)&&(Xe==null?void 0:Xe.map((Le,rt)=>{var Qe;const{name:tt,id:Je,identifier:$,featured:ge,school_name:we,image_url:He,excellent:at,is_plan:Ne}=Le;return ne.createElement("div",{key:Je,className:ve.wrap,style:{width:Ue,marginRight:(1+rt)%l===0?0:h+d,marginBottom:f}},ne.createElement("a",{className:ve.li,onClick:ke=>{ke.preventDefault(),ke.stopPropagation(),b&&(0,Te.L9)([b]),(0,Te.xg)(`/paths/${$}`)}},ne.createElement("div",{className:ve.img},ne.createElement("img",{className:ve.cover,src:`${He}`}),K&&(0,Ee.bg)()&&(Le==null?void 0:Le.studying)&&ne.createElement("div",{className:`${ve.movebq} user-path-items`,onClick:ke=>{ke.stopPropagation(),q(Le)}},ne.createElement("i",{className:"iconfont icon-yichu1 mr5 c-red"}),ne.createElement("span",{className:"c-red"},"\u79FB\u9664")),(Qe=Le==null?void 0:Le.subject_tags)==null?void 0:Qe.map((ke,Y)=>{var be,Ie;if(Y===0){const Ve=(be=Ge.find(ct=>ct.name==ke))==null?void 0:be.swimg;return ne.createElement("img",{className:ve.sign,src:Ve,style:{left:"-4px"}})}const Ke=(Ie=Ge.find(Ve=>Ve.name==ke))==null?void 0:Ie.ptimg;return ne.createElement("img",{className:ve.sign,src:Ke,style:{left:`${48+52*(Y-1)+2*Y}px`}})}),ne.createElement("div",{style:{position:"absolute",top:"150px",left:"4px"}},(Le==null?void 0:Le.excellent)&&ne.createElement("div",{className:ve.bq},"\u5F00\u653E\u8BFE\u7A0B"))),ne.createElement("div",{className:ve.name},ne.createElement(j.Z,{title:ye&&(Le!=null&&Le.excellent_alias_name)?ne.createElement("span",null,`\u8BFE\u7A0B\u539F\u540D\uFF1A${tt}`,ne.createElement("br",null),ne.createElement("span",null,`\u8BFE\u7A0B\u522B\u540D\uFF1A${Le==null?void 0:Le.excellent_alias_name}`)):tt},ne.createElement("span",{className:ve.e},ye&&(Le==null?void 0:Le.excellent_alias_name)||tt))),ne.createElement(j.Z,{title:`\u53D1\u5E03\u5355\u4F4D\uFF1A${we}`},ne.createElement("div",{className:ve.unit},ne.createElement("i",{className:"iconfont icon-danwei1 font14 mr3"}),we)),ne.createElement("div",{className:ve.tags},ne.createElement("div",null,ne.createElement(j.Z,{placement:"bottom",title:"\u7AE0\u8282\u6570"},ne.createElement("span",null,ne.createElement("i",{className:"iconfont icon-zhangjie1 font14 mr3"}),ne.createElement("span",null,Le.stages_count))),ne.createElement(j.Z,{placement:"bottom",title:"\u5B66\u4E60\u4EBA\u6570"},ne.createElement("span",null,ne.createElement("i",{className:"iconfont icon-chengyuan font14 mr3"}),ne.createElement("span",null,Le.members_count)))))))})),!Xe.length&&ne.createElement(_.Z,null)))},te={flex_box_center:"flex_box_center___eMcr7",flex_space_between:"flex_space_between___HcNca",flex_box_vertical_center:"flex_box_vertical_center___ZnvVN",flex_box_center_end:"flex_box_center_end___fdgDf",flex_box_column:"flex_box_column___SEKvd",list:"list___L1hmU",wrap:"wrap___pKgcW",lockWrap:"lockWrap___SMhkK",top:"top___udHSB",sign:"sign___uwRpq",name:"name___Fpf90",img:"img___AMLhL",text:"text___KiTb7",btns:"btns___i6IuZ",bottom:"bottom____k2sh"},Fe="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAHgAAAB4CAYAAAA5ZDbSAAAAAXNSR0IArs4c6QAAIABJREFUeF7tXWmQXFd1/s59r3t6nX00o93GluV9AQNxiAkIB0OMISFsFQqSAhOohFR+JKmEQPILClJZfpEfIUAChFQSHIJxnGDiDYwsb8KRLUuWZcmSxqN9pJF6nV7eSZ373u1509Mzvd2eGVt6VV2z9Ht3+9459+yX8Bq4mDmWK2GLqla3MvFWZt4KpjVMSBNzGoQ0M6WJkJbpMiNDxBkwMkyUIUYGxCeJaB8x7fMcZ18yiv1EVHy1Lw+9GicwO8tXlSrlbSB6O4HfANAmZlY250JEHsBHGLQTzA9H3chDfX2012Yfy9HWqwJgZh7NF6vvY/a2gWkbgyeWY3Hq+yDQcRA/RKQeSsSce4jo9EqMo50+Vy3AzNxXKFTv9MAfB/AuZo60M7Fe30tEZQA/UqBvx+POvUQ02+s+O2l/1QGcy5Xe6Cn1SXj8YYAHO5nU8j9DM1D0b8rzvpFMRp9a/v4X73HVAJwplN9GHj7P4NtW0wK1OxYCPcAKX0rHI4+0+2wv7l9xgHPFyrs9j78A5l/sxQRXrE2ix5SiLyZj7v+s2BgArBjA+XzpzR7oq8x880ouQK/7JqKnFfiziUT0iV731aj9ZQeYmYez+fJXiOguZl72/ldkkYmYmb+eSkT+lIjOLOcYlm2BBcx8sfoJz+O/BHhkOSe5evqiaaXoTxIx55tExMsxrmUBOJ/njVVUvgvmW5djUqu+D6JHHbgfTSRostdj7TnAuWLlDq/K37pwqXYxCGlaOfRbyZh7Xy9B7hnAzOzmCpUvA/jDC2WvbReogE3/TTLufo6IKu0+38r9PQE4n+f1VVS+B+ZbWhnEBX8P0Q4H7gcTCZqyvRbWARZHQLlavp8ZG20P9rXcHhEmI07kdtsODasA5/OlX6gy/dfF/bbTV5GmHeL3JBLRxzttof45awCLRYo9vpuZE7YGdyG2Q0R5UvQBWxYwKwBn8pWPEPg7IlhdiKDYnrMIXAz6WDrh/mu3bXcNcEC5P7wIbrdQzH9eQCZF7+2WkrsCWPZcD/TgRbZsF1zTmrBrBX5HN3tyxwD7YTOVRy8KVL0Bd65Vmo667q2dStcdASx6rofyjouqUK/B9dsXFUohcksnenLbAMtemy1UfnrRiLE84NZ6IdqRirtvbdfi1TbA2Xz5r5j5j5Z5ehe705RMf51KRP64ncVoC2BxHLDH9/batlz2gJPnFc7PArNVgvjViABH6Zhm/ZErQoxkH7AmxYhHlsX71s7aWr9XbNek6M52HBQtA6xdflx5pldCVaEMHDuvcK5A8AjI5oB8EShXgEoZKFeBSgVQCohEgKjr/4z3AUP9gCIg7jLWpBn9fa9lsMXa5d7UqquxJYCFYrOFyk964c8V4F44oVCsEs5lgfNZIJcHPMFIk27wU0sbof/V0UcyBgz2AyMDQDQCbBzwXrtAEz2airu/3ErQQEsA5wqVT3qe93WbPKfqAS+eUsiWCWdmgJPTQLVaB2gjw6oB3U9B0azbsGz5XV6KsWFg01pAzGqXjniIua89ilZK3ZWMu99ohklTgP0YqsqLNlnz+SJh7ymF8xkf2JKEkFu+BOx1Y8CGNcBAH2P9gGe5h5VujqZTCfeKZjFeTQHO5EpfA/ApW9N5ZYYweU5h6jhwPlfHcpux5Ha/BxCLAldfBqSijMtHX2sg4x/SyejvLIXNkgAHoa07bEnNe48rnCkQDr8CFBokehh2q1ntIizYsOVG3y/g6AH7dl3gykuAvj4gAkahSihUCCVP9nryJfNgj1dguIrQ5wKJCCMZZaSjjOGEh6jV9LbuSUb2YAW+ZamQ3CUBzubLT9mKW95zTOFkhnDoqC8NL8clL0oqSYgnCSoCVIM92580axAjji+BuyqQ4RgQOq8wUKrK/0jv83Ilo8BQzMO6VBUDseWYQfM+JO46lYi8cbE7FwVYZxxUvf9u3kXzOyZnCIfPKuw/FAhSgcxTz3GbyFQLpOh6Ics877qE9AAQiZEGSyJUI6JGOT5VxlxocEWvdgTcAGQBUtQwWRTDTQTkYhXIlQnZElD2fMBjDmMizdjYX0VkhSlbOepXF/M6LQpwJl/ebiOd5FyR8PxxhQNHgGKP8+9EL04PKU2tAr5LjIQLJB0DJmswDbACpuP41KuBFYDlEwBsKFdz72ClZqvA2SJpI4yALc+PJ6rYPCDSevOXvSd3EG1PJyK/1KjthgBLIhg8frjbwYgq9MRhB5PHgXOZha01k5nq9d4FalEgowk4/UMKTp/fR59iJBX0nqkBo8ASpsGVPdYHVD7yuwY8uLcGcrAyNZCljbopZErAqQKhWPGB3pD2cEl/RUyK3S5d+88renujhLeGI8nmyv9rI8vv+aMKh6cJk8eC8Tbjye1Oi4BEkpDo91lxVDFSjghS/lVjuQZgMXc6DDdgxRrYEAWbl0GDHwC6FMBmuLkycKJAKFUJMQe4YriCwdjy6t6S1ZhKRn6l0TY37386Pxd4st21rr9fWNnTkw72HeyNnit7Z/+YAsn+CUbaBWJ68wzADbFZQ8GaJSuex6INy9ZCVmDvNkBLW2Y/DrPpxdbmTBGYLhCYCBvSVWzury4rNSvgTfX5yQsoOJMr/T2AJXWrVsDfeUThldOEoydbubu9e9wIYWBUFtJnxwPOHPuct28KyHWs1yHWVCsgCgULwAZkDXBA3ealaAdgmYWoXlNZ0vtzfx9wzUhZ97NM19fSyeinw33NA1jKJmTzlePdZtaL40Cod8+BQGq2OLtIFBgcVVrlSTiMtDPXeHgy+ndDgYFkrPfZEBUb9cgA7H8X7M/B3m0o17QXNLvkjGRsx/OkJW+R2q8erWjW3fuLZlIJdyJcTmIewPl85QNV9r7X7UD2nVTYd4wweXTplpoZNuqf7osB6WEFD4xBw5IbdFG/b8rfMlENoKZQn01rISvYg42qNPcSzLFneRH0FWL/razR6QLh7KxvNLl2tLwsUrZD6oOJhHu3Gd88gLP5skRH3tnK4Je6Z/tBBwenGkvOnbYtHqL+Nb5DeFgMFK2wPSNBB9gYdu2zaNZg14QsvZfPl6r1ixH+NFCfms3nfBk4lSdEXcK1Y2X0tTLuZo0u8T0R3ZtKRN67AGApVZQrVI52W81GDANPHnGw64XA5RcaTODsWbSswGJCthguhsYJHjNGWwXXEJ0BSChYfjdsGKzB05Qb/M/swWGVSb8MwbMycNNGeG9uhse5EnC6qLShRUAWga5Xl1T/ScbddabEU42CbbkEX55W2DtFONAg87WZltToBZAFHV4rbBkYiDASLSzOPLYUAtgA6APFvkFD2HQAvBikjSQt1C036BdAKDt4EbSEbQwjIQNIM8BEXz5fJu3Zunqkt7basCuxthbZfOm7zPjNZgNt9v3OSYWXpgjHpxf655sB3Kjt0XEhLyDpMvrrBZVGqmadXlDbPo3QFLJUacOJYuhce+NXDu4z0nRY0hbDiTgu6oWxZmsi30sXIniJk0NUKDGK9Ooiwr+kEtGPhsQGCZEpH7NRQc7sv9PnlgzA0HNrZslKpgnxftKq0FCHZkAjYEl/AkxNWBKngo4aYWxdR7h8Qr5f3AJVKDF2H/FNnZHASSHgmz26FbCkv6kcoQrCVaMVpHsUiCAV+VLJyNoawEHtxz2tDLLZPT894OClI37oTTeXcoHRCaUdBbLvLrH2S3YzT481+CrA84CKJ2oc49feRHA1T176+vlBT8eGxSJ+PJgxc7ZjmRQ9+WiOEHMJ142WemYIibqRqyVYXs8qkyv9HoCvNptgK98/+rKD3S8CxVIrdy9+z8ioguoDBiOMePO1X9hQ6JkwFcuNQkns+UaJSpnx4V8iOC28QY+/6KFSBeIxaJVHuxoDo0k7sz1bIpwrETalq5hI9oxVfzadjP6dD3C+/B9gfn87g1zs3u2HHDz9/CIGjmY8OWhUjBlD4wpR8lWijq6wcyD4XW/ZQTBfqeJHbM5WGB9/W2sA/2yvp6k+0Qckoj6rNlaxdsYoe/8reV/6u3GsBKcdFtBqR0T/kU5EPqABzuZLLzPjklafXeq+n73s4JkXgFIXFDw2IdIMMBbh1vTdRgOqM0roNQwiN8TLpcEtC6dhfPK25gCLivbALtZUm4wDcQFYjCQdbh/ioDg1q3TwwIaUfSomwqFUInqpVOiK5QqVnK16yz854OCFg/LSLBSi6nFopBaJnXlkgtBHjCEb9WVDDgPDmiVao6zBBUR4+sztPsAvHmU89KwvOMn+KuDJfhuLsLZ7y/8kPFc+ArDEZndCwWYdROAShnLjmjKUZSqWetfJuJuk7Cxfx5XyszaoV9rQQtYkMD3TWYsjYwQ3ThgV6u1k7w11G1aRTJy1sEfJnBAOU5DPLOOzd/gA//wA49+3+/ZoAU8C9hIxRqoPSCeAlAG3zwc+2uEebIaYKQPTswqbByoYj9t3L5IbuZ5s2Z/NoB9/WWH/FOHY6QZ6cIM45nAQnbQxsVHpSIzRaGcvSPgpAViANTZvEazEEWDYswB8+QTjnTdKGA7hbJbx7YeBM1mgT8CNCqjsAxuHTpOR/Ve+kxfA2LE7JT6zF8vLcs2wfeOH2KUpVyh/3vP4i90vp9/CnuMKe15pbMlqxqJF700PkdYPJSKjkyvs9dEB8SEjhuy9IgUbAeuWrcC1m+aziVKF8cOngJdPCKA8n3KjQFxYdjRwMYZiuToZqzxzukjIVwnXj5T1S2PzUoq+QNl86dvM+JithjNFwtOTCk8+17zFeqF6fK2CijLWRHyvTzeX5gwBBUs7QrkSzSl6rLDW224A1gws3snOA4xnXvapt541a0NHKOynm3FKQN+JosLGlIeJpKR22LuI8B3K5sr3M/id9pr19+Fn9/sJZK3mFkn/Gy5ROjpj1IJwpfdcAVhin4U1e6ISARMDwLbrhAqbv0FHzzCeeInR5wCpuL/v9sneKy9gyG/czdrJMEVlSrmErcN2UzwI9GPK5MuP2U7mfmZS4YVX/Bjo8LWUGizS85p1hGSdE7+txTP6bqAOCRVrlajqS83XbwbecJnOs2252fwsQ6hZ2pFMRtl/ayG3gamy5cYWufFkUYLwCTeNWbZsEe2gbK70LAPXdTvI8PPTeYKA/OTu4L9GQFzCXzgwAKSGFIYc7spnKtgZdUgAFvelsOZrNwE3X946sOH5VD3Gjn2sbdkxAdmCgBVuX9yJ58oKVw1XkLSY50zAc7IHWzNyhAf96AEH+yehpelWrjVjhGiSMBZlcR51fIUBFoFKqFcMGrddD1w63hnAMpgn93uQUCRRmbQU3aWKFJ5gvgKcLilc2l/FSMye0UOMHZTJlU/bzBw0Az+dIzx3TGHHLn8PbHZt2KSgHMZ4N+qRsVYFrFnSUWXfFYPGO28ELptYCHClyrjnCeCJF32Hxi1XAnfcLFLy/Hu37w0ADqxYhoprHqpmE1zie9HLjxUUxpNVLWzZu2iasvnyLDN3s6yLjuexgw4OHAUOmbjoJUa++RKlY5bFc9TxFQZY2HPZ/+RngXe/Hrh87UKAv79DTJDzA99Fwn7PG+ff+8huD/kS0C/6cNwXtsRUaSNiUnawyRxhKAZcNmBPHyaiUk8Bzs4SnplSePw5P5uwfgsOC12XvE7BdRgjXfDnmr3ZWKvEHBkAfMfrgS3rFgL8Z//M+gUQsIxrUSTmP//Q/Hsf2OXp+/qTvtokurCoSyaeuuOXMnjwlRwhFSVcMWRPktYA94pFmwnvO6EgyWdPPOdLtDUvf92KXHKZ7z3qxLEvL4oSyVli8uTEQckOrPgClrxYuSLjzpsJV6xfCPBf/AvrPVrAMi+gWKw+5/thatf9z3g4XwAGk0DaOBsCn7D2NNZnQrSJ+NG8H30pgpa9S7Po3ghZ4UE+dUjh+DnCzr3zSy6E77lsi9KpJ+0ArM2QoRIe2lsURGr4rkDfW5QtAu97E+HKBgDf97RIyHMAS5ti4br9pvkA3/e0h5k8MBAALGZM0Yd1THUQ01XLoOhAljteJN3ONRbjtbSQ1Qs1qf4NFIqS/fjISWDfoSDZuq6myqVbFGLi/zXSQJ3tPaxpSfvakCFxVAFXEEuV1nsFYDFJGndghZErAO+/hXDVhsZC1oPPAruP+C/LdZuBt1+3UMj6wROM0xnGQMKn4Hk26SDHycRxmQS2dijxaIEQUaQzIWxdWk2ylSbabFCirkim4akZ4NmXfBDCe/DlW5SOvdJOBpNxv0ijJiPfUKuxVA0lgY0jvgAkL4BsCcb+fOm4sNcOSCsYw6GTrL1P2gccfKTfmTxr27b8XwcAhCxcbdhTMCUsOgJcPWSRRRM9JqbKHzH49mYA2fheFuSpIw7OFYCn9wRhPQHKW7YqXdhsIsicr0VfBB2HKdgYMgyI8vKsHwLeek17Viobc2Jm7J1iZIq+AaRmp24zlMcXsoArLAJMoPutOxtaWbTnjymcLRB27YcOr5Vr6xWkY5Q3JedaMKCaMknyjfEQyXeyzwqFFivAnW/ojkJbGfdi92SLjJ0HWbsXta06FAjQChXLnCbzhOE+xusG7TkctLPBtruw1YU6lSHsP62QLQC7DwJrxhWqirFloI5FByjXtuTQPlsTpMrAb79t+anXzFWo+Me7WEd6yN4sTgmTEtMKwBL8d7ygsDZZxXqLhg7tLrTt8G8VYHPfoWmF4znC0TMKmSrwun5PmwH9sjfBj9CebGpVihnSWKlyReBTv9KhA7ndAS9y/z1PeugPoj5MOE+rEZe5ih/ZIUaOIYuJ49rhbztkp5P1kr10+wEXB2cIG/s9DPbNVa+rUYnZi4N4ZpGShTVLPctMAfjM7Z0BfOgE4+cHgfN5YP0ocOtVrbkS6+f5b9s9DKUCCTtg1SbdpdmazJT8tJZrR+xmIOqQHdtBd80ms9j3UtTkP3dHMBpnbOpnQ8C1MoXmOSMxi+QqUq2w+Ewe+My72gf4wV2Me570JV/tpPB8gH7/DmDNYHsS93d/4gNcs3QFOnIrtmrRgUWWuGmNPQm6FnQnC7ccxo5WgL/72QgqHuPGCV4ArBG05Kdmz2UgN+sDfDYL/O672wN4aprxt/fMpaEIECacdt0w8Ad3tgfwPz3kYbQfWk/WwQFBWG0zgEWNFwl6oA/YMmgT4CBsVhY+ky/fDebfaAWEXt7zyAEHR2YUbpjwEHfnDCI1cg4iNLQLMGDPYj48m2kfYKHeR3b7QpGoNgZg8TzJnv4XH5bvWgf5Hx/0MNLvmzLDADdzRuSrUqlH6XoeaxIWPUnhwHebqSvdvABTM8CDByLYMMDYPNA4jNQYLjQQs5J240dBtsuif/A4Y9+UgMFatRGAhTMUSqT39N/eBmwYaR3gbz7oYTQNDKR8Z4REf7TibZJojlmPcMOo9bzhudQVm8ln3QAsz37vWVez5zdvDAEc+tUALM53EbBmAoA//c72WPR9TzFePsma2kR/FR1cABbqPZ8nfPhWYP1wewCPpIHBNgAWs6qwZynWstWigUPWcV7ymd6HLaWPdgvwzikHe04oXD/uYbjBIXnzKLgInAsAvqtNNen+ZxiTp1mrNkJtYkcWwU24grT5628mrG0DYM2iDcChPXgpFi2hOjNlhcstq0cL0kcDQctKAni3AIv/9vu7I7rK683rF7LpBQAXgDMZ4BPvaI+CJc/o2FnW3iHRW8UTJHu7ULAIbe+5mTAx1DoFf+thD8MCcEjIMtV7Gq2JCXqX6gLXj5XbCgRstsYNE8BtlXBo1nkr3+84pPDSGQc3rfMwUkfFJq9XVCRh0YaCP/QWQryFUFjTv0RonJzxU1I0BSs/+kMoeCbruwvHW1SVJL/p7sdYAyxStE5Oa6ImCfWeLYlwVcF4wm7aSsMSDraKsLQCYLN7ciXgnr0RXQfrzZt4XtEWDXCdFC37sGQoXLe5dYr72R4PJ87DZ9GBkGUo+FweeMd1tGRgfHgOzx1mPH+E9f4rAGtX4hIAy94r3iOXCNePlawmni1ahMVn03bKKDUDsJXv/++4g+eOKlw55mHT4NwT2oMU6MEiaIkeLFQsku8Nl0jUhqScNAf68X0eTmXmwm8MixbOIJXof/kawmj/0u3kZhn7p4Bdh31hTbPn4IURgBfLPJR0lUyZsGWwiuG4RdXIP1upcRklWcKVtkuHgfc8xg/3RFGsspaoE0G2gzZ0BA59baoUVSnvmxoF5GyBtIVL9nJxRsglViqxb+uEMskUjPvClXwkPEe8P1pNEs9UYB0TKpb2MtKelA4O0l5M6SVxKMjeLWqWBOJJW8LujbNBUk8bxWsVKuJYIKTlqAGL0Rtm7ZYshGarlGErFNrKPScyhAdecrXA9cYNfhlgk60gYMii66C6or93SuSGRD4KSKUKaVYuFK9LFjoCJOv9Viq362zBIM9Xx2OJqTJg/aYt+SltSx+Vqm9OlMu0pdNLg7YkXlpKOwi7X6x+R1lYc9Yv43PDSFn7j+1eTUoZSme2ipHaGviuowq7TzgYTTJuWucLI8Yebfbi2QBUne8rlBscpCXgGoAFZDE8SByVpj5x64XSQOV7aVf2YT8x3P+ISVTUJ+nLpLqatvTBXAElS1smrSVc+9Ksg6mwU2afNY9YZs26H6X+Ph13PxNe+wWbjK1ywrYAFl/rAy9FcSoHbB5kbBllDZpJKtPpoKGUUJGEBSShNh35EQiopui3T30+0Pr0tKDAmc4hDgQ4kw1hgJW/dX9BrrGpVGteGOEAus0glMcUSgvXddHFSSukzZGXWXTqh9e5pXLCWtiyVBDcFsiywD960UVmlnDNuIe16YCKg2o5RjfWe7MAEQBsYrfmFSM1Vd5DZYRN8W8twAVCnGlT/5T4MX34g++gNtXwxN+rSz0EFfG0V6pW8HRu9lKUVFyCUuXuqhH75Rq0nNFqQXDNpi2V9LcFsLQjqtOPX3Qhhca3jjHWpX1nhA7eC1ixYd36b3koFCigIx39lai5B8Phrvr2IGHcsHbNBYLgwHDYkC6FGDows1Yhvu5QD2nTgCv7vtTFsl2Lo7bG7ZT01yBbOpTDJsiZWeDhgxEtSIlDQth1GBQTqFeLugx1HsSm+1uVsOPQWQ4B7r7TKngpwjU9arFhcxWF5yrBm1LFQQeGLcvzx/KEfIV0wtq1wz0sDE70WDoReUujtV5U0bN5rI5NkCUT75EDEQjYw3HGNeNz0nWAT8jP2KDnYMZm4o1ipswLop9eysgUqsUVbsdUs9NV36OMa0Z7w5bN7Do6VkfvxRYPxrIJsuzJ2w9HcCLrn4N07bicUGazh87bkvpXx3JySAhhPCkCVaV3bNk3bHR2MJZM0fbRdp0vW+Mnxeu055QDqTa1cRDYNMAd17TsdmyyX5+UksEl2eMJW4aqGLPpwG/EjLo92k7vxZYPp+x2Ieufl1NOdr7i4lxRLEuMSwcYo6mFZxzZ7te0J3vtzKwvTMk5iAMxxpXDlR4YMRrOoLvDKX3J0v7xsrYXW3Rl8T7tOen4xUIjrIWwsYSd/N1G4xXVSYA9UyRUPKkeC1w+WMVo74qL1g3D0vGy0upqciUu9XJIwN6+0w4OTit9rI2rWLsb1yQZ6b7OSxKbPkVHlvMLZ2ZJq23i55LDpzcNVrE26fV0r62ft7UDogMq7tkR77apWdqrMuPwjMLhGQdydqI2TijW8dZyVKzYjyWoT2zBi1URFtYrOrcOrq+I98ePwxbmLwYNOdlsfdrDaHx5D7/S62X7iHdf4OKNVa4804t6Hr0A2bQpOvPRjIOTOYWzRd/VOFel3a9ma8yYNcNJrQSir0zJ/RHJXY5D25BFOhYz5cpcNO2Qe1MiQQ1OxVg4ouaO09AzuWLlDvb4XlsHRi/3AklJ4POzCjkpyD0rjgmlvUQV5uBsYXHC+6BHHKF01npsqo+RtFCcrdv5yoHQpOjOZMy9r9W22gJYGs3my3/FzH/UagcX77O3AkT016lE5I/babFtgJnZzRYqP7VdHa+dQV+Q9xLtSMXdtxJRW+kPbQMc7MfrPZR3MGPjBbnYyzxpIkwqRG5JJGiq3a47Alg68YPlK4++2oSudhdo5e+n6ajr3ionqHQylo4B9im59Ase6EFmbhCi3slwLj4TXgEiyivwOxKJ6OOdrkxXAEun4nVij+VQS+sRRp1O6rXwnOy1pOi9yZj7P93Mp2uApfNMvvIRAn/nIsjdQDH3rIDLoI+lE+6/dtuiFYBDlHz3RXbdHSTClknRB7qlXDMKawCbPbnK9F8XBa9OQRYrFb+nmz23vmerABvpulwt339RhWoPZFGFIk7k9k6l5cV6sw6w0ZOrqHzvojGkRZCJdjhwP9iJntush54ALJ2KwJUrVL4M4A9frbbrZovX7fdiWwbwN8m4+7l2LVSt9t0zgM0AxEHhVflbF/flBbvjtHLot9pxHLQK6jxdupOH2n1GuxpR+S6Yb2332dfk/USPOnA/2qrLr5s16DkFm8EJm84Xq5/wPP7LC5eaaVop+pNEzPlmwJ67wa6lZ5cN4BDQw9l8+StEdNeFsjcLmMz89VQi8qdEdKYlZCzdtOwAm3EHIblfZeabLc1lVTYjccsK/NlEIvrESgxwxQAOCWHv9jz+Aph/cSUWoGd9Ej2mFH3RlkWq03GuOMBm4JLwRh4+z+DbOp3ManhOsvxY4UvpeOSR1TGe1TCK0BiC/OS7APoQwKHqHKtsoPOGQzMA/7sCvp5MRp9aTSNdNRRcvyhSTqJQqN7pgT8O4F3MvArC3uZGKdVsAPxIgb4djzv3EtHsagLWjGXVAhxeLCnxlC9W38fsbQPTNgZPrMRiSgU5ED9EpB5KxJx7iKjFkxlXYrR+n68KgOuXJ6ituQ1E2wj8eoA2McuxWPYuqbcM8BEG7QTzw1E38pBtR4C90S7e0qsS4AbsPJYrYYuqVrcy8VZm3gqmcSakiTkFQpqZ0kRIy7PMyBBxBowME2WJkQHxCSLaR0z7PMfZl4xiPxFdXaKvAAAADElEQVQVlwOEXvbx/3Bccpan8cseAAAAAElFTkSuQmCC",Ae=u(59301),$e=({className:Ot,dataSource:Xe=[],col:l=4,right:h,bottom:f=23,precision:d=0,wrapWidth:p=1200,trackEventItems:b,loading:E,handleVery:q=()=>!0})=>{const K=Math.floor((p-(l-1)*h)/l);return Ae.createElement(w.Z,{spinning:E},Ae.createElement("div",{className:ce()(te.list,Ot)},!!Xe.length&&Xe.map((ye,Ue)=>{const{subject_identifier:Ge,id:Le,identifier:rt,power:Qe}=ye,tt=ye.is_public!=0&&ye.is_public;return Ae.createElement("div",{className:te.wrap,key:Le,style:{width:K,marginRight:(1+Ue)%l===0?0:h+d,marginBottom:f}},Ae.createElement("a",{className:te.li,onClick:Je=>{Je.preventDefault(),q(ye==null?void 0:ye.first_category_url)&&(b&&(0,Te.L9)([b]),(0,Te.xg)(ye.first_category_url))}},Ae.createElement("div",{className:te.top},Ae.createElement(j.Z,{title:ye.name},Ae.createElement("div",{className:te.name},ye.name)),Ae.createElement("img",{className:te.img,src:De.Z.IMG_SERVER+"/images/"+ye.avatar_url}),Ae.createElement("div",{className:te.text,title:ye.creator},ye.creator),Ge&&Ae.createElement("div",{className:te.btns},Ae.createElement("div",null,"\u5F00\u653E\u8BFE\u7A0B"),Ae.createElement("aside",null,"\u5F00\u653E\u8BFE\u5802")),tt&&Ae.createElement("div",{className:te.sign},"\u516C\u5F00")),Ae.createElement("div",{className:te.bottom},ye.visits>0&&Ae.createElement(j.Z,{title:"\u8BBF\u95EE\u91CF",placement:"bottom"},Ae.createElement("span",null,Ae.createElement("i",{className:"iconfont icon-liulanyan"}),Ae.createElement("span",null,ye.visits))),ye.course_members_count>0&&Ae.createElement(j.Z,{title:"\u6210\u5458",placement:"bottom"},Ae.createElement("span",null,Ae.createElement("i",{className:"iconfont icon-chengyuan"}),ye.course_members_count)),ye.tasks_count>0&&Ae.createElement(j.Z,{title:"\u4F5C\u4E1A",placement:"bottom"},Ae.createElement("span",null,Ae.createElement("i",{className:"iconfont icon-zuoye"}),ye.tasks_count)),ye.is_end?Ae.createElement("div",{style:{color:"#6B758B"}},"\u5DF2\u7ED3\u675F"):Ae.createElement("div",{style:{color:"#00B187"}},"\u8FDB\u884C\u4E2D"))),!ye.is_accessible&&Ae.createElement("div",{className:te.lockWrap},Ae.createElement("img",{src:`${De.Z.IMG_SERVER}/images/educoder/icon/lockclose.svg`}),Ae.createElement("span",{className:"mt15 font16 c-white"},"\u975E\u8BFE\u5802\u6210\u5458\u4E0D\u53EF\u8FDB\u5165")))}),!Xe.length&&Ae.createElement(_.Z,null)))},nt={flex_box_center:"flex_box_center___d27mZ",flex_space_between:"flex_space_between___qfRU9",flex_box_vertical_center:"flex_box_vertical_center___fCRld",flex_box_center_end:"flex_box_center_end___ORMV8",flex_box_column:"flex_box_column___PNKtZ",tabs:"tabs___alpa7",tabsWrap:"tabsWrap___aCQjw",tab:"tab___MKLr4",active:"active___nl_4v"},St=u(89070),Et=({dataSource:Ot=[],value:Xe,onChange:l,className:h,style:f={},tabBarExtraContent:d})=>v.createElement("div",{className:ce()(nt.tabs,h),style:f},v.createElement("div",{className:nt.tabsWrap},Ot.map((p,b)=>!(p!=null&&p.hide)&&v.createElement("aside",{className:nt.tab,onClick:()=>{l(p.id),p.link&&St.history.push(p.link)},key:b},v.createElement("div",{className:Xe===p.id?nt.active:""},p.name),(p==null?void 0:p.resetCount)==null&&(p==null?void 0:p.total)!==void 0&&v.createElement("span",null,"\uFF08",p==null?void 0:p.total,"\uFF09"),(p==null?void 0:p.resetCount)!==void 0&&(p==null?void 0:p.total)!==void 0&&v.createElement(j.Z,{title:(p==null?void 0:p.tip)!=null?p==null?void 0:p.tip:""},v.createElement("span",{style:{color:"#9096A3"}},"\uFF08",v.createElement("span",{style:{color:"#000"}},p==null?void 0:p.resetCount),"/",v.createElement("span",null,p==null?void 0:p.total),"\uFF09"))))),v.createElement("div",{className:nt.tabBar},d)),It=({className:Ot,style:Xe={},children:l})=>v.createElement("div",{className:ce()(Ot),style:Xe},l),gt={flex_box_center:"flex_box_center___e6HxQ",flex_space_between:"flex_space_between___RnXYe",flex_box_vertical_center:"flex_box_vertical_center___lVxPk",flex_box_center_end:"flex_box_center_end___bu8yv",flex_box_column:"flex_box_column___JczGj",orderWrap:"orderWrap___ZfyGX",orderIconWrap:"orderIconWrap___XTB_O",orderAsc:"orderAsc___KWHmA",orderDesc:"orderDesc___rHdbB",active:"active___a7eSP",cursorPointer:"cursorPointer___gs9kL",orderTextWrap:"orderTextWrap___teAKn"},qe=u(38854),yt=u(20834);const V=[{id:"updated_at",name:"\u6700\u65B0\u52A8\u6001"},{id:"created_at",name:"\u6700\u65B0\u521B\u5EFA"},{id:"name",name:"\u540D\u79F0\u6392\u5E8F"}];var L=({sortValue:Ot,dropValue:Xe,className:l,onSort:h,onDrop:f,dataSource:d=V})=>{var p;return v.createElement("div",{className:ce()(gt.orderWrap,l)},v.createElement(qe.Z,{dropdownRender:()=>v.createElement(yt.default,null,d.map((b,E)=>v.createElement(yt.default.Item,{key:E,onClick:()=>f(b.id)},b.name)))},v.createElement("span",{className:gt.orderTextWrap},(p=d.find(b=>Xe===b.id))==null?void 0:p.name)),v.createElement("span",{className:gt.orderIconWrap},v.createElement("span",{className:gt.orderAsc},v.createElement("i",{className:Ot==="asc"?`iconfont icon-sanjiaoxing-up font12 ${gt.cursorPointer} ${gt.active}`:`iconfont icon-sanjiaoxing-up font12 ${gt.cursorPointer}`,onClick:()=>h(Ot==="asc"?"desc":"asc")})),v.createElement("span",{className:gt.orderDesc},v.createElement("i",{className:Ot==="desc"?`iconfont icon-sanjiaoxing-down font12 ${gt.cursorPointer} ${gt.active}`:`iconfont icon-sanjiaoxing-down font12 ${gt.cursorPointer}`,onClick:()=>h(Ot==="asc"?"desc":"asc")}))))},U={flex_box_center:"flex_box_center___LCi0B",flex_space_between:"flex_space_between___hzONe",flex_box_vertical_center:"flex_box_vertical_center___ZyQRE",flex_box_center_end:"flex_box_center_end___XKM74",flex_box_column:"flex_box_column___p8LCU",btn:"btn___In02G","mediacy-round":"mediacy-round___uveEv","mediacy-default":"mediacy-default___dDxsd",default:"default___K791v"},J=u(3113),Se=Object.defineProperty,x=Object.getOwnPropertySymbols,C=Object.prototype.hasOwnProperty,Q=Object.prototype.propertyIsEnumerable,I=(Ot,Xe,l)=>Xe in Ot?Se(Ot,Xe,{enumerable:!0,configurable:!0,writable:!0,value:l}):Ot[Xe]=l,F=(Ot,Xe)=>{for(var l in Xe||(Xe={}))C.call(Xe,l)&&I(Ot,l,Xe[l]);if(x)for(var l of x(Xe))Q.call(Xe,l)&&I(Ot,l,Xe[l]);return Ot},pe=(Ot,Xe)=>{var l={};for(var h in Ot)C.call(Ot,h)&&Xe.indexOf(h)<0&&(l[h]=Ot[h]);if(Ot!=null&&x)for(var h of x(Ot))Xe.indexOf(h)<0&&Q.call(Ot,h)&&(l[h]=Ot[h]);return l},je=(Ot,Xe,l)=>new Promise((h,f)=>{var d=E=>{try{b(l.next(E))}catch(q){f(q)}},p=E=>{try{b(l.throw(E))}catch(q){f(q)}},b=E=>E.done?h(E.value):Promise.resolve(E.value).then(d,p);b((l=l.apply(Ot,Xe)).next())}),it=Ot=>{var Xe=Ot,{className:l,style:h,children:f,loading:d=!1,openLoading:p,onClick:b=()=>{},size:E="middle",shape:q="round"}=Xe,K=pe(Xe,["className","style","children","loading","openLoading","onClick","size","shape"]);const[ye,Ue]=(0,v.useState)(!1);return v.createElement(J.ZP,F({onClick:(0,fe.throttle)(Ge=>je(void 0,null,function*(){p&&Ue(!0);try{yield b(Ge)}catch(Le){console.log("error",Le)}p&&Ue(!1)}),2e3,{leading:!0,trailing:!1}),className:ce()(U.btn,U[`${E}-${q}`],l),style:h,size:E,shape:q,loading:ye||d},K),f)},_e={flex_box_center:"flex_box_center___TB7bQ",flex_space_between:"flex_space_between___oBlTb",flex_box_vertical_center:"flex_box_vertical_center___b5XbB",flex_box_center_end:"flex_box_center_end___CNhe7",flex_box_column:"flex_box_column___yHXKW",head:"head___ghH72",node:"node___mjPEy"},re=({className:Ot,style:Xe,children:l=null,onClick:h,title:f})=>v.createElement("div",{className:ce()(_e.head,Ot),style:Xe},v.createElement("span",{className:"primary-hover",onClick:h},v.createElement("i",{className:"iconfont icon-fanhui2 font12"}),"\u8FD4\u56DE"),v.createElement("b",{title:f},f),v.createElement("div",{className:_e.node},l)),Pe={flex_box_center:"flex_box_center___AlHuF",flex_space_between:"flex_space_between___vN2LW",flex_box_vertical_center:"flex_box_vertical_center___Ac7D2",flex_box_center_end:"flex_box_center_end___y38I7",flex_box_column:"flex_box_column___iQE6P",btns:"btns___sNgTb",confirm:"confirm___Ozirl",cancel:"cancel___aiq1I"},oe=({confirmShow:Ot=!0,confirmTitle:Xe,confirmClick:l,cancelShow:h=!0,cancelTitle:f,cancelClick:d,className:p,style:b,confirmLoading:E=!1})=>v.createElement("div",{className:ce()(Pe.btns,p),style:b},Ot&&v.createElement(J.ZP,{loading:E,onClick:l,type:"primary",className:Pe.confirm},Xe),h&&v.createElement(J.ZP,{onClick:d,className:Pe.cancel},f)),dt={flex_box_center:"flex_box_center___jkpdr",flex_space_between:"flex_space_between___OtsL8",flex_box_vertical_center:"flex_box_vertical_center___rbcb_",flex_box_center_end:"flex_box_center_end___zBR21",flex_box_column:"flex_box_column___nS_eP",fixedBottom:"fixedBottom___oJl7m",wrap:"wrap___A3Oq1",center:"center____VL1y"},ft=({className:Ot,style:Xe={},LeftContent:l,children:h,RightContent:f})=>v.createElement("div",{className:ce()(dt.fixedBottom,Ot),style:Xe},v.createElement("div",{className:dt.wrap},v.createElement("div",{className:dt.left},l),v.createElement("div",{className:dt.center},h),v.createElement("div",{className:dt.right},f))),ot={flex_box_center:"flex_box_center___tY8Yn",flex_space_between:"flex_space_between___vHdYA",flex_box_vertical_center:"flex_box_vertical_center___pa61F",flex_box_center_end:"flex_box_center_end___HyDXt",flex_box_column:"flex_box_column___UjZek",crumbs:"crumbs___V41Oe",hover:"hover___bEIVd"},jt=({className:Ot,style:Xe={},dataSource:l=[]})=>v.createElement("div",{className:ce()(ot.crumbs,Ot),style:Xe},l.map((h,f)=>fSt.history.push(h.path)},h.name):v.createElement("span",null,h.name),v.createElement("span",null,"\xA0",">","\xA0")):v.createElement("span",{key:f,style:{color:"#5F6368"}},h.name))),Zt=u(31797),Yt=Object.defineProperty,Mt=Object.defineProperties,$t=Object.getOwnPropertyDescriptors,xt=Object.getOwnPropertySymbols,Ft=Object.prototype.hasOwnProperty,qt=Object.prototype.propertyIsEnumerable,Bt=(Ot,Xe,l)=>Xe in Ot?Yt(Ot,Xe,{enumerable:!0,configurable:!0,writable:!0,value:l}):Ot[Xe]=l,Kt=(Ot,Xe)=>{for(var l in Xe||(Xe={}))Ft.call(Xe,l)&&Bt(Ot,l,Xe[l]);if(xt)for(var l of xt(Xe))qt.call(Xe,l)&&Bt(Ot,l,Xe[l]);return Ot},hn=(Ot,Xe)=>Mt(Ot,$t(Xe)),en=(Ot,Xe)=>{var l={};for(var h in Ot)Ft.call(Ot,h)&&Xe.indexOf(h)<0&&(l[h]=Ot[h]);if(Ot!=null&&xt)for(var h of xt(Ot))Xe.indexOf(h)<0&&qt.call(Ot,h)&&(l[h]=Ot[h]);return l};const{Countdown:xn}=Zt.default;var mn=Ot=>{var Xe=Ot,{onChange:l}=Xe,h=en(Xe,["onChange"]);const[f,d]=(0,v.useState)(null);(0,v.useEffect)(()=>{typeof f=="number"&&f>=0&&l(f)},[f]);const p=b=>{const E=Math.floor(b/1e3);d(E)};return v.createElement(xn,hn(Kt({},h),{onChange:p}))}},93018:function(Ht,lt,u){"use strict";u.d(lt,{Z:function(){return he}});var v=u(59301),O=u(89070),H=u(8591),se=u(43418),R=u(99313),B=u(61621),ee=u(5112),ce={title:"title___XAxiE",radioWrap:"radioWrap___k0pOB",radio:"radio___x9kMt",colorFF0000:"colorFF0000___IMgd0",pagination:"pagination___ou2ht",checkboxWrapper:"checkboxWrapper___kF7xI"},fe=u(955),M=u(85057),Ze=u(71418),P=u(24905),g=u(24780),X=u(26724),z=u.n(X),Ce=(_,me,T)=>new Promise((ve,Ee)=>{var ne=te=>{try{xe(T.next(te))}catch(Fe){Ee(Fe)}},Oe=te=>{try{xe(T.throw(te))}catch(Fe){Ee(Fe)}},xe=te=>te.done?ve(te.value):Promise.resolve(te.value).then(ne,Oe);xe((T=T.apply(_,me)).next())}),Re=({username:_,setStages:me,stages:T,hasError:ve,setHasError:Ee})=>{const[ne,Oe]=(0,v.useState)(""),[xe,te]=(0,v.useState)(1),[Fe,Ae]=(0,v.useState)([]),[le,$e]=(0,v.useState)(!1),[nt,St]=(0,v.useState)(0);(0,v.useEffect)(()=>{Rt({page:1,search:""},!0)},[]);const Rt=(vt,It)=>Ce(void 0,null,function*(){$e(!0);const gt=yield(0,g.w3)({username:_,category:"manage",page:vt.page,search:vt.search});$e(!1),Ae(qe=>It?gt==null?void 0:gt.subjects:[...qe,...gt==null?void 0:gt.subjects]),St(gt==null?void 0:gt.count)}),Et=(0,v.useRef)();return v.createElement("div",{className:ce.wrap},v.createElement("div",{className:"mb10"},v.createElement(M.t7,{placeholder:"\u8BF7\u8F93\u5165\u5B9E\u8DF5\u8BFE\u7A0B\u540D\u79F0\u7684\u5173\u952E\u5B57\u8FDB\u884C\u641C\u7D22",value:ne,style:{width:500},onChange:vt=>{Oe(vt),te(1),Et.current.scrollTo({behavior:"smooth",top:0}),Rt({page:1,search:vt},!0)}})),v.createElement(Ze.Z,{spinning:le},v.createElement("div",{className:ce.radioWrap,ref:Et},v.createElement(z(),{initialLoad:!1,pageStart:1,threshold:6,loadMore:()=>{te(xe+1),Rt({page:xe+1,search:ne},!1)},hasMore:Fe.length{me({subjectId:vt.target.value,stage_ids:[]}),Ee(!1)}},Fe.map(vt=>{const It=vt.stages.map(gt=>({label:gt.name,value:gt.id}));return v.createElement("div",{key:vt.id},v.createElement(ee.ZP,{className:ce.radio,value:vt.id},vt.name),vt.id===T.subjectId&&v.createElement("div",{className:ce.checkboxWrapper},It.length>0&&v.createElement(P.default,{indeterminate:T.stage_ids.length>0&&T.stage_ids.length{me({subjectId:vt.id,stage_ids:gt.target.checked?It.map(qe=>qe.value):[]})},checked:T.stage_ids.length===It.length},"\u5168\u9009"),v.createElement(P.default.Group,{options:It,value:T.stage_ids,onChange:gt=>me({subjectId:vt.id,stage_ids:gt})})))}))))),ve&&v.createElement("div",{className:ce.colorFF0000},"\u8BF7\u5148\u9009\u62E9\u5B9E\u8DF5\u8BFE\u7A0B\u53CA\u7AE0\u8282"))},de=u(76895),ae=u(35390),ue=Object.defineProperty,A=Object.getOwnPropertySymbols,w=Object.prototype.hasOwnProperty,j=Object.prototype.propertyIsEnumerable,N=(_,me,T)=>me in _?ue(_,me,{enumerable:!0,configurable:!0,writable:!0,value:T}):_[me]=T,De=(_,me)=>{for(var T in me||(me={}))w.call(me,T)&&N(_,T,me[T]);if(A)for(var T of A(me))j.call(me,T)&&N(_,T,me[T]);return _},Te=(_,me)=>{var T={};for(var ve in _)w.call(_,ve)&&me.indexOf(ve)<0&&(T[ve]=_[ve]);if(_!=null&&A)for(var ve of A(_))me.indexOf(ve)<0&&j.call(_,ve)&&(T[ve]=_[ve]);return T},ze=(_,me,T)=>new Promise((ve,Ee)=>{var ne=te=>{try{xe(T.next(te))}catch(Fe){Ee(Fe)}},Oe=te=>{try{xe(T.throw(te))}catch(Fe){Ee(Fe)}},xe=te=>te.done?ve(te.value):Promise.resolve(te.value).then(ne,Oe);xe((T=T.apply(_,me)).next())});const Me=_=>{var me=_,{userDetail:T,globalSetting:ve,loading:Ee,user:ne,dispatch:Oe}=me,xe=Te(me,["userDetail","globalSetting","loading","user","dispatch"]),te,Fe,Ae,le,$e;const[nt,St]=(0,v.useState)("course"),[Rt,Et]=(0,v.useState)(""),[vt,It]=(0,v.useState)([]),[gt,qe]=(0,v.useState)(),[yt,V]=(0,v.useState)(!1),[Z,L]=(0,v.useState)(!1);(0,v.useEffect)(()=>{T.actionTabs.key==="UserDetail-SendToClass"&&U(Rt)},[T.actionTabs.key]);const U=C=>ze(void 0,null,function*(){V(!0);const Q=yield Oe({type:"userDetail/topicGetCourseList",payload:{search:C}});Q&&It((Q==null?void 0:Q.courses)||[]),V(!1)}),[J,Se]=(0,v.useState)({subjectId:"",stage_ids:[]}),x=()=>ze(void 0,null,function*(){var C,Q,I,F,pe,je;if(nt==="course"){if(!gt){L(!0);return}const Be=yield Oe({type:"userDetail/topicSendToClass",payload:De({course_id:gt},(C=T.actionTabs)==null?void 0:C.params)});if(Oe({type:"userDetail/setActionTabs",payload:{}}),Be&&Be.status===0){const it={normal:"common_homework",group:"group_homework",exercise:"exercise",poll:"poll",videos:"video"};(0,fe.xg)(`/classrooms/${gt}/${it[(I=(Q=T.actionTabs)==null?void 0:Q.params)==null?void 0:I.object_type]}`)}}else{if(!J.subjectId||!J.stage_ids.length){L(!0);return}(yield(0,ae.nI)({id:(pe=(F=T.actionTabs)==null?void 0:F.params)==null?void 0:pe.object_id,login:(je=ne.userInfo)==null?void 0:je.login},{stage_ids:J.stage_ids})).status===0&&(H.ZP.success("\u53D1\u9001\u6210\u529F"),Oe({type:"userDetail/setActionTabs",payload:{}}),(0,fe.xg)(`/paths/${J.subjectId}`))}});return v.createElement(se.default,{centered:!0,keyboard:!1,closable:!1,destroyOnClose:!0,open:T.actionTabs.key==="UserDetail-SendToClass",title:"\u53D1\u9001",okText:"\u786E\u5B9A",cancelText:"\u53D6\u6D88",confirmLoading:Ee["userDetail/sendToClass"],width:600,afterClose:()=>{L(!1),It([]),Se({subjectId:"",stage_ids:[]}),Et("")},onOk:x,wrapClassName:de.Z.CustomCss,onCancel:()=>{Oe({type:"userDetail/setActionTabs",payload:{}})}},v.createElement(R.default,{activeKey:nt,onChange:C=>{L(!1),St(C)},items:[{label:"\u8BFE\u5802",key:"course",children:v.createElement("div",{className:ce.wrap},v.createElement("div",{className:"mb10"},v.createElement(M.t7,{placeholder:"\u8BF7\u8F93\u5165\u8BFE\u5802\u540D\u79F0\u7684\u5173\u952E\u5B57\u8FDB\u884C\u641C\u7D22",value:Rt,style:{width:500},onChange:C=>{Et(C),U(C)}})),v.createElement(B.Z,{active:!0,loading:yt},v.createElement("div",{className:ce.radioWrap},v.createElement(ee.ZP.Group,{value:gt,onChange:C=>{qe(C.target.value),L(!1)}},vt.map((C,Q)=>v.createElement(ee.ZP,{className:ce.radio,value:C.course_id,key:C.course_id},C.course_name))))),((Fe=(te=T.actionTabs)==null?void 0:te.params)==null?void 0:Fe.object_type)!=="videos"&&v.createElement("div",{className:ce.title},"\u6E29\u99A8\u63D0\u793A\uFF1A\u9009\u62E9\u7684\u9898\u5C06\u4F1A\u53D1\u9001\u5230\u6307\u5B9A\u8BFE\u5802"),Z&&v.createElement("div",{className:ce.colorFF0000},"\u8BF7\u5148\u9009\u62E9\u8BFE\u5802")),show:!0},{label:"\u5B9E\u8DF5\u8BFE\u7A0B",key:"subject",children:v.createElement(Re,{username:(Ae=ne.userInfo)==null?void 0:Ae.login,stages:J,setStages:Se,hasError:Z,setHasError:L}),show:(($e=(le=T.actionTabs)==null?void 0:le.params)==null?void 0:$e.object_type)==="videos"}].filter(C=>C.show)}))};var he=(0,O.connect)(({userDetail:_,loading:me,globalSetting:T,user:ve})=>({userDetail:_,globalSetting:T,loading:me.effects,user:ve}))(Me)},56749:function(Ht,lt,u){"use strict";u.r(lt),u.d(lt,{default:function(){return x}});var v=u(59301),O=u(89070),H=u(43418),se=u(8591),R=u(61621),B=u(58421),ee=u(8797),ce=u(78241),fe=u(92832),M=u(54580),Ze=u(3113),P=u(99064),g=u(3294),X=u(19248),z=Object.defineProperty,Ce=Object.getOwnPropertySymbols,st=Object.prototype.hasOwnProperty,Re=Object.prototype.propertyIsEnumerable,de=(C,Q,I)=>Q in C?z(C,Q,{enumerable:!0,configurable:!0,writable:!0,value:I}):C[Q]=I,ae=(C,Q)=>{for(var I in Q||(Q={}))st.call(Q,I)&&de(C,I,Q[I]);if(Ce)for(var I of Ce(Q))Re.call(Q,I)&&de(C,I,Q[I]);return C},ue=(C,Q,I)=>new Promise((F,pe)=>{var je=_e=>{try{it(I.next(_e))}catch(Ye){pe(Ye)}},Be=_e=>{try{it(I.throw(_e))}catch(Ye){pe(Ye)}},it=_e=>_e.done?F(_e.value):Promise.resolve(_e.value).then(je,Be);it((I=I.apply(C,Q)).next())});const A=({userDetail:C,user:Q,cb:I,loading:F,dispatch:pe})=>{const{actionTabs:je}=C,[Be]=ce.default.useForm(),[it,_e]=(0,v.useState)(!1),[Ye,re]=(0,v.useState)(void 0);(0,v.useEffect)(()=>{var oe,dt;C.actionTabs.key==="\u7F16\u8F91\u89C6\u9891"&&(Be.setFieldsValue({title:je.data.title,attachment_id:(oe=je==null?void 0:je.data)==null?void 0:oe.attachment_id}),re((dt=je==null?void 0:je.data)==null?void 0:dt.attachment_id))},[C.actionTabs.key]);const Pe=()=>v.createElement("div",{style:{position:"relative",backgroundColor:"#f4f3f4",display:"flex",alignItems:"center",justifyContent:"center"}},v.createElement("img",{src:g.Z.API_SERVER+"/api/attachments/"+Ye,alt:"avatar",style:{width:288}}),v.createElement("div",{style:{position:"absolute",right:"-6px",top:"-6px",cursor:"pointer",backgroundColor:"#fff",width:"16px",height:"16px",borderRadius:"50%"}},v.createElement(X.Z,{onClick:()=>re(void 0),style:{fontSize:"16px",color:"red"}}))),et=oe=>{var dt,pt,ft,ot,_t,jt;if(oe.file.status==="uploading"){_e(!0);return}if(oe.file.status==="done"){if(_e(!1),oe.file.status==="done"&&((pt=(dt=oe.file)==null?void 0:dt.response)==null?void 0:pt.status)===-1){se.ZP.error((ot=(ft=oe.file)==null?void 0:ft.response)==null?void 0:ot.message);return}re((jt=(_t=oe==null?void 0:oe.file)==null?void 0:_t.response)==null?void 0:jt.id)}};return v.createElement(H.default,{bodyStyle:{padding:"30px 40px"},centered:!0,open:C.actionTabs.key==="\u7F16\u8F91\u89C6\u9891",footer:null,width:643,destroyOnClose:!0,closable:!1},v.createElement("div",{style:{display:"flex",justifyContent:"space-between",marginBottom:"42px"}},v.createElement("div",{style:{fontSize:"16px",fontWeight:"500",color:"#000",lineHeight:"16px"}},"\u89C6\u9891\u6807\u9898\u7F16\u8F91"),v.createElement("i",{className:"icon-danchuangguanbi iconfont",style:{fontSize:"15px",cursor:"pointer"},onClick:()=>{pe({type:"userDetail/setActionTabs",payload:{}})}})),je.data&&v.createElement(ce.default,{form:Be},v.createElement(ce.default.Item,{label:"\u89C6\u9891\u6807\u9898",name:"title",rules:[{required:!0,message:"\u8BF7\u8F93\u5165!"}],style:{marginBottom:"34px"}},v.createElement(fe.default,{maxLength:60})),v.createElement(ce.default.Item,{name:"attachment_id",label:"\u4E0A\u4F20\u5C01\u9762\u56FE:",style:{marginBottom:"34px"}},Ye?Pe():v.createElement(M.default,{withCredentials:!0,name:"file",showUploadList:!1,action:`${g.Z.API_SERVER}/api/attachments.json`,onChange:et,accept:"image/*"},v.createElement(Ze.ZP,{loading:it,icon:v.createElement("i",{className:"iconfont icon-shangchuantupian2"})},v.createElement("span",{style:{marginLeft:"3px"}},"\u4E0A\u4F20\u56FE\u7247")))),v.createElement("aside",null,"\u4EC5\u652F\u6301\u4E0A\u4F20jpg/png\u7B49\u683C\u5F0F\u6587\u4EF6\uFF0C\u6587\u4EF6\u5927\u5C0F\u4E0D\u80FD\u8D85\u8FC72M,\u5EFA\u8BAE\u4F7F\u7528278*225\u50CF\u7D20\uFF1B\u5982\u4E0D\u4E0A\u4F20\uFF0C\u9ED8\u8BA4\u4F7F\u7528\u7CFB\u7EDF\u56FE\u7247\u3002"),v.createElement(ce.default.Item,null,v.createElement(Ze.ZP,{style:{float:"right",marginLeft:"20px"},loading:it,onClick:()=>ue(void 0,null,function*(){var oe,dt,pt;Be.setFieldsValue({attachment_id:Ye||((oe=je==null?void 0:je.data)!=null&&oe.attachment_id?(dt=je==null?void 0:je.data)==null?void 0:dt.attachment_id:void 0)});const ft=ae({},yield Be.validateFields());(yield(0,P.ZP)(`/api/users/${(pt=Q==null?void 0:Q.userInfo)==null?void 0:pt.login}/videos/${je.data.id}/change_cover.json`,{method:"put",body:ae({},ft)}))&&(se.ZP.success("\u4FEE\u6539\u6210\u529F"),pe({type:"userDetail/setActionTabs",payload:{}}),I())})},"\u786E\u5B9A"),v.createElement(Ze.ZP,{style:{float:"right"},onClick:()=>{pe({type:"userDetail/setActionTabs",payload:{}})}},"\u53D6\u6D88"))))};var w=(0,O.connect)(({userDetail:C,loading:Q,user:I})=>({userDetail:C,loading:Q,user:I}))(A),j=u(18889),N=u(6848),De=u(71418),Te=u(36193),ze=u(56102),Me={flex_box_center:"flex_box_center___XLvPY",flex_space_between:"flex_space_between___olqDv",flex_box_vertical_center:"flex_box_vertical_center___7Ehj3",flex_box_center_end:"flex_box_center_end___eAyvU",flex_box_column:"flex_box_column___h6EKr",wrap:"wrap___jMjpV",bottomActionWrap:"bottomActionWrap___MLvvL",playIconWrap2:"playIconWrap2___tjBpv",playIcon:"playIcon___Zxs9h",playIconWrap:"playIconWrap___yexC0",linkWrap:"linkWrap___mfd8s",link:"link___XFVyj",imgWrap:"imgWrap___VBvxW",cardBottom:"cardBottom___afGBc",bottomTitle:"bottomTitle___ZuGLa",actionIcon:"actionIcon___yvtTa",timeWrap:"timeWrap___j2lof",time:"time___IA2yw",peopleWrap:"peopleWrap___O2Jrn",playTime:"playTime___apDZs",bottomTitleTip:"bottomTitleTip___nLAHv"},he=u(46134),_=Object.defineProperty,me=Object.defineProperties,T=Object.getOwnPropertyDescriptors,ve=Object.getOwnPropertySymbols,Ee=Object.prototype.hasOwnProperty,ne=Object.prototype.propertyIsEnumerable,Oe=(C,Q,I)=>Q in C?_(C,Q,{enumerable:!0,configurable:!0,writable:!0,value:I}):C[Q]=I,xe=(C,Q)=>{for(var I in Q||(Q={}))Ee.call(Q,I)&&Oe(C,I,Q[I]);if(ve)for(var I of ve(Q))ne.call(Q,I)&&Oe(C,I,Q[I]);return C},te=(C,Q)=>me(C,T(Q));const Fe="90%",Ae="55%",le=({data:C,isReview:Q,dispatch:I,onDelete:F=()=>{},logWatchHistory:pe=()=>{},onSend:je=()=>{}})=>{const[Be,it]=(0,v.useState)(),[_e,Ye]=(0,v.useState)({}),re=oe=>{if(isNaN(oe))return{minutes:"00",seconds:"00"};const dt=new Date(oe*1e3).toISOString().substr(11,8);return{hour:dt.substr(0,2),minutes:dt.substr(3,2),seconds:dt.substr(6,2)}},Pe=oe=>{oe.link||(it(!0),Ye({videoId:oe.id,file_url:oe.play_url||oe.file_url,copyUrl:et(oe.play_url||oe.file_url,oe.cover_url),logWatchHistory:pe}))},et=(oe,dt)=>{if(oe)return``};return v.createElement(v.Fragment,null,C&&C.map((oe,dt)=>{var pt;const ft=re(oe.play_duration||0),ot=(pt=oe==null?void 0:oe.cover_url)!=null&&pt.includes("https")?oe.cover_url:g.Z.API_SERVER+oe.cover_url;return v.createElement("a",{className:Me.wrap,key:oe.id},v.createElement(j.Z,null,v.createElement(N.Z,{title:"\u89C6\u9891\u65F6\u957F",placement:"bottom"},v.createElement("div",{className:Me.playTime},ft.hour==="00"?"":ft.hour+":",ft.minutes+":",ft.seconds)),v.createElement(De.Z,{tip:"\u6B63\u5728\u8F6C\u7801\uFF0C\u8BF7\u7A0D\u7B49...",spinning:!oe.transcoded&&!oe.link},v.createElement("div",{className:Me.imgWrap},v.createElement("img",{src:ot}),oe.link&&v.createElement("a",{className:Me.linkWrap,href:oe.link,target:"_blank",title:oe.title},v.createElement("span",{className:Me.link},"\u5916\u94FE")),Q?v.createElement("div",{className:Me.playIconWrap2},v.createElement("img",{className:Me.playIcon,src:Te})):v.createElement("div",{className:Me.playIconWrap,onClick:()=>{!Q&&Pe(oe)}},v.createElement("img",{className:Me.playIcon,src:Te})),v.createElement("div",{className:Me.bottomActionWrap},v.createElement("span",{className:Me.peopleWrap},!!oe.people_num&&v.createElement(N.Z,{title:"\u89C2\u770B\u4EBA\u6570",placement:"bottom"},v.createElement("i",{className:"icon-dianjiliang iconfont font12"},oe.people_num))),v.createElement("div",null,v.createElement(N.Z,{title:"\u7F16\u8F91",placement:"top"},v.createElement("i",{className:`${Me.actionIcon} icon-bianji10 iconfont`,onClick:()=>{I({type:"userDetail/setActionTabs",payload:{key:"\u7F16\u8F91\u89C6\u9891",data:oe}})},style:{marginTop:"1px",display:"inline-block"}})),!Q&&v.createElement(ze.CopyToClipboard,{text:et(oe.play_url||oe.file_url,oe.cover_url),onCopy:()=>se.ZP.success("\u590D\u5236\u6210\u529F")},v.createElement(N.Z,{title:"\u590D\u5236\u94FE\u63A5",placement:"top"},v.createElement("i",{className:`${Me.actionIcon} icon-lianjie2 iconfont`}))),v.createElement(N.Z,{title:"\u5220\u9664",placement:"top"},v.createElement("i",{className:`${Me.actionIcon} icon-shanchu12 iconfont`,onClick:()=>F(oe.id)})),(oe==null?void 0:oe.status)!="processing"&&v.createElement(N.Z,{title:"\u53D1\u9001",placement:"top"},v.createElement("i",{className:`${Me.actionIcon} icon-fasongzhiketang`,onClick:()=>je(oe.id)})))))),v.createElement("div",{className:Me.cardBottom},v.createElement(N.Z,{overlayClassName:Me.bottomTitleTip,getPopupContainer:_t=>_t.parentNode,title:oe==null?void 0:oe.title,placement:"bottom",autoAdjustOverflow:!1,arrowPointAtCenter:!0,mouseEnterDelay:0,mouseLeaveDelay:0},v.createElement("div",{className:Me.bottomTitle},oe.title)),oe.total_time&&v.createElement("div",{className:Me.timeWrap},v.createElement("div",{className:Me.time},oe.total_time&&`\u7D2F\u8BA1\u5B66\u4E60\u65F6\u957F\uFF1A${oe.total_time}`)))))}),v.createElement(he.K,te(xe({},_e),{visible:Be,allow_skip:!0,width:800,onClose:()=>{it(!1),Ye({})}})))};var $e=(0,O.connect)(({userDetail:C})=>({userDetail:C}))(le),nt={flex_box_center:"flex_box_center___IcqlF",flex_space_between:"flex_space_between___wI3bO",flex_box_vertical_center:"flex_box_vertical_center___wd4F6",flex_box_center_end:"flex_box_center_end___sX6yw",flex_box_column:"flex_box_column___oOUfO",body:"body___qkQFy",status:"status___lJSfh",datalist:"datalist___u3xx3",pager:"pager___inNi6",wrap:"wrap___u5nsU",midWrap:"midWrap___AEcVw",color999:"color999___UbIGq",orderWrap:"orderWrap___NBpTb",orderIconWrap:"orderIconWrap___BWV6J",orderAsc:"orderAsc___d0bIf",orderDesc:"orderDesc___XbnhV",color0152d9:"color0152d9___QUmiG",h10:"h10___aHhYp",cursorPointer:"cursorPointer___tv0ub",orderTextWrap:"orderTextWrap___xIS1a",cardWrap:"cardWrap___YxQcT",countWrap:"countWrap___nr9pc",colorRed:"colorRed___zZSQ2",modal:"modal___AyGQi"},St=u(46474),Rt=u(34604),Et=u(85057),vt=u(955),It=u(93018),gt=Object.defineProperty,qe=Object.getOwnPropertySymbols,yt=Object.prototype.hasOwnProperty,V=Object.prototype.propertyIsEnumerable,Z=(C,Q,I)=>Q in C?gt(C,Q,{enumerable:!0,configurable:!0,writable:!0,value:I}):C[Q]=I,L=(C,Q)=>{for(var I in Q||(Q={}))yt.call(Q,I)&&Z(C,I,Q[I]);if(qe)for(var I of qe(Q))V.call(Q,I)&&Z(C,I,Q[I]);return C},U=(C,Q)=>{var I={};for(var F in C)yt.call(C,F)&&Q.indexOf(F)<0&&(I[F]=C[F]);if(C!=null&&qe)for(var F of qe(C))Q.indexOf(F)<0&&V.call(C,F)&&(I[F]=C[F]);return I},J=(C,Q,I)=>new Promise((F,pe)=>{var je=_e=>{try{it(I.next(_e))}catch(Ye){pe(Ye)}},Be=_e=>{try{it(I.throw(_e))}catch(Ye){pe(Ye)}},it=_e=>_e.done?F(_e.value):Promise.resolve(_e.value).then(je,Be);it((I=I.apply(C,Q)).next())});const Se=C=>{var Q=C,{user:I,userDetail:F,globalSetting:pe,loading:je,dispatch:Be}=Q,it=U(Q,["user","userDetail","globalSetting","loading","dispatch"]),_e;const[Ye]=(0,O.useSearchParams)(),re=(0,O.useLocation)(),Pe=(0,v.useRef)(),[et,oe]=(0,v.useState)(0),[dt,pt]=(0,v.useState)([]),[ft,ot]=(0,v.useState)({category:Ye.get("category")||"all",page:1,per_page:15,sort_by:"published_at",sort_direction:"desc",username:null,search:null}),[_t,jt]=(0,v.useState)(!1);(0,v.useEffect)(()=>{var an;Pe.current=(an=re.pathname.split("/"))==null?void 0:an[2],ft.username=Pe.current,ot(ft),Yt(ft)},[re.pathname]);const Zt=((_e=re.pathname.split("/"))==null?void 0:_e[3])||"classrooms";(0,v.useEffect)(()=>Rt.Z.subscribe("user-detail-search",mn=>J(void 0,null,function*(){if(Zt===mn.currentTabName){const Ot={category:"all",page:1,per_page:15,sort_by:"published_at",sort_direction:"desc",username:Pe.current,search:mn.value};ot(Ot),jt(!1),yield Yt(Ot),jt(!0)}})),[]);const Yt=an=>J(void 0,null,function*(){let mn;an.category==="all"?mn=yield Be({type:"userDetail/getVideos",payload:an}):mn=yield Be({type:"userDetail/getReviewVideos",payload:an}),mn&&(oe((mn==null?void 0:mn.count)||0),pt((mn==null?void 0:mn.videos)||[]))}),Mt=an=>{ft.search=an,ft.page=1,ot(ft),Yt(ft)},$t=an=>{var mn;ft.category=an,ft.page=1,(mn=window.location.href.toString())!=null&&mn.includes("category")?(0,vt.jz)("category",an):window.history.replaceState(null,"",window.location.href.indexOf("?")>-1?window.location.href+`&category=${an}`:`?category=${an}`),ot(ft),Yt(ft)},xt=()=>{ft.sort_direction=ft.sort_direction==="desc"?"asc":"desc",ot(ft),Yt(ft)},Ft=an=>{ft.page=an,ot(ft),Yt(ft)},qt=()=>{var an,mn;((an=I.userInfo)!=null&&an.admin||(mn=I.userInfo)!=null&&mn.is_teacher&&(0,St.O5)())&&O.history.push(`/users/${Pe.current}/videos/upload`)},Bt=an=>{const mn=H.default.confirm({icon:null,centered:!0,content:v.createElement("div",{style:{margin:"0px ",width:370}},v.createElement("div",{style:{display:"flex",justifyContent:"space-between",marginBottom:"42px"}},v.createElement("span",{style:{fontWeight:"500",color:"#000000",lineHeight:"16px"}},"\u63D0\u793A"),v.createElement("i",{className:"icon-danchuangguanbi iconfont",style:{cursor:"pointer"},onClick:()=>{mn.destroy()}})),v.createElement("div",{className:nt.modal},"\u8BE5\u89C6\u9891\u5C06\u88AB\u5220\u9664\uFF0C\u4E0D\u53EF\u6062\u590D\uFF0C\u662F\u5426\u786E\u8BA4\u5220\u9664?")),okType:"default",onOk:()=>J(void 0,null,function*(){(yield Be({type:"userDetail/deleteVideo",payload:{id:an,username:Pe.current}}))&&(se.ZP.info("\u89C6\u9891\u5220\u9664\u6210\u529F\uFF01"),ft.page>1&&(dt==null?void 0:dt.length)===1&&(ft.page=ft.page-1,ot(L({},ft))),Yt(ft))})})},Kt=an=>{Be({type:"userDetail/setActionTabs",payload:{key:"UserDetail-SendToClass",params:{object_id:an,username:Pe.current,object_type:"videos"}}})},hn=an=>Be({type:"userDetail/logWatchHistory",payload:an}),en=[{id:"all",name:"\u5BA1\u6838\u901A\u8FC7\u89C6\u9891"},{id:"pending",name:"\u5F85\u5BA1\u6838\u89C6\u9891"}],xn=[{id:"published_at",name:"\u6700\u65B0\u4E0A\u4F20"}];return v.createElement("div",{className:nt.body},v.createElement(Et.YG,{onChange:$t,value:ft.category,tabBarExtraContent:v.createElement(Et.t7,{style:{width:303},placeholder:"\u641C\u7D22\u89C6\u9891",value:ft.search,onChange:Mt}),className:"mb25",dataSource:en}),v.createElement("div",{className:nt.status},v.createElement(Et.cq,{dataSource:xn,sortValue:ft.sort_direction,dropValue:ft.sort_by,onSort:xt,onDrop:()=>{console.log(123123)}}),v.createElement(Et.op,{style:{marginLeft:"auto"},onClick:qt},"\u4E0A\u4F20\u89C6\u9891")),v.createElement(R.Z,{loading:!!(je["userDetail/getVideos"]||je["userDetail/getReviewVideos"]),active:!0,paragraph:{rows:5}},dt.length==0?v.createElement(ee.Z,null):v.createElement("div",{className:nt.datalist},v.createElement($e,{data:dt,isReview:ft.category==="pending",onDelete:Bt,onSend:Kt,logWatchHistory:hn})),v.createElement("div",{className:nt.pager},et>ft.per_page&&v.createElement(B.Z,{showQuickJumper:!0,showSizeChanger:!1,total:et,onChange:an=>Ft(an),pageSize:ft.per_page,current:ft.page}))),v.createElement(It.Z,null),v.createElement(w,{cb:()=>Yt(ft)}))};var x=(0,O.connect)(({user:C,userDetail:Q,loading:I,globalSetting:F})=>({user:C,userDetail:Q,globalSetting:F,loading:I.effects}))(Se)},4901:function(Ht,lt,u){"use strict";u.d(lt,{BU:function(){return O},Dj:function(){return v},gH:function(){return H},vp:function(){return se}});function v(R){try{R.mozRequestFullScreen?R.mozRequestFullScreen():R.webkitRequestFullScreen&&R.webkitRequestFullScreen()}catch(B){console.log(B,":e")}}function O(){window.top.document.webkitExitFullscreen?window.top.document.webkitExitFullscreen():document.exitFullscreen?window.top.document.exitFullscreen():document.msExitFullscreen?window.top.document.msExitFullscreen():document.mozCancelFullScreen&&window.top.document.mozCancelFullScreen()}const H=()=>{if(document.webkitExitFullscreen)return"webkitfullscreenchange";if(document.exitFullscreen)return"fullscreenchange";if(document.msExitFullscreen)return"msfullscreenchange";if(document.mozCancelFullScreen)return"mozfullscreenchange"};function se(){var R=window.top.document.fullscreenElement||window.top.document.mozFullscreenElement||window.top.document.webkitFullscreenElement,B=document.fullscreenEnabled||document.mozFullscreenEnabled||document.webkitFullscreenEnabled;return console.log("fullscreenElement",R),window.isFullScreen?window.isFullScreen:R!=null}},46474:function(Ht,lt,u){"use strict";u.d(lt,{rX:function(){return A},pW:function(){return w},gy:function(){return j},xY:function(){return ue},O5:function(){return ae},hs:function(){return Ce},tJ:function(){return X},o1:function(){return z},Rd:function(){return de}});var v=u(89070),O=u(43418),H=u(28103),se=u(8591),R=u(24065),B=u(955),ee=u(87169),ce=u(25510),fe="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAZAAAAGQCAIAAAAP3aGbAAAABGdBTUEAALGPC/xhBQAAACBjSFJNAAB6JgAAgIQAAPoAAACA6AAAdTAAAOpgAAA6mAAAF3CculE8AAAABmJLR0QA/wD/AP+gvaeTAAAACXBIWXMAABcRAAAXEQHKJvM/AAAouElEQVR42u3de5gU1Z038HOqqu89PQPMhQHkNqCiCCK5qMRojIkXRNFERDTGNRvik5hNjPtgzEuyJLq6sq/EbEyy+u5jjBEhSEREvKyXQJRVs1FEMARhhhlgLsDAMD3T96o67x8zzPQMPTPVU12XX8/38/D4PDZdVedUd3+py6nf4UIIBgBAgeR0AwAAjEJgAQAZCCwAIAOBBQBkILAAgAwEFgCQgcACADIQWABABgILAMhAYAEAGQgsACADgQUAZCCwAIAMxfhbOedOt7a/nKUmcrbT2aIUxned8Xaa/DhMbsi2dppk8nO3ovG27XnbemTbDmE4wgIAQhBYAEAGAgsAyEBgAQAZCCwAIAOBBQBk5DGsIaedO3dWVFRY3cpVq1atXLnS4JuNj3WwgvF7tCbHZFhxe9u2dZp8Z04uHGlhxbAbKz44F/6KB2I2sCoqKqqqqqzuajgctnoTACMWoV8xTgkBgAwEFgCQgcACADIQWABABgILAMgwe5cwJ5O3jVtaWgp+z8KKW+bOPvjuwq1bMaTD+OLG2+ks2/aSSS78FTMcYQEAIQgsACADgQUAZCCwAIAMBBYAkIHAAgAyLBnW4CxnS/fb9k4r7nk7W8LBClZUQbBiYIEVI2ycnXjFIjjCAgAyEFgAQAYCCwDIQGABABkILAAgA4EFAGQU4bAGK25Fu/Besm03wm27i2/bEATbNmTbN6QoRzDkhCMsACADgQUAZCCwAIAMBBYAkIHAAgAyEFgAQIYlwxpaWlrMLG5F7Xpnpy2w7Ta8bawo4eDC6RVIf0YmufBXzCwKLIvaCgC2ceevGKeEAEAGAgsAyEBgAQAZCCwAIMPsRfdVq1aFw2GrW7llyxZ7dgfACEToV8ydvd9vkhV1CPBOvHOkvdNZeY0IwSkhAJCBwAIAMhBYAEAGAgsAyEBgAQAZCCwAICOPcVhUnke3rcg/lYktbLuT7eyet+0zIo16j3CEBQBkILAAgAwEFgCQgcACADIQWABABgILAMjIo1pDHit19K6zFXfxXTiwgMqz+FZ004Wc/YidHSJjsuILqjUAQHFCYAEAGQgsACADgQUAZCCwAIAMBBYAkGF21hxnKxZQqdJvW5Nsm1LEinbmXNy2vlNZ3DhnfwgWjbDBERYAkIHAAgAyEFgAQAYCCwDIQGABABkILAAgw+ywBpOsuMlKZZ3GN2RycdsKcriQC3cIlclH3FkOBEdYAEAGAgsAyEBgAQAZCCwAIAOBBQBkILAAgAz7JqHIiUqZfeONN8nZ4gS29d2KggcmWbF1Z4tnGN8QlZk+GI6wAIAQBBYAkIHAAgAyEFgAQAYCCwDIQGABABl5VGuw7Z63FSMYSN/NpTK1hEkuHC5AZdzMyPl14AgLAMhAYAEAGQgsACADgQUAZCCwAIAMBBYAkGG2WoMLa++bbKdxzvbIZN+pVL9wdqyDs01y4eKO/95xhAUAZCCwAIAMBBYAkIHAAgAyEFgAQAYCCwDIyKNaQ0623bA3eUPUhdMBmOym8XdaMdOH8b67cLYLZ1kxdsS2ARDOThTCcIQFAIQgsACADAQWAJCBwAIAMhBYAEAGAgsAyDBbrSGPLbmvEgDpDRnfum3VGqzYEJXSCC5skjtnkTAJR1gAQAYCCwDIQGABABkILAAgA4EFAGQgsACAjDyqNdh2x93kOq1ovLM9smIQgG1lDEw2ydlhNzk5+7lb0U1n5+/AJBQAUJwQWABABgILAMhAYAEAGQgsACADgQUAZJidhMI2VlTpt22sQ045t27baAPjO8TZ2S5sG/hiRa0IZ4tSWNFO4zAJBQCMdAgsACADgQUAZCCwAIAMBBYAkIHAAgAyzA5rcPYpc2ebZFvjTXJ2h9h2v9/Zxhtf3OSGrJjpw2Q7c7LogyMzDguMsOKbN5LbCW6DU0IYcdasWTNhwgSnWwHDkce8hM7OOmcclUHtJtcJJi1ZsmTNmjU9/+vCT9PxankONn4gOMKCEeqZZ55ZtmyZ062A/OAIq8AbyglHWK510003rV27lrny08QRVo7VIrAKu6GcEFhuNnHixIMHD7rw00Rg5Vitsx2wIu+c/c2T/pIZbXkyqbceUxsOqrV16r46rf6A1tist7Xp7e2iIyYyaZFRGWPco3CPl5eEpNJSadQoeXy1PHmiMm2qUjNVmXSaVD6G+/1Od4Uxxp599tlFixbl7qkF/5wbX9x4k6xIB3d+FRFYdnQzJyo96m5DJqO3HM7s2p1+f3vmo13q3lrtaKuIdghVZcabxzlXFB4pkSvKlek1nlkzvXPneGbOkMZWcY/Hwd5VVlYePXo0R68RWMNd3CIILDu6mROJHolMRqs/kNr2burNrentO7SDjSKVKuD6uc8nnzbeO2e279KLffPOlydPdCS5+t0x7O0+Amu4i1sEgWVHN3NyeY/01mOpbe8mNm5ObXtHa2xmmmbt9mRZHl/tm3dB4Nr5vnnnS+Vj7OzsunXrbrzxxlNfR2ANe3GLILDs6GZOLu2REGp9Q/KFl+Lrn8/s2i2SSfs23bUH/H7PzBnBry70XzNfmTyR2fJoTlNT0/jx43PtDATWMBe3CALLjm7m5LoeCaHW1cfXPBv/w3Nq3X6m63ZsdCCSpNRMCS66PnjTDcrUyTbElhWJg8AqOASWHd3MyVU90ppb4qvXxZ56Rt1Xl8dFdKtxrkybGrp1SfDmRXL1WIs3hcAqZI8sYsk4LLNtct84F+Mc/0TzbnA8kXjx5c5fPpbevsPyC1XDI8veObPD3/1W4OoreTBg0UZcOGrJihGFtpVbsGjXIbAKjFZgZT7e3bHq0cTzm0Q84XRbhsCDgcDCBSU/uNNz9gxL1o/AcmhDeUFgFRiVwBLJZGL9xuhDP1f31Trdljwo02oi99wV+Oq1BR90isByakN5QWAVGInA0pqaOx56JLZ6rYjFnW5L3ngoGLp5cck935fHVRdytQgshzaUFwRWgbk/sNLvf9i+/GeprW+76OJ6vjj3Xfy50vt/4p17buFWicByZkN5QXmZkUQXyc2vHL/tjtSWtwinFWNMiNSWt47fdkdy8ytMp9wRyBMCa8RQ1dhTq9u+czeti1aDdWhfbdt37o49tZqpqtNtAZvYV17GOCqFPqwYSGXRiYlIZ2KPPxG9f6XeHjW5KreRSiOR5ctCS2/nXlMPIbpwAJ0Lf0dWbD0vmISi+Il0pvNXj0UfeFh0djrdlsLT26PtP/03kcmEv/Mtk5kF7odTwmKnqrHHnyjWtOoiOjujDzwce/wJnBsWPQRWURMi9vTa6P0rizitujva2Rm9f2Xs6bW0bybAUBBYxSy5+dXoigeL77pVTnp7NLriweTmV51uCFgIgVW00u9vP/GjFdrhI043xD7a4SMnfrQi/f52pxsCVkFgFSetqbl9+X3q3iIZwWCcure2ffl9WlOz0w0BS5gtL0Nlghxnh0rYPGhYpFLt9/yk87EnzGyUtPC3bi996Gfc5zO+CJXyMjk5+8CJSZhIdaRLPLsh9vRap1vhpNjTaxPPbnC6FVB4CKxik9m1O7ryEYpPNReQiMWjKx/JfLzb6YZAgSGwioqIJzoeeXQEXro6lbq3tuPnj7q/zhfkBYFVVBKbXkps2OR0K9wisWFTYtNLTrcCCgmBVTy05pbOXz2OY4oeIp7o/NXjWnOL0w2BgkFgFY/46nXp9z90uhXukn7/w/jqdU63AgrGbLUG45ytbeBsqQnzd4iH3CdqbV3rdUtw9epUyvSa8g3PKDVTB3+bC2d1craIgjtLOOAIq0jE16xHWuWk7q2Nr1nvdCugMBBYxUCtq4+ve86SVQvBdL3Pn7z0WzbfP13/IJtpAGOMsfi659S6ekv2D9gL9bCKQXLTS+q+usKvVzBp9Gipopyxk0fyqqodbBSZjKHFZVmedBr3+XsXz4uua43NTFXl08Yz5eQXNZPRDjUZbcBJ6r665KaXwt/7duF3EdgLgUWe3nosvn6j0bIqksR0vXvCVM67/wy4ai2wcH5k+bLu4xpJ0hqbjn9tqbq/nklDHZsLIZWWjvrFv3tmnT2c+Vk5F52x40u/q+5vGPX/fqlMnsR0nUmy+vc9x267Qxw5mt/k9ULE128M3nyjVD6mwHsf7IXAIi+17d3Mro+NvJN7veE7vyVVVqh792kNB9WDh/Rjx0VHh0ilezOF8z5hJMty9djedNB1pshGWyZLUlXFsKeYF50x7vMxIeSKip4ZvdRP9opEcoh0zpVlmV0fp7a9G7h2fmF2OjgEgUVcRk1s3CySqaHfKQTz+fxXXub73IVMFyKR0KMd+uEjWlOzWrtf3V+v7m/Qmpr11mPakaO9pTu7LiT1REC+53ambgoJJgQPBJjX2/OS1tTCFZmXlrIBDrBEOiOSyRyvJ1OJjZsDV13OPPjOE2b2wzN+N9f4XVKT91OtmA7AhVN1dFHrG1Lb3jHaNq9HKokwxpjEeSgoh4JydZXn3HO6m5hIing88/dPjn/j21r9gazjLBPtNPdJMsakkrAU6J3k2ff5C8f84XcDLiFJsaeeiT+1JudBVmrbO2p9gzK9Jo8WOPqltYJtG7II/rWhLbXtXe1Qk6G3CsH9fl4Szv23nPNggAcDUqSEJVMDXiHiLI8Q0nX9SKvW3DLErT0heDgklZX1vhCL6+3tojMmkkmpojy7zfKE8fKE8YNsMfa71UzXmZzjvFU71JTa9m5egQVug8AiTGQyqTe3Gr/TL0VKeCAw+Hu0xmY9Gu0bWKInpISqCdXYHTrO9RPtbf/0z0MXpdL14A3XRZYv6zmmS7zyWvS+h5imaQcOhW67mfv9Q26te00n2tVP9g2yodSbW0M3L2IeTK5DFQKLML35cHr7jjzeH4+n3tyqnHWmXFXRHV6nHImo++tFKt3zv9zr7XMNXlVZMmX0IEvTtLp6MUSecsaE1nI4+zq6ONGu/v0TputMUTyzzzF+Q1A/clRrbB7k/entO7Tmw/LECeZ2PDgGgUVY5uPd2qFGo++WJO3AobZv38VLI3L5GKmqUh43VpkyWamZKk86TR5fLY0qk8JhdX89U9WeIOM+b/Y6RDotdN3oSaEQ8qSJ/su/yBUl9309SdIONSZe+m/GeZ8Q5IzJMhNCKh/jmTPr1NX2+d+seFIPHtJPnBgksLRDjZmPdyOw6EJgEZb+4END9wd7CCHSaXHkqN5yhO36G2OMSRLzeKRwSBpVJo+rlieMT3/4Ud8xVn1+/CKeyGPuP133nHl62cr7BjwP5Tz15p+Tb2wdqLWeGWcoU6f0vKDure38zX+JRKI7knThn//lwIKret+we4+IxQcJLJFMpT/40H/llwr9UYBNEFhUiWQys2Nn/osJxhiT+5zl6W0n9ONt6r46JgST5d4fPOc8FOyzdCwm8p2sdPCxqQP9jRBMUQJXXymVRnpeS7ywufPRx5jouqYmmCR5P31eVke0zK7dTNNyXnHvkdmxUySTxq+LgavkEVi2VUGwYl4M295pxfiJnFvXW4/l/bSzokiREhGLi1Sqz0jRfoNFszfc9+BI7+hkeT4WM0y6rpx5uv/qK3pfaDuRfOX1rl507Slp9CjPWWf2viEazezeM+SK1b21euuxwW41DsW2CU2cnZnCtqIUecERFlVqwwHtaGseC+i6MmVS2cMPiERSO9SoHWpUDxzS6hu0I0f1Y20imWSZDBOMSVnhJUk80mcYhIh2iIya32MxgxtoVUJ4Pz1XmXRazwuZ7TsyH+3qbZsQ8tgqOesNWlOzdvDQkM8MaUdb1YYDZgILHITAokqt3S+iHXksIIQ0epT3U+dJo8q6X0ilRWen3npMa2pWGw6otfvV+gPq7j2Z3Xt6Hh6USkuz16G3nRjOg4Enpf705/T/fsCknlNOSd1XK9JdNyX7/YPMpdKSnvQRGTX+x436ifbswFKmTZVGj+rdIX//RD/eNmSYimiHWrvfN++Cgn8iYAMEFlXqvrr8ihYIIZWEs0dFcZ+X+0ZLY0YrZ0z3nXxPfN1zbd/8btdYBK7I2eM5GWPakaNM14d+8nkAiU0vd/z8l4xLJ69ddT/003/wBOt/bSvz0c7ky6/1eUmWvZ+em30pKv3RLpFKDdk2oWY0KypbgC0QWFRp9QfyXYSXlAwxZpJzrflwdw4Kwf3+7GveTNf1I0eMloXIxTN7ZuAr1/E+mSKYzxf4yrW5joxOjlZNp2NPrtYam7IPr6RIxPuZub1ricUzH+401DbB1Px3HbgEAosqrdHYEzk9OJdGj+LyoAcgQmj1Dd032oTgoSAv6z0lFKqqHztu5nnm0C2LgzfdcErDJN7/gWTOOJfC3ZfPUlu3JZ57oU+i6bo8ZZJy5unZeyOzZ6/Bi2taIyaypwqBRZXediK/BSQp/Zf3o//678q0GnnSBLm6WhpdJoVCvbXxGBPxhLq/oXeJsrLsi0QintBaj5l6nlmWuTx0dRqhaUywrrIKasOBjodW6a3H+p3reT8zVy4f031IxXnmk3264SJZelubiT6Ak/IILGdnfLDz1qkZtg2A0Nvb821ZZseuzI6dzOORgkFpzChp7FhlyiRl8iRl+lR5XLVUVck0TWts6v7ZCyFPGN9zmMMYEx0d+rHjhbxFOFDXWg4zXWNcUusb2u/5SWrbu/2vTMlyZuff2u76IdNPBtbHu0UyaTSwcu06275Lzs5yYtvvyKIN4QiLKtERy3sZiTPGmabp0aje3s5q96fffofJEvMo3B+QIiVSaUStb2C8Ox2UaVN5VmkXrblFb80zsPKq7sAYY0zd35B85XXGeeqtbcmXXhlo4rL0O++ls+vqSJLxWwHD2XXgDggsqkQmPfyF+40+VzXR0aFFo9qhRiZJ3Qnj8XjOOrPPk3r7G0RHNJ/A4npbe+qd97jPa/DKl360Nfbk6vT2HUySUlve6r4jKQQvKQl/8zZ5fLXQdc640NT46nV9hmXZtuvAUQgsqkTGwCMyeR2BnzwT7PqvFClRzpie/feZj3eL5FDjBrLjTJbS23ccW/T1PI6x0hmRSPYO1OralhBSaST09SU97RGpVGrL28N5Msn4rgNXQmAVL865z9f748+LpnvOmenJCiyRTKqf1HK/f/Ca7iKj9j4d3dUAzvOolOz19taHEEwkEl3jVLnPx/xZdbXSGZFIOLRbwUkILKq4RxGDDDoXQopEIivuVaZMEnr+VzqFUCaM7zPHjCSF71wa/NriQU4JucRjT61JrN/IZIkJIZWVlj74U+X0acOZTJBzEU+0/+S+zPsfMsZ4KCiFQj1/qcfjejQ67ALMHGXdycInRxX3eIeoLePz+i660DPzrMJszuv1fW7ox1lS297rPQ/1eLxzZnlmnzO8LYrOmFRa2lXuVCorzb78Lzpjoj067AEW3OMd5pLgNEsCy4q7pC4cwWCFPEaElIRYx6DPEgphbtKaYenb1OEc3GUtffKCGpPHVmXPnSNiMb0zNuwBFrwkNLwFuxe3ax4HF/6OrKg/kVeTMFU9Vf0eS87N/hlS+KD/O9x1yuOqedZDRfrxNpFIDnt9hnYduBJOCamSRo0a8j0ik2GaJvKrr8C595TnDVV1qNLsjDHGJalPLQchWEY10gAuyQNfyxdM8chTJmW/pB05KmIxpmmMc2Zg6Pwwdh24EwKLKnl89WB/zbmIdrT/aIUUKTU0uIGzrnKjodtu8V/+xey/UffVdqz8hX7ixBDHS5wxxjJ/29NdzpRz0dHR/uP7pNIhGiCEHvjSpaF//HrPgInUn7fFf79WpNPqnr1MkngwoNRMyV5ECocDV1/BGNdjsfT/vNdbNLkguw5cDIFFlTJ5Iht0wIBIp1NvbDU+FEvoeuCqL3tmnd3nxXi84//+R+y3vzfarKwR5yKVTr2xZYjDK86ZEHL5mFBWO9VP9sV+t7q7XjNjckW5Mmli9kL+L1/q++IljDMR7Tj29aWp1/6Ux3EWZ8rkiUbfDC6DwKJKnjaVK54hSmIZ/xlrmnfunNIHfypXj81+ObFhU/zZ57sLvZ+afYMf1wghjRmjnD6NDVgigov29szuPUyS+xy+SZx5PN2DIXRdHlctVVb0WU5RuMIYY7x8THDhgtSWt42PnOCKR5421eTOB6cgsKhSaqbwSIk4drwA69J1efKk0gdX9BsDkd7+UfShn4vOTibLgQVXej/7aSZO5gKXUlvfSr765mCnibrumTNr9G9/wwP+nEeCXJaTW986/rWlg48sVc48XcqesFqI7KD0XXKRMnWy+sk+g4/p8EiJUoPAosq+SSiMs+22scm+G2+8FVMMKJMmyhXluvnA0nV5bFXpA//iv/TiPi+3Hove/1DXVSSmatznC3/7H7MrfPo+d37mw51ay5FBBtNzRZFKI4NMNy2FQkMcpnm93s/MzQ4jtW4/D4XlsZXd+6Fmiv/KL3UOMuFzX3JFeXap+N6mWvCtM/m1Mfnjsq1HxhtvHoY1UCWVj1Gm15hdi65LY0aXPvAvweuvyQ4OkUp1PPLr5CuvdyeFxJNvbEn/dXv2op45s/3XXJXHYzfDap5cUe6dOyf7tcSml1Ov/ylrR0iBa6+Wxow2eLVOmV7TZwQ/kILAoor7/cMeRN5N16XKitL7fxJc/NU+51NCxH+/tvM3/5U9FZjeeiz+hz9mT0rIPZ7QLTdKVZVmiiYPeRXMc+45ytTJvS8kEqktbyde2CySveOwvHNm+y660OBlLM/sczApIV24hkWY97xzud+X3+TPPbrOBB/8aXDxV/pd/Um+sTX64MOis7P/6y+/pn7zNs+smT2veM6dFbjyy7EnnzY4qiCzZ6/WcKDn+jqXpfT2j5jWFYK5Uk9R/Jd9gQd7J3PVmlvUv38iMhl1X13PFTceDAQWLki+8vrJCXgGxP0+73nnWvBRgE0QWIR5zp4hTxivDmMOGE2Xp0ws+7efBa6d3y+V0n/9oH3Z8u7CWNkkSWtsSrz4SnZgcZ8v9A83J17+b4PlieO/W9356ONZNw050zQRT+SeHVrX5dMm+C65qE/zPtihtbSIVDr56uvZtwh8F12onDE9s2Pn4Jfe5QnjPWfPsO4TAavhlJAwqbrKO2d23ovpuufsM0c9uipw3YJ+P291z94Td/+fzMe7c//sdT2xYZN2qDH7Nc95cwLzLzd4VshDIamyQqqsPPmnQqquUmac4bvw/BxbFML3+QuVrCEIIpNJvvq6iCeYpiVffi27qr08YVzg6iuGDE3vnNlydZUFHwXYBEdYhHGPx3fpxfE/bjQ6CkkIxpjvC58vffCn3jmz+v2lure27a4fpt/73wEPUiQps3tP4sVXw3fc3tsGryd065LE5leNHGSF7/hG8KYb+oyEEIx7PNLJW349a2VCSKPKgjfdkD2RorqvLrX17a7DsfSOnem/vJ89KD9wzVWx3z6tNTUP0n7fpRcPMdEZuJvZSSisWNzZMQRWjN6wbqyDb9758oRx2oFDRjrGFCV4/TWR+5b3GzjOGFPr6k/84N7UG1uGGM2UTifWbwguWiiNHt3zmue82f4vXxp/ai2Th2i8NGa0NGY0G5IQTNd9l32hX0Gb5Euvage7z1VFtCPx4sv+yy7pGRyrnHWm79LPx3+/dqC1yhPG+eadP/A2C/+1Mcn4Ol04g4ZFTcIpIW3K5EmGZl3Xdam0NPLDH5T9x8pT0yqzY2fbHd9LvvanocdeSlJ6+0ept9/Nfo37fKHbbpEqy03dLsxubNsJqaI8fMc3sgdwaQcb4+s2ZB9Lpv68Tc06P+Veb/ArC3kkMlAzfPMuUPo+RA3kILCI8yiBa+fz7PLBpxJCmXHGqF+vKrnnrn5TzzNdT/152/Gl/5Ta+rahUjCci46O+Nr12aMKGGPez3wqMP+KggSW3h5N/c97wZtu8F3wmezXEy9szvwt6+KaJGn7G1JvvZP9Hu9nP+U556ycJ8jc7wtcOz97EkagCJ8feb5553tmnp3+6wcDvcH76fMiP7zbM2eWfuRoVqZwpmuJza92rHpUO3Awj+lnJCm15a3ka3/yfmpO70AtWfZ96QuJjS/qJ9r7DEBNJrXGZh7wG6sYwUVnLPbkav3o0eCy72tHjnZHjySp9Q2djz3B0pnsdopkMrFhk2/eZ7nXe3JGVcl3wWfT7/zl1HV7Zp49yPkgUMGtGOlv2+UAF17DcuRiWecvfn3i3hW5Q4FzuapSKivNUdBK07RDTSKRGMZkWXJVJS/rWzdG1bRDh0Q662FswXgoKI+vNl77RcTjWlOLFCnpMx6Vc9HRqTXlmF+e+3zyhPG94yS63tnc0n9XcF724Irw976dbzdtu2SDeYKNNgCBNezF3RNYal1968LF6t7agbY04AFOzgFQRugix1DPXEMT8j5PlKTcS+VMVcF6n8ce+J3K9Jry59dmj5g3CIHl1A4ZCK5hFQNl6uTgousH/GvOu8tUnfpn2Hd+pVzrzGvTA/0ZaKncXWNG3hlcdP0w0gpcKI8jrNzLO/pEuLP/BJnse2Ebr9bWtV63ZMCDrBFMmV5TvuEZR0rKOPvrsGJDVnQTk1CMRErN1NCtS4Y3dXsxk6TQrUtQAKto4PtdPII3L/LOPdfpVriLd+65wZsXOd0KKBgEVvGQq8eGv7OUBwPmV1UceDAQ/s7SfkWfgTQEVlEJLLgqcN0Cp1vhFoHrFgQWXOV0K6CQEFhFhQcDJXfdqUyf5nRDnKdMn1Zy15043iwyCKxi4zl7RmTZ93goaH5VdPFQMLLseyh9VXzsq9aQk8nn0W2r0p9znS4c19clcMN16b9u73zsCacb4pjQLYsDN1xn0cptG0FtG5M/Lju7iSOsIsR9vpJl3+9Xq3Pk8F1yUcmy72cX0oKigcAqTvK46tL7f1yAaXWoUabXlN7/Y3kcJqMvTgisouWdO6fsgRVyVaX5VVEhV1WWPbCi37RgUEwQWMXMP//yyIp7pdKI0w2xg1Qaiay41z//cqcbAhZCYBU1zkO3LI4sX8bDYfMrczMeDkeWLwvdsnj4j3MDBQisYqcooaW3R350dxFnFg+HIz+6O7T0dhQULXpurNZgkhWjDWwr5mVRj0Q6E3v8iej9K/X2aMF3jrOk0khk+bLQ0tu519R0OLaVHLCi7ogLG29ReRUEVoG76c7AYowxVY09vTa64kHt8JGC7x+nyFWVkRX3hm5ZbP7YyoW/edKNtyiwcEo4YihK6NYlo371sDKtSMY6KNNqRv3q4dCtS3AmOHIgsEYSSfLPv2L0k//pu+Qi2henOfddctHoJ//TP/8KlAAbUXBKWOBuuveUMIvW1Nzx0COx1WtFLF7YNduAh4KhmxeX3PP9wo4OdeFZFenG4xqWUQgsQ+tMJhPrN0Yf+rm6j1JVZWVaTeSeuwJfvZb7/YVdswt/86Qbj8AyCoFlXObj3R2rHk08v0nEExZtolB4MBBYuKDkB3daVIPBhb950o13PrBsa6sVc2oZZ1veuaTYg4gnEi++3PnLx9Lbd/ROjOoqsuydMzv83W8Frr7SuvpWVvzmXbhO4xvKCYFV+A2ZNNICq4vW3BJfvS721DPqvrqCzDhfGJwr06aGbl0SvHmR1ZWOXRguLvzOI7AKvyGTRmZgdTVIrauPr3k2/ofn1Lr97NSZou0kScrUKcEbrw/edIMydbIN9zRdGC4u/M4jsAq/IZNGbmCdbJZafyD5wub4+uczu3aLZNLm7XO/3zNzRvCrC/3XzFcmT7Rt+IULw8WF33kEVuE3ZNJID6yT9NZjqW3vJjZuTm17R2tstvzylizL46t98y4IXDvfN+98qXyMzf11Ybi48DuPwCr8hkxCYPVpZCaj1R9IbXs39ebW9PYd2sFGkUoVcs/4fPJp471zZvsuvdg373x58kTuMfVI4PBb4r5wceF3HoFV+A2ZhMDKSWQyesvhzK7d6fe3Zz7ape6t1Y62imiHUNU8LtJzzhWFR0rkinJleo1n1kzv3DmemTOksVVO5VR200ztHwTWcN+ZF7PjsKzolXG0fvNGkIg2kUzqrcfUhoNqbZ26r06rP6A1NultJ/T2dtERE5m0yKiMMe5RuMfLS0JSaak0qkweP06ePFGZNlWpmapMOk0qH1PwwZ/2sO3fY5NNMs62wYPm+47AchcSgTXCIbCGvU7zfceDowBABgILAMhAYAEAGQgsqtauXet0EwDshovu7pLXrqusrLzssssWLlx40UUXjR1r7aN20AMX3Ye9TvN9t6S2rMm2OjsOy2Q3c7KikowVWzfZ95Hzsyl4O40vnrOdVnwczn5pB4JTQgAgA4EFAGQgsACADAQWAJCBwAIAMhBYAECGfeVlnOXCqXSojMexopvO7qWcRsiX1njf3VlnCUdYAEAGAgsAyEBgAQAZCCwAIAOBBQBkILAAgIw8qjXYdpPVtkodVgzUoHIr2rbBCiZ7ZFvfnS0xYlvtDePFHoyz89eBIywAIAOBBQBkILAAgAwEFgCQgcACADIQWABARh7DGpx97N62ev5W3KO1besmpy0wyYXDBXKiUmLEWVZMgYFqDQAwgiCwAIAMBBYAkIHAAgAyEFgAQAYCCwDIyGMSCks2774n161op8l12nbH3YUzkpCelcMkZ7+fJjdkUQkHHGEBABkILAAgA4EFAGQgsACADAQWAJCBwAIAMsgMa3DhU/vO3sV34Z1sk+s0zoVbd+E4D2fLq1gER1gAQAYCCwDIQGABABkILAAgA4EFAGQgsACAjDwmoTDOihoMxhc3eefVZEV9K7hwAg6T7XR2ZgrH780XvEkunGPFor7jCAsAyEBgAQAZCCwAIAOBBQBkILAAgAwEFgCQkUe1BmfLGFixIdv6bnydLpwXwzjbboTbtnXbyi04O6TD2flQMKwBAIoTAgsAyEBgAQAZCCwAIAOBBQBkILAAgIw8qjWYLGNg2/wIVrBitIELZ9BwdoeYXNy2cR623e/PyYq+W7FOi3YIjrAAgAwEFgCQgcACADIQWABABgILAMhAYAEAGXlUazC7JUeLEzhbK8K2IR3FN3bEhTVCrOhmTi4cVGFbjwaCIywAIAOBBQBkILAAgAwEFgCQgcACADIQWABARh7VGkxytjyAyQ1ZcdvYtjoEVgyAoDLbhbPrNF7LxHiTbCvI4WydjIHgCAsAyEBgAQAZCCwAIAOBBQBkILAAgAwEFgCQkcewBioPvlsxAMK2u/gunHPB5OJWjJ+wbeSKs1u3YnHqRT5whAUAZCCwAIAMBBYAkIHAAgAyEFgAQAYCCwDIMFutYefOnRUVFVa3ctWqVStXrjT4ZtsqK+RE5Ql7K1BpvAtHmdhWI8S2QhcWDWswG1gVFRVVVVVWtCxbOBy2ehMA4H44JQQAMhBYAEAGAgsAyEBgAQAZCCwAIMOSSShM3tFsaWkp+J1HZx+RN75O23pkRWEGk5wdEWJFN0023mTdEWfH9xjvZl5whAUAZCCwAIAMBBYAkIHAAgAyEFgAQAYCCwDIsGRYg7NIP99vRd+tKDlg2zutYLxJzk7/Ydv+dOEcKwPBERYAkIHAAgAyEFgAQAYCCwDIQGABABkILAAgowiHNYzk4QJWPEzvwm7mZEVlBZP1Epwd65CTbSMYLBq5giMsACADgQUAZCCwAIAMBBYAkIHAAgAyEFgAQIYlwxpaWlrMLG5yBgrbSvfbVnKASsED25j8iE2u0/jiJsc6uLBWhLPrZBYFVsHnvAEAYDglBABCEFgAQAYCCwDIQGABABlmL7qvWrUqHA5b3cotW7bYszsAwM24FXeIbUPl0XPbahsY76ZtU3W48+64ma0bZ9tnZFtdB9tKoQwEp4QAQAYCCwDIQGABABkILAAgA4EFAGQgsACAjDyGNQAAOAtHWABABgILAMhAYAEAGQgsACADgQUAZCCwAIAMBBYAkIHAAgAyEFgAQAYCCwDIQGABABkILAAgA4EFAGQgsACAjP8Prqme11Be/zoAAAAASUVORK5CYII=",M=u.p+"static/newqrcode.a8740efb.png",Ze=u(32637),P=u(59301),g=(N,De,Te)=>new Promise((ze,Me)=>{var he=T=>{try{me(Te.next(T))}catch(ve){Me(ve)}},_=T=>{try{me(Te.throw(T))}catch(ve){Me(ve)}},me=T=>T.done?ze(T.value):Promise.resolve(T.value).then(he,_);me((Te=Te.apply(N,De)).next())});const X=(N,De=!1,Te=!1,ze="",Me=!1)=>!!(z(N)&&st(N,De,Te,ze,Me)),z=N=>(0,R.bg)()?!0:(N({type:"user/showPopLogin",payload:{showPopLogin:!0,showClosable:!0}}),!1),Ce=N=>{var De,Te,ze;const{user:Me}=(0,v.getDvaApp)()._store.getState();(0,R.bg)()&&!((Te=(De=Me==null?void 0:Me.userInfo)==null?void 0:De.course)!=null&&Te.course_public)&&!((ze=Me==null?void 0:Me.userInfo)!=null&&ze.profile_completed)&&N({type:"user/showUpdateProfilePanel",payload:{showUpdateProfilePanel:!0,showClosable:!0,backurl:"/account/profile/edit",isCurrentPage:!0}})},st=(N,De=!1,Te=!0,ze="",Me=!1)=>{var he;const{user:_}=(0,v.getDvaApp)()._store.getState();return(he=_.userInfo)!=null&&he.profile_completed?!0:(Te?N({type:"user/showUpdateProfilePanel",payload:{showUpdateProfilePanel:!0,showClosable:!0,backurl:ze,isCurrentPage:Me}}):O.default.confirm({title:"\u63D0\u793A",width:530,centered:!0,content:"\u60A8\u9700\u8981\u53BB\u5B8C\u5584\u60A8\u7684\u4E2A\u4EBA\u8D44\u6599\uFF0C\u624D\u80FD\u4F7F\u7528\u6B64\u529F\u80FD",okText:"\u7ACB\u5373\u5B8C\u5584",cancelText:"\u7A0D\u540E\u5B8C\u5584",onOk:()=>{(0,B.xg)("/account/profile/edit"),Re()}}),!1)},Re=()=>{O.default.success({title:"\u63D0\u793A",width:430,closable:!0,centered:!0,content:"\u5DF2\u5B8C\u5584\u4E2A\u4EBA\u8D44\u6599\uFF1F\u8BF7\u5237\u65B0\u9875\u9762",okText:"\u7ACB\u5373\u5237\u65B0",icon:null,onOk:()=>{location.reload()}})},de=()=>{O.default.warning({title:"\u63D0\u793A",icon:null,width:400,content:P.createElement("div",{style:{textAlign:"center"}},P.createElement("div",{style:{color:"#191919",fontSize:14,marginBottom:15,textAlign:"left"}},"\u8001\u5E08\u60A8\u597D\uFF0C\u60A8\u7684\u8BFE\u5802\u8BD5\u7528\u671F\u5DF2\u7ED3\u675F\uFF0C\u76F8\u5173\u529F\u80FD\u88AB\u9650\u5236\u3002 \u5982\u9700\u7EE7\u7EED\u4F7F\u7528\uFF0C\u8BF7\u5C3D\u5FEB\u5BF9\u63A5\u4EBA\u5DE5\u652F\u6301\uFF01"),P.createElement("img",{style:{border:"1px solid #D8E3E9",width:190,height:180},src:Ze}),P.createElement("div",{style:{color:"#666666",fontSize:14,marginTop:15}},"\u6DFB\u52A0\u5BA2\u670D\u4EBA\u5458\u5FAE\u4FE1\uFF0C\u83B7\u5F97\u66F4\u591A\u652F\u6301"))})},ae=()=>{var N;const{user:De}=(0,v.getDvaApp)()._store.getState();return(N=De.userInfo)!=null&&N.professional_certification?!0:(O.default.confirm({title:"\u63D0\u793A",centered:!0,content:P.createElement("div",{className:"tc"},"\u60A8\u9700\u8981\u53BB\u5B8C\u6210\u60A8\u7684\u804C\u4E1A\u8BA4\u8BC1\uFF0C\u624D\u80FD\u4F7F\u7528\u6B64\u529F\u80FD"),okText:"\u7ACB\u5373\u5B8C\u5584",cancelText:"\u7A0D\u540E\u5B8C\u5584",onOk:()=>{(0,B.xg)("/account/certification")}}),!1)},ue=()=>(0,R.V9)()?!0:(O.default.warning({centered:!0,width:530,title:"\u63D0\u793A",content:P.createElement("div",{className:"tc",style:{marginLeft:-38}},P.createElement("p",null,"\u626B\u7801\u52A0\u5934\u6B4C\u52A9\u6559\uFF0C\u7533\u8BF7\u64CD\u4F5C\u6743\u9650"),P.createElement("img",{src:M,width:200})),okText:"\u6211\u77E5\u9053\u4E86",maskClosable:!0}),!1),A=(N,De)=>N?!0:(O.default.confirm({centered:!0,zIndex:1e4,width:530,title:"\u63D0\u793A",content:P.createElement("div",null,P.createElement("p",null,De||"\u8BE5\u5B9E\u8DF5\u8D44\u6E90\u9700\u6388\u6743\u540E\u624D\u53EF\u4F7F\u7528\u3002 \u60A8\u53EF\u4EE5\u5728QQ\u670D\u52A1\u7FA4\u5411\u7BA1\u7406\u5458\u7533\u8BF7\uFF0C\u83B7\u5F97\u7EE7\u7EED\u64CD\u4F5C\u7684\u6743\u9650\u3002"),P.createElement("div",{style:{marginLeft:"110px"}},P.createElement("img",{src:fe,width:200}),P.createElement("div",{style:{marginLeft:"35px"}},"\u7FA4\u53F7\uFF1A","714336072"))),okText:"\u7ACB\u5373\u8054\u7CFB",cancelText:"\u53D6\u6D88",onOk:()=>{(0,B.xg)("https://qm.qq.com/cgi-bin/qm/qr?k=tIyDPXUtE0yEk-MOJxhH55lTUJS-nYAM&jump_from=webapi")}}),!1),w=N=>{O.default.info({title:"\u8054\u7CFB\u5E73\u53F0\u8FD0\u8425",icon:null,width:615,centered:!0,content:P.createElement("div",null,P.createElement("div",null,P.createElement("p",{style:{color:"#191919",fontWeight:400,fontSize:14}},"\u201C\u4FDD\u5B58\u5B9E\u9A8C\u4E34\u65F6\u6570\u636E\u201D\u529F\u80FD\u4E3A\u4ED8\u8D39\u529F\u80FD\uFF0C\u8BF7\u8054\u7CFB\u5E73\u53F0\u8FD0\u8425\u8FDB\u884C\u5F00\u901A\u3002"),P.createElement(H.Z,null),P.createElement("p",{style:{color:"#666666",fontSize:12}}," ",P.createElement("span",{style:{display:"inline-flex",width:14,height:14,borderRadius:2,background:"#F3F3F3",justifyContent:"center",color:"#666666",fontSize:12,lineHeight:"14px",marginRight:8}},"1")," \u56E0\u5E73\u53F0\u7684\u5B9E\u9A8C\u6570\u636E\u50A8\u5B58\u5BB9\u91CF\u548C\u6210\u672C\u6D88\u8017\u8F83\u5927\uFF0C\u5B9E\u8DF5\u9879\u76EE\u9ED8\u8BA4\u4FDD\u5B58\u5B9E\u9A8C\u73AF\u5883\u4E2D\u4E34\u65F6\u6570\u636E ",P.createElement("a",null,N),"\u5929\u3002"),P.createElement("p",{style:{color:"#666666",fontSize:12}}," ",P.createElement("span",{style:{display:"inline-flex",width:14,height:14,borderRadius:2,background:"#F3F3F3",justifyContent:"center",color:"#666666",fontSize:12,lineHeight:"14px",marginRight:8}},"2"),"\u82E5\u60A8\u9700\u8981\u4E2A\u6027\u5316\u7684\u6570\u636E\u4FDD\u5B58\u5468\u671F\u670D\u52A1\uFF0C\u6211\u4EEC\u53EF\u4EE5\u63D0\u4F9B\u76F8\u5173\u6280\u672F\u652F\u6301\uFF0C\u5E76\u6839\u636E\u60A8\u7684\u9700\u6C42\u6536\u53D6\u5B9A\u5236\u8D39\u7528\u3002")),P.createElement("div",{style:{textAlign:"center",marginTop:30}},P.createElement("img",{style:{border:"4px solid #0152d9",borderRadius:"4px"},src:ce,alt:"\u4E8C\u7EF4\u7801",width:160})))})},j=(N,De="")=>{const{shixunsDetail:{detail:Te}}=(0,v.getDvaApp)()._store.getState();if((Te==null?void 0:Te.public)===2||(Te==null?void 0:Te.public)===1||(Te==null?void 0:Te.shixun_status)===3){let ze="";return(Te==null?void 0:Te.public)===2&&(ze="\u5DF2\u516C\u5F00"),(Te==null?void 0:Te.public)===1&&(ze="\u5F85\u5BA1\u6838"),(Te==null?void 0:Te.shixun_status)===3&&(ze="\u5DF2\u5173\u95ED"),O.default.info({centered:!0,icon:P.createElement(ee.Z,{style:{color:"#faad14"}}),width:460,title:"\u63D0\u793A",content:P.createElement("div",{className:"tc",style:{marginLeft:-38}},P.createElement("div",{style:{display:"flex",flexDirection:"column",alignItems:"flex-start",paddingLeft:38,margin:"12px 0"}},P.createElement("span",null,"\u8BE5\u5B9E\u8DF5\u9879\u76EE\u7684\u72B6\u6001\u4E3A",ze,"\uFF0C",De,"\u3002"),P.createElement("p",null,"\u5982\u6709\u9700\u8981\uFF0C\u8BF7\u8054\u7CFB\u5E73\u53F0\u7BA1\u7406\u5458\u8FDB\u884C\u6280\u672F\u652F\u6301\u3002")),P.createElement("img",{style:{border:"4px solid #0152d9",borderRadius:"4px"},src:ce,alt:"\u4E8C\u7EF4\u7801",width:160})),okText:"\u6211\u77E5\u9053\u4E86"}),!0}return(Te==null?void 0:Te.shixun_status)===2?(O.default.confirm({centered:!0,icon:P.createElement(ee.Z,null),title:"\u63D0\u793A",content:P.createElement("div",null,P.createElement("span",null,"\u8BE5\u5B9E\u8DF5\u9879\u76EE\u5DF2\u53D1\u5E03\uFF0C",De,"\u3002"),P.createElement("br",null),P.createElement("span",null,"\u5982\u6709\u9700\u8981\uFF0C\u60A8\u53EF\u4EE5\u64A4\u9500\u53D1\u5E03\u540E\uFF0C\u518D\u8FDB\u884C\u64CD\u4F5C\u3002")),okText:"\u64A4\u9500\u53D1\u5E03",cancelText:"\u53D6\u6D88",onOk:()=>{O.default.confirm({width:440,centered:!0,icon:P.createElement(ee.Z,{style:{color:"#faad14"}}),title:"\u63D0\u793A",content:"\u64A4\u9500\u53D1\u5E03\u540E\uFF0C\u5B66\u5458\u5C06\u65E0\u6CD5\u8FDB\u884C\u7EC3\u4E60\u3002\u662F\u5426\u786E\u8BA4\u64A4\u9500\u53D1\u5E03\uFF1F",okText:"\u786E\u5B9A\u64A4\u9500\u53D1\u5E03",cancelText:"\u53D6\u6D88",onOk:()=>g(void 0,null,function*(){(yield N({type:"shixunsDetail/cancelRelease",payload:{id:Te==null?void 0:Te.identifier}})).status!==401&&(se.ZP.success("\u64A4\u9500\u53D1\u5E03\u6210\u529F\u3002\u5B9E\u8BAD\u56DE\u5230\u672A\u53D1\u5E03\u7684\u72B6\u6001\u3002"),N({type:"shixunsDetail/getShixunsDetail",payload:{id:Te==null?void 0:Te.identifier}}),N({type:"practiceSetting/getCommonData",payload:{id:Te==null?void 0:Te.identifier}}))})})}}),!0):!1}},29382:function(Ht,lt,u){"use strict";u.d(lt,{Z:function(){return Ot}});class v{static install(){Object.setPrototypeOf=Object.setPrototypeOf||function(l,h){return l.__proto__=h,l},Object.assign=Object.assign||function(l){if(l==null)throw new TypeError("Cannot convert undefined or null to object");let h=Object(l);for(let f=1;f ${h}`;R.ENABLE_CALLBACK&&R.emitter.emit("log","error",f),R.ENABLE_ERROR&&(console.error?console.error(f):console.warn?console.warn(f):console.log(f))}static i(l,h){(!l||R.FORCE_GLOBAL_TAG)&&(l=R.GLOBAL_TAG);let f=`[${l}] > ${h}`;R.ENABLE_CALLBACK&&R.emitter.emit("log","info",f),R.ENABLE_INFO&&(console.info?console.info(f):console.log(f))}static w(l,h){(!l||R.FORCE_GLOBAL_TAG)&&(l=R.GLOBAL_TAG);let f=`[${l}] > ${h}`;R.ENABLE_CALLBACK&&R.emitter.emit("log","warn",f),R.ENABLE_WARN&&(console.warn?console.warn(f):console.log(f))}static d(l,h){(!l||R.FORCE_GLOBAL_TAG)&&(l=R.GLOBAL_TAG);let f=`[${l}] > ${h}`;R.ENABLE_CALLBACK&&R.emitter.emit("log","debug",f),R.ENABLE_DEBUG&&(console.debug?console.debug(f):console.log(f))}static v(l,h){(!l||R.FORCE_GLOBAL_TAG)&&(l=R.GLOBAL_TAG);let f=`[${l}] > ${h}`;R.ENABLE_CALLBACK&&R.emitter.emit("log","verbose",f),R.ENABLE_VERBOSE&&console.log(f)}}R.GLOBAL_TAG="flv.js",R.FORCE_GLOBAL_TAG=!1,R.ENABLE_ERROR=!0,R.ENABLE_INFO=!0,R.ENABLE_WARN=!0,R.ENABLE_DEBUG=!0,R.ENABLE_VERBOSE=!0,R.ENABLE_CALLBACK=!1,R.emitter=new(se());var B=R;class ee{constructor(){this._firstCheckpoint=0,this._lastCheckpoint=0,this._intervalBytes=0,this._totalBytes=0,this._lastSecondBytes=0,self.performance&&self.performance.now?this._now=self.performance.now.bind(self.performance):this._now=Date.now}reset(){this._firstCheckpoint=this._lastCheckpoint=0,this._totalBytes=this._intervalBytes=0,this._lastSecondBytes=0}addBytes(l){this._firstCheckpoint===0?(this._firstCheckpoint=this._now(),this._lastCheckpoint=this._firstCheckpoint,this._intervalBytes+=l,this._totalBytes+=l):this._now()-this._lastCheckpoint<1e3?(this._intervalBytes+=l,this._totalBytes+=l):(this._lastSecondBytes=this._intervalBytes,this._intervalBytes=l,this._totalBytes+=l,this._lastCheckpoint=this._now())}get currentKBps(){this.addBytes(0);let l=(this._now()-this._lastCheckpoint)/1e3;return l==0&&(l=1),this._intervalBytes/l/1024}get lastSecondKBps(){return this.addBytes(0),this._lastSecondBytes!==0?this._lastSecondBytes/1024:this._now()-this._lastCheckpoint>=500?this.currentKBps:0}get averageKBps(){let l=(this._now()-this._firstCheckpoint)/1e3;return this._totalBytes/l/1024}}var ce=ee;class fe{constructor(l){this._message=l}get name(){return"RuntimeException"}get message(){return this._message}toString(){return this.name+": "+this.message}}class M extends fe{constructor(l){super(l)}get name(){return"IllegalStateException"}}class Ze extends fe{constructor(l){super(l)}get name(){return"InvalidArgumentException"}}class P extends fe{constructor(l){super(l)}get name(){return"NotImplementedException"}}const g={kIdle:0,kConnecting:1,kBuffering:2,kError:3,kComplete:4},X={OK:"OK",EXCEPTION:"Exception",HTTP_STATUS_CODE_INVALID:"HttpStatusCodeInvalid",CONNECTING_TIMEOUT:"ConnectingTimeout",EARLY_EOF:"EarlyEof",UNRECOVERABLE_EARLY_EOF:"UnrecoverableEarlyEof"};class z{constructor(l){this._type=l||"undefined",this._status=g.kIdle,this._needStash=!1,this._onContentLengthKnown=null,this._onURLRedirect=null,this._onDataArrival=null,this._onError=null,this._onComplete=null}destroy(){this._status=g.kIdle,this._onContentLengthKnown=null,this._onURLRedirect=null,this._onDataArrival=null,this._onError=null,this._onComplete=null}isWorking(){return this._status===g.kConnecting||this._status===g.kBuffering}get type(){return this._type}get status(){return this._status}get needStashBuffer(){return this._needStash}get onContentLengthKnown(){return this._onContentLengthKnown}set onContentLengthKnown(l){this._onContentLengthKnown=l}get onURLRedirect(){return this._onURLRedirect}set onURLRedirect(l){this._onURLRedirect=l}get onDataArrival(){return this._onDataArrival}set onDataArrival(l){this._onDataArrival=l}get onError(){return this._onError}set onError(l){this._onError=l}get onComplete(){return this._onComplete}set onComplete(l){this._onComplete=l}open(l,h){throw new P("Unimplemented abstract function!")}abort(){throw new P("Unimplemented abstract function!")}}let Ce={};function st(){let Xe=self.navigator.userAgent.toLowerCase(),l=/(edge)\/([\w.]+)/.exec(Xe)||/(opr)[\/]([\w.]+)/.exec(Xe)||/(chrome)[ \/]([\w.]+)/.exec(Xe)||/(iemobile)[\/]([\w.]+)/.exec(Xe)||/(version)(applewebkit)[ \/]([\w.]+).*(safari)[ \/]([\w.]+)/.exec(Xe)||/(webkit)[ \/]([\w.]+).*(version)[ \/]([\w.]+).*(safari)[ \/]([\w.]+)/.exec(Xe)||/(webkit)[ \/]([\w.]+)/.exec(Xe)||/(opera)(?:.*version|)[ \/]([\w.]+)/.exec(Xe)||/(msie) ([\w.]+)/.exec(Xe)||Xe.indexOf("trident")>=0&&/(rv)(?::| )([\w.]+)/.exec(Xe)||Xe.indexOf("compatible")<0&&/(firefox)[ \/]([\w.]+)/.exec(Xe)||[],h=/(ipad)/.exec(Xe)||/(ipod)/.exec(Xe)||/(windows phone)/.exec(Xe)||/(iphone)/.exec(Xe)||/(kindle)/.exec(Xe)||/(android)/.exec(Xe)||/(windows)/.exec(Xe)||/(mac)/.exec(Xe)||/(linux)/.exec(Xe)||/(cros)/.exec(Xe)||[],f={browser:l[5]||l[3]||l[1]||"",version:l[2]||l[4]||"0",majorVersion:l[4]||l[2]||"0",platform:h[0]||""},d={};if(f.browser){d[f.browser]=!0;let p=f.majorVersion.split(".");d.version={major:parseInt(f.majorVersion,10),string:f.version},p.length>1&&(d.version.minor=parseInt(p[1],10)),p.length>2&&(d.version.build=parseInt(p[2],10))}if(f.platform&&(d[f.platform]=!0),(d.chrome||d.opr||d.safari)&&(d.webkit=!0),d.rv||d.iemobile){d.rv&&delete d.rv;let p="msie";f.browser=p,d[p]=!0}if(d.edge){delete d.edge;let p="msedge";f.browser=p,d[p]=!0}if(d.opr){let p="opera";f.browser=p,d[p]=!0}if(d.safari&&d.android){let p="android";f.browser=p,d[p]=!0}d.name=f.browser,d.platform=f.platform;for(let p in Ce)Ce.hasOwnProperty(p)&&delete Ce[p];Object.assign(Ce,d)}st();var Re=Ce;class de extends z{static isSupported(){try{let l=Re.msedge&&Re.version.minor>=15048,h=Re.msedge?l:!0;return self.fetch&&self.ReadableStream&&h}catch(l){return!1}}constructor(l,h){super("fetch-stream-loader"),this.TAG="FetchStreamLoader",this._seekHandler=l,this._config=h,this._needStash=!0,this._requestAbort=!1,this._contentLength=null,this._receivedLength=0}destroy(){this.isWorking()&&this.abort(),super.destroy()}open(l,h){this._dataSource=l,this._range=h;let f=l.url;this._config.reuseRedirectedURL&&l.redirectedURL!=null&&(f=l.redirectedURL);let d=this._seekHandler.getConfig(f,h),p=new self.Headers;if(typeof d.headers=="object"){let E=d.headers;for(let q in E)E.hasOwnProperty(q)&&p.append(q,E[q])}let b={method:"GET",headers:p,mode:"cors",cache:"default",referrerPolicy:"no-referrer-when-downgrade"};if(typeof this._config.headers=="object")for(let E in this._config.headers)p.append(E,this._config.headers[E]);l.cors===!1&&(b.mode="same-origin"),l.withCredentials&&(b.credentials="include"),l.referrerPolicy&&(b.referrerPolicy=l.referrerPolicy),this._status=g.kConnecting,self.fetch(d.url,b).then(E=>{if(this._requestAbort){this._requestAbort=!1,this._status=g.kIdle;return}if(E.ok&&E.status>=200&&E.status<=299){if(E.url!==d.url&&this._onURLRedirect){let K=this._seekHandler.removeURLParameters(E.url);this._onURLRedirect(K)}let q=E.headers.get("Content-Length");return q!=null&&(this._contentLength=parseInt(q),this._contentLength!==0&&this._onContentLengthKnown&&this._onContentLengthKnown(this._contentLength)),this._pump.call(this,E.body.getReader())}else if(this._status=g.kError,this._onError)this._onError(X.HTTP_STATUS_CODE_INVALID,{code:E.status,msg:E.statusText});else throw new fe("FetchStreamLoader: Http code invalid, "+E.status+" "+E.statusText)}).catch(E=>{if(this._status=g.kError,this._onError)this._onError(X.EXCEPTION,{code:-1,msg:E.message});else throw E})}abort(){this._requestAbort=!0}_pump(l){return l.read().then(h=>{if(h.done)if(this._contentLength!==null&&this._receivedLength{if(h.code===11&&Re.msedge)return;this._status=g.kError;let f=0,d=null;if((h.code===19||h.message==="network error")&&(this._contentLength===null||this._contentLength!==null&&this._receivedLength299))if(this._status=g.kError,this._onError)this._onError(X.HTTP_STATUS_CODE_INVALID,{code:h.status,msg:h.statusText});else throw new fe("MozChunkedLoader: Http code invalid, "+h.status+" "+h.statusText);else this._status=g.kBuffering}}_onProgress(l){if(this._status===g.kError)return;this._contentLength===null&&l.total!==null&&l.total!==0&&(this._contentLength=l.total,this._onContentLengthKnown&&this._onContentLengthKnown(this._contentLength));let h=l.target.response,f=this._range.from+this._receivedLength;this._receivedLength+=h.byteLength,this._onDataArrival&&this._onDataArrival(h,f,this._receivedLength)}_onLoadEnd(l){if(this._requestAbort===!0){this._requestAbort=!1;return}else if(this._status===g.kError)return;this._status=g.kComplete,this._onComplete&&this._onComplete(this._range.from,this._range.from+this._receivedLength-1)}_onXhrError(l){this._status=g.kError;let h=0,f=null;if(this._contentLength&&l.loaded=200&&h.status<=299){if(this._status=LoaderStatus.kBuffering,h.responseURL!=null){let d=this._seekHandler.removeURLParameters(h.responseURL);h.responseURL!==this._currentRequestURL&&d!==this._currentRedirectedURL&&(this._currentRedirectedURL=d,this._onURLRedirect&&this._onURLRedirect(d))}let f=h.getResponseHeader("Content-Length");if(f!=null&&this._contentLength==null){let d=parseInt(f);d>0&&(this._contentLength=d,this._onContentLengthKnown&&this._onContentLengthKnown(this._contentLength))}}else if(this._status=LoaderStatus.kError,this._onError)this._onError(LoaderErrors.HTTP_STATUS_CODE_INVALID,{code:h.status,msg:h.statusText});else throw new RuntimeException("MSStreamLoader: Http code invalid, "+h.status+" "+h.statusText);else if(h.readyState===3&&h.status>=200&&h.status<=299){this._status=LoaderStatus.kBuffering;let f=h.response;this._reader.readAsArrayBuffer(f)}}_xhrOnError(l){this._status=LoaderStatus.kError;let h=LoaderErrors.EXCEPTION,f={code:-1,msg:l.constructor.name+" "+l.type};if(this._onError)this._onError(h,f);else throw new RuntimeException(f.msg)}_msrOnProgress(l){let f=l.target.result;if(f==null){this._doReconnectIfNeeded();return}let d=f.slice(this._lastTimeBufferSize);this._lastTimeBufferSize=f.byteLength;let p=this._totalRange.from+this._receivedLength;this._receivedLength+=d.byteLength,this._onDataArrival&&this._onDataArrival(d,p,this._receivedLength),f.byteLength>=this._bufferLimit&&(Log.v(this.TAG,`MSStream buffer exceeded max size near ${p+d.byteLength}, reconnecting...`),this._doReconnectIfNeeded())}_doReconnectIfNeeded(){if(this._contentLength==null||this._receivedLength=this._contentLength&&(f=this._range.from+this._contentLength-1),this._currentRequestRange={from:h,to:f},this._internalOpen(this._dataSource,this._currentRequestRange)}_internalOpen(l,h){this._lastTimeLoaded=0;let f=l.url;this._config.reuseRedirectedURL&&(this._currentRedirectedURL!=null?f=this._currentRedirectedURL:l.redirectedURL!=null&&(f=l.redirectedURL));let d=this._seekHandler.getConfig(f,h);this._currentRequestURL=d.url;let p=this._xhr=new XMLHttpRequest;if(p.open("GET",d.url,!0),p.responseType="arraybuffer",p.onreadystatechange=this._onReadyStateChange.bind(this),p.onprogress=this._onProgress.bind(this),p.onload=this._onLoad.bind(this),p.onerror=this._onXhrError.bind(this),l.withCredentials&&(p.withCredentials=!0),typeof d.headers=="object"){let b=d.headers;for(let E in b)b.hasOwnProperty(E)&&p.setRequestHeader(E,b[E])}if(typeof this._config.headers=="object"){let b=this._config.headers;for(let E in b)b.hasOwnProperty(E)&&p.setRequestHeader(E,b[E])}p.send()}abort(){this._requestAbort=!0,this._internalAbort(),this._status=g.kComplete}_internalAbort(){this._xhr&&(this._xhr.onreadystatechange=null,this._xhr.onprogress=null,this._xhr.onload=null,this._xhr.onerror=null,this._xhr.abort(),this._xhr=null)}_onReadyStateChange(l){let h=l.target;if(h.readyState===2){if(h.responseURL!=null){let f=this._seekHandler.removeURLParameters(h.responseURL);h.responseURL!==this._currentRequestURL&&f!==this._currentRedirectedURL&&(this._currentRedirectedURL=f,this._onURLRedirect&&this._onURLRedirect(f))}if(h.status>=200&&h.status<=299){if(this._waitForTotalLength)return;this._status=g.kBuffering}else if(this._status=g.kError,this._onError)this._onError(X.HTTP_STATUS_CODE_INVALID,{code:h.status,msg:h.statusText});else throw new fe("RangeLoader: Http code invalid, "+h.status+" "+h.statusText)}}_onProgress(l){if(this._status===g.kError)return;if(this._contentLength===null){let f=!1;if(this._waitForTotalLength){this._waitForTotalLength=!1,this._totalLengthReceived=!0,f=!0;let d=l.total;this._internalAbort(),d!=null&d!==0&&(this._totalLength=d)}if(this._range.to===-1?this._contentLength=this._totalLength-this._range.from:this._contentLength=this._range.to-this._range.from+1,f){this._openSubRange();return}this._onContentLengthKnown&&this._onContentLengthKnown(this._contentLength)}let h=l.loaded-this._lastTimeLoaded;this._lastTimeLoaded=l.loaded,this._speedSampler.addBytes(h)}_normalizeSpeed(l){let h=this._chunkSizeKBList,f=h.length-1,d=0,p=0,b=f;if(l=h[d]&&l=3&&(h=this._speedSampler.currentKBps)),h!==0){let b=this._normalizeSpeed(h);this._currentSpeedNormalized!==b&&(this._currentSpeedNormalized=b,this._currentChunkSizeKB=b)}let f=l.target.response,d=this._range.from+this._receivedLength;this._receivedLength+=f.byteLength;let p=!1;this._contentLength!=null&&this._receivedLength0&&this._receivedLength{this._dispatchArrayBuffer(h.result)},h.readAsArrayBuffer(l.data)}else{this._status=g.kError;let h={code:-1,msg:"Unsupported WebSocket message type: "+l.data.constructor.name};if(this._onError)this._onError(X.EXCEPTION,h);else throw new fe(h.msg)}}_dispatchArrayBuffer(l){let h=l,f=this._receivedLength;this._receivedLength+=h.byteLength,this._onDataArrival&&this._onDataArrival(h,f,this._receivedLength)}_onWebSocketError(l){this._status=g.kError;let h={code:l.code,msg:l.message};if(this._onError)this._onError(X.EXCEPTION,h);else throw new fe(h.msg)}}var ze=Te;class Me{constructor(l){this._zeroStart=l||!1}getConfig(l,h){let f={};if(h.from!==0||h.to!==-1){let d;h.to!==-1?d=`bytes=${h.from.toString()}-${h.to.toString()}`:d=`bytes=${h.from.toString()}-`,f.Range=d}else this._zeroStart&&(f.Range="bytes=0-");return{url:l,headers:f}}removeURLParameters(l){return l}}var he=Me;class _{constructor(l,h){this._startName=l,this._endName=h}getConfig(l,h){let f=l;if(h.from!==0||h.to!==-1){let d=!0;f.indexOf("?")===-1&&(f+="?",d=!1),d&&(f+="&"),f+=`${this._startName}=${h.from.toString()}`,h.to!==-1&&(f+=`&${this._endName}=${h.to.toString()}`)}return{url:f,headers:{}}}removeURLParameters(l){let h=l.split("?")[0],f,d=l.indexOf("?");d!==-1&&(f=l.substring(d+1));let p="";if(f!=null&&f.length>0){let b=f.split("&");for(let E=0;E0;q[0]!==this._startName&&q[0]!==this._endName&&(K&&(p+="&"),p+=b[E])}}return p.length===0?h:h+"?"+p}}var me=_;class T{constructor(l,h,f){this.TAG="IOController",this._config=h,this._extraData=f,this._stashInitialSize=1024*384,h.stashInitialSize!=null&&h.stashInitialSize>0&&(this._stashInitialSize=h.stashInitialSize),this._stashUsed=0,this._stashSize=this._stashInitialSize,this._bufferSize=1024*1024*3,this._stashBuffer=new ArrayBuffer(this._bufferSize),this._stashByteStart=0,this._enableStash=!0,h.enableStashBuffer===!1&&(this._enableStash=!1),this._loader=null,this._loaderClass=null,this._seekHandler=null,this._dataSource=l,this._isWebSocketURL=/wss?:\/\/(.+?)/.test(l.url),this._refTotalLength=l.filesize?l.filesize:null,this._totalLength=this._refTotalLength,this._fullRequestFlag=!1,this._currentRange=null,this._redirectedURL=null,this._speedNormalized=0,this._speedSampler=new ce,this._speedNormalizeList=[64,128,256,384,512,768,1024,1536,2048,3072,4096],this._isEarlyEofReconnecting=!1,this._paused=!1,this._resumeFrom=0,this._onDataArrival=null,this._onSeeked=null,this._onError=null,this._onComplete=null,this._onRedirect=null,this._onRecoveredEarlyEof=null,this._selectSeekHandler(),this._selectLoader(),this._createLoader()}destroy(){this._loader.isWorking()&&this._loader.abort(),this._loader.destroy(),this._loader=null,this._loaderClass=null,this._dataSource=null,this._stashBuffer=null,this._stashUsed=this._stashSize=this._bufferSize=this._stashByteStart=0,this._currentRange=null,this._speedSampler=null,this._isEarlyEofReconnecting=!1,this._onDataArrival=null,this._onSeeked=null,this._onError=null,this._onComplete=null,this._onRedirect=null,this._onRecoveredEarlyEof=null,this._extraData=null}isWorking(){return this._loader&&this._loader.isWorking()&&!this._paused}isPaused(){return this._paused}get status(){return this._loader.status}get extraData(){return this._extraData}set extraData(l){this._extraData=l}get onDataArrival(){return this._onDataArrival}set onDataArrival(l){this._onDataArrival=l}get onSeeked(){return this._onSeeked}set onSeeked(l){this._onSeeked=l}get onError(){return this._onError}set onError(l){this._onError=l}get onComplete(){return this._onComplete}set onComplete(l){this._onComplete=l}get onRedirect(){return this._onRedirect}set onRedirect(l){this._onRedirect=l}get onRecoveredEarlyEof(){return this._onRecoveredEarlyEof}set onRecoveredEarlyEof(l){this._onRecoveredEarlyEof=l}get currentURL(){return this._dataSource.url}get hasRedirect(){return this._redirectedURL!=null||this._dataSource.redirectedURL!=null}get currentRedirectedURL(){return this._redirectedURL||this._dataSource.redirectedURL}get currentSpeed(){return this._loaderClass===De?this._loader.currentSpeed:this._speedSampler.lastSecondKBps}get loaderType(){return this._loader.type}_selectSeekHandler(){let l=this._config;if(l.seekType==="range")this._seekHandler=new he(this._config.rangeLoadZeroStart);else if(l.seekType==="param"){let h=l.seekParamStart||"bstart",f=l.seekParamEnd||"bend";this._seekHandler=new me(h,f)}else if(l.seekType==="custom"){if(typeof l.customSeekHandler!="function")throw new Ze("Custom seekType specified in config but invalid customSeekHandler!");this._seekHandler=new l.customSeekHandler}else throw new Ze(`Invalid seekType in config: ${l.seekType}`)}_selectLoader(){if(this._config.customLoader!=null)this._loaderClass=this._config.customLoader;else if(this._isWebSocketURL)this._loaderClass=ze;else if(ae.isSupported())this._loaderClass=ae;else if(A.isSupported())this._loaderClass=A;else if(De.isSupported())this._loaderClass=De;else throw new fe("Your browser doesn't support xhr with arraybuffer responseType!")}_createLoader(){this._loader=new this._loaderClass(this._seekHandler,this._config),this._loader.needStashBuffer===!1&&(this._enableStash=!1),this._loader.onContentLengthKnown=this._onContentLengthKnown.bind(this),this._loader.onURLRedirect=this._onURLRedirect.bind(this),this._loader.onDataArrival=this._onLoaderChunkArrival.bind(this),this._loader.onComplete=this._onLoaderComplete.bind(this),this._loader.onError=this._onLoaderError.bind(this)}open(l){this._currentRange={from:0,to:-1},l&&(this._currentRange.from=l),this._speedSampler.reset(),l||(this._fullRequestFlag=!0),this._loader.open(this._dataSource,Object.assign({},this._currentRange))}abort(){this._loader.abort(),this._paused&&(this._paused=!1,this._resumeFrom=0)}pause(){this.isWorking()&&(this._loader.abort(),this._stashUsed!==0?(this._resumeFrom=this._stashByteStart,this._currentRange.to=this._stashByteStart-1):this._resumeFrom=this._currentRange.to+1,this._stashUsed=0,this._stashByteStart=0,this._paused=!0)}resume(){if(this._paused){this._paused=!1;let l=this._resumeFrom;this._resumeFrom=0,this._internalSeek(l,!0)}}seek(l){this._paused=!1,this._stashUsed=0,this._stashByteStart=0,this._internalSeek(l,!0)}_internalSeek(l,h){this._loader.isWorking()&&this._loader.abort(),this._flushStashBuffer(h),this._loader.destroy(),this._loader=null;let f={from:l,to:-1};this._currentRange={from:f.from,to:-1},this._speedSampler.reset(),this._stashSize=this._stashInitialSize,this._createLoader(),this._loader.open(this._dataSource,f),this._onSeeked&&this._onSeeked()}updateUrl(l){if(!l||typeof l!="string"||l.length===0)throw new Ze("Url must be a non-empty string!");this._dataSource.url=l}_expandBuffer(l){let h=this._stashSize;for(;h+1024*1024*10){let d=new Uint8Array(this._stashBuffer,0,this._stashUsed);new Uint8Array(f,0,h).set(d,0)}this._stashBuffer=f,this._bufferSize=h}_normalizeSpeed(l){let h=this._speedNormalizeList,f=h.length-1,d=0,p=0,b=f;if(l=h[d]&&l=512&&l<=1024?h=Math.floor(l*1.5):h=l*2,h>8192&&(h=8192);let f=h*1024+1024*1024*1;this._bufferSize0){let b=this._stashBuffer.slice(0,this._stashUsed),E=this._dispatchChunks(b,this._stashByteStart);if(E0){let q=new Uint8Array(b,E);p.set(q,0),this._stashUsed=q.byteLength,this._stashByteStart+=E}}else this._stashUsed=0,this._stashByteStart+=E;this._stashUsed+l.byteLength>this._bufferSize&&(this._expandBuffer(this._stashUsed+l.byteLength),p=new Uint8Array(this._stashBuffer,0,this._bufferSize)),p.set(new Uint8Array(l),this._stashUsed),this._stashUsed+=l.byteLength}else{let b=this._dispatchChunks(l,h);if(bthis._bufferSize&&(this._expandBuffer(E),p=new Uint8Array(this._stashBuffer,0,this._bufferSize)),p.set(new Uint8Array(l,b),0),this._stashUsed+=E,this._stashByteStart=h+b}}}else if(this._stashUsed===0){let p=this._dispatchChunks(l,h);if(pthis._bufferSize&&this._expandBuffer(b),new Uint8Array(this._stashBuffer,0,this._bufferSize).set(new Uint8Array(l,p),0),this._stashUsed+=b,this._stashByteStart=h+p}}else{this._stashUsed+l.byteLength>this._bufferSize&&this._expandBuffer(this._stashUsed+l.byteLength);let p=new Uint8Array(this._stashBuffer,0,this._bufferSize);p.set(new Uint8Array(l),this._stashUsed),this._stashUsed+=l.byteLength;let b=this._dispatchChunks(this._stashBuffer.slice(0,this._stashUsed),this._stashByteStart);if(b0){let E=new Uint8Array(this._stashBuffer,b);p.set(E,0)}this._stashUsed-=b,this._stashByteStart+=b}}_flushStashBuffer(l){if(this._stashUsed>0){let h=this._stashBuffer.slice(0,this._stashUsed),f=this._dispatchChunks(h,this._stashByteStart),d=h.byteLength-f;if(f0){let p=new Uint8Array(this._stashBuffer,0,this._bufferSize),b=new Uint8Array(h,f);p.set(b,0),this._stashUsed=b.byteLength,this._stashByteStart+=f}return 0}return this._stashUsed=0,this._stashByteStart=0,d}return 0}_onLoaderComplete(l,h){this._flushStashBuffer(!0),this._onComplete&&this._onComplete(this._extraData)}_onLoaderError(l,h){switch(B.e(this.TAG,`Loader error, code = ${h.code}, msg = ${h.msg}`),this._flushStashBuffer(!1),this._isEarlyEofReconnecting&&(this._isEarlyEofReconnecting=!1,l=X.UNRECOVERABLE_EARLY_EOF),l){case X.EARLY_EOF:{if(!this._config.isLive&&this._totalLength){let f=this._currentRange.to+1;f0){let h=Ae.getConfig();l.emit("change",h)}}static registerListener(l){Ae.emitter.addListener("change",l)}static removeListener(l){Ae.emitter.removeListener("change",l)}static addLogListener(l){B.emitter.addListener("log",l),B.emitter.listenerCount("log")>0&&(B.ENABLE_CALLBACK=!0,Ae._notifyChange())}static removeLogListener(l){B.emitter.removeListener("log",l),B.emitter.listenerCount("log")===0&&(B.ENABLE_CALLBACK=!1,Ae._notifyChange())}}Ae.emitter=new(se());var le=Ae;class $e{constructor(){this.mimeType=null,this.duration=null,this.hasAudio=null,this.hasVideo=null,this.audioCodec=null,this.videoCodec=null,this.audioDataRate=null,this.videoDataRate=null,this.audioSampleRate=null,this.audioChannelCount=null,this.width=null,this.height=null,this.fps=null,this.profile=null,this.level=null,this.refFrames=null,this.chromaFormat=null,this.sarNum=null,this.sarDen=null,this.metadata=null,this.segments=null,this.segmentCount=null,this.hasKeyframesIndex=null,this.keyframesIndex=null}isComplete(){let l=this.hasAudio===!1||this.hasAudio===!0&&this.audioCodec!=null&&this.audioSampleRate!=null&&this.audioChannelCount!=null,h=this.hasVideo===!1||this.hasVideo===!0&&this.videoCodec!=null&&this.width!=null&&this.height!=null&&this.fps!=null&&this.profile!=null&&this.level!=null&&this.refFrames!=null&&this.chromaFormat!=null&&this.sarNum!=null&&this.sarDen!=null;return this.mimeType!=null&&this.duration!=null&&this.metadata!=null&&this.hasKeyframesIndex!=null&&l&&h}isSeekable(){return this.hasKeyframesIndex===!0}getNearestKeyframe(l){if(this.keyframesIndex==null)return null;let h=this.keyframesIndex,f=this._search(h.times,l);return{index:f,milliseconds:h.times[f],fileposition:h.filepositions[f]}}_search(l,h){let f=0,d=l.length-1,p=0,b=0,E=d;for(h=l[p]&&h=128){l.push(String.fromCharCode(p&65535)),f+=2;continue}}}else if(h[f]<240){if(St(h,f,2)){let p=(h[f]&15)<<12|(h[f+1]&63)<<6|h[f+2]&63;if(p>=2048&&(p&63488)!==55296){l.push(String.fromCharCode(p&65535)),f+=3;continue}}}else if(h[f]<248&&St(h,f,3)){let p=(h[f]&7)<<18|(h[f+1]&63)<<12|(h[f+2]&63)<<6|h[f+3]&63;if(p>65536&&p<1114112){p-=65536,l.push(String.fromCharCode(p>>>10|55296)),l.push(String.fromCharCode(p&1023|56320)),f+=4;continue}}}l.push("\uFFFD"),++f}return l.join("")}var Et=Rt;let vt=function(){let Xe=new ArrayBuffer(2);return new DataView(Xe).setInt16(0,256,!0),new Int16Array(Xe)[0]===256}();class It{static parseScriptData(l,h,f){let d={};try{let p=It.parseValue(l,h,f),b=It.parseValue(l,h+p.size,f-p.size);d[p.data]=b.data}catch(p){B.e("AMF",p.toString())}return d}static parseObject(l,h,f){if(f<3)throw new M("Data not enough when parse ScriptDataObject");let d=It.parseString(l,h,f),p=It.parseValue(l,h+d.size,f-d.size),b=p.objectEnd;return{data:{name:d.data,value:p.data},size:d.size+p.size,objectEnd:b}}static parseVariable(l,h,f){return It.parseObject(l,h,f)}static parseString(l,h,f){if(f<2)throw new M("Data not enough when parse String");let p=new DataView(l,h,f).getUint16(0,!vt),b;return p>0?b=Et(new Uint8Array(l,h+2,p)):b="",{data:b,size:2+p}}static parseLongString(l,h,f){if(f<4)throw new M("Data not enough when parse LongString");let p=new DataView(l,h,f).getUint32(0,!vt),b;return p>0?b=Et(new Uint8Array(l,h+4,p)):b="",{data:b,size:4+p}}static parseDate(l,h,f){if(f<10)throw new M("Data size invalid when parse Date");let d=new DataView(l,h,f),p=d.getFloat64(0,!vt),b=d.getInt16(8,!vt);return p+=b*60*1e3,{data:new Date(p),size:10}}static parseValue(l,h,f){if(f<1)throw new M("Data not enough when parse Value");let d=new DataView(l,h,f),p=1,b=d.getUint8(0),E,q=!1;try{switch(b){case 0:E=d.getFloat64(1,!vt),p+=8;break;case 1:{E=!!d.getUint8(1),p+=1;break}case 2:{let K=It.parseString(l,h+1,f-1);E=K.data,p+=K.size;break}case 3:{E={};let K=0;for((d.getUint32(f-4,!vt)&16777215)===9&&(K=3);p32)throw new Ze("ExpGolomb: readBits() bits exceeded max 32bits!");if(l<=this._current_word_bits_left){let b=this._current_word>>>32-l;return this._current_word<<=l,this._current_word_bits_left-=l,b}let h=this._current_word_bits_left?this._current_word:0;h=h>>>32-this._current_word_bits_left;let f=l-this._current_word_bits_left;this._fillCurrentWord();let d=Math.min(f,this._current_word_bits_left),p=this._current_word>>>32-d;return this._current_word<<=d,this._current_word_bits_left-=d,h=h<>>l)return this._current_word<<=l,this._current_word_bits_left-=l,l;return this._fillCurrentWord(),l+this._skipLeadingZero()}readUEG(){let l=this._skipLeadingZero();return this.readBits(l+1)-1}readSEG(){let l=this.readUEG();return l&1?l+1>>>1:-1*(l>>>1)}}var yt=qe;class V{static _ebsp2rbsp(l){let h=l,f=h.byteLength,d=new Uint8Array(f),p=0;for(let b=0;b=2&&h[b]===3&&h[b-1]===0&&h[b-2]===0||(d[p]=h[b],p++);return new Uint8Array(d.buffer,0,p)}static parseSPS(l){let h=V._ebsp2rbsp(l),f=new yt(h);f.readByte();let d=f.readByte();f.readByte();let p=f.readByte();f.readUEG();let b=V.getProfileString(d),E=V.getLevelString(p),q=1,K=420,ye=[0,420,422,444],Ue=8;if((d===100||d===110||d===122||d===244||d===44||d===83||d===86||d===118||d===128||d===138||d===144)&&(q=f.readUEG(),q===3&&f.readBits(1),q<=3&&(K=ye[q]),Ue=f.readUEG()+8,f.readUEG(),f.readBits(1),f.readBool())){let Nt=q!==3?8:12;for(let Vt=0;Vt0&&Nt<16?(at=Vt[Nt-1],Ne=tn[Nt-1]):Nt===255&&(at=f.readByte()<<8|f.readByte(),Ne=f.readByte()<<8|f.readByte())}if(f.readBool()&&f.readBool(),f.readBool()&&(f.readBits(4),f.readBool()&&f.readBits(24)),f.readBool()&&(f.readUEG(),f.readUEG()),f.readBool()){let Nt=f.readBits(32),Vt=f.readBits(32);Y=f.readBool(),be=Vt,Ie=Nt*2,ke=be/Ie}}let Ve=1;(at!==1||Ne!==1)&&(Ve=at/Ne);let ct=0,ut=0;if(q===0)ct=1,ut=2-tt;else{let Nt=q===3?1:2,Vt=q===1?2:1;ct=Nt,ut=Vt*(2-tt)}let Ct=(rt+1)*16,Lt=(2-tt)*((Qe+1)*16);Ct-=(Je+$)*ct,Lt-=(ge+we)*ut;let Dt=Math.ceil(Ct*Ve);return f.destroy(),f=null,{profile_string:b,level_string:E,bit_depth:Ue,ref_frames:Le,chroma_format:K,chroma_format_string:V.getChromaFormatString(K),frame_rate:{fixed:Y,fps:ke,fps_den:Ie,fps_num:be},sar_ratio:{width:at,height:Ne},codec_size:{width:Ct,height:Lt},present_size:{width:Dt,height:Lt}}}static _skipScalingList(l,h){let f=8,d=8,p=0;for(let b=0;b>>8&255|(Xe&255)<<8}function Se(Xe){return(Xe&4278190080)>>>24|(Xe&16711680)>>>8|(Xe&65280)<<8|(Xe&255)<<24}function x(Xe,l){return Xe[l]<<24|Xe[l+1]<<16|Xe[l+2]<<8|Xe[l+3]}class C{constructor(l,h){this.TAG="FLVDemuxer",this._config=h,this._onError=null,this._onMediaInfo=null,this._onMetaDataArrived=null,this._onScriptDataArrived=null,this._onTrackMetadata=null,this._onDataAvailable=null,this._dataOffset=l.dataOffset,this._firstParse=!0,this._dispatch=!1,this._hasAudio=l.hasAudioTrack,this._hasVideo=l.hasVideoTrack,this._hasAudioFlagOverrided=!1,this._hasVideoFlagOverrided=!1,this._audioInitialMetadataDispatched=!1,this._videoInitialMetadataDispatched=!1,this._mediaInfo=new nt,this._mediaInfo.hasAudio=this._hasAudio,this._mediaInfo.hasVideo=this._hasVideo,this._metadata=null,this._audioMetadata=null,this._videoMetadata=null,this._naluLengthSize=4,this._timestampBase=0,this._timescale=1e3,this._duration=0,this._durationOverrided=!1,this._referenceFrameRate={fixed:!0,fps:23.976,fps_num:23976,fps_den:1e3},this._flvSoundRateTable=[5500,11025,22050,44100,48e3],this._mpegSamplingRates=[96e3,88200,64e3,48e3,44100,32e3,24e3,22050,16e3,12e3,11025,8e3,7350],this._mpegAudioV10SampleRateTable=[44100,48e3,32e3,0],this._mpegAudioV20SampleRateTable=[22050,24e3,16e3,0],this._mpegAudioV25SampleRateTable=[11025,12e3,8e3,0],this._mpegAudioL1BitRateTable=[0,32,64,96,128,160,192,224,256,288,320,352,384,416,448,-1],this._mpegAudioL2BitRateTable=[0,32,48,56,64,80,96,112,128,160,192,224,256,320,384,-1],this._mpegAudioL3BitRateTable=[0,32,40,48,56,64,80,96,112,128,160,192,224,256,320,-1],this._videoTrack={type:"video",id:1,sequenceNumber:0,samples:[],length:0},this._audioTrack={type:"audio",id:2,sequenceNumber:0,samples:[],length:0},this._littleEndian=function(){let f=new ArrayBuffer(2);return new DataView(f).setInt16(0,256,!0),new Int16Array(f)[0]===256}()}destroy(){this._mediaInfo=null,this._metadata=null,this._audioMetadata=null,this._videoMetadata=null,this._videoTrack=null,this._audioTrack=null,this._onError=null,this._onMediaInfo=null,this._onMetaDataArrived=null,this._onScriptDataArrived=null,this._onTrackMetadata=null,this._onDataAvailable=null}static probe(l){let h=new Uint8Array(l),f={match:!1};if(h[0]!==70||h[1]!==76||h[2]!==86||h[3]!==1)return f;let d=(h[4]&4)>>>2!==0,p=(h[4]&1)!==0,b=x(h,5);return b<9?f:{match:!0,consumed:b,dataOffset:b,hasAudioTrack:d,hasVideoTrack:p}}bindDataSource(l){return l.onDataArrival=this.parseChunks.bind(this),this}get onTrackMetadata(){return this._onTrackMetadata}set onTrackMetadata(l){this._onTrackMetadata=l}get onMediaInfo(){return this._onMediaInfo}set onMediaInfo(l){this._onMediaInfo=l}get onMetaDataArrived(){return this._onMetaDataArrived}set onMetaDataArrived(l){this._onMetaDataArrived=l}get onScriptDataArrived(){return this._onScriptDataArrived}set onScriptDataArrived(l){this._onScriptDataArrived=l}get onError(){return this._onError}set onError(l){this._onError=l}get onDataAvailable(){return this._onDataAvailable}set onDataAvailable(l){this._onDataAvailable=l}get timestampBase(){return this._timestampBase}set timestampBase(l){this._timestampBase=l}get overridedDuration(){return this._duration}set overridedDuration(l){this._durationOverrided=!0,this._duration=l,this._mediaInfo.duration=l}set overridedHasAudio(l){this._hasAudioFlagOverrided=!0,this._hasAudio=l,this._mediaInfo.hasAudio=l}set overridedHasVideo(l){this._hasVideoFlagOverrided=!0,this._hasVideo=l,this._mediaInfo.hasVideo=l}resetMediaInfo(){this._mediaInfo=new nt}_isInitialMetadataDispatched(){return this._hasAudio&&this._hasVideo?this._audioInitialMetadataDispatched&&this._videoInitialMetadataDispatched:this._hasAudio&&!this._hasVideo?this._audioInitialMetadataDispatched:!this._hasAudio&&this._hasVideo?this._videoInitialMetadataDispatched:!1}parseChunks(l,h){if(!this._onError||!this._onMediaInfo||!this._onTrackMetadata||!this._onDataAvailable)throw new M("Flv: onError & onMediaInfo & onTrackMetadata & onDataAvailable callback must be specified");let f=0,d=this._littleEndian;if(h===0)if(l.byteLength>13)f=C.probe(l).dataOffset;else return 0;for(this._firstParse&&(this._firstParse=!1,h+f!==this._dataOffset&&B.w(this.TAG,"First time parsing but chunk byteStart invalid!"),new DataView(l,f).getUint32(0,!d)!==0&&B.w(this.TAG,"PrevTagSize0 !== 0 !!!"),f+=4);fl.byteLength)break;let b=p.getUint8(0),E=p.getUint32(0,!d)&16777215;if(f+11+E+4>l.byteLength)break;if(b!==8&&b!==9&&b!==18){B.w(this.TAG,`Unsupported tag type ${b}, skipped`),f+=11+E+4;continue}let q=p.getUint8(4),K=p.getUint8(5),ye=p.getUint8(6),Ue=p.getUint8(7),Ge=ye|K<<8|q<<16|Ue<<24;(p.getUint32(7,!d)&16777215)!==0&&B.w(this.TAG,"Meet tag which has StreamID != 0!");let rt=f+11;switch(b){case 8:this._parseAudioData(l,rt,E,Ge);break;case 9:this._parseVideoData(l,rt,E,Ge,h+f);break;case 18:this._parseScriptData(l,rt,E);break}let Qe=p.getUint32(11+E,!d);Qe!==11+E&&B.w(this.TAG,`Invalid PrevTagSize ${Qe}`),f+=11+E+4}return this._isInitialMetadataDispatched()&&this._dispatch&&(this._audioTrack.length||this._videoTrack.length)&&this._onDataAvailable(this._audioTrack,this._videoTrack),f}_parseScriptData(l,h,f){let d=gt.parseScriptData(l,h,f);if(d.hasOwnProperty("onMetaData")){if(d.onMetaData==null||typeof d.onMetaData!="object"){B.w(this.TAG,"Invalid onMetaData structure!");return}this._metadata&&B.w(this.TAG,"Found another onMetaData tag!"),this._metadata=d;let p=this._metadata.onMetaData;if(this._onMetaDataArrived&&this._onMetaDataArrived(Object.assign({},p)),typeof p.hasAudio=="boolean"&&this._hasAudioFlagOverrided===!1&&(this._hasAudio=p.hasAudio,this._mediaInfo.hasAudio=this._hasAudio),typeof p.hasVideo=="boolean"&&this._hasVideoFlagOverrided===!1&&(this._hasVideo=p.hasVideo,this._mediaInfo.hasVideo=this._hasVideo),typeof p.audiodatarate=="number"&&(this._mediaInfo.audioDataRate=p.audiodatarate),typeof p.videodatarate=="number"&&(this._mediaInfo.videoDataRate=p.videodatarate),typeof p.width=="number"&&(this._mediaInfo.width=p.width),typeof p.height=="number"&&(this._mediaInfo.height=p.height),typeof p.duration=="number"){if(!this._durationOverrided){let b=Math.floor(p.duration*this._timescale);this._duration=b,this._mediaInfo.duration=b}}else this._mediaInfo.duration=0;if(typeof p.framerate=="number"){let b=Math.floor(p.framerate*1e3);if(b>0){let E=b/1e3;this._referenceFrameRate.fixed=!0,this._referenceFrameRate.fps=E,this._referenceFrameRate.fps_num=b,this._referenceFrameRate.fps_den=1e3,this._mediaInfo.fps=E}}if(typeof p.keyframes=="object"){this._mediaInfo.hasKeyframesIndex=!0;let b=p.keyframes;this._mediaInfo.keyframesIndex=this._parseKeyframesIndex(b),p.keyframes=null}else this._mediaInfo.hasKeyframesIndex=!1;this._dispatch=!1,this._mediaInfo.metadata=p,B.v(this.TAG,"Parsed onMetaData"),this._mediaInfo.isComplete()&&this._onMediaInfo(this._mediaInfo)}Object.keys(d).length>0&&this._onScriptDataArrived&&this._onScriptDataArrived(Object.assign({},d))}_parseKeyframesIndex(l){let h=[],f=[];for(let d=1;d>>4;if(q!==2&&q!==10){this._onError(U.CODEC_UNSUPPORTED,"Flv: Unsupported audio codec idx: "+q);return}let K=0,ye=(E&12)>>>2;if(ye>=0&&ye<=4)K=this._flvSoundRateTable[ye];else{this._onError(U.FORMAT_ERROR,"Flv: Invalid audio sample rate idx: "+ye);return}let Ue=(E&2)>>>1,Ge=E&1,Le=this._audioMetadata,rt=this._audioTrack;if(Le||(this._hasAudio===!1&&this._hasAudioFlagOverrided===!1&&(this._hasAudio=!0,this._mediaInfo.hasAudio=!0),Le=this._audioMetadata={},Le.type="audio",Le.id=rt.id,Le.timescale=this._timescale,Le.duration=this._duration,Le.audioSampleRate=K,Le.channelCount=Ge===0?1:2),q===10){let Qe=this._parseAACAudioData(l,h+1,f-1);if(Qe==null)return;if(Qe.packetType===0){Le.config&&B.w(this.TAG,"Found another AudioSpecificConfig!");let tt=Qe.data;Le.audioSampleRate=tt.samplingRate,Le.channelCount=tt.channelCount,Le.codec=tt.codec,Le.originalCodec=tt.originalCodec,Le.config=tt.config,Le.refSampleDuration=1024/Le.audioSampleRate*Le.timescale,B.v(this.TAG,"Parsed AudioSpecificConfig"),this._isInitialMetadataDispatched()?this._dispatch&&(this._audioTrack.length||this._videoTrack.length)&&this._onDataAvailable(this._audioTrack,this._videoTrack):this._audioInitialMetadataDispatched=!0,this._dispatch=!1,this._onTrackMetadata("audio",Le);let Je=this._mediaInfo;Je.audioCodec=Le.originalCodec,Je.audioSampleRate=Le.audioSampleRate,Je.audioChannelCount=Le.channelCount,Je.hasVideo?Je.videoCodec!=null&&(Je.mimeType='video/x-flv; codecs="'+Je.videoCodec+","+Je.audioCodec+'"'):Je.mimeType='video/x-flv; codecs="'+Je.audioCodec+'"',Je.isComplete()&&this._onMediaInfo(Je)}else if(Qe.packetType===1){let tt=this._timestampBase+d,Je={unit:Qe.data,length:Qe.data.byteLength,dts:tt,pts:tt};rt.samples.push(Je),rt.length+=Qe.data.length}else B.e(this.TAG,`Flv: Unsupported AAC data type ${Qe.packetType}`)}else if(q===2){if(!Le.codec){let $=this._parseMP3AudioData(l,h+1,f-1,!0);if($==null)return;Le.audioSampleRate=$.samplingRate,Le.channelCount=$.channelCount,Le.codec=$.codec,Le.originalCodec=$.originalCodec,Le.refSampleDuration=1152/Le.audioSampleRate*Le.timescale,B.v(this.TAG,"Parsed MPEG Audio Frame Header"),this._audioInitialMetadataDispatched=!0,this._onTrackMetadata("audio",Le);let ge=this._mediaInfo;ge.audioCodec=Le.codec,ge.audioSampleRate=Le.audioSampleRate,ge.audioChannelCount=Le.channelCount,ge.audioDataRate=$.bitRate,ge.hasVideo?ge.videoCodec!=null&&(ge.mimeType='video/x-flv; codecs="'+ge.videoCodec+","+ge.audioCodec+'"'):ge.mimeType='video/x-flv; codecs="'+ge.audioCodec+'"',ge.isComplete()&&this._onMediaInfo(ge)}let Qe=this._parseMP3AudioData(l,h+1,f-1,!1);if(Qe==null)return;let tt=this._timestampBase+d,Je={unit:Qe,length:Qe.byteLength,dts:tt,pts:tt};rt.samples.push(Je),rt.length+=Qe.length}}_parseAACAudioData(l,h,f){if(f<=1){B.w(this.TAG,"Flv: Invalid AAC packet, missing AACPacketType or/and Data!");return}let d={},p=new Uint8Array(l,h,f);return d.packetType=p[0],p[0]===0?d.data=this._parseAACAudioSpecificConfig(l,h+1,f-1):d.data=p.subarray(1),d}_parseAACAudioSpecificConfig(l,h,f){let d=new Uint8Array(l,h,f),p=null,b=0,E=0,q=null,K=0,ye=null;if(b=E=d[0]>>>3,K=(d[0]&7)<<1|d[1]>>>7,K<0||K>=this._mpegSamplingRates.length){this._onError(U.FORMAT_ERROR,"Flv: AAC invalid sampling frequency index!");return}let Ue=this._mpegSamplingRates[K],Ge=(d[1]&120)>>>3;if(Ge<0||Ge>=8){this._onError(U.FORMAT_ERROR,"Flv: AAC invalid channel configuration");return}b===5&&(ye=(d[1]&7)<<1|d[2]>>>7,q=(d[2]&124)>>>2);let Le=self.navigator.userAgent.toLowerCase();return Le.indexOf("firefox")!==-1?K>=6?(b=5,p=new Array(4),ye=K-3):(b=2,p=new Array(2),ye=K):Le.indexOf("android")!==-1?(b=2,p=new Array(2),ye=K):(b=5,ye=K,p=new Array(4),K>=6?ye=K-3:Ge===1&&(b=2,p=new Array(2),ye=K)),p[0]=b<<3,p[0]|=(K&15)>>>1,p[1]=(K&15)<<7,p[1]|=(Ge&15)<<3,b===5&&(p[1]|=(ye&15)>>>1,p[2]=(ye&1)<<7,p[2]|=8,p[3]=0),{config:p,samplingRate:Ue,channelCount:Ge,codec:"mp4a.40."+b,originalCodec:"mp4a.40."+E}}_parseMP3AudioData(l,h,f,d){if(f<4){B.w(this.TAG,"Flv: Invalid MP3 packet, header missing!");return}let p=this._littleEndian,b=new Uint8Array(l,h,f),E=null;if(d){if(b[0]!==255)return;let q=b[1]>>>3&3,K=(b[1]&6)>>1,ye=(b[2]&240)>>>4,Ue=(b[2]&12)>>>2,Le=(b[3]>>>6&3)!==3?2:1,rt=0,Qe=0,tt=34,Je="mp3";switch(q){case 0:rt=this._mpegAudioV25SampleRateTable[Ue];break;case 2:rt=this._mpegAudioV20SampleRateTable[Ue];break;case 3:rt=this._mpegAudioV10SampleRateTable[Ue];break}switch(K){case 1:tt=34,ye>>4,q=b&15;if(q!==7){this._onError(U.CODEC_UNSUPPORTED,`Flv: Unsupported codec in video frame: ${q}`);return}this._parseAVCVideoPacket(l,h+1,f-1,d,p,E)}_parseAVCVideoPacket(l,h,f,d,p,b){if(f<4){B.w(this.TAG,"Flv: Invalid AVC packet, missing AVCPacketType or/and CompositionTime");return}let E=this._littleEndian,q=new DataView(l,h,f),K=q.getUint8(0),Ue=(q.getUint32(0,!E)&16777215)<<8>>8;if(K===0)this._parseAVCDecoderConfigurationRecord(l,h+4,f-4);else if(K===1)this._parseAVCVideoData(l,h+4,f-4,d,p,b,Ue);else if(K!==2){this._onError(U.FORMAT_ERROR,`Flv: Invalid video packet type ${K}`);return}}_parseAVCDecoderConfigurationRecord(l,h,f){if(f<7){B.w(this.TAG,"Flv: Invalid AVCDecoderConfigurationRecord, lack of data!");return}let d=this._videoMetadata,p=this._videoTrack,b=this._littleEndian,E=new DataView(l,h,f);d?typeof d.avcc!="undefined"&&B.w(this.TAG,"Found another AVCDecoderConfigurationRecord!"):(this._hasVideo===!1&&this._hasVideoFlagOverrided===!1&&(this._hasVideo=!0,this._mediaInfo.hasVideo=!0),d=this._videoMetadata={},d.type="video",d.id=p.id,d.timescale=this._timescale,d.duration=this._duration);let q=E.getUint8(0),K=E.getUint8(1),ye=E.getUint8(2),Ue=E.getUint8(3);if(q!==1||K===0){this._onError(U.FORMAT_ERROR,"Flv: Invalid AVCDecoderConfigurationRecord");return}if(this._naluLengthSize=(E.getUint8(4)&3)+1,this._naluLengthSize!==3&&this._naluLengthSize!==4){this._onError(U.FORMAT_ERROR,`Flv: Strange NaluLengthSizeMinusOne: ${this._naluLengthSize-1}`);return}let Ge=E.getUint8(5)&31;if(Ge===0){this._onError(U.FORMAT_ERROR,"Flv: Invalid AVCDecoderConfigurationRecord: No SPS");return}else Ge>1&&B.w(this.TAG,`Flv: Strange AVCDecoderConfigurationRecord: SPS Count = ${Ge}`);let Le=6;for(let Qe=0;Qe1&&B.w(this.TAG,`Flv: Strange AVCDecoderConfigurationRecord: PPS Count = ${rt}`);Le++;for(let Qe=0;Qe=f){B.w(this.TAG,`Malformed Nalu near timestamp ${rt}, offset = ${Ge}, dataSize = ${f}`);break}let tt=K.getUint32(Ge,!q);if(Le===3&&(tt>>>=8),tt>f-Le){B.w(this.TAG,`Malformed Nalus near timestamp ${rt}, NaluSize > DataSize!`);return}let Je=K.getUint8(Ge+Le)&31;Je===5&&(Qe=!0);let $=new Uint8Array(l,h+Ge,Le+tt),ge={type:Je,data:$};ye.push(ge),Ue+=$.byteLength,Ge+=Le+tt}if(ye.length){let tt=this._videoTrack,Je={units:ye,length:Ue,isKeyframe:Qe,dts:rt,cts:E,pts:rt+E};Qe&&(Je.fileposition=p),tt.samples.push(Je),tt.length+=Ue}}}var Q=C;class I{static init(){I.types={avc1:[],avcC:[],btrt:[],dinf:[],dref:[],esds:[],ftyp:[],hdlr:[],mdat:[],mdhd:[],mdia:[],mfhd:[],minf:[],moof:[],moov:[],mp4a:[],mvex:[],mvhd:[],sdtp:[],stbl:[],stco:[],stsc:[],stsd:[],stsz:[],stts:[],tfdt:[],tfhd:[],traf:[],trak:[],trun:[],trex:[],tkhd:[],vmhd:[],smhd:[],".mp3":[]};for(let h in I.types)I.types.hasOwnProperty(h)&&(I.types[h]=[h.charCodeAt(0),h.charCodeAt(1),h.charCodeAt(2),h.charCodeAt(3)]);let l=I.constants={};l.FTYP=new Uint8Array([105,115,111,109,0,0,0,1,105,115,111,109,97,118,99,49]),l.STSD_PREFIX=new Uint8Array([0,0,0,0,0,0,0,1]),l.STTS=new Uint8Array([0,0,0,0,0,0,0,0]),l.STSC=l.STCO=l.STTS,l.STSZ=new Uint8Array([0,0,0,0,0,0,0,0,0,0,0,0]),l.HDLR_VIDEO=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]),l.HDLR_AUDIO=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]),l.DREF=new Uint8Array([0,0,0,0,0,0,0,1,0,0,0,12,117,114,108,32,0,0,0,1]),l.SMHD=new Uint8Array([0,0,0,0,0,0,0,0]),l.VMHD=new Uint8Array([0,0,0,1,0,0,0,0,0,0,0,0])}static box(l){let h=8,f=null,d=Array.prototype.slice.call(arguments,1),p=d.length;for(let E=0;E>>24&255,f[1]=h>>>16&255,f[2]=h>>>8&255,f[3]=h&255,f.set(l,4);let b=8;for(let E=0;E>>24&255,l>>>16&255,l>>>8&255,l&255,h>>>24&255,h>>>16&255,h>>>8&255,h&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]))}static trak(l){return I.box(I.types.trak,I.tkhd(l),I.mdia(l))}static tkhd(l){let h=l.id,f=l.duration,d=l.presentWidth,p=l.presentHeight;return I.box(I.types.tkhd,new Uint8Array([0,0,0,7,0,0,0,0,0,0,0,0,h>>>24&255,h>>>16&255,h>>>8&255,h&255,0,0,0,0,f>>>24&255,f>>>16&255,f>>>8&255,f&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,d>>>8&255,d&255,0,0,p>>>8&255,p&255,0,0]))}static mdia(l){return I.box(I.types.mdia,I.mdhd(l),I.hdlr(l),I.minf(l))}static mdhd(l){let h=l.timescale,f=l.duration;return I.box(I.types.mdhd,new Uint8Array([0,0,0,0,0,0,0,0,0,0,0,0,h>>>24&255,h>>>16&255,h>>>8&255,h&255,f>>>24&255,f>>>16&255,f>>>8&255,f&255,85,196,0,0]))}static hdlr(l){let h=null;return l.type==="audio"?h=I.constants.HDLR_AUDIO:h=I.constants.HDLR_VIDEO,I.box(I.types.hdlr,h)}static minf(l){let h=null;return l.type==="audio"?h=I.box(I.types.smhd,I.constants.SMHD):h=I.box(I.types.vmhd,I.constants.VMHD),I.box(I.types.minf,h,I.dinf(),I.stbl(l))}static dinf(){return I.box(I.types.dinf,I.box(I.types.dref,I.constants.DREF))}static stbl(l){return I.box(I.types.stbl,I.stsd(l),I.box(I.types.stts,I.constants.STTS),I.box(I.types.stsc,I.constants.STSC),I.box(I.types.stsz,I.constants.STSZ),I.box(I.types.stco,I.constants.STCO))}static stsd(l){return l.type==="audio"?l.codec==="mp3"?I.box(I.types.stsd,I.constants.STSD_PREFIX,I.mp3(l)):I.box(I.types.stsd,I.constants.STSD_PREFIX,I.mp4a(l)):I.box(I.types.stsd,I.constants.STSD_PREFIX,I.avc1(l))}static mp3(l){let h=l.channelCount,f=l.audioSampleRate,d=new Uint8Array([0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,h,0,16,0,0,0,0,f>>>8&255,f&255,0,0]);return I.box(I.types[".mp3"],d)}static mp4a(l){let h=l.channelCount,f=l.audioSampleRate,d=new Uint8Array([0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,h,0,16,0,0,0,0,f>>>8&255,f&255,0,0]);return I.box(I.types.mp4a,d,I.esds(l))}static esds(l){let h=l.config||[],f=h.length,d=new Uint8Array([0,0,0,0,3,23+f,0,1,0,4,15+f,64,21,0,0,0,0,0,0,0,0,0,0,0,5].concat([f]).concat(h).concat([6,1,2]));return I.box(I.types.esds,d)}static avc1(l){let h=l.avcc,f=l.codecWidth,d=l.codecHeight,p=new Uint8Array([0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,f>>>8&255,f&255,d>>>8&255,d&255,0,72,0,0,0,72,0,0,0,0,0,0,0,1,10,120,113,113,47,102,108,118,46,106,115,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,24,255,255]);return I.box(I.types.avc1,p,I.box(I.types.avcC,h))}static mvex(l){return I.box(I.types.mvex,I.trex(l))}static trex(l){let h=l.id,f=new Uint8Array([0,0,0,0,h>>>24&255,h>>>16&255,h>>>8&255,h&255,0,0,0,1,0,0,0,0,0,0,0,0,0,1,0,1]);return I.box(I.types.trex,f)}static moof(l,h){return I.box(I.types.moof,I.mfhd(l.sequenceNumber),I.traf(l,h))}static mfhd(l){let h=new Uint8Array([0,0,0,0,l>>>24&255,l>>>16&255,l>>>8&255,l&255]);return I.box(I.types.mfhd,h)}static traf(l,h){let f=l.id,d=I.box(I.types.tfhd,new Uint8Array([0,0,0,0,f>>>24&255,f>>>16&255,f>>>8&255,f&255])),p=I.box(I.types.tfdt,new Uint8Array([0,0,0,0,h>>>24&255,h>>>16&255,h>>>8&255,h&255])),b=I.sdtp(l),E=I.trun(l,b.byteLength+16+16+8+16+8+8);return I.box(I.types.traf,d,p,E,b)}static sdtp(l){let h=l.samples||[],f=h.length,d=new Uint8Array(4+f);for(let p=0;p>>24&255,d>>>16&255,d>>>8&255,d&255,h>>>24&255,h>>>16&255,h>>>8&255,h&255],0);for(let E=0;E>>24&255,q>>>16&255,q>>>8&255,q&255,K>>>24&255,K>>>16&255,K>>>8&255,K&255,ye.isLeading<<2|ye.dependsOn,ye.isDependedOn<<6|ye.hasRedundancy<<4|ye.isNonSync,0,0,Ue>>>24&255,Ue>>>16&255,Ue>>>8&255,Ue&255],12+16*E)}return I.box(I.types.trun,b)}static mdat(l){return I.box(I.types.mdat,l)}}I.init();var F=I;class pe{static getSilentFrame(l,h){if(l==="mp4a.40.2"){if(h===1)return new Uint8Array([0,200,0,128,35,128]);if(h===2)return new Uint8Array([33,0,73,144,2,25,0,35,128]);if(h===3)return new Uint8Array([0,200,0,128,32,132,1,38,64,8,100,0,142]);if(h===4)return new Uint8Array([0,200,0,128,32,132,1,38,64,8,100,0,128,44,128,8,2,56]);if(h===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(h===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])}else{if(h===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(h===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(h===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])}return null}}var je=pe;class Be{constructor(l,h,f,d,p){this.dts=l,this.pts=h,this.duration=f,this.originalDts=d,this.isSyncPoint=p,this.fileposition=null}}class it{constructor(){this.beginDts=0,this.endDts=0,this.beginPts=0,this.endPts=0,this.originalBeginDts=0,this.originalEndDts=0,this.syncPoints=[],this.firstSample=null,this.lastSample=null}appendSyncPoint(l){l.isSyncPoint=!0,this.syncPoints.push(l)}}class _e{constructor(){this._list=[]}clear(){this._list=[]}appendArray(l){let h=this._list;l.length!==0&&(h.length>0&&l[0].originalDts=h[p].dts&&lh[d].lastSample.originalDts&&l=h[d].lastSample.originalDts&&(d===h.length-1||d0&&(p=this._searchNearestSegmentBefore(f.originalBeginDts)+1),this._lastAppendLocation=p,this._list.splice(p,0,f)}getLastSegmentBefore(l){let h=this._searchNearestSegmentBefore(l);return h>=0?this._list[h]:null}getLastSampleBefore(l){let h=this.getLastSegmentBefore(l);return h!=null?h.lastSample:null}getLastSyncPointBefore(l){let h=this._searchNearestSegmentBefore(l),f=this._list[h].syncPoints;for(;f.length===0&&h>0;)h--,f=this._list[h].syncPoints;return f.length>0?f[f.length-1]:null}}class re{constructor(l){this.TAG="MP4Remuxer",this._config=l,this._isLive=l.isLive===!0,this._dtsBase=-1,this._dtsBaseInited=!1,this._audioDtsBase=1/0,this._videoDtsBase=1/0,this._audioNextDts=void 0,this._videoNextDts=void 0,this._audioStashedLastSample=null,this._videoStashedLastSample=null,this._audioMeta=null,this._videoMeta=null,this._audioSegmentInfoList=new Ye("audio"),this._videoSegmentInfoList=new Ye("video"),this._onInitSegment=null,this._onMediaSegment=null,this._forceFirstIDR=!!(Re.chrome&&(Re.version.major<50||Re.version.major===50&&Re.version.build<2661)),this._fillSilentAfterSeek=Re.msedge||Re.msie,this._mp3UseMpegAudio=!Re.firefox,this._fillAudioTimestampGap=this._config.fixAudioTimestampGap}destroy(){this._dtsBase=-1,this._dtsBaseInited=!1,this._audioMeta=null,this._videoMeta=null,this._audioSegmentInfoList.clear(),this._audioSegmentInfoList=null,this._videoSegmentInfoList.clear(),this._videoSegmentInfoList=null,this._onInitSegment=null,this._onMediaSegment=null}bindDataSource(l){return l.onDataAvailable=this.remux.bind(this),l.onTrackMetadata=this._onTrackMetadataReceived.bind(this),this}get onInitSegment(){return this._onInitSegment}set onInitSegment(l){this._onInitSegment=l}get onMediaSegment(){return this._onMediaSegment}set onMediaSegment(l){this._onMediaSegment=l}insertDiscontinuity(){this._audioNextDts=this._videoNextDts=void 0}seek(l){this._audioStashedLastSample=null,this._videoStashedLastSample=null,this._videoSegmentInfoList.clear(),this._audioSegmentInfoList.clear()}remux(l,h){if(!this._onMediaSegment)throw new M("MP4Remuxer: onMediaSegment callback must be specificed!");this._dtsBaseInited||this._calculateDtsBase(l,h),this._remuxVideo(h),this._remuxAudio(l)}_onTrackMetadataReceived(l,h){let f=null,d="mp4",p=h.codec;if(l==="audio")this._audioMeta=h,h.codec==="mp3"&&this._mp3UseMpegAudio?(d="mpeg",p="",f=new Uint8Array):f=F.generateInitSegment(h);else if(l==="video")this._videoMeta=h,f=F.generateInitSegment(h);else return;if(!this._onInitSegment)throw new M("MP4Remuxer: onInitSegment callback must be specified!");this._onInitSegment(l,{type:l,data:f.buffer,codec:p,container:`${l}/${d}`,mediaDuration:h.duration})}_calculateDtsBase(l,h){this._dtsBaseInited||(l.samples&&l.samples.length&&(this._audioDtsBase=l.samples[0].dts),h.samples&&h.samples.length&&(this._videoDtsBase=h.samples[0].dts),this._dtsBase=Math.min(this._audioDtsBase,this._videoDtsBase),this._dtsBaseInited=!0)}flushStashedSamples(){let l=this._videoStashedLastSample,h=this._audioStashedLastSample,f={type:"video",id:1,sequenceNumber:0,samples:[],length:0};l!=null&&(f.samples.push(l),f.length=l.length);let d={type:"audio",id:2,sequenceNumber:0,samples:[],length:0};h!=null&&(d.samples.push(h),d.length=h.length),this._videoStashedLastSample=null,this._audioStashedLastSample=null,this._remuxVideo(f,!0),this._remuxAudio(d,!0)}_remuxAudio(l,h){if(this._audioMeta==null)return;let f=l,d=f.samples,p,b=-1,E=-1,q=-1,K=this._audioMeta.refSampleDuration,ye=this._audioMeta.codec==="mp3"&&this._mp3UseMpegAudio,Ue=this._dtsBaseInited&&this._audioNextDts===void 0,Ge=!1;if(!d||d.length===0||d.length===1&&!h)return;let Le=0,rt=null,Qe=0;ye?(Le=0,Qe=f.length):(Le=8,Qe=8+f.length);let tt=null;if(d.length>1&&(tt=d.pop(),Qe-=tt.length),this._audioStashedLastSample!=null){let Ne=this._audioStashedLastSample;this._audioStashedLastSample=null,d.unshift(Ne),Qe+=Ne.length}tt!=null&&(this._audioStashedLastSample=tt);let Je=d[0].dts-this._dtsBase;if(this._audioNextDts)p=Je-this._audioNextDts;else if(this._audioSegmentInfoList.isEmpty())p=0,this._fillSilentAfterSeek&&!this._videoSegmentInfoList.isEmpty()&&this._audioMeta.originalCodec!=="mp3"&&(Ge=!0);else{let Ne=this._audioSegmentInfoList.getLastSampleBefore(Je);if(Ne!=null){let ke=Je-(Ne.originalDts+Ne.duration);ke<=3&&(ke=0);let Y=Ne.dts+Ne.duration+ke;p=Je-Y}else p=0}if(Ge){let Ne=Je-p,ke=this._videoSegmentInfoList.getLastSegmentBefore(Je);if(ke!=null&&ke.beginDts=1?Ke=$[$.length-1].duration:Ke=Math.floor(K);let Ve=!1,ct=null;if(Ke>K*1.5&&this._audioMeta.codec!=="mp3"&&this._fillAudioTimestampGap&&!Re.safari){Ve=!0;let ut=Math.abs(Ke-K),Ct=Math.ceil(ut/K),Lt=Ie+K;B.w(this.TAG,`Large audio timestamp gap detected, may cause AV sync to drift. Silent frames will be generated to avoid unsync. dts: ${Ie+Ke} ms, expected: ${Ie+Math.round(K)} ms, delta: ${Math.round(ut)} ms, generate: ${Ct} frames`);let Dt=je.getSilentFrame(this._audioMeta.originalCodec,this._audioMeta.channelCount);Dt==null&&(B.w(this.TAG,`Unable to generate silent frame for ${this._audioMeta.originalCodec} with ${this._audioMeta.channelCount} channels, repeat last frame`),Dt=Y),ct=[];for(let Vt=0;Vt0){let bt=ct[ct.length-1];bt.duration=tn-bt.dts}let Ut={dts:tn,pts:tn,cts:0,unit:Dt,size:Dt.byteLength,duration:0,originalDts:be,flags:{isLeading:0,dependsOn:1,isDependedOn:0,hasRedundancy:0}};ct.push(Ut),Qe+=Ut.size,Lt+=K}let Nt=ct[ct.length-1];Nt.duration=Ie+Ke-Nt.dts,Ke=Math.round(K)}$.push({dts:Ie,pts:Ie,cts:0,unit:ke.unit,size:ke.unit.byteLength,duration:Ke,originalDts:be,flags:{isLeading:0,dependsOn:1,isDependedOn:0,hasRedundancy:0}}),Ve&&$.push.apply($,ct)}ye?rt=new Uint8Array(Qe):(rt=new Uint8Array(Qe),rt[0]=Qe>>>24&255,rt[1]=Qe>>>16&255,rt[2]=Qe>>>8&255,rt[3]=Qe&255,rt.set(F.types.mdat,4));for(let Ne=0;Ne<$.length;Ne++){let ke=$[Ne].unit;rt.set(ke,Le),Le+=ke.byteLength}let ge=$[$.length-1];E=ge.dts+ge.duration,this._audioNextDts=E;let we=new it;we.beginDts=b,we.endDts=E,we.beginPts=b,we.endPts=E,we.originalBeginDts=$[0].originalDts,we.originalEndDts=ge.originalDts+ge.duration,we.firstSample=new Be($[0].dts,$[0].pts,$[0].duration,$[0].originalDts,!1),we.lastSample=new Be(ge.dts,ge.pts,ge.duration,ge.originalDts,!1),this._isLive||this._audioSegmentInfoList.append(we),f.samples=$,f.sequenceNumber++;let He=null;ye?He=new Uint8Array:He=F.moof(f,b),f.samples=[],f.length=0;let at={type:"audio",data:this._mergeBoxes(He,rt).buffer,sampleCount:$.length,info:we};ye&&Ue&&(at.timestampOffset=b),this._onMediaSegment("audio",at)}_remuxVideo(l,h){if(this._videoMeta==null)return;let f=l,d=f.samples,p,b=-1,E=-1,q=-1,K=-1;if(!d||d.length===0||d.length===1&&!h)return;let ye=8,Ue=null,Ge=8+l.length,Le=null;if(d.length>1&&(Le=d.pop(),Ge-=Le.length),this._videoStashedLastSample!=null){let ge=this._videoStashedLastSample;this._videoStashedLastSample=null,d.unshift(ge),Ge+=ge.length}Le!=null&&(this._videoStashedLastSample=Le);let rt=d[0].dts-this._dtsBase;if(this._videoNextDts)p=rt-this._videoNextDts;else if(this._videoSegmentInfoList.isEmpty())p=0;else{let ge=this._videoSegmentInfoList.getLastSampleBefore(rt);if(ge!=null){let we=rt-(ge.originalDts+ge.duration);we<=3&&(we=0);let He=ge.dts+ge.duration+we;p=rt-He}else p=0}let Qe=new it,tt=[];for(let ge=0;ge=1?be=tt[tt.length-1].duration:be=Math.floor(this._videoMeta.refSampleDuration),at){let Ie=new Be(Ne,Y,be,we.dts,!0);Ie.fileposition=we.fileposition,Qe.appendSyncPoint(Ie)}tt.push({dts:Ne,pts:Y,cts:ke,units:we.units,size:we.length,isKeyframe:at,duration:be,originalDts:He,flags:{isLeading:0,dependsOn:at?2:1,isDependedOn:at?1:0,hasRedundancy:0,isNonSync:at?0:1}})}Ue=new Uint8Array(Ge),Ue[0]=Ge>>>24&255,Ue[1]=Ge>>>16&255,Ue[2]=Ge>>>8&255,Ue[3]=Ge&255,Ue.set(F.types.mdat,4);for(let ge=0;ge{d.timestampBase=f,f+=d.duration,d.cors=l.cors,d.withCredentials=l.withCredentials,h.referrerPolicy&&(d.referrerPolicy=h.referrerPolicy)}),!isNaN(f)&&this._mediaDataSource.duration!==f&&(this._mediaDataSource.duration=f),this._mediaInfo=null,this._demuxer=null,this._remuxer=null,this._ioctl=null,this._pendingSeekTime=null,this._pendingResolveSeekPoint=null,this._statisticsReporter=null}destroy(){this._mediaInfo=null,this._mediaDataSource=null,this._statisticsReporter&&this._disableStatisticsReporter(),this._ioctl&&(this._ioctl.destroy(),this._ioctl=null),this._demuxer&&(this._demuxer.destroy(),this._demuxer=null),this._remuxer&&(this._remuxer.destroy(),this._remuxer=null),this._emitter.removeAllListeners(),this._emitter=null}on(l,h){this._emitter.addListener(l,h)}off(l,h){this._emitter.removeListener(l,h)}start(){this._loadSegment(0),this._enableStatisticsReporter()}_loadSegment(l,h){this._currentSegmentIndex=l;let f=this._mediaDataSource.segments[l],d=this._ioctl=new ve(f,this._config,l);d.onError=this._onIOException.bind(this),d.onSeeked=this._onIOSeeked.bind(this),d.onComplete=this._onIOComplete.bind(this),d.onRedirect=this._onIORedirect.bind(this),d.onRecoveredEarlyEof=this._onIORecoveredEarlyEof.bind(this),h?this._demuxer.bindDataSource(this._ioctl):d.onDataArrival=this._onInitChunkArrival.bind(this),d.open(h)}stop(){this._internalAbort(),this._disableStatisticsReporter()}_internalAbort(){this._ioctl&&(this._ioctl.destroy(),this._ioctl=null)}pause(){this._ioctl&&this._ioctl.isWorking()&&(this._ioctl.pause(),this._disableStatisticsReporter())}resume(){this._ioctl&&this._ioctl.isPaused()&&(this._ioctl.resume(),this._enableStatisticsReporter())}seek(l){if(this._mediaInfo==null||!this._mediaInfo.isSeekable())return;let h=this._searchSegmentIndexContains(l);if(h===this._currentSegmentIndex){let f=this._mediaInfo.segments[h];if(f==null)this._pendingSeekTime=l;else{let d=f.getNearestKeyframe(l);this._remuxer.seek(d.milliseconds),this._ioctl.seek(d.fileposition),this._pendingResolveSeekPoint=d.milliseconds}}else{let f=this._mediaInfo.segments[h];if(f==null)this._pendingSeekTime=l,this._internalAbort(),this._remuxer.seek(),this._remuxer.insertDiscontinuity(),this._loadSegment(h);else{let d=f.getNearestKeyframe(l);this._internalAbort(),this._remuxer.seek(l),this._remuxer.insertDiscontinuity(),this._demuxer.resetMediaInfo(),this._demuxer.timestampBase=this._mediaDataSource.segments[h].timestampBase,this._loadSegment(h,d.fileposition),this._pendingResolveSeekPoint=d.milliseconds,this._reportSegmentMediaInfo(h)}}this._enableStatisticsReporter()}_searchSegmentIndexContains(l){let h=this._mediaDataSource.segments,f=h.length-1;for(let d=0;d0)this._demuxer.bindDataSource(this._ioctl),this._demuxer.timestampBase=this._mediaDataSource.segments[this._currentSegmentIndex].timestampBase,d=this._demuxer.parseChunks(l,h);else if((f=Q.probe(l)).match){this._demuxer=new Q(f,this._config),this._remuxer||(this._remuxer=new Pe(this._config));let p=this._mediaDataSource;p.duration!=null&&!isNaN(p.duration)&&(this._demuxer.overridedDuration=p.duration),typeof p.hasAudio=="boolean"&&(this._demuxer.overridedHasAudio=p.hasAudio),typeof p.hasVideo=="boolean"&&(this._demuxer.overridedHasVideo=p.hasVideo),this._demuxer.timestampBase=p.segments[this._currentSegmentIndex].timestampBase,this._demuxer.onError=this._onDemuxException.bind(this),this._demuxer.onMediaInfo=this._onMediaInfo.bind(this),this._demuxer.onMetaDataArrived=this._onMetaDataArrived.bind(this),this._demuxer.onScriptDataArrived=this._onScriptDataArrived.bind(this),this._remuxer.bindDataSource(this._demuxer.bindDataSource(this._ioctl)),this._remuxer.onInitSegment=this._onRemuxerInitSegmentArrival.bind(this),this._remuxer.onMediaSegment=this._onRemuxerMediaSegmentArrival.bind(this),d=this._demuxer.parseChunks(l,h)}else f=null,B.e(this.TAG,"Non-FLV, Unsupported media type!"),Promise.resolve().then(()=>{this._internalAbort()}),this._emitter.emit(oe.DEMUX_ERROR,U.FORMAT_UNSUPPORTED,"Non-FLV, Unsupported media type"),d=0;return d}_onMediaInfo(l){this._mediaInfo==null&&(this._mediaInfo=Object.assign({},l),this._mediaInfo.keyframesIndex=null,this._mediaInfo.segments=[],this._mediaInfo.segmentCount=this._mediaDataSource.segments.length,Object.setPrototypeOf(this._mediaInfo,nt.prototype));let h=Object.assign({},l);Object.setPrototypeOf(h,nt.prototype),this._mediaInfo.segments[this._currentSegmentIndex]=h,this._reportSegmentMediaInfo(this._currentSegmentIndex),this._pendingSeekTime!=null&&Promise.resolve().then(()=>{let f=this._pendingSeekTime;this._pendingSeekTime=null,this.seek(f)})}_onMetaDataArrived(l){this._emitter.emit(oe.METADATA_ARRIVED,l)}_onScriptDataArrived(l){this._emitter.emit(oe.SCRIPTDATA_ARRIVED,l)}_onIOSeeked(){this._remuxer.insertDiscontinuity()}_onIOComplete(l){let f=l+1;f0&&f[0].originalDts===d&&(d=f[0].pts),this._emitter.emit(oe.RECOMMEND_SEEKPOINT,d)}}_enableStatisticsReporter(){this._statisticsReporter==null&&(this._statisticsReporter=self.setInterval(this._reportStatisticsInfo.bind(this),this._config.statisticsInfoReportInterval))}_disableStatisticsReporter(){this._statisticsReporter&&(self.clearInterval(this._statisticsReporter),this._statisticsReporter=null)}_reportSegmentMediaInfo(l){let h=this._mediaInfo.segments[l],f=Object.assign({},h);f.duration=this._mediaInfo.duration,f.segmentCount=this._mediaInfo.segmentCount,delete f.segments,delete f.keyframesIndex,this._emitter.emit(oe.MEDIA_INFO,f)}_reportStatisticsInfo(){let l={};l.url=this._ioctl.currentURL,l.hasRedirect=this._ioctl.hasRedirect,l.hasRedirect&&(l.redirectedURL=this._ioctl.currentRedirectedURL),l.speed=this._ioctl.currentSpeed,l.loaderType=this._ioctl.loaderType,l.currentSegmentIndex=this._currentSegmentIndex,l.totalSegmentCount=this._mediaDataSource.segments.length,this._emitter.emit(oe.STATISTICS_INFO,l)}}var pt=dt,ot=function(Xe){let l="TransmuxingWorker",h=null,f=Qe.bind(this);O.install(),Xe.addEventListener("message",function(tt){switch(tt.data.cmd){case"init":h=new pt(tt.data.param[0],tt.data.param[1]),h.on(oe.IO_ERROR,Ge.bind(this)),h.on(oe.DEMUX_ERROR,Le.bind(this)),h.on(oe.INIT_SEGMENT,d.bind(this)),h.on(oe.MEDIA_SEGMENT,p.bind(this)),h.on(oe.LOADING_COMPLETE,b.bind(this)),h.on(oe.RECOVERED_EARLY_EOF,E.bind(this)),h.on(oe.MEDIA_INFO,q.bind(this)),h.on(oe.METADATA_ARRIVED,K.bind(this)),h.on(oe.SCRIPTDATA_ARRIVED,ye.bind(this)),h.on(oe.STATISTICS_INFO,Ue.bind(this)),h.on(oe.RECOMMEND_SEEKPOINT,rt.bind(this));break;case"destroy":h&&(h.destroy(),h=null),Xe.postMessage({msg:"destroyed"});break;case"start":h.start();break;case"stop":h.stop();break;case"seek":h.seek(tt.data.param);break;case"pause":h.pause();break;case"resume":h.resume();break;case"logging_config":{let Je=tt.data.param;le.applyConfig(Je),Je.enableCallback===!0?le.addLogListener(f):le.removeLogListener(f);break}}});function d(tt,Je){let $={msg:oe.INIT_SEGMENT,data:{type:tt,data:Je}};Xe.postMessage($,[Je.data])}function p(tt,Je){let $={msg:oe.MEDIA_SEGMENT,data:{type:tt,data:Je}};Xe.postMessage($,[Je.data])}function b(){let tt={msg:oe.LOADING_COMPLETE};Xe.postMessage(tt)}function E(){let tt={msg:oe.RECOVERED_EARLY_EOF};Xe.postMessage(tt)}function q(tt){let Je={msg:oe.MEDIA_INFO,data:tt};Xe.postMessage(Je)}function K(tt){let Je={msg:oe.METADATA_ARRIVED,data:tt};Xe.postMessage(Je)}function ye(tt){let Je={msg:oe.SCRIPTDATA_ARRIVED,data:tt};Xe.postMessage(Je)}function Ue(tt){let Je={msg:oe.STATISTICS_INFO,data:tt};Xe.postMessage(Je)}function Ge(tt,Je){Xe.postMessage({msg:oe.IO_ERROR,data:{type:tt,info:Je}})}function Le(tt,Je){Xe.postMessage({msg:oe.DEMUX_ERROR,data:{type:tt,info:Je}})}function rt(tt){Xe.postMessage({msg:oe.RECOMMEND_SEEKPOINT,data:tt})}function Qe(tt,Je){Xe.postMessage({msg:"logcat_callback",data:{type:tt,logcat:Je}})}};class _t{constructor(l,h){if(this.TAG="Transmuxer",this._emitter=new(se()),h.enableWorker&&typeof Worker!="undefined")try{let f=u(82059);this._worker=f(ot),this._workerDestroying=!1,this._worker.addEventListener("message",this._onWorkerMessage.bind(this)),this._worker.postMessage({cmd:"init",param:[l,h]}),this.e={onLoggingConfigChanged:this._onLoggingConfigChanged.bind(this)},le.registerListener(this.e.onLoggingConfigChanged),this._worker.postMessage({cmd:"logging_config",param:le.getConfig()})}catch(f){B.e(this.TAG,"Error while initialize transmuxing worker, fallback to inline transmuxing"),this._worker=null,this._controller=new pt(l,h)}else this._controller=new pt(l,h);if(this._controller){let f=this._controller;f.on(oe.IO_ERROR,this._onIOError.bind(this)),f.on(oe.DEMUX_ERROR,this._onDemuxError.bind(this)),f.on(oe.INIT_SEGMENT,this._onInitSegment.bind(this)),f.on(oe.MEDIA_SEGMENT,this._onMediaSegment.bind(this)),f.on(oe.LOADING_COMPLETE,this._onLoadingComplete.bind(this)),f.on(oe.RECOVERED_EARLY_EOF,this._onRecoveredEarlyEof.bind(this)),f.on(oe.MEDIA_INFO,this._onMediaInfo.bind(this)),f.on(oe.METADATA_ARRIVED,this._onMetaDataArrived.bind(this)),f.on(oe.SCRIPTDATA_ARRIVED,this._onScriptDataArrived.bind(this)),f.on(oe.STATISTICS_INFO,this._onStatisticsInfo.bind(this)),f.on(oe.RECOMMEND_SEEKPOINT,this._onRecommendSeekpoint.bind(this))}}destroy(){this._worker?this._workerDestroying||(this._workerDestroying=!0,this._worker.postMessage({cmd:"destroy"}),le.removeListener(this.e.onLoggingConfigChanged),this.e=null):(this._controller.destroy(),this._controller=null),this._emitter.removeAllListeners(),this._emitter=null}on(l,h){this._emitter.addListener(l,h)}off(l,h){this._emitter.removeListener(l,h)}hasWorker(){return this._worker!=null}open(){this._worker?this._worker.postMessage({cmd:"start"}):this._controller.start()}close(){this._worker?this._worker.postMessage({cmd:"stop"}):this._controller.stop()}seek(l){this._worker?this._worker.postMessage({cmd:"seek",param:l}):this._controller.seek(l)}pause(){this._worker?this._worker.postMessage({cmd:"pause"}):this._controller.pause()}resume(){this._worker?this._worker.postMessage({cmd:"resume"}):this._controller.resume()}_onInitSegment(l,h){Promise.resolve().then(()=>{this._emitter.emit(oe.INIT_SEGMENT,l,h)})}_onMediaSegment(l,h){Promise.resolve().then(()=>{this._emitter.emit(oe.MEDIA_SEGMENT,l,h)})}_onLoadingComplete(){Promise.resolve().then(()=>{this._emitter.emit(oe.LOADING_COMPLETE)})}_onRecoveredEarlyEof(){Promise.resolve().then(()=>{this._emitter.emit(oe.RECOVERED_EARLY_EOF)})}_onMediaInfo(l){Promise.resolve().then(()=>{this._emitter.emit(oe.MEDIA_INFO,l)})}_onMetaDataArrived(l){Promise.resolve().then(()=>{this._emitter.emit(oe.METADATA_ARRIVED,l)})}_onScriptDataArrived(l){Promise.resolve().then(()=>{this._emitter.emit(oe.SCRIPTDATA_ARRIVED,l)})}_onStatisticsInfo(l){Promise.resolve().then(()=>{this._emitter.emit(oe.STATISTICS_INFO,l)})}_onIOError(l,h){Promise.resolve().then(()=>{this._emitter.emit(oe.IO_ERROR,l,h)})}_onDemuxError(l,h){Promise.resolve().then(()=>{this._emitter.emit(oe.DEMUX_ERROR,l,h)})}_onRecommendSeekpoint(l){Promise.resolve().then(()=>{this._emitter.emit(oe.RECOMMEND_SEEKPOINT,l)})}_onLoggingConfigChanged(l){this._worker&&this._worker.postMessage({cmd:"logging_config",param:l})}_onWorkerMessage(l){let h=l.data,f=h.data;if(h.msg==="destroyed"||this._workerDestroying){this._workerDestroying=!1,this._worker.terminate(),this._worker=null;return}switch(h.msg){case oe.INIT_SEGMENT:case oe.MEDIA_SEGMENT:this._emitter.emit(h.msg,f.type,f.data);break;case oe.LOADING_COMPLETE:case oe.RECOVERED_EARLY_EOF:this._emitter.emit(h.msg);break;case oe.MEDIA_INFO:Object.setPrototypeOf(f,nt.prototype),this._emitter.emit(h.msg,f);break;case oe.METADATA_ARRIVED:case oe.SCRIPTDATA_ARRIVED:case oe.STATISTICS_INFO:this._emitter.emit(h.msg,f);break;case oe.IO_ERROR:case oe.DEMUX_ERROR:this._emitter.emit(h.msg,f.type,f.info);break;case oe.RECOMMEND_SEEKPOINT:this._emitter.emit(h.msg,f);break;case"logcat_callback":B.emitter.emit("log",f.type,f.logcat);break;default:break}}}var jt=_t,Yt={ERROR:"error",SOURCE_OPEN:"source_open",UPDATE_END:"update_end",BUFFER_FULL:"buffer_full"};class Mt{constructor(l){this.TAG="MSEController",this._config=l,this._emitter=new(se()),this._config.isLive&&this._config.autoCleanupSourceBuffer==null&&(this._config.autoCleanupSourceBuffer=!0),this.e={onSourceOpen:this._onSourceOpen.bind(this),onSourceEnded:this._onSourceEnded.bind(this),onSourceClose:this._onSourceClose.bind(this),onSourceBufferError:this._onSourceBufferError.bind(this),onSourceBufferUpdateEnd:this._onSourceBufferUpdateEnd.bind(this)},this._mediaSource=null,this._mediaSourceObjectURL=null,this._mediaElement=null,this._isBufferFull=!1,this._hasPendingEos=!1,this._requireSetMediaDuration=!1,this._pendingMediaDuration=0,this._pendingSourceBufferInit=[],this._mimeTypes={video:null,audio:null},this._sourceBuffers={video:null,audio:null},this._lastInitSegments={video:null,audio:null},this._pendingSegments={video:[],audio:[]},this._pendingRemoveRanges={video:[],audio:[]},this._idrList=new _e}destroy(){(this._mediaElement||this._mediaSource)&&this.detachMediaElement(),this.e=null,this._emitter.removeAllListeners(),this._emitter=null}on(l,h){this._emitter.addListener(l,h)}off(l,h){this._emitter.removeListener(l,h)}attachMediaElement(l){if(this._mediaSource)throw new M("MediaSource has been attached to an HTMLMediaElement!");let h=this._mediaSource=new window.MediaSource;h.addEventListener("sourceopen",this.e.onSourceOpen),h.addEventListener("sourceended",this.e.onSourceEnded),h.addEventListener("sourceclose",this.e.onSourceClose),this._mediaElement=l,this._mediaSourceObjectURL=window.URL.createObjectURL(this._mediaSource),l.src=this._mediaSourceObjectURL}detachMediaElement(){if(this._mediaSource){let l=this._mediaSource;for(let h in this._sourceBuffers){let f=this._pendingSegments[h];f.splice(0,f.length),this._pendingSegments[h]=null,this._pendingRemoveRanges[h]=null,this._lastInitSegments[h]=null;let d=this._sourceBuffers[h];if(d){if(l.readyState!=="closed"){try{l.removeSourceBuffer(d)}catch(p){B.e(this.TAG,p.message)}d.removeEventListener("error",this.e.onSourceBufferError),d.removeEventListener("updateend",this.e.onSourceBufferUpdateEnd)}this._mimeTypes[h]=null,this._sourceBuffers[h]=null}}if(l.readyState==="open")try{l.endOfStream()}catch(h){B.e(this.TAG,h.message)}l.removeEventListener("sourceopen",this.e.onSourceOpen),l.removeEventListener("sourceended",this.e.onSourceEnded),l.removeEventListener("sourceclose",this.e.onSourceClose),this._pendingSourceBufferInit=[],this._isBufferFull=!1,this._idrList.clear(),this._mediaSource=null}this._mediaElement&&(this._mediaElement.src="",this._mediaElement.removeAttribute("src"),this._mediaElement=null),this._mediaSourceObjectURL&&(window.URL.revokeObjectURL(this._mediaSourceObjectURL),this._mediaSourceObjectURL=null)}appendInitSegment(l,h){if(!this._mediaSource||this._mediaSource.readyState!=="open"){this._pendingSourceBufferInit.push(l),this._pendingSegments[l.type].push(l);return}let f=l,d=`${f.container}`;f.codec&&f.codec.length>0&&(d+=`;codecs=${f.codec}`);let p=!1;if(B.v(this.TAG,"Received Initialization Segment, mimeType: "+d),this._lastInitSegments[f.type]=f,d!==this._mimeTypes[f.type]){if(this._mimeTypes[f.type])B.v(this.TAG,`Notice: ${f.type} mimeType changed, origin: ${this._mimeTypes[f.type]}, target: ${d}`);else{p=!0;try{let b=this._sourceBuffers[f.type]=this._mediaSource.addSourceBuffer(d);b.addEventListener("error",this.e.onSourceBufferError),b.addEventListener("updateend",this.e.onSourceBufferUpdateEnd)}catch(b){B.e(this.TAG,b.message),this._emitter.emit(Yt.ERROR,{code:b.code,msg:b.message});return}}this._mimeTypes[f.type]=d}h||this._pendingSegments[f.type].push(f),p||this._sourceBuffers[f.type]&&!this._sourceBuffers[f.type].updating&&this._doAppendSegments(),Re.safari&&f.container==="audio/mpeg"&&f.mediaDuration>0&&(this._requireSetMediaDuration=!0,this._pendingMediaDuration=f.mediaDuration/1e3,this._updateMediaSourceDuration())}appendMediaSegment(l){let h=l;this._pendingSegments[h.type].push(h),this._config.autoCleanupSourceBuffer&&this._needCleanupSourceBuffer()&&this._doCleanupSourceBuffer();let f=this._sourceBuffers[h.type];f&&!f.updating&&!this._hasPendingRemoveRanges()&&this._doAppendSegments()}seek(l){for(let h in this._sourceBuffers){if(!this._sourceBuffers[h])continue;let f=this._sourceBuffers[h];if(this._mediaSource.readyState==="open")try{f.abort()}catch(p){B.e(this.TAG,p.message)}this._idrList.clear();let d=this._pendingSegments[h];if(d.splice(0,d.length),this._mediaSource.readyState!=="closed"){for(let p=0;p=1&&l-d.start(0)>=this._config.autoCleanupMaxBackwardDuration)return!0}}return!1}_doCleanupSourceBuffer(){let l=this._mediaElement.currentTime;for(let h in this._sourceBuffers){let f=this._sourceBuffers[h];if(f){let d=f.buffered,p=!1;for(let b=0;b=this._config.autoCleanupMaxBackwardDuration){p=!0;let K=l-this._config.autoCleanupMinBackwardDuration;this._pendingRemoveRanges[h].push({start:E,end:K})}}else q0&&(isNaN(h)||f>h)&&(B.v(this.TAG,`Update MediaSource duration from ${h} to ${f}`),this._mediaSource.duration=f),this._requireSetMediaDuration=!1,this._pendingMediaDuration=0}_doRemoveRanges(){for(let l in this._pendingRemoveRanges){if(!this._sourceBuffers[l]||this._sourceBuffers[l].updating)continue;let h=this._sourceBuffers[l],f=this._pendingRemoveRanges[l];for(;f.length&&!h.updating;){let d=f.shift();h.remove(d.start,d.end)}}}_doAppendSegments(){let l=this._pendingSegments;for(let h in l)if(!(!this._sourceBuffers[h]||this._sourceBuffers[h].updating)&&l[h].length>0){let f=l[h].shift();if(f.timestampOffset){let d=this._sourceBuffers[h].timestampOffset,p=f.timestampOffset/1e3;Math.abs(d-p)>.1&&(B.v(this.TAG,`Update MPEG audio timestampOffset from ${d} to ${p}`),this._sourceBuffers[h].timestampOffset=p),delete f.timestampOffset}if(!f.data||f.data.byteLength===0)continue;try{this._sourceBuffers[h].appendBuffer(f.data),this._isBufferFull=!1,h==="video"&&f.hasOwnProperty("info")&&this._idrList.appendArray(f.info.syncPoints)}catch(d){this._pendingSegments[h].unshift(f),d.code===22?(this._isBufferFull||this._emitter.emit(Yt.BUFFER_FULL),this._isBufferFull=!0):(B.e(this.TAG,d.message),this._emitter.emit(Yt.ERROR,{code:d.code,msg:d.message}))}}}_onSourceOpen(){if(B.v(this.TAG,"MediaSource onSourceOpen"),this._mediaSource.removeEventListener("sourceopen",this.e.onSourceOpen),this._pendingSourceBufferInit.length>0){let l=this._pendingSourceBufferInit;for(;l.length;){let h=l.shift();this.appendInitSegment(h,!0)}}this._hasPendingSegments()&&this._doAppendSegments(),this._emitter.emit(Yt.SOURCE_OPEN)}_onSourceEnded(){B.v(this.TAG,"MediaSource onSourceEnded")}_onSourceClose(){B.v(this.TAG,"MediaSource onSourceClose"),this._mediaSource&&this.e!=null&&(this._mediaSource.removeEventListener("sourceopen",this.e.onSourceOpen),this._mediaSource.removeEventListener("sourceended",this.e.onSourceEnded),this._mediaSource.removeEventListener("sourceclose",this.e.onSourceClose))}_hasPendingSegments(){let l=this._pendingSegments;return l.video.length>0||l.audio.length>0}_hasPendingRemoveRanges(){let l=this._pendingRemoveRanges;return l.video.length>0||l.audio.length>0}_onSourceBufferUpdateEnd(){this._requireSetMediaDuration?this._updateMediaSourceDuration():this._hasPendingRemoveRanges()?this._doRemoveRanges():this._hasPendingSegments()?this._doAppendSegments():this._hasPendingEos&&this.endOfStream(),this._emitter.emit(Yt.UPDATE_END)}_onSourceBufferError(l){B.e(this.TAG,`SourceBuffer Error: ${l}`)}}var $t=Mt;const xt={NETWORK_ERROR:"NetworkError",MEDIA_ERROR:"MediaError",OTHER_ERROR:"OtherError"},Ft={NETWORK_EXCEPTION:X.EXCEPTION,NETWORK_STATUS_CODE_INVALID:X.HTTP_STATUS_CODE_INVALID,NETWORK_TIMEOUT:X.CONNECTING_TIMEOUT,NETWORK_UNRECOVERABLE_EARLY_EOF:X.UNRECOVERABLE_EARLY_EOF,MEDIA_MSE_ERROR:"MediaMSEError",MEDIA_FORMAT_ERROR:U.FORMAT_ERROR,MEDIA_FORMAT_UNSUPPORTED:U.FORMAT_UNSUPPORTED,MEDIA_CODEC_UNSUPPORTED:U.CODEC_UNSUPPORTED};class qt{constructor(l,h){if(this.TAG="FlvPlayer",this._type="FlvPlayer",this._emitter=new(se()),this._config=ne(),typeof h=="object"&&Object.assign(this._config,h),l.type.toLowerCase()!=="flv")throw new Ze("FlvPlayer requires an flv MediaDataSource input!");l.isLive===!0&&(this._config.isLive=!0),this.e={onvLoadedMetadata:this._onvLoadedMetadata.bind(this),onvSeeking:this._onvSeeking.bind(this),onvCanPlay:this._onvCanPlay.bind(this),onvStalled:this._onvStalled.bind(this),onvProgress:this._onvProgress.bind(this)},self.performance&&self.performance.now?this._now=self.performance.now.bind(self.performance):this._now=Date.now,this._pendingSeekTime=null,this._requestSetTime=!1,this._seekpointRecord=null,this._progressChecker=null,this._mediaDataSource=l,this._mediaElement=null,this._msectl=null,this._transmuxer=null,this._mseSourceOpened=!1,this._hasPendingLoad=!1,this._receivedCanPlay=!1,this._mediaInfo=null,this._statisticsInfo=null;let f=Re.chrome&&(Re.version.major<50||Re.version.major===50&&Re.version.build<2661);this._alwaysSeekKeyframe=!!(f||Re.msedge||Re.msie),this._alwaysSeekKeyframe&&(this._config.accurateSeek=!1)}destroy(){this._progressChecker!=null&&(window.clearInterval(this._progressChecker),this._progressChecker=null),this._transmuxer&&this.unload(),this._mediaElement&&this.detachMediaElement(),this.e=null,this._mediaDataSource=null,this._emitter.removeAllListeners(),this._emitter=null}on(l,h){l===Fe.MEDIA_INFO?this._mediaInfo!=null&&Promise.resolve().then(()=>{this._emitter.emit(Fe.MEDIA_INFO,this.mediaInfo)}):l===Fe.STATISTICS_INFO&&this._statisticsInfo!=null&&Promise.resolve().then(()=>{this._emitter.emit(Fe.STATISTICS_INFO,this.statisticsInfo)}),this._emitter.addListener(l,h)}off(l,h){this._emitter.removeListener(l,h)}attachMediaElement(l){if(this._mediaElement=l,l.addEventListener("loadedmetadata",this.e.onvLoadedMetadata),l.addEventListener("seeking",this.e.onvSeeking),l.addEventListener("canplay",this.e.onvCanPlay),l.addEventListener("stalled",this.e.onvStalled),l.addEventListener("progress",this.e.onvProgress),this._msectl=new $t(this._config),this._msectl.on(Yt.UPDATE_END,this._onmseUpdateEnd.bind(this)),this._msectl.on(Yt.BUFFER_FULL,this._onmseBufferFull.bind(this)),this._msectl.on(Yt.SOURCE_OPEN,()=>{this._mseSourceOpened=!0,this._hasPendingLoad&&(this._hasPendingLoad=!1,this.load())}),this._msectl.on(Yt.ERROR,h=>{this._emitter.emit(Fe.ERROR,xt.MEDIA_ERROR,Ft.MEDIA_MSE_ERROR,h)}),this._msectl.attachMediaElement(l),this._pendingSeekTime!=null)try{l.currentTime=this._pendingSeekTime,this._pendingSeekTime=null}catch(h){}}detachMediaElement(){this._mediaElement&&(this._msectl.detachMediaElement(),this._mediaElement.removeEventListener("loadedmetadata",this.e.onvLoadedMetadata),this._mediaElement.removeEventListener("seeking",this.e.onvSeeking),this._mediaElement.removeEventListener("canplay",this.e.onvCanPlay),this._mediaElement.removeEventListener("stalled",this.e.onvStalled),this._mediaElement.removeEventListener("progress",this.e.onvProgress),this._mediaElement=null),this._msectl&&(this._msectl.destroy(),this._msectl=null)}load(){if(!this._mediaElement)throw new M("HTMLMediaElement must be attached before load()!");if(this._transmuxer)throw new M("FlvPlayer.load() has been called, please call unload() first!");if(!this._hasPendingLoad){if(this._config.deferLoadAfterSourceOpen&&this._mseSourceOpened===!1){this._hasPendingLoad=!0;return}this._mediaElement.readyState>0&&(this._requestSetTime=!0,this._mediaElement.currentTime=0),this._transmuxer=new jt(this._mediaDataSource,this._config),this._transmuxer.on(oe.INIT_SEGMENT,(l,h)=>{this._msectl.appendInitSegment(h)}),this._transmuxer.on(oe.MEDIA_SEGMENT,(l,h)=>{if(this._msectl.appendMediaSegment(h),this._config.lazyLoad&&!this._config.isLive){let f=this._mediaElement.currentTime;h.info.endDts>=(f+this._config.lazyLoadMaxDuration)*1e3&&this._progressChecker==null&&(B.v(this.TAG,"Maximum buffering duration exceeded, suspend transmuxing task"),this._suspendTransmuxer())}}),this._transmuxer.on(oe.LOADING_COMPLETE,()=>{this._msectl.endOfStream(),this._emitter.emit(Fe.LOADING_COMPLETE)}),this._transmuxer.on(oe.RECOVERED_EARLY_EOF,()=>{this._emitter.emit(Fe.RECOVERED_EARLY_EOF)}),this._transmuxer.on(oe.IO_ERROR,(l,h)=>{this._emitter.emit(Fe.ERROR,xt.NETWORK_ERROR,l,h)}),this._transmuxer.on(oe.DEMUX_ERROR,(l,h)=>{this._emitter.emit(Fe.ERROR,xt.MEDIA_ERROR,l,{code:-1,msg:h})}),this._transmuxer.on(oe.MEDIA_INFO,l=>{this._mediaInfo=l,this._emitter.emit(Fe.MEDIA_INFO,Object.assign({},l))}),this._transmuxer.on(oe.METADATA_ARRIVED,l=>{this._emitter.emit(Fe.METADATA_ARRIVED,l)}),this._transmuxer.on(oe.SCRIPTDATA_ARRIVED,l=>{this._emitter.emit(Fe.SCRIPTDATA_ARRIVED,l)}),this._transmuxer.on(oe.STATISTICS_INFO,l=>{this._statisticsInfo=this._fillStatisticsInfo(l),this._emitter.emit(Fe.STATISTICS_INFO,Object.assign({},this._statisticsInfo))}),this._transmuxer.on(oe.RECOMMEND_SEEKPOINT,l=>{this._mediaElement&&!this._config.accurateSeek&&(this._requestSetTime=!0,this._mediaElement.currentTime=l/1e3)}),this._transmuxer.open()}}unload(){this._mediaElement&&this._mediaElement.pause(),this._msectl&&this._msectl.seek(0),this._transmuxer&&(this._transmuxer.close(),this._transmuxer.destroy(),this._transmuxer=null)}play(){return this._mediaElement.play()}pause(){this._mediaElement.pause()}get type(){return this._type}get buffered(){return this._mediaElement.buffered}get duration(){return this._mediaElement.duration}get volume(){return this._mediaElement.volume}set volume(l){this._mediaElement.volume=l}get muted(){return this._mediaElement.muted}set muted(l){this._mediaElement.muted=l}get currentTime(){return this._mediaElement?this._mediaElement.currentTime:0}set currentTime(l){this._mediaElement?this._internalSeek(l):this._pendingSeekTime=l}get mediaInfo(){return Object.assign({},this._mediaInfo)}get statisticsInfo(){return this._statisticsInfo==null&&(this._statisticsInfo={}),this._statisticsInfo=this._fillStatisticsInfo(this._statisticsInfo),Object.assign({},this._statisticsInfo)}_fillStatisticsInfo(l){if(l.playerType=this._type,!(this._mediaElement instanceof HTMLVideoElement))return l;let h=!0,f=0,d=0;if(this._mediaElement.getVideoPlaybackQuality){let p=this._mediaElement.getVideoPlaybackQuality();f=p.totalVideoFrames,d=p.droppedVideoFrames}else this._mediaElement.webkitDecodedFrameCount!=null?(f=this._mediaElement.webkitDecodedFrameCount,d=this._mediaElement.webkitDroppedFrameCount):h=!1;return h&&(l.decodedFrames=f,l.droppedFrames=d),l}_onmseUpdateEnd(){if(!this._config.lazyLoad||this._config.isLive)return;let l=this._mediaElement.buffered,h=this._mediaElement.currentTime,f=0,d=0;for(let p=0;p=h+this._config.lazyLoadMaxDuration&&this._progressChecker==null&&(B.v(this.TAG,"Maximum buffering duration exceeded, suspend transmuxing task"),this._suspendTransmuxer())}_onmseBufferFull(){B.v(this.TAG,"MSE SourceBuffer is full, suspend transmuxing task"),this._progressChecker==null&&this._suspendTransmuxer()}_suspendTransmuxer(){this._transmuxer&&(this._transmuxer.pause(),this._progressChecker==null&&(this._progressChecker=window.setInterval(this._checkProgressAndResume.bind(this),1e3)))}_checkProgressAndResume(){let l=this._mediaElement.currentTime,h=this._mediaElement.buffered,f=!1;for(let d=0;d=p&&l=b-this._config.lazyLoadRecoverDuration&&(f=!0);break}}f&&(window.clearInterval(this._progressChecker),this._progressChecker=null,f&&(B.v(this.TAG,"Continue loading from paused position"),this._transmuxer.resume()))}_isTimepointBuffered(l){let h=this._mediaElement.buffered;for(let f=0;f=d&&l0){let p=this._mediaElement.buffered.start(0);(p<1&&l0&&h.currentTime0){let d=f.start(0);if(d<1&&h{this._emitter.emit(Fe.MEDIA_INFO,this.mediaInfo)}):l===Fe.STATISTICS_INFO&&this._mediaElement!=null&&this._mediaElement.readyState!==0&&Promise.resolve().then(()=>{this._emitter.emit(Fe.STATISTICS_INFO,this.statisticsInfo)}),this._emitter.addListener(l,h)}off(l,h){this._emitter.removeListener(l,h)}attachMediaElement(l){if(this._mediaElement=l,l.addEventListener("loadedmetadata",this.e.onvLoadedMetadata),this._pendingSeekTime!=null)try{l.currentTime=this._pendingSeekTime,this._pendingSeekTime=null}catch(h){}}detachMediaElement(){this._mediaElement&&(this._mediaElement.src="",this._mediaElement.removeAttribute("src"),this._mediaElement.removeEventListener("loadedmetadata",this.e.onvLoadedMetadata),this._mediaElement=null),this._statisticsReporter!=null&&(window.clearInterval(this._statisticsReporter),this._statisticsReporter=null)}load(){if(!this._mediaElement)throw new M("HTMLMediaElement must be attached before load()!");this._mediaElement.src=this._mediaDataSource.url,this._mediaElement.readyState>0&&(this._mediaElement.currentTime=0),this._mediaElement.preload="auto",this._mediaElement.load(),this._statisticsReporter=window.setInterval(this._reportStatisticsInfo.bind(this),this._config.statisticsInfoReportInterval)}unload(){this._mediaElement&&(this._mediaElement.src="",this._mediaElement.removeAttribute("src")),this._statisticsReporter!=null&&(window.clearInterval(this._statisticsReporter),this._statisticsReporter=null)}play(){return this._mediaElement.play()}pause(){this._mediaElement.pause()}get type(){return this._type}get buffered(){return this._mediaElement.buffered}get duration(){return this._mediaElement.duration}get volume(){return this._mediaElement.volume}set volume(l){this._mediaElement.volume=l}get muted(){return this._mediaElement.muted}set muted(l){this._mediaElement.muted=l}get currentTime(){return this._mediaElement?this._mediaElement.currentTime:0}set currentTime(l){this._mediaElement?this._mediaElement.currentTime=l:this._pendingSeekTime=l}get mediaInfo(){let h={mimeType:(this._mediaElement instanceof HTMLAudioElement?"audio/":"video/")+this._mediaDataSource.type};return this._mediaElement&&(h.duration=Math.floor(this._mediaElement.duration*1e3),this._mediaElement instanceof HTMLVideoElement&&(h.width=this._mediaElement.videoWidth,h.height=this._mediaElement.videoHeight)),h}get statisticsInfo(){let l={playerType:this._type,url:this._mediaDataSource.url};if(!(this._mediaElement instanceof HTMLVideoElement))return l;let h=!0,f=0,d=0;if(this._mediaElement.getVideoPlaybackQuality){let p=this._mediaElement.getVideoPlaybackQuality();f=p.totalVideoFrames,d=p.droppedVideoFrames}else this._mediaElement.webkitDecodedFrameCount!=null?(f=this._mediaElement.webkitDecodedFrameCount,d=this._mediaElement.webkitDroppedFrameCount):h=!1;return h&&(l.decodedFrames=f,l.droppedFrames=d),l}_onvLoadedMetadata(l){this._pendingSeekTime!=null&&(this._mediaElement.currentTime=this._pendingSeekTime,this._pendingSeekTime=null),this._emitter.emit(Fe.MEDIA_INFO,this.mediaInfo)}_reportStatisticsInfo(){this._emitter.emit(Fe.STATISTICS_INFO,this.statisticsInfo)}}var hn=Kt;O.install();function en(Xe,l){let h=Xe;if(h==null||typeof h!="object")throw new Ze("MediaDataSource must be an javascript object!");if(!h.hasOwnProperty("type"))throw new Ze("MediaDataSource must has type field to indicate video file type!");switch(h.type){case"flv":return new Bt(h,l);default:return new hn(h,l)}}function xn(){return xe.supportMSEH264Playback()}function an(){return xe.getFeatureList()}let mn={};mn.createPlayer=en,mn.isSupported=xn,mn.getFeatureList=an,mn.BaseLoader=z,mn.LoaderStatus=g,mn.LoaderErrors=X,mn.Events=Fe,mn.ErrorTypes=xt,mn.ErrorDetails=Ft,mn.FlvPlayer=Bt,mn.NativePlayer=hn,mn.LoggingControl=le,Object.defineProperty(mn,"version",{enumerable:!0,get:function(){return"__VERSION__"}});var Ot=mn},36785:function(Ht,lt,u){"use strict";u.d(lt,{o2:function(){return R},yT:function(){return B}});var v=u(19127),O=u(33166);const H=O.i.map(ee=>`${ee}-inverse`),se=["success","processing","error","default","warning"];function R(ee){return(arguments.length>1&&arguments[1]!==void 0?arguments[1]:!0)?[].concat((0,v.Z)(H),(0,v.Z)(O.i)).includes(ee):O.i.includes(ee)}function B(ee){return se.includes(ee)}},56762:function(Ht,lt,u){"use strict";u.d(lt,{Z:function(){return O}});var v=u(59301);function O(){const[,H]=v.useReducer(se=>se+1,0);return H}},79676:function(Ht,lt,u){"use strict";u.d(lt,{Z:function(){return B}});var v=u(19447);function O(ee,ce,fe,M){if(M===!1)return{adjustX:!1,adjustY:!1};const Ze=M&&typeof M=="object"?M:{},P={};switch(ee){case"top":case"bottom":P.shiftX=ce.dropdownArrowOffset*2+fe;break;case"left":case"right":P.shiftY=ce.dropdownArrowOffsetVertical*2+fe;break}const g=Object.assign(Object.assign({},P),Ze);return g.shiftX||(g.adjustX=!0),g.shiftY||(g.adjustY=!0),g}const H={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"]}},se={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"]}},R=new Set(["topLeft","topRight","bottomLeft","bottomRight","leftTop","leftBottom","rightTop","rightBottom"]);function B(ee){const{arrowWidth:ce,autoAdjustOverflow:fe,arrowPointAtCenter:M,offset:Ze,borderRadius:P,visibleFirst:g}=ee,X=ce/2,z={};return Object.keys(H).forEach(Ce=>{const st=M&&se[Ce]||H[Ce],Re=Object.assign(Object.assign({},st),{offset:[0,0]});switch(z[Ce]=Re,R.has(Ce)&&(Re.autoArrow=!1),Ce){case"top":case"topLeft":case"topRight":Re.offset[1]=-X-Ze;break;case"bottom":case"bottomLeft":case"bottomRight":Re.offset[1]=X+Ze;break;case"left":case"leftTop":case"leftBottom":Re.offset[0]=-X-Ze;break;case"right":case"rightTop":case"rightBottom":Re.offset[0]=X+Ze;break}const de=(0,v.fS)({contentRadius:P,limitVerticalRadius:!0});if(M)switch(Ce){case"topLeft":case"bottomLeft":Re.offset[0]=-de.dropdownArrowOffset-X;break;case"topRight":case"bottomRight":Re.offset[0]=de.dropdownArrowOffset+X;break;case"leftTop":case"rightTop":Re.offset[1]=-de.dropdownArrowOffset-X;break;case"leftBottom":case"rightBottom":Re.offset[1]=de.dropdownArrowOffset+X;break}Re.overflow=O(Ce,de,ce,fe),g&&(Re.htmlRegion="visibleFirst")}),z}},19080:function(Ht,lt,u){"use strict";u.d(lt,{F:function(){return R},Z:function(){return se}});var v=u(92310),O=u.n(v);const H=null;function se(B,ee,ce){return O()({[`${B}-status-success`]:ee==="success",[`${B}-status-warning`]:ee==="warning",[`${B}-status-error`]:ee==="error",[`${B}-status-validating`]:ee==="validating",[`${B}-has-feedback`]:ce})}const R=(B,ee)=>ee||B},18889:function(Ht,lt,u){"use strict";u.d(lt,{Z:function(){return me}});var v=u(92310),O=u.n(v),H=u(2738),se=u(59301),R=u(36355),B=u(19716),ee=u(61621),ce=u(99313),fe=function(T,ve){var Ee={};for(var ne in T)Object.prototype.hasOwnProperty.call(T,ne)&&ve.indexOf(ne)<0&&(Ee[ne]=T[ne]);if(T!=null&&typeof Object.getOwnPropertySymbols=="function")for(var Oe=0,ne=Object.getOwnPropertySymbols(T);Oe{var{prefixCls:ve,className:Ee,hoverable:ne=!0}=T,Oe=fe(T,["prefixCls","className","hoverable"]);const{getPrefixCls:xe}=se.useContext(R.E_),te=xe("card",ve),Fe=O()(`${te}-grid`,Ee,{[`${te}-grid-hoverable`]:ne});return se.createElement("div",Object.assign({},Oe,{className:Fe}))},P=u(17313),g=u(83116),X=u(37613);const z=T=>{const{antCls:ve,componentCls:Ee,headerHeight:ne,cardPaddingBase:Oe,tabsMarginBottom:xe}=T;return Object.assign(Object.assign({display:"flex",justifyContent:"center",flexDirection:"column",minHeight:ne,marginBottom:-1,padding:`0 ${Oe}px`,color:T.colorTextHeading,fontWeight:T.fontWeightStrong,fontSize:T.headerFontSize,background:T.headerBg,borderBottom:`${T.lineWidth}px ${T.lineType} ${T.colorBorderSecondary}`,borderRadius:`${T.borderRadiusLG}px ${T.borderRadiusLG}px 0 0`},(0,P.dF)()),{"&-wrapper":{width:"100%",display:"flex",alignItems:"center"},"&-title":Object.assign(Object.assign({display:"inline-block",flex:1},P.vS),{[` > ${Ee}-typography, > ${Ee}-typography-edit-content `]:{insetInlineStart:0,marginTop:0,marginBottom:0}}),[`${ve}-tabs-top`]:{clear:"both",marginBottom:xe,color:T.colorText,fontWeight:"normal",fontSize:T.fontSize,"&-bar":{borderBottom:`${T.lineWidth}px ${T.lineType} ${T.colorBorderSecondary}`}}})},Ce=T=>{const{cardPaddingBase:ve,colorBorderSecondary:Ee,cardShadow:ne,lineWidth:Oe}=T;return{width:"33.33%",padding:ve,border:0,borderRadius:0,boxShadow:` ${Oe}px 0 0 0 ${Ee}, 0 ${Oe}px 0 0 ${Ee}, ${Oe}px ${Oe}px 0 0 ${Ee}, ${Oe}px 0 0 0 ${Ee} inset, 0 ${Oe}px 0 0 ${Ee} inset; `,transition:`all ${T.motionDurationMid}`,"&-hoverable:hover":{position:"relative",zIndex:1,boxShadow:ne}}},st=T=>{const{componentCls:ve,iconCls:Ee,actionsLiMargin:ne,cardActionsIconSize:Oe,colorBorderSecondary:xe,actionsBg:te}=T;return Object.assign(Object.assign({margin:0,padding:0,listStyle:"none",background:te,borderTop:`${T.lineWidth}px ${T.lineType} ${xe}`,display:"flex",borderRadius:`0 0 ${T.borderRadiusLG}px ${T.borderRadiusLG}px `},(0,P.dF)()),{"& > li":{margin:ne,color:T.colorTextDescription,textAlign:"center","> span":{position:"relative",display:"block",minWidth:T.cardActionsIconSize*2,fontSize:T.fontSize,lineHeight:T.lineHeight,cursor:"pointer","&:hover":{color:T.colorPrimary,transition:`color ${T.motionDurationMid}`},[`a:not(${ve}-btn), > ${Ee}`]:{display:"inline-block",width:"100%",color:T.colorTextDescription,lineHeight:`${T.fontSize*T.lineHeight}px`,transition:`color ${T.motionDurationMid}`,"&:hover":{color:T.colorPrimary}},[`> ${Ee}`]:{fontSize:Oe,lineHeight:`${Oe*T.lineHeight}px`}},"&:not(:last-child)":{borderInlineEnd:`${T.lineWidth}px ${T.lineType} ${xe}`}}})},Re=T=>Object.assign(Object.assign({margin:`-${T.marginXXS}px 0`,display:"flex"},(0,P.dF)()),{"&-avatar":{paddingInlineEnd:T.padding},"&-detail":{overflow:"hidden",flex:1,"> div:not(:last-child)":{marginBottom:T.marginXS}},"&-title":Object.assign({color:T.colorTextHeading,fontWeight:T.fontWeightStrong,fontSize:T.fontSizeLG},P.vS),"&-description":{color:T.colorTextDescription}}),de=T=>{const{componentCls:ve,cardPaddingBase:Ee,colorFillAlter:ne}=T;return{[`${ve}-head`]:{padding:`0 ${Ee}px`,background:ne,"&-title":{fontSize:T.fontSize}},[`${ve}-body`]:{padding:`${T.padding}px ${Ee}px`}}},ae=T=>{const{componentCls:ve}=T;return{overflow:"hidden",[`${ve}-body`]:{userSelect:"none"}}},ue=T=>{const{antCls:ve,componentCls:Ee,cardShadow:ne,cardHeadPadding:Oe,colorBorderSecondary:xe,boxShadowTertiary:te,cardPaddingBase:Fe,extraColor:Ae}=T;return{[Ee]:Object.assign(Object.assign({},(0,P.Wf)(T)),{position:"relative",background:T.colorBgContainer,borderRadius:T.borderRadiusLG,[`&:not(${Ee}-bordered)`]:{boxShadow:te},[`${Ee}-head`]:z(T),[`${Ee}-extra`]:{marginInlineStart:"auto",color:Ae,fontWeight:"normal",fontSize:T.fontSize},[`${Ee}-body`]:Object.assign({padding:Fe,borderRadius:` 0 0 ${T.borderRadiusLG}px ${T.borderRadiusLG}px`},(0,P.dF)()),[`${Ee}-grid`]:Ce(T),[`${Ee}-cover`]:{"> *":{display:"block",width:"100%"},[`img, img + ${ve}-image-mask`]:{borderRadius:`${T.borderRadiusLG}px ${T.borderRadiusLG}px 0 0`}},[`${Ee}-actions`]:st(T),[`${Ee}-meta`]:Re(T)}),[`${Ee}-bordered`]:{border:`${T.lineWidth}px ${T.lineType} ${xe}`,[`${Ee}-cover`]:{marginTop:-1,marginInlineStart:-1,marginInlineEnd:-1}},[`${Ee}-hoverable`]:{cursor:"pointer",transition:`box-shadow ${T.motionDurationMid}, border-color ${T.motionDurationMid}`,"&:hover":{borderColor:"transparent",boxShadow:ne}},[`${Ee}-contain-grid`]:{[`${Ee}-body`]:{display:"flex",flexWrap:"wrap"},[`&:not(${Ee}-loading) ${Ee}-body`]:{marginBlockStart:-T.lineWidth,marginInlineStart:-T.lineWidth,padding:0}},[`${Ee}-contain-tabs`]:{[`> ${Ee}-head`]:{[`${Ee}-head-title, ${Ee}-extra`]:{paddingTop:Oe}}},[`${Ee}-type-inner`]:de(T),[`${Ee}-loading`]:ae(T),[`${Ee}-rtl`]:{direction:"rtl"}}},A=T=>{const{componentCls:ve,cardPaddingSM:Ee,headerHeightSM:ne,headerFontSizeSM:Oe}=T;return{[`${ve}-small`]:{[`> ${ve}-head`]:{minHeight:ne,padding:`0 ${Ee}px`,fontSize:Oe,[`> ${ve}-head-wrapper`]:{[`> ${ve}-extra`]:{fontSize:T.fontSize}}},[`> ${ve}-body`]:{padding:Ee}},[`${ve}-small${ve}-contain-tabs`]:{[`> ${ve}-head`]:{[`${ve}-head-title, ${ve}-extra`]:{minHeight:ne,paddingTop:0,display:"flex",alignItems:"center"}}}}};var w=(0,g.Z)("Card",T=>{const ve=(0,X.TS)(T,{cardShadow:T.boxShadowCard,cardHeadPadding:T.padding,cardPaddingBase:T.paddingLG,cardActionsIconSize:T.fontSize,cardPaddingSM:12});return[ue(ve),A(ve)]},T=>({headerBg:"transparent",headerFontSize:T.fontSizeLG,headerFontSizeSM:T.fontSize,headerHeight:T.fontSizeLG*T.lineHeightLG+T.padding*2,headerHeightSM:T.fontSize*T.lineHeight+T.paddingXS*2,actionsBg:T.colorBgContainer,actionsLiMargin:`${T.paddingSM}px 0`,tabsMarginBottom:-T.padding-T.lineWidth,extraColor:T.colorText})),j=function(T,ve){var Ee={};for(var ne in T)Object.prototype.hasOwnProperty.call(T,ne)&&ve.indexOf(ne)<0&&(Ee[ne]=T[ne]);if(T!=null&&typeof Object.getOwnPropertySymbols=="function")for(var Oe=0,ne=Object.getOwnPropertySymbols(T);Oese.createElement("li",{style:{width:`${100/T.length}%`},key:`action-${Ee}`},se.createElement("span",null,ve)))}var Te=se.forwardRef((T,ve)=>{const{prefixCls:Ee,className:ne,rootClassName:Oe,style:xe,extra:te,headStyle:Fe={},bodyStyle:Ae={},title:le,loading:$e,bordered:nt=!0,size:St,type:Rt,cover:Et,actions:vt,tabList:It,children:gt,activeTabKey:qe,defaultActiveTabKey:yt,tabBarExtraContent:V,hoverable:Z,tabProps:L={}}=T,U=j(T,["prefixCls","className","rootClassName","style","extra","headStyle","bodyStyle","title","loading","bordered","size","type","cover","actions","tabList","children","activeTabKey","defaultActiveTabKey","tabBarExtraContent","hoverable","tabProps"]),{getPrefixCls:J,direction:Se,card:x}=se.useContext(R.E_),C=_t=>{var jt;(jt=T.onTabChange)===null||jt===void 0||jt.call(T,_t)},Q=se.useMemo(()=>{let _t=!1;return se.Children.forEach(gt,jt=>{jt&&jt.type&&jt.type===Ze&&(_t=!0)}),_t},[gt]),I=J("card",Ee),[F,pe]=w(I),je=se.createElement(ee.Z,{loading:!0,active:!0,paragraph:{rows:4},title:!1},gt),Be=qe!==void 0,it=Object.assign(Object.assign({},L),{[Be?"activeKey":"defaultActiveKey"]:Be?qe:yt,tabBarExtraContent:V});let _e;const Ye=(0,B.Z)(St),re=!Ye||Ye==="default"?"large":Ye,Pe=It?se.createElement(ce.default,Object.assign({size:re},it,{className:`${I}-head-tabs`,onChange:C,items:It.map(_t=>{var{tab:jt}=_t,Zt=j(_t,["tab"]);return Object.assign({label:jt},Zt)})})):null;(le||te||Pe)&&(_e=se.createElement("div",{className:`${I}-head`,style:Fe},se.createElement("div",{className:`${I}-head-wrapper`},le&&se.createElement("div",{className:`${I}-head-title`},le),te&&se.createElement("div",{className:`${I}-extra`},te)),Pe));const et=Et?se.createElement("div",{className:`${I}-cover`},Et):null,oe=se.createElement("div",{className:`${I}-body`,style:Ae},$e?je:gt),dt=vt&&vt.length?se.createElement("ul",{className:`${I}-actions`},N(vt)):null,pt=(0,H.Z)(U,["onTabChange"]),ft=O()(I,x==null?void 0:x.className,{[`${I}-loading`]:$e,[`${I}-bordered`]:nt,[`${I}-hoverable`]:Z,[`${I}-contain-grid`]:Q,[`${I}-contain-tabs`]:It&&It.length,[`${I}-${Ye}`]:Ye,[`${I}-type-${Rt}`]:!!Rt,[`${I}-rtl`]:Se==="rtl"},ne,Oe,pe),ot=Object.assign(Object.assign({},x==null?void 0:x.style),xe);return F(se.createElement("div",Object.assign({ref:ve},pt,{className:ft,style:ot}),_e,et,oe,dt))}),ze=function(T,ve){var Ee={};for(var ne in T)Object.prototype.hasOwnProperty.call(T,ne)&&ve.indexOf(ne)<0&&(Ee[ne]=T[ne]);if(T!=null&&typeof Object.getOwnPropertySymbols=="function")for(var Oe=0,ne=Object.getOwnPropertySymbols(T);Oe{const{prefixCls:ve,className:Ee,avatar:ne,title:Oe,description:xe}=T,te=ze(T,["prefixCls","className","avatar","title","description"]),{getPrefixCls:Fe}=se.useContext(R.E_),Ae=Fe("card",ve),le=O()(`${Ae}-meta`,Ee),$e=ne?se.createElement("div",{className:`${Ae}-meta-avatar`},ne):null,nt=Oe?se.createElement("div",{className:`${Ae}-meta-title`},Oe):null,St=xe?se.createElement("div",{className:`${Ae}-meta-description`},xe):null,Rt=nt||St?se.createElement("div",{className:`${Ae}-meta-detail`},nt,St):null;return se.createElement("div",Object.assign({},te,{className:le}),$e,Rt)};const _=Te;_.Grid=Ze,_.Meta=he;var me=_},24905:function(Ht,lt,u){"use strict";u.d(lt,{default:function(){return j}});var v=u(92310),O=u.n(v),H=u(5630),se=u(59301),R=u(36355),B=u(1684),ee=u(32441),fe=se.createContext(null),M=u(98447),Ze=u(14088),P=u(4572),g=function(N,De){var Te={};for(var ze in N)Object.prototype.hasOwnProperty.call(N,ze)&&De.indexOf(ze)<0&&(Te[ze]=N[ze]);if(N!=null&&typeof Object.getOwnPropertySymbols=="function")for(var Me=0,ze=Object.getOwnPropertySymbols(N);Me{var Te;const{prefixCls:ze,className:Me,rootClassName:he,children:_,indeterminate:me=!1,style:T,onMouseEnter:ve,onMouseLeave:Ee,skipGroup:ne=!1,disabled:Oe}=N,xe=g(N,["prefixCls","className","rootClassName","children","indeterminate","style","onMouseEnter","onMouseLeave","skipGroup","disabled"]),{getPrefixCls:te,direction:Fe,checkbox:Ae}=se.useContext(R.E_),le=se.useContext(fe),{isFormItemInput:$e}=se.useContext(ee.aM),nt=se.useContext(B.Z),St=(Te=(le==null?void 0:le.disabled)||Oe)!==null&&Te!==void 0?Te:nt,Rt=se.useRef(xe.value);se.useEffect(()=>{le==null||le.registerValue(xe.value)},[]),se.useEffect(()=>{if(!ne)return xe.value!==Rt.current&&(le==null||le.cancelValue(Rt.current),le==null||le.registerValue(xe.value),Rt.current=xe.value),()=>le==null?void 0:le.cancelValue(xe.value)},[xe.value]);const Et=te("checkbox",ze),[vt,It]=(0,M.ZP)(Et),gt=Object.assign({},xe);le&&!ne&&(gt.onChange=function(){xe.onChange&&xe.onChange.apply(xe,arguments),le.toggleOption&&le.toggleOption({label:_,value:xe.value})},gt.name=le.name,gt.checked=le.value.includes(xe.value));const qe=O()(`${Et}-wrapper`,{[`${Et}-rtl`]:Fe==="rtl",[`${Et}-wrapper-checked`]:gt.checked,[`${Et}-wrapper-disabled`]:St,[`${Et}-wrapper-in-form-item`]:$e},Ae==null?void 0:Ae.className,Me,he,It),yt=O()({[`${Et}-indeterminate`]:me},P.A,It),V=me?"mixed":void 0;return vt(se.createElement(Ze.Z,{component:"Checkbox",disabled:St},se.createElement("label",{className:qe,style:Object.assign(Object.assign({},Ae==null?void 0:Ae.style),T),onMouseEnter:ve,onMouseLeave:Ee},se.createElement(H.Z,Object.assign({"aria-checked":V},gt,{prefixCls:Et,className:yt,disabled:St,ref:De})),_!==void 0&&se.createElement("span",null,_))))};var Ce=se.forwardRef(X),st=u(19127),Re=u(2738),de=function(N,De){var Te={};for(var ze in N)Object.prototype.hasOwnProperty.call(N,ze)&&De.indexOf(ze)<0&&(Te[ze]=N[ze]);if(N!=null&&typeof Object.getOwnPropertySymbols=="function")for(var Me=0,ze=Object.getOwnPropertySymbols(N);Me{const{defaultValue:Te,children:ze,options:Me=[],prefixCls:he,className:_,rootClassName:me,style:T,onChange:ve}=N,Ee=de(N,["defaultValue","children","options","prefixCls","className","rootClassName","style","onChange"]),{getPrefixCls:ne,direction:Oe}=se.useContext(R.E_),[xe,te]=se.useState(Ee.value||Te||[]),[Fe,Ae]=se.useState([]);se.useEffect(()=>{"value"in Ee&&te(Ee.value||[])},[Ee.value]);const le=se.useMemo(()=>Me.map(Z=>typeof Z=="string"||typeof Z=="number"?{label:Z,value:Z}:Z),[Me]),$e=Z=>{Ae(L=>L.filter(U=>U!==Z))},nt=Z=>{Ae(L=>[].concat((0,st.Z)(L),[Z]))},St=Z=>{const L=xe.indexOf(Z.value),U=(0,st.Z)(xe);L===-1?U.push(Z.value):U.splice(L,1),"value"in Ee||te(U),ve==null||ve(U.filter(J=>Fe.includes(J)).sort((J,Se)=>{const x=le.findIndex(Q=>Q.value===J),C=le.findIndex(Q=>Q.value===Se);return x-C}))},Rt=ne("checkbox",he),Et=`${Rt}-group`,[vt,It]=(0,M.ZP)(Rt),gt=(0,Re.Z)(Ee,["value","disabled"]),qe=Me.length?le.map(Z=>se.createElement(Ce,{prefixCls:Rt,key:Z.value.toString(),disabled:"disabled"in Z?Z.disabled:Ee.disabled,value:Z.value,checked:xe.includes(Z.value),onChange:Z.onChange,className:`${Et}-item`,style:Z.style,title:Z.title},Z.label)):ze,yt={toggleOption:St,value:xe,disabled:Ee.disabled,name:Ee.name,registerValue:nt,cancelValue:$e},V=O()(Et,{[`${Et}-rtl`]:Oe==="rtl"},_,me,It);return vt(se.createElement("div",Object.assign({className:V,style:T},gt,{ref:De}),se.createElement(fe.Provider,{value:yt},qe)))},ue=se.forwardRef(ae);var A=se.memo(ue);const w=Ce;w.Group=A,w.__ANT_CHECKBOX=!0;var j=w},98447:function(Ht,lt,u){"use strict";u.d(lt,{C2:function(){return R}});var v=u(17313),O=u(37613),H=u(83116);const se=B=>{const{checkboxCls:ee}=B,ce=`${ee}-wrapper`;return[{[`${ee}-group`]:Object.assign(Object.assign({},(0,v.Wf)(B)),{display:"inline-flex",flexWrap:"wrap",columnGap:B.marginXS,[`> ${B.antCls}-row`]:{flex:1}}),[ce]:Object.assign(Object.assign({},(0,v.Wf)(B)),{display:"inline-flex",alignItems:"baseline",cursor:"pointer","&:after":{display:"inline-block",width:0,overflow:"hidden",content:"'\\a0'"},[`& + ${ce}`]:{marginInlineStart:0},[`&${ce}-in-form-item`]:{'input[type="checkbox"]':{width:14,height:14}}}),[ee]:Object.assign(Object.assign({},(0,v.Wf)(B)),{position:"relative",whiteSpace:"nowrap",lineHeight:1,cursor:"pointer",borderRadius:B.borderRadiusSM,alignSelf:"center",[`${ee}-input`]:{position:"absolute",inset:0,zIndex:1,cursor:"pointer",opacity:0,margin:0,[`&:focus-visible + ${ee}-inner`]:Object.assign({},(0,v.oN)(B))},[`${ee}-inner`]:{boxSizing:"border-box",position:"relative",top:0,insetInlineStart:0,display:"block",width:B.checkboxSize,height:B.checkboxSize,direction:"ltr",backgroundColor:B.colorBgContainer,border:`${B.lineWidth}px ${B.lineType} ${B.colorBorder}`,borderRadius:B.borderRadiusSM,borderCollapse:"separate",transition:`all ${B.motionDurationSlow}`,"&:after":{boxSizing:"border-box",position:"absolute",top:"50%",insetInlineStart:"21.5%",display:"table",width:B.checkboxSize/14*5,height:B.checkboxSize/14*8,border:`${B.lineWidthBold}px solid ${B.colorWhite}`,borderTop:0,borderInlineStart:0,transform:"rotate(45deg) scale(0) translate(-50%,-50%)",opacity:0,content:'""',transition:`all ${B.motionDurationFast} ${B.motionEaseInBack}, opacity ${B.motionDurationFast}`}},"& + span":{paddingInlineStart:B.paddingXS,paddingInlineEnd:B.paddingXS}})},{[` ${ce}:not(${ce}-disabled), ${ee}:not(${ee}-disabled) `]:{[`&:hover ${ee}-inner`]:{borderColor:B.colorPrimary}},[`${ce}:not(${ce}-disabled)`]:{[`&:hover ${ee}-checked:not(${ee}-disabled) ${ee}-inner`]:{backgroundColor:B.colorPrimaryHover,borderColor:"transparent"},[`&:hover ${ee}-checked:not(${ee}-disabled):after`]:{borderColor:B.colorPrimaryHover}}},{[`${ee}-checked`]:{[`${ee}-inner`]:{backgroundColor:B.colorPrimary,borderColor:B.colorPrimary,"&:after":{opacity:1,transform:"rotate(45deg) scale(1) translate(-50%,-50%)",transition:`all ${B.motionDurationMid} ${B.motionEaseOutBack} ${B.motionDurationFast}`}}},[` ${ce}-checked:not(${ce}-disabled), ${ee}-checked:not(${ee}-disabled) `]:{[`&:hover ${ee}-inner`]:{backgroundColor:B.colorPrimaryHover,borderColor:"transparent"}}},{[ee]:{"&-indeterminate":{[`${ee}-inner`]:{backgroundColor:B.colorBgContainer,borderColor:B.colorBorder,"&:after":{top:"50%",insetInlineStart:"50%",width:B.fontSizeLG/2,height:B.fontSizeLG/2,backgroundColor:B.colorPrimary,border:0,transform:"translate(-50%, -50%) scale(1)",opacity:1,content:'""'}}}}},{[`${ce}-disabled`]:{cursor:"not-allowed"},[`${ee}-disabled`]:{[`&, ${ee}-input`]:{cursor:"not-allowed",pointerEvents:"none"},[`${ee}-inner`]:{background:B.colorBgContainerDisabled,borderColor:B.colorBorder,"&:after":{borderColor:B.colorTextDisabled}},"&:after":{display:"none"},"& + span":{color:B.colorTextDisabled},[`&${ee}-indeterminate ${ee}-inner::after`]:{background:B.colorTextDisabled}}}]};function R(B,ee){const ce=(0,O.TS)(ee,{checkboxCls:`.${B}`,checkboxSize:ee.controlInteractiveSize});return[se(ce)]}lt.ZP=(0,H.Z)("Checkbox",(B,ee)=>{let{prefixCls:ce}=ee;return[R(ce,B)]})},93891:function(Ht,lt,u){"use strict";var v=u(59301),O=u(36355),H=u(64165);const se=R=>{const{componentName:B}=R,{getPrefixCls:ee}=(0,v.useContext)(O.E_),ce=ee("empty");switch(B){case"Table":case"List":return v.createElement(H.Z,{image:H.Z.PRESENTED_IMAGE_SIMPLE});case"Select":case"TreeSelect":case"Cascader":case"Transfer":case"Mentions":return v.createElement(H.Z,{image:H.Z.PRESENTED_IMAGE_SIMPLE,className:`${ce}-small`});default:return v.createElement(H.Z,null)}};lt.Z=se},28103:function(Ht,lt,u){"use strict";u.d(lt,{Z:function(){return P}});var v=u(92310),O=u.n(v),H=u(59301),se=u(36355),R=u(17313),B=u(83116),ee=u(37613);const ce=g=>{const{componentCls:X,sizePaddingEdgeHorizontal:z,colorSplit:Ce,lineWidth:st,textPaddingInline:Re,orientationMargin:de,verticalMarginInline:ae}=g;return{[X]:Object.assign(Object.assign({},(0,R.Wf)(g)),{borderBlockStart:`${st}px solid ${Ce}`,"&-vertical":{position:"relative",top:"-0.06em",display:"inline-block",height:"0.9em",marginInline:ae,marginBlock:0,verticalAlign:"middle",borderTop:0,borderInlineStart:`${st}px solid ${Ce}`},"&-horizontal":{display:"flex",clear:"both",width:"100%",minWidth:"100%",margin:`${g.dividerHorizontalGutterMargin}px 0`},[`&-horizontal${X}-with-text`]:{display:"flex",alignItems:"center",margin:`${g.dividerHorizontalWithTextGutterMargin}px 0`,color:g.colorTextHeading,fontWeight:500,fontSize:g.fontSizeLG,whiteSpace:"nowrap",textAlign:"center",borderBlockStart:`0 ${Ce}`,"&::before, &::after":{position:"relative",width:"50%",borderBlockStart:`${st}px solid transparent`,borderBlockStartColor:"inherit",borderBlockEnd:0,transform:"translateY(50%)",content:"''"}},[`&-horizontal${X}-with-text-left`]:{"&::before":{width:`${de*100}%`},"&::after":{width:`${100-de*100}%`}},[`&-horizontal${X}-with-text-right`]:{"&::before":{width:`${100-de*100}%`},"&::after":{width:`${de*100}%`}},[`${X}-inner-text`]:{display:"inline-block",paddingBlock:0,paddingInline:Re},"&-dashed":{background:"none",borderColor:Ce,borderStyle:"dashed",borderWidth:`${st}px 0 0`},[`&-horizontal${X}-with-text${X}-dashed`]:{"&::before, &::after":{borderStyle:"dashed none none"}},[`&-vertical${X}-dashed`]:{borderInlineStartWidth:st,borderInlineEnd:0,borderBlockStart:0,borderBlockEnd:0},[`&-plain${X}-with-text`]:{color:g.colorText,fontWeight:"normal",fontSize:g.fontSize},[`&-horizontal${X}-with-text-left${X}-no-default-orientation-margin-left`]:{"&::before":{width:0},"&::after":{width:"100%"},[`${X}-inner-text`]:{paddingInlineStart:z}},[`&-horizontal${X}-with-text-right${X}-no-default-orientation-margin-right`]:{"&::before":{width:"100%"},"&::after":{width:0},[`${X}-inner-text`]:{paddingInlineEnd:z}}})}};var fe=(0,B.Z)("Divider",g=>{const X=(0,ee.TS)(g,{dividerHorizontalWithTextGutterMargin:g.margin,dividerHorizontalGutterMargin:g.marginLG,sizePaddingEdgeHorizontal:0});return[ce(X)]},g=>({textPaddingInline:"1em",orientationMargin:.05,verticalMarginInline:g.marginXS})),M=function(g,X){var z={};for(var Ce in g)Object.prototype.hasOwnProperty.call(g,Ce)&&X.indexOf(Ce)<0&&(z[Ce]=g[Ce]);if(g!=null&&typeof Object.getOwnPropertySymbols=="function")for(var st=0,Ce=Object.getOwnPropertySymbols(g);st{const{getPrefixCls:X,direction:z,divider:Ce}=H.useContext(se.E_),{prefixCls:st,type:Re="horizontal",orientation:de="center",orientationMargin:ae,className:ue,rootClassName:A,children:w,dashed:j,plain:N,style:De}=g,Te=M(g,["prefixCls","type","orientation","orientationMargin","className","rootClassName","children","dashed","plain","style"]),ze=X("divider",st),[Me,he]=fe(ze),_=de.length>0?`-${de}`:de,me=!!w,T=de==="left"&&ae!=null,ve=de==="right"&&ae!=null,Ee=O()(ze,Ce==null?void 0:Ce.className,he,`${ze}-${Re}`,{[`${ze}-with-text`]:me,[`${ze}-with-text${_}`]:me,[`${ze}-dashed`]:!!j,[`${ze}-plain`]:!!N,[`${ze}-rtl`]:z==="rtl",[`${ze}-no-default-orientation-margin-left`]:T,[`${ze}-no-default-orientation-margin-right`]:ve},ue,A),ne=H.useMemo(()=>typeof ae=="number"?ae:/^\d+$/.test(ae)?Number(ae):ae,[ae]),Oe=Object.assign(Object.assign({},T&&{marginLeft:ne}),ve&&{marginRight:ne});return Me(H.createElement("div",Object.assign({className:Ee,style:Object.assign(Object.assign({},Ce==null?void 0:Ce.style),De)},Te,{role:"separator"}),w&&Re!=="vertical"&&H.createElement("span",{className:`${ze}-inner-text`,style:Oe},w)))}},91857:function(Ht,lt,u){"use strict";var v=u(59301),O=u(38819),H=u(92310),se=u.n(H),R=u(31561),B=u(70425),ee=u(18929),ce=u(2738),fe=u(79676),M=u(53487),Ze=u(92343),P=u(36355),g=u(20834),X=u(40875),z=u(88088),Ce=u(47211);const st=null,Re=A=>{const{menu:w,arrow:j,prefixCls:N,children:De,trigger:Te,disabled:ze,dropdownRender:Me,getPopupContainer:he,overlayClassName:_,rootClassName:me,open:T,onOpenChange:ve,visible:Ee,onVisibleChange:ne,mouseEnterDelay:Oe=.15,mouseLeaveDelay:xe=.1,autoAdjustOverflow:te=!0,placement:Fe="",overlay:Ae,transitionName:le}=A,{getPopupContainer:$e,getPrefixCls:nt,direction:St}=v.useContext(P.E_),Rt=v.useMemo(()=>{const F=nt();return le!==void 0?le:Fe.includes("top")?`${F}-slide-down`:`${F}-slide-up`},[nt,Fe,le]),Et=v.useMemo(()=>Fe?Fe.includes("Center")?Fe.slice(0,Fe.indexOf("Center")):Fe:St==="rtl"?"bottomRight":"bottomLeft",[Fe,St]),vt=nt("dropdown",N),[It,gt]=(0,Ce.Z)(vt),[,qe]=(0,z.Z)(),yt=v.Children.only(De),V=(0,Ze.Tm)(yt,{className:se()(`${vt}-trigger`,{[`${vt}-rtl`]:St==="rtl"},yt.props.className),disabled:ze}),Z=ze?[]:Te;let L;Z&&Z.includes("contextMenu")&&(L=!0);const[U,J]=(0,ee.Z)(!1,{value:T!=null?T:Ee}),Se=(0,B.useEvent)(F=>{ve==null||ve(F),ne==null||ne(F),J(F)}),x=se()(_,me,gt,{[`${vt}-rtl`]:St==="rtl"}),C=(0,fe.Z)({arrowPointAtCenter:typeof j=="object"&&j.pointAtCenter,autoAdjustOverflow:te,offset:qe.marginXXS,arrowWidth:j?qe.sizePopupArrow:0,borderRadius:qe.borderRadius}),Q=v.useCallback(()=>{J(!1)},[]),I=()=>{let F;return w!=null&&w.items?F=v.createElement(g.default,Object.assign({},w)):typeof Ae=="function"?F=Ae():F=Ae,Me&&(F=Me(F)),F=v.Children.only(typeof F=="string"?v.createElement("span",null,F):F),v.createElement(X.J,{prefixCls:`${vt}-menu`,expandIcon:v.createElement("span",{className:`${vt}-menu-submenu-arrow`},v.createElement(O.Z,{className:`${vt}-menu-submenu-arrow-icon`})),mode:"vertical",selectable:!1,onClick:Q,validator:pe=>{let{mode:je}=pe}},F)};return It(v.createElement(R.Z,Object.assign({alignPoint:L},(0,ce.Z)(A,["rootClassName"]),{mouseEnterDelay:Oe,mouseLeaveDelay:xe,visible:U,builtinPlacements:C,arrow:!!j,overlayClassName:x,prefixCls:vt,getPopupContainer:he||$e,transitionName:Rt,trigger:Z,overlay:I,placement:Et,onVisibleChange:Se}),V))};function de(A){return Object.assign(Object.assign({},A),{align:{overflow:{adjustX:!1,adjustY:!1}}})}const ae=(0,M.Z)(Re,"dropdown",A=>A,de),ue=A=>v.createElement(ae,Object.assign({},A),v.createElement("span",null));Re._InternalPanelDoNotUseOrYouWillBeFired=ue,lt.Z=Re},38854:function(Ht,lt,u){"use strict";u.d(lt,{Z:function(){return z}});var v=u(91857),O=u(92310),H=u.n(O),se=u(59301),R=u(18785),B=u(3113),ee=u(36355),ce=u(81327),fe=u(33234),M=u(47211),Ze=function(Ce,st){var Re={};for(var de in Ce)Object.prototype.hasOwnProperty.call(Ce,de)&&st.indexOf(de)<0&&(Re[de]=Ce[de]);if(Ce!=null&&typeof Object.getOwnPropertySymbols=="function")for(var ae=0,de=Object.getOwnPropertySymbols(Ce);ae{const{getPopupContainer:st,getPrefixCls:Re,direction:de}=se.useContext(ee.E_),{prefixCls:ae,type:ue="default",danger:A,disabled:w,loading:j,onClick:N,htmlType:De,children:Te,className:ze,menu:Me,arrow:he,autoFocus:_,overlay:me,trigger:T,align:ve,open:Ee,onOpenChange:ne,placement:Oe,getPopupContainer:xe,href:te,icon:Fe=se.createElement(R.Z,null),title:Ae,buttonsRender:le=I=>I,mouseEnterDelay:$e,mouseLeaveDelay:nt,overlayClassName:St,overlayStyle:Rt,destroyPopupOnHide:Et,dropdownRender:vt}=Ce,It=Ze(Ce,["prefixCls","type","danger","disabled","loading","onClick","htmlType","children","className","menu","arrow","autoFocus","overlay","trigger","align","open","onOpenChange","placement","getPopupContainer","href","icon","title","buttonsRender","mouseEnterDelay","mouseLeaveDelay","overlayClassName","overlayStyle","destroyPopupOnHide","dropdownRender"]),gt=Re("dropdown",ae),qe=`${gt}-button`,[yt,V]=(0,M.Z)(gt),Z={menu:Me,arrow:he,autoFocus:_,align:ve,disabled:w,trigger:w?[]:T,onOpenChange:ne,getPopupContainer:xe||st,mouseEnterDelay:$e,mouseLeaveDelay:nt,overlayClassName:St,overlayStyle:Rt,destroyPopupOnHide:Et,dropdownRender:vt},{compactSize:L,compactItemClassnames:U}=(0,fe.ri)(gt,de),J=H()(qe,U,ze,V);"overlay"in Ce&&(Z.overlay=me),"open"in Ce&&(Z.open=Ee),"placement"in Ce?Z.placement=Oe:Z.placement=de==="rtl"?"bottomLeft":"bottomRight";const Se=se.createElement(B.ZP,{type:ue,danger:A,disabled:w,loading:j,onClick:N,htmlType:De,href:te,title:Ae},Te),x=se.createElement(B.ZP,{type:ue,danger:A,icon:Fe}),[C,Q]=le([Se,x]);return yt(se.createElement(ce.Z.Compact,Object.assign({className:J,size:L,block:!0},It),C,se.createElement(v.Z,Object.assign({},Z),Q)))};P.__ANT_BUTTON=!0;var g=P;const X=v.Z;X.Button=g;var z=X},47211:function(Ht,lt,u){"use strict";u.d(lt,{Z:function(){return Ze}});var v=u(17313),O=u(13826),H=u(92899),se=u(29878),R=u(19447),B=u(83116),ee=u(37613),fe=P=>{const{componentCls:g,menuCls:X,colorError:z,colorTextLightSolid:Ce}=P,st=`${X}-item`;return{[`${g}, ${g}-menu-submenu`]:{[`${X} ${st}`]:{[`&${st}-danger:not(${st}-disabled)`]:{color:z,"&:hover":{color:Ce,backgroundColor:z}}}}}};const M=P=>{const{componentCls:g,menuCls:X,zIndexPopup:z,dropdownArrowDistance:Ce,sizePopupArrow:st,antCls:Re,iconCls:de,motionDurationMid:ae,dropdownPaddingVertical:ue,fontSize:A,dropdownEdgeChildPadding:w,colorTextDisabled:j,fontSizeIcon:N,controlPaddingHorizontal:De,colorBgElevated:Te}=P;return[{[g]:Object.assign(Object.assign({},(0,v.Wf)(P)),{position:"absolute",top:-9999,left:{_skip_check_:!0,value:-9999},zIndex:z,display:"block","&::before":{position:"absolute",insetBlock:-Ce+st/2,zIndex:-9999,opacity:1e-4,content:'""'},[`&-trigger${Re}-btn`]:{[`& > ${de}-down, & > ${Re}-btn-icon > ${de}-down`]:{fontSize:N}},[`${g}-wrap`]:{position:"relative",[`${Re}-btn > ${de}-down`]:{fontSize:N},[`${de}-down::before`]:{transition:`transform ${ae}`}},[`${g}-wrap-open`]:{[`${de}-down::before`]:{transform:"rotate(180deg)"}},"\n &-hidden,\n &-menu-hidden,\n &-menu-submenu-hidden\n ":{display:"none"},[`&${Re}-slide-down-enter${Re}-slide-down-enter-active${g}-placement-bottomLeft, &${Re}-slide-down-appear${Re}-slide-down-appear-active${g}-placement-bottomLeft, &${Re}-slide-down-enter${Re}-slide-down-enter-active${g}-placement-bottom, &${Re}-slide-down-appear${Re}-slide-down-appear-active${g}-placement-bottom, &${Re}-slide-down-enter${Re}-slide-down-enter-active${g}-placement-bottomRight, &${Re}-slide-down-appear${Re}-slide-down-appear-active${g}-placement-bottomRight`]:{animationName:O.fJ},[`&${Re}-slide-up-enter${Re}-slide-up-enter-active${g}-placement-topLeft, &${Re}-slide-up-appear${Re}-slide-up-appear-active${g}-placement-topLeft, &${Re}-slide-up-enter${Re}-slide-up-enter-active${g}-placement-top, &${Re}-slide-up-appear${Re}-slide-up-appear-active${g}-placement-top, &${Re}-slide-up-enter${Re}-slide-up-enter-active${g}-placement-topRight, &${Re}-slide-up-appear${Re}-slide-up-appear-active${g}-placement-topRight`]:{animationName:O.Qt},[`&${Re}-slide-down-leave${Re}-slide-down-leave-active${g}-placement-bottomLeft, &${Re}-slide-down-leave${Re}-slide-down-leave-active${g}-placement-bottom, &${Re}-slide-down-leave${Re}-slide-down-leave-active${g}-placement-bottomRight`]:{animationName:O.Uw},[`&${Re}-slide-up-leave${Re}-slide-up-leave-active${g}-placement-topLeft, &${Re}-slide-up-leave${Re}-slide-up-leave-active${g}-placement-top, &${Re}-slide-up-leave${Re}-slide-up-leave-active${g}-placement-topRight`]:{animationName:O.ly}})},(0,R.ZP)(P,{colorBg:Te,limitVerticalRadius:!0,arrowPlacement:{top:!0,bottom:!0}}),{[`${g} ${X}`]:{position:"relative",margin:0},[`${X}-submenu-popup`]:{position:"absolute",zIndex:z,background:"transparent",boxShadow:"none",transformOrigin:"0 0","ul, li":{listStyle:"none",margin:0}},[`${g}, ${g}-menu-submenu`]:{[X]:Object.assign(Object.assign({padding:w,listStyleType:"none",backgroundColor:Te,backgroundClip:"padding-box",borderRadius:P.borderRadiusLG,outline:"none",boxShadow:P.boxShadowSecondary},(0,v.Qy)(P)),{[`${X}-item-group-title`]:{padding:`${ue}px ${De}px`,color:P.colorTextDescription,transition:`all ${ae}`},[`${X}-item`]:{position:"relative",display:"flex",alignItems:"center"},[`${X}-item-icon`]:{minWidth:A,marginInlineEnd:P.marginXS,fontSize:P.fontSizeSM},[`${X}-title-content`]:{flex:"auto","> a":{color:"inherit",transition:`all ${ae}`,"&:hover":{color:"inherit"},"&::after":{position:"absolute",inset:0,content:'""'}}},[`${X}-item, ${X}-submenu-title`]:Object.assign(Object.assign({clear:"both",margin:0,padding:`${ue}px ${De}px`,color:P.colorText,fontWeight:"normal",fontSize:A,lineHeight:P.lineHeight,cursor:"pointer",transition:`all ${ae}`,borderRadius:P.borderRadiusSM,"&:hover, &-active":{backgroundColor:P.controlItemBgHover}},(0,v.Qy)(P)),{"&-selected":{color:P.colorPrimary,backgroundColor:P.controlItemBgActive,"&:hover, &-active":{backgroundColor:P.controlItemBgActiveHover}},"&-disabled":{color:j,cursor:"not-allowed","&:hover":{color:j,backgroundColor:Te,cursor:"not-allowed"},a:{pointerEvents:"none"}},"&-divider":{height:1,margin:`${P.marginXXS}px 0`,overflow:"hidden",lineHeight:0,backgroundColor:P.colorSplit},[`${g}-menu-submenu-expand-icon`]:{position:"absolute",insetInlineEnd:P.paddingXS,[`${g}-menu-submenu-arrow-icon`]:{marginInlineEnd:"0 !important",color:P.colorTextDescription,fontSize:N,fontStyle:"normal"}}}),[`${X}-item-group-list`]:{margin:`0 ${P.marginXS}px`,padding:0,listStyle:"none"},[`${X}-submenu-title`]:{paddingInlineEnd:De+P.fontSizeSM},[`${X}-submenu-vertical`]:{position:"relative"},[`${X}-submenu${X}-submenu-disabled ${g}-menu-submenu-title`]:{[`&, ${g}-menu-submenu-arrow-icon`]:{color:j,backgroundColor:Te,cursor:"not-allowed"}},[`${X}-submenu-selected ${g}-menu-submenu-title`]:{color:P.colorPrimary}})}},[(0,O.oN)(P,"slide-up"),(0,O.oN)(P,"slide-down"),(0,H.Fm)(P,"move-up"),(0,H.Fm)(P,"move-down"),(0,se._y)(P,"zoom-big")]]};var Ze=(0,B.Z)("Dropdown",(P,g)=>{let{rootPrefixCls:X}=g;const{marginXXS:z,sizePopupArrow:Ce,controlHeight:st,fontSize:Re,lineHeight:de,paddingXXS:ae,componentCls:ue,borderRadiusLG:A}=P,w=(st-Re*de)/2,{dropdownArrowOffset:j}=(0,R.fS)({contentRadius:A}),N=(0,ee.TS)(P,{menuCls:`${ue}-menu`,rootPrefixCls:X,dropdownArrowDistance:Ce/2+z,dropdownArrowOffset:j,dropdownPaddingVertical:w,dropdownEdgeChildPadding:ae});return[M(N),fe(N)]},P=>({zIndexPopup:P.zIndexPopupBase+50}))},64165:function(Ht,lt,u){"use strict";u.d(lt,{Z:function(){return ae}});var v=u(92310),O=u.n(v),H=u(59301),se=u(36355),R=u(9763),B=u(64993),ee=u(88088),fe=()=>{const[,ue]=(0,ee.Z)(),w=new B.C(ue.colorBgBase).toHsl().l<.5?{opacity:.65}:{};return H.createElement("svg",{style:w,width:"184",height:"152",viewBox:"0 0 184 152",xmlns:"http://www.w3.org/2000/svg"},H.createElement("g",{fill:"none",fillRule:"evenodd"},H.createElement("g",{transform:"translate(24 31.67)"},H.createElement("ellipse",{fillOpacity:".8",fill:"#F5F5F7",cx:"67.797",cy:"106.89",rx:"67.797",ry:"12.668"}),H.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"}),H.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)"}),H.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"}),H.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"})),H.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"}),H.createElement("g",{transform:"translate(149.65 15.383)",fill:"#FFF"},H.createElement("ellipse",{cx:"20.654",cy:"3.167",rx:"2.849",ry:"2.815"}),H.createElement("path",{d:"M5.698 5.63H0L2.898.704zM9.259.704h4.985V5.63H9.259z"}))))},Ze=()=>{const[,ue]=(0,ee.Z)(),{colorFill:A,colorFillTertiary:w,colorFillQuaternary:j,colorBgContainer:N}=ue,{borderColor:De,shadowColor:Te,contentColor:ze}=(0,H.useMemo)(()=>({borderColor:new B.C(A).onBackground(N).toHexShortString(),shadowColor:new B.C(w).onBackground(N).toHexShortString(),contentColor:new B.C(j).onBackground(N).toHexShortString()}),[A,w,j,N]);return H.createElement("svg",{width:"64",height:"41",viewBox:"0 0 64 41",xmlns:"http://www.w3.org/2000/svg"},H.createElement("g",{transform:"translate(0 1)",fill:"none",fillRule:"evenodd"},H.createElement("ellipse",{fill:Te,cx:"32",cy:"33",rx:"32",ry:"7"}),H.createElement("g",{fillRule:"nonzero",stroke:De},H.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"}),H.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:ze}))))},P=u(83116),g=u(37613);const X=ue=>{const{componentCls:A,margin:w,marginXS:j,marginXL:N,fontSize:De,lineHeight:Te}=ue;return{[A]:{marginInline:j,fontSize:De,lineHeight:Te,textAlign:"center",[`${A}-image`]:{height:ue.emptyImgHeight,marginBottom:j,opacity:ue.opacityImage,img:{height:"100%"},svg:{maxWidth:"100%",height:"100%",margin:"auto"}},[`${A}-description`]:{color:ue.colorText},[`${A}-footer`]:{marginTop:w},"&-normal":{marginBlock:N,color:ue.colorTextDisabled,[`${A}-description`]:{color:ue.colorTextDisabled},[`${A}-image`]:{height:ue.emptyImgHeightMD}},"&-small":{marginBlock:j,color:ue.colorTextDisabled,[`${A}-image`]:{height:ue.emptyImgHeightSM}}}}};var z=(0,P.Z)("Empty",ue=>{const{componentCls:A,controlHeightLG:w}=ue,j=(0,g.TS)(ue,{emptyImgCls:`${A}-img`,emptyImgHeight:w*2.5,emptyImgHeightMD:w,emptyImgHeightSM:w*.875});return[X(j)]}),Ce=function(ue,A){var w={};for(var j in ue)Object.prototype.hasOwnProperty.call(ue,j)&&A.indexOf(j)<0&&(w[j]=ue[j]);if(ue!=null&&typeof Object.getOwnPropertySymbols=="function")for(var N=0,j=Object.getOwnPropertySymbols(ue);N{var{className:A,rootClassName:w,prefixCls:j,image:N=st,description:De,children:Te,imageStyle:ze,style:Me}=ue,he=Ce(ue,["className","rootClassName","prefixCls","image","description","children","imageStyle","style"]);const{getPrefixCls:_,direction:me,empty:T}=H.useContext(se.E_),ve=_("empty",j),[Ee,ne]=z(ve),[Oe]=(0,R.Z)("Empty"),xe=typeof De!="undefined"?De:Oe==null?void 0:Oe.description,te=typeof xe=="string"?xe:"empty";let Fe=null;return typeof N=="string"?Fe=H.createElement("img",{alt:te,src:N}):Fe=N,Ee(H.createElement("div",Object.assign({className:O()(ne,ve,T==null?void 0:T.className,{[`${ve}-normal`]:N===Re,[`${ve}-rtl`]:me==="rtl"},A,w),style:Object.assign(Object.assign({},T==null?void 0:T.style),Me)},he),H.createElement("div",{className:`${ve}-image`,style:ze},Fe),xe&&H.createElement("div",{className:`${ve}-description`},xe),Te&&H.createElement("div",{className:`${ve}-footer`},Te)))};de.PRESENTED_IMAGE_DEFAULT=st,de.PRESENTED_IMAGE_SIMPLE=Re;var ae=de},78241:function(Ht,lt,u){"use strict";u.d(lt,{default:function(){return h}});var v=u(19127),O=u(92310),H=u.n(O),se=u(77900),R=u(59301),B=u(62892),ee=u(32441);function ce(f){const[d,p]=R.useState(f);return R.useEffect(()=>{const b=setTimeout(()=>{p(f)},f.length?0:10);return()=>{clearTimeout(b)}},[f]),d}var fe=u(17313),M=u(29878),Ze=u(8378),P=u(37613),g=u(83116),z=f=>{const{componentCls:d}=f,p=`${d}-show-help`,b=`${d}-show-help-item`;return{[p]:{transition:`opacity ${f.motionDurationSlow} ${f.motionEaseInOut}`,"&-appear, &-enter":{opacity:0,"&-active":{opacity:1}},"&-leave":{opacity:1,"&-active":{opacity:0}},[b]:{overflow:"hidden",transition:`height ${f.motionDurationSlow} ${f.motionEaseInOut}, opacity ${f.motionDurationSlow} ${f.motionEaseInOut}, transform ${f.motionDurationSlow} ${f.motionEaseInOut} !important`,[`&${b}-appear, &${b}-enter`]:{transform:"translateY(-5px)",opacity:0,"&-active":{transform:"translateY(0)",opacity:1}},[`&${b}-leave-active`]:{transform:"translateY(-5px)"}}}}};const Ce=f=>({legend:{display:"block",width:"100%",marginBottom:f.marginLG,padding:0,color:f.colorTextDescription,fontSize:f.fontSizeLG,lineHeight:"inherit",border:0,borderBottom:`${f.lineWidth}px ${f.lineType} ${f.colorBorder}`},label:{fontSize:f.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 ${f.controlOutlineWidth}px ${f.controlOutline}`},output:{display:"block",paddingTop:15,color:f.colorText,fontSize:f.fontSize,lineHeight:f.lineHeight}}),st=(f,d)=>{const{formItemCls:p}=f;return{[p]:{[`${p}-label > label`]:{height:d},[`${p}-control-input`]:{minHeight:d}}}},Re=f=>{const{componentCls:d}=f;return{[f.componentCls]:Object.assign(Object.assign(Object.assign({},(0,fe.Wf)(f)),Ce(f)),{[`${d}-text`]:{display:"inline-block",paddingInlineEnd:f.paddingSM},"&-small":Object.assign({},st(f,f.controlHeightSM)),"&-large":Object.assign({},st(f,f.controlHeightLG))})}},de=f=>{const{formItemCls:d,iconCls:p,componentCls:b,rootPrefixCls:E,labelRequiredMarkColor:q,labelColor:K,labelFontSize:ye,labelHeight:Ue,labelColonMarginInlineStart:Ge,labelColonMarginInlineEnd:Le,itemMarginBottom:rt}=f;return{[d]:Object.assign(Object.assign({},(0,fe.Wf)(f)),{marginBottom:rt,verticalAlign:"top","&-with-help":{transition:"none"},[`&-hidden, &-hidden.${E}-row`]:{display:"none"},"&-has-warning":{[`${d}-split`]:{color:f.colorError}},"&-has-error":{[`${d}-split`]:{color:f.colorWarning}},[`${d}-label`]:{flexGrow:0,overflow:"hidden",whiteSpace:"nowrap",textAlign:"end",verticalAlign:"middle","&-left":{textAlign:"start"},"&-wrap":{overflow:"unset",lineHeight:`${f.lineHeight} - 0.25em`,whiteSpace:"unset"},"> label":{position:"relative",display:"inline-flex",alignItems:"center",maxWidth:"100%",height:Ue,color:K,fontSize:ye,[`> ${p}`]:{fontSize:f.fontSize,verticalAlign:"top"},[`&${d}-required:not(${d}-required-mark-optional)::before`]:{display:"inline-block",marginInlineEnd:f.marginXXS,color:q,fontSize:f.fontSize,fontFamily:"SimSun, sans-serif",lineHeight:1,content:'"*"',[`${b}-hide-required-mark &`]:{display:"none"}},[`${d}-optional`]:{display:"inline-block",marginInlineStart:f.marginXXS,color:f.colorTextDescription,[`${b}-hide-required-mark &`]:{display:"none"}},[`${d}-tooltip`]:{color:f.colorTextDescription,cursor:"help",writingMode:"horizontal-tb",marginInlineStart:f.marginXXS},"&::after":{content:'":"',position:"relative",marginBlock:0,marginInlineStart:Ge,marginInlineEnd:Le},[`&${d}-no-colon::after`]:{content:'"\\a0"'}}},[`${d}-control`]:{"--ant-display":"flex",flexDirection:"column",flexGrow:1,[`&:first-child:not([class^="'${E}-col-'"]):not([class*="' ${E}-col-'"])`]:{width:"100%"},"&-input":{position:"relative",display:"flex",alignItems:"center",minHeight:f.controlHeight,"&-content":{flex:"auto",maxWidth:"100%"}}},[d]:{"&-explain, &-extra":{clear:"both",color:f.colorTextDescription,fontSize:f.fontSize,lineHeight:f.lineHeight},"&-explain-connected":{width:"100%"},"&-extra":{minHeight:f.controlHeightSM,transition:`color ${f.motionDurationMid} ${f.motionEaseOut}`},"&-explain":{"&-error":{color:f.colorError},"&-warning":{color:f.colorWarning}}},[`&-with-help ${d}-explain`]:{height:"auto",opacity:1},[`${d}-feedback-icon`]:{fontSize:f.fontSize,textAlign:"center",visibility:"visible",animationName:M.kr,animationDuration:f.motionDurationMid,animationTimingFunction:f.motionEaseOutBack,pointerEvents:"none","&-success":{color:f.colorSuccess},"&-error":{color:f.colorError},"&-warning":{color:f.colorWarning},"&-validating":{color:f.colorPrimary}}})}},ae=f=>{const{componentCls:d,formItemCls:p}=f;return{[`${d}-horizontal`]:{[`${p}-label`]:{flexGrow:0},[`${p}-control`]:{flex:"1 1 0",minWidth:0},[`${p}-label[class$='-24'], ${p}-label[class*='-24 ']`]:{[`& + ${p}-control`]:{minWidth:"unset"}}}}},ue=f=>{const{componentCls:d,formItemCls:p}=f;return{[`${d}-inline`]:{display:"flex",flexWrap:"wrap",[p]:{flex:"none",marginInlineEnd:f.margin,marginBottom:0,"&-row":{flexWrap:"nowrap"},[`> ${p}-label, > ${p}-control`]:{display:"inline-block",verticalAlign:"top"},[`> ${p}-label`]:{flex:"none"},[`${d}-text`]:{display:"inline-block"},[`${p}-has-feedback`]:{display:"inline-block"}}}}},A=f=>({padding:f.verticalLabelPadding,margin:f.verticalLabelMargin,whiteSpace:"initial",textAlign:"start","> label":{margin:0,"&::after":{visibility:"hidden"}}}),w=f=>{const{componentCls:d,formItemCls:p,rootPrefixCls:b}=f;return{[`${p} ${p}-label`]:A(f),[d]:{[p]:{flexWrap:"wrap",[`${p}-label, ${p}-control`]:{[`&:not([class*=" ${b}-col-xs"])`]:{flex:"0 0 100%",maxWidth:"100%"}}}}}},j=f=>{const{componentCls:d,formItemCls:p,rootPrefixCls:b}=f;return{[`${d}-vertical`]:{[p]:{"&-row":{flexDirection:"column"},"&-label > label":{height:"auto"},[`${d}-item-control`]:{width:"100%"}}},[`${d}-vertical ${p}-label, .${b}-col-24${p}-label, .${b}-col-xl-24${p}-label`]:A(f),[`@media (max-width: ${f.screenXSMax}px)`]:[w(f),{[d]:{[`.${b}-col-xs-24${p}-label`]:A(f)}}],[`@media (max-width: ${f.screenSMMax}px)`]:{[d]:{[`.${b}-col-sm-24${p}-label`]:A(f)}},[`@media (max-width: ${f.screenMDMax}px)`]:{[d]:{[`.${b}-col-md-24${p}-label`]:A(f)}},[`@media (max-width: ${f.screenLGMax}px)`]:{[d]:{[`.${b}-col-lg-24${p}-label`]:A(f)}}}},N=(f,d)=>(0,P.TS)(f,{formItemCls:`${f.componentCls}-item`,rootPrefixCls:d});var De=(0,g.Z)("Form",(f,d)=>{let{rootPrefixCls:p}=d;const b=N(f,p);return[Re(b),de(b),z(b),ae(b),ue(b),j(b),(0,Ze.Z)(b),M.kr]},f=>({labelRequiredMarkColor:f.colorError,labelColor:f.colorTextHeading,labelFontSize:f.fontSize,labelHeight:f.controlHeight,labelColonMarginInlineStart:f.marginXXS/2,labelColonMarginInlineEnd:f.marginXS,itemMarginBottom:f.marginLG,verticalLabelPadding:`0 0 ${f.paddingXS}px`,verticalLabelMargin:0}),{order:-1e3});const Te=[];function ze(f,d,p){let b=arguments.length>3&&arguments[3]!==void 0?arguments[3]:0;return{key:typeof f=="string"?f:`${d}-${b}`,error:f,errorStatus:p}}var he=f=>{let{help:d,helpStatus:p,errors:b=Te,warnings:E=Te,className:q,fieldId:K,onVisibleChanged:ye}=f;const{prefixCls:Ue}=R.useContext(ee.Rk),Ge=`${Ue}-item-explain`,[,Le]=De(Ue),rt=(0,R.useMemo)(()=>(0,B.Z)(Ue),[Ue]),Qe=ce(b),tt=ce(E),Je=R.useMemo(()=>d!=null?[ze(d,"help",p)]:[].concat((0,v.Z)(Qe.map((ge,we)=>ze(ge,"error","error",we))),(0,v.Z)(tt.map((ge,we)=>ze(ge,"warning","warning",we)))),[d,p,Qe,tt]),$={};return K&&($.id=`${K}_help`),R.createElement(se.default,{motionDeadline:rt.motionDeadline,motionName:`${Ue}-show-help`,visible:!!Je.length,onVisibleChanged:ye},ge=>{const{className:we,style:He}=ge;return R.createElement("div",Object.assign({},$,{className:H()(Ge,we,q,Le),style:He,role:"alert"}),R.createElement(se.CSSMotionList,Object.assign({keys:Je},(0,B.Z)(Ue),{motionName:`${Ue}-show-help-item`,component:!1}),at=>{const{key:Ne,error:ke,errorStatus:Y,className:be,style:Ie}=at;return R.createElement("div",{key:Ne,className:H()(be,{[`${Ge}-${Y}`]:Y}),style:Ie},ke)}))})},_=u(95013),me=u(36355),T=u(1684),ve=u(52946),Ee=u(19716),ne=u(16722);const Oe=["parentNode"],xe="form_item";function te(f){return f===void 0||f===!1?[]:Array.isArray(f)?f:[f]}function Fe(f,d){if(!f.length)return;const p=f.join("_");return d?`${d}_${p}`:Oe.includes(p)?`${xe}_${p}`:p}function Ae(f,d,p,b,E,q){let K=b;return q!==void 0?K=q:p.validating?K="validating":f.length?K="error":d.length?K="warning":(p.touched||E&&p.validated)&&(K="success"),K}function le(f){return te(f).join("_")}function $e(f){const[d]=(0,_.useForm)(),p=R.useRef({}),b=R.useMemo(()=>f!=null?f:Object.assign(Object.assign({},d),{__INTERNAL__:{itemRef:E=>q=>{const K=le(E);q?p.current[K]=q:delete p.current[K]}},scrollToField:function(E){let q=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};const K=te(E),ye=Fe(K,b.__INTERNAL__.name),Ue=ye?document.getElementById(ye):null;Ue&&(0,ne.Z)(Ue,Object.assign({scrollMode:"if-needed",block:"nearest"},q))},getFieldInstance:E=>{const q=le(E);return p.current[q]}}),[f,d]);return[b]}var nt=u(28726),St=function(f,d){var p={};for(var b in f)Object.prototype.hasOwnProperty.call(f,b)&&d.indexOf(b)<0&&(p[b]=f[b]);if(f!=null&&typeof Object.getOwnPropertySymbols=="function")for(var E=0,b=Object.getOwnPropertySymbols(f);E{const p=R.useContext(T.Z),{getPrefixCls:b,direction:E,form:q}=R.useContext(me.E_),{prefixCls:K,className:ye,rootClassName:Ue,size:Ge,disabled:Le=p,form:rt,colon:Qe,labelAlign:tt,labelWrap:Je,labelCol:$,wrapperCol:ge,hideRequiredMark:we,layout:He="horizontal",scrollToFirstError:at,requiredMark:Ne,onFinishFailed:ke,name:Y,style:be,feedbackIcons:Ie}=f,Ke=St(f,["prefixCls","className","rootClassName","size","disabled","form","colon","labelAlign","labelWrap","labelCol","wrapperCol","hideRequiredMark","layout","scrollToFirstError","requiredMark","onFinishFailed","name","style","feedbackIcons"]),Ve=(0,Ee.Z)(Ge),ct=R.useContext(nt.Z),ut=(0,R.useMemo)(()=>Ne!==void 0?Ne:q&&q.requiredMark!==void 0?q.requiredMark:!we,[we,Ne,q]),Ct=Qe!=null?Qe:q==null?void 0:q.colon,Lt=b("form",K),[Dt,Nt]=De(Lt),Vt=H()(Lt,`${Lt}-${He}`,{[`${Lt}-hide-required-mark`]:ut===!1,[`${Lt}-rtl`]:E==="rtl",[`${Lt}-${Ve}`]:Ve},Nt,q==null?void 0:q.className,ye,Ue),[tn]=$e(rt),{__INTERNAL__:Ut}=tn;Ut.name=Y;const bt=(0,R.useMemo)(()=>({name:Y,labelAlign:tt,labelCol:$,labelWrap:Je,wrapperCol:ge,vertical:He==="vertical",colon:Ct,requiredMark:ut,itemRef:Ut.itemRef,form:tn,feedbackIcons:Ie}),[Y,tt,$,ge,He,Ct,ut,tn,Ie]);R.useImperativeHandle(d,()=>tn);const ln=(cn,Gt)=>{if(cn){let rn={block:"nearest"};typeof cn=="object"&&(rn=cn),tn.scrollToField(Gt,rn)}},Qt=cn=>{if(ke==null||ke(cn),cn.errorFields.length){const Gt=cn.errorFields[0].name;if(at!==void 0){ln(at,Gt);return}q&&q.scrollToFirstError!==void 0&&ln(q.scrollToFirstError,Gt)}};return Dt(R.createElement(T.n,{disabled:Le},R.createElement(ve.q,{size:Ve},R.createElement(ee.RV,Object.assign({},{validateMessages:ct}),R.createElement(ee.q3.Provider,{value:bt},R.createElement(_.default,Object.assign({id:Y},Ke,{name:Y,onFinishFailed:Qt,form:tn,style:Object.assign(Object.assign({},q==null?void 0:q.style),be),className:Vt})))))))};var vt=R.forwardRef(Rt),It=u(41799),gt=u(8654),qe=u(92343),yt=u(11592);function V(f){if(typeof f=="function")return f;const d=(0,yt.Z)(f);return d.length<=1?d[0]:d}const Z=()=>{const{status:f,errors:d=[],warnings:p=[]}=(0,R.useContext)(ee.aM);return{status:f,errors:d,warnings:p}};Z.Context=ee.aM;var L=Z,U=u(16089);function J(f){const[d,p]=R.useState(f),b=(0,R.useRef)(null),E=(0,R.useRef)([]),q=(0,R.useRef)(!1);R.useEffect(()=>(q.current=!1,()=>{q.current=!0,U.Z.cancel(b.current),b.current=null}),[]);function K(ye){q.current||(b.current===null&&(E.current=[],b.current=(0,U.Z)(()=>{b.current=null,p(Ue=>{let Ge=Ue;return E.current.forEach(Le=>{Ge=Le(Ge)}),Ge})})),E.current.push(ye))}return[d,K]}function Se(){const{itemRef:f}=R.useContext(ee.q3),d=R.useRef({});function p(b,E){const q=E&&typeof E=="object"&&E.ref,K=b.join("_");return(d.current.name!==K||d.current.originRef!==q)&&(d.current.name=K,d.current.originRef=q,d.current.ref=(0,gt.sQ)(f(b),q)),d.current.ref}return p}var x=u(29194),C=u(34280),Q=u(2738),I=u(27382),F=u(37028);const pe=f=>{const{formItemCls:d}=f;return{"@media screen and (-ms-high-contrast: active), (-ms-high-contrast: none)":{[`${d}-control`]:{display:"flex"}}}};var je=(0,g.b)(["Form","item-item"],(f,d)=>{let{rootPrefixCls:p}=d;const b=N(f,p);return[pe(b)]}),it=f=>{const{prefixCls:d,status:p,wrapperCol:b,children:E,errors:q,warnings:K,_internalItemRender:ye,extra:Ue,help:Ge,fieldId:Le,marginBottom:rt,onErrorVisibleChanged:Qe}=f,tt=`${d}-item`,Je=R.useContext(ee.q3),$=b||Je.wrapperCol||{},ge=H()(`${tt}-control`,$.className),we=R.useMemo(()=>Object.assign({},Je),[Je]);delete we.labelCol,delete we.wrapperCol;const He=R.createElement("div",{className:`${tt}-control-input`},R.createElement("div",{className:`${tt}-control-input-content`},E)),at=R.useMemo(()=>({prefixCls:d,status:p}),[d,p]),Ne=rt!==null||q.length||K.length?R.createElement("div",{style:{display:"flex",flexWrap:"nowrap"}},R.createElement(ee.Rk.Provider,{value:at},R.createElement(he,{fieldId:Le,errors:q,warnings:K,help:Ge,helpStatus:p,className:`${tt}-explain-connected`,onVisibleChanged:Qe})),!!rt&&R.createElement("div",{style:{width:0,height:rt}})):null,ke={};Le&&(ke.id=`${Le}_extra`);const Y=Ue?R.createElement("div",Object.assign({},ke,{className:`${tt}-extra`}),Ue):null,be=ye&&ye.mark==="pro_table_render"&&ye.render?ye.render(f,{input:He,errorList:Ne,extra:Y}):R.createElement(R.Fragment,null,He,Ne,Y);return R.createElement(ee.q3.Provider,{value:we},R.createElement(F.Z,Object.assign({},$,{className:ge}),be),R.createElement(je,{prefixCls:d}))},_e=u(61485),Ye=u(31724),re=u(9763),Pe=u(6848),et=function(f,d){var p={};for(var b in f)Object.prototype.hasOwnProperty.call(f,b)&&d.indexOf(b)<0&&(p[b]=f[b]);if(f!=null&&typeof Object.getOwnPropertySymbols=="function")for(var E=0,b=Object.getOwnPropertySymbols(f);E{let{prefixCls:d,label:p,htmlFor:b,labelCol:E,labelAlign:q,colon:K,required:ye,requiredMark:Ue,tooltip:Ge}=f;var Le;const[rt]=(0,re.Z)("Form"),{vertical:Qe,labelAlign:tt,labelCol:Je,labelWrap:$,colon:ge}=R.useContext(ee.q3);if(!p)return null;const we=E||Je||{},He=q||tt,at=`${d}-item-label`,Ne=H()(at,He==="left"&&`${at}-left`,we.className,{[`${at}-wrap`]:!!$});let ke=p;const Y=K===!0||ge!==!1&&K!==!1;Y&&!Qe&&typeof p=="string"&&p.trim()!==""&&(ke=p.replace(/[:|:]\s*$/,""));const Ie=oe(Ge);if(Ie){const{icon:ut=R.createElement(_e.Z,null)}=Ie,Ct=et(Ie,["icon"]),Lt=R.createElement(Pe.Z,Object.assign({},Ct),R.cloneElement(ut,{className:`${d}-item-tooltip`,title:""}));ke=R.createElement(R.Fragment,null,ke,Lt)}const Ke=Ue==="optional",Ve=typeof Ue=="function";Ve?ke=Ue(ke,{required:!!ye}):Ke&&!ye&&(ke=R.createElement(R.Fragment,null,ke,R.createElement("span",{className:`${d}-item-optional`,title:""},(rt==null?void 0:rt.optional)||((Le=Ye.Z.Form)===null||Le===void 0?void 0:Le.optional))));const ct=H()({[`${d}-item-required`]:ye,[`${d}-item-required-mark-optional`]:Ke||Ve,[`${d}-item-no-colon`]:!Y});return R.createElement(F.Z,Object.assign({},we,{className:Ne}),R.createElement("label",{htmlFor:b,className:ct,title:typeof p=="string"?p:""},ke))},ft=u(29679),ot=u(19248),_t=u(96512),jt=u(58617);const Zt={success:ft.Z,warning:_t.Z,error:ot.Z,validating:jt.Z};function Yt(f){let{children:d,errors:p,warnings:b,hasFeedback:E,validateStatus:q,prefixCls:K,meta:ye,noStyle:Ue}=f;const Ge=`${K}-item`,{feedbackIcons:Le}=R.useContext(ee.q3),rt=Ae(p,b,ye,null,!!E,q),{isFormItemInput:Qe,status:tt}=R.useContext(ee.aM),Je=R.useMemo(()=>{var $;let ge;if(E){const at=E!==!0&&E.icons||Le,Ne=rt&&(($=at==null?void 0:at({status:rt,errors:p,warnings:b}))===null||$===void 0?void 0:$[rt]),ke=rt&&Zt[rt];ge=Ne!==!1&&ke?R.createElement("span",{className:H()(`${Ge}-feedback-icon`,`${Ge}-feedback-icon-${rt}`)},Ne||R.createElement(ke,null)):null}let we=!0,He=rt||"";return Ue&&(we=Qe,He=(rt!=null?rt:tt)||""),{status:He,errors:p,warnings:b,hasFeedback:!!E,feedbackIcon:ge,isFormItemInput:we}},[rt,E,Ue,Qe,tt]);return R.createElement(ee.aM.Provider,{value:Je},d)}var Mt=function(f,d){var p={};for(var b in f)Object.prototype.hasOwnProperty.call(f,b)&&d.indexOf(b)<0&&(p[b]=f[b]);if(f!=null&&typeof Object.getOwnPropertySymbols=="function")for(var E=0,b=Object.getOwnPropertySymbols(f);E{if(Ie&&Ne.current){const Nt=getComputedStyle(Ne.current);ct(parseInt(Nt.marginBottom,10))}},[Ie,Ke]);const ut=Nt=>{Nt||ct(null)},Lt=function(){let Nt=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!1;const Vt=Nt?ke:Ge.errors,tn=Nt?Y:Ge.warnings;return Ae(Vt,tn,Ge,"",!!Le,Ue)}(),Dt=H()(He,p,b,{[`${He}-with-help`]:be||ke.length||Y.length,[`${He}-has-feedback`]:Lt&&Le,[`${He}-has-success`]:Lt==="success",[`${He}-has-warning`]:Lt==="warning",[`${He}-has-error`]:Lt==="error",[`${He}-is-validating`]:Lt==="validating",[`${He}-hidden`]:rt});return R.createElement("div",{className:Dt,style:E,ref:Ne},R.createElement(I.Z,Object.assign({className:`${He}-row`},(0,Q.Z)(we,["_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"])),R.createElement(pt,Object.assign({htmlFor:tt},f,{requiredMark:at,required:Je!=null?Je:$,prefixCls:d})),R.createElement(it,Object.assign({},f,Ge,{errors:ke,warnings:Y,prefixCls:d,status:Lt,help:q,marginBottom:Ve,onErrorVisibleChanged:ut}),R.createElement(ee.qI.Provider,{value:ge},R.createElement(Yt,{prefixCls:d,meta:Ge,errors:Ge.errors,warnings:Ge.warnings,hasFeedback:Le,validateStatus:Lt},Qe)))),!!Ve&&R.createElement("div",{className:`${He}-margin-offset`,style:{marginBottom:-Ve}}))}const xt="__SPLIT__",Ft=null,qt=R.memo(f=>{let{children:d}=f;return d},(f,d)=>f.value===d.value&&f.update===d.update&&f.childProps.length===d.childProps.length&&f.childProps.every((p,b)=>p===d.childProps[b]));function Bt(f){return f!=null}function Kt(){return{errors:[],warnings:[],touched:!1,validating:!1,name:[],validated:!1}}function hn(f){const{name:d,noStyle:p,className:b,dependencies:E,prefixCls:q,shouldUpdate:K,rules:ye,children:Ue,required:Ge,label:Le,messageVariables:rt,trigger:Qe="onChange",validateTrigger:tt,hidden:Je,help:$}=f,{getPrefixCls:ge}=R.useContext(me.E_),{name:we}=R.useContext(ee.q3),He=V(Ue),at=typeof He=="function",Ne=R.useContext(ee.qI),{validateTrigger:ke}=R.useContext(_.FieldContext),Y=tt!==void 0?tt:ke,be=Bt(d),Ie=ge("form",q),[Ke,Ve]=De(Ie),ct=R.useContext(_.ListContext),ut=R.useRef(),[Ct,Lt]=J({}),[Dt,Nt]=(0,It.Z)(()=>Kt()),Vt=Gt=>{const rn=ct==null?void 0:ct.getKey(Gt.name);if(Nt(Gt.destroy?Kt():Gt,!0),p&&$!==!1&&Ne){let pn=Gt.name;if(Gt.destroy)pn=ut.current||pn;else if(rn!==void 0){const[un,wn]=rn;pn=[un].concat((0,v.Z)(wn)),ut.current=pn}Ne(Gt,pn)}},tn=(Gt,rn)=>{Lt(pn=>{const un=Object.assign({},pn),kn=[].concat((0,v.Z)(Gt.name.slice(0,-1)),(0,v.Z)(rn)).join(xt);return Gt.destroy?delete un[kn]:un[kn]=Gt,un})},[Ut,bt]=R.useMemo(()=>{const Gt=(0,v.Z)(Dt.errors),rn=(0,v.Z)(Dt.warnings);return Object.values(Ct).forEach(pn=>{Gt.push.apply(Gt,(0,v.Z)(pn.errors||[])),rn.push.apply(rn,(0,v.Z)(pn.warnings||[]))}),[Gt,rn]},[Ct,Dt.errors,Dt.warnings]),ln=Se();function Qt(Gt,rn,pn){return p&&!Je?R.createElement(Yt,{prefixCls:Ie,hasFeedback:f.hasFeedback,validateStatus:f.validateStatus,meta:Dt,errors:Ut,warnings:bt,noStyle:!0},Gt):R.createElement($t,Object.assign({key:"row"},f,{className:H()(b,Ve),prefixCls:Ie,fieldId:rn,isRequired:pn,errors:Ut,warnings:bt,meta:Dt,onSubItemMetaChange:tn}),Gt)}if(!be&&!at&&!E)return Ke(Qt(He));let cn={};return typeof Le=="string"?cn.label=Le:d&&(cn.label=String(d)),rt&&(cn=Object.assign(Object.assign({},cn),rt)),Ke(R.createElement(_.Field,Object.assign({},f,{messageVariables:cn,trigger:Qe,validateTrigger:Y,onMetaChange:Vt}),(Gt,rn,pn)=>{const un=te(d).length&&rn?rn.name:[],wn=Fe(un,we),kn=Ge!==void 0?Ge:!!(ye&&ye.some(Tt=>{if(Tt&&typeof Tt=="object"&&Tt.required&&!Tt.warningOnly)return!0;if(typeof Tt=="function"){const Rn=Tt(pn);return Rn&&Rn.required&&!Rn.warningOnly}return!1})),on=Object.assign({},Gt);let Pt=null;if(Array.isArray(He)&&be)Pt=He;else if(!(at&&(!(K||E)||be))){if(!(E&&!at&&!be))if((0,qe.l$)(He)){const Tt=Object.assign(Object.assign({},He.props),on);if(Tt.id||(Tt.id=wn),$||Ut.length>0||bt.length>0||f.extra){const Cn=[];($||Ut.length>0)&&Cn.push(`${wn}_help`),f.extra&&Cn.push(`${wn}_extra`),Tt["aria-describedby"]=Cn.join(" ")}Ut.length>0&&(Tt["aria-invalid"]="true"),kn&&(Tt["aria-required"]="true"),(0,gt.Yr)(He)&&(Tt.ref=ln(un,He)),new Set([].concat((0,v.Z)(te(Qe)),(0,v.Z)(te(Y)))).forEach(Cn=>{Tt[Cn]=function(){for(var Sn,En,dn,An,Wn,sn=arguments.length,Wt=new Array(sn),fn=0;fn{var{prefixCls:d,children:p}=f,b=an(f,["prefixCls","children"]);const{getPrefixCls:E}=R.useContext(me.E_),q=E("form",d),K=R.useMemo(()=>({prefixCls:q,status:"error"}),[q]);return R.createElement(_.List,Object.assign({},b),(ye,Ue,Ge)=>R.createElement(ee.Rk.Provider,{value:K},p(ye.map(Le=>Object.assign(Object.assign({},Le),{fieldKey:Le.key})),Ue,{errors:Ge.errors,warnings:Ge.warnings})))};function Xe(){const{form:f}=(0,R.useContext)(ee.q3);return f}const l=vt;l.Item=xn,l.List=Ot,l.ErrorList=he,l.useForm=$e,l.useFormInstance=Xe,l.useWatch=_.useWatch,l.Provider=ee.RV,l.create=()=>{};var h=l},8628:function(Ht,lt,u){"use strict";var v=u(59301),O=u(34280),H=u(56762),se=u(69507);function R(){let B=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!0;const ee=(0,v.useRef)({}),ce=(0,H.Z)(),fe=(0,se.ZP)();return(0,O.Z)(()=>{const M=fe.subscribe(Ze=>{ee.current=Ze,B&&ce()});return()=>fe.unsubscribe(M)},[]),ee.current}lt.Z=R},9432:function(Ht,lt,u){"use strict";u.d(lt,{Z:function(){return de},n:function(){return st}});var v=u(19248),O=u(92310),H=u.n(O),se=u(93681),R=u(8654),B=u(59301),ee=u(19080),ce=u(36355),fe=u(1684),M=u(19716),Ze=u(32441),P=u(33234),g=u(59412),X=u(9937);function z(ae){return!!(ae.prefix||ae.suffix||ae.allowClear)}var Ce=function(ae,ue){var A={};for(var w in ae)Object.prototype.hasOwnProperty.call(ae,w)&&ue.indexOf(w)<0&&(A[w]=ae[w]);if(ae!=null&&typeof Object.getOwnPropertySymbols=="function")for(var j=0,w=Object.getOwnPropertySymbols(ae);j{var A;const{prefixCls:w,bordered:j=!0,status:N,size:De,disabled:Te,onBlur:ze,onFocus:Me,suffix:he,allowClear:_,addonAfter:me,addonBefore:T,className:ve,style:Ee,styles:ne,rootClassName:Oe,onChange:xe,classNames:te}=ae,Fe=Ce(ae,["prefixCls","bordered","status","size","disabled","onBlur","onFocus","suffix","allowClear","addonAfter","addonBefore","className","style","styles","rootClassName","onChange","classNames"]),{getPrefixCls:Ae,direction:le,input:$e}=B.useContext(ce.E_),nt=Ae("input",w),St=(0,B.useRef)(null),[Rt,Et]=(0,X.ZP)(nt),{compactSize:vt,compactItemClassnames:It}=(0,P.ri)(nt,le),gt=(0,M.Z)(je=>{var Be;return(Be=De!=null?De:vt)!==null&&Be!==void 0?Be:je}),qe=B.useContext(fe.Z),yt=Te!=null?Te:qe,{status:V,hasFeedback:Z,feedbackIcon:L}=(0,B.useContext)(Ze.aM),U=(0,ee.F)(V,N),J=z(ae)||!!Z,Se=(0,B.useRef)(J);(0,B.useEffect)(()=>{var je;J&&Se.current,Se.current=J},[J]);const x=(0,g.Z)(St,!0),C=je=>{x(),ze==null||ze(je)},Q=je=>{x(),Me==null||Me(je)},I=je=>{x(),xe==null||xe(je)},F=(Z||he)&&B.createElement(B.Fragment,null,he,Z&&L);let pe;return typeof _=="object"&&(_!=null&&_.clearIcon)?pe=_:_&&(pe={clearIcon:B.createElement(v.Z,null)}),Rt(B.createElement(se.default,Object.assign({ref:(0,R.sQ)(ue,St),prefixCls:nt,autoComplete:$e==null?void 0:$e.autoComplete},Fe,{disabled:yt,onBlur:C,onFocus:Q,style:Object.assign(Object.assign({},$e==null?void 0:$e.style),Ee),styles:Object.assign(Object.assign({},$e==null?void 0:$e.styles),ne),suffix:F,allowClear:pe,className:H()(ve,Oe,It,$e==null?void 0:$e.className),onChange:I,addonAfter:me&&B.createElement(P.BR,null,B.createElement(Ze.Ux,{override:!0,status:!0},me)),addonBefore:T&&B.createElement(P.BR,null,B.createElement(Ze.Ux,{override:!0,status:!0},T)),classNames:Object.assign(Object.assign(Object.assign({},te),$e==null?void 0:$e.classNames),{input:H()({[`${nt}-sm`]:gt==="small",[`${nt}-lg`]:gt==="large",[`${nt}-rtl`]:le==="rtl",[`${nt}-borderless`]:!j},!J&&(0,ee.Z)(nt,U),te==null?void 0:te.input,(A=$e==null?void 0:$e.classNames)===null||A===void 0?void 0:A.input,Et)}),classes:{affixWrapper:H()({[`${nt}-affix-wrapper-sm`]:gt==="small",[`${nt}-affix-wrapper-lg`]:gt==="large",[`${nt}-affix-wrapper-rtl`]:le==="rtl",[`${nt}-affix-wrapper-borderless`]:!j},(0,ee.Z)(`${nt}-affix-wrapper`,U,Z),Et),wrapper:H()({[`${nt}-group-rtl`]:le==="rtl"},Et),group:H()({[`${nt}-group-wrapper-sm`]:gt==="small",[`${nt}-group-wrapper-lg`]:gt==="large",[`${nt}-group-wrapper-rtl`]:le==="rtl",[`${nt}-group-wrapper-disabled`]:yt},(0,ee.Z)(`${nt}-group-wrapper`,U,Z),Et)}})))})},1643:function(Ht,lt,u){"use strict";var v=u(19248),O=u(92310),H=u.n(O),se=u(9296),R=u(59301),B=u(19080),ee=u(36355),ce=u(1684),fe=u(19716),M=u(32441),Ze=u(9432),P=u(9937),g=function(z,Ce){var st={};for(var Re in z)Object.prototype.hasOwnProperty.call(z,Re)&&Ce.indexOf(Re)<0&&(st[Re]=z[Re]);if(z!=null&&typeof Object.getOwnPropertySymbols=="function")for(var de=0,Re=Object.getOwnPropertySymbols(z);de{const{prefixCls:st,bordered:Re=!0,size:de,disabled:ae,status:ue,allowClear:A,showCount:w,classNames:j,rootClassName:N,className:De}=z,Te=g(z,["prefixCls","bordered","size","disabled","status","allowClear","showCount","classNames","rootClassName","className"]),{getPrefixCls:ze,direction:Me}=R.useContext(ee.E_),he=(0,fe.Z)(de),_=R.useContext(ce.Z),me=ae!=null?ae:_,{status:T,hasFeedback:ve,feedbackIcon:Ee}=R.useContext(M.aM),ne=(0,B.F)(T,ue),Oe=R.useRef(null);R.useImperativeHandle(Ce,()=>{var le;return{resizableTextArea:(le=Oe.current)===null||le===void 0?void 0:le.resizableTextArea,focus:$e=>{var nt,St;(0,Ze.n)((St=(nt=Oe.current)===null||nt===void 0?void 0:nt.resizableTextArea)===null||St===void 0?void 0:St.textArea,$e)},blur:()=>{var $e;return($e=Oe.current)===null||$e===void 0?void 0:$e.blur()}}});const xe=ze("input",st);let te;typeof A=="object"&&(A!=null&&A.clearIcon)?te=A:A&&(te={clearIcon:R.createElement(v.Z,null)});const[Fe,Ae]=(0,P.ZP)(xe);return Fe(R.createElement(se.default,Object.assign({},Te,{disabled:me,allowClear:te,className:H()(De,N),classes:{affixWrapper:H()(`${xe}-textarea-affix-wrapper`,{[`${xe}-affix-wrapper-rtl`]:Me==="rtl",[`${xe}-affix-wrapper-borderless`]:!Re,[`${xe}-affix-wrapper-sm`]:he==="small",[`${xe}-affix-wrapper-lg`]:he==="large",[`${xe}-textarea-show-count`]:w},(0,B.Z)(`${xe}-affix-wrapper`,ne),Ae)},classNames:Object.assign(Object.assign({},j),{textarea:H()({[`${xe}-borderless`]:!Re,[`${xe}-sm`]:he==="small",[`${xe}-lg`]:he==="large"},(0,B.Z)(xe,ne),Ae,j==null?void 0:j.textarea)}),prefixCls:xe,suffix:ve&&R.createElement("span",{className:`${xe}-textarea-suffix`},Ee),showCount:w,ref:Oe})))});lt.Z=X},59412:function(Ht,lt,u){"use strict";u.d(lt,{Z:function(){return O}});var v=u(59301);function O(H,se){const R=(0,v.useRef)([]),B=()=>{R.current.push(setTimeout(()=>{var ee,ce,fe,M;!((ee=H.current)===null||ee===void 0)&&ee.input&&((ce=H.current)===null||ce===void 0?void 0:ce.input.getAttribute("type"))==="password"&&(!((fe=H.current)===null||fe===void 0)&&fe.input.hasAttribute("value"))&&((M=H.current)===null||M===void 0||M.input.removeAttribute("value"))}))};return(0,v.useEffect)(()=>(se&&B(),()=>R.current.forEach(ee=>{ee&&clearTimeout(ee)})),[]),B}},92832:function(Ht,lt,u){"use strict";u.d(lt,{default:function(){return he}});var v=u(92310),O=u.n(v),H=u(59301),se=u(36355),R=u(32441),B=u(9937),ce=_=>{const{getPrefixCls:me,direction:T}=(0,H.useContext)(se.E_),{prefixCls:ve,className:Ee}=_,ne=me("input-group",ve),Oe=me("input"),[xe,te]=(0,B.ZP)(Oe),Fe=O()(ne,{[`${ne}-lg`]:_.size==="large",[`${ne}-sm`]:_.size==="small",[`${ne}-compact`]:_.compact,[`${ne}-rtl`]:T==="rtl"},te,Ee),Ae=(0,H.useContext)(R.aM),le=(0,H.useMemo)(()=>Object.assign(Object.assign({},Ae),{isFormItemInput:!1}),[Ae]);return xe(H.createElement("span",{className:Fe,style:_.style,onMouseEnter:_.onMouseEnter,onMouseLeave:_.onMouseLeave,onFocus:_.onFocus,onBlur:_.onBlur},H.createElement(R.aM.Provider,{value:le},_.children)))},fe=u(9432),M=u(73331),Ze=u(15277),P=u(2738),g=u(8654),X=u(59412),z=function(_,me){var T={};for(var ve in _)Object.prototype.hasOwnProperty.call(_,ve)&&me.indexOf(ve)<0&&(T[ve]=_[ve]);if(_!=null&&typeof Object.getOwnPropertySymbols=="function")for(var Ee=0,ve=Object.getOwnPropertySymbols(_);Ee_?H.createElement(Ze.Z,null):H.createElement(M.Z,null),st={click:"onClick",hover:"onMouseOver"};var de=H.forwardRef((_,me)=>{const{visibilityToggle:T=!0}=_,ve=typeof T=="object"&&T.visible!==void 0,[Ee,ne]=(0,H.useState)(()=>ve?T.visible:!1),Oe=(0,H.useRef)(null);H.useEffect(()=>{ve&&ne(T.visible)},[ve,T]);const xe=(0,X.Z)(Oe),te=()=>{const{disabled:yt}=_;yt||(Ee&&xe(),ne(V=>{var Z;const L=!V;return typeof T=="object"&&((Z=T.onVisibleChange)===null||Z===void 0||Z.call(T,L)),L}))},Fe=yt=>{const{action:V="click",iconRender:Z=Ce}=_,L=st[V]||"",U=Z(Ee),J={[L]:te,className:`${yt}-icon`,key:"passwordIcon",onMouseDown:Se=>{Se.preventDefault()},onMouseUp:Se=>{Se.preventDefault()}};return H.cloneElement(H.isValidElement(U)?U:H.createElement("span",null,U),J)},{className:Ae,prefixCls:le,inputPrefixCls:$e,size:nt}=_,St=z(_,["className","prefixCls","inputPrefixCls","size"]),{getPrefixCls:Rt}=H.useContext(se.E_),Et=Rt("input",$e),vt=Rt("input-password",le),It=T&&Fe(vt),gt=O()(vt,Ae,{[`${vt}-${nt}`]:!!nt}),qe=Object.assign(Object.assign({},(0,P.Z)(St,["suffix","iconRender","visibilityToggle"])),{type:Ee?"text":"password",className:gt,prefixCls:Et,suffix:It});return nt&&(qe.size=nt),H.createElement(fe.Z,Object.assign({ref:(0,g.sQ)(me,Oe)},qe))}),ae=u(47472),ue=u(92343),A=u(3113),w=u(19716),j=u(33234),N=function(_,me){var T={};for(var ve in _)Object.prototype.hasOwnProperty.call(_,ve)&&me.indexOf(ve)<0&&(T[ve]=_[ve]);if(_!=null&&typeof Object.getOwnPropertySymbols=="function")for(var Ee=0,ve=Object.getOwnPropertySymbols(_);Ee{const{prefixCls:T,inputPrefixCls:ve,className:Ee,size:ne,suffix:Oe,enterButton:xe=!1,addonAfter:te,loading:Fe,disabled:Ae,onSearch:le,onChange:$e,onCompositionStart:nt,onCompositionEnd:St}=_,Rt=N(_,["prefixCls","inputPrefixCls","className","size","suffix","enterButton","addonAfter","loading","disabled","onSearch","onChange","onCompositionStart","onCompositionEnd"]),{getPrefixCls:Et,direction:vt}=H.useContext(se.E_),It=H.useRef(!1),gt=Et("input-search",T),qe=Et("input",ve),{compactSize:yt}=(0,j.ri)(gt,vt),V=(0,w.Z)(it=>{var _e;return(_e=ne!=null?ne:yt)!==null&&_e!==void 0?_e:it}),Z=H.useRef(null),L=it=>{it&&it.target&&it.type==="click"&&le&&le(it.target.value,it,{source:"clear"}),$e&&$e(it)},U=it=>{var _e;document.activeElement===((_e=Z.current)===null||_e===void 0?void 0:_e.input)&&it.preventDefault()},J=it=>{var _e,Ye;le&&le((Ye=(_e=Z.current)===null||_e===void 0?void 0:_e.input)===null||Ye===void 0?void 0:Ye.value,it,{source:"input"})},Se=it=>{It.current||Fe||J(it)},x=typeof xe=="boolean"?H.createElement(ae.Z,null):null,C=`${gt}-button`;let Q;const I=xe||{},F=I.type&&I.type.__ANT_BUTTON===!0;F||I.type==="button"?Q=(0,ue.Tm)(I,Object.assign({onMouseDown:U,onClick:it=>{var _e,Ye;(Ye=(_e=I==null?void 0:I.props)===null||_e===void 0?void 0:_e.onClick)===null||Ye===void 0||Ye.call(_e,it),J(it)},key:"enterButton"},F?{className:C,size:V}:{})):Q=H.createElement(A.ZP,{className:C,type:xe?"primary":void 0,size:V,disabled:Ae,key:"enterButton",onMouseDown:U,onClick:J,loading:Fe,icon:x},xe),te&&(Q=[Q,(0,ue.Tm)(te,{key:"addonAfter"})]);const pe=O()(gt,{[`${gt}-rtl`]:vt==="rtl",[`${gt}-${V}`]:!!V,[`${gt}-with-button`]:!!xe},Ee),je=it=>{It.current=!0,nt==null||nt(it)},Be=it=>{It.current=!1,St==null||St(it)};return H.createElement(fe.Z,Object.assign({ref:(0,g.sQ)(Z,me),onPressEnter:Se},Rt,{size:V,onCompositionStart:je,onCompositionEnd:Be,prefixCls:qe,addonAfter:Q,suffix:Oe,onChange:L,className:pe,disabled:Ae}))}),ze=u(1643);const Me=fe.Z;Me.Group=ce,Me.Search=Te,Me.TextArea=ze.Z,Me.Password=de;var he=Me},9937:function(Ht,lt,u){"use strict";u.d(lt,{M1:function(){return ee},TM:function(){return ue},Xy:function(){return ce},bi:function(){return Ze},e5:function(){return ae},ik:function(){return P},nz:function(){return R},pU:function(){return B},s7:function(){return g},x0:function(){return M}});var v=u(17313),O=u(74207),H=u(37613),se=u(83116);const R=A=>({"&::-moz-placeholder":{opacity:1},"&::placeholder":{color:A,userSelect:"none"},"&:placeholder-shown":{textOverflow:"ellipsis"}}),B=A=>({borderColor:A.hoverBorderColor}),ee=A=>({borderColor:A.activeBorderColor,boxShadow:A.activeShadow,outline:0}),ce=A=>({color:A.colorTextDisabled,backgroundColor:A.colorBgContainerDisabled,borderColor:A.colorBorder,boxShadow:"none",cursor:"not-allowed",opacity:1,"&:hover":Object.assign({},B((0,H.TS)(A,{hoverBorderColor:A.colorBorder})))}),fe=A=>{const{paddingBlockLG:w,fontSizeLG:j,lineHeightLG:N,borderRadiusLG:De,paddingInlineLG:Te}=A;return{padding:`${w}px ${Te}px`,fontSize:j,lineHeight:N,borderRadius:De}},M=A=>({padding:`${A.paddingBlockSM}px ${A.paddingInlineSM}px`,borderRadius:A.borderRadiusSM}),Ze=(A,w)=>{const{componentCls:j,colorError:N,colorWarning:De,errorActiveShadow:Te,warningActiveShadow:ze,colorErrorBorderHover:Me,colorWarningBorderHover:he}=A;return{[`&-status-error:not(${w}-disabled):not(${w}-borderless)${w}`]:{borderColor:N,"&:hover":{borderColor:Me},"&:focus, &-focused":Object.assign({},ee((0,H.TS)(A,{activeBorderColor:N,activeShadow:Te}))),[`${j}-prefix, ${j}-suffix`]:{color:N}},[`&-status-warning:not(${w}-disabled):not(${w}-borderless)${w}`]:{borderColor:De,"&:hover":{borderColor:he},"&:focus, &-focused":Object.assign({},ee((0,H.TS)(A,{activeBorderColor:De,activeShadow:ze}))),[`${j}-prefix, ${j}-suffix`]:{color:De}}}},P=A=>Object.assign(Object.assign({position:"relative",display:"inline-block",width:"100%",minWidth:0,padding:`${A.paddingBlock}px ${A.paddingInline}px`,color:A.colorText,fontSize:A.fontSize,lineHeight:A.lineHeight,backgroundColor:A.colorBgContainer,backgroundImage:"none",borderWidth:A.lineWidth,borderStyle:A.lineType,borderColor:A.colorBorder,borderRadius:A.borderRadius,transition:`all ${A.motionDurationMid}`},R(A.colorTextPlaceholder)),{"&:hover":Object.assign({},B(A)),"&:focus, &-focused":Object.assign({},ee(A)),"&-disabled, &[disabled]":Object.assign({},ce(A)),"&-borderless":{"&, &:hover, &:focus, &-focused, &-disabled, &[disabled]":{backgroundColor:"transparent",border:"none",boxShadow:"none"}},"textarea&":{maxWidth:"100%",height:"auto",minHeight:A.controlHeight,lineHeight:A.lineHeight,verticalAlign:"bottom",transition:`all ${A.motionDurationSlow}, height 0s`,resize:"vertical"},"&-lg":Object.assign({},fe(A)),"&-sm":Object.assign({},M(A)),"&-rtl":{direction:"rtl"},"&-textarea-rtl":{direction:"rtl"}}),g=A=>{const{componentCls:w,antCls:j}=A;return{position:"relative",display:"table",width:"100%",borderCollapse:"separate",borderSpacing:0,"&[class*='col-']":{paddingInlineEnd:A.paddingXS,"&:last-child":{paddingInlineEnd:0}},[`&-lg ${w}, &-lg > ${w}-group-addon`]:Object.assign({},fe(A)),[`&-sm ${w}, &-sm > ${w}-group-addon`]:Object.assign({},M(A)),[`&-lg ${j}-select-single ${j}-select-selector`]:{height:A.controlHeightLG},[`&-sm ${j}-select-single ${j}-select-selector`]:{height:A.controlHeightSM},[`> ${w}`]:{display:"table-cell","&:not(:first-child):not(:last-child)":{borderRadius:0}},[`${w}-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 ${A.paddingInline}px`,color:A.colorText,fontWeight:"normal",fontSize:A.fontSize,textAlign:"center",backgroundColor:A.colorFillAlter,border:`${A.lineWidth}px ${A.lineType} ${A.colorBorder}`,borderRadius:A.borderRadius,transition:`all ${A.motionDurationSlow}`,lineHeight:1,[`${j}-select`]:{margin:`-${A.paddingBlock+1}px -${A.paddingInline}px`,[`&${j}-select-single:not(${j}-select-customize-input)`]:{[`${j}-select-selector`]:{backgroundColor:"inherit",border:`${A.lineWidth}px ${A.lineType} transparent`,boxShadow:"none"}},"&-open, &-focused":{[`${j}-select-selector`]:{color:A.colorPrimary}}},[`${j}-cascader-picker`]:{margin:`-9px -${A.paddingInline}px`,backgroundColor:"transparent",[`${j}-cascader-input`]:{textAlign:"start",border:0,boxShadow:"none"}}},"&-addon:first-child":{borderInlineEnd:0},"&-addon:last-child":{borderInlineStart:0}},[`${w}`]:{width:"100%",marginBottom:0,textAlign:"inherit","&:focus":{zIndex:1,borderInlineEndWidth:1},"&:hover":{zIndex:1,borderInlineEndWidth:1,[`${w}-search-with-button &`]:{zIndex:0}}},[`> ${w}:first-child, ${w}-group-addon:first-child`]:{borderStartEndRadius:0,borderEndEndRadius:0,[`${j}-select ${j}-select-selector`]:{borderStartEndRadius:0,borderEndEndRadius:0}},[`> ${w}-affix-wrapper`]:{[`&:not(:first-child) ${w}`]:{borderStartStartRadius:0,borderEndStartRadius:0},[`&:not(:last-child) ${w}`]:{borderStartEndRadius:0,borderEndEndRadius:0}},[`> ${w}:last-child, ${w}-group-addon:last-child`]:{borderStartStartRadius:0,borderEndStartRadius:0,[`${j}-select ${j}-select-selector`]:{borderStartStartRadius:0,borderEndStartRadius:0}},[`${w}-affix-wrapper`]:{"&:not(:last-child)":{borderStartEndRadius:0,borderEndEndRadius:0,[`${w}-search &`]:{borderStartStartRadius:A.borderRadius,borderEndStartRadius:A.borderRadius}},[`&:not(:first-child), ${w}-search &:not(:first-child)`]:{borderStartStartRadius:0,borderEndStartRadius:0}},[`&${w}-group-compact`]:Object.assign(Object.assign({display:"block"},(0,v.dF)()),{[`${w}-group-addon, ${w}-group-wrap, > ${w}`]:{"&:not(:first-child):not(:last-child)":{borderInlineEndWidth:A.lineWidth,"&:hover":{zIndex:1},"&:focus":{zIndex:1}}},"& > *":{display:"inline-block",float:"none",verticalAlign:"top",borderRadius:0},[` & > ${w}-affix-wrapper, & > ${w}-number-affix-wrapper, & > ${j}-picker-range `]:{display:"inline-flex"},"& > *:not(:last-child)":{marginInlineEnd:-A.lineWidth,borderInlineEndWidth:A.lineWidth},[`${w}`]:{float:"none"},[`& > ${j}-select > ${j}-select-selector, & > ${j}-select-auto-complete ${w}, & > ${j}-cascader-picker ${w}, & > ${w}-group-wrapper ${w}`]:{borderInlineEndWidth:A.lineWidth,borderRadius:0,"&:hover":{zIndex:1},"&:focus":{zIndex:1}},[`& > ${j}-select-focused`]:{zIndex:1},[`& > ${j}-select > ${j}-select-arrow`]:{zIndex:1},[`& > *:first-child, & > ${j}-select:first-child > ${j}-select-selector, & > ${j}-select-auto-complete:first-child ${w}, & > ${j}-cascader-picker:first-child ${w}`]:{borderStartStartRadius:A.borderRadius,borderEndStartRadius:A.borderRadius},[`& > *:last-child, & > ${j}-select:last-child > ${j}-select-selector, & > ${j}-cascader-picker:last-child ${w}, & > ${j}-cascader-picker-focused:last-child ${w}`]:{borderInlineEndWidth:A.lineWidth,borderStartEndRadius:A.borderRadius,borderEndEndRadius:A.borderRadius},[`& > ${j}-select-auto-complete ${w}`]:{verticalAlign:"top"},[`${w}-group-wrapper + ${w}-group-wrapper`]:{marginInlineStart:-A.lineWidth,[`${w}-affix-wrapper`]:{borderRadius:0}},[`${w}-group-wrapper:not(:last-child)`]:{[`&${w}-search > ${w}-group`]:{[`& > ${w}-group-addon > ${w}-search-button`]:{borderRadius:0},[`& > ${w}`]:{borderStartStartRadius:A.borderRadius,borderStartEndRadius:0,borderEndEndRadius:0,borderEndStartRadius:A.borderRadius}}}})}},X=A=>{const{componentCls:w,controlHeightSM:j,lineWidth:N}=A,Te=(j-N*2-16)/2;return{[w]:Object.assign(Object.assign(Object.assign(Object.assign({},(0,v.Wf)(A)),P(A)),Ze(A,w)),{'&[type="color"]':{height:A.controlHeight,[`&${w}-lg`]:{height:A.controlHeightLG},[`&${w}-sm`]:{height:j,paddingTop:Te,paddingBottom:Te}},'&[type="search"]::-webkit-search-cancel-button, &[type="search"]::-webkit-search-decoration':{"-webkit-appearance":"none"}})}},z=A=>{const{componentCls:w}=A;return{[`${w}-clear-icon`]:{margin:0,color:A.colorTextQuaternary,fontSize:A.fontSizeIcon,verticalAlign:-1,cursor:"pointer",transition:`color ${A.motionDurationSlow}`,"&:hover":{color:A.colorTextTertiary},"&:active":{color:A.colorText},"&-hidden":{visibility:"hidden"},"&-has-suffix":{margin:`0 ${A.inputAffixPadding}px`}}}},Ce=A=>{const{componentCls:w,inputAffixPadding:j,colorTextDescription:N,motionDurationSlow:De,colorIcon:Te,colorIconHover:ze,iconCls:Me}=A;return{[`${w}-affix-wrapper`]:Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({},P(A)),{display:"inline-flex",[`&:not(${w}-affix-wrapper-disabled):hover`]:Object.assign(Object.assign({},B(A)),{zIndex:1,[`${w}-search-with-button &`]:{zIndex:0}}),"&-focused, &:focus":{zIndex:1},"&-disabled":{[`${w}[disabled]`]:{background:"transparent"}},[`> input${w}`]:{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"'},[`${w}`]:{"&-prefix, &-suffix":{display:"flex",flex:"none",alignItems:"center","> *:not(:last-child)":{marginInlineEnd:A.paddingXS}},"&-show-count-suffix":{color:N},"&-show-count-has-suffix":{marginInlineEnd:A.paddingXXS},"&-prefix":{marginInlineEnd:j},"&-suffix":{marginInlineStart:j}}}),z(A)),{[`${Me}${w}-password-icon`]:{color:Te,cursor:"pointer",transition:`all ${De}`,"&:hover":{color:ze}}}),Ze(A,`${w}-affix-wrapper`))}},st=A=>{const{componentCls:w,colorError:j,colorWarning:N,borderRadiusLG:De,borderRadiusSM:Te}=A;return{[`${w}-group`]:Object.assign(Object.assign(Object.assign({},(0,v.Wf)(A)),g(A)),{"&-rtl":{direction:"rtl"},"&-wrapper":{display:"inline-block",width:"100%",textAlign:"start",verticalAlign:"top","&-rtl":{direction:"rtl"},"&-lg":{[`${w}-group-addon`]:{borderRadius:De,fontSize:A.fontSizeLG}},"&-sm":{[`${w}-group-addon`]:{borderRadius:Te}},"&-status-error":{[`${w}-group-addon`]:{color:j,borderColor:j}},"&-status-warning":{[`${w}-group-addon`]:{color:N,borderColor:N}},"&-disabled":{[`${w}-group-addon`]:Object.assign({},ce(A))},[`&:not(${w}-compact-first-item):not(${w}-compact-last-item)${w}-compact-item`]:{[`${w}, ${w}-group-addon`]:{borderRadius:0}},[`&:not(${w}-compact-last-item)${w}-compact-first-item`]:{[`${w}, ${w}-group-addon`]:{borderStartEndRadius:0,borderEndEndRadius:0}},[`&:not(${w}-compact-first-item)${w}-compact-last-item`]:{[`${w}, ${w}-group-addon`]:{borderStartStartRadius:0,borderEndStartRadius:0}}}})}},Re=A=>{const{componentCls:w,antCls:j}=A,N=`${w}-search`;return{[N]:{[`${w}`]:{"&:hover, &:focus":{borderColor:A.colorPrimaryHover,[`+ ${w}-group-addon ${N}-button:not(${j}-btn-primary)`]:{borderInlineStartColor:A.colorPrimaryHover}}},[`${w}-affix-wrapper`]:{borderRadius:0},[`${w}-lg`]:{lineHeight:A.lineHeightLG-2e-4},[`> ${w}-group`]:{[`> ${w}-group-addon:last-child`]:{insetInlineStart:-1,padding:0,border:0,[`${N}-button`]:{paddingTop:0,paddingBottom:0,borderStartStartRadius:0,borderStartEndRadius:A.borderRadius,borderEndEndRadius:A.borderRadius,borderEndStartRadius:0,boxShadow:"none"},[`${N}-button:not(${j}-btn-primary)`]:{color:A.colorTextDescription,"&:hover":{color:A.colorPrimaryHover},"&:active":{color:A.colorPrimaryActive},[`&${j}-btn-loading::before`]:{insetInlineStart:0,insetInlineEnd:0,insetBlockStart:0,insetBlockEnd:0}}}},[`${N}-button`]:{height:A.controlHeight,"&:hover, &:focus":{zIndex:1}},[`&-large ${N}-button`]:{height:A.controlHeightLG},[`&-small ${N}-button`]:{height:A.controlHeightSM},"&-rtl":{direction:"rtl"},[`&${w}-compact-item`]:{[`&:not(${w}-compact-last-item)`]:{[`${w}-group-addon`]:{[`${w}-search-button`]:{marginInlineEnd:-A.lineWidth,borderRadius:0}}},[`&:not(${w}-compact-first-item)`]:{[`${w},${w}-affix-wrapper`]:{borderRadius:0}},[`> ${w}-group-addon ${w}-search-button, > ${w}, ${w}-affix-wrapper`]:{"&:hover,&:focus,&:active":{zIndex:2}},[`> ${w}-affix-wrapper-focused`]:{zIndex:2}}}}},de=A=>{const{componentCls:w,paddingLG:j}=A,N=`${w}-textarea`;return{[N]:{position:"relative","&-show-count":{[`> ${w}`]:{height:"100%"},[`${w}-data-count`]:{position:"absolute",bottom:-A.fontSize*A.lineHeight,insetInlineEnd:0,color:A.colorTextDescription,whiteSpace:"nowrap",pointerEvents:"none"}},"&-allow-clear":{[`> ${w}`]:{paddingInlineEnd:j}},[`&-affix-wrapper${N}-has-feedback`]:{[`${w}`]:{paddingInlineEnd:j}},[`&-affix-wrapper${w}-affix-wrapper`]:{padding:0,[`> textarea${w}`]:{fontSize:"inherit",border:"none",outline:"none","&:focus":{boxShadow:"none !important"}},[`${w}-suffix`]:{margin:0,"> *:not(:last-child)":{marginInline:0},[`${w}-clear-icon`]:{position:"absolute",insetInlineEnd:A.paddingXS,insetBlockStart:A.paddingXS},[`${N}-suffix`]:{position:"absolute",top:0,insetInlineEnd:A.paddingInline,bottom:0,zIndex:1,display:"inline-flex",alignItems:"center",margin:"auto",pointerEvents:"none"}}}}}};function ae(A){return(0,H.TS)(A,{inputAffixPadding:A.paddingXXS})}const ue=A=>{const{controlHeight:w,fontSize:j,lineHeight:N,lineWidth:De,controlHeightSM:Te,controlHeightLG:ze,fontSizeLG:Me,lineHeightLG:he,paddingSM:_,controlPaddingHorizontalSM:me,controlPaddingHorizontal:T,colorFillAlter:ve,colorPrimaryHover:Ee,controlOutlineWidth:ne,controlOutline:Oe,colorErrorOutline:xe,colorWarningOutline:te}=A;return{paddingBlock:Math.max(Math.round((w-j*N)/2*10)/10-De,3),paddingBlockSM:Math.max(Math.round((Te-j*N)/2*10)/10-De,0),paddingBlockLG:Math.ceil((ze-Me*he)/2*10)/10-De,paddingInline:_-De,paddingInlineSM:me-De,paddingInlineLG:T-De,addonBg:ve,activeBorderColor:Ee,hoverBorderColor:Ee,activeShadow:`0 0 0 ${ne}px ${Oe}`,errorActiveShadow:`0 0 0 ${ne}px ${xe}`,warningActiveShadow:`0 0 0 ${ne}px ${te}`}};lt.ZP=(0,se.Z)("Input",A=>{const w=(0,H.TS)(A,ae(A));return[X(w),de(w),Ce(w),st(w),Re(w),(0,O.c)(w)]},ue)},45818:function(Ht,lt,u){"use strict";u.d(lt,{D:function(){return ae},Z:function(){return w}});var v=u(96663),O=u(59301),H={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"},se=H,R=u(7657),B=function(N,De){return O.createElement(R.Z,(0,v.Z)({},N,{ref:De,icon:se}))},ee=O.forwardRef(B),ce=ee,fe=u(33853),M=u(38819),Ze=u(92310),P=u.n(Ze),g=u(2738),z=j=>!isNaN(parseFloat(j))&&isFinite(j),Ce=u(36355),st=u(84966),Re=function(j,N){var De={};for(var Te in j)Object.prototype.hasOwnProperty.call(j,Te)&&N.indexOf(Te)<0&&(De[Te]=j[Te]);if(j!=null&&typeof Object.getOwnPropertySymbols=="function")for(var ze=0,Te=Object.getOwnPropertySymbols(j);ze{let j=0;return function(){let N=arguments.length>0&&arguments[0]!==void 0?arguments[0]:"";return j+=1,`${N}${j}`}})();var w=O.forwardRef((j,N)=>{const{prefixCls:De,className:Te,trigger:ze,children:Me,defaultCollapsed:he=!1,theme:_="dark",style:me={},collapsible:T=!1,reverseArrow:ve=!1,width:Ee=200,collapsedWidth:ne=80,zeroWidthTriggerStyle:Oe,breakpoint:xe,onCollapse:te,onBreakpoint:Fe}=j,Ae=Re(j,["prefixCls","className","trigger","children","defaultCollapsed","theme","style","collapsible","reverseArrow","width","collapsedWidth","zeroWidthTriggerStyle","breakpoint","onCollapse","onBreakpoint"]),{siderHook:le}=(0,O.useContext)(st.Gs),[$e,nt]=(0,O.useState)("collapsed"in j?j.collapsed:he),[St,Rt]=(0,O.useState)(!1);(0,O.useEffect)(()=>{"collapsed"in j&&nt(j.collapsed)},[j.collapsed]);const Et=(V,Z)=>{"collapsed"in j||nt(V),te==null||te(V,Z)},vt=(0,O.useRef)();vt.current=V=>{Rt(V.matches),Fe==null||Fe(V.matches),$e!==V.matches&&Et(V.matches,"responsive")},(0,O.useEffect)(()=>{function V(L){return vt.current(L)}let Z;if(typeof window!="undefined"){const{matchMedia:L}=window;if(L&&xe&&xe in de){Z=L(`(max-width: ${de[xe]})`);try{Z.addEventListener("change",V)}catch(U){Z.addListener(V)}V(Z)}}return()=>{try{Z==null||Z.removeEventListener("change",V)}catch(L){Z==null||Z.removeListener(V)}}},[xe]),(0,O.useEffect)(()=>{const V=ue("ant-sider-");return le.addSider(V),()=>le.removeSider(V)},[]);const It=()=>{Et(!$e,"clickTrigger")},{getPrefixCls:gt}=(0,O.useContext)(Ce.E_),qe=()=>{const V=gt("layout-sider",De),Z=(0,g.Z)(Ae,["collapsed"]),L=$e?ne:Ee,U=z(L)?`${L}px`:String(L),J=parseFloat(String(ne||0))===0?O.createElement("span",{onClick:It,className:P()(`${V}-zero-width-trigger`,`${V}-zero-width-trigger-${ve?"right":"left"}`),style:Oe},ze||O.createElement(ce,null)):null,C={expanded:ve?O.createElement(M.Z,null):O.createElement(fe.Z,null),collapsed:ve?O.createElement(fe.Z,null):O.createElement(M.Z,null)}[$e?"collapsed":"expanded"],Q=ze!==null?J||O.createElement("div",{className:`${V}-trigger`,onClick:It,style:{width:U}},ze||C):null,I=Object.assign(Object.assign({},me),{flex:`0 0 ${U}`,maxWidth:U,minWidth:U,width:U}),F=P()(V,`${V}-${_}`,{[`${V}-collapsed`]:!!$e,[`${V}-has-trigger`]:T&&ze!==null&&!J,[`${V}-below`]:!!St,[`${V}-zero-width`]:parseFloat(U)===0},Te);return O.createElement("aside",Object.assign({className:F},Z,{style:I,ref:N}),O.createElement("div",{className:`${V}-children`},Me),T||St&&J?Q:null)},yt=O.useMemo(()=>({siderCollapsed:$e}),[$e]);return O.createElement(ae.Provider,{value:yt},qe())})},84966:function(Ht,lt,u){"use strict";u.d(lt,{VY:function(){return ae},$_:function(){return de},h4:function(){return Re},Gs:function(){return g},ZP:function(){return ue}});var v=u(19127),O=u(92310),H=u.n(O),se=u(2738),R=u(59301),B=u(36355),ee=u(83116),fe=A=>{const{componentCls:w,bodyBg:j,lightSiderBg:N,lightTriggerBg:De,lightTriggerColor:Te}=A;return{[`${w}-sider-light`]:{background:N,[`${w}-sider-trigger`]:{color:Te,background:De},[`${w}-sider-zero-width-trigger`]:{color:Te,background:De,border:`1px solid ${j}`,borderInlineStart:0}}}};const M=A=>{const{antCls:w,componentCls:j,colorText:N,triggerColor:De,footerBg:Te,triggerBg:ze,headerHeight:Me,headerPadding:he,headerColor:_,footerPadding:me,triggerHeight:T,zeroTriggerHeight:ve,zeroTriggerWidth:Ee,motionDurationMid:ne,motionDurationSlow:Oe,fontSize:xe,borderRadius:te,bodyBg:Fe,headerBg:Ae,siderBg:le}=A;return{[j]:Object.assign(Object.assign({display:"flex",flex:"auto",flexDirection:"column",minHeight:0,background:Fe,"&, *":{boxSizing:"border-box"},[`&${j}-has-sider`]:{flexDirection:"row",[`> ${j}, > ${j}-content`]:{width:0}},[`${j}-header, &${j}-footer`]:{flex:"0 0 auto"},[`${j}-sider`]:{position:"relative",minWidth:0,background:le,transition:`all ${ne}, background 0s`,"&-children":{height:"100%",marginTop:-.1,paddingTop:.1,[`${w}-menu${w}-menu-inline-collapsed`]:{width:"auto"}},"&-has-trigger":{paddingBottom:T},"&-right":{order:1},"&-trigger":{position:"fixed",bottom:0,zIndex:1,height:T,color:De,lineHeight:`${T}px`,textAlign:"center",background:ze,cursor:"pointer",transition:`all ${ne}`},"&-zero-width":{"> *":{overflow:"hidden"},"&-trigger":{position:"absolute",top:Me,insetInlineEnd:-Ee,zIndex:1,width:Ee,height:ve,color:De,fontSize:A.fontSizeXL,display:"flex",alignItems:"center",justifyContent:"center",background:le,borderStartStartRadius:0,borderStartEndRadius:te,borderEndEndRadius:te,borderEndStartRadius:0,cursor:"pointer",transition:`background ${Oe} ease`,"&::after":{position:"absolute",inset:0,background:"transparent",transition:`all ${Oe}`,content:'""'},"&:hover::after":{background:"rgba(255, 255, 255, 0.2)"},"&-right":{insetInlineStart:-Ee,borderStartStartRadius:te,borderStartEndRadius:0,borderEndEndRadius:0,borderEndStartRadius:te}}}}},fe(A)),{"&-rtl":{direction:"rtl"}}),[`${j}-header`]:{height:Me,padding:he,color:_,lineHeight:`${Me}px`,background:Ae,[`${w}-menu`]:{lineHeight:"inherit"}},[`${j}-footer`]:{padding:me,color:N,fontSize:xe,background:Te},[`${j}-content`]:{flex:"auto",minHeight:0}}};var Ze=(0,ee.Z)("Layout",A=>[M(A)],A=>{const{colorBgLayout:w,controlHeight:j,controlHeightLG:N,colorText:De,controlHeightSM:Te,marginXXS:ze,colorTextLightSolid:Me,colorBgContainer:he}=A,_=N*1.25;return{colorBgHeader:"#001529",colorBgBody:w,colorBgTrigger:"#002140",bodyBg:w,headerBg:"#001529",headerHeight:j*2,headerPadding:`0 ${_}px`,headerColor:De,footerPadding:`${Te}px ${_}px`,footerBg:w,siderBg:"#001529",triggerHeight:N+ze*2,triggerBg:"#002140",triggerColor:Me,zeroTriggerWidth:N,zeroTriggerHeight:N,lightSiderBg:he,lightTriggerBg:he,lightTriggerColor:De}},{deprecatedTokens:[["colorBgBody","bodyBg"],["colorBgHeader","headerBg"],["colorBgTrigger","triggerBg"]]}),P=function(A,w){var j={};for(var N in A)Object.prototype.hasOwnProperty.call(A,N)&&w.indexOf(N)<0&&(j[N]=A[N]);if(A!=null&&typeof Object.getOwnPropertySymbols=="function")for(var De=0,N=Object.getOwnPropertySymbols(A);Denull,removeSider:()=>null}});function X(A){let{suffixCls:w,tagName:j,displayName:N}=A;return De=>R.forwardRef((ze,Me)=>R.createElement(De,Object.assign({ref:Me,suffixCls:w,tagName:j},ze)))}const z=R.forwardRef((A,w)=>{const{prefixCls:j,suffixCls:N,className:De,tagName:Te}=A,ze=P(A,["prefixCls","suffixCls","className","tagName"]),{getPrefixCls:Me}=R.useContext(B.E_),he=Me("layout",j),[_,me]=Ze(he),T=N?`${he}-${N}`:he;return _(R.createElement(Te,Object.assign({className:H()(j||T,De,me),ref:w},ze)))}),Ce=R.forwardRef((A,w)=>{const{direction:j}=R.useContext(B.E_),[N,De]=R.useState([]),{prefixCls:Te,className:ze,rootClassName:Me,children:he,hasSider:_,tagName:me,style:T}=A,ve=P(A,["prefixCls","className","rootClassName","children","hasSider","tagName","style"]),Ee=(0,se.Z)(ve,["suffixCls"]),{getPrefixCls:ne,layout:Oe}=R.useContext(B.E_),xe=ne("layout",Te),[te,Fe]=Ze(xe),Ae=H()(xe,{[`${xe}-has-sider`]:typeof _=="boolean"?_:N.length>0,[`${xe}-rtl`]:j==="rtl"},Oe==null?void 0:Oe.className,ze,Me,Fe),le=R.useMemo(()=>({siderHook:{addSider:$e=>{De(nt=>[].concat((0,v.Z)(nt),[$e]))},removeSider:$e=>{De(nt=>nt.filter(St=>St!==$e))}}}),[]);return te(R.createElement(g.Provider,{value:le},R.createElement(me,Object.assign({ref:w,className:Ae,style:Object.assign(Object.assign({},Oe==null?void 0:Oe.style),T)},Ee),he)))}),st=X({tagName:"div",displayName:"Layout"})(Ce),Re=X({suffixCls:"header",tagName:"header",displayName:"Header"})(z),de=X({suffixCls:"footer",tagName:"footer",displayName:"Footer"})(z),ae=X({suffixCls:"content",tagName:"main",displayName:"Content"})(z);var ue=st},40875:function(Ht,lt,u){"use strict";u.d(lt,{J:function(){return B}});var v=u(59301),O=u(33234),H=u(70425),se=function(ee,ce){var fe={};for(var M in ee)Object.prototype.hasOwnProperty.call(ee,M)&&ce.indexOf(M)<0&&(fe[M]=ee[M]);if(ee!=null&&typeof Object.getOwnPropertySymbols=="function")for(var Ze=0,M=Object.getOwnPropertySymbols(ee);Ze{const{children:fe}=ee,M=se(ee,["children"]),Ze=v.useContext(R),P=v.useMemo(()=>Object.assign(Object.assign({},Ze),M),[Ze,M.prefixCls,M.mode,M.selectable]);return v.createElement(R.Provider,{value:P},v.createElement(O.BR,null,(0,H.supportNodeRef)(fe)?v.cloneElement(fe,{ref:ce}):fe))});lt.Z=R},20834:function(Ht,lt,u){"use strict";u.d(lt,{default:function(){return yt}});var v=u(15285),O=u(59301),H=u(45818),se=u(92310),R=u.n(se),B=u(36355),ee=function(V,Z){var L={};for(var U in V)Object.prototype.hasOwnProperty.call(V,U)&&Z.indexOf(U)<0&&(L[U]=V[U]);if(V!=null&&typeof Object.getOwnPropertySymbols=="function")for(var J=0,U=Object.getOwnPropertySymbols(V);J{const{prefixCls:Z,className:L,dashed:U}=V,J=ee(V,["prefixCls","className","dashed"]),{getPrefixCls:Se}=O.useContext(B.E_),x=Se("menu",Z),C=R()({[`${x}-item-divider-dashed`]:!!U},L);return O.createElement(v.iz,Object.assign({className:C},J))},M=u(11592),Ze=u(2738),P=u(6848),g=u(92343),z=(0,O.createContext)({prefixCls:"",firstLevel:!0,inlineCollapsed:!1}),st=V=>{var Z;const{className:L,children:U,icon:J,title:Se,danger:x}=V,{prefixCls:C,firstLevel:Q,direction:I,disableMenuItemTitleTooltip:F,inlineCollapsed:pe}=O.useContext(z),je=Pe=>{const et=O.createElement("span",{className:`${C}-title-content`},U);return(!J||(0,g.l$)(U)&&U.type==="span")&&U&&Pe&&Q&&typeof U=="string"?O.createElement("div",{className:`${C}-inline-collapsed-noicon`},U.charAt(0)):et},{siderCollapsed:Be}=O.useContext(H.D);let it=Se;typeof Se=="undefined"?it=Q?U:"":Se===!1&&(it="");const _e={title:it};!Be&&!pe&&(_e.title=null,_e.open=!1);const Ye=(0,M.Z)(U).length;let re=O.createElement(v.ck,Object.assign({},(0,Ze.Z)(V,["title","icon","danger"]),{className:R()({[`${C}-item-danger`]:x,[`${C}-item-only-child`]:(J?Ye+1:Ye)===1},L),title:typeof Se=="string"?Se:void 0}),(0,g.Tm)(J,{className:R()((0,g.l$)(J)?(Z=J.props)===null||Z===void 0?void 0:Z.className:"",`${C}-item-icon`)}),je(pe));return F||(re=O.createElement(P.Z,Object.assign({},_e,{placement:I==="rtl"?"left":"right",overlayClassName:`${C}-inline-collapsed-tooltip`}),re)),re},de=V=>{var Z;const{popupClassName:L,icon:U,title:J,theme:Se}=V,x=O.useContext(z),{prefixCls:C,inlineCollapsed:Q,theme:I}=x,F=(0,v.Xl)();let pe;if(!U)pe=Q&&!F.length&&J&&typeof J=="string"?O.createElement("div",{className:`${C}-inline-collapsed-noicon`},J.charAt(0)):O.createElement("span",{className:`${C}-title-content`},J);else{const Be=(0,g.l$)(J)&&J.type==="span";pe=O.createElement(O.Fragment,null,(0,g.Tm)(U,{className:R()((0,g.l$)(U)?(Z=U.props)===null||Z===void 0?void 0:Z.className:"",`${C}-item-icon`)}),Be?J:O.createElement("span",{className:`${C}-title-content`},J))}const je=O.useMemo(()=>Object.assign(Object.assign({},x),{firstLevel:!1}),[x]);return O.createElement(z.Provider,{value:je},O.createElement(v.Wd,Object.assign({},(0,Ze.Z)(V,["icon"]),{title:pe,popupClassName:R()(C,L,`${C}-${Se||I}`)})))},ae=u(18785),ue=u(70425),A=u(62892),w=u(40875),j=function(V,Z){var L={};for(var U in V)Object.prototype.hasOwnProperty.call(V,U)&&Z.indexOf(U)<0&&(L[U]=V[U]);if(V!=null&&typeof Object.getOwnPropertySymbols=="function")for(var J=0,U=Object.getOwnPropertySymbols(V);J{if(Z&&typeof Z=="object"){const U=Z,{label:J,children:Se,key:x,type:C}=U,Q=j(U,["label","children","key","type"]),I=x!=null?x:`tmp-${L}`;return Se||C==="group"?C==="group"?O.createElement(v.BW,Object.assign({key:I},Q,{title:J}),N(Se)):O.createElement(de,Object.assign({key:I},Q,{title:J}),N(Se)):C==="divider"?O.createElement(fe,Object.assign({key:I},Q)):O.createElement(st,Object.assign({key:I},Q),J)}return null}).filter(Z=>Z)}function De(V){return O.useMemo(()=>V&&N(V),[V])}var Te=u(64993),ze=u(17313),Me=u(8378),he=u(13826),_=u(29878),me=u(83116),T=u(37613),Ee=V=>{const{componentCls:Z,motionDurationSlow:L,horizontalLineHeight:U,colorSplit:J,lineWidth:Se,lineType:x,itemPaddingInline:C}=V;return{[`${Z}-horizontal`]:{lineHeight:U,border:0,borderBottom:`${Se}px ${x} ${J}`,boxShadow:"none","&::after":{display:"block",clear:"both",height:0,content:'"\\20"'},[`${Z}-item, ${Z}-submenu`]:{position:"relative",display:"inline-block",verticalAlign:"bottom",paddingInline:C},[`> ${Z}-item:hover, > ${Z}-item-active, > ${Z}-submenu ${Z}-submenu-title:hover`]:{backgroundColor:"transparent"},[`${Z}-item, ${Z}-submenu-title`]:{transition:[`border-color ${L}`,`background ${L}`].join(",")},[`${Z}-submenu-arrow`]:{display:"none"}}}},Oe=V=>{let{componentCls:Z,menuArrowOffset:L}=V;return{[`${Z}-rtl`]:{direction:"rtl"},[`${Z}-submenu-rtl`]:{transformOrigin:"100% 0"},[`${Z}-rtl${Z}-vertical, ${Z}-submenu-rtl ${Z}-vertical`]:{[`${Z}-submenu-arrow`]:{"&::before":{transform:`rotate(-45deg) translateY(-${L})`},"&::after":{transform:`rotate(45deg) translateY(${L})`}}}}};const xe=V=>Object.assign({},(0,ze.oN)(V));var Fe=(V,Z)=>{const{componentCls:L,itemColor:U,itemSelectedColor:J,groupTitleColor:Se,itemBg:x,subMenuItemBg:C,itemSelectedBg:Q,activeBarHeight:I,activeBarWidth:F,activeBarBorderWidth:pe,motionDurationSlow:je,motionEaseInOut:Be,motionEaseOut:it,itemPaddingInline:_e,motionDurationMid:Ye,itemHoverColor:re,lineType:Pe,colorSplit:et,itemDisabledColor:oe,dangerItemColor:dt,dangerItemHoverColor:pt,dangerItemSelectedColor:ft,dangerItemActiveBg:ot,dangerItemSelectedBg:_t,itemHoverBg:jt,itemActiveBg:Zt,menuSubMenuBg:Yt,horizontalItemSelectedColor:Mt,horizontalItemSelectedBg:$t,horizontalItemBorderRadius:xt,horizontalItemHoverBg:Ft,popupBg:qt}=V;return{[`${L}-${Z}, ${L}-${Z} > ${L}`]:{color:U,background:x,[`&${L}-root:focus-visible`]:Object.assign({},xe(V)),[`${L}-item-group-title`]:{color:Se},[`${L}-submenu-selected`]:{[`> ${L}-submenu-title`]:{color:J}},[`${L}-item-disabled, ${L}-submenu-disabled`]:{color:`${oe} !important`},[`${L}-item:not(${L}-item-selected):not(${L}-submenu-selected)`]:{[`&:hover, > ${L}-submenu-title:hover`]:{color:re}},[`&:not(${L}-horizontal)`]:{[`${L}-item:not(${L}-item-selected)`]:{"&:hover":{backgroundColor:jt},"&:active":{backgroundColor:Zt}},[`${L}-submenu-title`]:{"&:hover":{backgroundColor:jt},"&:active":{backgroundColor:Zt}}},[`${L}-item-danger`]:{color:dt,[`&${L}-item:hover`]:{[`&:not(${L}-item-selected):not(${L}-submenu-selected)`]:{color:pt}},[`&${L}-item:active`]:{background:ot}},[`${L}-item a`]:{"&, &:hover":{color:"inherit"}},[`${L}-item-selected`]:{color:J,[`&${L}-item-danger`]:{color:ft},"a, a:hover":{color:"inherit"}},[`& ${L}-item-selected`]:{backgroundColor:Q,[`&${L}-item-danger`]:{backgroundColor:_t}},[`${L}-item, ${L}-submenu-title`]:{[`&:not(${L}-item-disabled):focus-visible`]:Object.assign({},xe(V))},[`&${L}-submenu > ${L}`]:{backgroundColor:Yt},[`&${L}-popup > ${L}`]:{backgroundColor:qt},[`&${L}-horizontal`]:Object.assign(Object.assign({},Z==="dark"?{borderBottom:0}:{}),{[`> ${L}-item, > ${L}-submenu`]:{top:pe,marginTop:-pe,marginBottom:0,borderRadius:xt,"&::after":{position:"absolute",insetInline:_e,bottom:0,borderBottom:`${I}px solid transparent`,transition:`border-color ${je} ${Be}`,content:'""'},"&:hover, &-active, &-open":{background:Ft,"&::after":{borderBottomWidth:I,borderBottomColor:Mt}},"&-selected":{color:Mt,backgroundColor:$t,"&:hover":{backgroundColor:$t},"&::after":{borderBottomWidth:I,borderBottomColor:Mt}}}}),[`&${L}-root`]:{[`&${L}-inline, &${L}-vertical`]:{borderInlineEnd:`${pe}px ${Pe} ${et}`}},[`&${L}-inline`]:{[`${L}-sub${L}-inline`]:{background:C},[`${L}-item, ${L}-submenu-title`]:pe&&F?{width:`calc(100% + ${pe}px)`}:{},[`${L}-item`]:{position:"relative","&::after":{position:"absolute",insetBlock:0,insetInlineEnd:0,borderInlineEnd:`${F}px solid ${J}`,transform:"scaleY(0.0001)",opacity:0,transition:[`transform ${Ye} ${it}`,`opacity ${Ye} ${it}`].join(","),content:'""'},[`&${L}-item-danger`]:{"&::after":{borderInlineEndColor:ft}}},[`${L}-selected, ${L}-item-selected`]:{"&::after":{transform:"scaleY(1)",opacity:1,transition:[`transform ${Ye} ${Be}`,`opacity ${Ye} ${Be}`].join(",")}}}}}};const Ae=V=>{const{componentCls:Z,itemHeight:L,itemMarginInline:U,padding:J,menuArrowSize:Se,marginXS:x,itemMarginBlock:C}=V,Q=J+Se+x;return{[`${Z}-item`]:{position:"relative",overflow:"hidden"},[`${Z}-item, ${Z}-submenu-title`]:{height:L,lineHeight:`${L}px`,paddingInline:J,overflow:"hidden",textOverflow:"ellipsis",marginInline:U,marginBlock:C,width:`calc(100% - ${U*2}px)`},[`> ${Z}-item, > ${Z}-submenu > ${Z}-submenu-title`]:{height:L,lineHeight:`${L}px`},[`${Z}-item-group-list ${Z}-submenu-title, ${Z}-submenu-title`]:{paddingInlineEnd:Q}}};var $e=V=>{const{componentCls:Z,iconCls:L,itemHeight:U,colorTextLightSolid:J,dropdownWidth:Se,controlHeightLG:x,motionDurationMid:C,motionEaseOut:Q,paddingXL:I,itemMarginInline:F,fontSizeLG:pe,motionDurationSlow:je,paddingXS:Be,boxShadowSecondary:it,collapsedWidth:_e,collapsedIconSize:Ye}=V,re={height:U,lineHeight:`${U}px`,listStylePosition:"inside",listStyleType:"disc"};return[{[Z]:{"&-inline, &-vertical":Object.assign({[`&${Z}-root`]:{boxShadow:"none"}},Ae(V))},[`${Z}-submenu-popup`]:{[`${Z}-vertical`]:Object.assign(Object.assign({},Ae(V)),{boxShadow:it})}},{[`${Z}-submenu-popup ${Z}-vertical${Z}-sub`]:{minWidth:Se,maxHeight:`calc(100vh - ${x*2.5}px)`,padding:"0",overflow:"hidden",borderInlineEnd:0,"&:not([class*='-active'])":{overflowX:"hidden",overflowY:"auto"}}},{[`${Z}-inline`]:{width:"100%",[`&${Z}-root`]:{[`${Z}-item, ${Z}-submenu-title`]:{display:"flex",alignItems:"center",transition:[`border-color ${je}`,`background ${je}`,`padding ${C} ${Q}`].join(","),[`> ${Z}-title-content`]:{flex:"auto",minWidth:0,overflow:"hidden",textOverflow:"ellipsis"},"> *":{flex:"none"}}},[`${Z}-sub${Z}-inline`]:{padding:0,border:0,borderRadius:0,boxShadow:"none",[`& > ${Z}-submenu > ${Z}-submenu-title`]:re,[`& ${Z}-item-group-title`]:{paddingInlineStart:I}},[`${Z}-item`]:re}},{[`${Z}-inline-collapsed`]:{width:_e,[`&${Z}-root`]:{[`${Z}-item, ${Z}-submenu ${Z}-submenu-title`]:{[`> ${Z}-inline-collapsed-noicon`]:{fontSize:pe,textAlign:"center"}}},[`> ${Z}-item, > ${Z}-item-group > ${Z}-item-group-list > ${Z}-item, > ${Z}-item-group > ${Z}-item-group-list > ${Z}-submenu > ${Z}-submenu-title, > ${Z}-submenu > ${Z}-submenu-title`]:{insetInlineStart:0,paddingInline:`calc(50% - ${pe/2}px - ${F}px)`,textOverflow:"clip",[` ${Z}-submenu-arrow, ${Z}-submenu-expand-icon `]:{opacity:0},[`${Z}-item-icon, ${L}`]:{margin:0,fontSize:Ye,lineHeight:`${U}px`,"+ span":{display:"inline-block",opacity:0}}},[`${Z}-item-icon, ${L}`]:{display:"inline-block"},"&-tooltip":{pointerEvents:"none",[`${Z}-item-icon, ${L}`]:{display:"none"},"a, a:hover":{color:J}},[`${Z}-item-group-title`]:Object.assign(Object.assign({},ze.vS),{paddingInline:Be})}}]};const nt=V=>{const{componentCls:Z,motionDurationSlow:L,motionDurationMid:U,motionEaseInOut:J,motionEaseOut:Se,iconCls:x,iconSize:C,iconMarginInlineEnd:Q}=V;return{[`${Z}-item, ${Z}-submenu-title`]:{position:"relative",display:"block",margin:0,whiteSpace:"nowrap",cursor:"pointer",transition:[`border-color ${L}`,`background ${L}`,`padding ${L} ${J}`].join(","),[`${Z}-item-icon, ${x}`]:{minWidth:C,fontSize:C,transition:[`font-size ${U} ${Se}`,`margin ${L} ${J}`,`color ${L}`].join(","),"+ span":{marginInlineStart:Q,opacity:1,transition:[`opacity ${L} ${J}`,`margin ${L}`,`color ${L}`].join(",")}},[`${Z}-item-icon`]:Object.assign({},(0,ze.Ro)()),[`&${Z}-item-only-child`]:{[`> ${x}, > ${Z}-item-icon`]:{marginInlineEnd:0}}},[`${Z}-item-disabled, ${Z}-submenu-disabled`]:{background:"none !important",cursor:"not-allowed","&::after":{borderColor:"transparent !important"},a:{color:"inherit !important"},[`> ${Z}-submenu-title`]:{color:"inherit !important",cursor:"not-allowed"}}}},St=V=>{const{componentCls:Z,motionDurationSlow:L,motionEaseInOut:U,borderRadius:J,menuArrowSize:Se,menuArrowOffset:x}=V;return{[`${Z}-submenu`]:{"&-expand-icon, &-arrow":{position:"absolute",top:"50%",insetInlineEnd:V.margin,width:Se,color:"currentcolor",transform:"translateY(-50%)",transition:`transform ${L} ${U}, opacity ${L}`},"&-arrow":{"&::before, &::after":{position:"absolute",width:Se*.6,height:Se*.15,backgroundColor:"currentcolor",borderRadius:J,transition:[`background ${L} ${U}`,`transform ${L} ${U}`,`top ${L} ${U}`,`color ${L} ${U}`].join(","),content:'""'},"&::before":{transform:`rotate(45deg) translateY(-${x})`},"&::after":{transform:`rotate(-45deg) translateY(${x})`}}}}},Rt=V=>{const{antCls:Z,componentCls:L,fontSize:U,motionDurationSlow:J,motionDurationMid:Se,motionEaseInOut:x,paddingXS:C,padding:Q,colorSplit:I,lineWidth:F,zIndexPopup:pe,borderRadiusLG:je,subMenuItemBorderRadius:Be,menuArrowSize:it,menuArrowOffset:_e,lineType:Ye,menuPanelMaskInset:re,groupTitleLineHeight:Pe,groupTitleFontSize:et}=V;return[{"":{[`${L}`]:Object.assign(Object.assign({},(0,ze.dF)()),{"&-hidden":{display:"none"}})},[`${L}-submenu-hidden`]:{display:"none"}},{[L]:Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({},(0,ze.Wf)(V)),(0,ze.dF)()),{marginBottom:0,paddingInlineStart:0,fontSize:U,lineHeight:0,listStyle:"none",outline:"none",transition:`width ${J} cubic-bezier(0.2, 0, 0, 1) 0s`,"ul, ol":{margin:0,padding:0,listStyle:"none"},"&-overflow":{display:"flex",[`${L}-item`]:{flex:"none"}},[`${L}-item, ${L}-submenu, ${L}-submenu-title`]:{borderRadius:V.itemBorderRadius},[`${L}-item-group-title`]:{padding:`${C}px ${Q}px`,fontSize:et,lineHeight:Pe,transition:`all ${J}`},[`&-horizontal ${L}-submenu`]:{transition:[`border-color ${J} ${x}`,`background ${J} ${x}`].join(",")},[`${L}-submenu, ${L}-submenu-inline`]:{transition:[`border-color ${J} ${x}`,`background ${J} ${x}`,`padding ${Se} ${x}`].join(",")},[`${L}-submenu ${L}-sub`]:{cursor:"initial",transition:[`background ${J} ${x}`,`padding ${J} ${x}`].join(",")},[`${L}-title-content`]:{transition:`color ${J}`},[`${L}-item a`]:{"&::before":{position:"absolute",inset:0,backgroundColor:"transparent",content:'""'}},[`${L}-item-divider`]:{overflow:"hidden",lineHeight:0,borderColor:I,borderStyle:Ye,borderWidth:0,borderTopWidth:F,marginBlock:F,padding:0,"&-dashed":{borderStyle:"dashed"}}}),nt(V)),{[`${L}-item-group`]:{[`${L}-item-group-list`]:{margin:0,padding:0,[`${L}-item, ${L}-submenu-title`]:{paddingInline:`${U*2}px ${Q}px`}}},"&-submenu":{"&-popup":{position:"absolute",zIndex:pe,borderRadius:je,boxShadow:"none",transformOrigin:"0 0",[`&${L}-submenu`]:{background:"transparent"},"&::before":{position:"absolute",inset:`${re}px 0 0`,zIndex:-1,width:"100%",height:"100%",opacity:0,content:'""'}},"&-placement-rightTop::before":{top:0,insetInlineStart:re},"\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:V.paddingXS},"\n &-placement-rightTop,\n &-placement-rightBottom\n ":{paddingInlineStart:V.paddingXS},"\n &-placement-topRight,\n &-placement-topLeft\n ":{paddingBottom:V.paddingXS},"\n &-placement-bottomRight,\n &-placement-bottomLeft\n ":{paddingTop:V.paddingXS},[`> ${L}`]:Object.assign(Object.assign(Object.assign({borderRadius:je},nt(V)),St(V)),{[`${L}-item, ${L}-submenu > ${L}-submenu-title`]:{borderRadius:Be},[`${L}-submenu-title::after`]:{transition:`transform ${J} ${x}`}})}}),St(V)),{[`&-inline-collapsed ${L}-submenu-arrow, &-inline ${L}-submenu-arrow`]:{"&::before":{transform:`rotate(-45deg) translateX(${_e})`},"&::after":{transform:`rotate(45deg) translateX(-${_e})`}},[`${L}-submenu-open${L}-submenu-inline > ${L}-submenu-title > ${L}-submenu-arrow`]:{transform:`translateY(-${it*.2}px)`,"&::after":{transform:`rotate(-45deg) translateX(-${_e})`},"&::before":{transform:`rotate(45deg) translateX(${_e})`}}})},{[`${Z}-layout-header`]:{[L]:{lineHeight:"inherit"}}}]};var Et=(V,Z)=>(0,me.Z)("Menu",U=>{if(Z===!1)return[];const{colorBgElevated:J,colorPrimary:Se,colorTextLightSolid:x,controlHeightLG:C,fontSize:Q,darkItemColor:I,darkDangerItemColor:F,darkItemBg:pe,darkSubMenuItemBg:je,darkItemSelectedColor:Be,darkItemSelectedBg:it,darkDangerItemSelectedBg:_e,darkItemHoverBg:Ye,darkGroupTitleColor:re,darkItemHoverColor:Pe,darkItemDisabledColor:et,darkDangerItemHoverColor:oe,darkDangerItemSelectedColor:dt,darkDangerItemActiveBg:pt}=U,ft=Q/7*5,ot=(0,T.TS)(U,{menuArrowSize:ft,menuHorizontalHeight:C*1.15,menuArrowOffset:`${ft*.25}px`,menuPanelMaskInset:-7,menuSubMenuBg:J}),_t=(0,T.TS)(ot,{itemColor:I,itemHoverColor:Pe,groupTitleColor:re,itemSelectedColor:Be,itemBg:pe,popupBg:pe,subMenuItemBg:je,itemActiveBg:"transparent",itemSelectedBg:it,activeBarHeight:0,activeBarBorderWidth:0,itemHoverBg:Ye,itemDisabledColor:et,dangerItemColor:F,dangerItemHoverColor:oe,dangerItemSelectedColor:dt,dangerItemActiveBg:pt,dangerItemSelectedBg:_e,menuSubMenuBg:je,horizontalItemSelectedColor:x,horizontalItemSelectedBg:Se});return[Rt(ot),Ee(ot),$e(ot),Fe(ot,"light"),Fe(_t,"dark"),Oe(ot),(0,Me.Z)(ot),(0,he.oN)(ot,"slide-up"),(0,he.oN)(ot,"slide-down"),(0,_._y)(ot,"zoom-big")]},U=>{const{colorPrimary:J,colorError:Se,colorTextDisabled:x,colorErrorBg:C,colorText:Q,colorTextDescription:I,colorBgContainer:F,colorFillAlter:pe,colorFillContent:je,lineWidth:Be,lineWidthBold:it,controlItemBgActive:_e,colorBgTextHover:Ye,controlHeightLG:re,lineHeight:Pe,colorBgElevated:et,marginXXS:oe,padding:dt,fontSize:pt,controlHeightSM:ft,fontSizeLG:ot,colorTextLightSolid:_t,colorErrorHover:jt}=U,Zt=new Te.C(_t).setAlpha(.65).toRgbString();return{dropdownWidth:160,zIndexPopup:U.zIndexPopupBase+50,radiusItem:U.borderRadiusLG,itemBorderRadius:U.borderRadiusLG,radiusSubMenuItem:U.borderRadiusSM,subMenuItemBorderRadius:U.borderRadiusSM,colorItemText:Q,itemColor:Q,colorItemTextHover:Q,itemHoverColor:Q,colorItemTextHoverHorizontal:J,horizontalItemHoverColor:J,colorGroupTitle:I,groupTitleColor:I,colorItemTextSelected:J,itemSelectedColor:J,colorItemTextSelectedHorizontal:J,horizontalItemSelectedColor:J,colorItemBg:F,itemBg:F,colorItemBgHover:Ye,itemHoverBg:Ye,colorItemBgActive:je,itemActiveBg:_e,colorSubItemBg:pe,subMenuItemBg:pe,colorItemBgSelected:_e,itemSelectedBg:_e,colorItemBgSelectedHorizontal:"transparent",horizontalItemSelectedBg:"transparent",colorActiveBarWidth:0,activeBarWidth:0,colorActiveBarHeight:it,activeBarHeight:it,colorActiveBarBorderSize:Be,activeBarBorderWidth:Be,colorItemTextDisabled:x,itemDisabledColor:x,colorDangerItemText:Se,dangerItemColor:Se,colorDangerItemTextHover:Se,dangerItemHoverColor:Se,colorDangerItemTextSelected:Se,dangerItemSelectedColor:Se,colorDangerItemBgActive:C,dangerItemActiveBg:C,colorDangerItemBgSelected:C,dangerItemSelectedBg:C,itemMarginInline:U.marginXXS,horizontalItemBorderRadius:0,horizontalItemHoverBg:"transparent",itemHeight:re,groupTitleLineHeight:Pe,collapsedWidth:re*2,popupBg:et,itemMarginBlock:oe,itemPaddingInline:dt,horizontalLineHeight:`${re*1.15}px`,iconSize:pt,iconMarginInlineEnd:ft-pt,collapsedIconSize:ot,groupTitleFontSize:pt,darkItemDisabledColor:new Te.C(_t).setAlpha(.25).toRgbString(),darkItemColor:Zt,darkDangerItemColor:Se,darkItemBg:"#001529",darkSubMenuItemBg:"#000c17",darkItemSelectedColor:_t,darkItemSelectedBg:J,darkDangerItemSelectedBg:Se,darkItemHoverBg:"transparent",darkGroupTitleColor:Zt,darkItemHoverColor:_t,darkDangerItemHoverColor:jt,darkDangerItemSelectedColor:_t,darkDangerItemActiveBg:Se}},{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"]]})(V),vt=function(V,Z){var L={};for(var U in V)Object.prototype.hasOwnProperty.call(V,U)&&Z.indexOf(U)<0&&(L[U]=V[U]);if(V!=null&&typeof Object.getOwnPropertySymbols=="function")for(var J=0,U=Object.getOwnPropertySymbols(V);J{var L,U;const J=O.useContext(w.Z),Se=J||{},{getPrefixCls:x,getPopupContainer:C,direction:Q,menu:I}=O.useContext(B.E_),F=x(),{prefixCls:pe,className:je,style:Be,theme:it="light",expandIcon:_e,_internalDisableMenuItemTitleTooltip:Ye,inlineCollapsed:re,siderCollapsed:Pe,items:et,children:oe,rootClassName:dt,mode:pt,selectable:ft,onClick:ot,overflowedIndicatorPopupClassName:_t}=V,jt=vt(V,["prefixCls","className","style","theme","expandIcon","_internalDisableMenuItemTitleTooltip","inlineCollapsed","siderCollapsed","items","children","rootClassName","mode","selectable","onClick","overflowedIndicatorPopupClassName"]),Zt=(0,Ze.Z)(jt,["collapsedWidth"]),Yt=De(et)||oe;(L=Se.validator)===null||L===void 0||L.call(Se,{mode:pt});const Mt=(0,ue.useEvent)(function(){var mn;ot==null||ot.apply(void 0,arguments),(mn=Se.onClick)===null||mn===void 0||mn.call(Se)}),$t=Se.mode||pt,xt=ft!=null?ft:Se.selectable,Ft=O.useMemo(()=>Pe!==void 0?Pe:re,[re,Pe]),qt={horizontal:{motionName:`${F}-slide-up`},inline:(0,A.Z)(F),other:{motionName:`${F}-zoom-big`}},Bt=x("menu",pe||Se.prefixCls),[Kt,hn]=Et(Bt,!J),en=R()(`${Bt}-${it}`,I==null?void 0:I.className,je);let xn;if(typeof _e=="function")xn=_e;else if(_e===null||_e===!1)xn=null;else if(Se.expandIcon===null||Se.expandIcon===!1)xn=null;else{const mn=_e!=null?_e:Se.expandIcon;xn=(0,g.Tm)(mn,{className:R()(`${Bt}-submenu-expand-icon`,(0,g.l$)(mn)?(U=mn.props)===null||U===void 0?void 0:U.className:"")})}const an=O.useMemo(()=>({prefixCls:Bt,inlineCollapsed:Ft||!1,direction:Q,firstLevel:!0,theme:it,mode:$t,disableMenuItemTitleTooltip:Ye}),[Bt,Ft,Q,Ye,it]);return Kt(O.createElement(w.Z.Provider,{value:null},O.createElement(z.Provider,{value:an},O.createElement(v.ZP,Object.assign({getPopupContainer:C,overflowedIndicator:O.createElement(ae.Z,null),overflowedIndicatorPopupClassName:R()(Bt,`${Bt}-${it}`,_t),mode:$t,selectable:xt,onClick:Mt},Zt,{inlineCollapsed:Ft,style:Object.assign(Object.assign({},I==null?void 0:I.style),Be),className:en,prefixCls:Bt,direction:Q,defaultMotions:qt,expandIcon:xn,ref:Z,rootClassName:R()(dt,hn)}),Yt))))});const qe=(0,O.forwardRef)((V,Z)=>{const L=(0,O.useRef)(null),U=O.useContext(H.D);return(0,O.useImperativeHandle)(Z,()=>({menu:L.current,focus:J=>{var Se;(Se=L.current)===null||Se===void 0||Se.focus(J)}})),O.createElement(gt,Object.assign({ref:L},V,U))});qe.Item=st,qe.SubMenu=de,qe.Divider=fe,qe.ItemGroup=v.BW;var yt=qe},58421:function(Ht,lt,u){"use strict";u.d(lt,{Z:function(){return Se}});var v=u(96663),O=u(59301),H={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M272.9 512l265.4-339.1c4.1-5.2.4-12.9-6.3-12.9h-77.3c-4.9 0-9.6 2.3-12.6 6.1L186.8 492.3a31.99 31.99 0 000 39.5l255.3 326.1c3 3.9 7.7 6.1 12.6 6.1H532c6.7 0 10.4-7.7 6.3-12.9L272.9 512zm304 0l265.4-339.1c4.1-5.2.4-12.9-6.3-12.9h-77.3c-4.9 0-9.6 2.3-12.6 6.1L490.8 492.3a31.99 31.99 0 000 39.5l255.3 326.1c3 3.9 7.7 6.1 12.6 6.1H836c6.7 0 10.4-7.7 6.3-12.9L576.9 512z"}}]},name:"double-left",theme:"outlined"},se=H,R=u(7657),B=function(C,Q){return O.createElement(R.Z,(0,v.Z)({},C,{ref:Q,icon:se}))},ee=O.forwardRef(B),ce=ee,fe=u(49198),M=u(33853),Ze=u(38819),P=u(92310),g=u.n(P),X=u(90493),z=u(44127),Ce=u(52884),st=u(95727),Re=u(65711),de=u(85745),ae=u(26112),ue={ZERO:48,NINE:57,NUMPAD_ZERO:96,NUMPAD_NINE:105,BACKSPACE:8,DELETE:46,ENTER:13,ARROW_UP:38,ARROW_DOWN:40},A=ue,w=u(91735),j=function(x){(0,Re.Z)(Q,x);var C=(0,de.Z)(Q);function Q(){var I;(0,Ce.Z)(this,Q);for(var F=arguments.length,pe=new Array(F),je=0;je=0||Be.relatedTarget.className.indexOf("".concat(re,"-item"))>=0))&&Ye(I.getValidValue()))},I.go=function(Be){var it=I.state.goInputText;it!==""&&(Be.keyCode===A.ENTER||Be.type==="click")&&(I.setState({goInputText:""}),I.props.quickGo(I.getValidValue()))},I}return(0,st.Z)(Q,[{key:"getPageSizeOptions",value:function(){var F=this.props,pe=F.pageSize,je=F.pageSizeOptions;return je.some(function(Be){return Be.toString()===pe.toString()})?je:je.concat([pe.toString()]).sort(function(Be,it){var _e=Number.isNaN(Number(Be))?0:Number(Be),Ye=Number.isNaN(Number(it))?0:Number(it);return _e-Ye})}},{key:"render",value:function(){var F=this,pe=this.props,je=pe.pageSize,Be=pe.locale,it=pe.rootPrefixCls,_e=pe.changeSize,Ye=pe.quickGo,re=pe.goButton,Pe=pe.selectComponentClass,et=pe.buildOptionText,oe=pe.selectPrefixCls,dt=pe.disabled,pt=this.state.goInputText,ft="".concat(it,"-options"),ot=Pe,_t=null,jt=null,Zt=null;if(!_e&&!Ye)return null;var Yt=this.getPageSizeOptions();if(_e&&ot){var Mt=Yt.map(function($t,xt){return O.createElement(ot.Option,{key:xt,value:$t.toString()},(et||F.buildOptionText)($t))});_t=O.createElement(ot,{disabled:dt,prefixCls:oe,showSearch:!1,className:"".concat(ft,"-size-changer"),optionLabelProp:"children",popupMatchSelectWidth:!1,value:(je||Yt[0]).toString(),onChange:this.changeSize,getPopupContainer:function(xt){return xt.parentNode},"aria-label":Be.page_size,defaultOpen:!1},Mt)}return Ye&&(re&&(Zt=typeof re=="boolean"?O.createElement("button",{type:"button",onClick:this.go,onKeyUp:this.go,disabled:dt,className:"".concat(ft,"-quick-jumper-button")},Be.jump_to_confirm):O.createElement("span",{onClick:this.go,onKeyUp:this.go},re)),jt=O.createElement("div",{className:"".concat(ft,"-quick-jumper")},Be.jump_to,O.createElement("input",{disabled:dt,type:"text",value:pt,onChange:this.handleChange,onKeyUp:this.go,onBlur:this.handleBlur,"aria-label":Be.page}),Be.page,Zt)),O.createElement("li",{className:"".concat(ft)},_t,jt)}}]),Q}(O.Component);j.defaultProps={pageSizeOptions:["10","20","50","100"]};var N=j,De=function(C){var Q,I=C.rootPrefixCls,F=C.page,pe=C.active,je=C.className,Be=C.showTitle,it=C.onClick,_e=C.onKeyPress,Ye=C.itemRender,re="".concat(I,"-item"),Pe=g()(re,"".concat(re,"-").concat(F),(Q={},(0,X.Z)(Q,"".concat(re,"-active"),pe),(0,X.Z)(Q,"".concat(re,"-disabled"),!F),(0,X.Z)(Q,C.className,je),Q)),et=function(){it(F)},oe=function(ft){_e(ft,it,F)},dt=Ye(F,"page",O.createElement("a",{rel:"nofollow"},F));return dt?O.createElement("li",{title:Be?F.toString():null,className:Pe,onClick:et,onKeyPress:oe,tabIndex:0},dt):null},Te=De;function ze(){}function Me(x){var C=Number(x);return typeof C=="number"&&!Number.isNaN(C)&&isFinite(C)&&Math.floor(C)===C}var he=function(C,Q,I){return I};function _(x,C,Q){var I=typeof x=="undefined"?C.pageSize:x;return Math.floor((Q.total-1)/I)+1}var me=function(x){(0,Re.Z)(Q,x);var C=(0,de.Z)(Q);function Q(I){var F;(0,Ce.Z)(this,Q),F=C.call(this,I),F.paginationNode=O.createRef(),F.getJumpPrevPage=function(){return Math.max(1,F.state.current-(F.props.showLessItems?3:5))},F.getJumpNextPage=function(){return Math.min(_(void 0,F.state,F.props),F.state.current+(F.props.showLessItems?3:5))},F.getItemIcon=function(_e,Ye){var re=F.props.prefixCls,Pe=_e||O.createElement("button",{type:"button","aria-label":Ye,className:"".concat(re,"-item-link")});return typeof _e=="function"&&(Pe=O.createElement(_e,(0,z.Z)({},F.props))),Pe},F.isValid=function(_e){var Ye=F.props.total;return Me(_e)&&_e!==F.state.current&&Me(Ye)&&Ye>0},F.shouldDisplayQuickJumper=function(){var _e=F.props,Ye=_e.showQuickJumper,re=_e.total,Pe=F.state.pageSize;return re<=Pe?!1:Ye},F.handleKeyDown=function(_e){(_e.keyCode===A.ARROW_UP||_e.keyCode===A.ARROW_DOWN)&&_e.preventDefault()},F.handleKeyUp=function(_e){var Ye=F.getValidValue(_e),re=F.state.currentInputValue;Ye!==re&&F.setState({currentInputValue:Ye}),_e.keyCode===A.ENTER?F.handleChange(Ye):_e.keyCode===A.ARROW_UP?F.handleChange(Ye-1):_e.keyCode===A.ARROW_DOWN&&F.handleChange(Ye+1)},F.handleBlur=function(_e){var Ye=F.getValidValue(_e);F.handleChange(Ye)},F.changePageSize=function(_e){var Ye=F.state.current,re=_(_e,F.state,F.props);Ye=Ye>re?re:Ye,re===0&&(Ye=F.state.current),typeof _e=="number"&&("pageSize"in F.props||F.setState({pageSize:_e}),"current"in F.props||F.setState({current:Ye,currentInputValue:Ye})),F.props.onShowSizeChange(Ye,_e),"onChange"in F.props&&F.props.onChange&&F.props.onChange(Ye,_e)},F.handleChange=function(_e){var Ye=F.props,re=Ye.disabled,Pe=Ye.onChange,et=F.state,oe=et.pageSize,dt=et.current,pt=et.currentInputValue;if(F.isValid(_e)&&!re){var ft=_(void 0,F.state,F.props),ot=_e;return _e>ft?ot=ft:_e<1&&(ot=1),"current"in F.props||F.setState({current:ot}),ot!==pt&&F.setState({currentInputValue:ot}),Pe(ot,oe),ot}return dt},F.prev=function(){F.hasPrev()&&F.handleChange(F.state.current-1)},F.next=function(){F.hasNext()&&F.handleChange(F.state.current+1)},F.jumpPrev=function(){F.handleChange(F.getJumpPrevPage())},F.jumpNext=function(){F.handleChange(F.getJumpNextPage())},F.hasPrev=function(){return F.state.current>1},F.hasNext=function(){return F.state.current<_(void 0,F.state,F.props)},F.runIfEnter=function(_e,Ye){if(_e.key==="Enter"||_e.charCode===13){for(var re=arguments.length,Pe=new Array(re>2?re-2:0),et=2;et=je?it=je:it=Number(pe),it}},{key:"getShowSizeChanger",value:function(){var F=this.props,pe=F.showSizeChanger,je=F.total,Be=F.totalBoundaryShowSizeChanger;return typeof pe!="undefined"?pe:je>Be}},{key:"render",value:function(){var F=this.props,pe=F.prefixCls,je=F.className,Be=F.style,it=F.disabled,_e=F.hideOnSinglePage,Ye=F.total,re=F.locale,Pe=F.showQuickJumper,et=F.showLessItems,oe=F.showTitle,dt=F.showTotal,pt=F.simple,ft=F.itemRender,ot=F.showPrevNextJumpers,_t=F.jumpPrevIcon,jt=F.jumpNextIcon,Zt=F.selectComponentClass,Yt=F.selectPrefixCls,Mt=F.pageSizeOptions,$t=this.state,xt=$t.current,Ft=$t.pageSize,qt=$t.currentInputValue;if(_e===!0&&Ye<=Ft)return null;var Bt=_(void 0,this.state,this.props),Kt=[],hn=null,en=null,xn=null,an=null,mn=null,Ot=Pe&&Pe.goButton,Xe=et?1:2,l=xt-1>0?xt-1:0,h=xt+1Ye?Ye:xt*Ft]));if(pt){Ot&&(typeof Ot=="boolean"?mn=O.createElement("button",{type:"button",onClick:this.handleGoTO,onKeyUp:this.handleGoTO},re.jump_to_confirm):mn=O.createElement("span",{onClick:this.handleGoTO,onKeyUp:this.handleGoTO},Ot),mn=O.createElement("li",{title:oe?"".concat(re.jump_to).concat(xt,"/").concat(Bt):null,className:"".concat(pe,"-simple-pager")},mn));var p=this.renderPrev(l);return O.createElement("ul",(0,v.Z)({className:g()(pe,"".concat(pe,"-simple"),(0,X.Z)({},"".concat(pe,"-disabled"),it),je),style:Be,ref:this.paginationNode},f),d,p?O.createElement("li",{title:oe?re.prev_page:null,onClick:this.prev,tabIndex:this.hasPrev()?0:null,onKeyPress:this.runIfEnterPrev,className:g()("".concat(pe,"-prev"),(0,X.Z)({},"".concat(pe,"-disabled"),!this.hasPrev())),"aria-disabled":!this.hasPrev()},p):null,O.createElement("li",{title:oe?"".concat(xt,"/").concat(Bt):null,className:"".concat(pe,"-simple-pager")},O.createElement("input",{type:"text",value:qt,disabled:it,onKeyDown:this.handleKeyDown,onKeyUp:this.handleKeyUp,onChange:this.handleKeyUp,onBlur:this.handleBlur,size:3}),O.createElement("span",{className:"".concat(pe,"-slash")},"/"),Bt),O.createElement("li",{title:oe?re.next_page:null,onClick:this.next,tabIndex:this.hasPrev()?0:null,onKeyPress:this.runIfEnterNext,className:g()("".concat(pe,"-next"),(0,X.Z)({},"".concat(pe,"-disabled"),!this.hasNext())),"aria-disabled":!this.hasNext()},this.renderNext(h)),mn)}if(Bt<=3+Xe*2){var b={locale:re,rootPrefixCls:pe,onClick:this.handleChange,onKeyPress:this.runIfEnter,showTitle:oe,itemRender:ft};Bt||Kt.push(O.createElement(Te,(0,v.Z)({},b,{key:"noPager",page:1,className:"".concat(pe,"-item-disabled")})));for(var E=1;E<=Bt;E+=1){var q=xt===E;Kt.push(O.createElement(Te,(0,v.Z)({},b,{key:E,page:E,active:q})))}}else{var K=et?re.prev_3:re.prev_5,ye=et?re.next_3:re.next_5,Ue=ft(this.getJumpPrevPage(),"jump-prev",this.getItemIcon(_t,"prev page")),Ge=ft(this.getJumpNextPage(),"jump-next",this.getItemIcon(jt,"next page"));ot&&(hn=Ue?O.createElement("li",{title:oe?K:null,key:"prev",onClick:this.jumpPrev,tabIndex:0,onKeyPress:this.runIfEnterJumpPrev,className:g()("".concat(pe,"-jump-prev"),(0,X.Z)({},"".concat(pe,"-jump-prev-custom-icon"),!!_t))},Ue):null,en=Ge?O.createElement("li",{title:oe?ye:null,key:"next",tabIndex:0,onClick:this.jumpNext,onKeyPress:this.runIfEnterJumpNext,className:g()("".concat(pe,"-jump-next"),(0,X.Z)({},"".concat(pe,"-jump-next-custom-icon"),!!jt))},Ge):null),an=O.createElement(Te,{locale:re,last:!0,rootPrefixCls:pe,onClick:this.handleChange,onKeyPress:this.runIfEnter,key:Bt,page:Bt,active:!1,showTitle:oe,itemRender:ft}),xn=O.createElement(Te,{locale:re,rootPrefixCls:pe,onClick:this.handleChange,onKeyPress:this.runIfEnter,key:1,page:1,active:!1,showTitle:oe,itemRender:ft});var Le=Math.max(1,xt-Xe),rt=Math.min(xt+Xe,Bt);xt-1<=Xe&&(rt=1+Xe*2),Bt-xt<=Xe&&(Le=Bt-Xe*2);for(var Qe=Le;Qe<=rt;Qe+=1){var tt=xt===Qe;Kt.push(O.createElement(Te,{locale:re,rootPrefixCls:pe,onClick:this.handleChange,onKeyPress:this.runIfEnter,key:Qe,page:Qe,active:tt,showTitle:oe,itemRender:ft}))}xt-1>=Xe*2&&xt!==3&&(Kt[0]=(0,O.cloneElement)(Kt[0],{className:"".concat(pe,"-item-after-jump-prev")}),Kt.unshift(hn)),Bt-xt>=Xe*2&&xt!==Bt-2&&(Kt[Kt.length-1]=(0,O.cloneElement)(Kt[Kt.length-1],{className:"".concat(pe,"-item-before-jump-next")}),Kt.push(en)),Le!==1&&Kt.unshift(xn),rt!==Bt&&Kt.push(an)}var Je=!this.hasPrev()||!Bt,$=!this.hasNext()||!Bt,ge=this.renderPrev(l),we=this.renderNext(h);return O.createElement("ul",(0,v.Z)({className:g()(pe,je,(0,X.Z)({},"".concat(pe,"-disabled"),it)),style:Be,ref:this.paginationNode},f),d,ge?O.createElement("li",{title:oe?re.prev_page:null,onClick:this.prev,tabIndex:Je?null:0,onKeyPress:this.runIfEnterPrev,className:g()("".concat(pe,"-prev"),(0,X.Z)({},"".concat(pe,"-disabled"),Je)),"aria-disabled":Je},ge):null,Kt,we?O.createElement("li",{title:oe?re.next_page:null,onClick:this.next,tabIndex:$?null:0,onKeyPress:this.runIfEnterNext,className:g()("".concat(pe,"-next"),(0,X.Z)({},"".concat(pe,"-disabled"),$)),"aria-disabled":$},we):null,O.createElement(N,{disabled:it,locale:re,rootPrefixCls:pe,selectComponentClass:Zt,selectPrefixCls:Yt,changeSize:this.getShowSizeChanger()?this.changePageSize:null,current:xt,pageSize:Ft,pageSizeOptions:Mt,quickGo:this.shouldDisplayQuickJumper()?this.handleChange:null,goButton:Ot}))}}],[{key:"getDerivedStateFromProps",value:function(F,pe){var je={};if("current"in F&&(je.current=F.current,F.current!==pe.current&&(je.currentInputValue=je.current)),"pageSize"in F&&F.pageSize!==pe.pageSize){var Be=pe.current,it=_(F.pageSize,pe,F);Be=Be>it?it:Be,"current"in F||(je.current=Be,je.currentInputValue=Be),je.pageSize=F.pageSize}return je}}]),Q}(O.Component);me.defaultProps={defaultCurrent:1,total:0,defaultPageSize:10,onChange:ze,className:"",selectPrefixCls:"rc-select",prefixCls:"rc-pagination",selectComponentClass:null,hideOnSinglePage:!1,showPrevNextJumpers:!0,showQuickJumper:!1,showLessItems:!1,showTitle:!0,onShowSizeChange:ze,locale:w.Z,style:{},itemRender:he,totalBoundaryShowSizeChanger:50};var T=me,ve=u(22075),Ee=u(36355),ne=u(19716),Oe=u(8628),xe=u(9763),te=u(57809);const Fe=x=>O.createElement(te.default,Object.assign({},x,{showSearch:!0,size:"small"})),Ae=x=>O.createElement(te.default,Object.assign({},x,{showSearch:!0,size:"middle"}));Fe.Option=te.default.Option,Ae.Option=te.default.Option;var le=u(9937),$e=u(17313),nt=u(83116),St=u(37613);const Rt=x=>{const{componentCls:C}=x;return{[`${C}-disabled`]:{"&, &:hover":{cursor:"not-allowed",[`${C}-item-link`]:{color:x.colorTextDisabled,cursor:"not-allowed"}},"&:focus-visible":{cursor:"not-allowed",[`${C}-item-link`]:{color:x.colorTextDisabled,cursor:"not-allowed"}}},[`&${C}-disabled`]:{cursor:"not-allowed",[`${C}-item`]:{cursor:"not-allowed","&:hover, &:active":{backgroundColor:"transparent"},a:{color:x.colorTextDisabled,backgroundColor:"transparent",border:"none",cursor:"not-allowed"},"&-active":{borderColor:x.colorBorder,backgroundColor:x.itemActiveBgDisabled,"&:hover, &:active":{backgroundColor:x.itemActiveBgDisabled},a:{color:x.itemActiveColorDisabled}}},[`${C}-item-link`]:{color:x.colorTextDisabled,cursor:"not-allowed","&:hover, &:active":{backgroundColor:"transparent"},[`${C}-simple&`]:{backgroundColor:"transparent","&:hover, &:active":{backgroundColor:"transparent"}}},[`${C}-simple-pager`]:{color:x.colorTextDisabled},[`${C}-jump-prev, ${C}-jump-next`]:{[`${C}-item-link-icon`]:{opacity:0},[`${C}-item-ellipsis`]:{opacity:1}}},[`&${C}-simple`]:{[`${C}-prev, ${C}-next`]:{[`&${C}-disabled ${C}-item-link`]:{"&:hover, &:active":{backgroundColor:"transparent"}}}}}},Et=x=>{const{componentCls:C}=x;return{[`&${C}-mini ${C}-total-text, &${C}-mini ${C}-simple-pager`]:{height:x.itemSizeSM,lineHeight:`${x.itemSizeSM}px`},[`&${C}-mini ${C}-item`]:{minWidth:x.itemSizeSM,height:x.itemSizeSM,margin:0,lineHeight:`${x.itemSizeSM-2}px`},[`&${C}-mini:not(${C}-disabled) ${C}-item:not(${C}-item-active)`]:{backgroundColor:"transparent",borderColor:"transparent","&:hover":{backgroundColor:x.colorBgTextHover},"&:active":{backgroundColor:x.colorBgTextActive}},[`&${C}-mini ${C}-prev, &${C}-mini ${C}-next`]:{minWidth:x.itemSizeSM,height:x.itemSizeSM,margin:0,lineHeight:`${x.itemSizeSM}px`},[`&${C}-mini:not(${C}-disabled)`]:{[`${C}-prev, ${C}-next`]:{[`&:hover ${C}-item-link`]:{backgroundColor:x.colorBgTextHover},[`&:active ${C}-item-link`]:{backgroundColor:x.colorBgTextActive},[`&${C}-disabled:hover ${C}-item-link`]:{backgroundColor:"transparent"}}},[` &${C}-mini ${C}-prev ${C}-item-link, &${C}-mini ${C}-next ${C}-item-link `]:{backgroundColor:"transparent",borderColor:"transparent","&::after":{height:x.itemSizeSM,lineHeight:`${x.itemSizeSM}px`}},[`&${C}-mini ${C}-jump-prev, &${C}-mini ${C}-jump-next`]:{height:x.itemSizeSM,marginInlineEnd:0,lineHeight:`${x.itemSizeSM}px`},[`&${C}-mini ${C}-options`]:{marginInlineStart:x.paginationMiniOptionsMarginInlineStart,"&-size-changer":{top:x.miniOptionsSizeChangerTop},"&-quick-jumper":{height:x.itemSizeSM,lineHeight:`${x.itemSizeSM}px`,input:Object.assign(Object.assign({},(0,le.x0)(x)),{width:x.paginationMiniQuickJumperInputWidth,height:x.controlHeightSM})}}}},vt=x=>{const{componentCls:C}=x;return{[` &${C}-simple ${C}-prev, &${C}-simple ${C}-next `]:{height:x.itemSizeSM,lineHeight:`${x.itemSizeSM}px`,verticalAlign:"top",[`${C}-item-link`]:{height:x.itemSizeSM,backgroundColor:"transparent",border:0,"&:hover":{backgroundColor:x.colorBgTextHover},"&:active":{backgroundColor:x.colorBgTextActive},"&::after":{height:x.itemSizeSM,lineHeight:`${x.itemSizeSM}px`}}},[`&${C}-simple ${C}-simple-pager`]:{display:"inline-block",height:x.itemSizeSM,marginInlineEnd:x.marginXS,input:{boxSizing:"border-box",height:"100%",marginInlineEnd:x.marginXS,padding:`0 ${x.paginationItemPaddingInline}px`,textAlign:"center",backgroundColor:x.itemInputBg,border:`${x.lineWidth}px ${x.lineType} ${x.colorBorder}`,borderRadius:x.borderRadius,outline:"none",transition:`border-color ${x.motionDurationMid}`,color:"inherit","&:hover":{borderColor:x.colorPrimary},"&:focus":{borderColor:x.colorPrimaryHover,boxShadow:`${x.inputOutlineOffset}px 0 ${x.controlOutlineWidth}px ${x.controlOutline}`},"&[disabled]":{color:x.colorTextDisabled,backgroundColor:x.colorBgContainerDisabled,borderColor:x.colorBorder,cursor:"not-allowed"}}}}},It=x=>{const{componentCls:C}=x;return{[`${C}-jump-prev, ${C}-jump-next`]:{outline:0,[`${C}-item-container`]:{position:"relative",[`${C}-item-link-icon`]:{color:x.colorPrimary,fontSize:x.fontSizeSM,opacity:0,transition:`all ${x.motionDurationMid}`,"&-svg":{top:0,insetInlineEnd:0,bottom:0,insetInlineStart:0,margin:"auto"}},[`${C}-item-ellipsis`]:{position:"absolute",top:0,insetInlineEnd:0,bottom:0,insetInlineStart:0,display:"block",margin:"auto",color:x.colorTextDisabled,fontFamily:"Arial, Helvetica, sans-serif",letterSpacing:x.paginationEllipsisLetterSpacing,textAlign:"center",textIndent:x.paginationEllipsisTextIndent,opacity:1,transition:`all ${x.motionDurationMid}`}},"&:hover":{[`${C}-item-link-icon`]:{opacity:1},[`${C}-item-ellipsis`]:{opacity:0}}},[` ${C}-prev, ${C}-jump-prev, ${C}-jump-next `]:{marginInlineEnd:x.marginXS},[` ${C}-prev, ${C}-next, ${C}-jump-prev, ${C}-jump-next `]:{display:"inline-block",minWidth:x.itemSize,height:x.itemSize,color:x.colorText,fontFamily:x.fontFamily,lineHeight:`${x.itemSize}px`,textAlign:"center",verticalAlign:"middle",listStyle:"none",borderRadius:x.borderRadius,cursor:"pointer",transition:`all ${x.motionDurationMid}`},[`${C}-prev, ${C}-next`]:{fontFamily:"Arial, Helvetica, sans-serif",outline:0,button:{color:x.colorText,cursor:"pointer",userSelect:"none"},[`${C}-item-link`]:{display:"block",width:"100%",height:"100%",padding:0,fontSize:x.fontSizeSM,textAlign:"center",backgroundColor:"transparent",border:`${x.lineWidth}px ${x.lineType} transparent`,borderRadius:x.borderRadius,outline:"none",transition:`all ${x.motionDurationMid}`},[`&:hover ${C}-item-link`]:{backgroundColor:x.colorBgTextHover},[`&:active ${C}-item-link`]:{backgroundColor:x.colorBgTextActive},[`&${C}-disabled:hover`]:{[`${C}-item-link`]:{backgroundColor:"transparent"}}},[`${C}-slash`]:{marginInlineEnd:x.paginationSlashMarginInlineEnd,marginInlineStart:x.paginationSlashMarginInlineStart},[`${C}-options`]:{display:"inline-block",marginInlineStart:x.margin,verticalAlign:"middle","&-size-changer.-select":{display:"inline-block",width:"auto"},"&-quick-jumper":{display:"inline-block",height:x.controlHeight,marginInlineStart:x.marginXS,lineHeight:`${x.controlHeight}px`,verticalAlign:"top",input:Object.assign(Object.assign({},(0,le.ik)(x)),{width:x.controlHeightLG*1.25,height:x.controlHeight,boxSizing:"border-box",margin:0,marginInlineStart:x.marginXS,marginInlineEnd:x.marginXS})}}}},gt=x=>{const{componentCls:C}=x;return{[`${C}-item`]:{display:"inline-block",minWidth:x.itemSize,height:x.itemSize,marginInlineEnd:x.marginXS,fontFamily:x.fontFamily,lineHeight:`${x.itemSize-2}px`,textAlign:"center",verticalAlign:"middle",listStyle:"none",backgroundColor:"transparent",border:`${x.lineWidth}px ${x.lineType} transparent`,borderRadius:x.borderRadius,outline:0,cursor:"pointer",userSelect:"none",a:{display:"block",padding:`0 ${x.paginationItemPaddingInline}px`,color:x.colorText,"&:hover":{textDecoration:"none"}},[`&:not(${C}-item-active)`]:{"&:hover":{transition:`all ${x.motionDurationMid}`,backgroundColor:x.colorBgTextHover},"&:active":{backgroundColor:x.colorBgTextActive}},"&-active":{fontWeight:x.fontWeightStrong,backgroundColor:x.itemActiveBg,borderColor:x.colorPrimary,a:{color:x.colorPrimary},"&:hover":{borderColor:x.colorPrimaryHover},"&:hover a":{color:x.colorPrimaryHover}}}}},qe=x=>{const{componentCls:C}=x;return{[C]:Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({},(0,$e.Wf)(x)),{"ul, ol":{margin:0,padding:0,listStyle:"none"},"&::after":{display:"block",clear:"both",height:0,overflow:"hidden",visibility:"hidden",content:'""'},[`${C}-total-text`]:{display:"inline-block",height:x.itemSize,marginInlineEnd:x.marginXS,lineHeight:`${x.itemSize-2}px`,verticalAlign:"middle"}}),gt(x)),It(x)),vt(x)),Et(x)),Rt(x)),{[`@media only screen and (max-width: ${x.screenLG}px)`]:{[`${C}-item`]:{"&-after-jump-prev, &-before-jump-next":{display:"none"}}},[`@media only screen and (max-width: ${x.screenSM}px)`]:{[`${C}-options`]:{display:"none"}}}),[`&${x.componentCls}-rtl`]:{direction:"rtl"}}},yt=x=>{const{componentCls:C}=x;return{[`${C}${C}-disabled:not(${C}-mini)`]:{"&, &:hover":{[`${C}-item-link`]:{borderColor:x.colorBorder}},"&:focus-visible":{[`${C}-item-link`]:{borderColor:x.colorBorder}},[`${C}-item, ${C}-item-link`]:{backgroundColor:x.colorBgContainerDisabled,borderColor:x.colorBorder,[`&:hover:not(${C}-item-active)`]:{backgroundColor:x.colorBgContainerDisabled,borderColor:x.colorBorder,a:{color:x.colorTextDisabled}},[`&${C}-item-active`]:{backgroundColor:x.itemActiveBgDisabled}},[`${C}-prev, ${C}-next`]:{"&:hover button":{backgroundColor:x.colorBgContainerDisabled,borderColor:x.colorBorder,color:x.colorTextDisabled},[`${C}-item-link`]:{backgroundColor:x.colorBgContainerDisabled,borderColor:x.colorBorder}}},[`${C}:not(${C}-mini)`]:{[`${C}-prev, ${C}-next`]:{"&:hover button":{borderColor:x.colorPrimaryHover,backgroundColor:x.itemBg},[`${C}-item-link`]:{backgroundColor:x.itemLinkBg,borderColor:x.colorBorder},[`&:hover ${C}-item-link`]:{borderColor:x.colorPrimary,backgroundColor:x.itemBg,color:x.colorPrimary},[`&${C}-disabled`]:{[`${C}-item-link`]:{borderColor:x.colorBorder,color:x.colorTextDisabled}}},[`${C}-item`]:{backgroundColor:x.itemBg,border:`${x.lineWidth}px ${x.lineType} ${x.colorBorder}`,[`&:hover:not(${C}-item-active)`]:{borderColor:x.colorPrimary,backgroundColor:x.itemBg,a:{color:x.colorPrimary}},"&-active":{borderColor:x.colorPrimary}}}}},V=x=>{const{componentCls:C}=x;return{[`${C}:not(${C}-disabled)`]:{[`${C}-item`]:Object.assign({},(0,$e.Qy)(x)),[`${C}-jump-prev, ${C}-jump-next`]:{"&:focus-visible":Object.assign({[`${C}-item-link-icon`]:{opacity:1},[`${C}-item-ellipsis`]:{opacity:0}},(0,$e.oN)(x))},[`${C}-prev, ${C}-next`]:{[`&:focus-visible ${C}-item-link`]:Object.assign({},(0,$e.oN)(x))}}}};var Z=(0,nt.Z)("Pagination",x=>{const C=(0,St.TS)(x,{inputOutlineOffset:0,paginationMiniOptionsMarginInlineStart:x.marginXXS/2,paginationMiniQuickJumperInputWidth:x.controlHeightLG*1.1,paginationItemPaddingInline:x.marginXXS*1.5,paginationEllipsisLetterSpacing:x.marginXXS/2,paginationSlashMarginInlineStart:x.marginXXS,paginationSlashMarginInlineEnd:x.marginSM,paginationEllipsisTextIndent:"0.13em"},(0,le.e5)(x),(0,le.TM)(x));return[qe(C),V(C),x.wireframe&&yt(C)]},x=>({itemBg:x.colorBgContainer,itemSize:x.controlHeight,itemSizeSM:x.controlHeightSM,itemActiveBg:x.colorBgContainer,itemLinkBg:x.colorBgContainer,itemActiveColorDisabled:x.colorTextDisabled,itemActiveBgDisabled:x.controlItemBgActiveDisabled,itemInputBg:x.colorBgContainer,miniOptionsSizeChangerTop:0})),L=function(x,C){var Q={};for(var I in x)Object.prototype.hasOwnProperty.call(x,I)&&C.indexOf(I)<0&&(Q[I]=x[I]);if(x!=null&&typeof Object.getOwnPropertySymbols=="function")for(var F=0,I=Object.getOwnPropertySymbols(x);F{const{prefixCls:C,selectPrefixCls:Q,className:I,rootClassName:F,style:pe,size:je,locale:Be,selectComponentClass:it,responsive:_e,showSizeChanger:Ye}=x,re=L(x,["prefixCls","selectPrefixCls","className","rootClassName","style","size","locale","selectComponentClass","responsive","showSizeChanger"]),{xs:Pe}=(0,Oe.Z)(_e),{getPrefixCls:et,direction:oe,pagination:dt={}}=O.useContext(Ee.E_),pt=et("pagination",C),[ft,ot]=Z(pt),_t=Ye!=null?Ye:dt.showSizeChanger,jt=O.useMemo(()=>{const Bt=O.createElement("span",{className:`${pt}-item-ellipsis`},"\u2022\u2022\u2022"),Kt=O.createElement("button",{className:`${pt}-item-link`,type:"button",tabIndex:-1},oe==="rtl"?O.createElement(Ze.Z,null):O.createElement(M.Z,null)),hn=O.createElement("button",{className:`${pt}-item-link`,type:"button",tabIndex:-1},oe==="rtl"?O.createElement(M.Z,null):O.createElement(Ze.Z,null)),en=O.createElement("a",{className:`${pt}-item-link`},O.createElement("div",{className:`${pt}-item-container`},oe==="rtl"?O.createElement(fe.Z,{className:`${pt}-item-link-icon`}):O.createElement(ce,{className:`${pt}-item-link-icon`}),Bt)),xn=O.createElement("a",{className:`${pt}-item-link`},O.createElement("div",{className:`${pt}-item-container`},oe==="rtl"?O.createElement(ce,{className:`${pt}-item-link-icon`}):O.createElement(fe.Z,{className:`${pt}-item-link-icon`}),Bt));return{prevIcon:Kt,nextIcon:hn,jumpPrevIcon:en,jumpNextIcon:xn}},[oe,pt]),[Zt]=(0,xe.Z)("Pagination",ve.Z),Yt=Object.assign(Object.assign({},Zt),Be),Mt=(0,ne.Z)(je),$t=Mt==="small"||!!(Pe&&!Mt&&_e),xt=et("select",Q),Ft=g()({[`${pt}-mini`]:$t,[`${pt}-rtl`]:oe==="rtl"},dt==null?void 0:dt.className,I,F,ot),qt=Object.assign(Object.assign({},dt==null?void 0:dt.style),pe);return ft(O.createElement(T,Object.assign({},jt,re,{style:qt,prefixCls:pt,selectPrefixCls:xt,className:Ft,selectComponentClass:it||($t?Fe:Ae),locale:Yt,showSizeChanger:_t})))},Se=J},93948:function(Ht,lt,u){"use strict";u.d(lt,{Z:function(){return Ye}});var v=u(59301),O=u(29679),H=u(40001),se=u(19248),R=u(99267),B=u(92310),ee=u.n(B),ce=u(2738),fe=u(36355),M=u(96663),Ze=u(44127),P=u(6620),g={percent:0,prefixCls:"rc-progress",strokeColor:"#2db7f5",strokeLinecap:"round",strokeWidth:1,trailColor:"#D9D9D9",trailWidth:1,gapPosition:"bottom"},X=function(){var Pe=(0,v.useRef)([]),et=(0,v.useRef)(null);return(0,v.useEffect)(function(){var oe=Date.now(),dt=!1;Pe.current.forEach(function(pt){if(pt){dt=!0;var ft=pt.style;ft.transitionDuration=".3s, .3s, .3s, .06s",et.current&&oe-et.current<100&&(ft.transitionDuration="0s, 0s")}}),dt&&(et.current=Date.now())}),Pe.current},z=["className","percent","prefixCls","strokeColor","strokeLinecap","strokeWidth","style","trailColor","trailWidth","transition"],Ce=function(Pe){var et=(0,Ze.Z)((0,Ze.Z)({},g),Pe),oe=et.className,dt=et.percent,pt=et.prefixCls,ft=et.strokeColor,ot=et.strokeLinecap,_t=et.strokeWidth,jt=et.style,Zt=et.trailColor,Yt=et.trailWidth,Mt=et.transition,$t=(0,P.Z)(et,z);delete $t.gapPosition;var xt=Array.isArray(dt)?dt:[dt],Ft=Array.isArray(ft)?ft:[ft],qt=X(),Bt=_t/2,Kt=100-_t/2,hn="M ".concat(ot==="round"?Bt:0,",").concat(Bt,` L `).concat(ot==="round"?Kt:100,",").concat(Bt),en="0 0 100 ".concat(_t),xn=0;return v.createElement("svg",(0,M.Z)({className:ee()("".concat(pt,"-line"),oe),viewBox:en,preserveAspectRatio:"none",style:jt},$t),v.createElement("path",{className:"".concat(pt,"-line-trail"),d:hn,strokeLinecap:ot,stroke:Zt,strokeWidth:Yt||_t,fillOpacity:"0"}),xt.map(function(an,mn){var Ot=1;switch(ot){case"round":Ot=1-_t/100;break;case"square":Ot=1-_t/2/100;break;default:Ot=1;break}var Xe={strokeDasharray:"".concat(an*Ot,"px, 100px"),strokeDashoffset:"-".concat(xn,"px"),transition:Mt||"stroke-dashoffset 0.3s ease 0s, stroke-dasharray .3s ease 0s, stroke 0.3s linear"},l=Ft[mn]||Ft[Ft.length-1];return xn+=an,v.createElement("path",{key:mn,className:"".concat(pt,"-line-path"),d:hn,strokeLinecap:ot,stroke:l,strokeWidth:_t,fillOpacity:"0",ref:function(f){qt[mn]=f},style:Xe})}))},st=Ce,Re=u(20135),de=u(72071),ae=u(47273),ue=0,A=(0,ae.Z)();function w(){var re;return A?(re=ue,ue+=1):re="TEST_OR_SSR",re}var j=function(re){var Pe=v.useState(),et=(0,de.Z)(Pe,2),oe=et[0],dt=et[1];return v.useEffect(function(){dt("rc_progress_".concat(w()))},[]),re||oe},N=function(Pe){var et=Pe.bg,oe=Pe.children;return v.createElement("div",{style:{width:"100%",height:"100%",background:et}},oe)};function De(re,Pe){return Object.keys(re).map(function(et){var oe=parseFloat(et),dt="".concat(Math.floor(oe*Pe),"%");return"".concat(re[et]," ").concat(dt)})}var Te=v.forwardRef(function(re,Pe){var et=re.prefixCls,oe=re.color,dt=re.gradientId,pt=re.radius,ft=re.style,ot=re.ptg,_t=re.strokeLinecap,jt=re.strokeWidth,Zt=re.size,Yt=re.gapDegree,Mt=oe&&(0,Re.Z)(oe)==="object",$t=Mt?"#FFF":void 0,xt=Zt/2,Ft=v.createElement("circle",{className:"".concat(et,"-circle-path"),r:pt,cx:xt,cy:xt,stroke:$t,strokeLinecap:_t,strokeWidth:jt,opacity:ot===0?0:1,style:ft,ref:Pe});if(!Mt)return Ft;var qt="".concat(dt,"-conic"),Bt=Yt?"".concat(180+Yt/2,"deg"):"0deg",Kt=De(oe,(360-Yt)/360),hn=De(oe,1),en="conic-gradient(from ".concat(Bt,", ").concat(Kt.join(", "),")"),xn="linear-gradient(to ".concat(Yt?"bottom":"top",", ").concat(hn.join(", "),")");return v.createElement(v.Fragment,null,v.createElement("mask",{id:qt},Ft),v.createElement("foreignObject",{x:0,y:0,width:Zt,height:Zt,mask:"url(#".concat(qt,")")},v.createElement(N,{bg:xn},v.createElement(N,{bg:en}))))}),ze=Te,Me=100,he=function(Pe,et,oe,dt,pt,ft,ot,_t,jt,Zt){var Yt=arguments.length>10&&arguments[10]!==void 0?arguments[10]:0,Mt=oe/100*360*((360-ft)/360),$t=ft===0?0:{bottom:0,top:180,left:90,right:-90}[ot],xt=(100-dt)/100*et;jt==="round"&&dt!==100&&(xt+=Zt/2,xt>=et&&(xt=et-.01));var Ft=Me/2;return{stroke:typeof _t=="string"?_t:void 0,strokeDasharray:"".concat(et,"px ").concat(Pe),strokeDashoffset:xt+Yt,transform:"rotate(".concat(pt+Mt+$t,"deg)"),transformOrigin:"".concat(Ft,"px ").concat(Ft,"px"),transition:"stroke-dashoffset .3s ease 0s, stroke-dasharray .3s ease 0s, stroke .3s, stroke-width .06s ease .3s, opacity .3s ease 0s",fillOpacity:0}},_=["id","prefixCls","steps","strokeWidth","trailWidth","gapDegree","gapPosition","trailColor","strokeLinecap","style","className","strokeColor","percent"];function me(re){var Pe=re!=null?re:[];return Array.isArray(Pe)?Pe:[Pe]}var T=function(Pe){var et=(0,Ze.Z)((0,Ze.Z)({},g),Pe),oe=et.id,dt=et.prefixCls,pt=et.steps,ft=et.strokeWidth,ot=et.trailWidth,_t=et.gapDegree,jt=_t===void 0?0:_t,Zt=et.gapPosition,Yt=et.trailColor,Mt=et.strokeLinecap,$t=et.style,xt=et.className,Ft=et.strokeColor,qt=et.percent,Bt=(0,P.Z)(et,_),Kt=Me/2,hn=j(oe),en="".concat(hn,"-gradient"),xn=Kt-ft/2,an=Math.PI*2*xn,mn=jt>0?90+jt/2:-90,Ot=an*((360-jt)/360),Xe=(0,Re.Z)(pt)==="object"?pt:{count:pt,space:2},l=Xe.count,h=Xe.space,f=me(qt),d=me(Ft),p=d.find(function(Ge){return Ge&&(0,Re.Z)(Ge)==="object"}),b=p&&(0,Re.Z)(p)==="object",E=b?"butt":Mt,q=he(an,Ot,0,100,mn,jt,Zt,Yt,E,ft),K=X(),ye=function(){var Le=0;return f.map(function(rt,Qe){var tt=d[Qe]||d[d.length-1],Je=he(an,Ot,Le,rt,mn,jt,Zt,tt,E,ft);return Le+=rt,v.createElement(ze,{key:Qe,color:tt,ptg:rt,radius:xn,prefixCls:dt,gradientId:en,style:Je,strokeLinecap:E,strokeWidth:ft,gapDegree:jt,ref:function(ge){K[Qe]=ge},size:Me})}).reverse()},Ue=function(){var Le=Math.round(l*(f[0]/100)),rt=100/l,Qe=0;return new Array(l).fill(null).map(function(tt,Je){var $=Je<=Le-1?d[0]:Yt,ge=$&&(0,Re.Z)($)==="object"?"url(#".concat(en,")"):void 0,we=he(an,Ot,Qe,rt,mn,jt,Zt,$,"butt",ft,h);return Qe+=(Ot-we.strokeDashoffset+h)*100/Ot,v.createElement("circle",{key:Je,className:"".concat(dt,"-circle-path"),r:xn,cx:Kt,cy:Kt,stroke:ge,strokeWidth:ft,opacity:1,style:we,ref:function(at){K[Je]=at}})})};return v.createElement("svg",(0,M.Z)({className:ee()("".concat(dt,"-circle"),xt),viewBox:"0 0 ".concat(Me," ").concat(Me),style:$t,id:oe,role:"presentation"},Bt),!l&&v.createElement("circle",{className:"".concat(dt,"-circle-trail"),r:xn,cx:Kt,cy:Kt,stroke:Yt,strokeLinecap:E,strokeWidth:ot||ft,style:q}),l?Ue():ye())},ve=T,Ee={Line:st,Circle:ve},ne=u(6848),Oe=u(93398);function xe(re){return!re||re<0?0:re>100?100:re}function te(re){let{success:Pe,successPercent:et}=re,oe=et;return Pe&&"progress"in Pe&&(oe=Pe.progress),Pe&&"percent"in Pe&&(oe=Pe.percent),oe}const Fe=re=>{let{percent:Pe,success:et,successPercent:oe}=re;const dt=xe(te({success:et,successPercent:oe}));return[dt,xe(xe(Pe)-dt)]},Ae=re=>{let{success:Pe={},strokeColor:et}=re;const{strokeColor:oe}=Pe;return[oe||Oe.presetPrimaryColors.green,et||null]},le=(re,Pe,et)=>{var oe,dt,pt,ft;let ot=-1,_t=-1;if(Pe==="step"){const jt=et.steps,Zt=et.strokeWidth;typeof re=="string"||typeof re=="undefined"?(ot=re==="small"?2:14,_t=Zt!=null?Zt:8):typeof re=="number"?[ot,_t]=[re,re]:[ot=14,_t=8]=re,ot*=jt}else if(Pe==="line"){const jt=et==null?void 0:et.strokeWidth;typeof re=="string"||typeof re=="undefined"?_t=jt||(re==="small"?6:8):typeof re=="number"?[ot,_t]=[re,re]:[ot=-1,_t=8]=re}else(Pe==="circle"||Pe==="dashboard")&&(typeof re=="string"||typeof re=="undefined"?[ot,_t]=re==="small"?[60,60]:[120,120]:typeof re=="number"?[ot,_t]=[re,re]:(ot=(dt=(oe=re[0])!==null&&oe!==void 0?oe:re[1])!==null&&dt!==void 0?dt:120,_t=(ft=(pt=re[0])!==null&&pt!==void 0?pt:re[1])!==null&&ft!==void 0?ft:120));return[ot,_t]},$e=3,nt=re=>$e/re*100;var Rt=re=>{const{prefixCls:Pe,trailColor:et=null,strokeLinecap:oe="round",gapPosition:dt,gapDegree:pt,width:ft=120,type:ot,children:_t,success:jt,size:Zt=ft}=re,[Yt,Mt]=le(Zt,"circle");let{strokeWidth:$t}=re;$t===void 0&&($t=Math.max(nt(Yt),6));const xt={width:Yt,height:Mt,fontSize:Yt*.15+6},Ft=v.useMemo(()=>{if(pt||pt===0)return pt;if(ot==="dashboard")return 75},[pt,ot]),qt=dt||ot==="dashboard"&&"bottom"||void 0,Bt=Object.prototype.toString.call(re.strokeColor)==="[object Object]",Kt=Ae({success:jt,strokeColor:re.strokeColor}),hn=ee()(`${Pe}-inner`,{[`${Pe}-circle-gradient`]:Bt}),en=v.createElement(ve,{percent:Fe(re),strokeWidth:$t,trailWidth:$t,strokeColor:Kt,strokeLinecap:oe,trailColor:et,prefixCls:Pe,gapDegree:Ft,gapPosition:qt});return v.createElement("div",{className:hn,style:xt},Yt<=20?v.createElement(ne.Z,{title:_t},v.createElement("span",null,en)):v.createElement(v.Fragment,null,en,_t))},Et=function(re,Pe){var et={};for(var oe in re)Object.prototype.hasOwnProperty.call(re,oe)&&Pe.indexOf(oe)<0&&(et[oe]=re[oe]);if(re!=null&&typeof Object.getOwnPropertySymbols=="function")for(var dt=0,oe=Object.getOwnPropertySymbols(re);dt{let Pe=[];return Object.keys(re).forEach(et=>{const oe=parseFloat(et.replace(/%/g,""));isNaN(oe)||Pe.push({key:oe,value:re[et]})}),Pe=Pe.sort((et,oe)=>et.key-oe.key),Pe.map(et=>{let{key:oe,value:dt}=et;return`${dt} ${oe}%`}).join(", ")},It=(re,Pe)=>{const{from:et=Oe.presetPrimaryColors.blue,to:oe=Oe.presetPrimaryColors.blue,direction:dt=Pe==="rtl"?"to left":"to right"}=re,pt=Et(re,["from","to","direction"]);if(Object.keys(pt).length!==0){const ft=vt(pt);return{backgroundImage:`linear-gradient(${dt}, ${ft})`}}return{backgroundImage:`linear-gradient(${dt}, ${et}, ${oe})`}};var qe=re=>{const{prefixCls:Pe,direction:et,percent:oe,size:dt,strokeWidth:pt,strokeColor:ft,strokeLinecap:ot="round",children:_t,trailColor:jt=null,success:Zt}=re,Yt=ft&&typeof ft!="string"?It(ft,et):{backgroundColor:ft},Mt=ot==="square"||ot==="butt"?0:void 0,$t={backgroundColor:jt||void 0,borderRadius:Mt},xt=dt!=null?dt:[-1,pt||(dt==="small"?6:8)],[Ft,qt]=le(xt,"line",{strokeWidth:pt}),Bt=Object.assign({width:`${xe(oe)}%`,height:qt,borderRadius:Mt},Yt),Kt=te(re),hn={width:`${xe(Kt)}%`,height:qt,borderRadius:Mt,backgroundColor:Zt==null?void 0:Zt.strokeColor},en={width:Ft<0?"100%":Ft,height:qt};return v.createElement(v.Fragment,null,v.createElement("div",{className:`${Pe}-outer`,style:en},v.createElement("div",{className:`${Pe}-inner`,style:$t},v.createElement("div",{className:`${Pe}-bg`,style:Bt}),Kt!==void 0?v.createElement("div",{className:`${Pe}-success-bg`,style:hn}):null)),_t)},V=re=>{const{size:Pe,steps:et,percent:oe=0,strokeWidth:dt=8,strokeColor:pt,trailColor:ft=null,prefixCls:ot,children:_t}=re,jt=Math.round(et*(oe/100)),Zt=Pe==="small"?2:14,Yt=Pe!=null?Pe:[Zt,dt],[Mt,$t]=le(Yt,"step",{steps:et,strokeWidth:dt}),xt=Mt/et,Ft=new Array(et);for(let qt=0;qt{const Pe=re?"100%":"-100%";return new Z.Keyframes(`antProgress${re?"RTL":"LTR"}Active`,{"0%":{transform:`translateX(${Pe}) scaleX(0)`,opacity:.1},"20%":{transform:`translateX(${Pe}) scaleX(0)`,opacity:.5},to:{transform:"translateX(0) scaleX(1)",opacity:0}})},x=re=>{const{componentCls:Pe,iconCls:et}=re;return{[Pe]:Object.assign(Object.assign({},(0,L.Wf)(re)),{display:"inline-block","&-rtl":{direction:"rtl"},"&-line":{position:"relative",width:"100%",fontSize:re.fontSize,marginInlineEnd:re.marginXS,marginBottom:re.marginXS},[`${Pe}-outer`]:{display:"inline-block",width:"100%"},[`&${Pe}-show-info`]:{[`${Pe}-outer`]:{marginInlineEnd:`calc(-2em - ${re.marginXS}px)`,paddingInlineEnd:`calc(2em + ${re.paddingXS}px)`}},[`${Pe}-inner`]:{position:"relative",display:"inline-block",width:"100%",overflow:"hidden",verticalAlign:"middle",backgroundColor:re.remainingColor,borderRadius:re.lineBorderRadius},[`${Pe}-inner:not(${Pe}-circle-gradient)`]:{[`${Pe}-circle-path`]:{stroke:re.defaultColor}},[`${Pe}-success-bg, ${Pe}-bg`]:{position:"relative",backgroundColor:re.defaultColor,borderRadius:re.lineBorderRadius,transition:`all ${re.motionDurationSlow} ${re.motionEaseInOutCirc}`},[`${Pe}-success-bg`]:{position:"absolute",insetBlockStart:0,insetInlineStart:0,backgroundColor:re.colorSuccess},[`${Pe}-text`]:{display:"inline-block",width:"2em",marginInlineStart:re.marginXS,color:re.colorText,lineHeight:1,whiteSpace:"nowrap",textAlign:"start",verticalAlign:"middle",wordBreak:"normal",[et]:{fontSize:re.fontSize}},[`&${Pe}-status-active`]:{[`${Pe}-bg::before`]:{position:"absolute",inset:0,backgroundColor:re.colorBgContainer,borderRadius:re.lineBorderRadius,opacity:0,animationName:Se(),animationDuration:re.progressActiveMotionDuration,animationTimingFunction:re.motionEaseOutQuint,animationIterationCount:"infinite",content:'""'}},[`&${Pe}-rtl${Pe}-status-active`]:{[`${Pe}-bg::before`]:{animationName:Se(!0)}},[`&${Pe}-status-exception`]:{[`${Pe}-bg`]:{backgroundColor:re.colorError},[`${Pe}-text`]:{color:re.colorError}},[`&${Pe}-status-exception ${Pe}-inner:not(${Pe}-circle-gradient)`]:{[`${Pe}-circle-path`]:{stroke:re.colorError}},[`&${Pe}-status-success`]:{[`${Pe}-bg`]:{backgroundColor:re.colorSuccess},[`${Pe}-text`]:{color:re.colorSuccess}},[`&${Pe}-status-success ${Pe}-inner:not(${Pe}-circle-gradient)`]:{[`${Pe}-circle-path`]:{stroke:re.colorSuccess}}})}},C=re=>{const{componentCls:Pe,iconCls:et}=re;return{[Pe]:{[`${Pe}-circle-trail`]:{stroke:re.remainingColor},[`&${Pe}-circle ${Pe}-inner`]:{position:"relative",lineHeight:1,backgroundColor:"transparent"},[`&${Pe}-circle ${Pe}-text`]:{position:"absolute",insetBlockStart:"50%",insetInlineStart:0,width:"100%",margin:0,padding:0,color:re.circleTextColor,fontSize:re.circleTextFontSize,lineHeight:1,whiteSpace:"normal",textAlign:"center",transform:"translateY(-50%)",[et]:{fontSize:`${re.fontSize/re.fontSizeSM}em`}},[`${Pe}-circle&-status-exception`]:{[`${Pe}-text`]:{color:re.colorError}},[`${Pe}-circle&-status-success`]:{[`${Pe}-text`]:{color:re.colorSuccess}}},[`${Pe}-inline-circle`]:{lineHeight:1,[`${Pe}-inner`]:{verticalAlign:"bottom"}}}},Q=re=>{const{componentCls:Pe}=re;return{[Pe]:{[`${Pe}-steps`]:{display:"inline-block","&-outer":{display:"flex",flexDirection:"row",alignItems:"center"},"&-item":{flexShrink:0,minWidth:re.progressStepMinWidth,marginInlineEnd:re.progressStepMarginInlineEnd,backgroundColor:re.remainingColor,transition:`all ${re.motionDurationSlow}`,"&-active":{backgroundColor:re.defaultColor}}}}}},I=re=>{const{componentCls:Pe,iconCls:et}=re;return{[Pe]:{[`${Pe}-small&-line, ${Pe}-small&-line ${Pe}-text ${et}`]:{fontSize:re.fontSizeSM}}}};var F=(0,U.Z)("Progress",re=>{const Pe=re.marginXXS/2,et=(0,J.TS)(re,{progressStepMarginInlineEnd:Pe,progressStepMinWidth:Pe,progressActiveMotionDuration:"2.4s"});return[x(et),C(et),Q(et),I(et)]},re=>({circleTextColor:re.colorText,defaultColor:re.colorInfo,remainingColor:re.colorFillSecondary,lineBorderRadius:100,circleTextFontSize:"1em"})),pe=function(re,Pe){var et={};for(var oe in re)Object.prototype.hasOwnProperty.call(re,oe)&&Pe.indexOf(oe)<0&&(et[oe]=re[oe]);if(re!=null&&typeof Object.getOwnPropertySymbols=="function")for(var dt=0,oe=Object.getOwnPropertySymbols(re);dt{const{prefixCls:et,className:oe,rootClassName:dt,steps:pt,strokeColor:ft,percent:ot=0,size:_t="default",showInfo:jt=!0,type:Zt="line",status:Yt,format:Mt,style:$t}=re,xt=pe(re,["prefixCls","className","rootClassName","steps","strokeColor","percent","size","showInfo","type","status","format","style"]),Ft=v.useMemo(()=>{var f,d;const p=te(re);return parseInt(p!==void 0?(f=p!=null?p:0)===null||f===void 0?void 0:f.toString():(d=ot!=null?ot:0)===null||d===void 0?void 0:d.toString(),10)},[ot,re.success,re.successPercent]),qt=v.useMemo(()=>!Be.includes(Yt)&&Ft>=100?"success":Yt||"normal",[Yt,Ft]),{getPrefixCls:Bt,direction:Kt,progress:hn}=v.useContext(fe.E_),en=Bt("progress",et),[xn,an]=F(en),mn=v.useMemo(()=>{if(!jt)return null;const f=te(re);let d;const p=Mt||(E=>`${E}%`),b=Zt==="line";return Mt||qt!=="exception"&&qt!=="success"?d=p(xe(ot),xe(f)):qt==="exception"?d=b?v.createElement(se.Z,null):v.createElement(R.Z,null):qt==="success"&&(d=b?v.createElement(O.Z,null):v.createElement(H.Z,null)),v.createElement("span",{className:`${en}-text`,title:typeof d=="string"?d:void 0},d)},[jt,ot,Ft,qt,Zt,en,Mt]),Ot=Array.isArray(ft)?ft[0]:ft,Xe=typeof ft=="string"||Array.isArray(ft)?ft:void 0;let l;Zt==="line"?l=pt?v.createElement(V,Object.assign({},re,{strokeColor:Xe,prefixCls:en,steps:pt}),mn):v.createElement(qe,Object.assign({},re,{strokeColor:Ot,prefixCls:en,direction:Kt}),mn):(Zt==="circle"||Zt==="dashboard")&&(l=v.createElement(Rt,Object.assign({},re,{strokeColor:Ot,prefixCls:en,progressStatus:qt}),mn));const h=ee()(en,`${en}-status-${qt}`,`${en}-${Zt==="dashboard"&&"circle"||pt&&"steps"||Zt}`,{[`${en}-inline-circle`]:Zt==="circle"&&le(_t,"circle")[0]<=20,[`${en}-show-info`]:jt,[`${en}-${_t}`]:typeof _t=="string",[`${en}-rtl`]:Kt==="rtl"},hn==null?void 0:hn.className,oe,dt,an);return xn(v.createElement("div",Object.assign({ref:Pe,style:Object.assign(Object.assign({},hn==null?void 0:hn.style),$t),className:h,role:"progressbar","aria-valuenow":Ft},(0,ce.Z)(xt,["trailColor","strokeWidth","width","gapDegree","gapPosition","strokeLinecap","success","successPercent"])),l))}),Ye=_e},5112:function(Ht,lt,u){"use strict";u.d(lt,{ZP:function(){return Oe}});var v=u(92310),O=u.n(v),H=u(18929),se=u(26112),R=u(59301),B=u(36355),ee=u(19716);const ce=R.createContext(null),fe=ce.Provider;var M=ce;const Ze=R.createContext(null),P=Ze.Provider;var g=u(5630),X=u(8654),z=u(1684),Ce=u(32441),st=u(17313),Re=u(83116),de=u(37613);const ae=xe=>{const{componentCls:te,antCls:Fe}=xe,Ae=`${te}-group`;return{[Ae]:Object.assign(Object.assign({},(0,st.Wf)(xe)),{display:"inline-block",fontSize:0,[`&${Ae}-rtl`]:{direction:"rtl"},[`${Fe}-badge ${Fe}-badge-count`]:{zIndex:1},[`> ${Fe}-badge:not(:first-child) > ${Fe}-button-wrapper`]:{borderInlineStart:"none"}})}},ue=xe=>{const{componentCls:te,wrapperMarginInlineEnd:Fe,colorPrimary:Ae,radioSize:le,motionDurationSlow:$e,motionDurationMid:nt,motionEaseInOutCirc:St,colorBgContainer:Rt,colorBorder:Et,lineWidth:vt,dotSize:It,colorBgContainerDisabled:gt,colorTextDisabled:qe,paddingXS:yt,dotColorDisabled:V,lineType:Z,radioDotDisabledSize:L,wireframe:U,colorWhite:J}=xe,Se=`${te}-inner`;return{[`${te}-wrapper`]:Object.assign(Object.assign({},(0,st.Wf)(xe)),{display:"inline-flex",alignItems:"baseline",marginInlineStart:0,marginInlineEnd:Fe,cursor:"pointer",[`&${te}-wrapper-rtl`]:{direction:"rtl"},"&-disabled":{cursor:"not-allowed",color:xe.colorTextDisabled},"&::after":{display:"inline-block",width:0,overflow:"hidden",content:'"\\a0"'},[`${te}-checked::after`]:{position:"absolute",insetBlockStart:0,insetInlineStart:0,width:"100%",height:"100%",border:`${vt}px ${Z} ${Ae}`,borderRadius:"50%",visibility:"hidden",content:'""'},[te]:Object.assign(Object.assign({},(0,st.Wf)(xe)),{position:"relative",display:"inline-block",outline:"none",cursor:"pointer",alignSelf:"center",borderRadius:"50%"}),[`${te}-wrapper:hover &, &:hover ${Se}`]:{borderColor:Ae},[`${te}-input:focus-visible + ${Se}`]:Object.assign({},(0,st.oN)(xe)),[`${te}:hover::after, ${te}-wrapper:hover &::after`]:{visibility:"visible"},[`${te}-inner`]:{"&::after":{boxSizing:"border-box",position:"absolute",insetBlockStart:"50%",insetInlineStart:"50%",display:"block",width:le,height:le,marginBlockStart:le/-2,marginInlineStart:le/-2,backgroundColor:U?Ae:J,borderBlockStart:0,borderInlineStart:0,borderRadius:le,transform:"scale(0)",opacity:0,transition:`all ${$e} ${St}`,content:'""'},boxSizing:"border-box",position:"relative",insetBlockStart:0,insetInlineStart:0,display:"block",width:le,height:le,backgroundColor:Rt,borderColor:Et,borderStyle:"solid",borderWidth:vt,borderRadius:"50%",transition:`all ${nt}`},[`${te}-input`]:{position:"absolute",inset:0,zIndex:1,cursor:"pointer",opacity:0},[`${te}-checked`]:{[Se]:{borderColor:Ae,backgroundColor:U?Rt:Ae,"&::after":{transform:`scale(${It/le})`,opacity:1,transition:`all ${$e} ${St}`}}},[`${te}-disabled`]:{cursor:"not-allowed",[Se]:{backgroundColor:gt,borderColor:Et,cursor:"not-allowed","&::after":{backgroundColor:V}},[`${te}-input`]:{cursor:"not-allowed"},[`${te}-disabled + span`]:{color:qe,cursor:"not-allowed"},[`&${te}-checked`]:{[Se]:{"&::after":{transform:`scale(${L/le})`}}}},[`span${te} + *`]:{paddingInlineStart:yt,paddingInlineEnd:yt}})}},A=xe=>{const{buttonColor:te,controlHeight:Fe,componentCls:Ae,lineWidth:le,lineType:$e,colorBorder:nt,motionDurationSlow:St,motionDurationMid:Rt,buttonPaddingInline:Et,fontSize:vt,buttonBg:It,fontSizeLG:gt,controlHeightLG:qe,controlHeightSM:yt,paddingXS:V,borderRadius:Z,borderRadiusSM:L,borderRadiusLG:U,buttonCheckedBg:J,buttonSolidCheckedColor:Se,colorTextDisabled:x,colorBgContainerDisabled:C,buttonCheckedBgDisabled:Q,buttonCheckedColorDisabled:I,colorPrimary:F,colorPrimaryHover:pe,colorPrimaryActive:je,buttonSolidCheckedBg:Be,buttonSolidCheckedHoverBg:it,buttonSolidCheckedActiveBg:_e}=xe;return{[`${Ae}-button-wrapper`]:{position:"relative",display:"inline-block",height:Fe,margin:0,paddingInline:Et,paddingBlock:0,color:te,fontSize:vt,lineHeight:`${Fe-le*2}px`,background:It,border:`${le}px ${$e} ${nt}`,borderBlockStartWidth:le+.02,borderInlineStartWidth:0,borderInlineEndWidth:le,cursor:"pointer",transition:[`color ${Rt}`,`background ${Rt}`,`box-shadow ${Rt}`].join(","),a:{color:te},[`> ${Ae}-button`]:{position:"absolute",insetBlockStart:0,insetInlineStart:0,zIndex:-1,width:"100%",height:"100%"},"&:not(:first-child)":{"&::before":{position:"absolute",insetBlockStart:-le,insetInlineStart:-le,display:"block",boxSizing:"content-box",width:1,height:"100%",paddingBlock:le,paddingInline:0,backgroundColor:nt,transition:`background-color ${St}`,content:'""'}},"&:first-child":{borderInlineStart:`${le}px ${$e} ${nt}`,borderStartStartRadius:Z,borderEndStartRadius:Z},"&:last-child":{borderStartEndRadius:Z,borderEndEndRadius:Z},"&:first-child:last-child":{borderRadius:Z},[`${Ae}-group-large &`]:{height:qe,fontSize:gt,lineHeight:`${qe-le*2}px`,"&:first-child":{borderStartStartRadius:U,borderEndStartRadius:U},"&:last-child":{borderStartEndRadius:U,borderEndEndRadius:U}},[`${Ae}-group-small &`]:{height:yt,paddingInline:V-le,paddingBlock:0,lineHeight:`${yt-le*2}px`,"&:first-child":{borderStartStartRadius:L,borderEndStartRadius:L},"&:last-child":{borderStartEndRadius:L,borderEndEndRadius:L}},"&:hover":{position:"relative",color:F},"&:has(:focus-visible)":Object.assign({},(0,st.oN)(xe)),[`${Ae}-inner, input[type='checkbox'], input[type='radio']`]:{width:0,height:0,opacity:0,pointerEvents:"none"},[`&-checked:not(${Ae}-button-wrapper-disabled)`]:{zIndex:1,color:F,background:J,borderColor:F,"&::before":{backgroundColor:F},"&:first-child":{borderColor:F},"&:hover":{color:pe,borderColor:pe,"&::before":{backgroundColor:pe}},"&:active":{color:je,borderColor:je,"&::before":{backgroundColor:je}}},[`${Ae}-group-solid &-checked:not(${Ae}-button-wrapper-disabled)`]:{color:Se,background:Be,borderColor:Be,"&:hover":{color:Se,background:it,borderColor:it},"&:active":{color:Se,background:_e,borderColor:_e}},"&-disabled":{color:x,backgroundColor:C,borderColor:nt,cursor:"not-allowed","&:first-child, &:hover":{color:x,backgroundColor:C,borderColor:nt}},[`&-disabled${Ae}-button-wrapper-checked`]:{color:I,backgroundColor:Q,borderColor:nt,boxShadow:"none"}}}},w=xe=>xe-4*2;var j=(0,Re.Z)("Radio",xe=>{const{controlOutline:te,controlOutlineWidth:Fe,radioSize:Ae}=xe,le=`0 0 0 ${Fe}px ${te}`,$e=le,nt=w(Ae),St=(0,de.TS)(xe,{radioDotDisabledSize:nt,radioFocusShadow:le,radioButtonFocusShadow:$e});return[ae(St),ue(St),A(St)]},xe=>{const{wireframe:te,padding:Fe,marginXS:Ae,lineWidth:le,fontSizeLG:$e,colorText:nt,colorBgContainer:St,colorTextDisabled:Rt,controlItemBgActiveDisabled:Et,colorTextLightSolid:vt,colorPrimary:It,colorPrimaryHover:gt,colorPrimaryActive:qe}=xe,yt=4,V=$e,Z=te?w(V):V-(yt+le)*2;return{radioSize:V,dotSize:Z,dotColorDisabled:Rt,buttonSolidCheckedColor:vt,buttonSolidCheckedBg:It,buttonSolidCheckedHoverBg:gt,buttonSolidCheckedActiveBg:qe,buttonBg:St,buttonCheckedBg:St,buttonColor:nt,buttonCheckedBgDisabled:Et,buttonCheckedColorDisabled:Rt,buttonPaddingInline:Fe-le,wrapperMarginInlineEnd:Ae}}),N=u(14088),De=u(4572),Te=function(xe,te){var Fe={};for(var Ae in xe)Object.prototype.hasOwnProperty.call(xe,Ae)&&te.indexOf(Ae)<0&&(Fe[Ae]=xe[Ae]);if(xe!=null&&typeof Object.getOwnPropertySymbols=="function")for(var le=0,Ae=Object.getOwnPropertySymbols(xe);le{var Fe,Ae;const le=R.useContext(M),$e=R.useContext(Ze),{getPrefixCls:nt,direction:St,radio:Rt}=R.useContext(B.E_),Et=R.useRef(null),vt=(0,X.sQ)(te,Et),{isFormItemInput:It}=R.useContext(Ce.aM),gt=je=>{var Be,it;(Be=xe.onChange)===null||Be===void 0||Be.call(xe,je),(it=le==null?void 0:le.onChange)===null||it===void 0||it.call(le,je)},{prefixCls:qe,className:yt,rootClassName:V,children:Z,style:L}=xe,U=Te(xe,["prefixCls","className","rootClassName","children","style"]),J=nt("radio",qe),Se=((le==null?void 0:le.optionType)||$e)==="button",x=Se?`${J}-button`:J,[C,Q]=j(J),I=Object.assign({},U),F=R.useContext(z.Z);le&&(I.name=le.name,I.onChange=gt,I.checked=xe.value===le.value,I.disabled=(Fe=I.disabled)!==null&&Fe!==void 0?Fe:le.disabled),I.disabled=(Ae=I.disabled)!==null&&Ae!==void 0?Ae:F;const pe=O()(`${x}-wrapper`,{[`${x}-wrapper-checked`]:I.checked,[`${x}-wrapper-disabled`]:I.disabled,[`${x}-wrapper-rtl`]:St==="rtl",[`${x}-wrapper-in-form-item`]:It},Rt==null?void 0:Rt.className,yt,V,Q);return C(R.createElement(N.Z,{component:"Radio",disabled:I.disabled},R.createElement("label",{className:pe,style:Object.assign(Object.assign({},Rt==null?void 0:Rt.style),L),onMouseEnter:xe.onMouseEnter,onMouseLeave:xe.onMouseLeave},R.createElement(g.Z,Object.assign({},I,{className:O()(I.className,!Se&&De.A),type:"radio",prefixCls:x,ref:vt})),Z!==void 0?R.createElement("span",null,Z):null)))};var he=R.forwardRef(ze);const _=R.forwardRef((xe,te)=>{const{getPrefixCls:Fe,direction:Ae}=R.useContext(B.E_),[le,$e]=(0,H.Z)(xe.defaultValue,{value:xe.value}),nt=Be=>{const it=le,_e=Be.target.value;"value"in xe||$e(_e);const{onChange:Ye}=xe;Ye&&_e!==it&&Ye(Be)},{prefixCls:St,className:Rt,rootClassName:Et,options:vt,buttonStyle:It="outline",disabled:gt,children:qe,size:yt,style:V,id:Z,onMouseEnter:L,onMouseLeave:U,onFocus:J,onBlur:Se}=xe,x=Fe("radio",St),C=`${x}-group`,[Q,I]=j(x);let F=qe;vt&&vt.length>0&&(F=vt.map(Be=>typeof Be=="string"||typeof Be=="number"?R.createElement(he,{key:Be.toString(),prefixCls:x,disabled:gt,value:Be,checked:le===Be},Be):R.createElement(he,{key:`radio-group-value-options-${Be.value}`,prefixCls:x,disabled:Be.disabled||gt,value:Be.value,checked:le===Be.value,title:Be.title,style:Be.style},Be.label)));const pe=(0,ee.Z)(yt),je=O()(C,`${C}-${It}`,{[`${C}-${pe}`]:pe,[`${C}-rtl`]:Ae==="rtl"},Rt,Et,I);return Q(R.createElement("div",Object.assign({},(0,se.Z)(xe,{aria:!0,data:!0}),{className:je,style:V,onMouseEnter:L,onMouseLeave:U,onFocus:J,onBlur:Se,id:Z,ref:te}),R.createElement(fe,{value:{onChange:nt,value:le,disabled:xe.disabled,name:xe.name,optionType:xe.optionType}},F)))});var me=R.memo(_),T=function(xe,te){var Fe={};for(var Ae in xe)Object.prototype.hasOwnProperty.call(xe,Ae)&&te.indexOf(Ae)<0&&(Fe[Ae]=xe[Ae]);if(xe!=null&&typeof Object.getOwnPropertySymbols=="function")for(var le=0,Ae=Object.getOwnPropertySymbols(xe);le{const{getPrefixCls:Fe}=R.useContext(B.E_),{prefixCls:Ae}=xe,le=T(xe,["prefixCls"]),$e=Fe("radio",Ae);return R.createElement(P,{value:"button"},R.createElement(he,Object.assign({prefixCls:$e},le,{type:"radio",ref:te})))};var Ee=R.forwardRef(ve);const ne=he;ne.Button=Ee,ne.Group=me,ne.__ANT_RADIO=!0;var Oe=ne},13570:function(Ht,lt,u){"use strict";u.d(lt,{Z:function(){return xe}});var v=u(96663),O=u(59301),H={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M908.1 353.1l-253.9-36.9L540.7 86.1c-3.1-6.3-8.2-11.4-14.5-14.5-15.8-7.8-35-1.3-42.9 14.5L369.8 316.2l-253.9 36.9c-7 1-13.4 4.3-18.3 9.3a32.05 32.05 0 00.6 45.3l183.7 179.1-43.4 252.9a31.95 31.95 0 0046.4 33.7L512 754l227.1 119.4c6.2 3.3 13.4 4.4 20.3 3.2 17.4-3 29.1-19.5 26.1-36.9l-43.4-252.9 183.7-179.1c5-4.9 8.3-11.3 9.3-18.3 2.7-17.5-9.5-33.7-27-36.3z"}}]},name:"star",theme:"filled"},se=H,R=u(7657),B=function(Fe,Ae){return O.createElement(R.Z,(0,v.Z)({},Fe,{ref:Ae,icon:se}))},ee=O.forwardRef(B),ce=ee,fe=u(92310),M=u.n(fe),Ze=u(90493),P=u(72071),g=u(6620),X=u(18929),z=u(10228),Ce=u(26112);function st(te,Fe){var Ae=te.disabled,le=te.prefixCls,$e=te.character,nt=te.characterRender,St=te.index,Rt=te.count,Et=te.value,vt=te.allowHalf,It=te.focused,gt=te.onHover,qe=te.onClick,yt=function(C){gt(C,St)},V=function(C){qe(C,St)},Z=function(C){C.keyCode===z.Z.ENTER&&qe(C,St)},L=St+1,U=new Set([le]);Et===0&&St===0&&It?U.add("".concat(le,"-focused")):vt&&Et+.5>=L&&EtSt?"true":"false","aria-posinset":St+1,"aria-setsize":Rt,tabIndex:Ae?-1:0},O.createElement("div",{className:"".concat(le,"-first")},J),O.createElement("div",{className:"".concat(le,"-second")},J)));return nt&&(Se=nt(Se,te)),Se}var Re=O.forwardRef(st);function de(){var te=O.useRef({});function Fe(le){return te.current[le]}function Ae(le){return function($e){te.current[le]=$e}}return[Fe,Ae]}function ae(te){var Fe=te.pageXOffset,Ae="scrollLeft";if(typeof Fe!="number"){var le=te.document;Fe=le.documentElement[Ae],typeof Fe!="number"&&(Fe=le.body[Ae])}return Fe}function ue(te){var Fe,Ae,le=te.ownerDocument,$e=le.body,nt=le&&le.documentElement,St=te.getBoundingClientRect();return Fe=St.left,Ae=St.top,Fe-=nt.clientLeft||$e.clientLeft||0,Ae-=nt.clientTop||$e.clientTop||0,{left:Fe,top:Ae}}function A(te){var Fe=ue(te),Ae=te.ownerDocument,le=Ae.defaultView||Ae.parentWindow;return Fe.left+=ae(le),Fe.left}var w=["prefixCls","className","defaultValue","value","count","allowHalf","allowClear","character","characterRender","disabled","direction","tabIndex","autoFocus","onHoverChange","onChange","onFocus","onBlur","onKeyDown","onMouseLeave"];function j(te,Fe){var Ae,le=te.prefixCls,$e=le===void 0?"rc-rate":le,nt=te.className,St=te.defaultValue,Rt=te.value,Et=te.count,vt=Et===void 0?5:Et,It=te.allowHalf,gt=It===void 0?!1:It,qe=te.allowClear,yt=qe===void 0?!0:qe,V=te.character,Z=V===void 0?"\u2605":V,L=te.characterRender,U=te.disabled,J=te.direction,Se=J===void 0?"ltr":J,x=te.tabIndex,C=x===void 0?0:x,Q=te.autoFocus,I=te.onHoverChange,F=te.onChange,pe=te.onFocus,je=te.onBlur,Be=te.onKeyDown,it=te.onMouseLeave,_e=(0,g.Z)(te,w),Ye=de(),re=(0,P.Z)(Ye,2),Pe=re[0],et=re[1],oe=O.useRef(null),dt=function(){if(!U){var E;(E=oe.current)===null||E===void 0||E.focus()}};O.useImperativeHandle(Fe,function(){return{focus:dt,blur:function(){if(!U){var E;(E=oe.current)===null||E===void 0||E.blur()}}}});var pt=(0,X.Z)(St||0,{value:Rt}),ft=(0,P.Z)(pt,2),ot=ft[0],_t=ft[1],jt=(0,X.Z)(null),Zt=(0,P.Z)(jt,2),Yt=Zt[0],Mt=Zt[1],$t=function(E,q){var K=Se==="rtl",ye=E+1;if(gt){var Ue=Pe(E),Ge=A(Ue),Le=Ue.clientWidth;(K&&q-Ge>Le/2||!K&&q-Ge0&&!K||q===z.Z.RIGHT&&ye>0&&K?(gt?ye-=.5:ye-=1,xt(ye),E.preventDefault()):q===z.Z.LEFT&&ye{const{componentCls:Fe}=te;return{[`${Fe}-star`]:{position:"relative",display:"inline-block",color:"inherit",cursor:"pointer","&:not(:last-child)":{marginInlineEnd:te.marginXS},"> div":{transition:`all ${te.motionDurationMid}, outline 0s`,"&:hover":{transform:te.starHoverScale},"&:focus":{outline:0},"&:focus-visible":{outline:`${te.lineWidth}px dashed ${te.starColor}`,transform:te.starHoverScale}},"&-first, &-second":{color:te.starBg,transition:`all ${te.motionDurationMid}`,userSelect:"none",[te.iconCls]:{verticalAlign:"middle"}},"&-first":{position:"absolute",top:0,insetInlineStart:0,width:"50%",height:"100%",overflow:"hidden",opacity:0},[`&-half ${Fe}-star-first, &-half ${Fe}-star-second`]:{opacity:1},[`&-half ${Fe}-star-first, &-full ${Fe}-star-second`]:{color:"inherit"}}}},T=te=>({[`&-rtl${te.componentCls}`]:{direction:"rtl"}}),ve=te=>{const{componentCls:Fe}=te;return{[Fe]:Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({},(0,Me.Wf)(te)),{display:"inline-block",margin:0,padding:0,color:te.starColor,fontSize:te.starSize,lineHeight:"unset",listStyle:"none",outline:"none",[`&-disabled${Fe} ${Fe}-star`]:{cursor:"default","> div:hover":{transform:"scale(1)"}}}),me(te)),{[`+ ${Fe}-text`]:{display:"inline-block",marginInlineStart:te.marginXS,fontSize:te.fontSize}}),T(te))}};var Ee=(0,he.Z)("Rate",te=>{const Fe=(0,_.TS)(te,{});return[ve(Fe)]},te=>({starColor:te.yellow6,starSize:te.controlHeightLG*.5,starHoverScale:"scale(1.1)",starBg:te.colorFillContent})),ne=function(te,Fe){var Ae={};for(var le in te)Object.prototype.hasOwnProperty.call(te,le)&&Fe.indexOf(le)<0&&(Ae[le]=te[le]);if(te!=null&&typeof Object.getOwnPropertySymbols=="function")for(var $e=0,le=Object.getOwnPropertySymbols(te);$e{const{prefixCls:Ae,className:le,rootClassName:$e,style:nt,tooltips:St,character:Rt=O.createElement(ce,null)}=te,Et=ne(te,["prefixCls","className","rootClassName","style","tooltips","character"]),vt=(U,J)=>{let{index:Se}=J;return St?O.createElement(ze.Z,{title:St[Se]},U):U},{getPrefixCls:It,direction:gt,rate:qe}=O.useContext(Te.E_),yt=It("rate",Ae),[V,Z]=Ee(yt),L=Object.assign(Object.assign({},qe==null?void 0:qe.style),nt);return V(O.createElement(De,Object.assign({ref:Fe,character:Rt,characterRender:vt},Et,{className:M()(le,$e,Z,qe==null?void 0:qe.className),style:L,prefixCls:yt,direction:gt})))})},57809:function(Ht,lt,u){"use strict";var v=u(92310),O=u.n(v),H=u(77861),se=u(2738),R=u(59301),B=u(53487),ee=u(62892),ce=u(19080),fe=u(36355),M=u(1684),Ze=u(93891),P=u(19716),g=u(32441),X=u(33234),z=u(14154),Ce=u(58582),st=u(84443),Re=u(66339),de=function(j,N){var De={};for(var Te in j)Object.prototype.hasOwnProperty.call(j,Te)&&N.indexOf(Te)<0&&(De[Te]=j[Te]);if(j!=null&&typeof Object.getOwnPropertySymbols=="function")for(var ze=0,Te=Object.getOwnPropertySymbols(j);ze{var De,{prefixCls:Te,bordered:ze=!0,className:Me,rootClassName:he,getPopupContainer:_,popupClassName:me,dropdownClassName:T,listHeight:ve=256,placement:Ee,listItemHeight:ne=24,size:Oe,disabled:xe,notFoundContent:te,status:Fe,builtinPlacements:Ae,dropdownMatchSelectWidth:le,popupMatchSelectWidth:$e,direction:nt,style:St,allowClear:Rt}=j,Et=de(j,["prefixCls","bordered","className","rootClassName","getPopupContainer","popupClassName","dropdownClassName","listHeight","placement","listItemHeight","size","disabled","notFoundContent","status","builtinPlacements","dropdownMatchSelectWidth","popupMatchSelectWidth","direction","style","allowClear"]);const{getPopupContainer:vt,getPrefixCls:It,renderEmpty:gt,direction:qe,virtual:yt,popupMatchSelectWidth:V,popupOverflow:Z,select:L}=R.useContext(fe.E_),U=It("select",Te),J=It(),Se=nt!=null?nt:qe,{compactSize:x,compactItemClassnames:C}=(0,X.ri)(U,Se),[Q,I]=(0,z.Z)(U),F=R.useMemo(()=>{const{mode:qt}=Et;if(qt!=="combobox")return qt===ae?"combobox":qt},[Et.mode]),pe=F==="multiple"||F==="tags",je=(0,st.Z)(Et.suffixIcon,Et.showArrow),Be=(De=$e!=null?$e:le)!==null&&De!==void 0?De:V,{status:it,hasFeedback:_e,isFormItemInput:Ye,feedbackIcon:re}=R.useContext(g.aM),Pe=(0,ce.F)(it,Fe);let et;te!==void 0?et=te:F==="combobox"?et=null:et=(gt==null?void 0:gt("Select"))||R.createElement(Ze.Z,{componentName:"Select"});const{suffixIcon:oe,itemIcon:dt,removeIcon:pt,clearIcon:ft}=(0,Re.Z)(Object.assign(Object.assign({},Et),{multiple:pe,hasFeedback:_e,feedbackIcon:re,showSuffixIcon:je,prefixCls:U,showArrow:Et.showArrow,componentName:"Select"})),ot=Rt===!0?{clearIcon:ft}:Rt,_t=(0,se.Z)(Et,["suffixIcon","itemIcon"]),jt=O()(me||T,{[`${U}-dropdown-${Se}`]:Se==="rtl"},he,I),Zt=(0,P.Z)(qt=>{var Bt;return(Bt=Oe!=null?Oe:x)!==null&&Bt!==void 0?Bt:qt}),Yt=R.useContext(M.Z),Mt=xe!=null?xe:Yt,$t=O()({[`${U}-lg`]:Zt==="large",[`${U}-sm`]:Zt==="small",[`${U}-rtl`]:Se==="rtl",[`${U}-borderless`]:!ze,[`${U}-in-form-item`]:Ye},(0,ce.Z)(U,Pe,_e),C,L==null?void 0:L.className,Me,he,I),xt=R.useMemo(()=>Ee!==void 0?Ee:Se==="rtl"?"bottomRight":"bottomLeft",[Ee,Se]),Ft=(0,Ce.Z)(Ae,Z);return Q(R.createElement(H.ZP,Object.assign({ref:N,virtual:yt,showSearch:L==null?void 0:L.showSearch},_t,{style:Object.assign(Object.assign({},L==null?void 0:L.style),St),dropdownMatchSelectWidth:Be,builtinPlacements:Ft,transitionName:(0,ee.m)(J,"slide-up",Et.transitionName),listHeight:ve,listItemHeight:ne,mode:F,prefixCls:U,placement:xt,direction:Se,suffixIcon:oe,menuItemSelectedIcon:dt,removeIcon:pt,allowClear:ot,notFoundContent:et,className:$t,getPopupContainer:_||vt,dropdownClassName:jt,disabled:Mt})))},A=R.forwardRef(ue),w=(0,B.Z)(A);A.SECRET_COMBOBOX_MODE_DO_NOT_USE=ae,A.Option=H.Wx,A.OptGroup=H.Xo,A._InternalPanelDoNotUseOrYouWillBeFired=w,lt.default=A},14154:function(Ht,lt,u){"use strict";u.d(lt,{Z:function(){return A}});var v=u(17313),O=u(74207),H=u(37613),se=u(83116),R=u(13826),B=u(92899);const ee=w=>{const{optionHeight:j,optionFontSize:N,optionLineHeight:De,optionPadding:Te}=w;return{position:"relative",display:"block",minHeight:j,padding:Te,color:w.colorText,fontWeight:"normal",fontSize:N,lineHeight:De,boxSizing:"border-box"}};var fe=w=>{const{antCls:j,componentCls:N}=w,De=`${N}-item`,Te=`&${j}-slide-up-enter${j}-slide-up-enter-active`,ze=`&${j}-slide-up-appear${j}-slide-up-appear-active`,Me=`&${j}-slide-up-leave${j}-slide-up-leave-active`,he=`${N}-dropdown-placement-`;return[{[`${N}-dropdown`]:Object.assign(Object.assign({},(0,v.Wf)(w)),{position:"absolute",top:-9999,zIndex:w.zIndexPopup,boxSizing:"border-box",padding:w.paddingXXS,overflow:"hidden",fontSize:w.fontSize,fontVariant:"initial",backgroundColor:w.colorBgElevated,borderRadius:w.borderRadiusLG,outline:"none",boxShadow:w.boxShadowSecondary,[` ${Te}${he}bottomLeft, ${ze}${he}bottomLeft `]:{animationName:R.fJ},[` ${Te}${he}topLeft, ${ze}${he}topLeft, ${Te}${he}topRight, ${ze}${he}topRight `]:{animationName:R.Qt},[`${Me}${he}bottomLeft`]:{animationName:R.Uw},[` ${Me}${he}topLeft, ${Me}${he}topRight `]:{animationName:R.ly},"&-hidden":{display:"none"},[`${De}`]:Object.assign(Object.assign({},ee(w)),{cursor:"pointer",transition:`background ${w.motionDurationSlow} ease`,borderRadius:w.borderRadiusSM,"&-group":{color:w.colorTextDescription,fontSize:w.fontSizeSM,cursor:"default"},"&-option":{display:"flex","&-content":Object.assign({flex:"auto"},v.vS),"&-state":{flex:"none",display:"flex",alignItems:"center"},[`&-active:not(${De}-option-disabled)`]:{backgroundColor:w.optionActiveBg},[`&-selected:not(${De}-option-disabled)`]:{color:w.optionSelectedColor,fontWeight:w.optionSelectedFontWeight,backgroundColor:w.optionSelectedBg,[`${De}-option-state`]:{color:w.colorPrimary}},"&-disabled":{[`&${De}-option-selected`]:{backgroundColor:w.colorBgContainerDisabled},color:w.colorTextDisabled,cursor:"not-allowed"},"&-grouped":{paddingInlineStart:w.controlPaddingHorizontal*2}}}),"&-rtl":{direction:"rtl"}})},(0,R.oN)(w,"slide-up"),(0,R.oN)(w,"slide-down"),(0,B.Fm)(w,"move-up"),(0,B.Fm)(w,"move-down")]};const M=2,Ze=w=>{let{controlHeightSM:j,controlHeight:N,lineWidth:De}=w;const Te=(N-j)/2-De,ze=Math.ceil(Te/2);return[Te,ze]};function P(w,j){const{componentCls:N,iconCls:De}=w,Te=`${N}-selection-overflow`,ze=w.multipleSelectItemHeight,[Me]=Ze(w),he=j?`${N}-${j}`:"";return{[`${N}-multiple${he}`]:{fontSize:w.fontSize,[Te]:{position:"relative",display:"flex",flex:"auto",flexWrap:"wrap",maxWidth:"100%","&-item":{flex:"none",alignSelf:"center",maxWidth:"100%",display:"inline-flex"}},[`${N}-selector`]:{display:"flex",flexWrap:"wrap",alignItems:"center",padding:`${Me-M}px ${M*2}px`,borderRadius:w.borderRadius,[`${N}-show-search&`]:{cursor:"text"},[`${N}-disabled&`]:{background:w.multipleSelectorBgDisabled,cursor:"not-allowed"},"&:after":{display:"inline-block",width:0,margin:`${M}px 0`,lineHeight:`${ze}px`,visibility:"hidden",content:'"\\a0"'}},[` &${N}-show-arrow ${N}-selector, &${N}-allow-clear ${N}-selector `]:{paddingInlineEnd:w.fontSizeIcon+w.controlPaddingHorizontal},[`${N}-selection-item`]:{position:"relative",display:"flex",flex:"none",boxSizing:"border-box",maxWidth:"100%",height:ze,marginTop:M,marginBottom:M,lineHeight:`${ze-w.lineWidth*2}px`,background:w.multipleItemBg,border:`${w.lineWidth}px ${w.lineType} ${w.multipleItemBorderColor}`,borderRadius:w.borderRadiusSM,cursor:"default",transition:`font-size ${w.motionDurationSlow}, line-height ${w.motionDurationSlow}, height ${w.motionDurationSlow}`,userSelect:"none",marginInlineEnd:M*2,paddingInlineStart:w.paddingXS,paddingInlineEnd:w.paddingXS/2,[`${N}-disabled&`]:{color:w.multipleItemColorDisabled,borderColor:w.multipleItemBorderColorDisabled,cursor:"not-allowed"},"&-content":{display:"inline-block",marginInlineEnd:w.paddingXS/2,overflow:"hidden",whiteSpace:"pre",textOverflow:"ellipsis"},"&-remove":Object.assign(Object.assign({},(0,v.Ro)()),{display:"inline-flex",alignItems:"center",color:w.colorIcon,fontWeight:"bold",fontSize:10,lineHeight:"inherit",cursor:"pointer",[`> ${De}`]:{verticalAlign:"-0.2em"},"&:hover":{color:w.colorIconHover}})},[`${Te}-item + ${Te}-item`]:{[`${N}-selection-search`]:{marginInlineStart:0}},[`${N}-selection-search`]:{display:"inline-flex",position:"relative",maxWidth:"100%",marginInlineStart:w.inputPaddingHorizontalBase-Me,"\n &-input,\n &-mirror\n ":{height:ze,fontFamily:w.fontFamily,lineHeight:`${ze}px`,transition:`all ${w.motionDurationSlow}`},"&-input":{width:"100%",minWidth:4.1},"&-mirror":{position:"absolute",top:0,insetInlineStart:0,insetInlineEnd:"auto",zIndex:999,whiteSpace:"pre",visibility:"hidden"}},[`${N}-selection-placeholder `]:{position:"absolute",top:"50%",insetInlineStart:w.inputPaddingHorizontalBase,insetInlineEnd:w.inputPaddingHorizontalBase,transform:"translateY(-50%)",transition:`all ${w.motionDurationSlow}`}}}}var X=w=>{const{componentCls:j}=w,N=(0,H.TS)(w,{controlHeight:w.controlHeightSM,multipleSelectItemHeight:w.controlHeightXS,borderRadius:w.borderRadiusSM,borderRadiusSM:w.borderRadiusXS}),De=(0,H.TS)(w,{fontSize:w.fontSizeLG,controlHeight:w.controlHeightLG,multipleSelectItemHeight:w.multipleItemHeightLG,borderRadius:w.borderRadiusLG,borderRadiusSM:w.borderRadius}),[,Te]=Ze(w);return[P(w),P(N,"sm"),{[`${j}-multiple${j}-sm`]:{[`${j}-selection-placeholder`]:{insetInline:w.controlPaddingHorizontalSM-w.lineWidth},[`${j}-selection-search`]:{marginInlineStart:Te}}},P(De,"lg")]};function z(w,j){const{componentCls:N,inputPaddingHorizontalBase:De,borderRadius:Te}=w,ze=w.controlHeight-w.lineWidth*2,Me=Math.ceil(w.fontSize*1.25),he=j?`${N}-${j}`:"";return{[`${N}-single${he}`]:{fontSize:w.fontSize,[`${N}-selector`]:Object.assign(Object.assign({},(0,v.Wf)(w)),{display:"flex",borderRadius:Te,[`${N}-selection-search`]:{position:"absolute",top:0,insetInlineStart:De,insetInlineEnd:De,bottom:0,"&-input":{width:"100%"}},[` ${N}-selection-item, ${N}-selection-placeholder `]:{padding:0,lineHeight:`${ze}px`,transition:`all ${w.motionDurationSlow}, visibility 0s`,"@supports (-moz-appearance: meterbar)":{lineHeight:`${ze}px`}},[`${N}-selection-item`]:{position:"relative",userSelect:"none"},[`${N}-selection-placeholder`]:{transition:"none",pointerEvents:"none"},[["&:after",`${N}-selection-item:after`,`${N}-selection-placeholder:after`].join(",")]:{display:"inline-block",width:0,visibility:"hidden",content:'"\\a0"'}}),[` &${N}-show-arrow ${N}-selection-item, &${N}-show-arrow ${N}-selection-placeholder `]:{paddingInlineEnd:Me},[`&${N}-open ${N}-selection-item`]:{color:w.colorTextPlaceholder},[`&:not(${N}-customize-input)`]:{[`${N}-selector`]:{width:"100%",height:w.controlHeight,padding:`0 ${De}px`,[`${N}-selection-search-input`]:{height:ze},"&:after":{lineHeight:`${ze}px`}}},[`&${N}-customize-input`]:{[`${N}-selector`]:{"&:after":{display:"none"},[`${N}-selection-search`]:{position:"static",width:"100%"},[`${N}-selection-placeholder`]:{position:"absolute",insetInlineStart:0,insetInlineEnd:0,padding:`0 ${De}px`,"&:after":{display:"none"}}}}}}}function Ce(w){const{componentCls:j}=w,N=w.controlPaddingHorizontalSM-w.lineWidth;return[z(w),z((0,H.TS)(w,{controlHeight:w.controlHeightSM,borderRadius:w.borderRadiusSM}),"sm"),{[`${j}-single${j}-sm`]:{[`&:not(${j}-customize-input)`]:{[`${j}-selection-search`]:{insetInlineStart:N,insetInlineEnd:N},[`${j}-selector`]:{padding:`0 ${N}px`},[`&${j}-show-arrow ${j}-selection-search`]:{insetInlineEnd:N+w.fontSize*1.5},[` &${j}-show-arrow ${j}-selection-item, &${j}-show-arrow ${j}-selection-placeholder `]:{paddingInlineEnd:w.fontSize*1.5}}}},z((0,H.TS)(w,{controlHeight:w.singleItemHeightLG,fontSize:w.fontSizeLG,borderRadius:w.borderRadiusLG}),"lg")]}const st=w=>{const{componentCls:j,selectorBg:N}=w;return{position:"relative",backgroundColor:N,border:`${w.lineWidth}px ${w.lineType} ${w.colorBorder}`,transition:`all ${w.motionDurationMid} ${w.motionEaseInOut}`,input:{cursor:"pointer"},[`${j}-show-search&`]:{cursor:"text",input:{cursor:"auto",color:"inherit"}},[`${j}-disabled&`]:{color:w.colorTextDisabled,background:w.colorBgContainerDisabled,cursor:"not-allowed",[`${j}-multiple&`]:{background:w.multipleSelectorBgDisabled},input:{cursor:"not-allowed"}}}},Re=function(w,j){let N=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1;const{componentCls:De,borderHoverColor:Te,outlineColor:ze,antCls:Me}=j,he=N?{[`${De}-selector`]:{borderColor:Te}}:{};return{[w]:{[`&:not(${De}-disabled):not(${De}-customize-input):not(${Me}-pagination-size-changer)`]:Object.assign(Object.assign({},he),{[`${De}-focused& ${De}-selector`]:{borderColor:Te,boxShadow:`0 0 0 ${j.controlOutlineWidth}px ${ze}`,outline:0},[`&:hover ${De}-selector`]:{borderColor:Te}})}}},de=w=>{const{componentCls:j}=w;return{[`${j}-selection-search-input`]:{margin:0,padding:0,background:"transparent",border:"none",outline:"none",appearance:"none","&::-webkit-search-cancel-button":{display:"none","-webkit-appearance":"none"}}}},ae=w=>{const{componentCls:j,inputPaddingHorizontalBase:N,iconCls:De}=w;return{[j]:Object.assign(Object.assign({},(0,v.Wf)(w)),{position:"relative",display:"inline-block",cursor:"pointer",[`&:not(${j}-customize-input) ${j}-selector`]:Object.assign(Object.assign({},st(w)),de(w)),[`${j}-selection-item`]:Object.assign({flex:1,fontWeight:"normal"},v.vS),[`${j}-selection-placeholder`]:Object.assign(Object.assign({},v.vS),{flex:1,color:w.colorTextPlaceholder,pointerEvents:"none"}),[`${j}-arrow`]:Object.assign(Object.assign({},(0,v.Ro)()),{position:"absolute",top:"50%",insetInlineStart:"auto",insetInlineEnd:N,height:w.fontSizeIcon,marginTop:-w.fontSizeIcon/2,color:w.colorTextQuaternary,fontSize:w.fontSizeIcon,lineHeight:1,textAlign:"center",pointerEvents:"none",display:"flex",alignItems:"center",[De]:{verticalAlign:"top",transition:`transform ${w.motionDurationSlow}`,"> svg":{verticalAlign:"top"},[`&:not(${j}-suffix)`]:{pointerEvents:"auto"}},[`${j}-disabled &`]:{cursor:"not-allowed"},"> *:not(:last-child)":{marginInlineEnd:8}}),[`${j}-clear`]:{position:"absolute",top:"50%",insetInlineStart:"auto",insetInlineEnd:N,zIndex:1,display:"inline-block",width:w.fontSizeIcon,height:w.fontSizeIcon,marginTop:-w.fontSizeIcon/2,color:w.colorTextQuaternary,fontSize:w.fontSizeIcon,fontStyle:"normal",lineHeight:1,textAlign:"center",textTransform:"none",background:w.clearBg,cursor:"pointer",opacity:0,transition:`color ${w.motionDurationMid} ease, opacity ${w.motionDurationSlow} ease`,textRendering:"auto","&:before":{display:"block"},"&:hover":{color:w.colorTextTertiary}},"&:hover":{[`${j}-clear`]:{opacity:1}}}),[`${j}-has-feedback`]:{[`${j}-clear`]:{insetInlineEnd:N+w.fontSize+w.paddingXS}}}},ue=w=>{const{componentCls:j}=w;return[{[j]:{[`&-borderless ${j}-selector`]:{backgroundColor:"transparent !important",borderColor:"transparent !important",boxShadow:"none !important"},[`&${j}-in-form-item`]:{width:"100%"}}},ae(w),Ce(w),X(w),fe(w),{[`${j}-rtl`]:{direction:"rtl"}},Re(j,(0,H.TS)(w,{borderHoverColor:w.colorPrimaryHover,outlineColor:w.controlOutline})),Re(`${j}-status-error`,(0,H.TS)(w,{borderHoverColor:w.colorErrorHover,outlineColor:w.colorErrorOutline}),!0),Re(`${j}-status-warning`,(0,H.TS)(w,{borderHoverColor:w.colorWarningHover,outlineColor:w.colorWarningOutline}),!0),(0,O.c)(w,{borderElCls:`${j}-selector`,focusElCls:`${j}-focused`})]};var A=(0,se.Z)("Select",(w,j)=>{let{rootPrefixCls:N}=j;const De=(0,H.TS)(w,{rootPrefixCls:N,inputPaddingHorizontalBase:w.paddingSM-1,multipleSelectItemHeight:w.multipleItemHeight});return[ue(De)]},w=>{const{fontSize:j,lineHeight:N,controlHeight:De,controlPaddingHorizontal:Te,zIndexPopupBase:ze,colorText:Me,fontWeightStrong:he,controlItemBgActive:_,controlItemBgHover:me,colorBgContainer:T,colorFillSecondary:ve,controlHeightLG:Ee,controlHeightSM:ne,colorBgContainerDisabled:Oe,colorTextDisabled:xe}=w;return{zIndexPopup:ze+50,optionSelectedColor:Me,optionSelectedFontWeight:he,optionSelectedBg:_,optionActiveBg:me,optionPadding:`${(De-j*N)/2}px ${Te}px`,optionFontSize:j,optionLineHeight:N,optionHeight:De,selectorBg:T,clearBg:T,singleItemHeightLG:Ee,multipleItemBg:ve,multipleItemBorderColor:"transparent",multipleItemHeight:ne,multipleItemHeightLG:De,multipleSelectorBgDisabled:Oe,multipleItemColorDisabled:xe,multipleItemBorderColorDisabled:"transparent"}})},58582:function(Ht,lt,u){"use strict";u.d(lt,{Z:function(){return O}});const v=H=>{const R={overflow:{adjustX:!0,adjustY:!0,shiftY:!0},htmlRegion:H==="scroll"?"scroll":"visible",_experimental:{dynamicInset:!0}};return{bottomLeft:Object.assign(Object.assign({},R),{points:["tl","bl"],offset:[0,4]}),bottomRight:Object.assign(Object.assign({},R),{points:["tr","br"],offset:[0,4]}),topLeft:Object.assign(Object.assign({},R),{points:["bl","tl"],offset:[0,-4]}),topRight:Object.assign(Object.assign({},R),{points:["br","tr"],offset:[0,-4]})}};function O(H,se){return H||v(se)}},84443:function(Ht,lt,u){"use strict";u.d(lt,{Z:function(){return v}});function v(O,H){return H!==void 0?H:O!==null}},66339:function(Ht,lt,u){"use strict";u.d(lt,{Z:function(){return ce}});var v=u(40001),O=u(19248),H=u(99267),se=u(84105),R=u(58617),B=u(47472),ee=u(59301);function ce(fe){let{suffixIcon:M,clearIcon:Ze,menuItemSelectedIcon:P,removeIcon:g,loading:X,multiple:z,hasFeedback:Ce,prefixCls:st,showSuffixIcon:Re,feedbackIcon:de,showArrow:ae,componentName:ue}=fe;const A=Ze!=null?Ze:ee.createElement(O.Z,null),w=Te=>M===null&&!Ce&&!ae?null:ee.createElement(ee.Fragment,null,Re!==!1&&Te,Ce&&de);let j=null;if(M!==void 0)j=w(M);else if(X)j=w(ee.createElement(R.Z,{spin:!0}));else{const Te=`${st}-suffix`;j=ze=>{let{open:Me,showSearch:he}=ze;return w(Me&&he?ee.createElement(B.Z,{className:Te}):ee.createElement(se.Z,{className:Te}))}}let N=null;P!==void 0?N=P:z?N=ee.createElement(v.Z,null):N=null;let De=null;return g!==void 0?De=g:De=ee.createElement(H.Z,null),{clearIcon:A,suffixIcon:j,itemIcon:N,removeIcon:De}}},61621:function(Ht,lt,u){"use strict";u.d(lt,{Z:function(){return Z}});var v=u(92310),O=u.n(v),H=u(59301),se=u(36355),R=u(2738),ee=L=>{const{prefixCls:U,className:J,style:Se,size:x,shape:C}=L,Q=O()({[`${U}-lg`]:x==="large",[`${U}-sm`]:x==="small"}),I=O()({[`${U}-circle`]:C==="circle",[`${U}-square`]:C==="square",[`${U}-round`]:C==="round"}),F=H.useMemo(()=>typeof x=="number"?{width:x,height:x,lineHeight:`${x}px`}:{},[x]);return H.createElement("span",{className:O()(U,Q,I,J),style:Object.assign(Object.assign({},F),Se)})},ce=u(93083),fe=u(83116),M=u(37613);const Ze=new ce.Keyframes("ant-skeleton-loading",{"0%":{backgroundPosition:"100% 50%"},"100%":{backgroundPosition:"0 50%"}}),P=L=>({height:L,lineHeight:`${L}px`}),g=L=>Object.assign({width:L},P(L)),X=L=>({background:L.skeletonLoadingBackground,backgroundSize:"400% 100%",animationName:Ze,animationDuration:L.skeletonLoadingMotionDuration,animationTimingFunction:"ease",animationIterationCount:"infinite"}),z=L=>Object.assign({width:L*5,minWidth:L*5},P(L)),Ce=L=>{const{skeletonAvatarCls:U,gradientFromColor:J,controlHeight:Se,controlHeightLG:x,controlHeightSM:C}=L;return{[`${U}`]:Object.assign({display:"inline-block",verticalAlign:"top",background:J},g(Se)),[`${U}${U}-circle`]:{borderRadius:"50%"},[`${U}${U}-lg`]:Object.assign({},g(x)),[`${U}${U}-sm`]:Object.assign({},g(C))}},st=L=>{const{controlHeight:U,borderRadiusSM:J,skeletonInputCls:Se,controlHeightLG:x,controlHeightSM:C,gradientFromColor:Q}=L;return{[`${Se}`]:Object.assign({display:"inline-block",verticalAlign:"top",background:Q,borderRadius:J},z(U)),[`${Se}-lg`]:Object.assign({},z(x)),[`${Se}-sm`]:Object.assign({},z(C))}},Re=L=>Object.assign({width:L},P(L)),de=L=>{const{skeletonImageCls:U,imageSizeBase:J,gradientFromColor:Se,borderRadiusSM:x}=L;return{[`${U}`]:Object.assign(Object.assign({display:"flex",alignItems:"center",justifyContent:"center",verticalAlign:"top",background:Se,borderRadius:x},Re(J*2)),{[`${U}-path`]:{fill:"#bfbfbf"},[`${U}-svg`]:Object.assign(Object.assign({},Re(J)),{maxWidth:J*4,maxHeight:J*4}),[`${U}-svg${U}-svg-circle`]:{borderRadius:"50%"}}),[`${U}${U}-circle`]:{borderRadius:"50%"}}},ae=(L,U,J)=>{const{skeletonButtonCls:Se}=L;return{[`${J}${Se}-circle`]:{width:U,minWidth:U,borderRadius:"50%"},[`${J}${Se}-round`]:{borderRadius:U}}},ue=L=>Object.assign({width:L*2,minWidth:L*2},P(L)),A=L=>{const{borderRadiusSM:U,skeletonButtonCls:J,controlHeight:Se,controlHeightLG:x,controlHeightSM:C,gradientFromColor:Q}=L;return Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({[`${J}`]:Object.assign({display:"inline-block",verticalAlign:"top",background:Q,borderRadius:U,width:Se*2,minWidth:Se*2},ue(Se))},ae(L,Se,J)),{[`${J}-lg`]:Object.assign({},ue(x))}),ae(L,x,`${J}-lg`)),{[`${J}-sm`]:Object.assign({},ue(C))}),ae(L,C,`${J}-sm`))},w=L=>{const{componentCls:U,skeletonAvatarCls:J,skeletonTitleCls:Se,skeletonParagraphCls:x,skeletonButtonCls:C,skeletonInputCls:Q,skeletonImageCls:I,controlHeight:F,controlHeightLG:pe,controlHeightSM:je,gradientFromColor:Be,padding:it,marginSM:_e,borderRadius:Ye,titleHeight:re,blockRadius:Pe,paragraphLiHeight:et,controlHeightXS:oe,paragraphMarginTop:dt}=L;return{[`${U}`]:{display:"table",width:"100%",[`${U}-header`]:{display:"table-cell",paddingInlineEnd:it,verticalAlign:"top",[`${J}`]:Object.assign({display:"inline-block",verticalAlign:"top",background:Be},g(F)),[`${J}-circle`]:{borderRadius:"50%"},[`${J}-lg`]:Object.assign({},g(pe)),[`${J}-sm`]:Object.assign({},g(je))},[`${U}-content`]:{display:"table-cell",width:"100%",verticalAlign:"top",[`${Se}`]:{width:"100%",height:re,background:Be,borderRadius:Pe,[`+ ${x}`]:{marginBlockStart:je}},[`${x}`]:{padding:0,"> li":{width:"100%",height:et,listStyle:"none",background:Be,borderRadius:Pe,"+ li":{marginBlockStart:oe}}},[`${x}> li:last-child:not(:first-child):not(:nth-child(2))`]:{width:"61%"}},[`&-round ${U}-content`]:{[`${Se}, ${x} > li`]:{borderRadius:Ye}}},[`${U}-with-avatar ${U}-content`]:{[`${Se}`]:{marginBlockStart:_e,[`+ ${x}`]:{marginBlockStart:dt}}},[`${U}${U}-element`]:Object.assign(Object.assign(Object.assign(Object.assign({display:"inline-block",width:"auto"},A(L)),Ce(L)),st(L)),de(L)),[`${U}${U}-block`]:{width:"100%",[`${C}`]:{width:"100%"},[`${Q}`]:{width:"100%"}},[`${U}${U}-active`]:{[` ${Se}, ${x} > li, ${J}, ${C}, ${Q}, ${I} `]:Object.assign({},X(L))}}};var j=(0,fe.Z)("Skeleton",L=>{const{componentCls:U}=L,J=(0,M.TS)(L,{skeletonAvatarCls:`${U}-avatar`,skeletonTitleCls:`${U}-title`,skeletonParagraphCls:`${U}-paragraph`,skeletonButtonCls:`${U}-button`,skeletonInputCls:`${U}-input`,skeletonImageCls:`${U}-image`,imageSizeBase:L.controlHeight*1.5,borderRadius:100,skeletonLoadingBackground:`linear-gradient(90deg, ${L.gradientFromColor} 25%, ${L.gradientToColor} 37%, ${L.gradientFromColor} 63%)`,skeletonLoadingMotionDuration:"1.4s"});return[w(J)]},L=>{const{colorFillContent:U,colorFill:J}=L,Se=U,x=J;return{color:Se,colorGradientEnd:x,gradientFromColor:Se,gradientToColor:x,titleHeight:L.controlHeight/2,blockRadius:L.borderRadiusSM,paragraphMarginTop:L.marginLG+L.marginXXS,paragraphLiHeight:L.controlHeight/2}},{deprecatedTokens:[["color","gradientFromColor"],["colorGradientEnd","gradientToColor"]]}),De=L=>{const{prefixCls:U,className:J,rootClassName:Se,active:x,shape:C="circle",size:Q="default"}=L,{getPrefixCls:I}=H.useContext(se.E_),F=I("skeleton",U),[pe,je]=j(F),Be=(0,R.Z)(L,["prefixCls","className"]),it=O()(F,`${F}-element`,{[`${F}-active`]:x},J,Se,je);return pe(H.createElement("div",{className:it},H.createElement(ee,Object.assign({prefixCls:`${F}-avatar`,shape:C,size:Q},Be))))},ze=L=>{const{prefixCls:U,className:J,rootClassName:Se,active:x,block:C=!1,size:Q="default"}=L,{getPrefixCls:I}=H.useContext(se.E_),F=I("skeleton",U),[pe,je]=j(F),Be=(0,R.Z)(L,["prefixCls"]),it=O()(F,`${F}-element`,{[`${F}-active`]:x,[`${F}-block`]:C},J,Se,je);return pe(H.createElement("div",{className:it},H.createElement(ee,Object.assign({prefixCls:`${F}-button`,size:Q},Be))))};const Me="M365.714286 329.142857q0 45.714286-32.036571 77.677714t-77.677714 32.036571-77.677714-32.036571-32.036571-77.677714 32.036571-77.677714 77.677714-32.036571 77.677714 32.036571 32.036571 77.677714zM950.857143 548.571429l0 256-804.571429 0 0-109.714286 182.857143-182.857143 91.428571 91.428571 292.571429-292.571429zM1005.714286 146.285714l-914.285714 0q-7.460571 0-12.873143 5.412571t-5.412571 12.873143l0 694.857143q0 7.460571 5.412571 12.873143t12.873143 5.412571l914.285714 0q7.460571 0 12.873143-5.412571t5.412571-12.873143l0-694.857143q0-7.460571-5.412571-12.873143t-12.873143-5.412571zM1097.142857 164.571429l0 694.857143q0 37.741714-26.843429 64.585143t-64.585143 26.843429l-914.285714 0q-37.741714 0-64.585143-26.843429t-26.843429-64.585143l0-694.857143q0-37.741714 26.843429-64.585143t64.585143-26.843429l914.285714 0q37.741714 0 64.585143 26.843429t26.843429 64.585143z";var _=L=>{const{prefixCls:U,className:J,rootClassName:Se,style:x,active:C}=L,{getPrefixCls:Q}=H.useContext(se.E_),I=Q("skeleton",U),[F,pe]=j(I),je=O()(I,`${I}-element`,{[`${I}-active`]:C},J,Se,pe);return F(H.createElement("div",{className:je},H.createElement("div",{className:O()(`${I}-image`,J),style:x},H.createElement("svg",{viewBox:"0 0 1098 1024",xmlns:"http://www.w3.org/2000/svg",className:`${I}-image-svg`},H.createElement("path",{d:Me,className:`${I}-image-path`})))))},T=L=>{const{prefixCls:U,className:J,rootClassName:Se,active:x,block:C,size:Q="default"}=L,{getPrefixCls:I}=H.useContext(se.E_),F=I("skeleton",U),[pe,je]=j(F),Be=(0,R.Z)(L,["prefixCls"]),it=O()(F,`${F}-element`,{[`${F}-active`]:x,[`${F}-block`]:C},J,Se,je);return pe(H.createElement("div",{className:it},H.createElement(ee,Object.assign({prefixCls:`${F}-input`,size:Q},Be))))},ve=u(96663),Ee={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M888 792H200V168c0-4.4-3.6-8-8-8h-56c-4.4 0-8 3.6-8 8v688c0 4.4 3.6 8 8 8h752c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8zM288 604a64 64 0 10128 0 64 64 0 10-128 0zm118-224a48 48 0 1096 0 48 48 0 10-96 0zm158 228a96 96 0 10192 0 96 96 0 10-192 0zm148-314a56 56 0 10112 0 56 56 0 10-112 0z"}}]},name:"dot-chart",theme:"outlined"},ne=Ee,Oe=u(7657),xe=function(U,J){return H.createElement(Oe.Z,(0,ve.Z)({},U,{ref:J,icon:ne}))},te=H.forwardRef(xe),Fe=te,le=L=>{const{prefixCls:U,className:J,rootClassName:Se,style:x,active:C,children:Q}=L,{getPrefixCls:I}=H.useContext(se.E_),F=I("skeleton",U),[pe,je]=j(F),Be=O()(F,`${F}-element`,{[`${F}-active`]:C},je,J,Se),it=Q!=null?Q:H.createElement(Fe,null);return pe(H.createElement("div",{className:Be},H.createElement("div",{className:O()(`${F}-image`,J),style:x},it)))},$e=u(19127),St=L=>{const U=I=>{const{width:F,rows:pe=2}=L;if(Array.isArray(F))return F[I];if(pe-1===I)return F},{prefixCls:J,className:Se,style:x,rows:C}=L,Q=(0,$e.Z)(Array(C)).map((I,F)=>H.createElement("li",{key:F,style:{width:U(F)}}));return H.createElement("ul",{className:O()(J,Se),style:x},Q)},Et=L=>{let{prefixCls:U,className:J,width:Se,style:x}=L;return H.createElement("h3",{className:O()(U,J),style:Object.assign({width:Se},x)})};function vt(L){return L&&typeof L=="object"?L:{}}function It(L,U){return L&&!U?{size:"large",shape:"square"}:{size:"large",shape:"circle"}}function gt(L,U){return!L&&U?{width:"38%"}:L&&U?{width:"50%"}:{}}function qe(L,U){const J={};return(!L||!U)&&(J.width="61%"),!L&&U?J.rows=3:J.rows=2,J}const yt=L=>{const{prefixCls:U,loading:J,className:Se,rootClassName:x,style:C,children:Q,avatar:I=!1,title:F=!0,paragraph:pe=!0,active:je,round:Be}=L,{getPrefixCls:it,direction:_e,skeleton:Ye}=H.useContext(se.E_),re=it("skeleton",U),[Pe,et]=j(re);if(J||!("loading"in L)){const oe=!!I,dt=!!F,pt=!!pe;let ft;if(oe){const jt=Object.assign(Object.assign({prefixCls:`${re}-avatar`},It(dt,pt)),vt(I));ft=H.createElement("div",{className:`${re}-header`},H.createElement(ee,Object.assign({},jt)))}let ot;if(dt||pt){let jt;if(dt){const Yt=Object.assign(Object.assign({prefixCls:`${re}-title`},gt(oe,pt)),vt(F));jt=H.createElement(Et,Object.assign({},Yt))}let Zt;if(pt){const Yt=Object.assign(Object.assign({prefixCls:`${re}-paragraph`},qe(oe,dt)),vt(pe));Zt=H.createElement(St,Object.assign({},Yt))}ot=H.createElement("div",{className:`${re}-content`},jt,Zt)}const _t=O()(re,{[`${re}-with-avatar`]:oe,[`${re}-active`]:je,[`${re}-rtl`]:_e==="rtl",[`${re}-round`]:Be},Ye==null?void 0:Ye.className,Se,x,et);return Pe(H.createElement("div",{className:_t,style:Object.assign(Object.assign({},Ye==null?void 0:Ye.style),C)},ft,ot))}return typeof Q!="undefined"?Q:null};yt.Button=ze,yt.Avatar=De,yt.Input=T,yt.Image=_,yt.Node=le;var V=yt,Z=V},81327:function(Ht,lt,u){"use strict";u.d(lt,{Z:function(){return st}});var v=u(59301),O=u(92310),H=u.n(O),se=u(11592),R=u(36355),B=u(33234);const ee=v.createContext({latestIndex:0}),ce=ee.Provider;var M=Re=>{let{className:de,index:ae,children:ue,split:A,style:w}=Re;const{latestIndex:j}=v.useContext(ee);return ue==null?null:v.createElement(v.Fragment,null,v.createElement("div",{className:de,style:w},ue),ae{var ae,ue;const{getPrefixCls:A,space:w,direction:j}=v.useContext(R.E_),{size:N=(w==null?void 0:w.size)||"small",align:De,className:Te,rootClassName:ze,children:Me,direction:he="horizontal",prefixCls:_,split:me,style:T,wrap:ve=!1,classNames:Ee,styles:ne}=Re,Oe=X(Re,["size","align","className","rootClassName","children","direction","prefixCls","split","style","wrap","classNames","styles"]),[xe,te]=Array.isArray(N)?N:[N,N],Fe=P(te),Ae=P(xe),le=g(te),$e=g(xe),nt=(0,se.Z)(Me,{keepEmpty:!0}),St=De===void 0&&he==="horizontal"?"center":De,Rt=A("space",_),[Et,vt]=(0,Ze.Z)(Rt),It=H()(Rt,w==null?void 0:w.className,vt,`${Rt}-${he}`,{[`${Rt}-rtl`]:j==="rtl",[`${Rt}-align-${St}`]:St,[`${Rt}-gap-row-${te}`]:Fe,[`${Rt}-gap-col-${xe}`]:Ae},Te,ze),gt=H()(`${Rt}-item`,(ae=Ee==null?void 0:Ee.item)!==null&&ae!==void 0?ae:(ue=w==null?void 0:w.classNames)===null||ue===void 0?void 0:ue.item);let qe=0;const yt=nt.map((L,U)=>{var J,Se;L!=null&&(qe=U);const x=L&&L.key||`${gt}-${U}`;return v.createElement(M,{className:gt,key:x,index:U,split:me,style:(J=ne==null?void 0:ne.item)!==null&&J!==void 0?J:(Se=w==null?void 0:w.styles)===null||Se===void 0?void 0:Se.item},L)}),V=v.useMemo(()=>({latestIndex:qe}),[qe]);if(nt.length===0)return null;const Z={};return ve&&(Z.flexWrap="wrap"),!Ae&&$e&&(Z.columnGap=xe),!Fe&&le&&(Z.rowGap=te),Et(v.createElement("div",Object.assign({ref:de,className:It,style:Object.assign(Object.assign(Object.assign({},Z),w==null?void 0:w.style),T)},Oe),v.createElement(ce,{value:V},yt)))});Ce.Compact=B.ZP;var st=Ce},31797:function(Ht,lt,u){"use strict";u.d(lt,{default:function(){return j}});var v=u(59301),O=u(56762),H=u(92343),se=u(92310),R=u.n(se),B=u(36355),ee=u(61621),fe=N=>{const{value:De,formatter:Te,precision:ze,decimalSeparator:Me,groupSeparator:he="",prefixCls:_}=N;let me;if(typeof Te=="function")me=Te(De);else{const T=String(De),ve=T.match(/^(-?)(\d*)(\.(\d+))?$/);if(!ve||T==="-")me=T;else{const Ee=ve[1];let ne=ve[2]||"0",Oe=ve[4]||"";ne=ne.replace(/\B(?=(\d{3})+(?!\d))/g,he),typeof ze=="number"&&(Oe=Oe.padEnd(ze,"0").slice(0,ze>0?ze:0)),Oe&&(Oe=`${Me}${Oe}`),me=[v.createElement("span",{key:"int",className:`${_}-content-value-int`},Ee,ne),Oe&&v.createElement("span",{key:"decimal",className:`${_}-content-value-decimal`},Oe)]}}return v.createElement("span",{className:`${_}-content-value`},me)},M=u(17313),Ze=u(83116),P=u(37613);const g=N=>{const{componentCls:De,marginXXS:Te,padding:ze,colorTextDescription:Me,titleFontSize:he,colorTextHeading:_,contentFontSize:me,fontFamily:T}=N;return{[`${De}`]:Object.assign(Object.assign({},(0,M.Wf)(N)),{[`${De}-title`]:{marginBottom:Te,color:Me,fontSize:he},[`${De}-skeleton`]:{paddingTop:ze},[`${De}-content`]:{color:_,fontSize:me,fontFamily:T,[`${De}-content-value`]:{display:"inline-block",direction:"ltr"},[`${De}-content-prefix, ${De}-content-suffix`]:{display:"inline-block"},[`${De}-content-prefix`]:{marginInlineEnd:Te},[`${De}-content-suffix`]:{marginInlineStart:Te}}})}};var X=(0,Ze.Z)("Statistic",N=>{const De=(0,P.TS)(N,{});return[g(De)]},N=>{const{fontSizeHeading3:De,fontSize:Te}=N;return{titleFontSize:Te,contentFontSize:De}}),Ce=N=>{const{prefixCls:De,className:Te,rootClassName:ze,style:Me,valueStyle:he,value:_=0,title:me,valueRender:T,prefix:ve,suffix:Ee,loading:ne=!1,onMouseEnter:Oe,onMouseLeave:xe,decimalSeparator:te=".",groupSeparator:Fe=","}=N,{getPrefixCls:Ae,direction:le,statistic:$e}=v.useContext(B.E_),nt=Ae("statistic",De),[St,Rt]=X(nt),Et=v.createElement(fe,Object.assign({decimalSeparator:te,groupSeparator:Fe,prefixCls:nt},N,{value:_})),vt=R()(nt,{[`${nt}-rtl`]:le==="rtl"},$e==null?void 0:$e.className,Te,ze,Rt);return St(v.createElement("div",{className:vt,style:Object.assign(Object.assign({},$e==null?void 0:$e.style),Me),onMouseEnter:Oe,onMouseLeave:xe},me&&v.createElement("div",{className:`${nt}-title`},me),v.createElement(ee.Z,{paragraph:!1,loading:ne,className:`${nt}-skeleton`},v.createElement("div",{style:he,className:`${nt}-content`},ve&&v.createElement("span",{className:`${nt}-content-prefix`},ve),T?T(Et):Et,Ee&&v.createElement("span",{className:`${nt}-content-suffix`},Ee)))))};const st=[["Y",1e3*60*60*24*365],["M",1e3*60*60*24*30],["D",1e3*60*60*24],["H",1e3*60*60],["m",1e3*60],["s",1e3],["S",1]];function Re(N,De){let Te=N;const ze=/\[[^\]]*]/g,Me=(De.match(ze)||[]).map(T=>T.slice(1,-1)),he=De.replace(ze,"[]"),_=st.reduce((T,ve)=>{let[Ee,ne]=ve;if(T.includes(Ee)){const Oe=Math.floor(Te/ne);return Te-=Oe*ne,T.replace(new RegExp(`${Ee}+`,"g"),xe=>{const te=xe.length;return Oe.toString().padStart(te,"0")})}return T},he);let me=0;return _.replace(ze,()=>{const T=Me[me];return me+=1,T})}function de(N,De){const{format:Te=""}=De,ze=new Date(N).getTime(),Me=Date.now(),he=Math.max(ze-Me,0);return Re(he,Te)}const ae=1e3/30;function ue(N){return new Date(N).getTime()}const A=N=>{const{value:De,format:Te="HH:mm:ss",onChange:ze,onFinish:Me}=N,he=(0,O.Z)(),_=v.useRef(null),me=()=>{Me==null||Me(),_.current&&(clearInterval(_.current),_.current=null)},T=()=>{const ne=ue(De);ne>=Date.now()&&(_.current=setInterval(()=>{he(),ze==null||ze(ne-Date.now()),ne(T(),()=>{_.current&&(clearInterval(_.current),_.current=null)}),[De]);const ve=(ne,Oe)=>de(ne,Object.assign(Object.assign({},Oe),{format:Te})),Ee=ne=>(0,H.Tm)(ne,{title:void 0});return v.createElement(Ce,Object.assign({},N,{valueRender:Ee,formatter:ve}))};var w=v.memo(A);Ce.Countdown=w;var j=Ce},8378:function(Ht,lt){"use strict";const u=v=>({[v.componentCls]:{[`${v.antCls}-motion-collapse-legacy`]:{overflow:"hidden","&-active":{transition:`height ${v.motionDurationMid} ${v.motionEaseInOut}, opacity ${v.motionDurationMid} ${v.motionEaseInOut} !important`}},[`${v.antCls}-motion-collapse`]:{overflow:"hidden",transition:`height ${v.motionDurationMid} ${v.motionEaseInOut}, opacity ${v.motionDurationMid} ${v.motionEaseInOut} !important`}}});lt.Z=u},92899:function(Ht,lt,u){"use strict";u.d(lt,{Fm:function(){return P}});var v=u(93083),O=u(95406);const H=new v.Keyframes("antMoveDownIn",{"0%":{transform:"translate3d(0, 100%, 0)",transformOrigin:"0 0",opacity:0},"100%":{transform:"translate3d(0, 0, 0)",transformOrigin:"0 0",opacity:1}}),se=new v.Keyframes("antMoveDownOut",{"0%":{transform:"translate3d(0, 0, 0)",transformOrigin:"0 0",opacity:1},"100%":{transform:"translate3d(0, 100%, 0)",transformOrigin:"0 0",opacity:0}}),R=new v.Keyframes("antMoveLeftIn",{"0%":{transform:"translate3d(-100%, 0, 0)",transformOrigin:"0 0",opacity:0},"100%":{transform:"translate3d(0, 0, 0)",transformOrigin:"0 0",opacity:1}}),B=new v.Keyframes("antMoveLeftOut",{"0%":{transform:"translate3d(0, 0, 0)",transformOrigin:"0 0",opacity:1},"100%":{transform:"translate3d(-100%, 0, 0)",transformOrigin:"0 0",opacity:0}}),ee=new v.Keyframes("antMoveRightIn",{"0%":{transform:"translate3d(100%, 0, 0)",transformOrigin:"0 0",opacity:0},"100%":{transform:"translate3d(0, 0, 0)",transformOrigin:"0 0",opacity:1}}),ce=new v.Keyframes("antMoveRightOut",{"0%":{transform:"translate3d(0, 0, 0)",transformOrigin:"0 0",opacity:1},"100%":{transform:"translate3d(100%, 0, 0)",transformOrigin:"0 0",opacity:0}}),fe=new v.Keyframes("antMoveUpIn",{"0%":{transform:"translate3d(0, -100%, 0)",transformOrigin:"0 0",opacity:0},"100%":{transform:"translate3d(0, 0, 0)",transformOrigin:"0 0",opacity:1}}),M=new v.Keyframes("antMoveUpOut",{"0%":{transform:"translate3d(0, 0, 0)",transformOrigin:"0 0",opacity:1},"100%":{transform:"translate3d(0, -100%, 0)",transformOrigin:"0 0",opacity:0}}),Ze={"move-up":{inKeyframes:fe,outKeyframes:M},"move-down":{inKeyframes:H,outKeyframes:se},"move-left":{inKeyframes:R,outKeyframes:B},"move-right":{inKeyframes:ee,outKeyframes:ce}},P=(g,X)=>{const{antCls:z}=g,Ce=`${z}-${X}`,{inKeyframes:st,outKeyframes:Re}=Ze[X];return[(0,O.R)(Ce,st,Re,g.motionDurationMid),{[` ${Ce}-enter, ${Ce}-appear `]:{opacity:0,animationTimingFunction:g.motionEaseOutCirc},[`${Ce}-leave`]:{animationTimingFunction:g.motionEaseInOutCirc}}]}},13826:function(Ht,lt,u){"use strict";u.d(lt,{Qt:function(){return R},Uw:function(){return se},fJ:function(){return H},ly:function(){return B},oN:function(){return P}});var v=u(93083),O=u(95406);const H=new v.Keyframes("antSlideUpIn",{"0%":{transform:"scaleY(0.8)",transformOrigin:"0% 0%",opacity:0},"100%":{transform:"scaleY(1)",transformOrigin:"0% 0%",opacity:1}}),se=new v.Keyframes("antSlideUpOut",{"0%":{transform:"scaleY(1)",transformOrigin:"0% 0%",opacity:1},"100%":{transform:"scaleY(0.8)",transformOrigin:"0% 0%",opacity:0}}),R=new v.Keyframes("antSlideDownIn",{"0%":{transform:"scaleY(0.8)",transformOrigin:"100% 100%",opacity:0},"100%":{transform:"scaleY(1)",transformOrigin:"100% 100%",opacity:1}}),B=new v.Keyframes("antSlideDownOut",{"0%":{transform:"scaleY(1)",transformOrigin:"100% 100%",opacity:1},"100%":{transform:"scaleY(0.8)",transformOrigin:"100% 100%",opacity:0}}),ee=new v.Keyframes("antSlideLeftIn",{"0%":{transform:"scaleX(0.8)",transformOrigin:"0% 0%",opacity:0},"100%":{transform:"scaleX(1)",transformOrigin:"0% 0%",opacity:1}}),ce=new v.Keyframes("antSlideLeftOut",{"0%":{transform:"scaleX(1)",transformOrigin:"0% 0%",opacity:1},"100%":{transform:"scaleX(0.8)",transformOrigin:"0% 0%",opacity:0}}),fe=new v.Keyframes("antSlideRightIn",{"0%":{transform:"scaleX(0.8)",transformOrigin:"100% 0%",opacity:0},"100%":{transform:"scaleX(1)",transformOrigin:"100% 0%",opacity:1}}),M=new v.Keyframes("antSlideRightOut",{"0%":{transform:"scaleX(1)",transformOrigin:"100% 0%",opacity:1},"100%":{transform:"scaleX(0.8)",transformOrigin:"100% 0%",opacity:0}}),Ze={"slide-up":{inKeyframes:H,outKeyframes:se},"slide-down":{inKeyframes:R,outKeyframes:B},"slide-left":{inKeyframes:ee,outKeyframes:ce},"slide-right":{inKeyframes:fe,outKeyframes:M}},P=(g,X)=>{const{antCls:z}=g,Ce=`${z}-${X}`,{inKeyframes:st,outKeyframes:Re}=Ze[X];return[(0,O.R)(Ce,st,Re,g.motionDurationMid),{[` ${Ce}-enter, ${Ce}-appear `]:{transform:"scale(0)",transformOrigin:"0% 0%",opacity:0,animationTimingFunction:g.motionEaseOutQuint,"&-prepare":{transform:"scale(1)"}},[`${Ce}-leave`]:{animationTimingFunction:g.motionEaseInQuint}}]}},19447:function(Ht,lt,u){"use strict";u.d(lt,{ZP:function(){return R},fS:function(){return H},qN:function(){return O}});var v=u(47585);const O=8;function H(B){const ee=O,{contentRadius:ce,limitVerticalRadius:fe}=B,M=ce>12?ce+2:12;return{dropdownArrowOffset:M,dropdownArrowOffsetVertical:fe?ee:M}}function se(B,ee){return B?ee:{}}function R(B,ee){const{componentCls:ce,sizePopupArrow:fe,borderRadiusXS:M,borderRadiusOuter:Ze,boxShadowPopoverArrow:P}=B,{colorBg:g,contentRadius:X=B.borderRadiusLG,limitVerticalRadius:z,arrowDistance:Ce=0,arrowPlacement:st={left:!0,right:!0,top:!0,bottom:!0}}=ee,{dropdownArrowOffsetVertical:Re,dropdownArrowOffset:de}=H({contentRadius:X,limitVerticalRadius:z});return{[ce]:Object.assign(Object.assign(Object.assign(Object.assign({[`${ce}-arrow`]:[Object.assign(Object.assign({position:"absolute",zIndex:1,display:"block"},(0,v.r)(fe,M,Ze,g,P)),{"&:before":{background:g}})]},se(!!st.top,{[[`&-placement-top ${ce}-arrow`,`&-placement-topLeft ${ce}-arrow`,`&-placement-topRight ${ce}-arrow`].join(",")]:{bottom:Ce,transform:"translateY(100%) rotate(180deg)"},[`&-placement-top ${ce}-arrow`]:{left:{_skip_check_:!0,value:"50%"},transform:"translateX(-50%) translateY(100%) rotate(180deg)"},[`&-placement-topLeft ${ce}-arrow`]:{left:{_skip_check_:!0,value:de}},[`&-placement-topRight ${ce}-arrow`]:{right:{_skip_check_:!0,value:de}}})),se(!!st.bottom,{[[`&-placement-bottom ${ce}-arrow`,`&-placement-bottomLeft ${ce}-arrow`,`&-placement-bottomRight ${ce}-arrow`].join(",")]:{top:Ce,transform:"translateY(-100%)"},[`&-placement-bottom ${ce}-arrow`]:{left:{_skip_check_:!0,value:"50%"},transform:"translateX(-50%) translateY(-100%)"},[`&-placement-bottomLeft ${ce}-arrow`]:{left:{_skip_check_:!0,value:de}},[`&-placement-bottomRight ${ce}-arrow`]:{right:{_skip_check_:!0,value:de}}})),se(!!st.left,{[[`&-placement-left ${ce}-arrow`,`&-placement-leftTop ${ce}-arrow`,`&-placement-leftBottom ${ce}-arrow`].join(",")]:{right:{_skip_check_:!0,value:Ce},transform:"translateX(100%) rotate(90deg)"},[`&-placement-left ${ce}-arrow`]:{top:{_skip_check_:!0,value:"50%"},transform:"translateY(-50%) translateX(100%) rotate(90deg)"},[`&-placement-leftTop ${ce}-arrow`]:{top:Re},[`&-placement-leftBottom ${ce}-arrow`]:{bottom:Re}})),se(!!st.right,{[[`&-placement-right ${ce}-arrow`,`&-placement-rightTop ${ce}-arrow`,`&-placement-rightBottom ${ce}-arrow`].join(",")]:{left:{_skip_check_:!0,value:Ce},transform:"translateX(-100%) rotate(-90deg)"},[`&-placement-right ${ce}-arrow`]:{top:{_skip_check_:!0,value:"50%"},transform:"translateY(-50%) translateX(-100%) rotate(-90deg)"},[`&-placement-rightTop ${ce}-arrow`]:{top:Re},[`&-placement-rightBottom ${ce}-arrow`]:{bottom:Re}}))}}},47585:function(Ht,lt,u){"use strict";u.d(lt,{r:function(){return v}});const v=(O,H,se,R,B)=>{const ee=O/2,ce=0,fe=ee,M=se*1/Math.sqrt(2),Ze=ee-se*(1-1/Math.sqrt(2)),P=ee-H*(1/Math.sqrt(2)),g=se*(Math.sqrt(2)-1)+H*(1/Math.sqrt(2)),X=2*ee-P,z=g,Ce=2*ee-M,st=Ze,Re=2*ee-ce,de=fe,ae=ee*Math.sqrt(2)+se*(Math.sqrt(2)-2),ue=se*(Math.sqrt(2)-1);return{pointerEvents:"none",width:O,height:O,overflow:"hidden","&::before":{position:"absolute",bottom:0,insetInlineStart:0,width:O,height:O/2,background:R,clipPath:{_multi_value_:!0,value:[`polygon(${ue}px 100%, 50% ${ue}px, ${2*ee-ue}px 100%, ${ue}px 100%)`,`path('M ${ce} ${fe} A ${se} ${se} 0 0 0 ${M} ${Ze} L ${P} ${g} A ${H} ${H} 0 0 1 ${X} ${z} L ${Ce} ${st} A ${se} ${se} 0 0 0 ${Re} ${de} Z')`]},content:'""'},"&::after":{content:'""',position:"absolute",width:ae,height:ae,bottom:0,insetInline:0,margin:"auto",borderRadius:{_skip_check_:!0,value:`0 0 ${H}px 0`},transform:"translateY(50%) rotate(-135deg)",boxShadow:B,zIndex:0,background:"transparent"}}}},99313:function(Ht,lt,u){"use strict";u.d(lt,{default:function(){return f}});var v=u(99267),O=u(18785),H=u(62772),se=u(92310),R=u.n(se),B=u(96663),ee=u(90493),ce=u(44127),fe=u(72071),M=u(20135),Ze=u(6620),P=u(59301),g=u(49658),X=u(18929),z=u(77900),Ce=(0,P.createContext)(null),st=P.forwardRef(function(d,p){var b=d.prefixCls,E=d.className,q=d.style,K=d.id,ye=d.active,Ue=d.tabKey,Ge=d.children;return P.createElement("div",{id:K&&"".concat(K,"-panel-").concat(Ue),role:"tabpanel",tabIndex:ye?0:-1,"aria-labelledby":K&&"".concat(K,"-tab-").concat(Ue),"aria-hidden":!ye,style:q,className:R()(b,ye&&"".concat(b,"-active"),E),ref:p},Ge)}),Re=st,de=["key","forceRender","style","className"];function ae(d){var p=d.id,b=d.activeKey,E=d.animated,q=d.tabPosition,K=d.destroyInactiveTabPane,ye=P.useContext(Ce),Ue=ye.prefixCls,Ge=ye.tabs,Le=E.tabPane,rt="".concat(Ue,"-tabpane");return P.createElement("div",{className:R()("".concat(Ue,"-content-holder"))},P.createElement("div",{className:R()("".concat(Ue,"-content"),"".concat(Ue,"-content-").concat(q),(0,ee.Z)({},"".concat(Ue,"-content-animated"),Le))},Ge.map(function(Qe){var tt=Qe.key,Je=Qe.forceRender,$=Qe.style,ge=Qe.className,we=(0,Ze.Z)(Qe,de),He=tt===b;return P.createElement(z.default,(0,B.Z)({key:tt,visible:He,forceRender:Je,removeOnLeave:!!K,leavedClassName:"".concat(rt,"-hidden")},E.tabPaneMotion),function(at,Ne){var ke=at.style,Y=at.className;return P.createElement(Re,(0,B.Z)({},we,{prefixCls:rt,id:p,tabKey:tt,animated:Le,active:He,style:(0,ce.Z)((0,ce.Z)({},$),ke),className:R()(ge,Y),ref:Ne}))})})))}var ue=u(19127),A=u(29301),w=u(6089),j=u(8654),N={width:0,height:0,left:0,top:0};function De(d,p,b){return(0,P.useMemo)(function(){for(var E,q=new Map,K=p.get((E=d[0])===null||E===void 0?void 0:E.key)||N,ye=K.left+K.width,Ue=0;UeDt?(Ct=ct,be.current="x"):(Ct=ut,be.current="y"),p(-Ct,-Ct)&&Ve.preventDefault()}var Ke=(0,P.useRef)(null);Ke.current={onTouchStart:Ne,onTouchMove:ke,onTouchEnd:Y,onWheel:Ie},P.useEffect(function(){function Ve(Lt){Ke.current.onTouchStart(Lt)}function ct(Lt){Ke.current.onTouchMove(Lt)}function ut(Lt){Ke.current.onTouchEnd(Lt)}function Ct(Lt){Ke.current.onWheel(Lt)}return document.addEventListener("touchmove",ct,{passive:!1}),document.addEventListener("touchend",ut,{passive:!1}),d.current.addEventListener("touchstart",Ve,{passive:!1}),d.current.addEventListener("wheel",Ct),function(){document.removeEventListener("touchmove",ct),document.removeEventListener("touchend",ut)}},[])}var T=u(34280);function ve(d){var p=(0,P.useState)(0),b=(0,fe.Z)(p,2),E=b[0],q=b[1],K=(0,P.useRef)(0),ye=(0,P.useRef)();return ye.current=d,(0,T.o)(function(){var Ue;(Ue=ye.current)===null||Ue===void 0||Ue.call(ye)},[E]),function(){K.current===E&&(K.current+=1,q(K.current))}}function Ee(d){var p=(0,P.useRef)([]),b=(0,P.useState)({}),E=(0,fe.Z)(b,2),q=E[1],K=(0,P.useRef)(typeof d=="function"?d():d),ye=ve(function(){var Ge=K.current;p.current.forEach(function(Le){Ge=Le(Ge)}),p.current=[],K.current=Ge,q({})});function Ue(Ge){p.current.push(Ge),ye()}return[K.current,Ue]}var ne={width:0,height:0,left:0,top:0,right:0};function Oe(d,p,b,E,q,K,ye){var Ue=ye.tabs,Ge=ye.tabPosition,Le=ye.rtl,rt,Qe,tt;return["top","bottom"].includes(Ge)?(rt="width",Qe=Le?"right":"left",tt=Math.abs(b)):(rt="height",Qe="top",tt=-b),(0,P.useMemo)(function(){if(!Ue.length)return[0,0];for(var Je=Ue.length,$=Je,ge=0;gett+p){$=ge-1;break}}for(var He=0,at=Je-1;at>=0;at-=1){var Ne=d.get(Ue[at].key)||ne;if(Ne[Qe]=$?[0,0]:[He,$]},[d,p,E,q,K,tt,Ge,Ue.map(function(Je){return Je.key}).join("_"),Le])}function xe(d){var p;return d instanceof Map?(p={},d.forEach(function(b,E){p[E]=b})):p=d,JSON.stringify(p)}var te="TABS_DQ";function Fe(d){return String(d).replace(/"/g,te)}function Ae(d,p,b,E){return!(!b||E||d===!1||d===void 0&&(p===!1||p===null))}function le(d,p){var b=d.prefixCls,E=d.editable,q=d.locale,K=d.style;return!E||E.showAdd===!1?null:P.createElement("button",{ref:p,type:"button",className:"".concat(b,"-nav-add"),style:K,"aria-label":(q==null?void 0:q.addAriaLabel)||"Add tab",onClick:function(Ue){E.onEdit("add",{event:Ue})}},E.addIcon||"+")}var $e=P.forwardRef(le),nt=P.forwardRef(function(d,p){var b=d.position,E=d.prefixCls,q=d.extra;if(!q)return null;var K,ye={};return(0,M.Z)(q)==="object"&&!P.isValidElement(q)?ye=q:ye.right=q,b==="right"&&(K=ye.right),b==="left"&&(K=ye.left),K?P.createElement("div",{className:"".concat(E,"-extra-content"),ref:p},K):null}),St=nt,Rt=u(31561),Et=u(15285),vt=u(10228);function It(d,p){var b=d.prefixCls,E=d.id,q=d.tabs,K=d.locale,ye=d.mobile,Ue=d.moreIcon,Ge=Ue===void 0?"More":Ue,Le=d.moreTransitionName,rt=d.style,Qe=d.className,tt=d.editable,Je=d.tabBarGutter,$=d.rtl,ge=d.removeAriaLabel,we=d.onTabClick,He=d.getPopupContainer,at=d.popupClassName,Ne=(0,P.useState)(!1),ke=(0,fe.Z)(Ne,2),Y=ke[0],be=ke[1],Ie=(0,P.useState)(null),Ke=(0,fe.Z)(Ie,2),Ve=Ke[0],ct=Ke[1],ut="".concat(E,"-more-popup"),Ct="".concat(b,"-dropdown"),Lt=Ve!==null?"".concat(ut,"-").concat(Ve):null,Dt=K==null?void 0:K.dropdownAriaLabel;function Nt(cn,Gt){cn.preventDefault(),cn.stopPropagation(),tt.onEdit("remove",{key:Gt,event:cn})}var Vt=P.createElement(Et.ZP,{onClick:function(Gt){var rn=Gt.key,pn=Gt.domEvent;we(rn,pn),be(!1)},prefixCls:"".concat(Ct,"-menu"),id:ut,tabIndex:-1,role:"listbox","aria-activedescendant":Lt,selectedKeys:[Ve],"aria-label":Dt!==void 0?Dt:"expanded dropdown"},q.map(function(cn){var Gt=cn.closable,rn=cn.disabled,pn=cn.closeIcon,un=cn.key,wn=cn.label,kn=Ae(Gt,pn,tt,rn);return P.createElement(Et.sN,{key:un,id:"".concat(ut,"-").concat(un),role:"option","aria-controls":E&&"".concat(E,"-panel-").concat(un),disabled:rn},P.createElement("span",null,wn),kn&&P.createElement("button",{type:"button","aria-label":ge||"remove",tabIndex:0,className:"".concat(Ct,"-menu-item-remove"),onClick:function(Pt){Pt.stopPropagation(),Nt(Pt,un)}},pn||tt.removeIcon||"\xD7"))}));function tn(cn){for(var Gt=q.filter(function(kn){return!kn.disabled}),rn=Gt.findIndex(function(kn){return kn.key===Ve})||0,pn=Gt.length,un=0;unXn?"left":"right"})}),Dt=(0,fe.Z)(Lt,2),Nt=Dt[0],Vt=Dt[1],tn=Te(0,function(ar,Xn){!Ct&&Ne&&Ne({direction:ar>Xn?"top":"bottom"})}),Ut=(0,fe.Z)(tn,2),bt=Ut[0],ln=Ut[1],Qt=(0,P.useState)([0,0]),cn=(0,fe.Z)(Qt,2),Gt=cn[0],rn=cn[1],pn=(0,P.useState)([0,0]),un=(0,fe.Z)(pn,2),wn=un[0],kn=un[1],on=(0,P.useState)([0,0]),Pt=(0,fe.Z)(on,2),Tt=Pt[0],Rn=Pt[1],Ln=(0,P.useState)([0,0]),Cn=(0,fe.Z)(Ln,2),Sn=Cn[0],En=Cn[1],dn=Ee(new Map),An=(0,fe.Z)(dn,2),Wn=An[0],sn=An[1],Wt=De(K,Wn,wn[0]),fn=J(Gt,Ct),On=J(wn,Ct),Vn=J(Tt,Ct),Kn=J(Sn,Ct),Nn=fnir?ir:ar}var $n=(0,P.useRef)(),cr=(0,P.useState)(),Cr=(0,fe.Z)(cr,2),wr=Cr[0],Tr=Cr[1];function Lr(){Tr(Date.now())}function dr(){window.clearTimeout($n.current)}me(Ke,function(ar,Xn){function Ir(Rr,Mr){Rr(function(yn){var Dn=mr(yn+Mr);return Dn})}return Nn?(Ct?Ir(Vt,ar):Ir(ln,Xn),dr(),Lr(),!0):!1}),(0,P.useEffect)(function(){return dr(),wr&&($n.current=window.setTimeout(function(){Tr(0)},100)),dr},[wr]);var kr=Oe(Wt,zn,Ct?Nt:bt,On,Vn,Kn,(0,ce.Z)((0,ce.Z)({},d),{},{tabs:K})),Or=(0,fe.Z)(kr,2),jr=Or[0],Wr=Or[1],_n=(0,w.Z)(function(){var ar=arguments.length>0&&arguments[0]!==void 0?arguments[0]:rt,Xn=Wt.get(ar)||{width:0,height:0,left:0,right:0,top:0};if(Ct){var Ir=Nt;Qe?Xn.rightNt+zn&&(Ir=Xn.right+Xn.width-zn):Xn.left<-Nt?Ir=-Xn.left:Xn.left+Xn.width>-Nt+zn&&(Ir=-(Xn.left+Xn.width-zn)),ln(0),Vt(mr(Ir))}else{var Rr=bt;Xn.top<-bt?Rr=-Xn.top:Xn.top+Xn.height>-bt+zn&&(Rr=-(Xn.top+Xn.height-zn)),Vt(0),ln(mr(Rr))}}),Hn={};ge==="top"||ge==="bottom"?Hn[Qe?"marginRight":"marginLeft"]=we:Hn.marginTop=we;var sr=K.map(function(ar,Xn){var Ir=ar.key;return P.createElement(yt,{id:Ge,prefixCls:q,key:Ir,tab:ar,style:Xn===0?void 0:Hn,closable:ar.closable,editable:Je,active:Ir===rt,renderWrapper:He,removeAriaLabel:$==null?void 0:$.removeAriaLabel,onClick:function(Mr){at(Ir,Mr)},onFocus:function(){_n(Ir),Lr(),Ke.current&&(Qe||(Ke.current.scrollLeft=0),Ke.current.scrollTop=0)}})}),Zn=function(){return sn(function(){var Xn=new Map;return K.forEach(function(Ir){var Rr,Mr=Ir.key,yn=(Rr=Ve.current)===null||Rr===void 0?void 0:Rr.querySelector('[data-node-key="'.concat(Fe(Mr),'"]'));yn&&Xn.set(Mr,{width:yn.offsetWidth,height:yn.offsetHeight,left:yn.offsetLeft,top:yn.offsetTop})}),Xn})};(0,P.useEffect)(function(){Zn()},[K.map(function(ar){return ar.key}).join("_")]);var Jn=ve(function(){var ar=U(Y),Xn=U(be),Ir=U(Ie);rn([ar[0]-Xn[0]-Ir[0],ar[1]-Xn[1]-Ir[1]]);var Rr=U(ut);Rn(Rr);var Mr=U(ct);En(Mr);var yn=U(Ve);kn([yn[0]-Rr[0],yn[1]-Rr[1]]),Zn()}),pr=K.slice(0,jr),Pr=K.slice(Wr+1),bn=[].concat((0,ue.Z)(pr),(0,ue.Z)(Pr)),Pn=Wt.get(rt),Tn=L({activeTabOffset:Pn,horizontal:Ct,rtl:Qe,indicatorSize:ke}),Fn=Tn.style;(0,P.useEffect)(function(){_n()},[rt,er,ir,xe(Pn),xe(Wt),Ct]),(0,P.useEffect)(function(){Jn()},[Qe]);var jn=!!bn.length,Yn="".concat(q,"-nav-wrap"),br,fr,vr,Sr;return Ct?Qe?(fr=Nt>0,br=Nt!==ir):(br=Nt<0,fr=Nt!==er):(vr=bt<0,Sr=bt!==er),P.createElement(A.Z,{onResize:Jn},P.createElement("div",{ref:(0,j.x1)(p,Y),role:"tablist",className:R()("".concat(q,"-nav"),ye),style:Ue,onKeyDown:function(){Lr()}},P.createElement(St,{ref:be,position:"left",extra:tt,prefixCls:q}),P.createElement(A.Z,{onResize:Jn},P.createElement("div",{className:R()(Yn,(b={},(0,ee.Z)(b,"".concat(Yn,"-ping-left"),br),(0,ee.Z)(b,"".concat(Yn,"-ping-right"),fr),(0,ee.Z)(b,"".concat(Yn,"-ping-top"),vr),(0,ee.Z)(b,"".concat(Yn,"-ping-bottom"),Sr),b)),ref:Ke},P.createElement(A.Z,{onResize:Jn},P.createElement("div",{ref:Ve,className:"".concat(q,"-nav-list"),style:{transform:"translate(".concat(Nt,"px, ").concat(bt,"px)"),transition:wr?"none":void 0}},sr,P.createElement($e,{ref:ut,prefixCls:q,locale:$,editable:Je,style:(0,ce.Z)((0,ce.Z)({},sr.length===0?void 0:Hn),{},{visibility:jn?"hidden":null})}),P.createElement("div",{className:R()("".concat(q,"-ink-bar"),(0,ee.Z)({},"".concat(q,"-ink-bar-animated"),Le.inkBar)),style:Fn}))))),P.createElement(gt,(0,B.Z)({},d,{removeAriaLabel:$==null?void 0:$.removeAriaLabel,ref:ct,prefixCls:q,tabs:bn,className:!jn&&lr,tabMoving:!!wr})),P.createElement(St,{ref:Ie,position:"right",extra:tt,prefixCls:q})))}var x=P.forwardRef(Se),C=["renderTabBar"],Q=["label","key"];function I(d){var p=d.renderTabBar,b=(0,Ze.Z)(d,C),E=P.useContext(Ce),q=E.tabs;if(p){var K=(0,ce.Z)((0,ce.Z)({},b),{},{panes:q.map(function(ye){var Ue=ye.label,Ge=ye.key,Le=(0,Ze.Z)(ye,Q);return P.createElement(Re,(0,B.Z)({tab:Ue,key:Ge,tabKey:Ge},Le))})});return p(K,x)}return P.createElement(x,b)}var F=u(48736);function pe(){var d=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{inkBar:!0,tabPane:!1},p;return d===!1?p={inkBar:!1,tabPane:!1}:d===!0?p={inkBar:!0,tabPane:!1}:p=(0,ce.Z)({inkBar:!0},(0,M.Z)(d)==="object"?d:{}),p.tabPaneMotion&&p.tabPane===void 0&&(p.tabPane=!0),!p.tabPaneMotion&&p.tabPane&&(p.tabPane=!1),p}var je=["id","prefixCls","className","items","direction","activeKey","defaultActiveKey","editable","animated","tabPosition","tabBarGutter","tabBarStyle","tabBarExtraContent","locale","moreIcon","moreTransitionName","destroyInactiveTabPane","renderTabBar","onChange","onTabClick","onTabScroll","getPopupContainer","popupClassName","indicatorSize"],Be=0;function it(d,p){var b,E=d.id,q=d.prefixCls,K=q===void 0?"rc-tabs":q,ye=d.className,Ue=d.items,Ge=d.direction,Le=d.activeKey,rt=d.defaultActiveKey,Qe=d.editable,tt=d.animated,Je=d.tabPosition,$=Je===void 0?"top":Je,ge=d.tabBarGutter,we=d.tabBarStyle,He=d.tabBarExtraContent,at=d.locale,Ne=d.moreIcon,ke=d.moreTransitionName,Y=d.destroyInactiveTabPane,be=d.renderTabBar,Ie=d.onChange,Ke=d.onTabClick,Ve=d.onTabScroll,ct=d.getPopupContainer,ut=d.popupClassName,Ct=d.indicatorSize,Lt=(0,Ze.Z)(d,je),Dt=P.useMemo(function(){return(Ue||[]).filter(function(En){return En&&(0,M.Z)(En)==="object"&&"key"in En})},[Ue]),Nt=Ge==="rtl",Vt=pe(tt),tn=(0,P.useState)(!1),Ut=(0,fe.Z)(tn,2),bt=Ut[0],ln=Ut[1];(0,P.useEffect)(function(){ln((0,g.Z)())},[]);var Qt=(0,X.Z)(function(){var En;return(En=Dt[0])===null||En===void 0?void 0:En.key},{value:Le,defaultValue:rt}),cn=(0,fe.Z)(Qt,2),Gt=cn[0],rn=cn[1],pn=(0,P.useState)(function(){return Dt.findIndex(function(En){return En.key===Gt})}),un=(0,fe.Z)(pn,2),wn=un[0],kn=un[1];(0,P.useEffect)(function(){var En=Dt.findIndex(function(An){return An.key===Gt});if(En===-1){var dn;En=Math.max(0,Math.min(wn,Dt.length-1)),rn((dn=Dt[En])===null||dn===void 0?void 0:dn.key)}kn(En)},[Dt.map(function(En){return En.key}).join("_"),Gt,wn]);var on=(0,X.Z)(null,{value:E}),Pt=(0,fe.Z)(on,2),Tt=Pt[0],Rn=Pt[1];(0,P.useEffect)(function(){E||(Rn("rc-tabs-".concat(Be)),Be+=1)},[]);function Ln(En,dn){Ke==null||Ke(En,dn);var An=En!==Gt;rn(En),An&&(Ie==null||Ie(En))}var Cn={id:Tt,activeKey:Gt,animated:Vt,tabPosition:$,rtl:Nt,mobile:bt},Sn=(0,ce.Z)((0,ce.Z)({},Cn),{},{editable:Qe,locale:at,moreIcon:Ne,moreTransitionName:ke,tabBarGutter:ge,onTabClick:Ln,onTabScroll:Ve,extra:He,style:we,panes:null,getPopupContainer:ct,popupClassName:ut,indicatorSize:Ct});return P.createElement(Ce.Provider,{value:{tabs:Dt,prefixCls:K}},P.createElement("div",(0,B.Z)({ref:p,id:E,className:R()(K,"".concat(K,"-").concat($),(b={},(0,ee.Z)(b,"".concat(K,"-mobile"),bt),(0,ee.Z)(b,"".concat(K,"-editable"),Qe),(0,ee.Z)(b,"".concat(K,"-rtl"),Nt),b),ye)},Lt),P.createElement(I,(0,B.Z)({},Sn,{renderTabBar:be})),P.createElement(ae,(0,B.Z)({destroyInactiveTabPane:Y},Cn,{animated:Vt}))))}var _e=P.forwardRef(it),Ye=_e,re=Ye,Pe=u(36355),et=u(19716),dt=()=>null,pt=u(62892);const ft={motionAppear:!1,motionEnter:!0,motionLeave:!0};function ot(d){let p=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{inkBar:!0,tabPane:!1},b;return p===!1?b={inkBar:!1,tabPane:!1}:p===!0?b={inkBar:!0,tabPane:!0}:b=Object.assign({inkBar:!0},typeof p=="object"?p:{}),b.tabPane&&(b.tabPaneMotion=Object.assign(Object.assign({},ft),{motionName:(0,pt.m)(d,"switch")})),b}var _t=u(11592),jt=function(d,p){var b={};for(var E in d)Object.prototype.hasOwnProperty.call(d,E)&&p.indexOf(E)<0&&(b[E]=d[E]);if(d!=null&&typeof Object.getOwnPropertySymbols=="function")for(var q=0,E=Object.getOwnPropertySymbols(d);qp)}function Yt(d,p){if(d)return d;const b=(0,_t.Z)(p).map(E=>{if(P.isValidElement(E)){const{key:q,props:K}=E,ye=K||{},{tab:Ue}=ye,Ge=jt(ye,["tab"]);return Object.assign(Object.assign({key:String(q)},Ge),{label:Ue})}return null});return Zt(b)}var Mt=u(17313),$t=u(83116),xt=u(37613),Ft=u(13826),Bt=d=>{const{componentCls:p,motionDurationSlow:b}=d;return[{[p]:{[`${p}-switch`]:{"&-appear, &-enter":{transition:"none","&-start":{opacity:0},"&-active":{opacity:1,transition:`opacity ${b}`}},"&-leave":{position:"absolute",transition:"none",inset:0,"&-start":{opacity:1},"&-active":{opacity:0,transition:`opacity ${b}`}}}}},[(0,Ft.oN)(d,"slide-up"),(0,Ft.oN)(d,"slide-down")]]};const Kt=d=>{const{componentCls:p,tabsCardPadding:b,cardBg:E,cardGutter:q,colorBorderSecondary:K,itemSelectedColor:ye}=d;return{[`${p}-card`]:{[`> ${p}-nav, > div > ${p}-nav`]:{[`${p}-tab`]:{margin:0,padding:b,background:E,border:`${d.lineWidth}px ${d.lineType} ${K}`,transition:`all ${d.motionDurationSlow} ${d.motionEaseInOut}`},[`${p}-tab-active`]:{color:ye,background:d.colorBgContainer},[`${p}-ink-bar`]:{visibility:"hidden"}},[`&${p}-top, &${p}-bottom`]:{[`> ${p}-nav, > div > ${p}-nav`]:{[`${p}-tab + ${p}-tab`]:{marginLeft:{_skip_check_:!0,value:`${q}px`}}}},[`&${p}-top`]:{[`> ${p}-nav, > div > ${p}-nav`]:{[`${p}-tab`]:{borderRadius:`${d.borderRadiusLG}px ${d.borderRadiusLG}px 0 0`},[`${p}-tab-active`]:{borderBottomColor:d.colorBgContainer}}},[`&${p}-bottom`]:{[`> ${p}-nav, > div > ${p}-nav`]:{[`${p}-tab`]:{borderRadius:`0 0 ${d.borderRadiusLG}px ${d.borderRadiusLG}px`},[`${p}-tab-active`]:{borderTopColor:d.colorBgContainer}}},[`&${p}-left, &${p}-right`]:{[`> ${p}-nav, > div > ${p}-nav`]:{[`${p}-tab + ${p}-tab`]:{marginTop:`${q}px`}}},[`&${p}-left`]:{[`> ${p}-nav, > div > ${p}-nav`]:{[`${p}-tab`]:{borderRadius:{_skip_check_:!0,value:`${d.borderRadiusLG}px 0 0 ${d.borderRadiusLG}px`}},[`${p}-tab-active`]:{borderRightColor:{_skip_check_:!0,value:d.colorBgContainer}}}},[`&${p}-right`]:{[`> ${p}-nav, > div > ${p}-nav`]:{[`${p}-tab`]:{borderRadius:{_skip_check_:!0,value:`0 ${d.borderRadiusLG}px ${d.borderRadiusLG}px 0`}},[`${p}-tab-active`]:{borderLeftColor:{_skip_check_:!0,value:d.colorBgContainer}}}}}}},hn=d=>{const{componentCls:p,itemHoverColor:b,dropdownEdgeChildVerticalPadding:E}=d;return{[`${p}-dropdown`]:Object.assign(Object.assign({},(0,Mt.Wf)(d)),{position:"absolute",top:-9999,left:{_skip_check_:!0,value:-9999},zIndex:d.zIndexPopup,display:"block","&-hidden":{display:"none"},[`${p}-dropdown-menu`]:{maxHeight:d.tabsDropdownHeight,margin:0,padding:`${E}px 0`,overflowX:"hidden",overflowY:"auto",textAlign:{_skip_check_:!0,value:"left"},listStyleType:"none",backgroundColor:d.colorBgContainer,backgroundClip:"padding-box",borderRadius:d.borderRadiusLG,outline:"none",boxShadow:d.boxShadowSecondary,"&-item":Object.assign(Object.assign({},Mt.vS),{display:"flex",alignItems:"center",minWidth:d.tabsDropdownWidth,margin:0,padding:`${d.paddingXXS}px ${d.paddingSM}px`,color:d.colorText,fontWeight:"normal",fontSize:d.fontSize,lineHeight:d.lineHeight,cursor:"pointer",transition:`all ${d.motionDurationSlow}`,"> span":{flex:1,whiteSpace:"nowrap"},"&-remove":{flex:"none",marginLeft:{_skip_check_:!0,value:d.marginSM},color:d.colorTextDescription,fontSize:d.fontSizeSM,background:"transparent",border:0,cursor:"pointer","&:hover":{color:b}},"&:hover":{background:d.controlItemBgHover},"&-disabled":{"&, &:hover":{color:d.colorTextDisabled,background:"transparent",cursor:"not-allowed"}}})}})}},en=d=>{const{componentCls:p,margin:b,colorBorderSecondary:E,horizontalMargin:q,verticalItemPadding:K,verticalItemMargin:ye}=d;return{[`${p}-top, ${p}-bottom`]:{flexDirection:"column",[`> ${p}-nav, > div > ${p}-nav`]:{margin:q,"&::before":{position:"absolute",right:{_skip_check_:!0,value:0},left:{_skip_check_:!0,value:0},borderBottom:`${d.lineWidth}px ${d.lineType} ${E}`,content:"''"},[`${p}-ink-bar`]:{height:d.lineWidthBold,"&-animated":{transition:`width ${d.motionDurationSlow}, left ${d.motionDurationSlow}, right ${d.motionDurationSlow}`}},[`${p}-nav-wrap`]:{"&::before, &::after":{top:0,bottom:0,width:d.controlHeight},"&::before":{left:{_skip_check_:!0,value:0},boxShadow:d.boxShadowTabsOverflowLeft},"&::after":{right:{_skip_check_:!0,value:0},boxShadow:d.boxShadowTabsOverflowRight},[`&${p}-nav-wrap-ping-left::before`]:{opacity:1},[`&${p}-nav-wrap-ping-right::after`]:{opacity:1}}}},[`${p}-top`]:{[`> ${p}-nav, > div > ${p}-nav`]:{"&::before":{bottom:0},[`${p}-ink-bar`]:{bottom:0}}},[`${p}-bottom`]:{[`> ${p}-nav, > div > ${p}-nav`]:{order:1,marginTop:`${b}px`,marginBottom:0,"&::before":{top:0},[`${p}-ink-bar`]:{top:0}},[`> ${p}-content-holder, > div > ${p}-content-holder`]:{order:0}},[`${p}-left, ${p}-right`]:{[`> ${p}-nav, > div > ${p}-nav`]:{flexDirection:"column",minWidth:d.controlHeight*1.25,[`${p}-tab`]:{padding:K,textAlign:"center"},[`${p}-tab + ${p}-tab`]:{margin:ye},[`${p}-nav-wrap`]:{flexDirection:"column","&::before, &::after":{right:{_skip_check_:!0,value:0},left:{_skip_check_:!0,value:0},height:d.controlHeight},"&::before":{top:0,boxShadow:d.boxShadowTabsOverflowTop},"&::after":{bottom:0,boxShadow:d.boxShadowTabsOverflowBottom},[`&${p}-nav-wrap-ping-top::before`]:{opacity:1},[`&${p}-nav-wrap-ping-bottom::after`]:{opacity:1}},[`${p}-ink-bar`]:{width:d.lineWidthBold,"&-animated":{transition:`height ${d.motionDurationSlow}, top ${d.motionDurationSlow}`}},[`${p}-nav-list, ${p}-nav-operations`]:{flex:"1 0 auto",flexDirection:"column"}}},[`${p}-left`]:{[`> ${p}-nav, > div > ${p}-nav`]:{[`${p}-ink-bar`]:{right:{_skip_check_:!0,value:0}}},[`> ${p}-content-holder, > div > ${p}-content-holder`]:{marginLeft:{_skip_check_:!0,value:`-${d.lineWidth}px`},borderLeft:{_skip_check_:!0,value:`${d.lineWidth}px ${d.lineType} ${d.colorBorder}`},[`> ${p}-content > ${p}-tabpane`]:{paddingLeft:{_skip_check_:!0,value:d.paddingLG}}}},[`${p}-right`]:{[`> ${p}-nav, > div > ${p}-nav`]:{order:1,[`${p}-ink-bar`]:{left:{_skip_check_:!0,value:0}}},[`> ${p}-content-holder, > div > ${p}-content-holder`]:{order:0,marginRight:{_skip_check_:!0,value:-d.lineWidth},borderRight:{_skip_check_:!0,value:`${d.lineWidth}px ${d.lineType} ${d.colorBorder}`},[`> ${p}-content > ${p}-tabpane`]:{paddingRight:{_skip_check_:!0,value:d.paddingLG}}}}}},xn=d=>{const{componentCls:p,cardPaddingSM:b,cardPaddingLG:E,horizontalItemPaddingSM:q,horizontalItemPaddingLG:K}=d;return{[p]:{"&-small":{[`> ${p}-nav`]:{[`${p}-tab`]:{padding:q,fontSize:d.titleFontSizeSM}}},"&-large":{[`> ${p}-nav`]:{[`${p}-tab`]:{padding:K,fontSize:d.titleFontSizeLG}}}},[`${p}-card`]:{[`&${p}-small`]:{[`> ${p}-nav`]:{[`${p}-tab`]:{padding:b}},[`&${p}-bottom`]:{[`> ${p}-nav ${p}-tab`]:{borderRadius:`0 0 ${d.borderRadius}px ${d.borderRadius}px`}},[`&${p}-top`]:{[`> ${p}-nav ${p}-tab`]:{borderRadius:`${d.borderRadius}px ${d.borderRadius}px 0 0`}},[`&${p}-right`]:{[`> ${p}-nav ${p}-tab`]:{borderRadius:{_skip_check_:!0,value:`0 ${d.borderRadius}px ${d.borderRadius}px 0`}}},[`&${p}-left`]:{[`> ${p}-nav ${p}-tab`]:{borderRadius:{_skip_check_:!0,value:`${d.borderRadius}px 0 0 ${d.borderRadius}px`}}}},[`&${p}-large`]:{[`> ${p}-nav`]:{[`${p}-tab`]:{padding:E}}}}}},an=d=>{const{componentCls:p,itemActiveColor:b,itemHoverColor:E,iconCls:q,tabsHorizontalItemMargin:K,horizontalItemPadding:ye,itemSelectedColor:Ue,itemColor:Ge}=d,Le=`${p}-tab`;return{[Le]:{position:"relative",WebkitTouchCallout:"none",WebkitTapHighlightColor:"transparent",display:"inline-flex",alignItems:"center",padding:ye,fontSize:d.titleFontSize,background:"transparent",border:0,outline:"none",cursor:"pointer",color:Ge,"&-btn, &-remove":Object.assign({"&:focus:not(:focus-visible), &:active":{color:b}},(0,Mt.Qy)(d)),"&-btn":{outline:"none",transition:"all 0.3s"},"&-remove":{flex:"none",marginRight:{_skip_check_:!0,value:-d.marginXXS},marginLeft:{_skip_check_:!0,value:d.marginXS},color:d.colorTextDescription,fontSize:d.fontSizeSM,background:"transparent",border:"none",outline:"none",cursor:"pointer",transition:`all ${d.motionDurationSlow}`,"&:hover":{color:d.colorTextHeading}},"&:hover":{color:E},[`&${Le}-active ${Le}-btn`]:{color:Ue,textShadow:d.tabsActiveTextShadow},[`&${Le}-disabled`]:{color:d.colorTextDisabled,cursor:"not-allowed"},[`&${Le}-disabled ${Le}-btn, &${Le}-disabled ${p}-remove`]:{"&:focus, &:active":{color:d.colorTextDisabled}},[`& ${Le}-remove ${q}`]:{margin:0},[q]:{marginRight:{_skip_check_:!0,value:d.marginSM}}},[`${Le} + ${Le}`]:{margin:{_skip_check_:!0,value:K}}}},mn=d=>{const{componentCls:p,tabsHorizontalItemMarginRTL:b,iconCls:E,cardGutter:q}=d;return{[`${p}-rtl`]:{direction:"rtl",[`${p}-nav`]:{[`${p}-tab`]:{margin:{_skip_check_:!0,value:b},[`${p}-tab:last-of-type`]:{marginLeft:{_skip_check_:!0,value:0}},[E]:{marginRight:{_skip_check_:!0,value:0},marginLeft:{_skip_check_:!0,value:`${d.marginSM}px`}},[`${p}-tab-remove`]:{marginRight:{_skip_check_:!0,value:`${d.marginXS}px`},marginLeft:{_skip_check_:!0,value:`-${d.marginXXS}px`},[E]:{margin:0}}}},[`&${p}-left`]:{[`> ${p}-nav`]:{order:1},[`> ${p}-content-holder`]:{order:0}},[`&${p}-right`]:{[`> ${p}-nav`]:{order:0},[`> ${p}-content-holder`]:{order:1}},[`&${p}-card${p}-top, &${p}-card${p}-bottom`]:{[`> ${p}-nav, > div > ${p}-nav`]:{[`${p}-tab + ${p}-tab`]:{marginRight:{_skip_check_:!0,value:q},marginLeft:{_skip_check_:!0,value:0}}}}},[`${p}-dropdown-rtl`]:{direction:"rtl"},[`${p}-menu-item`]:{[`${p}-dropdown-rtl`]:{textAlign:{_skip_check_:!0,value:"right"}}}}},Ot=d=>{const{componentCls:p,tabsCardPadding:b,cardHeight:E,cardGutter:q,itemHoverColor:K,itemActiveColor:ye,colorBorderSecondary:Ue}=d;return{[p]:Object.assign(Object.assign(Object.assign(Object.assign({},(0,Mt.Wf)(d)),{display:"flex",[`> ${p}-nav, > div > ${p}-nav`]:{position:"relative",display:"flex",flex:"none",alignItems:"center",[`${p}-nav-wrap`]:{position:"relative",display:"flex",flex:"auto",alignSelf:"stretch",overflow:"hidden",whiteSpace:"nowrap",transform:"translate(0)","&::before, &::after":{position:"absolute",zIndex:1,opacity:0,transition:`opacity ${d.motionDurationSlow}`,content:"''",pointerEvents:"none"}},[`${p}-nav-list`]:{position:"relative",display:"flex",transition:`opacity ${d.motionDurationSlow}`},[`${p}-nav-operations`]:{display:"flex",alignSelf:"stretch"},[`${p}-nav-operations-hidden`]:{position:"absolute",visibility:"hidden",pointerEvents:"none"},[`${p}-nav-more`]:{position:"relative",padding:b,background:"transparent",border:0,color:d.colorText,"&::after":{position:"absolute",right:{_skip_check_:!0,value:0},bottom:0,left:{_skip_check_:!0,value:0},height:d.controlHeightLG/8,transform:"translateY(100%)",content:"''"}},[`${p}-nav-add`]:Object.assign({minWidth:E,marginLeft:{_skip_check_:!0,value:q},padding:`0 ${d.paddingXS}px`,background:"transparent",border:`${d.lineWidth}px ${d.lineType} ${Ue}`,borderRadius:`${d.borderRadiusLG}px ${d.borderRadiusLG}px 0 0`,outline:"none",cursor:"pointer",color:d.colorText,transition:`all ${d.motionDurationSlow} ${d.motionEaseInOut}`,"&:hover":{color:K},"&:active, &:focus:not(:focus-visible)":{color:ye}},(0,Mt.Qy)(d))},[`${p}-extra-content`]:{flex:"none"},[`${p}-ink-bar`]:{position:"absolute",background:d.inkBarColor,pointerEvents:"none"}}),an(d)),{[`${p}-content`]:{position:"relative",width:"100%"},[`${p}-content-holder`]:{flex:"auto",minWidth:0,minHeight:0},[`${p}-tabpane`]:{outline:"none","&-hidden":{display:"none"}}}),[`${p}-centered`]:{[`> ${p}-nav, > div > ${p}-nav`]:{[`${p}-nav-wrap`]:{[`&:not([class*='${p}-nav-wrap-ping'])`]:{justifyContent:"center"}}}}}};var Xe=(0,$t.Z)("Tabs",d=>{const p=(0,xt.TS)(d,{tabsCardPadding:d.cardPadding||`${(d.cardHeight-Math.round(d.fontSize*d.lineHeight))/2-d.lineWidth}px ${d.padding}px`,dropdownEdgeChildVerticalPadding:d.paddingXXS,tabsActiveTextShadow:"0 0 0.25px currentcolor",tabsDropdownHeight:200,tabsDropdownWidth:120,tabsHorizontalItemMargin:`0 0 0 ${d.horizontalItemGutter}px`,tabsHorizontalItemMarginRTL:`0 0 0 ${d.horizontalItemGutter}px`});return[xn(p),mn(p),en(p),hn(p),Kt(p),Ot(p),Bt(p)]},d=>{const p=d.controlHeightLG;return{zIndexPopup:d.zIndexPopupBase+50,cardBg:d.colorFillAlter,cardHeight:p,cardPadding:"",cardPaddingSM:`${d.paddingXXS*1.5}px ${d.padding}px`,cardPaddingLG:`${d.paddingXS}px ${d.padding}px ${d.paddingXXS*1.5}px`,titleFontSize:d.fontSize,titleFontSizeLG:d.fontSizeLG,titleFontSizeSM:d.fontSize,inkBarColor:d.colorPrimary,horizontalMargin:`0 0 ${d.margin}px 0`,horizontalItemGutter:32,horizontalItemMargin:"",horizontalItemMarginRTL:"",horizontalItemPadding:`${d.paddingSM}px 0`,horizontalItemPaddingSM:`${d.paddingXS}px 0`,horizontalItemPaddingLG:`${d.padding}px 0`,verticalItemPadding:`${d.paddingXS}px ${d.paddingLG}px`,verticalItemMargin:`${d.margin}px 0 0 0`,itemColor:d.colorText,itemSelectedColor:d.colorPrimary,itemHoverColor:d.colorPrimaryHover,itemActiveColor:d.colorPrimaryActive,cardGutter:d.marginXXS/2}}),l=function(d,p){var b={};for(var E in d)Object.prototype.hasOwnProperty.call(d,E)&&p.indexOf(E)<0&&(b[E]=d[E]);if(d!=null&&typeof Object.getOwnPropertySymbols=="function")for(var q=0,E=Object.getOwnPropertySymbols(d);q{const{type:p,className:b,rootClassName:E,size:q,onEdit:K,hideAdd:ye,centered:Ue,addIcon:Ge,popupClassName:Le,children:rt,items:Qe,animated:tt,style:Je,indicatorSize:$}=d,ge=l(d,["type","className","rootClassName","size","onEdit","hideAdd","centered","addIcon","popupClassName","children","items","animated","style","indicatorSize"]),{prefixCls:we,moreIcon:He=P.createElement(O.Z,null)}=ge,{direction:at,tabs:Ne,getPrefixCls:ke,getPopupContainer:Y}=P.useContext(Pe.E_),be=ke("tabs",we),[Ie,Ke]=Xe(be);let Ve;p==="editable-card"&&(Ve={onEdit:(Nt,Vt)=>{let{key:tn,event:Ut}=Vt;K==null||K(Nt==="add"?Ut:tn,Nt)},removeIcon:P.createElement(v.Z,null),addIcon:Ge||P.createElement(H.Z,null),showAdd:ye!==!0});const ct=ke(),ut=Yt(Qe,rt),Ct=ot(be,tt),Lt=(0,et.Z)(q),Dt=Object.assign(Object.assign({},Ne==null?void 0:Ne.style),Je);return Ie(P.createElement(re,Object.assign({direction:at,getPopupContainer:Y,moreTransitionName:`${ct}-slide-up`},ge,{items:ut,className:R()({[`${be}-${Lt}`]:Lt,[`${be}-card`]:["card","editable-card"].includes(p),[`${be}-editable-card`]:p==="editable-card",[`${be}-centered`]:Ue},Ne==null?void 0:Ne.className,b,E,Ke),popupClassName:R()(Le,Ke),style:Dt,editable:Ve,moreIcon:He,prefixCls:be,animated:Ct,indicatorSize:$!=null?$:Ne==null?void 0:Ne.indicatorSize})))};h.TabPane=dt;var f=h},33166:function(Ht,lt,u){"use strict";u.d(lt,{i:function(){return v}});const v=["blue","purple","cyan","green","magenta","pink","red","orange","yellow","volcano","geekblue","lime","gold"]},45157:function(Ht,lt,u){"use strict";u.d(lt,{Z:function(){return O}});var v=u(33166);function O(H,se){return v.i.reduce((R,B)=>{const ee=H[`${B}1`],ce=H[`${B}3`],fe=H[`${B}6`],M=H[`${B}7`];return Object.assign(Object.assign({},R),se(B,{lightColor:ee,lightBorderColor:ce,darkColor:fe,textColor:M}))},{})}},6848:function(Ht,lt,u){"use strict";u.d(lt,{Z:function(){return ze}});var v=u(59301),O=u(92310),H=u.n(O),se=u(55477),R=u(18929),B=u(62892),ee=u(79676),ce=u(92343),fe=u(36355),M=u(33234),Ze=u(88088),P=u(17313),g=u(29878),X=u(19447),z=u(45157),Ce=u(37613),st=u(83116);const Re=Me=>{const{componentCls:he,tooltipMaxWidth:_,tooltipColor:me,tooltipBg:T,tooltipBorderRadius:ve,zIndexPopup:Ee,controlHeight:ne,boxShadowSecondary:Oe,paddingSM:xe,paddingXS:te,tooltipRadiusOuter:Fe}=Me;return[{[he]:Object.assign(Object.assign(Object.assign(Object.assign({},(0,P.Wf)(Me)),{position:"absolute",zIndex:Ee,display:"block",width:"max-content",maxWidth:_,visibility:"visible",transformOrigin:"var(--arrow-x, 50%) var(--arrow-y, 50%)","&-hidden":{display:"none"},"--antd-arrow-background-color":T,[`${he}-inner`]:{minWidth:ne,minHeight:ne,padding:`${xe/2}px ${te}px`,color:me,textAlign:"start",textDecoration:"none",wordWrap:"break-word",backgroundColor:T,borderRadius:ve,boxShadow:Oe,boxSizing:"border-box"},[["&-placement-left","&-placement-leftTop","&-placement-leftBottom","&-placement-right","&-placement-rightTop","&-placement-rightBottom"].join(",")]:{[`${he}-inner`]:{borderRadius:Math.min(ve,X.qN)}},[`${he}-content`]:{position:"relative"}}),(0,z.Z)(Me,(Ae,le)=>{let{darkColor:$e}=le;return{[`&${he}-${Ae}`]:{[`${he}-inner`]:{backgroundColor:$e},[`${he}-arrow`]:{"--antd-arrow-background-color":$e}}}})),{"&-rtl":{direction:"rtl"}})},(0,X.ZP)((0,Ce.TS)(Me,{borderRadiusOuter:Fe}),{colorBg:"var(--antd-arrow-background-color)",contentRadius:ve,limitVerticalRadius:!0}),{[`${he}-pure`]:{position:"relative",maxWidth:"none",margin:Me.sizePopupArrow}}]};var de=(Me,he)=>(0,st.Z)("Tooltip",me=>{if(he===!1)return[];const{borderRadius:T,colorTextLightSolid:ve,colorBgDefault:Ee,borderRadiusOuter:ne}=me,Oe=(0,Ce.TS)(me,{tooltipMaxWidth:250,tooltipColor:ve,tooltipBorderRadius:T,tooltipBg:Ee,tooltipRadiusOuter:ne>4?4:ne});return[Re(Oe),(0,g._y)(me,"zoom-big-fast")]},me=>{let{zIndexPopupBase:T,colorBgSpotlight:ve}=me;return{zIndexPopup:T+70,colorBgDefault:ve}},{resetStyle:!1})(Me),ae=u(36785);function ue(Me,he){const _=(0,ae.o2)(he),me=H()({[`${Me}-${he}`]:he&&_}),T={},ve={};return he&&!_&&(T.background=he,ve["--antd-arrow-background-color"]=he),{className:me,overlayStyle:T,arrowStyle:ve}}var w=Me=>{const{prefixCls:he,className:_,placement:me="top",title:T,color:ve,overlayInnerStyle:Ee}=Me,{getPrefixCls:ne}=v.useContext(fe.E_),Oe=ne("tooltip",he),[xe,te]=de(Oe,!0),Fe=ue(Oe,ve),Ae=Fe.arrowStyle,le=Object.assign(Object.assign({},Ee),Fe.overlayStyle),$e=H()(te,Oe,`${Oe}-pure`,`${Oe}-placement-${me}`,_,Fe.className);return xe(v.createElement("div",{className:$e,style:Ae},v.createElement("div",{className:`${Oe}-arrow`}),v.createElement(se.G,Object.assign({},Me,{className:te,prefixCls:Oe,overlayInnerStyle:le}),T)))},j=function(Me,he){var _={};for(var me in Me)Object.prototype.hasOwnProperty.call(Me,me)&&he.indexOf(me)<0&&(_[me]=Me[me]);if(Me!=null&&typeof Object.getOwnPropertySymbols=="function")for(var T=0,me=Object.getOwnPropertySymbols(Me);T{const _={},me=Object.assign({},Me);return he.forEach(T=>{Me&&T in Me&&(_[T]=Me[T],delete me[T])}),{picked:_,omitted:me}};function De(Me,he){const _=Me.type;if((_.__ANT_BUTTON===!0||Me.type==="button")&&Me.props.disabled||_.__ANT_SWITCH===!0&&(Me.props.disabled||Me.props.loading)||_.__ANT_RADIO===!0&&Me.props.disabled){const{picked:me,omitted:T}=N(Me.props.style,["position","left","right","top","bottom","float","display","zIndex"]),ve=Object.assign(Object.assign({display:"inline-block"},me),{cursor:"not-allowed",width:Me.props.block?"100%":void 0}),Ee=Object.assign(Object.assign({},T),{pointerEvents:"none"}),ne=(0,ce.Tm)(Me,{style:Ee,className:null});return v.createElement("span",{style:ve,className:H()(Me.props.className,`${he}-disabled-compatible-wrapper`)},ne)}return Me}const Te=v.forwardRef((Me,he)=>{var _,me;const{prefixCls:T,openClassName:ve,getTooltipContainer:Ee,overlayClassName:ne,color:Oe,overlayInnerStyle:xe,children:te,afterOpenChange:Fe,afterVisibleChange:Ae,destroyTooltipOnHide:le,arrow:$e=!0,title:nt,overlay:St,builtinPlacements:Rt,arrowPointAtCenter:Et=!1,autoAdjustOverflow:vt=!0}=Me,It=!!$e,[,gt]=(0,Ze.Z)(),{getPopupContainer:qe,getPrefixCls:yt,direction:V}=v.useContext(fe.E_),Z=v.useRef(null),L=()=>{var $t;($t=Z.current)===null||$t===void 0||$t.forceAlign()};v.useImperativeHandle(he,()=>({forceAlign:L,forcePopupAlign:()=>{L()}}));const[U,J]=(0,R.Z)(!1,{value:(_=Me.open)!==null&&_!==void 0?_:Me.visible,defaultValue:(me=Me.defaultOpen)!==null&&me!==void 0?me:Me.defaultVisible}),Se=!nt&&!St&&nt!==0,x=$t=>{var xt,Ft;J(Se?!1:$t),Se||((xt=Me.onOpenChange)===null||xt===void 0||xt.call(Me,$t),(Ft=Me.onVisibleChange)===null||Ft===void 0||Ft.call(Me,$t))},C=v.useMemo(()=>{var $t,xt;let Ft=Et;return typeof $e=="object"&&(Ft=(xt=($t=$e.pointAtCenter)!==null&&$t!==void 0?$t:$e.arrowPointAtCenter)!==null&&xt!==void 0?xt:Et),Rt||(0,ee.Z)({arrowPointAtCenter:Ft,autoAdjustOverflow:vt,arrowWidth:It?gt.sizePopupArrow:0,borderRadius:gt.borderRadius,offset:gt.marginXXS,visibleFirst:!0})},[Et,$e,Rt,gt]),Q=v.useMemo(()=>nt===0?nt:St||nt||"",[St,nt]),I=v.createElement(M.BR,null,typeof Q=="function"?Q():Q),{getPopupContainer:F,placement:pe="top",mouseEnterDelay:je=.1,mouseLeaveDelay:Be=.1,overlayStyle:it,rootClassName:_e}=Me,Ye=j(Me,["getPopupContainer","placement","mouseEnterDelay","mouseLeaveDelay","overlayStyle","rootClassName"]),re=yt("tooltip",T),Pe=yt(),et=Me["data-popover-inject"];let oe=U;!("open"in Me)&&!("visible"in Me)&&Se&&(oe=!1);const dt=De((0,ce.l$)(te)&&!(0,ce.M2)(te)?te:v.createElement("span",null,te),re),pt=dt.props,ft=!pt.className||typeof pt.className=="string"?H()(pt.className,ve||`${re}-open`):pt.className,[ot,_t]=de(re,!et),jt=ue(re,Oe),Zt=jt.arrowStyle,Yt=Object.assign(Object.assign({},xe),jt.overlayStyle),Mt=H()(ne,{[`${re}-rtl`]:V==="rtl"},jt.className,_e,_t);return ot(v.createElement(se.Z,Object.assign({},Ye,{showArrow:It,placement:pe,mouseEnterDelay:je,mouseLeaveDelay:Be,prefixCls:re,overlayClassName:Mt,overlayStyle:Object.assign(Object.assign({},Zt),it),getTooltipContainer:F||Ee||qe,ref:Z,builtinPlacements:C,overlay:I,visible:oe,onVisibleChange:x,afterVisibleChange:Fe!=null?Fe:Ae,overlayInnerStyle:Yt,arrowContent:v.createElement("span",{className:`${re}-arrow-content`}),motion:{motionName:(0,B.m)(Pe,"zoom-big-fast",Me.transitionName),motionDeadline:1e3},destroyTooltipOnHide:!!le}),oe?(0,ce.Tm)(dt,{className:ft}):dt))});Te._InternalPanelDoNotUseOrYouWillBeFired=w;var ze=Te},54580:function(Ht,lt,u){"use strict";u.d(lt,{default:function(){return Je}});var v=u(59301),O=u(19127),H=u(92310),se=u.n(H),R=u(96663),B=u(52884),ee=u(95727),ce=u(65711),fe=u(85745),M=u(90493),Ze=u(6620),P=u(49581),g=u(20135),X=u(73324),z=u(26112);function Ce($,ge){var we="cannot ".concat($.method," ").concat($.action," ").concat(ge.status,"'"),He=new Error(we);return He.status=ge.status,He.method=$.method,He.url=$.action,He}function st($){var ge=$.responseText||$.response;if(!ge)return ge;try{return JSON.parse(ge)}catch(we){return ge}}function Re($){var ge=new XMLHttpRequest;$.onProgress&&ge.upload&&(ge.upload.onprogress=function(Ne){Ne.total>0&&(Ne.percent=Ne.loaded/Ne.total*100),$.onProgress(Ne)});var we=new FormData;$.data&&Object.keys($.data).forEach(function(at){var Ne=$.data[at];if(Array.isArray(Ne)){Ne.forEach(function(ke){we.append("".concat(at,"[]"),ke)});return}we.append(at,Ne)}),$.file instanceof Blob?we.append($.filename,$.file,$.file.name):we.append($.filename,$.file),ge.onerror=function(Ne){$.onError(Ne)},ge.onload=function(){return ge.status<200||ge.status>=300?$.onError(Ce($,ge),st(ge)):$.onSuccess(st(ge),ge)},ge.open($.method,$.action,!0),$.withCredentials&&"withCredentials"in ge&&(ge.withCredentials=!0);var He=$.headers||{};return He["X-Requested-With"]!==null&&ge.setRequestHeader("X-Requested-With","XMLHttpRequest"),Object.keys(He).forEach(function(at){He[at]!==null&&ge.setRequestHeader(at,He[at])}),ge.send(we),{abort:function(){ge.abort()}}}var de=+new Date,ae=0;function ue(){return"rc-upload-".concat(de,"-").concat(++ae)}var A=u(48736),w=function($,ge){if($&&ge){var we=Array.isArray(ge)?ge:ge.split(","),He=$.name||"",at=$.type||"",Ne=at.replace(/\/.*$/,"");return we.some(function(ke){var Y=ke.trim();if(/^\*(\/\*)?$/.test(ke))return!0;if(Y.charAt(0)==="."){var be=He.toLowerCase(),Ie=Y.toLowerCase(),Ke=[Ie];return(Ie===".jpg"||Ie===".jpeg")&&(Ke=[".jpg",".jpeg"]),Ke.some(function(Ve){return be.endsWith(Ve)})}return/\/\*$/.test(Y)?Ne===Y.replace(/\/.*$/,""):at===Y?!0:/^\w+$/.test(Y)?((0,A.ZP)(!1,"Upload takes an invalidate 'accept' type '".concat(Y,"'.Skip for check.")),!0):!1})}return!0};function j($,ge){var we=$.createReader(),He=[];function at(){we.readEntries(function(Ne){var ke=Array.prototype.slice.apply(Ne);He=He.concat(ke);var Y=!ke.length;Y?ge(He):at()})}at()}var N=function(ge,we,He){var at=function Ne(ke,Y){ke&&(ke.path=Y||"",ke.isFile?ke.file(function(be){He(be)&&(ke.fullPath&&!be.webkitRelativePath&&(Object.defineProperties(be,{webkitRelativePath:{writable:!0}}),be.webkitRelativePath=ke.fullPath.replace(/^\//,""),Object.defineProperties(be,{webkitRelativePath:{writable:!1}})),we([be]))}):ke.isDirectory&&j(ke,function(be){be.forEach(function(Ie){Ne(Ie,"".concat(Y).concat(ke.name,"/"))})}))};ge.forEach(function(Ne){at(Ne.webkitGetAsEntry())})},De=N,Te=["component","prefixCls","className","disabled","id","style","multiple","accept","capture","children","directory","openFileDialogOnClick","onMouseEnter","onMouseLeave"],ze=function($){(0,ce.Z)(we,$);var ge=(0,fe.Z)(we);function we(){var He;(0,B.Z)(this,we);for(var at=arguments.length,Ne=new Array(at),ke=0;ke{let{uid:Ne}=at;return Ne===$.uid});return He===-1?we.push($):we[He]=$,we}function pe($,ge){const we=$.uid!==void 0?"uid":"name";return ge.filter(He=>He[we]===$[we])[0]}function je($,ge){const we=$.uid!==void 0?"uid":"name",He=ge.filter(at=>at[we]!==$[we]);return He.length===ge.length?null:He}const Be=function(){const ge=(arguments.length>0&&arguments[0]!==void 0?arguments[0]:"").split("/"),He=ge[ge.length-1].split(/#|\?/)[0];return(/\.[^./\\]*$/.exec(He)||[""])[0]},it=$=>$.indexOf("image/")===0,_e=$=>{if($.type&&!$.thumbUrl)return it($.type);const ge=$.thumbUrl||$.url||"",we=Be(ge);return/^data:image\//.test(ge)||/(webp|svg|png|gif|jpg|jpeg|jfif|bmp|dpg|ico|heic|heif)$/i.test(we)?!0:!(/^data:/.test(ge)||we)},Ye=200;function re($){return new Promise(ge=>{if(!$.type||!it($.type)){ge("");return}const we=document.createElement("canvas");we.width=Ye,we.height=Ye,we.style.cssText=`position: fixed; left: 0; top: 0; width: ${Ye}px; height: ${Ye}px; z-index: 9999; display: none;`,document.body.appendChild(we);const He=we.getContext("2d"),at=new Image;if(at.onload=()=>{const{width:Ne,height:ke}=at;let Y=Ye,be=Ye,Ie=0,Ke=0;Ne>ke?(be=ke*(Ye/Ne),Ke=-(be-Y)/2):(Y=Ne*(Ye/ke),Ie=-(Y-be)/2),He.drawImage(at,Ie,Ke,Y,be);const Ve=we.toDataURL();document.body.removeChild(we),window.URL.revokeObjectURL(at.src),ge(Ve)},at.crossOrigin="anonymous",$.type.startsWith("image/svg+xml")){const Ne=new FileReader;Ne.onload=()=>{Ne.result&&(at.src=Ne.result)},Ne.readAsDataURL($)}else if($.type.startsWith("image/gif")){const Ne=new FileReader;Ne.onload=()=>{Ne.result&&ge(Ne.result)},Ne.readAsDataURL($)}else at.src=window.URL.createObjectURL($)})}var Pe=u(26227),et=u(41464),oe=u(15277),dt=u(93948),pt=u(6848),ot=v.forwardRef(($,ge)=>{let{prefixCls:we,className:He,style:at,locale:Ne,listType:ke,file:Y,items:be,progress:Ie,iconRender:Ke,actionIconRender:Ve,itemRender:ct,isImgUrl:ut,showPreviewIcon:Ct,showRemoveIcon:Lt,showDownloadIcon:Dt,previewIcon:Nt,removeIcon:Vt,downloadIcon:tn,onPreview:Ut,onDownload:bt,onClose:ln}=$;var Qt,cn;const{status:Gt}=Y,[rn,pn]=v.useState(Gt);v.useEffect(()=>{Gt!=="removed"&&pn(Gt)},[Gt]);const[un,wn]=v.useState(!1);v.useEffect(()=>{const Kn=setTimeout(()=>{wn(!0)},300);return()=>{clearTimeout(Kn)}},[]);const kn=Ke(Y);let on=v.createElement("div",{className:`${we}-icon`},kn);if(ke==="picture"||ke==="picture-card"||ke==="picture-circle")if(rn==="uploading"||!Y.thumbUrl&&!Y.url){const Kn=se()(`${we}-list-item-thumbnail`,{[`${we}-list-item-file`]:rn!=="uploading"});on=v.createElement("div",{className:Kn},kn)}else{const Kn=ut!=null&&ut(Y)?v.createElement("img",{src:Y.thumbUrl||Y.url,alt:Y.name,className:`${we}-list-item-image`,crossOrigin:Y.crossOrigin}):kn,Nn=se()(`${we}-list-item-thumbnail`,{[`${we}-list-item-file`]:ut&&!ut(Y)});on=v.createElement("a",{className:Nn,onClick:zn=>Ut(Y,zn),href:Y.url||Y.thumbUrl,target:"_blank",rel:"noopener noreferrer"},Kn)}const Pt=se()(`${we}-list-item`,`${we}-list-item-${rn}`),Tt=typeof Y.linkProps=="string"?JSON.parse(Y.linkProps):Y.linkProps,Rn=Lt?Ve((typeof Vt=="function"?Vt(Y):Vt)||v.createElement(Pe.Z,null),()=>ln(Y),we,Ne.removeFile):null,Ln=Dt&&rn==="done"?Ve((typeof tn=="function"?tn(Y):tn)||v.createElement(et.Z,null),()=>bt(Y),we,Ne.downloadFile):null,Cn=ke!=="picture-card"&&ke!=="picture-circle"&&v.createElement("span",{key:"download-delete",className:se()(`${we}-list-item-actions`,{picture:ke==="picture"})},Ln,Rn),Sn=se()(`${we}-list-item-name`),En=Y.url?[v.createElement("a",Object.assign({key:"view",target:"_blank",rel:"noopener noreferrer",className:Sn,title:Y.name},Tt,{href:Y.url,onClick:Kn=>Ut(Y,Kn)}),Y.name),Cn]:[v.createElement("span",{key:"view",className:Sn,onClick:Kn=>Ut(Y,Kn),title:Y.name},Y.name),Cn],dn={pointerEvents:"none",opacity:.5},An=Ct?v.createElement("a",{href:Y.url||Y.thumbUrl,target:"_blank",rel:"noopener noreferrer",style:Y.url||Y.thumbUrl?void 0:dn,onClick:Kn=>Ut(Y,Kn),title:Ne.previewFile},typeof Nt=="function"?Nt(Y):Nt||v.createElement(oe.Z,null)):null,Wn=(ke==="picture-card"||ke==="picture-circle")&&rn!=="uploading"&&v.createElement("span",{className:`${we}-list-item-actions`},An,rn==="done"&&Ln,Rn),{getPrefixCls:sn}=v.useContext(ne.E_),Wt=sn(),fn=v.createElement("div",{className:Pt},on,En,Wn,un&&v.createElement(J.default,{motionName:`${Wt}-fade`,visible:rn==="uploading",motionDeadline:2e3},Kn=>{let{className:Nn}=Kn;const zn="percent"in Y?v.createElement(dt.Z,Object.assign({},Ie,{type:"line",percent:Y.percent,"aria-label":Y["aria-label"],"aria-labelledby":Y["aria-labelledby"]})):null;return v.createElement("div",{className:se()(`${we}-list-item-progress`,Nn)},zn)})),On=Y.response&&typeof Y.response=="string"?Y.response:((Qt=Y.error)===null||Qt===void 0?void 0:Qt.statusText)||((cn=Y.error)===null||cn===void 0?void 0:cn.message)||Ne.uploadError,Vn=rn==="error"?v.createElement(pt.Z,{title:On,getPopupContainer:Kn=>Kn.parentNode},fn):fn;return v.createElement("div",{className:se()(`${we}-list-item-container`,He),style:at,ref:ge},ct?ct(Vn,Y,be,{download:bt.bind(null,Y),preview:Ut.bind(null,Y),remove:ln.bind(null,Y)}):Vn)});const _t=($,ge)=>{const{listType:we="text",previewFile:He=re,onPreview:at,onDownload:Ne,onRemove:ke,locale:Y,iconRender:be,isImageUrl:Ie=_e,prefixCls:Ke,items:Ve=[],showPreviewIcon:ct=!0,showRemoveIcon:ut=!0,showDownloadIcon:Ct=!1,removeIcon:Lt,previewIcon:Dt,downloadIcon:Nt,progress:Vt={size:[-1,2],showInfo:!1},appendAction:tn,appendActionVisible:Ut=!0,itemRender:bt,disabled:ln}=$,Qt=(0,Se.Z)(),[cn,Gt]=v.useState(!1);v.useEffect(()=>{we!=="picture"&&we!=="picture-card"&&we!=="picture-circle"||(Ve||[]).forEach(dn=>{typeof document=="undefined"||typeof window=="undefined"||!window.FileReader||!window.File||!(dn.originFileObj instanceof File||dn.originFileObj instanceof Blob)||dn.thumbUrl!==void 0||(dn.thumbUrl="",He&&He(dn.originFileObj).then(An=>{dn.thumbUrl=An||"",Qt()}))})},[we,Ve,He]),v.useEffect(()=>{Gt(!0)},[]);const rn=(dn,An)=>{if(at)return An==null||An.preventDefault(),at(dn)},pn=dn=>{typeof Ne=="function"?Ne(dn):dn.url&&window.open(dn.url)},un=dn=>{ke==null||ke(dn)},wn=dn=>{if(be)return be(dn,we);const An=dn.status==="uploading",Wn=Ie&&Ie(dn)?v.createElement(U,null):v.createElement(St,null);let sn=An?v.createElement(Rt.Z,null):v.createElement(qe,null);return we==="picture"?sn=An?v.createElement(Rt.Z,null):Wn:(we==="picture-card"||we==="picture-circle")&&(sn=An?Y.uploading:Wn),sn},kn=(dn,An,Wn,sn)=>{const Wt={type:"text",size:"small",title:sn,onClick:fn=>{An(),(0,C.l$)(dn)&&dn.props.onClick&&dn.props.onClick(fn)},className:`${Wn}-list-item-action`,disabled:ln};if((0,C.l$)(dn)){const fn=(0,C.Tm)(dn,Object.assign(Object.assign({},dn.props),{onClick:()=>{}}));return v.createElement(Q.ZP,Object.assign({},Wt,{icon:fn}))}return v.createElement(Q.ZP,Object.assign({},Wt),v.createElement("span",null,dn))};v.useImperativeHandle(ge,()=>({handlePreview:rn,handleDownload:pn}));const{getPrefixCls:on}=v.useContext(ne.E_),Pt=on("upload",Ke),Tt=on(),Rn=se()(`${Pt}-list`,`${Pt}-list-${we}`),Ln=(0,O.Z)(Ve.map(dn=>({key:dn.uid,file:dn})));let Sn={motionDeadline:2e3,motionName:`${Pt}-${we==="picture-card"||we==="picture-circle"?"animate-inline":"animate"}`,keys:Ln,motionAppear:cn};const En=v.useMemo(()=>{const dn=Object.assign({},(0,x.Z)(Tt));return delete dn.onAppearEnd,delete dn.onEnterEnd,delete dn.onLeaveEnd,dn},[Tt]);return we!=="picture-card"&&we!=="picture-circle"&&(Sn=Object.assign(Object.assign({},En),Sn)),v.createElement("div",{className:Rn},v.createElement(J.CSSMotionList,Object.assign({},Sn,{component:!1}),dn=>{let{key:An,file:Wn,className:sn,style:Wt}=dn;return v.createElement(ot,{key:An,locale:Y,prefixCls:Pt,className:sn,style:Wt,file:Wn,items:Ve,progress:Vt,listType:we,isImgUrl:Ie,showPreviewIcon:ct,showRemoveIcon:ut,showDownloadIcon:Ct,removeIcon:Lt,previewIcon:Dt,downloadIcon:Nt,iconRender:wn,actionIconRender:kn,itemRender:bt,onPreview:rn,onDownload:pn,onClose:un})}),tn&&v.createElement(J.default,Object.assign({},Sn,{visible:Ut,forceRender:!0}),dn=>{let{className:An,style:Wn}=dn;return(0,C.Tm)(tn,sn=>({className:se()(sn.className,An),style:Object.assign(Object.assign(Object.assign({},Wn),{pointerEvents:An?"none":void 0}),sn.style)}))}))};var Zt=v.forwardRef(_t),Yt=u(17313),Mt=u(8378),$t=u(83116),xt=u(37613),qt=$=>{const{componentCls:ge,iconCls:we}=$;return{[`${ge}-wrapper`]:{[`${ge}-drag`]:{position:"relative",width:"100%",height:"100%",textAlign:"center",background:$.colorFillAlter,border:`${$.lineWidth}px dashed ${$.colorBorder}`,borderRadius:$.borderRadiusLG,cursor:"pointer",transition:`border-color ${$.motionDurationSlow}`,[ge]:{padding:`${$.padding}px 0`},[`${ge}-btn`]:{display:"table",width:"100%",height:"100%",outline:"none"},[`${ge}-drag-container`]:{display:"table-cell",verticalAlign:"middle"},[`&:not(${ge}-disabled):hover`]:{borderColor:$.colorPrimaryHover},[`p${ge}-drag-icon`]:{marginBottom:$.margin,[we]:{color:$.colorPrimary,fontSize:$.uploadThumbnailSize}},[`p${ge}-text`]:{margin:`0 0 ${$.marginXXS}px`,color:$.colorTextHeading,fontSize:$.fontSizeLG},[`p${ge}-hint`]:{color:$.colorTextDescription,fontSize:$.fontSize},[`&${ge}-disabled`]:{cursor:"not-allowed",[`p${ge}-drag-icon ${we}, p${ge}-text, p${ge}-hint `]:{color:$.colorTextDisabled}}}}}},Kt=$=>{const{componentCls:ge,antCls:we,iconCls:He,fontSize:at,lineHeight:Ne}=$,ke=`${ge}-list-item`,Y=`${ke}-actions`,be=`${ke}-action`,Ie=Math.round(at*Ne);return{[`${ge}-wrapper`]:{[`${ge}-list`]:Object.assign(Object.assign({},(0,Yt.dF)()),{lineHeight:$.lineHeight,[ke]:{position:"relative",height:$.lineHeight*at,marginTop:$.marginXS,fontSize:at,display:"flex",alignItems:"center",transition:`background-color ${$.motionDurationSlow}`,"&:hover":{backgroundColor:$.controlItemBgHover},[`${ke}-name`]:Object.assign(Object.assign({},Yt.vS),{padding:`0 ${$.paddingXS}px`,lineHeight:Ne,flex:"auto",transition:`all ${$.motionDurationSlow}`}),[Y]:{[be]:{opacity:0},[`${be}${we}-btn-sm`]:{height:Ie,border:0,lineHeight:1,"> span":{transform:"scale(1)"}},[` ${be}:focus-visible, &.picture ${be} `]:{opacity:1},[He]:{color:$.actionsColor,transition:`all ${$.motionDurationSlow}`},[`&:hover ${He}`]:{color:$.colorText}},[`${ge}-icon ${He}`]:{color:$.colorTextDescription,fontSize:at},[`${ke}-progress`]:{position:"absolute",bottom:-$.uploadProgressOffset,width:"100%",paddingInlineStart:at+$.paddingXS,fontSize:at,lineHeight:0,pointerEvents:"none","> div":{margin:0}}},[`${ke}:hover ${be}`]:{opacity:1,color:$.colorText},[`${ke}-error`]:{color:$.colorError,[`${ke}-name, ${ge}-icon ${He}`]:{color:$.colorError},[Y]:{[`${He}, ${He}:hover`]:{color:$.colorError},[be]:{opacity:1}}},[`${ge}-list-item-container`]:{transition:`opacity ${$.motionDurationSlow}, height ${$.motionDurationSlow}`,"&::before":{display:"table",width:0,height:0,content:'""'}}})}}},hn=u(93083),en=u(1950);const xn=new hn.Keyframes("uploadAnimateInlineIn",{from:{width:0,height:0,margin:0,padding:0,opacity:0}}),an=new hn.Keyframes("uploadAnimateInlineOut",{to:{width:0,height:0,margin:0,padding:0,opacity:0}});var Ot=$=>{const{componentCls:ge}=$,we=`${ge}-animate-inline`;return[{[`${ge}-wrapper`]:{[`${we}-appear, ${we}-enter, ${we}-leave`]:{animationDuration:$.motionDurationSlow,animationTimingFunction:$.motionEaseInOutCirc,animationFillMode:"forwards"},[`${we}-appear, ${we}-enter`]:{animationName:xn},[`${we}-leave`]:{animationName:an}}},{[`${ge}-wrapper`]:(0,en.J$)($)},xn,an]},Xe=u(93398),l=u(64993);const h=$=>{const{componentCls:ge,iconCls:we,uploadThumbnailSize:He,uploadProgressOffset:at}=$,Ne=`${ge}-list`,ke=`${Ne}-item`;return{[`${ge}-wrapper`]:{[` ${Ne}${Ne}-picture, ${Ne}${Ne}-picture-card, ${Ne}${Ne}-picture-circle `]:{[ke]:{position:"relative",height:He+$.lineWidth*2+$.paddingXS*2,padding:$.paddingXS,border:`${$.lineWidth}px ${$.lineType} ${$.colorBorder}`,borderRadius:$.borderRadiusLG,"&:hover":{background:"transparent"},[`${ke}-thumbnail`]:Object.assign(Object.assign({},Yt.vS),{width:He,height:He,lineHeight:`${He+$.paddingSM}px`,textAlign:"center",flex:"none",[we]:{fontSize:$.fontSizeHeading2,color:$.colorPrimary},img:{display:"block",width:"100%",height:"100%",overflow:"hidden"}}),[`${ke}-progress`]:{bottom:at,width:`calc(100% - ${$.paddingSM*2}px)`,marginTop:0,paddingInlineStart:He+$.paddingXS}},[`${ke}-error`]:{borderColor:$.colorError,[`${ke}-thumbnail ${we}`]:{[`svg path[fill='${Xe.blue[0]}']`]:{fill:$.colorErrorBg},[`svg path[fill='${Xe.blue.primary}']`]:{fill:$.colorError}}},[`${ke}-uploading`]:{borderStyle:"dashed",[`${ke}-name`]:{marginBottom:at}}},[`${Ne}${Ne}-picture-circle ${ke}`]:{[`&, &::before, ${ke}-thumbnail`]:{borderRadius:"50%"}}}}},f=$=>{const{componentCls:ge,iconCls:we,fontSizeLG:He,colorTextLightSolid:at}=$,Ne=`${ge}-list`,ke=`${Ne}-item`,Y=$.uploadPicCardSize;return{[` ${ge}-wrapper${ge}-picture-card-wrapper, ${ge}-wrapper${ge}-picture-circle-wrapper `]:Object.assign(Object.assign({},(0,Yt.dF)()),{display:"inline-block",width:"100%",[`${ge}${ge}-select`]:{width:Y,height:Y,marginInlineEnd:$.marginXS,marginBottom:$.marginXS,textAlign:"center",verticalAlign:"top",backgroundColor:$.colorFillAlter,border:`${$.lineWidth}px dashed ${$.colorBorder}`,borderRadius:$.borderRadiusLG,cursor:"pointer",transition:`border-color ${$.motionDurationSlow}`,[`> ${ge}`]:{display:"flex",alignItems:"center",justifyContent:"center",height:"100%",textAlign:"center"},[`&:not(${ge}-disabled):hover`]:{borderColor:$.colorPrimary}},[`${Ne}${Ne}-picture-card, ${Ne}${Ne}-picture-circle`]:{[`${Ne}-item-container`]:{display:"inline-block",width:Y,height:Y,marginBlock:`0 ${$.marginXS}px`,marginInline:`0 ${$.marginXS}px`,verticalAlign:"top"},"&::after":{display:"none"},[ke]:{height:"100%",margin:0,"&::before":{position:"absolute",zIndex:1,width:`calc(100% - ${$.paddingXS*2}px)`,height:`calc(100% - ${$.paddingXS*2}px)`,backgroundColor:$.colorBgMask,opacity:0,transition:`all ${$.motionDurationSlow}`,content:'" "'}},[`${ke}:hover`]:{[`&::before, ${ke}-actions`]:{opacity:1}},[`${ke}-actions`]:{position:"absolute",insetInlineStart:0,zIndex:10,width:"100%",whiteSpace:"nowrap",textAlign:"center",opacity:0,transition:`all ${$.motionDurationSlow}`,[`${we}-eye, ${we}-download, ${we}-delete`]:{zIndex:10,width:He,margin:`0 ${$.marginXXS}px`,fontSize:He,cursor:"pointer",transition:`all ${$.motionDurationSlow}`,svg:{verticalAlign:"baseline"}}},[`${ke}-actions, ${ke}-actions:hover`]:{[`${we}-eye, ${we}-download, ${we}-delete`]:{color:new l.C(at).setAlpha(.65).toRgbString(),"&:hover":{color:at}}},[`${ke}-thumbnail, ${ke}-thumbnail img`]:{position:"static",display:"block",width:"100%",height:"100%",objectFit:"contain"},[`${ke}-name`]:{display:"none",textAlign:"center"},[`${ke}-file + ${ke}-name`]:{position:"absolute",bottom:$.margin,display:"block",width:`calc(100% - ${$.paddingXS*2}px)`},[`${ke}-uploading`]:{[`&${ke}`]:{backgroundColor:$.colorFillAlter},[`&::before, ${we}-eye, ${we}-download, ${we}-delete`]:{display:"none"}},[`${ke}-progress`]:{bottom:$.marginXL,width:`calc(100% - ${$.paddingXS*2}px)`,paddingInlineStart:0}}}),[`${ge}-wrapper${ge}-picture-circle-wrapper`]:{[`${ge}${ge}-select`]:{borderRadius:"50%"}}}};var p=$=>{const{componentCls:ge}=$;return{[`${ge}-rtl`]:{direction:"rtl"}}};const b=$=>{const{componentCls:ge,colorTextDisabled:we}=$;return{[`${ge}-wrapper`]:Object.assign(Object.assign({},(0,Yt.Wf)($)),{[ge]:{outline:0,"input[type='file']":{cursor:"pointer"}},[`${ge}-select`]:{display:"inline-block"},[`${ge}-disabled`]:{color:we,cursor:"not-allowed"}})}};var E=(0,$t.Z)("Upload",$=>{const{fontSizeHeading3:ge,fontSize:we,lineHeight:He,lineWidth:at,controlHeightLG:Ne}=$,ke=Math.round(we*He),Y=(0,xt.TS)($,{uploadThumbnailSize:ge*2,uploadProgressOffset:ke/2+at,uploadPicCardSize:Ne*2.55});return[b(Y),qt(Y),h(Y),f(Y),Kt(Y),Ot(Y),p(Y),(0,Mt.Z)(Y)]},$=>({actionsColor:$.colorTextDescription})),q=function($,ge,we,He){function at(Ne){return Ne instanceof we?Ne:new we(function(ke){ke(Ne)})}return new(we||(we=Promise))(function(Ne,ke){function Y(Ke){try{Ie(He.next(Ke))}catch(Ve){ke(Ve)}}function be(Ke){try{Ie(He.throw(Ke))}catch(Ve){ke(Ve)}}function Ie(Ke){Ke.done?Ne(Ke.value):at(Ke.value).then(Y,be)}Ie((He=He.apply($,ge||[])).next())})};const K=`__LIST_IGNORE_${Date.now()}__`,ye=($,ge)=>{const{fileList:we,defaultFileList:He,onRemove:at,showUploadList:Ne=!0,listType:ke="text",onPreview:Y,onDownload:be,onChange:Ie,onDrop:Ke,previewFile:Ve,disabled:ct,locale:ut,iconRender:Ct,isImageUrl:Lt,progress:Dt,prefixCls:Nt,className:Vt,type:tn="select",children:Ut,style:bt,itemRender:ln,maxCount:Qt,data:cn={},multiple:Gt=!1,action:rn="",accept:pn="",supportServerRender:un=!0,rootClassName:wn}=$,kn=v.useContext(Oe.Z),on=ct!=null?ct:kn,[Pt,Tt]=(0,ve.Z)(He||[],{value:we,postState:_n=>_n!=null?_n:[]}),[Rn,Ln]=v.useState("drop"),Cn=v.useRef(null);v.useMemo(()=>{const _n=Date.now();(we||[]).forEach((Hn,sr)=>{!Hn.uid&&!Object.isFrozen(Hn)&&(Hn.uid=`__AUTO__${_n}_${sr}__`)})},[we]);const Sn=(_n,Hn,sr)=>{let Zn=(0,O.Z)(Hn),Jn=!1;Qt===1?Zn=Zn.slice(-1):Qt&&(Jn=Zn.length>Qt,Zn=Zn.slice(0,Qt)),(0,Ee.flushSync)(()=>{Tt(Zn)});const pr={file:_n,fileList:Zn};sr&&(pr.event=sr),(!Jn||Zn.some(Pr=>Pr.uid===_n.uid))&&(0,Ee.flushSync)(()=>{Ie==null||Ie(pr)})},En=(_n,Hn)=>q(void 0,void 0,void 0,function*(){const{beforeUpload:sr,transformFile:Zn}=$;let Jn=_n;if(sr){const pr=yield sr(_n,Hn);if(pr===!1)return!1;if(delete _n[K],pr===K)return Object.defineProperty(_n,K,{value:!0,configurable:!0}),!1;typeof pr=="object"&&pr&&(Jn=pr)}return Zn&&(Jn=yield Zn(Jn)),Jn}),dn=_n=>{const Hn=_n.filter(Jn=>!Jn.file[K]);if(!Hn.length)return;const sr=Hn.map(Jn=>I(Jn.file));let Zn=(0,O.Z)(Pt);sr.forEach(Jn=>{Zn=F(Jn,Zn)}),sr.forEach((Jn,pr)=>{let Pr=Jn;if(Hn[pr].parsedFile)Jn.status="uploading";else{const{originFileObj:bn}=Jn;let Pn;try{Pn=new File([bn],bn.name,{type:bn.type})}catch(Tn){Pn=new Blob([bn],{type:bn.type}),Pn.name=bn.name,Pn.lastModifiedDate=new Date,Pn.lastModified=new Date().getTime()}Pn.uid=Jn.uid,Pr=Pn}Sn(Pr,Zn)})},An=(_n,Hn,sr)=>{try{typeof _n=="string"&&(_n=JSON.parse(_n))}catch(pr){}if(!pe(Hn,Pt))return;const Zn=I(Hn);Zn.status="done",Zn.percent=100,Zn.response=_n,Zn.xhr=sr;const Jn=F(Zn,Pt);Sn(Zn,Jn)},Wn=(_n,Hn)=>{if(!pe(Hn,Pt))return;const sr=I(Hn);sr.status="uploading",sr.percent=_n.percent;const Zn=F(sr,Pt);Sn(sr,Zn,_n)},sn=(_n,Hn,sr)=>{if(!pe(sr,Pt))return;const Zn=I(sr);Zn.error=_n,Zn.response=Hn,Zn.status="error";const Jn=F(Zn,Pt);Sn(Zn,Jn)},Wt=_n=>{let Hn;Promise.resolve(typeof at=="function"?at(_n):at).then(sr=>{var Zn;if(sr===!1)return;const Jn=je(_n,Pt);Jn&&(Hn=Object.assign(Object.assign({},_n),{status:"removed"}),Pt==null||Pt.forEach(pr=>{const Pr=Hn.uid!==void 0?"uid":"name";pr[Pr]===Hn[Pr]&&!Object.isFrozen(pr)&&(pr.status="removed")}),(Zn=Cn.current)===null||Zn===void 0||Zn.abort(Hn),Sn(Hn,Jn))})},fn=_n=>{Ln(_n.type),_n.type==="drop"&&(Ke==null||Ke(_n))};v.useImperativeHandle(ge,()=>({onBatchStart:dn,onSuccess:An,onProgress:Wn,onError:sn,fileList:Pt,upload:Cn.current}));const{getPrefixCls:On,direction:Vn,upload:Kn}=v.useContext(ne.E_),Nn=On("upload",Nt),zn=Object.assign(Object.assign({onBatchStart:dn,onError:sn,onProgress:Wn,onSuccess:An},$),{data:cn,multiple:Gt,action:rn,accept:pn,supportServerRender:un,prefixCls:Nn,disabled:on,beforeUpload:En,onChange:void 0});delete zn.className,delete zn.style,(!Ut||on)&&delete zn.id;const[lr,er]=E(Nn),[ir]=(0,xe.Z)("Upload",te.Z.Upload),{showRemoveIcon:mr,showPreviewIcon:$n,showDownloadIcon:cr,removeIcon:Cr,previewIcon:wr,downloadIcon:Tr}=typeof Ne=="boolean"?{}:Ne,Lr=(_n,Hn)=>Ne?v.createElement(Zt,{prefixCls:Nn,listType:ke,items:Pt,previewFile:Ve,onPreview:Y,onDownload:be,onRemove:Wt,showRemoveIcon:!on&&mr,showPreviewIcon:$n,showDownloadIcon:cr,removeIcon:Cr,previewIcon:wr,downloadIcon:Tr,iconRender:Ct,locale:Object.assign(Object.assign({},ir),ut),isImageUrl:Lt,progress:Dt,appendAction:_n,appendActionVisible:Hn,itemRender:ln,disabled:on}):_n,dr=se()(`${Nn}-wrapper`,Vt,wn,er,Kn==null?void 0:Kn.className,{[`${Nn}-rtl`]:Vn==="rtl",[`${Nn}-picture-card-wrapper`]:ke==="picture-card",[`${Nn}-picture-circle-wrapper`]:ke==="picture-circle"}),kr=Object.assign(Object.assign({},Kn==null?void 0:Kn.style),bt);if(tn==="drag"){const _n=se()(er,Nn,`${Nn}-drag`,{[`${Nn}-drag-uploading`]:Pt.some(Hn=>Hn.status==="uploading"),[`${Nn}-drag-hover`]:Rn==="dragover",[`${Nn}-disabled`]:on,[`${Nn}-rtl`]:Vn==="rtl"});return lr(v.createElement("span",{className:dr},v.createElement("div",{className:_n,style:kr,onDrop:fn,onDragOver:fn,onDragLeave:fn},v.createElement(T,Object.assign({},zn,{ref:Cn,className:`${Nn}-btn`}),v.createElement("div",{className:`${Nn}-drag-container`},Ut))),Lr()))}const Or=se()(Nn,`${Nn}-select`,{[`${Nn}-disabled`]:on}),Wr=(_n=>v.createElement("div",{className:Or,style:_n},v.createElement(T,Object.assign({},zn,{ref:Cn}))))(Ut?void 0:{display:"none"});return lr(ke==="picture-card"||ke==="picture-circle"?v.createElement("span",{className:dr},Lr(Wr,!!Ut)):v.createElement("span",{className:dr},Wr,Lr()))};var Ge=v.forwardRef(ye),Le=function($,ge){var we={};for(var He in $)Object.prototype.hasOwnProperty.call($,He)&&ge.indexOf(He)<0&&(we[He]=$[He]);if($!=null&&typeof Object.getOwnPropertySymbols=="function")for(var at=0,He=Object.getOwnPropertySymbols($);at{var{style:we,height:He}=$,at=Le($,["style","height"]);return v.createElement(Ge,Object.assign({ref:ge},at,{type:"drag",style:Object.assign(Object.assign({},we),{height:He})}))});const tt=Ge;tt.Dragger=Qe,tt.LIST_IGNORE=K;var Je=tt},25769:function(Ht,lt,u){"use strict";var v=u(98040),O={"text/plain":"Text","text/html":"Url",default:"Text"},H="Copy to clipboard: #{key}, Enter";function se(B){var ee=(/mac os x/i.test(navigator.userAgent)?"\u2318":"Ctrl")+"+C";return B.replace(/#{\s*key\s*}/g,ee)}function R(B,ee){var ce,fe,M,Ze,P,g,X=!1;ee||(ee={}),ce=ee.debug||!1;try{M=v(),Ze=document.createRange(),P=document.getSelection(),g=document.createElement("span"),g.textContent=B,g.ariaHidden="true",g.style.all="unset",g.style.position="fixed",g.style.top=0,g.style.clip="rect(0, 0, 0, 0)",g.style.whiteSpace="pre",g.style.webkitUserSelect="text",g.style.MozUserSelect="text",g.style.msUserSelect="text",g.style.userSelect="text",g.addEventListener("copy",function(Ce){if(Ce.stopPropagation(),ee.format)if(Ce.preventDefault(),typeof Ce.clipboardData=="undefined"){ce&&console.warn("unable to use e.clipboardData"),ce&&console.warn("trying IE specific stuff"),window.clipboardData.clearData();var st=O[ee.format]||O.default;window.clipboardData.setData(st,B)}else Ce.clipboardData.clearData(),Ce.clipboardData.setData(ee.format,B);ee.onCopy&&(Ce.preventDefault(),ee.onCopy(Ce.clipboardData))}),document.body.appendChild(g),Ze.selectNodeContents(g),P.addRange(Ze);var z=document.execCommand("copy");if(!z)throw new Error("copy command was unsuccessful");X=!0}catch(Ce){ce&&console.error("unable to copy using execCommand: ",Ce),ce&&console.warn("trying IE specific stuff");try{window.clipboardData.setData(ee.format||"text",B),ee.onCopy&&ee.onCopy(window.clipboardData),X=!0}catch(st){ce&&console.error("unable to copy using clipboardData: ",st),ce&&console.error("falling back to prompt"),fe=se("message"in ee?ee.message:H),window.prompt(fe,B)}}finally{P&&(typeof P.removeRange=="function"?P.removeRange(Ze):P.removeAllRanges()),g&&document.body.removeChild(g),M()}return X}Ht.exports=R},3867:function(Ht,lt,u){var v=u(97671);(function(O,H){Ht.exports=H()})(this,function(){"use strict";function O(x){var C=typeof x;return x!==null&&(C==="object"||C==="function")}function H(x){return typeof x=="function"}var se=void 0;Array.isArray?se=Array.isArray:se=function(x){return Object.prototype.toString.call(x)==="[object Array]"};var R=se,B=0,ee=void 0,ce=void 0,fe=function(C,Q){A[B]=C,A[B+1]=Q,B+=2,B===2&&(ce?ce(w):N())};function M(x){ce=x}function Ze(x){fe=x}var P=typeof window!="undefined"?window:void 0,g=P||{},X=g.MutationObserver||g.WebKitMutationObserver,z=typeof self=="undefined"&&typeof v!="undefined"&&{}.toString.call(v)==="[object process]",Ce=typeof Uint8ClampedArray!="undefined"&&typeof importScripts!="undefined"&&typeof MessageChannel!="undefined";function st(){return function(){return v.nextTick(w)}}function Re(){return typeof ee!="undefined"?function(){ee(w)}:ue()}function de(){var x=0,C=new X(w),Q=document.createTextNode("");return C.observe(Q,{characterData:!0}),function(){Q.data=x=++x%2}}function ae(){var x=new MessageChannel;return x.port1.onmessage=w,function(){return x.port2.postMessage(0)}}function ue(){var x=setTimeout;return function(){return x(w,1)}}var A=new Array(1e3);function w(){for(var x=0;x0&&(N=ue[0]),N instanceof Error)throw N;var De=new Error("Unhandled error."+(N?" ("+N.message+")":""));throw De.context=N,De}var Te=j[ae];if(Te===void 0)return!1;if(typeof Te=="function")u(Te,this,ue);else for(var ze=Te.length,Me=g(Te,ze),A=0;A0&&N.length>w&&!N.warned){N.warned=!0;var De=new Error("Possible EventEmitter memory leak detected. "+N.length+" "+String(ae)+" listeners added. Use emitter.setMaxListeners() to increase limit");De.name="MaxListenersExceededWarning",De.emitter=de,De.type=ae,De.count=N.length,O(De)}return de}se.prototype.addListener=function(ae,ue){return ce(this,ae,ue,!1)},se.prototype.on=se.prototype.addListener,se.prototype.prependListener=function(ae,ue){return ce(this,ae,ue,!0)};function fe(){if(!this.fired)return this.target.removeListener(this.type,this.wrapFn),this.fired=!0,arguments.length===0?this.listener.call(this.target):this.listener.apply(this.target,arguments)}function M(de,ae,ue){var A={fired:!1,wrapFn:void 0,target:de,type:ae,listener:ue},w=fe.bind(A);return w.listener=ue,A.wrapFn=w,w}se.prototype.once=function(ae,ue){return B(ue),this.on(ae,M(this,ae,ue)),this},se.prototype.prependOnceListener=function(ae,ue){return B(ue),this.prependListener(ae,M(this,ae,ue)),this},se.prototype.removeListener=function(ae,ue){var A,w,j,N,De;if(B(ue),w=this._events,w===void 0)return this;if(A=w[ae],A===void 0)return this;if(A===ue||A.listener===ue)--this._eventsCount===0?this._events=Object.create(null):(delete w[ae],w.removeListener&&this.emit("removeListener",ae,A.listener||ue));else if(typeof A!="function"){for(j=-1,N=A.length-1;N>=0;N--)if(A[N]===ue||A[N].listener===ue){De=A[N].listener,j=N;break}if(j<0)return this;j===0?A.shift():X(A,j),A.length===1&&(w[ae]=A[0]),w.removeListener!==void 0&&this.emit("removeListener",ae,De||ue)}return this},se.prototype.off=se.prototype.removeListener,se.prototype.removeAllListeners=function(ae){var ue,A,w;if(A=this._events,A===void 0)return this;if(A.removeListener===void 0)return arguments.length===0?(this._events=Object.create(null),this._eventsCount=0):A[ae]!==void 0&&(--this._eventsCount===0?this._events=Object.create(null):delete A[ae]),this;if(arguments.length===0){var j=Object.keys(A),N;for(w=0;w=0;w--)this.removeListener(ae,ue[w]);return this};function Ze(de,ae,ue){var A=de._events;if(A===void 0)return[];var w=A[ae];return w===void 0?[]:typeof w=="function"?ue?[w.listener||w]:[w]:ue?z(w):g(w,w.length)}se.prototype.listeners=function(ae){return Ze(this,ae,!0)},se.prototype.rawListeners=function(ae){return Ze(this,ae,!1)},se.listenerCount=function(de,ae){return typeof de.listenerCount=="function"?de.listenerCount(ae):P.call(de,ae)},se.prototype.listenerCount=P;function P(de){var ae=this._events;if(ae!==void 0){var ue=ae[de];if(typeof ue=="function")return 1;if(ue!==void 0)return ue.length}return 0}se.prototype.eventNames=function(){return this._eventsCount>0?v(this._events):[]};function g(de,ae){for(var ue=new Array(ae),A=0;A>>6)+ce(128|me&63):ce(224|me>>>12&15)+ce(128|me>>>6&63)+ce(128|me&63)}else{var me=65536+(_.charCodeAt(0)-55296)*1024+(_.charCodeAt(1)-56320);return ce(240|me>>>18&7)+ce(128|me>>>12&63)+ce(128|me>>>6&63)+ce(128|me&63)}},M=/[\uD800-\uDBFF][\uDC00-\uDFFFF]|[^\x00-\x7F]/g,Ze=function(_){return _.replace(M,fe)},P=function(_){var me=[0,2,1][_.length%3],T=_.charCodeAt(0)<<16|(_.length>1?_.charCodeAt(1):0)<<8|(_.length>2?_.charCodeAt(2):0),ve=[B.charAt(T>>>18),B.charAt(T>>>12&63),me>=2?"=":B.charAt(T>>>6&63),me>=1?"=":B.charAt(T&63)];return ve.join("")},g=H.btoa&&typeof H.btoa=="function"?function(_){return H.btoa(_)}:function(_){if(_.match(/[^\x00-\xFF]/))throw new RangeError("The string contains invalid characters.");return _.replace(/[\s\S]{1,3}/g,P)},X=function(_){return g(Ze(String(_)))},z=function(_){return _.replace(/[+\/]/g,function(me){return me=="+"?"-":"_"}).replace(/=/g,"")},Ce=function(_,me){return me?z(X(_)):X(_)},st=function(_){return Ce(_,!0)},Re;H.Uint8Array&&(Re=function(_,me){for(var T="",ve=0,Ee=_.length;ve>>18)+B.charAt(te>>>12&63)+(typeof Oe!="undefined"?B.charAt(te>>>6&63):"=")+(typeof xe!="undefined"?B.charAt(te&63):"=")}return me?z(T):T});var de=/[\xC0-\xDF][\x80-\xBF]|[\xE0-\xEF][\x80-\xBF]{2}|[\xF0-\xF7][\x80-\xBF]{3}/g,ae=function(_){switch(_.length){case 4:var me=(7&_.charCodeAt(0))<<18|(63&_.charCodeAt(1))<<12|(63&_.charCodeAt(2))<<6|63&_.charCodeAt(3),T=me-65536;return ce((T>>>10)+55296)+ce((T&1023)+56320);case 3:return ce((15&_.charCodeAt(0))<<12|(63&_.charCodeAt(1))<<6|63&_.charCodeAt(2));default:return ce((31&_.charCodeAt(0))<<6|63&_.charCodeAt(1))}},ue=function(_){return _.replace(de,ae)},A=function(_){var me=_.length,T=me%4,ve=(me>0?ee[_.charAt(0)]<<18:0)|(me>1?ee[_.charAt(1)]<<12:0)|(me>2?ee[_.charAt(2)]<<6:0)|(me>3?ee[_.charAt(3)]:0),Ee=[ce(ve>>>16),ce(ve>>>8&255),ce(ve&255)];return Ee.length-=[0,0,2,1][T],Ee.join("")},w=H.atob&&typeof H.atob=="function"?function(_){return H.atob(_)}:function(_){return _.replace(/\S{1,4}/g,A)},j=function(_){return w(String(_).replace(/[^A-Za-z0-9\+\/]/g,""))},N=function(_){return ue(w(_))},De=function(_){return String(_).replace(/[-_]/g,function(me){return me=="-"?"+":"/"}).replace(/[^A-Za-z0-9\+\/]/g,"")},Te=function(_){return N(De(_))},ze;H.Uint8Array&&(ze=function(_){return Uint8Array.from(j(De(_)),function(me){return me.charCodeAt(0)})});var Me=function(){var _=H.Base64;return H.Base64=se,_};if(H.Base64={VERSION:R,atob:j,btoa:g,fromBase64:Te,toBase64:Ce,utob:Ze,encode:Ce,encodeURI:st,btou:ue,decode:Te,noConflict:Me,fromUint8Array:Re,toUint8Array:ze},typeof Object.defineProperty=="function"){var he=function(_){return{value:_,enumerable:!1,writable:!0,configurable:!0}};H.Base64.extendString=function(){Object.defineProperty(String.prototype,"fromBase64",he(function(){return Te(this)})),Object.defineProperty(String.prototype,"toBase64",he(function(_){return Ce(this,_)})),Object.defineProperty(String.prototype,"toBase64URI",he(function(){return Ce(this,!0)}))}}return H.Meteor&&(Base64=H.Base64),Ht.exports?Ht.exports.Base64=H.Base64:(v=[],O=function(){return H.Base64}.apply(lt,v),O!==void 0&&(Ht.exports=O)),{Base64:H.Base64}})},5630:function(Ht,lt,u){"use strict";var v=u(96663),O=u(44127),H=u(90493),se=u(72071),R=u(6620),B=u(92310),ee=u.n(B),ce=u(18929),fe=u(59301),M=["prefixCls","className","style","checked","disabled","defaultChecked","type","title","onChange"],Ze=(0,fe.forwardRef)(function(P,g){var X,z=P.prefixCls,Ce=z===void 0?"rc-checkbox":z,st=P.className,Re=P.style,de=P.checked,ae=P.disabled,ue=P.defaultChecked,A=ue===void 0?!1:ue,w=P.type,j=w===void 0?"checkbox":w,N=P.title,De=P.onChange,Te=(0,R.Z)(P,M),ze=(0,fe.useRef)(null),Me=(0,ce.Z)(A,{value:de}),he=(0,se.Z)(Me,2),_=he[0],me=he[1];(0,fe.useImperativeHandle)(g,function(){return{focus:function(){var ne;(ne=ze.current)===null||ne===void 0||ne.focus()},blur:function(){var ne;(ne=ze.current)===null||ne===void 0||ne.blur()},input:ze.current}});var T=ee()(Ce,st,(X={},(0,H.Z)(X,"".concat(Ce,"-checked"),_),(0,H.Z)(X,"".concat(Ce,"-disabled"),ae),X)),ve=function(ne){ae||("checked"in P||me(ne.target.checked),De==null||De({target:(0,O.Z)((0,O.Z)({},P),{},{type:j,checked:ne.target.checked}),stopPropagation:function(){ne.stopPropagation()},preventDefault:function(){ne.preventDefault()},nativeEvent:ne.nativeEvent}))};return fe.createElement("span",{className:T,title:N,style:Re},fe.createElement("input",(0,v.Z)({},Te,{className:"".concat(Ce,"-input"),ref:ze,onChange:ve,disabled:ae,checked:!!_,type:j})),fe.createElement("span",{className:"".concat(Ce,"-inner")}))});lt.Z=Ze},31561:function(Ht,lt,u){"use strict";u.d(lt,{Z:function(){return j}});var v=u(96663),O=u(90493),H=u(72071),se=u(6620),R=u(35593),B=u(92310),ee=u.n(B),ce=u(8654),fe=u(59301),M=u(10228),Ze=u(16089),P=M.Z.ESC,g=M.Z.TAB;function X(N){var De=N.visible,Te=N.triggerRef,ze=N.onVisibleChange,Me=N.autoFocus,he=N.overlayRef,_=fe.useRef(!1),me=function(){if(De){var ne,Oe;(ne=Te.current)===null||ne===void 0||(Oe=ne.focus)===null||Oe===void 0||Oe.call(ne),ze==null||ze(!1)}},T=function(){var ne;return(ne=he.current)!==null&&ne!==void 0&&ne.focus?(he.current.focus(),_.current=!0,!0):!1},ve=function(ne){switch(ne.keyCode){case P:me();break;case g:{var Oe=!1;_.current||(Oe=T()),Oe?ne.preventDefault():me();break}}};fe.useEffect(function(){return De?(window.addEventListener("keydown",ve),Me&&(0,Ze.Z)(T,3),function(){window.removeEventListener("keydown",ve),_.current=!1}):function(){_.current=!1}},[De])}var z=(0,fe.forwardRef)(function(N,De){var Te=N.overlay,ze=N.arrow,Me=N.prefixCls,he=(0,fe.useMemo)(function(){var me;return typeof Te=="function"?me=Te():me=Te,me},[Te]),_=(0,ce.sQ)(De,he==null?void 0:he.ref);return fe.createElement(fe.Fragment,null,ze&&fe.createElement("div",{className:"".concat(Me,"-arrow")}),fe.cloneElement(he,{ref:(0,ce.Yr)(he)?_:void 0}))}),Ce=z,st={adjustX:1,adjustY:1},Re=[0,0],de={topLeft:{points:["bl","tl"],overflow:st,offset:[0,-4],targetOffset:Re},top:{points:["bc","tc"],overflow:st,offset:[0,-4],targetOffset:Re},topRight:{points:["br","tr"],overflow:st,offset:[0,-4],targetOffset:Re},bottomLeft:{points:["tl","bl"],overflow:st,offset:[0,4],targetOffset:Re},bottom:{points:["tc","bc"],overflow:st,offset:[0,4],targetOffset:Re},bottomRight:{points:["tr","br"],overflow:st,offset:[0,4],targetOffset:Re}},ae=de,ue=["arrow","prefixCls","transitionName","animation","align","placement","placements","getPopupContainer","showAction","hideAction","overlayClassName","overlayStyle","visible","trigger","autoFocus","overlay","children","onVisibleChange"];function A(N,De){var Te,ze=N.arrow,Me=ze===void 0?!1:ze,he=N.prefixCls,_=he===void 0?"rc-dropdown":he,me=N.transitionName,T=N.animation,ve=N.align,Ee=N.placement,ne=Ee===void 0?"bottomLeft":Ee,Oe=N.placements,xe=Oe===void 0?ae:Oe,te=N.getPopupContainer,Fe=N.showAction,Ae=N.hideAction,le=N.overlayClassName,$e=N.overlayStyle,nt=N.visible,St=N.trigger,Rt=St===void 0?["hover"]:St,Et=N.autoFocus,vt=N.overlay,It=N.children,gt=N.onVisibleChange,qe=(0,se.Z)(N,ue),yt=fe.useState(),V=(0,H.Z)(yt,2),Z=V[0],L=V[1],U="visible"in N?nt:Z,J=fe.useRef(null),Se=fe.useRef(null),x=fe.useRef(null);fe.useImperativeHandle(De,function(){return J.current});var C=function(Ye){L(Ye),gt==null||gt(Ye)};X({visible:U,triggerRef:x,onVisibleChange:C,autoFocus:Et,overlayRef:Se});var Q=function(Ye){var re=N.onOverlayClick;L(!1),re&&re(Ye)},I=function(){return fe.createElement(Ce,{ref:Se,overlay:vt,prefixCls:_,arrow:Me})},F=function(){return typeof vt=="function"?I:I()},pe=function(){var Ye=N.minOverlayWidthMatchTrigger,re=N.alignPoint;return"minOverlayWidthMatchTrigger"in N?Ye:!re},je=function(){var Ye=N.openClassName;return Ye!==void 0?Ye:"".concat(_,"-open")},Be=fe.cloneElement(It,{className:ee()((Te=It.props)===null||Te===void 0?void 0:Te.className,U&&je()),ref:(0,ce.Yr)(It)?(0,ce.sQ)(x,It.ref):void 0}),it=Ae;return!it&&Rt.indexOf("contextMenu")!==-1&&(it=["click"]),fe.createElement(R.Z,(0,v.Z)({builtinPlacements:xe},qe,{prefixCls:_,ref:J,popupClassName:ee()(le,(0,O.Z)({},"".concat(_,"-show-arrow"),Me)),popupStyle:$e,action:Rt,showAction:Fe,hideAction:it,popupPlacement:ne,popupAlign:ve,popupTransitionName:me,popupAnimation:T,popupVisible:U,stretch:pe()?"minWidth":"",popup:F(),onPopupVisibleChange:C,onPopupClick:Q,getPopupContainer:te}),Be)}var w=fe.forwardRef(A),j=w},93681:function(Ht,lt,u){"use strict";u.r(lt),u.d(lt,{BaseInput:function(){return M},default:function(){return de}});var v=u(96663),O=u(44127),H=u(90493),se=u(20135),R=u(92310),B=u.n(R),ee=u(59301),ce=u(5643),fe=function(ue){var A,w,j=ue.inputElement,N=ue.prefixCls,De=ue.prefix,Te=ue.suffix,ze=ue.addonBefore,Me=ue.addonAfter,he=ue.className,_=ue.style,me=ue.disabled,T=ue.readOnly,ve=ue.focused,Ee=ue.triggerFocus,ne=ue.allowClear,Oe=ue.value,xe=ue.handleReset,te=ue.hidden,Fe=ue.classes,Ae=ue.classNames,le=ue.dataAttrs,$e=ue.styles,nt=ue.components,St=(nt==null?void 0:nt.affixWrapper)||"span",Rt=(nt==null?void 0:nt.groupWrapper)||"span",Et=(nt==null?void 0:nt.wrapper)||"span",vt=(nt==null?void 0:nt.groupAddon)||"span",It=(0,ee.useRef)(null),gt=function(I){var F;(F=It.current)!==null&&F!==void 0&&F.contains(I.target)&&(Ee==null||Ee())},qe=function(){var I;if(!ne)return null;var F=!me&&!T&&Oe,pe="".concat(N,"-clear-icon"),je=(0,se.Z)(ne)==="object"&&ne!==null&&ne!==void 0&&ne.clearIcon?ne.clearIcon:"\u2716";return ee.createElement("span",{onClick:xe,onMouseDown:function(it){return it.preventDefault()},className:B()(pe,(I={},(0,H.Z)(I,"".concat(pe,"-hidden"),!F),(0,H.Z)(I,"".concat(pe,"-has-suffix"),!!Te),I)),role:"button",tabIndex:-1},je)},yt=(0,ee.cloneElement)(j,{value:Oe,hidden:te,className:B()((A=j.props)===null||A===void 0?void 0:A.className,!(0,ce.X3)(ue)&&!(0,ce.He)(ue)&&he)||null,style:(0,O.Z)((0,O.Z)({},(w=j.props)===null||w===void 0?void 0:w.style),!(0,ce.X3)(ue)&&!(0,ce.He)(ue)?_:{})});if((0,ce.X3)(ue)){var V,Z="".concat(N,"-affix-wrapper"),L=B()(Z,(V={},(0,H.Z)(V,"".concat(Z,"-disabled"),me),(0,H.Z)(V,"".concat(Z,"-focused"),ve),(0,H.Z)(V,"".concat(Z,"-readonly"),T),(0,H.Z)(V,"".concat(Z,"-input-with-clear-btn"),Te&&ne&&Oe),V),!(0,ce.He)(ue)&&he,Fe==null?void 0:Fe.affixWrapper,Ae==null?void 0:Ae.affixWrapper),U=(Te||ne)&&ee.createElement("span",{className:B()("".concat(N,"-suffix"),Ae==null?void 0:Ae.suffix),style:$e==null?void 0:$e.suffix},qe(),Te);yt=ee.createElement(St,(0,v.Z)({className:L,style:(0,O.Z)((0,O.Z)({},(0,ce.He)(ue)?void 0:_),$e==null?void 0:$e.affixWrapper),hidden:!(0,ce.He)(ue)&&te,onClick:gt},le==null?void 0:le.affixWrapper,{ref:It}),De&&ee.createElement("span",{className:B()("".concat(N,"-prefix"),Ae==null?void 0:Ae.prefix),style:$e==null?void 0:$e.prefix},De),(0,ee.cloneElement)(j,{value:Oe,hidden:null}),U)}if((0,ce.He)(ue)){var J="".concat(N,"-group"),Se="".concat(J,"-addon"),x=B()("".concat(N,"-wrapper"),J,Fe==null?void 0:Fe.wrapper),C=B()("".concat(N,"-group-wrapper"),he,Fe==null?void 0:Fe.group);return ee.createElement(Rt,{className:C,style:_,hidden:te},ee.createElement(Et,{className:x},ze&&ee.createElement(vt,{className:Se},ze),(0,ee.cloneElement)(yt,{hidden:null}),Me&&ee.createElement(vt,{className:Se},Me)))}return yt},M=fe,Ze=u(19127),P=u(72071),g=u(6620),X=u(18929),z=u(2738),Ce=["autoComplete","onChange","onFocus","onBlur","onPressEnter","onKeyDown","prefixCls","disabled","htmlSize","className","maxLength","suffix","showCount","type","classes","classNames","styles"],st=(0,ee.forwardRef)(function(ae,ue){var A=ae.autoComplete,w=ae.onChange,j=ae.onFocus,N=ae.onBlur,De=ae.onPressEnter,Te=ae.onKeyDown,ze=ae.prefixCls,Me=ze===void 0?"rc-input":ze,he=ae.disabled,_=ae.htmlSize,me=ae.className,T=ae.maxLength,ve=ae.suffix,Ee=ae.showCount,ne=ae.type,Oe=ne===void 0?"text":ne,xe=ae.classes,te=ae.classNames,Fe=ae.styles,Ae=(0,g.Z)(ae,Ce),le=(0,X.Z)(ae.defaultValue,{value:ae.value}),$e=(0,P.Z)(le,2),nt=$e[0],St=$e[1],Rt=(0,ee.useState)(!1),Et=(0,P.Z)(Rt,2),vt=Et[0],It=Et[1],gt=(0,ee.useRef)(null),qe=function(C){gt.current&&(0,ce.nH)(gt.current,C)};(0,ee.useImperativeHandle)(ue,function(){return{focus:qe,blur:function(){var C;(C=gt.current)===null||C===void 0||C.blur()},setSelectionRange:function(C,Q,I){var F;(F=gt.current)===null||F===void 0||F.setSelectionRange(C,Q,I)},select:function(){var C;(C=gt.current)===null||C===void 0||C.select()},input:gt.current}}),(0,ee.useEffect)(function(){It(function(x){return x&&he?!1:x})},[he]);var yt=function(C){ae.value===void 0&&St(C.target.value),gt.current&&(0,ce.rJ)(gt.current,C,w)},V=function(C){De&&C.key==="Enter"&&De(C),Te==null||Te(C)},Z=function(C){It(!0),j==null||j(C)},L=function(C){It(!1),N==null||N(C)},U=function(C){St(""),qe(),gt.current&&(0,ce.rJ)(gt.current,C,w)},J=function(){var C=(0,z.Z)(ae,["prefixCls","onPressEnter","addonBefore","addonAfter","prefix","suffix","allowClear","defaultValue","showCount","classes","htmlSize","styles","classNames"]);return ee.createElement("input",(0,v.Z)({autoComplete:A},C,{onChange:yt,onFocus:Z,onBlur:L,onKeyDown:V,className:B()(Me,(0,H.Z)({},"".concat(Me,"-disabled"),he),te==null?void 0:te.input),style:Fe==null?void 0:Fe.input,ref:gt,size:_,type:Oe}))},Se=function(){var C=Number(T)>0;if(ve||Ee){var Q=(0,ce.D7)(nt),I=(0,Ze.Z)(Q).length,F=(0,se.Z)(Ee)==="object"?Ee.formatter({value:Q,count:I,maxLength:T}):"".concat(I).concat(C?" / ".concat(T):"");return ee.createElement(ee.Fragment,null,!!Ee&&ee.createElement("span",{className:B()("".concat(Me,"-show-count-suffix"),(0,H.Z)({},"".concat(Me,"-show-count-has-suffix"),!!ve),te==null?void 0:te.count),style:(0,O.Z)({},Fe==null?void 0:Fe.count)},F),ve)}return null};return ee.createElement(M,(0,v.Z)({},Ae,{prefixCls:Me,className:me,inputElement:J(),handleReset:U,value:(0,ce.D7)(nt),focused:vt,triggerFocus:qe,suffix:Se(),disabled:he,classes:xe,classNames:te,styles:Fe}))}),Re=st,de=Re},5643:function(Ht,lt,u){"use strict";u.d(lt,{D7:function(){return R},He:function(){return v},X3:function(){return O},nH:function(){return se},rJ:function(){return H}});function v(B){return!!(B.addonBefore||B.addonAfter)}function O(B){return!!(B.prefix||B.suffix||B.allowClear)}function H(B,ee,ce,fe){if(ce){var M=ee;if(ee.type==="click"){var Ze=B.cloneNode(!0);M=Object.create(ee,{target:{value:Ze},currentTarget:{value:Ze}}),Ze.value="",ce(M);return}if(fe!==void 0){M=Object.create(ee,{target:{value:B},currentTarget:{value:B}}),B.value=fe,ce(M);return}ce(M)}}function se(B,ee){if(B){B.focus(ee);var ce=ee||{},fe=ce.cursor;if(fe){var M=B.value.length;switch(fe){case"start":B.setSelectionRange(0,0);break;case"end":B.setSelectionRange(M,M);break;default:B.setSelectionRange(0,M)}}}}function R(B){return typeof B=="undefined"||B===null?"":String(B)}},15285:function(Ht,lt,u){"use strict";u.d(lt,{iz:function(){return Qe},ck:function(){return xt},BW:function(){return rt},sN:function(){return xt},Wd:function(){return K},ZP:function(){return ke},Xl:function(){return Te}});var v=u(96663),O=u(90493),H=u(44127),se=u(19127),R=u(72071),B=u(6620),ee=u(92310),ce=u.n(ee),fe=u(11780),M=u(18929),Ze=u(13697),P=u(48736),g=u(59301),X=u(4676),z=g.createContext(null);function Ce(Y,be){return Y===void 0?null:"".concat(Y,"-").concat(be)}function st(Y){var be=g.useContext(z);return Ce(be,Y)}var Re=u(80547),de=["children","locked"],ae=g.createContext(null);function ue(Y,be){var Ie=(0,H.Z)({},Y);return Object.keys(be).forEach(function(Ke){var Ve=be[Ke];Ve!==void 0&&(Ie[Ke]=Ve)}),Ie}function A(Y){var be=Y.children,Ie=Y.locked,Ke=(0,B.Z)(Y,de),Ve=g.useContext(ae),ct=(0,Re.Z)(function(){return ue(Ve,Ke)},[Ve,Ke],function(ut,Ct){return!Ie&&(ut[0]!==Ct[0]||!(0,Ze.Z)(ut[1],Ct[1],!0))});return g.createElement(ae.Provider,{value:ct},be)}var w=[],j=g.createContext(null);function N(){return g.useContext(j)}var De=g.createContext(w);function Te(Y){var be=g.useContext(De);return g.useMemo(function(){return Y!==void 0?[].concat((0,se.Z)(be),[Y]):be},[be,Y])}var ze=g.createContext(null),Me=g.createContext({}),he=Me,_=u(29194);function me(Y){var be=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;if((0,_.Z)(Y)){var Ie=Y.nodeName.toLowerCase(),Ke=["input","select","textarea","button"].includes(Ie)||Y.isContentEditable||Ie==="a"&&!!Y.getAttribute("href"),Ve=Y.getAttribute("tabindex"),ct=Number(Ve),ut=null;return Ve&&!Number.isNaN(ct)?ut=ct:Ke&&ut===null&&(ut=0),Ke&&Y.disabled&&(ut=null),ut!==null&&(ut>=0||be&&ut<0)}return!1}function T(Y){var be=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,Ie=(0,se.Z)(Y.querySelectorAll("*")).filter(function(Ke){return me(Ke,be)});return me(Y,be)&&Ie.unshift(Y),Ie}var ve=null;function Ee(){ve=document.activeElement}function ne(){ve=null}function Oe(){if(ve)try{ve.focus()}catch(Y){}}function xe(Y,be){if(be.keyCode===9){var Ie=T(Y),Ke=Ie[be.shiftKey?0:Ie.length-1],Ve=Ke===document.activeElement||Y===document.activeElement;if(Ve){var ct=Ie[be.shiftKey?Ie.length-1:0];ct.focus(),be.preventDefault()}}}var te=u(10228),Fe=u(16089),Ae=te.Z.LEFT,le=te.Z.RIGHT,$e=te.Z.UP,nt=te.Z.DOWN,St=te.Z.ENTER,Rt=te.Z.ESC,Et=te.Z.HOME,vt=te.Z.END,It=[$e,nt,Ae,le];function gt(Y,be,Ie,Ke){var Ve,ct,ut,Ct,Lt="prev",Dt="next",Nt="children",Vt="parent";if(Y==="inline"&&Ke===St)return{inlineTrigger:!0};var tn=(Ve={},(0,O.Z)(Ve,$e,Lt),(0,O.Z)(Ve,nt,Dt),Ve),Ut=(ct={},(0,O.Z)(ct,Ae,Ie?Dt:Lt),(0,O.Z)(ct,le,Ie?Lt:Dt),(0,O.Z)(ct,nt,Nt),(0,O.Z)(ct,St,Nt),ct),bt=(ut={},(0,O.Z)(ut,$e,Lt),(0,O.Z)(ut,nt,Dt),(0,O.Z)(ut,St,Nt),(0,O.Z)(ut,Rt,Vt),(0,O.Z)(ut,Ae,Ie?Nt:Vt),(0,O.Z)(ut,le,Ie?Vt:Nt),ut),ln={inline:tn,horizontal:Ut,vertical:bt,inlineSub:tn,horizontalSub:bt,verticalSub:bt},Qt=(Ct=ln["".concat(Y).concat(be?"":"Sub")])===null||Ct===void 0?void 0:Ct[Ke];switch(Qt){case Lt:return{offset:-1,sibling:!0};case Dt:return{offset:1,sibling:!0};case Vt:return{offset:-1,sibling:!1};case Nt:return{offset:1,sibling:!1};default:return null}}function qe(Y){for(var be=Y;be;){if(be.getAttribute("data-menu-list"))return be;be=be.parentElement}return null}function yt(Y,be){for(var Ie=Y||document.activeElement;Ie;){if(be.has(Ie))return Ie;Ie=Ie.parentElement}return null}function V(Y,be){var Ie=T(Y,!0);return Ie.filter(function(Ke){return be.has(Ke)})}function Z(Y,be,Ie){var Ke=arguments.length>3&&arguments[3]!==void 0?arguments[3]:1;if(!Y)return null;var Ve=V(Y,be),ct=Ve.length,ut=Ve.findIndex(function(Ct){return Ie===Ct});return Ke<0?ut===-1?ut=ct-1:ut-=1:Ke>0&&(ut+=1),ut=(ut+ct)%ct,Ve[ut]}var L=function(be,Ie){var Ke=new Set,Ve=new Map,ct=new Map;return be.forEach(function(ut){var Ct=document.querySelector("[data-menu-id='".concat(Ce(Ie,ut),"']"));Ct&&(Ke.add(Ct),ct.set(Ct,ut),Ve.set(ut,Ct))}),{elements:Ke,key2element:Ve,element2key:ct}};function U(Y,be,Ie,Ke,Ve,ct,ut,Ct,Lt,Dt){var Nt=g.useRef(),Vt=g.useRef();Vt.current=be;var tn=function(){Fe.Z.cancel(Nt.current)};return g.useEffect(function(){return function(){tn()}},[]),function(Ut){var bt=Ut.which;if([].concat(It,[St,Rt,Et,vt]).includes(bt)){var ln=ct(),Qt=L(ln,Ke),cn=Qt,Gt=cn.elements,rn=cn.key2element,pn=cn.element2key,un=rn.get(be),wn=yt(un,Gt),kn=pn.get(wn),on=gt(Y,ut(kn,!0).length===1,Ie,bt);if(!on&&bt!==Et&&bt!==vt)return;(It.includes(bt)||[Et,vt].includes(bt))&&Ut.preventDefault();var Pt=function(An){if(An){var Wn=An,sn=An.querySelector("a");sn!=null&&sn.getAttribute("href")&&(Wn=sn);var Wt=pn.get(An);Ct(Wt),tn(),Nt.current=(0,Fe.Z)(function(){Vt.current===Wt&&Wn.focus()})}};if([Et,vt].includes(bt)||on.sibling||!wn){var Tt;!wn||Y==="inline"?Tt=Ve.current:Tt=qe(wn);var Rn,Ln=V(Tt,Gt);bt===Et?Rn=Ln[0]:bt===vt?Rn=Ln[Ln.length-1]:Rn=Z(Tt,Gt,wn,on.offset),Pt(Rn)}else if(on.inlineTrigger)Lt(kn);else if(on.offset>0)Lt(kn,!0),tn(),Nt.current=(0,Fe.Z)(function(){Qt=L(ln,Ke);var dn=wn.getAttribute("aria-controls"),An=document.getElementById(dn),Wn=Z(An,Qt.elements);Pt(Wn)},5);else if(on.offset<0){var Cn=ut(kn,!0),Sn=Cn[Cn.length-2],En=rn.get(Sn);Lt(Sn,!1),Pt(En)}}Dt==null||Dt(Ut)}}function J(Y){Promise.resolve().then(Y)}var Se="__RC_UTIL_PATH_SPLIT__",x=function(be){return be.join(Se)},C=function(be){return be.split(Se)},Q="rc-menu-more";function I(){var Y=g.useState({}),be=(0,R.Z)(Y,2),Ie=be[1],Ke=(0,g.useRef)(new Map),Ve=(0,g.useRef)(new Map),ct=g.useState([]),ut=(0,R.Z)(ct,2),Ct=ut[0],Lt=ut[1],Dt=(0,g.useRef)(0),Nt=(0,g.useRef)(!1),Vt=function(){Nt.current||Ie({})},tn=(0,g.useCallback)(function(rn,pn){var un=x(pn);Ve.current.set(un,rn),Ke.current.set(rn,un),Dt.current+=1;var wn=Dt.current;J(function(){wn===Dt.current&&Vt()})},[]),Ut=(0,g.useCallback)(function(rn,pn){var un=x(pn);Ve.current.delete(un),Ke.current.delete(rn)},[]),bt=(0,g.useCallback)(function(rn){Lt(rn)},[]),ln=(0,g.useCallback)(function(rn,pn){var un=Ke.current.get(rn)||"",wn=C(un);return pn&&Ct.includes(wn[0])&&wn.unshift(Q),wn},[Ct]),Qt=(0,g.useCallback)(function(rn,pn){return rn.some(function(un){var wn=ln(un,!0);return wn.includes(pn)})},[ln]),cn=function(){var pn=(0,se.Z)(Ke.current.keys());return Ct.length&&pn.push(Q),pn},Gt=(0,g.useCallback)(function(rn){var pn="".concat(Ke.current.get(rn)).concat(Se),un=new Set;return(0,se.Z)(Ve.current.keys()).forEach(function(wn){wn.startsWith(pn)&&un.add(Ve.current.get(wn))}),un},[]);return g.useEffect(function(){return function(){Nt.current=!0}},[]),{registerPath:tn,unregisterPath:Ut,refreshOverflowKeys:bt,isSubPathKey:Qt,getKeyPath:ln,getKeys:cn,getSubPathKeys:Gt}}function F(Y){var be=g.useRef(Y);be.current=Y;var Ie=g.useCallback(function(){for(var Ke,Ve=arguments.length,ct=new Array(Ve),ut=0;ut1&&(Gt.motionAppear=!1);var rn=Gt.onVisibleChanged;return Gt.onVisibleChanged=function(pn){return!tn.current&&!pn&&Qt(!0),rn==null?void 0:rn(pn)},ln?null:g.createElement(A,{mode:ct,locked:!tn.current},g.createElement(d.default,(0,v.Z)({visible:cn},Gt,{forceRender:Lt,removeOnLeave:!1,leavedClassName:"".concat(Ct,"-hidden")}),function(pn){var un=pn.className,wn=pn.style;return g.createElement(Kt,{id:be,className:un,style:wn},Ve)}))}var b=["style","className","title","eventKey","warnKey","disabled","internalPopupClose","children","itemIcon","expandIcon","popupClassName","popupOffset","popupStyle","onClick","onMouseEnter","onMouseLeave","onTitleClick","onTitleMouseEnter","onTitleMouseLeave"],E=["active"],q=function(be){var Ie,Ke=be.style,Ve=be.className,ct=be.title,ut=be.eventKey,Ct=be.warnKey,Lt=be.disabled,Dt=be.internalPopupClose,Nt=be.children,Vt=be.itemIcon,tn=be.expandIcon,Ut=be.popupClassName,bt=be.popupOffset,ln=be.popupStyle,Qt=be.onClick,cn=be.onMouseEnter,Gt=be.onMouseLeave,rn=be.onTitleClick,pn=be.onTitleMouseEnter,un=be.onTitleMouseLeave,wn=(0,B.Z)(be,b),kn=st(ut),on=g.useContext(ae),Pt=on.prefixCls,Tt=on.mode,Rn=on.openKeys,Ln=on.disabled,Cn=on.overflowDisabled,Sn=on.activeKey,En=on.selectedKeys,dn=on.itemIcon,An=on.expandIcon,Wn=on.onItemClick,sn=on.onOpenChange,Wt=on.onActive,fn=g.useContext(he),On=fn._internalRenderSubMenuItem,Vn=g.useContext(ze),Kn=Vn.isSubPathKey,Nn=Te(),zn="".concat(Pt,"-submenu"),lr=Ln||Lt,er=g.useRef(),ir=g.useRef(),mr=Vt!=null?Vt:dn,$n=tn!=null?tn:An,cr=Rn.includes(ut),Cr=!Cn&&cr,wr=Kn(En,ut),Tr=oe(ut,lr,pn,un),Lr=Tr.active,dr=(0,B.Z)(Tr,E),kr=g.useState(!1),Or=(0,R.Z)(kr,2),jr=Or[0],Wr=Or[1],_n=function(vr){lr||Wr(vr)},Hn=function(vr){_n(!0),cn==null||cn({key:ut,domEvent:vr})},sr=function(vr){_n(!1),Gt==null||Gt({key:ut,domEvent:vr})},Zn=g.useMemo(function(){return Lr||(Tt!=="inline"?jr||Kn([Sn],ut):!1)},[Tt,Lr,Sn,jr,ut,Kn]),Jn=dt(Nn.length),pr=function(vr){lr||(rn==null||rn({key:ut,domEvent:vr}),Tt==="inline"&&sn(ut,!cr))},Pr=F(function(fr){Qt==null||Qt(ot(fr)),Wn(fr)}),bn=function(vr){Tt!=="inline"&&sn(ut,vr)},Pn=function(){Wt(ut)},Tn=kn&&"".concat(kn,"-popup"),Fn=g.createElement("div",(0,v.Z)({role:"menuitem",style:Jn,className:"".concat(zn,"-title"),tabIndex:lr?null:-1,ref:er,title:typeof ct=="string"?ct:null,"data-menu-id":Cn&&kn?null:kn,"aria-expanded":Cr,"aria-haspopup":!0,"aria-controls":Tn,"aria-disabled":lr,onClick:pr,onFocus:Pn},dr),ct,g.createElement(pt,{icon:Tt!=="horizontal"?$n:void 0,props:(0,H.Z)((0,H.Z)({},be),{},{isOpen:Cr,isSubMenu:!0})},g.createElement("i",{className:"".concat(zn,"-arrow")}))),jn=g.useRef(Tt);if(Tt!=="inline"&&Nn.length>1?jn.current="vertical":jn.current=Tt,!Cn){var Yn=jn.current;Fn=g.createElement(f,{mode:Yn,prefixCls:zn,visible:!Dt&&Cr&&Tt!=="inline",popupClassName:Ut,popupOffset:bt,popupStyle:ln,popup:g.createElement(A,{mode:Yn==="horizontal"?"vertical":Yn},g.createElement(Kt,{id:Tn,ref:ir},Nt)),disabled:lr,onVisibleChange:bn},Fn)}var br=g.createElement(fe.Z.Item,(0,v.Z)({role:"none"},wn,{component:"li",style:Ke,className:ce()(zn,"".concat(zn,"-").concat(Tt),Ve,(Ie={},(0,O.Z)(Ie,"".concat(zn,"-open"),Cr),(0,O.Z)(Ie,"".concat(zn,"-active"),Zn),(0,O.Z)(Ie,"".concat(zn,"-selected"),wr),(0,O.Z)(Ie,"".concat(zn,"-disabled"),lr),Ie)),onMouseEnter:Hn,onMouseLeave:sr}),Fn,!Cn&&g.createElement(p,{id:Tn,open:Cr,keyPath:Nn},Nt));return On&&(br=On(br,be,{selected:wr,active:Zn,open:Cr,disabled:lr})),g.createElement(A,{onItemClick:Pr,mode:Tt==="horizontal"?"vertical":Tt,itemIcon:mr,expandIcon:$n},br)};function K(Y){var be=Y.eventKey,Ie=Y.children,Ke=Te(be),Ve=en(Ie,Ke),ct=N();g.useEffect(function(){if(ct)return ct.registerPath(be,Ke),function(){ct.unregisterPath(be,Ke)}},[Ke]);var ut;return ct?ut=Ve:ut=g.createElement(q,Y,Ve),g.createElement(De.Provider,{value:Ke},ut)}var ye=u(20135),Ue=["className","title","eventKey","children"],Ge=["children"],Le=function(be){var Ie=be.className,Ke=be.title,Ve=be.eventKey,ct=be.children,ut=(0,B.Z)(be,Ue),Ct=g.useContext(ae),Lt=Ct.prefixCls,Dt="".concat(Lt,"-item-group");return g.createElement("li",(0,v.Z)({role:"presentation"},ut,{onClick:function(Vt){return Vt.stopPropagation()},className:ce()(Dt,Ie)}),g.createElement("div",{role:"presentation",className:"".concat(Dt,"-title"),title:typeof Ke=="string"?Ke:void 0},Ke),g.createElement("ul",{role:"group",className:"".concat(Dt,"-list")},ct))};function rt(Y){var be=Y.children,Ie=(0,B.Z)(Y,Ge),Ke=Te(Ie.eventKey),Ve=en(be,Ke),ct=N();return ct?Ve:g.createElement(Le,(0,Pe.Z)(Ie,["warnKey"]),Ve)}function Qe(Y){var be=Y.className,Ie=Y.style,Ke=g.useContext(ae),Ve=Ke.prefixCls,ct=N();return ct?null:g.createElement("li",{role:"separator",className:ce()("".concat(Ve,"-item-divider"),be),style:Ie})}var tt=["label","children","key","type"];function Je(Y){return(Y||[]).map(function(be,Ie){if(be&&(0,ye.Z)(be)==="object"){var Ke=be,Ve=Ke.label,ct=Ke.children,ut=Ke.key,Ct=Ke.type,Lt=(0,B.Z)(Ke,tt),Dt=ut!=null?ut:"tmp-".concat(Ie);return ct||Ct==="group"?Ct==="group"?g.createElement(rt,(0,v.Z)({key:Dt},Lt,{title:Ve}),Je(ct)):g.createElement(K,(0,v.Z)({key:Dt},Lt,{title:Ve}),Je(ct)):Ct==="divider"?g.createElement(Qe,(0,v.Z)({key:Dt},Lt)):g.createElement(xt,(0,v.Z)({key:Dt},Lt),Ve)}return null}).filter(function(be){return be})}function $(Y,be,Ie){var Ke=Y;return be&&(Ke=Je(be)),en(Ke,Ie)}var ge=["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"],we=[],He=g.forwardRef(function(Y,be){var Ie,Ke,Ve=Y,ct=Ve.prefixCls,ut=ct===void 0?"rc-menu":ct,Ct=Ve.rootClassName,Lt=Ve.style,Dt=Ve.className,Nt=Ve.tabIndex,Vt=Nt===void 0?0:Nt,tn=Ve.items,Ut=Ve.children,bt=Ve.direction,ln=Ve.id,Qt=Ve.mode,cn=Qt===void 0?"vertical":Qt,Gt=Ve.inlineCollapsed,rn=Ve.disabled,pn=Ve.disabledOverflow,un=Ve.subMenuOpenDelay,wn=un===void 0?.1:un,kn=Ve.subMenuCloseDelay,on=kn===void 0?.1:kn,Pt=Ve.forceSubMenuRender,Tt=Ve.defaultOpenKeys,Rn=Ve.openKeys,Ln=Ve.activeKey,Cn=Ve.defaultActiveFirst,Sn=Ve.selectable,En=Sn===void 0?!0:Sn,dn=Ve.multiple,An=dn===void 0?!1:dn,Wn=Ve.defaultSelectedKeys,sn=Ve.selectedKeys,Wt=Ve.onSelect,fn=Ve.onDeselect,On=Ve.inlineIndent,Vn=On===void 0?24:On,Kn=Ve.motion,Nn=Ve.defaultMotions,zn=Ve.triggerSubMenuAction,lr=zn===void 0?"hover":zn,er=Ve.builtinPlacements,ir=Ve.itemIcon,mr=Ve.expandIcon,$n=Ve.overflowedIndicator,cr=$n===void 0?"...":$n,Cr=Ve.overflowedIndicatorPopupClassName,wr=Ve.getPopupContainer,Tr=Ve.onClick,Lr=Ve.onOpenChange,dr=Ve.onKeyDown,kr=Ve.openAnimation,Or=Ve.openTransitionName,jr=Ve._internalRenderMenuItem,Wr=Ve._internalRenderSubMenuItem,_n=(0,B.Z)(Ve,ge),Hn=g.useMemo(function(){return $(Ut,tn,we)},[Ut,tn]),sr=g.useState(!1),Zn=(0,R.Z)(sr,2),Jn=Zn[0],pr=Zn[1],Pr=g.useRef(),bn=Be(ln),Pn=bt==="rtl",Tn=(0,M.Z)(Tt,{value:Rn,postState:function(Ar){return Ar||we}}),Fn=(0,R.Z)(Tn,2),jn=Fn[0],Yn=Fn[1],br=function(Ar){var Fr=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;function zr(){Yn(Ar),Lr==null||Lr(Ar)}Fr?(0,X.flushSync)(zr):zr()},fr=g.useState(jn),vr=(0,R.Z)(fr,2),Sr=vr[0],ar=vr[1],Xn=g.useRef(!1),Ir=g.useMemo(function(){return(cn==="inline"||cn==="vertical")&&Gt?["vertical",Gt]:[cn,!1]},[cn,Gt]),Rr=(0,R.Z)(Ir,2),Mr=Rr[0],yn=Rr[1],Dn=Mr==="inline",nr=g.useState(Mr),Nr=(0,R.Z)(nr,2),hr=Nr[0],qr=Nr[1],mi=g.useState(yn),di=(0,R.Z)(mi,2),si=di[0],zi=di[1];g.useEffect(function(){qr(Mr),zi(yn),Xn.current&&(Dn?Yn(Sr):br(we))},[Mr,yn]);var Li=g.useState(0),Ei=(0,R.Z)(Li,2),yi=Ei[0],Ii=Ei[1],Ai=yi>=Hn.length-1||hr!=="horizontal"||pn;g.useEffect(function(){Dn&&ar(jn)},[jn]),g.useEffect(function(){return Xn.current=!0,function(){Xn.current=!1}},[]);var Zr=I(),Ri=Zr.registerPath,Di=Zr.unregisterPath,ei=Zr.refreshOverflowKeys,ri=Zr.isSubPathKey,or=Zr.getKeyPath,Gn=Zr.getKeys,Hr=Zr.getSubPathKeys,Kr=g.useMemo(function(){return{registerPath:Ri,unregisterPath:Di}},[Ri,Di]),_r=g.useMemo(function(){return{isSubPathKey:ri}},[ri]);g.useEffect(function(){ei(Ai?we:Hn.slice(yi+1).map(function(Ur){return Ur.key}))},[yi,Ai]);var Xr=(0,M.Z)(Ln||Cn&&((Ie=Hn[0])===null||Ie===void 0?void 0:Ie.key),{value:Ln}),gr=(0,R.Z)(Xr,2),ii=gr[0],Qr=gr[1],ti=F(function(Ur){Qr(Ur)}),ai=F(function(){Qr(void 0)});(0,g.useImperativeHandle)(be,function(){return{list:Pr.current,focus:function(Ar){var Fr,zr=Gn(),ni=L(zr,bn),Mi=ni.elements,Hi=ni.key2element,hs=ni.element2key,Xi=V(Pr.current,Mi),Fi=ii!=null?ii:Xi[0]?hs.get(Xi[0]):(Fr=Hn.find(function(Vi){return!Vi.props.disabled}))===null||Fr===void 0?void 0:Fr.key,xi=Hi.get(Fi);if(Fi&&xi){var Jt;xi==null||(Jt=xi.focus)===null||Jt===void 0||Jt.call(xi,Ar)}}}});var Er=(0,M.Z)(Wn||[],{value:sn,postState:function(Ar){return Array.isArray(Ar)?Ar:Ar==null?we:[Ar]}}),Oi=(0,R.Z)(Er,2),gi=Oi[0],Pi=Oi[1],cs=function(Ar){if(En){var Fr=Ar.key,zr=gi.includes(Fr),ni;An?zr?ni=gi.filter(function(Hi){return Hi!==Fr}):ni=[].concat((0,se.Z)(gi),[Fr]):ni=[Fr],Pi(ni);var Mi=(0,H.Z)((0,H.Z)({},Ar),{},{selectedKeys:ni});zr?fn==null||fn(Mi):Wt==null||Wt(Mi)}!An&&jn.length&&hr!=="inline"&&br(we)},us=F(function(Ur){Tr==null||Tr(ot(Ur)),cs(Ur)}),Wi=F(function(Ur,Ar){var Fr=jn.filter(function(ni){return ni!==Ur});if(Ar)Fr.push(Ur);else if(hr!=="inline"){var zr=Hr(Ur);Fr=Fr.filter(function(ni){return!zr.has(ni)})}(0,Ze.Z)(jn,Fr,!0)||br(Fr,!0)}),Gi=function(Ar,Fr){var zr=Fr!=null?Fr:!jn.includes(Ar);Wi(Ar,zr)},ds=U(hr,ii,Pn,bn,Pr,Gn,or,Qr,Gi,dr);g.useEffect(function(){pr(!0)},[]);var fs=g.useMemo(function(){return{_internalRenderMenuItem:jr,_internalRenderSubMenuItem:Wr}},[jr,Wr]),Bi=hr!=="horizontal"||pn?Hn:Hn.map(function(Ur,Ar){return g.createElement(A,{key:Ur.key,overflowDisabled:Ar>yi},Ur)}),Yi=g.createElement(fe.Z,(0,v.Z)({id:ln,ref:Pr,prefixCls:"".concat(ut,"-overflow"),component:"ul",itemComponent:xt,className:ce()(ut,"".concat(ut,"-root"),"".concat(ut,"-").concat(hr),Dt,(Ke={},(0,O.Z)(Ke,"".concat(ut,"-inline-collapsed"),si),(0,O.Z)(Ke,"".concat(ut,"-rtl"),Pn),Ke),Ct),dir:bt,style:Lt,role:"menu",tabIndex:Vt,data:Bi,renderRawItem:function(Ar){return Ar},renderRawRest:function(Ar){var Fr=Ar.length,zr=Fr?Hn.slice(-Fr):null;return g.createElement(K,{eventKey:Q,title:cr,disabled:Ai,internalPopupClose:Fr===0,popupClassName:Cr},zr)},maxCount:hr!=="horizontal"||pn?fe.Z.INVALIDATE:fe.Z.RESPONSIVE,ssr:"full","data-menu-list":!0,onVisibleChange:function(Ar){Ii(Ar)},onKeyDown:ds},_n));return g.createElement(he.Provider,{value:fs},g.createElement(z.Provider,{value:bn},g.createElement(A,{prefixCls:ut,rootClassName:Ct,mode:hr,openKeys:jn,rtl:Pn,disabled:rn,motion:Jn?Kn:null,defaultMotions:Jn?Nn:null,activeKey:ii,onActive:ti,onInactive:ai,selectedKeys:gi,inlineIndent:Vn,subMenuOpenDelay:wn,subMenuCloseDelay:on,forceSubMenuRender:Pt,builtinPlacements:er,triggerSubMenuAction:lr,getPopupContainer:wr,itemIcon:ir,expandIcon:mr,onItemClick:us,onOpenChange:Wi},g.createElement(ze.Provider,{value:_r},Yi),g.createElement("div",{style:{display:"none"},"aria-hidden":!0},g.createElement(j.Provider,{value:Kr},Hn)))))}),at=He,Ne=at;Ne.Item=xt,Ne.SubMenu=K,Ne.ItemGroup=rt,Ne.Divider=Qe;var ke=Ne},11780:function(Ht,lt,u){"use strict";u.d(lt,{Z:function(){return Ee}});var v=u(96663),O=u(44127),H=u(72071),se=u(6620),R=u(59301),B=u(92310),ee=u.n(B),ce=u(29301),fe=u(34280),M=["prefixCls","invalidate","item","renderItem","responsive","responsiveDisabled","registerSize","itemKey","className","style","children","display","order","component"],Ze=void 0;function P(ne,Oe){var xe=ne.prefixCls,te=ne.invalidate,Fe=ne.item,Ae=ne.renderItem,le=ne.responsive,$e=ne.responsiveDisabled,nt=ne.registerSize,St=ne.itemKey,Rt=ne.className,Et=ne.style,vt=ne.children,It=ne.display,gt=ne.order,qe=ne.component,yt=qe===void 0?"div":qe,V=(0,se.Z)(ne,M),Z=le&&!It;function L(C){nt(St,C)}R.useEffect(function(){return function(){L(null)}},[]);var U=Ae&&Fe!==Ze?Ae(Fe,{index:gt}):vt,J;te||(J={opacity:Z?0:1,height:Z?0:Ze,overflowY:Z?"hidden":Ze,order:le?gt:Ze,pointerEvents:Z?"none":Ze,position:Z?"absolute":Ze});var Se={};Z&&(Se["aria-hidden"]=!0);var x=R.createElement(yt,(0,v.Z)({className:ee()(!te&&xe,Rt),style:(0,O.Z)((0,O.Z)({},J),Et)},Se,V,{ref:Oe}),U);return le&&(x=R.createElement(ce.Z,{onResize:function(Q){var I=Q.offsetWidth;L(I)},disabled:$e},x)),x}var g=R.forwardRef(P);g.displayName="Item";var X=g,z=u(6089),Ce=u(4676),st=u(16089);function Re(ne){if(typeof MessageChannel=="undefined")(0,st.Z)(ne);else{var Oe=new MessageChannel;Oe.port1.onmessage=function(){return ne()},Oe.port2.postMessage(void 0)}}function de(){var ne=R.useRef(null),Oe=function(te){ne.current||(ne.current=[],Re(function(){(0,Ce.unstable_batchedUpdates)(function(){ne.current.forEach(function(Fe){Fe()}),ne.current=null})})),ne.current.push(te)};return Oe}function ae(ne,Oe){var xe=R.useState(Oe),te=(0,H.Z)(xe,2),Fe=te[0],Ae=te[1],le=(0,z.Z)(function($e){ne(function(){Ae($e)})});return[Fe,le]}var ue=R.createContext(null),A=["component"],w=["className"],j=["className"],N=function(Oe,xe){var te=R.useContext(ue);if(!te){var Fe=Oe.component,Ae=Fe===void 0?"div":Fe,le=(0,se.Z)(Oe,A);return R.createElement(Ae,(0,v.Z)({},le,{ref:xe}))}var $e=te.className,nt=(0,se.Z)(te,w),St=Oe.className,Rt=(0,se.Z)(Oe,j);return R.createElement(ue.Provider,{value:null},R.createElement(X,(0,v.Z)({ref:xe,className:ee()($e,St)},nt,Rt)))},De=R.forwardRef(N);De.displayName="RawItem";var Te=De,ze=["prefixCls","data","renderItem","renderRawItem","itemKey","itemWidth","ssr","style","className","maxCount","renderRest","renderRawRest","suffix","component","itemComponent","onVisibleChange"],Me="responsive",he="invalidate";function _(ne){return"+ ".concat(ne.length," ...")}function me(ne,Oe){var xe=ne.prefixCls,te=xe===void 0?"rc-overflow":xe,Fe=ne.data,Ae=Fe===void 0?[]:Fe,le=ne.renderItem,$e=ne.renderRawItem,nt=ne.itemKey,St=ne.itemWidth,Rt=St===void 0?10:St,Et=ne.ssr,vt=ne.style,It=ne.className,gt=ne.maxCount,qe=ne.renderRest,yt=ne.renderRawRest,V=ne.suffix,Z=ne.component,L=Z===void 0?"div":Z,U=ne.itemComponent,J=ne.onVisibleChange,Se=(0,se.Z)(ne,ze),x=Et==="full",C=de(),Q=ae(C,null),I=(0,H.Z)(Q,2),F=I[0],pe=I[1],je=F||0,Be=ae(C,new Map),it=(0,H.Z)(Be,2),_e=it[0],Ye=it[1],re=ae(C,0),Pe=(0,H.Z)(re,2),et=Pe[0],oe=Pe[1],dt=ae(C,0),pt=(0,H.Z)(dt,2),ft=pt[0],ot=pt[1],_t=ae(C,0),jt=(0,H.Z)(_t,2),Zt=jt[0],Yt=jt[1],Mt=(0,R.useState)(null),$t=(0,H.Z)(Mt,2),xt=$t[0],Ft=$t[1],qt=(0,R.useState)(null),Bt=(0,H.Z)(qt,2),Kt=Bt[0],hn=Bt[1],en=R.useMemo(function(){return Kt===null&&x?Number.MAX_SAFE_INTEGER:Kt||0},[Kt,F]),xn=(0,R.useState)(!1),an=(0,H.Z)(xn,2),mn=an[0],Ot=an[1],Xe="".concat(te,"-item"),l=Math.max(et,ft),h=gt===Me,f=Ae.length&&h,d=gt===he,p=f||typeof gt=="number"&&Ae.length>gt,b=(0,R.useMemo)(function(){var ke=Ae;return f?F===null&&x?ke=Ae:ke=Ae.slice(0,Math.min(Ae.length,je/Rt)):typeof gt=="number"&&(ke=Ae.slice(0,gt)),ke},[Ae,Rt,F,gt,f]),E=(0,R.useMemo)(function(){return f?Ae.slice(en+1):Ae.slice(b.length)},[Ae,b,f,en]),q=(0,R.useCallback)(function(ke,Y){var be;return typeof nt=="function"?nt(ke):(be=nt&&(ke==null?void 0:ke[nt]))!==null&&be!==void 0?be:Y},[nt]),K=(0,R.useCallback)(le||function(ke){return ke},[le]);function ye(ke,Y,be){Kt===ke&&(Y===void 0||Y===xt)||(hn(ke),be||(Ot(keje){ye(Ie-1,ke-Ke-Zt+ft);break}}V&&Qe(0)+Zt>je&&Ft(null)}},[je,_e,ft,Zt,q,b]);var tt=mn&&!!E.length,Je={};xt!==null&&f&&(Je={position:"absolute",left:xt,top:0});var $={prefixCls:Xe,responsive:f,component:U,invalidate:d},ge=$e?function(ke,Y){var be=q(ke,Y);return R.createElement(ue.Provider,{key:be,value:(0,O.Z)((0,O.Z)({},$),{},{order:Y,item:ke,itemKey:be,registerSize:Ge,display:Y<=en})},$e(ke,Y))}:function(ke,Y){var be=q(ke,Y);return R.createElement(X,(0,v.Z)({},$,{order:Y,key:be,item:ke,renderItem:K,itemKey:be,registerSize:Ge,display:Y<=en}))},we={order:tt?en:Number.MAX_SAFE_INTEGER,className:"".concat(Xe,"-rest"),registerSize:Le,display:tt},He=qe||_,at=yt?R.createElement(ue.Provider,{value:(0,O.Z)((0,O.Z)({},$),we)},yt(E)):R.createElement(X,(0,v.Z)({},$,we),typeof He=="function"?He(E):He),Ne=R.createElement(L,(0,v.Z)({className:ee()(!d&&te,It),style:vt,ref:Oe},Se),b.map(ge),p?at:null,V&&R.createElement(X,(0,v.Z)({},$,{responsive:h,responsiveDisabled:!f,order:en,className:"".concat(Xe,"-suffix"),registerSize:rt,display:!0,style:Je}),V));return h?R.createElement(ce.Z,{onResize:Ue,disabled:!f},Ne):Ne}var T=R.forwardRef(me);T.displayName="Overflow",T.Item=Te,T.RESPONSIVE=Me,T.INVALIDATE=he;var ve=T,Ee=ve},29301:function(Ht,lt,u){"use strict";u.d(lt,{Z:function(){return he}});var v=u(96663),O=u(59301),H=u(11592),se=u(48736),R=u(44127),B=u(20135),ee=u(76846),ce=u(8654),fe=O.createContext(null);function M(_){var me=_.children,T=_.onBatchResize,ve=O.useRef(0),Ee=O.useRef([]),ne=O.useContext(fe),Oe=O.useCallback(function(xe,te,Fe){ve.current+=1;var Ae=ve.current;Ee.current.push({size:xe,element:te,data:Fe}),Promise.resolve().then(function(){Ae===ve.current&&(T==null||T(Ee.current),Ee.current=[])}),ne==null||ne(xe,te,Fe)},[T,ne]);return O.createElement(fe.Provider,{value:Oe},me)}var Ze=u(76374),P=new Map;function g(_){_.forEach(function(me){var T,ve=me.target;(T=P.get(ve))===null||T===void 0||T.forEach(function(Ee){return Ee(ve)})})}var X=new Ze.Z(g),z=null,Ce=null;function st(_,me){P.has(_)||(P.set(_,new Set),X.observe(_)),P.get(_).add(me)}function Re(_,me){P.has(_)&&(P.get(_).delete(me),P.get(_).size||(X.unobserve(_),P.delete(_)))}var de=u(52884),ae=u(95727),ue=u(65711),A=u(85745),w=function(_){(0,ue.Z)(T,_);var me=(0,A.Z)(T);function T(){return(0,de.Z)(this,T),me.apply(this,arguments)}return(0,ae.Z)(T,[{key:"render",value:function(){return this.props.children}}]),T}(O.Component);function j(_,me){var T=_.children,ve=_.disabled,Ee=O.useRef(null),ne=O.useRef(null),Oe=O.useContext(fe),xe=typeof T=="function",te=xe?T(Ee):T,Fe=O.useRef({width:-1,height:-1,offsetWidth:-1,offsetHeight:-1}),Ae=!xe&&O.isValidElement(te)&&(0,ce.Yr)(te),le=Ae?(0,ce.C4)(te):null,$e=(0,ce.x1)(le,Ee),nt=function(){var vt;return(0,ee.ZP)(Ee.current)||(Ee.current&&(0,B.Z)(Ee.current)==="object"?(0,ee.ZP)((vt=Ee.current)===null||vt===void 0?void 0:vt.nativeElement):null)||(0,ee.ZP)(ne.current)};O.useImperativeHandle(me,function(){return nt()});var St=O.useRef(_);St.current=_;var Rt=O.useCallback(function(Et){var vt=St.current,It=vt.onResize,gt=vt.data,qe=Et.getBoundingClientRect(),yt=qe.width,V=qe.height,Z=Et.offsetWidth,L=Et.offsetHeight,U=Math.floor(yt),J=Math.floor(V);if(Fe.current.width!==U||Fe.current.height!==J||Fe.current.offsetWidth!==Z||Fe.current.offsetHeight!==L){var Se={width:U,height:J,offsetWidth:Z,offsetHeight:L};Fe.current=Se;var x=Z===Math.round(yt)?yt:Z,C=L===Math.round(V)?V:L,Q=(0,R.Z)((0,R.Z)({},Se),{},{offsetWidth:x,offsetHeight:C});Oe==null||Oe(Q,Et,gt),It&&Promise.resolve().then(function(){It(Q,Et)})}},[]);return O.useEffect(function(){var Et=nt();return Et&&!ve&&st(Et,Rt),function(){return Re(Et,Rt)}},[Ee.current,ve]),O.createElement(w,{ref:ne},Ae?O.cloneElement(te,{ref:$e}):te)}var N=O.forwardRef(j),De=N,Te="rc-observer-key";function ze(_,me){var T=_.children,ve=typeof T=="function"?[T]:(0,H.Z)(T);return ve.map(function(Ee,ne){var Oe=(Ee==null?void 0:Ee.key)||"".concat(Te,"-").concat(ne);return O.createElement(De,(0,v.Z)({},_,{key:Oe,ref:ne===0?me:void 0}),Ee)})}var Me=O.forwardRef(ze);Me.Collection=M;var he=Me},17115:function(Ht,lt,u){"use strict";u.d(lt,{ZP:function(){return ee}});var v=u(72071),O=u(59301),H=u(47273),se=0,R=(0,H.Z)();function B(){var ce;return R?(ce=se,se+=1):ce="TEST_OR_SSR",ce}function ee(ce){var fe=O.useState(),M=(0,v.Z)(fe,2),Ze=M[0],P=M[1];return O.useEffect(function(){P("rc_select_".concat(B()))},[]),ce||Ze}},77861:function(Ht,lt,u){"use strict";u.d(lt,{Ac:function(){return pe},Xo:function(){return ot},Wx:function(){return jt},ZP:function(){return p},lk:function(){return ue}});var v=u(96663),O=u(19127),H=u(90493),se=u(44127),R=u(72071),B=u(6620),ee=u(20135),ce=u(18929),fe=u(48736),M=u(59301),Ze=u(92310),P=u.n(Ze),g=u(34280),X=u(49658),z=u(10228),Ce=u(8654),st=function(E){var q=E.className,K=E.customizeIcon,ye=E.customizeIconProps,Ue=E.onMouseDown,Ge=E.onClick,Le=E.children,rt;return typeof K=="function"?rt=K(ye):rt=K,M.createElement("span",{className:q,onMouseDown:function(tt){tt.preventDefault(),Ue&&Ue(tt)},style:{userSelect:"none",WebkitUserSelect:"none"},unselectable:"on",onClick:Ge,"aria-hidden":!0},rt!==void 0?rt:M.createElement("span",{className:P()(q.split(/\s+/).map(function(Qe){return"".concat(Qe,"-icon")}))},Le))},Re=st;function de(b,E,q,K,ye){var Ue=arguments.length>5&&arguments[5]!==void 0?arguments[5]:!1,Ge=arguments.length>6?arguments[6]:void 0,Le=arguments.length>7?arguments[7]:void 0,rt=M.useMemo(function(){if((0,ee.Z)(K)==="object")return K.clearIcon;if(ye)return ye},[K,ye]),Qe=M.useMemo(function(){return!!(!Ue&&K&&(q.length||Ge)&&!(Le==="combobox"&&Ge===""))},[K,Ue,q.length,Ge,Le]);return{allowClear:Qe,clearIcon:M.createElement(Re,{className:"".concat(b,"-clear"),onMouseDown:E,customizeIcon:rt},"\xD7")}}var ae=M.createContext(null);function ue(){return M.useContext(ae)}function A(){var b=arguments.length>0&&arguments[0]!==void 0?arguments[0]:10,E=M.useState(!1),q=(0,R.Z)(E,2),K=q[0],ye=q[1],Ue=M.useRef(null),Ge=function(){window.clearTimeout(Ue.current)};M.useEffect(function(){return Ge},[]);var Le=function(Qe,tt){Ge(),Ue.current=window.setTimeout(function(){ye(Qe),tt&&tt()},b)};return[K,Le,Ge]}function w(){var b=arguments.length>0&&arguments[0]!==void 0?arguments[0]:250,E=M.useRef(null),q=M.useRef(null);M.useEffect(function(){return function(){window.clearTimeout(q.current)}},[]);function K(ye){(ye||E.current===null)&&(E.current=ye),window.clearTimeout(q.current),q.current=window.setTimeout(function(){E.current=null},b)}return[function(){return E.current},K]}function j(b,E,q,K){var ye=M.useRef(null);ye.current={open:E,triggerOpen:q,customizedTrigger:K},M.useEffect(function(){function Ue(Ge){var Le;if(!((Le=ye.current)!==null&&Le!==void 0&&Le.customizedTrigger)){var rt=Ge.target;rt.shadowRoot&&Ge.composed&&(rt=Ge.composedPath()[0]||rt),ye.current.open&&b().filter(function(Qe){return Qe}).every(function(Qe){return!Qe.contains(rt)&&Qe!==rt})&&ye.current.triggerOpen(!1)}}return window.addEventListener("mousedown",Ue),function(){return window.removeEventListener("mousedown",Ue)}},[])}var N=u(26112),De=u(11780),Te=function(E,q){var K,ye,Ue=E.prefixCls,Ge=E.id,Le=E.inputElement,rt=E.disabled,Qe=E.tabIndex,tt=E.autoFocus,Je=E.autoComplete,$=E.editable,ge=E.activeDescendantId,we=E.value,He=E.maxLength,at=E.onKeyDown,Ne=E.onMouseDown,ke=E.onChange,Y=E.onPaste,be=E.onCompositionStart,Ie=E.onCompositionEnd,Ke=E.open,Ve=E.attrs,ct=Le||M.createElement("input",null),ut=ct,Ct=ut.ref,Lt=ut.props,Dt=Lt.onKeyDown,Nt=Lt.onChange,Vt=Lt.onMouseDown,tn=Lt.onCompositionStart,Ut=Lt.onCompositionEnd,bt=Lt.style;return(0,fe.Kp)(!("maxLength"in ct.props),"Passing 'maxLength' to input element directly may not work because input in BaseSelect is controlled."),ct=M.cloneElement(ct,(0,se.Z)((0,se.Z)((0,se.Z)({type:"search"},Lt),{},{id:Ge,ref:(0,Ce.sQ)(q,Ct),disabled:rt,tabIndex:Qe,autoComplete:Je||"off",autoFocus:tt,className:P()("".concat(Ue,"-selection-search-input"),(K=ct)===null||K===void 0||(ye=K.props)===null||ye===void 0?void 0:ye.className),role:"combobox","aria-label":"Search","aria-expanded":Ke||!1,"aria-haspopup":"listbox","aria-owns":"".concat(Ge,"_list"),"aria-autocomplete":"list","aria-controls":"".concat(Ge,"_list"),"aria-activedescendant":Ke?ge:void 0},Ve),{},{value:$?we:"",maxLength:He,readOnly:!$,unselectable:$?null:"on",style:(0,se.Z)((0,se.Z)({},bt),{},{opacity:$?null:0}),onKeyDown:function(Qt){at(Qt),Dt&&Dt(Qt)},onMouseDown:function(Qt){Ne(Qt),Vt&&Vt(Qt)},onChange:function(Qt){ke(Qt),Nt&&Nt(Qt)},onCompositionStart:function(Qt){be(Qt),tn&&tn(Qt)},onCompositionEnd:function(Qt){Ie(Qt),Ut&&Ut(Qt)},onPaste:Y})),ct},ze=M.forwardRef(Te);ze.displayName="Input";var Me=ze;function he(b){return Array.isArray(b)?b:b!==void 0?[b]:[]}var _=typeof window!="undefined"&&window.document&&window.document.documentElement,me=_;function T(b){return b!=null}function ve(b){return!b&&b!==0}function Ee(b){return["string","number"].includes((0,ee.Z)(b))}function ne(b){var E=void 0;return b&&(Ee(b.title)?E=b.title.toString():Ee(b.label)&&(E=b.label.toString())),E}function Oe(b,E){me?M.useLayoutEffect(b,E):M.useEffect(b,E)}function xe(b){var E;return(E=b.key)!==null&&E!==void 0?E:b.value}var te=function(E){E.preventDefault(),E.stopPropagation()},Fe=function(E){var q=E.id,K=E.prefixCls,ye=E.values,Ue=E.open,Ge=E.searchValue,Le=E.autoClearSearchValue,rt=E.inputRef,Qe=E.placeholder,tt=E.disabled,Je=E.mode,$=E.showSearch,ge=E.autoFocus,we=E.autoComplete,He=E.activeDescendantId,at=E.tabIndex,Ne=E.removeIcon,ke=E.maxTagCount,Y=E.maxTagTextLength,be=E.maxTagPlaceholder,Ie=be===void 0?function(Sn){return"+ ".concat(Sn.length," ...")}:be,Ke=E.tagRender,Ve=E.onToggleOpen,ct=E.onRemove,ut=E.onInputChange,Ct=E.onInputPaste,Lt=E.onInputKeyDown,Dt=E.onInputMouseDown,Nt=E.onInputCompositionStart,Vt=E.onInputCompositionEnd,tn=M.useRef(null),Ut=(0,M.useState)(0),bt=(0,R.Z)(Ut,2),ln=bt[0],Qt=bt[1],cn=(0,M.useState)(!1),Gt=(0,R.Z)(cn,2),rn=Gt[0],pn=Gt[1],un="".concat(K,"-selection"),wn=Ue||Je==="multiple"&&Le===!1||Je==="tags"?Ge:"",kn=Je==="tags"||Je==="multiple"&&Le===!1||$&&(Ue||rn);Oe(function(){Qt(tn.current.scrollWidth)},[wn]);function on(Sn,En,dn,An,Wn){return M.createElement("span",{className:P()("".concat(un,"-item"),(0,H.Z)({},"".concat(un,"-item-disabled"),dn)),title:ne(Sn)},M.createElement("span",{className:"".concat(un,"-item-content")},En),An&&M.createElement(Re,{className:"".concat(un,"-item-remove"),onMouseDown:te,onClick:Wn,customizeIcon:Ne},"\xD7"))}function Pt(Sn,En,dn,An,Wn){var sn=function(fn){te(fn),Ve(!Ue)};return M.createElement("span",{onMouseDown:sn},Ke({label:En,value:Sn,disabled:dn,closable:An,onClose:Wn}))}function Tt(Sn){var En=Sn.disabled,dn=Sn.label,An=Sn.value,Wn=!tt&&!En,sn=dn;if(typeof Y=="number"&&(typeof dn=="string"||typeof dn=="number")){var Wt=String(sn);Wt.length>Y&&(sn="".concat(Wt.slice(0,Y),"..."))}var fn=function(Vn){Vn&&Vn.stopPropagation(),ct(Sn)};return typeof Ke=="function"?Pt(An,sn,En,Wn,fn):on(Sn,sn,En,Wn,fn)}function Rn(Sn){var En=typeof Ie=="function"?Ie(Sn):Ie;return on({title:En},En,!1)}var Ln=M.createElement("div",{className:"".concat(un,"-search"),style:{width:ln},onFocus:function(){pn(!0)},onBlur:function(){pn(!1)}},M.createElement(Me,{ref:rt,open:Ue,prefixCls:K,id:q,inputElement:null,disabled:tt,autoFocus:ge,autoComplete:we,editable:kn,activeDescendantId:He,value:wn,onKeyDown:Lt,onMouseDown:Dt,onChange:ut,onPaste:Ct,onCompositionStart:Nt,onCompositionEnd:Vt,tabIndex:at,attrs:(0,N.Z)(E,!0)}),M.createElement("span",{ref:tn,className:"".concat(un,"-search-mirror"),"aria-hidden":!0},wn,"\xA0")),Cn=M.createElement(De.Z,{prefixCls:"".concat(un,"-overflow"),data:ye,renderItem:Tt,renderRest:Rn,suffix:Ln,itemKey:xe,maxCount:ke});return M.createElement(M.Fragment,null,Cn,!ye.length&&!wn&&M.createElement("span",{className:"".concat(un,"-placeholder")},Qe))},Ae=Fe,le=function(E){var q=E.inputElement,K=E.prefixCls,ye=E.id,Ue=E.inputRef,Ge=E.disabled,Le=E.autoFocus,rt=E.autoComplete,Qe=E.activeDescendantId,tt=E.mode,Je=E.open,$=E.values,ge=E.placeholder,we=E.tabIndex,He=E.showSearch,at=E.searchValue,Ne=E.activeValue,ke=E.maxLength,Y=E.onInputKeyDown,be=E.onInputMouseDown,Ie=E.onInputChange,Ke=E.onInputPaste,Ve=E.onInputCompositionStart,ct=E.onInputCompositionEnd,ut=E.title,Ct=M.useState(!1),Lt=(0,R.Z)(Ct,2),Dt=Lt[0],Nt=Lt[1],Vt=tt==="combobox",tn=Vt||He,Ut=$[0],bt=at||"";Vt&&Ne&&!Dt&&(bt=Ne),M.useEffect(function(){Vt&&Nt(!1)},[Vt,Ne]);var ln=tt!=="combobox"&&!Je&&!He?!1:!!bt,Qt=ut===void 0?ne(Ut):ut,cn=function(){if(Ut)return null;var rn=ln?{visibility:"hidden"}:void 0;return M.createElement("span",{className:"".concat(K,"-selection-placeholder"),style:rn},ge)};return M.createElement(M.Fragment,null,M.createElement("span",{className:"".concat(K,"-selection-search")},M.createElement(Me,{ref:Ue,prefixCls:K,id:ye,open:Je,inputElement:q,disabled:Ge,autoFocus:Le,autoComplete:rt,editable:tn,activeDescendantId:Qe,value:bt,onKeyDown:Y,onMouseDown:be,onChange:function(rn){Nt(!0),Ie(rn)},onPaste:Ke,onCompositionStart:Ve,onCompositionEnd:ct,tabIndex:we,attrs:(0,N.Z)(E,!0),maxLength:Vt?ke:void 0})),!Vt&&Ut?M.createElement("span",{className:"".concat(K,"-selection-item"),title:Qt,style:ln?{visibility:"hidden"}:void 0},Ut.label):null,cn())},$e=le;function nt(b){return![z.Z.ESC,z.Z.SHIFT,z.Z.BACKSPACE,z.Z.TAB,z.Z.WIN_KEY,z.Z.ALT,z.Z.META,z.Z.WIN_KEY_RIGHT,z.Z.CTRL,z.Z.SEMICOLON,z.Z.EQUALS,z.Z.CAPS_LOCK,z.Z.CONTEXT_MENU,z.Z.F1,z.Z.F2,z.Z.F3,z.Z.F4,z.Z.F5,z.Z.F6,z.Z.F7,z.Z.F8,z.Z.F9,z.Z.F10,z.Z.F11,z.Z.F12].includes(b)}var St=function(E,q){var K=(0,M.useRef)(null),ye=(0,M.useRef)(!1),Ue=E.prefixCls,Ge=E.open,Le=E.mode,rt=E.showSearch,Qe=E.tokenWithEnter,tt=E.autoClearSearchValue,Je=E.onSearch,$=E.onSearchSubmit,ge=E.onToggleOpen,we=E.onInputKeyDown,He=E.domRef;M.useImperativeHandle(q,function(){return{focus:function(){K.current.focus()},blur:function(){K.current.blur()}}});var at=w(0),Ne=(0,R.Z)(at,2),ke=Ne[0],Y=Ne[1],be=function(bt){var ln=bt.which;(ln===z.Z.UP||ln===z.Z.DOWN)&&bt.preventDefault(),we&&we(bt),ln===z.Z.ENTER&&Le==="tags"&&!ye.current&&!Ge&&($==null||$(bt.target.value)),nt(ln)&&ge(!0)},Ie=function(){Y(!0)},Ke=(0,M.useRef)(null),Ve=function(bt){Je(bt,!0,ye.current)!==!1&&ge(!0)},ct=function(){ye.current=!0},ut=function(bt){ye.current=!1,Le!=="combobox"&&Ve(bt.target.value)},Ct=function(bt){var ln=bt.target.value;if(Qe&&Ke.current&&/[\r\n]/.test(Ke.current)){var Qt=Ke.current.replace(/[\r\n]+$/,"").replace(/\r\n/g," ").replace(/[\r\n]/g," ");ln=ln.replace(Qt,Ke.current)}Ke.current=null,Ve(ln)},Lt=function(bt){var ln=bt.clipboardData,Qt=ln.getData("text");Ke.current=Qt},Dt=function(bt){var ln=bt.target;if(ln!==K.current){var Qt=document.body.style.msTouchAction!==void 0;Qt?setTimeout(function(){K.current.focus()}):K.current.focus()}},Nt=function(bt){var ln=ke();bt.target!==K.current&&!ln&&Le!=="combobox"&&bt.preventDefault(),(Le!=="combobox"&&(!rt||!ln)||!Ge)&&(Ge&&tt!==!1&&Je("",!0,!1),ge())},Vt={inputRef:K,onInputKeyDown:be,onInputMouseDown:Ie,onInputChange:Ct,onInputPaste:Lt,onInputCompositionStart:ct,onInputCompositionEnd:ut},tn=Le==="multiple"||Le==="tags"?M.createElement(Ae,(0,v.Z)({},E,Vt)):M.createElement($e,(0,v.Z)({},E,Vt));return M.createElement("div",{ref:He,className:"".concat(Ue,"-selector"),onClick:Dt,onMouseDown:Nt},tn)},Rt=M.forwardRef(St);Rt.displayName="Selector";var Et=Rt,vt=u(35593),It=["prefixCls","disabled","visible","children","popupElement","animation","transitionName","dropdownStyle","dropdownClassName","direction","placement","builtinPlacements","dropdownMatchSelectWidth","dropdownRender","dropdownAlign","getPopupContainer","empty","getTriggerDOMNode","onPopupVisibleChange","onPopupMouseEnter"],gt=function(E){var q=E===!0?0:1;return{bottomLeft:{points:["tl","bl"],offset:[0,4],overflow:{adjustX:q,adjustY:1},htmlRegion:"scroll"},bottomRight:{points:["tr","br"],offset:[0,4],overflow:{adjustX:q,adjustY:1},htmlRegion:"scroll"},topLeft:{points:["bl","tl"],offset:[0,-4],overflow:{adjustX:q,adjustY:1},htmlRegion:"scroll"},topRight:{points:["br","tr"],offset:[0,-4],overflow:{adjustX:q,adjustY:1},htmlRegion:"scroll"}}},qe=function(E,q){var K=E.prefixCls,ye=E.disabled,Ue=E.visible,Ge=E.children,Le=E.popupElement,rt=E.animation,Qe=E.transitionName,tt=E.dropdownStyle,Je=E.dropdownClassName,$=E.direction,ge=$===void 0?"ltr":$,we=E.placement,He=E.builtinPlacements,at=E.dropdownMatchSelectWidth,Ne=E.dropdownRender,ke=E.dropdownAlign,Y=E.getPopupContainer,be=E.empty,Ie=E.getTriggerDOMNode,Ke=E.onPopupVisibleChange,Ve=E.onPopupMouseEnter,ct=(0,B.Z)(E,It),ut="".concat(K,"-dropdown"),Ct=Le;Ne&&(Ct=Ne(Le));var Lt=M.useMemo(function(){return He||gt(at)},[He,at]),Dt=rt?"".concat(ut,"-").concat(rt):Qe,Nt=typeof at=="number",Vt=M.useMemo(function(){return Nt?null:at===!1?"minWidth":"width"},[at,Nt]),tn=tt;Nt&&(tn=(0,se.Z)((0,se.Z)({},tn),{},{width:at}));var Ut=M.useRef(null);return M.useImperativeHandle(q,function(){return{getPopupElement:function(){return Ut.current}}}),M.createElement(vt.Z,(0,v.Z)({},ct,{showAction:Ke?["click"]:[],hideAction:Ke?["click"]:[],popupPlacement:we||(ge==="rtl"?"bottomRight":"bottomLeft"),builtinPlacements:Lt,prefixCls:ut,popupTransitionName:Dt,popup:M.createElement("div",{ref:Ut,onMouseEnter:Ve},Ct),stretch:Vt,popupAlign:ke,popupVisible:Ue,getPopupContainer:Y,popupClassName:P()(Je,(0,H.Z)({},"".concat(ut,"-empty"),be)),popupStyle:tn,getTriggerDOMNode:Ie,onPopupVisibleChange:Ke}),Ge)},yt=M.forwardRef(qe);yt.displayName="SelectTrigger";var V=yt,Z=u(4537);function L(b,E){var q=b.key,K;return"value"in b&&(K=b.value),q!=null?q:K!==void 0?K:"rc-index-key-".concat(E)}function U(b,E){var q=b||{},K=q.label,ye=q.value,Ue=q.options,Ge=q.groupLabel,Le=K||(E?"children":"label");return{label:Le,value:ye||"value",options:Ue||"options",groupLabel:Ge||Le}}function J(b){var E=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},q=E.fieldNames,K=E.childrenAsData,ye=[],Ue=U(q,!1),Ge=Ue.label,Le=Ue.value,rt=Ue.options,Qe=Ue.groupLabel;function tt(Je,$){Je.forEach(function(ge){if($||!(rt in ge)){var we=ge[Le];ye.push({key:L(ge,ye.length),groupOption:$,data:ge,label:ge[Ge],value:we})}else{var He=ge[Qe];He===void 0&&K&&(He=ge.label),ye.push({key:L(ge,ye.length),group:!0,data:ge,label:He}),tt(ge[rt],!0)}})}return tt(b,!1),ye}function Se(b){var E=(0,se.Z)({},b);return"props"in E||Object.defineProperty(E,"props",{get:function(){return(0,fe.ZP)(!1,"Return type is option instead of Option instance. Please read value directly instead of reading from `props`."),E}}),E}function x(b,E){if(!E||!E.length)return null;var q=!1;function K(Ue,Ge){var Le=(0,Z.Z)(Ge),rt=Le[0],Qe=Le.slice(1);if(!rt)return[Ue];var tt=Ue.split(rt);return q=q||tt.length>1,tt.reduce(function(Je,$){return[].concat((0,O.Z)(Je),(0,O.Z)(K($,Qe)))},[]).filter(function(Je){return Je})}var ye=K(b,E);return q?ye:null}var C=["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"],Q=["value","onChange","removeIcon","placeholder","autoFocus","maxTagCount","maxTagTextLength","maxTagPlaceholder","choiceTransitionName","onInputKeyDown","onPopupScroll","tabIndex"];function I(b){return b==="tags"||b==="multiple"}var F=M.forwardRef(function(b,E){var q,K,ye=b.id,Ue=b.prefixCls,Ge=b.className,Le=b.showSearch,rt=b.tagRender,Qe=b.direction,tt=b.omitDomProps,Je=b.displayValues,$=b.onDisplayValuesChange,ge=b.emptyOptions,we=b.notFoundContent,He=we===void 0?"Not Found":we,at=b.onClear,Ne=b.mode,ke=b.disabled,Y=b.loading,be=b.getInputElement,Ie=b.getRawInputElement,Ke=b.open,Ve=b.defaultOpen,ct=b.onDropdownVisibleChange,ut=b.activeValue,Ct=b.onActiveValueChange,Lt=b.activeDescendantId,Dt=b.searchValue,Nt=b.autoClearSearchValue,Vt=b.onSearch,tn=b.onSearchSplit,Ut=b.tokenSeparators,bt=b.allowClear,ln=b.suffixIcon,Qt=b.clearIcon,cn=b.OptionList,Gt=b.animation,rn=b.transitionName,pn=b.dropdownStyle,un=b.dropdownClassName,wn=b.dropdownMatchSelectWidth,kn=b.dropdownRender,on=b.dropdownAlign,Pt=b.placement,Tt=b.builtinPlacements,Rn=b.getPopupContainer,Ln=b.showAction,Cn=Ln===void 0?[]:Ln,Sn=b.onFocus,En=b.onBlur,dn=b.onKeyUp,An=b.onKeyDown,Wn=b.onMouseDown,sn=(0,B.Z)(b,C),Wt=I(Ne),fn=(Le!==void 0?Le:Wt)||Ne==="combobox",On=(0,se.Z)({},sn);Q.forEach(function(or){delete On[or]}),tt==null||tt.forEach(function(or){delete On[or]});var Vn=M.useState(!1),Kn=(0,R.Z)(Vn,2),Nn=Kn[0],zn=Kn[1];M.useEffect(function(){zn((0,X.Z)())},[]);var lr=M.useRef(null),er=M.useRef(null),ir=M.useRef(null),mr=M.useRef(null),$n=M.useRef(null),cr=A(),Cr=(0,R.Z)(cr,3),wr=Cr[0],Tr=Cr[1],Lr=Cr[2];M.useImperativeHandle(E,function(){var or,Gn;return{focus:(or=mr.current)===null||or===void 0?void 0:or.focus,blur:(Gn=mr.current)===null||Gn===void 0?void 0:Gn.blur,scrollTo:function(Kr){var _r;return(_r=$n.current)===null||_r===void 0?void 0:_r.scrollTo(Kr)}}});var dr=M.useMemo(function(){var or;if(Ne!=="combobox")return Dt;var Gn=(or=Je[0])===null||or===void 0?void 0:or.value;return typeof Gn=="string"||typeof Gn=="number"?String(Gn):""},[Dt,Ne,Je]),kr=Ne==="combobox"&&typeof be=="function"&&be()||null,Or=typeof Ie=="function"&&Ie(),jr=(0,Ce.x1)(er,Or==null||(q=Or.props)===null||q===void 0?void 0:q.ref),Wr=M.useState(!1),_n=(0,R.Z)(Wr,2),Hn=_n[0],sr=_n[1];(0,g.Z)(function(){sr(!0)},[]);var Zn=(0,ce.Z)(!1,{defaultValue:Ve,value:Ke}),Jn=(0,R.Z)(Zn,2),pr=Jn[0],Pr=Jn[1],bn=Hn?pr:!1,Pn=!He&≥(ke||Pn&&bn&&Ne==="combobox")&&(bn=!1);var Tn=Pn?!1:bn,Fn=M.useCallback(function(or){var Gn=or!==void 0?or:!bn;ke||(Pr(Gn),bn!==Gn&&(ct==null||ct(Gn)))},[ke,bn,Pr,ct]),jn=M.useMemo(function(){return(Ut||[]).some(function(or){return[` `,`\r `].includes(or)})},[Ut]),Yn=function(Gn,Hr,Kr){var _r=!0,Xr=Gn;Ct==null||Ct(null);var gr=Kr?null:x(Gn,Ut);return Ne!=="combobox"&&gr&&(Xr="",tn==null||tn(gr),Fn(!1),_r=!1),Vt&&dr!==Xr&&Vt(Xr,{source:Hr?"typing":"effect"}),_r},br=function(Gn){!Gn||!Gn.trim()||Vt(Gn,{source:"submit"})};M.useEffect(function(){!bn&&!Wt&&Ne!=="combobox"&&Yn("",!1,!1)},[bn]),M.useEffect(function(){pr&&ke&&Pr(!1),ke&&Tr(!1)},[ke]);var fr=w(),vr=(0,R.Z)(fr,2),Sr=vr[0],ar=vr[1],Xn=function(Gn){var Hr=Sr(),Kr=Gn.which;if(Kr===z.Z.ENTER&&(Ne!=="combobox"&&Gn.preventDefault(),bn||Fn(!0)),ar(!!dr),Kr===z.Z.BACKSPACE&&!Hr&&Wt&&!dr&&Je.length){for(var _r=(0,O.Z)(Je),Xr=null,gr=_r.length-1;gr>=0;gr-=1){var ii=_r[gr];if(!ii.disabled){_r.splice(gr,1),Xr=ii;break}}Xr&&$(_r,{type:"remove",values:[Xr]})}for(var Qr=arguments.length,ti=new Array(Qr>1?Qr-1:0),ai=1;ai1?Hr-1:0),_r=1;_r1?gr-1:0),Qr=1;Qr1&&arguments[1]!==void 0?arguments[1]:!1;return(0,Ye.Z)(b).map(function(q,K){if(!M.isValidElement(q)||!q.type)return null;var ye=q,Ue=ye.type.isSelectOptGroup,Ge=ye.key,Le=ye.props,rt=Le.children,Qe=(0,B.Z)(Le,Pe);return E||!Ue?et(q):(0,se.Z)((0,se.Z)({key:"__RC_SELECT_GRP__".concat(Ge===null?K:Ge,"__"),label:Ge},Qe),{},{options:oe(rt)})}).filter(function(q){return q})}function dt(b,E,q,K,ye){return M.useMemo(function(){var Ue=b,Ge=!b;Ge&&(Ue=oe(E));var Le=new Map,rt=new Map,Qe=function($,ge,we){we&&typeof we=="string"&&$.set(ge[we],ge)};function tt(Je){for(var $=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,ge=0;ge1&&arguments[1]!==void 0?arguments[1]:1,Rn=Ct.length,Ln=0;Ln1&&arguments[1]!==void 0?arguments[1]:!1;ln(Pt);var Rn={source:Tt?"keyboard":"mouse"},Ln=Ct[Pt];if(!Ln){He(null,-1,Rn);return}He(Ln.value,Pt,Rn)};(0,M.useEffect)(function(){Qt(at!==!1?Vt(0):-1)},[Ct.length,Qe]);var cn=M.useCallback(function(on){return Y.has(on)&&rt!=="combobox"},[rt,(0,O.Z)(Y).toString(),Y.size]);(0,M.useEffect)(function(){var on=setTimeout(function(){if(!Le&&Ge&&Y.size===1){var Tt=Array.from(Y)[0],Rn=Ct.findIndex(function(Ln){var Cn=Ln.data;return Cn.value===Tt});Rn!==-1&&(Qt(Rn),Nt(Rn))}});if(Ge){var Pt;(Pt=Lt.current)===null||Pt===void 0||Pt.scrollTo(void 0)}return function(){return clearTimeout(on)}},[Ge,Qe,we.length]);var Gt=function(Pt){Pt!==void 0&&Ne(Pt,{selected:!Y.has(Pt)}),Le||tt(!1)};if(M.useImperativeHandle(q,function(){return{onKeyDown:function(Pt){var Tt=Pt.which,Rn=Pt.ctrlKey;switch(Tt){case z.Z.N:case z.Z.P:case z.Z.UP:case z.Z.DOWN:{var Ln=0;if(Tt===z.Z.UP?Ln=-1:Tt===z.Z.DOWN?Ln=1:Ft()&&Rn&&(Tt===z.Z.N?Ln=1:Tt===z.Z.P&&(Ln=-1)),Ln!==0){var Cn=Vt(bt+Ln,Ln);Nt(Cn),Qt(Cn,!0)}break}case z.Z.ENTER:{var Sn=Ct[bt];Sn&&!Sn.data.disabled?Gt(Sn.value):Gt(void 0),Ge&&Pt.preventDefault();break}case z.Z.ESC:tt(!1),Ge&&Pt.stopPropagation()}},onKeyUp:function(){},scrollTo:function(Pt){Nt(Pt)}}}),Ct.length===0)return M.createElement("div",{role:"listbox",id:"".concat(Ue,"_list"),className:"".concat(ut,"-empty"),onMouseDown:Dt},Je);var rn=Object.keys(be).map(function(on){return be[on]}),pn=function(Pt){return Pt.label};function un(on,Pt){var Tt=on.group;return{role:Tt?"presentation":"option",id:"".concat(Ue,"_list_").concat(Pt)}}var wn=function(Pt){var Tt=Ct[Pt];if(!Tt)return null;var Rn=Tt.data||{},Ln=Rn.value,Cn=Tt.group,Sn=(0,N.Z)(Rn,!0),En=pn(Tt);return Tt?M.createElement("div",(0,v.Z)({"aria-label":typeof En=="string"&&!Cn?En:null},Sn,{key:Pt},un(Tt,Pt),{"aria-selected":cn(Ln)}),Ln):null},kn={role:"listbox",id:"".concat(Ue,"_list")};return M.createElement(M.Fragment,null,Ie&&M.createElement("div",(0,v.Z)({},kn,{style:{height:0,width:0,overflow:"hidden"}}),wn(bt-1),wn(bt),wn(bt+1)),M.createElement(Mt.Z,{itemKey:"key",ref:Lt,data:Ct,height:Ve,itemHeight:ct,fullHeight:!1,onMouseDown:Dt,onScroll:$,virtual:Ie,direction:Ke,innerProps:Ie?null:kn},function(on,Pt){var Tt,Rn=on.group,Ln=on.groupOption,Cn=on.data,Sn=on.label,En=on.value,dn=Cn.key;if(Rn){var An,Wn=(An=Cn.title)!==null&&An!==void 0?An:Bt(Sn)?Sn.toString():void 0;return M.createElement("div",{className:P()(ut,"".concat(ut,"-group")),title:Wn},Sn!==void 0?Sn:dn)}var sn=Cn.disabled,Wt=Cn.title,fn=Cn.children,On=Cn.style,Vn=Cn.className,Kn=(0,B.Z)(Cn,qt),Nn=(0,Yt.Z)(Kn,rn),zn=cn(En),lr="".concat(ut,"-option"),er=P()(ut,lr,Vn,(Tt={},(0,H.Z)(Tt,"".concat(lr,"-grouped"),Ln),(0,H.Z)(Tt,"".concat(lr,"-active"),bt===Pt&&!sn),(0,H.Z)(Tt,"".concat(lr,"-disabled"),sn),(0,H.Z)(Tt,"".concat(lr,"-selected"),zn),Tt)),ir=pn(on),mr=!ke||typeof ke=="function"||zn,$n=typeof ir=="number"?ir:ir||En,cr=Bt($n)?$n.toString():void 0;return Wt!==void 0&&(cr=Wt),M.createElement("div",(0,v.Z)({},(0,N.Z)(Nn),Ie?{}:un(on,Pt),{"aria-selected":zn,className:er,title:cr,onMouseMove:function(){bt===Pt||sn||Qt(Pt)},onClick:function(){sn||Gt(En)},style:On}),M.createElement("div",{className:"".concat(lr,"-content")},$n),M.isValidElement(ke)||zn,mr&&M.createElement(Re,{className:"".concat(ut,"-option-state"),customizeIcon:ke,customizeIconProps:{isSelected:zn}},zn?"\u2713":null))}))},hn=M.forwardRef(Kt);hn.displayName="OptionList";var en=hn;function xn(b){var E=b.mode,q=b.options,K=b.children,ye=b.backfill,Ue=b.allowClear,Ge=b.placeholder,Le=b.getInputElement,rt=b.showSearch,Qe=b.onSearch,tt=b.defaultOpen,Je=b.autoFocus,$=b.labelInValue,ge=b.value,we=b.inputValue,He=b.optionLabelProp,at=isMultiple(E),Ne=rt!==void 0?rt:at||E==="combobox",ke=q||convertChildrenToData(K);if(warning(E!=="tags"||ke.every(function(Ke){return!Ke.disabled}),"Please avoid setting option to disabled in tags mode since user can always type text as tag."),E==="tags"||E==="combobox"){var Y=ke.some(function(Ke){return Ke.options?Ke.options.some(function(Ve){return typeof("value"in Ve?Ve.value:Ve.key)=="number"}):typeof("value"in Ke?Ke.value:Ke.key)=="number"});warning(!Y,"`value` of Option should not use number type when `mode` is `tags` or `combobox`.")}if(warning(E!=="combobox"||!He,"`combobox` mode not support `optionLabelProp`. Please set `value` on Option directly."),warning(E==="combobox"||!ye,"`backfill` only works with `combobox` mode."),warning(E==="combobox"||!Le,"`getInputElement` only work with `combobox` mode."),noteOnce(E!=="combobox"||!Le||!Ue||!Ge,"Customize `getInputElement` should customize clear and placeholder logic instead of configuring `allowClear` and `placeholder`."),Qe&&!Ne&&E!=="combobox"&&E!=="tags"&&warning(!1,"`onSearch` should work with `showSearch` instead of use alone."),noteOnce(!tt||Je,"`defaultOpen` makes Select open without focus which means it will not close by click outside. You can set `autoFocus` if needed."),ge!=null){var be=toArray(ge);warning(!$||be.every(function(Ke){return _typeof(Ke)==="object"&&("key"in Ke||"value"in Ke)}),"`value` should in shape of `{ value: string | number, label?: ReactNode }` when you set `labelInValue` to `true`"),warning(!at||Array.isArray(ge),"`value` should be array when `mode` is `multiple` or `tags`")}if(K){var Ie=null;toNodeArray(K).some(function(Ke){if(!React.isValidElement(Ke)||!Ke.type)return!1;var Ve=Ke,ct=Ve.type;if(ct.isSelectOption)return!1;if(ct.isSelectOptGroup){var ut=toNodeArray(Ke.props.children).every(function(Ct){return!React.isValidElement(Ct)||!Ke.type||Ct.type.isSelectOption?!0:(Ie=Ct.type,!1)});return!ut}return Ie=ct,!0}),Ie&&warning(!1,"`children` should be `Select.Option` or `Select.OptGroup` instead of `".concat(Ie.displayName||Ie.name||Ie,"`.")),warning(we===void 0,"`inputValue` is deprecated, please use `searchValue` instead.")}}function an(b,E){if(b){var q=function K(ye){for(var Ue=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,Ge=0;Ge2&&arguments[2]!==void 0?arguments[2]:{},Fn=Tn.source,jn=Fn===void 0?"keyboard":Fn;jr(Pn),Ge&&K==="combobox"&&bn!==null&&jn==="keyboard"&&Lr(String(bn))},[Ge,K]),Hn=function(Pn,Tn,Fn){var jn=function(){var Mr,yn=Vn(Pn);return[bt?{label:yn==null?void 0:yn[un.label],value:Pn,key:(Mr=yn==null?void 0:yn.key)!==null&&Mr!==void 0?Mr:Pn}:Pn,Se(yn)]};if(Tn&&ge){var Yn=jn(),br=(0,R.Z)(Yn,2),fr=br[0],vr=br[1];ge(fr,vr)}else if(!Tn&&we&&Fn!=="clear"){var Sr=jn(),ar=(0,R.Z)(Sr,2),Xn=ar[0],Ir=ar[1];we(Xn,Ir)}},sr=pt(function(bn,Pn){var Tn,Fn=Gt?Pn.selected:!0;Fn?Tn=Gt?[].concat((0,O.Z)(On),[bn]):[bn]:Tn=On.filter(function(jn){return jn.value!==bn}),cr(Tn),Hn(bn,Fn),K==="combobox"?Lr(""):(!I||$)&&(Pt(""),Lr(""))}),Zn=function(Pn,Tn){cr(Pn);var Fn=Tn.type,jn=Tn.values;(Fn==="remove"||Fn==="clear")&&jn.forEach(function(Yn){Hn(Yn.value,!1,Fn)})},Jn=function(Pn,Tn){if(Pt(Pn),Lr(null),Tn.source==="submit"){var Fn=(Pn||"").trim();if(Fn){var jn=Array.from(new Set([].concat((0,O.Z)(Nn),[Fn])));cr(jn),Hn(Fn,!0),Pt("")}return}Tn.source!=="blur"&&(K==="combobox"&&cr(Pn),tt==null||tt(Pn))},pr=function(Pn){var Tn=Pn;K!=="tags"&&(Tn=Pn.map(function(jn){var Yn=Ln.get(jn);return Yn==null?void 0:Yn.value}).filter(function(jn){return jn!==void 0}));var Fn=Array.from(new Set([].concat((0,O.Z)(Nn),(0,O.Z)(Tn))));cr(Fn),Fn.forEach(function(jn){Hn(jn,!0)})},Pr=M.useMemo(function(){var bn=ut!==!1&&at!==!1;return(0,se.Z)((0,se.Z)({},Tt),{},{flattenOptions:$n,onActiveValue:_n,defaultActiveFirstOption:Wr,onSelect:sr,menuItemSelectedIcon:ct,rawValues:Nn,fieldNames:un,virtual:bn,direction:Ct,listHeight:Dt,listItemHeight:Vt,childrenAsData:rn})},[Tt,$n,_n,Wr,sr,ct,Nn,un,ut,at,Dt,Vt,rn]);return M.createElement(xt.Provider,{value:Pr},M.createElement(pe,(0,v.Z)({},Qt,{id:cn,prefixCls:Ue,ref:E,omitDomProps:Xe,mode:K,displayValues:Kn,onDisplayValuesChange:Zn,direction:Ct,searchValue:on,onSearch:Jn,autoClearSearchValue:$,onSearchSplit:pr,dropdownMatchSelectWidth:at,OptionList:en,emptyOptions:!$n.length,activeValue:Tr,activeDescendantId:"".concat(cn,"_list_").concat(Or)})))}),f=h;f.Option=jt,f.OptGroup=ot;var d=f,p=d},9296:function(Ht,lt,u){"use strict";u.r(lt),u.d(lt,{ResizableTextArea:function(){return ze},default:function(){return ve}});var v=u(96663),O=u(44127),H=u(90493),se=u(20135),R=u(72071),B=u(6620),ee=u(19127),ce=u(92310),fe=u.n(ce),M=u(93681),Ze=u(5643),P=u(18929),g=u(59301),X=u(29301),z=u(34280),Ce=u(16089),st=` 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; `,Re=["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"],de={},ae;function ue(Ee){var ne=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,Oe=Ee.getAttribute("id")||Ee.getAttribute("data-reactid")||Ee.getAttribute("name");if(ne&&de[Oe])return de[Oe];var xe=window.getComputedStyle(Ee),te=xe.getPropertyValue("box-sizing")||xe.getPropertyValue("-moz-box-sizing")||xe.getPropertyValue("-webkit-box-sizing"),Fe=parseFloat(xe.getPropertyValue("padding-bottom"))+parseFloat(xe.getPropertyValue("padding-top")),Ae=parseFloat(xe.getPropertyValue("border-bottom-width"))+parseFloat(xe.getPropertyValue("border-top-width")),le=Re.map(function(nt){return"".concat(nt,":").concat(xe.getPropertyValue(nt))}).join(";"),$e={sizingStyle:le,paddingSize:Fe,borderSize:Ae,boxSizing:te};return ne&&Oe&&(de[Oe]=$e),$e}function A(Ee){var ne=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,Oe=arguments.length>2&&arguments[2]!==void 0?arguments[2]:null,xe=arguments.length>3&&arguments[3]!==void 0?arguments[3]:null;ae||(ae=document.createElement("textarea"),ae.setAttribute("tab-index","-1"),ae.setAttribute("aria-hidden","true"),document.body.appendChild(ae)),Ee.getAttribute("wrap")?ae.setAttribute("wrap",Ee.getAttribute("wrap")):ae.removeAttribute("wrap");var te=ue(Ee,ne),Fe=te.paddingSize,Ae=te.borderSize,le=te.boxSizing,$e=te.sizingStyle;ae.setAttribute("style","".concat($e,";").concat(st)),ae.value=Ee.value||Ee.placeholder||"";var nt=void 0,St=void 0,Rt,Et=ae.scrollHeight;if(le==="border-box"?Et+=Ae:le==="content-box"&&(Et-=Fe),Oe!==null||xe!==null){ae.value=" ";var vt=ae.scrollHeight-Fe;Oe!==null&&(nt=vt*Oe,le==="border-box"&&(nt=nt+Fe+Ae),Et=Math.max(nt,Et)),xe!==null&&(St=vt*xe,le==="border-box"&&(St=St+Fe+Ae),Rt=Et>St?"":"hidden",Et=Math.min(St,Et))}var It={height:Et,overflowY:Rt,resize:"none"};return nt&&(It.minHeight=nt),St&&(It.maxHeight=St),It}var w=["prefixCls","onPressEnter","defaultValue","value","autoSize","onResize","className","style","disabled","onChange","onInternalAutoSize"],j=0,N=1,De=2,Te=g.forwardRef(function(Ee,ne){var Oe=Ee,xe=Oe.prefixCls,te=Oe.onPressEnter,Fe=Oe.defaultValue,Ae=Oe.value,le=Oe.autoSize,$e=Oe.onResize,nt=Oe.className,St=Oe.style,Rt=Oe.disabled,Et=Oe.onChange,vt=Oe.onInternalAutoSize,It=(0,B.Z)(Oe,w),gt=(0,P.Z)(Fe,{value:Ae,postState:function(ot){return ot!=null?ot:""}}),qe=(0,R.Z)(gt,2),yt=qe[0],V=qe[1],Z=function(ot){V(ot.target.value),Et==null||Et(ot)},L=g.useRef();g.useImperativeHandle(ne,function(){return{textArea:L.current}});var U=g.useMemo(function(){return le&&(0,se.Z)(le)==="object"?[le.minRows,le.maxRows]:[]},[le]),J=(0,R.Z)(U,2),Se=J[0],x=J[1],C=!!le,Q=function(){try{if(document.activeElement===L.current){var ot=L.current,_t=ot.selectionStart,jt=ot.selectionEnd,Zt=ot.scrollTop;L.current.setSelectionRange(_t,jt),L.current.scrollTop=Zt}}catch(Yt){}},I=g.useState(De),F=(0,R.Z)(I,2),pe=F[0],je=F[1],Be=g.useState(),it=(0,R.Z)(Be,2),_e=it[0],Ye=it[1],re=function(){je(j)};(0,z.Z)(function(){C&&re()},[Ae,Se,x,C]),(0,z.Z)(function(){if(pe===j)je(N);else if(pe===N){var ft=A(L.current,!1,Se,x);je(De),Ye(ft)}else Q()},[pe]);var Pe=g.useRef(),et=function(){Ce.Z.cancel(Pe.current)},oe=function(ot){pe===De&&($e==null||$e(ot),le&&(et(),Pe.current=(0,Ce.Z)(function(){re()})))};g.useEffect(function(){return et},[]);var dt=C?_e:null,pt=(0,O.Z)((0,O.Z)({},St),dt);return(pe===j||pe===N)&&(pt.overflowY="hidden",pt.overflowX="hidden"),g.createElement(X.Z,{onResize:oe,disabled:!(le||$e)},g.createElement("textarea",(0,v.Z)({},It,{ref:L,style:pt,className:fe()(xe,nt,(0,H.Z)({},"".concat(xe,"-disabled"),Rt)),disabled:Rt,value:yt,onChange:Z})))}),ze=Te,Me=["defaultValue","value","onFocus","onBlur","onChange","allowClear","maxLength","onCompositionStart","onCompositionEnd","suffix","prefixCls","classes","showCount","className","style","disabled","hidden","classNames","styles","onResize"];function he(Ee,ne){return(0,ee.Z)(Ee||"").slice(0,ne).join("")}function _(Ee,ne,Oe,xe){var te=Oe;return Ee?te=he(Oe,xe):(0,ee.Z)(ne||"").lengthxe&&(te=ne),te}var me=g.forwardRef(function(Ee,ne){var Oe,xe=Ee.defaultValue,te=Ee.value,Fe=Ee.onFocus,Ae=Ee.onBlur,le=Ee.onChange,$e=Ee.allowClear,nt=Ee.maxLength,St=Ee.onCompositionStart,Rt=Ee.onCompositionEnd,Et=Ee.suffix,vt=Ee.prefixCls,It=vt===void 0?"rc-textarea":vt,gt=Ee.classes,qe=Ee.showCount,yt=Ee.className,V=Ee.style,Z=Ee.disabled,L=Ee.hidden,U=Ee.classNames,J=Ee.styles,Se=Ee.onResize,x=(0,B.Z)(Ee,Me),C=(0,P.Z)(xe,{value:te,defaultValue:xe}),Q=(0,R.Z)(C,2),I=Q[0],F=Q[1],pe=(0,g.useRef)(null),je=g.useState(!1),Be=(0,R.Z)(je,2),it=Be[0],_e=Be[1],Ye=g.useState(!1),re=(0,R.Z)(Ye,2),Pe=re[0],et=re[1],oe=g.useRef(),dt=g.useRef(0),pt=g.useState(null),ft=(0,R.Z)(pt,2),ot=ft[0],_t=ft[1],jt=function(){var l;(l=pe.current)===null||l===void 0||l.textArea.focus()};(0,g.useImperativeHandle)(ne,function(){return{resizableTextArea:pe.current,focus:jt,blur:function(){var l;(l=pe.current)===null||l===void 0||l.textArea.blur()}}}),(0,g.useEffect)(function(){_e(function(Xe){return!Z&&Xe})},[Z]);var Zt=Number(nt)>0,Yt=function(l){et(!0),oe.current=I,dt.current=l.currentTarget.selectionStart,St==null||St(l)},Mt=function(l){et(!1);var h=l.currentTarget.value;if(Zt){var f,d=dt.current>=nt+1||dt.current===((f=oe.current)===null||f===void 0?void 0:f.length);h=_(d,oe.current,h,nt)}h!==I&&(F(h),(0,Ze.rJ)(l.currentTarget,l,le,h)),Rt==null||Rt(l)},$t=function(l){var h=l.target.value;if(!Pe&&Zt){var f=l.target.selectionStart>=nt+1||l.target.selectionStart===h.length||!l.target.selectionStart;h=_(f,I,h,nt)}F(h),(0,Ze.rJ)(l.currentTarget,l,le,h)},xt=function(l){var h=x.onPressEnter,f=x.onKeyDown;l.key==="Enter"&&h&&h(l),f==null||f(l)},Ft=function(l){_e(!0),Fe==null||Fe(l)},qt=function(l){_e(!1),Ae==null||Ae(l)},Bt=function(l){var h;F(""),jt(),(0,Ze.rJ)((h=pe.current)===null||h===void 0?void 0:h.textArea,l,le)},Kt=(0,Ze.D7)(I);!Pe&&Zt&&te==null&&(Kt=he(Kt,nt));var hn=Et,en;if(qe){var xn=(0,ee.Z)(Kt).length;(0,se.Z)(qe)==="object"?en=qe.formatter({value:Kt,count:xn,maxLength:nt}):en="".concat(xn).concat(Zt?" / ".concat(nt):""),hn=g.createElement(g.Fragment,null,hn,g.createElement("span",{className:fe()("".concat(It,"-data-count"),U==null?void 0:U.count),style:J==null?void 0:J.count},en))}var an=function(l){var h;Se==null||Se(l),(h=pe.current)!==null&&h!==void 0&&h.textArea.style.height&&_t(!0)},mn=!x.autoSize&&!qe&&!$e,Ot=g.createElement(M.BaseInput,{value:Kt,allowClear:$e,handleReset:Bt,suffix:hn,prefixCls:It,classes:{affixWrapper:fe()(gt==null?void 0:gt.affixWrapper,(Oe={},(0,H.Z)(Oe,"".concat(It,"-show-count"),qe),(0,H.Z)(Oe,"".concat(It,"-textarea-allow-clear"),$e),Oe))},disabled:Z,focused:it,className:yt,style:(0,O.Z)((0,O.Z)({},V),ot&&!mn?{height:"auto"}:{}),dataAttrs:{affixWrapper:{"data-count":typeof en=="string"?en:void 0}},hidden:L,inputElement:g.createElement(ze,(0,v.Z)({},x,{onKeyDown:xt,onChange:$t,onFocus:Ft,onBlur:qt,onCompositionStart:Yt,onCompositionEnd:Mt,className:U==null?void 0:U.textarea,style:(0,O.Z)((0,O.Z)({},J==null?void 0:J.textarea),{},{resize:V==null?void 0:V.resize}),disabled:Z,prefixCls:It,onResize:an,ref:pe}))});return Ot}),T=me,ve=T},55477:function(Ht,lt,u){"use strict";u.d(lt,{G:function(){return g},Z:function(){return st}});var v=u(96663),O=u(44127),H=u(6620),se=u(35593),R=u(59301),B={shiftX:64,adjustY:1},ee={adjustX:1,shiftY:!0},ce=[0,0],fe={left:{points:["cr","cl"],overflow:ee,offset:[-4,0],targetOffset:ce},right:{points:["cl","cr"],overflow:ee,offset:[4,0],targetOffset:ce},top:{points:["bc","tc"],overflow:B,offset:[0,-4],targetOffset:ce},bottom:{points:["tc","bc"],overflow:B,offset:[0,4],targetOffset:ce},topLeft:{points:["bl","tl"],overflow:B,offset:[0,-4],targetOffset:ce},leftTop:{points:["tr","tl"],overflow:ee,offset:[-4,0],targetOffset:ce},topRight:{points:["br","tr"],overflow:B,offset:[0,-4],targetOffset:ce},rightTop:{points:["tl","tr"],overflow:ee,offset:[4,0],targetOffset:ce},bottomRight:{points:["tr","br"],overflow:B,offset:[0,4],targetOffset:ce},rightBottom:{points:["bl","br"],overflow:ee,offset:[4,0],targetOffset:ce},bottomLeft:{points:["tl","bl"],overflow:B,offset:[0,4],targetOffset:ce},leftBottom:{points:["br","bl"],overflow:ee,offset:[-4,0],targetOffset:ce}},M=null,Ze=u(92310),P=u.n(Ze);function g(Re){var de=Re.children,ae=Re.prefixCls,ue=Re.id,A=Re.overlayInnerStyle,w=Re.className,j=Re.style;return R.createElement("div",{className:P()("".concat(ae,"-content"),w),style:j},R.createElement("div",{className:"".concat(ae,"-inner"),id:ue,role:"tooltip",style:A},typeof de=="function"?de():de))}var X=["overlayClassName","trigger","mouseEnterDelay","mouseLeaveDelay","overlayStyle","prefixCls","children","onVisibleChange","afterVisibleChange","transitionName","animation","motion","placement","align","destroyTooltipOnHide","defaultVisible","getTooltipContainer","overlayInnerStyle","arrowContent","overlay","id","showArrow"],z=function(de,ae){var ue=de.overlayClassName,A=de.trigger,w=A===void 0?["hover"]:A,j=de.mouseEnterDelay,N=j===void 0?0:j,De=de.mouseLeaveDelay,Te=De===void 0?.1:De,ze=de.overlayStyle,Me=de.prefixCls,he=Me===void 0?"rc-tooltip":Me,_=de.children,me=de.onVisibleChange,T=de.afterVisibleChange,ve=de.transitionName,Ee=de.animation,ne=de.motion,Oe=de.placement,xe=Oe===void 0?"right":Oe,te=de.align,Fe=te===void 0?{}:te,Ae=de.destroyTooltipOnHide,le=Ae===void 0?!1:Ae,$e=de.defaultVisible,nt=de.getTooltipContainer,St=de.overlayInnerStyle,Rt=de.arrowContent,Et=de.overlay,vt=de.id,It=de.showArrow,gt=It===void 0?!0:It,qe=(0,H.Z)(de,X),yt=(0,R.useRef)(null);(0,R.useImperativeHandle)(ae,function(){return yt.current});var V=(0,O.Z)({},qe);"visible"in de&&(V.popupVisible=de.visible);var Z=function(){return R.createElement(g,{key:"content",prefixCls:he,id:vt,overlayInnerStyle:St},Et)};return R.createElement(se.Z,(0,v.Z)({popupClassName:ue,prefixCls:he,popup:Z,action:w,builtinPlacements:fe,popupPlacement:xe,ref:yt,popupAlign:Fe,getPopupContainer:nt,onPopupVisibleChange:me,afterPopupVisibleChange:T,popupTransitionName:ve,popupAnimation:Ee,popupMotion:ne,defaultPopupVisible:$e,autoDestroy:le,mouseLeaveDelay:Te,popupStyle:ze,mouseEnterDelay:N,arrow:gt},V),_)},Ce=(0,R.forwardRef)(z),st=Ce},49658:function(Ht,lt){"use strict";lt.Z=function(){if(typeof navigator=="undefined"||typeof window=="undefined")return!1;var u=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(u)||/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(u==null?void 0:u.substr(0,4))}},24916:function(Ht,lt,u){"use strict";u.d(lt,{Z:function(){return gt}});var v=u(96663),O=u(20135),H=u(44127),se=u(90493),R=u(72071),B=u(6620),ee=u(92310),ce=u.n(ee),fe=u(29301),M=u(70425),Ze=u(34280),P=u(59301),g=u(4676),X=P.forwardRef(function(qe,yt){var V=qe.height,Z=qe.offsetY,L=qe.offsetX,U=qe.children,J=qe.prefixCls,Se=qe.onInnerResize,x=qe.innerProps,C=qe.rtl,Q=qe.extra,I={},F={display:"flex",flexDirection:"column"};return Z!==void 0&&(I={height:V,position:"relative",overflow:"hidden"},F=(0,H.Z)((0,H.Z)({},F),{},(0,se.Z)((0,se.Z)((0,se.Z)((0,se.Z)((0,se.Z)({transform:"translateY(".concat(Z,"px)")},C?"marginRight":"marginLeft",-L),"position","absolute"),"left",0),"right",0),"top",0))),P.createElement("div",{style:I},P.createElement(fe.Z,{onResize:function(je){var Be=je.offsetHeight;Be&&Se&&Se()}},P.createElement("div",(0,v.Z)({style:F,className:ce()((0,se.Z)({},"".concat(J,"-holder-inner"),J)),ref:yt},x),U,Q)))});X.displayName="Filler";var z=X;function Ce(qe){var yt=qe.children,V=qe.setRef,Z=P.useCallback(function(L){V(L)},[]);return P.cloneElement(yt,{ref:Z})}function st(qe,yt,V,Z,L,U,J,Se){var x=Se.getKey;return qe.slice(yt,V+1).map(function(C,Q){var I=yt+Q,F=J(C,I,{style:{width:Z},offsetX:L}),pe=x(C);return P.createElement(Ce,{key:pe,setRef:function(Be){return U(C,Be)}},F)})}function Re(qe,yt,V,Z){var L=V-qe,U=yt-V,J=Math.min(L,U)*2;if(Z<=J){var Se=Math.floor(Z/2);return Z%2?V+Se+1:V-Se}return L>U?V-(Z-U):V+(Z-L)}function de(qe,yt,V){var Z=qe.length,L=yt.length,U,J;if(Z===0&&L===0)return null;Z2&&arguments[2]!==void 0?arguments[2]:!1,I=x?C<0&&Se.current.left||C>0&&Se.current.right:C<0&&Se.current.top||C>0&&Se.current.bottom;return Q&&I?(clearTimeout(U.current),L.current=!1):(!I||L.current)&&J(),!L.current&&I}};function N(qe,yt,V,Z,L,U,J){var Se=(0,P.useRef)(0),x=(0,P.useRef)(null),C=(0,P.useRef)(null),Q=(0,P.useRef)(!1),I=j(yt,V,Z,L);function F(Ye,re){if(ue.Z.cancel(x.current),!I(!1,re)){var Pe=Ye;if(!Pe._virtualHandled)Pe._virtualHandled=!0;else return;Se.current+=re,C.current=re,w||Pe.preventDefault(),x.current=(0,ue.Z)(function(){var et=Q.current?10:1;J(Se.current*et,!1),Se.current=0})}}function pe(Ye,re){J(re,!0),w||Ye.preventDefault()}var je=(0,P.useRef)(null),Be=(0,P.useRef)(null);function it(Ye){if(qe){ue.Z.cancel(Be.current),Be.current=(0,ue.Z)(function(){je.current=null},2);var re=Ye.deltaX,Pe=Ye.deltaY,et=Ye.shiftKey,oe=re,dt=Pe;(je.current==="sx"||!je.current&&et&&Pe&&!re)&&(oe=Pe,dt=0,je.current="sx");var pt=Math.abs(oe),ft=Math.abs(dt);je.current===null&&(je.current=U&&pt>ft?"x":"y"),je.current==="y"?F(Ye,dt):pe(Ye,oe)}}function _e(Ye){qe&&(Q.current=Ye.detail===C.current)}return[it,_e]}function De(qe,yt,V,Z){var L=P.useMemo(function(){return[new Map,[]]},[qe,V.id,Z]),U=(0,R.Z)(L,2),J=U[0],Se=U[1],x=function(Q){var I=arguments.length>1&&arguments[1]!==void 0?arguments[1]:Q,F=J.get(Q),pe=J.get(I);if(F===void 0||pe===void 0)for(var je=qe.length,Be=Se.length;Be0&&arguments[0]!==void 0?arguments[0]:!1;Q();var je=function(){var _e=!1;Se.current.forEach(function(Ye,re){if(Ye&&Ye.offsetParent){var Pe=Ye.offsetHeight,et=getComputedStyle(Ye),oe=et.marginTop,dt=et.marginBottom,pt=_(oe),ft=_(dt),ot=Pe+pt+ft;x.current.get(re)!==ot&&(x.current.set(re,ot),_e=!0)}}),_e&&J(function(Ye){return Ye+1})};if(pe)je();else{C.current+=1;var Be=C.current;Promise.resolve().then(function(){Be===C.current&&je()})}}function F(pe,je){var Be=qe(pe),it=Se.current.get(Be);je?(Se.current.set(Be,je),I()):Se.current.delete(Be),!it!=!je&&(je?yt==null||yt(pe):V==null||V(pe))}return(0,P.useEffect)(function(){return Q},[]),[F,I,x.current,U]}var T=14/15;function ve(qe,yt,V){var Z=(0,P.useRef)(!1),L=(0,P.useRef)(0),U=(0,P.useRef)(0),J=(0,P.useRef)(null),Se=(0,P.useRef)(null),x,C=function(pe){if(Z.current){var je=Math.ceil(pe.touches[0].pageX),Be=Math.ceil(pe.touches[0].pageY),it=L.current-je,_e=U.current-Be,Ye=Math.abs(it)>Math.abs(_e);Ye?L.current=je:U.current=Be;var re=V(Ye,Ye?it:_e,!1,pe);re&&pe.preventDefault(),clearInterval(Se.current),re&&(Se.current=setInterval(function(){Ye?it*=T:_e*=T;var Pe=Math.floor(Ye?it:_e);(!V(Ye,Pe,!0)||Math.abs(Pe)<=.1)&&clearInterval(Se.current)},16))}},Q=function(){Z.current=!1,x()},I=function(pe){x(),pe.touches.length===1&&!Z.current&&(Z.current=!0,L.current=Math.ceil(pe.touches[0].pageX),U.current=Math.ceil(pe.touches[0].pageY),J.current=pe.target,J.current.addEventListener("touchmove",C,{passive:!1}),J.current.addEventListener("touchend",Q,{passive:!0}))};x=function(){J.current&&(J.current.removeEventListener("touchmove",C),J.current.removeEventListener("touchend",Q))},(0,Ze.Z)(function(){return qe&&yt.current.addEventListener("touchstart",I,{passive:!0}),function(){var F;(F=yt.current)===null||F===void 0||F.removeEventListener("touchstart",I),x(),clearInterval(Se.current)}},[qe])}function Ee(qe){return Math.floor(Math.pow(qe,.5))}function ne(qe,yt){var V="touches"in qe?qe.touches[0]:qe;return V[yt?"pageX":"pageY"]-window[yt?"scrollX":"scrollY"]}function Oe(qe,yt,V){P.useEffect(function(){var Z=yt.current;if(qe&&Z){var L=!1,U,J,Se=function(){ue.Z.cancel(U)},x=function F(){Se(),U=(0,ue.Z)(function(){V(J),F()})},C=function(pe){if(!pe.target.draggable){var je=pe;je._virtualHandled||(je._virtualHandled=!0,L=!0)}},Q=function(){L=!1,Se()},I=function(pe){if(L){var je=ne(pe,!1),Be=Z.getBoundingClientRect(),it=Be.top,_e=Be.bottom;if(je<=it){var Ye=it-je;J=-Ee(Ye),x()}else if(je>=_e){var re=je-_e;J=Ee(re),x()}else Se()}};return Z.addEventListener("mousedown",C),Z.ownerDocument.addEventListener("mouseup",Q),Z.ownerDocument.addEventListener("mousemove",I),function(){Z.removeEventListener("mousedown",C),Z.ownerDocument.removeEventListener("mouseup",Q),Z.ownerDocument.removeEventListener("mousemove",I),Se()}}},[qe])}var xe=10;function te(qe,yt,V,Z,L,U,J,Se){var x=P.useRef(),C=P.useState(null),Q=(0,R.Z)(C,2),I=Q[0],F=Q[1];return(0,Ze.Z)(function(){if(I&&I.times=0;Yt-=1){var Mt=L(yt[Yt]),$t=V.get(Mt);if($t===void 0){Ye=!0;break}if(Zt-=$t,Zt<=0)break}switch(et){case"top":Pe=dt-it;break;case"bottom":Pe=pt-_e+it;break;default:{var xt=qe.current.scrollTop,Ft=xt+_e;dtFt&&(re="bottom")}}Pe!==null&&J(Pe),Pe!==I.lastTop&&(Ye=!0)}Ye&&F((0,H.Z)((0,H.Z)({},I),{},{times:I.times+1,targetAlign:re,lastTop:Pe}))}},[I,qe.current]),function(pe){if(pe==null){Se();return}if(ue.Z.cancel(x.current),typeof pe=="number")J(pe);else if(pe&&(0,O.Z)(pe)==="object"){var je,Be=pe.align;"index"in pe?je=pe.index:je=yt.findIndex(function(Ye){return L(Ye)===pe.key});var it=pe.offset,_e=it===void 0?0:it;F({times:0,index:je,offset:_e,originAlign:Be})}}}var Fe=P.forwardRef(function(qe,yt){var V=qe.prefixCls,Z=qe.rtl,L=qe.scrollOffset,U=qe.scrollRange,J=qe.onStartMove,Se=qe.onStopMove,x=qe.onScroll,C=qe.horizontal,Q=qe.spinSize,I=qe.containerSize,F=qe.style,pe=qe.thumbStyle,je=qe.showScrollBar,Be=P.useState(!1),it=(0,R.Z)(Be,2),_e=it[0],Ye=it[1],re=P.useState(null),Pe=(0,R.Z)(re,2),et=Pe[0],oe=Pe[1],dt=P.useState(null),pt=(0,R.Z)(dt,2),ft=pt[0],ot=pt[1],_t=!Z,jt=P.useRef(),Zt=P.useRef(),Yt=P.useState(je),Mt=(0,R.Z)(Yt,2),$t=Mt[0],xt=Mt[1],Ft=P.useRef(),qt=function(){je===!0||je===!1||(clearTimeout(Ft.current),xt(!0),Ft.current=setTimeout(function(){xt(!1)},3e3))},Bt=U-I||0,Kt=I-Q||0,hn=P.useMemo(function(){if(L===0||Bt===0)return 0;var f=L/Bt;return f*Kt},[L,Bt,Kt]),en=function(d){d.stopPropagation(),d.preventDefault()},xn=P.useRef({top:hn,dragging:_e,pageY:et,startTop:ft});xn.current={top:hn,dragging:_e,pageY:et,startTop:ft};var an=function(d){Ye(!0),oe(ne(d,C)),ot(xn.current.top),J(),d.stopPropagation(),d.preventDefault()};P.useEffect(function(){var f=function(E){E.preventDefault()},d=jt.current,p=Zt.current;return d.addEventListener("touchstart",f,{passive:!1}),p.addEventListener("touchstart",an,{passive:!1}),function(){d.removeEventListener("touchstart",f),p.removeEventListener("touchstart",an)}},[]);var mn=P.useRef();mn.current=Bt;var Ot=P.useRef();Ot.current=Kt,P.useEffect(function(){if(_e){var f,d=function(E){var q=xn.current,K=q.dragging,ye=q.pageY,Ue=q.startTop;ue.Z.cancel(f);var Ge=jt.current.getBoundingClientRect(),Le=I/(C?Ge.width:Ge.height);if(K){var rt=(ne(E,C)-ye)*Le,Qe=Ue;!_t&&C?Qe-=rt:Qe+=rt;var tt=mn.current,Je=Ot.current,$=Je?Qe/Je:0,ge=Math.ceil($*tt);ge=Math.max(ge,0),ge=Math.min(ge,tt),f=(0,ue.Z)(function(){x(ge,C)})}},p=function(){Ye(!1),Se()};return window.addEventListener("mousemove",d,{passive:!0}),window.addEventListener("touchmove",d,{passive:!0}),window.addEventListener("mouseup",p,{passive:!0}),window.addEventListener("touchend",p,{passive:!0}),function(){window.removeEventListener("mousemove",d),window.removeEventListener("touchmove",d),window.removeEventListener("mouseup",p),window.removeEventListener("touchend",p),ue.Z.cancel(f)}}},[_e]),P.useEffect(function(){return qt(),function(){clearTimeout(Ft.current)}},[L]),P.useImperativeHandle(yt,function(){return{delayHidden:qt}});var Xe="".concat(V,"-scrollbar"),l={position:"absolute",visibility:$t?null:"hidden"},h={position:"absolute",background:"rgba(0, 0, 0, 0.5)",borderRadius:99,cursor:"pointer",userSelect:"none"};return C?(l.height=8,l.left=0,l.right=0,l.bottom=0,h.height="100%",h.width=Q,_t?h.left=hn:h.right=hn):(l.width=8,l.top=0,l.bottom=0,_t?l.right=0:l.left=0,h.width="100%",h.height=Q,h.top=hn),P.createElement("div",{ref:jt,className:ce()(Xe,(0,se.Z)((0,se.Z)((0,se.Z)({},"".concat(Xe,"-horizontal"),C),"".concat(Xe,"-vertical"),!C),"".concat(Xe,"-visible"),$t)),style:(0,H.Z)((0,H.Z)({},l),F),onMouseDown:en,onMouseMove:qt},P.createElement("div",{ref:Zt,className:ce()("".concat(Xe,"-thumb"),(0,se.Z)({},"".concat(Xe,"-thumb-moving"),_e)),style:(0,H.Z)((0,H.Z)({},h),pe),onMouseDown:an}))}),Ae=Fe,le=20;function $e(){var qe=arguments.length>0&&arguments[0]!==void 0?arguments[0]:0,yt=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,V=qe/yt*qe;return isNaN(V)&&(V=0),V=Math.max(V,le),Math.floor(V)}var nt=["prefixCls","className","height","itemHeight","fullHeight","style","data","children","itemKey","virtual","direction","scrollWidth","component","onScroll","onVirtualScroll","onVisibleChange","innerProps","extraRender","styles","showScrollBar"],St=[],Rt={overflowY:"auto",overflowAnchor:"none"};function Et(qe,yt){var V=qe.prefixCls,Z=V===void 0?"rc-virtual-list":V,L=qe.className,U=qe.height,J=qe.itemHeight,Se=qe.fullHeight,x=Se===void 0?!0:Se,C=qe.style,Q=qe.data,I=qe.children,F=qe.itemKey,pe=qe.virtual,je=qe.direction,Be=qe.scrollWidth,it=qe.component,_e=it===void 0?"div":it,Ye=qe.onScroll,re=qe.onVirtualScroll,Pe=qe.onVisibleChange,et=qe.innerProps,oe=qe.extraRender,dt=qe.styles,pt=qe.showScrollBar,ft=pt===void 0?"optional":pt,ot=(0,B.Z)(qe,nt),_t=P.useCallback(function(sn){return typeof F=="function"?F(sn):sn==null?void 0:sn[F]},[F]),jt=me(_t,null,null),Zt=(0,R.Z)(jt,4),Yt=Zt[0],Mt=Zt[1],$t=Zt[2],xt=Zt[3],Ft=!!(pe!==!1&&U&&J),qt=P.useMemo(function(){return Object.values($t.maps).reduce(function(sn,Wt){return sn+Wt},0)},[$t.id,$t.maps]),Bt=Ft&&Q&&(Math.max(J*Q.length,qt)>U||!!Be),Kt=je==="rtl",hn=ce()(Z,(0,se.Z)({},"".concat(Z,"-rtl"),Kt),L),en=Q||St,xn=(0,P.useRef)(),an=(0,P.useRef)(),mn=(0,P.useRef)(),Ot=(0,P.useState)(0),Xe=(0,R.Z)(Ot,2),l=Xe[0],h=Xe[1],f=(0,P.useState)(0),d=(0,R.Z)(f,2),p=d[0],b=d[1],E=(0,P.useState)(!1),q=(0,R.Z)(E,2),K=q[0],ye=q[1],Ue=function(){ye(!0)},Ge=function(){ye(!1)},Le={getKey:_t};function rt(sn){h(function(Wt){var fn;typeof sn=="function"?fn=sn(Wt):fn=sn;var On=Vt(fn);return xn.current.scrollTop=On,On})}var Qe=(0,P.useRef)({start:0,end:en.length}),tt=(0,P.useRef)(),Je=ae(en,_t),$=(0,R.Z)(Je,1),ge=$[0];tt.current=ge;var we=P.useMemo(function(){if(!Ft)return{scrollHeight:void 0,start:0,end:en.length-1,offset:void 0};if(!Bt){var sn;return{scrollHeight:((sn=an.current)===null||sn===void 0?void 0:sn.offsetHeight)||0,start:0,end:en.length-1,offset:void 0}}for(var Wt=0,fn,On,Vn,Kn=en.length,Nn=0;Nn=l&&fn===void 0&&(fn=Nn,On=Wt),ir>l+U&&Vn===void 0&&(Vn=Nn),Wt=ir}return fn===void 0&&(fn=0,On=0,Vn=Math.ceil(U/J)),Vn===void 0&&(Vn=en.length-1),Vn=Math.min(Vn+1,en.length-1),{scrollHeight:Wt,start:fn,end:Vn,offset:On}},[Bt,Ft,l,en,xt,U]),He=we.scrollHeight,at=we.start,Ne=we.end,ke=we.offset;Qe.current.start=at,Qe.current.end=Ne,P.useLayoutEffect(function(){var sn=$t.getRecord();if(sn.size===1){var Wt=Array.from(sn)[0],fn=en[at];if(fn){var On=_t(fn);if(On===Wt){var Vn=$t.get(Wt),Kn=Vn-J;rt(function(Nn){return Nn+Kn})}}}$t.resetRecord()},[He]);var Y=P.useState({width:0,height:U}),be=(0,R.Z)(Y,2),Ie=be[0],Ke=be[1],Ve=function(Wt){Ke({width:Wt.offsetWidth,height:Wt.offsetHeight})},ct=(0,P.useRef)(),ut=(0,P.useRef)(),Ct=P.useMemo(function(){return $e(Ie.width,Be)},[Ie.width,Be]),Lt=P.useMemo(function(){return $e(Ie.height,He)},[Ie.height,He]),Dt=He-U,Nt=(0,P.useRef)(Dt);Nt.current=Dt;function Vt(sn){var Wt=sn;return Number.isNaN(Nt.current)||(Wt=Math.min(Wt,Nt.current)),Wt=Math.max(Wt,0),Wt}var tn=l<=0,Ut=l>=Dt,bt=p<=0,ln=p>=Be,Qt=j(tn,Ut,bt,ln),cn=function(){return{x:Kt?-p:p,y:l}},Gt=(0,P.useRef)(cn()),rn=(0,M.useEvent)(function(sn){if(re){var Wt=(0,H.Z)((0,H.Z)({},cn()),sn);(Gt.current.x!==Wt.x||Gt.current.y!==Wt.y)&&(re(Wt),Gt.current=Wt)}});function pn(sn,Wt){var fn=sn;Wt?((0,g.flushSync)(function(){b(fn)}),rn()):rt(fn)}function un(sn){var Wt=sn.currentTarget.scrollTop;Wt!==l&&rt(Wt),Ye==null||Ye(sn),rn()}var wn=function(Wt){var fn=Wt,On=Be?Be-Ie.width:0;return fn=Math.max(fn,0),fn=Math.min(fn,On),fn},kn=(0,M.useEvent)(function(sn,Wt){Wt?((0,g.flushSync)(function(){b(function(fn){var On=fn+(Kt?-sn:sn);return wn(On)})}),rn()):rt(function(fn){var On=fn+sn;return On})}),on=N(Ft,tn,Ut,bt,ln,!!Be,kn),Pt=(0,R.Z)(on,2),Tt=Pt[0],Rn=Pt[1];ve(Ft,xn,function(sn,Wt,fn,On){var Vn=On;return Qt(sn,Wt,fn)?!1:!Vn||!Vn._virtualHandled?(Vn&&(Vn._virtualHandled=!0),Tt({preventDefault:function(){},deltaX:sn?Wt:0,deltaY:sn?0:Wt}),!0):!1}),Oe(Bt,xn,function(sn){rt(function(Wt){return Wt+sn})}),(0,Ze.Z)(function(){function sn(fn){var On=tn&&fn.detail<0,Vn=Ut&&fn.detail>0;Ft&&!On&&!Vn&&fn.preventDefault()}var Wt=xn.current;return Wt.addEventListener("wheel",Tt,{passive:!1}),Wt.addEventListener("DOMMouseScroll",Rn,{passive:!0}),Wt.addEventListener("MozMousePixelScroll",sn,{passive:!1}),function(){Wt.removeEventListener("wheel",Tt),Wt.removeEventListener("DOMMouseScroll",Rn),Wt.removeEventListener("MozMousePixelScroll",sn)}},[Ft,tn,Ut]),(0,Ze.Z)(function(){if(Be){var sn=wn(p);b(sn),rn({x:sn})}},[Ie.width,Be]);var Ln=function(){var Wt,fn;(Wt=ct.current)===null||Wt===void 0||Wt.delayHidden(),(fn=ut.current)===null||fn===void 0||fn.delayHidden()},Cn=te(xn,en,$t,J,_t,function(){return Mt(!0)},rt,Ln);P.useImperativeHandle(yt,function(){return{nativeElement:mn.current,getScrollInfo:cn,scrollTo:function(Wt){function fn(On){return On&&(0,O.Z)(On)==="object"&&("left"in On||"top"in On)}fn(Wt)?(Wt.left!==void 0&&b(wn(Wt.left)),Cn(Wt.top)):Cn(Wt)}}}),(0,Ze.Z)(function(){if(Pe){var sn=en.slice(at,Ne+1);Pe(sn,en)}},[at,Ne,en]);var Sn=De(en,_t,$t,J),En=oe==null?void 0:oe({start:at,end:Ne,virtual:Bt,offsetX:p,offsetY:ke,rtl:Kt,getSize:Sn}),dn=st(en,at,Ne,Be,p,Yt,I,Le),An=null;U&&(An=(0,H.Z)((0,se.Z)({},x?"height":"maxHeight",U),Rt),Ft&&(An.overflowY="hidden",Be&&(An.overflowX="hidden"),K&&(An.pointerEvents="none")));var Wn={};return Kt&&(Wn.dir="rtl"),P.createElement("div",(0,v.Z)({ref:mn,style:(0,H.Z)((0,H.Z)({},C),{},{position:"relative"}),className:hn},Wn,ot),P.createElement(fe.Z,{onResize:Ve},P.createElement(_e,{className:"".concat(Z,"-holder"),style:An,ref:xn,onScroll:un,onMouseEnter:Ln},P.createElement(z,{prefixCls:Z,height:He,offsetX:p,offsetY:ke,scrollWidth:Be,onInnerResize:Mt,ref:an,innerProps:et,rtl:Kt,extra:En},dn))),Bt&&He>U&&P.createElement(Ae,{ref:ct,prefixCls:Z,scrollOffset:l,scrollRange:He,rtl:Kt,onScroll:pn,onStartMove:Ue,onStopMove:Ge,spinSize:Lt,containerSize:Ie.height,style:dt==null?void 0:dt.verticalScrollBar,thumbStyle:dt==null?void 0:dt.verticalScrollBarThumb,showScrollBar:ft}),Bt&&Be>Ie.width&&P.createElement(Ae,{ref:ut,prefixCls:Z,scrollOffset:p,scrollRange:Be,rtl:Kt,onScroll:pn,onStartMove:Ue,onStopMove:Ge,spinSize:Ct,containerSize:Ie.width,horizontal:!0,style:dt==null?void 0:dt.horizontalScrollBar,thumbStyle:dt==null?void 0:dt.horizontalScrollBarThumb,showScrollBar:ft}))}var vt=P.forwardRef(Et);vt.displayName="List";var It=vt,gt=It},83145:function(Ht,lt,u){"use strict";Object.defineProperty(lt,"__esModule",{value:!0}),lt.CopyToClipboard=void 0;var v=H(u(59301)),O=H(u(25769));function H(de){return de&&de.__esModule?de:{default:de}}function se(de){return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?se=function(ue){return typeof ue}:se=function(ue){return ue&&typeof Symbol=="function"&&ue.constructor===Symbol&&ue!==Symbol.prototype?"symbol":typeof ue},se(de)}function R(de,ae){var ue=Object.keys(de);if(Object.getOwnPropertySymbols){var A=Object.getOwnPropertySymbols(de);ae&&(A=A.filter(function(w){return Object.getOwnPropertyDescriptor(de,w).enumerable})),ue.push.apply(ue,A)}return ue}function B(de){for(var ae=1;ae=0)&&Object.prototype.propertyIsEnumerable.call(de,A)&&(ue[A]=de[A])}return ue}function ce(de,ae){if(de==null)return{};var ue={},A=Object.keys(de),w,j;for(j=0;j=0)&&(ue[w]=de[w]);return ue}function fe(de,ae){if(!(de instanceof ae))throw new TypeError("Cannot call a class as a function")}function M(de,ae){for(var ue=0;ue=0||Object.prototype.hasOwnProperty.call(P,z)&&(X[z]=P[z]);return X}function ce(P,g){if(!(P instanceof g))throw new TypeError("Cannot call a class as a function")}function fe(P,g){if(!P)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return g&&(typeof g=="object"||typeof g=="function")?g:P}function M(P,g){if(typeof g!="function"&&g!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof g);P.prototype=Object.create(g&&g.prototype,{constructor:{value:P,enumerable:!1,writable:!0,configurable:!0}}),g&&(Object.setPrototypeOf?Object.setPrototypeOf(P,g):P.__proto__=g)}var Ze=function(P){M(g,P);function g(X){ce(this,g);var z=fe(this,(g.__proto__||Object.getPrototypeOf(g)).call(this,X));return z.scrollListener=z.scrollListener.bind(z),z.eventListenerOptions=z.eventListenerOptions.bind(z),z.mousewheelListener=z.mousewheelListener.bind(z),z}return v(g,[{key:"componentDidMount",value:function(){this.pageLoaded=this.props.pageStart,this.options=this.eventListenerOptions(),this.attachScrollListener()}},{key:"componentDidUpdate",value:function(){if(this.props.isReverse&&this.loadMore){var z=this.getParentElement(this.scrollComponent);z.scrollTop=z.scrollHeight-this.beforeScrollHeight+this.beforeScrollTop,this.loadMore=!1}this.attachScrollListener()}},{key:"componentWillUnmount",value:function(){this.detachScrollListener(),this.detachMousewheelListener()}},{key:"isPassiveSupported",value:function(){var z=!1,Ce={get passive(){z=!0}};try{document.addEventListener("test",null,Ce),document.removeEventListener("test",null,Ce)}catch(st){}return z}},{key:"eventListenerOptions",value:function(){var z=this.props.useCapture;return this.isPassiveSupported()&&(z={useCapture:this.props.useCapture,passive:!0}),z}},{key:"setDefaultLoader",value:function(z){this.defaultLoader=z}},{key:"detachMousewheelListener",value:function(){var z=window;this.props.useWindow===!1&&(z=this.scrollComponent.parentNode),z.removeEventListener("mousewheel",this.mousewheelListener,this.options?this.options:this.props.useCapture)}},{key:"detachScrollListener",value:function(){var z=window;this.props.useWindow===!1&&(z=this.getParentElement(this.scrollComponent)),z.removeEventListener("scroll",this.scrollListener,this.options?this.options:this.props.useCapture),z.removeEventListener("resize",this.scrollListener,this.options?this.options:this.props.useCapture)}},{key:"getParentElement",value:function(z){var Ce=this.props.getScrollParent&&this.props.getScrollParent();return Ce!=null?Ce:z&&z.parentNode}},{key:"filterProps",value:function(z){return z}},{key:"attachScrollListener",value:function(){var z=this.getParentElement(this.scrollComponent);if(!(!this.props.hasMore||!z)){var Ce=window;this.props.useWindow===!1&&(Ce=z),Ce.addEventListener("mousewheel",this.mousewheelListener,this.options?this.options:this.props.useCapture),Ce.addEventListener("scroll",this.scrollListener,this.options?this.options:this.props.useCapture),Ce.addEventListener("resize",this.scrollListener,this.options?this.options:this.props.useCapture),this.props.initialLoad&&this.scrollListener()}}},{key:"mousewheelListener",value:function(z){z.deltaY===1&&!this.isPassiveSupported()&&z.preventDefault()}},{key:"scrollListener",value:function(){var z=this.scrollComponent,Ce=window,st=this.getParentElement(z),Re=void 0;if(this.props.useWindow){var de=document.documentElement||document.body.parentNode||document.body,ae=Ce.pageYOffset!==void 0?Ce.pageYOffset:de.scrollTop;this.props.isReverse?Re=ae:Re=this.calculateOffset(z,ae)}else this.props.isReverse?Re=st.scrollTop:Re=z.scrollHeight-st.scrollTop-st.clientHeight;Re0},he.prototype.connect_=function(){!O||this.connected_||(document.addEventListener("transitionend",this.onTransitionEnd_),window.addEventListener("resize",this.refresh),fe?(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)},he.prototype.disconnect_=function(){!O||!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)},he.prototype.onTransitionEnd_=function(_){var me=_.propertyName,T=me===void 0?"":me,ve=ce.some(function(Ee){return!!~T.indexOf(Ee)});ve&&this.refresh()},he.getInstance=function(){return this.instance_||(this.instance_=new he),this.instance_},he.instance_=null,he}(),Ze=function(he,_){for(var me=0,T=Object.keys(_);me0},he}(),Te=typeof WeakMap!="undefined"?new WeakMap:new v,ze=function(){function he(_){if(!(this instanceof he))throw new TypeError("Cannot call a class as a function.");if(!arguments.length)throw new TypeError("1 argument required, but only 0 present.");var me=M.getInstance(),T=new De(_,me,this);Te.set(this,T)}return he}();["observe","unobserve","disconnect"].forEach(function(he){ze.prototype[he]=function(){var _;return(_=Te.get(this))[he].apply(_,arguments)}});var Me=function(){return typeof H.ResizeObserver!="undefined"?H.ResizeObserver:ze}();lt.Z=Me},98040:function(Ht){Ht.exports=function(){var lt=document.getSelection();if(!lt.rangeCount)return function(){};for(var u=document.activeElement,v=[],O=0;O`):Ce}function ae(a,...e){e.forEach(function(t){Re[t]=a[t]?a[t].bind(a):de(t)})}function ue(a,e){if(typeof console=="object"&&a===!0||typeof a=="object"){ae(a,"debug","log","info","warn","error");try{Re.log(`Debug logs enabled for "${e}" in hls.js version 1.5.20`)}catch(t){Re=st}}else Re=st}const A=Re,w=/^(\d+)x(\d+)$/,j=/(.+?)=(".*?"|.*?)(?:,|$)/g;class N{constructor(e){typeof e=="string"&&(e=N.parseAttrList(e)),fe(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;rNumber.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]}bool(e){return this[e]==="YES"}decimalResolution(e){const t=w.exec(this[e]);if(t!==null)return{width:parseInt(t[1],10),height:parseInt(t[2],10)}}static parseAttrList(e){let t;const n={},r='"';for(j.lastIndex=0;(t=j.exec(e))!==null;){let i=t[2];i.indexOf(r)===0&&i.lastIndexOf(r)===i.length-1&&(i=i.slice(1,-1));const s=t[1].trim();n[s]=i}return n}}function De(a){return a!=="ID"&&a!=="CLASS"&&a!=="START-DATE"&&a!=="DURATION"&&a!=="END-DATE"&&a!=="END-ON-NEXT"}function Te(a){return a==="SCTE35-OUT"||a==="SCTE35-IN"}class ze{constructor(e,t){if(this.attr=void 0,this._startDate=void 0,this._endDate=void 0,this._badValueForSameId=void 0,t){const n=t.attr;for(const r in n)if(Object.prototype.hasOwnProperty.call(e,r)&&e[r]!==n[r]){A.warn(`DATERANGE tag attribute: "${r}" does not match for tags with ID: "${e.ID}"`),this._badValueForSameId=r;break}e=fe(new N({}),n,e)}if(this.attr=e,this._startDate=new Date(e["START-DATE"]),"END-DATE"in this.attr){const n=new Date(this.attr["END-DATE"]);M(n.getTime())&&(this._endDate=n)}}get id(){return this.attr.ID}get class(){return this.attr.CLASS}get startDate(){return this._startDate}get endDate(){if(this._endDate)return this._endDate;const e=this.duration;return e!==null?new Date(this._startDate.getTime()+e*1e3):null}get duration(){if("DURATION"in this.attr){const e=this.attr.decimalFloatingPoint("DURATION");if(M(e))return e}else if(this._endDate)return(this._endDate.getTime()-this._startDate.getTime())/1e3;return null}get plannedDuration(){return"PLANNED-DURATION"in this.attr?this.attr.decimalFloatingPoint("PLANNED-DURATION"):null}get endOnNext(){return this.attr.bool("END-ON-NEXT")}get isValid(){return!!this.id&&!this._badValueForSameId&&M(this.startDate.getTime())&&(this.duration===null||this.duration>=0)&&(!this.endOnNext||!!this.class)}}class Me{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 he={AUDIO:"audio",VIDEO:"video",AUDIOVIDEO:"audiovideo"};class _{constructor(e){this._byteRange=null,this._url=null,this.baseurl=void 0,this.relurl=void 0,this.elementaryStreams={[he.AUDIO]:null,[he.VIDEO]:null,[he.AUDIOVIDEO]:null},this.baseurl=e}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 byteRange(){return this._byteRange?this._byteRange:[]}get byteRangeStartOffset(){return this.byteRange[0]}get byteRangeEndOffset(){return this.byteRange[1]}get url(){return!this._url&&this.baseurl&&this.relurl&&(this._url=H.buildAbsoluteURL(this.baseurl,this.relurl,{alwaysNormalize:!0})),this._url||""}set url(e){this._url=e}}class me extends _{constructor(e,t){super(t),this._decryptdata=null,this.rawProgramDateTime=null,this.programDateTime=null,this.tagList=[],this.duration=0,this.sn=0,this.levelkeys=void 0,this.type=void 0,this.loader=null,this.keyLoader=null,this.level=-1,this.cc=0,this.startPTS=void 0,this.endPTS=void 0,this.startDTS=void 0,this.endDTS=void 0,this.start=0,this.deltaPTS=void 0,this.maxStartPTS=void 0,this.minEndPTS=void 0,this.stats=new Me,this.data=void 0,this.bitrateTest=!1,this.title=null,this.initSegment=null,this.endList=void 0,this.gap=void 0,this.urlId=0,this.type=e}get decryptdata(){const{levelkeys:e}=this;if(!e&&!this._decryptdata)return null;if(!this._decryptdata&&this.levelkeys&&!this.levelkeys.NONE){const t=this.levelkeys.identity;if(t)this._decryptdata=t.getDecryptData(this.sn);else{const 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||!M(this.programDateTime))return null;const e=M(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}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:o}=this,c=o[e];if(!c){o[e]={startPTS:t,endPTS:n,startDTS:r,endDTS:i,partial:s};return}c.startPTS=Math.min(c.startPTS,t),c.endPTS=Math.max(c.endPTS,n),c.startDTS=Math.min(c.startDTS,r),c.endDTS=Math.max(c.endDTS,i)}clearElementaryStreamInfo(){const{elementaryStreams:e}=this;e[he.AUDIO]=null,e[he.VIDEO]=null,e[he.AUDIOVIDEO]=null}}class T extends _{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.stats=new Me,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)}}const ve=10;class Ee{constructor(e){this.PTSKnown=!1,this.alignedSliding=!1,this.averagetargetduration=void 0,this.endCC=0,this.endSN=0,this.fragments=void 0,this.fragmentHint=void 0,this.partList=null,this.dateRanges=void 0,this.live=!0,this.ageHeader=0,this.advancedDateTime=void 0,this.updated=!0,this.advanced=!0,this.availabilityDelay=void 0,this.misses=0,this.startCC=0,this.startSN=0,this.startTimeOffset=null,this.targetduration=0,this.totalduration=0,this.type=null,this.url=void 0,this.m3u8="",this.version=null,this.canBlockReload=!1,this.canSkipUntil=0,this.canSkipDateRanges=!1,this.skippedSegments=0,this.recentlyRemovedDateranges=void 0,this.partHoldBack=0,this.holdBack=0,this.partTarget=0,this.preloadHint=void 0,this.renditionReports=void 0,this.tuneInGoal=0,this.deltaUpdateFailed=void 0,this.driftStartTime=0,this.driftEndTime=0,this.driftStart=0,this.driftEnd=0,this.encryptedFragments=void 0,this.playlistParsingError=null,this.variableList=null,this.hasVariableRefs=!1,this.fragments=[],this.encryptedFragments=[],this.dateRanges={},this.url=e}reloaded(e){if(!e){this.advanced=!0,this.updated=!0;return}const t=this.lastPartSn-e.lastPartSn,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,this.availabilityDelay=e.availabilityDelay}get hasProgramDateTime(){return this.fragments.length?M(this.fragments[this.fragments.length-1].programDateTime):!1}get levelTargetDuration(){return this.averagetargetduration||this.targetduration||ve}get drift(){const e=this.driftEndTime-this.driftStartTime;return e>0?(this.driftEnd-this.driftStart)*1e3/e:1}get edge(){return this.partEnd||this.fragmentEnd}get partEnd(){var e;return(e=this.partList)!=null&&e.length?this.partList[this.partList.length-1].end:this.fragmentEnd}get fragmentEnd(){var e;return(e=this.fragments)!=null&&e.length?this.fragments[this.fragments.length-1].end:0}get age(){return this.advancedDateTime?Math.max(Date.now()-this.advancedDateTime,0)/1e3:0}get lastPartIndex(){var e;return(e=this.partList)!=null&&e.length?this.partList[this.partList.length-1].index:-1}get lastPartSn(){var e;return(e=this.partList)!=null&&e.length?this.partList[this.partList.length-1].fragment.sn:this.endSN}}function ne(a){return Uint8Array.from(atob(a),e=>e.charCodeAt(0))}function Oe(a){const e=Fe(a).subarray(0,16),t=new Uint8Array(16);return t.set(e,16-e.length),t}function xe(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 te(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=ne(s)):t=Oe(s)}}return t}function Fe(a){return Uint8Array.from(unescape(encodeURIComponent(a)),e=>e.charCodeAt(0))}const Ae=typeof self!="undefined"?self:void 0;var le={CLEARKEY:"org.w3.clearkey",FAIRPLAY:"com.apple.fps",PLAYREADY:"com.microsoft.playready",WIDEVINE:"com.widevine.alpha"},$e={CLEARKEY:"org.w3.clearkey",FAIRPLAY:"com.apple.streamingkeydelivery",PLAYREADY:"com.microsoft.playready",WIDEVINE:"urn:uuid:edef8ba9-79d6-4ace-a3c8-27dcd51d21ed"};function nt(a){switch(a){case $e.FAIRPLAY:return le.FAIRPLAY;case $e.PLAYREADY:return le.PLAYREADY;case $e.WIDEVINE:return le.WIDEVINE;case $e.CLEARKEY:return le.CLEARKEY}}var St={CENC:"1077efecc0b24d02ace33c1e52e2fb4b",CLEARKEY:"e2719d58a985b3c9781ab030af78d30e",FAIRPLAY:"94ce86fb07ff4f43adb893d2fa968ca2",PLAYREADY:"9a04f07998404286ab92e65be0885f95",WIDEVINE:"edef8ba979d64acea3c827dcd51d21ed"};function Rt(a){if(a===St.WIDEVINE)return le.WIDEVINE;if(a===St.PLAYREADY)return le.PLAYREADY;if(a===St.CENC||a===St.CLEARKEY)return le.CLEARKEY}function Et(a){switch(a){case le.FAIRPLAY:return $e.FAIRPLAY;case le.PLAYREADY:return $e.PLAYREADY;case le.WIDEVINE:return $e.WIDEVINE;case le.CLEARKEY:return $e.CLEARKEY}}function vt(a){const{drmSystems:e,widevineLicenseUrl:t}=a,n=e?[le.FAIRPLAY,le.WIDEVINE,le.PLAYREADY,le.CLEARKEY].filter(r=>!!e[r]):[];return!n[le.WIDEVINE]&&t&&n.push(le.WIDEVINE),n}const It=function(a){return Ae!=null&&(a=Ae.navigator)!=null&&a.requestMediaKeySystemAccess?self.navigator.requestMediaKeySystemAccess.bind(self.navigator):null}();function gt(a,e,t,n){let r;switch(a){case le.FAIRPLAY:r=["cenc","sinf"];break;case le.WIDEVINE:case le.PLAYREADY:r=["cenc"];break;case le.CLEARKEY:r=["cenc","keyids"];break;default:throw new Error(`Unknown key-system: ${a}`)}return qe(r,e,t,n)}function qe(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 yt(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 o=s.childNodes[0]?s.childNodes[0].nodeValue:s.getAttribute("VALUE");if(o){const c=ne(o).subarray(0,16);return xe(c),c}}return null}function V(a,e,t){return Uint8Array.prototype.slice?a.slice(e,t):new Uint8Array(Array.prototype.slice.call(a,e,t))}const Z=(a,e)=>e+10<=a.length&&a[e]===73&&a[e+1]===68&&a[e+2]===51&&a[e+3]<255&&a[e+4]<255&&a[e+6]<128&&a[e+7]<128&&a[e+8]<128&&a[e+9]<128,L=(a,e)=>e+10<=a.length&&a[e]===51&&a[e+1]===68&&a[e+2]===73&&a[e+3]<255&&a[e+4]<255&&a[e+6]<128&&a[e+7]<128&&a[e+8]<128&&a[e+9]<128,U=(a,e)=>{const t=e;let n=0;for(;Z(a,e);){n+=10;const r=J(a,e+6);n+=r,L(a,e+10)&&(n+=10),e+=n}if(n>0)return a.subarray(t,t+n)},J=(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},Se=(a,e)=>Z(a,e)&&J(a,e+6)+10<=a.length-e,x=a=>{const e=I(a);for(let t=0;ta&&a.key==="PRIV"&&a.info==="com.apple.streaming.transportStreamTimestamp",Q=a=>{const e=String.fromCharCode(a[0],a[1],a[2],a[3]),t=J(a,4),n=10;return{type:e,size:t,data:a.subarray(n,n+t)}},I=a=>{let e=0;const t=[];for(;Z(a,e);){const n=J(a,e+6);e+=10;const r=e+n;for(;e+8a.type==="PRIV"?pe(a):a.type[0]==="W"?Be(a):je(a),pe=a=>{if(a.size<2)return;const e=_e(a.data,!0),t=new Uint8Array(a.data.subarray(e.length+1));return{key:a.type,info:e,data:t.buffer}},je=a=>{if(a.size<2)return;if(a.type==="TXXX"){let t=1;const n=_e(a.data.subarray(t),!0);t+=n.length+1;const r=_e(a.data.subarray(t));return{key:a.type,info:n,data:r}}const e=_e(a.data.subarray(1));return{key:a.type,data:e}},Be=a=>{if(a.type==="WXXX"){if(a.size<2)return;let t=1;const n=_e(a.data.subarray(t),!0);t+=n.length+1;const r=_e(a.data.subarray(t));return{key:a.type,info:n,data:r}}const e=_e(a.data);return{key:a.type,data:e}},it=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)}},_e=(a,e=!1)=>{const t=re();if(t){const m=t.decode(a);if(e){const y=m.indexOf("\0");return y!==-1?m.substring(0,y):m}return m.replace(/\0/g,"")}const n=a.length;let r,i,s,o="",c=0;for(;c>4){case 0:case 1:case 2:case 3:case 4:case 5:case 6:case 7:o+=String.fromCharCode(r);break;case 12:case 13:i=a[c++],o+=String.fromCharCode((r&31)<<6|i&63);break;case 14:i=a[c++],s=a[c++],o+=String.fromCharCode((r&15)<<12|(i&63)<<6|(s&63)<<0);break}}return o};let Ye;function re(){if(!navigator.userAgent.includes("PlayStation 4"))return!Ye&&typeof self.TextDecoder!="undefined"&&(Ye=new self.TextDecoder("utf-8")),Ye}const Pe={hexDump:function(a){let e="";for(let t=0;t>24,a[e+1]=t>>16&255,a[e+2]=t>>8&255,a[e+3]=t&255}function Yt(a){const e=a.byteLength;for(let t=0;t8&&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 Mt(a,e){const t=[];if(!e.length)return t;const n=a.byteLength;for(let r=0;r1?r+i:n;if(s===e[0])if(e.length===1)t.push(a.subarray(r+8,o));else{const c=Mt(a.subarray(r+8,o),e.slice(1));c.length&&oe.apply(t,c)}r=o}return t}function $t(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=_t(a,n),s=_t(a,n+8),n+=16),n+=2;let o=a.length+s;const c=ft(a,n);n+=2;for(let m=0;m>>31===1)return A.warn("SIDX has hierarchical references (not supported)"),null;const k=ot(a,y);y+=4,e.push({referenceSize:D,subsegmentDuration:k,info:{duration:k/r,start:o,end:o+D-1}}),o+=D,y+=4,n=y}return{earliestPresentationTime:i,timescale:r,version:t,referencesCount:c,references:e}}function xt(a){const e=[],t=Mt(a,["moov","trak"]);for(let r=0;r{const i=ot(r,4),s=e[i];s&&(s.default={duration:ot(r,12),flags:ot(r,20)})}),e}function Ft(a){const e=a.subarray(8),t=e.subarray(86),n=pt(e.subarray(4,8));let r=n;const i=n==="enca"||n==="encv";if(i){const o=Mt(e,[n])[0].subarray(n==="enca"?28:78);Mt(o,["sinf"]).forEach(m=>{const y=Mt(m,["schm"])[0];if(y){const S=pt(y.subarray(4,8));if(S==="cbcs"||S==="cenc"){const D=Mt(m,["frma"])[0];D&&(r=pt(D))}}})}switch(r){case"avc1":case"avc2":case"avc3":case"avc4":{const s=Mt(t,["avcC"])[0];r+="."+Bt(s[1])+Bt(s[2])+Bt(s[3]);break}case"mp4a":{const s=Mt(e,[n])[0],o=Mt(s.subarray(28),["esds"])[0];if(o&&o.length>12){let c=4;if(o[c++]!==3)break;c=qt(o,c),c+=2;const m=o[c++];if(m&128&&(c+=2),m&64&&(c+=o[c++]),o[c++]!==4)break;c=qt(o,c);const y=o[c++];if(y===64)r+="."+Bt(y);else break;if(c+=12,o[c++]!==5)break;c=qt(o,c);const S=o[c++];let D=(S&248)>>3;D===31&&(D+=1+((S&7)<<3)+((o[c]&224)>>5)),r+="."+D}break}case"hvc1":case"hev1":{const s=Mt(t,["hvcC"])[0],o=s[1],c=["","A","B","C"][o>>6],m=o&31,y=ot(s,2),S=(o&32)>>5?"H":"L",D=s[12],W=s.subarray(6,12);r+="."+c+m,r+="."+y.toString(16).toUpperCase(),r+="."+S+D;let k="";for(let G=W.length;G--;){const ie=W[G];(ie||k)&&(k="."+ie.toString(16).toUpperCase()+k)}r+=k;break}case"dvh1":case"dvhe":{const s=Mt(t,["dvcC"])[0],o=s[2]>>1&127,c=s[2]<<5&32|s[3]>>3&31;r+="."+Kt(o)+"."+Kt(c);break}case"vp09":{const s=Mt(t,["vpcC"])[0],o=s[4],c=s[5],m=s[6]>>4&15;r+="."+Kt(o)+"."+Kt(c)+"."+Kt(m);break}case"av01":{const s=Mt(t,["av1C"])[0],o=s[1]>>>5,c=s[1]&31,m=s[2]>>>7?"H":"M",y=(s[2]&64)>>6,S=(s[2]&32)>>5,D=o===2&&y?S?12:10:y?10:8,W=(s[2]&16)>>4,k=(s[2]&8)>>3,G=(s[2]&4)>>2,ie=s[2]&3;r+="."+o+"."+Kt(c)+m+"."+Kt(D)+"."+W+"."+k+G+ie+"."+Kt(1)+"."+Kt(1)+"."+Kt(1)+"."+0;break}}return{codec:r,encrypted:i}}function qt(a,e){const t=e+5;for(;a[e++]&128&&e{const s=Mt(r,["mdia","minf","stbl","stsd"])[0].subarray(8);let o=Mt(s,["enca"]);const c=o.length>0;c||(o=Mt(s,["encv"])),o.forEach(m=>{const y=c?m.subarray(28):m.subarray(78);Mt(y,["sinf"]).forEach(D=>{const W=en(D);if(W){const k=W.subarray(8,24);k.some(G=>G!==0)||(A.log(`[eme] Patching keyId in 'enc${c?"a":"v"}>sinf>>tenc' box: ${Pe.hexDump(k)} -> ${Pe.hexDump(t)}`),W.set(t,8))}})})}),a}function en(a){const e=Mt(a,["schm"])[0];if(e){const t=pt(e.subarray(4,8));if(t==="cbcs"||t==="cenc")return Mt(a,["schi","tenc"])[0]}return null}function xn(a,e){return Mt(e,["moof","traf"]).reduce((t,n)=>{const r=Mt(n,["tfdt"])[0],i=r[0],s=Mt(n,["tfhd"]).reduce((o,c)=>{const m=ot(c,4),y=a[m];if(y){let S=ot(r,4);if(i===1){if(S===et)return A.warn("[mp4-demuxer]: Ignoring assumed invalid signed 64-bit track fragment decode time"),o;S*=et+1,S+=ot(r,8)}const D=y.timescale||9e4,W=S/D;if(M(W)&&(o===null||WW+k.info.duration||0,0);o=Math.max(o,D+S.earliestPresentationTime/S.timescale),c=o-s}}if(c&&M(c))return c}return n||r}function mn(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{Mt(n,["tfhd"]).forEach(r=>{const i=ot(r,4),s=a[i];if(!s)return;const o=s.timescale||9e4;Mt(n,["tfdt"]).forEach(c=>{const m=c[0],y=t*o;if(y){let S=ot(c,4);if(m===0)S-=y,S=Math.max(S,0),Zt(c,4,S);else{S*=Math.pow(2,32),S+=ot(c,8),S-=y,S=Math.max(S,0);const D=Math.floor(S/(et+1)),W=Math.floor(S%(et+1));Zt(c,4,D),Zt(c,8,W)}}})})})}function Xe(a){const e={valid:null,remainder:null},t=Mt(a,["moof"]);if(t.length<2)return e.remainder=a,e;const n=t[t.length-1];return e.valid=V(a,0,n.byteOffset-8),e.remainder=V(a,n.byteOffset-8),e}function l(a,e){const t=new Uint8Array(a.length+e.length);return t.set(a),t.set(e,a.length),t}function h(a,e){const t=[],n=e.samples,r=e.timescale,i=e.id;let s=!1;return Mt(n,["moof"]).map(c=>{const m=c.byteOffset-8;Mt(c,["traf"]).map(S=>{const D=Mt(S,["tfdt"]).map(W=>{const k=W[0];let G=ot(W,4);return k===1&&(G*=Math.pow(2,32),G+=ot(W,8)),G/r})[0];return D!==void 0&&(a=D),Mt(S,["tfhd"]).map(W=>{const k=ot(W,4),G=ot(W,0)&16777215,ie=(G&1)!==0,We=(G&2)!==0,mt=(G&8)!==0;let ht=0;const zt=(G&16)!==0;let At=0;const nn=(G&32)!==0;let kt=8;k===i&&(ie&&(kt+=8),We&&(kt+=4),mt&&(ht=ot(W,kt),kt+=4),zt&&(At=ot(W,kt),kt+=4),nn&&(kt+=4),e.type==="video"&&(s=f(e.codec)),Mt(S,["trun"]).map(gn=>{const In=gn[0],Xt=ot(gn,0)&16777215,vn=(Xt&1)!==0;let rr=0;const Bn=(Xt&4)!==0,tr=(Xt&256)!==0;let qn=0;const Qn=(Xt&512)!==0;let yr=0;const Br=(Xt&1024)!==0,Un=(Xt&2048)!==0;let Mn=0;const xr=ot(gn,4);let ur=8;vn&&(rr=ot(gn,ur),ur+=4),Bn&&(ur+=4);let Dr=rr+m;for(let Vr=0;Vr>1&63;return t===39||t===40}else return(e&31)===6}function p(a,e,t,n){const r=b(a);let i=0;i+=e;let s=0,o=0,c=0;for(;i=r.length)break;c=r[i++],s+=c}while(c===255);o=0;do{if(i>=r.length)break;c=r[i++],o+=c}while(c===255);const m=r.length-i;let y=i;if(om){A.error(`Malformed SEI payload. ${o} is too small, only ${m} bytes left to parse.`);break}if(s===4){if(r[y++]===181){const D=ft(r,y);if(y+=2,D===49){const W=ot(r,y);if(y+=4,W===1195456820){const k=r[y++];if(k===3){const G=r[y++],ie=31&G,We=64&G,mt=We?2+ie*3:0,ht=new Uint8Array(mt);if(We){ht[0]=G;for(let zt=1;zt16){const S=[];for(let k=0;k<16;k++){const G=r[y++].toString(16);S.push(G.length==1?"0"+G:G),(k===3||k===5||k===7||k===9)&&S.push("-")}const D=o-16,W=new Uint8Array(D);for(let k=0;k>24&255,i[1]=n>>16&255,i[2]=n>>8&255,i[3]=n&255,i.set(a,4),r=0,n=8;r0?(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),q([112,115,115,104],new Uint8Array([n,0,0,0]),a,i,r,s,t||new Uint8Array)}function ye(a){const e=[];if(a instanceof ArrayBuffer){const t=a.byteLength;let n=0;for(;n+32>>24;if(i!==0&&i!==1)return{offset:t,size:e};const s=a.buffer,o=Pe.hexDump(new Uint8Array(s,t+12,16)),c=a.getUint32(28);let m=null,y=null;if(i===0){if(e-32=22&&(this.keyId=t.subarray(t.length-22,t.length-6));break;case $e.PLAYREADY:{const n=new Uint8Array([154,4,240,121,152,64,66,134,171,146,230,91,224,136,95,149]);this.pssh=K(n,null,t),this.keyId=yt(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=Ge[this.uri];if(!n){const r=Object.keys(Ge).length%Number.MAX_SAFE_INTEGER;n=new Uint8Array(16),new DataView(n.buffer,12,4).setUint32(0,r),Ge[this.uri]=n}this.keyId=n}return this}}function rt(a){const e=new Uint8Array(16);for(let t=12;t<16;t++)e[t]=a>>8*(15-t)&255;return e}const Qe=/\{\$([a-zA-Z0-9-_]+)\}/g;function tt(a){return Qe.test(a)}function Je(a,e,t){if(a.variableList!==null||a.hasVariableRefs)for(let n=t.length;n--;){const r=t[n],i=e[r];i&&(e[r]=$(a,i))}}function $(a,e){if(a.variableList!==null||a.hasVariableRefs){const t=a.variableList;return e.replace(Qe,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 ge(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 we(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}"`))}function He(a=!0){return typeof self=="undefined"?void 0:(a||!self.MediaSource)&&self.ManagedMediaSource||self.MediaSource||self.WebKitMediaSource}function at(a){return typeof self!="undefined"&&a===self.ManagedMediaSource}const Ne={audio:{a3ds:1,"ac-3":.95,"ac-4":1,alac:.9,alaw:1,dra1:1,"dts+":1,"dts-":1,dtsc:1,dtse:1,dtsh:1,"ec-3":.9,enca:1,fLaC:.9,flac:.9,FLAC:.9,g719:1,g726:1,m4ae:1,mha1:1,mha2:1,mhm1:1,mhm2:1,mlpa:1,mp4a:1,"raw ":1,Opus:1,opus:1,samr:1,sawb:1,sawp:1,sevc:1,sqcp:1,ssmv:1,twos:1,ulaw:1},video:{avc1:1,avc2:1,avc3:1,avc4:1,avcp:1,av01:.8,drac:1,dva1:1,dvav:1,dvh1:.7,dvhe:.7,encv:1,hev1:.75,hvc1:.75,mjp2:1,mp4v:1,mvc1:1,mvc2:1,mvc3:1,mvc4:1,resv:1,rv60:1,s263:1,svc1:1,svc2:1,"vc-1":1,vp08:1,vp09:.9},text:{stpp:1,wvtt:1}};function ke(a,e){const t=Ne[e];return!!t&&!!t[a.slice(0,4)]}function Y(a,e,t=!0){return!a.split(",").some(n=>!be(n,e,t))}function be(a,e,t=!0){var n;const r=He(t);return(n=r==null?void 0:r.isTypeSupported(Ie(a,e)))!=null?n:!1}function Ie(a,e){return`${e}/mp4;codecs="${a}"`}function Ke(a){if(a){const e=a.substring(0,4);return Ne.video[e]}return 2}function Ve(a){return a.split(",").reduce((e,t)=>{const n=Ne.video[t];return n?(n*2+e)/(e?3:2):(Ne.audio[t]+e)/(e?2:1)},0)}const ct={};function ut(a,e=!0){if(ct[a])return ct[a];const t={flac:["flac","fLaC","FLAC"],opus:["opus","Opus"]}[a];for(let n=0;nut(t.toLowerCase(),e))}function Dt(a,e){return a&&a!=="mp4a"?a:e&&e.split(",")[0]}function Nt(a){const e=a.split(",");for(let t=0;t2){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(",")}const Vt=/#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,tn=/#EXT-X-MEDIA:(.*)/g,Ut=/^#EXT(?:INF|-X-TARGETDURATION):/m,bt=new RegExp([/#EXTINF:\s*(\d*(?:\.\d+)?)(?:,(.*)\s+)?/.source,/(?!#) *(\S[^\r\n]*)/.source,/#EXT-X-BYTERANGE:*(.+)/.source,/#EXT-X-PROGRAM-DATE-TIME:(.+)/.source,/#.*/.source].join("|"),"g"),ln=new RegExp([/#(EXTM3U)/.source,/#EXT-X-(DATERANGE|DEFINE|KEY|MAP|PART|PART-INF|PLAYLIST-TYPE|PRELOAD-HINT|RENDITION-REPORT|SERVER-CONTROL|SKIP|START):(.+)/.source,/#EXT-X-(BITRATE|DISCONTINUITY-SEQUENCE|MEDIA-SEQUENCE|TARGETDURATION|VERSION): *(\d+)/.source,/#EXT-X-(DISCONTINUITY|ENDLIST|GAP|INDEPENDENT-SEGMENTS)/.source,/(#)([^:]*):(.*)/.source,/(#)(.*)(?:.*)\r?\n?/.source].join("|"));class Qt{static findGroup(e,t){for(let n=0;n0&&i.length({id:m.attrs.AUDIO,audioCodec:m.audioCodec})),SUBTITLES:s.map(m=>({id:m.attrs.SUBTITLES,textCodec:m.textCodec})),"CLOSED-CAPTIONS":[]};let c=0;for(tn.lastIndex=0;(r=tn.exec(e))!==null;){const m=new N(r[1]),y=m.TYPE;if(y){const S=o[y],D=i[y]||[];i[y]=D,Je(n,m,["URI","GROUP-ID","LANGUAGE","ASSOC-LANGUAGE","STABLE-RENDITION-ID","NAME","INSTREAM-ID","CHARACTERISTICS","CHANNELS"]);const W=m.LANGUAGE,k=m["ASSOC-LANGUAGE"],G=m.CHANNELS,ie=m.CHARACTERISTICS,We=m["INSTREAM-ID"],mt={attrs:m,bitrate:0,id:c++,groupId:m["GROUP-ID"]||"",name:m.NAME||W||"",type:y,default:m.bool("DEFAULT"),autoselect:m.bool("AUTOSELECT"),forced:m.bool("FORCED"),lang:W,url:m.URI?Qt.resolve(m.URI,t):""};if(k&&(mt.assocLang=k),G&&(mt.channels=G),ie&&(mt.characteristics=ie),We&&(mt.instreamId=We),S!=null&&S.length){const ht=Qt.findGroup(S,mt.groupId)||S[0];pn(mt,ht,"audioCodec"),pn(mt,ht,"textCodec")}D.push(mt)}}return i}static parseLevelPlaylist(e,t,n,r,i,s){const o=new Ee(t),c=o.fragments;let m=null,y=0,S=0,D=0,W=0,k=null,G=new me(r,t),ie,We,mt,ht=-1,zt=!1,At=null;for(bt.lastIndex=0,o.m3u8=e,o.hasVariableRefs=tt(e);(ie=bt.exec(e))!==null;){zt&&(zt=!1,G=new me(r,t),G.start=D,G.sn=y,G.cc=W,G.level=n,m&&(G.initSegment=m,G.rawProgramDateTime=m.rawProgramDateTime,m.rawProgramDateTime=null,At&&(G.setByteRange(At),At=null)));const In=ie[1];if(In){G.duration=parseFloat(In);const Xt=(" "+ie[2]).slice(1);G.title=Xt||null,G.tagList.push(Xt?["INF",In,Xt]:["INF",In])}else if(ie[3]){if(M(G.duration)){G.start=D,mt&&on(G,mt,o),G.sn=y,G.level=n,G.cc=W,c.push(G);const Xt=(" "+ie[3]).slice(1);G.relurl=$(o,Xt),wn(G,k),k=G,D+=G.duration,y++,S=0,zt=!0}}else if(ie[4]){const Xt=(" "+ie[4]).slice(1);k?G.setByteRange(Xt,k):G.setByteRange(Xt)}else if(ie[5])G.rawProgramDateTime=(" "+ie[5]).slice(1),G.tagList.push(["PROGRAM-DATE-TIME",G.rawProgramDateTime]),ht===-1&&(ht=c.length);else{if(ie=ie[0].match(ln),!ie){A.warn("No matches on slow regex match for level playlist!");continue}for(We=1;We0&&Bn.bool("CAN-SKIP-DATERANGES"),o.partHoldBack=Bn.optionalFloat("PART-HOLD-BACK",0),o.holdBack=Bn.optionalFloat("HOLD-BACK",0);break}case"PART-INF":{const Bn=new N(vn);o.partTarget=Bn.decimalFloatingPoint("PART-TARGET");break}case"PART":{let Bn=o.partList;Bn||(Bn=o.partList=[]);const tr=S>0?Bn[Bn.length-1]:void 0,qn=S++,Qn=new N(vn);Je(o,Qn,["BYTERANGE","URI"]);const yr=new T(Qn,G,t,qn,tr);Bn.push(yr),G.duration+=yr.duration;break}case"PRELOAD-HINT":{const Bn=new N(vn);Je(o,Bn,["URI"]),o.preloadHint=Bn;break}case"RENDITION-REPORT":{const Bn=new N(vn);Je(o,Bn,["URI"]),o.renditionReports=o.renditionReports||[],o.renditionReports.push(Bn);break}default:A.warn(`line parsed but not handled: ${ie}`);break}}}k&&!k.relurl?(c.pop(),D-=k.duration,o.partList&&(o.fragmentHint=k)):o.partList&&(wn(G,k),G.cc=W,o.fragmentHint=G,mt&&on(G,mt,o));const nn=c.length,kt=c[0],gn=c[nn-1];if(D+=o.skippedSegments*o.targetduration,D>0&&nn&&gn){o.averagetargetduration=D/nn;const In=gn.sn;o.endSN=In!=="initSegment"?In:0,o.live||(gn.endList=!0),kt&&(o.startCC=kt.cc)}else o.endSN=0,o.startCC=0;return o.fragmentHint&&(D+=o.fragmentHint.duration),o.totalduration=D,o.endCC=W,ht>0&&un(c,ht),o}}function cn(a,e,t){var n,r;const i=new N(a);Je(t,i,["KEYFORMAT","KEYFORMATVERSIONS","URI","IV","URI"]);const s=(n=i.METHOD)!=null?n:"",o=i.URI,c=i.hexadecimalInteger("IV"),m=i.KEYFORMATVERSIONS,y=(r=i.KEYFORMAT)!=null?r:"identity";o&&i.IV&&!c&&A.error(`Invalid IV: ${i.IV}`);const S=o?Qt.resolve(o,e):"",D=(m||"1").split("/").map(Number).filter(Number.isFinite);return new Le(s,S,y,D,c)}function Gt(a){const t=new N(a).decimalFloatingPoint("TIME-OFFSET");return M(t)?t:null}function rn(a,e){let t=(a||"").split(/[ ,]+/).filter(n=>n);["video","audio","text"].forEach(n=>{const r=t.filter(i=>ke(i,n));r.length&&(e[`${n}Codec`]=r.join(","),t=t.filter(i=>r.indexOf(i)===-1))}),e.unknownCodecs=t}function pn(a,e,t){const n=e[t];n&&(a[t]=n)}function un(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 wn(a,e){a.rawProgramDateTime?a.programDateTime=Date.parse(a.rawProgramDateTime):e!=null&&e.programDateTime&&(a.programDateTime=e.endProgramDateTime),M(a.programDateTime)||(a.programDateTime=null,a.rawProgramDateTime=null)}function kn(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 on(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)}var Pt={MANIFEST:"manifest",LEVEL:"level",AUDIO_TRACK:"audioTrack",SUBTITLE_TRACK:"subtitleTrack"},Tt={MAIN:"main",AUDIO:"audio",SUBTITLE:"subtitle"};function Rn(a){const{type:e}=a;switch(e){case Pt.AUDIO_TRACK:return Tt.AUDIO;case Pt.SUBTITLE_TRACK:return Tt.SUBTITLE;default:return Tt.MAIN}}function Ln(a,e){let t=a.url;return(t===void 0||t.indexOf("data:")===0)&&(t=e.url),t}class Cn{constructor(e){this.hls=void 0,this.loaders=Object.create(null),this.variableList=null,this.hls=e,this.registerListeners()}startLoad(e){}stopLoad(){this.destroyInternalLoaders()}registerListeners(){const{hls:e}=this;e.on(g.MANIFEST_LOADING,this.onManifestLoading,this),e.on(g.LEVEL_LOADING,this.onLevelLoading,this),e.on(g.AUDIO_TRACK_LOADING,this.onAudioTrackLoading,this),e.on(g.SUBTITLE_TRACK_LOADING,this.onSubtitleTrackLoading,this)}unregisterListeners(){const{hls:e}=this;e.off(g.MANIFEST_LOADING,this.onManifestLoading,this),e.off(g.LEVEL_LOADING,this.onLevelLoading,this),e.off(g.AUDIO_TRACK_LOADING,this.onAudioTrackLoading,this),e.off(g.SUBTITLE_TRACK_LOADING,this.onSubtitleTrackLoading,this)}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:Pt.MANIFEST,url:n,deliveryDirectives:null})}onLevelLoading(e,t){const{id:n,level:r,pathwayId:i,url:s,deliveryDirectives:o}=t;this.load({id:n,level:r,pathwayId:i,responseType:"text",type:Pt.LEVEL,url:s,deliveryDirectives:o})}onAudioTrackLoading(e,t){const{id:n,groupId:r,url:i,deliveryDirectives:s}=t;this.load({id:n,groupId:r,level:null,responseType:"text",type:Pt.AUDIO_TRACK,url:i,deliveryDirectives:s})}onSubtitleTrackLoading(e,t){const{id:n,groupId:r,url:i,deliveryDirectives:s}=t;this.load({id:n,groupId:r,level:null,responseType:"text",type:Pt.SUBTITLE_TRACK,url:i,deliveryDirectives:s})}load(e){var t;const n=this.hls.config;let r=this.getInternalLoader(e);if(r){const m=r.context;if(m&&m.url===e.url&&m.level===e.level){A.trace("[playlist-loader]: playlist request ongoing");return}A.log(`[playlist-loader]: aborting previous loader for type: ${e.type}`),r.abort()}let i;if(e.type===Pt.MANIFEST?i=n.manifestLoadPolicy.default:i=fe({},n.playlistLoadPolicy.default,{timeoutRetry:null,errorRetry:null}),r=this.createInternalLoader(e),M((t=e.deliveryDirectives)==null?void 0:t.part)){let m;if(e.type===Pt.LEVEL&&e.level!==null?m=this.hls.levels[e.level].details:e.type===Pt.AUDIO_TRACK&&e.id!==null?m=this.hls.audioTracks[e.id].details:e.type===Pt.SUBTITLE_TRACK&&e.id!==null&&(m=this.hls.subtitleTracks[e.id].details),m){const y=m.partTarget,S=m.targetduration;if(y&&S){const D=Math.max(y*3,S*.8)*1e3;i=fe({},i,{maxTimeToFirstByteMs:Math.min(D,i.maxTimeToFirstByteMs),maxLoadTimeMs:Math.min(D,i.maxTimeToFirstByteMs)})}}}const s=i.errorRetry||i.timeoutRetry||{},o={loadPolicy:i,timeout:i.maxLoadTimeMs,maxRetry:s.maxNumRetry||0,retryDelay:s.retryDelayMs||0,maxRetryDelay:s.maxRetryDelayMs||0},c={onSuccess:(m,y,S,D)=>{const W=this.getInternalLoader(S);this.resetInternalLoader(S.type);const k=m.data;if(k.indexOf("#EXTM3U")!==0){this.handleManifestParsingError(m,S,new Error("no EXTM3U delimiter"),D||null,y);return}y.parsing.start=performance.now(),Qt.isMediaPlaylist(k)?this.handleTrackOrLevelPlaylist(m,y,S,D||null,W):this.handleMasterPlaylist(m,y,S,D)},onError:(m,y,S,D)=>{this.handleNetworkError(y,S,!1,m,D)},onTimeout:(m,y,S)=>{this.handleNetworkError(y,S,!0,void 0,m)}};r.load(e,o,c)}handleMasterPlaylist(e,t,n,r){const i=this.hls,s=e.data,o=Ln(e,n),c=Qt.parseMasterPlaylist(s,o);if(c.playlistParsingError){this.handleManifestParsingError(e,n,c.playlistParsingError,r,t);return}const{contentSteering:m,levels:y,sessionData:S,sessionKeys:D,startTimeOffset:W,variableList:k}=c;this.variableList=k;const{AUDIO:G=[],SUBTITLES:ie,"CLOSED-CAPTIONS":We}=Qt.parseMasterPlaylistMedia(s,o,c);G.length&&!G.some(ht=>!ht.url)&&y[0].audioCodec&&!y[0].attrs.AUDIO&&(A.log("[playlist-loader]: audio codec signaled in quality level, but no embedded audio track signaled, create one"),G.unshift({type:"main",name:"main",groupId:"main",default:!1,autoselect:!1,forced:!1,id:-1,attrs:new N({}),bitrate:0,url:""})),i.trigger(g.MANIFEST_LOADED,{levels:y,audioTracks:G,subtitles:ie,captions:We,contentSteering:m,url:o,stats:t,networkDetails:r,sessionData:S,sessionKeys:D,startTimeOffset:W,variableList:k})}handleTrackOrLevelPlaylist(e,t,n,r,i){const s=this.hls,{id:o,level:c,type:m}=n,y=Ln(e,n),S=0,D=M(c)?c:M(o)?o:0,W=Rn(n),k=Qt.parseLevelPlaylist(e.data,y,D,W,S,this.variableList);if(m===Pt.MANIFEST){const G={attrs:new N({}),bitrate:0,details:k,name:"",url:y};s.trigger(g.MANIFEST_LOADED,{levels:[G],audioTracks:[],url:y,stats:t,networkDetails:r,sessionData:null,sessionKeys:null,contentSteering:null,startTimeOffset:null,variableList:null})}t.parsing.end=performance.now(),n.levelDetails=k,this.handlePlaylistLoaded(k,e,t,n,r,i)}handleManifestParsingError(e,t,n,r,i){this.hls.trigger(g.ERROR,{type:X.NETWORK_ERROR,details:z.MANIFEST_PARSING_ERROR,fatal:t.type===Pt.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===Pt.LEVEL?s+=`: ${e.level} id: ${e.id}`:(e.type===Pt.AUDIO_TRACK||e.type===Pt.SUBTITLE_TRACK)&&(s+=` id: ${e.id} group-id: "${e.groupId}"`);const o=new Error(s);A.warn(`[playlist-loader]: ${s}`);let c=z.UNKNOWN,m=!1;const y=this.getInternalLoader(e);switch(e.type){case Pt.MANIFEST:c=n?z.MANIFEST_LOAD_TIMEOUT:z.MANIFEST_LOAD_ERROR,m=!0;break;case Pt.LEVEL:c=n?z.LEVEL_LOAD_TIMEOUT:z.LEVEL_LOAD_ERROR,m=!1;break;case Pt.AUDIO_TRACK:c=n?z.AUDIO_TRACK_LOAD_TIMEOUT:z.AUDIO_TRACK_LOAD_ERROR,m=!1;break;case Pt.SUBTITLE_TRACK:c=n?z.SUBTITLE_TRACK_LOAD_TIMEOUT:z.SUBTITLE_LOAD_ERROR,m=!1;break}y&&this.resetInternalLoader(e.type);const S={type:X.NETWORK_ERROR,details:c,fatal:m,url:e.url,loader:y,context:e,error:o,networkDetails:t,stats:i};if(r){const D=(t==null?void 0:t.url)||e.url;S.response=R({url:D,data:void 0},r)}this.hls.trigger(g.ERROR,S)}handlePlaylistLoaded(e,t,n,r,i,s){const o=this.hls,{type:c,level:m,id:y,groupId:S,deliveryDirectives:D}=r,W=Ln(t,r),k=Rn(r),G=typeof r.level=="number"&&k===Tt.MAIN?m:void 0;if(!e.fragments.length){const We=new Error("No Segments found in Playlist");o.trigger(g.ERROR,{type:X.NETWORK_ERROR,details:z.LEVEL_EMPTY_ERROR,fatal:!1,url:W,error:We,reason:We.message,response:t,context:r,level:G,parent:k,networkDetails:i,stats:n});return}e.targetduration||(e.playlistParsingError=new Error("Missing Target Duration"));const ie=e.playlistParsingError;if(ie){o.trigger(g.ERROR,{type:X.NETWORK_ERROR,details:z.LEVEL_PARSING_ERROR,fatal:!1,url:W,error:ie,reason:ie.message,response:t,context:r,level:G,parent:k,networkDetails:i,stats:n});return}switch(e.live&&s&&(s.getCacheAge&&(e.ageHeader=s.getCacheAge()||0),(!s.getCacheAge||isNaN(e.ageHeader))&&(e.ageHeader=0)),c){case Pt.MANIFEST:case Pt.LEVEL:o.trigger(g.LEVEL_LOADED,{details:e,level:G||0,id:y||0,stats:n,networkDetails:i,deliveryDirectives:D});break;case Pt.AUDIO_TRACK:o.trigger(g.AUDIO_TRACK_LOADED,{details:e,id:y||0,groupId:S||"",stats:n,networkDetails:i,deliveryDirectives:D});break;case Pt.SUBTITLE_TRACK:o.trigger(g.SUBTITLE_TRACK_LOADED,{details:e,id:y||0,groupId:S||"",stats:n,networkDetails:i,deliveryDirectives:D});break}}}function Sn(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 En(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){A.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){A.debug(`[texttrack-utils]: Legacy TextTrackCue fallback failed: ${r}`)}}t==="disabled"&&(a.mode=t)}function dn(a){const e=a.mode;if(e==="disabled"&&(a.mode="hidden"),a.cues)for(let t=a.cues.length;t--;)a.removeCue(a.cues[t]);e==="disabled"&&(a.mode=e)}function An(a,e,t,n){const r=a.mode;if(r==="disabled"&&(a.mode="hidden"),a.cues&&a.cues.length>0){const i=sn(a.cues,e,t);for(let s=0;sa[t].endTime)return-1;let n=0,r=t;for(;n<=r;){const i=Math.floor((r+n)/2);if(ea[i].startTime&&n-1)for(let i=r,s=a.length;i=e&&o.endTime<=t)n.push(o);else if(o.startTime>t)return n}return n}function Wt(a){const e=[];for(let t=0;t{const a=Vn();try{a&&new a(0,Number.POSITIVE_INFINITY,"")}catch(e){return Number.MAX_VALUE}return Number.POSITIVE_INFINITY})();function zn(a,e){return a.getTime()/1e3-e}function lr(a){return Uint8Array.from(a.replace(/^0x/,"").replace(/([\da-fA-F]{2}) ?/g,"0x$1 ").replace(/ +$/,"").split(" ")).buffer}class er{constructor(e){this.hls=void 0,this.id3Track=null,this.media=null,this.dateRangeCuesAppended={},this.hls=e,this._registerListeners()}destroy(){this._unregisterListeners(),this.id3Track=null,this.media=null,this.dateRangeCuesAppended={},this.hls=null}_registerListeners(){const{hls:e}=this;e.on(g.MEDIA_ATTACHED,this.onMediaAttached,this),e.on(g.MEDIA_DETACHING,this.onMediaDetaching,this),e.on(g.MANIFEST_LOADING,this.onManifestLoading,this),e.on(g.FRAG_PARSING_METADATA,this.onFragParsingMetadata,this),e.on(g.BUFFER_FLUSHING,this.onBufferFlushing,this),e.on(g.LEVEL_UPDATED,this.onLevelUpdated,this)}_unregisterListeners(){const{hls:e}=this;e.off(g.MEDIA_ATTACHED,this.onMediaAttached,this),e.off(g.MEDIA_DETACHING,this.onMediaDetaching,this),e.off(g.MANIFEST_LOADING,this.onManifestLoading,this),e.off(g.FRAG_PARSING_METADATA,this.onFragParsingMetadata,this),e.off(g.BUFFER_FLUSHING,this.onBufferFlushing,this),e.off(g.LEVEL_UPDATED,this.onLevelUpdated,this)}onMediaAttached(e,t){this.media=t.media}onMediaDetaching(){this.id3Track&&(dn(this.id3Track),this.id3Track=null,this.media=null,this.dateRangeCuesAppended={})}onManifestLoading(){this.dateRangeCuesAppended={}}createTrack(e){const t=this.getID3Track(e.textTracks);return t.mode="hidden",t}getID3Track(e){if(this.media){for(let t=0;tNn&&(S=Nn),S-y<=0&&(S=y+On);for(let W=0;Wy.type===fn.audioId3&&c:r==="video"?m=y=>y.type===fn.emsg&&o:m=y=>y.type===fn.audioId3&&c||y.type===fn.emsg&&o,An(i,t,n,m)}}onLevelUpdated(e,{details:t}){if(!this.media||!t.hasProgramDateTime||!this.hls.config.enableDateRangeMetadataCues)return;const{dateRangeCuesAppended:n,id3Track:r}=this,{dateRanges:i}=t,s=Object.keys(i);if(r){const y=Object.keys(n).filter(S=>!s.includes(S));for(let S=y.length;S--;){const D=y[S];Object.keys(n[D].cues).forEach(W=>{r.removeCue(n[D].cues[W])}),delete n[D]}}const o=t.fragments[t.fragments.length-1];if(s.length===0||!M(o==null?void 0:o.programDateTime))return;this.id3Track||(this.id3Track=this.createTrack(this.media));const c=o.programDateTime/1e3-o.start,m=Vn();for(let y=0;y{if(nn!==D.id){const kt=i[nn];if(kt.class===D.class&&kt.startDate>D.startDate&&(!At||D.startDatethis.timeupdate(),this.hls=e,this.config=e.config,this.registerListeners()}get latency(){return this._latency||0}get maxLatency(){const{config:e,levelDetails:t}=this;return e.liveMaxLatencyDuration!==void 0?e.liveMaxLatencyDuration:t?e.liveMaxLatencyDurationCount*t.targetduration:0}get targetLatency(){const{levelDetails:e}=this;if(e===null)return null;const{holdBack:t,partHoldBack:n,targetduration:r}=e,{liveSyncDuration:i,liveSyncDurationCount:s,lowLatencyMode:o}=this.config,c=this.hls.userConfig;let m=o&&n||t;(c.liveSyncDuration||c.liveSyncDurationCount||m===0)&&(m=i!==void 0?i:s*r);const y=r;return m+Math.min(this.stallCount*1,y)}get liveSyncPosition(){const e=this.estimateLiveEdge(),t=this.targetLatency,n=this.levelDetails;if(e===null||t===null||n===null)return null;const r=n.edge,i=e-t-this.edgeStalled,s=r-n.totalduration,o=r-(this.config.lowLatencyMode&&n.partTarget||n.targetduration);return Math.min(Math.max(s,i),o)}get drift(){const{levelDetails:e}=this;return e===null?1:e.drift}get edgeStalled(){const{levelDetails:e}=this;if(e===null)return 0;const t=(this.config.lowLatencyMode&&e.partTarget||e.targetduration)*3;return Math.max(e.age-t,0)}get forwardBufferLength(){const{media:e,levelDetails:t}=this;if(!e||!t)return 0;const n=e.buffered.length;return(n?e.buffered.end(n-1):t.edge)-this.currentTime}destroy(){this.unregisterListeners(),this.onMediaDetaching(),this.levelDetails=null,this.hls=this.timeupdateHandler=null}registerListeners(){this.hls.on(g.MEDIA_ATTACHED,this.onMediaAttached,this),this.hls.on(g.MEDIA_DETACHING,this.onMediaDetaching,this),this.hls.on(g.MANIFEST_LOADING,this.onManifestLoading,this),this.hls.on(g.LEVEL_UPDATED,this.onLevelUpdated,this),this.hls.on(g.ERROR,this.onError,this)}unregisterListeners(){this.hls.off(g.MEDIA_ATTACHED,this.onMediaAttached,this),this.hls.off(g.MEDIA_DETACHING,this.onMediaDetaching,this),this.hls.off(g.MANIFEST_LOADING,this.onManifestLoading,this),this.hls.off(g.LEVEL_UPDATED,this.onLevelUpdated,this),this.hls.off(g.ERROR,this.onError,this)}onMediaAttached(e,t){this.media=t.media,this.media.addEventListener("timeupdate",this.timeupdateHandler)}onMediaDetaching(){this.media&&(this.media.removeEventListener("timeupdate",this.timeupdateHandler),this.media=null)}onManifestLoading(){this.levelDetails=null,this._latency=null,this.stallCount=0}onLevelUpdated(e,{details:t}){this.levelDetails=t,t.advanced&&this.timeupdate(),!t.live&&this.media&&this.media.removeEventListener("timeupdate",this.timeupdateHandler)}onError(e,t){var n;t.details===z.BUFFER_STALLED_ERROR&&(this.stallCount++,(n=this.levelDetails)!=null&&n.live&&A.warn("[playback-rate-controller]: Stall detected, adjusting target latency"))}timeupdate(){const{media:e,levelDetails:t}=this;if(!e||!t)return;this.currentTime=e.currentTime;const n=this.computeLatency();if(n===null)return;this._latency=n;const{lowLatencyMode:r,maxLiveSyncPlaybackRate:i}=this.config;if(!r||i===1||!t.live)return;const s=this.targetLatency;if(s===null)return;const o=n-s,c=Math.min(this.maxLatency,s+t.targetduration);if(o.05&&this.forwardBufferLength>1){const y=Math.min(2,Math.max(1,i)),S=Math.round(2/(1+Math.exp(-.75*o-this.edgeStalled))*20)/20;e.playbackRate=Math.min(y,Math.max(1,S))}else e.playbackRate!==1&&e.playbackRate!==0&&(e.playbackRate=1)}estimateLiveEdge(){const{levelDetails:e}=this;return e===null?null:e.edge+e.age}computeLatency(){const e=this.estimateLiveEdge();return e===null?null:e-this.currentTime}}const mr=["NONE","TYPE-0","TYPE-1",null];function $n(a){return mr.indexOf(a)>-1}const cr=["SDR","PQ","HLG"];function Cr(a){return!!a&&cr.indexOf(a)>-1}var wr={No:"",Yes:"YES",v2:"v2"};function Tr(a){const{canSkipUntil:e,canSkipDateRanges:t,age:n}=a,r=n!!t).map(t=>t.substring(0,4)).join(","),this.addGroupId("audio",e.attrs.AUDIO),this.addGroupId("text",e.attrs.SUBTITLES)}get maxBitrate(){return Math.max(this.realBitrate,this.bitrate)}get averageBitrate(){return this._avgBitrate||this.realBitrate||this.bitrate}get attrs(){return this._attrs[0]}get codecs(){return this.attrs.CODECS||""}get pathwayId(){return this.attrs["PATHWAY-ID"]||"."}get videoRange(){return this.attrs["VIDEO-RANGE"]||"SDR"}get score(){return this.attrs.optionalFloat("SCORE",0)}get uri(){return this.url[0]||""}hasAudioGroup(e){return kr(this._audioGroups,e)}hasSubtitleGroup(e){return kr(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 kr(a,e){return!e||!a?!1:a.indexOf(e)!==-1}function Or(a,e){const t=e.startPTS;if(M(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.duration=n)}else e.sn>a.sn?a.cc===e.cc&&a.minEndPTS?e.start=a.start+(a.minEndPTS-a.start):e.start=a.start+a.duration:e.start=Math.max(a.start-e.duration,0)}function jr(a,e,t,n,r,i){n-t<=0&&(A.warn("Fragment should have a positive duration",e),n=t+e.duration,i=r+e.duration);let o=t,c=n;const m=e.startPTS,y=e.endPTS;if(M(m)){const ie=Math.abs(m-t);M(e.deltaPTS)?e.deltaPTS=Math.max(ie,e.deltaPTS):e.deltaPTS=ie,o=Math.max(t,m),t=Math.min(t,m),r=Math.min(r,e.startDTS),c=Math.min(n,y),n=Math.max(n,y),i=Math.max(i,e.endDTS)}const S=t-e.start;e.start!==0&&(e.start=t),e.duration=n-e.start,e.startPTS=t,e.maxStartPTS=o,e.startDTS=r,e.endPTS=n,e.minEndPTS=c,e.endDTS=i;const D=e.sn;if(!a||Da.endSN)return 0;let W;const k=D-a.startSN,G=a.fragments;for(G[k]=e,W=k;W>0;W--)Or(G[W],G[W-1]);for(W=k;W=0;o--){const c=n[o].initSegment;if(c){t=c;break}}a.fragmentHint&&delete a.fragmentHint.endPTS;let r;sr(a,e,(o,c,m,y)=>{if(e.skippedSegments&&c.cc!==o.cc){const S=o.cc-c.cc;for(let D=m;D{var m;c&&(!c.initSegment||c.initSegment.relurl===((m=t)==null?void 0:m.relurl))&&(c.initSegment=t)}),e.skippedSegments){if(e.deltaUpdateFailed=i.some(o=>!o),e.deltaUpdateFailed){A.warn("[level-helper] Previous playlist missing segments skipped in delta playlist");for(let o=e.skippedSegments;o--;)i.shift();e.startSN=i[0].sn}else e.canSkipDateRanges&&(e.dateRanges=_n(a.dateRanges,e.dateRanges,e.recentlyRemovedDateranges));e.startCC=e.fragments[0].cc,e.endCC=i[i.length-1].cc}Hn(a.partList,e.partList,(o,c)=>{c.elementaryStreams=o.elementaryStreams,c.stats=o.stats}),r?jr(e,r,r.startPTS,r.endPTS,r.startDTS,r.endDTS):Zn(a,e),i.length&&(e.totalduration=e.edge-i[0].start),e.driftStartTime=a.driftStartTime,e.driftStart=a.driftStart;const s=e.advancedDateTime;if(e.advanced&&s){const o=e.edge;e.driftStart||(e.driftStartTime=s,e.driftStart=o),e.driftEndTime=s,e.driftEnd=o}else e.driftEndTime=a.driftEndTime,e.driftEnd=a.driftEnd,e.advancedDateTime=a.advancedDateTime}function _n(a,e,t){const n=fe({},a);return t&&t.forEach(r=>{delete n[r]}),Object.keys(e).forEach(r=>{const i=new ze(e[r].attr,n[r]);i.isValid?n[r]=i:A.warn(`Ignoring invalid Playlist Delta Update DATERANGE tag: "${JSON.stringify(e[r].attr)}"`)}),n}function Hn(a,e,t){if(a&&e){let n=0;for(let r=0,i=a.length;r<=i;r++){const s=a[r],o=e[r+n];s&&o&&s.index===o.index&&s.fragment.sn===o.fragment.sn?t(s,o):n--}}}function sr(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,o=e.fragmentHint?e.fragments.concat(e.fragmentHint):e.fragments,c=a.fragmentHint?a.fragments.concat(a.fragmentHint):a.fragments;for(let m=r;m<=i;m++){const y=c[s+m];let S=o[m];n&&!S&&m=n.length||Jn(e,n[t].start)}function Jn(a,e){if(e){const t=a.fragments;for(let n=a.skippedSegments;ne){const i=n[n.length-1].duration*1e3;i{const{details:n}=e;n!=null&&n.fragments&&n.fragments.forEach(r=>{r.level=t})})}function Fn(a){switch(a.details){case z.FRAG_LOAD_TIMEOUT:case z.KEY_LOAD_TIMEOUT:case z.LEVEL_LOAD_TIMEOUT:case z.MANIFEST_LOAD_TIMEOUT:return!0}return!1}function jn(a,e){const t=Fn(e);return a.default[`${t?"timeout":"error"}Retry`]}function Yn(a,e){const t=a.backoff==="linear"?1:Math.pow(2,e);return Math.min(t*a.retryDelayMs,a.maxRetryDelayMs)}function br(a){return R(R({},a),{errorRetry:null,timeoutRetry:null})}function fr(a,e,t,n){if(!a)return!1;const r=n==null?void 0:n.code,i=e499)}const Sr={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 ar(a,e,t){if(e===null||!Array.isArray(a)||!a.length||!M(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;i0&&o<15e-7&&(t+=15e-7)}else t===0&&e[0].start===0&&(i=e[0]);if(i&&((!a||a.level===i.level)&&Rr(t,n,i)===0||Ir(i,a,Math.min(r,n))))return i;const s=Sr.search(e,Rr.bind(null,t,n));return s&&(s!==a||!i)?s:i}function Ir(a,e,t){if(e&&e.start===0&&e.level0){const n=e.tagList.reduce((r,i)=>(i[0]==="INF"&&(r+=parseFloat(i[1])),r),t);return a.start<=n}return!1}function Rr(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 Mr(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 Sr.search(a,t=>t.cce?-1:0)}var Dn={DoNothing:0,SendEndCallback:1,SendAlternateToPenaltyBox:2,RemoveAlternatePermanently:3,InsertDiscontinuity:4,RetryRequest:5},nr={None:0,MoveAllAlternatesMatchingHost:1,MoveAllAlternatesMatchingHDCP:2,SwitchToSDR:4};class Nr{constructor(e){this.hls=void 0,this.playlistError=0,this.penalizedRenditions={},this.log=void 0,this.warn=void 0,this.error=void 0,this.hls=e,this.log=A.log.bind(A,"[info]:"),this.warn=A.warn.bind(A,"[warning]:"),this.error=A.error.bind(A,"[error]:"),this.registerListeners()}registerListeners(){const e=this.hls;e.on(g.ERROR,this.onError,this),e.on(g.MANIFEST_LOADING,this.onManifestLoading,this),e.on(g.LEVEL_UPDATED,this.onLevelUpdated,this)}unregisterListeners(){const e=this.hls;e&&(e.off(g.ERROR,this.onError,this),e.off(g.ERROR,this.onErrorOut,this),e.off(g.MANIFEST_LOADING,this.onManifestLoading,this),e.off(g.LEVEL_UPDATED,this.onLevelUpdated,this))}destroy(){this.unregisterListeners(),this.hls=null,this.penalizedRenditions={}}startLoad(e){}stopLoad(){this.playlistError=0}getVariantLevelIndex(e){return(e==null?void 0:e.type)===Tt.MAIN?e.level:this.hls.loadLevel}onManifestLoading(){this.playlistError=0,this.penalizedRenditions={}}onLevelUpdated(){this.playlistError=0}onError(e,t){var n,r;if(t.fatal)return;const i=this.hls,s=t.context;switch(t.details){case z.FRAG_LOAD_ERROR:case z.FRAG_LOAD_TIMEOUT:case z.KEY_LOAD_ERROR:case z.KEY_LOAD_TIMEOUT:t.errorAction=this.getFragRetryOrSwitchAction(t);return;case z.FRAG_PARSING_ERROR:if((n=t.frag)!=null&&n.gap){t.errorAction={action:Dn.DoNothing,flags:nr.None};return}case z.FRAG_GAP:case z.FRAG_DECRYPT_ERROR:{t.errorAction=this.getFragRetryOrSwitchAction(t),t.errorAction.action=Dn.SendAlternateToPenaltyBox;return}case z.LEVEL_EMPTY_ERROR:case z.LEVEL_PARSING_ERROR:{var o,c;const m=t.parent===Tt.MAIN?t.level:i.loadLevel;t.details===z.LEVEL_EMPTY_ERROR&&((o=t.context)!=null&&(c=o.levelDetails)!=null&&c.live)?t.errorAction=this.getPlaylistRetryOrSwitchAction(t,m):(t.levelRetry=!1,t.errorAction=this.getLevelSwitchAction(t,m))}return;case z.LEVEL_LOAD_ERROR:case z.LEVEL_LOAD_TIMEOUT:typeof(s==null?void 0:s.level)=="number"&&(t.errorAction=this.getPlaylistRetryOrSwitchAction(t,s.level));return;case z.AUDIO_TRACK_LOAD_ERROR:case z.AUDIO_TRACK_LOAD_TIMEOUT:case z.SUBTITLE_LOAD_ERROR:case z.SUBTITLE_TRACK_LOAD_TIMEOUT:if(s){const m=i.levels[i.loadLevel];if(m&&(s.type===Pt.AUDIO_TRACK&&m.hasAudioGroup(s.groupId)||s.type===Pt.SUBTITLE_TRACK&&m.hasSubtitleGroup(s.groupId))){t.errorAction=this.getPlaylistRetryOrSwitchAction(t,i.loadLevel),t.errorAction.action=Dn.SendAlternateToPenaltyBox,t.errorAction.flags=nr.MoveAllAlternatesMatchingHost;return}}return;case z.KEY_SYSTEM_STATUS_OUTPUT_RESTRICTED:{const m=i.levels[i.loadLevel],y=m==null?void 0:m.attrs["HDCP-LEVEL"];y?t.errorAction={action:Dn.SendAlternateToPenaltyBox,flags:nr.MoveAllAlternatesMatchingHDCP,hdcpLevel:y}:this.keySystemError(t)}return;case z.BUFFER_ADD_CODEC_ERROR:case z.REMUX_ALLOC_ERROR:case z.BUFFER_APPEND_ERROR:t.errorAction=this.getLevelSwitchAction(t,(r=t.level)!=null?r:i.loadLevel);return;case z.INTERNAL_EXCEPTION:case z.BUFFER_APPENDING_ERROR:case z.BUFFER_FULL_ERROR:case z.LEVEL_SWITCH_ERROR:case z.BUFFER_STALLED_ERROR:case z.BUFFER_SEEK_OVER_HOLE:case z.BUFFER_NUDGE_ON_STALL:t.errorAction={action:Dn.DoNothing,flags:nr.None};return}t.type===X.KEY_SYSTEM_ERROR&&this.keySystemError(t)}keySystemError(e){const t=this.getVariantLevelIndex(e.frag);e.levelRetry=!1,e.errorAction=this.getLevelSwitchAction(e,t)}getPlaylistRetryOrSwitchAction(e,t){const n=this.hls,r=jn(n.config.playlistLoadPolicy,e),i=this.playlistError++;if(fr(r,i,Fn(e),e.response))return{action:Dn.RetryRequest,flags:nr.None,retryConfig:r,retryCount:i};const o=this.getLevelSwitchAction(e,t);return r&&(o.retryConfig=r,o.retryCount=i),o}getFragRetryOrSwitchAction(e){const t=this.hls,n=this.getVariantLevelIndex(e.frag),r=t.levels[n],{fragLoadPolicy:i,keyLoadPolicy:s}=t.config,o=jn(e.details.startsWith("key")?s:i,e),c=t.levels.reduce((y,S)=>y+S.fragmentError,0);if(r&&(e.details!==z.FRAG_GAP&&r.fragmentError++,fr(o,c,Fn(e),e.response)))return{action:Dn.RetryRequest,flags:nr.None,retryConfig:o,retryCount:c};const m=this.getLevelSwitchAction(e,n);return o&&(m.retryConfig=o,m.retryCount=c),m}getLevelSwitchAction(e,t){const n=this.hls;t==null&&(t=n.loadLevel);const r=this.hls.levels[t];if(r){var i,s;const m=e.details;r.loadError++,m===z.BUFFER_APPEND_ERROR&&r.fragmentError++;let y=-1;const{levels:S,loadLevel:D,minAutoLevel:W,maxAutoLevel:k}=n;n.autoLevelEnabled||(n.loadLevel=-1);const G=(i=e.frag)==null?void 0:i.type,We=(G===Tt.AUDIO&&m===z.FRAG_PARSING_ERROR||e.sourceBufferName==="audio"&&(m===z.BUFFER_ADD_CODEC_ERROR||m===z.BUFFER_APPEND_ERROR))&&S.some(({audioCodec:nn})=>r.audioCodec!==nn),ht=e.sourceBufferName==="video"&&(m===z.BUFFER_ADD_CODEC_ERROR||m===z.BUFFER_APPEND_ERROR)&&S.some(({codecSet:nn,audioCodec:kt})=>r.codecSet!==nn&&r.audioCodec===kt),{type:zt,groupId:At}=(s=e.context)!=null?s:{};for(let nn=S.length;nn--;){const kt=(nn+D)%S.length;if(kt!==D&&kt>=W&&kt<=k&&S[kt].loadError===0){var o,c;const gn=S[kt];if(m===z.FRAG_GAP&&G===Tt.MAIN&&e.frag){const In=S[kt].details;if(In){const Xt=Xn(e.frag,In.fragments,e.frag.start);if(Xt!=null&&Xt.gap)continue}}else{if(zt===Pt.AUDIO_TRACK&&gn.hasAudioGroup(At)||zt===Pt.SUBTITLE_TRACK&&gn.hasSubtitleGroup(At))continue;if(G===Tt.AUDIO&&(o=r.audioGroups)!=null&&o.some(In=>gn.hasAudioGroup(In))||G===Tt.SUBTITLE&&(c=r.subtitleGroups)!=null&&c.some(In=>gn.hasSubtitleGroup(In))||We&&r.audioCodec===gn.audioCodec||!We&&r.audioCodec!==gn.audioCodec||ht&&r.codecSet===gn.codecSet)continue}y=kt;break}}if(y>-1&&n.loadLevel!==y)return e.levelRetry=!0,this.playlistError=0,{action:Dn.SendAlternateToPenaltyBox,flags:nr.None,nextAutoLevel:y}}return{action:Dn.SendAlternateToPenaltyBox,flags:nr.MoveAllAlternatesMatchingHost}}onErrorOut(e,t){var n;switch((n=t.errorAction)==null?void 0:n.action){case Dn.DoNothing:break;case Dn.SendAlternateToPenaltyBox:this.sendAlternateToPenaltyBox(t),!t.errorAction.resolved&&t.details!==z.FRAG_GAP?t.fatal=!0:/MediaSource readyState: ended/.test(t.error.message)&&(this.warn(`MediaSource ended after "${t.sourceBufferName}" sourceBuffer append error. Attempting to recover from media error.`),this.hls.recoverMediaError());break;case Dn.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 nr.None:this.switchLevel(e,s);break;case nr.MoveAllAlternatesMatchingHDCP:i&&(t.maxHdcpLevel=mr[mr.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){t!==void 0&&e.errorAction&&(this.warn(`switching to level ${t} after ${e.details}`),this.hls.nextAutoLevel=t,e.errorAction.resolved=!0,this.hls.nextLoadLevel=this.hls.nextAutoLevel)}}class hr{constructor(e,t){this.hls=void 0,this.timer=-1,this.requestScheduled=-1,this.canLoad=!1,this.log=void 0,this.warn=void 0,this.log=A.log.bind(A,`${t}:`),this.warn=A.warn.bind(A,`${t}:`),this.hls=e}destroy(){this.clearTimer(),this.hls=this.log=this.warn=null}clearTimer(){this.timer!==-1&&(self.clearTimeout(this.timer),this.timer=-1)}startLoad(){this.canLoad=!0,this.requestScheduled=-1,this.loadPlaylist()}stopLoad(){this.canLoad=!1,this.clearTimer()}switchParams(e,t,n){const r=t==null?void 0:t.renditionReports;if(r){let i=-1;for(let s=0;s=0&&y>t.partTarget&&(c+=1)}const m=n&&Tr(n);return new Lr(o,c>=0?c:void 0,m)}}}loadPlaylist(e){this.requestScheduled===-1&&(this.requestScheduled=self.performance.now())}shouldLoadPlaylist(e){return this.canLoad&&!!e&&!!e.url&&(!e.details||e.details.live)}shouldReloadPlaylist(e){return this.timer===-1&&this.requestScheduled===-1&&this.shouldLoadPlaylist(e)}playlistLoaded(e,t,n){const{details:r,stats:i}=t,s=self.performance.now(),o=i.loading.first?Math.max(0,s-i.loading.first):0;if(r.advancedDateTime=Date.now()-o,r.live||n!=null&&n.live){if(r.reloaded(n),n&&this.log(`live playlist ${e} ${r.advanced?"REFRESHED "+r.lastPartSn+"-"+r.lastPartIndex:r.updated?"UPDATED":"MISSED"}`),n&&r.fragments.length>0&&Wr(n,r),!this.canLoad||!r.live)return;let c,m,y;if(r.canBlockReload&&r.endSN&&r.advanced){const ie=this.hls.config.lowLatencyMode,We=r.lastPartSn,mt=r.endSN,ht=r.lastPartIndex,zt=ht!==-1,At=We===mt,nn=ie?0:ht;zt?(m=At?mt+1:We,y=At?nn:ht+1):m=mt+1;const kt=r.age,gn=kt+r.ageHeader;let In=Math.min(gn-r.partTarget,r.targetduration*1.5);if(In>0){if(n&&In>n.tuneInGoal)this.warn(`CDN Tune-in goal increased from: ${n.tuneInGoal} to: ${In} with playlist age: ${r.age}`),In=0;else{const Xt=Math.floor(In/r.targetduration);if(m+=Xt,y!==void 0){const vn=Math.round(In%r.targetduration/r.partTarget);y+=vn}this.log(`CDN Tune-in age: ${r.ageHeader}s last advanced ${kt.toFixed(2)}s goal: ${In} skip sn ${Xt} to part ${y}`)}r.tuneInGoal=In}if(c=this.getDeliveryDirectives(r,t.deliveryDirectives,m,y),ie||!At){this.loadPlaylist(c);return}}else(r.canBlockReload||r.canSkipUntil)&&(c=this.getDeliveryDirectives(r,t.deliveryDirectives,m,y));const S=this.hls.mainForwardBufferInfo,D=S?S.end-S.len:0,W=(r.edge-D)*1e3,k=pr(r,W);r.updated&&s>this.requestScheduled+k&&(this.requestScheduled=i.loading.start),m!==void 0&&r.canBlockReload?this.requestScheduled=i.loading.first+k-(r.partTarget*1e3||1e3):this.requestScheduled===-1||this.requestScheduled+kthis.loadPlaylist(c),G)}else this.clearTimer()}getDeliveryDirectives(e,t,n,r){let i=Tr(e);return t!=null&&t.skip&&e.deltaUpdateFailed&&(n=t.msn,r=t.part,i=wr.No),new Lr(n,r,i)}checkRetry(e){const t=e.details,n=Fn(e),r=e.errorAction,{action:i,retryCount:s=0,retryConfig:o}=r||{},c=!!r&&!!o&&(i===Dn.RetryRequest||!r.resolved&&i===Dn.SendAlternateToPenaltyBox);if(c){var m;if(this.requestScheduled=-1,s>=o.maxNumRetry)return!1;if(n&&(m=e.context)!=null&&m.deliveryDirectives)this.warn(`Retrying playlist loading ${s+1}/${o.maxNumRetry} after "${t}" without delivery-directives`),this.loadPlaylist();else{const y=Yn(o,s);this.timer=self.setTimeout(()=>this.loadPlaylist(),y),this.warn(`Retrying playlist loading ${s+1}/${o.maxNumRetry} after "${t}" in ${y}ms`)}e.levelRetry=!0,r.resolved=!0}return c}}class qr{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 mi{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 qr(e),this.fast_=new qr(t),this.defaultTTFB_=r,this.ttfb_=new qr(e)}update(e,t){const{slow_:n,fast_:r,ttfb_:i}=this;n.halfLife!==e&&(this.slow_=new qr(e,n.getEstimate(),n.getTotalWeight())),r.halfLife!==t&&(this.fast_=new qr(t,r.getEstimate(),r.getTotalWeight())),i.halfLife!==e&&(this.ttfb_=new qr(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_}destroy(){}}const di={supported:!0,configurations:[],decodingInfoResults:[{supported:!0,powerEfficient:!0,smooth:!0}]},si={};function zi(a,e,t,n,r,i){const s=a.audioCodec?a.audioGroups:null,o=i==null?void 0:i.audioCodec,c=i==null?void 0:i.channels,m=c?parseInt(c):o?1/0:2;let y=null;if(s!=null&&s.length)try{s.length===1&&s[0]?y=e.groups[s[0]].channels:y=s.reduce((S,D)=>{if(D){const W=e.groups[D];if(!W)throw new Error(`Audio track group ${D} not found`);Object.keys(W.channels).forEach(k=>{S[k]=(S[k]||0)+W.channels[k]})}return S},{2:0})}catch(S){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))||!!y&&M(m)&&Object.keys(y).some(S=>parseInt(S)>m)}function Li(a,e,t){const n=a.videoCodec,r=a.audioCodec;if(!n||!r||!t)return Promise.resolve(di);const i={width:a.width,height:a.height,bitrate:Math.ceil(Math.max(a.bitrate*.9,a.averageBitrate)),framerate:a.frameRate||30},s=a.videoRange;s!=="SDR"&&(i.transferFunction=s.toLowerCase());const o=n.split(",").map(c=>({type:"media-source",video:R(R({},i),{},{contentType:Ie(c,"video")})}));return r&&a.audioGroups&&a.audioGroups.forEach(c=>{var m;c&&((m=e.groups[c])==null||m.tracks.forEach(y=>{if(y.groupId===c){const S=y.channels||"",D=parseFloat(S);M(D)&&D>2&&o.push.apply(o,r.split(",").map(W=>({type:"media-source",audio:{contentType:Ie(W,"audio"),channels:""+D}})))}}))}),Promise.all(o.map(c=>{const m=Ei(c);return si[m]||(si[m]=t.decodingInfo(c))})).then(c=>({supported:!c.some(m=>!m.supported),configurations:o,decodingInfoResults:c})).catch(c=>({supported:!1,configurations:o,decodingInfoResults:[],error:c}))}function Ei(a){const{audio:e,video:t}=a,n=t||e;if(n){const r=n.contentType.split('"')[1];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""}function yi(){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 Ii(a,e){let t=!1,n=[];return a&&(t=a!=="SDR",n=[a]),e&&(n=e.allowedVideoRanges||cr.slice(0),t=e.preferHDR!==void 0?e.preferHDR:yi(),t?n=n.filter(r=>r!=="SDR"):n=["SDR"]),{preferHDR:t,allowedVideoRanges:n}}function Ai(a,e,t,n,r){const i=Object.keys(a),s=n==null?void 0:n.channels,o=n==null?void 0:n.audioCodec,c=s&&parseInt(s)===2;let m=!0,y=!1,S=1/0,D=1/0,W=1/0,k=0,G=[];const{preferHDR:ie,allowedVideoRanges:We}=Ii(e,r);for(let At=i.length;At--;){const nn=a[i[At]];m=nn.channels[2]>0,S=Math.min(S,nn.minHeight),D=Math.min(D,nn.minFramerate),W=Math.min(W,nn.minBitrate);const kt=We.filter(gn=>nn.videoRanges[gn]>0);kt.length>0&&(y=!0,G=kt)}S=M(S)?S:0,D=M(D)?D:0;const mt=Math.max(1080,S),ht=Math.max(30,D);return W=M(W)?W:t,t=Math.max(W,t),y||(e=void 0,G=[]),{codecSet:i.reduce((At,nn)=>{const kt=a[nn];if(nn===At)return At;if(kt.minBitrate>t)return Zr(nn,`min bitrate of ${kt.minBitrate} > current estimate of ${t}`),At;if(!kt.hasDefaultAudio)return Zr(nn,"no renditions with default or auto-select sound found"),At;if(o&&nn.indexOf(o.substring(0,4))%5!==0)return Zr(nn,`audio codec preference "${o}" not found`),At;if(s&&!c){if(!kt.channels[s])return Zr(nn,`no renditions with ${s} channel sound found (channels options: ${Object.keys(kt.channels)})`),At}else if((!o||c)&&m&&kt.channels[2]===0)return Zr(nn,"no renditions with stereo sound found"),At;return kt.minHeight>mt?(Zr(nn,`min resolution of ${kt.minHeight} > maximum of ${mt}`),At):kt.minFramerate>ht?(Zr(nn,`min framerate of ${kt.minFramerate} > maximum of ${ht}`),At):G.some(gn=>kt.videoRanges[gn]>0)?kt.maxScore=Ve(At)||kt.fragmentError>a[At].fragmentError)?At:(k=kt.maxScore,nn):(Zr(nn,`no variants with VIDEO-RANGE of ${JSON.stringify(G)} found`),At)},void 0),videoRanges:G,preferHDR:ie,minFramerate:D,minBitrate:W}}function Zr(a,e){A.log(`[abr] start candidates with "${a}" ignored because ${e}`)}function Ri(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 Di(a,e,t,n){return a.slice(t,n+1).reduce((r,i)=>{if(!i.codecSet)return r;const s=i.audioGroups;let o=r[i.codecSet];o||(r[i.codecSet]=o={minBitrate:1/0,minHeight:1/0,minFramerate:1/0,maxScore:0,videoRanges:{SDR:0},channels:{2:0},hasDefaultAudio:!s,fragmentError:0}),o.minBitrate=Math.min(o.minBitrate,i.bitrate);const c=Math.min(i.height,i.width);return o.minHeight=Math.min(o.minHeight,c),o.minFramerate=Math.min(o.minFramerate,i.frameRate),o.maxScore=Math.max(o.maxScore,i.score),o.fragmentError+=i.fragmentError,o.videoRanges[i.videoRange]=(o.videoRanges[i.videoRange]||0)+1,s&&s.forEach(m=>{if(!m)return;const y=e.groups[m];y&&(o.hasDefaultAudio=o.hasDefaultAudio||e.hasDefaultAudio?y.hasDefault:y.hasAutoSelect||!e.hasDefaultAudio&&!e.hasAutoSelectAudio,Object.keys(y.channels).forEach(S=>{o.channels[S]=(o.channels[S]||0)+y.channels[S]}))}),r},{})}function ei(a,e,t){if("attrs"in a){const n=e.indexOf(a);if(n!==-1)return n}for(let n=0;nn.indexOf(r)===-1)}function Gn(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 Hr(a,e,t,n,r){const i=e[n],o=e.reduce((D,W,k)=>{const G=W.uri;return(D[G]||(D[G]=[])).push(k),D},{})[i.uri];o.length>1&&(n=Math.max.apply(Math,o));const c=i.videoRange,m=i.frameRate,y=i.codecSet.substring(0,4),S=Kr(e,n,D=>{if(D.videoRange!==c||D.frameRate!==m||D.codecSet.substring(0,4)!==y)return!1;const W=D.audioGroups,k=t.filter(G=>!W||W.indexOf(G.groupId)!==-1);return ei(a,k,r)>-1});return S>-1?S:Kr(e,n,D=>{const W=D.audioGroups,k=t.filter(G=>!W||W.indexOf(G.groupId)!==-1);return ei(a,k,r)>-1})}function Kr(a,e,t){for(let n=e;n>-1;n--)if(t(a[n]))return n;for(let n=e+1;n{const{fragCurrent:t,partCurrent:n,hls:r}=this,{autoLevelEnabled:i,media:s}=r;if(!t||!s)return;const o=performance.now(),c=n?n.stats:t.stats,m=n?n.duration:t.duration,y=o-c.loading.start,S=r.minAutoLevel;if(c.aborted||c.loaded&&c.loaded===c.total||t.level<=S){this.clearTimer(),this._nextAutoLevel=-1;return}if(!i||s.paused||!s.playbackRate||!s.readyState)return;const D=r.mainForwardBufferInfo;if(D===null)return;const W=this.bwEstimator.getEstimateTTFB(),k=Math.abs(s.playbackRate);if(y<=Math.max(W,1e3*(m/(k*2))))return;const G=D.len/k,ie=c.loading.first?c.loading.first-c.loading.start:-1,We=c.loaded&&ie>-1,mt=this.getBwEstimate(),ht=r.levels,zt=ht[t.level],At=c.total||Math.max(c.loaded,Math.round(m*zt.averageBitrate/8));let nn=We?y-ie:y;nn<1&&We&&(nn=Math.min(y,c.loaded*8/mt));const kt=We?c.loaded*1e3/nn:0,gn=kt?(At-c.loaded)/kt:At*8/mt+W/1e3;if(gn<=G)return;const In=kt?kt*8:mt;let Xt=Number.POSITIVE_INFINITY,vn;for(vn=t.level-1;vn>S;vn--){const Bn=ht[vn].maxBitrate;if(Xt=this.getTimeToLoadFrag(W/1e3,In,m*Bn,!ht[vn].details),Xt=gn||Xt>m*10)return;r.nextLoadLevel=r.nextAutoLevel=vn,We?this.bwEstimator.sample(y-Math.min(W,ie),c.loaded):this.bwEstimator.sampleTTFB(y);const rr=ht[vn].maxBitrate;this.getBwEstimate()*this.hls.config.abrBandWidthUpFactor>rr&&this.resetEstimator(rr),this.clearTimer(),A.warn(`[abr] Fragment ${t.sn}${n?" part "+n.index:""} of level ${t.level} is loading too slowly; Time to underbuffer: ${G.toFixed(3)} s Estimated load time for current fragment: ${gn.toFixed(3)} s Estimated load time for down switch fragment: ${Xt.toFixed(3)} s TTFB estimate: ${ie|0} ms Current BW estimate: ${M(mt)?mt|0:"Unknown"} bps New BW estimate: ${this.getBwEstimate()|0} bps Switching to level ${vn} @ ${rr|0} bps`),r.trigger(g.FRAG_LOAD_EMERGENCY_ABORTED,{frag:t,part:n,stats:c})},this.hls=e,this.bwEstimator=this.initEstimator(),this.registerListeners()}resetEstimator(e){e&&(A.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 mi(e.abrEwmaSlowVoD,e.abrEwmaFastVoD,e.abrEwmaDefaultEstimate)}registerListeners(){const{hls:e}=this;e.on(g.MANIFEST_LOADING,this.onManifestLoading,this),e.on(g.FRAG_LOADING,this.onFragLoading,this),e.on(g.FRAG_LOADED,this.onFragLoaded,this),e.on(g.FRAG_BUFFERED,this.onFragBuffered,this),e.on(g.LEVEL_SWITCHING,this.onLevelSwitching,this),e.on(g.LEVEL_LOADED,this.onLevelLoaded,this),e.on(g.LEVELS_UPDATED,this.onLevelsUpdated,this),e.on(g.MAX_AUTO_LEVEL_UPDATED,this.onMaxAutoLevelUpdated,this),e.on(g.ERROR,this.onError,this)}unregisterListeners(){const{hls:e}=this;e&&(e.off(g.MANIFEST_LOADING,this.onManifestLoading,this),e.off(g.FRAG_LOADING,this.onFragLoading,this),e.off(g.FRAG_LOADED,this.onFragLoaded,this),e.off(g.FRAG_BUFFERED,this.onFragBuffered,this),e.off(g.LEVEL_SWITCHING,this.onLevelSwitching,this),e.off(g.LEVEL_LOADED,this.onLevelLoaded,this),e.off(g.LEVELS_UPDATED,this.onLevelsUpdated,this),e.off(g.MAX_AUTO_LEVEL_UPDATED,this.onMaxAutoLevelUpdated,this),e.off(g.ERROR,this.onError,this))}destroy(){this.unregisterListeners(),this.clearTimer(),this.hls=this._abandonRulesCheck=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 z.BUFFER_ADD_CODEC_ERROR:case z.BUFFER_APPEND_ERROR:this.lastLoadedFragLevel=-1,this.firstSelection=-1;break;case z.FRAG_LOAD_TIMEOUT:{const n=t.frag,{fragCurrent:r,partCurrent:i}=this;if(n&&r&&n.sn===r.sn&&n.level===r.level){const s=performance.now(),o=i?i.stats:n.stats,c=s-o.loading.start,m=o.loading.first?o.loading.first-o.loading.start:-1;if(o.loaded&&m>-1){const S=this.bwEstimator.getEstimateTTFB();this.bwEstimator.sample(c-Math.min(S,m),o.loaded)}else this.bwEstimator.sampleTTFB(c)}break}}}getTimeToLoadFrag(e,t,n,r){const i=e+n/t,s=r?this.lastLevelLoadSec:0;return i+s}onLevelLoaded(e,t){const n=this.hls.config,{loading:r}=t.stats,i=r.end-r.start;M(i)&&(this.lastLevelLoadSec=i/1e3),t.details.live?this.bwEstimator.update(n.abrEwmaSlowLive,n.abrEwmaFastLive):this.bwEstimator.update(n.abrEwmaSlowVoD,n.abrEwmaFastVoD)}onFragLoaded(e,{frag:t,part:n}){const r=n?n.stats:t.stats;if(t.type===Tt.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],o=(s.loaded?s.loaded.bytes:0)+r.loaded,c=(s.loaded?s.loaded.duration:0)+i;s.loaded={bytes:o,duration:c},s.realBitrate=Math.round(8*o/c)}if(t.bitrateTest){const i={stats:r,frag:t,part:n,id:t.type};this.onFragBuffered(g.FRAG_BUFFERED,i),t.bitrateTest=!1}else this.lastLoadedFragLevel=t.level}}onFragBuffered(e,t){const{frag:n,part:r}=t,i=r!=null&&r.stats.loaded?r.stats:n.stats;if(i.aborted||this.ignoreFragment(n))return;const s=i.parsing.end-i.loading.start-Math.min(i.loading.first-i.loading.start,this.bwEstimator.getEstimateTTFB());this.bwEstimator.sample(s,i.loaded),i.bwEstimate=this.getBwEstimate(),n.bitrateTest?this.bitrateTestDelay=s/1e3:this.bitrateTestDelay=0}ignoreFragment(e){return e.type!==Tt.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,o=Math.min(Math.max(s,t),e);return A.warn(`[abr] Could not find best starting auto level. Defaulting to first in playlist ${s} clamped to ${o}`),o}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,{maxAutoLevel:r,config:i,minAutoLevel:s}=n,o=t?t.duration:e?e.duration:0,c=this.getBwEstimate(),m=this.getStarvationDelay();let y=i.abrBandWidthFactor,S=i.abrBandWidthUpFactor;if(m){const ie=this.findBestLevel(c,s,r,m,0,y,S);if(ie>=0)return ie}let D=o?Math.min(o,i.maxStarvationDelay):i.maxStarvationDelay;if(!m){const ie=this.bitrateTestDelay;ie&&(D=(o?Math.min(o,i.maxLoadingDelay):i.maxLoadingDelay)-ie,A.info(`[abr] bitrate test took ${Math.round(1e3*ie)}ms, set first fragment max fetchDuration to ${Math.round(1e3*D)} ms`),y=S=1)}const W=this.findBestLevel(c,s,r,m,D,y,S);if(A.info(`[abr] ${m?"rebuffering expected":"buffer is empty"}, optimal quality level ${W}`),W>-1)return W;const k=n.levels[s],G=n.levels[n.loadLevel];return(k==null?void 0:k.bitrate)<(G==null?void 0:G.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,o){var c;const m=r+i,y=this.lastLoadedFragLevel,S=y===-1?this.hls.firstLevel:y,{fragCurrent:D,partCurrent:W}=this,{levels:k,allAudioTracks:G,loadLevel:ie,config:We}=this.hls;if(k.length===1)return 0;const mt=k[S],ht=!!(mt!=null&&(c=mt.details)!=null&&c.live),zt=ie===-1||y===-1;let At,nn="SDR",kt=(mt==null?void 0:mt.frameRate)||0;const{audioPreference:gn,videoPreference:In}=We,Xt=this.audioTracksByGroup||(this.audioTracksByGroup=Ri(G));if(zt){if(this.firstSelection!==-1)return this.firstSelection;const qn=this.codecTiers||(this.codecTiers=Di(k,Xt,t,n)),Qn=Ai(qn,nn,e,gn,In),{codecSet:yr,videoRanges:Br,minFramerate:Un,minBitrate:Mn,preferHDR:xr}=Qn;At=yr,nn=xr?Br[Br.length-1]:Br[0],kt=Un,e=Math.max(e,Mn),A.log(`[abr] picked start tier ${JSON.stringify(Qn)}`)}else At=mt==null?void 0:mt.codecSet,nn=mt==null?void 0:mt.videoRange;const vn=W?W.duration:D?D.duration:0,rr=this.bwEstimator.getEstimateTTFB()/1e3,Bn=[];for(let qn=n;qn>=t;qn--){var tr;const Qn=k[qn],yr=qn>S;if(!Qn)continue;if(We.useMediaCapabilities&&!Qn.supportedResult&&!Qn.supportedPromise){const Vr=navigator.mediaCapabilities;typeof(Vr==null?void 0:Vr.decodingInfo)=="function"&&zi(Qn,Xt,nn,kt,e,gn)?(Qn.supportedPromise=Li(Qn,Xt,Vr),Qn.supportedPromise.then(Yr=>{if(!this.hls)return;Qn.supportedResult=Yr;const Jr=this.hls.levels,ci=Jr.indexOf(Qn);Yr.error?A.warn(`[abr] MediaCapabilities decodingInfo error: "${Yr.error}" for level ${ci} ${JSON.stringify(Yr)}`):Yr.supported||(A.warn(`[abr] Unsupported MediaCapabilities decodingInfo result for level ${ci} ${JSON.stringify(Yr)}`),ci>-1&&Jr.length>1&&(A.log(`[abr] Removing unsupported level ${ci}`),this.hls.removeLevel(ci)))})):Qn.supportedResult=di}if(At&&Qn.codecSet!==At||nn&&Qn.videoRange!==nn||yr&&kt>Qn.frameRate||!yr&&kt>0&&kt=vn*2&&i===0?k[qn].averageBitrate:k[qn].maxBitrate,ur=this.getTimeToLoadFrag(rr,Mn,xr*Un,Br===void 0);if(Mn>=xr&&(qn===y||Qn.loadError===0&&Qn.fragmentError===0)&&(ur<=rr||!M(ur)||ht&&!this.bitrateTestDelay||ur${qn} adjustedbw(${Math.round(Mn)})-bitrate=${Math.round(Mn-xr)} ttfb:${rr.toFixed(1)} avgDuration:${Un.toFixed(1)} maxFetchDuration:${m.toFixed(1)} fetchDuration:${ur.toFixed(1)} firstSelection:${zt} codecSet:${At} videoRange:${nn} hls.loadLevel:${ie}`)),zt&&(this.firstSelection=qn),qn}}return-1}set nextAutoLevel(e){const{maxAutoLevel:t,minAutoLevel:n}=this.hls,r=Math.min(Math.max(e,n),t);this._nextAutoLevel!==r&&(this.nextAutoLevelKey="",this._nextAutoLevel=r)}}class Xr{constructor(){this._boundTick=void 0,this._tickTimer=null,this._tickInterval=null,this._tickCallCount=0,this._boundTick=this.tick.bind(this)}destroy(){this.onHandlerDestroying(),this.onHandlerDestroyed()}onHandlerDestroying(){this.clearNextTick(),this.clearInterval()}onHandlerDestroyed(){}hasInterval(){return!!this._tickInterval}hasNextTick(){return!!this._tickTimer}setInterval(e){return this._tickInterval?!1:(this._tickCallCount=0,this._tickInterval=self.setInterval(this._boundTick,e),!0)}clearInterval(){return this._tickInterval?(self.clearInterval(this._tickInterval),this._tickInterval=null,!0):!1}clearNextTick(){return this._tickTimer?(self.clearTimeout(this._tickTimer),this._tickTimer=null,!0):!1}tick(){this._tickCallCount++,this._tickCallCount===1&&(this.doTick(),this._tickCallCount>1&&this.tickImmediate(),this._tickCallCount=0)}tickImmediate(){this.clearNextTick(),this._tickTimer=self.setTimeout(this._boundTick,0)}doTick(){}}var gr={NOT_LOADED:"NOT_LOADED",APPENDING:"APPENDING",PARTIAL:"PARTIAL",OK:"OK"};class ii{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(g.BUFFER_APPENDED,this.onBufferAppended,this),e.on(g.FRAG_BUFFERED,this.onFragBuffered,this),e.on(g.FRAG_LOADED,this.onFragLoaded,this)}_unregisterListeners(){const{hls:e}=this;e.off(g.BUFFER_APPENDED,this.onBufferAppended,this),e.off(g.FRAG_BUFFERED,this.onFragBuffered,this),e.off(g.FRAG_LOADED,this.onFragLoaded,this)}destroy(){this._unregisterListeners(),this.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){const{fragments:n}=this,r=Object.keys(n);for(let i=r.length;i--;){const s=n[r[i]];if((s==null?void 0:s.body.type)===t&&s.buffered){const o=s.body;if(o.start<=e&&e<=o.end)return o}}return null}detectEvictedFragments(e,t,n,r){this.timeRanges&&(this.timeRanges[e]=t);const i=(r==null?void 0:r.fragment.sn)||-1;Object.keys(this.fragments).forEach(s=>{const o=this.fragments[s];if(!o||i>=o.body.sn)return;if(!o.buffered&&!o.loaded){o.body.type===n&&this.removeFragment(o.body);return}const c=o.range[e];c&&c.time.some(m=>{const y=!this.isTimeBuffered(m.startPTS,m.endPTS,t);return y&&this.removeFragment(o.body),y})})}detectPartialFragments(e){const t=this.timeRanges,{frag:n,part:r}=e;if(!t||n.sn==="initSegment")return;const i=ti(n),s=this.fragments[i];if(!s||s.buffered&&n.gap)return;const o=!n.relurl;Object.keys(t).forEach(c=>{const m=n.elementaryStreams[c];if(!m)return;const y=t[c],S=o||m.partial===!0;s.range[c]=this.getBufferedTimes(n,r,S,y)}),s.loaded=null,Object.keys(s.range).length?(s.buffered=!0,(s.body.endList=n.endList||s.body.endList)&&(this.endListFragments[s.body.type]=s),Qr(s)||this.removeParts(n.sn-1,n.type)):this.removeFragment(s.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=ti(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,o=e.end,c=e.minEndPTS||o,m=e.maxStartPTS||s;for(let y=0;y=S&&c<=D){i.time.push({startPTS:Math.max(s,r.start(y)),endPTS:Math.min(o,r.end(y))});break}else if(sS){const W=Math.max(s,r.start(y)),k=Math.min(o,r.end(y));k>W&&(i.partial=!0,i.time.push({startPTS:W,endPTS:k}))}else if(o<=S)break}return i}getPartialFragment(e){let t=null,n,r,i,s=0;const{bufferPadding:o,fragments:c}=this;return Object.keys(c).forEach(m=>{const y=c[m];y&&Qr(y)&&(r=y.body.start-o,i=y.body.end+o,e>=r&&e<=i&&(n=Math.min(e-r,i-e),s<=n&&(t=y.body,s=n)))}),t}isEndListAppended(e){const t=this.endListFragments[e];return t!==void 0&&(t.buffered||Qr(t))}getState(e){const t=ti(e),n=this.fragments[t];return n?n.buffered?Qr(n)?gr.PARTIAL:gr.OK:gr.APPENDING:gr.NOT_LOADED}isTimeBuffered(e,t,n){let r,i;for(let s=0;s=r&&t<=i)return!0;if(t<=r)return!1}return!1}onFragLoaded(e,t){const{frag:n,part:r}=t;if(n.sn==="initSegment"||n.bitrateTest)return;const i=r?null:t,s=ti(n);this.fragments[s]={body:n,appendedPTS:null,loaded:i,buffered:!1,range:Object.create(null)}}onBufferAppended(e,t){const{frag:n,part:r,timeRanges:i}=t;if(n.sn==="initSegment")return;const s=n.type;if(r){let o=this.activePartLists[s];o||(this.activePartLists[s]=o=[]),o.push(r)}this.timeRanges=i,Object.keys(i).forEach(o=>{const c=i[o];this.detectEvictedFragments(o,c,s,r)})}onFragBuffered(e,t){this.detectPartialFragments(t)}hasFragment(e){const t=ti(e);return!!this.fragments[t]}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 o=this.fragments[s];if(!o)return;const c=o.body;c.type!==n||r&&!c.gap||c.starte&&(o.buffered||i)&&this.removeFragment(c)})}removeFragment(e){const t=ti(e);e.stats.loaded=0,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(){this.fragments=Object.create(null),this.endListFragments=Object.create(null),this.activePartLists=Object.create(null),this.hasGaps=!1}}function Qr(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 ti(a){return`${a.type}_${a.level}_${a.sn}`}const ai={length:0,start:()=>0,end:()=>0};class Er{static isBuffered(e,t){try{if(e){const n=Er.getBuffered(e);for(let r=0;r=n.start(r)&&t<=n.end(r))return!0}}catch(n){}return!1}static bufferInfo(e,t,n){try{if(e){const r=Er.getBuffered(e),i=[];let s;for(s=0;sS&&(r[y-1].end=e[m].end):r.push(e[m])}else r.push(e[m])}else r=e;let i=0,s,o=t,c=t;for(let m=0;m=y&&tt.startCC||a&&a.cc{if(this.loader&&this.loader.destroy(),e.gap)if(e.tagList.some(W=>W[0]==="GAP")){c(Fr(e));return}else e.gap=!1;const m=this.loader=e.loader=i?new i(r):new s(r),y=Ar(e),S=br(r.fragLoadPolicy.default),D={loadPolicy:S,timeout:S.maxLoadTimeMs,maxRetry:0,retryDelay:0,maxRetryDelay:0,highWaterMark:e.sn==="initSegment"?1/0:Yi};e.stats=m.stats,m.load(y,D,{onSuccess:(W,k,G,ie)=>{this.resetLoader(e,m);let We=W.data;G.resetIV&&e.decryptdata&&(e.decryptdata.iv=new Uint8Array(We.slice(0,16)),We=We.slice(16)),o({frag:e,part:null,payload:We,networkDetails:ie})},onError:(W,k,G,ie)=>{this.resetLoader(e,m),c(new zr({type:X.NETWORK_ERROR,details:z.FRAG_LOAD_ERROR,fatal:!1,frag:e,response:R({url:n,data:void 0},W),error:new Error(`HTTP Error ${W.code} ${W.text}`),networkDetails:G,stats:ie}))},onAbort:(W,k,G)=>{this.resetLoader(e,m),c(new zr({type:X.NETWORK_ERROR,details:z.INTERNAL_ABORTED,fatal:!1,frag:e,error:new Error("Aborted"),networkDetails:G,stats:W}))},onTimeout:(W,k,G)=>{this.resetLoader(e,m),c(new zr({type:X.NETWORK_ERROR,details:z.FRAG_LOAD_TIMEOUT,fatal:!1,frag:e,error:new Error(`Timeout after ${D.timeout}ms`),networkDetails:G,stats:W}))},onProgress:(W,k,G,ie)=>{t&&t({frag:e,part:null,payload:G,networkDetails:ie})}})})}loadPart(e,t,n){this.abort();const r=this.config,i=r.fLoader,s=r.loader;return new Promise((o,c)=>{if(this.loader&&this.loader.destroy(),e.gap||t.gap){c(Fr(e,t));return}const m=this.loader=e.loader=i?new i(r):new s(r),y=Ar(e,t),S=br(r.fragLoadPolicy.default),D={loadPolicy:S,timeout:S.maxLoadTimeMs,maxRetry:0,retryDelay:0,maxRetryDelay:0,highWaterMark:Yi};t.stats=m.stats,m.load(y,D,{onSuccess:(W,k,G,ie)=>{this.resetLoader(e,m),this.updateStatsFromPart(e,t);const We={frag:e,part:t,payload:W.data,networkDetails:ie};n(We),o(We)},onError:(W,k,G,ie)=>{this.resetLoader(e,m),c(new zr({type:X.NETWORK_ERROR,details:z.FRAG_LOAD_ERROR,fatal:!1,frag:e,part:t,response:R({url:y.url,data:void 0},W),error:new Error(`HTTP Error ${W.code} ${W.text}`),networkDetails:G,stats:ie}))},onAbort:(W,k,G)=>{e.stats.aborted=t.stats.aborted,this.resetLoader(e,m),c(new zr({type:X.NETWORK_ERROR,details:z.INTERNAL_ABORTED,fatal:!1,frag:e,part:t,error:new Error("Aborted"),networkDetails:G,stats:W}))},onTimeout:(W,k,G)=>{this.resetLoader(e,m),c(new zr({type:X.NETWORK_ERROR,details:z.FRAG_LOAD_TIMEOUT,fatal:!1,frag:e,part:t,error:new Error(`Timeout after ${D.timeout}ms`),networkDetails:G,stats:W}))}})})}updateStatsFromPart(e,t){const n=e.stats,r=t.stats,i=r.total;if(n.loaded+=r.loaded,i){const c=Math.round(e.duration/t.duration),m=Math.min(Math.round(n.loaded/i),c),S=(c-m)*Math.round(n.loaded/m);n.total=n.loaded+S}else n.total=Math.max(n.loaded,n.total);const s=n.loading,o=r.loading;s.start?s.first+=o.first-o.start:(s.start=o.start,s.first=o.first),s.end=o.end}resetLoader(e,t){e.loader=null,this.loader===t&&(self.clearTimeout(this.partLoadTimeout),this.loader=null),t.destroy()}}function Ar(a,e=null){const t=e||a,n={frag:a,part:e,responseType:"arraybuffer",url:t.url,headers:{},rangeStart:0,rangeEnd:0},r=t.byteRangeStartOffset,i=t.byteRangeEndOffset;if(M(r)&&M(i)){var s;let o=r,c=i;if(a.sn==="initSegment"&&((s=a.decryptdata)==null?void 0:s.method)==="AES-128"){const m=i-r;m%16&&(c=i+(16-m%16)),r!==0&&(n.resetIV=!0,o=r-16)}n.rangeStart=o,n.rangeEnd=c}return n}function Fr(a,e){const t=new Error(`GAP ${a.gap?"tag":"attribute"} found`),n={type:X.MEDIA_ERROR,details:z.FRAG_GAP,fatal:!1,frag:a,error:t,networkDetails:null};return e&&(n.part=e),(e||a).stats.aborted=!0,new zr(n)}class zr extends Error{constructor(e){super(e.error.message),this.data=void 0,this.data=e}}class ni{constructor(e,t){this.subtle=void 0,this.aesIV=void 0,this.subtle=e,this.aesIV=t}decrypt(e,t){return this.subtle.decrypt({name:"AES-CBC",iv:this.aesIV},t,e)}}class Mi{constructor(e,t){this.subtle=void 0,this.key=void 0,this.subtle=e,this.key=t}expandKey(){return this.subtle.importKey("raw",this.key,{name:"AES-CBC"},!1,["encrypt","decrypt"])}}function Hi(a){const e=a.byteLength,t=e&&new DataView(a.buffer).getUint8(e-1);return t?V(a,0,e-t):a}class hs{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],o=n[3],c=this.invSubMix,m=c[0],y=c[1],S=c[2],D=c[3],W=new Uint32Array(256);let k=0,G=0,ie=0;for(ie=0;ie<256;ie++)ie<128?W[ie]=ie<<1:W[ie]=ie<<1^283;for(ie=0;ie<256;ie++){let We=G^G<<1^G<<2^G<<3^G<<4;We=We>>>8^We&255^99,e[k]=We,t[We]=k;const mt=W[k],ht=W[mt],zt=W[ht];let At=W[We]*257^We*16843008;r[k]=At<<24|At>>>8,i[k]=At<<16|At>>>16,s[k]=At<<8|At>>>24,o[k]=At,At=zt*16843009^ht*65537^mt*257^k*16843008,m[We]=At<<24|At>>>8,y[We]=At<<16|At>>>16,S[We]=At<<8|At>>>24,D[We]=At,k?(k=mt^W[W[W[zt^mt]]],G^=W[W[G]]):k=G=1}}expandKey(e){const t=this.uint8ArrayToUint32Array_(e);let n=!0,r=0;for(;rthis.subtle?(this.logOnce("WebCrypto AES decrypt"),new ni(this.subtle,new Uint8Array(n)).decrypt(e.buffer,r)):Promise.reject(new Error("web crypto not initialized"))).catch(r=>(A.warn(`[decrypter]: WebCrypto Error, disable WebCrypto API, ${r.name}: ${r.message}`),this.onWebCryptoError(e,t,n)))}onWebCryptoError(e,t,n){this.useSoftware=!0,this.logEnabled=!0,this.softwareDecrypt(e,t,n);const r=this.flush();if(r)return r.buffer;throw new Error("WebCrypto and softwareDecrypt: failed to decrypt data")}getValidChunk(e){let t=e;const n=e.length-e.length%Xi;return n!==e.length&&(t=V(e,0,n),this.remainderData=V(e,n)),t}logOnce(e){this.logEnabled&&(A.log(`[decrypter]: ${e}`),this.logEnabled=!1)}}const xi={toString:function(a){let e="";const t=a.length;for(let n=0;no.end){const S=s>y;(s{if(this.fragContextChanged(e)){this.warn(`Fragment ${e.sn}${i.part?" p: "+i.part.index:""} of level ${e.level} was dropped during download.`),this.fragmentTracker.removeFragment(e);return}e.stats.chunkCount++,this._handleFragmentLoadProgress(i)};this._doFragLoad(e,t,n,r).then(i=>{if(!i)return;const s=this.state;if(this.fragContextChanged(e)){(s===Jt.FRAG_LOADING||!this.fragCurrent&&s===Jt.PARSING)&&(this.fragmentTracker.removeFragment(e),this.state=Jt.IDLE);return}"payload"in i&&(this.log(`Loaded fragment ${e.sn} of level ${e.level}`),this.hls.trigger(g.FRAG_LOADED,i)),this._handleFragmentLoadComplete(i)}).catch(i=>{this.state===Jt.STOPPED||this.state===Jt.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)===gr.APPENDING){const i=e.type,s=this.getFwdBufferInfo(this.mediaBuffer,i),o=Math.max(e.duration,s?s.len:this.config.maxBufferLength),c=this.backtrackFragment;((c?e.sn-c.sn:0)===1||this.reduceMaxBufferLength(o,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)===gr.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)}flushMainBuffer(e,t,n=null){if(!(e-t))return;const r={startOffset:e,endOffset:t,type:n};this.hls.trigger(g.BUFFER_FLUSHING,r)}_loadInitSegment(e,t){this._doFragLoad(e,t).then(n=>{if(!n||this.fragContextChanged(e)||!this.levels)throw new Error("init load aborted");return n}).then(n=>{const{hls:r}=this,{payload:i}=n,s=e.decryptdata;if(i&&i.byteLength>0&&s!=null&&s.key&&s.iv&&s.method==="AES-128"){const o=self.performance.now();return this.decrypter.decrypt(new Uint8Array(i),s.key.buffer,s.iv.buffer).catch(c=>{throw r.trigger(g.ERROR,{type:X.MEDIA_ERROR,details:z.FRAG_DECRYPT_ERROR,fatal:!1,error:c,reason:c.message,frag:e}),c}).then(c=>{const m=self.performance.now();return r.trigger(g.FRAG_DECRYPTED,{frag:e,payload:c,stats:{tstart:o,tdecrypt:m}}),n.payload=c,this.completeInitSegmentLoad(n)})}return this.completeInitSegmentLoad(n)}).catch(n=>{this.state===Jt.STOPPED||this.state===Jt.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=Jt.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){var n,r,i,s;const o=this.mediaBuffer?this.mediaBuffer:this.media;if(this.log(`Buffered ${e.type} sn: ${e.sn}${t?" part: "+t.index:""} of ${this.playlistType===Tt.MAIN?"level":"track"} ${e.level} (frag:[${((n=e.startPTS)!=null?n:NaN).toFixed(3)}-${((r=e.endPTS)!=null?r:NaN).toFixed(3)}] > buffer:${o?xi.toString(Er.getBuffered(o)):"(detached)"})`),e.sn!=="initSegment"){var c;if(e.type!==Tt.SUBTITLE){const y=e.elementaryStreams;if(!Object.keys(y).some(S=>!!y[S])){this.state=Jt.IDLE;return}}const m=(c=this.levels)==null?void 0:c[e.level];m!=null&&m.fragmentError&&(this.log(`Resetting level fragment error count of ${m.fragmentError} on frag buffered`),m.fragmentError=0)}this.state=Jt.IDLE,o&&(!this.loadedmetadata&&e.type==Tt.MAIN&&o.buffered.length&&((i=this.fragCurrent)==null?void 0:i.sn)===((s=this.fragPrevious)==null?void 0:s.sn)&&(this.loadedmetadata=!0,this.seekToStartPos()),this.tick())}seekToStartPos(){}_handleFragmentLoadComplete(e){const{transmuxer:t}=this;if(!t)return;const{frag:n,part:r,partsLoaded:i}=e,s=!i||i.length===0||i.some(c=>!c),o=new Oi(n.level,n.sn,n.stats.chunkCount+1,0,r?r.index:-1,!s);t.flush(o)}_handleFragmentLoadProgress(e){}_doFragLoad(e,t,n=null,r){var i;const s=t==null?void 0:t.details;if(!this.levels||!s)throw new Error(`frag load aborted, missing level${s?"":" detail"}s`);let o=null;if(e.encrypted&&!((i=e.decryptdata)!=null&&i.key)?(this.log(`Loading key for ${e.sn} of [${s.startSN}-${s.endSN}], ${this.logPrefix==="[stream-controller]"?"level":"track"} ${e.level}`),this.state=Jt.KEY_LOADING,this.fragCurrent=e,o=this.keyLoader.load(e).then(y=>{if(!this.fragContextChanged(y.frag))return this.hls.trigger(g.KEY_LOADED,y),this.state===Jt.KEY_LOADING&&(this.state=Jt.IDLE),y}),this.hls.trigger(g.KEY_LOADING,{frag:e}),this.fragCurrent===null&&(o=Promise.reject(new Error("frag load aborted, context changed in KEY_LOADING")))):!e.encrypted&&s.encryptedFragments.length&&this.keyLoader.loadClear(e,s.encryptedFragments),n=Math.max(e.start,n||0),this.config.lowLatencyMode&&e.sn!=="initSegment"){const y=s.partList;if(y&&r){n>e.end&&s.fragmentHint&&(e=s.fragmentHint);const S=this.getNextPart(y,e,n);if(S>-1){const D=y[S];this.log(`Loading part sn: ${e.sn} p: ${D.index} cc: ${e.cc} of playlist [${s.startSN}-${s.endSN}] parts [0-${S}-${y.length-1}] ${this.logPrefix==="[stream-controller]"?"level":"track"}: ${e.level}, target: ${parseFloat(n.toFixed(3))}`),this.nextLoadPosition=D.start+D.duration,this.state=Jt.FRAG_LOADING;let W;return o?W=o.then(k=>!k||this.fragContextChanged(k.frag)?null:this.doFragPartsLoad(e,D,t,r)).catch(k=>this.handleFragLoadError(k)):W=this.doFragPartsLoad(e,D,t,r).catch(k=>this.handleFragLoadError(k)),this.hls.trigger(g.FRAG_LOADING,{frag:e,part:D,targetBufferTime:n}),this.fragCurrent===null?Promise.reject(new Error("frag load aborted, context changed in FRAG_LOADING parts")):W}else if(!e.url||this.loadedEndOfParts(y,n))return Promise.resolve(null)}}this.log(`Loading fragment ${e.sn} cc: ${e.cc} ${s?"of ["+s.startSN+"-"+s.endSN+"] ":""}${this.logPrefix==="[stream-controller]"?"level":"track"}: ${e.level}, target: ${parseFloat(n.toFixed(3))}`),M(e.sn)&&!this.bitrateTest&&(this.nextLoadPosition=e.start+e.duration),this.state=Jt.FRAG_LOADING;const c=this.config.progressive;let m;return c&&o?m=o.then(y=>!y||this.fragContextChanged(y==null?void 0:y.frag)?null:this.fragmentLoader.load(e,r)).catch(y=>this.handleFragLoadError(y)):m=Promise.all([this.fragmentLoader.load(e,c?r:void 0),o]).then(([y])=>(!c&&y&&r&&r(y),y)).catch(y=>this.handleFragLoadError(y)),this.hls.trigger(g.FRAG_LOADING,{frag:e,targetBufferTime:n}),this.fragCurrent===null?Promise.reject(new Error("frag load aborted, context changed in FRAG_LOADING")):m}doFragPartsLoad(e,t,n,r){return new Promise((i,s)=>{var o;const c=[],m=(o=n.details)==null?void 0:o.partList,y=S=>{this.fragmentLoader.loadPart(e,S,r).then(D=>{c[S.index]=D;const W=D.part;this.hls.trigger(g.FRAG_LOADED,D);const k=bn(n,e.sn,S.index+1)||Pn(m,e.sn,S.index+1);if(k)y(k);else return i({frag:e,part:W,partsLoaded:c})}).catch(s)};y(t)})}handleFragLoadError(e){if("data"in e){const t=e.data;e.data&&t.details===z.INTERNAL_ABORTED?this.handleFragLoadAborted(t.frag,t.part):this.hls.trigger(g.ERROR,t)}else this.hls.trigger(g.ERROR,{type:X.OTHER_ERROR,details:z.INTERNAL_EXCEPTION,err:e,error:e,fatal:!0});return null}_handleTransmuxerFlush(e){const t=this.getCurrentContext(e);if(!t||this.state!==Jt.PARSING){!this.fragCurrent&&this.state!==Jt.STOPPED&&this.state!==Jt.ERROR&&(this.state=Jt.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),this.updateLevelTiming(n,r,i,e.partial)}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 level ${r}. The current chunk will not be buffered.`),null;const o=t[r],c=s>-1?bn(o,i,s):null,m=c?c.fragment:Pr(o,i,n);return m?(n&&n!==m&&(m.stats=n.stats),{frag:m,part:c,level:o}):null}bufferFragmentData(e,t,n,r,i){var s;if(!e||this.state!==Jt.PARSING)return;const{data1:o,data2:c}=e;let m=o;if(o&&c&&(m=l(o,c)),!((s=m)!=null&&s.length))return;const y={type:e.type,frag:t,part:n,chunkMeta:r,parent:t.type,data:m};if(this.hls.trigger(g.BUFFER_APPENDING,y),e.dropped&&e.independent&&!n){if(i)return;this.flushBufferGap(t)}}flushBufferGap(e){const t=this.media;if(!t)return;if(!Er.isBuffered(t,t.currentTime)){this.flushMainBuffer(0,e.start);return}const n=t.currentTime,r=Er.bufferInfo(t,n,0),i=e.duration,s=Math.min(this.config.maxFragLookUpTolerance*2,i*.25),o=Math.max(Math.min(e.start-s,r.end-s),n+s);e.start-o>s&&this.flushMainBuffer(o,e.start)}getFwdBufferInfo(e,t){const n=this.getLoadPosition();return M(n)?this.getFwdBufferInfoAtPos(e,n,t):null}getFwdBufferInfoAtPos(e,t,n){const{config:{maxBufferHole:r}}=this,i=Er.bufferInfo(e,t,r);if(i.len===0&&i.nextStart!==void 0){const s=this.fragmentTracker.getBufferedFrag(t,n);if(s&&i.nextStart=r?(n.maxMaxBufferLength=i,this.warn(`Reduce max buffer length to ${i}s`),!0):!1}getAppendedFrag(e,t=Tt.MAIN){const n=this.fragmentTracker.getAppendedFrag(e,Tt.MAIN);return n&&"fragment"in n?n.fragment:n}getNextFragment(e,t){const n=t.fragments,r=n.length;if(!r)return null;const{config:i}=this,s=n[0].start;let o;if(t.live){const c=i.initialLiveManifestSize;if(rt}getNextFragmentLoopLoading(e,t,n,r,i){const s=e.gap,o=this.getNextFragment(this.nextLoadPosition,t);if(o===null)return o;if(e=o,s&&e&&!e.gap&&n.nextStart){const c=this.getFwdBufferInfoAtPos(this.mediaBuffer?this.mediaBuffer:this.media,n.nextStart,r);if(c!==null&&n.len+c.len>=i)return this.log(`buffer full after gaps in "${r}" playlist starting at sn: ${e.sn}`),null}return e}mapToInitFragWhenRequired(e){return e!=null&&e.initSegment&&!(e!=null&&e.initSegment.data)&&!this.bitrateTest?e.initSegment:e}getNextPart(e,t,n){let r=-1,i=!1,s=!0;for(let o=0,c=e.length;o-1&&nn.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=ar(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:o}=n;const{fragmentHint:c}=n,{maxFragLookUpTolerance:m}=r,y=n.partList,S=!!(r.lowLatencyMode&&y!=null&&y.length&&c);S&&c&&!this.bitrateTest&&(s=s.concat(c),o=c.sn);let D;if(et-m?0:m;D=Xn(i,s,e,W)}else D=s[s.length-1];if(D){const W=D.sn-n.startSN,k=this.fragmentTracker.getState(D);if((k===gr.OK||k===gr.PARTIAL&&D.gap)&&(i=D),i&&D.sn===i.sn&&(!S||y[0].fragment.sn>D.sn)&&i&&D.level===i.level){const ie=s[W+1];D.sn=s-t.maxFragLookUpTolerance&&i<=o;if(r!==null&&n.duration>r&&(i${e.startSN} prev-sn: ${c?c.sn:"na"} fragments: ${r}`),m}return i}waitForCdnTuneIn(e){return e.live&&e.canBlockReload&&e.partTarget&&e.tuneInGoal>Math.max(e.partHoldBack,e.partTarget*3)}setStartPosition(e,t){let n=this.startPosition;if(n ${(r=this.fragCurrent)==null?void 0:r.url}`);return}const i=t.details===z.FRAG_GAP;i&&this.fragmentTracker.fragBuffered(n,!0);const s=t.errorAction,{action:o,retryCount:c=0,retryConfig:m}=s||{};if(s&&o===Dn.RetryRequest&&m){this.resetStartWhenNotLoaded(this.levelLastLoaded);const y=Yn(m,c);this.warn(`Fragment ${n.sn} of ${e} ${n.level} errored with ${t.details}, retrying loading ${c+1}/${m.maxNumRetry} in ${y}ms`),s.resolved=!0,this.retryDate=self.performance.now()+y,this.state=Jt.FRAG_LOADING_WAITING_RETRY}else if(m&&s)if(this.resetFragmentErrors(e),c.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===Tt.AUDIO&&(this.fragCurrent=null),this.loadedmetadata||(this.startFragRequested=!1),this.state!==Jt.STOPPED&&(this.state=Jt.IDLE)}afterBufferFlushed(e,t,n){if(!e)return;const r=Er.getBuffered(e);this.fragmentTracker.detectEvictedFragments(t,r,n),this.state===Jt.ENDED&&this.resetLoadingState()}resetLoadingState(){this.log("Reset loading state"),this.fragCurrent=null,this.fragPrevious=null,this.state=Jt.IDLE}resetStartWhenNotLoaded(e){if(!this.loadedmetadata){this.startFragRequested=!1;const t=e?e.details:null;t!=null&&t.live?(this.startPosition=-1,this.setStartPosition(t,0),this.resetLoadingState()):this.nextLoadPosition=this.startPosition}}resetWhenMissingContext(e){this.warn(`The loading context changed while buffering fragment ${e.sn} of level ${e.level}. This chunk will not be buffered.`),this.removeUnbufferedFrags(),this.resetStartWhenNotLoaded(this.levelLastLoaded),this.resetLoadingState()}removeUnbufferedFrags(e=0){this.fragmentTracker.removeFragmentsInRange(e,1/0,this.playlistType,!1,!0)}updateLevelTiming(e,t,n,r){var i;const s=n.details;if(!s){this.warn("level.details undefined");return}if(!Object.keys(e.elementaryStreams).reduce((c,m)=>{const y=e.elementaryStreams[m];if(y){const S=y.endPTS-y.startPTS;if(S<=0)return this.warn(`Could not parse fragment ${e.sn} ${m} duration reliably (${S})`),c||!1;const D=r?0:jr(s,e,y.startPTS,y.endPTS,y.startDTS,y.endDTS);return this.hls.trigger(g.LEVEL_PTS_UPDATED,{details:s,level:n,drift:D,type:m,frag:e,start:y.startPTS,end:y.endPTS}),!0}return c},!1)&&((i=this.transmuxer)==null?void 0:i.error)===null){const c=new Error(`Found no media in fragment ${e.sn} of level ${e.level} resetting transmuxer to fallback to playlist timing`);if(n.fragmentError===0&&(n.fragmentError++,e.gap=!0,this.fragmentTracker.removeFragment(e),this.fragmentTracker.fragBuffered(e,!0)),this.warn(c.message),this.hls.trigger(g.ERROR,{type:X.MEDIA_ERROR,details:z.FRAG_PARSING_ERROR,fatal:!1,error:c,frag:e,reason:`Found no media in msn ${e.sn} of level "${n.url}"`}),!this.hls)return;this.resetTransmuxer()}this.state=Jt.PARSED,this.hls.trigger(g.FRAG_PARSED,{frag:e,part:t})}resetTransmuxer(){this.transmuxer&&(this.transmuxer.destroy(),this.transmuxer=null)}recoverWorkerError(e){e.event==="demuxerWorker"&&(this.fragmentTracker.removeAllFragments(),this.resetTransmuxer(),this.resetStartWhenNotLoaded(this.levelLastLoaded),this.resetLoadingState())}set state(e){const t=this._state;t!==e&&(this._state=e,this.log(`${t}->${e}`))}get state(){return this._state}}class Hs{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=Xa(e,t);else return new Uint8Array(0);return this.reset(),n}reset(){this.chunks.length=0,this.dataLength=0}}function Xa(a,e){const t=new Uint8Array(e);let n=0;for(let r=0;r0&&o.samples.push({pts:this.lastPTS,dts:this.lastPTS,data:n,type:fn.audioId3,duration:Number.POSITIVE_INFINITY});r{if(M(a))return a*90;const n=t?t.baseTime*9e4/t.timescale:0;return e*9e4+n};function eo(a,e,t,n){let r,i,s,o;const c=navigator.userAgent.toLowerCase(),m=n,y=[96e3,88200,64e3,48e3,44100,32e3,24e3,22050,16e3,12e3,11025,8e3,7350];r=((e[t+2]&192)>>>6)+1;const S=(e[t+2]&60)>>>2;if(S>y.length-1){const D=new Error(`invalid ADTS sampling index:${S}`);a.emit(g.ERROR,g.ERROR,{type:X.MEDIA_ERROR,details:z.FRAG_PARSING_ERROR,fatal:!0,error:D,reason:D.message});return}return s=(e[t+2]&1)<<2,s|=(e[t+3]&192)>>>6,A.log(`manifest codec:${n}, ADTS type:${r}, samplingIndex:${S}`),/firefox/i.test(c)?S>=6?(r=5,o=new Array(4),i=S-3):(r=2,o=new Array(2),i=S):c.indexOf("android")!==-1?(r=2,o=new Array(2),i=S):(r=5,o=new Array(4),n&&(n.indexOf("mp4a.40.29")!==-1||n.indexOf("mp4a.40.5")!==-1)||!n&&S>=6?i=S-3:((n&&n.indexOf("mp4a.40.2")!==-1&&(S>=6&&s===1||/vivaldi/i.test(c))||!n&&s===1)&&(r=2,o=new Array(2)),i=S)),o[0]=r<<3,o[0]|=(S&14)>>1,o[1]|=(S&1)<<7,o[1]|=s<<3,r===5&&(o[1]|=(i&14)>>1,o[2]=(i&1)<<7,o[2]|=8,o[3]=0),{config:o,samplerate:y[S],channelCount:s,codec:"mp4a.40."+r,manifestCodec:m}}function Vs(a,e){return a[e]===255&&(a[e+1]&246)===240}function js(a,e){return a[e+1]&1?7:9}function gs(a,e){return(a[e+3]&3)<<11|a[e+4]<<3|(a[e+5]&224)>>>5}function to(a,e){return e+5=a.length)return!1;const n=gs(a,e);if(n<=t)return!1;const r=e+n;return r===a.length||Qi(a,r)}return!1}function Zs(a,e,t,n,r){if(!a.samplerate){const i=eo(e,t,n,r);if(!i)return;a.config=i.config,a.samplerate=i.samplerate,a.channelCount=i.channelCount,a.codec=i.codec,a.manifestCodec=i.manifestCodec,A.log(`parsed codec:${a.codec}, rate:${i.samplerate}, channels:${i.channelCount}`)}}function Ks(a){return 1024*9e4/a}function io(a,e){const t=js(a,e);if(e+t<=a.length){const n=gs(a,e)-t;if(n>0)return{headerLength:t,frameLength:n}}}function Gs(a,e,t,n,r){const i=Ks(a.samplerate),s=n+r*i,o=io(e,t);let c;if(o){const{frameLength:S,headerLength:D}=o,W=D+S,k=Math.max(0,t+W-e.length);k?(c=new Uint8Array(W-D),c.set(e.subarray(t+D,e.length),0)):c=e.subarray(t+D,t+W);const G={unit:c,pts:s};return k||a.samples.push(G),{sample:G,length:W,missing:k}}const m=e.length-t;return c=new Uint8Array(m),c.set(e.subarray(t,e.length),0),{sample:{unit:c,pts:s},length:m,missing:-1}}let Ji=null;const so=[32,64,96,128,160,192,224,256,288,320,352,384,416,448,32,48,56,64,80,96,112,128,160,192,224,256,320,384,32,40,48,56,64,80,96,112,128,160,192,224,256,320,32,48,56,64,80,96,112,128,144,160,176,192,224,256,8,16,24,32,40,48,56,64,80,96,112,128,144,160],ao=[44100,48e3,32e3,22050,24e3,16e3,11025,12e3,8e3],oo=[[0,72,144,12],[0,0,0,0],[0,72,144,12],[0,144,144,12]],lo=[0,1,1,4];function Ys(a,e,t,n,r){if(t+24>e.length)return;const i=Xs(e,t);if(i&&t+i.frameLength<=e.length){const s=i.samplesPerFrame*9e4/i.sampleRate,o=n+r*s,c={unit:e.subarray(t,t+i.frameLength),pts:o,dts:o};return a.config=[],a.channelCount=i.channelCount,a.samplerate=i.sampleRate,a.samples.push(c),{sample:c,length:i.frameLength,missing:0}}}function Xs(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,o=a[e+3]>>6,c=t===3?3-n:n===3?3:4,m=so[c*14+r-1]*1e3,S=ao[(t===3?0:t===2?1:2)*3+i],D=o===3?1:2,W=oo[t][n],k=lo[n],G=W*8*k,ie=Math.floor(W*m/S+s)*k;if(Ji===null){const ht=(navigator.userAgent||"").match(/Chrome\/(\d+)/i);Ji=ht?parseInt(ht[1]):0}return!!Ji&&Ji<=87&&n===2&&m>=224e3&&o===0&&(a[e+3]=a[e+3]|128),{sampleRate:S,channelCount:D,frameLength:ie,samplesPerFrame:G}}}function ps(a,e){return a[e]===255&&(a[e+1]&224)===224&&(a[e+1]&6)!==0}function Qs(a,e){return e+1{const s=E(i);if(fo.test(s.schemeIdUri)){const o=M(s.presentationTime)?s.presentationTime/s.timeScale:t+s.presentationTimeDelta/s.timeScale;let c=s.eventDuration===4294967295?Number.POSITIVE_INFINITY:s.eventDuration/s.timeScale;c<=.001&&(c=Number.POSITIVE_INFINITY);const m=s.payload;n.samples.push({data:m,len:m.byteLength,dts:o,pts:o,type:fn.emsg,duration:c})}})}return n}demuxSampleAes(e,t,n){return Promise.reject(new Error("The MP4 demuxer does not support SAMPLE-AES decryption"))}destroy(){}}const $s=(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 o=Math.min(n,8),c=8-o;i[0]=4278190080>>>24+c<>c,t=t?t<e.length||e[t]!==11||e[t+1]!==119)return-1;const i=e[t+4]>>6;if(i>=3)return-1;const o=[48e3,44100,32e3][i],c=e[t+4]&63,y=[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][c*3+i]*2;if(t+y>e.length)return-1;const S=e[t+6]>>5;let D=0;S===2?D+=2:(S&1&&S!==1&&(D+=2),S&4&&(D+=2));const W=(e[t+6]<<8|e[t+7])>>12-D&1,G=[2,1,2,3,3,4,4,5][S]+W,ie=e[t+5]>>3,We=e[t+5]&7,mt=new Uint8Array([i<<6|ie<<1|We>>2,(We&3)<<6|S<<3|W<<2|c>>4,c<<4&224]),ht=1536/o*9e4,zt=n+r*ht,At=e.subarray(t,t+y);return a.config=mt,a.channelCount=G,a.samplerate=o,a.samples.push({unit:At,pts:zt}),y}class go{constructor(){this.VideoSample=null}createVideoSample(e,t,n,r){return{key:e,frame:!1,pts:t,dts:n,units:[],debug:r,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)}e.debug.length&&A.log(e.pts+"/"+e.dts+":"+e.debug)}}class ea{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&&A.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<>>e)return this.word<<=e,this.bitsAvailable-=e,e;return this.loadWord(),e+this.skipLZ()}skipUEG(){this.skipBits(1+this.skipLZ())}skipEG(){this.skipBits(1+this.skipLZ())}readUEG(){const e=this.skipLZ();return this.readBits(e+1)-1}readEG(){const e=this.readUEG();return 1&e?1+e>>>1:-1*(e>>>1)}readBoolean(){return this.readBits(1)===1}readUByte(){return this.readBits(8)}readUShort(){return this.readBits(16)}readUInt(){return this.readBits(32)}skipScalingList(e){let t=8,n=8,r;for(let i=0;i{var S;switch(y.type){case 1:{let G=!1;c=!0;const ie=y.data;if(m&&ie.length>4){const We=new ea(ie).readSliceType();(We===2||We===4||We===7||We===9)&&(G=!0)}if(G){var D;(D=o)!=null&&D.frame&&!o.key&&(this.pushAccessUnit(o,e),o=this.VideoSample=null)}o||(o=this.VideoSample=this.createVideoSample(!0,n.pts,n.dts,"")),o.frame=!0,o.key=G;break}case 5:c=!0,(S=o)!=null&&S.frame&&!o.key&&(this.pushAccessUnit(o,e),o=this.VideoSample=null),o||(o=this.VideoSample=this.createVideoSample(!0,n.pts,n.dts,"")),o.key=!0,o.frame=!0;break;case 6:{c=!0,p(y.data,1,n.pts,t.samples);break}case 7:{var W,k;c=!0,m=!0;const G=y.data,We=new ea(G).readSPS();if(!e.sps||e.width!==We.width||e.height!==We.height||((W=e.pixelRatio)==null?void 0:W[0])!==We.pixelRatio[0]||((k=e.pixelRatio)==null?void 0:k[1])!==We.pixelRatio[1]){e.width=We.width,e.height=We.height,e.pixelRatio=We.pixelRatio,e.sps=[G],e.duration=i;const mt=G.subarray(1,4);let ht="avc1.";for(let zt=0;zt<3;zt++){let At=mt[zt].toString(16);At.length<2&&(At="0"+At),ht+=At}e.codec=ht}break}case 8:c=!0,e.pps=[y.data];break;case 9:c=!0,e.audFound=!0,o&&this.pushAccessUnit(o,e),o=this.VideoSample=this.createVideoSample(!1,n.pts,n.dts,"");break;case 12:c=!0;break;default:c=!1,o&&(o.debug+="unknown NAL "+y.type+" ");break}o&&c&&o.units.push(y)}),r&&o&&(this.pushAccessUnit(o,e),this.VideoSample=null)}parseAVCNALu(e,t){const n=t.byteLength;let r=e.naluState||0;const i=r,s=[];let o=0,c,m,y,S=-1,D=0;for(r===-1&&(S=0,D=t[0]&31,r=0,o=1);o=0){const W={data:t.subarray(S,m),type:D};s.push(W)}else{const W=this.getLastNalUnit(e.samples);W&&(i&&o<=4-i&&W.state&&(W.data=W.data.subarray(0,W.data.byteLength-i)),m>0&&(W.data=l(W.data,t.subarray(0,m)),W.state=0))}o=0&&r>=0){const W={data:t.subarray(S,n),type:D,state:r};s.push(W)}if(s.length===0){const W=this.getLastNalUnit(e.samples);W&&(W.data=l(W.data,t))}return e.naluState=r,s}}class vo{constructor(e,t,n){this.keyData=void 0,this.decrypter=void 0,this.keyData=n,this.decrypter=new Fi(t,{removePKCS7Padding:!1})}decryptBuffer(e){return this.decrypter.decrypt(e,this.keyData.key.buffer,this.keyData.iv.buffer)}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(o=>{const c=new Uint8Array(o);r.set(c,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{i.data=this.getAvcDecryptedUnit(s,c),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}}}}const Gr=188;class bi{constructor(e,t,n){this.observer=void 0,this.config=void 0,this.typeSupported=void 0,this.sampleAes=null,this.pmtParsed=!1,this.audioCodec=void 0,this.videoCodec=void 0,this._duration=0,this._pmtId=-1,this._videoTrack=void 0,this._audioTrack=void 0,this._id3Track=void 0,this._txtTrack=void 0,this.aacOverFlow=null,this.remainderData=null,this.videoParser=void 0,this.observer=e,this.config=t,this.typeSupported=n,this.videoParser=new po}static probe(e){const t=bi.syncOffset(e);return t>0&&A.warn(`MPEG2-TS detected but first sync word found @ offset ${t}`),t!==-1}static syncOffset(e){const t=e.length;let n=Math.min(Gr*5,t-Gr)+1,r=0;for(;r1&&(s===0&&o>2||c+Gr>n))return s}else{if(o)return-1;break}r++}return-1}static createTrack(e,t){return{container:e==="video"||e==="audio"?"video/mp2t":void 0,type:e,id:dt[e],pid:-1,inputTimeScale:9e4,sequenceNumber:0,samples:[],dropped:0,duration:e==="audio"?t:void 0}}resetInitSegment(e,t,n,r){this.pmtParsed=!1,this._pmtId=-1,this._videoTrack=bi.createTrack("video"),this._audioTrack=bi.createTrack("audio",r),this._id3Track=bi.createTrack("id3"),this._txtTrack=bi.createTrack("text"),this._audioTrack.segmentCodec="aac",this.aacOverFlow=null,this.remainderData=null,this.audioCodec=t,this.videoCodec=n,this._duration=r}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,o=this._audioTrack,c=this._id3Track,m=this._txtTrack;let y=s.pid,S=s.pesData,D=o.pid,W=c.pid,k=o.pesData,G=c.pesData,ie=null,We=this.pmtParsed,mt=this._pmtId,ht=e.length;if(this.remainderData&&(e=l(this.remainderData,e),ht=e.length,this.remainderData=null),ht>4;let vn;if(Xt>1){if(vn=kt+5+e[kt+4],vn===kt+Gr)continue}else vn=kt+4;switch(In){case y:gn&&(S&&(i=Ni(S))&&this.videoParser.parseAVCPES(s,m,i,!1,this._duration),S={data:[],size:0}),S&&(S.data.push(e.subarray(vn,kt+Gr)),S.size+=kt+Gr-vn);break;case D:if(gn){if(k&&(i=Ni(k)))switch(o.segmentCodec){case"aac":this.parseAACPES(o,i);break;case"mp3":this.parseMPEGPES(o,i);break;case"ac3":this.parseAC3PES(o,i);break}k={data:[],size:0}}k&&(k.data.push(e.subarray(vn,kt+Gr)),k.size+=kt+Gr-vn);break;case W:gn&&(G&&(i=Ni(G))&&this.parseID3PES(c,i),G={data:[],size:0}),G&&(G.data.push(e.subarray(vn,kt+Gr)),G.size+=kt+Gr-vn);break;case 0:gn&&(vn+=e[vn]+1),mt=this._pmtId=yo(e,vn);break;case mt:{gn&&(vn+=e[vn]+1);const rr=bo(e,vn,this.typeSupported,n,this.observer);y=rr.videoPid,y>0&&(s.pid=y,s.segmentCodec=rr.segmentVideoCodec),D=rr.audioPid,D>0&&(o.pid=D,o.segmentCodec=rr.segmentAudioCodec),W=rr.id3Pid,W>0&&(c.pid=W),ie!==null&&!We&&(A.warn(`MPEG-TS PMT found at ${kt} after unknown PID '${ie}'. Backtracking to sync byte @${zt} to parse all TS packets.`),ie=null,kt=zt-188),We=this.pmtParsed=!0;break}case 17:case 8191:break;default:ie=In;break}}else At++;At>0&&$i(this.observer,new Error(`Found ${At} TS packet/s that do not start with 0x47`)),s.pesData=S,o.pesData=k,c.pesData=G;const nn={audioTrack:o,videoTrack:s,id3Track:c,textTrack:m};return r&&this.extractRemainingSamples(nn),nn}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,o=t.pesData,c=r.pesData;let m;if(s&&(m=Ni(s))?(this.videoParser.parseAVCPES(n,i,m,!0,this._duration),n.pesData=null):n.pesData=s,o&&(m=Ni(o))){switch(t.segmentCodec){case"aac":this.parseAACPES(t,m);break;case"mp3":this.parseMPEGPES(t,m);break;case"ac3":this.parseAC3PES(t,m);break}t.pesData=null}else o!=null&&o.size&&A.log("last AAC PES packet truncated,might overlap between fragments"),t.pesData=o;c&&(m=Ni(c))?(this.parseID3PES(r,m),r.pesData=null):r.pesData=c}demuxSampleAes(e,t,n){const r=this.demux(e,n,!0,!this.config.progressive),i=this.sampleAes=new vo(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._duration=0}parseAACPES(e,t){let n=0;const r=this.aacOverFlow;let i=t.data;if(r){this.aacOverFlow=null;const S=r.missing,D=r.sample.unit.byteLength;if(S===-1)i=l(r.sample.unit,i);else{const W=D-S;r.sample.unit.set(i.subarray(0,S),W),e.samples.push(r.sample),n=r.missing}}let s,o;for(s=n,o=i.length;s0;)o+=c}}parseID3PES(e,t){if(t.pts===void 0){A.warn("[tsdemuxer]: ID3 PES unknown PTS");return}const n=fe({},t,{type:this._videoTrack?fn.emsg:fn.audioId3,duration:Number.POSITIVE_INFINITY});e.samples.push(n)}}function vs(a,e){return((a[e+1]&31)<<8)+a[e+2]}function yo(a,e){return(a[e+10]&31)<<8|a[e+11]}function bo(a,e,t,n,r){const i={audioPid:-1,videoPid:-1,id3Pid:-1,segmentVideoCodec:"avc",segmentAudioCodec:"aac"},s=(a[e+1]&15)<<8|a[e+2],o=e+3+s-4,c=(a[e+10]&15)<<8|a[e+11];for(e+=12+c;e0){let S=e+5,D=y;for(;D>2;){switch(a[S]){case 106:t.ac3!==!0?A.log("AC-3 audio found, not supported in this browser for now"):(i.audioPid=m,i.segmentAudioCodec="ac3");break}const k=a[S+1]+2;S+=k,D-=k}}break;case 194:case 135:return $i(r,new Error("Unsupported EC-3 in M2TS found")),i;case 36:return $i(r,new Error("Unsupported HEVC in M2TS found")),i}e+=y+5}return i}function $i(a,e,t){A.warn(`parsing error: ${e.message}`),a.emit(g.ERROR,g.ERROR,{type:X.MEDIA_ERROR,details:z.FRAG_PARSING_ERROR,fatal:!1,levelRetry:t,error:e,reason:e.message})}function ys(a){A.log(`${a} with AES-128-CBC encryption found in unencrypted stream`)}function Ni(a){let e=0,t,n,r,i,s;const o=a.data;if(!a||a.size===0)return null;for(;o[0].length<19&&o.length>1;)o[0]=l(o[0],o[1]),o.splice(1,1);if(t=o[0],(t[0]<<16)+(t[1]<<8)+t[2]===1){if(n=(t[4]<<8)+t[5],n&&n>a.size-6)return null;const m=t[7];m&192&&(i=(t[9]&14)*536870912+(t[10]&255)*4194304+(t[11]&254)*16384+(t[12]&255)*128+(t[13]&254)/2,m&64?(s=(t[14]&14)*536870912+(t[15]&255)*4194304+(t[16]&254)*16384+(t[17]&255)*128+(t[18]&254)/2,i-s>60*9e4&&(A.warn(`${Math.round((i-s)/9e4)}s delta between PTS and DTS, align them`),i=s)):s=i),r=t[8];let y=r+9;if(a.size<=y)return null;a.size-=y;const S=new Uint8Array(a.size);for(let D=0,W=o.length;Dk){y-=k;continue}else t=t.subarray(y),k-=y,y=0;S.set(t,e),e+=k}return n&&(n-=r+3),{data:S,pts:i,dts:s,len:n}}return null}class So extends ms{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=U(e,0);let n=(t==null?void 0:t.length)||0;if(t&&e[n]===11&&e[n+1]===119&&x(t)!==void 0&&$s(e,n)<=16)return!1;for(let r=e.length;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>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 wt.box(wt.types.mdia,wt.mdhd(e.timescale,e.duration),wt.hdlr(e.type),wt.minf(e))}static mfhd(e){return wt.box(wt.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"?wt.box(wt.types.minf,wt.box(wt.types.smhd,wt.SMHD),wt.DINF,wt.stbl(e)):wt.box(wt.types.minf,wt.box(wt.types.vmhd,wt.VMHD),wt.DINF,wt.stbl(e))}static moof(e,t,n){return wt.box(wt.types.moof,wt.mfhd(e),wt.traf(n,t))}static moov(e){let t=e.length;const n=[];for(;t--;)n[t]=wt.trak(e[t]);return wt.box.apply(null,[wt.types.moov,wt.mvhd(e[0].timescale,e[0].duration)].concat(n).concat(wt.mvex(e)))}static mvex(e){let t=e.length;const n=[];for(;t--;)n[t]=wt.trex(e[t]);return wt.box.apply(null,[wt.types.mvex,...n])}static mvhd(e,t){t*=e;const n=Math.floor(t/(Si+1)),r=Math.floor(t%(Si+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 wt.box(wt.types.mvhd,i)}static sdtp(e){const t=e.samples||[],n=new Uint8Array(4+t.length);let r,i;for(r=0;r>>8&255),t.push(s&255),t=t.concat(Array.prototype.slice.call(i));for(r=0;r>>8&255),n.push(s&255),n=n.concat(Array.prototype.slice.call(i));const o=wt.box(wt.types.avcC,new Uint8Array([1,t[3],t[4],t[5],255,224|e.sps.length].concat(t).concat([e.pps.length]).concat(n))),c=e.width,m=e.height,y=e.pixelRatio[0],S=e.pixelRatio[1];return wt.box(wt.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,c>>8&255,c&255,m>>8&255,m&255,0,72,0,0,0,72,0,0,0,0,0,0,0,1,18,100,97,105,108,121,109,111,116,105,111,110,47,104,108,115,46,106,115,0,0,0,0,0,0,0,0,0,0,0,0,0,0,24,17,17]),o,wt.box(wt.types.btrt,new Uint8Array([0,28,156,128,0,45,198,192,0,45,198,192])),wt.box(wt.types.pasp,new Uint8Array([y>>24,y>>16&255,y>>8&255,y&255,S>>24,S>>16&255,S>>8&255,S&255])))}static esds(e){const t=e.config.length;return new Uint8Array([0,0,0,0,3,23+t,0,1,0,4,15+t,64,21,0,0,0,0,0,0,0,0,0,0,0,5].concat([t]).concat(e.config).concat([6,1,2]))}static audioStsd(e){const t=e.samplerate;return new Uint8Array([0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,e.channelCount,0,16,0,0,0,0,t>>8&255,t&255,0,0])}static mp4a(e){return wt.box(wt.types.mp4a,wt.audioStsd(e),wt.box(wt.types.esds,wt.esds(e)))}static mp3(e){return wt.box(wt.types[".mp3"],wt.audioStsd(e))}static ac3(e){return wt.box(wt.types["ac-3"],wt.audioStsd(e),wt.box(wt.types.dac3,e.config))}static stsd(e){return e.type==="audio"?e.segmentCodec==="mp3"&&e.codec==="mp3"?wt.box(wt.types.stsd,wt.STSD,wt.mp3(e)):e.segmentCodec==="ac3"?wt.box(wt.types.stsd,wt.STSD,wt.ac3(e)):wt.box(wt.types.stsd,wt.STSD,wt.mp4a(e)):wt.box(wt.types.stsd,wt.STSD,wt.avc1(e))}static tkhd(e){const t=e.id,n=e.duration*e.timescale,r=e.width,i=e.height,s=Math.floor(n/(Si+1)),o=Math.floor(n%(Si+1));return wt.box(wt.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,o>>24,o>>16&255,o>>8&255,o&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=wt.sdtp(e),r=e.id,i=Math.floor(t/(Si+1)),s=Math.floor(t%(Si+1));return wt.box(wt.types.traf,wt.box(wt.types.tfhd,new Uint8Array([0,0,0,0,r>>24,r>>16&255,r>>8&255,r&255])),wt.box(wt.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])),wt.trun(e,n.length+16+20+8+16+8+8),n)}static trak(e){return e.duration=e.duration||4294967295,wt.box(wt.types.trak,wt.tkhd(e),wt.mdia(e))}static trex(e){const t=e.id;return wt.box(wt.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 o,c,m,y,S,D;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),o=0;o>>24&255,m>>>16&255,m>>>8&255,m&255,y>>>24&255,y>>>16&255,y>>>8&255,y&255,S.isLeading<<2|S.dependsOn,S.isDependedOn<<6|S.hasRedundancy<<4|S.paddingValue<<1|S.isNonSync,S.degradPrio&61440,S.degradPrio&15,D>>>24&255,D>>>16&255,D>>>8&255,D&255],12+16*o);return wt.box(wt.types.trun,s)}static initSegment(e){wt.types||wt.init();const t=wt.moov(e);return l(wt.FTYP,t)}}wt.types=void 0,wt.HDLR_TYPES=void 0,wt.STTS=void 0,wt.STSC=void 0,wt.STCO=void 0,wt.STSZ=void 0,wt.VMHD=void 0,wt.SMHD=void 0,wt.STSD=void 0,wt.FTYP=void 0,wt.DINF=void 0;const na=9e4;function bs(a,e,t=1,n=!1){const r=a*e*t;return n?Math.round(r):r}function Eo(a,e,t=1,n=!1){return bs(a,e,1/t,n)}function ji(a,e=!1){return bs(a,1e3,1/na,e)}function Ao(a,e=1){return bs(a,na,1/e)}const xo=10*1e3,ra=1024,Co=1152,wo=1536;let ki=null,Ss=null;class qi{constructor(e,t,n,r=""){if(this.observer=void 0,this.config=void 0,this.typeSupported=void 0,this.ISGenerated=!1,this._initPTS=null,this._initDTS=null,this.nextAvcDts=null,this.nextAudioPts=null,this.videoSampleDuration=null,this.isAudioContiguous=!1,this.isVideoContiguous=!1,this.videoTrackConfig=void 0,this.observer=e,this.config=t,this.typeSupported=n,this.ISGenerated=!1,ki===null){const s=(navigator.userAgent||"").match(/Chrome\/(\d+)/i);ki=s?parseInt(s[1]):0}if(Ss===null){const i=navigator.userAgent.match(/Safari\/(\d+)/i);Ss=i?parseInt(i[1]):0}}destroy(){this.config=this.videoTrackConfig=this._initPTS=this._initDTS=null}resetTimeStamp(e){A.log("[mp4-remuxer]: initPTS & initDTS reset"),this._initPTS=this._initDTS=e}resetNextTimestamp(){A.log("[mp4-remuxer]: reset next timestamp"),this.isVideoContiguous=!1,this.isAudioContiguous=!1}resetInitSegment(){A.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 o=s.pts,c=o-i;return c<-4294967296&&(t=!0,o=oi(o,n),c=o-i),c>0?i:o},n);return t&&A.debug("PTS rollover detected"),r}remux(e,t,n,r,i,s,o,c){let m,y,S,D,W,k,G=i,ie=i;const We=e.pid>-1,mt=t.pid>-1,ht=t.samples.length,zt=e.samples.length>0,At=o&&ht>0||ht>1;if((!We||zt)&&(!mt||At)||this.ISGenerated||o){if(this.ISGenerated){var kt,gn,In,Xt;const tr=this.videoTrackConfig;tr&&(t.width!==tr.width||t.height!==tr.height||((kt=t.pixelRatio)==null?void 0:kt[0])!==((gn=tr.pixelRatio)==null?void 0:gn[0])||((In=t.pixelRatio)==null?void 0:In[1])!==((Xt=tr.pixelRatio)==null?void 0:Xt[1]))&&this.resetInitSegment()}else S=this.generateIS(e,t,i,s);const vn=this.isVideoContiguous;let rr=-1,Bn;if(At&&(rr=To(t.samples),!vn&&this.config.forceKeyFrameOnDiscontinuity))if(k=!0,rr>0){A.warn(`[mp4-remuxer]: Dropped ${rr} out of ${ht} video samples due to a missing keyframe`);const tr=this.getVideoStartPts(t.samples);t.samples=t.samples.slice(rr),t.dropped+=rr,ie+=(t.samples[0].pts-tr)/t.inputTimeScale,Bn=ie}else rr===-1&&(A.warn(`[mp4-remuxer]: No keyframe found out of ${ht} video samples`),k=!1);if(this.ISGenerated){if(zt&&At){const tr=this.getVideoStartPts(t.samples),Qn=(oi(e.samples[0].pts,tr)-tr)/t.inputTimeScale;G+=Math.max(0,Qn),ie+=Math.max(0,-Qn)}if(zt){if(e.samplerate||(A.warn("[mp4-remuxer]: regenerate InitSegment as audio detected"),S=this.generateIS(e,t,i,s)),y=this.remuxAudio(e,G,this.isAudioContiguous,s,mt||At||c===Tt.AUDIO?ie:void 0),At){const tr=y?y.endPTS-y.startPTS:0;t.inputTimeScale||(A.warn("[mp4-remuxer]: regenerate InitSegment as video detected"),S=this.generateIS(e,t,i,s)),m=this.remuxVideo(t,ie,vn,tr)}}else At&&(m=this.remuxVideo(t,ie,vn,0));m&&(m.firstKeyFrame=rr,m.independent=rr!==-1,m.firstKeyFramePTS=Bn)}}return this.ISGenerated&&this._initPTS&&this._initDTS&&(n.samples.length&&(W=ia(n,i,this._initPTS,this._initDTS)),r.samples.length&&(D=sa(r,i,this._initPTS))),{audio:y,video:m,initSegment:S,independent:k,text:D,id3:W}}generateIS(e,t,n,r){const i=e.samples,s=t.samples,o=this.typeSupported,c={},m=this._initPTS;let y=!m||r,S="audio/mp4",D,W,k;if(y&&(D=W=1/0),e.config&&i.length){switch(e.timescale=e.samplerate,e.segmentCodec){case"mp3":o.mpeg?(S="audio/mpeg",e.codec=""):o.mp3&&(e.codec="mp3");break;case"ac3":e.codec="ac-3";break}c.audio={id:"audio",container:S,codec:e.codec,initSegment:e.segmentCodec==="mp3"&&o.mpeg?new Uint8Array(0):wt.initSegment([e]),metadata:{channelCount:e.channelCount}},y&&(k=e.inputTimeScale,!m||k!==m.timescale?D=W=i[0].pts-Math.round(k*n):y=!1)}if(t.sps&&t.pps&&s.length){if(t.timescale=t.inputTimeScale,c.video={id:"main",container:"video/mp4",codec:t.codec,initSegment:wt.initSegment([t]),metadata:{width:t.width,height:t.height}},y)if(k=t.inputTimeScale,!m||k!==m.timescale){const G=this.getVideoStartPts(s),ie=Math.round(k*n);W=Math.min(W,oi(s[0].dts,G)-ie),D=Math.min(D,G-ie)}else y=!1;this.videoTrackConfig={width:t.width,height:t.height,pixelRatio:t.pixelRatio}}if(Object.keys(c).length)return this.ISGenerated=!0,y?(this._initPTS={baseTime:D,timescale:k},this._initDTS={baseTime:W,timescale:k}):D=k=void 0,{tracks:c,initPTS:D,timescale:k}}remuxVideo(e,t,n,r){const i=e.inputTimeScale,s=e.samples,o=[],c=s.length,m=this._initPTS;let y=this.nextAvcDts,S=8,D=this.videoSampleDuration,W,k,G=Number.POSITIVE_INFINITY,ie=Number.NEGATIVE_INFINITY,We=!1;if(!n||y===null){const Un=t*i,Mn=s[0].pts-oi(s[0].dts,s[0].pts);ki&&y!==null&&Math.abs(Un-Mn-y)<15e3?n=!0:y=Un-Mn}const mt=m.baseTime*i/m.timescale;for(let Un=0;Un0?Un-1:Un].dts&&(We=!0)}We&&s.sort(function(Un,Mn){const xr=Un.dts-Mn.dts,ur=Un.pts-Mn.pts;return xr||ur}),W=s[0].dts,k=s[s.length-1].dts;const ht=k-W,zt=ht?Math.round(ht/(c-1)):D||e.inputTimeScale/30;if(n){const Un=W-y,Mn=Un>zt,xr=Un<-1;if((Mn||xr)&&(Mn?A.warn(`AVC: ${ji(Un,!0)} ms (${Un}dts) hole between fragments detected at ${t.toFixed(3)}`):A.warn(`AVC: ${ji(-Un,!0)} ms (${Un}dts) overlapping between fragments detected at ${t.toFixed(3)}`),!xr||y>=s[0].pts||ki)){W=y;const ur=s[0].pts-Un;if(Mn)s[0].dts=W,s[0].pts=ur;else for(let Dr=0;Drur);Dr++)s[Dr].dts-=Un,s[Dr].pts-=Un;A.log(`Video: Initial PTS/DTS adjusted: ${ji(ur,!0)}/${ji(W,!0)}, delta: ${ji(Un,!0)} ms`)}}W=Math.max(0,W);let At=0,nn=0,kt=W;for(let Un=0;Un0?Mn.dts-s[Un-1].dts:zt;if(Dr=Un>0?Mn.pts-s[Un-1].pts:zt,Yr.stretchShortVideoTrack&&this.nextAudioPts!==null){const ci=Math.floor(Yr.maxBufferHole*i),Ki=(r?G+r*i:this.nextAudioPts)-Mn.pts;Ki>ci?(D=Ki-Jr,D<0?D=Jr:vn=!0,A.log(`[mp4-remuxer]: It is approximately ${Ki/90} ms to the next segment; using duration ${D/90} ms for the last video frame.`)):D=Jr}else D=Jr}const Vr=Math.round(Mn.pts-Mn.dts);rr=Math.min(rr,D),tr=Math.max(tr,D),Bn=Math.min(Bn,Dr),qn=Math.max(qn,Dr),o.push(new aa(Mn.key,D,ur,Vr))}if(o.length){if(ki){if(ki<70){const Un=o[0].flags;Un.dependsOn=2,Un.isNonSync=0}}else if(Ss&&qn-Bn0&&(r&&Math.abs(mt-We)<9e3||Math.abs(oi(G[0].pts-ht,mt)-We)<20*y),G.forEach(function(Qn){Qn.pts=oi(Qn.pts-ht,mt)}),!n||We<0){if(G=G.filter(Qn=>Qn.pts>=0),!G.length)return;i===0?We=0:r&&!k?We=Math.max(0,mt):We=G[0].pts}if(e.segmentCodec==="aac"){const Qn=this.config.maxAudioFramesDrift;for(let yr=0,Br=We;yr=Qn*y&&ur0){kt+=ie;try{nn=new Uint8Array(kt)}catch(ur){this.observer.emit(g.ERROR,g.ERROR,{type:X.MUX_ERROR,details:z.REMUX_ALLOC_ERROR,fatal:!1,error:ur,bytes:kt,reason:`fail allocating audio mdat ${kt}`});return}D||(new DataView(nn.buffer).setUint32(0,kt),nn.set(wt.types.mdat,4))}else return;nn.set(Un,ie);const xr=Un.byteLength;ie+=xr,W.push(new aa(!0,m,xr,0)),At=Mn}const In=W.length;if(!In)return;const Xt=W[W.length-1];this.nextAudioPts=We=At+c*Xt.duration;const vn=D?new Uint8Array(0):wt.moof(e.sequenceNumber++,zt/c,fe({},e,{samples:W}));e.samples=[];const rr=zt/s,Bn=We/s,qn={data1:vn,data2:nn,startPTS:rr,endPTS:Bn,startDTS:rr,endDTS:Bn,type:"audio",hasAudio:!0,hasVideo:!1,nb:In};return this.isAudioContiguous=!0,qn}remuxEmptyAudio(e,t,n,r){const i=e.inputTimeScale,s=e.samplerate?e.samplerate:i,o=i/s,c=this.nextAudioPts,m=this._initDTS,y=m.baseTime*9e4/m.timescale,S=(c!==null?c:r.startDTS*i)+y,D=r.endDTS*i+y,W=o*ra,k=Math.ceil((D-S)/W),G=ta.getSilentFrame(e.manifestCodec||e.codec,e.channelCount);if(A.warn("[mp4-remuxer]: remux empty Audio"),!G){A.trace("[mp4-remuxer]: Unable to remuxEmptyAudio since we were unable to get a silent frame for given audio codec");return}const ie=[];for(let We=0;We4294967296;)a+=t;return a}function To(a){for(let e=0;es.pts-o.pts);const i=a.samples;return a.samples=[],{samples:i}}class aa{constructor(e,t,n,r){this.size=void 0,this.duration=void 0,this.cts=void 0,this.flags=void 0,this.duration=t,this.size=n,this.cts=r,this.flags={isLeading:0,isDependedOn:0,hasRedundancy:0,degradPrio:0,dependsOn:e?2:1,isNonSync:e?0:1}}}class Lo{constructor(){this.emitInitSegment=!1,this.audioCodec=void 0,this.videoCodec=void 0,this.initData=void 0,this.initPTS=null,this.initTracks=void 0,this.lastEndTime=null}destroy(){}resetTimeStamp(e){this.initPTS=e,this.lastEndTime=null}resetNextTimestamp(){this.lastEndTime=null}resetInitSegment(e,t,n,r){this.audioCodec=t,this.videoCodec=n,this.generateInitSegment(hn(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=xt(e);r.audio&&(t=oa(r.audio,he.AUDIO)),r.video&&(n=oa(r.video,he.VIDEO));const i={};r.audio&&r.video?i.audiovideo={container:"video/mp4",codec:t+","+n,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,initSegment:e,id:"main"}:A.warn("[passthrough-remuxer.ts]: initSegment does not contain moov or trak boxes."),this.initTracks=i}remux(e,t,n,r,i,s){var o,c;let{initPTS:m,lastEndTime:y}=this;const S={audio:void 0,video:void 0,text:r,id3:n,initSegment:void 0};M(y)||(y=this.lastEndTime=i||0);const D=t.samples;if(!(D!=null&&D.length))return S;const W={initPTS:void 0,timescale:1};let k=this.initData;if((o=k)!=null&&o.length||(this.generateInitSegment(D),k=this.initData),!((c=k)!=null&&c.length))return A.warn("[passthrough-remuxer.ts]: Failed to generate initSegment."),S;this.emitInitSegment&&(W.tracks=this.initTracks,this.emitInitSegment=!1);const G=an(D,k),ie=xn(k,D),We=ie===null?i:ie;(Io(m,We,i,G)||W.timescale!==m.timescale&&s)&&(W.initPTS=We-i,m&&m.timescale===1&&A.warn(`Adjusting initPTS by ${W.initPTS-m.baseTime}`),this.initPTS=m={baseTime:W.initPTS,timescale:1});const mt=e?We-m.baseTime/m.timescale:y,ht=mt+G;Ot(k,D,m.baseTime/m.timescale),G>0?this.lastEndTime=ht:(A.warn("Duration parsed from mp4 should be greater than zero"),this.resetNextTimestamp());const zt=!!k.audio,At=!!k.video;let nn="";zt&&(nn+="audio"),At&&(nn+="video");const kt={data1:D,startPTS:mt,startDTS:mt,endPTS:ht,endDTS:ht,type:nn,hasAudio:zt,hasVideo:At,nb:1,dropped:0};return S.audio=kt.type==="audio"?kt:void 0,S.video=kt.type!=="audio"?kt:void 0,S.initSegment=W,S.id3=ia(n,i,m,m),r.samples.length&&(S.text=sa(r,i,m)),S}}function Io(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 oa(a,e){const t=a==null?void 0:a.codec;if(t&&t.length>4)return t;if(e===he.AUDIO){if(t==="ec-3"||t==="ac-3"||t==="alac")return t;if(t==="fLaC"||t==="Opus")return Lt(t,!1);const n="mp4a.40.5";return A.info(`Parsed audio codec "${t}" or audio object type not handled. Using "${n}"`),n}return A.warn(`Unhandled video codec "${t}"`),t==="hvc1"||t==="hev1"?"hvc1.1.6.L120.90":t==="av01"?"av01.0.04M.08":"avc1.42e01e"}let pi;try{pi=self.performance.now.bind(self.performance)}catch(a){A.debug("Unable to use Performance API on this environment"),pi=Ae==null?void 0:Ae.Date.now}const es=[{demux:ho,remux:Lo},{demux:bi,remux:qi},{demux:uo,remux:qi},{demux:So,remux:qi}];es.splice(2,0,{demux:mo,remux:qi});class la{constructor(e,t,n,r,i){this.async=!1,this.observer=void 0,this.typeSupported=void 0,this.config=void 0,this.vendor=void 0,this.id=void 0,this.demuxer=void 0,this.remuxer=void 0,this.decrypter=void 0,this.probe=void 0,this.decryptionPromise=null,this.transmuxConfig=void 0,this.currentTransmuxState=void 0,this.observer=e,this.typeSupported=t,this.config=n,this.vendor=r,this.id=i}configure(e){this.transmuxConfig=e,this.decrypter&&this.decrypter.reset()}push(e,t,n,r){const i=n.transmuxing;i.executeStart=pi();let s=new Uint8Array(e);const{currentTransmuxState:o,transmuxConfig:c}=this;r&&(this.currentTransmuxState=r);const{contiguous:m,discontinuity:y,trackSwitch:S,accurateTimeOffset:D,timeOffset:W,initSegmentChange:k}=r||o,{audioCodec:G,videoCodec:ie,defaultInitPts:We,duration:mt,initSegmentData:ht}=c,zt=Ro(s,t);if(zt&&zt.method==="AES-128"){const gn=this.getDecrypter();if(gn.isSync()){let In=gn.softwareDecrypt(s,zt.key.buffer,zt.iv.buffer);if(n.part>-1&&(In=gn.flush()),!In)return i.executeEnd=pi(),Es(n);s=new Uint8Array(In)}else return this.decryptionPromise=gn.webCryptoDecrypt(s,zt.key.buffer,zt.iv.buffer).then(In=>{const Xt=this.push(In,null,n);return this.decryptionPromise=null,Xt}),this.decryptionPromise}const At=this.needsProbing(y,S);if(At){const gn=this.configureTransmuxer(s);if(gn)return A.warn(`[transmuxer] ${gn.message}`),this.observer.emit(g.ERROR,g.ERROR,{type:X.MEDIA_ERROR,details:z.FRAG_PARSING_ERROR,fatal:!1,error:gn,reason:gn.message}),i.executeEnd=pi(),Es(n)}(y||S||k||At)&&this.resetInitSegment(ht,G,ie,mt,t),(y||k||At)&&this.resetInitialTimestamp(We),m||this.resetContiguity();const nn=this.transmux(s,zt,W,D,n),kt=this.currentTransmuxState;return kt.contiguous=!0,kt.discontinuity=!1,kt.trackSwitch=!1,i.executeEnd=pi(),nn}flush(e){const t=e.transmuxing;t.executeStart=pi();const{decrypter:n,currentTransmuxState:r,decryptionPromise:i}=this;if(i)return i.then(()=>this.flush(e));const s=[],{timeOffset:o}=r;if(n){const S=n.flush();S&&s.push(this.push(S,null,e))}const{demuxer:c,remuxer:m}=this;if(!c||!m)return t.executeEnd=pi(),[Es(e)];const y=c.flush(o);return ts(y)?y.then(S=>(this.flushRemux(s,S,e),s)):(this.flushRemux(s,y,e),s)}flushRemux(e,t,n){const{audioTrack:r,videoTrack:i,id3Track:s,textTrack:o}=t,{accurateTimeOffset:c,timeOffset:m}=this.currentTransmuxState;A.log(`[transmuxer.ts]: Flushed fragment ${n.sn}${n.part>-1?" p: "+n.part:""} of level ${n.level}`);const y=this.remuxer.remux(r,i,s,o,m,c,!0,this.id);e.push({remuxResult:y,chunkMeta:n}),n.transmuxing.executeEnd=pi()}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:o}=this;!s||!o||(s.resetInitSegment(e,t,n,r),o.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:o,textTrack:c}=this.demuxer.demux(e,t,!1,!this.config.progressive);return{remuxResult:this.remuxer.remux(i,s,o,c,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,vendor:i}=this;let s;for(let D=0,W=es.length;D0&&(e==null?void 0:e.key)!=null&&e.iv!==null&&e.method!=null&&(t=e),t}const Es=a=>({remuxResult:{},chunkMeta:a});function ts(a){return"then"in a&&a.then instanceof Function}class Do{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 Oo{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}}var ca={exports:{}};(function(a){var e=Object.prototype.hasOwnProperty,t="~";function n(){}Object.create&&(n.prototype=Object.create(null),new n().__proto__||(t=!1));function r(c,m,y){this.fn=c,this.context=m,this.once=y||!1}function i(c,m,y,S,D){if(typeof y!="function")throw new TypeError("The listener must be a function");var W=new r(y,S||c,D),k=t?t+m:m;return c._events[k]?c._events[k].fn?c._events[k]=[c._events[k],W]:c._events[k].push(W):(c._events[k]=W,c._eventsCount++),c}function s(c,m){--c._eventsCount===0?c._events=new n:delete c._events[m]}function o(){this._events=new n,this._eventsCount=0}o.prototype.eventNames=function(){var m=[],y,S;if(this._eventsCount===0)return m;for(S in y=this._events)e.call(y,S)&&m.push(t?S.slice(1):S);return Object.getOwnPropertySymbols?m.concat(Object.getOwnPropertySymbols(y)):m},o.prototype.listeners=function(m){var y=t?t+m:m,S=this._events[y];if(!S)return[];if(S.fn)return[S.fn];for(var D=0,W=S.length,k=new Array(W);D{y=y||{},y.frag=this.frag,y.id=this.id,m===g.ERROR&&(this.error=y.error),this.hls.trigger(m,y)};this.observer=new As,this.observer.on(g.FRAG_DECRYPTED,s),this.observer.on(g.ERROR,s);const o=He(i.preferManagedMediaSource)||{isTypeSupported:()=>!1},c={mpeg:o.isTypeSupported("audio/mpeg"),mp3:o.isTypeSupported('audio/mp4; codecs="mp3"'),ac3:o.isTypeSupported('audio/mp4; codecs="ac-3"')};if(this.useWorker&&typeof Worker!="undefined"&&(i.workerPath||Qa())){try{i.workerPath?(A.log(`loading Web Worker ${i.workerPath} for "${t}"`),this.workerContext=$a(i.workerPath)):(A.log(`injecting Web Worker for "${t}"`),this.workerContext=Ja()),this.onwmsg=S=>this.onWorkerMessage(S);const{worker:y}=this.workerContext;y.addEventListener("message",this.onwmsg),y.onerror=S=>{const D=new Error(`${S.message} (${S.filename}:${S.lineno})`);i.enableWorker=!1,A.warn(`Error in "${t}" Web Worker, fallback to inline`),this.hls.trigger(g.ERROR,{type:X.OTHER_ERROR,details:z.INTERNAL_EXCEPTION,fatal:!1,event:"demuxerWorker",error:D})},y.postMessage({cmd:"init",typeSupported:c,vendor:"",id:t,config:JSON.stringify(i)})}catch(y){A.warn(`Error setting up "${t}" Web Worker, fallback to inline`,y),this.resetWorker(),this.error=null,this.transmuxer=new la(this.observer,c,i,"",t)}return}this.transmuxer=new la(this.observer,c,i,"",t)}resetWorker(){if(this.workerContext){const{worker:e,objectURL:t}=this.workerContext;t&&self.URL.revokeObjectURL(t),e.removeEventListener("message",this.onwmsg),e.onerror=null,e.terminate(),this.workerContext=null}}destroy(){if(this.workerContext)this.resetWorker(),this.onwmsg=void 0;else{const t=this.transmuxer;t&&(t.destroy(),this.transmuxer=null)}const e=this.observer;e&&e.removeAllListeners(),this.frag=null,this.observer=null,this.hls=null}push(e,t,n,r,i,s,o,c,m,y){var S,D;m.transmuxing.start=self.performance.now();const{transmuxer:W}=this,k=s?s.start:i.start,G=i.decryptdata,ie=this.frag,We=!(ie&&i.cc===ie.cc),mt=!(ie&&m.level===ie.level),ht=ie?m.sn-ie.sn:-1,zt=this.part?m.part-this.part.index:-1,At=ht===0&&m.id>1&&m.id===(ie==null?void 0:ie.stats.chunkCount),nn=!mt&&(ht===1||ht===0&&(zt===1||At&&zt<=0)),kt=self.performance.now();(mt||ht||i.stats.parsing.start===0)&&(i.stats.parsing.start=kt),s&&(zt||!nn)&&(s.stats.parsing.start=kt);const gn=!(ie&&((S=i.initSegment)==null?void 0:S.url)===((D=ie.initSegment)==null?void 0:D.url)),In=new Oo(We,nn,c,mt,k,gn);if(!nn||We||gn){A.log(`[transmuxer-interface, ${i.type}]: Starting new transmux session for sn: ${m.sn} p: ${m.part} level: ${m.level} id: ${m.id} discontinuity: ${We} trackSwitch: ${mt} contiguous: ${nn} accurateTimeOffset: ${c} timeOffset: ${k} initSegmentChange: ${gn}`);const Xt=new Do(n,r,t,o,y);this.configureTransmuxer(Xt)}if(this.frag=i,this.part=s,this.workerContext)this.workerContext.worker.postMessage({cmd:"demux",data:e,decryptdata:G,chunkMeta:m,state:In},e instanceof ArrayBuffer?[e]:[]);else if(W){const Xt=W.push(e,G,m,In);ts(Xt)?(W.async=!0,Xt.then(vn=>{this.handleTransmuxComplete(vn)}).catch(vn=>{this.transmuxerError(vn,m,"transmuxer-interface push error")})):(W.async=!1,this.handleTransmuxComplete(Xt))}}flush(e){e.transmuxing.start=self.performance.now();const{transmuxer:t}=this;if(this.workerContext)this.workerContext.worker.postMessage({cmd:"flush",chunkMeta:e});else if(t){let n=t.flush(e);ts(n)||t.async?(ts(n)||(n=Promise.resolve(n)),n.then(i=>{this.handleFlushResult(i,e)}).catch(i=>{this.transmuxerError(i,e,"transmuxer-interface flush error")})):this.handleFlushResult(n,e)}}transmuxerError(e,t,n){this.hls&&(this.error=e,this.hls.trigger(g.ERROR,{type:X.MEDIA_ERROR,details:z.FRAG_PARSING_ERROR,chunkMeta:t,frag:this.frag||void 0,fatal:!1,error:e,err:e,reason:n}))}handleFlushResult(e,t){e.forEach(n=>{this.handleTransmuxComplete(n)}),this.onFlush(t)}onWorkerMessage(e){const t=e.data;if(!(t!=null&&t.event)){A.warn(`worker message received with no ${t?"event name":"data"}`);return}const n=this.hls;if(this.hls)switch(t.event){case"init":{var r;const i=(r=this.workerContext)==null?void 0:r.objectURL;i&&self.URL.revokeObjectURL(i);break}case"transmuxComplete":{this.handleTransmuxComplete(t.data);break}case"flush":{this.onFlush(t.data);break}case"workerLog":A[t.data.logType]&&A[t.data.logType](t.data.message);break;default:{t.data=t.data||{},t.data.frag=this.frag,t.data.id=this.id,n.trigger(t.event,t.data);break}}}configureTransmuxer(e){const{transmuxer:t}=this;this.workerContext?this.workerContext.worker.postMessage({cmd:"configure",config:e}):t&&t.configure(e)}handleTransmuxComplete(e){e.chunkMeta.transmuxing.end=self.performance.now(),this.onTransmuxComplete(e)}}const da=100;class Bo extends Vi{constructor(e,t,n){super(e,t,n,"[audio-stream-controller]",Tt.AUDIO),this.videoBuffer=null,this.videoTrackCC=-1,this.waitingVideoCC=-1,this.bufferedTrack=null,this.switchingTrack=null,this.trackId=-1,this.waitingData=null,this.mainDetails=null,this.flushing=!1,this.bufferFlushed=!1,this.cachedTrackLoadedData=null,this._registerListeners()}onHandlerDestroying(){this._unregisterListeners(),super.onHandlerDestroying(),this.mainDetails=null,this.bufferedTrack=null,this.switchingTrack=null}_registerListeners(){const{hls:e}=this;e.on(g.MEDIA_ATTACHED,this.onMediaAttached,this),e.on(g.MEDIA_DETACHING,this.onMediaDetaching,this),e.on(g.MANIFEST_LOADING,this.onManifestLoading,this),e.on(g.LEVEL_LOADED,this.onLevelLoaded,this),e.on(g.AUDIO_TRACKS_UPDATED,this.onAudioTracksUpdated,this),e.on(g.AUDIO_TRACK_SWITCHING,this.onAudioTrackSwitching,this),e.on(g.AUDIO_TRACK_LOADED,this.onAudioTrackLoaded,this),e.on(g.ERROR,this.onError,this),e.on(g.BUFFER_RESET,this.onBufferReset,this),e.on(g.BUFFER_CREATED,this.onBufferCreated,this),e.on(g.BUFFER_FLUSHING,this.onBufferFlushing,this),e.on(g.BUFFER_FLUSHED,this.onBufferFlushed,this),e.on(g.INIT_PTS_FOUND,this.onInitPtsFound,this),e.on(g.FRAG_BUFFERED,this.onFragBuffered,this)}_unregisterListeners(){const{hls:e}=this;e.off(g.MEDIA_ATTACHED,this.onMediaAttached,this),e.off(g.MEDIA_DETACHING,this.onMediaDetaching,this),e.off(g.MANIFEST_LOADING,this.onManifestLoading,this),e.off(g.LEVEL_LOADED,this.onLevelLoaded,this),e.off(g.AUDIO_TRACKS_UPDATED,this.onAudioTracksUpdated,this),e.off(g.AUDIO_TRACK_SWITCHING,this.onAudioTrackSwitching,this),e.off(g.AUDIO_TRACK_LOADED,this.onAudioTrackLoaded,this),e.off(g.ERROR,this.onError,this),e.off(g.BUFFER_RESET,this.onBufferReset,this),e.off(g.BUFFER_CREATED,this.onBufferCreated,this),e.off(g.BUFFER_FLUSHING,this.onBufferFlushing,this),e.off(g.BUFFER_FLUSHED,this.onBufferFlushed,this),e.off(g.INIT_PTS_FOUND,this.onInitPtsFound,this),e.off(g.FRAG_BUFFERED,this.onFragBuffered,this)}onInitPtsFound(e,{frag:t,id:n,initPTS:r,timescale:i}){if(n==="main"){const s=t.cc;this.initPTS[t.cc]={baseTime:r,timescale:i},this.log(`InitPTS for cc: ${s} found from main: ${r}`),this.videoTrackCC=s,this.state===Jt.WAITING_INIT_PTS&&this.tick()}}startLoad(e){if(!this.levels){this.startPosition=e,this.state=Jt.STOPPED;return}const t=this.lastCurrentTime;this.stopLoad(),this.setInterval(da),t>0&&e===-1?(this.log(`Override startPosition with lastCurrentTime @${t.toFixed(3)}`),e=t,this.state=Jt.IDLE):(this.loadedmetadata=!1,this.state=Jt.WAITING_TRACK),this.nextLoadPosition=this.startPosition=this.lastCurrentTime=e,this.tick()}doTick(){switch(this.state){case Jt.IDLE:this.doTickIdle();break;case Jt.WAITING_TRACK:{var e;const{levels:n,trackId:r}=this,i=n==null||(e=n[r])==null?void 0:e.details;if(i){if(this.waitForCdnTuneIn(i))break;this.state=Jt.WAITING_INIT_PTS}break}case Jt.FRAG_LOADING_WAITING_RETRY:{var t;const n=performance.now(),r=this.retryDate;if(!r||n>=r||(t=this.media)!=null&&t.seeking){const{levels:i,trackId:s}=this;this.log("RetryDate reached, switch back to IDLE state"),this.resetStartWhenNotLoaded((i==null?void 0:i[s])||null),this.state=Jt.IDLE}break}case Jt.WAITING_INIT_PTS:{const n=this.waitingData;if(n){const{frag:r,part:i,cache:s,complete:o}=n;if(this.initPTS[r.cc]!==void 0){this.waitingData=null,this.waitingVideoCC=-1,this.state=Jt.FRAG_LOADING;const c=s.flush(),m={frag:r,part:i,payload:c,networkDetails:null};this._handleFragmentLoadProgress(m),o&&super._handleFragmentLoadComplete(m)}else if(this.videoTrackCC!==this.waitingVideoCC)this.log(`Waiting fragment cc (${r.cc}) cancelled because video is at cc ${this.videoTrackCC}`),this.clearWaitingFragment();else{const c=this.getLoadPosition(),m=Er.bufferInfo(this.mediaBuffer,c,this.config.maxBufferHole);Rr(m.end,this.config.maxFragLookUpTolerance,r)<0&&(this.log(`Waiting fragment cc (${r.cc}) @ ${r.start} cancelled because another fragment at ${m.end} is needed`),this.clearWaitingFragment())}}else this.state=Jt.IDLE}}this.onTickEnd()}clearWaitingFragment(){const e=this.waitingData;e&&(this.fragmentTracker.removeFragment(e.frag),this.waitingData=null,this.waitingVideoCC=-1,this.state=Jt.IDLE)}resetLoadingState(){this.clearWaitingFragment(),super.resetLoadingState()}onTickEnd(){const{media:e}=this;e!=null&&e.readyState&&(this.lastCurrentTime=e.currentTime)}doTickIdle(){const{hls:e,levels:t,media:n,trackId:r}=this,i=e.config;if(!this.buffering||!n&&(this.startFragRequested||!i.startFragPrefetch)||!(t!=null&&t[r]))return;const s=t[r],o=s.details;if(!o||o.live&&this.levelLastLoaded!==s||this.waitForCdnTuneIn(o)){this.state=Jt.WAITING_TRACK;return}const c=this.mediaBuffer?this.mediaBuffer:this.media;this.bufferFlushed&&c&&(this.bufferFlushed=!1,this.afterBufferFlushed(c,he.AUDIO,Tt.AUDIO));const m=this.getFwdBufferInfo(c,Tt.AUDIO);if(m===null)return;if(!this.switchingTrack&&this._streamEnded(m,o)){e.trigger(g.BUFFER_EOS,{type:"audio"}),this.state=Jt.ENDED;return}const y=this.getFwdBufferInfo(this.videoBuffer?this.videoBuffer:this.media,Tt.MAIN),S=m.len,D=this.getMaxBufferLength(y==null?void 0:y.len),W=o.fragments,k=W[0].start,G=this.getLoadPosition(),ie=this.flushing?G:m.end;if(this.switchingTrack&&n){const zt=G;o.PTSKnown&&ztk||m.nextStart)&&(this.log("Alt audio track ahead of main track, seek to start of alt audio track"),n.currentTime=k+.05)}if(S>=D&&!this.switchingTrack&&iey.end+o.targetduration;if(ht||!(y!=null&&y.len)&&m.len){const zt=this.getAppendedFrag(We.start,Tt.MAIN);if(zt===null||(mt||(mt=!!zt.gap||!!ht&&y.len===0),ht&&!mt||mt&&m.nextStart&&m.nextStartnew dr(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.setInterval(da):this.resetTransmuxer(),n?(this.switchingTrack=t,this.state=Jt.IDLE,this.flushAudioIfNeeded(t)):(this.switchingTrack=null,this.bufferedTrack=t,this.state=Jt.STOPPED),this.tick()}onManifestLoading(){this.fragmentTracker.removeAllFragments(),this.startPosition=this.lastCurrentTime=0,this.bufferFlushed=this.flushing=!1,this.levels=this.mainDetails=this.waitingData=this.bufferedTrack=this.cachedTrackLoadedData=this.switchingTrack=null,this.startFragRequested=!1,this.trackId=this.videoTrackCC=this.waitingVideoCC=-1}onLevelLoaded(e,t){this.mainDetails=t.details,this.cachedTrackLoadedData!==null&&(this.hls.trigger(g.AUDIO_TRACK_LOADED,this.cachedTrackLoadedData),this.cachedTrackLoadedData=null)}onAudioTrackLoaded(e,t){var n;if(this.mainDetails==null){this.cachedTrackLoadedData=t;return}const{levels:r}=this,{details:i,id:s}=t;if(!r){this.warn(`Audio tracks were reset while loading level ${s}`);return}this.log(`Audio track ${s} loaded [${i.startSN},${i.endSN}]${i.lastPartSn?`[part-${i.lastPartSn}-${i.lastPartIndex}]`:""},duration:${i.totalduration}`);const o=r[s];let c=0;if(i.live||(n=o.details)!=null&&n.live){this.checkLiveUpdate(i);const y=this.mainDetails;if(i.deltaUpdateFailed||!y)return;if(!o.details&&i.hasProgramDateTime&&y.hasProgramDateTime)Bi(i,y),c=i.fragments[0].start;else{var m;c=this.alignPlaylists(i,o.details,(m=this.levelLastLoaded)==null?void 0:m.details)}}o.details=i,this.levelLastLoaded=o,!this.startFragRequested&&(this.mainDetails||!i.live)&&this.setStartPosition(this.mainDetails||i,c),this.state===Jt.WAITING_TRACK&&!this.waitForCdnTuneIn(i)&&(this.state=Jt.IDLE),this.tick()}_handleFragmentLoadProgress(e){var t;const{frag:n,part:r,payload:i}=e,{config:s,trackId:o,levels:c}=this;if(!c){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 m=c[o];if(!m){this.warn("Audio track is undefined on fragment load progress");return}const y=m.details;if(!y){this.warn("Audio track details undefined on fragment load progress"),this.removeUnbufferedFrags(n.start);return}const S=s.defaultAudioCodec||m.audioCodec||"mp4a.40.2";let D=this.transmuxer;D||(D=this.transmuxer=new ua(this.hls,Tt.AUDIO,this._handleTransmuxComplete.bind(this),this._handleTransmuxerFlush.bind(this)));const W=this.initPTS[n.cc],k=(t=n.initSegment)==null?void 0:t.data;if(W!==void 0){const ie=r?r.index:-1,We=ie!==-1,mt=new Oi(n.level,n.sn,n.stats.chunkCount,i.byteLength,ie,We);D.push(i,k,S,"",n,r,y.totalduration,!1,mt,W)}else{this.log(`Unknown video PTS for cc ${n.cc}, waiting for video PTS before demuxing audio frag ${n.sn} of [${y.startSN} ,${y.endSN}],track ${o}`);const{cache:G}=this.waitingData=this.waitingData||{frag:n,part:r,cache:new Hs,complete:!1};G.push(new Uint8Array(i)),this.waitingVideoCC=this.videoTrackCC,this.state=Jt.WAITING_INIT_PTS}}_handleFragmentLoadComplete(e){if(this.waitingData){this.waitingData.complete=!0;return}super._handleFragmentLoadComplete(e)}onBufferReset(){this.mediaBuffer=this.videoBuffer=null,this.loadedmetadata=!1}onBufferCreated(e,t){const n=t.tracks.audio;n&&(this.mediaBuffer=n.buffer||null),t.tracks.video&&(this.videoBuffer=t.tracks.video.buffer||null)}onFragBuffered(e,t){const{frag:n,part:r}=t;if(n.type!==Tt.AUDIO){if(!this.loadedmetadata&&n.type===Tt.MAIN){const i=this.videoBuffer||this.media;i&&Er.getBuffered(i).length&&(this.loadedmetadata=!0)}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(n.sn!=="initSegment"){this.fragPrevious=n;const i=this.switchingTrack;i&&(this.bufferedTrack=i,this.switchingTrack=null,this.hls.trigger(g.AUDIO_TRACK_SWITCHED,R({},i)))}this.fragBufferedComplete(n,r)}onError(e,t){var n;if(t.fatal){this.state=Jt.ERROR;return}switch(t.details){case z.FRAG_GAP:case z.FRAG_PARSING_ERROR:case z.FRAG_DECRYPT_ERROR:case z.FRAG_LOAD_ERROR:case z.FRAG_LOAD_TIMEOUT:case z.KEY_LOAD_ERROR:case z.KEY_LOAD_TIMEOUT:this.onFragmentOrKeyLoadError(Tt.AUDIO,t);break;case z.AUDIO_TRACK_LOAD_ERROR:case z.AUDIO_TRACK_LOAD_TIMEOUT:case z.LEVEL_PARSING_ERROR:!t.levelRetry&&this.state===Jt.WAITING_TRACK&&((n=t.context)==null?void 0:n.type)===Pt.AUDIO_TRACK&&(this.state=Jt.IDLE);break;case z.BUFFER_APPEND_ERROR:case z.BUFFER_FULL_ERROR:if(!t.parent||t.parent!=="audio")return;if(t.details===z.BUFFER_APPEND_ERROR){this.resetLoadingState();return}this.reduceLengthAndFlushBuffer(t)&&(this.bufferedTrack=null,super.flushMainBuffer(0,Number.POSITIVE_INFINITY,"audio"));break;case z.INTERNAL_EXCEPTION:this.recoverWorkerError(t);break}}onBufferFlushing(e,{type:t}){t!==he.VIDEO&&(this.flushing=!0)}onBufferFlushed(e,{type:t}){if(t!==he.VIDEO){this.flushing=!1,this.bufferFlushed=!0,this.state===Jt.ENDED&&(this.state=Jt.IDLE);const n=this.mediaBuffer||this.media;n&&(this.afterBufferFlushed(n,t,Tt.AUDIO),this.tick())}}_handleTransmuxComplete(e){var t;const n="audio",{hls:r}=this,{remuxResult:i,chunkMeta:s}=e,o=this.getCurrentContext(s);if(!o){this.resetWhenMissingContext(s);return}const{frag:c,part:m,level:y}=o,{details:S}=y,{audio:D,text:W,id3:k,initSegment:G}=i;if(this.fragContextChanged(c)||!S){this.fragmentTracker.removeFragment(c);return}if(this.state=Jt.PARSING,this.switchingTrack&&D&&this.completeAudioSwitch(this.switchingTrack),G!=null&&G.tracks){const ie=c.initSegment||c;this._bufferInitSegment(y,G.tracks,ie,s),r.trigger(g.FRAG_PARSING_INIT_SEGMENT,{frag:ie,id:n,tracks:G.tracks})}if(D){const{startPTS:ie,endPTS:We,startDTS:mt,endDTS:ht}=D;m&&(m.elementaryStreams[he.AUDIO]={startPTS:ie,endPTS:We,startDTS:mt,endDTS:ht}),c.setElementaryStreamInfo(he.AUDIO,ie,We,mt,ht),this.bufferFragmentData(D,c,m,s)}if(k!=null&&(t=k.samples)!=null&&t.length){const ie=fe({id:n,frag:c,details:S},k);r.trigger(g.FRAG_PARSING_METADATA,ie)}if(W){const ie=fe({id:n,frag:c,details:S},W);r.trigger(g.FRAG_PARSING_USERDATA,ie)}}_bufferInitSegment(e,t,n,r){if(this.state!==Jt.PARSING)return;t.video&&delete t.video;const i=t.audio;if(!i)return;i.id="audio";const s=e.audioCodec;this.log(`Init audio buffer, container:${i.container}, codecs[level/parsed]=[${s}/${i.codec}]`),s&&s.split(",").length===1&&(i.levelCodec=s),this.hls.trigger(g.BUFFER_CODECS,t);const o=i.initSegment;if(o!=null&&o.byteLength){const c={type:"audio",frag:n,part:null,chunkMeta:r,parent:n.type,data:o};this.hls.trigger(g.BUFFER_APPENDING,c)}this.tickImmediate()}loadFragment(e,t,n){const r=this.fragmentTracker.getState(e);if(this.fragCurrent=e,this.switchingTrack||r===gr.NOT_LOADED||r===gr.PARTIAL){var i;if(e.sn==="initSegment")this._loadInitSegment(e,t);else if((i=t.details)!=null&&i.live&&!this.initPTS[e.cc]){this.log(`Waiting for video PTS in continuity counter ${e.cc} of live stream before loading audio fragment ${e.sn} of level ${this.trackId}`),this.state=Jt.WAITING_INIT_PTS;const s=this.mainDetails;s&&s.fragments[0].start!==t.details.fragments[0].start&&Bi(t.details,s)}else this.startFragRequested=!0,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:o}=this.bufferedTrack;ri({name:t,lang:n,assocLang:r,characteristics:i,audioCodec:s,channels:o},e,Gn)||(this.log("Switching audio track : flushing all audio"),super.flushMainBuffer(0,Number.POSITIVE_INFINITY,"audio"),this.bufferedTrack=null)}}completeAudioSwitch(e){const{hls:t}=this;this.flushAudioIfNeeded(e),this.bufferedTrack=e,this.switchingTrack=null,t.trigger(g.AUDIO_TRACK_SWITCHED,R({},e))}}function fa(a,e){if(a.length!==e.length)return!1;for(let t=0;ta[r]!==e[r])}function xs(a,e){return e.label.toLowerCase()===a.name.toLowerCase()&&(!e.language||e.language.toLowerCase()===(a.lang||"").toLowerCase())}class Mo extends hr{constructor(e){super(e,"[audio-track-controller]"),this.tracks=[],this.groupIds=null,this.tracksInGroup=[],this.trackId=-1,this.currentTrack=null,this.selectDefaultTrack=!0,this.registerListeners()}registerListeners(){const{hls:e}=this;e.on(g.MANIFEST_LOADING,this.onManifestLoading,this),e.on(g.MANIFEST_PARSED,this.onManifestParsed,this),e.on(g.LEVEL_LOADING,this.onLevelLoading,this),e.on(g.LEVEL_SWITCHING,this.onLevelSwitching,this),e.on(g.AUDIO_TRACK_LOADED,this.onAudioTrackLoaded,this),e.on(g.ERROR,this.onError,this)}unregisterListeners(){const{hls:e}=this;e.off(g.MANIFEST_LOADING,this.onManifestLoading,this),e.off(g.MANIFEST_PARSED,this.onManifestParsed,this),e.off(g.LEVEL_LOADING,this.onLevelLoading,this),e.off(g.LEVEL_SWITCHING,this.onLevelSwitching,this),e.off(g.AUDIO_TRACK_LOADED,this.onAudioTrackLoaded,this),e.off(g.ERROR,this.onError,this)}destroy(){this.unregisterListeners(),this.tracks.length=0,this.tracksInGroup.length=0,this.currentTrack=null,super.destroy()}onManifestLoading(){this.tracks=[],this.tracksInGroup=[],this.groupIds=null,this.currentTrack=null,this.trackId=-1,this.selectDefaultTrack=!0}onManifestParsed(e,t){this.tracks=t.audioTracks||[]}onAudioTrackLoaded(e,t){const{id:n,groupId:r,details:i}=t,s=this.tracksInGroup[n];if(!s||s.groupId!==r){this.warn(`Audio track with id:${n} and group:${r} not found in active group ${s==null?void 0:s.groupId}`);return}const o=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,o)}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(o=>(r==null?void 0:r.indexOf(o))===-1)){this.groupIds=n,this.trackId=-1,this.currentTrack=null;const o=this.tracks.filter(D=>!n||n.indexOf(D.groupId)!==-1);if(o.length)this.selectDefaultTrack&&!o.some(D=>D.default)&&(this.selectDefaultTrack=!1),o.forEach((D,W)=>{D.id=W});else if(!i&&!this.tracksInGroup.length)return;this.tracksInGroup=o;const c=this.hls.config.audioPreference;if(!i&&c){const D=ei(c,o,Gn);if(D>-1)i=o[D];else{const W=ei(c,this.tracks);i=this.tracks[W]}}let m=this.findTrackId(i);m===-1&&i&&(m=this.findTrackId(null));const y={audioTracks:o};this.log(`Updating audio tracks, ${o.length} track(s) found in group(s): ${n==null?void 0:n.join(",")}`),this.hls.trigger(g.AUDIO_TRACKS_UPDATED,y);const S=this.trackId;if(m!==-1&&S===-1)this.setAudioTrack(m);else if(o.length&&S===-1){var s;const D=new Error(`No audio track selected for current audio group-ID(s): ${(s=this.groupIds)==null?void 0:s.join(",")} track count: ${o.length}`);this.warn(D.message),this.hls.trigger(g.ERROR,{type:X.MEDIA_ERROR,details:z.AUDIO_TRACK_LOAD_ERROR,fatal:!0,error:D})}}else this.shouldReloadPlaylist(i)&&this.setAudioTrack(this.trackId)}onError(e,t){t.fatal||!t.context||t.context.type===Pt.AUDIO_TRACK&&t.context.id===this.trackId&&(!this.groupIds||this.groupIds.indexOf(t.context.groupId)!==-1)&&(this.requestScheduled=-1,this.checkRetry(t))}get allAudioTracks(){return this.tracks}get audioTracks(){return this.tracksInGroup}get audioTrack(){return this.trackId}set audioTrack(e){this.selectDefaultTrack=!1,this.setAudioTrack(e)}setAudioOption(e){const t=this.hls;if(t.config.audioPreference=e,e){const n=this.allAudioTracks;if(this.selectDefaultTrack=!1,n.length){const r=this.currentTrack;if(r&&ri(e,r,Gn))return r;const i=ei(e,this.tracksInGroup,Gn);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 o=Hr(e,t.levels,n,s,Gn);if(o===-1)return null;t.nextLoadLevel=o}if(e.channels||e.audioCodec){const s=ei(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.clearTimer(),this.selectDefaultTrack=!1;const n=this.currentTrack,r=t[e],i=r.details&&!r.details.live;if(e===this.trackId&&r===n&&i||(this.log(`Switching to audio-track ${e} "${r.name}" lang:${r.lang} group:${r.groupId} channels:${r.channels}`),this.trackId=e,this.currentTrack=r,this.hls.trigger(g.AUDIO_TRACK_SWITCHING,R({},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=i[m].start&&o<=i[m].end){s=i[m];break}const c=n.start+n.duration;s?s.end=c:(s={start:o,end:c},i.push(s)),this.fragmentTracker.fragBuffered(n),this.fragBufferedComplete(n,null)}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 o=0;onew dr(n));return}this.tracksBuffered=[],this.levels=t.map(n=>{const r=new dr(n);return this.tracksBuffered[r.id]=[],r}),this.fragmentTracker.removeFragmentsInRange(0,Number.POSITIVE_INFINITY,Tt.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.setInterval(ha)}onSubtitleTrackLoaded(e,t){var n;const{currentTrackId:r,levels:i}=this,{details:s,id:o}=t;if(!i){this.warn(`Subtitle tracks were reset while loading level ${o}`);return}const c=i[o];if(o>=i.length||!c)return;this.log(`Subtitle track ${o} loaded [${s.startSN},${s.endSN}]${s.lastPartSn?`[part-${s.lastPartSn}-${s.lastPartIndex}]`:""},duration:${s.totalduration}`),this.mediaBuffer=this.mediaBufferTimeRanges;let m=0;if(s.live||(n=c.details)!=null&&n.live){const S=this.mainDetails;if(s.deltaUpdateFailed||!S)return;const D=S.fragments[0];if(!c.details)s.hasProgramDateTime&&S.hasProgramDateTime?(Bi(s,S),m=s.fragments[0].start):D&&(m=D.start,Jn(s,m));else{var y;m=this.alignPlaylists(s,c.details,(y=this.levelLastLoaded)==null?void 0:y.details),m===0&&D&&(m=D.start,Jn(s,m))}}c.details=s,this.levelLastLoaded=c,o===r&&(!this.startFragRequested&&(this.mainDetails||!s.live)&&this.setStartPosition(this.mainDetails||s,m),this.tick(),s.live&&!this.fragCurrent&&this.media&&this.state===Jt.IDLE&&(Xn(null,s.fragments,this.media.currentTime,0)||(this.warn("Subtitle playlist not aligned with playback"),c.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&&r.method==="AES-128"){const s=performance.now();this.decrypter.decrypt(new Uint8Array(n),r.key.buffer,r.iv.buffer).catch(o=>{throw i.trigger(g.ERROR,{type:X.MEDIA_ERROR,details:z.FRAG_DECRYPT_ERROR,fatal:!1,error:o,reason:o.message,frag:t}),o}).then(o=>{const c=performance.now();i.trigger(g.FRAG_DECRYPTED,{frag:t,payload:o,stats:{tstart:s,tdecrypt:c}})}).catch(o=>{this.warn(`${o.name}: ${o.message}`),this.state=Jt.IDLE})}}doTick(){if(!this.media){this.state=Jt.IDLE;return}if(this.state===Jt.IDLE){const{currentTrackId:e,levels:t}=this,n=t==null?void 0:t[e];if(!n||!t.length||!n.details)return;const{config:r}=this,i=this.getLoadPosition(),s=Er.bufferedInfo(this.tracksBuffered[this.currentTrackId]||[],i,r.maxBufferHole),{end:o,len:c}=s,m=this.getFwdBufferInfo(this.media,Tt.MAIN),y=n.details,S=this.getMaxBufferLength(m==null?void 0:m.len)+y.levelTargetDuration;if(c>S)return;const D=y.fragments,W=D.length,k=y.edge;let G=null;const ie=this.fragPrevious;if(ok-We?0:We;G=Xn(ie,D,Math.max(D[0].start,o),mt),!G&&ie&&ie.start{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)}}}}class ko extends hr{constructor(e){super(e,"[subtitle-track-controller]"),this.media=null,this.tracks=[],this.groupIds=null,this.tracksInGroup=[],this.trackId=-1,this.currentTrack=null,this.selectDefaultTrack=!0,this.queuedDefaultTrack=-1,this.asyncPollTrackChange=()=>this.pollTrackChange(0),this.useTextTrackPolling=!1,this.subtitlePollingInterval=-1,this._subtitleDisplay=!0,this.onTextTracksChanged=()=>{if(this.useTextTrackPolling||self.clearInterval(this.subtitlePollingInterval),!this.media||!this.hls.config.renderTextTracksNatively)return;let t=null;const n=Wt(this.media.textTracks);for(let i=0;i-1&&this.toggleTrackModes()}registerListeners(){const{hls:e}=this;e.on(g.MEDIA_ATTACHED,this.onMediaAttached,this),e.on(g.MEDIA_DETACHING,this.onMediaDetaching,this),e.on(g.MANIFEST_LOADING,this.onManifestLoading,this),e.on(g.MANIFEST_PARSED,this.onManifestParsed,this),e.on(g.LEVEL_LOADING,this.onLevelLoading,this),e.on(g.LEVEL_SWITCHING,this.onLevelSwitching,this),e.on(g.SUBTITLE_TRACK_LOADED,this.onSubtitleTrackLoaded,this),e.on(g.ERROR,this.onError,this)}unregisterListeners(){const{hls:e}=this;e.off(g.MEDIA_ATTACHED,this.onMediaAttached,this),e.off(g.MEDIA_DETACHING,this.onMediaDetaching,this),e.off(g.MANIFEST_LOADING,this.onManifestLoading,this),e.off(g.MANIFEST_PARSED,this.onManifestParsed,this),e.off(g.LEVEL_LOADING,this.onLevelLoading,this),e.off(g.LEVEL_SWITCHING,this.onLevelSwitching,this),e.off(g.SUBTITLE_TRACK_LOADED,this.onSubtitleTrackLoaded,this),e.off(g.ERROR,this.onError,this)}onMediaAttached(e,t){this.media=t.media,this.media&&(this.queuedDefaultTrack>-1&&(this.subtitleTrack=this.queuedDefaultTrack,this.queuedDefaultTrack=-1),this.useTextTrackPolling=!(this.media.textTracks&&"onchange"in this.media.textTracks),this.useTextTrackPolling?this.pollTrackChange(500):this.media.textTracks.addEventListener("change",this.asyncPollTrackChange))}pollTrackChange(e){self.clearInterval(this.subtitlePollingInterval),this.subtitlePollingInterval=self.setInterval(this.onTextTracksChanged,e)}onMediaDetaching(){if(!this.media)return;self.clearInterval(this.subtitlePollingInterval),this.useTextTrackPolling||this.media.textTracks.removeEventListener("change",this.asyncPollTrackChange),this.trackId>-1&&(this.queuedDefaultTrack=this.trackId),Wt(this.media.textTracks).forEach(t=>{dn(t)}),this.subtitleTrack=-1,this.media=null}onManifestLoading(){this.tracks=[],this.groupIds=null,this.tracksInGroup=[],this.trackId=-1,this.currentTrack=null,this.selectDefaultTrack=!0}onManifestParsed(e,t){this.tracks=t.subtitleTracks}onSubtitleTrackLoaded(e,t){const{id: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 o=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,o)}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(y=>!n||n.indexOf(y.groupId)!==-1);if(s.length)this.selectDefaultTrack&&!s.some(y=>y.default)&&(this.selectDefaultTrack=!1),s.forEach((y,S)=>{y.id=S});else if(!i&&!this.tracksInGroup.length)return;this.tracksInGroup=s;const o=this.hls.config.subtitlePreference;if(!i&&o){this.selectDefaultTrack=!1;const y=ei(o,s);if(y>-1)i=s[y];else{const S=ei(o,this.tracks);i=this.tracks[S]}}let c=this.findTrackId(i);c===-1&&i&&(c=this.findTrackId(null));const m={subtitleTracks:s};this.log(`Updating subtitle tracks, ${s.length} track(s) found in "${n==null?void 0:n.join(",")}" group-id`),this.hls.trigger(g.SUBTITLE_TRACKS_UPDATED,m),c!==-1&&this.trackId===-1&&this.setSubtitleTrack(c)}else this.shouldReloadPlaylist(i)&&this.setSubtitleTrack(this.trackId)}findTrackId(e){const t=this.tracksInGroup,n=this.selectDefaultTrack;for(let r=0;r-1){const i=this.tracksInGroup[r];return this.setSubtitleTrack(r),i}else{if(n)return null;{const i=ei(e,t);if(i>-1)return t[i]}}}}return null}loadPlaylist(e){super.loadPlaylist();const t=this.currentTrack;if(this.shouldLoadPlaylist(t)&&t){const n=t.id,r=t.groupId;let i=t.url;if(e)try{i=e.addDirectives(i)}catch(s){this.warn(`Could not construct new URL with HLS Delivery Directives: ${s}`)}this.log(`Loading subtitle playlist for id ${n}`),this.hls.trigger(g.SUBTITLE_TRACK_LOADING,{url:i,id:n,groupId:r,deliveryDirectives:e||null})}}toggleTrackModes(){const{media:e}=this;if(!e)return;const t=Wt(e.textTracks),n=this.currentTrack;let r;if(n&&(r=t.filter(i=>xs(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||!M(e)){this.warn(`Invalid subtitle track id: ${e}`);return}this.clearTimer(),this.selectDefaultTrack=!1;const n=this.currentTrack,r=t[e]||null;if(this.trackId=e,this.currentTrack=r,this.toggleTrackModes(),!r){this.hls.trigger(g.SUBTITLE_TRACK_SWITCH,{id:e});return}const i=!!r.details&&!r.details.live;if(e===this.trackId&&r===n&&i)return;this.log(`Switching to subtitle-track ${e}`+(r?` "${r.name}" lang:${r.lang} group:${r.groupId}`:""));const{id:s,groupId:o="",name:c,type:m,url:y}=r;this.hls.trigger(g.SUBTITLE_TRACK_SWITCH,{id:s,groupId:o,name:c,type:m,url:y});const S=this.switchParams(r.url,n==null?void 0:n.details,r.details);this.loadPlaylist(S)}}class _o{constructor(e){this.buffers=void 0,this.queues={video:[],audio:[],audiovideo:[]},this.buffers=e}append(e,t,n){const r=this.queues[t];r.push(e),r.length===1&&!n&&this.executeNext(t)}insertAbort(e,t){this.queues[t].unshift(e),this.executeNext(t)}appendBlocker(e){let t;const n=new Promise(i=>{t=i}),r={execute:t,onStart:()=>{},onComplete:()=>{},onError:()=>{}};return this.append(r,e),n}executeNext(e){const t=this.queues[e];if(t.length){const n=t[0];try{n.execute()}catch(r){A.warn(`[buffer-operation-queue]: Exception executing "${e}" SourceBuffer operation: ${r}`),n.onError(r);const i=this.buffers[e];i!=null&&i.updating||this.shiftAndExecuteNext(e)}}}shiftAndExecuteNext(e){this.queues[e].shift(),this.executeNext(e)}current(e){return this.queues[e][0]}}const ma=/(avc[1234]|hvc1|hev1|dvh[1e]|vp09|av01)(?:\.[^.,]+)+/;class Uo{constructor(e){this.details=null,this._objectUrl=null,this.operationQueue=void 0,this.listeners=void 0,this.hls=void 0,this.bufferCodecEventsExpected=0,this._bufferCodecEventsTotal=0,this.media=null,this.mediaSource=null,this.lastMpegAudioChunk=null,this.appendSource=void 0,this.appendErrors={audio:0,video:0,audiovideo:0},this.tracks={},this.pendingTracks={},this.sourceBuffer=void 0,this.log=void 0,this.warn=void 0,this.error=void 0,this._onEndStreaming=n=>{this.hls&&this.hls.pauseBuffering()},this._onStartStreaming=n=>{this.hls&&this.hls.resumeBuffering()},this._onMediaSourceOpen=()=>{const{media:n,mediaSource:r}=this;this.log("Media source opened"),n&&(n.removeEventListener("emptied",this._onMediaEmptied),this.updateMediaElementDuration(),this.hls.trigger(g.MEDIA_ATTACHED,{media:n,mediaSource:r})),r&&r.removeEventListener("sourceopen",this._onMediaSourceOpen),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&&A.error(`Media element src was set while attaching MediaSource (${r} > ${n})`)},this.hls=e;const t="[buffer-controller]";this.appendSource=at(He(e.config.preferManagedMediaSource)),this.log=A.log.bind(A,t),this.warn=A.warn.bind(A,t),this.error=A.error.bind(A,t),this._initSourceBuffer(),this.registerListeners()}hasSourceTypes(){return this.getSourceBufferTypes().length>0||Object.keys(this.pendingTracks).length>0}destroy(){this.unregisterListeners(),this.details=null,this.lastMpegAudioChunk=null,this.hls=null}registerListeners(){const{hls:e}=this;e.on(g.MEDIA_ATTACHING,this.onMediaAttaching,this),e.on(g.MEDIA_DETACHING,this.onMediaDetaching,this),e.on(g.MANIFEST_LOADING,this.onManifestLoading,this),e.on(g.MANIFEST_PARSED,this.onManifestParsed,this),e.on(g.BUFFER_RESET,this.onBufferReset,this),e.on(g.BUFFER_APPENDING,this.onBufferAppending,this),e.on(g.BUFFER_CODECS,this.onBufferCodecs,this),e.on(g.BUFFER_EOS,this.onBufferEos,this),e.on(g.BUFFER_FLUSHING,this.onBufferFlushing,this),e.on(g.LEVEL_UPDATED,this.onLevelUpdated,this),e.on(g.FRAG_PARSED,this.onFragParsed,this),e.on(g.FRAG_CHANGED,this.onFragChanged,this)}unregisterListeners(){const{hls:e}=this;e.off(g.MEDIA_ATTACHING,this.onMediaAttaching,this),e.off(g.MEDIA_DETACHING,this.onMediaDetaching,this),e.off(g.MANIFEST_LOADING,this.onManifestLoading,this),e.off(g.MANIFEST_PARSED,this.onManifestParsed,this),e.off(g.BUFFER_RESET,this.onBufferReset,this),e.off(g.BUFFER_APPENDING,this.onBufferAppending,this),e.off(g.BUFFER_CODECS,this.onBufferCodecs,this),e.off(g.BUFFER_EOS,this.onBufferEos,this),e.off(g.BUFFER_FLUSHING,this.onBufferFlushing,this),e.off(g.LEVEL_UPDATED,this.onLevelUpdated,this),e.off(g.FRAG_PARSED,this.onFragParsed,this),e.off(g.FRAG_CHANGED,this.onFragChanged,this)}_initSourceBuffer(){this.sourceBuffer={},this.operationQueue=new _o(this.sourceBuffer),this.listeners={audio:[],video:[],audiovideo:[]},this.appendErrors={audio:0,video:0,audiovideo:0},this.lastMpegAudioChunk=null}onManifestLoading(){this.bufferCodecEventsExpected=this._bufferCodecEventsTotal=0,this.details=null}onManifestParsed(e,t){let n=2;(t.audio&&!t.video||!t.altAudio)&&(n=1),this.bufferCodecEventsExpected=this._bufferCodecEventsTotal=n,this.log(`${this.bufferCodecEventsExpected} bufferCodec event(s) expected`)}onMediaAttaching(e,t){const n=this.media=t.media,r=He(this.appendSource);if(n&&r){var i;const s=this.mediaSource=new r;this.log(`created media source: ${(i=s.constructor)==null?void 0:i.name}`),s.addEventListener("sourceopen",this._onMediaSourceOpen),s.addEventListener("sourceended",this._onMediaSourceEnded),s.addEventListener("sourceclose",this._onMediaSourceClose),this.appendSource&&(s.addEventListener("startstreaming",this._onStartStreaming),s.addEventListener("endstreaming",this._onEndStreaming));const o=this._objectUrl=self.URL.createObjectURL(s);if(this.appendSource)try{n.removeAttribute("src");const c=self.ManagedMediaSource;n.disableRemotePlayback=n.disableRemotePlayback||c&&s instanceof c,ga(n),zo(n,o),n.load()}catch(c){n.src=o}else n.src=o;n.addEventListener("emptied",this._onMediaEmptied)}}onMediaDetaching(){const{media:e,mediaSource:t,_objectUrl:n}=this;if(t){if(this.log("media source detaching"),t.readyState==="open")try{t.endOfStream()}catch(r){this.warn(`onMediaDetaching: ${r.message} while calling endOfStream`)}this.onBufferReset(),t.removeEventListener("sourceopen",this._onMediaSourceOpen),t.removeEventListener("sourceended",this._onMediaSourceEnded),t.removeEventListener("sourceclose",this._onMediaSourceClose),this.appendSource&&(t.removeEventListener("startstreaming",this._onStartStreaming),t.removeEventListener("endstreaming",this._onEndStreaming)),e&&(e.removeEventListener("emptied",this._onMediaEmptied),n&&self.URL.revokeObjectURL(n),this.mediaSrc===n?(e.removeAttribute("src"),this.appendSource&&ga(e),e.load()):this.warn("media|source.src was changed by a third party - skip cleanup")),this.mediaSource=null,this.media=null,this._objectUrl=null,this.bufferCodecEventsExpected=this._bufferCodecEventsTotal,this.pendingTracks={},this.tracks={}}this.hls.trigger(g.MEDIA_DETACHED,void 0)}onBufferReset(){this.getSourceBufferTypes().forEach(e=>{this.resetBuffer(e)}),this._initSourceBuffer(),this.hls.resumeBuffering()}resetBuffer(e){const t=this.sourceBuffer[e];try{if(t){var n;this.removeBufferListeners(e),this.sourceBuffer[e]=void 0,(n=this.mediaSource)!=null&&n.sourceBuffers.length&&this.mediaSource.removeSourceBuffer(t)}}catch(r){this.warn(`onBufferReset ${e}`,r)}}onBufferCodecs(e,t){const n=this.getSourceBufferTypes().length,r=Object.keys(t);if(r.forEach(s=>{if(n){const c=this.tracks[s];if(c&&typeof c.buffer.changeType=="function"){var o;const{id:m,codec:y,levelCodec:S,container:D,metadata:W}=t[s],k=Dt(c.codec,c.levelCodec),G=k==null?void 0:k.replace(ma,"$1");let ie=Dt(y,S);const We=(o=ie)==null?void 0:o.replace(ma,"$1");if(ie&&G!==We){s.slice(0,5)==="audio"&&(ie=Lt(ie,this.appendSource));const mt=`${D};codecs=${ie}`;this.appendChangeType(s,mt),this.log(`switching codec ${k} to ${ie}`),this.tracks[s]={buffer:c.buffer,codec:y,container:D,levelCodec:S,metadata:W,id:m}}}}else this.pendingTracks[s]=t[s]}),n)return;const i=Math.max(this.bufferCodecEventsExpected-1,0);this.bufferCodecEventsExpected!==i&&(this.log(`${i} bufferCodec event(s) expected ${r.join(",")}`),this.bufferCodecEventsExpected=i),this.mediaSource&&this.mediaSource.readyState==="open"&&this.checkPendingTracks()}appendChangeType(e,t){const{operationQueue:n}=this,r={execute:()=>{const i=this.sourceBuffer[e];i&&(this.log(`changing ${e} sourceBuffer type to ${t}`),i.changeType(t)),n.shiftAndExecuteNext(e)},onStart:()=>{},onComplete:()=>{},onError:i=>{this.warn(`Failed to change ${e} SourceBuffer type`,i)}};n.append(r,e,!!this.pendingTracks[e])}onBufferAppending(e,t){const{hls:n,operationQueue:r,tracks:i}=this,{data:s,type:o,frag:c,part:m,chunkMeta:y}=t,S=y.buffering[o],D=self.performance.now();S.start=D;const W=c.stats.buffering,k=m?m.stats.buffering:null;W.start===0&&(W.start=D),k&&k.start===0&&(k.start=D);const G=i.audio;let ie=!1;o==="audio"&&(G==null?void 0:G.container)==="audio/mpeg"&&(ie=!this.lastMpegAudioChunk||y.id===1||this.lastMpegAudioChunk.sn!==y.sn,this.lastMpegAudioChunk=y);const We=c.start,mt={execute:()=>{if(S.executeStart=self.performance.now(),ie){const ht=this.sourceBuffer[o];if(ht){const zt=We-ht.timestampOffset;Math.abs(zt)>=.1&&(this.log(`Updating audio SourceBuffer timestampOffset to ${We} (delta: ${zt}) sn: ${c.sn})`),ht.timestampOffset=We)}}this.appendExecutor(s,o)},onStart:()=>{},onComplete:()=>{const ht=self.performance.now();S.executeEnd=S.end=ht,W.first===0&&(W.first=ht),k&&k.first===0&&(k.first=ht);const{sourceBuffer:zt}=this,At={};for(const nn in zt)At[nn]=Er.getBuffered(zt[nn]);this.appendErrors[o]=0,o==="audio"||o==="video"?this.appendErrors.audiovideo=0:(this.appendErrors.audio=0,this.appendErrors.video=0),this.hls.trigger(g.BUFFER_APPENDED,{type:o,frag:c,part:m,chunkMeta:y,parent:c.type,timeRanges:At})},onError:ht=>{const zt={type:X.MEDIA_ERROR,parent:c.type,details:z.BUFFER_APPEND_ERROR,sourceBufferName:o,frag:c,part:m,chunkMeta:y,error:ht,err:ht,fatal:!1};if(ht.code===DOMException.QUOTA_EXCEEDED_ERR)zt.details=z.BUFFER_FULL_ERROR;else{const At=++this.appendErrors[o];zt.details=z.BUFFER_APPEND_ERROR,this.warn(`Failed ${At}/${n.config.appendErrorMaxRetry} times to append segment in "${o}" sourceBuffer`),At>=n.config.appendErrorMaxRetry&&(zt.fatal=!0)}n.trigger(g.ERROR,zt)}};r.append(mt,o,!!this.pendingTracks[o])}onBufferFlushing(e,t){const{operationQueue:n}=this,r=i=>({execute:this.removeExecutor.bind(this,i,t.startOffset,t.endOffset),onStart:()=>{},onComplete:()=>{this.hls.trigger(g.BUFFER_FLUSHED,{type:i})},onError:s=>{this.warn(`Failed to remove from ${i} SourceBuffer`,s)}});t.type?n.append(r(t.type),t.type):this.getSourceBufferTypes().forEach(i=>{n.append(r(i),i)})}onFragParsed(e,t){const{frag:n,part:r}=t,i=[],s=r?r.elementaryStreams:n.elementaryStreams;s[he.AUDIOVIDEO]?i.push("audiovideo"):(s[he.AUDIO]&&i.push("audio"),s[he.VIDEO]&&i.push("video"));const o=()=>{const c=self.performance.now();n.stats.buffering.end=c,r&&(r.stats.buffering.end=c);const m=r?r.stats:n.stats;this.hls.trigger(g.FRAG_BUFFERED,{frag:n,part:r,stats:m,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(o,i)}onFragChanged(e,t){this.trimBuffers()}onBufferEos(e,t){this.getSourceBufferTypes().reduce((r,i)=>{const s=this.sourceBuffer[i];return s&&(!t.type||t.type===i)&&(s.ending=!0,s.ended||(s.ended=!0,this.log(`${i} sourceBuffer now EOS`))),r&&!!(!s||s.ended)},!0)&&(this.log("Queueing mediaSource.endOfStream()"),this.blockBuffers(()=>{this.getSourceBufferTypes().forEach(i=>{const s=this.sourceBuffer[i];s&&(s.ending=!1)});const{mediaSource:r}=this;if(!r||r.readyState!=="open"){r&&this.log(`Could not call mediaSource.endOfStream(). mediaSource.readyState: ${r.readyState}`);return}this.log("Calling mediaSource.endOfStream()"),r.endOfStream()}))}onLevelUpdated(e,{details:t}){t.fragments.length&&(this.details=t,this.getSourceBufferTypes().length?this.blockBuffers(this.updateMediaElementDuration.bind(this)):this.updateMediaElementDuration())}trimBuffers(){const{hls:e,details:t,media:n}=this;if(!n||t===null||!this.getSourceBufferTypes().length)return;const i=e.config,s=n.currentTime,o=t.levelTargetDuration,c=t.live&&i.liveBackBufferLength!==null?i.liveBackBufferLength:i.backBufferLength;if(M(c)&&c>0){const m=Math.max(c,o),y=Math.floor(s/o)*o-m;this.flushBackBuffer(s,o,y)}if(M(i.frontBufferFlushThreshold)&&i.frontBufferFlushThreshold>0){const m=Math.max(i.maxBufferLength,i.frontBufferFlushThreshold),y=Math.max(m,o),S=Math.floor(s/o)*o+y;this.flushFrontBuffer(s,o,S)}}flushBackBuffer(e,t,n){const{details:r,sourceBuffer:i}=this;this.getSourceBufferTypes().forEach(o=>{const c=i[o];if(c){const m=Er.getBuffered(c);if(m.length>0&&n>m.start(0)){if(this.hls.trigger(g.BACK_BUFFER_REACHED,{bufferEnd:n}),r!=null&&r.live)this.hls.trigger(g.LIVE_BACK_BUFFER_REACHED,{bufferEnd:n});else if(c.ended&&m.end(m.length-1)-e{const o=r[s];if(o){const c=Er.getBuffered(o),m=c.length;if(m<2)return;const y=c.start(m-1),S=c.end(m-1);if(n>y||e>=y&&e<=S)return;if(o.ended&&e-S<2*t){this.log(`Cannot flush ${s} front buffer while SourceBuffer is in ended state`);return}this.hls.trigger(g.BUFFER_FLUSHING,{startOffset:y,endOffset:1/0,type:s})}})}updateMediaElementDuration(){if(!this.details||!this.media||!this.mediaSource||this.mediaSource.readyState!=="open")return;const{details:e,hls:t,media:n,mediaSource:r}=this,i=e.fragments[0].start+e.totalduration,s=n.duration,o=M(r.duration)?r.duration:0;e.live&&t.config.liveDurationInfinity?(r.duration=1/0,this.updateSeekableRange(e)):(i>o&&i>s||!M(s))&&(this.log(`Updating Media Source duration to ${i.toFixed(3)}`),r.duration=i)}updateSeekableRange(e){const t=this.mediaSource,n=e.fragments;if(n.length&&e.live&&t!=null&&t.setLiveSeekableRange){const i=Math.max(0,n[0].start),s=Math.max(i,i+e.totalduration);this.log(`Media Source duration is set to ${t.duration}. Setting seekable range to ${i}-${s}.`),t.setLiveSeekableRange(i,s)}}checkPendingTracks(){const{bufferCodecEventsExpected:e,operationQueue:t,pendingTracks:n}=this,r=Object.keys(n).length;if(r&&(!e||r===2||"audiovideo"in n)){this.createSourceBuffers(n),this.pendingTracks={};const i=this.getSourceBufferTypes();if(i.length)this.hls.trigger(g.BUFFER_CREATED,{tracks:this.tracks}),i.forEach(s=>{t.executeNext(s)});else{const s=new Error("could not create source buffer for media codec(s)");this.hls.trigger(g.ERROR,{type:X.MEDIA_ERROR,details:z.BUFFER_INCOMPATIBLE_CODECS_ERROR,fatal:!0,error:s,reason:s.message})}}}createSourceBuffers(e){const{sourceBuffer:t,mediaSource:n}=this;if(!n)throw Error("createSourceBuffers called when mediaSource was null");for(const i in e)if(!t[i]){var r;const s=e[i];if(!s)throw Error(`source buffer exists for track ${i}, however track does not`);let o=((r=s.levelCodec)==null?void 0:r.indexOf(","))===-1?s.levelCodec:s.codec;o&&i.slice(0,5)==="audio"&&(o=Lt(o,this.appendSource));const c=`${s.container};codecs=${o}`;this.log(`creating sourceBuffer(${c})`);try{const m=t[i]=n.addSourceBuffer(c),y=i;this.addBufferListener(y,"updatestart",this._onSBUpdateStart),this.addBufferListener(y,"updateend",this._onSBUpdateEnd),this.addBufferListener(y,"error",this._onSBUpdateError),this.appendSource&&this.addBufferListener(y,"bufferedchange",(S,D)=>{const W=D.removedRanges;W!=null&&W.length&&this.hls.trigger(g.BUFFER_FLUSHED,{type:i})}),this.tracks[i]={buffer:m,codec:o,container:s.container,levelCodec:s.levelCodec,metadata:s.metadata,id:s.id}}catch(m){this.error(`error while trying to add sourceBuffer: ${m.message}`),this.hls.trigger(g.ERROR,{type:X.MEDIA_ERROR,details:z.BUFFER_ADD_CODEC_ERROR,fatal:!1,error:m,sourceBufferName:i,mimeType:c})}}}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{operationQueue:t}=this;t.current(e).onStart()}_onSBUpdateEnd(e){var t;if(((t=this.mediaSource)==null?void 0:t.readyState)==="closed"){this.resetBuffer(e);return}const{operationQueue:n}=this;n.current(e).onComplete(),n.shiftAndExecuteNext(e)}_onSBUpdateError(e,t){var n;const r=new Error(`${e} SourceBuffer error. MediaSource readyState: ${(n=this.mediaSource)==null?void 0:n.readyState}`);this.error(`${r}`,t),this.hls.trigger(g.ERROR,{type:X.MEDIA_ERROR,details:z.BUFFER_APPENDING_ERROR,sourceBufferName:e,error:r,fatal:!1});const i=this.operationQueue.current(e);i&&i.onError(r)}removeExecutor(e,t,n){const{media:r,mediaSource:i,operationQueue:s,sourceBuffer:o}=this,c=o[e];if(!r||!i||!c){this.warn(`Attempting to remove from the ${e} SourceBuffer, but it does not exist`),s.shiftAndExecuteNext(e);return}const m=M(r.duration)?r.duration:1/0,y=M(i.duration)?i.duration:1/0,S=Math.max(0,t),D=Math.min(n,m,y);D>S&&(!c.ending||c.ended)?(c.ended=!1,this.log(`Removing [${S},${D}] from the ${e} SourceBuffer`),c.remove(S,D)):s.shiftAndExecuteNext(e)}appendExecutor(e,t){const n=this.sourceBuffer[t];if(!n){if(!this.pendingTracks[t])throw new Error(`Attempting to append to the ${t} SourceBuffer, but it does not exist`);return}n.ended=!1,n.appendBuffer(e)}blockBuffers(e,t=this.getSourceBufferTypes()){if(!t.length){this.log("Blocking operation requested, but no SourceBuffers exist"),Promise.resolve().then(e);return}const{operationQueue:n}=this,r=t.map(i=>n.appendBlocker(i));Promise.all(r).then(()=>{e(),t.forEach(i=>{const s=this.sourceBuffer[i];s!=null&&s.updating||n.shiftAndExecuteNext(i)})})}getSourceBufferTypes(){return Object.keys(this.sourceBuffer)}addBufferListener(e,t,n){const r=this.sourceBuffer[e];if(!r)return;const i=n.bind(this,e);this.listeners[e].push({event:t,listener:i}),r.addEventListener(t,i)}removeBufferListeners(e){const t=this.sourceBuffer[e];t&&this.listeners[e].forEach(n=>{t.removeEventListener(n.event,n.listener)})}}function ga(a){const e=a.querySelectorAll("source");[].slice.call(e).forEach(t=>{a.removeChild(t)})}function zo(a,e){const t=self.document.createElement("source");t.type="video/mp4",t.src=e,a.appendChild(t)}const Wo={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},pa=a=>String.fromCharCode(Wo[a]||a),ui=15,vi=100,Ho={17:1,18:3,21:5,22:7,23:9,16:11,19:12,20:14},Vo={17:2,18:4,21:6,22:8,23:10,19:13,20:15},jo={25:1,26:3,29:5,30:7,31:9,24:11,27:12,28:14},Zo={25:2,26:4,29:6,30:8,31:10,27:13,28:15},Ko=["white","green","blue","cyan","red","yellow","magenta","black","transparent"];class Go{constructor(){this.time=null,this.verboseLevel=0}log(e,t){if(this.verboseLevel>=e){const n=typeof t=="function"?t():t;A.log(`${this.time} [${e}] ${n}`)}}}const Ci=function(e){const t=[];for(let n=0;nvi&&(this.logger.log(3,"Too large cursor position "+this.pos),this.pos=vi)}moveCursor(e){const t=this.pos+e;if(e>1)for(let n=this.pos+1;n=144&&this.backSpace();const t=pa(e);if(this.pos>=vi){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"pacData = "+JSON.stringify(e));let t=e.row-1;if(this.nrRollUpRows&&t"bkgData = "+JSON.stringify(e)),this.backSpace(),this.setPen(e),this.insertChar(32)}setRollUpRows(e){this.nrRollUpRows=e}rollUp(){if(this.nrRollUpRows===null){this.logger.log(3,"roll_up but nrRollUpRows not set yet");return}this.logger.log(1,()=>this.getDisplayText());const e=this.currRow+1-this.nrRollUpRows,t=this.rows.splice(e,1)[0];t.clear(),this.rows.splice(this.currRow,0,t),this.logger.log(2,"Rolling up")}getDisplayText(e){e=e||!1;const t=[];let n="",r=-1;for(let i=0;i0&&(e?n="["+t.join(" | ")+"]":n=t.join(` `)),n}getTextAndFormat(){return this.rows}}class ya{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 Cs(n),this.nonDisplayedMemory=new Cs(n),this.lastOutputScreen=new Cs(n),this.currRollUpRow=this.displayedMemory.rows[ui-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[ui-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;nt+": "+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: "+JSON.stringify(t)),this.writeScreen.setPen(t)}outputDataUpdate(e=!1){const t=this.logger.time;t!==null&&this.outputFilter&&(this.cueStartTime===null&&!this.displayedMemory.isEmpty()?this.cueStartTime=t:this.displayedMemory.equals(this.lastOutputScreen)||(this.outputFilter.newCue(this.cueStartTime,t,this.lastOutputScreen),e&&this.outputFilter.dispatchCue&&this.outputFilter.dispatchCue(),this.cueStartTime=this.displayedMemory.isEmpty()?null:t),this.lastOutputScreen.copy(this.displayedMemory))}cueSplitAtTime(e){this.outputFilter&&(this.displayedMemory.isEmpty()||(this.outputFilter.newCue&&this.outputFilter.newCue(this.cueStartTime,e,this.displayedMemory),this.cueStartTime=e))}}class ba{constructor(e,t,n){this.channels=void 0,this.currentChannel=0,this.cmdHistory=Jo(),this.logger=void 0;const r=this.logger=new Go;this.channels=[null,new ya(e,t,r),new ya(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"["+Ci([t[n],t[n+1]])+"] -> ("+Ci([r,i])+")");const c=this.cmdHistory;if(r>=16&&r<=31){if(Qo(r,i,c)){ns(null,null,c),this.logger.log(3,()=>"Repeated command ("+Ci([r,i])+") is dropped");continue}ns(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 ns(null,null,c);if(!s&&(o=this.parseChars(r,i),o)){const y=this.currentChannel;y&&y>0?this.channels[y].insertChars(o):this.logger.log(2,"No channel found yet. TEXT-MODE?")}!s&&!o&&this.logger.log(2,()=>"Couldn't parse cleaned data "+Ci([r,i])+" orig: "+Ci([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 ("+Ci([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?Ho[e]:jo[e]:n=s===1?Vo[e]:Zo[e];const o=this.channels[s];return o?(o.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 '"+pa(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 = "+Ci(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=Ko[i],t%2===1&&(s.background=s.background+"_semi")):t===45?s.background="transparent":(s.foreground="black",t===47&&(s.underline=!0));const o=e<=23?1:2;return this.channels[o].setBkgData(s),!0}reset(){for(let e=0;ee)&&(this.startTime=e),this.endTime=t,this.screen=n,this.timelineController.createCaptionsTrack(this.trackName)}reset(){this.cueRanges=[],this.startTime=null}}var ws=function(){if(Ae!=null&&Ae.VTTCue)return self.VTTCue;const a=["","lr","rl"],e=["start","middle","end","left","right"];function t(o,c){if(typeof c!="string"||!Array.isArray(o))return!1;const m=c.toLowerCase();return~o.indexOf(m)?m:!1}function n(o){return t(a,o)}function r(o){return t(e,o)}function i(o,...c){let m=1;for(;m100)throw new Error("Position must be between 0 and 100.");nn=Xt,this.hasBeenReset=!0}})),Object.defineProperty(y,"positionAlign",i({},S,{get:function(){return kt},set:function(Xt){const vn=r(Xt);if(!vn)throw new SyntaxError("An invalid or illegal string was specified.");kt=vn,this.hasBeenReset=!0}})),Object.defineProperty(y,"size",i({},S,{get:function(){return gn},set:function(Xt){if(Xt<0||Xt>100)throw new Error("Size must be between 0 and 100.");gn=Xt,this.hasBeenReset=!0}})),Object.defineProperty(y,"align",i({},S,{get:function(){return In},set:function(Xt){const vn=r(Xt);if(!vn)throw new SyntaxError("An invalid or illegal string was specified.");In=vn,this.hasBeenReset=!0}})),y.displayState=void 0}return s.prototype.getCueAsHTML=function(){return self.WebVTT.convertCueToDOMTree(self,this.text)},s}();class $o{decode(e,t){if(!e)return"";if(typeof e!="string")throw new Error("Error - expected string data.");return decodeURIComponent(encodeURIComponent(e))}}function Sa(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 qo{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=0&&n<=100)return this.set(e,n),!0}return!1}}function Ea(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 o=s[0],c=s[1];e(o,c)}}const Ts=new ws(0,0,""),is=Ts.align==="middle"?"middle":"center";function el(a,e,t){const n=a;function r(){const o=Sa(a);if(o===null)throw new Error("Malformed timestamp: "+n);return a=a.replace(/^[^\sa-zA-Z-]+/,""),o}function i(o,c){const m=new qo;Ea(o,function(D,W){let k;switch(D){case"region":for(let G=t.length-1;G>=0;G--)if(t[G].id===W){m.set(D,t[G].region);break}break;case"vertical":m.alt(D,W,["rl","lr"]);break;case"line":k=W.split(","),m.integer(D,k[0]),m.percent(D,k[0])&&m.set("snapToLines",!1),m.alt(D,k[0],["auto"]),k.length===2&&m.alt("lineAlign",k[1],["start",is,"end"]);break;case"position":k=W.split(","),m.percent(D,k[0]),k.length===2&&m.alt("positionAlign",k[1],["start",is,"end","line-left","line-right","auto"]);break;case"size":m.percent(D,W);break;case"align":m.alt(D,W,["start",is,"end","left","right"]);break}},/:/,/\s/),c.region=m.get("region",null),c.vertical=m.get("vertical","");let y=m.get("line","auto");y==="auto"&&Ts.line===-1&&(y=-1),c.line=y,c.lineAlign=m.get("lineAlign","start"),c.snapToLines=m.get("snapToLines",!0),c.size=m.get("size",100),c.align=m.get("align",is);let S=m.get("position","auto");S==="auto"&&Ts.position===50&&(S=c.align==="start"||c.align==="left"?0:c.align==="end"||c.align==="right"?100:50),c.position=S}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 Aa(a){return a.replace(//gi,` `)}class tl{constructor(){this.state="INITIAL",this.buffer="",this.decoder=new $o,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=Aa(i);s")===-1){t.cue.id=i;continue}case"CUE":if(!t.cue){t.state="BADCUE";continue}try{el(i,t.cue,t.regionList)}catch(o){t.cue=null,t.state="BADCUE";continue}t.state="CUETEXT";continue;case"CUETEXT":{const o=i.indexOf("-->")!==-1;if(!i||o&&(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 nl=/\r\n|\n\r|\n|\r/g,Ls=function(e,t,n=0){return e.slice(n,n+t.length)===t},rl=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(!M(t)||!M(n)||!M(r)||!M(i))throw Error(`Malformed X-TIMESTAMP-MAP: Local:${e}`);return t+=1e3*n,t+=60*1e3*r,t+=60*60*1e3*i,t},Is=function(e){let t=5381,n=e.length;for(;n;)t=t*33^e.charCodeAt(--n);return(t>>>0).toString()};function Rs(a,e,t){return Is(a.toString())+Is(e.toString())+Is(t)}const il=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 sl(a,e,t,n,r,i,s){const o=new tl,c=_e(new Uint8Array(a)).trim().replace(nl,` `).split(` `),m=[],y=e?Ao(e.baseTime,e.timescale):0;let S="00:00.000",D=0,W=0,k,G=!0;o.oncue=function(ie){const We=t[n];let mt=t.ccOffset;const ht=(D-y)/9e4;if(We!=null&&We.new&&(W!==void 0?mt=t.ccOffset=We.start:il(t,n,ht)),ht){if(!e){k=new Error("Missing initPTS for VTT MPEGTS");return}mt=ht-t.presentationOffset}const zt=ie.endTime-ie.startTime,At=oi((ie.startTime+mt-W)*9e4,r*9e4)/9e4;ie.startTime=Math.max(At,0),ie.endTime=Math.max(At+zt,0);const nn=ie.text.trim();ie.text=decodeURIComponent(encodeURIComponent(nn)),ie.id||(ie.id=Rs(ie.startTime,ie.endTime,nn)),ie.endTime>0&&m.push(ie)},o.onparsingerror=function(ie){k=ie},o.onflush=function(){if(k){s(k);return}i(m)},c.forEach(ie=>{if(G)if(Ls(ie,"X-TIMESTAMP-MAP=")){G=!1,ie.slice(16).split(",").forEach(We=>{Ls(We,"LOCAL:")?S=We.slice(6):Ls(We,"MPEGTS:")&&(D=parseInt(We.slice(7)))});try{W=rl(S)/1e3}catch(We){k=We}return}else ie===""&&(G=!1);o.parse(ie+` `)}),o.flush()}const Ds="stpp.ttml.im1t",xa=/^(\d{2,}):(\d{2}):(\d{2}):(\d{2})\.?(\d+)?$/,Ca=/^(\d*(?:\.\d*)?)(h|m|s|ms|f|t)$/,al={left:"start",center:"center",right:"end",start:"start",end:"end"};function wa(a,e,t,n){const r=Mt(new Uint8Array(a),["mdat"]);if(r.length===0){n(new Error("Could not parse IMSC1 mdat"));return}const i=r.map(o=>_e(o)),s=Eo(e.baseTime,1,e.timescale);try{i.forEach(o=>t(ol(o,s)))}catch(o){n(o)}}function ol(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((S,D)=>(S[D]=r.getAttribute(`ttp:${D}`)||i[D],S),{}),o=r.getAttribute("xml:space")!=="preserve",c=Ta(Os(r,"styling","style")),m=Ta(Os(r,"layout","region")),y=Os(r,"body","[begin]");return[].map.call(y,S=>{const D=La(S,o);if(!D||!S.hasAttribute("begin"))return null;const W=Bs(S.getAttribute("begin"),s),k=Bs(S.getAttribute("dur"),s);let G=Bs(S.getAttribute("end"),s);if(W===null)throw Ia(S);if(G===null){if(k===null)throw Ia(S);G=W+k}const ie=new ws(W-e,G-e,D);ie.id=Rs(ie.startTime,ie.endTime,ie.text);const We=m[S.getAttribute("region")],mt=c[S.getAttribute("style")],ht=ll(We,mt,c),{textAlign:zt}=ht;if(zt){const At=al[zt];At&&(ie.lineAlign=At),ie.align=zt}return fe(ie,ht),ie}).filter(S=>S!==null)}function Os(a,e,t){const n=a.getElementsByTagName(e)[0];return n?[].slice.call(n.querySelectorAll(t)):[]}function Ta(a){return a.reduce((e,t)=>{const n=t.getAttribute("xml:id");return n&&(e[n]=t),e},{})}function La(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?La(n,e):e?t+n.textContent.trim().replace(/\s+/g," "):t+n.textContent},"")}function ll(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((o,c)=>{const m=Ps(e,n,c)||Ps(a,n,c)||Ps(r,n,c);return m&&(o[c]=m),o},{})}function Ps(a,e,t){return a&&a.hasAttributeNS(e,t)?a.getAttributeNS(e,t):null}function Ia(a){return new Error(`Could not parse ttml timestamp ${a}`)}function Bs(a,e){if(!a)return null;let t=Sa(a);return t===null&&(xa.test(a)?t=cl(a,e):Ca.test(a)&&(t=ul(a,e))),t}function cl(a,e){const t=xa.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 ul(a,e){const t=Ca.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 dl{constructor(e){this.hls=void 0,this.media=null,this.config=void 0,this.enabled=!0,this.Cues=void 0,this.textTracks=[],this.tracks=[],this.initPTS=[],this.unparsedVttFrags=[],this.captionsTracks={},this.nonNativeCaptionsTracks={},this.cea608Parser1=void 0,this.cea608Parser2=void 0,this.lastCc=-1,this.lastSn=-1,this.lastPartIndex=-1,this.prevCC=-1,this.vttCCs=Oa(),this.captionsProperties=void 0,this.hls=e,this.config=e.config,this.Cues=e.config.cueHandler,this.captionsProperties={textTrack1:{label:this.config.captionsTextTrack1Label,languageCode:this.config.captionsTextTrack1LanguageCode},textTrack2:{label:this.config.captionsTextTrack2Label,languageCode:this.config.captionsTextTrack2LanguageCode},textTrack3:{label:this.config.captionsTextTrack3Label,languageCode:this.config.captionsTextTrack3LanguageCode},textTrack4:{label:this.config.captionsTextTrack4Label,languageCode:this.config.captionsTextTrack4LanguageCode}},e.on(g.MEDIA_ATTACHING,this.onMediaAttaching,this),e.on(g.MEDIA_DETACHING,this.onMediaDetaching,this),e.on(g.MANIFEST_LOADING,this.onManifestLoading,this),e.on(g.MANIFEST_LOADED,this.onManifestLoaded,this),e.on(g.SUBTITLE_TRACKS_UPDATED,this.onSubtitleTracksUpdated,this),e.on(g.FRAG_LOADING,this.onFragLoading,this),e.on(g.FRAG_LOADED,this.onFragLoaded,this),e.on(g.FRAG_PARSING_USERDATA,this.onFragParsingUserdata,this),e.on(g.FRAG_DECRYPTED,this.onFragDecrypted,this),e.on(g.INIT_PTS_FOUND,this.onInitPtsFound,this),e.on(g.SUBTITLE_TRACKS_CLEARED,this.onSubtitleTracksCleared,this),e.on(g.BUFFER_FLUSHING,this.onBufferFlushing,this)}destroy(){const{hls:e}=this;e.off(g.MEDIA_ATTACHING,this.onMediaAttaching,this),e.off(g.MEDIA_DETACHING,this.onMediaDetaching,this),e.off(g.MANIFEST_LOADING,this.onManifestLoading,this),e.off(g.MANIFEST_LOADED,this.onManifestLoaded,this),e.off(g.SUBTITLE_TRACKS_UPDATED,this.onSubtitleTracksUpdated,this),e.off(g.FRAG_LOADING,this.onFragLoading,this),e.off(g.FRAG_LOADED,this.onFragLoaded,this),e.off(g.FRAG_PARSING_USERDATA,this.onFragParsingUserdata,this),e.off(g.FRAG_DECRYPTED,this.onFragDecrypted,this),e.off(g.INIT_PTS_FOUND,this.onInitPtsFound,this),e.off(g.SUBTITLE_TRACKS_CLEARED,this.onSubtitleTracksCleared,this),e.off(g.BUFFER_FLUSHING,this.onBufferFlushing,this),this.hls=this.config=null,this.cea608Parser1=this.cea608Parser2=void 0}initCea608Parsers(){if(this.config.enableCEA708Captions&&(!this.cea608Parser1||!this.cea608Parser2)){const e=new rs(this,"textTrack1"),t=new rs(this,"textTrack2"),n=new rs(this,"textTrack3"),r=new rs(this,"textTrack4");this.cea608Parser1=new ba(1,e,t),this.cea608Parser2=new ba(3,n,r)}}addCues(e,t,n,r,i){let s=!1;for(let o=i.length;o--;){const c=i[o],m=fl(c[0],c[1],t,n);if(m>=0&&(c[0]=Math.min(c[0],t),c[1]=Math.max(c[1],n),s=!0,m/(n-t)>.5))return}if(s||i.push([t,n]),this.config.renderTextTracksNatively){const o=this.captionsTracks[e];this.Cues.newCue(o,t,n,r)}else{const o=this.Cues.newCue(null,t,n,r);this.hls.trigger(g.CUES_PARSED,{type:"captions",cues:o,track:e})}}onInitPtsFound(e,{frag:t,id:n,initPTS:r,timescale:i}){const{unparsedVttFrags:s}=this;n==="main"&&(this.initPTS[t.cc]={baseTime:r,timescale:i}),s.length&&(this.unparsedVttFrags=[],s.forEach(o=>{this.onFragLoaded(g.FRAG_LOADED,o)}))}getExistingTrack(e,t){const{media:n}=this;if(n)for(let r=0;r{dn(e[t]),delete e[t]}),this.nonNativeCaptionsTracks={}}onManifestLoading(){this.lastCc=-1,this.lastSn=-1,this.lastPartIndex=-1,this.prevCC=-1,this.vttCCs=Oa(),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;ni.textCodec===Ds);if(this.config.enableWebVTT||r&&this.config.enableIMSC1){if(fa(this.tracks,n)){this.tracks=n;return}if(this.textTracks=[],this.tracks=n,this.config.renderTextTracksNatively){const s=this.media,o=s?Wt(s.textTracks):null;if(this.tracks.forEach((c,m)=>{let y;if(o){let S=null;for(let D=0;Dm!==null).map(m=>m.label);c.length&&A.warn(`Media element contains unused subtitle tracks: ${c.join(", ")}. Replace media element for each source to clear TextTracks and captions menu.`)}}else if(this.tracks.length){const s=this.tracks.map(o=>({label:o.name,kind:o.type.toLowerCase(),default:o.default,subtitleTrack:o}));this.hls.trigger(g.NON_NATIVE_TEXT_TRACKS_FOUND,{tracks:s})}}}onManifestLoaded(e,t){this.config.enableCEA708Captions&&t.captions&&t.captions.forEach(n=>{const r=/(?:CC|SERVICE)([1-4])/.exec(n.instreamId);if(!r)return;const i=`textTrack${r[1]}`,s=this.captionsProperties[i];s&&(s.label=n.name,n.lang&&(s.languageCode=n.lang),s.media=n)})}closedCaptionsForLevel(e){const t=this.hls.levels[e.level];return t==null?void 0:t.attrs["CLOSED-CAPTIONS"]}onFragLoading(e,t){if(this.enabled&&t.frag.type===Tt.MAIN){var n,r;const{cea608Parser1:i,cea608Parser2:s,lastSn:o}=this,{cc:c,sn:m}=t.frag,y=(n=(r=t.part)==null?void 0:r.index)!=null?n:-1;i&&s&&(m!==o+1||m===o&&y!==this.lastPartIndex+1||c!==this.lastCc)&&(i.reset(),s.reset()),this.lastCc=c,this.lastSn=m,this.lastPartIndex=y}}onFragLoaded(e,t){const{frag:n,payload:r}=t;if(n.type===Tt.SUBTITLE)if(r.byteLength){const i=n.decryptdata,s="stats"in t;if(i==null||!i.encrypted||s){const o=this.tracks[n.level],c=this.vttCCs;c[n.cc]||(c[n.cc]={start:n.start,prevCC:this.prevCC,new:!0},this.prevCC=n.cc),o&&o.textCodec===Ds?this._parseIMSC1(n,r):this._parseVTTs(t)}}else this.hls.trigger(g.SUBTITLE_FRAG_PROCESSED,{success:!1,frag:n,error:new Error("Empty subtitle payload")})}_parseIMSC1(e,t){const n=this.hls;wa(t,this.initPTS[e.cc],r=>{this._appendCues(r,e.level),n.trigger(g.SUBTITLE_FRAG_PROCESSED,{success:!0,frag:e})},r=>{A.log(`Failed to parse IMSC1: ${r}`),n.trigger(g.SUBTITLE_FRAG_PROCESSED,{success:!1,frag:e,error:r})})}_parseVTTs(e){var t;const{frag:n,payload:r}=e,{initPTS:i,unparsedVttFrags:s}=this,o=i.length-1;if(!i[n.cc]&&o===-1){s.push(e);return}const c=this.hls,m=(t=n.initSegment)!=null&&t.data?l(n.initSegment.data,new Uint8Array(r)):r;sl(m,this.initPTS[n.cc],this.vttCCs,n.cc,n.start,y=>{this._appendCues(y,n.level),c.trigger(g.SUBTITLE_FRAG_PROCESSED,{success:!0,frag:n})},y=>{const S=y.message==="Missing initPTS for VTT MPEGTS";S?s.push(e):this._fallbackToIMSC1(n,r),A.log(`Failed to parse VTT cue: ${y}`),!(S&&o>n.cc)&&c.trigger(g.SUBTITLE_FRAG_PROCESSED,{success:!1,frag:n,error:y})})}_fallbackToIMSC1(e,t){const n=this.tracks[e.level];n.textCodec||wa(t,this.initPTS[e.cc],()=>{n.textCodec=Ds,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=>En(r,i))}else{const r=this.tracks[t];if(!r)return;const i=r.default?"default":"subtitles"+t;n.trigger(g.CUES_PARSED,{type:"subtitles",cues:e,track:i})}}onFragDecrypted(e,t){const{frag:n}=t;n.type===Tt.SUBTITLE&&this.onFragLoaded(g.FRAG_LOADED,t)}onSubtitleTracksCleared(){this.tracks=[],this.captionsTracks={}}onFragParsingUserdata(e,t){this.initCea608Parsers();const{cea608Parser1:n,cea608Parser2:r}=this;if(!this.enabled||!n||!r)return;const{frag:i,samples:s}=t;if(!(i.type===Tt.MAIN&&this.closedCaptionsForLevel(i)==="NONE"))for(let o=0;oAn(o[c],t,n))}if(this.config.renderTextTracksNatively&&t===0&&r!==void 0){const{textTracks:o}=this;Object.keys(o).forEach(c=>An(o[c],t,r))}}}extractCea608Data(e){const t=[[],[]],n=e[0]&31;let r=2;for(let i=0;ithis.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,Ms.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 e}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=(o,c)=>c?o.width!==c.width||o.height!==c.height:!0;let i=e.length-1;const s=Math.max(t,n);for(let o=0;o=s||c.height>=s)&&r(c,e[o+1])){i=o;break}}return i}}class hl{constructor(e){this.hls=void 0,this.isVideoPlaybackQualityAvailable=!1,this.timer=void 0,this.media=null,this.lastTime=void 0,this.lastDroppedFrames=0,this.lastDecodedFrames=0,this.streamController=void 0,this.hls=e,this.registerListeners()}setStreamController(e){this.streamController=e}registerListeners(){this.hls.on(g.MEDIA_ATTACHING,this.onMediaAttaching,this)}unregisterListeners(){this.hls.off(g.MEDIA_ATTACHING,this.onMediaAttaching,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)}}checkFPS(e,t,n){const r=performance.now();if(t){if(this.lastTime){const i=r-this.lastTime,s=n-this.lastDroppedFrames,o=t-this.lastDecodedFrames,c=1e3*s/i,m=this.hls;if(m.trigger(g.FPS_DROP,{currentDropped:s,currentDecoded:o,totalDroppedFrames:n}),c>0&&s>m.config.fpsDroppedMonitoringThreshold*o){let y=m.currentLevel;A.warn("drop FPS ratio greater than max allowed value for currentLevel: "+y),y>0&&(m.autoLevelCapping===-1||m.autoLevelCapping>=y)&&(y=y-1,m.trigger(g.FPS_DROP_LEVEL_CAPPING,{level:y,droppedLevel:m.currentLevel}),m.autoLevelCapping=y,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)}}const ss="[eme]";class _i{constructor(e){this.hls=void 0,this.config=void 0,this.media=null,this.keyFormatPromise=null,this.keySystemAccessPromises={},this._requestLicenseFailureCount=0,this.mediaKeySessions=[],this.keyIdToKeySessionPromise={},this.setMediaKeysQueue=_i.CDMCleanupPromise?[_i.CDMCleanupPromise]:[],this.debug=A.debug.bind(A,ss),this.log=A.log.bind(A,ss),this.warn=A.warn.bind(A,ss),this.error=A.error.bind(A,ss),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=vt(this.config));const o=s.map(Et).filter(c=>!!c);this.keyFormatPromise=this.getKeyFormatPromise(o)}this.keyFormatPromise.then(s=>{const o=nt(s);let c,m;if(n==="sinf"){if(o!==le.FAIRPLAY){this.warn(`Ignoring unexpected "${t.type}" event with init data type: "${n}" for selected key-system ${o}`);return}const k=pt(new Uint8Array(r));try{const G=ne(JSON.parse(k).sinf),ie=en(G);if(!ie)throw new Error("'schm' box missing or not cbcs/cenc with schi > tenc");c=ie.subarray(8,24),m=le.FAIRPLAY}catch(G){this.warn(`${i} Failed to parse sinf: ${G}`);return}}else{if(o!==le.WIDEVINE&&o!==le.PLAYREADY){this.warn(`Ignoring unexpected "${t.type}" event with init data type: "${n}" for selected key-system ${o}`);return}const k=ye(r),G=k.filter(We=>!!We.systemId&&Rt(We.systemId)===o);G.length>1&&this.warn(`${i} Using first of ${G.length} pssh found for selected key-system ${o}`);const ie=G[0];if(!ie){k.length===0||k.some(We=>!We.systemId)?this.warn(`${i} contains incomplete or invalid pssh data`):this.log(`ignoring ${i} for ${k.map(We=>Rt(We.systemId)).join(",")} pssh data in favor of playlist keys`);return}if(m=Rt(ie.systemId),ie.version===0&&ie.data)if(m===le.WIDEVINE){const We=ie.data.length-22;c=ie.data.subarray(We,We+16)}else m===le.PLAYREADY&&(c=yt(ie.data))}if(!m||!c){this.log(`Unable to handle ${i} with key-system ${o}`);return}const y=Pe.hexDump(c),{keyIdToKeySessionPromise:S,mediaKeySessions:D}=this;let W=S[y];for(let k=0;kthis.generateRequestWithPreferredKeySession(G,n,r,"encrypted-event-key-match")),W.catch(mt=>this.handleError(mt));break}}if(!W){if(m!==o){this.log(`Ignoring "${i}" with ${m} init data for selected key-system ${o}`);return}W=S[y]=this.getKeySystemSelectionPromise([m]).then(({keySystem:k,mediaKeys:G})=>{var ie;this.throwIfDestroyed();const We=new Le("ISO-23001-7",y,(ie=Et(k))!=null?ie:"");return We.pssh=new Uint8Array(r),We.keyId=c,this.attemptSetMediaKeys(k,G).then(()=>{this.throwIfDestroyed();const mt=this.createMediaKeySessionContext({decryptdata:We,keySystem:k,mediaKeys:G});return this.generateRequestWithPreferredKeySession(mt,n,r,"encrypted-event-no-match")})}),W.catch(k=>this.handleError(k))}})}},this.onWaitingForKey=t=>{this.log(`"${t.type}" event`)},this.hls=e,this.config=e.config,this.registerListeners()}destroy(){this.unregisterListeners(),this.onMediaDetached();const e=this.config;e.requestMediaKeySystemAccessFunc=null,e.licenseXhrSetup=e.licenseResponseCallback=void 0,e.drmSystems=e.drmSystemOptions={},this.hls=this.config=this.keyIdToKeySessionPromise=null,this.onMediaEncrypted=this.onWaitingForKey=null}registerListeners(){this.hls.on(g.MEDIA_ATTACHED,this.onMediaAttached,this),this.hls.on(g.MEDIA_DETACHED,this.onMediaDetached,this),this.hls.on(g.MANIFEST_LOADING,this.onManifestLoading,this),this.hls.on(g.MANIFEST_LOADED,this.onManifestLoaded,this)}unregisterListeners(){this.hls.off(g.MEDIA_ATTACHED,this.onMediaAttached,this),this.hls.off(g.MEDIA_DETACHED,this.onMediaDetached,this),this.hls.off(g.MANIFEST_LOADING,this.onManifestLoading,this),this.hls.off(g.MANIFEST_LOADED,this.onManifestLoaded,this)}getLicenseServerUrl(e){const{drmSystems:t,widevineLicenseUrl:n}=this.config,r=t[e];if(r)return r.licenseUrl;if(e===le.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,o,c)=>!!s&&c.indexOf(s)===o,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,o)=>{const c=m=>{const y=m.shift();this.getMediaKeysPromise(y,r,i).then(S=>s({keySystem:y,mediaKeys:S})).catch(S=>{m.length?c(m):S instanceof li?o(S):o(new li({type:X.KEY_SYSTEM_ERROR,details:z.KEY_SYSTEM_NO_ACCESS,error:S,fatal:!0},S.message))})};c(e)})}requestMediaKeySystemAccess(e,t){const{requestMediaKeySystemAccessFunc:n}=this.config;if(typeof n!="function"){let r=`Configured requestMediaKeySystemAccess is not a function ${n}`;return It===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=gt(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: ${JSON.stringify(r)}`),s=this.requestMediaKeySystemAccess(e,r);const o=this.keySystemAccessPromises[e]={keySystemAccess:s};return s.catch(c=>{this.log(`Failed to obtain access to key-system "${e}": ${c}`)}),s.then(c=>{this.log(`Access for key-system "${c.keySystem}" obtained`);const m=this.fetchServerCertificate(e);return this.log(`Create media-keys for "${e}"`),o.mediaKeys=c.createMediaKeys().then(y=>(this.log(`Media-keys created for "${e}"`),m.then(S=>S?this.setMediaKeysServerCertificate(y,e,S):y))),o.mediaKeys.catch(y=>{this.error(`Failed to create media-keys for "${e}"}: ${y}`)}),o.mediaKeys})}return s.then(()=>i.mediaKeys)}createMediaKeySessionContext({decryptdata:e,keySystem:t,mediaKeys:n}){this.log(`Creating key-system session "${t}" keyId: ${Pe.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,"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 Pe.hexDump(e.keyId)}updateKeySession(e,t){var n;const r=e.mediaKeysSession;return this.log(`Updating key-session "${r.sessionId}" for keyID ${Pe.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=vt(this.config),i=e.map(nt).filter(s=>!!s&&r.indexOf(s)!==-1);return this.getKeySystemSelectionPromise(i).then(({keySystem:s})=>{const o=Et(s);o?t(o):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.keyIdToKeySessionPromise[n]=this.getKeySystemForKeyPromise(t).then(({keySystem:s,mediaKeys:o})=>(this.throwIfDestroyed(),this.log(`Handle encrypted media sn: ${e.frag.sn} ${e.frag.type}: ${e.frag.level} using key ${r}`),this.attemptSetMediaKeys(s,o).then(()=>{this.throwIfDestroyed();const c=this.createMediaKeySessionContext({keySystem:s,mediaKeys:o,decryptdata:t});return this.generateRequestWithPreferredKeySession(c,"cenc",t.pssh,"playlist-key")}))),i.catch(s=>this.handleError(s))),i}throwIfDestroyed(e="Invalid state"){if(!this.hls)throw new Error("invalid state")}handleError(e){this.hls&&(this.error(e.message),e instanceof li?this.hls.trigger(g.ERROR,e.data):this.hls.trigger(g.ERROR,{type:X.KEY_SYSTEM_ERROR,details:z.KEY_SYSTEM_NO_KEYS,error:e,fatal:!0}))}getKeySystemForKeyPromise(e){const t=this.getKeyIdString(e),n=this.keyIdToKeySessionPromise[t];if(!n){const r=nt(e.keyFormat),i=r?[r]:vt(this.config);return this.attemptKeySystemAccess(i)}return n}getKeySystemSelectionPromise(e){if(e.length||(e=vt(this.config)),e.length===0)throw new li({type:X.KEY_SYSTEM_ERROR,details:z.KEY_SYSTEM_NO_CONFIGURED_LICENSE,fatal:!0},`Missing key-system license configuration options ${JSON.stringify({drmSystems:this.config.drmSystems})}`);return this.attemptKeySystemAccess(e)}attemptSetMediaKeys(e,t){const 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 o=(i=this.config.drmSystems)==null||(s=i[e.keySystem])==null?void 0:s.generateRequest;if(o)try{const k=o.call(this.hls,t,n,e);if(!k)throw new Error("Invalid response from configured generateRequest filter");t=k.initDataType,n=e.decryptdata.pssh=k.initData?new Uint8Array(k.initData):null}catch(k){var c;if(this.warn(k.message),(c=this.hls)!=null&&c.config.debug)throw k}if(n===null)return this.log(`Skipping key-session request for "${r}" (no initData)`),Promise.resolve(e);const m=this.getKeyIdString(e.decryptdata);this.log(`Generating key-session request for "${r}": ${m} (init data type: ${t} length: ${n?n.byteLength:null})`);const y=new As,S=e._onmessage=k=>{const G=e.mediaKeysSession;if(!G){y.emit("error",new Error("invalid state"));return}const{messageType:ie,message:We}=k;this.log(`"${ie}" message event for session "${G.sessionId}" message size: ${We.byteLength}`),ie==="license-request"||ie==="license-renewal"?this.renewLicense(e,We).catch(mt=>{this.handleError(mt),y.emit("error",mt)}):ie==="license-release"?e.keySystem===le.FAIRPLAY&&(this.updateKeySession(e,Fe("acknowledged")),this.removeSession(e)):this.warn(`unhandled media key message type "${ie}"`)},D=e._onkeystatuseschange=k=>{if(!e.mediaKeysSession){y.emit("error",new Error("invalid state"));return}this.onKeyStatusChange(e);const ie=e.keyStatus;y.emit("keyStatus",ie),ie==="expired"&&(this.warn(`${e.keySystem} expired for key ${m}`),this.renewKeySession(e))};e.mediaKeysSession.addEventListener("message",S),e.mediaKeysSession.addEventListener("keystatuseschange",D);const W=new Promise((k,G)=>{y.on("error",G),y.on("keyStatus",ie=>{ie.startsWith("usable")?k():ie==="output-restricted"?G(new li({type:X.KEY_SYSTEM_ERROR,details:z.KEY_SYSTEM_STATUS_OUTPUT_RESTRICTED,fatal:!1},"HDCP level output restricted")):ie==="internal-error"?G(new li({type:X.KEY_SYSTEM_ERROR,details:z.KEY_SYSTEM_STATUS_INTERNAL_ERROR,fatal:!0},`key status changed to "${ie}"`)):ie==="expired"?G(new Error("key expired while generating request")):this.warn(`unhandled key status change "${ie}"`)})});return e.mediaKeysSession.generateRequest(t,n).then(()=>{var k;this.log(`Request generated for key-session "${(k=e.mediaKeysSession)==null?void 0:k.sessionId}" keyId: ${m}`)}).catch(k=>{throw new li({type:X.KEY_SYSTEM_ERROR,details:z.KEY_SYSTEM_NO_SESSION,error:k,fatal:!1},`Error generating key-session request: ${k}`)}).then(()=>W).catch(k=>{throw y.removeAllListeners(),this.removeSession(e),k}).then(()=>(y.removeAllListeners(),e))}onKeyStatusChange(e){e.mediaKeysSession.keyStatuses.forEach((t,n)=>{this.log(`key status change "${t}" for keyStatuses keyId: ${Pe.hexDump("buffer"in n?new Uint8Array(n.buffer,n.byteOffset,n.byteLength):new Uint8Array(n))} session keyId: ${Pe.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,o)=>{const c={responseType:"arraybuffer",url:i},m=t.certLoadPolicy.default,y={loadPolicy:m,timeout:m.maxLoadTimeMs,maxRetry:0,retryDelay:0,maxRetryDelay:0},S={onSuccess:(D,W,k,G)=>{s(D.data)},onError:(D,W,k,G)=>{o(new li({type:X.KEY_SYSTEM_ERROR,details:z.KEY_SYSTEM_SERVER_CERTIFICATE_REQUEST_FAILED,fatal:!0,networkDetails:k,response:R({url:c.url,data:void 0},D)},`"${e}" certificate request failed (${i}). Status: ${D.code} (${D.text})`))},onTimeout:(D,W,k)=>{o(new li({type:X.KEY_SYSTEM_ERROR,details:z.KEY_SYSTEM_SERVER_CERTIFICATE_REQUEST_FAILED,fatal:!0,networkDetails:k,response:{url:c.url,data:void 0}},`"${e}" certificate request timed out (${i})`))},onAbort:(D,W,k)=>{o(new Error("aborted"))}};r.load(c,y,S)})):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 li({type:X.KEY_SYSTEM_ERROR,details:z.KEY_SYSTEM_SERVER_CERTIFICATE_UPDATE_FAILED,error:s,fatal:!0},s.message))})})}renewLicense(e,t){return this.requestLicense(e,new Uint8Array(t)).then(n=>this.updateKeySession(e,new Uint8Array(n)).catch(r=>{throw new li({type:X.KEY_SYSTEM_ERROR,details:z.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 y;for(let S=0,D=i.length;S in key message");return Fe(atob(m))}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 o=new XMLHttpRequest;o.responseType="arraybuffer",o.onreadystatechange=()=>{if(!this.hls||!e.mediaKeysSession)return i(new Error("invalid state"));if(o.readyState===4)if(o.status===200){this._requestLicenseFailureCount=0;let c=o.response;this.log(`License received ${c instanceof ArrayBuffer?c.byteLength:c}`);const m=this.config.licenseResponseCallback;if(m)try{c=m.call(this.hls,o,s,e)}catch(y){this.error(y)}r(c)}else{const c=n.errorRetry,m=c?c.maxNumRetry:0;if(this._requestLicenseFailureCount++,this._requestLicenseFailureCount>m||o.status>=400&&o.status<500)i(new li({type:X.KEY_SYSTEM_ERROR,details:z.KEY_SYSTEM_LICENSE_REQUEST_FAILED,fatal:!0,networkDetails:o,response:{url:s,data:void 0,code:o.status,text:o.statusText}},`License Request XHR failed (${s}). Status: ${o.status} (${o.statusText})`));else{const y=m-this._requestLicenseFailureCount+1;this.warn(`Retrying license request, ${y} attempts left`),this.requestLicense(e,t).then(r,i)}}},e.licenseXhr&&e.licenseXhr.readyState!==XMLHttpRequest.DONE&&e.licenseXhr.abort(),e.licenseXhr=o,this.setupLicenseXHR(o,s,e,t).then(({xhr:c,licenseChallenge:m})=>{e.keySystem==le.PLAYREADY&&(m=this.unpackPlayReadyKeyMessage(c,m)),c.send(m)})})}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,t=this.mediaKeySessions;e&&(e.removeEventListener("encrypted",this.onMediaEncrypted),e.removeEventListener("waitingforkey",this.onWaitingForKey),this.media=null),this._requestLicenseFailureCount=0,this.setMediaKeysQueue=[],this.mediaKeySessions=[],this.keyIdToKeySessionPromise={},Le.clearKeyUriToKeyIdMap();const n=t.length;_i.CDMCleanupPromise=Promise.all(t.map(r=>this.removeSession(r)).concat(e==null?void 0:e.setMediaKeys(null).catch(r=>{this.log(`Could not clear media keys: ${r}`)}))).then(()=>{n&&(this.log("finished closing key sessions and clearing media keys"),t.length=0)}).catch(r=>{this.log(`Could not close sessions and clear media keys: ${r}`)})}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);return r>-1&&this.mediaKeySessions.splice(r,1),t.remove().catch(i=>{this.log(`Could not remove session: ${i}`)}).then(()=>t.close()).catch(i=>{this.log(`Could not close session: ${i}`)})}}}_i.CDMCleanupPromise=void 0;class li extends Error{constructor(e,t){super(t),this.data=void 0,e.error||(e.error=new Error(t)),this.data=e,e.err=e.error}}var $r;(function(a){a.MANIFEST="m",a.AUDIO="a",a.VIDEO="v",a.MUXED="av",a.INIT="i",a.CAPTION="c",a.TIMED_TEXT="tt",a.KEY="k",a.OTHER="o"})($r||($r={}));var Fs;(function(a){a.DASH="d",a.HLS="h",a.SMOOTH="s",a.OTHER="o"})(Fs||(Fs={}));var wi;(function(a){a.OBJECT="CMCD-Object",a.REQUEST="CMCD-Request",a.SESSION="CMCD-Session",a.STATUS="CMCD-Status"})(wi||(wi={}));const ml={[wi.OBJECT]:["br","d","ot","tb"],[wi.REQUEST]:["bl","dl","mtp","nor","nrr","su"],[wi.SESSION]:["cid","pr","sf","sid","st","v"],[wi.STATUS]:["bs","rtp"]};class Ui{constructor(e,t){this.value=void 0,this.params=void 0,Array.isArray(e)&&(e=e.map(n=>n instanceof Ui?n:new Ui(n))),this.value=e,this.params=t}}class Pa{constructor(e){this.description=void 0,this.description=e}}const gl="Dict";function pl(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 vl(a,e,t,n){return new Error(`failed to ${a} "${pl(e)}" as ${t}`,{cause:n})}const Ba="Bare Item",yl="Boolean",bl="Byte Sequence",Sl="Decimal",El="Integer";function Al(a){return a<-999999999999999||99999999999999912)throw hi(a,Sl);const t=e.toString();return t.includes(".")?t:`${t}.0`}const Ol="String";function Pl(a){if(xl.test(a))throw hi(a,Ol);return`"${a.replace(/\\/g,"\\\\").replace(/"/g,'\\"')}"`}function Bl(a){return a.description||a.toString().slice(7,-1)}function Na(a){const e=Bl(a);if(/^([a-zA-Z*])([!#$%&'*+\-.^_`|~\w:/]*)$/.test(e)===!1)throw hi(e,Cl);return e}function Ns(a){switch(typeof a){case"number":if(!M(a))throw hi(a,Ba);return Number.isInteger(a)?Ma(a):Dl(a);case"string":return Pl(a);case"symbol":return Na(a);case"boolean":return Tl(a);case"object":if(a instanceof Date)return Rl(a);if(a instanceof Uint8Array)return Il(a);if(a instanceof Pa)return Na(a);default:throw hi(a,Ba)}}function ks(a){if(/^[a-z*][a-z0-9\-_.*]*$/.test(a)===!1)throw hi(a,wl);return a}function _s(a){return a==null?"":Object.entries(a).map(([e,t])=>t===!0?`;${ks(e)}`:`;${ks(e)}=${Ns(t)}`).join("")}function ka(a){return a instanceof Ui?`${Ns(a.value)}${_s(a.params)}`:Ns(a)}function Ml(a){return`(${a.value.map(ka).join(" ")})${_s(a.params)}`}function Fl(a,e={whitespace:!0}){if(typeof a!="object")throw hi(a,gl);const t=a instanceof Map?a.entries():Object.entries(a),n=e!=null&&e.whitespace?" ":"";return Array.from(t).map(([r,i])=>{i instanceof Ui||(i=new Ui(i));let s=ks(r);return i.value===!0?s+=_s(i.params):(s+="=",Array.isArray(i.value)?s+=Ml(i):s+=ka(i)),s}).join(`,${n}`)}function Nl(a,e){return Fl(a,e)}const kl=a=>a==="ot"||a==="sf"||a==="st",_l=a=>typeof a=="number"?M(a):a!=null&&a!==""&&a!==!1;function Ul(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 zl(){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)})}}}const as=a=>Math.round(a),Wl=(a,e)=>(e!=null&&e.baseUrl&&(a=Ul(a,e.baseUrl)),encodeURIComponent(a)),os=a=>as(a/100)*100,Hl={br:as,d:as,bl:os,dl:os,mtp:os,nor:Wl,rtp:os,tb:as};function Vl(a,e){const t={};if(a==null||typeof a!="object")return t;const n=Object.keys(a).sort(),r=fe({},Hl,e==null?void 0:e.formatters),i=e==null?void 0:e.filter;return n.forEach(s=>{if(i!=null&&i(s))return;let o=a[s];const c=r[s];c&&(o=c(o,e)),!(s==="v"&&o===1)&&(s=="pr"&&o===1||_l(o)&&(kl(s)&&typeof o=="string"&&(o=new Pa(o)),t[s]=o))}),t}function _a(a,e={}){return a?Nl(Vl(a,e),fe({whitespace:!1},e)):""}function jl(a,e={}){if(!a)return{};const t=Object.entries(a),n=Object.entries(ml).concat(Object.entries((e==null?void 0:e.customHeaderMap)||{})),r=t.reduce((i,s)=>{var o,c;const[m,y]=s,S=((o=n.find(D=>D[1].includes(m)))==null?void 0:o[0])||wi.REQUEST;return(c=i[S])!=null||(i[S]={}),i[S][m]=y,i},{});return Object.entries(r).reduce((i,[s,o])=>(i[s]=_a(o,e),i),{})}function Zl(a,e,t){return fe(a,jl(e,t))}const Kl="CMCD";function Gl(a,e={}){if(!a)return"";const t=_a(a,e);return`${Kl}=${encodeURIComponent(t)}`}const Ua=/CMCD=[^&#]+/;function Yl(a,e,t){const n=Gl(e,t);if(!n)return a;if(Ua.test(a))return a.replace(Ua,n);const r=a.includes("?")?"&":"?";return`${a}${r}${n}`}class Xl{constructor(e){this.hls=void 0,this.config=void 0,this.media=void 0,this.sid=void 0,this.cid=void 0,this.useHeaders=!1,this.includeKeys=void 0,this.initialized=!1,this.starved=!1,this.buffering=!0,this.audioBuffer=void 0,this.videoBuffer=void 0,this.onWaiting=()=>{this.initialized&&(this.starved=!0),this.buffering=!0},this.onPlaying=()=>{this.initialized||(this.initialized=!0),this.buffering=!1},this.applyPlaylistData=r=>{try{this.apply(r,{ot:$r.MANIFEST,su:!this.initialized})}catch(i){A.warn("Could not generate manifest CMCD data.",i)}},this.applyFragmentData=r=>{try{const i=r.frag,s=this.hls.levels[i.level],o=this.getObjectType(i),c={d:i.duration*1e3,ot:o};(o===$r.VIDEO||o===$r.AUDIO||o==$r.MUXED)&&(c.br=s.bitrate/1e3,c.tb=this.getTopBandwidth(o)/1e3,c.bl=this.getBufferLength(o)),this.apply(r,c)}catch(i){A.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||zl(),this.cid=n.contentId,this.useHeaders=n.useHeaders===!0,this.includeKeys=n.includeKeys,this.registerListeners())}registerListeners(){const e=this.hls;e.on(g.MEDIA_ATTACHED,this.onMediaAttached,this),e.on(g.MEDIA_DETACHED,this.onMediaDetached,this),e.on(g.BUFFER_CREATED,this.onBufferCreated,this)}unregisterListeners(){const e=this.hls;e.off(g.MEDIA_ATTACHED,this.onMediaAttached,this),e.off(g.MEDIA_DETACHED,this.onMediaDetached,this),e.off(g.BUFFER_CREATED,this.onBufferCreated,this)}destroy(){this.unregisterListeners(),this.onMediaDetached(),this.hls=this.config=this.audioBuffer=this.videoBuffer=null,this.onWaiting=this.onPlaying=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:Fs.HLS,sid:this.sid,cid:this.cid,pr:(e=this.media)==null?void 0:e.playbackRate,mtp:this.hls.bandwidthEstimate/1e3}}apply(e,t={}){fe(t,this.createData());const n=t.ot===$r.INIT||t.ot===$r.VIDEO||t.ot===$r.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((i,s)=>(r.includes(s)&&(i[s]=t[s]),i),{})),this.useHeaders?(e.headers||(e.headers={}),Zl(e.headers,t)):e.url=Yl(e.url,t)}getObjectType(e){const{type:t}=e;if(t==="subtitle")return $r.TIMED_TEXT;if(e.sn==="initSegment")return $r.INIT;if(t==="audio")return $r.AUDIO;if(t==="main")return this.hls.audioTracks.length?$r.VIDEO:$r.MUXED}getTopBandwidth(e){let t=0,n;const r=this.hls;if(e===$r.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.hls.media,n=e===$r.AUDIO?this.audioBuffer:this.videoBuffer;return!n||!t?NaN:Er.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,o){t(i),this.loader.load(i,s,o)}}}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,o){t(i),this.loader.load(i,s,o)}}}}const Ql=3e5;class Jl{constructor(e){this.hls=void 0,this.log=void 0,this.loader=null,this.uri=null,this.pathwayId=".",this.pathwayPriority=null,this.timeToLoad=300,this.reloadTimer=-1,this.updated=0,this.started=!1,this.enabled=!0,this.levels=null,this.audioTracks=null,this.subtitleTracks=null,this.penalizedPathways={},this.hls=e,this.log=A.log.bind(A,"[content-steering]:"),this.registerListeners()}registerListeners(){const e=this.hls;e.on(g.MANIFEST_LOADING,this.onManifestLoading,this),e.on(g.MANIFEST_LOADED,this.onManifestLoaded,this),e.on(g.MANIFEST_PARSED,this.onManifestParsed,this),e.on(g.ERROR,this.onError,this)}unregisterListeners(){const e=this.hls;e&&(e.off(g.MANIFEST_LOADING,this.onManifestLoading,this),e.off(g.MANIFEST_LOADED,this.onManifestLoaded,this),e.off(g.MANIFEST_PARSED,this.onManifestParsed,this),e.off(g.ERROR,this.onError,this))}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)===Dn.SendAlternateToPenaltyBox&&n.flags===nr.MoveAllAlternatesMatchingHost){const r=this.levels;let i=this.pathwayPriority,s=this.pathwayId;if(t.context){const{groupId:o,pathwayId:c,type:m}=t.context;o&&r?s=this.getPathwayForGroupId(o,m,s):c&&(s=c)}s in this.penalizedPathways||(this.penalizedPathways[s]=performance.now()),!i&&r&&(i=r.reduce((o,c)=>(o.indexOf(c.pathwayId)===-1&&o.push(c.pathwayId),o),[])),i&&i.length>1&&(this.updatePathwayPriority(i),n.resolved=this.pathwayId!==s),n.resolved||A.warn(`Could not resolve ${t.details} ("${t.error.message}") with content-steering for Pathway: ${s} levels: ${r&&r.length} priorities: ${JSON.stringify(i)} penalized: ${JSON.stringify(this.penalizedPathways)}`)}}filterParsedLevels(e){this.levels=e;let t=this.getLevelsForPathway(this.pathwayId);if(t.length===0){const 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]>Ql&&delete n[i]});for(let i=0;i0){this.log(`Setting Pathway to "${s}"`),this.pathwayId=s,Tn(t),this.hls.trigger(g.LEVELS_UPDATED,{levels:t});const m=this.hls.levels[o];c&&m&&this.levels&&(m.attrs["STABLE-VARIANT-ID"]!==c.attrs["STABLE-VARIANT-ID"]&&m.bitrate!==c.bitrate&&this.log(`Unstable Pathways change from bitrate ${c.bitrate} to ${m.bitrate}`),this.hls.nextLoadLevel=o);break}}}getPathwayForGroupId(e,t,n){const r=this.getLevelsForPathway(n).concat(this.levels||[]);for(let i=0;i{const{ID:s,"BASE-ID":o,"URI-REPLACEMENT":c}=i;if(t.some(y=>y.pathwayId===s))return;const m=this.getLevelsForPathway(o).map(y=>{const S=new N(y.attrs);S["PATHWAY-ID"]=s;const D=S.AUDIO&&`${S.AUDIO}_clone_${s}`,W=S.SUBTITLES&&`${S.SUBTITLES}_clone_${s}`;D&&(n[S.AUDIO]=D,S.AUDIO=D),W&&(r[S.SUBTITLES]=W,S.SUBTITLES=W);const k=Wa(y.uri,S["STABLE-VARIANT-ID"],"PER-VARIANT-URIS",c),G=new dr({attrs:S,audioCodec:y.audioCodec,bitrate:y.bitrate,height:y.height,name:y.name,url:k,videoCodec:y.videoCodec,width:y.width});if(y.audioGroups)for(let ie=1;ie{this.log(`Loaded steering manifest: "${r}"`);const k=y.data;if(k.VERSION!==1){this.log(`Steering VERSION ${k.VERSION} not supported!`);return}this.updated=performance.now(),this.timeToLoad=k.TTL;const{"RELOAD-URI":G,"PATHWAY-CLONES":ie,"PATHWAY-PRIORITY":We}=k;if(G)try{this.uri=new self.URL(G,r).href}catch(ht){this.enabled=!1,this.log(`Failed to parse Steering Manifest RELOAD-URI: ${G}`);return}this.scheduleRefresh(this.uri||D.url),ie&&this.clonePathways(ie);const mt={steeringManifest:k,url:r.toString()};this.hls.trigger(g.STEERING_MANIFEST_LOADED,mt),We&&this.updatePathwayPriority(We)},onError:(y,S,D,W)=>{if(this.log(`Error loading steering manifest: ${y.code} ${y.text} (${S.url})`),this.stopLoad(),y.code===410){this.enabled=!1,this.log(`Steering manifest ${S.url} no longer available`);return}let k=this.timeToLoad*1e3;if(y.code===429){const G=this.loader;if(typeof(G==null?void 0:G.getResponseHeader)=="function"){const ie=G.getResponseHeader("Retry-After");ie&&(k=parseFloat(ie)*1e3)}this.log(`Steering manifest ${S.url} rate limited`);return}this.scheduleRefresh(this.uri||S.url,k)},onTimeout:(y,S,D)=>{this.log(`Timeout loading steering manifest (${S.url})`),this.scheduleRefresh(this.uri||S.url)}};this.log(`Requesting steering manifest: ${r}`),this.loader.load(i,c,m)}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 za(a,e,t,n){a&&Object.keys(e).forEach(r=>{const i=a.filter(s=>s.groupId===r).map(s=>{const o=fe({},s);return o.details=void 0,o.attrs=new N(o.attrs),o.url=o.attrs.URI=Wa(s.url,s.attrs["STABLE-RENDITION-ID"],"PER-RENDITION-URIS",t),o.groupId=o.attrs["GROUP-ID"]=e[r],o.attrs["PATHWAY-ID"]=n,o});a.push(...i)})}function Wa(a,e,t,n){const{HOST:r,PARAMS:i,[t]:s}=n;let o;e&&(o=s==null?void 0:s[e],o&&(a=o));const c=new self.URL(a);return r&&!o&&(c.host=r),i&&Object.keys(i).sort().forEach(m=>{m&&c.searchParams.set(m,i[m])}),c.href}const $l=/^age:\s*[\d.]+\s*$/im;class Ha{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 Me,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=>{this.callbacks.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 o in r)e.setRequestHeader(o,r[o]);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&&M(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 s=t.status,o=t.responseType==="text"?t.responseText:null;if(s>=200&&s<300){const S=o!=null?o:t.response;if(S!=null){n.loading.end=Math.max(self.performance.now(),n.loading.first);const D=t.responseType==="arraybuffer"?S.byteLength:S.length;if(n.loaded=n.total=D,n.bwEstimate=n.total*8e3/(n.loading.end-n.loading.first),!this.callbacks)return;const W=this.callbacks.onProgress;if(W&&W(n,e,S,t),!this.callbacks)return;const k={url:t.responseURL,data:S,code:s};this.callbacks.onSuccess(k,n,e,t);return}}const c=i.loadPolicy.errorRetry,m=n.retry,y={url:e.url,data:void 0,code:s};fr(c,m,!1,y)?this.retry(c):(A.error(`${s} while loading ${e.url}`),this.callbacks.onError({code:s,text:t.statusText},e,t,n))}}loadtimeout(){if(!this.config)return;const e=this.config.loadPolicy.timeoutRetry,t=this.stats.retry;if(fr(e,t,!0))this.retry(e);else{var n;A.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=Yn(e,n.retry),n.retry++,A.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&&$l.test(this.loader.getAllResponseHeaders())){const t=this.loader.getResponseHeader("age");e=t?parseFloat(t):null}return e}getResponseHeader(e){return this.loader&&new RegExp(`^${e}:\\s*[\\d.]+\\s*$`,"im").test(this.loader.getAllResponseHeaders())?this.loader.getResponseHeader(e):null}}function ql(){if(self.fetch&&self.AbortController&&self.ReadableStream&&self.Request)try{return new self.ReadableStream({}),!0}catch(a){}return!1}const ec=/(\d+)-(\d+)\/(\d+)/;class Va{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||ic,this.controller=new self.AbortController,this.stats=new Me}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=tc(e,this.controller.signal),s=n.onProgress,o=e.responseType==="arraybuffer",c=o?"byteLength":"length",{maxTimeToFirstByteMs:m,maxLoadTimeMs:y}=t.loadPolicy;this.context=e,this.config=t,this.callbacks=n,this.request=this.fetchSetup(e,i),self.clearTimeout(this.requestTimeout),t.timeout=m&&M(m)?m:y,this.requestTimeout=self.setTimeout(()=>{this.abortInternal(),n.onTimeout(r,e,this.response)},t.timeout),self.fetch(this.request).then(S=>{this.response=this.loader=S;const D=Math.max(self.performance.now(),r.loading.start);if(self.clearTimeout(this.requestTimeout),t.timeout=y,this.requestTimeout=self.setTimeout(()=>{this.abortInternal(),n.onTimeout(r,e,this.response)},y-(D-r.loading.start)),!S.ok){const{status:W,statusText:k}=S;throw new sc(k||"fetch, bad network response",W,S)}return r.loading.first=D,r.total=rc(S.headers)||r.total,s&&M(t.highWaterMark)?this.loadProgressively(S,r,e,t.highWaterMark,s):o?S.arrayBuffer():e.responseType==="json"?S.json():S.text()}).then(S=>{const D=this.response;if(!D)throw new Error("loader destroyed");self.clearTimeout(this.requestTimeout),r.loading.end=Math.max(self.performance.now(),r.loading.first);const W=S[c];W&&(r.loaded=r.total=W);const k={url:D.url,data:S,code:D.status};s&&!M(t.highWaterMark)&&s(r,e,S,D),n.onSuccess(k,r,e,D)}).catch(S=>{if(self.clearTimeout(this.requestTimeout),r.aborted)return;const D=S&&S.code||0,W=S?S.message:null;n.onError({code:D,text:W},e,S?S.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 Hs,o=e.body.getReader(),c=()=>o.read().then(m=>{if(m.done)return s.dataLength&&i(t,n,s.flush(),e),Promise.resolve(new ArrayBuffer(0));const y=m.value,S=y.length;return t.loaded+=S,S=r&&i(t,n,s.flush(),e)):i(t,n,y,e),c()}).catch(()=>Promise.reject());return c()}}function tc(a,e){const t={method:"GET",mode:"cors",credentials:"same-origin",signal:e,headers:new self.Headers(fe({},a.headers))};return a.rangeEnd&&t.headers.set("Range","bytes="+a.rangeStart+"-"+String(a.rangeEnd-1)),t}function nc(a){const e=ec.exec(a);if(e)return parseInt(e[2])-parseInt(e[1])+1}function rc(a){const e=a.get("Content-Range");if(e){const n=nc(e);if(M(n))return n}const t=a.get("Content-Length");if(t)return parseInt(t)}function ic(a,e){return new self.Request(a.url,e)}class sc extends Error{constructor(e,t,n){super(e),this.code=void 0,this.details=void 0,this.code=t,this.details=n}}const ac=/\s/,oc={newCue(a,e,t,n){const r=[];let i,s,o,c,m;const y=self.VTTCue||self.TextTrackCue;for(let D=0;D=16?c--:c++;const W=Aa(m.trim()),k=Rs(e,t,W);a!=null&&(S=a.cues)!=null&&S.getCueById(k)||(s=new y(e,t,W),s.id=k,s.line=D+1,s.align="left",s.position=10+Math.min(80,Math.floor(c*8/32)*10),r.push(s))}return a&&r.length&&(r.sort((D,W)=>D.line==="auto"||W.line==="auto"?0:D.line>8&&W.line>8?W.line-D.line:D.line-W.line),r.forEach(D=>En(a,D))),r}},lc={maxTimeToFirstByteMs:8e3,maxLoadTimeMs:2e4,timeoutRetry:null,errorRetry:null},ja=R(R({autoStartLoad:!0,startPosition:-1,defaultAudioCodec:void 0,debug:!1,capLevelOnFPSDrop:!1,capLevelToPlayerSize:!1,ignoreDevicePixelRatio:!1,preferManagedMediaSource:!0,initialLiveManifestSize:1,maxBufferLength:30,backBufferLength:1/0,frontBufferFlushThreshold:1/0,maxBufferSize:60*1e3*1e3,maxBufferHole:.1,highBufferWatchdogPeriod:2,nudgeOffset:.1,nudgeMaxRetry:3,maxFragLookUpTolerance:.25,liveSyncDurationCount:3,liveMaxLatencyDurationCount:1/0,liveSyncDuration:void 0,liveMaxLatencyDuration:void 0,maxLiveSyncPlaybackRate:1,liveDurationInfinity:!1,liveBackBufferLength:null,maxMaxBufferLength:600,enableWorker:!0,workerPath:null,enableSoftwareAES:!0,startLevel:void 0,startFragPrefetch:!1,fpsDroppedMonitoringPeriod:5e3,fpsDroppedMonitoringThreshold:.2,appendErrorMaxRetry:3,loader:Ha,fLoader:void 0,pLoader:void 0,xhrSetup:void 0,licenseXhrSetup:void 0,licenseResponseCallback:void 0,abrController:_r,bufferController:Uo,capLevelController:Ms,errorController:Nr,fpsController:hl,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:It,testBandwidth:!0,progressive:!1,lowLatencyMode:!0,cmcd:void 0,enableDateRangeMetadataCues:!0,enableEmsgMetadataCues:!0,enableID3MetadataCues:!0,useMediaCapabilities:!0,certLoadPolicy:{default:lc},keyLoadPolicy:{default:{maxTimeToFirstByteMs:8e3,maxLoadTimeMs:2e4,timeoutRetry:{maxNumRetry:1,retryDelayMs:1e3,maxRetryDelayMs:2e4,backoff:"linear"},errorRetry:{maxNumRetry:8,retryDelayMs:1e3,maxRetryDelayMs:2e4,backoff:"linear"}}},manifestLoadPolicy:{default:{maxTimeToFirstByteMs:1/0,maxLoadTimeMs:2e4,timeoutRetry:{maxNumRetry:2,retryDelayMs:0,maxRetryDelayMs:0},errorRetry:{maxNumRetry:1,retryDelayMs:1e3,maxRetryDelayMs:8e3}}},playlistLoadPolicy:{default:{maxTimeToFirstByteMs:1e4,maxLoadTimeMs:2e4,timeoutRetry:{maxNumRetry:2,retryDelayMs:0,maxRetryDelayMs:0},errorRetry:{maxNumRetry:2,retryDelayMs:1e3,maxRetryDelayMs:8e3}}},fragLoadPolicy:{default:{maxTimeToFirstByteMs:1e4,maxLoadTimeMs:12e4,timeoutRetry:{maxNumRetry:4,retryDelayMs:0,maxRetryDelayMs:0},errorRetry:{maxNumRetry:6,retryDelayMs:1e3,maxRetryDelayMs:8e3}}},steeringManifestLoadPolicy:{default:{maxTimeToFirstByteMs:1e4,maxLoadTimeMs:2e4,timeoutRetry:{maxNumRetry:2,retryDelayMs:0,maxRetryDelayMs:0},errorRetry:{maxNumRetry:1,retryDelayMs:1e3,maxRetryDelayMs:8e3}}},manifestLoadingTimeOut:1e4,manifestLoadingMaxRetry:1,manifestLoadingRetryDelay:1e3,manifestLoadingMaxRetryTimeout:64e3,levelLoadingTimeOut:1e4,levelLoadingMaxRetry:4,levelLoadingRetryDelay:1e3,levelLoadingMaxRetryTimeout:64e3,fragLoadingTimeOut:2e4,fragLoadingMaxRetry:6,fragLoadingRetryDelay:1e3,fragLoadingMaxRetryTimeout:64e3},cc()),{},{subtitleStreamController:Fo,subtitleTrackController:ko,timelineController:dl,audioStreamController:Bo,audioTrackController:Mo,emeController:_i,cmcdController:Xl,contentSteeringController:Jl});function cc(){return{cueHandler:oc,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 uc(a,e){if((e.liveSyncDurationCount||e.liveMaxLatencyDurationCount)&&(e.liveSyncDuration||e.liveMaxLatencyDuration))throw new Error("Illegal hls.js config: don't mix up liveSyncDurationCount/liveMaxLatencyDurationCount and liveSyncDuration/liveMaxLatencyDuration");if(e.liveMaxLatencyDurationCount!==void 0&&(e.liveSyncDurationCount===void 0||e.liveMaxLatencyDurationCount<=e.liveSyncDurationCount))throw new Error('Illegal hls.js config: "liveMaxLatencyDurationCount" must be greater than "liveSyncDurationCount"');if(e.liveMaxLatencyDuration!==void 0&&(e.liveSyncDuration===void 0||e.liveMaxLatencyDuration<=e.liveSyncDuration))throw new Error('Illegal hls.js config: "liveMaxLatencyDuration" must be greater than "liveSyncDuration"');const t=Us(a),n=["manifest","level","frag"],r=["TimeOut","MaxRetry","RetryDelay","MaxRetryTimeout"];return n.forEach(i=>{const s=`${i==="level"?"playlist":i}LoadPolicy`,o=e[s]===void 0,c=[];r.forEach(m=>{const y=`${i}Loading${m}`,S=e[y];if(S!==void 0&&o){c.push(y);const D=t[s].default;switch(e[s]={default:D},m){case"TimeOut":D.maxLoadTimeMs=S,D.maxTimeToFirstByteMs=S;break;case"MaxRetry":D.errorRetry.maxNumRetry=S,D.timeoutRetry.maxNumRetry=S;break;case"RetryDelay":D.errorRetry.retryDelayMs=S,D.timeoutRetry.retryDelayMs=S;break;case"MaxRetryTimeout":D.errorRetry.maxRetryDelayMs=S,D.timeoutRetry.maxRetryDelayMs=S;break}}}),c.length&&A.warn(`hls.js config: "${c.join('", "')}" setting(s) are deprecated, use "${s}": ${JSON.stringify(e[s])}`)}),R(R({},t),e)}function Us(a){return a&&typeof a=="object"?Array.isArray(a)?a.map(Us):Object.keys(a).reduce((e,t)=>(e[t]=Us(a[t]),e),{}):a}function dc(a){const e=a.loader;e!==Va&&e!==Ha?(A.log("[config]: Custom loader detected, cannot enable progressive streaming"),a.progressive=!1):ql()&&(a.loader=Va,a.progressive=!0,a.enableSoftwareAES=!0,A.log("[config]: Progressive streaming enabled, using FetchLoader"))}let zs;class fc extends hr{constructor(e,t){super(e,"[level-controller]"),this._levels=[],this._firstLevel=-1,this._maxAutoLevel=-1,this._startLevel=void 0,this.currentLevel=null,this.currentLevelIndex=-1,this.manualLevelIndex=-1,this.steering=void 0,this.onParsedComplete=void 0,this.steering=t,this._registerListeners()}_registerListeners(){const{hls:e}=this;e.on(g.MANIFEST_LOADING,this.onManifestLoading,this),e.on(g.MANIFEST_LOADED,this.onManifestLoaded,this),e.on(g.LEVEL_LOADED,this.onLevelLoaded,this),e.on(g.LEVELS_UPDATED,this.onLevelsUpdated,this),e.on(g.FRAG_BUFFERED,this.onFragBuffered,this),e.on(g.ERROR,this.onError,this)}_unregisterListeners(){const{hls:e}=this;e.off(g.MANIFEST_LOADING,this.onManifestLoading,this),e.off(g.MANIFEST_LOADED,this.onManifestLoaded,this),e.off(g.LEVEL_LOADED,this.onLevelLoaded,this),e.off(g.LEVELS_UPDATED,this.onLevelsUpdated,this),e.off(g.FRAG_BUFFERED,this.onFragBuffered,this),e.off(g.ERROR,this.onError,this)}destroy(){this._unregisterListeners(),this.steering=null,this.resetLevels(),super.destroy()}stopLoad(){this._levels.forEach(t=>{t.loadError=0,t.fragmentError=0}),super.stopLoad()}resetLevels(){this._startLevel=void 0,this.manualLevelIndex=-1,this.currentLevelIndex=-1,this.currentLevel=null,this._levels=[],this._maxAutoLevel=-1}onManifestLoading(e,t){this.resetLevels()}onManifestLoaded(e,t){const n=this.hls.config.preferManagedMediaSource,r=[],i={},s={};let o=!1,c=!1,m=!1;t.levels.forEach(y=>{var S,D;const W=y.attrs;let{audioCodec:k,videoCodec:G}=y;((S=k)==null?void 0:S.indexOf("mp4a.40.34"))!==-1&&(zs||(zs=/chrome|firefox/i.test(navigator.userAgent)),zs&&(y.audioCodec=k=void 0)),k&&(y.audioCodec=k=Lt(k,n)),((D=G)==null?void 0:D.indexOf("avc1"))===0&&(G=y.videoCodec=Nt(G));const{width:ie,height:We,unknownCodecs:mt}=y;if(o||(o=!!(ie&&We)),c||(c=!!G),m||(m=!!k),mt!=null&&mt.length||k&&!Y(k,"audio",n)||G&&!Y(G,"video",n))return;const{CODECS:ht,"FRAME-RATE":zt,"HDCP-LEVEL":At,"PATHWAY-ID":nn,RESOLUTION:kt,"VIDEO-RANGE":gn}=W,Xt=`${`${nn||"."}-`}${y.bitrate}-${kt}-${zt}-${ht}-${gn}-${At}`;if(i[Xt])if(i[Xt].uri!==y.url&&!y.attrs["PATHWAY-ID"]){const vn=s[Xt]+=1;y.attrs["PATHWAY-ID"]=new Array(vn+1).join(".");const rr=new dr(y);i[Xt]=rr,r.push(rr)}else i[Xt].addGroupId("audio",W.AUDIO),i[Xt].addGroupId("text",W.SUBTITLES);else{const vn=new dr(y);i[Xt]=vn,s[Xt]=1,r.push(vn)}}),this.filterAndSortMediaOptions(r,t,o,c,m)}filterAndSortMediaOptions(e,t,n,r,i){let s=[],o=[],c=e;if((n||r)&&i&&(c=c.filter(({videoCodec:k,videoRange:G,width:ie,height:We})=>(!!k||!!(ie&&We))&&Cr(G))),c.length===0){Promise.resolve().then(()=>{if(this.hls){t.levels.length&&this.warn(`One or more CODECS in variant not supported: ${JSON.stringify(t.levels[0].attrs)}`);const k=new Error("no level with compatible codecs found in manifest");this.hls.trigger(g.ERROR,{type:X.MEDIA_ERROR,details:z.MANIFEST_INCOMPATIBLE_CODECS_ERROR,fatal:!0,url:t.url,error:k,reason:k.message})}});return}if(t.audioTracks){const{preferManagedMediaSource:k}=this.hls.config;s=t.audioTracks.filter(G=>!G.audioCodec||Y(G.audioCodec,"audio",k)),Za(s)}t.subtitles&&(o=t.subtitles,Za(o));const m=c.slice(0);c.sort((k,G)=>{if(k.attrs["HDCP-LEVEL"]!==G.attrs["HDCP-LEVEL"])return(k.attrs["HDCP-LEVEL"]||"")>(G.attrs["HDCP-LEVEL"]||"")?1:-1;if(n&&k.height!==G.height)return k.height-G.height;if(k.frameRate!==G.frameRate)return k.frameRate-G.frameRate;if(k.videoRange!==G.videoRange)return cr.indexOf(k.videoRange)-cr.indexOf(G.videoRange);if(k.videoCodec!==G.videoCodec){const ie=Ke(k.videoCodec),We=Ke(G.videoCodec);if(ie!==We)return We-ie}if(k.uri===G.uri&&k.codecSet!==G.codecSet){const ie=Ve(k.codecSet),We=Ve(G.codecSet);if(ie!==We)return We-ie}return k.averageBitrate!==G.averageBitrate?k.averageBitrate-G.averageBitrate:0});let y=m[0];if(this.steering&&(c=this.steering.filterParsedLevels(c),c.length!==m.length)){for(let k=0;kie&&ie===ja.abrEwmaDefaultEstimate&&(this.hls.bandwidthEstimate=We)}break}const D=i&&!r,W={levels:c,audioTracks:s,subtitleTracks:o,sessionData:t.sessionData,sessionKeys:t.sessionKeys,firstLevel:this._firstLevel,stats:t.stats,audio:i,video:r,altAudio:!D&&s.some(k=>!!k.url)};this.hls.trigger(g.MANIFEST_PARSED,W),(this.hls.config.autoStartLoad||this.hls.forceStartLoad)&&this.hls.startLoad(this.hls.config.startPosition)}get levels(){return this._levels.length===0?null:this._levels}get level(){return this.currentLevelIndex}set level(e){const t=this._levels;if(t.length===0)return;if(e<0||e>=t.length){const y=new Error("invalid level idx"),S=e<0;if(this.hls.trigger(g.ERROR,{type:X.OTHER_ERROR,details:z.LEVEL_SWITCH_ERROR,level:e,fatal:S,error:y,reason:y.message}),S)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],o=s.attrs["PATHWAY-ID"];if(this.currentLevelIndex=e,this.currentLevel=s,n===e&&s.details&&r&&i===o)return;this.log(`Switching to level ${e} (${s.height?s.height+"p ":""}${s.videoRange?s.videoRange+" ":""}${s.codecSet?s.codecSet+" ":""}@${s.bitrate})${o?" with Pathway "+o:""} from level ${n}${i?" with Pathway "+i:""}`);const c={level:e,attrs:s.attrs,details:s.details,bitrate:s.bitrate,averageBitrate:s.averageBitrate,maxBitrate:s.maxBitrate,realBitrate:s.realBitrate,width:s.width,height:s.height,codecSet:s.codecSet,audioCodec:s.audioCodec,videoCodec:s.videoCodec,audioGroups:s.audioGroups,subtitleGroups:s.subtitleGroups,loaded:s.loaded,loadError:s.loadError,fragmentError:s.fragmentError,name:s.name,id:s.id,uri:s.uri,url:s.url,urlId:0,audioGroupIds:s.audioGroupIds,textGroupIds:s.textGroupIds};this.hls.trigger(g.LEVEL_SWITCHING,c);const m=s.details;if(!m||m.live){const y=this.switchParams(s.uri,r==null?void 0:r.details,m);this.loadPlaylist(y)}}get manualLevel(){return this.manualLevelIndex}set manualLevel(e){this.manualLevelIndex=e,this._startLevel===void 0&&(this._startLevel=e),e!==-1&&(this.level=e)}get firstLevel(){return this._firstLevel}set firstLevel(e){this._firstLevel=e}get startLevel(){if(this._startLevel===void 0){const e=this.hls.config.startLevel;return e!==void 0?e:this.hls.firstAutoLevel}return this._startLevel}set startLevel(e){this._startLevel=e}onError(e,t){t.fatal||!t.context||t.context.type===Pt.LEVEL&&t.context.level===this.level&&this.checkRetry(t)}onFragBuffered(e,{frag:t}){if(t!==void 0&&t.type===Tt.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=this._levels[r];if(!s){var o;this.warn(`Invalid level index ${r}`),(o=t.deliveryDirectives)!=null&&o.skip&&(i.deltaUpdateFailed=!0);return}r===this.currentLevelIndex?(s.fragmentError===0&&(s.loadError=0),this.playlistLoaded(r,t,s.details)):(n=t.deliveryDirectives)!=null&&n.skip&&(i.deltaUpdateFailed=!0)}loadPlaylist(e){super.loadPlaylist();const t=this.currentLevelIndex,n=this.currentLevel;if(n&&this.shouldLoadPlaylist(n)){let r=n.uri;if(e)try{r=e.addDirectives(r)}catch(s){this.warn(`Could not construct new URL with HLS Delivery Directives: ${s}`)}const i=n.attrs["PATHWAY-ID"];this.log(`Loading level index ${t}${(e==null?void 0:e.msn)!==void 0?" at sn "+e.msn+" part "+e.part:""} with${i?" Pathway "+i:""} ${r}`),this.clearTimer(),this.hls.trigger(g.LEVEL_LOADING,{url:r,level:t,pathwayId:n.attrs["PATHWAY-ID"],id:0,deliveryDirectives:e||null})}}get nextLoadLevel(){return this.manualLevelIndex!==-1?this.manualLevelIndex:this.hls.nextAutoLevel}set nextLoadLevel(e){this.level=e,this.manualLevelIndex===-1&&(this.hls.nextAutoLevel=e)}removeLevel(e){var t;const n=this._levels.filter((r,i)=>i!==e?!0:(this.steering&&this.steering.removeLevel(r),r===this.currentLevel&&(this.currentLevel=null,this.currentLevelIndex=-1,r.details&&r.details.fragments.forEach(s=>s.level=-1)),!1));Tn(n),this._levels=n,this.currentLevelIndex>-1&&(t=this.currentLevel)!=null&&t.details&&(this.currentLevelIndex=this.currentLevel.details.fragments[0].level),this.hls.trigger(g.LEVELS_UPDATED,{levels:n})}onLevelsUpdated(e,{levels:t}){this._levels=t}checkMaxAutoUpdated(){const{autoLevelCapping:e,maxAutoLevel:t,maxHdcpLevel:n}=this.hls;this._maxAutoLevel!==t&&(this._maxAutoLevel=t,this.hls.trigger(g.MAX_AUTO_LEVEL_UPDATED,{autoLevelCapping:e,levels:this.levels,maxAutoLevel:t,minAutoLevel:this.hls.minAutoLevel,maxHdcpLevel:n}))}}function Za(a){const e={};a.forEach(t=>{const n=t.groupId||"";t.id=e[n]=e[n]||0,e[n]++})}class hc{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=z.KEY_LOAD_ERROR,n,r,i){return new zr({type:X.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{s.setKeyFormat(o)});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 m=new Error(t?`Expected frag.decryptdata to be defined after setting format ${t}`:"Missing decryption data on fragment in onKeyLoading");return Promise.reject(this.createKeyLoadError(e,z.KEY_LOAD_ERROR,m))}const s=i.uri;if(!s)return Promise.reject(this.createKeyLoadError(e,z.KEY_LOAD_ERROR,new Error(`Invalid key URI: "${s}"`)));let o=this.keyUriToKeyInfo[s];if((n=o)!=null&&n.decryptdata.key)return i.key=o.decryptdata.key,Promise.resolve({frag:e,keyInfo:o});if((r=o)!=null&&r.keyLoadPromise){var c;switch((c=o.mediaKeySessionContext)==null?void 0:c.keyStatus){case void 0:case"status-pending":case"usable":case"usable-in-future":return o.keyLoadPromise.then(m=>(i.key=m.keyInfo.decryptdata.key,{frag:e,keyInfo:o}))}}switch(o=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(o,e):this.loadKeyEME(o,e);case"AES-128":return this.loadKeyHTTP(o,e);default:return Promise.reject(this.createKeyLoadError(e,z.KEY_LOAD_ERROR,new Error(`Key supplied with unsupported METHOD: "${i.method}"`)))}}loadKeyEME(e,t){const n={frag:t,keyInfo:e};if(this.emeController&&this.config.emeEnabled){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,o)=>{const c={keyInfo:e,frag:t,responseType:"arraybuffer",url:e.decryptdata.uri},m=n.keyLoadPolicy.default,y={loadPolicy:m,timeout:m.maxLoadTimeMs,maxRetry:0,retryDelay:0,maxRetryDelay:0},S={onSuccess:(D,W,k,G)=>{const{frag:ie,keyInfo:We,url:mt}=k;if(!ie.decryptdata||We!==this.keyUriToKeyInfo[mt])return o(this.createKeyLoadError(ie,z.KEY_LOAD_ERROR,new Error("after key load, decryptdata unset or changed"),G));We.decryptdata.key=ie.decryptdata.key=new Uint8Array(D.data),ie.keyLoader=null,We.loader=null,s({frag:ie,keyInfo:We})},onError:(D,W,k,G)=>{this.resetLoader(W),o(this.createKeyLoadError(t,z.KEY_LOAD_ERROR,new Error(`HTTP Error ${D.code} loading key ${D.text}`),k,R({url:c.url,data:void 0},D)))},onTimeout:(D,W,k)=>{this.resetLoader(W),o(this.createKeyLoadError(t,z.KEY_LOAD_TIMEOUT,new Error("key loading timed out"),k))},onAbort:(D,W,k)=>{this.resetLoader(W),o(this.createKeyLoadError(t,z.INTERNAL_ABORTED,new Error("key loading aborted"),k))}};i.load(c,y,S)})}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 Ka(){return self.SourceBuffer||self.WebKitSourceBuffer}function Ga(){if(!He())return!1;const e=Ka();return!e||e.prototype&&typeof e.prototype.appendBuffer=="function"&&typeof e.prototype.remove=="function"}function mc(){if(!Ga())return!1;const a=He();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(Ie(e,"video")))||["mp4a.40.2","fLaC"].some(e=>a.isTypeSupported(Ie(e,"audio"))))}function gc(){var a;const e=Ka();return typeof(e==null||(a=e.prototype)==null?void 0:a.changeType)=="function"}const pc=250,ls=2,vc=.1,yc=.05;class bc{constructor(e,t,n,r){this.config=void 0,this.media=null,this.fragmentTracker=void 0,this.hls=void 0,this.nudgeRetry=0,this.stallReported=!1,this.stalled=null,this.moved=!1,this.seeking=!1,this.config=e,this.media=t,this.fragmentTracker=n,this.hls=r}destroy(){this.media=null,this.hls=this.fragmentTracker=null}poll(e,t){const{config:n,media:r,stalled:i}=this;if(r===null)return;const{currentTime:s,seeking:o}=r,c=this.seeking&&!o,m=!this.seeking&&o;if(this.seeking=o,s!==e){if(this.moved=!0,o||(this.nudgeRetry=0),i!==null){if(this.stallReported){const ie=self.performance.now()-i;A.warn(`playback not stuck anymore @${s}, after ${Math.round(ie)}ms`),this.stallReported=!1}this.stalled=null}return}if(m||c){this.stalled=null;return}if(r.paused&&!o||r.ended||r.playbackRate===0||!Er.getBuffered(r).length){this.nudgeRetry=0;return}const y=Er.bufferInfo(r,s,0),S=y.nextStart||0;if(o){const ie=y.len>ls,We=!S||t&&t.start<=s||S-s>ls&&!this.fragmentTracker.getPartialFragment(s);if(ie||We)return;this.moved=!1}if(!this.moved&&this.stalled!==null){var D;if(!(y.len>0)&&!S)return;const We=Math.max(S,y.start||0)-s,mt=this.hls.levels?this.hls.levels[this.hls.currentLevel]:null,zt=(mt==null||(D=mt.details)==null?void 0:D.live)?mt.details.targetduration*2:ls,At=this.fragmentTracker.getPartialFragment(s);if(We>0&&(We<=zt||At)){r.paused||this._trySkipBufferHole(At);return}}const W=self.performance.now();if(i===null){this.stalled=W;return}const k=W-i;if(!o&&k>=pc&&(this._reportStall(y),!this.media))return;const G=Er.bufferInfo(r,s,n.maxBufferHole);this._tryFixBufferStall(G,k)}_tryFixBufferStall(e,t){const{config:n,fragmentTracker:r,media:i}=this;if(i===null)return;const s=i.currentTime,o=r.getPartialFragment(s);o&&(this._trySkipBufferHole(o)||!this.media)||(e.len>n.maxBufferHole||e.nextStart&&e.nextStart-sn.highBufferWatchdogPeriod*1e3&&(A.warn("Trying to nudge playhead over buffer-hole"),this.stalled=null,this._tryNudgeBuffer())}_reportStall(e){const{hls:t,media:n,stallReported:r}=this;if(!r&&n){this.stallReported=!0;const i=new Error(`Playback stalling at @${n.currentTime} due to low buffer (${JSON.stringify(e)})`);A.warn(i.message),t.trigger(g.ERROR,{type:X.MEDIA_ERROR,details:z.BUFFER_STALLED_ERROR,fatal:!1,error:i,buffer:e.len})}}_trySkipBufferHole(e){const{config:t,hls:n,media:r}=this;if(r===null)return 0;const i=r.currentTime,s=Er.bufferInfo(r,i,0),o=i0&&s.len<1&&r.readyState<3,y=o-i;if(y>0&&(c||m)){if(y>t.maxBufferHole){const{fragmentTracker:D}=this;let W=!1;if(i===0){const k=D.getAppendedFrag(0,Tt.MAIN);k&&o1?(r=0,this.bitrateTest=!0):r=n.firstAutoLevel),n.nextLoadLevel=r,this.level=n.loadLevel,this.loadedmetadata=!1}t>0&&e===-1&&(this.log(`Override startPosition with lastCurrentTime @${t.toFixed(3)}`),e=t),this.state=Jt.IDLE,this.nextLoadPosition=this.startPosition=this.lastCurrentTime=e,this.tick()}else this._forceStartLoad=!0,this.state=Jt.STOPPED}stopLoad(){this._forceStartLoad=!1,super.stopLoad()}doTick(){switch(this.state){case Jt.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)){if(this.waitForCdnTuneIn(i))break;this.state=Jt.IDLE;break}else if(this.hls.nextLoadLevel!==this.level){this.state=Jt.IDLE;break}break}case Jt.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=Jt.IDLE}}break}this.state===Jt.IDLE&&this.doTickIdle(),this.onTickEnd()}onTickEnd(){super.onTickEnd(),this.checkBuffer(),this.checkFragmentChanged()}doTickIdle(){const{hls:e,levelLastLoaded:t,levels:n,media:r}=this;if(t===null||!r&&(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],o=this.getMainFwdBufferInfo();if(o===null)return;const c=this.getLevelDetails();if(c&&this._streamEnded(o,c)){const G={};this.altAudio&&(G.type="video"),this.hls.trigger(g.BUFFER_EOS,G),this.state=Jt.ENDED;return}if(!this.buffering)return;e.loadLevel!==i&&e.manualLevel===-1&&this.log(`Adapting to level ${i} from level ${this.level}`),this.level=e.nextLoadLevel=i;const m=s.details;if(!m||this.state===Jt.WAITING_LEVEL||m.live&&this.levelLastLoaded!==s){this.level=i,this.state=Jt.WAITING_LEVEL;return}const y=o.len,S=this.getMaxBufferLength(s.maxBitrate);if(y>=S)return;this.backtrackFragment&&this.backtrackFragment.start>o.end&&(this.backtrackFragment=null);const D=this.backtrackFragment?this.backtrackFragment.start:o.end;let W=this.getNextFragment(D,m);if(this.couldBacktrack&&!this.fragPrevious&&W&&W.sn!=="initSegment"&&this.fragmentTracker.getState(W)!==gr.OK){var k;const ie=((k=this.backtrackFragment)!=null?k:W).sn-m.startSN,We=m.fragments[ie-1];We&&W.cc===We.cc&&(W=We,this.fragmentTracker.removeFragment(We))}else this.backtrackFragment&&o.len&&(this.backtrackFragment=null);if(W&&this.isLoopLoading(W,D)){if(!W.gap){const ie=this.audioOnly&&!this.altAudio?he.AUDIO:he.VIDEO,We=(ie===he.VIDEO?this.videoBuffer:this.mediaBuffer)||this.media;We&&this.afterBufferFlushed(We,ie,Tt.MAIN)}W=this.getNextFragmentLoopLoading(W,m,o,Tt.MAIN,S)}W&&(W.initSegment&&!W.initSegment.data&&!this.bitrateTest&&(W=W.initSegment),this.loadFragment(W,s,D))}loadFragment(e,t,n){const r=this.fragmentTracker.getState(e);this.fragCurrent=e,r===gr.NOT_LOADED||r===gr.PARTIAL?e.sn==="initSegment"?this._loadInitSegment(e,t):this.bitrateTest?(this.log(`Fragment ${e.sn} of level ${e.level} is being downloaded to test bitrate and will not be buffered`),this._loadBitrateTestFrag(e,t)):(this.startFragRequested=!0,super.loadFragment(e,t,n)):this.clearTrackerIfNeeded(e)}getBufferedFrag(e){return this.fragmentTracker.getBufferedFrag(e,Tt.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 o=this.getMainFwdBufferInfo();if(!o||o.len{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&&!gc(),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!==Jt.IDLE)return;const r=n[t.level];(!r.details||r.details.live&&this.levelLastLoaded!==r||this.waitForCdnTuneIn(r.details))&&(this.state=Jt.WAITING_LEVEL)}onLevelLoaded(e,t){var n;const{levels:r}=this,i=t.level,s=t.details,o=s.totalduration;if(!r){this.warn(`Levels were reset while loading level ${i}`);return}this.log(`Level ${i} loaded [${s.startSN},${s.endSN}]${s.lastPartSn?`[part-${s.lastPartSn}-${s.lastPartIndex}]`:""}, cc [${s.startCC}, ${s.endCC}] duration:${o}`);const c=r[i],m=this.fragCurrent;m&&(this.state===Jt.FRAG_LOADING||this.state===Jt.FRAG_LOADING_WAITING_RETRY)&&m.level!==t.level&&m.loader&&this.abortCurrentFrag();let y=0;if(s.live||(n=c.details)!=null&&n.live){var S;if(this.checkLiveUpdate(s),s.deltaUpdateFailed)return;y=this.alignPlaylists(s,c.details,(S=this.levelLastLoaded)==null?void 0:S.details)}if(c.details=s,this.levelLastLoaded=c,this.hls.trigger(g.LEVEL_UPDATED,{details:s,level:i}),this.state===Jt.WAITING_LEVEL){if(this.waitForCdnTuneIn(s))return;this.state=Jt.IDLE}this.startFragRequested?s.live&&this.synchronizeToLiveEdge(s):this.setStartPosition(s,y),this.tick()}_handleFragmentLoadProgress(e){var t;const{frag:n,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 o=s[n.level],c=o.details;if(!c){this.warn(`Dropping fragment ${n.sn} of level ${n.level} after level details were reset`),this.fragmentTracker.removeFragment(n);return}const m=o.videoCodec,y=c.PTSKnown||!c.live,S=(t=n.initSegment)==null?void 0:t.data,D=this._getAudioCodec(o),W=this.transmuxer=this.transmuxer||new ua(this.hls,Tt.MAIN,this._handleTransmuxComplete.bind(this),this._handleTransmuxerFlush.bind(this)),k=r?r.index:-1,G=k!==-1,ie=new Oi(n.level,n.sn,n.stats.chunkCount,i.byteLength,k,G),We=this.initPTS[n.cc];W.push(i,S,D,m,n,r,c.totalduration,y,ie,We)}onAudioTrackSwitching(e,t){const n=this.altAudio;if(!!!t.url){if(this.mediaBuffer!==this.media){this.log("Switching on main audio, use media.buffered to schedule main fragment loading"),this.mediaBuffer=this.media;const s=this.fragCurrent;s&&(this.log("Switching to main audio track, cancel main fragment load"),s.abortRequests(),this.fragmentTracker.removeFragment(s)),this.resetTransmuxer(),this.resetLoadingState()}else this.audioOnly&&this.resetTransmuxer();const i=this.hls;n&&(i.trigger(g.BUFFER_FLUSHING,{startOffset:0,endOffset:Number.POSITIVE_INFINITY,type:null}),this.fragmentTracker.removeAllFragments()),i.trigger(g.AUDIO_TRACK_SWITCHED,t)}}onAudioTrackSwitched(e,t){const n=t.id,r=!!this.hls.audioTracks[n].url;if(r){const i=this.videoBuffer;i&&this.mediaBuffer!==i&&(this.log("Switching on alternate audio, use video.buffered to schedule main fragment loading"),this.mediaBuffer=i)}this.altAudio=r,this.tick()}onBufferCreated(e,t){const n=t.tracks;let r,i,s=!1;for(const o in n){const c=n[o];if(c.id==="main"){if(i=o,r=c,o==="video"){const m=n[o];m&&(this.videoBuffer=m.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;if(n&&n.type!==Tt.MAIN)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}`),this.state===Jt.PARSED&&(this.state=Jt.IDLE);return}const i=r?r.stats:n.stats;this.fragLastKbps=Math.round(8*i.total/(i.buffering.end-i.loading.first)),n.sn!=="initSegment"&&(this.fragPrevious=n),this.fragBufferedComplete(n,r)}onError(e,t){var n;if(t.fatal){this.state=Jt.ERROR;return}switch(t.details){case z.FRAG_GAP:case z.FRAG_PARSING_ERROR:case z.FRAG_DECRYPT_ERROR:case z.FRAG_LOAD_ERROR:case z.FRAG_LOAD_TIMEOUT:case z.KEY_LOAD_ERROR:case z.KEY_LOAD_TIMEOUT:this.onFragmentOrKeyLoadError(Tt.MAIN,t);break;case z.LEVEL_LOAD_ERROR:case z.LEVEL_LOAD_TIMEOUT:case z.LEVEL_PARSING_ERROR:!t.levelRetry&&this.state===Jt.WAITING_LEVEL&&((n=t.context)==null?void 0:n.type)===Pt.LEVEL&&(this.state=Jt.IDLE);break;case z.BUFFER_APPEND_ERROR:case z.BUFFER_FULL_ERROR:if(!t.parent||t.parent!=="main")return;if(t.details===z.BUFFER_APPEND_ERROR){this.resetLoadingState();return}this.reduceLengthAndFlushBuffer(t)&&this.flushMainBuffer(0,Number.POSITIVE_INFINITY);break;case z.INTERNAL_EXCEPTION:this.recoverWorkerError(t);break}}checkBuffer(){const{media:e,gapController:t}=this;if(!(!e||!t||!e.readyState)){if(this.loadedmetadata||!Er.getBuffered(e).length){const n=this.state!==Jt.IDLE?this.fragCurrent:null;t.poll(this.lastCurrentTime,n)}this.lastCurrentTime=e.currentTime}}onFragLoadEmergencyAborted(){this.state=Jt.IDLE,this.loadedmetadata||(this.startFragRequested=!1,this.nextLoadPosition=this.startPosition),this.tickImmediate()}onBufferFlushed(e,{type:t}){if(t!==he.AUDIO||this.audioOnly&&!this.altAudio){const n=(t===he.VIDEO?this.videoBuffer:this.mediaBuffer)||this.media;this.afterBufferFlushed(n,t,Tt.MAIN),this.tick()}}onLevelsUpdated(e,t){this.level>-1&&this.fragCurrent&&(this.level=this.fragCurrent.level),this.levels=t.levels}swapAudioCodec(){this.audioCodecSwap=!this.audioCodecSwap}seekToStartPos(){const{media:e}=this;if(!e)return;const t=e.currentTime;let n=this.startPosition;if(n>=0&&t0&&(s{const{hls:r}=this;if(!n||this.fragContextChanged(e))return;t.fragmentError=0,this.state=Jt.IDLE,this.startFragRequested=!1,this.bitrateTest=!1;const i=e.stats;i.parsing.start=i.parsing.end=i.buffering.start=i.buffering.end=self.performance.now(),r.trigger(g.FRAG_LOADED,n),e.bitrateTest=!1})}_handleTransmuxComplete(e){var t;const n="main",{hls:r}=this,{remuxResult:i,chunkMeta:s}=e,o=this.getCurrentContext(s);if(!o){this.resetWhenMissingContext(s);return}const{frag:c,part:m,level:y}=o,{video:S,text:D,id3:W,initSegment:k}=i,{details:G}=y,ie=this.altAudio?void 0:i.audio;if(this.fragContextChanged(c)){this.fragmentTracker.removeFragment(c);return}if(this.state=Jt.PARSING,k){if(k!=null&&k.tracks){const ht=c.initSegment||c;this._bufferInitSegment(y,k.tracks,ht,s),r.trigger(g.FRAG_PARSING_INIT_SEGMENT,{frag:ht,id:n,tracks:k.tracks})}const We=k.initPTS,mt=k.timescale;M(We)&&(this.initPTS[c.cc]={baseTime:We,timescale:mt},r.trigger(g.INIT_PTS_FOUND,{frag:c,id:n,initPTS:We,timescale:mt}))}if(S&&G&&c.sn!=="initSegment"){const We=G.fragments[c.sn-1-G.startSN],mt=c.sn===G.startSN,ht=!We||c.cc>We.cc;if(i.independent!==!1){const{startPTS:zt,endPTS:At,startDTS:nn,endDTS:kt}=S;if(m)m.elementaryStreams[S.type]={startPTS:zt,endPTS:At,startDTS:nn,endDTS:kt};else if(S.firstKeyFrame&&S.independent&&s.id===1&&!ht&&(this.couldBacktrack=!0),S.dropped&&S.independent){const gn=this.getMainFwdBufferInfo(),In=(gn?gn.end:this.getLoadPosition())+this.config.maxBufferHole,Xt=S.firstKeyFramePTS?S.firstKeyFramePTS:zt;if(!mt&&Inls&&(c.gap=!0);c.setElementaryStreamInfo(S.type,zt,At,nn,kt),this.backtrackFragment&&(this.backtrackFragment=c),this.bufferFragmentData(S,c,m,s,mt||ht)}else if(mt||ht)c.gap=!0;else{this.backtrack(c);return}}if(ie){const{startPTS:We,endPTS:mt,startDTS:ht,endDTS:zt}=ie;m&&(m.elementaryStreams[he.AUDIO]={startPTS:We,endPTS:mt,startDTS:ht,endDTS:zt}),c.setElementaryStreamInfo(he.AUDIO,We,mt,ht,zt),this.bufferFragmentData(ie,c,m,s)}if(G&&W!=null&&(t=W.samples)!=null&&t.length){const We={id:n,frag:c,details:G,samples:W.samples};r.trigger(g.FRAG_PARSING_METADATA,We)}if(G&&D){const We={id:n,frag:c,details:G,samples:D.samples};r.trigger(g.FRAG_PARSING_USERDATA,We)}}_bufferInitSegment(e,t,n,r){if(this.state!==Jt.PARSING)return;this.audioOnly=!!t.audio&&!t.video,this.altAudio&&!this.audioOnly&&delete t.audio;const{audio:i,video:s,audiovideo:o}=t;if(i){let c=e.audioCodec;const m=navigator.userAgent.toLowerCase();if(this.audioCodecSwitch){c&&(c.indexOf("mp4a.40.5")!==-1?c="mp4a.40.2":c="mp4a.40.5");const y=i.metadata;y&&"channelCount"in y&&(y.channelCount||1)!==1&&m.indexOf("firefox")===-1&&(c="mp4a.40.5")}c&&c.indexOf("mp4a.40.5")!==-1&&m.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="main",this.log(`Init audio buffer, container:${i.container}, codecs[selected/level/parsed]=[${c||""}/${e.audioCodec||""}/${i.codec}]`)}s&&(s.levelCodec=e.videoCodec,s.id="main",this.log(`Init video buffer, container:${s.container}, codecs[level/parsed]=[${e.videoCodec||""}/${s.codec}]`)),o&&this.log(`Init audiovideo buffer, container:${o.container}, codecs[level/parsed]=[${e.codecs}/${o.codec}]`),this.hls.trigger(g.BUFFER_CODECS,t),Object.keys(t).forEach(c=>{const y=t[c].initSegment;y!=null&&y.byteLength&&this.hls.trigger(g.BUFFER_APPENDING,{type:c,data:y,frag:n,part:null,chunkMeta:r,parent:n.type})}),this.tickImmediate()}getMainFwdBufferInfo(){return this.getFwdBufferInfo(this.mediaBuffer?this.mediaBuffer:this.media,Tt.MAIN)}backtrack(e){this.couldBacktrack=!0,this.backtrackFragment=e,this.resetTransmuxer(),this.flushBufferGap(e),this.fragmentTracker.removeFragment(e),this.fragPrevious=null,this.nextLoadPosition=e.start,this.state=Jt.IDLE}checkFragmentChanged(){const e=this.media;let t=null;if(e&&e.readyState>1&&e.seeking===!1){const n=e.currentTime;if(Er.isBuffered(e,n)?t=this.getAppendedFrag(n):Er.isBuffered(e,n+.1)&&(t=this.getAppendedFrag(n+.1)),t){this.backtrackFragment=null;const r=this.fragPlaying,i=t.level;(!r||t.sn!==r.sn||r.level!==i)&&(this.fragPlaying=t,this.hls.trigger(g.FRAG_CHANGED,{frag:t}),(!r||r.level!==i)&&this.hls.trigger(g.LEVEL_SWITCHED,{level:i}))}}}get nextLevel(){const e=this.nextBufferedFrag;return e?e.level:-1}get currentFrag(){const e=this.media;return e?this.fragPlaying||this.getAppendedFrag(e.currentTime):null}get currentProgramDateTime(){const e=this.media;if(e){const t=e.currentTime,n=this.currentFrag;if(n&&M(t)&&M(n.programDateTime)){const r=n.programDateTime+(t-n.start)*1e3;return new Date(r)}}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 Ti{static get version(){return"1.5.20"}static isMSESupported(){return Ga()}static isSupported(){return mc()}static getMediaSource(){return He()}static get Events(){return g}static get ErrorTypes(){return X}static get ErrorDetails(){return z}static get DefaultConfig(){return Ti.defaultConfig?Ti.defaultConfig:ja}static set DefaultConfig(e){Ti.defaultConfig=e}constructor(e={}){this.config=void 0,this.userConfig=void 0,this.coreComponents=void 0,this.networkControllers=void 0,this.started=!1,this._emitter=new As,this._autoLevelCapping=-1,this._maxHdcpLevel=null,this.abrController=void 0,this.bufferController=void 0,this.capLevelController=void 0,this.latencyController=void 0,this.levelController=void 0,this.streamController=void 0,this.audioTrackController=void 0,this.subtitleTrackController=void 0,this.emeController=void 0,this.cmcdController=void 0,this._media=null,this.url=null,this.triggeringException=void 0,ue(e.debug||!1,"Hls instance");const t=this.config=uc(Ti.DefaultConfig,e);this.userConfig=e,t.progressive&&dc(t);const{abrController:n,bufferController:r,capLevelController:i,errorController:s,fpsController:o}=t,c=new s(this),m=this.abrController=new n(this),y=this.bufferController=new r(this),S=this.capLevelController=new i(this),D=new o(this),W=new Cn(this),k=new er(this),G=t.contentSteeringController,ie=G?new G(this):null,We=this.levelController=new fc(this,ie),mt=new ii(this),ht=new hc(this.config),zt=this.streamController=new Ec(this,mt,ht);S.setStreamController(zt),D.setStreamController(zt);const At=[W,We,zt];ie&&At.splice(1,0,ie),this.networkControllers=At;const nn=[m,y,S,D,k,mt];this.audioTrackController=this.createController(t.audioTrackController,At);const kt=t.audioStreamController;kt&&At.push(new kt(this,mt,ht)),this.subtitleTrackController=this.createController(t.subtitleTrackController,At);const gn=t.subtitleStreamController;gn&&At.push(new gn(this,mt,ht)),this.createController(t.timelineController,nn),ht.emeController=this.emeController=this.createController(t.emeController,nn),this.cmcdController=this.createController(t.cmcdController,nn),this.latencyController=this.createController(ir,nn),this.coreComponents=nn,At.push(c);const In=c.onErrorOut;typeof In=="function"&&this.on(g.ERROR,In,c)}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(A.error("An internal error happened while handling event "+e+'. Error message: "'+n.message+'". Here is a stacktrace:',n),!this.triggeringException){this.triggeringException=!0;const r=e===g.ERROR;this.trigger(g.ERROR,{type:X.OTHER_ERROR,details:z.INTERNAL_EXCEPTION,fatal:r,event:e,error:n}),this.triggeringException=!1}}return!1}listenerCount(e){return this._emitter.listenerCount(e)}destroy(){A.log("destroy"),this.trigger(g.DESTROYING,void 0),this.detachMedia(),this.removeAllListeners(),this._autoLevelCapping=-1,this.url=null,this.networkControllers.forEach(t=>t.destroy()),this.networkControllers.length=0,this.coreComponents.forEach(t=>t.destroy()),this.coreComponents.length=0;const e=this.config;e.xhrSetup=e.fetchSetup=void 0,this.userConfig=null}attachMedia(e){A.log("attachMedia"),this._media=e,this.trigger(g.MEDIA_ATTACHING,{media:e})}detachMedia(){A.log("detachMedia"),this.trigger(g.MEDIA_DETACHING,void 0),this._media=null}loadSource(e){this.stopLoad();const t=this.media,n=this.url,r=this.url=H.buildAbsoluteURL(self.location.href,e,{alwaysNormalize:!0});this._autoLevelCapping=-1,this._maxHdcpLevel=null,A.log(`loadSource:${r}`),t&&n&&(n!==r||this.bufferController.hasSourceTypes())&&(this.detachMedia(),this.attachMedia(t)),this.trigger(g.MANIFEST_LOADING,{url:e})}startLoad(e=-1){A.log(`startLoad(${e})`),this.started=!0,this.resumeBuffering();for(let t=0;t{e.resumeBuffering&&e.resumeBuffering()})}pauseBuffering(){A.log("pause buffering"),this.networkControllers.forEach(e=>{e.pauseBuffering&&e.pauseBuffering()})}swapAudioCodec(){A.log("swapAudioCodec"),this.streamController.swapAudioCodec()}recoverMediaError(){A.log("recoverMediaError");const e=this._media;this.detachMedia(),e&&this.attachMedia(e)}removeLevel(e){this.levelController.removeLevel(e)}get levels(){const e=this.levelController.levels;return e||[]}get currentLevel(){return this.streamController.currentLevel}set currentLevel(e){A.log(`set currentLevel:${e}`),this.levelController.manualLevel=e,this.streamController.immediateLevelSwitch()}get nextLevel(){return this.streamController.nextLevel}set nextLevel(e){A.log(`set nextLevel:${e}`),this.levelController.manualLevel=e,this.streamController.nextLevelSwitch()}get loadLevel(){return this.levelController.level}set loadLevel(e){A.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){A.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){A.log(`set startLevel:${e}`),e!==-1&&(e=Math.max(e,this.minAutoLevel)),this.levelController.startLevel=e}get capLevelToPlayerSize(){return this.config.capLevelToPlayerSize}set capLevelToPlayerSize(e){const t=!!e;t!==this.config.capLevelToPlayerSize&&(t?this.capLevelController.startCapping():(this.capLevelController.stopCapping(),this.autoLevelCapping=-1,this.streamController.nextLevelSwitch()),this.config.capLevelToPlayerSize=t)}get autoLevelCapping(){return this._autoLevelCapping}get bandwidthEstimate(){const{bwEstimator:e}=this.abrController;return e?e.getEstimate():NaN}set bandwidthEstimate(e){this.abrController.resetEstimator(e)}get ttfbEstimate(){const{bwEstimator:e}=this.abrController;return e?e.getEstimateTTFB():NaN}set autoLevelCapping(e){this._autoLevelCapping!==e&&(A.log(`set autoLevelCapping:${e}`),this._autoLevelCapping=e,this.levelController.checkMaxAutoUpdated())}get maxHdcpLevel(){return this._maxHdcpLevel}set maxHdcpLevel(e){$n(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=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()}setAudioOption(e){var t;return(t=this.audioTrackController)==null?void 0:t.setAudioOption(e)}setSubtitleOption(e){var t;return(t=this.subtitleTrackController)==null||t.setSubtitleOption(e),null}get allAudioTracks(){const e=this.audioTrackController;return e?e.allAudioTracks:[]}get audioTracks(){const e=this.audioTrackController;return e?e.audioTracks:[]}get audioTrack(){const e=this.audioTrackController;return e?e.audioTrack:-1}set audioTrack(e){const t=this.audioTrackController;t&&(t.audioTrack=e)}get allSubtitleTracks(){const e=this.subtitleTrackController;return e?e.allSubtitleTracks:[]}get subtitleTracks(){const e=this.subtitleTrackController;return e?e.subtitleTracks:[]}get subtitleTrack(){const e=this.subtitleTrackController;return e?e.subtitleTrack:-1}get media(){return this._media}set subtitleTrack(e){const t=this.subtitleTrackController;t&&(t.subtitleTrack=e)}get subtitleDisplay(){const e=this.subtitleTrackController;return e?e.subtitleDisplay:!1}set subtitleDisplay(e){const t=this.subtitleTrackController;t&&(t.subtitleDisplay=e)}get lowLatencyMode(){return this.config.lowLatencyMode}set lowLatencyMode(e){this.config.lowLatencyMode=e}get liveSyncPosition(){return this.latencyController.liveSyncPosition}get latency(){return this.latencyController.latency}get maxLatency(){return this.latencyController.maxLatency}get targetLatency(){return this.latencyController.targetLatency}get drift(){return this.latencyController.drift}get forceStartLoad(){return this.streamController.forceStartLoad}}Ti.defaultConfig=void 0},16722:function(Ht,lt,u){"use strict";u.d(lt,{Z:function(){return ce}});const v=fe=>typeof fe=="object"&&fe!=null&&fe.nodeType===1,O=(fe,M)=>(!M||fe!=="hidden")&&fe!=="visible"&&fe!=="clip",H=(fe,M)=>{if(fe.clientHeight{const g=(X=>{if(!X.ownerDocument||!X.ownerDocument.defaultView)return null;try{return X.ownerDocument.defaultView.frameElement}catch(z){return null}})(P);return!!g&&(g.clientHeightXM||X>fe&&z=M&&Ce>=Ze?X-fe-P:z>M&&CeZe?z-M+g:0,R=fe=>{const M=fe.parentElement;return M==null?fe.getRootNode().host||null:M},B=(fe,M)=>{var Ze,P,g,X;if(typeof document=="undefined")return[];const{scrollMode:z,block:Ce,inline:st,boundary:Re,skipOverflowHiddenElements:de}=M,ae=typeof Re=="function"?Re:Ae=>Ae!==Re;if(!v(fe))throw new TypeError("Invalid target");const ue=document.scrollingElement||document.documentElement,A=[];let w=fe;for(;v(w)&&ae(w);){if(w=R(w),w===ue){A.push(w);break}w!=null&&w===document.body&&H(w)&&!H(document.documentElement)||w!=null&&H(w,de)&&A.push(w)}const j=(P=(Ze=window.visualViewport)==null?void 0:Ze.width)!=null?P:innerWidth,N=(X=(g=window.visualViewport)==null?void 0:g.height)!=null?X:innerHeight,{scrollX:De,scrollY:Te}=window,{height:ze,width:Me,top:he,right:_,bottom:me,left:T}=fe.getBoundingClientRect(),{top:ve,right:Ee,bottom:ne,left:Oe}=(Ae=>{const le=window.getComputedStyle(Ae);return{top:parseFloat(le.scrollMarginTop)||0,right:parseFloat(le.scrollMarginRight)||0,bottom:parseFloat(le.scrollMarginBottom)||0,left:parseFloat(le.scrollMarginLeft)||0}})(fe);let xe=Ce==="start"||Ce==="nearest"?he-ve:Ce==="end"?me+ne:he+ze/2-ve+ne,te=st==="center"?T+Me/2-Oe+Ee:st==="end"?_+Ee:T-Oe;const Fe=[];for(let Ae=0;Ae=0&&T>=0&&me<=N&&_<=j&&(le===ue&&!H(le)||he>=St&&me<=Et&&T>=vt&&_<=Rt))return Fe;const It=getComputedStyle(le),gt=parseInt(It.borderLeftWidth,10),qe=parseInt(It.borderTopWidth,10),yt=parseInt(It.borderRightWidth,10),V=parseInt(It.borderBottomWidth,10);let Z=0,L=0;const U="offsetWidth"in le?le.offsetWidth-le.clientWidth-gt-yt:0,J="offsetHeight"in le?le.offsetHeight-le.clientHeight-qe-V:0,Se="offsetWidth"in le?le.offsetWidth===0?0:nt/le.offsetWidth:0,x="offsetHeight"in le?le.offsetHeight===0?0:$e/le.offsetHeight:0;if(ue===le)Z=Ce==="start"?xe:Ce==="end"?xe-N:Ce==="nearest"?se(Te,Te+N,N,qe,V,Te+xe,Te+xe+ze,ze):xe-N/2,L=st==="start"?te:st==="center"?te-j/2:st==="end"?te-j:se(De,De+j,j,gt,yt,De+te,De+te+Me,Me),Z=Math.max(0,Z+Te),L=Math.max(0,L+De);else{Z=Ce==="start"?xe-St-qe:Ce==="end"?xe-Et+V+J:Ce==="nearest"?se(St,Et,$e,qe,V+J,xe,xe+ze,ze):xe-(St+$e/2)+J/2,L=st==="start"?te-vt-gt:st==="center"?te-(vt+nt/2)+U/2:st==="end"?te-Rt+yt+U:se(vt,Rt,nt,gt,yt+U,te,te+Me,Me);const{scrollLeft:C,scrollTop:Q}=le;Z=x===0?0:Math.max(0,Math.min(Q+Z/x,le.scrollHeight-$e/x+J)),L=Se===0?0:Math.max(0,Math.min(C+L/Se,le.scrollWidth-nt/Se+U)),xe+=Q-Z,te+=C-L}Fe.push({el:le,top:Z,left:L})}return Fe},ee=fe=>fe===!1?{block:"end",inline:"nearest"}:(M=>M===Object(M)&&Object.keys(M).length!==0)(fe)?fe:{block:"start",inline:"nearest"};function ce(fe,M){if(!fe.isConnected||!(g=>{let X=g;for(;X&&X.parentNode;){if(X.parentNode===document)return!0;X=X.parentNode instanceof ShadowRoot?X.parentNode.host:X.parentNode}return!1})(fe))return;const Ze=(g=>{const X=window.getComputedStyle(g);return{top:parseFloat(X.scrollMarginTop)||0,right:parseFloat(X.scrollMarginRight)||0,bottom:parseFloat(X.scrollMarginBottom)||0,left:parseFloat(X.scrollMarginLeft)||0}})(fe);if((g=>typeof g=="object"&&typeof g.behavior=="function")(M))return M.behavior(B(fe,M));const P=typeof M=="boolean"||M==null?void 0:M.behavior;for(const{el:g,top:X,left:z}of B(fe,ee(M))){const Ce=X-Ze.top+Ze.bottom,st=z-Ze.left+Ze.right;g.scroll({top:Ce,left:st,behavior:P})}}}}]); }());