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

1046 lines
1.4 MiB

!(function(){var nc=Math.pow;(self.webpackChunk=self.webpackChunk||[]).push([[5902],{67921:function(Cn,tt,b){"use strict";b.d(tt,{Z:function(){return ee}});var P=b(67711),re=b(59301),ge={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"defs",attrs:{},children:[{tag:"style",attrs:{}}]},{tag:"path",attrs:{d:"M632 698.3l141.9-112a8 8 0 000-12.6L632 461.7c-5.3-4.2-13-.4-13 6.3v76H295c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h324v76c0 6.7 7.8 10.4 13 6.3zm261.3-405L730.7 130.7c-7.5-7.5-16.7-13-26.7-16V112H144c-17.7 0-32 14.3-32 32v278c0 4.4 3.6 8 8 8h56c4.4 0 8-3.6 8-8V184h136v136c0 17.7 14.3 32 32 32h320c17.7 0 32-14.3 32-32V205.8l136 136V422c0 4.4 3.6 8 8 8h56c4.4 0 8-3.6 8-8v-83.5c0-17-6.7-33.2-18.7-45.2zM640 288H384V184h256v104zm264 436h-56c-4.4 0-8 3.6-8 8v108H184V732c0-4.4-3.6-8-8-8h-56c-4.4 0-8 3.6-8 8v148c0 17.7 14.3 32 32 32h736c17.7 0 32-14.3 32-32V732c0-4.4-3.6-8-8-8z"}}]},name:"delivered-procedure",theme:"outlined"},se=ge,U=b(7657),f=function(E,x){return re.createElement(U.Z,(0,P.Z)({},E,{ref:x,icon:se}))},fe=re.forwardRef(f),ee=fe},4958:function(Cn,tt,b){"use strict";b.d(tt,{Z:function(){return ee}});var P=b(67711),re=b(59301),ge={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M924.8 625.7l-65.5-56c3.1-19 4.7-38.4 4.7-57.8s-1.6-38.8-4.7-57.8l65.5-56a32.03 32.03 0 009.3-35.2l-.9-2.6a443.74 443.74 0 00-79.7-137.9l-1.8-2.1a32.12 32.12 0 00-35.1-9.5l-81.3 28.9c-30-24.6-63.5-44-99.7-57.6l-15.7-85a32.05 32.05 0 00-25.8-25.7l-2.7-.5c-52.1-9.4-106.9-9.4-159 0l-2.7.5a32.05 32.05 0 00-25.8 25.7l-15.8 85.4a351.86 351.86 0 00-99 57.4l-81.9-29.1a32 32 0 00-35.1 9.5l-1.8 2.1a446.02 446.02 0 00-79.7 137.9l-.9 2.6c-4.5 12.5-.8 26.5 9.3 35.2l66.3 56.6c-3.1 18.8-4.6 38-4.6 57.1 0 19.2 1.5 38.4 4.6 57.1L99 625.5a32.03 32.03 0 00-9.3 35.2l.9 2.6c18.1 50.4 44.9 96.9 79.7 137.9l1.8 2.1a32.12 32.12 0 0035.1 9.5l81.9-29.1c29.8 24.5 63.1 43.9 99 57.4l15.8 85.4a32.05 32.05 0 0025.8 25.7l2.7.5a449.4 449.4 0 00159 0l2.7-.5a32.05 32.05 0 0025.8-25.7l15.7-85a350 350 0 0099.7-57.6l81.3 28.9a32 32 0 0035.1-9.5l1.8-2.1c34.8-41.1 61.6-87.5 79.7-137.9l.9-2.6c4.5-12.3.8-26.3-9.3-35zM788.3 465.9c2.5 15.1 3.8 30.6 3.8 46.1s-1.3 31-3.8 46.1l-6.6 40.1 74.7 63.9a370.03 370.03 0 01-42.6 73.6L721 702.8l-31.4 25.8c-23.9 19.6-50.5 35-79.3 45.8l-38.1 14.3-17.9 97a377.5 377.5 0 01-85 0l-17.9-97.2-37.8-14.5c-28.5-10.8-55-26.2-78.7-45.7l-31.4-25.9-93.4 33.2c-17-22.9-31.2-47.6-42.6-73.6l75.5-64.5-6.5-40c-2.4-14.9-3.7-30.3-3.7-45.5 0-15.3 1.2-30.6 3.7-45.5l6.5-40-75.5-64.5c11.3-26.1 25.6-50.7 42.6-73.6l93.4 33.2 31.4-25.9c23.7-19.5 50.2-34.9 78.7-45.7l37.9-14.3 17.9-97.2c28.1-3.2 56.8-3.2 85 0l17.9 97 38.1 14.3c28.7 10.8 55.4 26.2 79.3 45.8l31.4 25.8 92.8-32.9c17 22.9 31.2 47.6 42.6 73.6L781.8 426l6.5 39.9zM512 326c-97.2 0-176 78.8-176 176s78.8 176 176 176 176-78.8 176-176-78.8-176-176-176zm79.2 255.2A111.6 111.6 0 01512 614c-29.9 0-58-11.7-79.2-32.8A111.6 111.6 0 01400 502c0-29.9 11.7-58 32.8-79.2C454 401.6 482.1 390 512 390c29.9 0 58 11.6 79.2 32.8A111.6 111.6 0 01624 502c0 29.9-11.7 58-32.8 79.2z"}}]},name:"setting",theme:"outlined"},se=ge,U=b(7657),f=function(E,x){return re.createElement(U.Z,(0,P.Z)({},E,{ref:x,icon:se}))},fe=re.forwardRef(f),ee=fe},65030:function(Cn,tt,b){"use strict";b.d(tt,{Z:function(){return Je}});var P=b(98506),re=b(16886),ge=b(33346),se=b(43403),U=b(92310),f=b.n(U),fe=b(29301),ee=b(76846),A=b(96452),E=b(6089),x=b(80402),h=b(34280),p=b(49658),_=b(59301),C=b(67711),F=b(77900),R=b(8654);function K(xe){var _e=xe.prefixCls,N=xe.align,Fe=xe.arrow,De=xe.arrowPos,V=Fe||{},T=V.className,J=V.content,ve=De.x,te=ve===void 0?0:ve,$=De.y,ue=$===void 0?0:$,Ie=_.useRef();if(!N||!N.points)return null;var Ce={position:"absolute"};if(N.autoArrow!==!1){var ke=N.points[0],Le=N.points[1],mt=ke[0],je=ke[1],qe=Le[0],ut=Le[1];mt===qe||!["t","b"].includes(mt)?Ce.top=ue:mt==="t"?Ce.top=0:Ce.bottom=0,je===ut||!["l","r"].includes(je)?Ce.left=te:je==="l"?Ce.left=0:Ce.right=0}return _.createElement("div",{ref:Ie,className:f()("".concat(_e,"-arrow"),T),style:Ce},J)}function B(xe){var _e=xe.prefixCls,N=xe.open,Fe=xe.zIndex,De=xe.mask,V=xe.motion;return De?_.createElement(F.default,(0,C.Z)({},V,{motionAppear:!0,visible:N,removeOnLeave:!0}),function(T){var J=T.className;return _.createElement("div",{style:{zIndex:Fe},className:f()("".concat(_e,"-mask"),J)})}):null}var D=_.memo(function(xe){var _e=xe.children;return _e},function(xe,_e){return _e.cache}),I=D,S=_.forwardRef(function(xe,_e){var N=xe.popup,Fe=xe.className,De=xe.prefixCls,V=xe.style,T=xe.target,J=xe.onVisibleChanged,ve=xe.open,te=xe.keepDom,$=xe.fresh,ue=xe.onClick,Ie=xe.mask,Ce=xe.arrow,ke=xe.arrowPos,Le=xe.align,mt=xe.motion,je=xe.maskMotion,qe=xe.forceRender,ut=xe.getPopupContainer,Nt=xe.autoDestroy,It=xe.portal,bt=xe.zIndex,on=xe.onMouseEnter,rn=xe.onMouseLeave,Ct=xe.onPointerEnter,gn=xe.onPointerDownCapture,Ln=xe.ready,Mt=xe.offsetX,hn=xe.offsetY,We=xe.offsetR,Qe=xe.offsetB,He=xe.onAlign,z=xe.onPrepare,le=xe.stretch,me=xe.targetWidth,Be=xe.targetHeight,be=typeof N=="function"?N():N,Tt=ve||te,Wt=(ut==null?void 0:ut.length)>0,an=_.useState(!ut||!Wt),_n=(0,re.Z)(an,2),Wn=_n[0],zn=_n[1];if((0,h.Z)(function(){!Wn&&Wt&&T&&zn(!0)},[Wn,Wt,T]),!Wn)return null;var On="auto",Un={left:"-1000vw",top:"-1000vh",right:On,bottom:On};if(Ln||!ve){var ar,mr=Le.points,tr=Le.dynamicInset||((ar=Le._experimental)===null||ar===void 0?void 0:ar.dynamicInset),gr=tr&&mr[0][1]==="r",sn=tr&&mr[0][0]==="b";gr?(Un.right=We,Un.left=On):(Un.left=Mt,Un.right=On),sn?(Un.bottom=Qe,Un.top=On):(Un.top=hn,Un.bottom=On)}var Kt={};return le&&(le.includes("height")&&Be?Kt.height=Be:le.includes("minHeight")&&Be&&(Kt.minHeight=Be),le.includes("width")&&me?Kt.width=me:le.includes("minWidth")&&me&&(Kt.minWidth=me)),ve||(Kt.pointerEvents="none"),_.createElement(It,{open:qe||Tt,getContainer:ut&&function(){return ut(T)},autoDestroy:Nt},_.createElement(B,{prefixCls:De,open:ve,zIndex:bt,mask:Ie,motion:je}),_.createElement(fe.Z,{onResize:He,disabled:!ve},function(yn){return _.createElement(F.default,(0,C.Z)({motionAppear:!0,motionEnter:!0,motionLeave:!0,removeOnLeave:!1,forceRender:qe,leavedClassName:"".concat(De,"-hidden")},mt,{onAppearPrepare:z,onEnterPrepare:z,visible:ve,onVisibleChanged:function(or){var Ke;mt==null||(Ke=mt.onVisibleChanged)===null||Ke===void 0||Ke.call(mt,or),J(or)}}),function(Yn,or){var Ke=Yn.className,Pe=Yn.style,Yt=f()(De,Ke,Fe);return _.createElement("div",{ref:(0,R.sQ)(yn,_e,or),className:Yt,style:(0,P.Z)((0,P.Z)((0,P.Z)((0,P.Z)({"--arrow-x":"".concat(ke.x||0,"px"),"--arrow-y":"".concat(ke.y||0,"px")},Un),Kt),Pe),{},{boxSizing:"border-box",zIndex:bt},V),onMouseEnter:on,onMouseLeave:rn,onPointerEnter:Ct,onClick:ue,onPointerDownCapture:gn},Ce&&_.createElement(K,{prefixCls:De,arrow:Ce,arrowPos:ke,align:Le}),_.createElement(I,{cache:!ve&&!$},be))})}))}),q=S,ae=_.forwardRef(function(xe,_e){var N=xe.children,Fe=xe.getTriggerDOMNode,De=(0,R.Yr)(N),V=_.useCallback(function(J){(0,R.mH)(_e,Fe?Fe(J):J)},[Fe]),T=(0,R.x1)(V,(0,R.C4)(N));return De?_.cloneElement(N,{ref:T}):N}),j=ae,Y=_.createContext(null),ie=Y;function de(xe){return xe?Array.isArray(xe)?xe:[xe]:[]}function pe(xe,_e,N,Fe){return _.useMemo(function(){var De=de(N!=null?N:_e),V=de(Fe!=null?Fe:_e),T=new Set(De),J=new Set(V);return xe&&(T.has("hover")&&(T.delete("hover"),T.add("click")),J.has("hover")&&(J.delete("hover"),J.add("click"))),[T,J]},[xe,_e,N,Fe])}var W=b(29194);function M(){var xe=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[],_e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:[],N=arguments.length>2?arguments[2]:void 0;return N?xe[0]===_e[0]:xe[0]===_e[0]&&xe[1]===_e[1]}function X(xe,_e,N,Fe){for(var De=N.points,V=Object.keys(xe),T=0;T<V.length;T+=1){var J,ve=V[T];if(M((J=xe[ve])===null||J===void 0?void 0:J.points,De,Fe))return"".concat(_e,"-placement-").concat(ve)}return""}function G(xe,_e,N,Fe){return _e||(N?{motionName:"".concat(xe,"-").concat(N)}:Fe?{motionName:Fe}:null)}function ne(xe){return xe.ownerDocument.defaultView}function Z(xe){for(var _e=[],N=xe==null?void 0:xe.parentElement,Fe=["hidden","scroll","clip","auto"];N;){var De=ne(N).getComputedStyle(N),V=De.overflowX,T=De.overflowY,J=De.overflow;[V,T,J].some(function(ve){return Fe.includes(ve)})&&_e.push(N),N=N.parentElement}return _e}function m(xe){var _e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:1;return Number.isNaN(xe)?_e:xe}function v(xe){return m(parseFloat(xe),0)}function Q(xe,_e){var N=(0,P.Z)({},xe);return(_e||[]).forEach(function(Fe){if(!(Fe instanceof HTMLBodyElement||Fe instanceof HTMLHtmlElement)){var De=ne(Fe).getComputedStyle(Fe),V=De.overflow,T=De.overflowClipMargin,J=De.borderTopWidth,ve=De.borderBottomWidth,te=De.borderLeftWidth,$=De.borderRightWidth,ue=Fe.getBoundingClientRect(),Ie=Fe.offsetHeight,Ce=Fe.clientHeight,ke=Fe.offsetWidth,Le=Fe.clientWidth,mt=v(J),je=v(ve),qe=v(te),ut=v($),Nt=m(Math.round(ue.width/ke*1e3)/1e3),It=m(Math.round(ue.height/Ie*1e3)/1e3),bt=(ke-Le-qe-ut)*Nt,on=(Ie-Ce-mt-je)*It,rn=mt*It,Ct=je*It,gn=qe*Nt,Ln=ut*Nt,Mt=0,hn=0;if(V==="clip"){var We=v(T);Mt=We*Nt,hn=We*It}var Qe=ue.x+gn-Mt,He=ue.y+rn-hn,z=Qe+ue.width+2*Mt-gn-Ln-bt,le=He+ue.height+2*hn-rn-Ct-on;N.left=Math.max(N.left,Qe),N.top=Math.max(N.top,He),N.right=Math.min(N.right,z),N.bottom=Math.min(N.bottom,le)}}),N}function he(xe){var _e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,N="".concat(_e),Fe=N.match(/^(.*)\%$/);return Fe?xe*(parseFloat(Fe[1])/100):parseFloat(N)}function Ue(xe,_e){var N=_e||[],Fe=(0,re.Z)(N,2),De=Fe[0],V=Fe[1];return[he(xe.width,De),he(xe.height,V)]}function Oe(){var xe=arguments.length>0&&arguments[0]!==void 0?arguments[0]:"";return[xe[0],xe[1]]}function ft(xe,_e){var N=_e[0],Fe=_e[1],De,V;return N==="t"?V=xe.y:N==="b"?V=xe.y+xe.height:V=xe.y+xe.height/2,Fe==="l"?De=xe.x:Fe==="r"?De=xe.x+xe.width:De=xe.x+xe.width/2,{x:De,y:V}}function Et(xe,_e){var N={t:"b",b:"t",l:"r",r:"l"};return xe.map(function(Fe,De){return De===_e?N[Fe]||"c":Fe}).join("")}function Ft(xe,_e,N,Fe,De,V,T){var J=_.useState({ready:!1,offsetX:0,offsetY:0,offsetR:0,offsetB:0,arrowX:0,arrowY:0,scaleX:1,scaleY:1,align:De[Fe]||{}}),ve=(0,re.Z)(J,2),te=ve[0],$=ve[1],ue=_.useRef(0),Ie=_.useMemo(function(){return _e?Z(_e):[]},[_e]),Ce=_.useRef({}),ke=function(){Ce.current={}};xe||ke();var Le=(0,E.Z)(function(){if(_e&&N&&xe){let xr=function(Ar,Tn){var sr=arguments.length>2&&arguments[2]!==void 0?arguments[2]:Xt,lr=Tt.x+Ar,dr=Tt.y+Tn,br=lr+sn,Dr=dr+gr,Sr=Math.max(lr,sr.left),kn=Math.max(dr,sr.top),er=Math.min(br,sr.right),qn=Math.min(Dr,sr.bottom);return Math.max(0,(er-Sr)*(qn-kn))},wr=function(){at=Tt.y+Ge,Dt=at+gr,yt=Tt.x+ye,it=yt+sn};var qe,ut,Nt,It,bt=_e,on=bt.ownerDocument,rn=ne(bt),Ct=rn.getComputedStyle(bt),gn=Ct.position,Ln=bt.style.left,Mt=bt.style.top,hn=bt.style.right,We=bt.style.bottom,Qe=bt.style.overflow,He=(0,P.Z)((0,P.Z)({},De[Fe]),V),z=on.createElement("div");(qe=bt.parentElement)===null||qe===void 0||qe.appendChild(z),z.style.left="".concat(bt.offsetLeft,"px"),z.style.top="".concat(bt.offsetTop,"px"),z.style.position=gn,z.style.height="".concat(bt.offsetHeight,"px"),z.style.width="".concat(bt.offsetWidth,"px"),bt.style.left="0",bt.style.top="0",bt.style.right="auto",bt.style.bottom="auto",bt.style.overflow="hidden";var le;if(Array.isArray(N))le={x:N[0],y:N[1],width:0,height:0};else{var me,Be,be=N.getBoundingClientRect();be.x=(me=be.x)!==null&&me!==void 0?me:be.left,be.y=(Be=be.y)!==null&&Be!==void 0?Be:be.top,le={x:be.x,y:be.y,width:be.width,height:be.height}}var Tt=bt.getBoundingClientRect(),Wt=rn.getComputedStyle(bt),an=Wt.height,_n=Wt.width;Tt.x=(ut=Tt.x)!==null&&ut!==void 0?ut:Tt.left,Tt.y=(Nt=Tt.y)!==null&&Nt!==void 0?Nt:Tt.top;var Wn=on.documentElement,zn=Wn.clientWidth,On=Wn.clientHeight,Un=Wn.scrollWidth,ar=Wn.scrollHeight,mr=Wn.scrollTop,tr=Wn.scrollLeft,gr=Tt.height,sn=Tt.width,Kt=le.height,yn=le.width,Yn={left:0,top:0,right:zn,bottom:On},or={left:-tr,top:-mr,right:Un-tr,bottom:ar-mr},Ke=He.htmlRegion,Pe="visible",Yt="visibleFirst";Ke!=="scroll"&&Ke!==Yt&&(Ke=Pe);var Lt=Ke===Yt,qt=Q(or,Ie),nn=Q(Yn,Ie),Xt=Ke===Pe?nn:qt,zt=Lt?nn:Xt;bt.style.left="auto",bt.style.top="auto",bt.style.right="0",bt.style.bottom="0";var pn=bt.getBoundingClientRect();bt.style.left=Ln,bt.style.top=Mt,bt.style.right=hn,bt.style.bottom=We,bt.style.overflow=Qe,(It=bt.parentElement)===null||It===void 0||It.removeChild(z);var Ot=m(Math.round(sn/parseFloat(_n)*1e3)/1e3),cn=m(Math.round(gr/parseFloat(an)*1e3)/1e3);if(Ot===0||cn===0||(0,ee.Sh)(N)&&!(0,W.Z)(N))return;var un=He.offset,lt=He.targetOffset,Pt=Ue(Tt,un),Re=(0,re.Z)(Pt,2),Ye=Re[0],vt=Re[1],xt=Ue(le,lt),Vt=(0,re.Z)(xt,2),Jt=Vt[0],Zt=Vt[1];le.x-=Jt,le.y-=Zt;var vn=He.points||[],Bn=(0,re.Z)(vn,2),Dn=Bn[0],st=Bn[1],En=Oe(st),mn=Oe(Dn),L=ft(le,En),k=ft(Tt,mn),ce=(0,P.Z)({},He),ye=L.x-k.x+Ye,Ge=L.y-k.y+vt,$e=xr(ye,Ge),gt=xr(ye,Ge,nn),Bt=ft(le,["t","l"]),Ht=ft(Tt,["t","l"]),kt=ft(le,["b","r"]),St=ft(Tt,["b","r"]),$t=He.overflow||{},oe=$t.adjustX,Ve=$t.adjustY,Te=$t.shiftX,Me=$t.shiftY,ze=function(Tn){return typeof Tn=="boolean"?Tn:Tn>=0},at,Dt,yt,it;wr();var Ne=ze(Ve),Xe=mn[0]===En[0];if(Ne&&mn[0]==="t"&&(Dt>zt.bottom||Ce.current.bt)){var nt=Ge;Xe?nt-=gr-Kt:nt=Bt.y-St.y-vt;var et=xr(ye,nt),ot=xr(ye,nt,nn);et>$e||et===$e&&(!Lt||ot>=gt)?(Ce.current.bt=!0,Ge=nt,vt=-vt,ce.points=[Et(mn,0),Et(En,0)]):Ce.current.bt=!1}if(Ne&&mn[0]==="b"&&(at<zt.top||Ce.current.tb)){var Qt=Ge;Xe?Qt+=gr-Kt:Qt=kt.y-Ht.y-vt;var en=xr(ye,Qt),An=xr(ye,Qt,nn);en>$e||en===$e&&(!Lt||An>=gt)?(Ce.current.tb=!0,Ge=Qt,vt=-vt,ce.points=[Et(mn,0),Et(En,0)]):Ce.current.tb=!1}var bn=ze(oe),Fn=mn[1]===En[1];if(bn&&mn[1]==="l"&&(it>zt.right||Ce.current.rl)){var wn=ye;Fn?wn-=sn-yn:wn=Bt.x-St.x-Ye;var Sn=xr(wn,Ge),dn=xr(wn,Ge,nn);Sn>$e||Sn===$e&&(!Lt||dn>=gt)?(Ce.current.rl=!0,ye=wn,Ye=-Ye,ce.points=[Et(mn,1),Et(En,1)]):Ce.current.rl=!1}if(bn&&mn[1]==="r"&&(yt<zt.left||Ce.current.lr)){var Xn=ye;Fn?Xn+=sn-yn:Xn=kt.x-Ht.x-Ye;var Mn=xr(Xn,Ge),cr=xr(Xn,Ge,nn);Mn>$e||Mn===$e&&(!Lt||cr>=gt)?(Ce.current.lr=!0,ye=Xn,Ye=-Ye,ce.points=[Et(mn,1),Et(En,1)]):Ce.current.lr=!1}wr();var ln=Te===!0?0:Te;typeof ln=="number"&&(yt<nn.left&&(ye-=yt-nn.left-Ye,le.x+yn<nn.left+ln&&(ye+=le.x-nn.left+yn-ln)),it>nn.right&&(ye-=it-nn.right-Ye,le.x>nn.right-ln&&(ye+=le.x-nn.right+ln)));var Vn=Me===!0?0:Me;typeof Vn=="number"&&(at<nn.top&&(Ge-=at-nn.top-vt,le.y+Kt<nn.top+Vn&&(Ge+=le.y-nn.top+Kt-Vn)),Dt>nn.bottom&&(Ge-=Dt-nn.bottom-vt,le.y>nn.bottom-Vn&&(Ge+=le.y-nn.bottom+Vn)));var nr=Tt.x+ye,Jn=nr+sn,Kn=Tt.y+Ge,Nn=Kn+gr,xn=le.x,Pn=xn+yn,In=le.y,pr=In+Kt,fr=Math.max(nr,xn),hr=Math.min(Jn,Pn),Rr=(fr+hr)/2,Zr=Rr-nr,Yr=Math.max(Kn,In),ii=Math.min(Nn,pr),Xr=(Yr+ii)/2,si=Xr-Kn;T==null||T(_e,ce);var Er=pn.right-Tt.x-(ye+Tt.width),Ir=pn.bottom-Tt.y-(Ge+Tt.height);Ot===1&&(ye=Math.round(ye),Er=Math.round(Er)),cn===1&&(Ge=Math.round(Ge),Ir=Math.round(Ir));var ti={ready:!0,offsetX:ye/Ot,offsetY:Ge/cn,offsetR:Er/Ot,offsetB:Ir/cn,arrowX:Zr/Ot,arrowY:si/cn,scaleX:Ot,scaleY:cn,align:ce};$(ti)}}),mt=function(){ue.current+=1;var ut=ue.current;Promise.resolve().then(function(){ue.current===ut&&Le()})},je=function(){$(function(ut){return(0,P.Z)((0,P.Z)({},ut),{},{ready:!1})})};return(0,h.Z)(je,[Fe]),(0,h.Z)(function(){xe||je()},[xe]),[te.ready,te.offsetX,te.offsetY,te.offsetR,te.offsetB,te.arrowX,te.arrowY,te.scaleX,te.scaleY,te.align,mt]}var Ut=b(15142);function Se(xe,_e,N,Fe,De){(0,h.Z)(function(){if(xe&&_e&&N){let ue=function(){Fe(),De()};var V=_e,T=N,J=Z(V),ve=Z(T),te=ne(T),$=new Set([te].concat((0,Ut.Z)(J),(0,Ut.Z)(ve)));return $.forEach(function(Ie){Ie.addEventListener("scroll",ue,{passive:!0})}),te.addEventListener("resize",ue,{passive:!0}),Fe(),function(){$.forEach(function(Ie){Ie.removeEventListener("scroll",ue),te.removeEventListener("resize",ue)})}}},[xe,_e,N])}var Gt=b(48736);function ht(xe,_e,N,Fe,De,V,T,J){var ve=_.useRef(xe);ve.current=xe;var te=_.useRef(!1);_.useEffect(function(){if(_e&&Fe&&(!De||V)){var ue=function(){te.current=!1},Ie=function(Nt){var It;ve.current&&!T(((It=Nt.composedPath)===null||It===void 0||(It=It.call(Nt))===null||It===void 0?void 0:It[0])||Nt.target)&&!te.current&&J(!1)},Ce=ne(Fe);Ce.addEventListener("pointerdown",ue,!0),Ce.addEventListener("mousedown",Ie,!0),Ce.addEventListener("contextmenu",Ie,!0);var ke=(0,A.A)(N);if(ke&&(ke.addEventListener("mousedown",Ie,!0),ke.addEventListener("contextmenu",Ie,!0)),0)var Le,mt,je,qe;return function(){Ce.removeEventListener("pointerdown",ue,!0),Ce.removeEventListener("mousedown",Ie,!0),Ce.removeEventListener("contextmenu",Ie,!0),ke&&(ke.removeEventListener("mousedown",Ie,!0),ke.removeEventListener("contextmenu",Ie,!0))}}},[_e,N,Fe,De,V]);function $(){te.current=!0}return $}var tn=["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 dt(){var xe=arguments.length>0&&arguments[0]!==void 0?arguments[0]:se.Z,_e=_.forwardRef(function(N,Fe){var De=N.prefixCls,V=De===void 0?"rc-trigger-popup":De,T=N.children,J=N.action,ve=J===void 0?"hover":J,te=N.showAction,$=N.hideAction,ue=N.popupVisible,Ie=N.defaultPopupVisible,Ce=N.onPopupVisibleChange,ke=N.afterPopupVisibleChange,Le=N.mouseEnterDelay,mt=N.mouseLeaveDelay,je=mt===void 0?.1:mt,qe=N.focusDelay,ut=N.blurDelay,Nt=N.mask,It=N.maskClosable,bt=It===void 0?!0:It,on=N.getPopupContainer,rn=N.forceRender,Ct=N.autoDestroy,gn=N.destroyPopupOnHide,Ln=N.popup,Mt=N.popupClassName,hn=N.popupStyle,We=N.popupPlacement,Qe=N.builtinPlacements,He=Qe===void 0?{}:Qe,z=N.popupAlign,le=N.zIndex,me=N.stretch,Be=N.getPopupClassNameFromAlign,be=N.fresh,Tt=N.alignPoint,Wt=N.onPopupClick,an=N.onPopupAlign,_n=N.arrow,Wn=N.popupMotion,zn=N.maskMotion,On=N.popupTransitionName,Un=N.popupAnimation,ar=N.maskTransitionName,mr=N.maskAnimation,tr=N.className,gr=N.getTriggerDOMNode,sn=(0,ge.Z)(N,tn),Kt=Ct||gn||!1,yn=_.useState(!1),Yn=(0,re.Z)(yn,2),or=Yn[0],Ke=Yn[1];(0,h.Z)(function(){Ke((0,p.Z)())},[]);var Pe=_.useRef({}),Yt=_.useContext(ie),Lt=_.useMemo(function(){return{registerSubPopup:function(er,qn){Pe.current[er]=qn,Yt==null||Yt.registerSubPopup(er,qn)}}},[Yt]),qt=(0,x.Z)(),nn=_.useState(null),Xt=(0,re.Z)(nn,2),zt=Xt[0],pn=Xt[1],Ot=_.useRef(null),cn=(0,E.Z)(function(kn){Ot.current=kn,(0,ee.Sh)(kn)&&zt!==kn&&pn(kn),Yt==null||Yt.registerSubPopup(qt,kn)}),un=_.useState(null),lt=(0,re.Z)(un,2),Pt=lt[0],Re=lt[1],Ye=_.useRef(null),vt=(0,E.Z)(function(kn){(0,ee.Sh)(kn)&&Pt!==kn&&(Re(kn),Ye.current=kn)}),xt=_.Children.only(T),Vt=(xt==null?void 0:xt.props)||{},Jt={},Zt=(0,E.Z)(function(kn){var er,qn,Cr=Pt;return(Cr==null?void 0:Cr.contains(kn))||((er=(0,A.A)(Cr))===null||er===void 0?void 0:er.host)===kn||kn===Cr||(zt==null?void 0:zt.contains(kn))||((qn=(0,A.A)(zt))===null||qn===void 0?void 0:qn.host)===kn||kn===zt||Object.values(Pe.current).some(function(Tr){return(Tr==null?void 0:Tr.contains(kn))||kn===Tr})}),vn=G(V,Wn,Un,On),Bn=G(V,zn,mr,ar),Dn=_.useState(Ie||!1),st=(0,re.Z)(Dn,2),En=st[0],mn=st[1],L=ue!=null?ue:En,k=(0,E.Z)(function(kn){ue===void 0&&mn(kn)});(0,h.Z)(function(){mn(ue||!1)},[ue]);var ce=_.useRef(L);ce.current=L;var ye=_.useRef([]);ye.current=[];var Ge=(0,E.Z)(function(kn){var er;k(kn),((er=ye.current[ye.current.length-1])!==null&&er!==void 0?er:L)!==kn&&(ye.current.push(kn),Ce==null||Ce(kn))}),$e=_.useRef(),gt=function(){clearTimeout($e.current)},Bt=function(er){var qn=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0;gt(),qn===0?Ge(er):$e.current=setTimeout(function(){Ge(er)},qn*1e3)};_.useEffect(function(){return gt},[]);var Ht=_.useState(!1),kt=(0,re.Z)(Ht,2),St=kt[0],$t=kt[1];(0,h.Z)(function(kn){(!kn||L)&&$t(!0)},[L]);var oe=_.useState(null),Ve=(0,re.Z)(oe,2),Te=Ve[0],Me=Ve[1],ze=_.useState(null),at=(0,re.Z)(ze,2),Dt=at[0],yt=at[1],it=function(er){yt([er.clientX,er.clientY])},Ne=Ft(L,zt,Tt&&Dt!==null?Dt:Pt,We,He,z,an),Xe=(0,re.Z)(Ne,11),nt=Xe[0],et=Xe[1],ot=Xe[2],Qt=Xe[3],en=Xe[4],An=Xe[5],bn=Xe[6],Fn=Xe[7],wn=Xe[8],Sn=Xe[9],dn=Xe[10],Xn=pe(or,ve,te,$),Mn=(0,re.Z)(Xn,2),cr=Mn[0],ln=Mn[1],Vn=cr.has("click"),nr=ln.has("click")||ln.has("contextMenu"),Jn=(0,E.Z)(function(){St||dn()}),Kn=function(){ce.current&&Tt&&nr&&Bt(!1)};Se(L,Pt,zt,Jn,Kn),(0,h.Z)(function(){Jn()},[Dt,We]),(0,h.Z)(function(){L&&!(He!=null&&He[We])&&Jn()},[JSON.stringify(z)]);var Nn=_.useMemo(function(){var kn=X(He,V,Sn,Tt);return f()(kn,Be==null?void 0:Be(Sn))},[Sn,Be,He,V,Tt]);_.useImperativeHandle(Fe,function(){return{nativeElement:Ye.current,popupElement:Ot.current,forceAlign:Jn}});var xn=_.useState(0),Pn=(0,re.Z)(xn,2),In=Pn[0],pr=Pn[1],fr=_.useState(0),hr=(0,re.Z)(fr,2),Rr=hr[0],Zr=hr[1],Yr=function(){if(me&&Pt){var er=Pt.getBoundingClientRect();pr(er.width),Zr(er.height)}},ii=function(){Yr(),Jn()},Xr=function(er){$t(!1),dn(),ke==null||ke(er)},si=function(){return new Promise(function(er){Yr(),Me(function(){return er})})};(0,h.Z)(function(){Te&&(dn(),Te(),Me(null))},[Te]);function Er(kn,er,qn,Cr){Jt[kn]=function(Tr){var $r;Cr==null||Cr(Tr),Bt(er,qn);for(var ni=arguments.length,Mr=new Array(ni>1?ni-1:0),Ai=1;Ai<ni;Ai++)Mr[Ai-1]=arguments[Ai];($r=Vt[kn])===null||$r===void 0||$r.call.apply($r,[Vt,Tr].concat(Mr))}}(Vn||nr)&&(Jt.onClick=function(kn){var er;ce.current&&nr?Bt(!1):!ce.current&&Vn&&(it(kn),Bt(!0));for(var qn=arguments.length,Cr=new Array(qn>1?qn-1:0),Tr=1;Tr<qn;Tr++)Cr[Tr-1]=arguments[Tr];(er=Vt.onClick)===null||er===void 0||er.call.apply(er,[Vt,kn].concat(Cr))});var Ir=ht(L,nr,Pt,zt,Nt,bt,Zt,Bt),ti=cr.has("hover"),xr=ln.has("hover"),wr,Ar;ti&&(Er("onMouseEnter",!0,Le,function(kn){it(kn)}),Er("onPointerEnter",!0,Le,function(kn){it(kn)}),wr=function(er){(L||St)&&zt!==null&&zt!==void 0&&zt.contains(er.target)&&Bt(!0,Le)},Tt&&(Jt.onMouseMove=function(kn){var er;(er=Vt.onMouseMove)===null||er===void 0||er.call(Vt,kn)})),xr&&(Er("onMouseLeave",!1,je),Er("onPointerLeave",!1,je),Ar=function(){Bt(!1,je)}),cr.has("focus")&&Er("onFocus",!0,qe),ln.has("focus")&&Er("onBlur",!1,ut),cr.has("contextMenu")&&(Jt.onContextMenu=function(kn){var er;ce.current&&ln.has("contextMenu")?Bt(!1):(it(kn),Bt(!0)),kn.preventDefault();for(var qn=arguments.length,Cr=new Array(qn>1?qn-1:0),Tr=1;Tr<qn;Tr++)Cr[Tr-1]=arguments[Tr];(er=Vt.onContextMenu)===null||er===void 0||er.call.apply(er,[Vt,kn].concat(Cr))}),tr&&(Jt.className=f()(Vt.className,tr));var Tn=_.useRef(!1);Tn.current||(Tn.current=rn||L||St);var sr=(0,P.Z)((0,P.Z)({},Vt),Jt),lr={},dr=["onContextMenu","onClick","onMouseDown","onTouchStart","onMouseEnter","onMouseLeave","onFocus","onBlur"];dr.forEach(function(kn){sn[kn]&&(lr[kn]=function(){for(var er,qn=arguments.length,Cr=new Array(qn),Tr=0;Tr<qn;Tr++)Cr[Tr]=arguments[Tr];(er=sr[kn])===null||er===void 0||er.call.apply(er,[sr].concat(Cr)),sn[kn].apply(sn,Cr)})});var br=_.cloneElement(xt,(0,P.Z)((0,P.Z)({},sr),lr)),Dr={x:An,y:bn},Sr=_n?(0,P.Z)({},_n!==!0?_n:{}):null;return _.createElement(_.Fragment,null,_.createElement(fe.Z,{disabled:!L,ref:vt,onResize:ii},_.createElement(j,{getTriggerDOMNode:gr},br)),Tn.current&&_.createElement(ie.Provider,{value:Lt},_.createElement(q,{portal:xe,ref:cn,prefixCls:V,popup:Ln,className:f()(Mt,Nn),style:hn,target:Pt,onMouseEnter:wr,onMouseLeave:Ar,onPointerEnter:wr,zIndex:le,open:L,keepDom:St,fresh:be,onClick:Wt,onPointerDownCapture:Ir,mask:Nt,motion:vn,maskMotion:Bn,onVisibleChanged:Xr,onPrepare:si,forceRender:rn,autoDestroy:Kt,getPopupContainer:on,align:Sn,arrow:Sr,arrowPos:Dr,ready:nt,offsetX:et,offsetY:ot,offsetR:Qt,offsetB:en,onAlign:Jn,stretch:me,targetWidth:In/Fn,targetHeight:Rr/wn})))});return _e}var Je=dt(se.Z)},28426:function(Cn,tt,b){"use strict";var P=b(59301),re=b(93314),ge=b(99571),se=Object.defineProperty,U=Object.defineProperties,f=Object.getOwnPropertyDescriptors,fe=Object.getOwnPropertySymbols,ee=Object.prototype.hasOwnProperty,A=Object.prototype.propertyIsEnumerable,E=(_,C,F)=>C in _?se(_,C,{enumerable:!0,configurable:!0,writable:!0,value:F}):_[C]=F,x=(_,C)=>{for(var F in C||(C={}))ee.call(C,F)&&E(_,F,C[F]);if(fe)for(var F of fe(C))A.call(C,F)&&E(_,F,C[F]);return _},h=(_,C)=>U(_,f(C));const p=({img:_,buttonProps:C={},styles:F={},customText:R,ButtonText:K,ButtonClick:B,Buttonclass:D,ButtonTwo:I,imgStyles:S,loading:q=!1,className:ae=""})=>P.createElement("section",{className:`tc animated fadeIn ${ae}`,style:x({color:"#999",margin:"100px auto",visibility:q?"hidden":"visible"},F)},P.createElement("img",{src:_||re,style:h(x({},S),{pointerEvents:"none",userSelect:"none"})}),P.createElement("p",{className:"mt20 font14"},R||"\u6682\u65F6\u8FD8\u6CA1\u6709\u76F8\u5173\u6570\u636E\u54E6!"),K&&P.createElement(ge.ZP,x({className:D,onClick:B},C),K),I&&I);tt.Z=p},45677:function(Cn,tt,b){"use strict";b.d(tt,{Z:function(){return D}});var P=b(59301),re={wrp:"wrp___dq7YK",bgBlack:"bgBlack___ARIUV",monaco:"monaco___VnZC3",darkBlue:"darkBlue___UprA9",close:"close___LKoWu",embed:"embed___hvpEJ"},ge=b(99571),se=b(70557),U=b(75975),f=b(25399),fe=b(51257),ee=b(81722),A=b(28426),E=b(346),x=b(44203),h=b(59301),p=Object.defineProperty,_=Object.getOwnPropertySymbols,C=Object.prototype.hasOwnProperty,F=Object.prototype.propertyIsEnumerable,R=(I,S,q)=>S in I?p(I,S,{enumerable:!0,configurable:!0,writable:!0,value:q}):I[S]=q,K=(I,S)=>{for(var q in S||(S={}))C.call(S,q)&&R(I,q,S[q]);if(_)for(var q of _(S))F.call(S,q)&&R(I,q,S[q]);return I},B=(I,S,q)=>new Promise((ae,j)=>{var Y=pe=>{try{de(q.next(pe))}catch(W){j(W)}},ie=pe=>{try{de(q.throw(pe))}catch(W){j(W)}},de=pe=>pe.done?ae(pe.value):Promise.resolve(pe.value).then(Y,ie);de((q=q.apply(I,S)).next())}),D=({editOffice:I="view",data:S,issaver:q,onSaver:ae,theme:j,type:Y,filename:ie,monacoEditor:de,className:pe,style:W,close:M,onClose:X,hasMask:G,disabledDownload:ne,onImgDimensions:Z,showNodata:m,recordInfo:v})=>{const[Q,he]=(0,P.useState)("https://view.officeapps.live.com/op/view.aspx?src=http://testgs.educoder.net//rails/active_storage/blobs/eyJfcmFpbHMiOnsibWVzc2FnZSI6IkJBaHBCZz09IiwiZXhwIjpudWxsLCJwdXIiOiJibG9iX2lkIn19--03541f6234b93d7ac3b2d84e7eb0e6594a952945/1.ppt"),[Ue,Oe]=(0,P.useState)(""),[ft,Et]=(0,P.useState)(),Ft=window.ENV==="build"?"/react/build":"",Ut=location.host.startsWith("localhost")?E.Z.PROXY_SERVER:E.Z.API_SERVER,Gt=10*(1024*1024),ht=(0,P.useRef)();S!=null&&S.startsWith("/api")&&Y!=="txt"&&(S=E.Z.API_SERVER+S);const tn=N=>N.substring(N.lastIndexOf("/")+1).split(".").pop();ie&&de&&(de.filename=ie),(0,P.useEffect)(()=>{var N,Fe;const De=(Fe=(N=document.cookie)==null?void 0:N.replace(/\s/g,""))==null?void 0:Fe.split(";");De==null||De.map(V=>{let T=V.split("=");T[0]==="_educoder_session"&&Oe(T[1])})},[]),(0,P.useEffect)(()=>{Y==="office"&&(S.indexOf("bigfilescdn.")>-1||S.indexOf("bigfiles1")>-1?Et({url:S,fileType:tn(S),model:S.indexOf("model=edit")?"edit":"view"}):Je())},[Y,S]);function dt(N){return B(this,null,function*(){N.data.type==="pdfdata"&&(ae(N.data.data),window.removeEventListener("message",dt,!1)),console.log("mess---:",N.data)})}const Je=()=>B(void 0,null,function*(){console.log("data:",S);let N=S;S.startsWith("http")||(N=location.origin+N);let Fe=new URL(N).pathname.split("/").pop();const De=yield(0,ee.gJ)({attachment_id:Fe});De.url=Ut+De.url,Et(De)}),xe=()=>{if(S.startsWith("http")||S.startsWith("blob:")){_e();return}(0,fe.Sv)(ie||"educoder",S,ie)},_e=()=>{v&&(0,x.fc)({id:v==null?void 0:v.id,watch_type:1,course_id:v==null?void 0:v.course_id}),(0,fe.Nd)(ie||"educoder",decodeURIComponent(S))};return h.createElement("div",{style:K({},W||{}),className:`${G&&re.bgBlack} ${Y?re.wrp:"hide"}`},M&&h.createElement("div",{className:re.close,ref:ht},!!Z&&h.createElement(f.Z,{title:"\u70B9\u51FB\u5BF9\u56FE\u7247\u8FDB\u884C\u6279\u6CE8",getPopupContainer:()=>ht.current},h.createElement("span",{onClick:()=>{X(),Z()}},h.createElement("i",{className:"icon-yulanpizhu"}))),!ne&&h.createElement(f.Z,{title:"\u70B9\u51FB\u4E0B\u8F7D\u6B64\u6587\u4EF6",getPopupContainer:()=>ht.current},h.createElement("span",{onClick:_e},h.createElement("i",{className:"icon-quxiaozhiding"}))),q&&h.createElement(f.Z,{title:"\u4FDD\u5B58pdf\u5E76\u9000\u51FA",getPopupContainer:()=>ht.current},h.createElement("span",{className:"",onClick:()=>{const N=document.getElementById("pdfiframe");window.addEventListener("message",dt,!1),setTimeout(()=>{N.contentWindow.postMessage("getData","*")},300)}},h.createElement("i",{className:"icon-baocun"}))),h.createElement(f.Z,{title:"\u5173\u95ED",getPopupContainer:()=>ht.current},h.createElement("span",{className:"",onClick:()=>{X()}},h.createElement("i",{className:"icon-guanbi1"})))),h.createElement("div",{className:`${re[pe]} ${pe} ${re.monaco} ${Y==="txt"?"show":"hide"}`},Y==="txt"&&h.createElement(h.Fragment,null,h.createElement(U.ZP,K({},de)))),Y==="audio"&&h.createElement("audio",{src:`${(S==null?void 0:S.indexOf("http://"))>-1||(S==null?void 0:S.indexOf("https://"))>-1?"":"data:audio/mp3;base64,"}${S}`,autoPlay:!0}),Y==="video"&&h.createElement(h.Fragment,null,(S==null?void 0:S.indexOf("http"))>-1?h.createElement("video",{controls:!0,src:`${S}`,autoPlay:!0}):h.createElement("video",{controls:!0,src:`data:video/mp4;base64,${S}`,autoPlay:!0})),Y==="office"&&ft&&h.createElement("iframe",{src:`${Ft}/office.html?key=${ft.key}&url=${btoa(ft.url)}&callbackUrl=${Ut+(ft.callbackUrl||"")}&fileType=${ft.fileType}&title=${ft.title||""}&model=${I}&officeServer=${E.Z.ONLYOFFICE}&disabledDownload=${!!ne}`}),Y==="html"&&h.createElement("iframe",{src:S+"&disposition=inline"}),Y==="pdf"&&h.createElement("iframe",{id:"pdfiframe",src:`${Ft}/js/pdfview/index.html?filename=${ie||"educoder.pdf"}&url=${encodeURIComponent(S)}&disabledDownload=${!!ne}&model=${I}`}),Y==="image"&&h.createElement("img",{src:`${(S==null?void 0:S.indexOf("http://"))>-1||(S==null?void 0:S.indexOf("https://"))>-1?"":"data:image/png;base64,"}${S}`}),(Y==="other"||Y==="download")&&h.createElement(h.Fragment,null,m?h.createElement(A.Z,{customText:"\u5F53\u524D\u6587\u4EF6\u4E0D\u652F\u6301\u9884\u89C8\uFF0C\u53EF\u70B9\u51FB\u4E0B\u8F7D\u67E5\u770B",ButtonTwo:h.createElement(ge.ZP,{icon:h.createElement("i",{className:"iconfont icon-xiazai4 font14"}),type:"primary",size:"middle",onClick:xe,disabled:ne},"\u4E0B\u8F7D")}):h.createElement(ge.ZP,{type:"primary",size:"middle",onClick:xe,disabled:ne},h.createElement(se.Z,null),"\u70B9\u51FB\u4E0B\u8F7D")))}},76902:function(Cn,tt,b){"use strict";b.d(tt,{z:function(){return j},Z:function(){return Y}});var P=b(59301),re=b(8944),ge=b(81428),se=b(64018),U=b(81168),f=b(346),fe=b(51257),ee=b(15342),A=b(1012),E=b(45677),x=b(59301),p=({html:ie})=>{const de=(0,P.useRef)(null),pe=(0,P.useRef)(null),W=`.markdown-body p {
margin: 0 0 16px 0 !important;
line-height: 28px;
white-space: pre-wrap;
}
ol,
ul,
li {
list-style-type: none
}
ol,
ul,
dl {
margin-bottom: 0px;
}
.markdown-body {
-ms-text-size-adjust: 100%;
-webkit-text-size-adjust: 100%;
color: #333;
overflow: hidden;
font-family: "Microsoft YaHei", Helvetica, "Meiryo UI", "Malgun Gothic", "Segoe UI", "Trebuchet MS", "Monaco", monospace, Tahoma, STXihei, "\u534E\u6587\u7EC6\u9ED1", STHeiti, "Helvetica Neue", "Droid Sans", "wenquanyi micro hei", FreeSans, Arimo, Arial, SimSun, "\u5B8B\u4F53", Heiti, "\u9ED1\u4F53", sans-serif;
word-break: break-word;
font-size: 16px;
line-height: 1.6;
white-space: normal;
word-wrap: break-word;
position: relative;
}
.markdown-body ul>li {
list-style-type: disc;
}
.markdown-body ol>li {
list-style-type: decimal;
}
.markdown-body a {
background: transparent;
}
.markdown-body a:active,
.markdown-body a:hover {
outline: 0;
}
.markdown-body strong {
font-weight: bold;
}
.markdown-body h1 {
font-size: 2em;
margin: 0.67em 0;
}
.markdown-body img {
border: 0;
}
.markdown-body hr {
-moz-box-sizing: content-box;
box-sizing: content-box;
height: 0;
}
.markdown-body pre {
overflow: auto;
}
.markdown-body code,
.markdown-body kbd,
.markdown-body pre {
font-family: "Meiryo UI", "YaHei Consolas Hybrid", Consolas, "Malgun Gothic", "Segoe UI", "Trebuchet MS", Helvetica, monospace, monospace;
font-size: 1em;
}
.markdown-body input {
color: inherit;
font: inherit;
margin: 0;
}
.markdown-body html input[disabled] {
cursor: default;
}
.markdown-body input {
line-height: normal;
}
.markdown-body input[type="checkbox"] {
-moz-box-sizing: border-box;
box-sizing: border-box;
padding: 0;
}
.markdown-body table {
border-collapse: collapse;
border-spacing: 0;
}
.markdown-body td,
.markdown-body th {
padding: 0;
}
.markdown-body * {
-moz-box-sizing: border-box;
box-sizing: border-box;
}
.markdown-body input {
font: 13px/1.4 Helvetica, arial, freesans, clean, sans-serif, "Segoe UI Emoji", "Segoe UI Symbol";
}
.markdown-body a {
color: #4183c4;
text-decoration: none;
}
.markdown-body a:hover,
.markdown-body a:active {
text-decoration: underline;
}
.markdown-body hr {
height: 0;
margin: 15px 0;
overflow: hidden;
background: transparent;
border: 0;
border-bottom: 1px solid #ddd;
}
.markdown-body hr:before {
display: table;
content: "";
}
.markdown-body hr:after {
display: table;
clear: both;
content: "";
}
.markdown-body h1,
.markdown-body h2,
.markdown-body h3,
.markdown-body h4,
.markdown-body h5,
.markdown-body h6 {
margin-top: 15px;
margin-bottom: 15px;
line-height: 1.1;
}
.markdown-body h1 {
font-size: 30px;
}
.markdown-body h2 {
font-size: 21px;
}
.markdown-body h3 {
font-size: 16px;
}
.markdown-body h4 {
font-size: 14px;
}
.markdown-body h5 {
font-size: 12px;
}
.markdown-body h6 {
font-size: 11px;
}
.markdown-body blockquote {
margin: 0;
}
.markdown-body ul,
.markdown-body ol {
padding: 0;
margin-top: 0;
margin-bottom: 0;
}
ul.linenums,
ol.linenums {
padding: 16px 0 0 56px !important;
}
.markdown-body ul,
.markdown-body ol {
padding-left: 2em;
}
.markdown-body ol ol,
.markdown-body ul ol {
list-style-type: lower-roman;
}
.markdown-body ul ul ol,
.markdown-body ul ol ol,
.markdown-body ol ul ol,
.markdown-body ol ol ol {
list-style-type: lower-alpha;
}
.markdown-body dd {
margin-left: 0;
}
.markdown-body code {
font-family: Consolas, "Liberation Mono", Menlo, Courier, monospace;
font-size: 12px;
}
.markdown-body pre {
margin-top: 0;
margin-bottom: 0;
font: 12px Consolas, "Liberation Mono", Menlo, Courier, monospace;
}
.markdown-body .octicon {
font: normal normal 16px octicons-anchor;
line-height: 1;
display: inline-block;
text-decoration: none;
-webkit-font-smoothing: antialiased;
-moz-osx-font-smoothing: grayscale;
-webkit-user-select: none;
-moz-user-select: none;
-ms-user-select: none;
user-select: none;
}
.markdown-body .octicon-link:before {
content: '\f05c';
}
.markdown-body>*:first-child {
margin-top: 0 !important;
}
.markdown-body>*:last-child {
margin-bottom: 0 !important;
}
.markdown-body .anchor {
position: absolute;
top: 0;
left: 0;
display: block;
padding-right: 6px;
padding-left: 30px;
margin-left: -30px;
}
.markdown-body .anchor:focus {
outline: none;
}
.markdown-body h1,
.markdown-body h2,
.markdown-body h3,
.markdown-body h4,
.markdown-body h5,
.markdown-body h6 {
position: relative;
margin-top: 1em;
margin-bottom: 16px;
font-weight: bold;
line-height: 1.4;
}
.markdown-body h1 .octicon-link,
.markdown-body h2 .octicon-link,
.markdown-body h3 .octicon-link,
.markdown-body h4 .octicon-link,
.markdown-body h5 .octicon-link,
.markdown-body h6 .octicon-link {
display: none;
color: #000;
vertical-align: middle;
}
.markdown-body h1:hover .anchor,
.markdown-body h2:hover .anchor,
.markdown-body h3:hover .anchor,
.markdown-body h4:hover .anchor,
.markdown-body h5:hover .anchor,
.markdown-body h6:hover .anchor {
padding-left: 8px;
margin-left: -30px;
text-decoration: none;
}
.markdown-body h1:hover .anchor .octicon-link,
.markdown-body h2:hover .anchor .octicon-link,
.markdown-body h3:hover .anchor .octicon-link,
.markdown-body h4:hover .anchor .octicon-link,
.markdown-body h5:hover .anchor .octicon-link,
.markdown-body h6:hover .anchor .octicon-link {
display: inline-block;
}
.markdown-body h1 {
padding-bottom: 0.3em;
font-size: 2.25em;
line-height: 1.2;
border-bottom: 1px solid #eee;
}
.markdown-body h1 .anchor {
line-height: 1;
}
.markdown-body h2 {
padding-bottom: 0.3em;
font-size: 1.75em;
line-height: 1.225;
border-bottom: 1px solid #eee;
}
.markdown-body h2 .anchor {
line-height: 1;
}
.markdown-body h3 {
font-size: 1.5em;
line-height: 1.43;
}
.markdown-body h3 .anchor {
line-height: 1.2;
}
.markdown-body h4 {
font-size: 1.25em;
}
.markdown-body h4 .anchor {
line-height: 1.2;
}
.markdown-body h5 {
font-size: 1em;
}
.markdown-body h5 .anchor {
line-height: 1.1;
}
.markdown-body h6 {
font-size: 1em;
color: #777;
}
.markdown-body h6 .anchor {
line-height: 1.1;
}
.markdown-body p,
.markdown-body blockquote,
.markdown-body ul,
.markdown-body ol,
.markdown-body dl,
.markdown-body table,
.markdown-body pre {
margin-top: 0;
margin-bottom: 16px;
}
.markdown-body ul ul,
.markdown-body ul ol,
.markdown-body ol ol,
.markdown-body ol ul {
margin-top: 0;
margin-bottom: 0;
}
.markdown-body li>p {
margin-top: 16px;
}
.markdown-body dl {
padding: 0;
}
.markdown-body dl dt {
padding: 0;
margin-top: 16px;
font-size: 1em;
font-style: italic;
font-weight: bold;
}
.markdown-body dl dd {
padding: 0 16px;
margin-bottom: 16px;
}
.markdown-body blockquote {
padding: 0 15px;
color: #777;
border-left: 4px solid #ddd;
}
.markdown-body blockquote> :first-child {
margin-top: 0;
}
.markdown-body blockquote> :last-child {
margin-bottom: 0;
}
.markdown-body table {
display: block;
width: 100%;
overflow: auto;
word-break: normal;
word-break: keep-all;
}
.markdown-body table th {
font-weight: bold;
text-align: revert;
}
.markdown-body table th,
.markdown-body table td {
padding: 6px 13px;
border: 1px solid #ddd;
}
.markdown-body table tr {
background-color: #fff;
border-top: 1px solid #ccc;
}
.markdown-body table tr:nth-child(2n) {
background-color: #f8f8f8;
}
.markdown-body img {
max-width: 100%;
-moz-box-sizing: border-box;
box-sizing: border-box;
}
.markdown-body code {
padding: 0;
padding-top: 0.2em;
padding-bottom: 0.2em;
margin: 0;
font-size: 85%;
background-color: rgba(0, 0, 0, 0.04);
border-radius: 3px;
}
.markdown-body code:has(.katex) {
background-color: transparent;
}
.markdown-body code:before,
.markdown-body code:after {
letter-spacing: -0.2em;
content: "\\00a0";
}
.markdown-body pre>code {
padding: 0;
margin: 0;
font-size: 100%;
word-break: normal;
white-space: pre;
background: transparent;
border: 0;
}
.markdown-body .highlight {
margin-bottom: 16px;
}
.markdown-body .highlight pre,
.markdown-body pre {
padding: 16px;
overflow: auto;
font-size: 85%;
line-height: 1.45;
background-color: #f7f7f7;
border-radius: 3px;
}
.markdown-body .highlight pre {
margin-bottom: 0;
word-break: normal;
}
.markdown-body pre {
word-wrap: normal;
}
.markdown-body pre code {
display: inline;
max-width: initial;
padding: 0;
margin: 0;
overflow: initial;
line-height: inherit;
word-wrap: normal;
background-color: transparent;
border: 0;
}
.markdown-body pre code:before,
.markdown-body pre code:after {
content: normal;
}
.markdown-body kbd {
display: inline-block;
padding: 3px 5px;
font-size: 11px;
line-height: 10px;
color: #555;
vertical-align: middle;
background-color: #fcfcfc;
border: solid 1px #ccc;
border-bottom-color: #bbb;
border-radius: 3px;
box-shadow: inset 0 -1px 0 #bbb;
}
.markdown-body .pl-c {
color: #969896;
}
.markdown-body .pl-c1,
.markdown-body .pl-mdh,
.markdown-body .pl-mm,
.markdown-body .pl-mp,
.markdown-body .pl-mr,
.markdown-body .pl-s1 .pl-v,
.markdown-body .pl-s3,
.markdown-body .pl-sc,
.markdown-body .pl-sv {
color: #0086b3;
}
.markdown-body .pl-e,
.markdown-body .pl-en {
color: #795da3;
}
.markdown-body .pl-s1 .pl-s2,
.markdown-body .pl-smi,
.markdown-body .pl-smp,
.markdown-body .pl-stj,
.markdown-body .pl-vo,
.markdown-body .pl-vpf {
color: #333;
}
.markdown-body .pl-ent {
color: #63a35c;
}
.markdown-body .pl-k,
.markdown-body .pl-s,
.markdown-body .pl-st {
color: #a71d5d;
}
.markdown-body .pl-pds,
.markdown-body .pl-s1,
.markdown-body .pl-s1 .pl-pse .pl-s2,
.markdown-body .pl-sr,
.markdown-body .pl-sr .pl-cce,
.markdown-body .pl-sr .pl-sra,
.markdown-body .pl-sr .pl-sre,
.markdown-body .pl-src {
color: #df5000;
}
.markdown-body .pl-mo,
.markdown-body .pl-v {
color: #1d3e81;
}
.markdown-body .pl-id {
color: #b52a1d;
}
.markdown-body .pl-ii {
background-color: #b52a1d;
color: #f8f8f8;
}
.markdown-body .pl-sr .pl-cce {
color: #63a35c;
font-weight: bold;
}
.markdown-body .pl-ml {
color: #693a17;
}
.markdown-body .pl-mh,
.markdown-body .pl-mh .pl-en,
.markdown-body .pl-ms {
color: #1d3e81;
font-weight: bold;
}
.markdown-body .pl-mq {
color: #008080;
}
.markdown-body .pl-mi {
color: #333;
font-style: italic;
}
.markdown-body .pl-mb {
color: #333;
font-weight: bold;
}
.markdown-body .pl-md,
.markdown-body .pl-mdhf {
background-color: #ffecec;
color: #bd2c00;
}
.markdown-body .pl-mdht,
.markdown-body .pl-mi1 {
background-color: #eaffea;
color: #55a532;
}
.markdown-body .pl-mdr {
color: #795da3;
font-weight: bold;
}
.markdown-body kbd {
display: inline-block;
padding: 3px 5px;
font: 11px Consolas, "Liberation Mono", Menlo, Courier, monospace;
line-height: 10px;
color: #555;
vertical-align: middle;
background-color: #fcfcfc;
border: solid 1px #ccc;
border-bottom-color: #bbb;
border-radius: 3px;
box-shadow: inset 0 -1px 0 #bbb;
}
.markdown-body .task-list-item {
list-style-type: none;
}
.markdown-body .task-list-item+.task-list-item {
margin-top: 3px;
}
.markdown-body .task-list-item input {
float: left;
margin: 0.3em 0 0.25em -1.6em;
vertical-align: middle;
}
.markdown-body :checked+.radio-label {
z-index: 1;
position: relative;
border-color: #4183c4;
}
/*! Pretty printing styles. Used with prettify.js. */
/* SPAN elements with the classes below are added by prettyprint. */
.pln {
color: #000
}
/* plain text */
@media screen {
.str {
color: #080
}
/* string content */
.kwd {
color: #008
}
/* a keyword */
.com {
color: #800
}
/* a comment */
.typ {
color: #606
}
/* a type name */
.lit {
color: #066
}
/* a literal value */
/* punctuation, lisp open bracket, lisp close bracket */
.pun,
.opn,
.clo {
color: #660
}
.tag {
color: #008
}
/* a markup tag name */
.atn {
color: #606
}
/* a markup attribute name */
.atv {
color: #080
}
/* a markup attribute value */
.dec,
.var {
color: #606
}
/* a declaration; a variable name */
.fun {
color: red
}
/* a function name */
}
/* Use higher contrast and text-weight for printable form. */
@media print,
projection {
.str {
color: #060
}
.kwd {
color: #006;
font-weight: bold
}
.com {
color: #600;
font-style: italic
}
.typ {
color: #404;
font-weight: bold
}
.lit {
color: #044
}
.pun,
.opn,
.clo {
color: #440
}
.tag {
color: #006;
font-weight: bold
}
.atn {
color: #404
}
.atv {
color: #060
}
}
/* Put a border around prettyprinted code snippets. */
pre.prettyprint {
padding: 2px;
/* border: 1px solid #888 */
}
/* Specify class=linenums on a pre to get line numbering */
ol.linenums {
margin-top: 0;
margin-bottom: 0
}
/* IE indents via margin-left */
li.L0,
li.L1,
li.L2,
li.L3,
li.L5,
li.L6,
li.L7,
li.L8 {
list-style-type: none
}
/* Alternate shading for lines */
li.L1,
li.L3,
li.L5,
li.L7,
li.L9 {
background: #eee
}
.markdown-body p,
.markdown-body blockquote,
.markdown-body ul,
.markdown-body ol,
.markdown-body dl,
.markdown-body table,
.markdown-body pre {
margin-top: 0;
margin-bottom: 16px;
}`;return(0,P.useEffect)(()=>{const M=de.current.attachShadow({mode:"open"});pe.current=document.createElement("div"),pe.current.className="markdown-body",pe.current.innerHTML=ie,M.appendChild(pe.current);const X=document.createElement("style");return X.textContent=W,M.appendChild(X),()=>{M.innerHTML=""}},[]),(0,P.useEffect)(()=>{pe.current&&(pe.current.innerHTML=ie)},[ie]),x.createElement("div",{ref:de})};function _(ie){const de=["onabort","onanimationend","onanimationiteration","onanimationstart","onauxclick","onblur","oncancel","oncanplay","oncanplaythrough","onchange","onclick","onclose","oncontextmenu","oncopy","oncut","ondblclick","ondrag","ondragend","ondragenter","ondragleave","ondragover","ondragstart","ondrop","ondurationchange","onemptied","onended","onerror","onfocus","onformdata","ongotpointercapture","oninput","oninvalid","onkeydown","onkeypress","onkeyup","onload","onloadeddata","onloadedmetadata","onloadstart","onlostpointercapture","onmousedown","onmousemove","onmouseout","onmouseover","onmouseup","onpaste","onpause","onplay","onplaying","onpointercancel","onpointerdown","onpointerenter","onpointerleave","onpointermove","onpointerout","onpointerover","onpointerup","onprogress","onratechange","onreset","onresize","onscroll","onsecuritypolicyviolation","onseeked","onseeking","onselect","onslotchange","onstalled","onsubmit","onsuspend","ontimeupdate","ontoggle","ontouchcancel","ontouchend","ontouchmove","ontouchstart","ontransitionend","onvolumechange","onwaiting","onwheel"],pe=new RegExp(`\\b(${de.join("|")})\\s*=\\s*(?:"[^"]*"|'[^']*'|[^\\s>]*)`,"gi");return ie.replace(pe,"").trim()}var C=Object.defineProperty,F=Object.getOwnPropertySymbols,R=Object.prototype.hasOwnProperty,K=Object.prototype.propertyIsEnumerable,B=(ie,de,pe)=>de in ie?C(ie,de,{enumerable:!0,configurable:!0,writable:!0,value:pe}):ie[de]=pe,D=(ie,de)=>{for(var pe in de||(de={}))R.call(de,pe)&&B(ie,pe,de[pe]);if(F)for(var pe of F(de))K.call(de,pe)&&B(ie,pe,de[pe]);return ie};const I="@\u2581\u2581@",S="@\u2581@",q=/<pre[^>]*>/g;function ae(ie){let de=document.createElement("div");return de.innerHTML=ie,de.childNodes.length===0?"":de.childNodes[0].nodeValue}const j=(ie,de)=>{ie=ie||"";const pe=/(?:https?:\/\/[^\/]+)?\/api\/attachments\/([A-Za-z0-9+/=]+)(\?.*?)?\)|(?:https?:\/\/[^\/]+)?\/api\/attachments\/([A-Za-z0-9+/=]+)(\?.*?)?|(?:https?:\/\/[^\/]+)?\/attachments\/download\/([A-Za-z0-9+/=]+)(\?.*?)?\//g,W=/\"(?:https?:\/\/[^\/]+)?\/api\/attachments\/([A-Za-z0-9+/=]+)(\?.*?)?|\"(?:https?:\/\/[^\/]+)?\/attachments\/download\/([A-Za-z0-9+/=]+)(\?.*?)?\//g,M=/\(\s+(?:https?:\/\/[^\/]+)?\/files\/uploads\/([A-Za-z0-9+/=]+)(\?.*?)?|\"(?:https?:\/\/[^\/]+)?\/files\/uploads\/([A-Za-z0-9+/=]+)(\?.*?)?\//g,X=/(?:https?:\/\/[^\/]+)?\/attachments\/download\/([A-Za-z0-9+/=]+)(\?.*?)?\//g;return de?ie.replaceAll("https://www.educoder.net","").replaceAll("https://www-cdn.educoder.net","").replaceAll("//api/attachments","/api/attachments").replace(pe,(G,ne,Z,m,v,Q,he)=>{const Ue=ne||m||Q,Oe=Z||v||he||"?";return f.Z.API_SERVER+"/api/attachments/"+Ue+Oe+"&t="+(0,fe.Jn)(Ue,Date.now())+(G.indexOf(")")>-1?")":"&")}).replaceAll('src="(','src="').replaceAll("src='(",'src="'):(ie=ie.replace(X,(G,ne,Z,m,v,Q,he)=>{const Ue=ne||m||Q,Oe=Z||v||he||"?";return f.Z.API_SERVER+"/attachments/download/"+Ue+Oe+"&t="+(0,fe.Jn)(Ue,Date.now())+(G.indexOf(")")>-1?")":"&")}).replace(pe,(G,ne,Z,m,v,Q,he)=>{const Ue=ne||m||Q,Oe=Z||v||he||"?";return f.Z.API_SERVER+"/api/attachments/"+Ue+Oe+"&t="+(0,fe.Jn)(Ue,Date.now())+(G.indexOf(")")>-1?")":"&")}).replace(W,(G,ne,Z,m,v)=>{const Q=ne||m,he=Z||v||"";return'"'+f.Z.API_SERVER+"/api/attachments/"+Q+he+Q+he+"&t="+(0,fe.Jn)(Q,Date.now())}).replace(M,(G,ne,Z,m,v)=>{const Q=ne||m,he=Z||v||"";return"("+f.Z.API_SERVER+"/files/uploads/"+Q+he+Q+he+"&t="+(0,fe.Jn)(Q,Date.now())}).replaceAll('src="(','src="').replaceAll("src='(",'src="').replaceAll("http://video.educoder","https://video.educoder").replaceAll("http://www.educoder.net/api","https://data.educoder.net/api").replaceAll("https://www.educoder.net/api","https://data.educoder.net/api").replace(/\r\n/g,`
`),ie)};var Y=({value:ie="",className:de,showTextOnly:pe,showLines:W,style:M={},stylesPrev:X={},highlightKeywords:G,showProgramFill:ne,isProgramFill:Z,disabledFill:m=!1,programFillValue:v,onFillChange:Q=Oe=>{},onFillBlur:he=()=>{},onFillFocus:Ue=()=>{}})=>{let Oe=_(String(ie||""));const[ft,Et]=(0,P.useState)(""),[Ft,Ut]=(0,P.useState)("office"),[Se,Gt]=(0,P.useState)([]),ht=(0,P.useRef)("a"+(0,A.Z)()),tn={},dt=$=>/<style[\s\S]*?>/i.test($||""),Je=($,ue,Ie)=>{const Ce=document.createElement($===S?"input":"textarea");Ce.style.width="100%",Ce.style.height=$===S?"40px":"151px",Ce.rows=5,Ce.spellcheck=!1,Ce.name="edu-program-fill",Ce.placeholder="\u8BF7\u8F93\u5165",Ce.dataset.id=ue;const ke=Object.keys(tn).length;return tn[ke]=Ce,`<span class="edu-program-fill-wrap ${$===S?"":"show"}" style="width:${$===S?"600px":"100%"}" title=${Ie||""}><span>${Ce.outerHTML}<span class="edu-program-fill-score" style="margin:0 6px"></span></span></span>`};function xe($){return $=$.replace(/!\[.*?\]\(.*?\)/g,""),$=$.replace(/\[.*?\]\(.*?\)/g,""),$=$.replace(new RegExp("<iframe.*?<\\/iframe>","gs"),""),$=$.replace(/<embed.*?>/g,""),$=$.replace(/<img.*?>/g,""),$=$.replace(new RegExp("<video.*?>.*?<\\/video>","gs"),""),$=$.replace(new RegExp("<audio.*?>.*?<\\/audio>","gs"),""),$=$.replace(new RegExp("<style.*?>.*?<\\/style>","gs"),""),$=$.replace(new RegExp("<script.*?>.*?<\\/script>","gs"),""),$}const _e=$=>!pe&&dt(Oe)?$:$.replace(/<style.*?>([\s\S]+?)<\/style>/gim,function(ue,Ie){let Ce=Ie.replace(/(\n|\r)/g,"").split("}"),ke=[];return Ce.map(Le=>{Le!=""&&ke.push(`.${ht.current} ${Le}`)}),`<style>${ke.join("}")}</style>`}),N=(0,P.useMemo)(()=>{try{const Ce=/\(\s+\/api\/attachments\/|\(\/api\/attachments\//g,ke=/\"\/api\/attachments\/|\"\/attachments\/download\//g,Le=/\(\s+\/files\/uploads\/|\"\/files\/uploads\//g,mt=/\(\/attachments\/download\//g;Oe=Oe.replace(mt,"("+f.Z.API_SERVER+"/attachments/download/").replace(Ce,"("+f.Z.API_SERVER+"/api/attachments/").replace(ke,'"'+f.Z.API_SERVER+"/api/attachments/").replace(Le,'"'+f.Z.API_SERVER+"/files/uploads/").replaceAll("http://video.educoder","https://video.educoder").replaceAll("http://www.educoder.net/api","https://data.educoder.net/api").replaceAll("https://www.educoder.net/api","https://data.educoder.net/api").replace(/\r\n/g,`
`)}catch(Ce){}if(ne){let Ce=-1;return Oe=Oe.replaceAll("<","&lt;").replaceAll(">","&gt;").replace(/(@▁▁@|@▁@)/g,function(ke,Le,mt){var je;return++Ce,Je(ke,Ce,(je=v==null?void 0:v[Ce])==null?void 0:je.value.replaceAll("<","&lt;").replaceAll(">","&gt;"))}),`<pre style="background:#fff;padding:4px">${_e(Oe||"")}</pre>`}let $=_e(Oe);$=(0,ge.ZP)($);const ue=(0,ge.ez)();Oe.match(/\[TOC\]/)&&($=$.replace("<p>[TOC]</p>",(0,ge.Qv)()),(0,ge.Iy)()),$=$.replace(/(__special_katext_id_\d+__)/g,(Ce,ke)=>{const{type:Le,expression:mt}=ue[ke];return(0,ee.renderToString)(ae(mt)||"",{displayMode:Le==="block",throwOnError:!1,output:"html"})}),$=$.replace(/▁/g,"\u2581\u2581\u2581\u2581\u2581"),(0,ge.AL)();const Ie=document.createElement("div");if(Ie.innerHTML=$,pe)return Ie.innerText;if(G){const Ce=G.replace(/[.*+?^${}()|[\]\\]/g,"\\$&");return T(Ie,Ce),Ie.innerHTML}return setTimeout(()=>te(),500),Ie.innerHTML},[Oe,G]);(0,P.useEffect)(()=>{J.current&&J.current.querySelectorAll(["input","textarea"]).forEach(ue=>{ue.oninput=Fe,ue.onblur=De,ue.onfocus=V})},[Se]),(0,P.useEffect)(()=>{var $,ue,Ie,Ce,ke;if(v!=null&&v.length)try{const Le=J.current.querySelectorAll(".edu-program-fill-score"),mt=J.current.querySelectorAll('[name="edu-program-fill"]');for(const[je,qe]of mt.entries())qe.value=(($=v==null?void 0:v[je])==null?void 0:$.value)||"",((ue=v==null?void 0:v[je])==null?void 0:ue.type)==="warning"?qe.className="program-fill-warning":((Ie=v==null?void 0:v[je])==null?void 0:Ie.type)==="success"?qe.className="program-fill-success":qe.className="";for(const[je,qe]of Le.entries())qe.innerHTML=(Ce=v==null?void 0:v[je])!=null&&Ce.score?`${(ke=v==null?void 0:v[je])==null?void 0:ke.score}\u5206`:"";Gt(v)}catch(Le){console.log(Le,"error")}},[v]);const Fe=$=>{Se[$.target.dataset.id]=Se[$.target.dataset.id]||{},Se[$.target.dataset.id].value=$.target.value,Gt([...Se]),Q(Se,$.target.dataset.id)},De=$=>{Se[$.target.dataset.id]=Se[$.target.dataset.id]||{},Se[$.target.dataset.id].value=$.target.value,Gt([...Se]),he(Se,$.target.dataset.id)},V=$=>{Se[$.target.dataset.id]=Se[$.target.dataset.id]||{},Se[$.target.dataset.id].value=$.target.value,Gt([...Se]),Ue(Se,$.target.dataset.id)};function T($,ue){return $.childNodes.forEach(Ie=>{var Ce;if(Ie.childNodes.length>0)T(Ie,ue);else if(Ie.nodeName!=="IMG")if(Ie.innerHTML)Ie.innerHTML=(Ce=Ie.innerHTML)==null?void 0:Ce.replace(new RegExp(ue,"gi"),'<span style="color:#0152d9;background-color:#1890ff33">$&</span>');else{const ke=document.createElement("span");ke.innerHTML=Ie.textContent.replace(new RegExp(ue,"gi"),'<span style="color:#0152d9;background-color:#1890ff33">$&</span>'),Ie.replaceWith(ke)}})}const J=(0,P.useRef)();ge.jb.WebkitLineClamp=W,W&&(M=D(D({},M),ge.jb));function ve($){let ue=$.target;if(ue.tagName.toUpperCase()==="A"){let Ie=ue.getAttribute("href");if(Ie.indexOf("office")>-1)$.preventDefault(),Et(Ie),Ut("office");else if(Ie.indexOf("application/pdf")>-1)$.preventDefault(),Et(Ie),Ut("pdf");else if(Ie.indexOf("text/html")>-1)$.preventDefault(),Et(Ie),Ut("html");else if(Ie.startsWith("#")){$.preventDefault();let Ce=document.getElementById(Ie.replace("#",""));Ce&&Ce.scrollIntoView(!0)}}}const te=()=>{var $;const ue=($=J.current)==null?void 0:$.querySelectorAll("video");ue==null||ue.forEach(Ie=>{if(Ie.oncontextmenu=()=>!1,Ie.src.indexOf(".m3u8")>-1&&!Ie.canPlayType("application/vnd.apple.mpegurl")){if(U.ZP.isSupported()){var Ce=new U.ZP;Ce.loadSource(Ie.src),Ce.attachMedia(Ie)}}})};return(0,P.useEffect)(()=>{if(J.current&&N&&N.match(q)&&window.PR.prettyPrint(),J.current)return J.current.addEventListener("click",ve),()=>{var $;($=J.current)==null||$.removeEventListener("click",ve),(0,ge.AL)(),(0,ge.Iy)()}},[N,J.current,ve]),(0,P.useEffect)(()=>{var $;const ue=Ie=>{Ie.preventDefault(),Ie.clipboardData.setData("text",window.getSelection().toString())};return($=J.current)==null||$.addEventListener("copy",ue),()=>{var Ie;(Ie=J.current)==null||Ie.removeEventListener("copy",ue)}},[J.current]),P.createElement(P.Fragment,null,pe&&P.createElement("div",{ref:J},N),!pe&&!dt(N)&&P.createElement("div",{ref:J,style:D({},M),className:`${de||""} ${m?"disabled-fill":""} markdown-body ${ht.current}`,dangerouslySetInnerHTML:{__html:N}}),!pe&&dt(N)&&P.createElement(p,{html:N}),P.createElement(E.Z,{close:!0,data:ft,type:ft!=null&&ft.length?Ft:"",style:D({},X),onClose:()=>Et("")}))}},75975:function(Cn,tt,b){"use strict";b.d(tt,{SV:function(){return Gt},ZP:function(){return Se}});var P=b(59301),re=b(76374);const ge={keywords:["print","auto","break","case","char","const","continue","default","do","double","else","enum","extern","float","for","goto","if","int","long","register","return","short","signed","sizeof","static","struct","switch","typedef","union","unsigned","void","volatile","while"]},se={quickKey:[{label:"main",content:["public static void main(String[] args) {"," $0","}"].join(`
`)},{label:"System.out.println",content:["System.out.println($0)"].join(`
`)},{label:"System.out.print",content:["System.out.print($0)"].join(`
`)}],keywords:["abstract","continue","for","new","switch","assert","default","goto","package","synchronized","boolean","do","if","private","this","break","double","implements","protected","throw","byte","else","import","public","throws","case","enum","instanceof","return","transient","catch","extends","int","short","try","char","final","interface","static","void","class","finally","long","strictfp","volatile","const","float","native","super","while","true","false"]},U={keywords:["abstract","amp","array","auto","bool","break","case","catch","char","class","const","constexpr","const_cast","continue","cpu","decltype","default","delegate","delete","do","double","dynamic_cast","each","else","enum","event","explicit","export","extern","false","final","finally","float","friend","gcnew","generic","goto","in","initonly","inline","int","interface","interior_ptr","internal","literal","long","mutable","namespace","new","noexcept","nullptr","__nullptr","operator","override","partial","pascal","pin_ptr","private","property","protected","public","ref","register","reinterpret_cast","restrict","return","safe_cast","sealed","short","signed","sizeof","static","static_assert","static_cast","struct","switch","template","this","thread_local","throw","tile_static","true","try","typedef","typeid","typename","union","unsigned","using","virtual","void","volatile","wchar_t","where","while","_asm","_based","_cdecl","_declspec","_fastcall","_if_exists","_if_not_exists","_inline","_multiple_inheritance","_pascal","_single_inheritance","_stdcall","_virtual_inheritance","_w64","__abstract","__alignof","__asm","__assume","__based","__box","__builtin_alignof","__cdecl","__clrcall","__declspec","__delegate","__event","__except","__fastcall","__finally","__forceinline","__gc","__hook","__identifier","__if_exists","__if_not_exists","__inline","__int128","__int16","__int32","__int64","__int8","__interface","__leave","__m128","__m128d","__m128i","__m256","__m256d","__m256i","__m64","__multiple_inheritance","__newslot","__nogc","__noop","__nounwind","__novtordisp","__pascal","__pin","__pragma","__property","__ptr32","__ptr64","__raise","__restrict","__resume","__sealed","__single_inheritance","__stdcall","__super","__thiscall","__try","__try_cast","__typeof","__unaligned","__unhook","__uuidof","__value","__virtual_inheritance","__w64","__wchar_t"],operators:["=",">","<","!","~","?",":","==","<=",">=","!=","&&","||","++","--","+","-","*","/","&","|","^","%","<<",">>",">>>","+=","-=","*=","/=","&=","|=","^=","%=","<<=",">>=",">>>="],quickKey:[{label:"ifelse",content:["if (${1:condition}) {"," $0","} else {"," ","}"].join(`
`)},{label:"include",content:"include<$0>"},{label:"printf",content:"printf($0)"},{label:"system",content:'system("$0")'},{label:"main",content:["int main () {"," $0","}"].join(`
`)},{label:"if",content:["if () {"," $0","}"].join(`
`)},{label:"for",content:["for(int j=0 ; j<10; j++){"," $0","}"].join(`
`)},{label:"trycatch",content:["try{"," $0","}catch(ExceptionName e){","}"].join(`
`)},{label:"using namespace std;",content:["using namespace std;"].join(`
`)},{label:"include <iostream>",content:["#include <iostream>"].join(`
`)},{label:"include <vector>",content:["#include <vector>"].join(`
`)},{label:"include <cstdio>",content:["#include <cstdio>"].join(`
`)},{label:"include <cstring>",content:["#include <cstring>"].join(`
`)},{label:"include <sstream>",content:["#include <sstream>"].join(`
`)},{label:"include <fstream>",content:["#include <fstream>"].join(`
`)},{label:"include <map>",content:["#include <map>"].join(`
`)},{label:"include <string>",content:["#include <string>"].join(`
`)},{label:"include <cmath>",content:["#include <cmath>"].join(`
`)}]},f={keywords:["and","as","assert","break","class","continue","def","del","elif","else","except","exec","finally","for","from","global","if","import","in","is","lambda","None","not","or","pass","raise","return","self","try","while","with","yield","int","float","long","complex","hex","abs","all","any","apply","basestring","bin","bool","buffer","bytearray","callable","chr","classmethod","cmp","coerce","compile","complex","delattr","dict","dir","divmod","enumerate","eval","execfile","file","filter","format","frozenset","getattr","globals","hasattr","hash","help","id","input","intern","isinstance","issubclass","iter","len","locals","list","map","max","memoryview","min","next","object","oct","open","ord","pow","print","property","reversed","range","raw_input","reduce","reload","repr","reversed","round","set","setattr","slice","sorted","staticmethod","str","sum","super","tuple","type","unichr","unicode","vars","xrange","zip","True","False","__dict__","__methods__","__members__","__class__","__bases__","__name__","__mro__","__subclasses__","__init__","__import__"],quickKey:[{label:"print",content:["print($0)"].join(`
`)}]},fe={keywords:["asInstanceOf","catch","class","classOf","def","do","else","extends","finally","for","foreach","forSome","if","import","isInstanceOf","macro","match","new","object","package","return","throw","trait","try","type","until","val","var","while","with","yield","given","enum","then"],quickKey:[{label:"println",content:["println($0)"].join(`
`)}]};var ee=b(53184),A=b.n(ee),E=(ht,tn,dt)=>new Promise((Je,xe)=>{var _e=De=>{try{Fe(dt.next(De))}catch(V){xe(V)}},N=De=>{try{Fe(dt.throw(De))}catch(V){xe(V)}},Fe=De=>De.done?Je(De.value):Promise.resolve(De.value).then(_e,N);Fe((dt=dt.apply(ht,tn)).next())});const x={languages:["c","abap","apex","azcli","bat","cameligo","clojure","coffee","cpp","csharp","csp","css","dockerfile","fsharp","go","graphql","handlebars","html","ini","java","javascript","json","kotlin","less","lua","markdown","mips","msdax","mysql","objective-c","pascal","pascaligo","perl","pgsql","php","postiats","powerquery","powershell","pug","python","r","razor","redis","redshift","restructuredtext","ruby","rust","sb","scheme","scss","shell","solidity","sophia","sql","st","swift","tcl","twig","vb","xml","yaml'"],tables:{users:["name","id","email","phone","password"],roles:["id","name","order","created_at","updated_at","deleted_at"]}},h=(ht,tn,dt,Je)=>{const xe=tn.getValueInRange({startLineNumber:1,startColumn:1,endLineNumber:dt.lineNumber,endColumn:dt.column});return Array.from(new Set(xe.match(/\b\w{2,}\b/g)||[])).map(N=>({label:N,kind:ht.languages.CompletionItemKind.Text,insertText:N,range:Je}))},p=(ht,tn,dt,Je)=>{ht.languages.registerCompletionItemProvider(tn,{provideCompletionItems(xe,_e){const N=xe.getWordUntilPosition(_e),Fe={startLineNumber:_e.lineNumber,endLineNumber:_e.lineNumber,startColumn:N.startColumn,endColumn:N.endColumn},De=xe.getLineContent(_e.lineNumber).substring(N.startColumn-2,N.endColumn);return{suggestions:[...h(ht,xe,_e,Fe),...dt.map(T=>({label:T,kind:ht.languages.CompletionItemKind.Keyword,documentation:T,insertText:T,insertTextRules:ht.languages.CompletionItemInsertTextRule.InsertAsSnippet,range:Fe})),...Je.map(T=>({label:T.label,kind:ht.languages.CompletionItemKind.Snippet,documentation:T.content,insertText:De.startsWith("#")?T.content.replace(/#/,""):T.content,insertTextRules:ht.languages.CompletionItemInsertTextRule.InsertAsSnippet,range:Fe}))]}}})};var _=ht=>{x.languages.forEach(tn=>{ht.languages.registerDocumentFormattingEditProvider(tn,{provideDocumentFormattingEdits(dt){return E(this,null,function*(){const Je=A()(dt.getValue(),{indent_size:2,indent_char:" ",max_preserve_newlines:2,preserve_newlines:!0,keep_array_indentation:!0,break_chained_methods:!1,indent_scripts:"normal",brace_style:"collapse",space_before_conditional:!0,unescape_strings:!1,jslint_happy:!1,end_with_newline:!0,wrap_line_length:0,indent_inner_html:!1,comma_first:!1,e4x:!1,indent_empty_lines:!1});return[{range:dt.getFullModelRange(),text:Je}]})}})}),p(ht,"java",se.keywords,se.quickKey),p(ht,"cpp",U.keywords,U.quickKey),p(ht,"c",ge.keywords,[]),p(ht,"python",f.keywords,f.quickKey),p(ht,"scala",fe.keywords,fe.quickKey)};const C="\u8BE5\u4EFB\u52A1\u5173\u5361\u8BBE\u7F6E\u4E86\u7981\u6B62\u590D\u5236\u7C98\u8D34\uFF0C\u8BF7\u624B\u52A8\u8F93\u5165\u4EE3\u7801\u3002";var F=Object.defineProperty,R=(ht,tn,dt)=>tn in ht?F(ht,tn,{enumerable:!0,configurable:!0,writable:!0,value:dt}):ht[tn]=dt,K=(ht,tn,dt)=>R(ht,typeof tn!="symbol"?tn+"":tn,dt);const B=class rc{constructor(tn,dt,Je){this.placeholder=tn,this.editor=dt,this.monaco=Je,dt.onDidChangeModelContent(()=>this.onDidChangeModelContent()),this.onDidChangeModelContent()}onDidChangeModelContent(){this.editor.getValue()===""?this.editor.addContentWidget(this):this.editor.removeContentWidget(this)}getId(){return rc.ID}getDomNode(){return this.domNode||(this.domNode=document.createElement("div"),this.domNode.style.width="max-content",this.domNode.textContent=this.placeholder,this.domNode.style.fontStyle="initial",this.domNode.style.color="#D7D7D7",this.domNode.style.pointerEvents="none",this.editor.applyFontInfo(this.domNode)),this.domNode}getPosition(){return{position:{lineNumber:1,column:1},preference:[this.monaco.editor.ContentWidgetPositionPreference.EXACT]}}dispose(){this.editor.removeContentWidget(this)}};K(B,"ID","editor.widget.placeholderHint");var I=B,S=b(96236),q=b(6767),ae=b(25399),j=b(89392),Y=b(49535),ie=b(56102),de=Object.defineProperty,pe=Object.defineProperties,W=Object.getOwnPropertyDescriptors,M=Object.getOwnPropertySymbols,X=Object.prototype.hasOwnProperty,G=Object.prototype.propertyIsEnumerable,ne=(ht,tn,dt)=>tn in ht?de(ht,tn,{enumerable:!0,configurable:!0,writable:!0,value:dt}):ht[tn]=dt,Z=(ht,tn)=>{for(var dt in tn||(tn={}))X.call(tn,dt)&&ne(ht,dt,tn[dt]);if(M)for(var dt of M(tn))G.call(tn,dt)&&ne(ht,dt,tn[dt]);return ht},m=(ht,tn)=>pe(ht,W(tn)),v=(ht,tn)=>{var dt={};for(var Je in ht)X.call(ht,Je)&&tn.indexOf(Je)<0&&(dt[Je]=ht[Je]);if(ht!=null&&M)for(var Je of M(ht))tn.indexOf(Je)<0&&G.call(ht,Je)&&(dt[Je]=ht[Je]);return dt},Q=(ht,tn,dt)=>new Promise((Je,xe)=>{var _e=De=>{try{Fe(dt.next(De))}catch(V){xe(V)}},N=De=>{try{Fe(dt.throw(De))}catch(V){xe(V)}},Fe=De=>De.done?Je(De.value):Promise.resolve(De.value).then(_e,N);Fe((dt=dt.apply(ht,tn)).next())});function he(ht){return/^\d+$/.test(ht)?`${ht}px`:ht}function Ue(){}let Oe=!1;const ft={"Python3.6":"python","Python2.7":"python",Dynamips:"cpp",Java:"java",Web:"php",Html:"html",Hive:"sql",Hadoop:"java",SDL:"cpp",PHP:"php",Matlab:"python",Git:"python",Python:"python","C/C++":"cpp","C++":"cpp",C:"cpp",Ruby:"ruby",Shell:"shell",JavaScript:"javascript",Perl6:"perl",Kotlin:"kotlin",Elixir:"elixir",Android:"java",JavaWeb:"java",Go:"go",Spark:"sql",MachineLearning:"python",Verilog:"xml","Verilog/VNC":"xml",Docker:"dockerfile","C#":"csharp",SQLite3:"sql",Oracle:"sql",Vhdl:"vhdl",R:"r",Swift:"swift",SQLServer:"mysql",MySQL:"mysql",Mongo:"sql",PostgreSql:"pgsql",Hbase:"powershell",Sqoop:"sql",Nasm:"cpp",Kafka:"java",Flink:"java",Sml:"javascript",OpenGL:"cpp",Perl5:"perl",Orange:"python",Scala:"scale",solidity:"sol"};function Et(ht=[]){let tn=ht;if(Array.isArray(ht)){for(let dt=0;dt<ht.length;dt++){let Je=ft[ht[dt]];if(Je)return Je}return tn[0]}return ft[tn]||tn}let Ft=null;const Ut=()=>Q(void 0,null,function*(){try{yield navigator.clipboard.writeText(" "),console.log("\u5185\u5BB9\u5DF2\u81EA\u52A8\u590D\u5236\u5230\u526A\u8D34\u677F:")}catch(ht){console.error("\u81EA\u52A8\u590D\u5236\u5931\u8D25:",ht)}});var Se=ht=>{var tn=ht,{width:dt="100%",height:Je="100%",value:xe,language:_e="javascript",style:N={},options:Fe={},overrideServices:De={},theme:V="vs-dark",onEditBlur:T,isCopy:J=!1,onSave:ve,autoHeight:te=!1,forbidCopy:$=!1,onChange:ue=Ue,editorDidMount:Ie=Ue,onFocus:Ce=Ue,onBreakPoint:ke=Ue,breakPointValue:Le=[],filename:mt="educoder.txt",errorLine:je,errorContent:qe="",highlightLine:ut,openBreakPoint:Nt=!1,placeholder:It="",showMiniMap:bt=!0}=tn,on=v(tn,["width","height","value","language","style","options","overrideServices","theme","onEditBlur","isCopy","onSave","autoHeight","forbidCopy","onChange","editorDidMount","onFocus","onBreakPoint","breakPointValue","filename","errorLine","errorContent","highlightLine","openBreakPoint","placeholder","showMiniMap"]);const rn=(0,P.useRef)(),Ct=(0,P.useRef)({}),gn=(0,P.useRef)(),Ln=(0,P.useRef)(),Mt=(0,P.useRef)([]),hn=(0,P.useRef)(!1),We=(0,P.useRef)(),Qe=(0,P.useRef)(),He=(0,P.useRef)(!1),[z,le]=(0,P.useState)(!1);function me(){let sn;return rn.current&&(sn=new re.Z(Kt=>{for(let yn of Kt)(yn.target.offsetHeight>0||yn.target.offsetWidth>0)&&Ct.current.instance.layout()}),sn.observe(rn.current)),sn}function Be(){q.ZP.warning({content:decodeURIComponent(C),key:"monaco-editor-tip"})}const be=()=>{let sn=Ct.current.instance;if(xe!=null&&sn&&z){const Kt=sn.getModel();Kt&&xe!==Kt.getValue()&&(Oe=!0,Kt.setValue(xe),sn.layout(),Oe=!1)}};(0,P.useEffect)(()=>{const sn=Y.Z.subscribe("formatDocument",Kt=>{var yn;let Yn=Ct.current.instance;(yn=Yn==null?void 0:Yn.getAction)==null||yn.call(Yn,"editor.action.formatDocument").run()});return window.updateMonacoValue=Kt=>{ue(Kt)},sn},[]),(0,P.useEffect)(()=>{var sn;let Kt=Ct.current.instance;Ln.current&&clearTimeout(Ln.current),Ln.current=setTimeout(()=>{be()},500),xe&&(xe!=null&&xe.length)&&((sn=Kt==null?void 0:Kt.updateOptions)==null||sn.call(Kt,{lineNumbersMinChars:Math.max(Math.floor(Math.log10(xe.split(/\r\n|\r|\n/g).length))+3,5)}))},[xe,z,Ct.current]),(0,P.useEffect)(()=>{if(je&&Ct.current&&Ct.current.instance){let Kt=Ct.current.instance;Kt.changeViewZones(function(yn){var Yn=document.createElement("div");Yn.style.padding="10px 20px",Yn.style.width="calc(100% - 20px)",Yn.className="my-error-line-wrp",Yn.innerHTML=qe,yn.addZone({afterLineNumber:je||11,heightInLines:3,domNode:Yn})});var sn={domNode:null,getId:function(){return"my.overlay.widget"},getDomNode:function(){return this.domNode||(this.domNode=document.createElement("div"),this.domNode.innerHTML="",this.domNode.style.width="100%",this.domNode.style.padding="20px 100px",this.domNode.style.right="0px",this.domNode.style.top="50px",this.domNode.style.position="relative",this.domNode.style.color="#333"),this.domNode},getPosition:function(){return null}};Kt.addOverlayWidget(sn),Kt.revealPositionInCenter({lineNumber:20,column:1})}},[je,Ct.current,z]);const Tt=(sn="",Kt)=>{if(!sn||sn.trim()==="")return!0;const Yn=Ct.current.instance.getModel().getLineTokens(Kt);let or=!1;for(let Ke=0;Ke<2;Ke++)Yn.getStandardTokenType(Ke)===1&&(or=!0);return or};(0,P.useEffect)(()=>{var sn;const Kt=(sn=Ct.current)==null?void 0:sn.instance;if(Kt&&z&&$){const yn=Kt.onDidBlurEditorWidget(()=>{He.current=!1}),Yn=Kt.onDidFocusEditorText(()=>{He.current=!0});return()=>{yn.dispose(),Yn.dispose()}}},[Ct.current,z,$]),(0,P.useEffect)(()=>{var sn;if((sn=Ct.current)!=null&&sn.instance&&z&&Nt){let Kt=Ct.current.instance,yn=Kt.getModel();if(!yn)return;(()=>{var Ot;let cn=[],un=[];const lt=yn.getAllDecorations();for(let Re of lt)Re.options.className==="highlighted-line"&&(cn.push((Ot=Re==null?void 0:Re.range)==null?void 0:Ot.startLineNumber),un.push(Re==null?void 0:Re.id));if(ut===cn[0])return;yn.deltaDecorations(un,[]);const Pt=yn.getLineCount();ut&&ut<=Pt&&(Kt.deltaDecorations([],[{range:new Ft.Range(ut,1,ut,yn.getLineMaxColumn(ut)),options:{isWholeLine:!0,className:"highlighted-line"}}]),Kt.revealLineInCenter(ut))})();const or=(Ot=!1)=>{var cn;let un=[],lt=[];const Pt=yn.getAllDecorations();for(let Re of Pt)Re.options.linesDecorationsClassName==="breakpoints-select"&&(un.push((cn=Re==null?void 0:Re.range)==null?void 0:cn.startLineNumber),lt.push(Re==null?void 0:Re.id));if(Ot)return{lines:un,ids:lt};ke(un)},Ke=Ot=>Q(void 0,null,function*(){let cn={range:new Ft.Range(Ot,1,Ot,1),options:{isWholeLine:!1,linesDecorationsClassName:"breakpoints-select"}};yield yn.deltaDecorations([],[cn]),or()}),Pe=Ot=>Q(void 0,null,function*(){let cn=[];const un=Kt.getLineDecorations(Ot);for(let lt of un)lt.options.linesDecorationsClassName==="breakpoints-select"&&cn.push(lt.id);yield yn.deltaDecorations(cn,[]),or()}),Yt=Ot=>{let cn=Kt.getLineDecorations(Ot);for(let un of cn)if(un.options.linesDecorationsClassName==="breakpoints-select")return!0;return!1};if(!(0,j.isEqual)(Le,or(!0).lines)){yn.deltaDecorations(or(!0).ids,[]);const Ot=Le.map(cn=>({range:new Ft.Range(cn,1,cn,1),options:{isWholeLine:!1,linesDecorationsClassName:"breakpoints-select"}}));yn.deltaDecorations([],Ot)}const Lt=Kt.onDidChangeModelContent(Ot=>{let cn=Kt.getPosition();if(cn){let un=cn.lineNumber;clearTimeout(Qe.current),Qe.current=setTimeout(()=>{Tt(yn.getLineContent(un),un)?Pe(un):Yt(un)?(Pe(un),Ke(un)):or()},100)}}),qt=Kt.onMouseDown(Ot=>{var cn,un,lt;if(Ot.target.detail&&((lt=(un=(cn=Ot.target)==null?void 0:cn.element)==null?void 0:un.className)!=null&&lt.includes("line-numbers"))){let Pt=Ot.target.position.lineNumber;if(Tt(yn.getLineContent(Pt),Pt))return;Yt(Pt)?Pe(Pt):Ke(Pt)}}),nn=Ot=>{let cn={range:new Ft.Range(Ot,1,Ot,1),options:{isWholeLine:!1,linesDecorationsClassName:"breakpoints-fake"}};Mt.current=Kt.deltaDecorations(Mt.current,[cn])},Xt=()=>{Mt.current=Kt.deltaDecorations(Mt.current,[])},zt=Kt.onMouseMove(Ot=>{var cn,un,lt;if(Xt(),Ot.target.detail&&((lt=(un=(cn=Ot.target)==null?void 0:cn.element)==null?void 0:un.className)!=null&&lt.includes("line-numbers"))){let Pt=Ot.target.position.lineNumber;if(Tt(yn.getLineContent(Pt),Pt))return;nn(Pt)}}),pn=Kt.onMouseLeave(()=>{Xt()});return()=>{Lt.dispose(),qt.dispose(),zt.dispose(),pn.dispose()}}},[Ct.current,z,Le,ut,Nt,_e]),(0,P.useEffect)(()=>{var sn;(sn=Ct.current)!=null&&sn.instance&&Nt&&Ct.current.instance.setPosition({lineNumber:0,column:0})},[ut]);function Wt(){let sn=Ct.current.instance;if(sn){const Kt=sn.getSelection(),yn=Ct.current.pastePos||{},Yn=new Ft.Range(yn.startLineNumber||Kt.endLineNumber,yn.startColumn||Kt.endColumn,yn.endLineNumber||Kt.endLineNumber,yn.endColumn||Kt.endColumn);setTimeout(()=>{sn.executeEdits("",[{range:Yn,text:""}])},300)}}function an(sn){(window.navigator.platform.match("Mac")?sn.metaKey:sn.ctrlKey)&&sn.keyCode==83&&(sn.preventDefault(),ve())}const _n=()=>{if(te&&Ct.current.instance){const sn=Ct.current.instance.getContentHeight();tr(sn<Je?Je:sn)}else tr(Je)};function Wn(sn){var Kt=document.createEvent("MouseEvents");Kt.initMouseEvent("click",!0,!1,window,0,0,0,0,0,!1,!1,!1,!1,0,null),sn.dispatchEvent(Kt)}const zn=sn=>{if(!He.current)return;const{keyCode:Kt,ctrlKey:yn,metaKey:Yn,target:or,type:Ke}=sn;return(Ke==="paste"||(Kt===67||Kt===86)&&(Yn||yn))&&or.nodeName==="TEXTAREA"&&(Be(),sn.preventDefault()),!1};function On(sn,Kt){var yn=window.URL||window.webkitURL||window,Yn=new Blob([Kt]),or=document.createElementNS("http://www.w3.org/1999/xhtml","a");or.href=yn.createObjectURL(Yn),or.download=sn,Wn(or)}(0,P.useEffect)(()=>{_n()},[_n]),(0,P.useEffect)(()=>{rn.current&&!z&&Promise.all([b.e(8909),b.e(6656)]).then(b.bind(b,71448)).then(sn=>{try{Ft=sn,Ct.current.instance=Ft.editor.create(rn.current,{value:xe,language:Et(_e),theme:V,requireConfig:{"vs/nls":{availableLanguages:{"*":"zh-cn"}}},wordWrap:!0,autoIndent:!0,contextmenu:!0,formatOnType:!0,minimap:{enabled:bt||!1}},De);const Kt=Ct.current.instance;let or=[...S.BH._menuItems].find(Lt=>Lt[0]._debugName=="EditorContext")[1],Ke=["editor.action.clipboardCopyWithSyntaxHighlightingAction","editor.action.quickCommand","editor.action.clipboardCopyAction","editor.action.clipboardPasteAction","editor.action.clipboardCutAction"],Pe=(Lt,qt)=>{var nn,Xt;let zt=Lt._first;do qt.includes((Xt=(nn=zt.element)==null?void 0:nn.command)==null?void 0:Xt.id)&&Lt._remove(zt);while(zt=zt.next)};if(Ie(Kt,Ft),setTimeout(()=>{_n(),Ct.current.instance.addAction({id:"d123123",label:"Download File",contextMenuGroupId:"9_cutcopypaste",run:()=>{On(mt||"educoder.txt",Kt.getValue())}})},500),Ct.current.subscription=Kt.onDidChangeModelContent(Lt=>{hn.current?clearTimeout(We.current):(_n(),ue(Kt.getValue(),Lt)),We.current=setTimeout(()=>{hn.current=!1},500)}),window.Monaco||_(Ft,Et(_e)),$&&(Pe(or,Ke),rn.current.classList.add("noCopyPaste"),window.removeEventListener("keydown",zn),window.removeEventListener("paste",zn),window.addEventListener("keydown",zn),window.addEventListener("paste",zn)),window.Monaco=Ft,T&&Kt.onDidBlurEditorWidget(()=>{T(Kt.getValue())}),Ce&&Kt.onDidFocusEditorText(()=>{$&&Ut(),Ce(Kt.getValue())}),$){Ut();try{Kt.onDidPaste(Lt=>{const qt=Kt.getSelection(),nn=Ct.current.pastePos||{},Xt=new Ft.Range(nn.startLineNumber||qt.endLineNumber,nn.startColumn||qt.endColumn,nn.endLineNumber||qt.endLineNumber,nn.endColumn||qt.endColumn);Kt.executeEdits("",[{range:Lt.range,text:""}])})}catch(Lt){}}let Yt=me();return It&&typeof It=="string"&&new I(It,Kt,Ft),le(!0),()=>{const Lt=Ct.current.instance;Lt.dispose();const qt=Lt.getModel();qt&&qt.dispose(),Ct.current.subscription&&Ct.current.subscription.dispose(),Yt.unobserve(rn.current)}}catch(Kt){}})},[]),(0,P.useEffect)(()=>{if(Ct.current.instance&&z)return document.addEventListener("keydown",an,!1),()=>{document.removeEventListener("keydown",an)}},[ve,z]),(0,P.useEffect)(()=>{let sn=Ct.current.instance;if(sn&&z){let Kt=Et(_e);Ft.editor.setModelLanguage(sn.getModel(),Kt)}},[_e,z]),(0,P.useEffect)(()=>{Ct.current.instance&&z&&Ft.editor.setTheme(V)},[V,z]),(0,P.useEffect)(()=>{let sn=Ct.current.instance;gn.current=Fe,sn&&z&&(sn.updateOptions(Z({},Fe)),setTimeout(()=>{sn.getModel().updateOptions(Z({},Fe))},200))},[JSON.stringify(Fe),z]),(0,P.useEffect)(()=>{let sn=Ct.current.instance;sn&&z&&sn.layout()},[dt,Je,z]);const[Un,ar]=(0,P.useState)(he(dt)),[mr,tr]=(0,P.useState)(he(Je)),gr=m(Z({},N),{width:Un,height:mr,position:"relative"});return P.createElement("div",{className:"my-monaco-editor",ref:rn,style:gr},J&&P.createElement(ie.CopyToClipboard,{text:xe,onCopy:()=>q.ZP.success("\u590D\u5236\u6210\u529F")},P.createElement(ae.Z,{title:"\u590D\u5236\u4EE3\u7801"},P.createElement("div",{style:{position:"absolute",top:0,right:10,cursor:"pointer",zIndex:10,color:"#165DFF"}},P.createElement("i",{className:"iconfont icon-fuzhi8",style:{fontSize:14}})," \u590D\u5236\u4EE3\u7801"))))};function Gt({width:ht="100%",height:tn="100%",original:dt,modified:Je,language:xe,options:_e={}}){const N=(0,P.useRef)(),[Fe,De]=(0,P.useState)(null);function V(te){let $;return N.current&&($=new re.Z(ue=>{for(let Ie of ue)(Ie.target.offsetHeight>0||Ie.target.offsetWidth>0)&&te.layout()}),$.observe(N.current)),$}(0,P.useEffect)(()=>(N.current&&Promise.all([b.e(8909),b.e(9404)]).then(b.bind(b,2550)).then(te=>{Ft=te;const $=Ft.editor.createDiffEditor(N.current,m(Z({enableSplitViewResizing:!1,scrollBeyondLastLine:!1,roundedSelection:!1,renderIndicators:!1,useShadows:!1,horizontal:"hidden",lineNumbers:"off",wordWrap:"off",ignoreTrimWhitespace:!1,"semanticHighlighting.enabled":!0,followsCaret:!0,ignoreCharChanges:!0,minimap:{enabled:!1},readOnly:!0},_e),{wordWrap:!0}));De($);let ue=V($);return()=>{$.dispose();const Ie=$.getModel();Ie&&Ie.dispose(),ue.unobserve(N.current)}}),()=>{window.removeEventListener("keydown",checkPaste),window.removeEventListener("paste",checkPaste)}),[]),(0,P.useEffect)(()=>{Fe&&Fe.setModel({original:Ft.editor.createModel(dt,xe),modified:Ft.editor.createModel(Je,xe)})},[dt,Je,xe,Fe]);const T=he(ht),J=he(tn),ve={width:T,height:J};return P.createElement("div",{className:"my-diff-editor",ref:N,style:ve})}},80119:function(Cn,tt,b){"use strict";b.d(tt,{H:function(){return fe}});var P=b(59301),re=b(28284),ge=b(37568),se=b(42441),U=b(76902);const f=({form:ee,index:A=1,field:E,ParentName:x=[]})=>{(typeof x=="string"||typeof x=="number")&&(x=[x]);const h=re.default.useWatch([...x,E.name,"chart_1"],{form:ee}),p=re.default.useWatch([...x,E.name,"chart_2"],{form:ee}),_=re.default.useWatch([...x,E.name,"name"],{form:ee}),C=re.default.useWatch([...x,E.name,"question_type"],{form:ee}),F=(0,P.useMemo)(()=>{const K=[],B=[];return h==null||h.forEach(D=>{K.push(D==null?void 0:D.x_axis),B.push(D==null?void 0:D.y_axis)}),{tooltip:{},grid:{left:"7%",right:"5%",bottom:"15%",top:"15%",containLabel:!0},xAxis:{type:"category",data:[...K||[],[4,5,6,7,8].includes(C)?"\u5206\u6570\u533A\u95F4":"\u7B54\u5BF9\u9898\u6570\uFF08\u5355\u4F4D\uFF1A\u9898\uFF09"],axisTick:{show:!1},axisLine:{lineStyle:{color:"#EBEBEB"}},axisLabel:{color:"#666666",interval:0}},yAxis:{name:"\u4EBA\u6570\uFF08\u5355\u4F4D\uFF1A\u4EBA\uFF09",nameTextStyle:{color:"#666",padding:[0,0,10,0]},type:"value",splitLine:{show:!1},axisLine:{show:!0,lineStyle:{color:"#EBEBEB"}},axisLabel:{color:"#666666"}},series:[{data:B,barMaxWidth:"40px",itemStyle:{color:"#A2BEFF",borderColor:"#165DFF"},type:"bar"}]}},[h]),R=(0,P.useMemo)(()=>{const K=[],B=[];return p==null||p.forEach(D=>{K.push(D==null?void 0:D.x_axis),B.push(Math.round((D==null?void 0:D.y_axis)*1e4)/100)}),{tooltip:{},grid:{left:"5%",right:"5%",bottom:"7%",containLabel:!0},xAxis:{type:"category",data:[...K||[],"\u9898\u76EE"],axisTick:{show:!1},axisLine:{lineStyle:{color:"#EBEBEB"}},axisLabel:{color:"#666666",interval:0,formatter:(D,I)=>D!=="\u9898\u76EE"?`${I+1}
{subtext|${(D.length>6?D==null?void 0:D.slice(0,6):D).split("").join(`
`)}}`:D,rich:{subtext:{align:"center",color:"#666",lineHeight:15}}}},yAxis:{name:"\u5E73\u5747\u5F97\u5206",nameTextStyle:{color:"#666",padding:[0,0,10,0]},type:"value",splitLine:{show:!1},axisLine:{show:!0,lineStyle:{color:"#EBEBEB"}},axisLabel:{color:"#666666"}},series:[{data:B,barMaxWidth:"40px",itemStyle:{color:"#2EC25B"},type:"bar",label:{color:"#666",show:!0,position:"top",valueAnimation:!0,formatter:"{c}%"}}]}},[p]);return P.createElement(P.Fragment,null,P.createElement("div",{className:"text-500 font14 mb10"},A,".",_),P.createElement(re.default.Item,{name:[E.name,"content"]},P.createElement(ge.default.TextArea,{rows:3})),P.createElement("div",{className:"mt20"},P.createElement("div",{className:"font14 mb10"},"\u5B66\u5458\u7B54\u9898\u60C5\u51B5"),P.createElement(se.Z,{className:"bg-white",style:{border:"1px solid #EBEBEB"},option:F})),P.createElement("div",{className:"mt20"},P.createElement("div",{className:"font14 mb10"},"\u5404\u5C0F\u9898\u7B54\u9898\u60C5\u51B5"),P.createElement(se.Z,{className:"bg-white",style:{border:"1px solid #EBEBEB",height:331},option:R})))};tt.Z=P.memo(f);const fe=P.memo(({form:ee,index:A=1,data:E})=>{const x=(0,P.useMemo)(()=>{var p;const _=[],C=[];return(p=E==null?void 0:E.chart_1)==null||p.forEach(F=>{_.push(F==null?void 0:F.x_axis),C.push(F==null?void 0:F.y_axis)}),{tooltip:{},grid:{left:"5%",right:"5%",bottom:"15%",top:"20%",containLabel:!0},xAxis:{type:"category",data:[..._||[],[4,5,6,7,8].includes(E==null?void 0:E.question_type)?"\u5206\u6570\u533A\u95F4":"\u7B54\u5BF9\u9898\u6570\uFF08\u5355\u4F4D\uFF1A\u9898\uFF09"],axisTick:{show:!1},axisLine:{lineStyle:{color:"#EBEBEB"}},axisLabel:{color:"#666666",interval:0}},yAxis:{name:"\u4EBA\u6570\uFF08\u5355\u4F4D\uFF1A\u4EBA\uFF09",nameTextStyle:{color:"#666",padding:[0,0,10,0]},type:"value",splitLine:{show:!1},axisLine:{show:!0,lineStyle:{color:"#EBEBEB"}},axisLabel:{color:"#666666"}},series:[{data:C,barMaxWidth:"40px",itemStyle:{color:"#A2BEFF",borderColor:"#165DFF"},type:"bar"}]}},[E==null?void 0:E.chart_1]),h=(0,P.useMemo)(()=>{var p;const _=[],C=[];return(p=E==null?void 0:E.chart_2)==null||p.forEach(F=>{_.push(F==null?void 0:F.x_axis),C.push(Math.round((F==null?void 0:F.y_axis)*1e4)/100)}),{tooltip:{},grid:{left:"5%",right:"5%",bottom:"7%",containLabel:!0},xAxis:{type:"category",data:[..._||[],"\u9898\u76EE"],axisTick:{show:!1},axisLine:{lineStyle:{color:"#EBEBEB"}},axisLabel:{color:"#666666",interval:0,formatter:(F,R)=>F!=="\u9898\u76EE"?`${R+1}
{subtext|${(F.length>6?F==null?void 0:F.slice(0,6):F).split("").join(`
`)}}`:F,rich:{subtext:{align:"center",color:"#666",lineHeight:15}}}},yAxis:{name:"\u5E73\u5747\u5F97\u5206",nameTextStyle:{color:"#666",padding:[0,0,10,0]},type:"value",splitLine:{show:!1},axisLine:{show:!0,lineStyle:{color:"#EBEBEB"}},axisLabel:{color:"#666666"}},series:[{data:C,barMaxWidth:"40px",itemStyle:{color:"#2EC25B"},type:"bar",label:{color:"#666",show:!0,position:"top",valueAnimation:!0,formatter:"{c}%"}}]}},[E==null?void 0:E.chart_2]);return P.createElement("div",{className:"text-start pl10 pr10"},P.createElement("div",{className:"text-500 font14 mb10 c-black"},A,".",E==null?void 0:E.name),P.createElement("div",null,P.createElement(U.Z,{className:"font14 c-grey-333",value:E==null?void 0:E.content})),P.createElement("div",{className:"mt20"},P.createElement(se.Z,{className:"bg-white",style:{background:"#F6F7F9"},option:x}),P.createElement("div",{className:"font14 mt10 text-center"},"\u56FE",A*2-1,"\xA0\xA0",E==null?void 0:E.name,"\u7B54\u9898\u5F97\u5206\u60C5\u51B5\u5206\u5E03")),P.createElement("div",{className:"mt20"},P.createElement(se.Z,{className:"bg-white",style:{background:"#F6F7F9",height:331},option:h}),P.createElement("div",{className:"font14 mt10 text-center"},"\u56FE",A*2,"\xA0\xA0",E==null?void 0:E.name,"\u5404\u5C0F\u9898\u5F97\u5206\u7387")))})},46799:function(Cn,tt,b){"use strict";var P=b(45677),re=b(81722),ge=b(45937),se=b(28284),U=b(62957),f=b(99571),fe=b(29787),ee=b(62673),A=b(47889),E=b(77736),x=b(59301),h=b(25690),p=b(346),_=b(59301),C=(R,K,B)=>new Promise((D,I)=>{var S=j=>{try{ae(B.next(j))}catch(Y){I(Y)}},q=j=>{try{ae(B.throw(j))}catch(Y){I(Y)}},ae=j=>j.done?D(j.value):Promise.resolve(j.value).then(S,q);ae((B=B.apply(R,K)).next())});const F=({exercise:R,dispatch:K})=>{var B,D,I,S;const q=(0,h.useParams)(),[ae]=(0,h.useSearchParams)(),j=ae.getAll("exercise_group_id").map(Oe=>Oe==="all"?Oe:Number(Oe)),{actionTabs:Y}=R,[ie]=se.default.useForm(),[de,pe]=(0,x.useState)(!1),W=(0,x.useRef)(null),[M,X]=(0,x.useState)(!1),[,G,ne,Z]=(0,ge.U)(re.aU,{}),[m,v]=(0,x.useState)({}),Q=()=>{K({type:"exercise/setActionTabs",payload:{title:""}})},he=(Oe,ft)=>{h.history.push(`/classrooms/${q.coursesId}/exercise/${(q==null?void 0:q.categoryId)||(q==null?void 0:q.exerciseId)}/sumup?exam_summary_id=${(ft==null?void 0:ft.exam_summary_id)||""}&template=${Oe==null?void 0:Oe.exam_summary_template_id}&${Oe==null?void 0:Oe.exercise_group_id.map(Et=>`exercise_group_id=${Et}`).join("&")}`)},Ue=()=>C(void 0,null,function*(){var Oe,ft,Et,Ft,Ut;const Se=yield ne({id:(q==null?void 0:q.categoryId)||(q==null?void 0:q.exerciseId)});ie.setFieldsValue({exercise_group_id:Y!=null&&Y.isEdit&&j.length>0?j:["all",...((ft=(Oe=Se==null?void 0:Se.data)==null?void 0:Oe.course_groups)==null?void 0:ft.map(Gt=>Gt==null?void 0:Gt.exercise_group_id))||[]],exam_summary_template_id:Y!=null&&Y.isEdit?Number(ae.get("template")):(Ut=(Ft=(Et=Se==null?void 0:Se.data)==null?void 0:Et.exam_summary_templates)==null?void 0:Ft[0])==null?void 0:Ut.id})});return(0,x.useEffect)(()=>{W.current&&W.current.scrollHeight>134&&X(!0)},[W]),(0,x.useEffect)(()=>{(Y==null?void 0:Y.title)==="\u8003\u8BD5\u603B\u7ED3\u8BBE\u7F6E"?Ue():ie.resetFields()},[Y==null?void 0:Y.title]),_.createElement(_.Fragment,null,_.createElement(U.default,{title:Y.title,width:800,centered:!0,open:(Y==null?void 0:Y.title)==="\u8003\u8BD5\u603B\u7ED3\u8BBE\u7F6E",footer:_.createElement("div",{style:{textAlign:"center"}},_.createElement(f.ZP,{type:"primary",onClick:()=>{ie.submit()}},"\u603B\u7ED3\u62A5\u544A\u9884\u89C8")),onCancel:()=>{Q()}},_.createElement(fe.Z,{spinning:G},_.createElement(se.default,{form:ie,onFinish:Oe=>C(void 0,null,function*(){var ft,Et;const Ft=(Et=(ft=Z==null?void 0:Z.data)==null?void 0:ft.exam_summaries)==null?void 0:Et.find(Ut=>(Ut==null?void 0:Ut.exam_summary_template_id)===Oe.exam_summary_template_id);if(Ft!=null&&Ft.exam_summary_id){const Ut=U.default.confirm({title:"\u63D0\u793A",icon:null,centered:!0,closeIcon:_.createElement("i",{className:"iconfont icon-guanbi1 current",style:{fontSize:"10px"},onClick:Se=>{Se.preventDefault(),Se.stopPropagation(),Ut.destroy()}}),closable:!0,content:"\u7CFB\u7EDF\u68C0\u6D4B\u5230\u60A8\u6709\u4E00\u4EFD\u5DF2\u751F\u6210\u7684\u603B\u7ED3\u62A5\u544A\uFF0C\u91CD\u65B0\u751F\u6210\u64CD\u4F5C\u4F1A\u5C06\u60A8\u4E4B\u524D\u7684\u7F16\u8F91\u8BB0\u5F55\u91CD\u7F6E\u4E3A\u521D\u59CB\u72B6\u6001\u3002\u662F\u5426\u9700\u8981\u91CD\u65B0\u751F\u6210\uFF1F",onOk:()=>{he(Oe,Ft),Q()},cancelText:"\u91CD\u65B0\u751F\u6210",okText:"\u67E5\u770B\u5DF2\u6709\u62A5\u544A",onCancel:()=>{he(Oe,{}),Q()}});return}he(Oe,Ft),Q()})},_.createElement("div",{ref:W,className:"mt5 flex flex-wrap gap-20px",style:{maxHeight:de?"none":"134px",overflow:"hidden",transition:"max-height 0.3s ease",position:"relative"}},_.createElement(se.default.Item,{name:"exercise_group_id",label:"\u5206\u6790\u5BF9\u8C61",normalize:(Oe,ft=[],Et)=>{var Ft,Ut;let Se=Oe;const Gt=((Ut=(Ft=Z==null?void 0:Z.data)==null?void 0:Ft.course_groups)==null?void 0:Ut.map(ht=>ht==null?void 0:ht.exercise_group_id))||[];return!(ft!=null&&ft.includes("all"))&&(Oe.includes("all")||Oe.length===Gt.length)?Se=[...Gt,"all"]:Oe.includes("all")&&Oe.length!==Gt.length+1?Se=Oe.filter(ht=>ht!=="all"):ft!=null&&ft.includes("all")&&!Oe.includes("all")&&(Se=[]),Se}},_.createElement(ee.default.Group,{options:[{label:"\u5168\u90E8",value:"all"},...((D=(B=Z==null?void 0:Z.data)==null?void 0:B.course_groups)==null?void 0:D.map(Oe=>({value:Oe==null?void 0:Oe.exercise_group_id,label:`${Oe==null?void 0:Oe.exercise_group_name}\uFF08${Oe==null?void 0:Oe.exercise_group_students}\uFF09`})))||[]]})),M&&_.createElement("div",{className:"current",style:{position:"absolute",bottom:24,right:0,lineHeight:"32px"},onClick:()=>pe(!de)},de?"\u6536\u8D77":"\u5C55\u5F00",_.createElement("i",{className:"iconfont icon-a-bianzu11 font12"}))),_.createElement(se.default.Item,{className:"mb0",name:"exam_summary_template_id",label:"\u5206\u6790\u6A21\u677F"},_.createElement(A.ZP.Group,null,_.createElement(E.Z,{className:"mt5",direction:"vertical"},(S=(I=Z==null?void 0:Z.data)==null?void 0:I.exam_summary_templates)==null?void 0:S.map((Oe,ft)=>_.createElement(A.ZP,{key:ft,value:Oe==null?void 0:Oe.id},`\u6A21\u677F${ft+1}-${Oe==null?void 0:Oe.name}`,_.createElement("a",{className:"ml5",onClick:()=>{var Et,Ft;v({url:p.Z.API_SERVER+((Et=Oe==null?void 0:Oe.attachment_info)==null?void 0:Et.url),file_type:(Ft=Oe==null?void 0:Oe.attachment_info)==null?void 0:Ft.file_type})}},"\u67E5\u770B"))))))))),_.createElement(P.Z,{close:!0,hasMask:!0,style:{zIndex:9999},data:m==null?void 0:m.url,type:m==null?void 0:m.file_type,onClose:()=>v({})}))};tt.Z=(0,h.connect)(({exercise:R})=>({exercise:R}))(F)},82856:function(Cn,tt,b){"use strict";b.r(tt),b.d(tt,{default:function(){return V}});var P=b(25690),re=b(59301),ge=b(29787),se=b(91882),U=b(99571),f=b(27812),fe=b(67921),ee=b(4958),A=b(51257),E=b(61186),x=b.n(E),h=b(33656),p=b.n(h),_=b(32162),C=b(80119),F=b(76902),R=b(42441),K=b(54172),B=b(59301),D=Object.defineProperty,I=Object.getOwnPropertySymbols,S=Object.prototype.hasOwnProperty,q=Object.prototype.propertyIsEnumerable,ae=(T,J,ve)=>J in T?D(T,J,{enumerable:!0,configurable:!0,writable:!0,value:ve}):T[J]=ve,j=(T,J)=>{for(var ve in J||(J={}))S.call(J,ve)&&ae(T,ve,J[ve]);if(I)for(var ve of I(J))q.call(J,ve)&&ae(T,ve,J[ve]);return T};x().extend(p());const Y=({items:T,labelClassName:J,labelStyle:ve})=>B.createElement("div",{className:"flex flex-col text-start gap-8px"},T==null?void 0:T.map((te,$)=>B.createElement("div",{key:$,className:"flex item-center gap-20px"},te.label&&B.createElement("div",{className:`w-56px c-grey-666 ${J||""} ${(te==null?void 0:te.labelClassName)||""}`,style:j(j({textAlignLast:"justify"},ve||{}),(te==null?void 0:te.labelStyle)||{})},te.label),(te==null?void 0:te.children)&&B.createElement("div",null,te==null?void 0:te.children)))),ie=({exercise:T,dispatch:J})=>{var ve,te,$,ue,Ie,Ce,ke,Le,mt,je,qe,ut,Nt,It,bt,on,rn,Ct,gn,Ln,Mt,hn,We,Qe,He,z,le,me,Be,be,Tt,Wt,an,_n,Wn,zn,On,Un,ar,mr,tr,gr,sn,Kt,yn,Yn,or,Ke,Pe,Yt,Lt,qt,nn,Xt,zt,pn,Ot,cn,un,lt,Pt,Re,Ye,vt,xt,Vt,Jt,Zt,vn,Bn,Dn;const{SumupDetail:st}=T,En="text-500 text-16px",mn=L=>L?" \u2713 ":B.createElement(B.Fragment,null,"\xA0\xA0\xA0\xA0");return B.createElement("section",{className:"flex flex-col item-center"},B.createElement("div",{className:"font30 mb40",style:{fontWeight:600}},(st==null?void 0:st.big_title)||"XXXX\u5927\u5B66\u672C\u79D1\u8BFE\u7A0B\u8003\u6838\u5C0F\u7ED3"),B.createElement("table",{className:"w-full native_table",border:1,style:{borderColor:"#dcdcdc"}},B.createElement("tr",null,B.createElement("td",{className:En,width:160},"\u8BFE\u7A0B\u540D\u79F0"),B.createElement("td",{colSpan:4},(st==null?void 0:st.course_list_name)||""),B.createElement("td",{className:En},"\u8BFE\u7A0B\u7F16\u53F7"),B.createElement("td",{colSpan:2},(st==null?void 0:st.course_number)||"")),B.createElement("tr",null,B.createElement("td",{className:En},"\u5F00\u8BFE\u5355\u4F4D"),B.createElement("td",{colSpan:7},(st==null?void 0:st.school_name)||"")),B.createElement("tr",null,B.createElement("td",{className:En},"\u8003\u6838\u5BF9\u8C61"),B.createElement("td",{colSpan:7},(st==null?void 0:st.course_group_names)||"")),B.createElement("tr",null,B.createElement("td",{className:En},"\u7EC8\u7ED3\u6027\u8003\u6838\u65E5\u671F"),B.createElement("td",{width:145},(st==null?void 0:st.exercise_start_time)&&x()(st==null?void 0:st.exercise_start_time).format("YYYY\u5E74MM\u6708DD\u65E5")),B.createElement("td",{className:En,width:145},"\u7EC8\u7ED3\u6027\u8003\u6838\u65F6\u95F4 "),B.createElement("td",{width:185},(st==null?void 0:st.exercise_time_slot)||""),B.createElement("td",{className:En},"\u5E94\u8003\u4EBA\u6570"),B.createElement("td",null,st!=null&&st.candidate_num?`${st==null?void 0:st.candidate_num}\u4EBA`:""),B.createElement("td",{className:En},"\u5B9E\u8003\u4EBA\u6570"),B.createElement("td",null,st!=null&&st.exam_num?`${st==null?void 0:st.exam_num}\u4EBA`:"")),B.createElement("tr",null,B.createElement("td",{className:En},"\u8003\u6559\u5206\u79BB"),B.createElement("td",{colSpan:3},"\u662F\uFF08",mn(st==null?void 0:st.is_split_exam_teaching),"\uFF09 \u5426\uFF08",mn(!(st!=null&&st.is_split_exam_teaching)),"\uFF09"),B.createElement("td",{className:En,width:110},"\u7EC8\u7ED3\u6027\u8003\u6838\u547D\u9898\u5F62\u5F0F"),B.createElement("td",{colSpan:3},"\u8BD5\u9898\u5E93\uFF08",mn((st==null?void 0:st.set_problem_mode)===_.gW.PROBLEM),"\uFF09 \u8BD5\u5377\u5E93\uFF08",mn((st==null?void 0:st.set_problem_mode)===_.gW.PAPER),"\uFF09 \u5176\u4ED6\uFF08",mn((st==null?void 0:st.set_problem_mode)===_.gW.OTHER),"\uFF09")),B.createElement("tr",null,B.createElement("td",{className:En},"\u9605\u5377\u5F62\u5F0F"),B.createElement("td",{colSpan:7},"\u5355\u4EBA\u9605\u5377\uFF08",mn((st==null?void 0:st.review_paper_mode)===_.a2.SINGLE),"\uFF09 \u591A\u4EBA\u6D41\u6C34\u4F5C\u4E1A\u9605\u5377\uFF08",mn((st==null?void 0:st.review_paper_mode)===_.a2.MULTIPLEFLOW),"\uFF09 \u591A\u4EBA\u72EC\u7ACB\u9605\u5377\uFF08",mn((st==null?void 0:st.review_paper_mode)===_.a2.MULTIPLEFIXED),"\uFF09 \u5176\u4ED6\uFF08",mn((st==null?void 0:st.review_paper_mode)===_.a2.OTHER),"\uFF09")),B.createElement("tr",null,B.createElement("td",{className:En},"\u7EC8\u7ED3\u6027\u8003\u6838\u8BD5\u9898\u7C7B\u578B\u53CA\u5176\u5206\u6570\u6BD4\u4F8B"),B.createElement("td",{colSpan:7},B.createElement("div",{className:"w-full flex flex-col gap-10px text-start font14"},((ve=st==null?void 0:st.exercise_questions_info)==null?void 0:ve.content)||"",B.createElement("br",null),($=(te=st==null?void 0:st.exercise_questions_info)==null?void 0:te.exercise_questions)==null?void 0:$.map((L,k)=>B.createElement("div",{key:k},k+1,"\u3001",L==null?void 0:L.name,L==null?void 0:L.count,"\u9053\uFF0C\u5171",L==null?void 0:L.score,"\u5206\uFF0C\u5360",Math.round((L==null?void 0:L.rate)*1e4)/100,"%"))))),B.createElement("tr",null,B.createElement("td",{className:En,rowSpan:2},"\u7EC8\u7ED3\u6027\u8003\u6838\u5185\u5BB9\u5206\u6790"),B.createElement("td",{colSpan:7},B.createElement(Y,{items:[{label:"\u8986\u76D6\u9762",children:B.createElement("span",null,"\u5BBD\uFF08",mn(((ue=st==null?void 0:st.content_analysis)==null?void 0:ue.coverage)==="wide"),"\uFF09 \u4E2D\uFF08",mn(((Ie=st==null?void 0:st.content_analysis)==null?void 0:Ie.coverage)==="medium"),"\uFF09 \u7A84\uFF08",mn(((Ce=st==null?void 0:st.content_analysis)==null?void 0:Ce.coverage)==="narrow"),"\uFF09")},{label:"\u96BE\u5EA6",children:B.createElement("span",null,"\u96BE\uFF08",mn(((ke=st==null?void 0:st.content_analysis)==null?void 0:ke.difficulty)==1),"\uFF09 \u8F83\u96BE\uFF08",mn(((Le=st==null?void 0:st.content_analysis)==null?void 0:Le.difficulty)==2),"\uFF09 \u4E2D\uFF08",mn(((mt=st==null?void 0:st.content_analysis)==null?void 0:mt.difficulty)==3),"\uFF09 \u8F83\u6613\uFF08",mn(((je=st==null?void 0:st.content_analysis)==null?void 0:je.difficulty)==4),"\uFF09 \u6613\uFF08",mn(((qe=st==null?void 0:st.content_analysis)==null?void 0:qe.difficulty)==5),"\uFF09")},{label:"\u9898\u91CF",children:B.createElement("span",null,">100\uFF08",mn(((ut=st==null?void 0:st.content_analysis)==null?void 0:ut.question_quantity)==1),"\uFF09 70-100\uFF08",mn(((Nt=st==null?void 0:st.content_analysis)==null?void 0:Nt.question_quantity)==2),"\uFF09 50-70\uFF08",mn(((It=st==null?void 0:st.content_analysis)==null?void 0:It.question_quantity)==3),"\uFF09 <50\uFF08",mn(((bt=st==null?void 0:st.content_analysis)==null?void 0:bt.question_quantity)==4),"\uFF09")},{label:"\u6709\u65E0\u9519\u8BEF",children:B.createElement("span",null,"\u6709\uFF08",mn((on=st==null?void 0:st.content_analysis)==null?void 0:on.is_wrong),"\uFF09 \u65E0\uFF08",mn(!((rn=st==null?void 0:st.content_analysis)!=null&&rn.is_wrong)),"\uFF09")}]}))),B.createElement("tr",null,B.createElement("td",{colSpan:7,style:{textAlign:"start"}},"\u6839\u636E\u5E73\u5747\u5206\u5224\u65AD\u96BE\u5EA6\uFF1A<65\uFF08\u96BE\uFF09,<70\uFF08\u8F83\u96BE\uFF09,70-80\uFF08\u4E2D\uFF09,>80(\u8F83\u6613)\uFF0C>85(\u6613)")),B.createElement("tr",null,B.createElement("td",{className:En},"\u8003\u6838\u7EC4\u7EC7\u60C5\u51B5"),B.createElement("td",{colSpan:7},B.createElement(Y,{items:[{label:"\u7EC4\u7EC7\u5F62\u5F0F",children:(Ct=st==null?void 0:st.organization_condition)==null?void 0:Ct.organization_mode},{label:"\u8003\u8BD5\u6279\u6B21",children:(gn=st==null?void 0:st.organization_condition)==null?void 0:gn.exam_count},{label:"\u8003\u8BD5\u5F62\u5F0F",children:(Ln=st==null?void 0:st.organization_condition)==null?void 0:Ln.exam_mode},{label:"\u8003\u8BD5\u7CFB\u7EDF",children:(Mt=st==null?void 0:st.organization_condition)==null?void 0:Mt.exam_system},{label:"\u662F\u5426\u5F00\u5377",children:(hn=st==null?void 0:st.organization_condition)!=null&&hn.is_open_exercise?"\u5F00\u5377\uFF0C\u5141\u8BB8\u643A\u5E26\u7EB8\u8D28\u6750\u6599\uFF0C\u4F46\u4E0D\u5141\u8BB8\u643A\u5E26\u4EFB\u4F55\u7535\u5B50\u8BBE\u5907":"\u95ED\u5377\uFF0C\u4E0D\u5141\u8BB8\u643A\u5E26\u7EB8\u8D28\u6750\u6599\u548C\u4EFB\u4F55\u7535\u5B50\u8BBE\u5907"},{labelStyle:{width:100},label:"\u662F\u5426\u4E3A\u5355\u4E00\u8BD5\u5377",children:(We=st==null?void 0:st.organization_condition)==null?void 0:We.is_single_exercise},{children:(Qe=st==null?void 0:st.organization_condition)==null?void 0:Qe.end_examine}]}))),B.createElement("tr",null,B.createElement("td",{className:En,rowSpan:4},"\u8003\u6838\u6210\u7EE9\u5206\u5E03"),B.createElement("td",{colSpan:7},B.createElement("div",{className:"flex gap-40px item-center justify-center"},[{label:"\u6700\u9AD8",num:`${((He=st==null?void 0:st.score_distribution)==null?void 0:He.max_score)||0}\u5206`},{label:"\u6700\u4F4E",num:`${((z=st==null?void 0:st.score_distribution)==null?void 0:z.min_score)||0}\u5206`},{label:"\u5E73\u5747",num:`${((le=st==null?void 0:st.score_distribution)==null?void 0:le.average_score)||0}\u5206`},{label:"\u53CA\u683C\u7387",num:`${Math.round((((me=st==null?void 0:st.score_distribution)==null?void 0:me.rate)||0)*1e4)/100}%`}].map((L,k)=>B.createElement("span",{key:k,className:"c-grey-666"},L==null?void 0:L.label,B.createElement("span",{className:"ml10 c-black"},L==null?void 0:L.num)))))),B.createElement("tr",null,B.createElement("td",{colSpan:3},"\u4F18\u79C0\uFF08",((be=(Be=st==null?void 0:st.score_distribution)==null?void 0:Be.best)==null?void 0:be.score_area)||0,"\u5206\uFF09\u4EBA\u6570\uFF1A",((Wt=(Tt=st==null?void 0:st.score_distribution)==null?void 0:Tt.best)==null?void 0:Wt.people_count)||0,"\xA0\xA0 \u6BD4\u4F8B\uFF1A",Math.round((((_n=(an=st==null?void 0:st.score_distribution)==null?void 0:an.best)==null?void 0:_n.rate)||0)*1e4)/100,"%"),B.createElement("td",{colSpan:4},"\u826F\u597D\uFF08",((zn=(Wn=st==null?void 0:st.score_distribution)==null?void 0:Wn.good)==null?void 0:zn.score_area)||0,"\u5206\uFF09\u4EBA\u6570\uFF1A",((Un=(On=st==null?void 0:st.score_distribution)==null?void 0:On.good)==null?void 0:Un.people_count)||0,"\xA0\xA0 \u6BD4\u4F8B\uFF1A",Math.round((((mr=(ar=st==null?void 0:st.score_distribution)==null?void 0:ar.good)==null?void 0:mr.rate)||0)*1e4)/100,"%")),B.createElement("tr",null,B.createElement("td",{colSpan:3},"\u4E2D\u7B49\uFF08",((gr=(tr=st==null?void 0:st.score_distribution)==null?void 0:tr.middle)==null?void 0:gr.score_area)||0,"\u5206\uFF09\u4EBA\u6570\uFF1A",((Kt=(sn=st==null?void 0:st.score_distribution)==null?void 0:sn.middle)==null?void 0:Kt.people_count)||0,"\xA0\xA0 \u6BD4\u4F8B\uFF1A",Math.round((((Yn=(yn=st==null?void 0:st.score_distribution)==null?void 0:yn.middle)==null?void 0:Yn.rate)||0)*1e4)/100,"%"),B.createElement("td",{colSpan:4},"\u53CA\u683C\uFF08",((Ke=(or=st==null?void 0:st.score_distribution)==null?void 0:or.pass)==null?void 0:Ke.score_area)||0,"\u5206\uFF09\u4EBA\u6570\uFF1A",((Yt=(Pe=st==null?void 0:st.score_distribution)==null?void 0:Pe.pass)==null?void 0:Yt.people_count)||0,"\xA0\xA0 \u6BD4\u4F8B\uFF1A",Math.round((((qt=(Lt=st==null?void 0:st.score_distribution)==null?void 0:Lt.pass)==null?void 0:qt.rate)||0)*1e4)/100,"%")),B.createElement("tr",null,B.createElement("td",{colSpan:7},"\u4E0D\u53CA\u683C\uFF08",((Xt=(nn=st==null?void 0:st.score_distribution)==null?void 0:nn.fails)==null?void 0:Xt.score_area)||0,"\u5206\uFF09\u4EBA\u6570\uFF1A",((pn=(zt=st==null?void 0:st.score_distribution)==null?void 0:zt.fails)==null?void 0:pn.people_count)||0,"\xA0\xA0 \u6BD4\u4F8B\uFF1A",Math.round((((cn=(Ot=st==null?void 0:st.score_distribution)==null?void 0:Ot.fails)==null?void 0:cn.rate)||0)*1e4)/100,"%")),B.createElement("tr",null,B.createElement("td",{className:En},"\u7EC8\u7ED3\u6027\u8003\u6838\u5404\u7C7B\u9898\u578B\u5B66\u5458\u7B54\u9898\u60C5\u51B5\u5206\u6790"),B.createElement("td",{colSpan:7},B.createElement("div",{className:"flex flex-col gap-40px"},(lt=(un=st==null?void 0:st.answer_analysis)==null?void 0:un.exercise_questions)==null?void 0:lt.map((L,k)=>B.createElement(C.H,{key:k,data:L,index:k+1}))),B.createElement(F.Z,{className:"font14 c-grey-333 text-start mt20 pl10",value:((Pt=st==null?void 0:st.answer_analysis)==null?void 0:Pt.question_analysis)||""}))),B.createElement("tr",null,B.createElement("td",{className:En},"\u5B66\u5458\u8003\u6838\u6210\u7EE9\u53CA\u5B66\u4E60\u60C5\u51B5\u5206\u6790"),B.createElement("td",{colSpan:7},B.createElement("div",{className:"pl10 pr10 text-start"},B.createElement(F.Z,{className:"font14 c-grey-333 text-start",value:((Re=st==null?void 0:st.condition_analysis)==null?void 0:Re.content)||""}),((Ye=st==null?void 0:st.condition_analysis)==null?void 0:Ye.chart_1)&&B.createElement("div",{className:"mt20"},B.createElement(R.Z,{style:{background:"#F6F7F9"},option:(()=>{var L,k;const ce=[],ye=[];return(k=(L=st==null?void 0:st.condition_analysis)==null?void 0:L.chart_1)==null||k.forEach(Ge=>{ce.push(Ge==null?void 0:Ge.x_axis),ye.push(Math.round((Ge==null?void 0:Ge.y_axis)*1e4)/100)}),{tooltip:{},grid:{left:"7%",right:"5%",bottom:"15%",top:"15%",containLabel:!0},xAxis:{type:"category",data:[...ce||[],"\u5F97\u5206"],axisTick:{show:!1},axisLine:{lineStyle:{color:"#EBEBEB"}},axisLabel:{color:"#666666"}},yAxis:{name:"\u6BD4\u4F8B",nameTextStyle:{color:"#666"},type:"value",splitLine:{show:!1},axisLine:{show:!0,lineStyle:{color:"#EBEBEB"}},axisLabel:{color:"#666666"}},series:[{data:ye,barWidth:"40px",itemStyle:{color:"#A2BEFF",borderColor:"#165DFF"},type:"bar"}]}})()}),B.createElement("div",{className:"font14 mt10 text-center"},"\u56FE",((((xt=(vt=st==null?void 0:st.answer_analysis)==null?void 0:vt.exercise_questions)==null?void 0:xt.length)||0)+1)*2-1,"\xA0\xA0\u7EC8\u7ED3\u6027\u8003\u6838\u7B54\u9898\u5F97\u5206\u60C5\u51B5\u5206\u5E03")),((Vt=st==null?void 0:st.condition_analysis)==null?void 0:Vt.chart_2)&&B.createElement("div",{className:"mt20"},B.createElement(K.default,{dataSource:((Jt=st==null?void 0:st.condition_analysis)==null?void 0:Jt.chart_2)||[],columns:[{title:"\u4E13\u4E1A",dataIndex:"exercise_group_name",align:"center"},{title:"\u4EBA\u6570",dataIndex:"exercise_group_students",align:"center"},{title:"\u5E73\u5747\u5206",dataIndex:"average_score",align:"center"},{title:"\u6700\u9AD8\u5206",dataIndex:"max_score",align:"center"},{title:"\u6700\u4F4E\u5206",dataIndex:"min_score",align:"center"}],pagination:!1,bordered:!0}),B.createElement("div",{className:"font14 mt10 text-center"},"\u56FE",((((vn=(Zt=st==null?void 0:st.answer_analysis)==null?void 0:Zt.exercise_questions)==null?void 0:vn.length)||0)+1)*2,"\xA0\xA0\u5404\u4E13\u4E1A\u8003\u7EC8\u7ED3\u6027\u8003\u8BD5\u6210\u7EE9\u5BF9\u6BD4")),B.createElement(F.Z,{className:"font14 c-grey-333 text-start mt20",value:((Bn=st==null?void 0:st.condition_analysis)==null?void 0:Bn.student_condition_analysis)||""})))),B.createElement("tr",null,B.createElement("td",{className:En},"\u5B58\u5728\u7684\u95EE\u9898\u4EE5\u53CA\u6539\u8FDB\u610F\u89C1"),B.createElement("td",{colSpan:7},B.createElement(F.Z,{className:"font14 c-grey-333 text-start pr10 pl10",value:((Dn=st==null?void 0:st.suggestion)==null?void 0:Dn.suggestion_content)||""}))),B.createElement("tr",null,B.createElement("td",{colSpan:4,height:200},B.createElement("div",{className:"flex flex-col justify-between h-full"},B.createElement("div",{className:"text-start"},"\u4EFB\u8BFE\u6559\u5E08\uFF08\u7B7E\u540D\uFF09"),B.createElement("div",{className:"text-end"},"\u5E74\xA0\xA0\xA0\xA0\xA0\xA0\xA0\xA0\u6708\xA0\xA0\xA0\xA0\xA0\xA0\xA0\xA0\u65E5"))),B.createElement("td",{colSpan:4,height:200},B.createElement("div",{className:"flex flex-col justify-between h-full"},B.createElement("div",{className:"text-start"},"\u7CFB\uFF08\u6240\u3001\u5BA4\uFF09\u4E3B\u4EFB\uFF08\u7B7E\u540D\uFF09"),B.createElement("div",{className:"text-end"},"\u5E74\xA0\xA0\xA0\xA0\xA0\xA0\xA0\xA0\u6708\xA0\xA0\xA0\xA0\xA0\xA0\xA0\xA0\u65E5")))),B.createElement("tr",null,B.createElement("td",{colSpan:8},B.createElement("div",{className:"text-start"},"\u6CE8\uFF1A\u6BCF\u95E8\u8BFE\u7A0B\u5E94\u586B\u5199\u4E00\u4EFD\u8003\u6838\u5C0F\u7ED3\u3002")))))};var de=(0,P.connect)(({exercise:T})=>({exercise:T}))(ie),pe=b(59301),W=Object.defineProperty,M=Object.defineProperties,X=Object.getOwnPropertyDescriptors,G=Object.getOwnPropertySymbols,ne=Object.prototype.hasOwnProperty,Z=Object.prototype.propertyIsEnumerable,m=(T,J,ve)=>J in T?W(T,J,{enumerable:!0,configurable:!0,writable:!0,value:ve}):T[J]=ve,v=(T,J)=>{for(var ve in J||(J={}))ne.call(J,ve)&&m(T,ve,J[ve]);if(G)for(var ve of G(J))Z.call(J,ve)&&m(T,ve,J[ve]);return T},Q=(T,J)=>M(T,X(J));const he=({items:T,labelClassName:J,labelStyle:ve})=>pe.createElement("div",{className:"flex flex-col text-start gap-8px"},T==null?void 0:T.map((te,$)=>pe.createElement("div",{key:$,className:"flex gap-20px"},te.label&&pe.createElement("div",{className:`w-56px c-grey-666 ${J||""} ${(te==null?void 0:te.labelClassName)||""}`,style:v(v({whiteSpace:"nowrap",textAlignLast:"justify",lineHeight:"28px"},ve||{}),(te==null?void 0:te.labelStyle)||{})},te.label),(te==null?void 0:te.children)&&pe.createElement("div",null,te==null?void 0:te.children)))),Ue=({data:T=[],ylabel:J="",xlabel:ve="",className:te="",itemStyle:$={},formatter:ue="{c}%"})=>{const Ie=(0,re.useMemo)(()=>{const Ce=[],ke=[];return T==null||T.forEach(Le=>{Ce.push(Le==null?void 0:Le.x_axis),ke.push(Le==null?void 0:Le.y_axis)}),{tooltip:{},grid:{left:"5%",right:"5%",bottom:"7%",top:"20%",containLabel:!0},xAxis:{type:"category",data:[...Ce||[],ve],axisTick:{show:!1},axisLine:{lineStyle:{color:"#EBEBEB"}},axisLabel:{color:"#666666",interval:0}},yAxis:{name:J,nameTextStyle:{color:"#666",padding:[0,0,10,0]},type:"value",splitLine:{show:!1},axisLine:{show:!0,lineStyle:{color:"#EBEBEB"}},axisLabel:{color:"#666666"}},series:[{data:ke,barMaxWidth:"40px",itemStyle:v({color:"#A2BEFF",borderColor:"#165DFF"},$),type:"bar",label:{color:"#666",show:!0,position:"top",valueAnimation:!0,formatter:ue}}]}},[T]);return pe.createElement(R.Z,{className:te,style:{background:"#F6F7F9"},option:Ie})},Oe=({exercise:T,dispatch:J})=>{var ve,te,$,ue,Ie,Ce,ke,Le,mt,je,qe,ut,Nt,It,bt,on,rn,Ct,gn,Ln,Mt,hn,We,Qe,He,z,le,me,Be,be,Tt,Wt,an,_n,Wn,zn,On,Un,ar,mr,tr,gr,sn,Kt,yn,Yn,or,Ke,Pe,Yt,Lt,qt,nn,Xt,zt,pn,Ot,cn,un;const{SumupDetail:lt}=T,Pt="text-500 text-16px",Re=Ye=>Ye?" \u2713 ":pe.createElement(pe.Fragment,null,"\xA0\xA0\xA0\xA0");return pe.createElement("section",{className:"flex flex-col item-center"},pe.createElement("div",{className:"font30 mb20",style:{fontWeight:600}},(lt==null?void 0:lt.big_title)||"XXXX\u5927\u5B66\u8BFE\u7A0B\u8003\u6838\u8BD5\u5377\u5206\u6790\u8868"),pe.createElement("div",{className:"w-full",style:{textAlign:"end"}},lt==null?void 0:lt.teaching_semester),pe.createElement("table",{className:"w-full native_table",border:1,style:{borderColor:"#dcdcdc"}},pe.createElement("tr",null,pe.createElement("td",{className:Pt,colSpan:2},"\u8BFE\u7A0B\u540D\u79F0"),pe.createElement("td",{colSpan:6},(lt==null?void 0:lt.course_list_name)||"")),pe.createElement("tr",null,pe.createElement("td",{className:Pt,colSpan:2},"\u6559\u5B66\u73ED\u7EA7"),pe.createElement("td",{colSpan:6},(lt==null?void 0:lt.course_group_names)||"")),pe.createElement("tr",null,pe.createElement("td",{className:Pt,colSpan:2},"\u4EFB\u8BFE\u6559\u5E08"),pe.createElement("td",null,(lt==null?void 0:lt.exercise_creator)||""),pe.createElement("td",{className:Pt},"\u8003\u8BD5\u65B9\u5F0F"),pe.createElement("td",{colSpan:4},"\u7B14\u8BD5\uFF08",Re((lt==null?void 0:lt.exercise_type_number)===_.k.BISHI),"\uFF09 \u673A\u8BD5\uFF08",Re((lt==null?void 0:lt.exercise_type_number)===_.k.JISHI),"\uFF09 \u53E3\u8BD5\uFF08",Re((lt==null?void 0:lt.exercise_type_number)===_.k.KOUSHI),"\uFF09 \u5176\u4ED6\uFF08",Re((lt==null?void 0:lt.exercise_type_number)===_.k.OTHER),"\uFF09")),pe.createElement("tr",null,pe.createElement("td",{className:Pt,rowSpan:5,width:80},"\u7EC8\u7ED3\u6027\u6210\u7EE9\u7EDF\u8BA1"),pe.createElement("td",{className:Pt,rowSpan:4,width:80},"\u6210\u7EE9\u5206\u5E03"),pe.createElement("td",{className:Pt,width:180},"\u6700\u9AD8\u5206"),pe.createElement("td",{width:180},(ve=lt==null?void 0:lt.score_distribution)==null?void 0:ve.max_score),pe.createElement("td",{className:Pt},"\u6700\u4F4E\u5206"),pe.createElement("td",null,(te=lt==null?void 0:lt.score_distribution)==null?void 0:te.min_score),pe.createElement("td",{className:Pt},"\u5E73\u5747\u5206"),pe.createElement("td",null,($=lt==null?void 0:lt.score_distribution)==null?void 0:$.average_score)),pe.createElement("tr",null,pe.createElement("td",{className:Pt},"\u6210\u7EE9"),pe.createElement("td",null,(Ie=(ue=lt==null?void 0:lt.score_distribution)==null?void 0:ue.best)==null?void 0:Ie.score_area),pe.createElement("td",null,(ke=(Ce=lt==null?void 0:lt.score_distribution)==null?void 0:Ce.good)==null?void 0:ke.score_area),pe.createElement("td",null,(mt=(Le=lt==null?void 0:lt.score_distribution)==null?void 0:Le.middle)==null?void 0:mt.score_area),pe.createElement("td",null,(qe=(je=lt==null?void 0:lt.score_distribution)==null?void 0:je.pass)==null?void 0:qe.score_area),pe.createElement("td",null,(Nt=(ut=lt==null?void 0:lt.score_distribution)==null?void 0:ut.fails)==null?void 0:Nt.score_area,"\u4EE5\u4E0B")),pe.createElement("tr",null,pe.createElement("td",{className:Pt},"\u4EBA\u6570"),pe.createElement("td",null,(bt=(It=lt==null?void 0:lt.score_distribution)==null?void 0:It.best)==null?void 0:bt.people_count),pe.createElement("td",null,(rn=(on=lt==null?void 0:lt.score_distribution)==null?void 0:on.good)==null?void 0:rn.people_count),pe.createElement("td",null,(gn=(Ct=lt==null?void 0:lt.score_distribution)==null?void 0:Ct.middle)==null?void 0:gn.people_count),pe.createElement("td",null,(Mt=(Ln=lt==null?void 0:lt.score_distribution)==null?void 0:Ln.pass)==null?void 0:Mt.people_count),pe.createElement("td",null,(We=(hn=lt==null?void 0:lt.score_distribution)==null?void 0:hn.fails)==null?void 0:We.people_count)),pe.createElement("tr",null,pe.createElement("td",{className:Pt},"\u767E\u5206\u6BD4"),pe.createElement("td",null,Math.round((((He=(Qe=lt==null?void 0:lt.score_distribution)==null?void 0:Qe.best)==null?void 0:He.rate)||0)*1e4)/100,"%"),pe.createElement("td",null,Math.round((((le=(z=lt==null?void 0:lt.score_distribution)==null?void 0:z.good)==null?void 0:le.rate)||0)*1e4)/100,"%"),pe.createElement("td",null,Math.round((((Be=(me=lt==null?void 0:lt.score_distribution)==null?void 0:me.middle)==null?void 0:Be.rate)||0)*1e4)/100,"%"),pe.createElement("td",null,Math.round((((Tt=(be=lt==null?void 0:lt.score_distribution)==null?void 0:be.pass)==null?void 0:Tt.rate)||0)*1e4)/100,"%"),pe.createElement("td",null,Math.round((((an=(Wt=lt==null?void 0:lt.score_distribution)==null?void 0:Wt.fails)==null?void 0:an.rate)||0)*1e4)/100,"%")),pe.createElement("tr",null,pe.createElement("td",{colSpan:7},(lt==null?void 0:lt.score_distribution)&&pe.createElement(Ue,{data:[{x_axis:`<=${(Wn=(_n=lt==null?void 0:lt.score_distribution)==null?void 0:_n.fails)==null?void 0:Wn.score_area}`,y_axis:((On=(zn=lt==null?void 0:lt.score_distribution)==null?void 0:zn.fails)==null?void 0:On.people_count)||0},{x_axis:`${(ar=(Un=lt==null?void 0:lt.score_distribution)==null?void 0:Un.pass)==null?void 0:ar.score_area}`,y_axis:((tr=(mr=lt==null?void 0:lt.score_distribution)==null?void 0:mr.pass)==null?void 0:tr.people_count)||0},{x_axis:`${(sn=(gr=lt==null?void 0:lt.score_distribution)==null?void 0:gr.middle)==null?void 0:sn.score_area}`,y_axis:((yn=(Kt=lt==null?void 0:lt.score_distribution)==null?void 0:Kt.middle)==null?void 0:yn.people_count)||0},{x_axis:`${(or=(Yn=lt==null?void 0:lt.score_distribution)==null?void 0:Yn.good)==null?void 0:or.score_area}`,y_axis:((Pe=(Ke=lt==null?void 0:lt.score_distribution)==null?void 0:Ke.good)==null?void 0:Pe.people_count)||0},{x_axis:`${(Lt=(Yt=lt==null?void 0:lt.score_distribution)==null?void 0:Yt.best)==null?void 0:Lt.score_area}`,y_axis:((nn=(qt=lt==null?void 0:lt.score_distribution)==null?void 0:qt.best)==null?void 0:nn.people_count)||0}],ylabel:"\u4EBA\u6570\uFF08\u5355\u4F4D\uFF1A\u4EBA\uFF09",xlabel:"\u5206\u6570\u533A\u95F4",formatter:"{c}"}))),pe.createElement("tr",null,pe.createElement("td",{className:Pt},"\u8BD5\u5377\uFF08\u6216\u8003\u6838\uFF09\u60C5\u51B5\u5206\u6790"),pe.createElement("td",{colSpan:7},pe.createElement("div",{className:"flex flex-col gap-20px pl10 pr10 text-start"},pe.createElement(F.Z,{className:"font14 c-grey-333",value:`${((Xt=lt==null?void 0:lt.exercise_questions_info)==null?void 0:Xt.exercise_questions_str)||""}
${((zt=lt==null?void 0:lt.exercise_questions_info)==null?void 0:zt.exercise_content)||""}`}),(Ot=(pn=lt==null?void 0:lt.exercise_questions_info)==null?void 0:pn.exercise_questions)==null?void 0:Ot.map((Ye,vt)=>{var xt,Vt,Jt;return pe.createElement("div",{key:vt},pe.createElement("div",{className:"text-500 c-black mb10 "},vt+1,"\u3001",Ye==null?void 0:Ye.name),pe.createElement(he,{items:(xt=Ye==null?void 0:Ye.items)==null?void 0:xt.map((Zt,vn)=>{var Bn,Dn;return{label:`\u7B2C${vn+1}\u9898`,labelClassName:"w-auto h-full",children:pe.createElement(pe.Fragment,null,pe.createElement(F.Z,{className:"font14 c-grey-333 text-start",value:(Zt==null?void 0:Zt.question_title)||""}),((Bn=Zt==null?void 0:Zt.tag_discipline_names)==null?void 0:Bn.length)>0&&pe.createElement("div",null,"\u8003\u70B9\uFF1A",(Dn=Zt==null?void 0:Zt.tag_discipline_names)==null?void 0:Dn.join("\u3001")))}})}),pe.createElement("div",{className:"text-500 c-black mb10 mt20"},"\u7EC8\u7ED3\u6027\u8003\u6838\u6210\u7EE9\u5206\u5E03\u56FE"),pe.createElement(Ue,{data:(Vt=Ye==null?void 0:Ye.chart_1)==null?void 0:Vt.map((Zt={},vn)=>Q(v({},Zt),{x_axis:vn+1,y_axis:Math.round(Zt.y_axis*1e4)/100})),ylabel:"\u6B63\u786E\u7387",xlabel:"\u9898\u76EE"}),pe.createElement(Ue,{className:"mt10",data:(Jt=Ye==null?void 0:Ye.chart_2)==null?void 0:Jt.map((Zt={},vn)=>Q(v({},Zt),{x_axis:vn+1,y_axis:Math.round(Zt.y_axis*1e4)/100})),ylabel:"\u5F97\u5206\u7387",xlabel:"\u9898\u76EE",itemStyle:{color:"#2EC25B",borderColor:"#2EC25B"}}),pe.createElement("div",{className:"text-500 c-black mb10 mt20"},"\u5177\u4F53\u5F97\u5206\u660E\u7EC6\u5982\u4E0B\u8868\u6240\u793A"),pe.createElement(K.default,{className:"mb20",pagination:!1,dataSource:(Ye==null?void 0:Ye.chart_3)||[],bordered:!0,columns:[{title:"\u5E8F\u53F7",dataIndex:"question_number",align:"center"},{title:"\u7B54\u9898\u4EBA\u6570",dataIndex:"answer_users_count",align:"center"},{title:"0\u5206",dataIndex:"zero_score_number",align:"center"},{title:"\u90E8\u5206\u6B63\u786E\u4EBA\u6570",dataIndex:"part_score_number",align:"center"},{title:"\u6EE1\u5206\u4EBA\u6570",children:[{title:"\u4EBA\u6570",dataIndex:"full_score_number",align:"center"},{title:"\u5360\u6BD4",dataIndex:"full_score_rate",align:"center",render:Zt=>`${Math.round(Zt*1e4)/100}%`}]},{title:"\u5E73\u5747\u5206",dataIndex:"average_score",align:"center"}]}),pe.createElement(F.Z,{className:"font14 c-grey-333 text-start",value:(Ye==null?void 0:Ye.question_type_conent)||""}))}),pe.createElement(F.Z,{className:"font14 c-grey-333 text-start",value:((cn=lt==null?void 0:lt.condition_analysis)==null?void 0:cn.student_condition_analysis)||""})))),pe.createElement("tr",null,pe.createElement("td",{className:Pt},"\u5B58\u5728\u7684\u95EE\u9898\u53CA\u6539\u8FDB\u63AA\u65BD"),pe.createElement("td",{colSpan:7},pe.createElement(F.Z,{className:"font14 c-grey-333 text-start pr10 pl10",value:((un=lt==null?void 0:lt.suggestion)==null?void 0:un.suggestion_content)||""}))),pe.createElement("tr",null,pe.createElement("td",{colSpan:4,height:200},pe.createElement("div",{className:"flex flex-col justify-between h-full"},pe.createElement("div",{className:"text-start"},"\u4EFB\u8BFE\u6559\u5E08\uFF08\u7B7E\u540D\uFF09"),pe.createElement("div",{className:"text-end"},"\u5E74\xA0\xA0\xA0\xA0\xA0\xA0\xA0\xA0\u6708\xA0\xA0\xA0\xA0\xA0\xA0\xA0\xA0\u65E5"))),pe.createElement("td",{colSpan:4,height:200},pe.createElement("div",{className:"flex flex-col justify-between h-full"},pe.createElement("div",{className:"text-start"},"\u7CFB\uFF08\u6240\u3001\u5BA4\uFF09\u4E3B\u4EFB\uFF08\u7B7E\u540D\uFF09"),pe.createElement("div",{className:"text-end"},"\u5E74\xA0\xA0\xA0\xA0\xA0\xA0\xA0\xA0\u6708\xA0\xA0\xA0\xA0\xA0\xA0\xA0\xA0\u65E5"))))),pe.createElement("div",{className:"p20 w-full"},"\u6CE8\uFF1A\u672C\u8868\u4E00\u5F0F\u4E09\u4EFD\uFF0C\u5206\u522B\u7531\u5F00\u8BFE\u5B66\u9662\u6559\u5B66\u79D1\u7814\uFF08\u6559\u52A1\uFF09\u5904\u3001\u5F00\u8BFE\u7CFB\uFF08\u6240\u3001\u5BA4\uFF09\u548C\u5B66\u5458\u7BA1\u7406\u5B66\u9662\u6559\u5B66\u79D1\u7814\uFF08\u6559\u52A1\uFF09\u5904\u5B58\u6863"))};var ft=(0,P.connect)(({exercise:T})=>({exercise:T}))(Oe),Et=b(46799),Ft=b(44164),Ut=b.n(Ft),Se=b(45937),Gt=b(81722),ht=b(59301),tn=Object.defineProperty,dt=Object.getOwnPropertySymbols,Je=Object.prototype.hasOwnProperty,xe=Object.prototype.propertyIsEnumerable,_e=(T,J,ve)=>J in T?tn(T,J,{enumerable:!0,configurable:!0,writable:!0,value:ve}):T[J]=ve,N=(T,J)=>{for(var ve in J||(J={}))Je.call(J,ve)&&_e(T,ve,J[ve]);if(dt)for(var ve of dt(J))xe.call(J,ve)&&_e(T,ve,J[ve]);return T},Fe=(T,J,ve)=>new Promise((te,$)=>{var ue=ke=>{try{Ce(ve.next(ke))}catch(Le){$(Le)}},Ie=ke=>{try{Ce(ve.throw(ke))}catch(Le){$(Le)}},Ce=ke=>ke.done?te(ke.value):Promise.resolve(ke.value).then(ue,Ie);Ce((ve=ve.apply(T,J)).next())});const De=({user:T,exercise:J,dispatch:ve})=>{var te;const $=(0,P.useParams)(),[ue]=(0,P.useSearchParams)(),Ie=Number(ue.get("template")||"1"),Ce=ue.get("exam_summary_id")&&Number(ue.get("exam_summary_id")),ke=ue.getAll("exercise_group_id").map(rn=>rn==="all"?rn:Number(rn)),{userInfo:Le}=T,{commonHeader:mt,SumupDetail:je}=J,[qe,ut]=(0,re.useState)(1),Nt=(0,re.useRef)(null),[,It,bt]=(0,Se.U)(Gt.Ym,{}),on=()=>Fe(void 0,null,function*(){var rn;ve({type:"exercise/getCommonHeader",payload:{categoryId:$==null?void 0:$.exerciseId}});const Ct=yield bt({exam_summary_template_id:Ie,exam_summary_id:Ce,id:($==null?void 0:$.categoryId)||($==null?void 0:$.exerciseId),exercise_group_id:ke.includes("all")?[]:ke});(Ct==null?void 0:Ct.status)===0&&(ue.set("exam_summary_id",(rn=Ct==null?void 0:Ct.data)==null?void 0:rn.exam_summary_id),ve({type:"exercise/save",payload:{SumupDetail:N({exercise_group_id:ke},Ct==null?void 0:Ct.data)}}))});return(0,re.useEffect)(()=>{Ie&&ut(Ie||1),on()},[ue]),ht.createElement(ge.Z,{spinning:It},ht.createElement("section",{className:"edu-container"},ht.createElement(se.Z,{className:"mt10",separator:">",items:[{title:(te=Le==null?void 0:Le.course)==null?void 0:te.course_name,href:`/classrooms/${$.coursesId}/exercise`},{title:"\u5728\u7EBF\u8003\u8BD5",href:`/classrooms/${$.coursesId}/exercise`},{title:"\u8BD5\u5377\u8BE6\u60C5",href:`/classrooms/${$.coursesId}/exercise/${$==null?void 0:$.exerciseId}/detail`},{title:mt==null?void 0:mt.exercise_name}]}),ht.createElement("div",{className:"flex mt20 justify-between"},ht.createElement("div",{className:"flex item-center"},ht.createElement("a",{href:`/classrooms/${$.coursesId}/exercise/${$==null?void 0:$.exerciseId}/sumup?template=${qe}`},ht.createElement(f.Z,{className:"font16 c-black",rev:void 0})),(0,A.vB)(mt==null?void 0:mt.exercise_status,mt==null?void 0:mt.appraise_label),ht.createElement("strong",{className:"font20 ml5"},mt==null?void 0:mt.exercise_name)),ht.createElement("div",{className:"flex gap-20px"},ht.createElement(U.ZP,{icon:ht.createElement("i",{className:"iconfont icon-bianjizuoye"}),onClick:()=>{P.history.push(`/classrooms/${$==null?void 0:$.coursesId}/exercise/${$==null?void 0:$.exerciseId}/sumup/edit?${ue.toString()}`)}},"\u7F16\u8F91"),ht.createElement(U.ZP,{type:"primary",icon:ht.createElement(fe.Z,{rev:void 0}),onClick:()=>Fe(void 0,null,function*(){yield Ut()().set({margin:10,image:{type:"jpeg",quality:.95},jsPDF:{unit:"pt",format:"a4",orientation:"landscape"},filename:`${je==null?void 0:je.big_title}.pdf`,html2canvas:{letterRendering:!0,useCORS:!0,allowTaint:!1,scale:1,dpi:300},pagebreak:{mode:["avoid-all","css"]}}).from(Nt.current).save()})},"\u5BFC\u51FA"),ht.createElement(U.ZP,{icon:ht.createElement(ee.Z,{rev:void 0}),onClick:()=>{ve({type:"exercise/setActionTabs",payload:{title:"\u8003\u8BD5\u603B\u7ED3\u8BBE\u7F6E",isEdit:!0}})}},"\u5BFC\u51FA\u8BBE\u7F6E"))),ht.createElement("div",{className:"mt20 bg-white pt40 pb40 pr30 pl30"},ht.createElement("section",{ref:Nt,className:""},qe===1&&ht.createElement(de,null),qe===2&&ht.createElement(ft,null))),ht.createElement(Et.Z,null)))};var V=(0,P.connect)(({user:T,exercise:J})=>({user:T,exercise:J}))(De)},45937:function(Cn,tt,b){"use strict";b.d(tt,{U:function(){return A}});var P=b(59301),re=Object.defineProperty,ge=Object.getOwnPropertySymbols,se=Object.prototype.hasOwnProperty,U=Object.prototype.propertyIsEnumerable,f=(E,x,h)=>x in E?re(E,x,{enumerable:!0,configurable:!0,writable:!0,value:h}):E[x]=h,fe=(E,x)=>{for(var h in x||(x={}))se.call(x,h)&&f(E,h,x[h]);if(ge)for(var h of ge(x))U.call(x,h)&&f(E,h,x[h]);return E},ee=(E,x,h)=>new Promise((p,_)=>{var C=K=>{try{R(h.next(K))}catch(B){_(B)}},F=K=>{try{R(h.throw(K))}catch(B){_(B)}},R=K=>K.done?p(K.value):Promise.resolve(K.value).then(C,F);R((h=h.apply(E,x)).next())});function A(E,x){const[h,p]=(0,P.useState)(x),[_,C]=(0,P.useState)(!1),[F,R]=(0,P.useState)();return[h,_,(B,D=!1)=>ee(this,null,function*(){const I=D?x:fe(fe({},h),B);C(!0),p(I);const S=yield E(I);return C(!1),R(S),S}),F,R]}},81428:function(Cn,tt,b){"use strict";b.d(tt,{AL:function(){return I},Iy:function(){return x},Qv:function(){return _},ez:function(){return D},jb:function(){return h}});var P=b(32834),re=b.n(P),ge=b(11690),se=b.n(ge);let U=1;function f(Y,ie){const de=Y.match(/^(\s+)(?:```)/);if(de===null)return ie;const pe=de[1];return ie.split(`
`).map(W=>{const M=W.match(/^\s+/);if(M===null)return W;const[X]=M;return X.length>=pe.length?W.slice(pe.length):W}).join(`
`)}let fe=[],ee=["<ul>"];const A=new(re()).Renderer,E=/^ *(#{1,6}) *([^\n]+?) *(?:#+ *)?(?:\n+|$)/;function x(){fe.length=0,ee=["<ul>"]}const h={overflow:"hidden",WebkitBoxOrient:"vertical",display:"-webkit-box",WebkitLineClamp:2};function p(Y,ie,de,pe){if(ie>=Y.length||Y[ie].level<=de)return ie;var W=Y[ie];pe.push("<li><a href='#"+U+W.anchor+"'>"+W.text+"</a>"),ie++;var M=[];return ie=p(Y,ie,W.level,M),M.length>0&&(pe.push("<ul>"),M.forEach(function(X){pe.push(X)}),pe.push("</ul>")),pe.push("</li>"),ie=p(Y,ie,de,pe),ie}function _(){return p(fe,0,0,ee),ee.push("</ul>"),ee.join("")}const C={heading(Y){const ie=E.exec(Y);if(U+=1,ie)return{type:"heading",raw:ie[0],depth:ie[1].length,text:ie[2]}},fences(Y){const ie=this.rules.block.fences.exec(Y);if(ie){const de=ie[0];let pe=f(de,ie[3]||"");const W=ie[2]?ie[2].trim():ie[2];if(["latex","katex","math"].indexOf(W)>=0){const M=K(),X=pe;pe=M,B[M]={type:"block",expression:X}}return{type:"code",raw:de,lang:W,text:pe}}}},F=/(?:\${2})([^\n`]+?)(?:\${2})/gi;let R=0;const K=()=>`__special_katext_id_${R++}__`;let B={};function D(){return B}function I(){R=0,B={}}function S(Y){return Y=Y.replace(F,(ie,de)=>{const pe=K();return B[pe]={type:"inline",expression:de},pe}),Y}const q=A.listitem;A.listitem=function(Y){return q(S(Y))};const ae=A.paragraph;A.paragraph=function(Y){return ae(S(Y))};const j=A.tablecell;A.tablecell=function(Y,ie){return j(S(Y),ie)},A.code=function(Y,ie,de){const pe=(ie||"").match(/\S*/)[0];return pe?["latex","katex","math"].indexOf(pe)>=0?`<p class='editormd-tex'>${Y}</p>`:`<pre class="prettyprint linenums"><code class="language-${ie}">${de?Y:(0,ge.escape)(Y,!0)}</code></pre>
`:'<pre class="prettyprint linenums"><code>'+(de?Y:(0,ge.escape)(Y,!0))+"</code></pre>"},A.heading=function(Y,ie,de){let pe=this.options.headerPrefix+de.toLowerCase().replace(/[^\w\\u4e00-\\u9fa5]]+/g,"-");return fe.push({anchor:pe,level:ie,text:Y}),"<h"+ie+' id="'+U+pe+'">'+Y+"</h"+ie+">"},re().setOptions({silent:!0,gfm:!0,pedantic:!1}),re().use({tokenizer:C,renderer:A}),tt.ZP=re()},64018:function(){var Cn,tt,b,P=!1,re,ge;window.PR_SHOULD_USE_CONTINUATION=!0;var se,U;(function(){var f=window,fe=["break,continue,do,else,for,if,return,while"],ee=[fe,"auto,case,char,const,default,double,enum,extern,float,goto,inline,int,long,register,restrict,short,signed,sizeof,static,struct,switch,typedef,union,unsigned,void,volatile"],A=[ee,"catch,class,delete,false,import,new,operator,private,protected,public,this,throw,true,try,typeof"],E=[A,"alignas,alignof,align_union,asm,axiom,bool,concept,concept_map,const_cast,constexpr,decltype,delegate,dynamic_cast,explicit,export,friend,generic,late_check,mutable,namespace,noexcept,noreturn,nullptr,property,reinterpret_cast,static_assert,static_cast,template,typeid,typename,using,virtual,where"],x=[A,"abstract,assert,boolean,byte,extends,finally,final,implements,import,instanceof,interface,null,native,package,strictfp,super,synchronized,throws,transient"],h=[A,"abstract,add,alias,as,ascending,async,await,base,bool,by,byte,checked,decimal,delegate,descending,dynamic,event,finally,fixed,foreach,from,get,global,group,implicit,in,interface,internal,into,is,join,let,lock,null,object,out,override,orderby,params,partial,readonly,ref,remove,sbyte,sealed,select,set,stackalloc,string,select,uint,ulong,unchecked,unsafe,ushort,value,var,virtual,where,yield"],p="all,and,by,catch,class,else,extends,false,finally,for,if,in,is,isnt,loop,new,no,not,null,of,off,on,or,return,super,then,throw,true,try,unless,until,when,while,yes",_=[A,"abstract,async,await,constructor,debugger,enum,eval,export,function,get,implements,instanceof,interface,let,null,set,undefined,var,with,yield,Infinity,NaN"],C="caller,delete,die,do,dump,elsif,eval,exit,foreach,for,goto,if,import,last,local,my,next,no,our,print,package,redo,require,sub,undef,unless,until,use,wantarray,while,BEGIN,END",F=[fe,"and,as,assert,class,def,del,elif,except,exec,finally,from,global,import,in,is,lambda,nonlocal,not,or,pass,print,raise,try,with,yield,False,True,None"],R=[fe,"alias,and,begin,case,class,def,defined,elsif,end,ensure,false,in,module,next,nil,not,or,redo,rescue,retry,self,super,then,true,undef,unless,until,when,yield,BEGIN,END"],K=[fe,"case,done,elif,esac,eval,fi,function,in,local,set,then,until"],B=[E,h,x,_,C,F,R,K],D=/^(DIR|FILE|array|vector|(de|priority_)?queue|(forward_)?list|stack|(const_)?(reverse_)?iterator|(unordered_)?(multi)?(set|map)|bitset|u?(int|float)\d*)\b/,I="str",S="kwd",q="com",ae="typ",j="lit",Y="pun",ie="pln",de="tag",pe="dec",W="src",M="atn",X="atv",G="nocode",ne="(?:^^\\.?|[+-]|[!=]=?=?|\\#|%=?|&&?=?|\\(|\\*=?|[+\\-]=|->|\\/=?|::?|<<?=?|>>?>?=?|,|;|\\?|@|\\[|~|{|\\^\\^?=?|\\|\\|?=?|break|case|continue|delete|do|else|finally|instanceof|return|throw|try|typeof)\\s*";function Z(_e){for(var N=0,Fe=!1,De=!1,V=0,T=_e.length;V<T;++V){var J=_e[V];if(J.ignoreCase)De=!0;else if(/[a-z]/i.test(J.source.replace(/\\u[0-9a-f]{4}|\\x[0-9a-f]{2}|\\[^ux]/gi,""))){Fe=!0,De=!1;break}}var ve={b:8,t:9,n:10,v:11,f:12,r:13};function te(ke){var Le=ke.charCodeAt(0);if(Le!==92)return Le;var mt=ke.charAt(1);return Le=ve[mt],Le||("0"<=mt&&mt<="7"?parseInt(ke.substring(1),8):mt==="u"||mt==="x"?parseInt(ke.substring(2),16):ke.charCodeAt(1))}function $(ke){if(ke<32)return(ke<16?"\\x0":"\\x")+ke.toString(16);var Le=String.fromCharCode(ke);return Le==="\\"||Le==="-"||Le==="]"||Le==="^"?"\\"+Le:Le}function ue(ke){var Le=ke.substring(1,ke.length-1).match(new RegExp("\\\\u[0-9A-Fa-f]{4}|\\\\x[0-9A-Fa-f]{2}|\\\\[0-3][0-7]{0,2}|\\\\[0-7]{1,2}|\\\\[\\s\\S]|-|[^-\\\\]","g")),mt=[],je=Le[0]==="^",qe=["["];je&&qe.push("^");for(var ut=je?1:0,Nt=Le.length;ut<Nt;++ut){var It=Le[ut];if(/\\[bdsw]/i.test(It))qe.push(It);else{var bt=te(It),on;ut+2<Nt&&Le[ut+1]==="-"?(on=te(Le[ut+2]),ut+=2):on=bt,mt.push([bt,on]),on<65||bt>122||(on<65||bt>90||mt.push([Math.max(65,bt)|32,Math.min(on,90)|32]),on<97||bt>122||mt.push([Math.max(97,bt)&-33,Math.min(on,122)&-33]))}}mt.sort(function(Ln,Mt){return Ln[0]-Mt[0]||Mt[1]-Ln[1]});for(var rn=[],Ct=[],ut=0;ut<mt.length;++ut){var gn=mt[ut];gn[0]<=Ct[1]+1?Ct[1]=Math.max(Ct[1],gn[1]):rn.push(Ct=gn)}for(var ut=0;ut<rn.length;++ut){var gn=rn[ut];qe.push($(gn[0])),gn[1]>gn[0]&&(gn[1]+1>gn[0]&&qe.push("-"),qe.push($(gn[1])))}return qe.push("]"),qe.join("")}function Ie(ke){for(var Le=ke.source.match(new RegExp("(?:\\[(?:[^\\x5C\\x5D]|\\\\[\\s\\S])*\\]|\\\\u[A-Fa-f0-9]{4}|\\\\x[A-Fa-f0-9]{2}|\\\\[0-9]+|\\\\[^ux0-9]|\\(\\?[:!=]|[\\(\\)\\^]|[^\\x5B\\x5C\\(\\)\\^]+)","g")),mt=Le.length,je=[],qe=0,ut=0;qe<mt;++qe){var Nt=Le[qe];if(Nt==="(")++ut;else if(Nt.charAt(0)==="\\"){var It=+Nt.substring(1);It&&(It<=ut?je[It]=-1:Le[qe]=$(It))}}for(var qe=1;qe<je.length;++qe)je[qe]===-1&&(je[qe]=++N);for(var qe=0,ut=0;qe<mt;++qe){var Nt=Le[qe];if(Nt==="(")++ut,je[ut]||(Le[qe]="(?:");else if(Nt.charAt(0)==="\\"){var It=+Nt.substring(1);It&&It<=ut&&(Le[qe]="\\"+je[It])}}for(var qe=0;qe<mt;++qe)Le[qe]==="^"&&Le[qe+1]!=="^"&&(Le[qe]="");if(ke.ignoreCase&&Fe)for(var qe=0;qe<mt;++qe){var Nt=Le[qe],bt=Nt.charAt(0);Nt.length>=2&&bt==="["?Le[qe]=ue(Nt):bt!=="\\"&&(Le[qe]=Nt.replace(/[a-zA-Z]/g,function(Ct){var gn=Ct.charCodeAt(0);return"["+String.fromCharCode(gn&-33,gn|32)+"]"}))}return Le.join("")}for(var Ce=[],V=0,T=_e.length;V<T;++V){var J=_e[V];if(J.global||J.multiline)throw new Error(""+J);Ce.push("(?:"+Ie(J)+")")}return new RegExp(Ce.join("|"),De?"gi":"g")}function m(_e,N){var Fe=/(?:^|\s)nocode(?:\s|$)/,De=[],V=0,T=[],J=0;function ve(te){var $=te.nodeType;if($==1){if(Fe.test(te.className))return;for(var ue=te.firstChild;ue;ue=ue.nextSibling)ve(ue);var Ie=te.nodeName.toLowerCase();(Ie==="br"||Ie==="li")&&(De[J]=`
`,T[J<<1]=V++,T[J++<<1|1]=te)}else if($==3||$==4){var Ce=te.nodeValue;Ce.length&&(N?Ce=Ce.replace(/\r\n?/g,`
`):Ce=Ce.replace(/[ \t\r\n]+/g," "),De[J]=Ce,T[J<<1]=V,V+=Ce.length,T[J++<<1|1]=te)}}return ve(_e),{sourceCode:De.join("").replace(/\n$/,""),spans:T}}function v(_e,N,Fe,De,V){if(Fe){var T={sourceNode:_e,pre:1,langExtension:null,numberLines:null,sourceCode:Fe,spans:null,basePos:N,decorations:null};De(T),V.push.apply(V,T.decorations)}}var Q=/\S/;function he(_e){for(var N=void 0,Fe=_e.firstChild;Fe;Fe=Fe.nextSibling){var De=Fe.nodeType;N=De===1?N?_e:Fe:De===3&&Q.test(Fe.nodeValue)?_e:N}return N===_e?void 0:N}function Ue(_e,N){var Fe={},De;(function(){for(var J=_e.concat(N),ve=[],te={},$=0,ue=J.length;$<ue;++$){var Ie=J[$],Ce=Ie[3];if(Ce)for(var ke=Ce.length;--ke>=0;)Fe[Ce.charAt(ke)]=Ie;var Le=Ie[1],mt=""+Le;te.hasOwnProperty(mt)||(ve.push(Le),te[mt]=null)}ve.push(/[\0-\uffff]/),De=Z(ve)})();var V=N.length,T=function(J){for(var ve=J.sourceCode,te=J.basePos,$=J.sourceNode,ue=[te,ie],Ie=0,Ce=ve.match(De)||[],ke={},Le=0,mt=Ce.length;Le<mt;++Le){var je=Ce[Le],qe=ke[je],ut=void 0,Nt;if(typeof qe=="string")Nt=!1;else{var It=Fe[je.charAt(0)];if(It)ut=je.match(It[1]),qe=It[0];else{for(var bt=0;bt<V;++bt)if(It=N[bt],ut=je.match(It[1]),ut){qe=It[0];break}ut||(qe=ie)}Nt=qe.length>=5&&qe.substring(0,5)==="lang-",Nt&&!(ut&&typeof ut[1]=="string")&&(Nt=!1,qe=W),Nt||(ke[je]=qe)}var on=Ie;if(Ie+=je.length,!Nt)ue.push(te+on,qe);else{var rn=ut[1],Ct=je.indexOf(rn),gn=Ct+rn.length;ut[2]&&(gn=je.length-ut[2].length,Ct=gn-rn.length);var Ln=qe.substring(5);v($,te+on,je.substring(0,Ct),T,ue),v($,te+on+Ct,rn,Gt(Ln,rn),ue),v($,te+on+gn,je.substring(gn),T,ue)}}J.decorations=ue};return T}function Oe(_e){var N=[],Fe=[];_e.tripleQuotedStrings?N.push([I,/^(?:\'\'\'(?:[^\'\\]|\\[\s\S]|\'{1,2}(?=[^\']))*(?:\'\'\'|$)|\"\"\"(?:[^\"\\]|\\[\s\S]|\"{1,2}(?=[^\"]))*(?:\"\"\"|$)|\'(?:[^\\\']|\\[\s\S])*(?:\'|$)|\"(?:[^\\\"]|\\[\s\S])*(?:\"|$))/,null,`'"`]):_e.multiLineStrings?N.push([I,/^(?:\'(?:[^\\\']|\\[\s\S])*(?:\'|$)|\"(?:[^\\\"]|\\[\s\S])*(?:\"|$)|\`(?:[^\\\`]|\\[\s\S])*(?:\`|$))/,null,"'\"`"]):N.push([I,/^(?:\'(?:[^\\\'\r\n]|\\.)*(?:\'|$)|\"(?:[^\\\"\r\n]|\\.)*(?:\"|$))/,null,`"'`]),_e.verbatimStrings&&Fe.push([I,/^@\"(?:[^\"]|\"\")*(?:\"|$)/,null]);var De=_e.hashComments;De&&(_e.cStyleComments?(De>1?N.push([q,/^#(?:##(?:[^#]|#(?!##))*(?:###|$)|.*)/,null,"#"]):N.push([q,/^#(?:(?:define|e(?:l|nd)if|else|error|ifn?def|include|line|pragma|undef|warning)\b|[^\r\n]*)/,null,"#"]),Fe.push([I,/^<(?:(?:(?:\.\.\/)*|\/?)(?:[\w-]+(?:\/[\w-]+)+)?[\w-]+\.h(?:h|pp|\+\+)?|[a-z]\w*)>/,null])):N.push([q,/^#[^\r\n]*/,null,"#"])),_e.cStyleComments&&(Fe.push([q,/^\/\/[^\r\n]*/,null]),Fe.push([q,/^\/\*[\s\S]*?(?:\*\/|$)/,null]));var V=_e.regexLiterals;if(V){var T=V>1?"":`
\r`,J=T?".":"[\\S\\s]",ve="/(?=[^/*"+T+"])(?:[^/\\x5B\\x5C"+T+"]|\\x5C"+J+"|\\x5B(?:[^\\x5C\\x5D"+T+"]|\\x5C"+J+")*(?:\\x5D|$))+/";Fe.push(["lang-regex",RegExp("^"+ne+"("+ve+")")])}var te=_e.types;te&&Fe.push([ae,te]);var $=(""+_e.keywords).replace(/^ | $/g,"");$.length&&Fe.push([S,new RegExp("^(?:"+$.replace(/[\s,]+/g,"|")+")\\b"),null]),N.push([ie,/^\s+/,null,` \r
\xA0`]);var ue="^.[^\\s\\w.$@'\"`/\\\\]*";return _e.regexLiterals&&(ue+="(?!s*/)"),Fe.push([j,/^@[a-z_$][a-z_$@0-9]*/i,null],[ae,/^(?:[@_]?[A-Z]+[a-z][A-Za-z_$@0-9]*|\w+_t\b)/,null],[ie,/^[a-z_$][a-z_$@0-9]*/i,null],[j,new RegExp("^(?:0x[a-f0-9]+|(?:\\d(?:_\\d+)*\\d*(?:\\.\\d*)?|\\.\\d\\+)(?:e[+\\-]?\\d+)?)[a-z]*","i"),null,"0123456789"],[ie,/^\\[\s\S]?/,null],[Y,new RegExp(ue),null]),Ue(N,Fe)}var ft=Oe({keywords:B,hashComments:!0,cStyleComments:!0,multiLineStrings:!0,regexLiterals:!0});function Et(_e,N,Fe){for(var De=/(?:^|\s)nocode(?:\s|$)/,V=/\r\n?|\n/,T=_e.ownerDocument,J=T.createElement("li");_e.firstChild;)J.appendChild(_e.firstChild);var ve=[J];function te(Le){var mt=Le.nodeType;if(mt==1&&!De.test(Le.className))if(Le.nodeName==="br")$(Le),Le.parentNode&&Le.parentNode.removeChild(Le);else for(var je=Le.firstChild;je;je=je.nextSibling)te(je);else if((mt==3||mt==4)&&Fe){var qe=Le.nodeValue,ut=qe.match(V);if(ut){var Nt=qe.substring(0,ut.index);Le.nodeValue=Nt;var It=qe.substring(ut.index+ut[0].length);if(It){var bt=Le.parentNode;bt.insertBefore(T.createTextNode(It),Le.nextSibling)}$(Le),Nt||Le.parentNode.removeChild(Le)}}}function $(Le){for(;!Le.nextSibling;)if(Le=Le.parentNode,!Le)return;function mt(ut,Nt){var It=Nt?ut.cloneNode(!1):ut,bt=ut.parentNode;if(bt){var on=mt(bt,1),rn=ut.nextSibling;on.appendChild(It);for(var Ct=rn;Ct;Ct=rn)rn=Ct.nextSibling,on.appendChild(Ct)}return It}for(var je=mt(Le.nextSibling,0),qe;(qe=je.parentNode)&&qe.nodeType===1;)je=qe;ve.push(je)}for(var ue=0;ue<ve.length;++ue)te(ve[ue]);N===(N|0)&&ve[0].setAttribute("value",N);var Ie=T.createElement("ol");Ie.className="linenums";for(var Ce=Math.max(0,N-1|0)||0,ue=0,ke=ve.length;ue<ke;++ue)J=ve[ue],J.className="L"+(ue+Ce)%10,J.firstChild||J.appendChild(T.createTextNode("\xA0")),Ie.appendChild(J);_e.appendChild(Ie)}function Ft(_e){var N=/\bMSIE\s(\d+)/.exec(navigator.userAgent);N=N&&+N[1]<=8;var Fe=/\n/g,De=_e.sourceCode,V=De.length,T=0,J=_e.spans,ve=J.length,te=0,$=_e.decorations,ue=$.length,Ie=0;$[ue]=V;var Ce,ke;for(ke=Ce=0;ke<ue;)$[ke]!==$[ke+2]?($[Ce++]=$[ke++],$[Ce++]=$[ke++]):ke+=2;for(ue=Ce,ke=Ce=0;ke<ue;){for(var Le=$[ke],mt=$[ke+1],je=ke+2;je+2<=ue&&$[je+1]===mt;)je+=2;$[Ce++]=Le,$[Ce++]=mt,ke=je}ue=$.length=Ce;var qe=_e.sourceNode,ut="";qe&&(ut=qe.style.display,qe.style.display="none");try{for(var Nt=null;te<ve;){var It=J[te],bt=J[te+2]||V,on=$[Ie+2]||V,je=Math.min(bt,on),rn=J[te+1],Ct;if(rn.nodeType!==1&&(Ct=De.substring(T,je))){N&&(Ct=Ct.replace(Fe,"\r")),rn.nodeValue=Ct;var gn=rn.ownerDocument,Ln=gn.createElement("span");Ln.className=$[Ie+1];var Mt=rn.parentNode;Mt.replaceChild(Ln,rn),Ln.appendChild(rn),T<bt&&(J[te+1]=rn=gn.createTextNode(De.substring(je,bt)),Mt.insertBefore(rn,Ln.nextSibling))}T=je,T>=bt&&(te+=2),T>=on&&(Ie+=2)}}finally{qe&&(qe.style.display=ut)}}var Ut={};function Se(_e,N){for(var Fe=N.length;--Fe>=0;){var De=N[Fe];Ut.hasOwnProperty(De)?f.console&&console.warn("cannot override language handler %s",De):Ut[De]=_e}}function Gt(_e,N){return _e&&Ut.hasOwnProperty(_e)||(_e=/^\s*</.test(N)?"default-markup":"default-code"),Ut[_e]}Se(ft,["default-code"]),Se(Ue([],[[ie,/^[^<?]+/],[pe,/^<!\w[^>]*(?:>|$)/],[q,/^<\!--[\s\S]*?(?:-\->|$)/],["lang-",/^<\?([\s\S]+?)(?:\?>|$)/],["lang-",/^<%([\s\S]+?)(?:%>|$)/],[Y,/^(?:<[%?]|[%?]>)/],["lang-",/^<xmp\b[^>]*>([\s\S]+?)<\/xmp\b[^>]*>/i],["lang-js",/^<script\b[^>]*>([\s\S]*?)(<\/script\b[^>]*>)/i],["lang-css",/^<style\b[^>]*>([\s\S]*?)(<\/style\b[^>]*>)/i],["lang-in.tag",/^(<\/?[a-z][^<>]*>)/i]]),["default-markup","htm","html","mxml","xhtml","xml","xsl"]),Se(Ue([[ie,/^[\s]+/,null,` \r
`],[X,/^(?:\"[^\"]*\"?|\'[^\']*\'?)/,null,`"'`]],[[de,/^^<\/?[a-z](?:[\w.:-]*\w)?|\/?>$/i],[M,/^(?!style[\s=]|on)[a-z](?:[\w:-]*\w)?/i],["lang-uq.val",/^=\s*([^>\'\"\s]*(?:[^>\'\"\s\/]|\/(?=\s)))/],[Y,/^[=<>\/]+/],["lang-js",/^on\w+\s*=\s*\"([^\"]+)\"/i],["lang-js",/^on\w+\s*=\s*\'([^\']+)\'/i],["lang-js",/^on\w+\s*=\s*([^\"\'>\s]+)/i],["lang-css",/^style\s*=\s*\"([^\"]+)\"/i],["lang-css",/^style\s*=\s*\'([^\']+)\'/i],["lang-css",/^style\s*=\s*([^\"\'>\s]+)/i]]),["in.tag"]),Se(Ue([],[[X,/^[\s\S]+/]]),["uq.val"]),Se(Oe({keywords:E,hashComments:!0,cStyleComments:!0,types:D}),["c","cc","cpp","cxx","cyc","m"]),Se(Oe({keywords:"null,true,false"}),["json"]),Se(Oe({keywords:h,hashComments:!0,cStyleComments:!0,verbatimStrings:!0,types:D}),["cs"]),Se(Oe({keywords:x,cStyleComments:!0}),["java"]),Se(Oe({keywords:K,hashComments:!0,multiLineStrings:!0}),["bash","bsh","csh","sh"]),Se(Oe({keywords:F,hashComments:!0,multiLineStrings:!0,tripleQuotedStrings:!0}),["cv","py","python"]),Se(Oe({keywords:C,hashComments:!0,multiLineStrings:!0,regexLiterals:2}),["perl","pl","pm"]),Se(Oe({keywords:R,hashComments:!0,multiLineStrings:!0,regexLiterals:!0}),["rb","ruby"]),Se(Oe({keywords:_,cStyleComments:!0,regexLiterals:!0}),["javascript","js","ts","typescript"]),Se(Oe({keywords:p,hashComments:3,cStyleComments:!0,multilineStrings:!0,tripleQuotedStrings:!0,regexLiterals:!0}),["coffee"]),Se(Ue([],[[I,/^[\s\S]+/]]),["regex"]);function ht(_e){var N=_e.langExtension;try{var Fe=m(_e.sourceNode,_e.pre),De=Fe.sourceCode;_e.sourceCode=De,_e.spans=Fe.spans,_e.basePos=0,Gt(N,De)(_e),Ft(_e)}catch(V){f.console&&console.log(V&&V.stack||V)}}function tn(_e,N,Fe){var De=Fe||!1,V=N||null,T=document.createElement("div");T.innerHTML="<pre>"+_e+"</pre>",T=T.firstChild,De&&Et(T,De,!0);var J={langExtension:V,numberLines:De,sourceNode:T,pre:1,sourceCode:null,basePos:null,spans:null,decorations:null};return ht(J),T.innerHTML}function dt(_e,N){var Fe=N||document.body,De=Fe.ownerDocument||document;function V(It){return Fe.getElementsByTagName(It)}for(var T=[V("pre"),V("code"),V("xmp")],J=[],ve=0;ve<T.length;++ve)for(var te=0,$=T[ve].length;te<$;++te)J.push(T[ve][te]);T=null;var ue=Date;ue.now||(ue={now:function(){return+new Date}});var Ie=0,Ce=/\blang(?:uage)?-([\w.]+)(?!\S)/,ke=/\bprettyprint\b/,Le=/\bprettyprinted\b/,mt=/pre|xmp/i,je=/^code$/i,qe=/^(?:pre|code|xmp)$/i,ut={};function Nt(){for(var It=f.PR_SHOULD_USE_CONTINUATION?ue.now()+250:1/0;Ie<J.length&&ue.now()<It;Ie++){for(var bt=J[Ie],on=ut,rn=bt;rn=rn.previousSibling;){var Ct=rn.nodeType,gn=(Ct===7||Ct===8)&&rn.nodeValue;if(gn?!/^\??prettify\b/.test(gn):Ct!==3||/\S/.test(rn.nodeValue))break;if(gn){on={},gn.replace(/\b(\w+)=([\w:.%+-]+)/g,function(Wt,an,_n){on[an]=_n});break}}var Ln=bt.className;if((on!==ut||ke.test(Ln))&&!Le.test(Ln)){for(var Mt=!1,hn=bt.parentNode;hn;hn=hn.parentNode){var We=hn.tagName;if(qe.test(We)&&hn.className&&ke.test(hn.className)){Mt=!0;break}}if(!Mt){bt.className+=" prettyprinted";var Qe=on.lang;if(!Qe){Qe=Ln.match(Ce);var He;!Qe&&(He=he(bt))&&je.test(He.tagName)&&(Qe=He.className.match(Ce)),Qe&&(Qe=Qe[1])}var z;if(mt.test(bt.tagName))z=1;else{var le=bt.currentStyle,me=De.defaultView,Be=le?le.whiteSpace:me&&me.getComputedStyle?me.getComputedStyle(bt,null).getPropertyValue("white-space"):0;z=Be&&Be.substring(0,3)==="pre"}var be=on.linenums;(be=be==="true"||+be)||(be=Ln.match(/\blinenums\b(?::(\d+))?/),be=be?be[1]&&be[1].length?+be[1]:!0:!1),be&&Et(bt,be,z);var Tt={langExtension:Qe,sourceNode:bt,numberLines:be,pre:z,sourceCode:null,basePos:null,spans:null,decorations:null};ht(Tt)}}}Ie<J.length?f.setTimeout(Nt,250):typeof _e=="function"&&_e()}Nt()}var Je=f.PR={createSimpleLexer:Ue,registerLangHandler:Se,sourceDecorator:Oe,PR_ATTRIB_NAME:M,PR_ATTRIB_VALUE:X,PR_COMMENT:q,PR_DECLARATION:pe,PR_KEYWORD:S,PR_LITERAL:j,PR_NOCODE:G,PR_PLAIN:ie,PR_PUNCTUATION:Y,PR_SOURCE:W,PR_STRING:I,PR_TAG:de,PR_TYPE:ae,prettyPrintOne:P?f.prettyPrintOne=tn:se=tn,prettyPrint:U=P?f.prettyPrint=dt:U=dt},xe=f.define;typeof xe=="function"&&xe.amd&&xe("google-code-prettify",[],function(){return Je})})()},25769:function(Cn,tt,b){"use strict";var P=b(98040),re={"text/plain":"Text","text/html":"Url",default:"Text"},ge="Copy to clipboard: #{key}, Enter";function se(f){var fe=(/mac os x/i.test(navigator.userAgent)?"\u2318":"Ctrl")+"+C";return f.replace(/#{\s*key\s*}/g,fe)}function U(f,fe){var ee,A,E,x,h,p,_=!1;fe||(fe={}),ee=fe.debug||!1;try{E=P(),x=document.createRange(),h=document.getSelection(),p=document.createElement("span"),p.textContent=f,p.ariaHidden="true",p.style.all="unset",p.style.position="fixed",p.style.top=0,p.style.clip="rect(0, 0, 0, 0)",p.style.whiteSpace="pre",p.style.webkitUserSelect="text",p.style.MozUserSelect="text",p.style.msUserSelect="text",p.style.userSelect="text",p.addEventListener("copy",function(F){if(F.stopPropagation(),fe.format)if(F.preventDefault(),typeof F.clipboardData=="undefined"){ee&&console.warn("unable to use e.clipboardData"),ee&&console.warn("trying IE specific stuff"),window.clipboardData.clearData();var R=re[fe.format]||re.default;window.clipboardData.setData(R,f)}else F.clipboardData.clearData(),F.clipboardData.setData(fe.format,f);fe.onCopy&&(F.preventDefault(),fe.onCopy(F.clipboardData))}),document.body.appendChild(p),x.selectNodeContents(p),h.addRange(x);var C=document.execCommand("copy");if(!C)throw new Error("copy command was unsuccessful");_=!0}catch(F){ee&&console.error("unable to copy using execCommand: ",F),ee&&console.warn("trying IE specific stuff");try{window.clipboardData.setData(fe.format||"text",f),fe.onCopy&&fe.onCopy(window.clipboardData),_=!0}catch(R){ee&&console.error("unable to copy using clipboardData: ",R),ee&&console.error("falling back to prompt"),A=se("message"in fe?fe.message:ge),window.prompt(A,f)}}finally{h&&(typeof h.removeRange=="function"?h.removeRange(x):h.removeAllRanges()),p&&document.body.removeChild(p),E()}return _}Cn.exports=U},97774:function(Cn,tt,b){"use strict";Object.defineProperty(tt,"__esModule",{value:!0}),tt.default=void 0;var P=Object.assign||function(F){for(var R=1;R<arguments.length;R++){var K=arguments[R];for(var B in K)Object.prototype.hasOwnProperty.call(K,B)&&(F[B]=K[B])}return F},re=function(){function F(R,K){for(var B=0;B<K.length;B++){var D=K[B];D.enumerable=D.enumerable||!1,D.configurable=!0,"value"in D&&(D.writable=!0),Object.defineProperty(R,D.key,D)}}return function(R,K,B){return K&&F(R.prototype,K),B&&F(R,B),R}}(),ge=b(59301),se=x(ge),U=b(12708),f=x(U),fe=b(53291),ee=x(fe),A=b(47242),E=b(65429);function x(F){return F&&F.__esModule?F:{default:F}}function h(F,R){if(!(F instanceof R))throw new TypeError("Cannot call a class as a function")}function p(F,R){if(!F)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return R&&(typeof R=="object"||typeof R=="function")?R:F}function _(F,R){if(typeof R!="function"&&R!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof R);F.prototype=Object.create(R&&R.prototype,{constructor:{value:F,enumerable:!1,writable:!0,configurable:!0}}),R&&(Object.setPrototypeOf?Object.setPrototypeOf(F,R):F.__proto__=R)}var C=function(F){_(R,F);function R(K){h(this,R);var B=p(this,(R.__proto__||Object.getPrototypeOf(R)).call(this,K));return B.getEchartsInstance=function(){return B.echartsLib.getInstanceByDom(B.echartsElement)||B.echartsLib.init(B.echartsElement,B.props.theme,B.props.opts)},B.dispose=function(){if(B.echartsElement){try{(0,A.clear)(B.echartsElement)}catch(D){console.warn(D)}B.echartsLib.dispose(B.echartsElement)}},B.rerender=function(){var D=B.props,I=D.onEvents,S=D.onChartReady,q=B.renderEchartDom();B.bindEvents(q,I||{}),typeof S=="function"&&B.props.onChartReady(q),B.echartsElement&&(0,A.bind)(B.echartsElement,function(){try{q.resize()}catch(ae){console.warn(ae)}})},B.bindEvents=function(D,I){var S=function(j,Y){typeof j=="string"&&typeof Y=="function"&&D.on(j,function(ie){Y(ie,D)})};for(var q in I)Object.prototype.hasOwnProperty.call(I,q)&&S(q,I[q])},B.renderEchartDom=function(){var D=B.getEchartsInstance();return D.setOption(B.props.option,B.props.notMerge||!1,B.props.lazyUpdate||!1),B.props.showLoading?D.showLoading(B.props.loadingOption||null):D.hideLoading(),D},B.echartsLib=K.echarts,B.echartsElement=null,B}return re(R,[{key:"componentDidMount",value:function(){this.rerender()}},{key:"componentDidUpdate",value:function(B){if(!(typeof this.props.shouldSetOption=="function"&&!this.props.shouldSetOption(B,this.props))){if(!(0,ee.default)(B.theme,this.props.theme)||!(0,ee.default)(B.opts,this.props.opts)||!(0,ee.default)(B.onEvents,this.props.onEvents)){this.dispose(),this.rerender();return}var D=["option","notMerge","lazyUpdate","showLoading","loadingOption"];if(!(0,ee.default)((0,E.pick)(this.props,D),(0,E.pick)(B,D))){var I=this.renderEchartDom();if(!(0,ee.default)(B.style,this.props.style)||!(0,ee.default)(B.className,this.props.className))try{I.resize()}catch(S){console.warn(S)}}}}},{key:"componentWillUnmount",value:function(){this.dispose()}},{key:"render",value:function(){var B=this,D=this.props,I=D.style,S=D.className,q=P({height:300},I);return se.default.createElement("div",{ref:function(j){B.echartsElement=j},style:q,className:"echarts-for-react "+S})}}]),R}(ge.Component);tt.default=C,C.propTypes={option:f.default.object.isRequired,echarts:f.default.object,notMerge:f.default.bool,lazyUpdate:f.default.bool,style:f.default.object,className:f.default.string,theme:f.default.oneOfType([f.default.string,f.default.object]),onChartReady:f.default.func,showLoading:f.default.bool,loadingOption:f.default.object,onEvents:f.default.object,opts:f.default.shape({devicePixelRatio:f.default.number,renderer:f.default.oneOf(["canvas","svg"]),width:f.default.oneOfType([f.default.number,f.default.oneOf([null,void 0,"auto"])]),height:f.default.oneOfType([f.default.number,f.default.oneOf([null,void 0,"auto"])])}),shouldSetOption:f.default.func},C.defaultProps={echarts:{},notMerge:!1,lazyUpdate:!1,style:{},className:"",theme:null,onChartReady:function(){},showLoading:!1,loadingOption:null,onEvents:{},opts:{},shouldSetOption:function(){return!0}}},42441:function(Cn,tt,b){"use strict";var P;P={value:!0},tt.Z=void 0;var re=b(76411),ge=f(re),se=b(97774),U=f(se);function f(x){return x&&x.__esModule?x:{default:x}}function fe(x,h){if(!(x instanceof h))throw new TypeError("Cannot call a class as a function")}function ee(x,h){if(!x)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return h&&(typeof h=="object"||typeof h=="function")?h:x}function A(x,h){if(typeof h!="function"&&h!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof h);x.prototype=Object.create(h&&h.prototype,{constructor:{value:x,enumerable:!1,writable:!0,configurable:!0}}),h&&(Object.setPrototypeOf?Object.setPrototypeOf(x,h):x.__proto__=h)}var E=function(x){A(h,x);function h(p){fe(this,h);var _=ee(this,(h.__proto__||Object.getPrototypeOf(h)).call(this,p));return _.echartsLib=ge.default,_}return h}(U.default);tt.Z=E},65429:function(Cn,tt){"use strict";Object.defineProperty(tt,"__esModule",{value:!0});var b=tt.pick=function(re,ge){var se={};return ge.forEach(function(U){se[U]=re[U]}),se}},53291:function(Cn){"use strict";var tt=Array.isArray,b=Object.keys,P=Object.prototype.hasOwnProperty;Cn.exports=function re(ge,se){if(ge===se)return!0;if(ge&&se&&typeof ge=="object"&&typeof se=="object"){var U=tt(ge),f=tt(se),fe,ee,A;if(U&&f){if(ee=ge.length,ee!=se.length)return!1;for(fe=ee;fe--!==0;)if(!re(ge[fe],se[fe]))return!1;return!0}if(U!=f)return!1;var E=ge instanceof Date,x=se instanceof Date;if(E!=x)return!1;if(E&&x)return ge.getTime()==se.getTime();var h=ge instanceof RegExp,p=se instanceof RegExp;if(h!=p)return!1;if(h&&p)return ge.toString()==se.toString();var _=b(ge);if(ee=_.length,ee!==b(se).length)return!1;for(fe=ee;fe--!==0;)if(!P.call(se,_[fe]))return!1;for(fe=ee;fe--!==0;)if(A=_[fe],!re(ge[A],se[A]))return!1;return!0}return ge!==ge&&se!==se}},6330:function(Cn,tt,b){"use strict";b.d(tt,{HT:function(){return tr},iZ:function(){return On}});var P={},re=function(L,k,ce,ye,Ge){var $e=new Worker(P[k]||(P[k]=URL.createObjectURL(new Blob([L+';addEventListener("error",function(e){e=e.error;postMessage({$e$:[e.message,e.code,e.stack]})})'],{type:"text/javascript"}))));return $e.onmessage=function(gt){var Bt=gt.data,Ht=Bt.$e$;if(Ht){var kt=new Error(Ht[0]);kt.code=Ht[1],kt.stack=Ht[2],Ge(kt,null)}else Ge(null,Bt)},$e.postMessage(ce,ye),$e},ge=Uint8Array,se=Uint16Array,U=Int32Array,f=new ge([0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0,0,0,0]),fe=new ge([0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13,0,0]),ee=new ge([16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15]),A=function(L,k){for(var ce=new se(31),ye=0;ye<31;++ye)ce[ye]=k+=1<<L[ye-1];for(var Ge=new U(ce[30]),ye=1;ye<30;++ye)for(var $e=ce[ye];$e<ce[ye+1];++$e)Ge[$e]=$e-ce[ye]<<5|ye;return{b:ce,r:Ge}},E=A(f,2),x=E.b,h=E.r;x[28]=258,h[258]=28;for(var p=A(fe,0),_=p.b,C=p.r,F=new se(32768),R=0;R<32768;++R){var K=(R&43690)>>1|(R&21845)<<1;K=(K&52428)>>2|(K&13107)<<2,K=(K&61680)>>4|(K&3855)<<4,F[R]=((K&65280)>>8|(K&255)<<8)>>1}for(var B=function(L,k,ce){for(var ye=L.length,Ge=0,$e=new se(k);Ge<ye;++Ge)L[Ge]&&++$e[L[Ge]-1];var gt=new se(k);for(Ge=1;Ge<k;++Ge)gt[Ge]=gt[Ge-1]+$e[Ge-1]<<1;var Bt;if(ce){Bt=new se(1<<k);var Ht=15-k;for(Ge=0;Ge<ye;++Ge)if(L[Ge])for(var kt=Ge<<4|L[Ge],St=k-L[Ge],$t=gt[L[Ge]-1]++<<St,oe=$t|(1<<St)-1;$t<=oe;++$t)Bt[F[$t]>>Ht]=kt}else for(Bt=new se(ye),Ge=0;Ge<ye;++Ge)L[Ge]&&(Bt[Ge]=F[gt[L[Ge]-1]++]>>15-L[Ge]);return Bt},D=new ge(288),R=0;R<144;++R)D[R]=8;for(var R=144;R<256;++R)D[R]=9;for(var R=256;R<280;++R)D[R]=7;for(var R=280;R<288;++R)D[R]=8;for(var I=new ge(32),R=0;R<32;++R)I[R]=5;var S=B(D,9,0),q=B(D,9,1),ae=B(I,5,0),j=B(I,5,1),Y=function(L){for(var k=L[0],ce=1;ce<L.length;++ce)L[ce]>k&&(k=L[ce]);return k},ie=function(L,k,ce){var ye=k/8|0;return(L[ye]|L[ye+1]<<8)>>(k&7)&ce},de=function(L,k){var ce=k/8|0;return(L[ce]|L[ce+1]<<8|L[ce+2]<<16)>>(k&7)},pe=function(L){return(L+7)/8|0},W=function(L,k,ce){return(k==null||k<0)&&(k=0),(ce==null||ce>L.length)&&(ce=L.length),new ge(L.subarray(k,ce))},M={UnexpectedEOF:0,InvalidBlockType:1,InvalidLengthLiteral:2,InvalidDistance:3,StreamFinished:4,NoStreamHandler:5,InvalidHeader:6,NoCallback:7,InvalidUTF8:8,ExtraFieldTooLong:9,InvalidDate:10,FilenameTooLong:11,StreamFinishing:12,InvalidZipData:13,UnknownCompressionMethod:14},X=["unexpected EOF","invalid block type","invalid length/literal","invalid distance","stream finished","no stream handler",,"no callback","invalid UTF-8 data","extra field too long","date not in range 1980-2099","filename too long","stream finishing","invalid zip data"],G=function(L,k,ce){var ye=new Error(k||X[L]);if(ye.code=L,Error.captureStackTrace&&Error.captureStackTrace(ye,G),!ce)throw ye;return ye},ne=function(L,k,ce,ye){var Ge=L.length,$e=ye?ye.length:0;if(!Ge||k.f&&!k.l)return ce||new ge(0);var gt=!ce,Bt=gt||k.i!=2,Ht=k.i;gt&&(ce=new ge(Ge*3));var kt=function(fr){var hr=ce.length;if(fr>hr){var Rr=new ge(Math.max(hr*2,fr));Rr.set(ce),ce=Rr}},St=k.f||0,$t=k.p||0,oe=k.b||0,Ve=k.l,Te=k.d,Me=k.m,ze=k.n,at=Ge*8;do{if(!Ve){St=ie(L,$t,1);var Dt=ie(L,$t+1,3);if($t+=3,Dt)if(Dt==1)Ve=q,Te=j,Me=9,ze=5;else if(Dt==2){var Xe=ie(L,$t,31)+257,nt=ie(L,$t+10,15)+4,et=Xe+ie(L,$t+5,31)+1;$t+=14;for(var ot=new ge(et),Qt=new ge(19),en=0;en<nt;++en)Qt[ee[en]]=ie(L,$t+en*3,7);$t+=nt*3;for(var An=Y(Qt),bn=(1<<An)-1,Fn=B(Qt,An,1),en=0;en<et;){var wn=Fn[ie(L,$t,bn)];$t+=wn&15;var yt=wn>>4;if(yt<16)ot[en++]=yt;else{var Sn=0,dn=0;for(yt==16?(dn=3+ie(L,$t,3),$t+=2,Sn=ot[en-1]):yt==17?(dn=3+ie(L,$t,7),$t+=3):yt==18&&(dn=11+ie(L,$t,127),$t+=7);dn--;)ot[en++]=Sn}}var Xn=ot.subarray(0,Xe),Mn=ot.subarray(Xe);Me=Y(Xn),ze=Y(Mn),Ve=B(Xn,Me,1),Te=B(Mn,ze,1)}else G(1);else{var yt=pe($t)+4,it=L[yt-4]|L[yt-3]<<8,Ne=yt+it;if(Ne>Ge){Ht&&G(0);break}Bt&&kt(oe+it),ce.set(L.subarray(yt,Ne),oe),k.b=oe+=it,k.p=$t=Ne*8,k.f=St;continue}if($t>at){Ht&&G(0);break}}Bt&&kt(oe+131072);for(var cr=(1<<Me)-1,ln=(1<<ze)-1,Vn=$t;;Vn=$t){var Sn=Ve[de(L,$t)&cr],nr=Sn>>4;if($t+=Sn&15,$t>at){Ht&&G(0);break}if(Sn||G(2),nr<256)ce[oe++]=nr;else if(nr==256){Vn=$t,Ve=null;break}else{var Jn=nr-254;if(nr>264){var en=nr-257,Kn=f[en];Jn=ie(L,$t,(1<<Kn)-1)+x[en],$t+=Kn}var Nn=Te[de(L,$t)&ln],xn=Nn>>4;Nn||G(3),$t+=Nn&15;var Mn=_[xn];if(xn>3){var Kn=fe[xn];Mn+=de(L,$t)&(1<<Kn)-1,$t+=Kn}if($t>at){Ht&&G(0);break}Bt&&kt(oe+131072);var Pn=oe+Jn;if(oe<Mn){var In=$e-Mn,pr=Math.min(Mn,Pn);for(In+oe<0&&G(3);oe<pr;++oe)ce[oe]=ye[In+oe]}for(;oe<Pn;++oe)ce[oe]=ce[oe-Mn]}}k.l=Ve,k.p=Vn,k.b=oe,k.f=St,Ve&&(St=1,k.m=Me,k.d=Te,k.n=ze)}while(!St);return oe!=ce.length&&gt?W(ce,0,oe):ce.subarray(0,oe)},Z=function(L,k,ce){ce<<=k&7;var ye=k/8|0;L[ye]|=ce,L[ye+1]|=ce>>8},m=function(L,k,ce){ce<<=k&7;var ye=k/8|0;L[ye]|=ce,L[ye+1]|=ce>>8,L[ye+2]|=ce>>16},v=function(L,k){for(var ce=[],ye=0;ye<L.length;++ye)L[ye]&&ce.push({s:ye,f:L[ye]});var Ge=ce.length,$e=ce.slice();if(!Ge)return{t:Ft,l:0};if(Ge==1){var gt=new ge(ce[0].s+1);return gt[ce[0].s]=1,{t:gt,l:1}}ce.sort(function(Ne,Xe){return Ne.f-Xe.f}),ce.push({s:-1,f:25001});var Bt=ce[0],Ht=ce[1],kt=0,St=1,$t=2;for(ce[0]={s:-1,f:Bt.f+Ht.f,l:Bt,r:Ht};St!=Ge-1;)Bt=ce[ce[kt].f<ce[$t].f?kt++:$t++],Ht=ce[kt!=St&&ce[kt].f<ce[$t].f?kt++:$t++],ce[St++]={s:-1,f:Bt.f+Ht.f,l:Bt,r:Ht};for(var oe=$e[0].s,ye=1;ye<Ge;++ye)$e[ye].s>oe&&(oe=$e[ye].s);var Ve=new se(oe+1),Te=Q(ce[St-1],Ve,0);if(Te>k){var ye=0,Me=0,ze=Te-k,at=1<<ze;for($e.sort(function(Xe,nt){return Ve[nt.s]-Ve[Xe.s]||Xe.f-nt.f});ye<Ge;++ye){var Dt=$e[ye].s;if(Ve[Dt]>k)Me+=at-(1<<Te-Ve[Dt]),Ve[Dt]=k;else break}for(Me>>=ze;Me>0;){var yt=$e[ye].s;Ve[yt]<k?Me-=1<<k-Ve[yt]++-1:++ye}for(;ye>=0&&Me;--ye){var it=$e[ye].s;Ve[it]==k&&(--Ve[it],++Me)}Te=k}return{t:new ge(Ve),l:Te}},Q=function(L,k,ce){return L.s==-1?Math.max(Q(L.l,k,ce+1),Q(L.r,k,ce+1)):k[L.s]=ce},he=function(L){for(var k=L.length;k&&!L[--k];);for(var ce=new se(++k),ye=0,Ge=L[0],$e=1,gt=function(Ht){ce[ye++]=Ht},Bt=1;Bt<=k;++Bt)if(L[Bt]==Ge&&Bt!=k)++$e;else{if(!Ge&&$e>2){for(;$e>138;$e-=138)gt(32754);$e>2&&(gt($e>10?$e-11<<5|28690:$e-3<<5|12305),$e=0)}else if($e>3){for(gt(Ge),--$e;$e>6;$e-=6)gt(8304);$e>2&&(gt($e-3<<5|8208),$e=0)}for(;$e--;)gt(Ge);$e=1,Ge=L[Bt]}return{c:ce.subarray(0,ye),n:k}},Ue=function(L,k){for(var ce=0,ye=0;ye<k.length;++ye)ce+=L[ye]*k[ye];return ce},Oe=function(L,k,ce){var ye=ce.length,Ge=pe(k+2);L[Ge]=ye&255,L[Ge+1]=ye>>8,L[Ge+2]=L[Ge]^255,L[Ge+3]=L[Ge+1]^255;for(var $e=0;$e<ye;++$e)L[Ge+$e+4]=ce[$e];return(Ge+4+ye)*8},ft=function(L,k,ce,ye,Ge,$e,gt,Bt,Ht,kt,St){Z(k,St++,ce),++Ge[256];for(var $t=v(Ge,15),oe=$t.t,Ve=$t.l,Te=v($e,15),Me=Te.t,ze=Te.l,at=he(oe),Dt=at.c,yt=at.n,it=he(Me),Ne=it.c,Xe=it.n,nt=new se(19),et=0;et<Dt.length;++et)++nt[Dt[et]&31];for(var et=0;et<Ne.length;++et)++nt[Ne[et]&31];for(var ot=v(nt,7),Qt=ot.t,en=ot.l,An=19;An>4&&!Qt[ee[An-1]];--An);var bn=kt+5<<3,Fn=Ue(Ge,D)+Ue($e,I)+gt,wn=Ue(Ge,oe)+Ue($e,Me)+gt+14+3*An+Ue(nt,Qt)+2*nt[16]+3*nt[17]+7*nt[18];if(Ht>=0&&bn<=Fn&&bn<=wn)return Oe(k,St,L.subarray(Ht,Ht+kt));var Sn,dn,Xn,Mn;if(Z(k,St,1+(wn<Fn)),St+=2,wn<Fn){Sn=B(oe,Ve,0),dn=oe,Xn=B(Me,ze,0),Mn=Me;var cr=B(Qt,en,0);Z(k,St,yt-257),Z(k,St+5,Xe-1),Z(k,St+10,An-4),St+=14;for(var et=0;et<An;++et)Z(k,St+3*et,Qt[ee[et]]);St+=3*An;for(var ln=[Dt,Ne],Vn=0;Vn<2;++Vn)for(var nr=ln[Vn],et=0;et<nr.length;++et){var Jn=nr[et]&31;Z(k,St,cr[Jn]),St+=Qt[Jn],Jn>15&&(Z(k,St,nr[et]>>5&127),St+=nr[et]>>12)}}else Sn=S,dn=D,Xn=ae,Mn=I;for(var et=0;et<Bt;++et){var Kn=ye[et];if(Kn>255){var Jn=Kn>>18&31;m(k,St,Sn[Jn+257]),St+=dn[Jn+257],Jn>7&&(Z(k,St,Kn>>23&31),St+=f[Jn]);var Nn=Kn&31;m(k,St,Xn[Nn]),St+=Mn[Nn],Nn>3&&(m(k,St,Kn>>5&8191),St+=fe[Nn])}else m(k,St,Sn[Kn]),St+=dn[Kn]}return m(k,St,Sn[256]),St+dn[256]},Et=new U([65540,131080,131088,131104,262176,1048704,1048832,2114560,2117632]),Ft=new ge(0),Ut=function(L,k,ce,ye,Ge,$e){var gt=$e.z||L.length,Bt=new ge(ye+gt+5*(1+Math.ceil(gt/7e3))+Ge),Ht=Bt.subarray(ye,Bt.length-Ge),kt=$e.l,St=($e.r||0)&7;if(k){St&&(Ht[0]=$e.r>>3);for(var $t=Et[k-1],oe=$t>>13,Ve=$t&8191,Te=(1<<ce)-1,Me=$e.p||new se(32768),ze=$e.h||new se(Te+1),at=Math.ceil(ce/3),Dt=2*at,yt=function(Zr){return(L[Zr]^L[Zr+1]<<at^L[Zr+2]<<Dt)&Te},it=new U(25e3),Ne=new se(288),Xe=new se(32),nt=0,et=0,ot=$e.i||0,Qt=0,en=$e.w||0,An=0;ot+2<gt;++ot){var bn=yt(ot),Fn=ot&32767,wn=ze[bn];if(Me[Fn]=wn,ze[bn]=Fn,en<=ot){var Sn=gt-ot;if((nt>7e3||Qt>24576)&&(Sn>423||!kt)){St=ft(L,Ht,0,it,Ne,Xe,et,Qt,An,ot-An,St),Qt=nt=et=0,An=ot;for(var dn=0;dn<286;++dn)Ne[dn]=0;for(var dn=0;dn<30;++dn)Xe[dn]=0}var Xn=2,Mn=0,cr=Ve,ln=Fn-wn&32767;if(Sn>2&&bn==yt(ot-ln))for(var Vn=Math.min(oe,Sn)-1,nr=Math.min(32767,ot),Jn=Math.min(258,Sn);ln<=nr&&--cr&&Fn!=wn;){if(L[ot+Xn]==L[ot+Xn-ln]){for(var Kn=0;Kn<Jn&&L[ot+Kn]==L[ot+Kn-ln];++Kn);if(Kn>Xn){if(Xn=Kn,Mn=ln,Kn>Vn)break;for(var Nn=Math.min(ln,Kn-2),xn=0,dn=0;dn<Nn;++dn){var Pn=ot-ln+dn&32767,In=Me[Pn],pr=Pn-In&32767;pr>xn&&(xn=pr,wn=Pn)}}}Fn=wn,wn=Me[Fn],ln+=Fn-wn&32767}if(Mn){it[Qt++]=268435456|h[Xn]<<18|C[Mn];var fr=h[Xn]&31,hr=C[Mn]&31;et+=f[fr]+fe[hr],++Ne[257+fr],++Xe[hr],en=ot+Xn,++nt}else it[Qt++]=L[ot],++Ne[L[ot]]}}for(ot=Math.max(ot,en);ot<gt;++ot)it[Qt++]=L[ot],++Ne[L[ot]];St=ft(L,Ht,kt,it,Ne,Xe,et,Qt,An,ot-An,St),kt||($e.r=St&7|Ht[St/8|0]<<3,St-=7,$e.h=ze,$e.p=Me,$e.i=ot,$e.w=en)}else{for(var ot=$e.w||0;ot<gt+kt;ot+=65535){var Rr=ot+65535;Rr>=gt&&(Ht[St/8|0]=kt,Rr=gt),St=Oe(Ht,St+1,L.subarray(ot,Rr))}$e.i=gt}return W(Bt,0,ye+pe(St)+Ge)},Se=null,Gt=function(){var L=-1;return{p:function(k){for(var ce=L,ye=0;ye<k.length;++ye)ce=Se[ce&255^k[ye]]^ce>>>8;L=ce},d:function(){return~L}}},ht=function(){var L=1,k=0;return{p:function(ce){for(var ye=L,Ge=k,$e=ce.length|0,gt=0;gt!=$e;){for(var Bt=Math.min(gt+2655,$e);gt<Bt;++gt)Ge+=ye+=ce[gt];ye=(ye&65535)+15*(ye>>16),Ge=(Ge&65535)+15*(Ge>>16)}L=ye,k=Ge},d:function(){return L%=65521,k%=65521,(L&255)<<24|(L&65280)<<8|(k&255)<<8|k>>8}}},tn=function(L,k,ce,ye,Ge){if(!Ge&&(Ge={l:1},k.dictionary)){var $e=k.dictionary.subarray(-32768),gt=new ge($e.length+L.length);gt.set($e),gt.set(L,$e.length),L=gt,Ge.w=$e.length}return Ut(L,k.level==null?6:k.level,k.mem==null?Ge.l?Math.ceil(Math.max(8,Math.min(13,Math.log(L.length)))*1.5):20:12+k.mem,ce,ye,Ge)},dt=function(L,k){var ce={};for(var ye in L)ce[ye]=L[ye];for(var ye in k)ce[ye]=k[ye];return ce},Je=function(L,k,ce){for(var ye=L(),Ge=L.toString(),$e=Ge.slice(Ge.indexOf("[")+1,Ge.lastIndexOf("]")).replace(/\s+/g,"").split(","),gt=0;gt<ye.length;++gt){var Bt=ye[gt],Ht=$e[gt];if(typeof Bt=="function"){k+=";"+Ht+"=";var kt=Bt.toString();if(Bt.prototype)if(kt.indexOf("[native code]")!=-1){var St=kt.indexOf(" ",8)+1;k+=kt.slice(St,kt.indexOf("(",St))}else{k+=kt;for(var $t in Bt.prototype)k+=";"+Ht+".prototype."+$t+"="+Bt.prototype[$t].toString()}else k+=kt}else ce[Ht]=Bt}return k},xe=null,_e=function(L){var k=[];for(var ce in L)L[ce].buffer&&k.push((L[ce]=new L[ce].constructor(L[ce])).buffer);return k},N=function(L,k,ce,ye){if(!xe[ce]){for(var Ge="",$e={},gt=L.length-1,Bt=0;Bt<gt;++Bt)Ge=Je(L[Bt],Ge,$e);xe[ce]={c:Je(L[gt],Ge,$e),e:$e}}var Ht=dt({},xe[ce].e);return re(xe[ce].c+";onmessage=function(e){for(var k in e.data)self[k]=e.data[k];onmessage="+k.toString()+"}",ce,Ht,_e(Ht),ye)},Fe=function(){return[ge,se,U,f,fe,ee,x,_,q,j,F,X,B,Y,ie,de,pe,W,G,ne,He,te,$]},De=function(){return[ge,se,U,f,fe,ee,h,C,S,D,ae,I,F,Et,Ft,B,Z,m,v,Q,he,Ue,Oe,ft,pe,W,Ut,tn,Mt,te]},V=function(){return[qe,It,je,Gt,Se]},T=function(){return[ut,Nt]},J=function(){return[bt,je,ht]},ve=function(){return[on]},te=function(L){return postMessage(L,[L.buffer])},$=function(L){return L&&{out:L.size&&new ge(L.size),dictionary:L.dictionary}},ue=function(L,k,ce,ye,Ge,$e){var gt=N(ce,ye,Ge,function(Bt,Ht){gt.terminate(),$e(Bt,Ht)});return gt.postMessage([L,k],k.consume?[L.buffer]:[]),function(){gt.terminate()}},Ie=function(L){return L.ondata=function(k,ce){return postMessage([k,ce],[k.buffer])},function(k){k.data.length?(L.push(k.data[0],k.data[1]),postMessage([k.data[0].length])):L.flush()}},Ce=function(L,k,ce,ye,Ge,$e,gt){var Bt,Ht=N(L,ye,Ge,function(kt,St){kt?(Ht.terminate(),k.ondata.call(k,kt)):Array.isArray(St)?St.length==1?(k.queuedSize-=St[0],k.ondrain&&k.ondrain(St[0])):(St[1]&&Ht.terminate(),k.ondata.call(k,kt,St[0],St[1])):gt(St)});Ht.postMessage(ce),k.queuedSize=0,k.push=function(kt,St){k.ondata||G(5),Bt&&k.ondata(G(4,0,1),null,!!St),k.queuedSize+=kt.length,Ht.postMessage([kt,Bt=St],[kt.buffer])},k.terminate=function(){Ht.terminate()},$e&&(k.flush=function(){Ht.postMessage([])})},ke=function(L,k){return L[k]|L[k+1]<<8},Le=function(L,k){return(L[k]|L[k+1]<<8|L[k+2]<<16|L[k+3]<<24)>>>0},mt=function(L,k){return Le(L,k)+Le(L,k+4)*4294967296},je=function(L,k,ce){for(;ce;++k)L[k]=ce,ce>>>=8},qe=function(L,k){var ce=k.filename;if(L[0]=31,L[1]=139,L[2]=8,L[8]=k.level<2?4:k.level==9?2:0,L[9]=3,k.mtime!=0&&je(L,4,Math.floor(new Date(k.mtime||Date.now())/1e3)),ce){L[3]=8;for(var ye=0;ye<=ce.length;++ye)L[ye+10]=ce.charCodeAt(ye)}},ut=function(L){(L[0]!=31||L[1]!=139||L[2]!=8)&&G(6,"invalid gzip data");var k=L[3],ce=10;k&4&&(ce+=(L[10]|L[11]<<8)+2);for(var ye=(k>>3&1)+(k>>4&1);ye>0;ye-=!L[ce++]);return ce+(k&2)},Nt=function(L){var k=L.length;return(L[k-4]|L[k-3]<<8|L[k-2]<<16|L[k-1]<<24)>>>0},It=function(L){return 10+(L.filename?L.filename.length+1:0)},bt=function(L,k){var ce=k.level,ye=ce==0?0:ce<6?1:ce==9?3:2;if(L[0]=120,L[1]=ye<<6|(k.dictionary&&32),L[1]|=31-(L[0]<<8|L[1])%31,k.dictionary){var Ge=ht();Ge.p(k.dictionary),je(L,2,Ge.d())}},on=function(L,k){return((L[0]&15)!=8||L[0]>>4>7||(L[0]<<8|L[1])%31)&&G(6,"invalid zlib data"),(L[1]>>5&1)==+!k&&G(6,"invalid zlib data: "+(L[1]&32?"need":"unexpected")+" dictionary"),(L[1]>>3&4)+2};function rn(L,k){return typeof L=="function"&&(k=L,L={}),this.ondata=k,L}var Ct=null,gn=null;function Ln(L,k,ce){return ce||(ce=k,k={}),typeof ce!="function"&&G(7),ue(L,k,[De],function(ye){return te(Mt(ye.data[0],ye.data[1]))},0,ce)}function Mt(L,k){return tn(L,k||{},0,0)}var hn=null,We=null;function Qe(L,k,ce){return ce||(ce=k,k={}),typeof ce!="function"&&G(7),ue(L,k,[Fe],function(ye){return te(He(ye.data[0],$(ye.data[1])))},1,ce)}function He(L,k){return ne(L,{i:2},k&&k.out,k&&k.dictionary)}var z=null,le=null;function me(L,k,ce){return ce||(ce=k,k={}),typeof ce!="function"&&G(7),ue(L,k,[De,V,function(){return[Be]}],function(ye){return te(Be(ye.data[0],ye.data[1]))},2,ce)}function Be(L,k){k||(k={});var ce=Gt(),ye=L.length;ce.p(L);var Ge=tn(L,k,It(k),8),$e=Ge.length;return qe(Ge,k),je(Ge,$e-8,ce.d()),je(Ge,$e-4,ye),Ge}var be=null,Tt=null;function Wt(L,k,ce){return ce||(ce=k,k={}),typeof ce!="function"&&G(7),ue(L,k,[Fe,T,function(){return[an]}],function(ye){return te(an(ye.data[0],ye.data[1]))},3,ce)}function an(L,k){var ce=ut(L);return ce+8>L.length&&G(6,"invalid gzip data"),ne(L.subarray(ce,-8),{i:2},k&&k.out||new ge(Nt(L)),k&&k.dictionary)}var _n=null,Wn=null;function zn(L,k,ce){return ce||(ce=k,k={}),typeof ce!="function"&&G(7),ue(L,k,[De,J,function(){return[On]}],function(ye){return te(On(ye.data[0],ye.data[1]))},4,ce)}function On(L,k){k||(k={});var ce=ht();ce.p(L);var ye=tn(L,k,k.dictionary?6:2,4);return bt(ye,k),je(ye,ye.length-4,ce.d()),ye}var Un=null,ar=null;function mr(L,k,ce){return ce||(ce=k,k={}),typeof ce!="function"&&G(7),ue(L,k,[Fe,ve,function(){return[tr]}],function(ye){return te(tr(ye.data[0],$(ye.data[1])))},5,ce)}function tr(L,k){return ne(L.subarray(on(L,k&&k.dictionary),-4),{i:2},k&&k.out,k&&k.dictionary)}var gr=null,sn=null;function Kt(L,k,ce){return ce||(ce=k,k={}),typeof ce!="function"&&G(7),L[0]==31&&L[1]==139&&L[2]==8?Wt(L,k,ce):(L[0]&15)!=8||L[0]>>4>7||(L[0]<<8|L[1])%31?Qe(L,k,ce):mr(L,k,ce)}function yn(L,k){return L[0]==31&&L[1]==139&&L[2]==8?an(L,k):(L[0]&15)!=8||L[0]>>4>7||(L[0]<<8|L[1])%31?He(L,k):tr(L,k)}var Yn=function(L,k,ce,ye){for(var Ge in L){var $e=L[Ge],gt=k+Ge,Bt=ye;Array.isArray($e)&&(Bt=dt(ye,$e[1]),$e=$e[0]),$e instanceof ge?ce[gt]=[$e,Bt]:(ce[gt+="/"]=[new ge(0),Bt],Yn($e,gt,ce,ye))}},or=typeof TextEncoder!="undefined"&&new TextEncoder,Ke=typeof TextDecoder!="undefined"&&new TextDecoder,Pe=0;try{Ke.decode(Ft,{stream:!0}),Pe=1}catch(L){}var Yt=function(L){for(var k="",ce=0;;){var ye=L[ce++],Ge=(ye>127)+(ye>223)+(ye>239);if(ce+Ge>L.length)return{s:k,r:W(L,ce-1)};Ge?Ge==3?(ye=((ye&15)<<18|(L[ce++]&63)<<12|(L[ce++]&63)<<6|L[ce++]&63)-65536,k+=String.fromCharCode(55296|ye>>10,56320|ye&1023)):Ge&1?k+=String.fromCharCode((ye&31)<<6|L[ce++]&63):k+=String.fromCharCode((ye&15)<<12|(L[ce++]&63)<<6|L[ce++]&63):k+=String.fromCharCode(ye)}},Lt=null,qt=null;function nn(L,k){if(k){for(var ce=new ge(L.length),ye=0;ye<L.length;++ye)ce[ye]=L.charCodeAt(ye);return ce}if(or)return or.encode(L);for(var Ge=L.length,$e=new ge(L.length+(L.length>>1)),gt=0,Bt=function(St){$e[gt++]=St},ye=0;ye<Ge;++ye){if(gt+5>$e.length){var Ht=new ge(gt+8+(Ge-ye<<1));Ht.set($e),$e=Ht}var kt=L.charCodeAt(ye);kt<128||k?Bt(kt):kt<2048?(Bt(192|kt>>6),Bt(128|kt&63)):kt>55295&&kt<57344?(kt=65536+(kt&1047552)|L.charCodeAt(++ye)&1023,Bt(240|kt>>18),Bt(128|kt>>12&63),Bt(128|kt>>6&63),Bt(128|kt&63)):(Bt(224|kt>>12),Bt(128|kt>>6&63),Bt(128|kt&63))}return W($e,0,gt)}function Xt(L,k){if(k){for(var ce="",ye=0;ye<L.length;ye+=16384)ce+=String.fromCharCode.apply(null,L.subarray(ye,ye+16384));return ce}else{if(Ke)return Ke.decode(L);var Ge=Yt(L),$e=Ge.s,ce=Ge.r;return ce.length&&G(8),$e}}var zt=function(L){return L==1?3:L<6?2:L==9?1:0},pn=function(L,k){return k+30+ke(L,k+26)+ke(L,k+28)},Ot=function(L,k,ce){var ye=ke(L,k+28),Ge=Xt(L.subarray(k+46,k+46+ye),!(ke(L,k+8)&2048)),$e=k+46+ye,gt=Le(L,k+20),Bt=ce&&gt==4294967295?cn(L,$e):[gt,Le(L,k+24),Le(L,k+42)],Ht=Bt[0],kt=Bt[1],St=Bt[2];return[ke(L,k+10),Ht,kt,Ge,$e+ke(L,k+30)+ke(L,k+32),St]},cn=function(L,k){for(;ke(L,k)!=1;k+=4+ke(L,k+2));return[mt(L,k+12),mt(L,k+4),mt(L,k+20)]},un=function(L){var k=0;if(L)for(var ce in L){var ye=L[ce].length;ye>65535&&G(9),k+=ye+4}return k},lt=function(L,k,ce,ye,Ge,$e,gt,Bt){var Ht=ye.length,kt=ce.extra,St=Bt&&Bt.length,$t=un(kt);je(L,k,gt!=null?33639248:67324752),k+=4,gt!=null&&(L[k++]=20,L[k++]=ce.os),L[k]=20,k+=2,L[k++]=ce.flag<<1|($e<0&&8),L[k++]=Ge&&8,L[k++]=ce.compression&255,L[k++]=ce.compression>>8;var oe=new Date(ce.mtime==null?Date.now():ce.mtime),Ve=oe.getFullYear()-1980;if((Ve<0||Ve>119)&&G(10),je(L,k,Ve<<25|oe.getMonth()+1<<21|oe.getDate()<<16|oe.getHours()<<11|oe.getMinutes()<<5|oe.getSeconds()>>1),k+=4,$e!=-1&&(je(L,k,ce.crc),je(L,k+4,$e<0?-$e-2:$e),je(L,k+8,ce.size)),je(L,k+12,Ht),je(L,k+14,$t),k+=16,gt!=null&&(je(L,k,St),je(L,k+6,ce.attrs),je(L,k+10,gt),k+=14),L.set(ye,k),k+=Ht,$t)for(var Te in kt){var Me=kt[Te],ze=Me.length;je(L,k,+Te),je(L,k+2,ze),L.set(Me,k+4),k+=4+ze}return St&&(L.set(Bt,k),k+=St),k},Pt=function(L,k,ce,ye,Ge){je(L,k,101010256),je(L,k+8,ce),je(L,k+10,ce),je(L,k+12,ye),je(L,k+16,Ge)},Re=null,Ye=null,vt=null,xt=null;function Vt(L,k,ce){ce||(ce=k,k={}),typeof ce!="function"&&G(7);var ye={};Yn(L,"",ye,k);var Ge=Object.keys(ye),$e=Ge.length,gt=0,Bt=0,Ht=$e,kt=new Array($e),St=[],$t=function(){for(var ze=0;ze<St.length;++ze)St[ze]()},oe=function(ze,at){st(function(){ce(ze,at)})};st(function(){oe=ce});var Ve=function(){var ze=new ge(Bt+22),at=gt,Dt=Bt-gt;Bt=0;for(var yt=0;yt<Ht;++yt){var it=kt[yt];try{var Ne=it.c.length;lt(ze,Bt,it,it.f,it.u,Ne);var Xe=30+it.f.length+un(it.extra),nt=Bt+Xe;ze.set(it.c,nt),lt(ze,gt,it,it.f,it.u,Ne,Bt,it.m),gt+=16+Xe+(it.m?it.m.length:0),Bt=nt+Ne}catch(et){return oe(et,null)}}Pt(ze,gt,kt.length,Dt,at),oe(null,ze)};$e||Ve();for(var Te=function(ze){var at=Ge[ze],Dt=ye[at],yt=Dt[0],it=Dt[1],Ne=Gt(),Xe=yt.length;Ne.p(yt);var nt=nn(at),et=nt.length,ot=it.comment,Qt=ot&&nn(ot),en=Qt&&Qt.length,An=un(it.extra),bn=it.level==0?0:8,Fn=function(wn,Sn){if(wn)$t(),oe(wn,null);else{var dn=Sn.length;kt[ze]=dt(it,{size:Xe,crc:Ne.d(),c:Sn,f:nt,m:Qt,u:et!=at.length||Qt&&ot.length!=en,compression:bn}),gt+=30+et+An+dn,Bt+=76+2*(et+An)+(en||0)+dn,--$e||Ve()}};if(et>65535&&Fn(G(11,0,1),null),!bn)Fn(null,yt);else if(Xe<16e4)try{Fn(null,Mt(yt,it))}catch(wn){Fn(wn,null)}else St.push(Ln(yt,it,Fn))},Me=0;Me<Ht;++Me)Te(Me);return $t}function Jt(L,k){k||(k={});var ce={},ye=[];Yn(L,"",ce,k);var Ge=0,$e=0;for(var gt in ce){var Bt=ce[gt],Ht=Bt[0],kt=Bt[1],St=kt.level==0?0:8,$t=nn(gt),oe=$t.length,Ve=kt.comment,Te=Ve&&nn(Ve),Me=Te&&Te.length,ze=un(kt.extra);oe>65535&&G(11);var at=St?Mt(Ht,kt):Ht,Dt=at.length,yt=Gt();yt.p(Ht),ye.push(dt(kt,{size:Ht.length,crc:yt.d(),c:at,f:$t,m:Te,u:oe!=gt.length||Te&&Ve.length!=Me,o:Ge,compression:St})),Ge+=30+oe+ze+Dt,$e+=76+2*(oe+ze)+(Me||0)+Dt}for(var it=new ge($e+22),Ne=Ge,Xe=$e-Ge,nt=0;nt<ye.length;++nt){var $t=ye[nt];lt(it,$t.o,$t,$t.f,$t.u,$t.c.length);var et=30+$t.f.length+un($t.extra);it.set($t.c,$t.o+et),lt(it,Ge,$t,$t.f,$t.u,$t.c.length,$t.o,$t.m),Ge+=16+et+($t.m?$t.m.length:0)}return Pt(it,Ge,ye.length,Xe,Ne),it}var Zt=null,vn=null,Bn=null,Dn=null,st=typeof queueMicrotask=="function"?queueMicrotask:typeof setTimeout=="function"?setTimeout:function(L){L()};function En(L,k,ce){ce||(ce=k,k={}),typeof ce!="function"&&G(7);var ye=[],Ge=function(){for(var ze=0;ze<ye.length;++ze)ye[ze]()},$e={},gt=function(ze,at){st(function(){ce(ze,at)})};st(function(){gt=ce});for(var Bt=L.length-22;Le(L,Bt)!=101010256;--Bt)if(!Bt||L.length-Bt>65558)return gt(G(13,0,1),null),Ge;var Ht=ke(L,Bt+8);if(Ht){var kt=Ht,St=Le(L,Bt+16),$t=St==4294967295||kt==65535;if($t){var oe=Le(L,Bt-12);$t=Le(L,oe)==101075792,$t&&(kt=Ht=Le(L,oe+32),St=Le(L,oe+48))}for(var Ve=k&&k.filter,Te=function(ze){var at=Ot(L,St,$t),Dt=at[0],yt=at[1],it=at[2],Ne=at[3],Xe=at[4],nt=at[5],et=pn(L,nt);St=Xe;var ot=function(en,An){en?(Ge(),gt(en,null)):(An&&($e[Ne]=An),--Ht||gt(null,$e))};if(!Ve||Ve({name:Ne,size:yt,originalSize:it,compression:Dt}))if(!Dt)ot(null,W(L,et,et+yt));else if(Dt==8){var Qt=L.subarray(et,et+yt);if(it<524288||yt>.8*it)try{ot(null,He(Qt,{out:new ge(it)}))}catch(en){ot(en,null)}else ye.push(Qe(Qt,{size:it},ot))}else ot(G(14,"unknown compression type "+Dt,1),null);else ot(null,null)},Me=0;Me<kt;++Me)Te(Me)}else gt(null,{});return Ge}function mn(L,k){for(var ce={},ye=L.length-22;Le(L,ye)!=101010256;--ye)(!ye||L.length-ye>65558)&&G(13);var Ge=ke(L,ye+8);if(!Ge)return{};var $e=Le(L,ye+16),gt=$e==4294967295||Ge==65535;if(gt){var Bt=Le(L,ye-12);gt=Le(L,Bt)==101075792,gt&&(Ge=Le(L,Bt+32),$e=Le(L,Bt+48))}for(var Ht=k&&k.filter,kt=0;kt<Ge;++kt){var St=Ot(L,$e,gt),$t=St[0],oe=St[1],Ve=St[2],Te=St[3],Me=St[4],ze=St[5],at=pn(L,ze);$e=Me,(!Ht||Ht({name:Te,size:oe,originalSize:Ve,compression:$t}))&&($t?$t==8?ce[Te]=He(L.subarray(at,at+oe),{out:new ge(Ve)}):G(14,"unknown compression type "+$t):ce[Te]=W(L,at,at+oe))}return ce}},64270:function(Cn){(function(tt,b){Cn.exports=b()})(this,function(){"use strict";var tt=function(i,e){return tt=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,n){t.__proto__=n}||function(t,n){for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(t[r]=n[r])},tt(i,e)};function b(i,e){if(typeof e!="function"&&e!==null)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");tt(i,e);function t(){this.constructor=i}i.prototype=e===null?Object.create(e):(t.prototype=e.prototype,new t)}var P=function(){return P=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++){t=arguments[n];for(var s in t)Object.prototype.hasOwnProperty.call(t,s)&&(e[s]=t[s])}return e},P.apply(this,arguments)};function re(i,e,t,n){function r(s){return s instanceof t?s:new t(function(a){a(s)})}return new(t||(t=Promise))(function(s,a){function o(c){try{l(n.next(c))}catch(d){a(d)}}function u(c){try{l(n.throw(c))}catch(d){a(d)}}function l(c){c.done?s(c.value):r(c.value).then(o,u)}l((n=n.apply(i,e||[])).next())})}function ge(i,e){var t={label:0,sent:function(){if(s[0]&1)throw s[1];return s[1]},trys:[],ops:[]},n,r,s,a;return a={next:o(0),throw:o(1),return:o(2)},typeof Symbol=="function"&&(a[Symbol.iterator]=function(){return this}),a;function o(l){return function(c){return u([l,c])}}function u(l){if(n)throw new TypeError("Generator is already executing.");for(;t;)try{if(n=1,r&&(s=l[0]&2?r.return:l[0]?r.throw||((s=r.return)&&s.call(r),0):r.next)&&!(s=s.call(r,l[1])).done)return s;switch(r=0,s&&(l=[l[0]&2,s.value]),l[0]){case 0:case 1:s=l;break;case 4:return t.label++,{value:l[1],done:!1};case 5:t.label++,r=l[1],l=[0];continue;case 7:l=t.ops.pop(),t.trys.pop();continue;default:if(s=t.trys,!(s=s.length>0&&s[s.length-1])&&(l[0]===6||l[0]===2)){t=0;continue}if(l[0]===3&&(!s||l[1]>s[0]&&l[1]<s[3])){t.label=l[1];break}if(l[0]===6&&t.label<s[1]){t.label=s[1],s=l;break}if(s&&t.label<s[2]){t.label=s[2],t.ops.push(l);break}s[2]&&t.ops.pop(),t.trys.pop();continue}l=e.call(i,t)}catch(c){l=[6,c],r=0}finally{n=s=0}if(l[0]&5)throw l[1];return{value:l[0]?l[1]:void 0,done:!0}}}function se(i,e,t){if(t||arguments.length===2)for(var n=0,r=e.length,s;n<r;n++)(s||!(n in e))&&(s||(s=Array.prototype.slice.call(e,0,n)),s[n]=e[n]);return i.concat(s||e)}for(var U=function(){function i(e,t,n,r){this.left=e,this.top=t,this.width=n,this.height=r}return i.prototype.add=function(e,t,n,r){return new i(this.left+e,this.top+t,this.width+n,this.height+r)},i.fromClientRect=function(e,t){return new i(t.left+e.windowBounds.left,t.top+e.windowBounds.top,t.width,t.height)},i.fromDOMRectList=function(e,t){var n=Array.from(t).find(function(r){return r.width!==0});return n?new i(n.left+e.windowBounds.left,n.top+e.windowBounds.top,n.width,n.height):i.EMPTY},i.EMPTY=new i(0,0,0,0),i}(),f=function(i,e){return U.fromClientRect(i,e.getBoundingClientRect())},fe=function(i){var e=i.body,t=i.documentElement;if(!e||!t)throw new Error("Unable to get document size");var n=Math.max(Math.max(e.scrollWidth,t.scrollWidth),Math.max(e.offsetWidth,t.offsetWidth),Math.max(e.clientWidth,t.clientWidth)),r=Math.max(Math.max(e.scrollHeight,t.scrollHeight),Math.max(e.offsetHeight,t.offsetHeight),Math.max(e.clientHeight,t.clientHeight));return new U(0,0,n,r)},ee=function(i){for(var e=[],t=0,n=i.length;t<n;){var r=i.charCodeAt(t++);if(r>=55296&&r<=56319&&t<n){var s=i.charCodeAt(t++);(s&64512)===56320?e.push(((r&1023)<<10)+(s&1023)+65536):(e.push(r),t--)}else e.push(r)}return e},A=function(){for(var i=[],e=0;e<arguments.length;e++)i[e]=arguments[e];if(String.fromCodePoint)return String.fromCodePoint.apply(String,i);var t=i.length;if(!t)return"";for(var n=[],r=-1,s="";++r<t;){var a=i[r];a<=65535?n.push(a):(a-=65536,n.push((a>>10)+55296,a%1024+56320)),(r+1===t||n.length>16384)&&(s+=String.fromCharCode.apply(String,n),n.length=0)}return s},E="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",x=typeof Uint8Array=="undefined"?[]:new Uint8Array(256),h=0;h<E.length;h++)x[E.charCodeAt(h)]=h;for(var p="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",_=typeof Uint8Array=="undefined"?[]:new Uint8Array(256),C=0;C<p.length;C++)_[p.charCodeAt(C)]=C;for(var F=function(i){var e=i.length*.75,t=i.length,n,r=0,s,a,o,u;i[i.length-1]==="="&&(e--,i[i.length-2]==="="&&e--);var l=typeof ArrayBuffer!="undefined"&&typeof Uint8Array!="undefined"&&typeof Uint8Array.prototype.slice!="undefined"?new ArrayBuffer(e):new Array(e),c=Array.isArray(l)?l:new Uint8Array(l);for(n=0;n<t;n+=4)s=_[i.charCodeAt(n)],a=_[i.charCodeAt(n+1)],o=_[i.charCodeAt(n+2)],u=_[i.charCodeAt(n+3)],c[r++]=s<<2|a>>4,c[r++]=(a&15)<<4|o>>2,c[r++]=(o&3)<<6|u&63;return l},R=function(i){for(var e=i.length,t=[],n=0;n<e;n+=2)t.push(i[n+1]<<8|i[n]);return t},K=function(i){for(var e=i.length,t=[],n=0;n<e;n+=4)t.push(i[n+3]<<24|i[n+2]<<16|i[n+1]<<8|i[n]);return t},B=5,D=11,I=2,S=D-B,q=65536>>B,ae=1<<B,j=ae-1,Y=1024>>B,ie=q+Y,de=ie,pe=32,W=de+pe,M=65536>>D,X=1<<S,G=X-1,ne=function(i,e,t){return i.slice?i.slice(e,t):new Uint16Array(Array.prototype.slice.call(i,e,t))},Z=function(i,e,t){return i.slice?i.slice(e,t):new Uint32Array(Array.prototype.slice.call(i,e,t))},m=function(i,e){var t=F(i),n=Array.isArray(t)?K(t):new Uint32Array(t),r=Array.isArray(t)?R(t):new Uint16Array(t),s=24,a=ne(r,s/2,n[4]/2),o=n[5]===2?ne(r,(s+n[4])/2):Z(n,Math.ceil((s+n[4])/4));return new v(n[0],n[1],n[2],n[3],a,o)},v=function(){function i(e,t,n,r,s,a){this.initialValue=e,this.errorValue=t,this.highStart=n,this.highValueIndex=r,this.index=s,this.data=a}return i.prototype.get=function(e){var t;if(e>=0){if(e<55296||e>56319&&e<=65535)return t=this.index[e>>B],t=(t<<I)+(e&j),this.data[t];if(e<=65535)return t=this.index[q+(e-55296>>B)],t=(t<<I)+(e&j),this.data[t];if(e<this.highStart)return t=W-M+(e>>D),t=this.index[t],t+=e>>B&G,t=this.index[t],t=(t<<I)+(e&j),this.data[t];if(e<=1114111)return this.data[this.highValueIndex]}return this.errorValue},i}(),Q="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",he=typeof Uint8Array=="undefined"?[]:new Uint8Array(256),Ue=0;Ue<Q.length;Ue++)he[Q.charCodeAt(Ue)]=Ue;var Oe="KwAAAAAAAAAACA4AUD0AADAgAAACAAAAAAAIABAAGABAAEgAUABYAGAAaABgAGgAYgBqAF8AZwBgAGgAcQB5AHUAfQCFAI0AlQCdAKIAqgCyALoAYABoAGAAaABgAGgAwgDKAGAAaADGAM4A0wDbAOEA6QDxAPkAAQEJAQ8BFwF1AH0AHAEkASwBNAE6AUIBQQFJAVEBWQFhAWgBcAF4ATAAgAGGAY4BlQGXAZ8BpwGvAbUBvQHFAc0B0wHbAeMB6wHxAfkBAQIJAvEBEQIZAiECKQIxAjgCQAJGAk4CVgJeAmQCbAJ0AnwCgQKJApECmQKgAqgCsAK4ArwCxAIwAMwC0wLbAjAA4wLrAvMC+AIAAwcDDwMwABcDHQMlAy0DNQN1AD0DQQNJA0kDSQNRA1EDVwNZA1kDdQB1AGEDdQBpA20DdQN1AHsDdQCBA4kDkQN1AHUAmQOhA3UAdQB1AHUAdQB1AHUAdQB1AHUAdQB1AHUAdQB1AHUAdQB1AKYDrgN1AHUAtgO+A8YDzgPWAxcD3gPjA+sD8wN1AHUA+wMDBAkEdQANBBUEHQQlBCoEFwMyBDgEYABABBcDSARQBFgEYARoBDAAcAQzAXgEgASIBJAEdQCXBHUAnwSnBK4EtgS6BMIEyAR1AHUAdQB1AHUAdQCVANAEYABgAGAAYABgAGAAYABgANgEYADcBOQEYADsBPQE/AQEBQwFFAUcBSQFLAU0BWQEPAVEBUsFUwVbBWAAYgVgAGoFcgV6BYIFigWRBWAAmQWfBaYFYABgAGAAYABgAKoFYACxBbAFuQW6BcEFwQXHBcEFwQXPBdMF2wXjBeoF8gX6BQIGCgYSBhoGIgYqBjIGOgZgAD4GRgZMBmAAUwZaBmAAYABgAGAAYABgAGAAYABgAGAAYABgAGIGYABpBnAGYABgAGAAYABgAGAAYABgAGAAYAB4Bn8GhQZgAGAAYAB1AHcDFQSLBmAAYABgAJMGdQA9A3UAmwajBqsGqwaVALMGuwbDBjAAywbSBtIG1QbSBtIG0gbSBtIG0gbdBuMG6wbzBvsGAwcLBxMHAwcbByMHJwcsBywHMQcsB9IGOAdAB0gHTgfSBkgHVgfSBtIG0gbSBtIG0gbSBtIG0gbSBiwHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAdgAGAALAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAdbB2MHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsB2kH0gZwB64EdQB1AHUAdQB1AHUAdQB1AHUHfQdgAIUHjQd1AHUAlQedB2AAYAClB6sHYACzB7YHvgfGB3UAzgfWBzMB3gfmB1EB7gf1B/0HlQENAQUIDQh1ABUIHQglCBcDLQg1CD0IRQhNCEEDUwh1AHUAdQBbCGMIZAhlCGYIZwhoCGkIYwhkCGUIZghnCGgIaQhjCGQIZQhmCGcIaAhpCGMIZAhlCGYIZwhoCGkIYwhkCGUIZghnCGgIaQhjCGQIZQhmCGcIaAhpCGMIZAhlCGYIZwhoCGkIYwhkCGUIZghnCGgIaQhjCGQIZQhmCGcIaAhpCGMIZAhlCGYIZwhoCGkIYwhkCGUIZghnCGgIaQhjCGQIZQhmCGcIaAhpCGMIZAhlCGYIZwhoCGkIYwhkCGUIZghnCGgIaQhjCGQIZQhmCGcIaAhpCGMIZAhlCGYIZwhoCGkIYwhkCGUIZghnCGgIaQhjCGQIZQhmCGcIaAhpCGMIZAhlCGYIZwhoCGkIYwhkCGUIZghnCGgIaQhjCGQIZQhmCGcIaAhpCGMIZAhlCGYIZwhoCGkIYwhkCGUIZghnCGgIaQhjCGQIZQhmCGcIaAhpCGMIZAhlCGYIZwhoCGkIYwhkCGUIZghnCGgIaQhjCGQIZQhmCGcIaAhpCGMIZAhlCGYIZwhoCGkIYwhkCGUIZghnCGgIaQhjCGQIZQhmCGcIaAhpCGMIZAhlCGYIZwhoCGkIYwhkCGUIZghnCGgIaQhjCGQIZQhmCGcIaAhpCGMIZAhlCGYIZwhoCGkIYwhkCGUIZghnCGgIaQhjCGQIZQhmCGcIaAhpCGMIZAhlCGYIZwhoCGkIYwhkCGUIZghnCGgIaQhjCGQIZQhmCGcIaAhpCGMIZAhlCGYIZwhoCGkIYwhkCGUIZghnCGgIaQhjCGQIZQhmCGcIaAhpCGMIZAhlCGYIZwhoCGkIYwhkCGUIZghnCGgIaQhjCGQIZQhmCGcIaAhpCGMIZAhlCGYIZwhoCGkIYwhkCGUIZghnCGgIaQhjCGQIZQhmCGcIaAhpCGMIZAhlCGYIZwhoCGkIYwhkCGUIZghnCGgIcAh3CHoIMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwAIIIggiCCIIIggiCCIIIggiCCIIIggiCCIIIggiCCIIIggiCCIIIggiCCIIIggiCCIIIggiCCIIIggiCCIIIgggwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAALAcsBywHLAcsBywHLAcsBywHLAcsB4oILAcsB44I0gaWCJ4Ipgh1AHUAqgiyCHUAdQB1AHUAdQB1AHUAdQB1AHUAtwh8AXUAvwh1AMUIyQjRCNkI4AjoCHUAdQB1AO4I9gj+CAYJDgkTCS0HGwkjCYIIggiCCIIIggiCCIIIggiCCIIIggiCCIIIggiCCIIIggiCCIIIggiCCIIIggiCCIIIggiCCIIIggiCCIIIggiAAIAAAAFAAYABgAGIAXwBgAHEAdQBFAJUAogCyAKAAYABgAEIA4ABGANMA4QDxAMEBDwE1AFwBLAE6AQEBUQF4QkhCmEKoQrhCgAHIQsAB0MLAAcABwAHAAeDC6ABoAHDCwMMAAcABwAHAAdDDGMMAAcAB6MM4wwjDWMNow3jDaABoAGgAaABoAGgAaABoAGgAaABoAGgAaABoAGgAaABoAGgAaABoAEjDqABWw6bDqABpg6gAaABoAHcDvwOPA+gAaABfA/8DvwO/A78DvwO/A78DvwO/A78DvwO/A78DvwO/A78DvwO/A78DvwO/A78DvwO/A78DvwO/A78DpcPAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcAB9cPKwkyCToJMAB1AHUAdQBCCUoJTQl1AFUJXAljCWcJawkwADAAMAAwAHMJdQB2CX4JdQCECYoJjgmWCXUAngkwAGAAYABxAHUApgn3A64JtAl1ALkJdQDACTAAMAAwADAAdQB1AHUAdQB1AHUAdQB1AHUAowYNBMUIMAAwADAAMADICcsJ0wnZCRUE4QkwAOkJ8An4CTAAMAB1AAAKvwh1AAgKDwoXCh8KdQAwACcKLgp1ADYKqAmICT4KRgowADAAdQB1AE4KMAB1AFYKdQBeCnUAZQowADAAMAAwADAAMAAwADAAMAAVBHUAbQowADAAdQC5CXUKMAAwAHwBxAijBogEMgF9CoQKiASMCpQKmgqIBKIKqgquCogEDQG2Cr4KxgrLCjAAMADTCtsKCgHjCusK8Qr5CgELMAAwADAAMAB1AIsECQsRC3UANAEZCzAAMAAwADAAMAB1ACELKQswAHUANAExCzkLdQBBC0kLMABRC1kLMAAwADAAMAAwADAAdQBhCzAAMAAwAGAAYABpC3ELdwt/CzAAMACHC4sLkwubC58Lpwt1AK4Ltgt1APsDMAAwADAAMAAwADAAMAAwAL4LwwvLC9IL1wvdCzAAMADlC+kL8Qv5C/8LSQswADAAMAAwADAAMAAwADAAMAAHDDAAMAAwADAAMAAODBYMHgx1AHUAdQB1AHUAdQB1AHUAdQB1AHUAdQB1AHUAdQB1AHUAdQB1AHUAdQB1AHUAdQB1AHUAdQB1ACYMMAAwADAAdQB1AHUALgx1AHUAdQB1AHUAdQA2DDAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwAHUAdQB1AHUAdQB1AHUAdQB1AHUAdQB1AHUAdQB1AHUAdQB1AD4MdQBGDHUAdQB1AHUAdQB1AEkMdQB1AHUAdQB1AFAMMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwAHUAdQB1AHUAdQB1AHUAdQB1AHUAdQB1AHUAdQBYDHUAdQB1AF8MMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAB1AHUAdQB1AHUAdQB1AHUAdQB1AHUAdQB1AHUAdQB1AHUA+wMVBGcMMAAwAHwBbwx1AHcMfwyHDI8MMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAYABgAJcMMAAwADAAdQB1AJ8MlQClDDAAMACtDCwHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsB7UMLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHdQB1AHUAdQB1AHUAdQB1AHUAdQB1AHUAdQB1AA0EMAC9DDAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAsBywHLAcsBywHLAcsBywHLQcwAMEMyAwsBywHLAcsBywHLAcsBywHLAcsBywHzAwwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwAHUAdQB1ANQM2QzhDDAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMABgAGAAYABgAGAAYABgAOkMYADxDGAA+AwADQYNYABhCWAAYAAODTAAMAAwADAAFg1gAGAAHg37AzAAMAAwADAAYABgACYNYAAsDTQNPA1gAEMNPg1LDWAAYABgAGAAYABgAGAAYABgAGAAUg1aDYsGVglhDV0NcQBnDW0NdQ15DWAAYABgAGAAYABgAGAAYABgAGAAYABgAGAAYABgAGAAlQCBDZUAiA2PDZcNMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAnw2nDTAAMAAwADAAMAAwAHUArw23DTAAMAAwADAAMAAwADAAMAAwADAAMAB1AL8NMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAB1AHUAdQB1AHUAdQDHDTAAYABgAM8NMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAA1w11ANwNMAAwAD0B5A0wADAAMAAwADAAMADsDfQN/A0EDgwOFA4wABsOMAAwADAAMAAwADAAMAAwANIG0gbSBtIG0gbSBtIG0gYjDigOwQUuDsEFMw7SBjoO0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIGQg5KDlIOVg7SBtIGXg5lDm0OdQ7SBtIGfQ6EDooOjQ6UDtIGmg6hDtIG0gaoDqwO0ga0DrwO0gZgAGAAYADEDmAAYAAkBtIGzA5gANIOYADaDokO0gbSBt8O5w7SBu8O0gb1DvwO0gZgAGAAxA7SBtIG0gbSBtIGYABgAGAAYAAED2AAsAUMD9IG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIGFA8sBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAccD9IGLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHJA8sBywHLAcsBywHLAccDywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywPLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAc0D9IG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIGLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAccD9IG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIGFA8sBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHPA/SBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gYUD0QPlQCVAJUAMAAwADAAMACVAJUAlQCVAJUAlQCVAEwPMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAA//8EAAQABAAEAAQABAAEAAQABAANAAMAAQABAAIABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQACgATABcAHgAbABoAHgAXABYAEgAeABsAGAAPABgAHABLAEsASwBLAEsASwBLAEsASwBLABgAGAAeAB4AHgATAB4AUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQABYAGwASAB4AHgAeAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAAWAA0AEQAeAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArAAQABAAEAAQABAAFAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAJABYAGgAbABsAGwAeAB0AHQAeAE8AFwAeAA0AHgAeABoAGwBPAE8ADgBQAB0AHQAdAE8ATwAXAE8ATwBPABYAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAB0AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAdAFAAUABQAFAAUABQAFAAUAAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAFAAHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAAeAB4AHgAeAFAATwBAAE8ATwBPAEAATwBQAFAATwBQAB4AHgAeAB4AHgAeAB0AHQAdAB0AHgAdAB4ADgBQAFAAUABQAFAAHgAeAB4AHgAeAB4AHgBQAB4AUAAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4ABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAJAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAkACQAJAAkACQAJAAkABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAeAB4AHgAeAFAAHgAeAB4AKwArAFAAUABQAFAAGABQACsAKwArACsAHgAeAFAAHgBQAFAAUAArAFAAKwAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AKwAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4ABAAEAAQABAAEAAQABAAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArACsAUAAeAB4AHgAeAB4AHgBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAAYAA0AKwArAB4AHgAbACsABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQADQAEAB4ABAAEAB4ABAAEABMABAArACsAKwArACsAKwArACsAVgBWAFYAVgBWAFYAVgBWAFYAVgBWAFYAVgBWAFYAVgBWAFYAVgBWAFYAVgBWAFYAVgBWAFYAKwArACsAKwBWAFYAVgBWAB4AHgArACsAKwArACsAKwArACsAKwArACsAHgAeAB4AHgAeAB4AHgAeAB4AGgAaABoAGAAYAB4AHgAEAAQABAAEAAQABAAEAAQABAAEAAQAEwAEACsAEwATAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABABLAEsASwBLAEsASwBLAEsASwBLABoAGQAZAB4AUABQAAQAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQABMAUAAEAAQABAAEAAQABAAEAB4AHgAEAAQABAAEAAQABABQAFAABAAEAB4ABAAEAAQABABQAFAASwBLAEsASwBLAEsASwBLAEsASwBQAFAAUAAeAB4AUAAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AKwAeAFAABABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAABAAEAAQABAAEAAQABAAEAAQABAAEAFAAKwArACsAKwArACsAKwArACsAKwArACsAKwArAEsASwBLAEsASwBLAEsASwBLAEsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAABAAEAAQABAAEAAQABAAEAAQAUABQAB4AHgAYABMAUAArACsABAAbABsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAAEAAQABAAEAFAABAAEAAQABAAEAFAABAAEAAQAUAAEAAQABAAEAAQAKwArAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAAEAAQABAArACsAHgArAFAAUABQAFAAUABQAFAAUABQAFAAUAArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArAFAAUABQAFAAUABQAFAAUABQAFAAKwArACsAKwArACsAKwArACsAKwArAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAB4ABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAAQABAAEAFAABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQAUAAEAAQABAAEAAQABAAEAFAAUABQAFAAUABQAFAAUABQAFAABAAEAA0ADQBLAEsASwBLAEsASwBLAEsASwBLAB4AUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAAEAAQABAArAFAAUABQAFAAUABQAFAAUAArACsAUABQACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwBQAFAAUABQAFAAUABQACsAUAArACsAKwBQAFAAUABQACsAKwAEAFAABAAEAAQABAAEAAQABAArACsABAAEACsAKwAEAAQABABQACsAKwArACsAKwArACsAKwAEACsAKwArACsAUABQACsAUABQAFAABAAEACsAKwBLAEsASwBLAEsASwBLAEsASwBLAFAAUAAaABoAUABQAFAAUABQAEwAHgAbAFAAHgAEACsAKwAEAAQABAArAFAAUABQAFAAUABQACsAKwArACsAUABQACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwBQAFAAUABQAFAAUABQACsAUABQACsAUABQACsAUABQACsAKwAEACsABAAEAAQABAAEACsAKwArACsABAAEACsAKwAEAAQABAArACsAKwAEACsAKwArACsAKwArACsAUABQAFAAUAArAFAAKwArACsAKwArACsAKwBLAEsASwBLAEsASwBLAEsASwBLAAQABABQAFAAUAAEAB4AKwArACsAKwArACsAKwArACsAKwAEAAQABAArAFAAUABQAFAAUABQAFAAUABQACsAUABQAFAAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwBQAFAAUABQAFAAUABQACsAUABQACsAUABQAFAAUABQACsAKwAEAFAABAAEAAQABAAEAAQABAAEACsABAAEAAQAKwAEAAQABAArACsAUAArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwBQAFAABAAEACsAKwBLAEsASwBLAEsASwBLAEsASwBLAB4AGwArACsAKwArACsAKwArAFAABAAEAAQABAAEAAQAKwAEAAQABAArAFAAUABQAFAAUABQAFAAUAArACsAUABQACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAAQABAAEAAQABAArACsABAAEACsAKwAEAAQABAArACsAKwArACsAKwArAAQABAAEACsAKwArACsAUABQACsAUABQAFAABAAEACsAKwBLAEsASwBLAEsASwBLAEsASwBLAB4AUABQAFAAUABQAFAAUAArACsAKwArACsAKwArACsAKwArAAQAUAArAFAAUABQAFAAUABQACsAKwArAFAAUABQACsAUABQAFAAUAArACsAKwBQAFAAKwBQACsAUABQACsAKwArAFAAUAArACsAKwBQAFAAUAArACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUAArACsAKwArAAQABAAEAAQABAArACsAKwAEAAQABAArAAQABAAEAAQAKwArAFAAKwArACsAKwArACsABAArACsAKwArACsAKwArACsAKwArAEsASwBLAEsASwBLAEsASwBLAEsAUABQAFAAHgAeAB4AHgAeAB4AGwAeACsAKwArACsAKwAEAAQABAAEAAQAUABQAFAAUABQAFAAUABQACsAUABQAFAAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwArACsAUAAEAAQABAAEAAQABAAEACsABAAEAAQAKwAEAAQABAAEACsAKwArACsAKwArACsABAAEACsAUABQAFAAKwArACsAKwArAFAAUAAEAAQAKwArAEsASwBLAEsASwBLAEsASwBLAEsAKwArACsAKwArACsAKwAOAFAAUABQAFAAUABQAFAAHgBQAAQABAAEAA4AUABQAFAAUABQAFAAUABQACsAUABQAFAAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArAFAAUABQAFAAUABQAFAAUABQAFAAKwBQAFAAUABQAFAAKwArAAQAUAAEAAQABAAEAAQABAAEACsABAAEAAQAKwAEAAQABAAEACsAKwArACsAKwArACsABAAEACsAKwArACsAKwArACsAUAArAFAAUAAEAAQAKwArAEsASwBLAEsASwBLAEsASwBLAEsAKwBQAFAAKwArACsAKwArACsAKwArACsAKwArACsAKwAEAAQABAAEAFAAUABQAFAAUABQAFAAUABQACsAUABQAFAAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAABAAEAFAABAAEAAQABAAEAAQABAArAAQABAAEACsABAAEAAQABABQAB4AKwArACsAKwBQAFAAUAAEAFAAUABQAFAAUABQAFAAUABQAFAABAAEACsAKwBLAEsASwBLAEsASwBLAEsASwBLAFAAUABQAFAAUABQAFAAUABQABoAUABQAFAAUABQAFAAKwAEAAQABAArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQACsAKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArAFAAUABQAFAAUABQAFAAUABQACsAUAArACsAUABQAFAAUABQAFAAUAArACsAKwAEACsAKwArACsABAAEAAQABAAEAAQAKwAEACsABAAEAAQABAAEAAQABAAEACsAKwArACsAKwArAEsASwBLAEsASwBLAEsASwBLAEsAKwArAAQABAAeACsAKwArACsAKwArACsAKwArACsAKwArAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXAAqAFwAXAAqACoAKgAqACoAKgAqACsAKwArACsAGwBcAFwAXABcAFwAXABcACoAKgAqACoAKgAqACoAKgAeAEsASwBLAEsASwBLAEsASwBLAEsADQANACsAKwArACsAKwBcAFwAKwBcACsAXABcAFwAXABcACsAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcACsAXAArAFwAXABcAFwAXABcAFwAXABcAFwAKgBcAFwAKgAqACoAKgAqACoAKgAqACoAXAArACsAXABcAFwAXABcACsAXAArACoAKgAqACoAKgAqACsAKwBLAEsASwBLAEsASwBLAEsASwBLACsAKwBcAFwAXABcAFAADgAOAA4ADgAeAA4ADgAJAA4ADgANAAkAEwATABMAEwATAAkAHgATAB4AHgAeAAQABAAeAB4AHgAeAB4AHgBLAEsASwBLAEsASwBLAEsASwBLAFAAUABQAFAAUABQAFAAUABQAFAADQAEAB4ABAAeAAQAFgARABYAEQAEAAQAUABQAFAAUABQAFAAUABQACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwArACsAKwAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQADQAEAAQABAAEAAQADQAEAAQAUABQAFAAUABQAAQABAAEAAQABAAEAAQABAAEAAQABAArAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAArAA0ADQAeAB4AHgAeAB4AHgAEAB4AHgAeAB4AHgAeACsAHgAeAA4ADgANAA4AHgAeAB4AHgAeAAkACQArACsAKwArACsAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcACoAKgAqACoAKgAqACoAKgAqACoAKgAqACoAKgAqACoAKgAqACoAKgBcAEsASwBLAEsASwBLAEsASwBLAEsADQANAB4AHgAeAB4AXABcAFwAXABcAFwAKgAqACoAKgBcAFwAXABcACoAKgAqAFwAKgAqACoAXABcACoAKgAqACoAKgAqACoAXABcAFwAKgAqACoAKgBcAFwAXABcAFwAXABcAFwAXABcAFwAXABcACoAKgAqACoAKgAqACoAKgAqACoAKgAqAFwAKgBLAEsASwBLAEsASwBLAEsASwBLACoAKgAqACoAKgAqAFAAUABQAFAAUABQACsAUAArACsAKwArACsAUAArACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAHgBQAFAAUABQAFgAWABYAFgAWABYAFgAWABYAFgAWABYAFgAWABYAFgAWABYAFgAWABYAFgAWABYAFgAWABYAFgAWABYAFgAWABZAFkAWQBZAFkAWQBZAFkAWQBZAFkAWQBZAFkAWQBZAFkAWQBZAFkAWQBZAFkAWQBZAFkAWQBZAFkAWQBZAFkAWgBaAFoAWgBaAFoAWgBaAFoAWgBaAFoAWgBaAFoAWgBaAFoAWgBaAFoAWgBaAFoAWgBaAFoAWgBaAFoAWgBaAFAAUABQAFAAUABQAFAAUABQACsAUABQAFAAUAArACsAUABQAFAAUABQAFAAUAArAFAAKwBQAFAAUABQACsAKwBQAFAAUABQAFAAUABQAFAAUAArAFAAUABQAFAAKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArAFAAUABQAFAAKwArAFAAUABQAFAAUABQAFAAKwBQACsAUABQAFAAUAArACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwBQAFAAUABQACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArACsABAAEAAQAHgANAB4AHgAeAB4AHgAeAB4AUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQACsAKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAHgAeAB4AHgAeAB4AHgAeAB4AHgArACsAKwArACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQACsAKwBQAFAAUABQAFAAUAArACsADQBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAHgAeAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAANAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAAWABEAKwArACsAUABQAFAAUABQAFAAUABQAFAAUABQAA0ADQANAFAAUABQAFAAUABQAFAAUABQAFAAUAArACsAKwArACsAKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwBQAFAAUABQAAQABAAEACsAKwArACsAKwArACsAKwArACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAAEAAQABAANAA0AKwArACsAKwArACsAKwArACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAABAAEACsAKwArACsAKwArACsAKwArACsAKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwBQAFAAUAArAAQABAArACsAKwArACsAKwArACsAKwArACsAKwBcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAKgAqACoAKgAqACoAKgAqACoAKgAqACoAKgAqACoAKgAqACoAKgAqAA0ADQAVAFwADQAeAA0AGwBcACoAKwArAEsASwBLAEsASwBLAEsASwBLAEsAKwArACsAKwArACsAUABQAFAAUABQAFAAUABQAFAAUAArACsAKwArACsAKwAeAB4AEwATAA0ADQAOAB4AEwATAB4ABAAEAAQACQArAEsASwBLAEsASwBLAEsASwBLAEsAKwArACsAKwArACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArACsAKwArACsAKwArAFAAUABQAFAAUAAEAAQAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAAQAUAArACsAKwArACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArACsAKwArACsAKwArACsAKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwAEAAQABAAEAAQABAAEAAQABAAEAAQABAArACsAKwArAAQABAAEAAQABAAEAAQABAAEAAQABAAEACsAKwArACsAHgArACsAKwATABMASwBLAEsASwBLAEsASwBLAEsASwBcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXAArACsAXABcAFwAXABcACsAKwArACsAKwArACsAKwArACsAKwBcAFwAXABcAFwAXABcAFwAXABcAFwAXAArACsAKwArAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcACsAKwArACsAKwArAEsASwBLAEsASwBLAEsASwBLAEsAXAArACsAKwAqACoAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAAQABAAEAAQABAArACsAHgAeAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcACoAKgAqACoAKgAqACoAKgAqACoAKwAqACoAKgAqACoAKgAqACoAKgAqACoAKgAqACoAKgAqACoAKgAqACoAKgAqACoAKgAqACoAKgAqACoAKwArAAQASwBLAEsASwBLAEsASwBLAEsASwArACsAKwArACsAKwBLAEsASwBLAEsASwBLAEsASwBLACsAKwArACsAKwArACoAKgAqACoAKgAqACoAXAAqACoAKgAqACoAKgArACsABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsABAAEAAQABAAEAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAAQABAAEAAQABABQAFAAUABQAFAAUABQACsAKwArACsASwBLAEsASwBLAEsASwBLAEsASwANAA0AHgANAA0ADQANAB4AHgAeAB4AHgAeAB4AHgAeAB4ABAAEAAQABAAEAAQABAAEAAQAHgAeAB4AHgAeAB4AHgAeAB4AKwArACsABAAEAAQAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAABAAEAAQABAAEAAQABAAEAAQABAAEAAQABABQAFAASwBLAEsASwBLAEsASwBLAEsASwBQAFAAUABQAFAAUABQAFAABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEACsAKwArACsAKwArACsAKwAeAB4AHgAeAFAAUABQAFAABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEACsAKwArAA0ADQANAA0ADQBLAEsASwBLAEsASwBLAEsASwBLACsAKwArAFAAUABQAEsASwBLAEsASwBLAEsASwBLAEsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAA0ADQBQAFAAUABQAFAAUABQAFAAUAArACsAKwArACsAKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQACsAKwBQAFAAUAAeAB4AHgAeAB4AHgAeAB4AKwArACsAKwArACsAKwArAAQABAAEAB4ABAAEAAQABAAEAAQABAAEAAQABAAEAAQABABQAFAAUABQAAQAUABQAFAAUABQAFAABABQAFAABAAEAAQAUAArACsAKwArACsABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEACsABAAEAAQABAAEAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AKwArAFAAUABQAFAAUABQACsAKwBQAFAAUABQAFAAUABQAFAAKwBQACsAUAArAFAAKwAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeACsAKwAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgArAB4AHgAeAB4AHgAeAB4AHgBQAB4AHgAeAFAAUABQACsAHgAeAB4AHgAeAB4AHgAeAB4AHgBQAFAAUABQACsAKwAeAB4AHgAeAB4AHgArAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AKwArAFAAUABQACsAHgAeAB4AHgAeAB4AHgAOAB4AKwANAA0ADQANAA0ADQANAAkADQANAA0ACAAEAAsABAAEAA0ACQANAA0ADAAdAB0AHgAXABcAFgAXABcAFwAWABcAHQAdAB4AHgAUABQAFAANAAEAAQAEAAQABAAEAAQACQAaABoAGgAaABoAGgAaABoAHgAXABcAHQAVABUAHgAeAB4AHgAeAB4AGAAWABEAFQAVABUAHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4ADQAeAA0ADQANAA0AHgANAA0ADQAHAB4AHgAeAB4AKwAEAAQABAAEAAQABAAEAAQABAAEAFAAUAArACsATwBQAFAAUABQAFAAHgAeAB4AFgARAE8AUABPAE8ATwBPAFAAUABQAFAAUAAeAB4AHgAWABEAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQACsAKwArABsAGwAbABsAGwAbABsAGgAbABsAGwAbABsAGwAbABsAGwAbABsAGwAbABsAGgAbABsAGwAbABoAGwAbABoAGwAbABsAGwAbABsAGwAbABsAGwAbABsAGwAbABsAGwAbAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQAHgAeAFAAGgAeAB0AHgBQAB4AGgAeAB4AHgAeAB4AHgAeAB4AHgBPAB4AUAAbAB4AHgBQAFAAUABQAFAAHgAeAB4AHQAdAB4AUAAeAFAAHgBQAB4AUABPAFAAUAAeAB4AHgAeAB4AHgAeAFAAUABQAFAAUAAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAFAAHgBQAFAAUABQAE8ATwBQAFAAUABQAFAATwBQAFAATwBQAE8ATwBPAE8ATwBPAE8ATwBPAE8ATwBPAFAAUABQAFAATwBPAE8ATwBPAE8ATwBPAE8ATwBQAFAAUABQAFAAUABQAFAAUAAeAB4AUABQAFAAUABPAB4AHgArACsAKwArAB0AHQAdAB0AHQAdAB0AHQAdAB0AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB0AHgAdAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAdAB4AHQAdAB4AHgAeAB0AHQAeAB4AHQAeAB4AHgAdAB4AHQAbABsAHgAdAB4AHgAeAB4AHQAeAB4AHQAdAB0AHQAeAB4AHQAeAB0AHgAdAB0AHQAdAB0AHQAeAB0AHgAeAB4AHgAeAB0AHQAdAB0AHgAeAB4AHgAdAB0AHgAeAB4AHgAeAB4AHgAeAB4AHgAdAB4AHgAeAB0AHgAeAB4AHgAeAB0AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAdAB0AHgAeAB0AHQAdAB0AHgAeAB0AHQAeAB4AHQAdAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB0AHQAeAB4AHQAdAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHQAeAB4AHgAdAB4AHgAeAB4AHgAeAB4AHQAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB0AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AFAAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeABYAEQAWABEAHgAeAB4AHgAeAB4AHQAeAB4AHgAeAB4AHgAeACUAJQAeAB4AHgAeAB4AHgAeAB4AHgAWABEAHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AJQAlACUAJQAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArAE8ATwBPAE8ATwBPAE8ATwBPAE8ATwBPAE8ATwBPAE8ATwBPAE8ATwBPAE8ATwBPAE8ATwBPAE8ATwBPAE8ATwAdAB0AHQAdAB0AHQAdAB0AHQAdAB0AHQAdAB0AHQAdAB0AHQAdAB0AHQAdAB0AHQAdAB0AHQAdAB0AHQAdAB0AHQAdAE8ATwBPAE8ATwBPAE8ATwBPAE8ATwBPAE8ATwBPAE8ATwBPAE8ATwBPAFAAHQAdAB0AHQAdAB0AHQAdAB0AHQAdAB0AHgAeAB4AHgAdAB0AHQAdAB0AHQAdAB0AHQAdAB0AHQAdAB0AHQAdAB0AHQAdAB0AHQAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHQAdAB0AHQAdAB0AHQAdAB0AHQAdAB0AHQAdAB0AHQAeAB4AHQAdAB0AHQAeAB4AHgAeAB4AHgAeAB4AHgAeAB0AHQAeAB0AHQAdAB0AHQAdAB0AHgAeAB4AHgAeAB4AHgAeAB0AHQAeAB4AHQAdAB4AHgAeAB4AHQAdAB4AHgAeAB4AHQAdAB0AHgAeAB0AHgAeAB0AHQAdAB0AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAdAB0AHQAdAB4AHgAeAB4AHgAeAB4AHgAeAB0AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAlACUAJQAlAB4AHQAdAB4AHgAdAB4AHgAeAB4AHQAdAB4AHgAeAB4AJQAlAB0AHQAlAB4AJQAlACUAIAAlACUAHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAlACUAJQAeAB4AHgAeAB0AHgAdAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAdAB0AHgAdAB0AHQAeAB0AJQAdAB0AHgAdAB0AHgAdAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeACUAHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHQAdAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAlACUAJQAlACUAJQAlACUAJQAlACUAJQAdAB0AHQAdACUAHgAlACUAJQAdACUAJQAdAB0AHQAlACUAHQAdACUAHQAdACUAJQAlAB4AHQAeAB4AHgAeAB0AHQAlAB0AHQAdAB0AHQAdACUAJQAlACUAJQAdACUAJQAgACUAHQAdACUAJQAlACUAJQAlACUAJQAeAB4AHgAlACUAIAAgACAAIAAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB0AHgAeAB4AFwAXABcAFwAXABcAHgATABMAJQAeAB4AHgAWABEAFgARABYAEQAWABEAFgARABYAEQAWABEATwBPAE8ATwBPAE8ATwBPAE8ATwBPAE8ATwBPAE8ATwBPAE8ATwBPAE8ATwAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeABYAEQAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAWABEAFgARABYAEQAWABEAFgARAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AFgARABYAEQAWABEAFgARABYAEQAWABEAFgARABYAEQAWABEAFgARABYAEQAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAWABEAFgARAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AFgARAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAdAB0AHQAdAB0AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgArACsAHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AKwAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AUABQAFAAUAAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAEAAQABAAeAB4AKwArACsAKwArABMADQANAA0AUAATAA0AUABQAFAAUABQAFAAUABQACsAKwArACsAKwArACsAUAANACsAKwArACsAKwArACsAKwArACsAKwArACsAKwAEAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArACsAKwArACsAKwArACsAKwBQAFAAUABQAFAAUABQACsAUABQAFAAUABQAFAAUAArAFAAUABQAFAAUABQAFAAKwBQAFAAUABQAFAAUABQACsAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXAA0ADQANAA0ADQANAA0ADQAeAA0AFgANAB4AHgAXABcAHgAeABcAFwAWABEAFgARABYAEQAWABEADQANAA0ADQATAFAADQANAB4ADQANAB4AHgAeAB4AHgAMAAwADQANAA0AHgANAA0AFgANAA0ADQANAA0ADQANAA0AHgANAB4ADQANAB4AHgAeACsAKwArACsAKwArACsAKwArACsAKwArACsAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACsAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAKwArACsAKwArACsAKwArACsAKwArACsAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwAlACUAJQAlACUAJQAlACUAJQAlACUAJQArACsAKwArAA0AEQARACUAJQBHAFcAVwAWABEAFgARABYAEQAWABEAFgARACUAJQAWABEAFgARABYAEQAWABEAFQAWABEAEQAlAFcAVwBXAFcAVwBXAFcAVwBXAAQABAAEAAQABAAEACUAVwBXAFcAVwA2ACUAJQBXAFcAVwBHAEcAJQAlACUAKwBRAFcAUQBXAFEAVwBRAFcAUQBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFEAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBRAFcAUQBXAFEAVwBXAFcAVwBXAFcAUQBXAFcAVwBXAFcAVwBRAFEAKwArAAQABAAVABUARwBHAFcAFQBRAFcAUQBXAFEAVwBRAFcAUQBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFEAVwBRAFcAUQBXAFcAVwBXAFcAVwBRAFcAVwBXAFcAVwBXAFEAUQBXAFcAVwBXABUAUQBHAEcAVwArACsAKwArACsAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAKwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAKwAlACUAVwBXAFcAVwAlACUAJQAlACUAJQAlACUAJQAlACsAKwArACsAKwArACsAKwArACsAKwArAFEAUQBRAFEAUQBRAFEAUQBRAFEAUQBRAFEAUQBRAFEAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQArAFcAVwBXAFcAVwBXAFcAVwBXAFcAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQBPAE8ATwBPAE8ATwBPAE8AJQBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXACUAJQAlAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAEcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAKwArACsAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQArACsAKwArACsAKwArACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAADQATAA0AUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABLAEsASwBLAEsASwBLAEsASwBLAFAAUAArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAFAABAAEAAQABAAeAAQABAAEAAQABAAEAAQABAAEAAQAHgBQAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AUABQAAQABABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAAQABAAeAA0ADQANAA0ADQArACsAKwArACsAKwArACsAHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAFAAUABQAFAAUABQAFAAUABQAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AUAAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgBQAB4AHgAeAB4AHgAeAFAAHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgArACsAHgAeAB4AHgAeAB4AHgAeAB4AKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwAeAB4AUABQAFAAUABQAFAAUABQAFAAUABQAAQAUABQAFAABABQAFAAUABQAAQAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAAQABAAEAAQABAAeAB4AHgAeAAQAKwArACsAUABQAFAAUABQAFAAHgAeABoAHgArACsAKwArACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAADgAOABMAEwArACsAKwArACsAKwArACsABAAEAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAAQABAAEAAQABAAEACsAKwArACsAKwArACsAKwANAA0ASwBLAEsASwBLAEsASwBLAEsASwArACsAKwArACsAKwAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABABQAFAAUABQAFAAUAAeAB4AHgBQAA4AUABQAAQAUABQAFAAUABQAFAABAAEAAQABAAEAAQABAAEAA0ADQBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQAKwArACsAKwArACsAKwArACsAKwArAB4AWABYAFgAWABYAFgAWABYAFgAWABYAFgAWABYAFgAWABYAFgAWABYAFgAWABYAFgAWABYAFgAWABYACsAKwArAAQAHgAeAB4AHgAeAB4ADQANAA0AHgAeAB4AHgArAFAASwBLAEsASwBLAEsASwBLAEsASwArACsAKwArAB4AHgBcAFwAXABcAFwAKgBcAFwAXABcAFwAXABcAFwAXABcAEsASwBLAEsASwBLAEsASwBLAEsAXABcAFwAXABcACsAUABQAFAAUABQAFAAUABQAFAABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEACsAKwArACsAKwArACsAKwArAFAAUABQAAQAUABQAFAAUABQAFAAUABQAAQABAArACsASwBLAEsASwBLAEsASwBLAEsASwArACsAHgANAA0ADQBcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAKgAqACoAXAAqACoAKgBcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXAAqAFwAKgAqACoAXABcACoAKgBcAFwAXABcAFwAKgAqAFwAKgBcACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArAFwAXABcACoAKgBQAFAAUABQAFAAUABQAFAAUABQAFAABAAEAAQABAAEAA0ADQBQAFAAUAAEAAQAKwArACsAKwArACsAKwArACsAKwBQAFAAUABQAFAAUAArACsAUABQAFAAUABQAFAAKwArAFAAUABQAFAAUABQACsAKwArACsAKwArACsAKwArAFAAUABQAFAAUABQAFAAKwBQAFAAUABQAFAAUABQACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAHgAeACsAKwArACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAAEAAQABAAEAAQABAAEAAQADQAEAAQAKwArAEsASwBLAEsASwBLAEsASwBLAEsAKwArACsAKwArACsAVABVAFUAVQBVAFUAVQBVAFUAVQBVAFUAVQBVAFUAVQBVAFUAVQBVAFUAVQBVAFUAVQBVAFUAVQBUAFUAVQBVAFUAVQBVAFUAVQBVAFUAVQBVAFUAVQBVAFUAVQBVAFUAVQBVAFUAVQBVAFUAVQBVACsAKwArACsAKwArACsAKwArACsAKwArAFkAWQBZAFkAWQBZAFkAWQBZAFkAWQBZAFkAWQBZAFkAWQBZAFkAKwArACsAKwBaAFoAWgBaAFoAWgBaAFoAWgBaAFoAWgBaAFoAWgBaAFoAWgBaAFoAWgBaAFoAWgBaAFoAWgBaAFoAKwArACsAKwAGAAYABgAGAAYABgAGAAYABgAGAAYABgAGAAYABgAGAAYABgAGAAYABgAGAAYABgAGAAYABgAGAAYABgAGAAYAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXACUAJQBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAJQAlACUAJQAlACUAUABQAFAAUABQAFAAUAArACsAKwArACsAKwArACsAKwArACsAKwBQAFAAUABQAFAAKwArACsAKwArAFYABABWAFYAVgBWAFYAVgBWAFYAVgBWAB4AVgBWAFYAVgBWAFYAVgBWAFYAVgBWAFYAVgArAFYAVgBWAFYAVgArAFYAKwBWAFYAKwBWAFYAKwBWAFYAVgBWAFYAVgBWAFYAVgBWAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAEQAWAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUAAaAB4AKwArAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQAGAARABEAGAAYABMAEwAWABEAFAArACsAKwArACsAKwAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEACUAJQAlACUAJQAWABEAFgARABYAEQAWABEAFgARABYAEQAlACUAFgARACUAJQAlACUAJQAlACUAEQAlABEAKwAVABUAEwATACUAFgARABYAEQAWABEAJQAlACUAJQAlACUAJQAlACsAJQAbABoAJQArACsAKwArAFAAUABQAFAAUAArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwArAAcAKwATACUAJQAbABoAJQAlABYAEQAlACUAEQAlABEAJQBXAFcAVwBXAFcAVwBXAFcAVwBXABUAFQAlACUAJQATACUAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXABYAJQARACUAJQAlAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwAWACUAEQAlABYAEQARABYAEQARABUAVwBRAFEAUQBRAFEAUQBRAFEAUQBRAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAEcARwArACsAVwBXAFcAVwBXAFcAKwArAFcAVwBXAFcAVwBXACsAKwBXAFcAVwBXAFcAVwArACsAVwBXAFcAKwArACsAGgAbACUAJQAlABsAGwArAB4AHgAeAB4AHgAeAB4AKwArACsAKwArACsAKwArACsAKwAEAAQABAAQAB0AKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwBQAFAAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArACsAKwArACsADQANAA0AKwArACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQACsAKwArAB4AHgAeAB4AHgAeAB4AHgAeAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgBQAFAAHgAeAB4AKwAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAAQAKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwAEAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQACsAKwArACsAKwArACsAKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwArACsAKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAABAAEAAQABAAEACsAKwArACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArAA0AUABQAFAAUAArACsAKwArAFAAUABQAFAAUABQAFAAUAANAFAAUABQAFAAUAArACsAKwArACsAKwArACsAKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwArACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQACsAKwArACsAKwArACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQACsAKwArACsAKwArACsAKwArACsAKwAeACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAUABQAFAAUABQAFAAKwArAFAAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArAFAAUAArACsAKwBQACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwANAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAAeAB4AUABQAFAAUABQAFAAUAArACsAKwArACsAKwArAFAAUABQAFAAUABQAFAAUABQACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArAFAAUAArACsAKwArACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQACsAKwArAA0AUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQACsAKwArACsAKwAeAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQACsAKwArACsAUABQAFAAUABQAAQABAAEACsABAAEACsAKwArACsAKwAEAAQABAAEAFAAUABQAFAAKwBQAFAAUAArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwArAAQABAAEACsAKwArACsABABQAFAAUABQAFAAUABQAFAAUAArACsAKwArACsAKwArAA0ADQANAA0ADQANAA0ADQAeACsAKwArACsAKwArACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAAeAFAAUABQAFAAUABQAFAAUAAeAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAAQABAArACsAKwArAFAAUABQAFAAUAANAA0ADQANAA0ADQAUACsAKwArACsAKwArACsAKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwArACsADQANAA0ADQANAA0ADQBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArACsAKwArACsAKwArAB4AHgAeAB4AKwArACsAKwArACsAKwArACsAKwArACsAUABQAFAAUABQAFAAUAArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArAFAAUABQAFAAUABQAFAAUABQACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQACsAKwArACsAKwArACsAKwArACsAKwArACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArACsAKwArACsAKwArAFAAUABQAFAAUABQAAQABAAEAAQAKwArACsAKwArACsAKwArAEsASwBLAEsASwBLAEsASwBLAEsAKwArACsAKwArACsAUABQAFAAUABQAFAAUABQAFAAUAArAAQABAANACsAKwBQAFAAKwArACsAKwArACsAKwArACsAKwArACsAKwArAFAAUABQAFAAUABQAAQABAAEAAQABAAEAAQABAAEAAQABABQAFAAUABQAB4AHgAeAB4AHgArACsAKwArACsAKwAEAAQABAAEAAQABAAEAA0ADQAeAB4AHgAeAB4AKwArACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAEsASwBLAEsASwBLAEsASwBLAEsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsABABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAAQABAAEAAQABAAEAAQABAAEAAQABAAeAB4AHgANAA0ADQANACsAKwArACsAKwArACsAKwArACsAKwAeACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwArACsAKwArACsAKwBLAEsASwBLAEsASwBLAEsASwBLACsAKwArACsAKwArAFAAUABQAFAAUABQAFAABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEACsASwBLAEsASwBLAEsASwBLAEsASwANAA0ADQANAFAABAAEAFAAKwArACsAKwArACsAKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAABAAeAA4AUAArACsAKwArACsAKwArACsAKwAEAFAAUABQAFAADQANAB4ADQAEAAQABAAEAB4ABAAEAEsASwBLAEsASwBLAEsASwBLAEsAUAAOAFAADQANAA0AKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwArACsAKwArACsAKwArACsAKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAAEAAQABAAEAAQABAAEAAQABAAEAAQABAANAA0AHgANAA0AHgAEACsAUABQAFAAUABQAFAAUAArAFAAKwBQAFAAUABQACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwBQAFAAUABQAFAAUABQAFAAUABQAA0AKwArACsAKwArACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAAEAAQABAAEAAQABAAEAAQABAAEAAQAKwArACsAKwArAEsASwBLAEsASwBLAEsASwBLAEsAKwArACsAKwArACsABAAEAAQABAArAFAAUABQAFAAUABQAFAAUAArACsAUABQACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwBQAFAAUABQAFAAUABQACsAUABQACsAUABQAFAAUABQACsABAAEAFAABAAEAAQABAAEAAQABAArACsABAAEACsAKwAEAAQABAArACsAUAArACsAKwArACsAKwAEACsAKwArACsAKwBQAFAAUABQAFAABAAEACsAKwAEAAQABAAEAAQABAAEACsAKwArAAQABAAEAAQABAArACsAKwArACsAKwArACsAKwArACsABAAEAAQABAAEAAQABABQAFAAUABQAA0ADQANAA0AHgBLAEsASwBLAEsASwBLAEsASwBLAA0ADQArAB4ABABQAFAAUAArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwAEAAQABAAEAFAAUAAeAFAAKwArACsAKwArACsAKwArAEsASwBLAEsASwBLAEsASwBLAEsAKwArACsAKwArACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAABAAEAAQABAAEAAQABAArACsABAAEAAQABAAEAAQABAAEAAQADgANAA0AEwATAB4AHgAeAA0ADQANAA0ADQANAA0ADQANAA0ADQANAA0ADQANAFAAUABQAFAABAAEACsAKwAEAA0ADQAeAFAAKwArACsAKwArACsAKwArACsAKwArAEsASwBLAEsASwBLAEsASwBLAEsAKwArACsAKwArACsADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArAFAAUABQAFAAUABQAFAAUABQAFAAUAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAFAAKwArACsAKwArACsAKwBLAEsASwBLAEsASwBLAEsASwBLACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAKwArACoAKgAqACoAKgAqACoAKgAqACoAKgAqACoAKgAqACsAKwArACsASwBLAEsASwBLAEsASwBLAEsASwBcAFwADQANAA0AKgBQAFAAUABQAFAAUABQAFAAUABQAFAAUAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAeACsAKwArACsASwBLAEsASwBLAEsASwBLAEsASwBQAFAAUABQAFAAUABQAFAAUAArACsAKwArACsAKwArACsAKwArACsAKwBQAFAAUABQAFAAUABQAFAAKwArAFAAKwArAFAAUABQAFAAUABQAFAAUAArAFAAUAArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAABAAEAAQABAAEAAQAKwAEAAQAKwArAAQABAAEAAQAUAAEAFAABAAEAA0ADQANACsAKwArACsAKwArACsAKwArAEsASwBLAEsASwBLAEsASwBLAEsAKwArACsAKwArACsAUABQAFAAUABQAFAAUABQACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAABAAEAAQABAAEAAQABAArACsABAAEAAQABAAEAAQABABQAA4AUAAEACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArAFAABAAEAAQABAAEAAQABAAEAAQABABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAAEAAQABAAEAAQABAAEAFAABAAEAAQABAAOAB4ADQANAA0ADQAOAB4ABAArACsAKwArACsAKwArACsAUAAEAAQABAAEAAQABAAEAAQABAAEAAQAUABQAFAAUABQAFAAUABQAFAAUAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAA0ADQANAFAADgAOAA4ADQANACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwBQAFAAUABQAFAAUABQAFAAUAArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAABAAEAAQABAAEAAQABAAEACsABAAEAAQABAAEAAQABAAEAFAADQANAA0ADQANACsAKwArACsAKwArACsAKwArACsASwBLAEsASwBLAEsASwBLAEsASwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArACsAKwAOABMAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwArAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAArAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAArACsAKwArACsAKwArACsAKwBQAFAAUABQAFAAUABQACsAUABQACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAAEAAQABAAEAAQABAArACsAKwAEACsABAAEACsABAAEAAQABAAEAAQABABQAAQAKwArACsAKwArACsAKwArAEsASwBLAEsASwBLAEsASwBLAEsAKwArACsAKwArACsAUABQAFAAUABQAFAAKwBQAFAAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAAEAAQABAAEAAQAKwAEAAQAKwAEAAQABAAEAAQAUAArACsAKwArACsAKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAABAAEAAQABAAeAB4AKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwBQACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAB4AHgAeAB4AHgAeAB4AHgAaABoAGgAaAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgArACsAKwArACsAKwArACsAKwArACsAKwArAA0AUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQACsAKwArACsAKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQACsADQANAA0ADQANACsAKwArACsAKwArACsAKwArACsAKwBQAFAAUABQACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAASABIAEgAQwBDAEMAUABQAFAAUABDAFAAUABQAEgAQwBIAEMAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAASABDAEMAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwAJAAkACQAJAAkACQAJABYAEQArACsAKwArACsAKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABIAEMAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArAEsASwBLAEsASwBLAEsASwBLAEsAKwArACsAKwANAA0AKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwArAAQABAAEAAQABAANACsAKwArACsAKwArACsAKwArACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAAEAAQABAAEAAQABAAEAA0ADQANAB4AHgAeAB4AHgAeAFAAUABQAFAADQAeACsAKwArACsAKwArACsAKwArACsASwBLAEsASwBLAEsASwBLAEsASwArAFAAUABQAFAAUABQAFAAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArACsAKwArACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAANAA0AHgAeACsAKwArACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAKwArACsAKwAEAFAABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQAKwArACsAKwArACsAKwAEAAQABAAEAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAARwBHABUARwAJACsAKwArACsAKwArACsAKwArACsAKwAEAAQAKwArACsAKwArACsAKwArACsAKwArACsAKwArAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXACsAKwArACsAKwArACsAKwBXAFcAVwBXAFcAVwBXAFcAVwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAUQBRAFEAKwArACsAKwArACsAKwArACsAKwArACsAKwBRAFEAUQBRACsAKwArACsAKwArACsAKwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXACsAKwArACsAUABQAFAAUABQAFAAUABQAFAAUABQACsAKwArACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQACsAKwArACsAKwArACsAUABQAFAAUABQAFAAUABQAFAAUAArACsAHgAEAAQADQAEAAQABAAEACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgArACsAKwArACsAKwArACsAKwArAB4AHgAeAB4AHgAeAB4AKwArAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAAQABAAEAAQABAAeAB4AHgAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAB4AHgAEAAQABAAEAAQABAAEAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4ABAAEAAQABAAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4ABAAEAAQAHgArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQACsAKwArACsAKwArACsAKwArACsAKwArAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgArACsAKwArACsAKwArACsAKwAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgArAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AKwBQAFAAKwArAFAAKwArAFAAUAArACsAUABQAFAAUAArAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeACsAUAArAFAAUABQAFAAUABQAFAAKwAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AKwBQAFAAUABQACsAKwBQAFAAUABQAFAAUABQAFAAKwBQAFAAUABQAFAAUABQACsAHgAeAFAAUABQAFAAUAArAFAAKwArACsAUABQAFAAUABQAFAAUAArAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAHgBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgBQAFAAUABQAFAAUABQAFAAUABQAFAAHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAB4AHgAeAB4AHgAeAB4AHgAeACsAKwBLAEsASwBLAEsASwBLAEsASwBLAEsASwBLAEsASwBLAEsASwBLAEsASwBLAEsASwBLAEsASwBLAEsASwBLAEsASwBLAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAeAB4AHgAeAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAeAB4AHgAeAB4AHgAeAB4ABAAeAB4AHgAeAB4AHgAeAB4AHgAeAAQAHgAeAA0ADQANAA0AHgArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwAEAAQABAAEAAQAKwAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArAAQABAAEAAQABAAEAAQAKwAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQAKwArAAQABAAEAAQABAAEAAQAKwAEAAQAKwAEAAQABAAEAAQAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArACsAKwAEAAQABAAEAAQABAAEAFAAUABQAFAAUABQAFAAKwArAEsASwBLAEsASwBLAEsASwBLAEsAKwArACsAKwBQAB4AKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUAAEAAQABAAEAEsASwBLAEsASwBLAEsASwBLAEsAKwArACsAKwArABsAUABQAFAAUABQACsAKwBQAFAAUABQAFAAUABQAFAAUAAEAAQABAAEAAQABAAEACsAKwArACsAKwArACsAKwArAB4AHgAeAB4ABAAEAAQABAAEAAQABABQACsAKwArACsASwBLAEsASwBLAEsASwBLAEsASwArACsAKwArABYAFgArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAGgBQAFAAUAAaAFAAUABQAFAAKwArACsAKwArACsAKwArACsAKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAAeAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQACsAKwBQAFAAUABQACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwBQAFAAKwBQACsAKwBQACsAUABQAFAAUABQAFAAUABQAFAAUAArAFAAUABQAFAAKwBQACsAUAArACsAKwArACsAKwBQACsAKwArACsAUAArAFAAKwBQACsAUABQAFAAKwBQAFAAKwBQACsAKwBQACsAUAArAFAAKwBQACsAUAArAFAAUAArAFAAKwArAFAAUABQAFAAKwBQAFAAUABQAFAAUABQACsAUABQAFAAUAArAFAAUABQAFAAKwBQACsAUABQAFAAUABQAFAAUABQAFAAUAArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArACsAKwArACsAUABQAFAAKwBQAFAAUABQAFAAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwAeAB4AKwArACsAKwArACsAKwArACsAKwArACsAKwArAE8ATwBPAE8ATwBPAE8ATwBPAE8ATwBPAE8AJQAlACUAHQAdAB0AHQAdAB0AHQAdAB0AHQAdAB0AHQAdAB0AHQAdAB0AHgAeAB0AHQAdAB0AHQAdAB0AHQAdAB0AHQAdAB0AHQAdAB0AHQAdAB4AHgAeACUAJQAlAB0AHQAdAB0AHQAdAB0AHQAdAB0AHQAdAB0AHQAdAB0AHQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQApACkAKQApACkAKQApACkAKQApACkAKQApACkAKQApACkAKQApACkAKQApACkAKQApACkAJQAlACUAJQAlACAAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAeAB4AJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlAB4AHgAlACUAJQAlACUAHgAlACUAJQAlACUAIAAgACAAJQAlACAAJQAlACAAIAAgACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACEAIQAhACEAIQAlACUAIAAgACUAJQAgACAAIAAgACAAIAAgACAAIAAgACAAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAJQAlACUAIAAlACUAJQAlACAAIAAgACUAIAAgACAAJQAlACUAJQAlACUAJQAgACUAIAAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAHgAlAB4AJQAeACUAJQAlACUAJQAgACUAJQAlACUAHgAlAB4AHgAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlAB4AHgAeAB4AHgAeAB4AJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAeAB4AHgAeAB4AHgAeAB4AHgAeACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACAAIAAlACUAJQAlACAAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACAAJQAlACUAJQAgACAAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAHgAeAB4AHgAeAB4AHgAeACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAeAB4AHgAeAB4AHgAlACUAJQAlACUAJQAlACAAIAAgACUAJQAlACAAIAAgACAAIAAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeABcAFwAXABUAFQAVAB4AHgAeAB4AJQAlACUAIAAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACAAIAAgACUAJQAlACUAJQAlACUAJQAlACAAJQAlACUAJQAlACUAJQAlACUAJQAlACAAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AJQAlACUAJQAlACUAJQAlACUAJQAlACUAHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AJQAlACUAJQAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeACUAJQAlACUAJQAlACUAJQAeAB4AHgAeAB4AHgAeAB4AHgAeACUAJQAlACUAJQAlAB4AHgAeAB4AHgAeAB4AHgAlACUAJQAlACUAJQAlACUAHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAgACUAJQAgACUAJQAlACUAJQAlACUAJQAgACAAIAAgACAAIAAgACAAJQAlACUAJQAlACUAIAAlACUAJQAlACUAJQAlACUAJQAgACAAIAAgACAAIAAgACAAIAAgACUAJQAgACAAIAAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAgACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACAAIAAlACAAIAAlACAAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAgACAAIAAlACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAJQAlAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AKwAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArAEsASwBLAEsASwBLAEsASwBLAEsAKwArACsAKwArACsAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAKwArAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXACUAJQBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwAlACUAJQAlACUAJQAlACUAJQAlACUAVwBXACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAKwAEACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArAA==",ft=50,Et=1,Ft=2,Ut=3,Se=4,Gt=5,ht=7,tn=8,dt=9,Je=10,xe=11,_e=12,N=13,Fe=14,De=15,V=16,T=17,J=18,ve=19,te=20,$=21,ue=22,Ie=23,Ce=24,ke=25,Le=26,mt=27,je=28,qe=29,ut=30,Nt=31,It=32,bt=33,on=34,rn=35,Ct=36,gn=37,Ln=38,Mt=39,hn=40,We=41,Qe=42,He=43,z=[9001,65288],le="!",me="\xD7",Be="\xF7",be=m(Oe),Tt=[ut,Ct],Wt=[Et,Ft,Ut,Gt],an=[Je,tn],_n=[mt,Le],Wn=Wt.concat(an),zn=[Ln,Mt,hn,on,rn],On=[De,N],Un=function(i,e){e===void 0&&(e="strict");var t=[],n=[],r=[];return i.forEach(function(s,a){var o=be.get(s);if(o>ft?(r.push(!0),o-=ft):r.push(!1),["normal","auto","loose"].indexOf(e)!==-1&&[8208,8211,12316,12448].indexOf(s)!==-1)return n.push(a),t.push(V);if(o===Se||o===xe){if(a===0)return n.push(a),t.push(ut);var u=t[a-1];return Wn.indexOf(u)===-1?(n.push(n[a-1]),t.push(u)):(n.push(a),t.push(ut))}if(n.push(a),o===Nt)return t.push(e==="strict"?$:gn);if(o===Qe||o===qe)return t.push(ut);if(o===He)return s>=131072&&s<=196605||s>=196608&&s<=262141?t.push(gn):t.push(ut);t.push(o)}),[n,t,r]},ar=function(i,e,t,n){var r=n[t];if(Array.isArray(i)?i.indexOf(r)!==-1:i===r)for(var s=t;s<=n.length;){s++;var a=n[s];if(a===e)return!0;if(a!==Je)break}if(r===Je)for(var s=t;s>0;){s--;var o=n[s];if(Array.isArray(i)?i.indexOf(o)!==-1:i===o)for(var u=t;u<=n.length;){u++;var a=n[u];if(a===e)return!0;if(a!==Je)break}if(o!==Je)break}return!1},mr=function(i,e){for(var t=i;t>=0;){var n=e[t];if(n===Je)t--;else return n}return 0},tr=function(i,e,t,n,r){if(t[n]===0)return me;var s=n-1;if(Array.isArray(r)&&r[s]===!0)return me;var a=s-1,o=s+1,u=e[s],l=a>=0?e[a]:0,c=e[o];if(u===Ft&&c===Ut)return me;if(Wt.indexOf(u)!==-1)return le;if(Wt.indexOf(c)!==-1||an.indexOf(c)!==-1)return me;if(mr(s,e)===tn)return Be;if(be.get(i[s])===xe||(u===It||u===bt)&&be.get(i[o])===xe||u===ht||c===ht||u===dt||[Je,N,De].indexOf(u)===-1&&c===dt||[T,J,ve,Ce,je].indexOf(c)!==-1||mr(s,e)===ue||ar(Ie,ue,s,e)||ar([T,J],$,s,e)||ar(_e,_e,s,e))return me;if(u===Je)return Be;if(u===Ie||c===Ie)return me;if(c===V||u===V)return Be;if([N,De,$].indexOf(c)!==-1||u===Fe||l===Ct&&On.indexOf(u)!==-1||u===je&&c===Ct||c===te||Tt.indexOf(c)!==-1&&u===ke||Tt.indexOf(u)!==-1&&c===ke||u===mt&&[gn,It,bt].indexOf(c)!==-1||[gn,It,bt].indexOf(u)!==-1&&c===Le||Tt.indexOf(u)!==-1&&_n.indexOf(c)!==-1||_n.indexOf(u)!==-1&&Tt.indexOf(c)!==-1||[mt,Le].indexOf(u)!==-1&&(c===ke||[ue,De].indexOf(c)!==-1&&e[o+1]===ke)||[ue,De].indexOf(u)!==-1&&c===ke||u===ke&&[ke,je,Ce].indexOf(c)!==-1)return me;if([ke,je,Ce,T,J].indexOf(c)!==-1)for(var d=s;d>=0;){var g=e[d];if(g===ke)return me;if([je,Ce].indexOf(g)!==-1)d--;else break}if([mt,Le].indexOf(c)!==-1)for(var d=[T,J].indexOf(u)!==-1?a:s;d>=0;){var g=e[d];if(g===ke)return me;if([je,Ce].indexOf(g)!==-1)d--;else break}if(Ln===u&&[Ln,Mt,on,rn].indexOf(c)!==-1||[Mt,on].indexOf(u)!==-1&&[Mt,hn].indexOf(c)!==-1||[hn,rn].indexOf(u)!==-1&&c===hn||zn.indexOf(u)!==-1&&[te,Le].indexOf(c)!==-1||zn.indexOf(c)!==-1&&u===mt||Tt.indexOf(u)!==-1&&Tt.indexOf(c)!==-1||u===Ce&&Tt.indexOf(c)!==-1||Tt.concat(ke).indexOf(u)!==-1&&c===ue&&z.indexOf(i[o])===-1||Tt.concat(ke).indexOf(c)!==-1&&u===J)return me;if(u===We&&c===We){for(var w=t[s],y=1;w>0&&(w--,e[w]===We);)y++;if(y%2!==0)return me}return u===It&&c===bt?me:Be},gr=function(i,e){e||(e={lineBreak:"normal",wordBreak:"normal"});var t=Un(i,e.lineBreak),n=t[0],r=t[1],s=t[2];(e.wordBreak==="break-all"||e.wordBreak==="break-word")&&(r=r.map(function(o){return[ke,ut,Qe].indexOf(o)!==-1?gn:o}));var a=e.wordBreak==="keep-all"?s.map(function(o,u){return o&&i[u]>=19968&&i[u]<=40959}):void 0;return[n,r,a]},sn=function(){function i(e,t,n,r){this.codePoints=e,this.required=t===le,this.start=n,this.end=r}return i.prototype.slice=function(){return A.apply(void 0,this.codePoints.slice(this.start,this.end))},i}(),Kt=function(i,e){var t=ee(i),n=gr(t,e),r=n[0],s=n[1],a=n[2],o=t.length,u=0,l=0;return{next:function(){if(l>=o)return{done:!0,value:null};for(var c=me;l<o&&(c=tr(t,s,r,++l,a))===me;);if(c!==me||l===o){var d=new sn(t,c,u,l);return u=l,{value:d,done:!1}}return{done:!0,value:null}}}},yn=1,Yn=2,or=4,Ke=8,Pe=10,Yt=47,Lt=92,qt=9,nn=32,Xt=34,zt=61,pn=35,Ot=36,cn=37,un=39,lt=40,Pt=41,Re=95,Ye=45,vt=33,xt=60,Vt=62,Jt=64,Zt=91,vn=93,Bn=61,Dn=123,st=63,En=125,mn=124,L=126,k=128,ce=65533,ye=42,Ge=43,$e=44,gt=58,Bt=59,Ht=46,kt=0,St=8,$t=11,oe=14,Ve=31,Te=127,Me=-1,ze=48,at=97,Dt=101,yt=102,it=117,Ne=122,Xe=65,nt=69,et=70,ot=85,Qt=90,en=function(i){return i>=ze&&i<=57},An=function(i){return i>=55296&&i<=57343},bn=function(i){return en(i)||i>=Xe&&i<=et||i>=at&&i<=yt},Fn=function(i){return i>=at&&i<=Ne},wn=function(i){return i>=Xe&&i<=Qt},Sn=function(i){return Fn(i)||wn(i)},dn=function(i){return i>=k},Xn=function(i){return i===Pe||i===qt||i===nn},Mn=function(i){return Sn(i)||dn(i)||i===Re},cr=function(i){return Mn(i)||en(i)||i===Ye},ln=function(i){return i>=kt&&i<=St||i===$t||i>=oe&&i<=Ve||i===Te},Vn=function(i,e){return i!==Lt?!1:e!==Pe},nr=function(i,e,t){return i===Ye?Mn(e)||Vn(e,t):Mn(i)?!0:!!(i===Lt&&Vn(i,e))},Jn=function(i,e,t){return i===Ge||i===Ye?en(e)?!0:e===Ht&&en(t):en(i===Ht?e:i)},Kn=function(i){var e=0,t=1;(i[e]===Ge||i[e]===Ye)&&(i[e]===Ye&&(t=-1),e++);for(var n=[];en(i[e]);)n.push(i[e++]);var r=n.length?parseInt(A.apply(void 0,n),10):0;i[e]===Ht&&e++;for(var s=[];en(i[e]);)s.push(i[e++]);var a=s.length,o=a?parseInt(A.apply(void 0,s),10):0;(i[e]===nt||i[e]===Dt)&&e++;var u=1;(i[e]===Ge||i[e]===Ye)&&(i[e]===Ye&&(u=-1),e++);for(var l=[];en(i[e]);)l.push(i[e++]);var c=l.length?parseInt(A.apply(void 0,l),10):0;return t*(r+o*Math.pow(10,-a))*Math.pow(10,u*c)},Nn={type:2},xn={type:3},Pn={type:4},In={type:13},pr={type:8},fr={type:21},hr={type:9},Rr={type:10},Zr={type:11},Yr={type:12},ii={type:14},Xr={type:23},si={type:1},Er={type:25},Ir={type:24},ti={type:26},xr={type:27},wr={type:28},Ar={type:29},Tn={type:31},sr={type:32},lr=function(){function i(){this._value=[]}return i.prototype.write=function(e){this._value=this._value.concat(ee(e))},i.prototype.read=function(){for(var e=[],t=this.consumeToken();t!==sr;)e.push(t),t=this.consumeToken();return e},i.prototype.consumeToken=function(){var e=this.consumeCodePoint();switch(e){case Xt:return this.consumeStringToken(Xt);case pn:var t=this.peekCodePoint(0),n=this.peekCodePoint(1),r=this.peekCodePoint(2);if(cr(t)||Vn(n,r)){var s=nr(t,n,r)?Yn:yn,a=this.consumeName();return{type:5,value:a,flags:s}}break;case Ot:if(this.peekCodePoint(0)===zt)return this.consumeCodePoint(),In;break;case un:return this.consumeStringToken(un);case lt:return Nn;case Pt:return xn;case ye:if(this.peekCodePoint(0)===zt)return this.consumeCodePoint(),ii;break;case Ge:if(Jn(e,this.peekCodePoint(0),this.peekCodePoint(1)))return this.reconsumeCodePoint(e),this.consumeNumericToken();break;case $e:return Pn;case Ye:var o=e,u=this.peekCodePoint(0),l=this.peekCodePoint(1);if(Jn(o,u,l))return this.reconsumeCodePoint(e),this.consumeNumericToken();if(nr(o,u,l))return this.reconsumeCodePoint(e),this.consumeIdentLikeToken();if(u===Ye&&l===Vt)return this.consumeCodePoint(),this.consumeCodePoint(),Ir;break;case Ht:if(Jn(e,this.peekCodePoint(0),this.peekCodePoint(1)))return this.reconsumeCodePoint(e),this.consumeNumericToken();break;case Yt:if(this.peekCodePoint(0)===ye)for(this.consumeCodePoint();;){var c=this.consumeCodePoint();if(c===ye&&(c=this.consumeCodePoint(),c===Yt))return this.consumeToken();if(c===Me)return this.consumeToken()}break;case gt:return ti;case Bt:return xr;case xt:if(this.peekCodePoint(0)===vt&&this.peekCodePoint(1)===Ye&&this.peekCodePoint(2)===Ye)return this.consumeCodePoint(),this.consumeCodePoint(),Er;break;case Jt:var d=this.peekCodePoint(0),g=this.peekCodePoint(1),w=this.peekCodePoint(2);if(nr(d,g,w)){var a=this.consumeName();return{type:7,value:a}}break;case Zt:return wr;case Lt:if(Vn(e,this.peekCodePoint(0)))return this.reconsumeCodePoint(e),this.consumeIdentLikeToken();break;case vn:return Ar;case Bn:if(this.peekCodePoint(0)===zt)return this.consumeCodePoint(),pr;break;case Dn:return Zr;case En:return Yr;case it:case ot:var y=this.peekCodePoint(0),O=this.peekCodePoint(1);return y===Ge&&(bn(O)||O===st)&&(this.consumeCodePoint(),this.consumeUnicodeRangeToken()),this.reconsumeCodePoint(e),this.consumeIdentLikeToken();case mn:if(this.peekCodePoint(0)===zt)return this.consumeCodePoint(),hr;if(this.peekCodePoint(0)===mn)return this.consumeCodePoint(),fr;break;case L:if(this.peekCodePoint(0)===zt)return this.consumeCodePoint(),Rr;break;case Me:return sr}return Xn(e)?(this.consumeWhiteSpace(),Tn):en(e)?(this.reconsumeCodePoint(e),this.consumeNumericToken()):Mn(e)?(this.reconsumeCodePoint(e),this.consumeIdentLikeToken()):{type:6,value:A(e)}},i.prototype.consumeCodePoint=function(){var e=this._value.shift();return typeof e=="undefined"?-1:e},i.prototype.reconsumeCodePoint=function(e){this._value.unshift(e)},i.prototype.peekCodePoint=function(e){return e>=this._value.length?-1:this._value[e]},i.prototype.consumeUnicodeRangeToken=function(){for(var e=[],t=this.consumeCodePoint();bn(t)&&e.length<6;)e.push(t),t=this.consumeCodePoint();for(var n=!1;t===st&&e.length<6;)e.push(t),t=this.consumeCodePoint(),n=!0;if(n){var r=parseInt(A.apply(void 0,e.map(function(u){return u===st?ze:u})),16),s=parseInt(A.apply(void 0,e.map(function(u){return u===st?et:u})),16);return{type:30,start:r,end:s}}var a=parseInt(A.apply(void 0,e),16);if(this.peekCodePoint(0)===Ye&&bn(this.peekCodePoint(1))){this.consumeCodePoint(),t=this.consumeCodePoint();for(var o=[];bn(t)&&o.length<6;)o.push(t),t=this.consumeCodePoint();var s=parseInt(A.apply(void 0,o),16);return{type:30,start:a,end:s}}else return{type:30,start:a,end:a}},i.prototype.consumeIdentLikeToken=function(){var e=this.consumeName();return e.toLowerCase()==="url"&&this.peekCodePoint(0)===lt?(this.consumeCodePoint(),this.consumeUrlToken()):this.peekCodePoint(0)===lt?(this.consumeCodePoint(),{type:19,value:e}):{type:20,value:e}},i.prototype.consumeUrlToken=function(){var e=[];if(this.consumeWhiteSpace(),this.peekCodePoint(0)===Me)return{type:22,value:""};var t=this.peekCodePoint(0);if(t===un||t===Xt){var n=this.consumeStringToken(this.consumeCodePoint());return n.type===0&&(this.consumeWhiteSpace(),this.peekCodePoint(0)===Me||this.peekCodePoint(0)===Pt)?(this.consumeCodePoint(),{type:22,value:n.value}):(this.consumeBadUrlRemnants(),Xr)}for(;;){var r=this.consumeCodePoint();if(r===Me||r===Pt)return{type:22,value:A.apply(void 0,e)};if(Xn(r))return this.consumeWhiteSpace(),this.peekCodePoint(0)===Me||this.peekCodePoint(0)===Pt?(this.consumeCodePoint(),{type:22,value:A.apply(void 0,e)}):(this.consumeBadUrlRemnants(),Xr);if(r===Xt||r===un||r===lt||ln(r))return this.consumeBadUrlRemnants(),Xr;if(r===Lt)if(Vn(r,this.peekCodePoint(0)))e.push(this.consumeEscapedCodePoint());else return this.consumeBadUrlRemnants(),Xr;else e.push(r)}},i.prototype.consumeWhiteSpace=function(){for(;Xn(this.peekCodePoint(0));)this.consumeCodePoint()},i.prototype.consumeBadUrlRemnants=function(){for(;;){var e=this.consumeCodePoint();if(e===Pt||e===Me)return;Vn(e,this.peekCodePoint(0))&&this.consumeEscapedCodePoint()}},i.prototype.consumeStringSlice=function(e){for(var t=5e4,n="";e>0;){var r=Math.min(t,e);n+=A.apply(void 0,this._value.splice(0,r)),e-=r}return this._value.shift(),n},i.prototype.consumeStringToken=function(e){var t="",n=0;do{var r=this._value[n];if(r===Me||r===void 0||r===e)return t+=this.consumeStringSlice(n),{type:0,value:t};if(r===Pe)return this._value.splice(0,n),si;if(r===Lt){var s=this._value[n+1];s!==Me&&s!==void 0&&(s===Pe?(t+=this.consumeStringSlice(n),n=-1,this._value.shift()):Vn(r,s)&&(t+=this.consumeStringSlice(n),t+=A(this.consumeEscapedCodePoint()),n=-1))}n++}while(!0)},i.prototype.consumeNumber=function(){var e=[],t=or,n=this.peekCodePoint(0);for((n===Ge||n===Ye)&&e.push(this.consumeCodePoint());en(this.peekCodePoint(0));)e.push(this.consumeCodePoint());n=this.peekCodePoint(0);var r=this.peekCodePoint(1);if(n===Ht&&en(r))for(e.push(this.consumeCodePoint(),this.consumeCodePoint()),t=Ke;en(this.peekCodePoint(0));)e.push(this.consumeCodePoint());n=this.peekCodePoint(0),r=this.peekCodePoint(1);var s=this.peekCodePoint(2);if((n===nt||n===Dt)&&((r===Ge||r===Ye)&&en(s)||en(r)))for(e.push(this.consumeCodePoint(),this.consumeCodePoint()),t=Ke;en(this.peekCodePoint(0));)e.push(this.consumeCodePoint());return[Kn(e),t]},i.prototype.consumeNumericToken=function(){var e=this.consumeNumber(),t=e[0],n=e[1],r=this.peekCodePoint(0),s=this.peekCodePoint(1),a=this.peekCodePoint(2);if(nr(r,s,a)){var o=this.consumeName();return{type:15,number:t,flags:n,unit:o}}return r===cn?(this.consumeCodePoint(),{type:16,number:t,flags:n}):{type:17,number:t,flags:n}},i.prototype.consumeEscapedCodePoint=function(){var e=this.consumeCodePoint();if(bn(e)){for(var t=A(e);bn(this.peekCodePoint(0))&&t.length<6;)t+=A(this.consumeCodePoint());Xn(this.peekCodePoint(0))&&this.consumeCodePoint();var n=parseInt(t,16);return n===0||An(n)||n>1114111?ce:n}return e===Me?ce:e},i.prototype.consumeName=function(){for(var e="";;){var t=this.consumeCodePoint();if(cr(t))e+=A(t);else if(Vn(t,this.peekCodePoint(0)))e+=A(this.consumeEscapedCodePoint());else return this.reconsumeCodePoint(t),e}},i}(),dr=function(){function i(e){this._tokens=e}return i.create=function(e){var t=new lr;return t.write(e),new i(t.read())},i.parseValue=function(e){return i.create(e).parseComponentValue()},i.parseValues=function(e){return i.create(e).parseComponentValues()},i.prototype.parseComponentValue=function(){for(var e=this.consumeToken();e.type===31;)e=this.consumeToken();if(e.type===32)throw new SyntaxError("Error parsing CSS component value, unexpected EOF");this.reconsumeToken(e);var t=this.consumeComponentValue();do e=this.consumeToken();while(e.type===31);if(e.type===32)return t;throw new SyntaxError("Error parsing CSS component value, multiple values found when expecting only one")},i.prototype.parseComponentValues=function(){for(var e=[];;){var t=this.consumeComponentValue();if(t.type===32)return e;e.push(t),e.push()}},i.prototype.consumeComponentValue=function(){var e=this.consumeToken();switch(e.type){case 11:case 28:case 2:return this.consumeSimpleBlock(e.type);case 19:return this.consumeFunction(e)}return e},i.prototype.consumeSimpleBlock=function(e){for(var t={type:e,values:[]},n=this.consumeToken();;){if(n.type===32||$r(n,e))return t;this.reconsumeToken(n),t.values.push(this.consumeComponentValue()),n=this.consumeToken()}},i.prototype.consumeFunction=function(e){for(var t={name:e.value,values:[],type:18};;){var n=this.consumeToken();if(n.type===32||n.type===3)return t;this.reconsumeToken(n),t.values.push(this.consumeComponentValue())}},i.prototype.consumeToken=function(){var e=this._tokens.shift();return typeof e=="undefined"?sr:e},i.prototype.reconsumeToken=function(e){this._tokens.unshift(e)},i}(),br=function(i){return i.type===15},Dr=function(i){return i.type===17},Sr=function(i){return i.type===20},kn=function(i){return i.type===0},er=function(i,e){return Sr(i)&&i.value===e},qn=function(i){return i.type!==31},Cr=function(i){return i.type!==31&&i.type!==4},Tr=function(i){var e=[],t=[];return i.forEach(function(n){if(n.type===4){if(t.length===0)throw new Error("Error parsing function args, zero tokens for arg");e.push(t),t=[];return}n.type!==31&&t.push(n)}),t.length&&e.push(t),e},$r=function(i,e){return e===11&&i.type===12||e===28&&i.type===29?!0:e===2&&i.type===3},ni=function(i){return i.type===17||i.type===15},Mr=function(i){return i.type===16||ni(i)},Ai=function(i){return i.length>1?[i[0],i[1]]:[i[0]]},Ur={type:17,number:0,flags:or},mi={type:16,number:50,flags:or},Si={type:16,number:100,flags:or},Ti=function(i,e,t){var n=i[0],r=i[1];return[Kr(n,e),Kr(typeof r!="undefined"?r:n,t)]},Kr=function(i,e){if(i.type===16)return i.number/100*e;if(br(i))switch(i.unit){case"rem":case"em":return 16*i.number;case"px":default:return i.number}return i.number},Wi="deg",zi="grad",ns="rad",Ii="turn",Ui={name:"angle",parse:function(i,e){if(e.type===15)switch(e.unit){case Wi:return Math.PI*e.number/180;case zi:return Math.PI/200*e.number;case ns:return e.number;case Ii:return Math.PI*2*e.number}throw new Error("Unsupported angle type")}},Mi=function(i){return i.type===15&&(i.unit===Wi||i.unit===zi||i.unit===ns||i.unit===Ii)},As=function(i){var e=i.filter(Sr).map(function(t){return t.value}).join(" ");switch(e){case"to bottom right":case"to right bottom":case"left top":case"top left":return[Ur,Ur];case"to top":case"bottom":return Jr(0);case"to bottom left":case"to left bottom":case"right top":case"top right":return[Ur,Si];case"to right":case"left":return Jr(90);case"to top left":case"to left top":case"right bottom":case"bottom right":return[Si,Si];case"to bottom":case"top":return Jr(180);case"to top right":case"to right top":case"left bottom":case"bottom left":return[Si,Ur];case"to left":case"right":return Jr(270)}return 0},Jr=function(i){return Math.PI*i/180},Di={name:"color",parse:function(i,e){if(e.type===18){var t=Fr[e.name];if(typeof t=="undefined")throw new Error('Attempting to parse an unsupported color function "'+e.name+'"');return t(i,e.values)}if(e.type===5){if(e.value.length===3){var n=e.value.substring(0,1),r=e.value.substring(1,2),s=e.value.substring(2,3);return Li(parseInt(n+n,16),parseInt(r+r,16),parseInt(s+s,16),1)}if(e.value.length===4){var n=e.value.substring(0,1),r=e.value.substring(1,2),s=e.value.substring(2,3),a=e.value.substring(3,4);return Li(parseInt(n+n,16),parseInt(r+r,16),parseInt(s+s,16),parseInt(a+a,16)/255)}if(e.value.length===6){var n=e.value.substring(0,2),r=e.value.substring(2,4),s=e.value.substring(4,6);return Li(parseInt(n,16),parseInt(r,16),parseInt(s,16),1)}if(e.value.length===8){var n=e.value.substring(0,2),r=e.value.substring(2,4),s=e.value.substring(4,6),a=e.value.substring(6,8);return Li(parseInt(n,16),parseInt(r,16),parseInt(s,16),parseInt(a,16)/255)}}if(e.type===20){var o=Gr[e.value.toUpperCase()];if(typeof o!="undefined")return o}return Gr.TRANSPARENT}},Ei=function(i){return(255&i)===0},li=function(i){var e=255&i,t=255&i>>8,n=255&i>>16,r=255&i>>24;return e<255?"rgba("+r+","+n+","+t+","+e/255+")":"rgb("+r+","+n+","+t+")"},Li=function(i,e,t,n){return(i<<24|e<<16|t<<8|Math.round(n*255)<<0)>>>0},ds=function(i,e){if(i.type===17)return i.number;if(i.type===16){var t=e===3?1:255;return e===3?i.number/100*t:Math.round(i.number/100*t)}return 0},rs=function(i,e){var t=e.filter(Cr);if(t.length===3){var n=t.map(ds),r=n[0],s=n[1],a=n[2];return Li(r,s,a,1)}if(t.length===4){var o=t.map(ds),r=o[0],s=o[1],a=o[2],u=o[3];return Li(r,s,a,u)}return 0};function di(i,e,t){return t<0&&(t+=1),t>=1&&(t-=1),t<1/6?(e-i)*t*6+i:t<1/2?e:t<2/3?(e-i)*6*(2/3-t)+i:i}var ui=function(i,e){var t=e.filter(Cr),n=t[0],r=t[1],s=t[2],a=t[3],o=(n.type===17?Jr(n.number):Ui.parse(i,n))/(Math.PI*2),u=Mr(r)?r.number/100:0,l=Mr(s)?s.number/100:0,c=typeof a!="undefined"&&Mr(a)?Kr(a,1):1;if(u===0)return Li(l*255,l*255,l*255,1);var d=l<=.5?l*(u+1):l+u-l*u,g=l*2-d,w=di(g,d,o+1/3),y=di(g,d,o),O=di(g,d,o-1/3);return Li(w*255,y*255,O*255,c)},Fr={hsl:ui,hsla:ui,rgb:rs,rgba:rs},Br=function(i,e){return Di.parse(i,dr.create(e).parseComponentValue())},Gr={ALICEBLUE:4042850303,ANTIQUEWHITE:4209760255,AQUA:16777215,AQUAMARINE:2147472639,AZURE:4043309055,BEIGE:4126530815,BISQUE:4293182719,BLACK:255,BLANCHEDALMOND:4293643775,BLUE:65535,BLUEVIOLET:2318131967,BROWN:2771004159,BURLYWOOD:3736635391,CADETBLUE:1604231423,CHARTREUSE:2147418367,CHOCOLATE:3530104575,CORAL:4286533887,CORNFLOWERBLUE:1687547391,CORNSILK:4294499583,CRIMSON:3692313855,CYAN:16777215,DARKBLUE:35839,DARKCYAN:9145343,DARKGOLDENROD:3095837695,DARKGRAY:2846468607,DARKGREEN:6553855,DARKGREY:2846468607,DARKKHAKI:3182914559,DARKMAGENTA:2332068863,DARKOLIVEGREEN:1433087999,DARKORANGE:4287365375,DARKORCHID:2570243327,DARKRED:2332033279,DARKSALMON:3918953215,DARKSEAGREEN:2411499519,DARKSLATEBLUE:1211993087,DARKSLATEGRAY:793726975,DARKSLATEGREY:793726975,DARKTURQUOISE:13554175,DARKVIOLET:2483082239,DEEPPINK:4279538687,DEEPSKYBLUE:12582911,DIMGRAY:1768516095,DIMGREY:1768516095,DODGERBLUE:512819199,FIREBRICK:2988581631,FLORALWHITE:4294635775,FORESTGREEN:579543807,FUCHSIA:4278255615,GAINSBORO:3705462015,GHOSTWHITE:4177068031,GOLD:4292280575,GOLDENROD:3668254975,GRAY:2155905279,GREEN:8388863,GREENYELLOW:2919182335,GREY:2155905279,HONEYDEW:4043305215,HOTPINK:4285117695,INDIANRED:3445382399,INDIGO:1258324735,IVORY:4294963455,KHAKI:4041641215,LAVENDER:3873897215,LAVENDERBLUSH:4293981695,LAWNGREEN:2096890111,LEMONCHIFFON:4294626815,LIGHTBLUE:2916673279,LIGHTCORAL:4034953471,LIGHTCYAN:3774873599,LIGHTGOLDENRODYELLOW:4210742015,LIGHTGRAY:3553874943,LIGHTGREEN:2431553791,LIGHTGREY:3553874943,LIGHTPINK:4290167295,LIGHTSALMON:4288707327,LIGHTSEAGREEN:548580095,LIGHTSKYBLUE:2278488831,LIGHTSLATEGRAY:2005441023,LIGHTSLATEGREY:2005441023,LIGHTSTEELBLUE:2965692159,LIGHTYELLOW:4294959359,LIME:16711935,LIMEGREEN:852308735,LINEN:4210091775,MAGENTA:4278255615,MAROON:2147483903,MEDIUMAQUAMARINE:1724754687,MEDIUMBLUE:52735,MEDIUMORCHID:3126187007,MEDIUMPURPLE:2473647103,MEDIUMSEAGREEN:1018393087,MEDIUMSLATEBLUE:2070474495,MEDIUMSPRINGGREEN:16423679,MEDIUMTURQUOISE:1221709055,MEDIUMVIOLETRED:3340076543,MIDNIGHTBLUE:421097727,MINTCREAM:4127193855,MISTYROSE:4293190143,MOCCASIN:4293178879,NAVAJOWHITE:4292783615,NAVY:33023,OLDLACE:4260751103,OLIVE:2155872511,OLIVEDRAB:1804477439,ORANGE:4289003775,ORANGERED:4282712319,ORCHID:3664828159,PALEGOLDENROD:4008225535,PALEGREEN:2566625535,PALETURQUOISE:2951671551,PALEVIOLETRED:3681588223,PAPAYAWHIP:4293907967,PEACHPUFF:4292524543,PERU:3448061951,PINK:4290825215,PLUM:3718307327,POWDERBLUE:2967529215,PURPLE:2147516671,REBECCAPURPLE:1714657791,RED:4278190335,ROSYBROWN:3163525119,ROYALBLUE:1097458175,SADDLEBROWN:2336560127,SALMON:4202722047,SANDYBROWN:4104413439,SEAGREEN:780883967,SEASHELL:4294307583,SIENNA:2689740287,SILVER:3233857791,SKYBLUE:2278484991,SLATEBLUE:1784335871,SLATEGRAY:1887473919,SLATEGREY:1887473919,SNOW:4294638335,SPRINGGREEN:16744447,STEELBLUE:1182971135,TAN:3535047935,TEAL:8421631,THISTLE:3636451583,TOMATO:4284696575,TRANSPARENT:0,TURQUOISE:1088475391,VIOLET:4001558271,WHEAT:4125012991,WHITE:4294967295,WHITESMOKE:4126537215,YELLOW:4294902015,YELLOWGREEN:2597139199},ri={name:"background-clip",initialValue:"border-box",prefix:!1,type:1,parse:function(i,e){return e.map(function(t){if(Sr(t))switch(t.value){case"padding-box":return 1;case"content-box":return 2}return 0})}},ai={name:"background-color",initialValue:"transparent",prefix:!1,type:3,format:"color"},qr=function(i,e){var t=Di.parse(i,e[0]),n=e[1];return n&&Mr(n)?{color:t,stop:n}:{color:t,stop:null}},bi=function(i,e){var t=i[0],n=i[i.length-1];t.stop===null&&(t.stop=Ur),n.stop===null&&(n.stop=Si);for(var r=[],s=0,a=0;a<i.length;a++){var o=i[a].stop;if(o!==null){var u=Kr(o,e);u>s?r.push(u):r.push(s),s=u}else r.push(null)}for(var l=null,a=0;a<r.length;a++){var c=r[a];if(c===null)l===null&&(l=a);else if(l!==null){for(var d=a-l,g=r[l-1],w=(c-g)/(d+1),y=1;y<=d;y++)r[l+y-1]=w*y;l=null}}return i.map(function(O,H){var Ae=O.color;return{color:Ae,stop:Math.max(Math.min(1,r[H]/e),0)}})},gi=function(i,e,t){var n=e/2,r=t/2,s=Kr(i[0],e)-n,a=r-Kr(i[1],t);return(Math.atan2(a,s)+Math.PI*2)%(Math.PI*2)},Ni=function(i,e,t){var n=typeof i=="number"?i:gi(i,e,t),r=Math.abs(e*Math.sin(n))+Math.abs(t*Math.cos(n)),s=e/2,a=t/2,o=r/2,u=Math.sin(n-Math.PI/2)*o,l=Math.cos(n-Math.PI/2)*o;return[r,s-l,s+l,a-u,a+u]},Vr=function(i,e){return Math.sqrt(i*i+e*e)},vi=function(i,e,t,n,r){var s=[[0,0],[0,e],[i,0],[i,e]];return s.reduce(function(a,o){var u=o[0],l=o[1],c=Vr(t-u,n-l);return(r?c<a.optimumDistance:c>a.optimumDistance)?{optimumCorner:o,optimumDistance:c}:a},{optimumDistance:r?1/0:-1/0,optimumCorner:null}).optimumCorner},ji=function(i,e,t,n,r){var s=0,a=0;switch(i.size){case 0:i.shape===0?s=a=Math.min(Math.abs(e),Math.abs(e-n),Math.abs(t),Math.abs(t-r)):i.shape===1&&(s=Math.min(Math.abs(e),Math.abs(e-n)),a=Math.min(Math.abs(t),Math.abs(t-r)));break;case 2:if(i.shape===0)s=a=Math.min(Vr(e,t),Vr(e,t-r),Vr(e-n,t),Vr(e-n,t-r));else if(i.shape===1){var o=Math.min(Math.abs(t),Math.abs(t-r))/Math.min(Math.abs(e),Math.abs(e-n)),u=vi(n,r,e,t,!0),l=u[0],c=u[1];s=Vr(l-e,(c-t)/o),a=o*s}break;case 1:i.shape===0?s=a=Math.max(Math.abs(e),Math.abs(e-n),Math.abs(t),Math.abs(t-r)):i.shape===1&&(s=Math.max(Math.abs(e),Math.abs(e-n)),a=Math.max(Math.abs(t),Math.abs(t-r)));break;case 3:if(i.shape===0)s=a=Math.max(Vr(e,t),Vr(e,t-r),Vr(e-n,t),Vr(e-n,t-r));else if(i.shape===1){var o=Math.max(Math.abs(t),Math.abs(t-r))/Math.max(Math.abs(e),Math.abs(e-n)),d=vi(n,r,e,t,!1),l=d[0],c=d[1];s=Vr(l-e,(c-t)/o),a=o*s}break}return Array.isArray(i.size)&&(s=Kr(i.size[0],n),a=i.size.length===2?Kr(i.size[1],r):s),[s,a]},ki=function(i,e){var t=Jr(180),n=[];return Tr(e).forEach(function(r,s){if(s===0){var a=r[0];if(a.type===20&&a.value==="to"){t=As(r);return}else if(Mi(a)){t=Ui.parse(i,a);return}}var o=qr(i,r);n.push(o)}),{angle:t,stops:n,type:1}},Hi=function(i,e){var t=Jr(180),n=[];return Tr(e).forEach(function(r,s){if(s===0){var a=r[0];if(a.type===20&&["top","left","right","bottom"].indexOf(a.value)!==-1){t=As(r);return}else if(Mi(a)){t=(Ui.parse(i,a)+Jr(270))%Jr(360);return}}var o=qr(i,r);n.push(o)}),{angle:t,stops:n,type:1}},Xs=function(i,e){var t=Jr(180),n=[],r=1,s=0,a=3,o=[];return Tr(e).forEach(function(u,l){var c=u[0];if(l===0){if(Sr(c)&&c.value==="linear"){r=1;return}else if(Sr(c)&&c.value==="radial"){r=2;return}}if(c.type===18){if(c.name==="from"){var d=Di.parse(i,c.values[0]);n.push({stop:Ur,color:d})}else if(c.name==="to"){var d=Di.parse(i,c.values[0]);n.push({stop:Si,color:d})}else if(c.name==="color-stop"){var g=c.values.filter(Cr);if(g.length===2){var d=Di.parse(i,g[1]),w=g[0];Dr(w)&&n.push({stop:{type:16,number:w.number*100,flags:w.flags},color:d})}}}}),r===1?{angle:(t+Jr(180))%Jr(360),stops:n,type:r}:{size:a,shape:s,stops:n,position:o,type:r}},jt="closest-side",Hr="farthest-side",Wr="closest-corner",pi="farthest-corner",hi="circle",Fi="ellipse",hs="cover",Ds="contain",Js=function(i,e){var t=0,n=3,r=[],s=[];return Tr(e).forEach(function(a,o){var u=!0;if(o===0){var l=!1;u=a.reduce(function(d,g){if(l)if(Sr(g))switch(g.value){case"center":return s.push(mi),d;case"top":case"left":return s.push(Ur),d;case"right":case"bottom":return s.push(Si),d}else(Mr(g)||ni(g))&&s.push(g);else if(Sr(g))switch(g.value){case hi:return t=0,!1;case Fi:return t=1,!1;case"at":return l=!0,!1;case jt:return n=0,!1;case hs:case Hr:return n=1,!1;case Ds:case Wr:return n=2,!1;case pi:return n=3,!1}else if(ni(g)||Mr(g))return Array.isArray(n)||(n=[]),n.push(g),!1;return d},u)}if(u){var c=qr(i,a);r.push(c)}}),{size:n,shape:t,stops:r,position:s,type:2}},Yi=function(i,e){var t=0,n=3,r=[],s=[];return Tr(e).forEach(function(a,o){var u=!0;if(o===0?u=a.reduce(function(c,d){if(Sr(d))switch(d.value){case"center":return s.push(mi),!1;case"top":case"left":return s.push(Ur),!1;case"right":case"bottom":return s.push(Si),!1}else if(Mr(d)||ni(d))return s.push(d),!1;return c},u):o===1&&(u=a.reduce(function(c,d){if(Sr(d))switch(d.value){case hi:return t=0,!1;case Fi:return t=1,!1;case Ds:case jt:return n=0,!1;case Hr:return n=1,!1;case Wr:return n=2,!1;case hs:case pi:return n=3,!1}else if(ni(d)||Mr(d))return Array.isArray(n)||(n=[]),n.push(d),!1;return c},u)),u){var l=qr(i,a);r.push(l)}}),{size:n,shape:t,stops:r,position:s,type:2}},Ki=function(i){return i.type===1},Gi=function(i){return i.type===2},ls={name:"image",parse:function(i,e){if(e.type===22){var t={url:e.value,type:0};return i.cache.addImage(e.value),t}if(e.type===18){var n=Ia[e.name];if(typeof n=="undefined")throw new Error('Attempting to parse an unsupported image function "'+e.name+'"');return n(i,e.values)}throw new Error("Unsupported image type "+e.type)}};function Fa(i){return!(i.type===20&&i.value==="none")&&(i.type!==18||!!Ia[i.name])}var Ia={"linear-gradient":ki,"-moz-linear-gradient":Hi,"-ms-linear-gradient":Hi,"-o-linear-gradient":Hi,"-webkit-linear-gradient":Hi,"radial-gradient":Js,"-moz-radial-gradient":Yi,"-ms-radial-gradient":Yi,"-o-radial-gradient":Yi,"-webkit-radial-gradient":Yi,"-webkit-gradient":Xs},Da={name:"background-image",initialValue:"none",type:1,prefix:!1,parse:function(i,e){if(e.length===0)return[];var t=e[0];return t.type===20&&t.value==="none"?[]:e.filter(function(n){return Cr(n)&&Fa(n)}).map(function(n){return ls.parse(i,n)})}},ua={name:"background-origin",initialValue:"border-box",prefix:!1,type:1,parse:function(i,e){return e.map(function(t){if(Sr(t))switch(t.value){case"padding-box":return 1;case"content-box":return 2}return 0})}},ca={name:"background-position",initialValue:"0% 0%",type:1,prefix:!1,parse:function(i,e){return Tr(e).map(function(t){return t.filter(Mr)}).map(Ai)}},qs={name:"background-repeat",initialValue:"repeat",prefix:!1,type:1,parse:function(i,e){return Tr(e).map(function(t){return t.filter(Sr).map(function(n){return n.value}).join(" ")}).map(Ls)}},Ls=function(i){switch(i){case"no-repeat":return 1;case"repeat-x":case"repeat no-repeat":return 2;case"repeat-y":case"no-repeat repeat":return 3;case"repeat":default:return 0}},gs;(function(i){i.AUTO="auto",i.CONTAIN="contain",i.COVER="cover"})(gs||(gs={}));var Rs={name:"background-size",initialValue:"0",prefix:!1,type:1,parse:function(i,e){return Tr(e).map(function(t){return t.filter(ea)})}},ea=function(i){return Sr(i)||Mr(i)},us=function(i){return{name:"border-"+i+"-color",initialValue:"transparent",prefix:!1,type:3,format:"color"}},La=us("top"),Us=us("right"),Ra=us("bottom"),Ua=us("left"),ks=function(i){return{name:"border-radius-"+i,initialValue:"0 0",prefix:!1,type:1,parse:function(e,t){return Ai(t.filter(Mr))}}},fa=ks("top-left"),da=ks("top-right"),ha=ks("bottom-right"),ga=ks("bottom-left"),Os=function(i){return{name:"border-"+i+"-style",initialValue:"solid",prefix:!1,type:2,parse:function(e,t){switch(t){case"none":return 0;case"dashed":return 2;case"dotted":return 3;case"double":return 4}return 1}}},pa=Os("top"),Or=Os("right"),Pr=Os("bottom"),_i=Os("left"),Ci=function(i){return{name:"border-"+i+"-width",initialValue:"0",type:0,prefix:!1,parse:function(e,t){return br(t)?t.number:0}}},yi=Ci("top"),Es=Ci("right"),ps=Ci("bottom"),ms=Ci("left"),Ps={name:"color",initialValue:"transparent",prefix:!1,type:3,format:"color"},ws={name:"direction",initialValue:"ltr",prefix:!1,type:2,parse:function(i,e){switch(e){case"rtl":return 1;case"ltr":default:return 0}}},_l={name:"display",initialValue:"inline-block",prefix:!1,type:1,parse:function(i,e){return e.filter(Sr).reduce(function(t,n){return t|uA(n.value)},0)}},uA=function(i){switch(i){case"block":case"-webkit-box":return 2;case"inline":return 4;case"run-in":return 8;case"flow":return 16;case"flow-root":return 32;case"table":return 64;case"flex":case"-webkit-flex":return 128;case"grid":case"-ms-grid":return 256;case"ruby":return 512;case"subgrid":return 1024;case"list-item":return 2048;case"table-row-group":return 4096;case"table-header-group":return 8192;case"table-footer-group":return 16384;case"table-row":return 32768;case"table-cell":return 65536;case"table-column-group":return 131072;case"table-column":return 262144;case"table-caption":return 524288;case"ruby-base":return 1048576;case"ruby-text":return 2097152;case"ruby-base-container":return 4194304;case"ruby-text-container":return 8388608;case"contents":return 16777216;case"inline-block":return 33554432;case"inline-list-item":return 67108864;case"inline-table":return 134217728;case"inline-flex":return 268435456;case"inline-grid":return 536870912}return 0},cA={name:"float",initialValue:"none",prefix:!1,type:2,parse:function(i,e){switch(e){case"left":return 1;case"right":return 2;case"inline-start":return 3;case"inline-end":return 4}return 0}},yl={name:"letter-spacing",initialValue:"0",prefix:!1,type:0,parse:function(i,e){return e.type===20&&e.value==="normal"?0:e.type===17||e.type===15?e.number:0}},ta;(function(i){i.NORMAL="normal",i.STRICT="strict"})(ta||(ta={}));var Vi={name:"line-break",initialValue:"normal",prefix:!1,type:2,parse:function(i,e){switch(e){case"strict":return ta.STRICT;case"normal":default:return ta.NORMAL}}},cs={name:"line-height",initialValue:"normal",prefix:!1,type:4},ka=function(i,e){return Sr(i)&&i.value==="normal"?1.2*e:i.type===17?e*i.number:Mr(i)?Kr(i,e):e},El={name:"list-style-image",initialValue:"none",type:0,prefix:!1,parse:function(i,e){return e.type===20&&e.value==="none"?null:ls.parse(i,e)}},Oa={name:"list-style-position",initialValue:"outside",prefix:!1,type:2,parse:function(i,e){switch(e){case"inside":return 0;case"outside":default:return 1}}},po={name:"list-style-type",initialValue:"none",prefix:!1,type:2,parse:function(i,e){switch(e){case"disc":return 0;case"circle":return 1;case"square":return 2;case"decimal":return 3;case"cjk-decimal":return 4;case"decimal-leading-zero":return 5;case"lower-roman":return 6;case"upper-roman":return 7;case"lower-greek":return 8;case"lower-alpha":return 9;case"upper-alpha":return 10;case"arabic-indic":return 11;case"armenian":return 12;case"bengali":return 13;case"cambodian":return 14;case"cjk-earthly-branch":return 15;case"cjk-heavenly-stem":return 16;case"cjk-ideographic":return 17;case"devanagari":return 18;case"ethiopic-numeric":return 19;case"georgian":return 20;case"gujarati":return 21;case"gurmukhi":return 22;case"hebrew":return 22;case"hiragana":return 23;case"hiragana-iroha":return 24;case"japanese-formal":return 25;case"japanese-informal":return 26;case"kannada":return 27;case"katakana":return 28;case"katakana-iroha":return 29;case"khmer":return 30;case"korean-hangul-formal":return 31;case"korean-hanja-formal":return 32;case"korean-hanja-informal":return 33;case"lao":return 34;case"lower-armenian":return 35;case"malayalam":return 36;case"mongolian":return 37;case"myanmar":return 38;case"oriya":return 39;case"persian":return 40;case"simp-chinese-formal":return 41;case"simp-chinese-informal":return 42;case"tamil":return 43;case"telugu":return 44;case"thai":return 45;case"tibetan":return 46;case"trad-chinese-formal":return 47;case"trad-chinese-informal":return 48;case"upper-armenian":return 49;case"disclosure-open":return 50;case"disclosure-closed":return 51;case"none":default:return-1}}},Pa=function(i){return{name:"margin-"+i,initialValue:"0",prefix:!1,type:4}},wl=Pa("top"),Bl=Pa("right"),fA=Pa("bottom"),dA=Pa("left"),mo={name:"overflow",initialValue:"visible",prefix:!1,type:1,parse:function(i,e){return e.filter(Sr).map(function(t){switch(t.value){case"hidden":return 1;case"scroll":return 2;case"clip":return 3;case"auto":return 4;case"visible":default:return 0}})}},hA={name:"overflow-wrap",initialValue:"normal",prefix:!1,type:2,parse:function(i,e){switch(e){case"break-word":return"break-word";case"normal":default:return"normal"}}},Qa=function(i){return{name:"padding-"+i,initialValue:"0",prefix:!1,type:3,format:"length-percentage"}},gA=Qa("top"),bl=Qa("right"),pA=Qa("bottom"),Cl=Qa("left"),mA={name:"text-align",initialValue:"left",prefix:!1,type:2,parse:function(i,e){switch(e){case"right":return 2;case"center":case"justify":return 1;case"left":default:return 0}}},xl={name:"position",initialValue:"static",prefix:!1,type:2,parse:function(i,e){switch(e){case"relative":return 1;case"absolute":return 2;case"fixed":return 3;case"sticky":return 4}return 0}},Sl={name:"text-shadow",initialValue:"none",type:1,prefix:!1,parse:function(i,e){return e.length===1&&er(e[0],"none")?[]:Tr(e).map(function(t){for(var n={color:Gr.TRANSPARENT,offsetX:Ur,offsetY:Ur,blur:Ur},r=0,s=0;s<t.length;s++){var a=t[s];ni(a)?(r===0?n.offsetX=a:r===1?n.offsetY=a:n.blur=a,r++):n.color=Di.parse(i,a)}return n})}},Tl={name:"text-transform",initialValue:"none",prefix:!1,type:2,parse:function(i,e){switch(e){case"uppercase":return 2;case"lowercase":return 1;case"capitalize":return 3}return 0}},vA={name:"transform",initialValue:"none",prefix:!0,type:0,parse:function(i,e){if(e.type===20&&e.value==="none")return null;if(e.type===18){var t=ma[e.name];if(typeof t=="undefined")throw new Error('Attempting to parse an unsupported transform function "'+e.name+'"');return t(e.values)}return null}},Fl=function(i){var e=i.filter(function(t){return t.type===17}).map(function(t){return t.number});return e.length===6?e:null},_A=function(i){var e=i.filter(function(u){return u.type===17}).map(function(u){return u.number}),t=e[0],n=e[1];e[2],e[3];var r=e[4],s=e[5];e[6],e[7],e[8],e[9],e[10],e[11];var a=e[12],o=e[13];return e[14],e[15],e.length===16?[t,n,r,s,a,o]:null},ma={matrix:Fl,matrix3d:_A},vo={type:16,number:50,flags:or},yA=[vo,vo],wi={name:"transform-origin",initialValue:"50% 50%",prefix:!0,type:1,parse:function(i,e){var t=e.filter(Mr);return t.length!==2?yA:[t[0],t[1]]}},Bs={name:"visible",initialValue:"none",prefix:!1,type:2,parse:function(i,e){switch(e){case"hidden":return 1;case"collapse":return 2;case"visible":default:return 0}}},Qs;(function(i){i.NORMAL="normal",i.BREAK_ALL="break-all",i.KEEP_ALL="keep-all"})(Qs||(Qs={}));for(var Il={name:"word-break",initialValue:"normal",prefix:!1,type:2,parse:function(i,e){switch(e){case"break-all":return Qs.BREAK_ALL;case"keep-all":return Qs.KEEP_ALL;case"normal":default:return Qs.NORMAL}}},Dl={name:"z-index",initialValue:"auto",prefix:!1,type:0,parse:function(i,e){if(e.type===20)return{auto:!0,order:0};if(Dr(e))return{auto:!1,order:e.number};throw new Error("Invalid z-index number parsed")}},Ma={name:"time",parse:function(i,e){if(e.type===15)switch(e.unit.toLowerCase()){case"s":return 1e3*e.number;case"ms":return e.number}throw new Error("Unsupported time type")}},_o={name:"opacity",initialValue:"1",type:0,prefix:!1,parse:function(i,e){return Dr(e)?e.number:1}},na={name:"text-decoration-color",initialValue:"transparent",prefix:!1,type:3,format:"color"},Ll={name:"text-decoration-line",initialValue:"none",prefix:!1,type:1,parse:function(i,e){return e.filter(Sr).map(function(t){switch(t.value){case"underline":return 1;case"overline":return 2;case"line-through":return 3;case"none":return 4}return 0}).filter(function(t){return t!==0})}},bs={name:"font-family",initialValue:"",prefix:!1,type:1,parse:function(i,e){var t=[],n=[];return e.forEach(function(r){switch(r.type){case 20:case 0:t.push(r.value);break;case 17:t.push(r.number.toString());break;case 4:n.push(t.join(" ")),t.length=0;break}}),t.length&&n.push(t.join(" ")),n.map(function(r){return r.indexOf(" ")===-1?r:"'"+r+"'"})}},Rt={name:"font-size",initialValue:"0",prefix:!1,type:3,format:"length"},EA={name:"font-weight",initialValue:"normal",type:0,prefix:!1,parse:function(i,e){if(Dr(e))return e.number;if(Sr(e))switch(e.value){case"bold":return 700;case"normal":default:return 400}return 400}},yo={name:"font-variant",initialValue:"none",type:1,prefix:!1,parse:function(i,e){return e.filter(Sr).map(function(t){return t.value})}},Rl={name:"font-style",initialValue:"normal",prefix:!1,type:2,parse:function(i,e){switch(e){case"oblique":return"oblique";case"italic":return"italic";case"normal":default:return"normal"}}},fi=function(i,e){return(i&e)!==0},Ul={name:"content",initialValue:"none",type:1,prefix:!1,parse:function(i,e){if(e.length===0)return[];var t=e[0];return t.type===20&&t.value==="none"?[]:e}},kl={name:"counter-increment",initialValue:"none",prefix:!0,type:1,parse:function(i,e){if(e.length===0)return null;var t=e[0];if(t.type===20&&t.value==="none")return null;for(var n=[],r=e.filter(qn),s=0;s<r.length;s++){var a=r[s],o=r[s+1];if(a.type===20){var u=o&&Dr(o)?o.number:1;n.push({counter:a.value,increment:u})}}return n}},Ol={name:"counter-reset",initialValue:"none",prefix:!0,type:1,parse:function(i,e){if(e.length===0)return[];for(var t=[],n=e.filter(qn),r=0;r<n.length;r++){var s=n[r],a=n[r+1];if(Sr(s)&&s.value!=="none"){var o=a&&Dr(a)?a.number:0;t.push({counter:s.value,reset:o})}}return t}},Pl={name:"duration",initialValue:"0s",prefix:!1,type:1,parse:function(i,e){return e.filter(br).map(function(t){return Ma.parse(i,t)})}},Ql={name:"quotes",initialValue:"none",prefix:!0,type:1,parse:function(i,e){if(e.length===0)return null;var t=e[0];if(t.type===20&&t.value==="none")return null;var n=[],r=e.filter(kn);if(r.length%2!==0)return null;for(var s=0;s<r.length;s+=2){var a=r[s].value,o=r[s+1].value;n.push({open:a,close:o})}return n}},Ms=function(i,e,t){if(!i)return"";var n=i[Math.min(e,i.length-1)];return n?t?n.open:n.close:""},Eo={name:"box-shadow",initialValue:"none",type:1,prefix:!1,parse:function(i,e){return e.length===1&&er(e[0],"none")?[]:Tr(e).map(function(t){for(var n={color:255,offsetX:Ur,offsetY:Ur,blur:Ur,spread:Ur,inset:!1},r=0,s=0;s<t.length;s++){var a=t[s];er(a,"inset")?n.inset=!0:ni(a)?(r===0?n.offsetX=a:r===1?n.offsetY=a:r===2?n.blur=a:n.spread=a,r++):n.color=Di.parse(i,a)}return n})}},wA={name:"paint-order",initialValue:"normal",prefix:!1,type:1,parse:function(i,e){var t=[0,1,2],n=[];return e.filter(Sr).forEach(function(r){switch(r.value){case"stroke":n.push(1);break;case"fill":n.push(0);break;case"markers":n.push(2);break}}),t.forEach(function(r){n.indexOf(r)===-1&&n.push(r)}),n}},Na={name:"-webkit-text-stroke-color",initialValue:"currentcolor",prefix:!1,type:3,format:"color"},Xi={name:"-webkit-text-stroke-width",initialValue:"0",type:0,prefix:!1,parse:function(i,e){return br(e)?e.number:0}},Ml=function(){function i(e,t){var n,r;this.animationDuration=ur(e,Pl,t.animationDuration),this.backgroundClip=ur(e,ri,t.backgroundClip),this.backgroundColor=ur(e,ai,t.backgroundColor),this.backgroundImage=ur(e,Da,t.backgroundImage),this.backgroundOrigin=ur(e,ua,t.backgroundOrigin),this.backgroundPosition=ur(e,ca,t.backgroundPosition),this.backgroundRepeat=ur(e,qs,t.backgroundRepeat),this.backgroundSize=ur(e,Rs,t.backgroundSize),this.borderTopColor=ur(e,La,t.borderTopColor),this.borderRightColor=ur(e,Us,t.borderRightColor),this.borderBottomColor=ur(e,Ra,t.borderBottomColor),this.borderLeftColor=ur(e,Ua,t.borderLeftColor),this.borderTopLeftRadius=ur(e,fa,t.borderTopLeftRadius),this.borderTopRightRadius=ur(e,da,t.borderTopRightRadius),this.borderBottomRightRadius=ur(e,ha,t.borderBottomRightRadius),this.borderBottomLeftRadius=ur(e,ga,t.borderBottomLeftRadius),this.borderTopStyle=ur(e,pa,t.borderTopStyle),this.borderRightStyle=ur(e,Or,t.borderRightStyle),this.borderBottomStyle=ur(e,Pr,t.borderBottomStyle),this.borderLeftStyle=ur(e,_i,t.borderLeftStyle),this.borderTopWidth=ur(e,yi,t.borderTopWidth),this.borderRightWidth=ur(e,Es,t.borderRightWidth),this.borderBottomWidth=ur(e,ps,t.borderBottomWidth),this.borderLeftWidth=ur(e,ms,t.borderLeftWidth),this.boxShadow=ur(e,Eo,t.boxShadow),this.color=ur(e,Ps,t.color),this.direction=ur(e,ws,t.direction),this.display=ur(e,_l,t.display),this.float=ur(e,cA,t.cssFloat),this.fontFamily=ur(e,bs,t.fontFamily),this.fontSize=ur(e,Rt,t.fontSize),this.fontStyle=ur(e,Rl,t.fontStyle),this.fontVariant=ur(e,yo,t.fontVariant),this.fontWeight=ur(e,EA,t.fontWeight),this.letterSpacing=ur(e,yl,t.letterSpacing),this.lineBreak=ur(e,Vi,t.lineBreak),this.lineHeight=ur(e,cs,t.lineHeight),this.listStyleImage=ur(e,El,t.listStyleImage),this.listStylePosition=ur(e,Oa,t.listStylePosition),this.listStyleType=ur(e,po,t.listStyleType),this.marginTop=ur(e,wl,t.marginTop),this.marginRight=ur(e,Bl,t.marginRight),this.marginBottom=ur(e,fA,t.marginBottom),this.marginLeft=ur(e,dA,t.marginLeft),this.opacity=ur(e,_o,t.opacity);var s=ur(e,mo,t.overflow);this.overflowX=s[0],this.overflowY=s[s.length>1?1:0],this.overflowWrap=ur(e,hA,t.overflowWrap),this.paddingTop=ur(e,gA,t.paddingTop),this.paddingRight=ur(e,bl,t.paddingRight),this.paddingBottom=ur(e,pA,t.paddingBottom),this.paddingLeft=ur(e,Cl,t.paddingLeft),this.paintOrder=ur(e,wA,t.paintOrder),this.position=ur(e,xl,t.position),this.textAlign=ur(e,mA,t.textAlign),this.textDecorationColor=ur(e,na,(n=t.textDecorationColor)!==null&&n!==void 0?n:t.color),this.textDecorationLine=ur(e,Ll,(r=t.textDecorationLine)!==null&&r!==void 0?r:t.textDecoration),this.textShadow=ur(e,Sl,t.textShadow),this.textTransform=ur(e,Tl,t.textTransform),this.transform=ur(e,vA,t.transform),this.transformOrigin=ur(e,wi,t.transformOrigin),this.visibility=ur(e,Bs,t.visibility),this.webkitTextStrokeColor=ur(e,Na,t.webkitTextStrokeColor),this.webkitTextStrokeWidth=ur(e,Xi,t.webkitTextStrokeWidth),this.wordBreak=ur(e,Il,t.wordBreak),this.zIndex=ur(e,Dl,t.zIndex)}return i.prototype.isVisible=function(){return this.display>0&&this.opacity>0&&this.visibility===0},i.prototype.isTransparent=function(){return Ei(this.backgroundColor)},i.prototype.isTransformed=function(){return this.transform!==null},i.prototype.isPositioned=function(){return this.position!==0},i.prototype.isPositionedWithZIndex=function(){return this.isPositioned()&&!this.zIndex.auto},i.prototype.isFloating=function(){return this.float!==0},i.prototype.isInlineLevel=function(){return fi(this.display,4)||fi(this.display,33554432)||fi(this.display,268435456)||fi(this.display,536870912)||fi(this.display,67108864)||fi(this.display,134217728)},i}(),BA=function(){function i(e,t){this.content=ur(e,Ul,t.content),this.quotes=ur(e,Ql,t.quotes)}return i}(),wo=function(){function i(e,t){this.counterIncrement=ur(e,kl,t.counterIncrement),this.counterReset=ur(e,Ol,t.counterReset)}return i}(),ur=function(i,e,t){var n=new lr,r=t!==null&&typeof t!="undefined"?t.toString():e.initialValue;n.write(r);var s=new dr(n.read());switch(e.type){case 2:var a=s.parseComponentValue();return e.parse(i,Sr(a)?a.value:e.initialValue);case 0:return e.parse(i,s.parseComponentValue());case 1:return e.parse(i,s.parseComponentValues());case 4:return s.parseComponentValue();case 3:switch(e.format){case"angle":return Ui.parse(i,s.parseComponentValue());case"color":return Di.parse(i,s.parseComponentValue());case"image":return ls.parse(i,s.parseComponentValue());case"length":var o=s.parseComponentValue();return ni(o)?o:Ur;case"length-percentage":var u=s.parseComponentValue();return Mr(u)?u:Ur;case"time":return Ma.parse(i,s.parseComponentValue())}break}},Ha="data-html2canvas-debug",Nl=function(i){var e=i.getAttribute(Ha);switch(e){case"all":return 1;case"clone":return 2;case"parse":return 3;case"render":return 4;default:return 0}},Ka=function(i,e){var t=Nl(i);return t===1||e===t},Bi=function(){function i(e,t){if(this.context=e,this.textNodes=[],this.elements=[],this.flags=0,Ka(t,3))debugger;this.styles=new Ml(e,window.getComputedStyle(t,null)),No(t)&&(this.styles.animationDuration.some(function(n){return n>0})&&(t.style.animationDuration="0s"),this.styles.transform!==null&&(t.style.transform="none")),this.bounds=f(this.context,t),Ka(t,4)&&(this.flags|=16)}return i}(),Ga="AAAAAAAAAAAAEA4AGBkAAFAaAAACAAAAAAAIABAAGAAwADgACAAQAAgAEAAIABAACAAQAAgAEAAIABAACAAQAAgAEAAIABAAQABIAEQATAAIABAACAAQAAgAEAAIABAAVABcAAgAEAAIABAACAAQAGAAaABwAHgAgACIAI4AlgAIABAAmwCjAKgAsAC2AL4AvQDFAMoA0gBPAVYBWgEIAAgACACMANoAYgFkAWwBdAF8AX0BhQGNAZUBlgGeAaMBlQGWAasBswF8AbsBwwF0AcsBYwHTAQgA2wG/AOMBdAF8AekB8QF0AfkB+wHiAHQBfAEIAAMC5gQIAAsCEgIIAAgAFgIeAggAIgIpAggAMQI5AkACygEIAAgASAJQAlgCYAIIAAgACAAKBQoFCgUTBRMFGQUrBSsFCAAIAAgACAAIAAgACAAIAAgACABdAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACABoAmgCrwGvAQgAbgJ2AggAHgEIAAgACADnAXsCCAAIAAgAgwIIAAgACAAIAAgACACKAggAkQKZAggAPADJAAgAoQKkAqwCsgK6AsICCADJAggA0AIIAAgACAAIANYC3gIIAAgACAAIAAgACABAAOYCCAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAkASoB+QIEAAgACAA8AEMCCABCBQgACABJBVAFCAAIAAgACAAIAAgACAAIAAgACABTBVoFCAAIAFoFCABfBWUFCAAIAAgACAAIAAgAbQUIAAgACAAIAAgACABzBXsFfQWFBYoFigWKBZEFigWKBYoFmAWfBaYFrgWxBbkFCAAIAAgACAAIAAgACAAIAAgACAAIAMEFCAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAMgFCADQBQgACAAIAAgACAAIAAgACAAIAAgACAAIAO4CCAAIAAgAiQAIAAgACABAAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAD0AggACAD8AggACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIANYFCAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAMDvwAIAAgAJAIIAAgACAAIAAgACAAIAAgACwMTAwgACAB9BOsEGwMjAwgAKwMyAwsFYgE3A/MEPwMIAEUDTQNRAwgAWQOsAGEDCAAIAAgACAAIAAgACABpAzQFNQU2BTcFOAU5BToFNAU1BTYFNwU4BTkFOgU0BTUFNgU3BTgFOQU6BTQFNQU2BTcFOAU5BToFNAU1BTYFNwU4BTkFOgU0BTUFNgU3BTgFOQU6BTQFNQU2BTcFOAU5BToFNAU1BTYFNwU4BTkFOgU0BTUFNgU3BTgFOQU6BTQFNQU2BTcFOAU5BToFNAU1BTYFNwU4BTkFOgU0BTUFNgU3BTgFOQU6BTQFNQU2BTcFOAU5BToFNAU1BTYFNwU4BTkFOgU0BTUFNgU3BTgFOQU6BTQFNQU2BTcFOAU5BToFNAU1BTYFNwU4BTkFOgU0BTUFNgU3BTgFOQU6BTQFNQU2BTcFOAU5BToFNAU1BTYFNwU4BTkFOgU0BTUFNgU3BTgFOQU6BTQFNQU2BTcFOAU5BToFNAU1BTYFNwU4BTkFOgU0BTUFNgU3BTgFOQU6BTQFNQU2BTcFOAU5BToFNAU1BTYFNwU4BTkFOgU0BTUFNgU3BTgFOQU6BTQFNQU2BTcFOAU5BToFNAU1BTYFNwU4BTkFOgU0BTUFNgU3BTgFOQU6BTQFNQU2BTcFOAU5BToFNAU1BTYFNwU4BTkFOgU0BTUFNgU3BTgFOQU6BTQFNQU2BTcFOAU5BToFNAU1BTYFNwU4BTkFOgU0BTUFNgU3BTgFOQU6BTQFNQU2BTcFOAU5BToFNAU1BTYFNwU4BTkFOgU0BTUFNgU3BTgFOQU6BTQFNQU2BTcFOAU5BToFNAU1BTYFNwU4BTkFOgU0BTUFNgU3BTgFOQU6BTQFNQU2BTcFOAU5BToFNAU1BTYFNwU4BTkFOgU0BTUFNgU3BTgFOQU6BTQFNQU2BTcFOAU5BToFNAU1BTYFNwU4BTkFOgU0BTUFNgU3BTgFOQU6BTQFNQU2BTcFOAU5BToFNAU1BTYFNwU4BTkFIQUoBSwFCAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACABtAwgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACABMAEwACAAIAAgACAAIABgACAAIAAgACAC/AAgACAAyAQgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACACAAIAAwAAgACAAIAAgACAAIAAgACAAIAAAARABIAAgACAAIABQASAAIAAgAIABwAEAAjgCIABsAqAC2AL0AigDQAtwC+IJIQqVAZUBWQqVAZUBlQGVAZUBlQGrC5UBlQGVAZUBlQGVAZUBlQGVAXsKlQGVAbAK6wsrDGUMpQzlDJUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAfAKAAuZA64AtwCJALoC6ADwAAgAuACgA/oEpgO6AqsD+AAIAAgAswMIAAgACAAIAIkAuwP5AfsBwwPLAwgACAAIAAgACADRA9kDCAAIAOED6QMIAAgACAAIAAgACADuA/YDCAAIAP4DyQAIAAgABgQIAAgAXQAOBAgACAAIAAgACAAIABMECAAIAAgACAAIAAgACAD8AAQBCAAIAAgAGgQiBCoECAExBAgAEAEIAAgACAAIAAgACAAIAAgACAAIAAgACAA4BAgACABABEYECAAIAAgATAQYAQgAVAQIAAgACAAIAAgACAAIAAgACAAIAFoECAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgAOQEIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAB+BAcACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAEABhgSMBAgACAAIAAgAlAQIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAwAEAAQABAADAAMAAwADAAQABAAEAAQABAAEAAQABHATAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgAdQMIAAgACAAIAAgACAAIAMkACAAIAAgAfQMIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACACFA4kDCAAIAAgACAAIAOcBCAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAIcDCAAIAAgACAAIAAgACAAIAAgACAAIAJEDCAAIAAgACADFAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACABgBAgAZgQIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgAbAQCBXIECAAIAHkECAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACABAAJwEQACjBKoEsgQIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAC6BMIECAAIAAgACAAIAAgACABmBAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgAxwQIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAGYECAAIAAgAzgQIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgAigWKBYoFigWKBYoFigWKBd0FXwUIAOIF6gXxBYoF3gT5BQAGCAaKBYoFigWKBYoFigWKBYoFigWKBYoFigXWBIoFigWKBYoFigWKBYoFigWKBYsFEAaKBYoFigWKBYoFigWKBRQGCACKBYoFigWKBQgACAAIANEECAAIABgGigUgBggAJgYIAC4GMwaKBYoF0wQ3Bj4GigWKBYoFigWKBYoFigWKBYoFigWKBYoFigUIAAgACAAIAAgACAAIAAgAigWKBYoFigWKBYoFigWKBYoFigWKBYoFigWKBYoFigWKBYoFigWKBYoFigWKBYoFigWKBYoFigWKBYoFigWLBf///////wQABAAEAAQABAAEAAQABAAEAAQAAwAEAAQAAgAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAAAAAAAAAAAAAAAAAAAAAAAAAOAAAAAAAAAAQADgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAFAAUABQAFAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAAAAUAAAAFAAUAAAAFAAUAAAAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABAAEAAQABAAEAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAFAAUABQAFAAUABQAFAAUABQAAAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAFAAUABQAFAAUAAQAAAAUABQAFAAUABQAFAAAAAAAFAAUAAAAFAAUABQAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAEAAAAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAUABQAFAAUABQAFAAUABQAFAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAUABQAFAAUABQAFAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAFAAAAAAAFAAUAAQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABwAFAAUABQAFAAAABwAHAAcAAAAHAAcABwAFAAEAAAAAAAAAAAAAAAAAAAAAAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAHAAcABwAFAAUABQAFAAcABwAFAAUAAAAAAAEAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAHAAAAAQABAAAAAAAAAAAAAAAFAAUABQAFAAAABwAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAHAAcABwAHAAcAAAAHAAcAAAAAAAUABQAHAAUAAQAHAAEABwAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAFAAUABQAFAAUABwABAAUABQAFAAUAAAAAAAAAAAAAAAEAAQABAAEAAQABAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABwAFAAUAAAAAAAAAAAAAAAAABQAFAAUABQAFAAUAAQAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAFAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAQABQANAAQABAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAQABAAEAAQABAAEAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAOAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABAAEAAQABAAEAAQABAAEAAQABAAEAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAEAAQABAAEAAQABAAEAAQABAAAAAAAAAAAAAAAAAAAAAAABQAHAAUABQAFAAAAAAAAAAcABQAFAAUABQAFAAQABAAEAAQABAAEAAQABAAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAFAAUAAAAFAAUABQAFAAUAAAAFAAUABQAAAAUABQAFAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAUABQAAAAAAAAAAAAUABQAFAAcAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAHAAUAAAAHAAcABwAFAAUABQAFAAUABQAFAAUABwAHAAcABwAFAAcABwAAAAUABQAFAAUABQAFAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABwAHAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAAAAUABwAHAAUABQAFAAUAAAAAAAcABwAAAAAABwAHAAUAAAAAAAAAAAAAAAAAAAAAAAAABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAAAAAABQAFAAcAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAAABwAHAAcABQAFAAAAAAAAAAAABQAFAAAAAAAFAAUABQAAAAAAAAAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAAAAAAAAAFAAAAAAAAAAAAAAAAAAAAAAAAAAAABwAFAAUABQAFAAUAAAAFAAUABwAAAAcABwAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAUABQAFAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUAAAAFAAUABwAFAAUABQAFAAAAAAAHAAcAAAAAAAcABwAFAAAAAAAAAAAAAAAAAAAABQAFAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAcABwAAAAAAAAAHAAcABwAAAAcABwAHAAUAAAAAAAAAAAAAAAAAAAAAAAAABQAAAAAAAAAAAAAAAAAAAAAABQAHAAcABwAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABwAHAAcABwAAAAUABQAFAAAABQAFAAUABQAAAAAAAAAAAAAAAAAAAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAAAAcABQAHAAcABQAHAAcAAAAFAAcABwAAAAcABwAFAAUAAAAAAAAAAAAAAAAAAAAFAAUAAAAAAAAAAAAAAAAAAAAAAAAABQAFAAcABwAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAAAAUABwAAAAAAAAAAAAAAAAAAAAAAAAAAAAUAAAAAAAAAAAAFAAcABwAFAAUABQAAAAUAAAAHAAcABwAHAAcABwAHAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUAAAAHAAUABQAFAAUABQAFAAUAAAAAAAAAAAAAAAAAAAAAAAUABQAFAAUABQAFAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAAABwAFAAUABQAFAAUABQAFAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAFAAUABQAFAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAAAAUAAAAFAAAAAAAAAAAABwAHAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABwAFAAUABQAFAAUAAAAFAAUAAAAAAAAAAAAAAAUABQAFAAUABQAFAAUABQAFAAUABQAAAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAFAAUABwAFAAUABQAFAAUABQAAAAUABQAHAAcABQAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAHAAcABQAFAAAAAAAAAAAABQAFAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAUABQAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAAAAcABQAFAAAAAAAAAAAAAAAAAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAFAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAHAAUABQAFAAUABQAFAAUABwAHAAcABwAHAAcABwAHAAUABwAHAAUABQAFAAUABQAFAAUABQAFAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAFAAUABwAHAAcABwAFAAUABwAHAAcAAAAAAAAAAAAHAAcABQAHAAcABwAHAAcABwAFAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAFAAcABwAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAcABQAHAAUABQAFAAUABQAFAAUAAAAFAAAABQAAAAAABQAFAAUABQAFAAUABQAFAAcABwAHAAcABwAHAAUABQAFAAUABQAFAAUABQAFAAUAAAAAAAUABQAFAAUABQAHAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAFAAUABQAFAAUABwAFAAcABwAHAAcABwAFAAcABwAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAUABQAFAAUABQAFAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAUABwAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAHAAUABQAFAAUABwAHAAUABQAHAAUABQAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAcABQAFAAcABwAHAAUABwAFAAUABQAHAAcAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABwAHAAcABwAHAAcABwAHAAUABQAFAAUABQAFAAUABQAHAAcABQAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAFAAUAAAAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAcABQAFAAUABQAFAAUABQAAAAAAAAAAAAUAAAAAAAAAAAAAAAAABQAAAAAABwAFAAUAAAAAAAAAAAAAAAAABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAAABQAFAAUABQAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAFAAUABQAFAAUADgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAOAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAFAAUAAAAFAAUABQAFAAUABQAFAAUABQAFAAAAAAAAAAAABQAAAAAAAAAFAAAAAAAAAAAABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABwAHAAUABQAHAAAAAAAAAAAABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAcABwAHAAcABQAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUAAAAAAAAAAAAAAAAABQAFAAUABQAFAAUABQAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAFAAUABQAFAAUABQAFAAUABQAHAAcAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAcABwAFAAUABQAFAAcABwAFAAUABwAHAAAAAAAAAAAAAAAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAFAAUABQAFAAcABwAFAAUABwAHAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAAAAAAAAAAAAAAAAAAAAAAFAAcAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUAAAAFAAUABQAAAAAABQAFAAAAAAAAAAAAAAAFAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAcABQAFAAcABwAAAAAAAAAAAAAABwAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAcABwAFAAcABwAFAAcABwAAAAcABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAFAAUABQAAAAAAAAAAAAAAAAAFAAUABQAAAAUABQAAAAAAAAAAAAAABQAFAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAUABQAAAAAAAAAAAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAcABQAHAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAUABQAFAAUABwAFAAUABQAFAAUABQAFAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABwAHAAcABQAFAAUABQAFAAUABQAFAAUABwAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAHAAcABwAFAAUABQAHAAcABQAHAAUABQAAAAAAAAAAAAAAAAAFAAAABwAHAAcABQAFAAUABQAFAAUABQAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABwAHAAcABwAAAAAABwAHAAAAAAAHAAcABwAAAAAAAAAAAAAAAAAAAAAAAAAFAAAAAAAAAAAAAAAAAAAAAAAAAAAABwAHAAAAAAAFAAUABQAFAAUABQAFAAAAAAAAAAUABQAFAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAHAAcABwAFAAUABQAFAAUABQAFAAUABwAHAAUABQAFAAcABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAHAAcABQAFAAUABQAFAAUABwAFAAcABwAFAAcABQAFAAcABQAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAHAAcABQAFAAUABQAAAAAABwAHAAcABwAFAAUABwAFAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAcABwAHAAUABQAFAAUABQAFAAUABQAHAAcABQAHAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABwAFAAcABwAFAAUABQAFAAUABQAHAAUAAAAAAAAAAAAAAAAAAAAAAAcABwAFAAUABQAFAAcABQAFAAUABQAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAHAAcABwAFAAUABQAFAAUABQAFAAUABQAHAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAHAAcABwAFAAUABQAFAAAAAAAFAAUABwAHAAcABwAFAAAAAAAAAAcAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAUABQAFAAUABQAFAAUABQAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUAAAAAAAAAAAAAAAAAAAAAAAAABQAFAAUABQAFAAUABwAHAAUABQAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAcABQAFAAUABQAFAAUABQAAAAUABQAFAAUABQAFAAcABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAAAAHAAUABQAFAAUABQAFAAUABwAFAAUABwAFAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAFAAUABQAFAAUAAAAAAAAABQAAAAUABQAAAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAHAAcABwAHAAcAAAAFAAUAAAAHAAcABQAHAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAUABwAHAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAUABQAFAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAUABQAFAAUABQAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAAAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAAAAAAAAAAAAAAAAAAABQAFAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAcABwAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAAAAUABQAFAAAAAAAFAAUABQAFAAUABQAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAFAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAFAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAAAAAAAAAAABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAAAAAAAAAAAAAAAAAAAAAAFAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAFAAUABQAAAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAFAAUABQAFAAUABQAAAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAAAAAABQAFAAUABQAFAAUABQAAAAUABQAAAAUABQAFAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAUABQAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAFAAUABQAFAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAFAAUABQAFAAUADgAOAA4ADgAOAA4ADwAPAA8ADwAPAA8ADwAPAA8ADwAPAA8ADwAPAA8ADwAPAA8ADwAPAA8ADwAPAA8ADwAPAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAcABwAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABwAHAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAAAAAAAAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAKAAoACgAKAAoACgAKAAoACgAKAAoACgAKAAoACgAKAAoACgAKAAoACgAKAAoACgAMAAwADAAMAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkAAAAAAAAAAAAKAAoACgAKAAoACgAKAAoACgAKAAoACgAKAAoACgAKAAoACgAKAAoACgAKAAoACgAKAAoACgAKAAoACgAKAAoACgAAAAAAAAAAAAsADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwACwAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAAAAAADgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA4AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAOAA4ADgAOAA4ADgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAADgAOAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA4ADgAAAAAAAAAAAAAAAAAAAAAADgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAADgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAADgAOAA4ADgAOAA4ADgAOAA4ADgAOAAAAAAAAAAAADgAOAA4AAAAAAAAAAAAAAAAAAAAOAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAADgAOAAAAAAAAAAAAAAAAAAAAAAAAAAAADgAAAAAAAAAAAAAAAAAAAAAAAAAOAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAADgAOAA4ADgAAAA4ADgAOAA4ADgAOAAAADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4AAAAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAAAAAAAAAAAAAAAAAAAAAAAAAAAADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4AAAAAAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAAAA4AAAAOAAAAAAAAAAAAAAAAAA4AAAAAAAAAAAAAAAAADgAAAAAAAAAAAAAAAAAAAAAAAAAAAA4ADgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAADgAAAAAADgAAAAAAAAAAAA4AAAAOAAAAAAAAAAAADgAOAA4AAAAOAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAOAA4ADgAOAA4AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAOAA4ADgAAAAAAAAAAAAAAAAAAAAAAAAAOAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAOAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAOAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAOAA4AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA4ADgAOAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAADgAOAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAADgAAAAAAAAAAAA4AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAOAAAADgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAOAA4ADgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA4ADgAOAA4ADgAOAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA4ADgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAADgAAAAAADgAOAA4ADgAOAA4ADgAOAA4ADgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAAAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAAAAAAAAAAAAAAAAAAAAAAAAAAAADgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA4AAAAAAA4ADgAOAA4ADgAOAA4ADgAOAAAADgAOAA4ADgAAAAAAAAAAAAAAAAAAAAAAAAAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4AAAAAAAAAAAAAAAAADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAOAA4ADgAOAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAADgAOAA4ADgAOAA4ADgAOAAAAAAAAAAAAAAAAAAAAAAAAAAAADgAOAA4ADgAOAA4AAAAAAAAAAAAAAAAAAAAAAA4ADgAOAA4ADgAOAA4ADgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4AAAAOAA4ADgAOAA4ADgAAAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4AAAAAAAAAAAA=",Bo="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",va=typeof Uint8Array=="undefined"?[]:new Uint8Array(256),ra=0;ra<Bo.length;ra++)va[Bo.charCodeAt(ra)]=ra;for(var _a=function(i){var e=i.length*.75,t=i.length,n,r=0,s,a,o,u;i[i.length-1]==="="&&(e--,i[i.length-2]==="="&&e--);var l=typeof ArrayBuffer!="undefined"&&typeof Uint8Array!="undefined"&&typeof Uint8Array.prototype.slice!="undefined"?new ArrayBuffer(e):new Array(e),c=Array.isArray(l)?l:new Uint8Array(l);for(n=0;n<t;n+=4)s=va[i.charCodeAt(n)],a=va[i.charCodeAt(n+1)],o=va[i.charCodeAt(n+2)],u=va[i.charCodeAt(n+3)],c[r++]=s<<2|a>>4,c[r++]=(a&15)<<4|o>>2,c[r++]=(o&3)<<6|u&63;return l},Hl=function(i){for(var e=i.length,t=[],n=0;n<e;n+=2)t.push(i[n+1]<<8|i[n]);return t},Kl=function(i){for(var e=i.length,t=[],n=0;n<e;n+=4)t.push(i[n+3]<<24|i[n+2]<<16|i[n+1]<<8|i[n]);return t},Cs=5,Va=11,$a=2,Gl=Va-Cs,Za=65536>>Cs,bA=1<<Cs,Ns=bA-1,bo=1024>>Cs,Vl=Za+bo,$l=Vl,CA=32,xA=$l+CA,Zl=65536>>Va,Wl=1<<Gl,SA=Wl-1,TA=function(i,e,t){return i.slice?i.slice(e,t):new Uint16Array(Array.prototype.slice.call(i,e,t))},Co=function(i,e,t){return i.slice?i.slice(e,t):new Uint32Array(Array.prototype.slice.call(i,e,t))},xo=function(i,e){var t=_a(i),n=Array.isArray(t)?Kl(t):new Uint32Array(t),r=Array.isArray(t)?Hl(t):new Uint16Array(t),s=24,a=TA(r,s/2,n[4]/2),o=n[5]===2?TA(r,(s+n[4])/2):Co(n,Math.ceil((s+n[4])/4));return new zu(n[0],n[1],n[2],n[3],a,o)},zu=function(){function i(e,t,n,r,s,a){this.initialValue=e,this.errorValue=t,this.highStart=n,this.highValueIndex=r,this.index=s,this.data=a}return i.prototype.get=function(e){var t;if(e>=0){if(e<55296||e>56319&&e<=65535)return t=this.index[e>>Cs],t=(t<<$a)+(e&Ns),this.data[t];if(e<=65535)return t=this.index[Za+(e-55296>>Cs)],t=(t<<$a)+(e&Ns),this.data[t];if(e<this.highStart)return t=xA-Zl+(e>>Va),t=this.index[t],t+=e>>Cs&SA,t=this.index[t],t=(t<<$a)+(e&Ns),this.data[t];if(e<=1114111)return this.data[this.highValueIndex]}return this.errorValue},i}(),Ri="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",ju=typeof Uint8Array=="undefined"?[]:new Uint8Array(256),Wa=0;Wa<Ri.length;Wa++)ju[Ri.charCodeAt(Wa)]=Wa;var Yu=1,FA=2,IA=3,zl=4,ia=5,jl=7,Hs=8,So=9,To=10,DA=11,is=12,Fo=13,Io=14,Do=15,Yl=function(i){for(var e=[],t=0,n=i.length;t<n;){var r=i.charCodeAt(t++);if(r>=55296&&r<=56319&&t<n){var s=i.charCodeAt(t++);(s&64512)===56320?e.push(((r&1023)<<10)+(s&1023)+65536):(e.push(r),t--)}else e.push(r)}return e},Xl=function(){for(var i=[],e=0;e<arguments.length;e++)i[e]=arguments[e];if(String.fromCodePoint)return String.fromCodePoint.apply(String,i);var t=i.length;if(!t)return"";for(var n=[],r=-1,s="";++r<t;){var a=i[r];a<=65535?n.push(a):(a-=65536,n.push((a>>10)+55296,a%1024+56320)),(r+1===t||n.length>16384)&&(s+=String.fromCharCode.apply(String,n),n.length=0)}return s},Jl=xo(Ga),Ji="\xD7",Lo="\xF7",ql=function(i){return Jl.get(i)},LA=function(i,e,t){var n=t-2,r=e[n],s=e[t-1],a=e[t];if(s===FA&&a===IA)return Ji;if(s===FA||s===IA||s===zl||a===FA||a===IA||a===zl)return Lo;if(s===Hs&&[Hs,So,DA,is].indexOf(a)!==-1||(s===DA||s===So)&&(a===So||a===To)||(s===is||s===To)&&a===To||a===Fo||a===ia||a===jl||s===Yu)return Ji;if(s===Fo&&a===Io){for(;r===ia;)r=e[--n];if(r===Io)return Ji}if(s===Do&&a===Do){for(var o=0;r===Do;)o++,r=e[--n];if(o%2===0)return Ji}return Lo},eu=function(i){var e=Yl(i),t=e.length,n=0,r=0,s=e.map(ql);return{next:function(){if(n>=t)return{done:!0,value:null};for(var a=Ji;n<t&&(a=LA(e,s,++n))===Ji;);if(a!==Ji||n===t){var o=Xl.apply(null,e.slice(r,n));return r=n,{value:o,done:!1}}return{done:!0,value:null}}}},RA=function(i){for(var e=eu(i),t=[],n;!(n=e.next()).done;)n.value&&t.push(n.value.slice());return t},tu=function(i){var e=123;if(i.createRange){var t=i.createRange();if(t.getBoundingClientRect){var n=i.createElement("boundtest");n.style.height=e+"px",n.style.display="block",i.body.appendChild(n),t.selectNode(n);var r=t.getBoundingClientRect(),s=Math.round(r.height);if(i.body.removeChild(n),s===e)return!0}}return!1},nu=function(i){var e=i.createElement("boundtest");e.style.width="50px",e.style.display="block",e.style.fontSize="12px",e.style.letterSpacing="0px",e.style.wordSpacing="0px",i.body.appendChild(e);var t=i.createRange();e.innerHTML=typeof"".repeat=="function"?"&#128104;".repeat(10):"";var n=e.firstChild,r=ee(n.data).map(function(u){return A(u)}),s=0,a={},o=r.every(function(u,l){t.setStart(n,s),t.setEnd(n,s+u.length);var c=t.getBoundingClientRect();s+=u.length;var d=c.x>a.x||c.y>a.y;return a=c,l===0?!0:d});return i.body.removeChild(e),o},ru=function(){return typeof new Image().crossOrigin!="undefined"},iu=function(){return typeof new XMLHttpRequest().responseType=="string"},su=function(i){var e=new Image,t=i.createElement("canvas"),n=t.getContext("2d");if(!n)return!1;e.src="data:image/svg+xml,<svg xmlns='http://www.w3.org/2000/svg'></svg>";try{n.drawImage(e,0,0),t.toDataURL()}catch(r){return!1}return!0},UA=function(i){return i[0]===0&&i[1]===255&&i[2]===0&&i[3]===255},au=function(i){var e=i.createElement("canvas"),t=100;e.width=t,e.height=t;var n=e.getContext("2d");if(!n)return Promise.reject(!1);n.fillStyle="rgb(0, 255, 0)",n.fillRect(0,0,t,t);var r=new Image,s=e.toDataURL();r.src=s;var a=za(t,t,0,0,r);return n.fillStyle="red",n.fillRect(0,0,t,t),ja(a).then(function(o){n.drawImage(o,0,0);var u=n.getImageData(0,0,t,t).data;n.fillStyle="red",n.fillRect(0,0,t,t);var l=i.createElement("div");return l.style.backgroundImage="url("+s+")",l.style.height=t+"px",UA(u)?ja(za(t,t,0,0,l)):Promise.reject(!1)}).then(function(o){return n.drawImage(o,0,0),UA(n.getImageData(0,0,t,t).data)}).catch(function(){return!1})},za=function(i,e,t,n,r){var s="http://www.w3.org/2000/svg",a=document.createElementNS(s,"svg"),o=document.createElementNS(s,"foreignObject");return a.setAttributeNS(null,"width",i.toString()),a.setAttributeNS(null,"height",e.toString()),o.setAttributeNS(null,"width","100%"),o.setAttributeNS(null,"height","100%"),o.setAttributeNS(null,"x",t.toString()),o.setAttributeNS(null,"y",n.toString()),o.setAttributeNS(null,"externalResourcesRequired","true"),a.appendChild(o),o.appendChild(r),a},ja=function(i){return new Promise(function(e,t){var n=new Image;n.onload=function(){return e(n)},n.onerror=t,n.src="data:image/svg+xml;charset=utf-8,"+encodeURIComponent(new XMLSerializer().serializeToString(i))})},xi={get SUPPORT_RANGE_BOUNDS(){var i=tu(document);return Object.defineProperty(xi,"SUPPORT_RANGE_BOUNDS",{value:i}),i},get SUPPORT_WORD_BREAKING(){var i=xi.SUPPORT_RANGE_BOUNDS&&nu(document);return Object.defineProperty(xi,"SUPPORT_WORD_BREAKING",{value:i}),i},get SUPPORT_SVG_DRAWING(){var i=su(document);return Object.defineProperty(xi,"SUPPORT_SVG_DRAWING",{value:i}),i},get SUPPORT_FOREIGNOBJECT_DRAWING(){var i=typeof Array.from=="function"&&typeof window.fetch=="function"?au(document):Promise.resolve(!1);return Object.defineProperty(xi,"SUPPORT_FOREIGNOBJECT_DRAWING",{value:i}),i},get SUPPORT_CORS_IMAGES(){var i=ru();return Object.defineProperty(xi,"SUPPORT_CORS_IMAGES",{value:i}),i},get SUPPORT_RESPONSE_TYPE(){var i=iu();return Object.defineProperty(xi,"SUPPORT_RESPONSE_TYPE",{value:i}),i},get SUPPORT_CORS_XHR(){var i="withCredentials"in new XMLHttpRequest;return Object.defineProperty(xi,"SUPPORT_CORS_XHR",{value:i}),i},get SUPPORT_NATIVE_TEXT_SEGMENTATION(){var i=!!(typeof Intl!="undefined"&&Intl.Segmenter);return Object.defineProperty(xi,"SUPPORT_NATIVE_TEXT_SEGMENTATION",{value:i}),i}},Ks=function(){function i(e,t){this.text=e,this.bounds=t}return i}(),Ro=function(i,e,t,n){var r=Au(e,t),s=[],a=0;return r.forEach(function(o){if(t.textDecorationLine.length||o.trim().length>0)if(xi.SUPPORT_RANGE_BOUNDS){var u=OA(n,a,o.length).getClientRects();if(u.length>1){var l=Uo(o),c=0;l.forEach(function(g){s.push(new Ks(g,U.fromDOMRectList(i,OA(n,c+a,g.length).getClientRects()))),c+=g.length})}else s.push(new Ks(o,U.fromDOMRectList(i,u)))}else{var d=n.splitText(o.length);s.push(new Ks(o,kA(i,n))),n=d}else xi.SUPPORT_RANGE_BOUNDS||(n=n.splitText(o.length));a+=o.length}),s},kA=function(i,e){var t=e.ownerDocument;if(t){var n=t.createElement("html2canvaswrapper");n.appendChild(e.cloneNode(!0));var r=e.parentNode;if(r){r.replaceChild(n,e);var s=f(i,n);return n.firstChild&&r.replaceChild(n.firstChild,n),s}}return U.EMPTY},OA=function(i,e,t){var n=i.ownerDocument;if(!n)throw new Error("Node has no owner document");var r=n.createRange();return r.setStart(i,e),r.setEnd(i,e+t),r},Uo=function(i){if(xi.SUPPORT_NATIVE_TEXT_SEGMENTATION){var e=new Intl.Segmenter(void 0,{granularity:"grapheme"});return Array.from(e.segment(i)).map(function(t){return t.segment})}return RA(i)},ou=function(i,e){if(xi.SUPPORT_NATIVE_TEXT_SEGMENTATION){var t=new Intl.Segmenter(void 0,{granularity:"word"});return Array.from(t.segment(i)).map(function(n){return n.segment})}return uu(i,e)},Au=function(i,e){return e.letterSpacing!==0?Uo(i):ou(i,e)},lu=[32,160,4961,65792,65793,4153,4241],uu=function(i,e){for(var t=Kt(i,{lineBreak:e.lineBreak,wordBreak:e.overflowWrap==="break-word"?"break-word":e.wordBreak}),n=[],r,s=function(){if(r.value){var a=r.value.slice(),o=ee(a),u="";o.forEach(function(l){lu.indexOf(l)===-1?u+=A(l):(u.length&&n.push(u),n.push(A(l)),u="")}),u.length&&n.push(u)}};!(r=t.next()).done;)s();return n},Ya=function(){function i(e,t,n){this.text=cu(t.data,n.textTransform),this.textBounds=Ro(e,this.text,n,t)}return i}(),cu=function(i,e){switch(e){case 1:return i.toLowerCase();case 3:return i.replace(Xa,fu);case 2:return i.toUpperCase();default:return i}},Xa=/(^|\s|:|-|\(|\))([a-z])/g,fu=function(i,e,t){return i.length>0?e+t.toUpperCase():i},PA=function(i){b(e,i);function e(t,n){var r=i.call(this,t,n)||this;return r.src=n.currentSrc||n.src,r.intrinsicWidth=n.naturalWidth,r.intrinsicHeight=n.naturalHeight,r.context.cache.addImage(r.src),r}return e}(Bi),ko=function(i){b(e,i);function e(t,n){var r=i.call(this,t,n)||this;return r.canvas=n,r.intrinsicWidth=n.width,r.intrinsicHeight=n.height,r}return e}(Bi),QA=function(i){b(e,i);function e(t,n){var r=i.call(this,t,n)||this,s=new XMLSerializer,a=f(t,n);return n.setAttribute("width",a.width+"px"),n.setAttribute("height",a.height+"px"),r.svg="data:image/svg+xml,"+encodeURIComponent(s.serializeToString(n)),r.intrinsicWidth=n.width.baseVal.value,r.intrinsicHeight=n.height.baseVal.value,r.context.cache.addImage(r.svg),r}return e}(Bi),MA=function(i){b(e,i);function e(t,n){var r=i.call(this,t,n)||this;return r.value=n.value,r}return e}(Bi),Oo=function(i){b(e,i);function e(t,n){var r=i.call(this,t,n)||this;return r.start=n.start,r.reversed=typeof n.reversed=="boolean"&&n.reversed===!0,r}return e}(Bi),du=[{type:15,flags:0,unit:"px",number:3}],NA=[{type:16,flags:0,number:50}],hu=function(i){return i.width>i.height?new U(i.left+(i.width-i.height)/2,i.top,i.height,i.height):i.width<i.height?new U(i.left,i.top+(i.height-i.width)/2,i.width,i.width):i},gu=function(i){var e=i.type===HA?new Array(i.value.length+1).join("\u2022"):i.value;return e.length===0?i.placeholder||"":e},Ja="checkbox",qa="radio",HA="password",Po=707406591,Oi=function(i){b(e,i);function e(t,n){var r=i.call(this,t,n)||this;switch(r.type=n.type.toLowerCase(),r.checked=n.checked,r.value=gu(n),(r.type===Ja||r.type===qa)&&(r.styles.backgroundColor=3739148031,r.styles.borderTopColor=r.styles.borderRightColor=r.styles.borderBottomColor=r.styles.borderLeftColor=2779096575,r.styles.borderTopWidth=r.styles.borderRightWidth=r.styles.borderBottomWidth=r.styles.borderLeftWidth=1,r.styles.borderTopStyle=r.styles.borderRightStyle=r.styles.borderBottomStyle=r.styles.borderLeftStyle=1,r.styles.backgroundClip=[0],r.styles.backgroundOrigin=[0],r.bounds=hu(r.bounds)),r.type){case Ja:r.styles.borderTopRightRadius=r.styles.borderTopLeftRadius=r.styles.borderBottomRightRadius=r.styles.borderBottomLeftRadius=du;break;case qa:r.styles.borderTopRightRadius=r.styles.borderTopLeftRadius=r.styles.borderBottomRightRadius=r.styles.borderBottomLeftRadius=NA;break}return r}return e}(Bi),qi=function(i){b(e,i);function e(t,n){var r=i.call(this,t,n)||this,s=n.options[n.selectedIndex||0];return r.value=s&&s.text||"",r}return e}(Bi),Gs=function(i){b(e,i);function e(t,n){var r=i.call(this,t,n)||this;return r.value=n.value,r}return e}(Bi),$i=function(i){b(e,i);function e(t,n){var r=i.call(this,t,n)||this;r.src=n.src,r.width=parseInt(n.width,10)||0,r.height=parseInt(n.height,10)||0,r.backgroundColor=r.styles.backgroundColor;try{if(n.contentWindow&&n.contentWindow.document&&n.contentWindow.document.documentElement){r.tree=Vs(t,n.contentWindow.document.documentElement);var s=n.contentWindow.document.documentElement?Br(t,getComputedStyle(n.contentWindow.document.documentElement).backgroundColor):Gr.TRANSPARENT,a=n.contentWindow.document.body?Br(t,getComputedStyle(n.contentWindow.document.body).backgroundColor):Gr.TRANSPARENT;r.backgroundColor=Ei(s)?Ei(a)?r.styles.backgroundColor:a:s}}catch(o){}return r}return e}(Bi),pu=["OL","UL","MENU"],ya=function(i,e,t,n){for(var r=e.firstChild,s=void 0;r;r=s)if(s=r.nextSibling,KA(r)&&r.data.trim().length>0)t.textNodes.push(new Ya(i,r,t.styles));else if(vs(r))if(ZA(r)&&r.assignedNodes)r.assignedNodes().forEach(function(o){return ya(i,o,t,n)});else{var a=Qo(i,r);a.styles.isVisible()&&(Mo(r,a,n)?a.flags|=4:mu(a.styles)&&(a.flags|=2),pu.indexOf(r.tagName)!==-1&&(a.flags|=8),t.elements.push(a),r.slot,r.shadowRoot?ya(i,r.shadowRoot,a,n):!ro(r)&&!GA(r)&&!ss(r)&&ya(i,r,a,n))}},Qo=function(i,e){return Ko(e)?new PA(i,e):Ho(e)?new ko(i,e):GA(e)?new QA(i,e):Ea(e)?new MA(i,e):sa(e)?new Oo(i,e):to(e)?new Oi(i,e):ss(e)?new qi(i,e):ro(e)?new Gs(i,e):$s(e)?new $i(i,e):new Bi(i,e)},Vs=function(i,e){var t=Qo(i,e);return t.flags|=4,ya(i,e,t,t),t},Mo=function(i,e,t){return e.styles.isPositionedWithZIndex()||e.styles.opacity<1||e.styles.isTransformed()||wa(i)&&t.styles.isTransparent()},mu=function(i){return i.isPositioned()||i.isFloating()},KA=function(i){return i.nodeType===Node.TEXT_NODE},vs=function(i){return i.nodeType===Node.ELEMENT_NODE},No=function(i){return vs(i)&&typeof i.style!="undefined"&&!eo(i)},eo=function(i){return typeof i.className=="object"},Ea=function(i){return i.tagName==="LI"},sa=function(i){return i.tagName==="OL"},to=function(i){return i.tagName==="INPUT"},vu=function(i){return i.tagName==="HTML"},GA=function(i){return i.tagName==="svg"},wa=function(i){return i.tagName==="BODY"},Ho=function(i){return i.tagName==="CANVAS"},no=function(i){return i.tagName==="VIDEO"},Ko=function(i){return i.tagName==="IMG"},$s=function(i){return i.tagName==="IFRAME"},VA=function(i){return i.tagName==="STYLE"},$A=function(i){return i.tagName==="SCRIPT"},ro=function(i){return i.tagName==="TEXTAREA"},ss=function(i){return i.tagName==="SELECT"},ZA=function(i){return i.tagName==="SLOT"},Go=function(i){return i.tagName.indexOf("-")>0},_u=function(){function i(){this.counters={}}return i.prototype.getCounterValue=function(e){var t=this.counters[e];return t&&t.length?t[t.length-1]:1},i.prototype.getCounterValues=function(e){var t=this.counters[e];return t||[]},i.prototype.pop=function(e){var t=this;e.forEach(function(n){return t.counters[n].pop()})},i.prototype.parse=function(e){var t=this,n=e.counterIncrement,r=e.counterReset,s=!0;n!==null&&n.forEach(function(o){var u=t.counters[o.counter];u&&o.increment!==0&&(s=!1,u.length||u.push(1),u[Math.max(0,u.length-1)]+=o.increment)});var a=[];return s&&r.forEach(function(o){var u=t.counters[o.counter];a.push(o.counter),u||(u=t.counters[o.counter]=[]),u.push(o.reset)}),a},i}(),Vo={integers:[1e3,900,500,400,100,90,50,40,10,9,5,4,1],values:["M","CM","D","CD","C","XC","L","XL","X","IX","V","IV","I"]},WA={integers:[9e3,8e3,7e3,6e3,5e3,4e3,3e3,2e3,1e3,900,800,700,600,500,400,300,200,100,90,80,70,60,50,40,30,20,10,9,8,7,6,5,4,3,2,1],values:["\u0554","\u0553","\u0552","\u0551","\u0550","\u054F","\u054E","\u054D","\u054C","\u054B","\u054A","\u0549","\u0548","\u0547","\u0546","\u0545","\u0544","\u0543","\u0542","\u0541","\u0540","\u053F","\u053E","\u053D","\u053C","\u053B","\u053A","\u0539","\u0538","\u0537","\u0536","\u0535","\u0534","\u0533","\u0532","\u0531"]},yu={integers:[1e4,9e3,8e3,7e3,6e3,5e3,4e3,3e3,2e3,1e3,400,300,200,100,90,80,70,60,50,40,30,20,19,18,17,16,15,10,9,8,7,6,5,4,3,2,1],values:["\u05D9\u05F3","\u05D8\u05F3","\u05D7\u05F3","\u05D6\u05F3","\u05D5\u05F3","\u05D4\u05F3","\u05D3\u05F3","\u05D2\u05F3","\u05D1\u05F3","\u05D0\u05F3","\u05EA","\u05E9","\u05E8","\u05E7","\u05E6","\u05E4","\u05E2","\u05E1","\u05E0","\u05DE","\u05DC","\u05DB","\u05D9\u05D8","\u05D9\u05D7","\u05D9\u05D6","\u05D8\u05D6","\u05D8\u05D5","\u05D9","\u05D8","\u05D7","\u05D6","\u05D5","\u05D4","\u05D3","\u05D2","\u05D1","\u05D0"]},Eu={integers:[1e4,9e3,8e3,7e3,6e3,5e3,4e3,3e3,2e3,1e3,900,800,700,600,500,400,300,200,100,90,80,70,60,50,40,30,20,10,9,8,7,6,5,4,3,2,1],values:["\u10F5","\u10F0","\u10EF","\u10F4","\u10EE","\u10ED","\u10EC","\u10EB","\u10EA","\u10E9","\u10E8","\u10E7","\u10E6","\u10E5","\u10E4","\u10F3","\u10E2","\u10E1","\u10E0","\u10DF","\u10DE","\u10DD","\u10F2","\u10DC","\u10DB","\u10DA","\u10D9","\u10D8","\u10D7","\u10F1","\u10D6","\u10D5","\u10D4","\u10D3","\u10D2","\u10D1","\u10D0"]},Zs=function(i,e,t,n,r,s){return i<e||i>t?zs(i,r,s.length>0):n.integers.reduce(function(a,o,u){for(;i>=o;)i-=o,a+=n.values[u];return a},"")+s},es=function(i,e,t,n){var r="";do t||i--,r=n(i)+r,i/=e;while(i*e>=e);return r},ei=function(i,e,t,n,r){var s=t-e+1;return(i<0?"-":"")+(es(Math.abs(i),s,n,function(a){return A(Math.floor(a%s)+e)})+r)},Ws=function(i,e,t){t===void 0&&(t=". ");var n=e.length;return es(Math.abs(i),n,!1,function(r){return e[Math.floor(r%n)]})+t},aa=1,xs=2,Ss=4,Ba=8,_s=function(i,e,t,n,r,s){if(i<-9999||i>9999)return zs(i,4,r.length>0);var a=Math.abs(i),o=r;if(a===0)return e[0]+o;for(var u=0;a>0&&u<=4;u++){var l=a%10;l===0&&fi(s,aa)&&o!==""?o=e[l]+o:l>1||l===1&&u===0||l===1&&u===1&&fi(s,xs)||l===1&&u===1&&fi(s,Ss)&&i>100||l===1&&u>1&&fi(s,Ba)?o=e[l]+(u>0?t[u-1]:"")+o:l===1&&u>0&&(o=t[u-1]+o),a=Math.floor(a/10)}return(i<0?n:"")+o},Ts="\u5341\u767E\u5343\u842C",$o="\u62FE\u4F70\u4EDF\u842C",zA="\u30DE\u30A4\u30CA\u30B9",Zo="\uB9C8\uC774\uB108\uC2A4",zs=function(i,e,t){var n=t?". ":"",r=t?"\u3001":"",s=t?", ":"",a=t?" ":"";switch(e){case 0:return"\u2022"+a;case 1:return"\u25E6"+a;case 2:return"\u25FE"+a;case 5:var o=ei(i,48,57,!0,n);return o.length<4?"0"+o:o;case 4:return Ws(i,"\u3007\u4E00\u4E8C\u4E09\u56DB\u4E94\u516D\u4E03\u516B\u4E5D",r);case 6:return Zs(i,1,3999,Vo,3,n).toLowerCase();case 7:return Zs(i,1,3999,Vo,3,n);case 8:return ei(i,945,969,!1,n);case 9:return ei(i,97,122,!1,n);case 10:return ei(i,65,90,!1,n);case 11:return ei(i,1632,1641,!0,n);case 12:case 49:return Zs(i,1,9999,WA,3,n);case 35:return Zs(i,1,9999,WA,3,n).toLowerCase();case 13:return ei(i,2534,2543,!0,n);case 14:case 30:return ei(i,6112,6121,!0,n);case 15:return Ws(i,"\u5B50\u4E11\u5BC5\u536F\u8FB0\u5DF3\u5348\u672A\u7533\u9149\u620C\u4EA5",r);case 16:return Ws(i,"\u7532\u4E59\u4E19\u4E01\u620A\u5DF1\u5E9A\u8F9B\u58EC\u7678",r);case 17:case 48:return _s(i,"\u96F6\u4E00\u4E8C\u4E09\u56DB\u4E94\u516D\u4E03\u516B\u4E5D",Ts,"\u8CA0",r,xs|Ss|Ba);case 47:return _s(i,"\u96F6\u58F9\u8CB3\u53C3\u8086\u4F0D\u9678\u67D2\u634C\u7396",$o,"\u8CA0",r,aa|xs|Ss|Ba);case 42:return _s(i,"\u96F6\u4E00\u4E8C\u4E09\u56DB\u4E94\u516D\u4E03\u516B\u4E5D",Ts,"\u8D1F",r,xs|Ss|Ba);case 41:return _s(i,"\u96F6\u58F9\u8D30\u53C1\u8086\u4F0D\u9646\u67D2\u634C\u7396",$o,"\u8D1F",r,aa|xs|Ss|Ba);case 26:return _s(i,"\u3007\u4E00\u4E8C\u4E09\u56DB\u4E94\u516D\u4E03\u516B\u4E5D","\u5341\u767E\u5343\u4E07",zA,r,0);case 25:return _s(i,"\u96F6\u58F1\u5F10\u53C2\u56DB\u4F0D\u516D\u4E03\u516B\u4E5D","\u62FE\u767E\u5343\u4E07",zA,r,aa|xs|Ss);case 31:return _s(i,"\uC601\uC77C\uC774\uC0BC\uC0AC\uC624\uC721\uCE60\uD314\uAD6C","\uC2ED\uBC31\uCC9C\uB9CC",Zo,s,aa|xs|Ss);case 33:return _s(i,"\u96F6\u4E00\u4E8C\u4E09\u56DB\u4E94\u516D\u4E03\u516B\u4E5D","\u5341\u767E\u5343\u842C",Zo,s,0);case 32:return _s(i,"\u96F6\u58F9\u8CB3\u53C3\u56DB\u4E94\u516D\u4E03\u516B\u4E5D","\u62FE\u767E\u5343",Zo,s,aa|xs|Ss);case 18:return ei(i,2406,2415,!0,n);case 20:return Zs(i,1,19999,Eu,3,n);case 21:return ei(i,2790,2799,!0,n);case 22:return ei(i,2662,2671,!0,n);case 22:return Zs(i,1,10999,yu,3,n);case 23:return Ws(i,"\u3042\u3044\u3046\u3048\u304A\u304B\u304D\u304F\u3051\u3053\u3055\u3057\u3059\u305B\u305D\u305F\u3061\u3064\u3066\u3068\u306A\u306B\u306C\u306D\u306E\u306F\u3072\u3075\u3078\u307B\u307E\u307F\u3080\u3081\u3082\u3084\u3086\u3088\u3089\u308A\u308B\u308C\u308D\u308F\u3090\u3091\u3092\u3093");case 24:return Ws(i,"\u3044\u308D\u306F\u306B\u307B\u3078\u3068\u3061\u308A\u306C\u308B\u3092\u308F\u304B\u3088\u305F\u308C\u305D\u3064\u306D\u306A\u3089\u3080\u3046\u3090\u306E\u304A\u304F\u3084\u307E\u3051\u3075\u3053\u3048\u3066\u3042\u3055\u304D\u3086\u3081\u307F\u3057\u3091\u3072\u3082\u305B\u3059");case 27:return ei(i,3302,3311,!0,n);case 28:return Ws(i,"\u30A2\u30A4\u30A6\u30A8\u30AA\u30AB\u30AD\u30AF\u30B1\u30B3\u30B5\u30B7\u30B9\u30BB\u30BD\u30BF\u30C1\u30C4\u30C6\u30C8\u30CA\u30CB\u30CC\u30CD\u30CE\u30CF\u30D2\u30D5\u30D8\u30DB\u30DE\u30DF\u30E0\u30E1\u30E2\u30E4\u30E6\u30E8\u30E9\u30EA\u30EB\u30EC\u30ED\u30EF\u30F0\u30F1\u30F2\u30F3",r);case 29:return Ws(i,"\u30A4\u30ED\u30CF\u30CB\u30DB\u30D8\u30C8\u30C1\u30EA\u30CC\u30EB\u30F2\u30EF\u30AB\u30E8\u30BF\u30EC\u30BD\u30C4\u30CD\u30CA\u30E9\u30E0\u30A6\u30F0\u30CE\u30AA\u30AF\u30E4\u30DE\u30B1\u30D5\u30B3\u30A8\u30C6\u30A2\u30B5\u30AD\u30E6\u30E1\u30DF\u30B7\u30F1\u30D2\u30E2\u30BB\u30B9",r);case 34:return ei(i,3792,3801,!0,n);case 37:return ei(i,6160,6169,!0,n);case 38:return ei(i,4160,4169,!0,n);case 39:return ei(i,2918,2927,!0,n);case 40:return ei(i,1776,1785,!0,n);case 43:return ei(i,3046,3055,!0,n);case 44:return ei(i,3174,3183,!0,n);case 45:return ei(i,3664,3673,!0,n);case 46:return ei(i,3872,3881,!0,n);case 3:default:return ei(i,48,57,!0,n)}},Wo="data-html2canvas-ignore",zo=function(){function i(e,t,n){if(this.context=e,this.options=n,this.scrolledElements=[],this.referenceElement=t,this.counters=new _u,this.quoteDepth=0,!t.ownerDocument)throw new Error("Cloned element does not have an owner document");this.documentElement=this.cloneNode(t.ownerDocument.documentElement,!1)}return i.prototype.toIFrame=function(e,t){var n=this,r=wu(e,t);if(!r.contentWindow)return Promise.reject("Unable to find iframe window");var s=e.defaultView.pageXOffset,a=e.defaultView.pageYOffset,o=r.contentWindow,u=o.document,l=bu(r).then(function(){return re(n,void 0,void 0,function(){var c,d;return ge(this,function(g){switch(g.label){case 0:return this.scrolledElements.forEach(io),o&&(o.scrollTo(t.left,t.top),/(iPad|iPhone|iPod)/g.test(navigator.userAgent)&&(o.scrollY!==t.top||o.scrollX!==t.left)&&(this.context.logger.warn("Unable to restore scroll position for cloned document"),this.context.windowBounds=this.context.windowBounds.add(o.scrollX-t.left,o.scrollY-t.top,0,0))),c=this.options.onclone,d=this.clonedReferenceElement,typeof d=="undefined"?[2,Promise.reject("Error finding the "+this.referenceElement.nodeName+" in the cloned document")]:u.fonts&&u.fonts.ready?[4,u.fonts.ready]:[3,2];case 1:g.sent(),g.label=2;case 2:return/(AppleWebKit)/g.test(navigator.userAgent)?[4,jo(u)]:[3,4];case 3:g.sent(),g.label=4;case 4:return typeof c=="function"?[2,Promise.resolve().then(function(){return c(u,d)}).then(function(){return r})]:[2,r]}})})});return u.open(),u.write(YA(document.doctype)+"<html></html>"),Xo(this.referenceElement.ownerDocument,s,a),u.replaceChild(u.adoptNode(this.documentElement),u.documentElement),u.close(),l},i.prototype.createElementClone=function(e){if(Ka(e,2))debugger;if(Ho(e))return this.createCanvasClone(e);if(no(e))return this.createVideoClone(e);if(VA(e))return this.createStyleClone(e);var t=e.cloneNode(!1);return Ko(t)&&(Ko(e)&&e.currentSrc&&e.currentSrc!==e.src&&(t.src=e.currentSrc,t.srcset=""),t.loading==="lazy"&&(t.loading="eager")),Go(t)?this.createCustomElementClone(t):t},i.prototype.createCustomElementClone=function(e){var t=document.createElement("html2canvascustomelement");return Yo(e.style,t),t},i.prototype.createStyleClone=function(e){try{var t=e.sheet;if(t&&t.cssRules){var n=[].slice.call(t.cssRules,0).reduce(function(s,a){return a&&typeof a.cssText=="string"?s+a.cssText:s},""),r=e.cloneNode(!1);return r.textContent=n,r}}catch(s){if(this.context.logger.error("Unable to access cssRules property",s),s.name!=="SecurityError")throw s}return e.cloneNode(!1)},i.prototype.createCanvasClone=function(e){var t;if(this.options.inlineImages&&e.ownerDocument){var n=e.ownerDocument.createElement("img");try{return n.src=e.toDataURL(),n}catch(l){this.context.logger.info("Unable to inline canvas contents, canvas is tainted",e)}}var r=e.cloneNode(!1);try{r.width=e.width,r.height=e.height;var s=e.getContext("2d"),a=r.getContext("2d");if(a)if(!this.options.allowTaint&&s)a.putImageData(s.getImageData(0,0,e.width,e.height),0,0);else{var o=(t=e.getContext("webgl2"))!==null&&t!==void 0?t:e.getContext("webgl");if(o){var u=o.getContextAttributes();(u==null?void 0:u.preserveDrawingBuffer)===!1&&this.context.logger.warn("Unable to clone WebGL context as it has preserveDrawingBuffer=false",e)}a.drawImage(e,0,0)}return r}catch(l){this.context.logger.info("Unable to clone canvas as it is tainted",e)}return r},i.prototype.createVideoClone=function(e){var t=e.ownerDocument.createElement("canvas");t.width=e.offsetWidth,t.height=e.offsetHeight;var n=t.getContext("2d");try{return n&&(n.drawImage(e,0,0,t.width,t.height),this.options.allowTaint||n.getImageData(0,0,t.width,t.height)),t}catch(s){this.context.logger.info("Unable to clone video as it is tainted",e)}var r=e.ownerDocument.createElement("canvas");return r.width=e.offsetWidth,r.height=e.offsetHeight,r},i.prototype.appendChildNode=function(e,t,n){(!vs(t)||!$A(t)&&!t.hasAttribute(Wo)&&(typeof this.options.ignoreElements!="function"||!this.options.ignoreElements(t)))&&(!this.options.copyStyles||!vs(t)||!VA(t))&&e.appendChild(this.cloneNode(t,n))},i.prototype.cloneChildNodes=function(e,t,n){for(var r=this,s=e.shadowRoot?e.shadowRoot.firstChild:e.firstChild;s;s=s.nextSibling)if(vs(s)&&ZA(s)&&typeof s.assignedNodes=="function"){var a=s.assignedNodes();a.length&&a.forEach(function(o){return r.appendChildNode(t,o,n)})}else this.appendChildNode(t,s,n)},i.prototype.cloneNode=function(e,t){if(KA(e))return document.createTextNode(e.data);if(!e.ownerDocument)return e.cloneNode(!1);var n=e.ownerDocument.defaultView;if(n&&vs(e)&&(No(e)||eo(e))){var r=this.createElementClone(e);r.style.transitionProperty="none";var s=n.getComputedStyle(e),a=n.getComputedStyle(e,":before"),o=n.getComputedStyle(e,":after");this.referenceElement===e&&No(r)&&(this.clonedReferenceElement=r),wa(r)&&xu(r);var u=this.counters.parse(new wo(this.context,s)),l=this.resolvePseudoContent(e,r,a,Fs.BEFORE);Go(e)&&(t=!0),no(e)||this.cloneChildNodes(e,r,t),l&&r.insertBefore(l,r.firstChild);var c=this.resolvePseudoContent(e,r,o,Fs.AFTER);return c&&r.appendChild(c),this.counters.pop(u),(s&&(this.options.copyStyles||eo(e))&&!$s(e)||t)&&Yo(s,r),(e.scrollTop!==0||e.scrollLeft!==0)&&this.scrolledElements.push([r,e.scrollLeft,e.scrollTop]),(ro(e)||ss(e))&&(ro(r)||ss(r))&&(r.value=e.value),r}return e.cloneNode(!1)},i.prototype.resolvePseudoContent=function(e,t,n,r){var s=this;if(n){var a=n.content,o=t.ownerDocument;if(!(!o||!a||a==="none"||a==="-moz-alt-content"||n.display==="none")){this.counters.parse(new wo(this.context,n));var u=new BA(this.context,n),l=o.createElement("html2canvaspseudoelement");Yo(n,l),u.content.forEach(function(d){if(d.type===0)l.appendChild(o.createTextNode(d.value));else if(d.type===22){var g=o.createElement("img");g.src=d.value,g.style.opacity="1",l.appendChild(g)}else if(d.type===18){if(d.name==="attr"){var w=d.values.filter(Sr);w.length&&l.appendChild(o.createTextNode(e.getAttribute(w[0].value)||""))}else if(d.name==="counter"){var y=d.values.filter(Cr),O=y[0],H=y[1];if(O&&Sr(O)){var Ae=s.counters.getCounterValue(O.value),Ee=H&&Sr(H)?po.parse(s.context,H.value):3;l.appendChild(o.createTextNode(zs(Ae,Ee,!1)))}}else if(d.name==="counters"){var we=d.values.filter(Cr),O=we[0],Ze=we[1],H=we[2];if(O&&Sr(O)){var rt=s.counters.getCounterValues(O.value),pt=H&&Sr(H)?po.parse(s.context,H.value):3,At=Ze&&Ze.type===0?Ze.value:"",wt=rt.map(function(fn){return zs(fn,pt,!1)}).join(At);l.appendChild(o.createTextNode(wt))}}}else if(d.type===20)switch(d.value){case"open-quote":l.appendChild(o.createTextNode(Ms(u.quotes,s.quoteDepth++,!0)));break;case"close-quote":l.appendChild(o.createTextNode(Ms(u.quotes,--s.quoteDepth,!1)));break;default:l.appendChild(o.createTextNode(d.value))}}),l.className=Jo+" "+qo;var c=r===Fs.BEFORE?" "+Jo:" "+qo;return eo(t)?t.className.baseValue+=c:t.className+=c,l}}},i.destroy=function(e){return e.parentNode?(e.parentNode.removeChild(e),!0):!1},i}(),Fs;(function(i){i[i.BEFORE=0]="BEFORE",i[i.AFTER=1]="AFTER"})(Fs||(Fs={}));var wu=function(i,e){var t=i.createElement("iframe");return t.className="html2canvas-container",t.style.visibility="hidden",t.style.position="fixed",t.style.left="-10000px",t.style.top="0px",t.style.border="0",t.width=e.width.toString(),t.height=e.height.toString(),t.scrolling="no",t.setAttribute(Wo,"true"),i.body.appendChild(t),t},Bu=function(i){return new Promise(function(e){if(i.complete){e();return}if(!i.src){e();return}i.onload=e,i.onerror=e})},jo=function(i){return Promise.all([].slice.call(i.images,0).map(Bu))},bu=function(i){return new Promise(function(e,t){var n=i.contentWindow;if(!n)return t("No window assigned for iframe");var r=n.document;n.onload=i.onload=function(){n.onload=i.onload=null;var s=setInterval(function(){r.body.childNodes.length>0&&r.readyState==="complete"&&(clearInterval(s),e(i))},50)}})},jA=["all","d","content"],Yo=function(i,e){for(var t=i.length-1;t>=0;t--){var n=i.item(t);jA.indexOf(n)===-1&&e.style.setProperty(n,i.getPropertyValue(n))}return e},YA=function(i){var e="";return i&&(e+="<!DOCTYPE ",i.name&&(e+=i.name),i.internalSubset&&(e+=i.internalSubset),i.publicId&&(e+='"'+i.publicId+'"'),i.systemId&&(e+='"'+i.systemId+'"'),e+=">"),e},Xo=function(i,e,t){i&&i.defaultView&&(e!==i.defaultView.pageXOffset||t!==i.defaultView.pageYOffset)&&i.defaultView.scrollTo(e,t)},io=function(i){var e=i[0],t=i[1],n=i[2];e.scrollLeft=t,e.scrollTop=n},Cu=":before",XA=":after",Jo="___html2canvas___pseudoelement_before",qo="___html2canvas___pseudoelement_after",so=`{
content: "" !important;
display: none !important;
}`,xu=function(i){eA(i,"."+Jo+Cu+so+`
.`+qo+XA+so)},eA=function(i,e){var t=i.ownerDocument;if(t){var n=t.createElement("style");n.textContent=e,i.appendChild(n)}},JA=function(){function i(){}return i.getOrigin=function(e){var t=i._link;return t?(t.href=e,t.href=t.href,t.protocol+t.hostname+t.port):"about:blank"},i.isSameOrigin=function(e){return i.getOrigin(e)===i._origin},i.setContext=function(e){i._link=e.document.createElement("a"),i._origin=i.getOrigin(e.location.href)},i._origin="about:blank",i}(),Su=function(){function i(e,t){this.context=e,this._options=t,this._cache={}}return i.prototype.addImage=function(e){var t=Promise.resolve();return this.has(e)||(ba(e)||Tu(e))&&(this._cache[e]=this.loadImage(e)).catch(function(){}),t},i.prototype.match=function(e){return this._cache[e]},i.prototype.loadImage=function(e){return re(this,void 0,void 0,function(){var t,n,r,s,a=this;return ge(this,function(o){switch(o.label){case 0:return t=JA.isSameOrigin(e),n=!ao(e)&&this._options.useCORS===!0&&xi.SUPPORT_CORS_IMAGES&&!t,r=!ao(e)&&!t&&!ba(e)&&typeof this._options.proxy=="string"&&xi.SUPPORT_CORS_XHR&&!n,!t&&this._options.allowTaint===!1&&!ao(e)&&!ba(e)&&!r&&!n?[2]:(s=e,r?[4,this.proxy(s)]:[3,2]);case 1:s=o.sent(),o.label=2;case 2:return this.context.logger.debug("Added image "+e.substring(0,256)),[4,new Promise(function(u,l){var c=new Image;c.onload=function(){return u(c)},c.onerror=l,(Fu(s)||n)&&(c.crossOrigin="anonymous"),c.src=s,c.complete===!0&&setTimeout(function(){return u(c)},500),a._options.imageTimeout>0&&setTimeout(function(){return l("Timed out ("+a._options.imageTimeout+"ms) loading image")},a._options.imageTimeout)})];case 3:return[2,o.sent()]}})})},i.prototype.has=function(e){return typeof this._cache[e]!="undefined"},i.prototype.keys=function(){return Promise.resolve(Object.keys(this._cache))},i.prototype.proxy=function(e){var t=this,n=this._options.proxy;if(!n)throw new Error("No proxy defined");var r=e.substring(0,256);return new Promise(function(s,a){var o=xi.SUPPORT_RESPONSE_TYPE?"blob":"text",u=new XMLHttpRequest;u.onload=function(){if(u.status===200)if(o==="text")s(u.response);else{var d=new FileReader;d.addEventListener("load",function(){return s(d.result)},!1),d.addEventListener("error",function(g){return a(g)},!1),d.readAsDataURL(u.response)}else a("Failed to proxy resource "+r+" with status code "+u.status)},u.onerror=a;var l=n.indexOf("?")>-1?"&":"?";if(u.open("GET",""+n+l+"url="+encodeURIComponent(e)+"&responseType="+o),o!=="text"&&u instanceof XMLHttpRequest&&(u.responseType=o),t._options.imageTimeout){var c=t._options.imageTimeout;u.timeout=c,u.ontimeout=function(){return a("Timed out ("+c+"ms) proxying "+r)}}u.send()})},i}(),tA=/^data:image\/svg\+xml/i,qA=/^data:image\/.*;base64,/i,el=/^data:image\/.*/i,Tu=function(i){return xi.SUPPORT_SVG_DRAWING||!tl(i)},ao=function(i){return el.test(i)},Fu=function(i){return qA.test(i)},ba=function(i){return i.substr(0,4)==="blob"},tl=function(i){return i.substr(-3).toLowerCase()==="svg"||tA.test(i)},rr=function(){function i(e,t){this.type=0,this.x=e,this.y=t}return i.prototype.add=function(e,t){return new i(this.x+e,this.y+t)},i}(),oa=function(i,e,t){return new rr(i.x+(e.x-i.x)*t,i.y+(e.y-i.y)*t)},Aa=function(){function i(e,t,n,r){this.type=1,this.start=e,this.startControl=t,this.endControl=n,this.end=r}return i.prototype.subdivide=function(e,t){var n=oa(this.start,this.startControl,e),r=oa(this.startControl,this.endControl,e),s=oa(this.endControl,this.end,e),a=oa(n,r,e),o=oa(r,s,e),u=oa(a,o,e);return t?new i(this.start,n,a,u):new i(u,o,s,this.end)},i.prototype.add=function(e,t){return new i(this.start.add(e,t),this.startControl.add(e,t),this.endControl.add(e,t),this.end.add(e,t))},i.prototype.reverse=function(){return new i(this.end,this.endControl,this.startControl,this.start)},i}(),Zi=function(i){return i.type===1},nA=function(){function i(e){var t=e.styles,n=e.bounds,r=Ti(t.borderTopLeftRadius,n.width,n.height),s=r[0],a=r[1],o=Ti(t.borderTopRightRadius,n.width,n.height),u=o[0],l=o[1],c=Ti(t.borderBottomRightRadius,n.width,n.height),d=c[0],g=c[1],w=Ti(t.borderBottomLeftRadius,n.width,n.height),y=w[0],O=w[1],H=[];H.push((s+u)/n.width),H.push((y+d)/n.width),H.push((a+O)/n.height),H.push((l+g)/n.height);var Ae=Math.max.apply(Math,H);Ae>1&&(s/=Ae,a/=Ae,u/=Ae,l/=Ae,d/=Ae,g/=Ae,y/=Ae,O/=Ae);var Ee=n.width-u,we=n.height-g,Ze=n.width-d,rt=n.height-O,pt=t.borderTopWidth,At=t.borderRightWidth,wt=t.borderBottomWidth,_t=t.borderLeftWidth,ct=Kr(t.paddingTop,e.bounds.width),fn=Kr(t.paddingRight,e.bounds.width),Rn=Kr(t.paddingBottom,e.bounds.width),$n=Kr(t.paddingLeft,e.bounds.width);this.topLeftBorderDoubleOuterBox=s>0||a>0?ci(n.left+_t/3,n.top+pt/3,s-_t/3,a-pt/3,zr.TOP_LEFT):new rr(n.left+_t/3,n.top+pt/3),this.topRightBorderDoubleOuterBox=s>0||a>0?ci(n.left+Ee,n.top+pt/3,u-At/3,l-pt/3,zr.TOP_RIGHT):new rr(n.left+n.width-At/3,n.top+pt/3),this.bottomRightBorderDoubleOuterBox=d>0||g>0?ci(n.left+Ze,n.top+we,d-At/3,g-wt/3,zr.BOTTOM_RIGHT):new rr(n.left+n.width-At/3,n.top+n.height-wt/3),this.bottomLeftBorderDoubleOuterBox=y>0||O>0?ci(n.left+_t/3,n.top+rt,y-_t/3,O-wt/3,zr.BOTTOM_LEFT):new rr(n.left+_t/3,n.top+n.height-wt/3),this.topLeftBorderDoubleInnerBox=s>0||a>0?ci(n.left+_t*2/3,n.top+pt*2/3,s-_t*2/3,a-pt*2/3,zr.TOP_LEFT):new rr(n.left+_t*2/3,n.top+pt*2/3),this.topRightBorderDoubleInnerBox=s>0||a>0?ci(n.left+Ee,n.top+pt*2/3,u-At*2/3,l-pt*2/3,zr.TOP_RIGHT):new rr(n.left+n.width-At*2/3,n.top+pt*2/3),this.bottomRightBorderDoubleInnerBox=d>0||g>0?ci(n.left+Ze,n.top+we,d-At*2/3,g-wt*2/3,zr.BOTTOM_RIGHT):new rr(n.left+n.width-At*2/3,n.top+n.height-wt*2/3),this.bottomLeftBorderDoubleInnerBox=y>0||O>0?ci(n.left+_t*2/3,n.top+rt,y-_t*2/3,O-wt*2/3,zr.BOTTOM_LEFT):new rr(n.left+_t*2/3,n.top+n.height-wt*2/3),this.topLeftBorderStroke=s>0||a>0?ci(n.left+_t/2,n.top+pt/2,s-_t/2,a-pt/2,zr.TOP_LEFT):new rr(n.left+_t/2,n.top+pt/2),this.topRightBorderStroke=s>0||a>0?ci(n.left+Ee,n.top+pt/2,u-At/2,l-pt/2,zr.TOP_RIGHT):new rr(n.left+n.width-At/2,n.top+pt/2),this.bottomRightBorderStroke=d>0||g>0?ci(n.left+Ze,n.top+we,d-At/2,g-wt/2,zr.BOTTOM_RIGHT):new rr(n.left+n.width-At/2,n.top+n.height-wt/2),this.bottomLeftBorderStroke=y>0||O>0?ci(n.left+_t/2,n.top+rt,y-_t/2,O-wt/2,zr.BOTTOM_LEFT):new rr(n.left+_t/2,n.top+n.height-wt/2),this.topLeftBorderBox=s>0||a>0?ci(n.left,n.top,s,a,zr.TOP_LEFT):new rr(n.left,n.top),this.topRightBorderBox=u>0||l>0?ci(n.left+Ee,n.top,u,l,zr.TOP_RIGHT):new rr(n.left+n.width,n.top),this.bottomRightBorderBox=d>0||g>0?ci(n.left+Ze,n.top+we,d,g,zr.BOTTOM_RIGHT):new rr(n.left+n.width,n.top+n.height),this.bottomLeftBorderBox=y>0||O>0?ci(n.left,n.top+rt,y,O,zr.BOTTOM_LEFT):new rr(n.left,n.top+n.height),this.topLeftPaddingBox=s>0||a>0?ci(n.left+_t,n.top+pt,Math.max(0,s-_t),Math.max(0,a-pt),zr.TOP_LEFT):new rr(n.left+_t,n.top+pt),this.topRightPaddingBox=u>0||l>0?ci(n.left+Math.min(Ee,n.width-At),n.top+pt,Ee>n.width+At?0:Math.max(0,u-At),Math.max(0,l-pt),zr.TOP_RIGHT):new rr(n.left+n.width-At,n.top+pt),this.bottomRightPaddingBox=d>0||g>0?ci(n.left+Math.min(Ze,n.width-_t),n.top+Math.min(we,n.height-wt),Math.max(0,d-At),Math.max(0,g-wt),zr.BOTTOM_RIGHT):new rr(n.left+n.width-At,n.top+n.height-wt),this.bottomLeftPaddingBox=y>0||O>0?ci(n.left+_t,n.top+Math.min(rt,n.height-wt),Math.max(0,y-_t),Math.max(0,O-wt),zr.BOTTOM_LEFT):new rr(n.left+_t,n.top+n.height-wt),this.topLeftContentBox=s>0||a>0?ci(n.left+_t+$n,n.top+pt+ct,Math.max(0,s-(_t+$n)),Math.max(0,a-(pt+ct)),zr.TOP_LEFT):new rr(n.left+_t+$n,n.top+pt+ct),this.topRightContentBox=u>0||l>0?ci(n.left+Math.min(Ee,n.width+_t+$n),n.top+pt+ct,Ee>n.width+_t+$n?0:u-_t+$n,l-(pt+ct),zr.TOP_RIGHT):new rr(n.left+n.width-(At+fn),n.top+pt+ct),this.bottomRightContentBox=d>0||g>0?ci(n.left+Math.min(Ze,n.width-(_t+$n)),n.top+Math.min(we,n.height+pt+ct),Math.max(0,d-(At+fn)),g-(wt+Rn),zr.BOTTOM_RIGHT):new rr(n.left+n.width-(At+fn),n.top+n.height-(wt+Rn)),this.bottomLeftContentBox=y>0||O>0?ci(n.left+_t+$n,n.top+rt,Math.max(0,y-(_t+$n)),O-(wt+Rn),zr.BOTTOM_LEFT):new rr(n.left+_t+$n,n.top+n.height-(wt+Rn))}return i}(),zr;(function(i){i[i.TOP_LEFT=0]="TOP_LEFT",i[i.TOP_RIGHT=1]="TOP_RIGHT",i[i.BOTTOM_RIGHT=2]="BOTTOM_RIGHT",i[i.BOTTOM_LEFT=3]="BOTTOM_LEFT"})(zr||(zr={}));var ci=function(i,e,t,n,r){var s=4*((Math.sqrt(2)-1)/3),a=t*s,o=n*s,u=i+t,l=e+n;switch(r){case zr.TOP_LEFT:return new Aa(new rr(i,l),new rr(i,l-o),new rr(u-a,e),new rr(u,e));case zr.TOP_RIGHT:return new Aa(new rr(i,e),new rr(i+a,e),new rr(u,l-o),new rr(u,l));case zr.BOTTOM_RIGHT:return new Aa(new rr(u,e),new rr(u,e+o),new rr(i+a,l),new rr(i,l));case zr.BOTTOM_LEFT:default:return new Aa(new rr(u,l),new rr(u-a,l),new rr(i,e+o),new rr(i,e))}},js=function(i){return[i.topLeftBorderBox,i.topRightBorderBox,i.bottomRightBorderBox,i.bottomLeftBorderBox]},Iu=function(i){return[i.topLeftContentBox,i.topRightContentBox,i.bottomRightContentBox,i.bottomLeftContentBox]},Ca=function(i){return[i.topLeftPaddingBox,i.topRightPaddingBox,i.bottomRightPaddingBox,i.bottomLeftPaddingBox]},nl=function(){function i(e,t,n){this.offsetX=e,this.offsetY=t,this.matrix=n,this.type=0,this.target=6}return i}(),oo=function(){function i(e,t){this.path=e,this.target=t,this.type=1}return i}(),rl=function(){function i(e){this.opacity=e,this.type=2,this.target=6}return i}(),Du=function(i){return i.type===0},il=function(i){return i.type===1},Lu=function(i){return i.type===2},sl=function(i,e){return i.length===e.length?i.some(function(t,n){return t===e[n]}):!1},al=function(i,e,t,n,r){return i.map(function(s,a){switch(a){case 0:return s.add(e,t);case 1:return s.add(e+n,t);case 2:return s.add(e+n,t+r);case 3:return s.add(e,t+r)}return s})},ol=function(){function i(e){this.element=e,this.inlineLevel=[],this.nonInlineLevel=[],this.negativeZIndex=[],this.zeroOrAutoZIndexOrTransformedOrOpacity=[],this.positiveZIndex=[],this.nonPositionedFloats=[],this.nonPositionedInlineLevel=[]}return i}(),Al=function(){function i(e,t){if(this.container=e,this.parent=t,this.effects=[],this.curves=new nA(this.container),this.container.styles.opacity<1&&this.effects.push(new rl(this.container.styles.opacity)),this.container.styles.transform!==null){var n=this.container.bounds.left+this.container.styles.transformOrigin[0].number,r=this.container.bounds.top+this.container.styles.transformOrigin[1].number,s=this.container.styles.transform;this.effects.push(new nl(n,r,s))}if(this.container.styles.overflowX!==0){var a=js(this.curves),o=Ca(this.curves);sl(a,o)?this.effects.push(new oo(a,6)):(this.effects.push(new oo(a,2)),this.effects.push(new oo(o,4)))}}return i.prototype.getEffects=function(e){for(var t=[2,3].indexOf(this.container.styles.position)===-1,n=this.parent,r=this.effects.slice(0);n;){var s=n.effects.filter(function(u){return!il(u)});if(t||n.container.styles.position!==0||!n.parent){if(r.unshift.apply(r,s),t=[2,3].indexOf(n.container.styles.position)===-1,n.container.styles.overflowX!==0){var a=js(n.curves),o=Ca(n.curves);sl(a,o)||r.unshift(new oo(o,6))}}else r.unshift.apply(r,s);n=n.parent}return r.filter(function(u){return fi(u.target,e)})},i}(),rA=function(i,e,t,n){i.container.elements.forEach(function(r){var s=fi(r.flags,4),a=fi(r.flags,2),o=new Al(r,i);fi(r.styles.display,2048)&&n.push(o);var u=fi(r.flags,8)?[]:n;if(s||a){var l=s||r.styles.isPositioned()?t:e,c=new ol(o);if(r.styles.isPositioned()||r.styles.opacity<1||r.styles.isTransformed()){var d=r.styles.zIndex.order;if(d<0){var g=0;l.negativeZIndex.some(function(y,O){return d>y.element.container.styles.zIndex.order?(g=O,!1):g>0}),l.negativeZIndex.splice(g,0,c)}else if(d>0){var w=0;l.positiveZIndex.some(function(y,O){return d>=y.element.container.styles.zIndex.order?(w=O+1,!1):w>0}),l.positiveZIndex.splice(w,0,c)}else l.zeroOrAutoZIndexOrTransformedOrOpacity.push(c)}else r.styles.isFloating()?l.nonPositionedFloats.push(c):l.nonPositionedInlineLevel.push(c);rA(o,c,s?c:t,u)}else r.styles.isInlineLevel()?e.inlineLevel.push(o):e.nonInlineLevel.push(o),rA(o,e,t,u);fi(r.flags,8)&&ll(r,u)})},ll=function(i,e){for(var t=i instanceof Oo?i.start:1,n=i instanceof Oo?i.reversed:!1,r=0;r<e.length;r++){var s=e[r];s.container instanceof MA&&typeof s.container.value=="number"&&s.container.value!==0&&(t=s.container.value),s.listValue=zs(t,s.container.styles.listStyleType,!0),t+=n?-1:1}},Ru=function(i){var e=new Al(i,null),t=new ol(e),n=[];return rA(e,t,t,n),ll(e.container,n),t},ul=function(i,e){switch(e){case 0:return ts(i.topLeftBorderBox,i.topLeftPaddingBox,i.topRightBorderBox,i.topRightPaddingBox);case 1:return ts(i.topRightBorderBox,i.topRightPaddingBox,i.bottomRightBorderBox,i.bottomRightPaddingBox);case 2:return ts(i.bottomRightBorderBox,i.bottomRightPaddingBox,i.bottomLeftBorderBox,i.bottomLeftPaddingBox);case 3:default:return ts(i.bottomLeftBorderBox,i.bottomLeftPaddingBox,i.topLeftBorderBox,i.topLeftPaddingBox)}},cl=function(i,e){switch(e){case 0:return ts(i.topLeftBorderBox,i.topLeftBorderDoubleOuterBox,i.topRightBorderBox,i.topRightBorderDoubleOuterBox);case 1:return ts(i.topRightBorderBox,i.topRightBorderDoubleOuterBox,i.bottomRightBorderBox,i.bottomRightBorderDoubleOuterBox);case 2:return ts(i.bottomRightBorderBox,i.bottomRightBorderDoubleOuterBox,i.bottomLeftBorderBox,i.bottomLeftBorderDoubleOuterBox);case 3:default:return ts(i.bottomLeftBorderBox,i.bottomLeftBorderDoubleOuterBox,i.topLeftBorderBox,i.topLeftBorderDoubleOuterBox)}},Uu=function(i,e){switch(e){case 0:return ts(i.topLeftBorderDoubleInnerBox,i.topLeftPaddingBox,i.topRightBorderDoubleInnerBox,i.topRightPaddingBox);case 1:return ts(i.topRightBorderDoubleInnerBox,i.topRightPaddingBox,i.bottomRightBorderDoubleInnerBox,i.bottomRightPaddingBox);case 2:return ts(i.bottomRightBorderDoubleInnerBox,i.bottomRightPaddingBox,i.bottomLeftBorderDoubleInnerBox,i.bottomLeftPaddingBox);case 3:default:return ts(i.bottomLeftBorderDoubleInnerBox,i.bottomLeftPaddingBox,i.topLeftBorderDoubleInnerBox,i.topLeftPaddingBox)}},ku=function(i,e){switch(e){case 0:return Ao(i.topLeftBorderStroke,i.topRightBorderStroke);case 1:return Ao(i.topRightBorderStroke,i.bottomRightBorderStroke);case 2:return Ao(i.bottomRightBorderStroke,i.bottomLeftBorderStroke);case 3:default:return Ao(i.bottomLeftBorderStroke,i.topLeftBorderStroke)}},Ao=function(i,e){var t=[];return Zi(i)?t.push(i.subdivide(.5,!1)):t.push(i),Zi(e)?t.push(e.subdivide(.5,!0)):t.push(e),t},ts=function(i,e,t,n){var r=[];return Zi(i)?r.push(i.subdivide(.5,!1)):r.push(i),Zi(t)?r.push(t.subdivide(.5,!0)):r.push(t),Zi(n)?r.push(n.subdivide(.5,!0).reverse()):r.push(n),Zi(e)?r.push(e.subdivide(.5,!1).reverse()):r.push(e),r},lo=function(i){var e=i.bounds,t=i.styles;return e.add(t.borderLeftWidth,t.borderTopWidth,-(t.borderRightWidth+t.borderLeftWidth),-(t.borderTopWidth+t.borderBottomWidth))},uo=function(i){var e=i.styles,t=i.bounds,n=Kr(e.paddingLeft,t.width),r=Kr(e.paddingRight,t.width),s=Kr(e.paddingTop,t.width),a=Kr(e.paddingBottom,t.width);return t.add(n+e.borderLeftWidth,s+e.borderTopWidth,-(e.borderRightWidth+e.borderLeftWidth+n+r),-(e.borderTopWidth+e.borderBottomWidth+s+a))},co=function(i,e){return i===0?e.bounds:i===2?uo(e):lo(e)},Ou=function(i,e){return i===0?e.bounds:i===2?uo(e):lo(e)},iA=function(i,e,t){var n=co(Ys(i.styles.backgroundOrigin,e),i),r=Ou(Ys(i.styles.backgroundClip,e),i),s=fl(Ys(i.styles.backgroundSize,e),t,n),a=s[0],o=s[1],u=Ti(Ys(i.styles.backgroundPosition,e),n.width-a,n.height-o),l=Pu(Ys(i.styles.backgroundRepeat,e),u,s,n,r),c=Math.round(n.left+u[0]),d=Math.round(n.top+u[1]);return[l,c,d,a,o]},la=function(i){return Sr(i)&&i.value===gs.AUTO},fo=function(i){return typeof i=="number"},fl=function(i,e,t){var n=e[0],r=e[1],s=e[2],a=i[0],o=i[1];if(!a)return[0,0];if(Mr(a)&&o&&Mr(o))return[Kr(a,t.width),Kr(o,t.height)];var u=fo(s);if(Sr(a)&&(a.value===gs.CONTAIN||a.value===gs.COVER)){if(fo(s)){var l=t.width/t.height;return l<s!=(a.value===gs.COVER)?[t.width,t.width/s]:[t.height*s,t.height]}return[t.width,t.height]}var c=fo(n),d=fo(r),g=c||d;if(la(a)&&(!o||la(o))){if(c&&d)return[n,r];if(!u&&!g)return[t.width,t.height];if(g&&u){var w=c?n:r*s,y=d?r:n/s;return[w,y]}var O=c?n:t.width,H=d?r:t.height;return[O,H]}if(u){var Ae=0,Ee=0;return Mr(a)?Ae=Kr(a,t.width):Mr(o)&&(Ee=Kr(o,t.height)),la(a)?Ae=Ee*s:(!o||la(o))&&(Ee=Ae/s),[Ae,Ee]}var we=null,Ze=null;if(Mr(a)?we=Kr(a,t.width):o&&Mr(o)&&(Ze=Kr(o,t.height)),we!==null&&(!o||la(o))&&(Ze=c&&d?we/n*r:t.height),Ze!==null&&la(a)&&(we=c&&d?Ze/r*n:t.width),we!==null&&Ze!==null)return[we,Ze];throw new Error("Unable to calculate background-size for element")},Ys=function(i,e){var t=i[e];return typeof t=="undefined"?i[0]:t},Pu=function(i,e,t,n,r){var s=e[0],a=e[1],o=t[0],u=t[1];switch(i){case 2:return[new rr(Math.round(n.left),Math.round(n.top+a)),new rr(Math.round(n.left+n.width),Math.round(n.top+a)),new rr(Math.round(n.left+n.width),Math.round(u+n.top+a)),new rr(Math.round(n.left),Math.round(u+n.top+a))];case 3:return[new rr(Math.round(n.left+s),Math.round(n.top)),new rr(Math.round(n.left+s+o),Math.round(n.top)),new rr(Math.round(n.left+s+o),Math.round(n.height+n.top)),new rr(Math.round(n.left+s),Math.round(n.height+n.top))];case 1:return[new rr(Math.round(n.left+s),Math.round(n.top+a)),new rr(Math.round(n.left+s+o),Math.round(n.top+a)),new rr(Math.round(n.left+s+o),Math.round(n.top+a+u)),new rr(Math.round(n.left+s),Math.round(n.top+a+u))];default:return[new rr(Math.round(r.left),Math.round(r.top)),new rr(Math.round(r.left+r.width),Math.round(r.top)),new rr(Math.round(r.left+r.width),Math.round(r.height+r.top)),new rr(Math.round(r.left),Math.round(r.height+r.top))]}},sA="data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7",aA="Hidden Text",ho=function(){function i(e){this._data={},this._document=e}return i.prototype.parseMetrics=function(e,t){var n=this._document.createElement("div"),r=this._document.createElement("img"),s=this._document.createElement("span"),a=this._document.body;n.style.visibility="hidden",n.style.fontFamily=e,n.style.fontSize=t,n.style.margin="0",n.style.padding="0",n.style.whiteSpace="nowrap",a.appendChild(n),r.src=sA,r.width=1,r.height=1,r.style.margin="0",r.style.padding="0",r.style.verticalAlign="baseline",s.style.fontFamily=e,s.style.fontSize=t,s.style.margin="0",s.style.padding="0",s.appendChild(this._document.createTextNode(aA)),n.appendChild(s),n.appendChild(r);var o=r.offsetTop-s.offsetTop+2;n.removeChild(s),n.appendChild(this._document.createTextNode(aA)),n.style.lineHeight="normal",r.style.verticalAlign="super";var u=r.offsetTop-n.offsetTop+2;return a.removeChild(n),{baseline:o,middle:u}},i.prototype.getMetrics=function(e,t){var n=e+" "+t;return typeof this._data[n]=="undefined"&&(this._data[n]=this.parseMetrics(e,t)),this._data[n]},i}(),dl=function(){function i(e,t){this.context=e,this.options=t}return i}(),Qu=1e4,Mu=function(i){b(e,i);function e(t,n){var r=i.call(this,t,n)||this;return r._activeEffects=[],r.canvas=n.canvas?n.canvas:document.createElement("canvas"),r.ctx=r.canvas.getContext("2d"),n.canvas||(r.canvas.width=Math.floor(n.width*n.scale),r.canvas.height=Math.floor(n.height*n.scale),r.canvas.style.width=n.width+"px",r.canvas.style.height=n.height+"px"),r.fontMetrics=new ho(document),r.ctx.scale(r.options.scale,r.options.scale),r.ctx.translate(-n.x,-n.y),r.ctx.textBaseline="bottom",r._activeEffects=[],r.context.logger.debug("Canvas renderer initialized ("+n.width+"x"+n.height+") with scale "+n.scale),r}return e.prototype.applyEffects=function(t){for(var n=this;this._activeEffects.length;)this.popEffect();t.forEach(function(r){return n.applyEffect(r)})},e.prototype.applyEffect=function(t){this.ctx.save(),Lu(t)&&(this.ctx.globalAlpha=t.opacity),Du(t)&&(this.ctx.translate(t.offsetX,t.offsetY),this.ctx.transform(t.matrix[0],t.matrix[1],t.matrix[2],t.matrix[3],t.matrix[4],t.matrix[5]),this.ctx.translate(-t.offsetX,-t.offsetY)),il(t)&&(this.path(t.path),this.ctx.clip()),this._activeEffects.push(t)},e.prototype.popEffect=function(){this._activeEffects.pop(),this.ctx.restore()},e.prototype.renderStack=function(t){return re(this,void 0,void 0,function(){var n;return ge(this,function(r){switch(r.label){case 0:return n=t.element.container.styles,n.isVisible()?[4,this.renderStackContent(t)]:[3,2];case 1:r.sent(),r.label=2;case 2:return[2]}})})},e.prototype.renderNode=function(t){return re(this,void 0,void 0,function(){return ge(this,function(n){switch(n.label){case 0:if(fi(t.container.flags,16))debugger;return t.container.styles.isVisible()?[4,this.renderNodeBackgroundAndBorders(t)]:[3,3];case 1:return n.sent(),[4,this.renderNodeContent(t)];case 2:n.sent(),n.label=3;case 3:return[2]}})})},e.prototype.renderTextWithLetterSpacing=function(t,n,r){var s=this;if(n===0)this.ctx.fillText(t.text,t.bounds.left,t.bounds.top+r);else{var a=Uo(t.text);a.reduce(function(o,u){return s.ctx.fillText(u,o,t.bounds.top+r),o+s.ctx.measureText(u).width},t.bounds.left)}},e.prototype.createFontStyle=function(t){var n=t.fontVariant.filter(function(a){return a==="normal"||a==="small-caps"}).join(""),r=Hu(t.fontFamily).join(", "),s=br(t.fontSize)?""+t.fontSize.number+t.fontSize.unit:t.fontSize.number+"px";return[[t.fontStyle,n,t.fontWeight,s,r].join(" "),r,s]},e.prototype.renderTextNode=function(t,n){return re(this,void 0,void 0,function(){var r,s,a,o,u,l,c,d,g=this;return ge(this,function(w){return r=this.createFontStyle(n),s=r[0],a=r[1],o=r[2],this.ctx.font=s,this.ctx.direction=n.direction===1?"rtl":"ltr",this.ctx.textAlign="left",this.ctx.textBaseline="alphabetic",u=this.fontMetrics.getMetrics(a,o),l=u.baseline,c=u.middle,d=n.paintOrder,t.textBounds.forEach(function(y){d.forEach(function(O){switch(O){case 0:g.ctx.fillStyle=li(n.color),g.renderTextWithLetterSpacing(y,n.letterSpacing,l);var H=n.textShadow;H.length&&y.text.trim().length&&(H.slice(0).reverse().forEach(function(Ae){g.ctx.shadowColor=li(Ae.color),g.ctx.shadowOffsetX=Ae.offsetX.number*g.options.scale,g.ctx.shadowOffsetY=Ae.offsetY.number*g.options.scale,g.ctx.shadowBlur=Ae.blur.number,g.renderTextWithLetterSpacing(y,n.letterSpacing,l)}),g.ctx.shadowColor="",g.ctx.shadowOffsetX=0,g.ctx.shadowOffsetY=0,g.ctx.shadowBlur=0),n.textDecorationLine.length&&(g.ctx.fillStyle=li(n.textDecorationColor||n.color),n.textDecorationLine.forEach(function(Ae){switch(Ae){case 1:g.ctx.fillRect(y.bounds.left,Math.round(y.bounds.top+l),y.bounds.width,1);break;case 2:g.ctx.fillRect(y.bounds.left,Math.round(y.bounds.top),y.bounds.width,1);break;case 3:g.ctx.fillRect(y.bounds.left,Math.ceil(y.bounds.top+c),y.bounds.width,1);break}}));break;case 1:n.webkitTextStrokeWidth&&y.text.trim().length&&(g.ctx.strokeStyle=li(n.webkitTextStrokeColor),g.ctx.lineWidth=n.webkitTextStrokeWidth,g.ctx.lineJoin=window.chrome?"miter":"round",g.ctx.strokeText(y.text,y.bounds.left,y.bounds.top+l)),g.ctx.strokeStyle="",g.ctx.lineWidth=0,g.ctx.lineJoin="miter";break}})}),[2]})})},e.prototype.renderReplacedElement=function(t,n,r){if(r&&t.intrinsicWidth>0&&t.intrinsicHeight>0){var s=uo(t),a=Ca(n);this.path(a),this.ctx.save(),this.ctx.clip(),this.ctx.drawImage(r,0,0,t.intrinsicWidth,t.intrinsicHeight,s.left,s.top,s.width,s.height),this.ctx.restore()}},e.prototype.renderNodeContent=function(t){return re(this,void 0,void 0,function(){var n,r,s,a,o,u,Ee,Ee,l,c,d,g,Ze,w,y,rt,O,H,Ae,Ee,we,Ze,rt;return ge(this,function(pt){switch(pt.label){case 0:this.applyEffects(t.getEffects(4)),n=t.container,r=t.curves,s=n.styles,a=0,o=n.textNodes,pt.label=1;case 1:return a<o.length?(u=o[a],[4,this.renderTextNode(u,s)]):[3,4];case 2:pt.sent(),pt.label=3;case 3:return a++,[3,1];case 4:if(!(n instanceof PA))return[3,8];pt.label=5;case 5:return pt.trys.push([5,7,,8]),[4,this.context.cache.match(n.src)];case 6:return Ee=pt.sent(),this.renderReplacedElement(n,r,Ee),[3,8];case 7:return pt.sent(),this.context.logger.error("Error loading image "+n.src),[3,8];case 8:if(n instanceof ko&&this.renderReplacedElement(n,r,n.canvas),!(n instanceof QA))return[3,12];pt.label=9;case 9:return pt.trys.push([9,11,,12]),[4,this.context.cache.match(n.svg)];case 10:return Ee=pt.sent(),this.renderReplacedElement(n,r,Ee),[3,12];case 11:return pt.sent(),this.context.logger.error("Error loading svg "+n.svg.substring(0,255)),[3,12];case 12:return n instanceof $i&&n.tree?(l=new e(this.context,{scale:this.options.scale,backgroundColor:n.backgroundColor,x:0,y:0,width:n.width,height:n.height}),[4,l.render(n.tree)]):[3,14];case 13:c=pt.sent(),n.width&&n.height&&this.ctx.drawImage(c,0,0,n.width,n.height,n.bounds.left,n.bounds.top,n.bounds.width,n.bounds.height),pt.label=14;case 14:if(n instanceof Oi&&(d=Math.min(n.bounds.width,n.bounds.height),n.type===Ja?n.checked&&(this.ctx.save(),this.path([new rr(n.bounds.left+d*.39363,n.bounds.top+d*.79),new rr(n.bounds.left+d*.16,n.bounds.top+d*.5549),new rr(n.bounds.left+d*.27347,n.bounds.top+d*.44071),new rr(n.bounds.left+d*.39694,n.bounds.top+d*.5649),new rr(n.bounds.left+d*.72983,n.bounds.top+d*.23),new rr(n.bounds.left+d*.84,n.bounds.top+d*.34085),new rr(n.bounds.left+d*.39363,n.bounds.top+d*.79)]),this.ctx.fillStyle=li(Po),this.ctx.fill(),this.ctx.restore()):n.type===qa&&n.checked&&(this.ctx.save(),this.ctx.beginPath(),this.ctx.arc(n.bounds.left+d/2,n.bounds.top+d/2,d/4,0,Math.PI*2,!0),this.ctx.fillStyle=li(Po),this.ctx.fill(),this.ctx.restore())),hl(n)&&n.value.length){switch(g=this.createFontStyle(s),Ze=g[0],w=g[1],y=this.fontMetrics.getMetrics(Ze,w).baseline,this.ctx.font=Ze,this.ctx.fillStyle=li(s.color),this.ctx.textBaseline="alphabetic",this.ctx.textAlign=pl(n.styles.textAlign),rt=uo(n),O=0,n.styles.textAlign){case 1:O+=rt.width/2;break;case 2:O+=rt.width;break}H=rt.add(O,0,0,-rt.height/2+1),this.ctx.save(),this.path([new rr(rt.left,rt.top),new rr(rt.left+rt.width,rt.top),new rr(rt.left+rt.width,rt.top+rt.height),new rr(rt.left,rt.top+rt.height)]),this.ctx.clip(),this.renderTextWithLetterSpacing(new Ks(n.value,H),s.letterSpacing,y),this.ctx.restore(),this.ctx.textBaseline="alphabetic",this.ctx.textAlign="left"}if(!fi(n.styles.display,2048))return[3,20];if(n.styles.listStyleImage===null)return[3,19];if(Ae=n.styles.listStyleImage,Ae.type!==0)return[3,18];Ee=void 0,we=Ae.url,pt.label=15;case 15:return pt.trys.push([15,17,,18]),[4,this.context.cache.match(we)];case 16:return Ee=pt.sent(),this.ctx.drawImage(Ee,n.bounds.left-(Ee.width+10),n.bounds.top),[3,18];case 17:return pt.sent(),this.context.logger.error("Error loading list-style-image "+we),[3,18];case 18:return[3,20];case 19:t.listValue&&n.styles.listStyleType!==-1&&(Ze=this.createFontStyle(s)[0],this.ctx.font=Ze,this.ctx.fillStyle=li(s.color),this.ctx.textBaseline="middle",this.ctx.textAlign="right",rt=new U(n.bounds.left,n.bounds.top+Kr(n.styles.paddingTop,n.bounds.width),n.bounds.width,ka(s.lineHeight,s.fontSize.number)/2+1),this.renderTextWithLetterSpacing(new Ks(t.listValue,rt),s.letterSpacing,ka(s.lineHeight,s.fontSize.number)/2+2),this.ctx.textBaseline="bottom",this.ctx.textAlign="left"),pt.label=20;case 20:return[2]}})})},e.prototype.renderStackContent=function(t){return re(this,void 0,void 0,function(){var n,r,Ae,s,a,Ae,o,u,Ae,l,c,Ae,d,g,Ae,w,y,Ae,O,H,Ae;return ge(this,function(Ee){switch(Ee.label){case 0:if(fi(t.element.container.flags,16))debugger;return[4,this.renderNodeBackgroundAndBorders(t.element)];case 1:Ee.sent(),n=0,r=t.negativeZIndex,Ee.label=2;case 2:return n<r.length?(Ae=r[n],[4,this.renderStack(Ae)]):[3,5];case 3:Ee.sent(),Ee.label=4;case 4:return n++,[3,2];case 5:return[4,this.renderNodeContent(t.element)];case 6:Ee.sent(),s=0,a=t.nonInlineLevel,Ee.label=7;case 7:return s<a.length?(Ae=a[s],[4,this.renderNode(Ae)]):[3,10];case 8:Ee.sent(),Ee.label=9;case 9:return s++,[3,7];case 10:o=0,u=t.nonPositionedFloats,Ee.label=11;case 11:return o<u.length?(Ae=u[o],[4,this.renderStack(Ae)]):[3,14];case 12:Ee.sent(),Ee.label=13;case 13:return o++,[3,11];case 14:l=0,c=t.nonPositionedInlineLevel,Ee.label=15;case 15:return l<c.length?(Ae=c[l],[4,this.renderStack(Ae)]):[3,18];case 16:Ee.sent(),Ee.label=17;case 17:return l++,[3,15];case 18:d=0,g=t.inlineLevel,Ee.label=19;case 19:return d<g.length?(Ae=g[d],[4,this.renderNode(Ae)]):[3,22];case 20:Ee.sent(),Ee.label=21;case 21:return d++,[3,19];case 22:w=0,y=t.zeroOrAutoZIndexOrTransformedOrOpacity,Ee.label=23;case 23:return w<y.length?(Ae=y[w],[4,this.renderStack(Ae)]):[3,26];case 24:Ee.sent(),Ee.label=25;case 25:return w++,[3,23];case 26:O=0,H=t.positiveZIndex,Ee.label=27;case 27:return O<H.length?(Ae=H[O],[4,this.renderStack(Ae)]):[3,30];case 28:Ee.sent(),Ee.label=29;case 29:return O++,[3,27];case 30:return[2]}})})},e.prototype.mask=function(t){this.ctx.beginPath(),this.ctx.moveTo(0,0),this.ctx.lineTo(this.canvas.width,0),this.ctx.lineTo(this.canvas.width,this.canvas.height),this.ctx.lineTo(0,this.canvas.height),this.ctx.lineTo(0,0),this.formatPath(t.slice(0).reverse()),this.ctx.closePath()},e.prototype.path=function(t){this.ctx.beginPath(),this.formatPath(t),this.ctx.closePath()},e.prototype.formatPath=function(t){var n=this;t.forEach(function(r,s){var a=Zi(r)?r.start:r;s===0?n.ctx.moveTo(a.x,a.y):n.ctx.lineTo(a.x,a.y),Zi(r)&&n.ctx.bezierCurveTo(r.startControl.x,r.startControl.y,r.endControl.x,r.endControl.y,r.end.x,r.end.y)})},e.prototype.renderRepeat=function(t,n,r,s){this.path(t),this.ctx.fillStyle=n,this.ctx.translate(r,s),this.ctx.fill(),this.ctx.translate(-r,-s)},e.prototype.resizeImage=function(t,n,r){var s;if(t.width===n&&t.height===r)return t;var a=(s=this.canvas.ownerDocument)!==null&&s!==void 0?s:document,o=a.createElement("canvas");o.width=Math.max(1,n),o.height=Math.max(1,r);var u=o.getContext("2d");return u.drawImage(t,0,0,t.width,t.height,0,0,n,r),o},e.prototype.renderBackgroundImage=function(t){return re(this,void 0,void 0,function(){var n,r,s,a,o,u;return ge(this,function(l){switch(l.label){case 0:n=t.styles.backgroundImage.length-1,r=function(c){var d,g,w,ct,Gn,vr,$n,jn,wt,y,ct,Gn,vr,$n,jn,O,H,Ae,Ee,we,Ze,rt,pt,At,wt,_t,ct,fn,Rn,$n,jn,ir,Gn,vr,Hn,yr,_r,Zn,Qn,Lr,kr,Qr;return ge(this,function(Nr){switch(Nr.label){case 0:if(c.type!==0)return[3,5];d=void 0,g=c.url,Nr.label=1;case 1:return Nr.trys.push([1,3,,4]),[4,s.context.cache.match(g)];case 2:return d=Nr.sent(),[3,4];case 3:return Nr.sent(),s.context.logger.error("Error loading background-image "+g),[3,4];case 4:return d&&(w=iA(t,n,[d.width,d.height,d.width/d.height]),ct=w[0],Gn=w[1],vr=w[2],$n=w[3],jn=w[4],wt=s.ctx.createPattern(s.resizeImage(d,$n,jn),"repeat"),s.renderRepeat(ct,wt,Gn,vr)),[3,6];case 5:Ki(c)?(y=iA(t,n,[null,null,null]),ct=y[0],Gn=y[1],vr=y[2],$n=y[3],jn=y[4],O=Ni(c.angle,$n,jn),H=O[0],Ae=O[1],Ee=O[2],we=O[3],Ze=O[4],rt=document.createElement("canvas"),rt.width=$n,rt.height=jn,pt=rt.getContext("2d"),At=pt.createLinearGradient(Ae,we,Ee,Ze),bi(c.stops,H).forEach(function(oi){return At.addColorStop(oi.stop,li(oi.color))}),pt.fillStyle=At,pt.fillRect(0,0,$n,jn),$n>0&&jn>0&&(wt=s.ctx.createPattern(rt,"repeat"),s.renderRepeat(ct,wt,Gn,vr))):Gi(c)&&(_t=iA(t,n,[null,null,null]),ct=_t[0],fn=_t[1],Rn=_t[2],$n=_t[3],jn=_t[4],ir=c.position.length===0?[mi]:c.position,Gn=Kr(ir[0],$n),vr=Kr(ir[ir.length-1],jn),Hn=ji(c,Gn,vr,$n,jn),yr=Hn[0],_r=Hn[1],yr>0&&_r>0&&(Zn=s.ctx.createRadialGradient(fn+Gn,Rn+vr,0,fn+Gn,Rn+vr,yr),bi(c.stops,yr*2).forEach(function(oi){return Zn.addColorStop(oi.stop,li(oi.color))}),s.path(ct),s.ctx.fillStyle=Zn,yr!==_r?(Qn=t.bounds.left+.5*t.bounds.width,Lr=t.bounds.top+.5*t.bounds.height,kr=_r/yr,Qr=1/kr,s.ctx.save(),s.ctx.translate(Qn,Lr),s.ctx.transform(1,0,0,kr,0,0),s.ctx.translate(-Qn,-Lr),s.ctx.fillRect(fn,Qr*(Rn-Lr)+Lr,$n,jn*Qr),s.ctx.restore()):s.ctx.fill())),Nr.label=6;case 6:return n--,[2]}})},s=this,a=0,o=t.styles.backgroundImage.slice(0).reverse(),l.label=1;case 1:return a<o.length?(u=o[a],[5,r(u)]):[3,4];case 2:l.sent(),l.label=3;case 3:return a++,[3,1];case 4:return[2]}})})},e.prototype.renderSolidBorder=function(t,n,r){return re(this,void 0,void 0,function(){return ge(this,function(s){return this.path(ul(r,n)),this.ctx.fillStyle=li(t),this.ctx.fill(),[2]})})},e.prototype.renderDoubleBorder=function(t,n,r,s){return re(this,void 0,void 0,function(){var a,o;return ge(this,function(u){switch(u.label){case 0:return n<3?[4,this.renderSolidBorder(t,r,s)]:[3,2];case 1:return u.sent(),[2];case 2:return a=cl(s,r),this.path(a),this.ctx.fillStyle=li(t),this.ctx.fill(),o=Uu(s,r),this.path(o),this.ctx.fill(),[2]}})})},e.prototype.renderNodeBackgroundAndBorders=function(t){return re(this,void 0,void 0,function(){var n,r,s,a,o,u,l,c,d=this;return ge(this,function(g){switch(g.label){case 0:return this.applyEffects(t.getEffects(2)),n=t.container.styles,r=!Ei(n.backgroundColor)||n.backgroundImage.length,s=[{style:n.borderTopStyle,color:n.borderTopColor,width:n.borderTopWidth},{style:n.borderRightStyle,color:n.borderRightColor,width:n.borderRightWidth},{style:n.borderBottomStyle,color:n.borderBottomColor,width:n.borderBottomWidth},{style:n.borderLeftStyle,color:n.borderLeftColor,width:n.borderLeftWidth}],a=gl(Ys(n.backgroundClip,0),t.curves),r||n.boxShadow.length?(this.ctx.save(),this.path(a),this.ctx.clip(),Ei(n.backgroundColor)||(this.ctx.fillStyle=li(n.backgroundColor),this.ctx.fill()),[4,this.renderBackgroundImage(t.container)]):[3,2];case 1:g.sent(),this.ctx.restore(),n.boxShadow.slice(0).reverse().forEach(function(w){d.ctx.save();var y=js(t.curves),O=w.inset?0:Qu,H=al(y,-O+(w.inset?1:-1)*w.spread.number,(w.inset?1:-1)*w.spread.number,w.spread.number*(w.inset?-2:2),w.spread.number*(w.inset?-2:2));w.inset?(d.path(y),d.ctx.clip(),d.mask(H)):(d.mask(y),d.ctx.clip(),d.path(H)),d.ctx.shadowOffsetX=w.offsetX.number+O,d.ctx.shadowOffsetY=w.offsetY.number,d.ctx.shadowColor=li(w.color),d.ctx.shadowBlur=w.blur.number,d.ctx.fillStyle=w.inset?li(w.color):"rgba(0,0,0,1)",d.ctx.fill(),d.ctx.restore()}),g.label=2;case 2:o=0,u=0,l=s,g.label=3;case 3:return u<l.length?(c=l[u],c.style!==0&&!Ei(c.color)&&c.width>0?c.style!==2?[3,5]:[4,this.renderDashedDottedBorder(c.color,c.width,o,t.curves,2)]:[3,11]):[3,13];case 4:return g.sent(),[3,11];case 5:return c.style!==3?[3,7]:[4,this.renderDashedDottedBorder(c.color,c.width,o,t.curves,3)];case 6:return g.sent(),[3,11];case 7:return c.style!==4?[3,9]:[4,this.renderDoubleBorder(c.color,c.width,o,t.curves)];case 8:return g.sent(),[3,11];case 9:return[4,this.renderSolidBorder(c.color,o,t.curves)];case 10:g.sent(),g.label=11;case 11:o++,g.label=12;case 12:return u++,[3,3];case 13:return[2]}})})},e.prototype.renderDashedDottedBorder=function(t,n,r,s,a){return re(this,void 0,void 0,function(){var o,u,l,c,d,g,w,y,O,H,Ae,Ee,we,Ze,rt,pt,rt,pt;return ge(this,function(At){return this.ctx.save(),o=ku(s,r),u=ul(s,r),a===2&&(this.path(u),this.ctx.clip()),Zi(u[0])?(l=u[0].start.x,c=u[0].start.y):(l=u[0].x,c=u[0].y),Zi(u[1])?(d=u[1].end.x,g=u[1].end.y):(d=u[1].x,g=u[1].y),r===0||r===2?w=Math.abs(l-d):w=Math.abs(c-g),this.ctx.beginPath(),a===3?this.formatPath(o):this.formatPath(u.slice(0,2)),y=n<3?n*3:n*2,O=n<3?n*2:n,a===3&&(y=n,O=n),H=!0,w<=y*2?H=!1:w<=y*2+O?(Ae=w/(2*y+O),y*=Ae,O*=Ae):(Ee=Math.floor((w+O)/(y+O)),we=(w-Ee*y)/(Ee-1),Ze=(w-(Ee+1)*y)/Ee,O=Ze<=0||Math.abs(O-we)<Math.abs(O-Ze)?we:Ze),H&&(a===3?this.ctx.setLineDash([0,y+O]):this.ctx.setLineDash([y,O])),a===3?(this.ctx.lineCap="round",this.ctx.lineWidth=n):this.ctx.lineWidth=n*2+1.1,this.ctx.strokeStyle=li(t),this.ctx.stroke(),this.ctx.setLineDash([]),a===2&&(Zi(u[0])&&(rt=u[3],pt=u[0],this.ctx.beginPath(),this.formatPath([new rr(rt.end.x,rt.end.y),new rr(pt.start.x,pt.start.y)]),this.ctx.stroke()),Zi(u[1])&&(rt=u[1],pt=u[2],this.ctx.beginPath(),this.formatPath([new rr(rt.end.x,rt.end.y),new rr(pt.start.x,pt.start.y)]),this.ctx.stroke())),this.ctx.restore(),[2]})})},e.prototype.render=function(t){return re(this,void 0,void 0,function(){var n;return ge(this,function(r){switch(r.label){case 0:return this.options.backgroundColor&&(this.ctx.fillStyle=li(this.options.backgroundColor),this.ctx.fillRect(this.options.x,this.options.y,this.options.width,this.options.height)),n=Ru(t),[4,this.renderStack(n)];case 1:return r.sent(),this.applyEffects([]),[2,this.canvas]}})})},e}(dl),hl=function(i){return i instanceof Gs||i instanceof qi?!0:i instanceof Oi&&i.type!==qa&&i.type!==Ja},gl=function(i,e){switch(i){case 0:return js(e);case 2:return Iu(e);case 1:default:return Ca(e)}},pl=function(i){switch(i){case 1:return"center";case 2:return"right";case 0:default:return"left"}},Nu=["-apple-system","system-ui"],Hu=function(i){return/iPhone OS 15_(0|1)/.test(window.navigator.userAgent)?i.filter(function(e){return Nu.indexOf(e)===-1}):i},Ku=function(i){b(e,i);function e(t,n){var r=i.call(this,t,n)||this;return r.canvas=n.canvas?n.canvas:document.createElement("canvas"),r.ctx=r.canvas.getContext("2d"),r.options=n,r.canvas.width=Math.floor(n.width*n.scale),r.canvas.height=Math.floor(n.height*n.scale),r.canvas.style.width=n.width+"px",r.canvas.style.height=n.height+"px",r.ctx.scale(r.options.scale,r.options.scale),r.ctx.translate(-n.x,-n.y),r.context.logger.debug("EXPERIMENTAL ForeignObject renderer initialized ("+n.width+"x"+n.height+" at "+n.x+","+n.y+") with scale "+n.scale),r}return e.prototype.render=function(t){return re(this,void 0,void 0,function(){var n,r;return ge(this,function(s){switch(s.label){case 0:return n=za(this.options.width*this.options.scale,this.options.height*this.options.scale,this.options.scale,this.options.scale,t),[4,Gu(n)];case 1:return r=s.sent(),this.options.backgroundColor&&(this.ctx.fillStyle=li(this.options.backgroundColor),this.ctx.fillRect(0,0,this.options.width*this.options.scale,this.options.height*this.options.scale)),this.ctx.drawImage(r,-this.options.x*this.options.scale,-this.options.y*this.options.scale),[2,this.canvas]}})})},e}(dl),Gu=function(i){return new Promise(function(e,t){var n=new Image;n.onload=function(){e(n)},n.onerror=t,n.src="data:image/svg+xml;charset=utf-8,"+encodeURIComponent(new XMLSerializer().serializeToString(i))})},Vu=function(){function i(e){var t=e.id,n=e.enabled;this.id=t,this.enabled=n,this.start=Date.now()}return i.prototype.debug=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];this.enabled&&(typeof window!="undefined"&&window.console&&typeof console.debug=="function"?console.debug.apply(console,se([this.id,this.getTime()+"ms"],e)):this.info.apply(this,e))},i.prototype.getTime=function(){return Date.now()-this.start},i.prototype.info=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];this.enabled&&typeof window!="undefined"&&window.console&&typeof console.info=="function"&&console.info.apply(console,se([this.id,this.getTime()+"ms"],e))},i.prototype.warn=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];this.enabled&&(typeof window!="undefined"&&window.console&&typeof console.warn=="function"?console.warn.apply(console,se([this.id,this.getTime()+"ms"],e)):this.info.apply(this,e))},i.prototype.error=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];this.enabled&&(typeof window!="undefined"&&window.console&&typeof console.error=="function"?console.error.apply(console,se([this.id,this.getTime()+"ms"],e)):this.info.apply(this,e))},i.instances={},i}(),ml=function(){function i(e,t){var n;this.windowBounds=t,this.instanceName="#"+i.instanceCount++,this.logger=new Vu({id:this.instanceName,enabled:e.logging}),this.cache=(n=e.cache)!==null&&n!==void 0?n:new Su(this,e)}return i.instanceCount=1,i}(),oA=function(i,e){return e===void 0&&(e={}),$u(i,e)};typeof window!="undefined"&&JA.setContext(window);var $u=function(i,e){return re(void 0,void 0,void 0,function(){var t,n,r,s,a,o,u,l,c,d,g,w,y,O,H,Ae,Ee,we,Ze,rt,At,pt,At,wt,_t,ct,fn,Rn,$n,jn,ir,Gn,vr,Hn,yr,_r,Zn,Qn,Lr,kr;return ge(this,function(Qr){switch(Qr.label){case 0:if(!i||typeof i!="object")return[2,Promise.reject("Invalid element provided as first argument")];if(t=i.ownerDocument,!t)throw new Error("Element is not attached to a Document");if(n=t.defaultView,!n)throw new Error("Document is not attached to a Window");return r={allowTaint:(wt=e.allowTaint)!==null&&wt!==void 0?wt:!1,imageTimeout:(_t=e.imageTimeout)!==null&&_t!==void 0?_t:15e3,proxy:e.proxy,useCORS:(ct=e.useCORS)!==null&&ct!==void 0?ct:!1},s=P({logging:(fn=e.logging)!==null&&fn!==void 0?fn:!0,cache:e.cache},r),a={windowWidth:(Rn=e.windowWidth)!==null&&Rn!==void 0?Rn:n.innerWidth,windowHeight:($n=e.windowHeight)!==null&&$n!==void 0?$n:n.innerHeight,scrollX:(jn=e.scrollX)!==null&&jn!==void 0?jn:n.pageXOffset,scrollY:(ir=e.scrollY)!==null&&ir!==void 0?ir:n.pageYOffset},o=new U(a.scrollX,a.scrollY,a.windowWidth,a.windowHeight),u=new ml(s,o),l=(Gn=e.foreignObjectRendering)!==null&&Gn!==void 0?Gn:!1,c={allowTaint:(vr=e.allowTaint)!==null&&vr!==void 0?vr:!1,onclone:e.onclone,ignoreElements:e.ignoreElements,inlineImages:l,copyStyles:l},u.logger.debug("Starting document clone with size "+o.width+"x"+o.height+" scrolled to "+-o.left+","+-o.top),d=new zo(u,i,c),g=d.clonedReferenceElement,g?[4,d.toIFrame(t,o)]:[2,Promise.reject("Unable to find element in cloned iframe")];case 1:return w=Qr.sent(),y=wa(g)||vu(g)?fe(g.ownerDocument):f(u,g),O=y.width,H=y.height,Ae=y.left,Ee=y.top,we=Is(u,g,e.backgroundColor),Ze={canvas:e.canvas,backgroundColor:we,scale:(yr=(Hn=e.scale)!==null&&Hn!==void 0?Hn:n.devicePixelRatio)!==null&&yr!==void 0?yr:1,x:((_r=e.x)!==null&&_r!==void 0?_r:0)+Ae,y:((Zn=e.y)!==null&&Zn!==void 0?Zn:0)+Ee,width:(Qn=e.width)!==null&&Qn!==void 0?Qn:Math.ceil(O),height:(Lr=e.height)!==null&&Lr!==void 0?Lr:Math.ceil(H)},l?(u.logger.debug("Document cloned, using foreign object rendering"),At=new Ku(u,Ze),[4,At.render(g)]):[3,3];case 2:return rt=Qr.sent(),[3,5];case 3:return u.logger.debug("Document cloned, element located at "+Ae+","+Ee+" with size "+O+"x"+H+" using computed rendering"),u.logger.debug("Starting DOM parsing"),pt=Vs(u,g),we===pt.styles.backgroundColor&&(pt.styles.backgroundColor=Gr.TRANSPARENT),u.logger.debug("Starting renderer for element at "+Ze.x+","+Ze.y+" with size "+Ze.width+"x"+Ze.height),At=new Mu(u,Ze),[4,At.render(pt)];case 4:rt=Qr.sent(),Qr.label=5;case 5:return(!((kr=e.removeContainer)!==null&&kr!==void 0)||kr)&&(zo.destroy(w)||u.logger.error("Cannot detach cloned iframe as it is not in the DOM anymore")),u.logger.debug("Finished rendering"),[2,rt]}})})},Is=function(i,e,t){var n=e.ownerDocument,r=n.documentElement?Br(i,getComputedStyle(n.documentElement).backgroundColor):Gr.TRANSPARENT,s=n.body?Br(i,getComputedStyle(n.body).backgroundColor):Gr.TRANSPARENT,a=typeof t=="string"?Br(i,t):t===null?Gr.TRANSPARENT:4294967295;return e===n.documentElement?Ei(r)?Ei(s)?a:s:r:a};return oA})},53184:function(Cn,tt,b){"use strict";var P,re;function ge(se,U,f){var fe=function(ee,A){return se.js_beautify(ee,A)};return fe.js=se.js_beautify,fe.css=U.css_beautify,fe.html=f.html_beautify,fe.js_beautify=se.js_beautify,fe.css_beautify=U.css_beautify,fe.html_beautify=f.html_beautify,fe}P=[b(58553),b(87804),b(40998)],re=function(se,U,f){return ge(se,U,f)}.apply(tt,P),re!==void 0&&(Cn.exports=re)},87804:function(Cn,tt){var b,P;(function(){var re;(function(){"use strict";var se=[,,function(ee){function A(h){this.__parent=h,this.__character_count=0,this.__indent_count=-1,this.__alignment_count=0,this.__wrap_point_index=0,this.__wrap_point_character_count=0,this.__wrap_point_indent_count=-1,this.__wrap_point_alignment_count=0,this.__items=[]}A.prototype.clone_empty=function(){var h=new A(this.__parent);return h.set_indent(this.__indent_count,this.__alignment_count),h},A.prototype.item=function(h){return h<0?this.__items[this.__items.length+h]:this.__items[h]},A.prototype.has_match=function(h){for(var p=this.__items.length-1;p>=0;p--)if(this.__items[p].match(h))return!0;return!1},A.prototype.set_indent=function(h,p){this.is_empty()&&(this.__indent_count=h||0,this.__alignment_count=p||0,this.__character_count=this.__parent.get_indent_size(this.__indent_count,this.__alignment_count))},A.prototype._set_wrap_point=function(){this.__parent.wrap_line_length&&(this.__wrap_point_index=this.__items.length,this.__wrap_point_character_count=this.__character_count,this.__wrap_point_indent_count=this.__parent.next_line.__indent_count,this.__wrap_point_alignment_count=this.__parent.next_line.__alignment_count)},A.prototype._should_wrap=function(){return this.__wrap_point_index&&this.__character_count>this.__parent.wrap_line_length&&this.__wrap_point_character_count>this.__parent.next_line.__character_count},A.prototype._allow_wrap=function(){if(this._should_wrap()){this.__parent.add_new_line();var h=this.__parent.current_line;return h.set_indent(this.__wrap_point_indent_count,this.__wrap_point_alignment_count),h.__items=this.__items.slice(this.__wrap_point_index),this.__items=this.__items.slice(0,this.__wrap_point_index),h.__character_count+=this.__character_count-this.__wrap_point_character_count,this.__character_count=this.__wrap_point_character_count,h.__items[0]===" "&&(h.__items.splice(0,1),h.__character_count-=1),!0}return!1},A.prototype.is_empty=function(){return this.__items.length===0},A.prototype.last=function(){return this.is_empty()?null:this.__items[this.__items.length-1]},A.prototype.push=function(h){this.__items.push(h);var p=h.lastIndexOf(`
`);p!==-1?this.__character_count=h.length-p:this.__character_count+=h.length},A.prototype.pop=function(){var h=null;return this.is_empty()||(h=this.__items.pop(),this.__character_count-=h.length),h},A.prototype._remove_indent=function(){this.__indent_count>0&&(this.__indent_count-=1,this.__character_count-=this.__parent.indent_size)},A.prototype._remove_wrap_indent=function(){this.__wrap_point_indent_count>0&&(this.__wrap_point_indent_count-=1)},A.prototype.trim=function(){for(;this.last()===" ";)this.__items.pop(),this.__character_count-=1},A.prototype.toString=function(){var h="";return this.is_empty()?this.__parent.indent_empty_lines&&(h=this.__parent.get_indent_string(this.__indent_count)):(h=this.__parent.get_indent_string(this.__indent_count,this.__alignment_count),h+=this.__items.join("")),h};function E(h,p){this.__cache=[""],this.__indent_size=h.indent_size,this.__indent_string=h.indent_char,h.indent_with_tabs||(this.__indent_string=new Array(h.indent_size+1).join(h.indent_char)),p=p||"",h.indent_level>0&&(p=new Array(h.indent_level+1).join(this.__indent_string)),this.__base_string=p,this.__base_string_length=p.length}E.prototype.get_indent_size=function(h,p){var _=this.__base_string_length;return p=p||0,h<0&&(_=0),_+=h*this.__indent_size,_+=p,_},E.prototype.get_indent_string=function(h,p){var _=this.__base_string;return p=p||0,h<0&&(h=0,_=""),p+=h*this.__indent_size,this.__ensure_cache(p),_+=this.__cache[p],_},E.prototype.__ensure_cache=function(h){for(;h>=this.__cache.length;)this.__add_column()},E.prototype.__add_column=function(){var h=this.__cache.length,p=0,_="";this.__indent_size&&h>=this.__indent_size&&(p=Math.floor(h/this.__indent_size),h-=p*this.__indent_size,_=new Array(p+1).join(this.__indent_string)),h&&(_+=new Array(h+1).join(" ")),this.__cache.push(_)};function x(h,p){this.__indent_cache=new E(h,p),this.raw=!1,this._end_with_newline=h.end_with_newline,this.indent_size=h.indent_size,this.wrap_line_length=h.wrap_line_length,this.indent_empty_lines=h.indent_empty_lines,this.__lines=[],this.previous_line=null,this.current_line=null,this.next_line=new A(this),this.space_before_token=!1,this.non_breaking_space=!1,this.previous_token_wrapped=!1,this.__add_outputline()}x.prototype.__add_outputline=function(){this.previous_line=this.current_line,this.current_line=this.next_line.clone_empty(),this.__lines.push(this.current_line)},x.prototype.get_line_number=function(){return this.__lines.length},x.prototype.get_indent_string=function(h,p){return this.__indent_cache.get_indent_string(h,p)},x.prototype.get_indent_size=function(h,p){return this.__indent_cache.get_indent_size(h,p)},x.prototype.is_empty=function(){return!this.previous_line&&this.current_line.is_empty()},x.prototype.add_new_line=function(h){return this.is_empty()||!h&&this.just_added_newline()?!1:(this.raw||this.__add_outputline(),!0)},x.prototype.get_code=function(h){this.trim(!0);var p=this.current_line.pop();p&&(p[p.length-1]===`
`&&(p=p.replace(/\n+$/g,"")),this.current_line.push(p)),this._end_with_newline&&this.__add_outputline();var _=this.__lines.join(`
`);return h!==`
`&&(_=_.replace(/[\n]/g,h)),_},x.prototype.set_wrap_point=function(){this.current_line._set_wrap_point()},x.prototype.set_indent=function(h,p){return h=h||0,p=p||0,this.next_line.set_indent(h,p),this.__lines.length>1?(this.current_line.set_indent(h,p),!0):(this.current_line.set_indent(),!1)},x.prototype.add_raw_token=function(h){for(var p=0;p<h.newlines;p++)this.__add_outputline();this.current_line.set_indent(-1),this.current_line.push(h.whitespace_before),this.current_line.push(h.text),this.space_before_token=!1,this.non_breaking_space=!1,this.previous_token_wrapped=!1},x.prototype.add_token=function(h){this.__add_space_before_token(),this.current_line.push(h),this.space_before_token=!1,this.non_breaking_space=!1,this.previous_token_wrapped=this.current_line._allow_wrap()},x.prototype.__add_space_before_token=function(){this.space_before_token&&!this.just_added_newline()&&(this.non_breaking_space||this.set_wrap_point(),this.current_line.push(" "))},x.prototype.remove_indent=function(h){for(var p=this.__lines.length;h<p;)this.__lines[h]._remove_indent(),h++;this.current_line._remove_wrap_indent()},x.prototype.trim=function(h){for(h=h===void 0?!1:h,this.current_line.trim();h&&this.__lines.length>1&&this.current_line.is_empty();)this.__lines.pop(),this.current_line=this.__lines[this.__lines.length-1],this.current_line.trim();this.previous_line=this.__lines.length>1?this.__lines[this.__lines.length-2]:null},x.prototype.just_added_newline=function(){return this.current_line.is_empty()},x.prototype.just_added_blankline=function(){return this.is_empty()||this.current_line.is_empty()&&this.previous_line.is_empty()},x.prototype.ensure_empty_line_above=function(h,p){for(var _=this.__lines.length-2;_>=0;){var C=this.__lines[_];if(C.is_empty())break;if(C.item(0).indexOf(h)!==0&&C.item(-1)!==p){this.__lines.splice(_+1,0,new A(this)),this.previous_line=this.__lines[this.__lines.length-2];break}_--}},ee.exports.Output=x},,,,function(ee){function A(h,p){this.raw_options=E(h,p),this.disabled=this._get_boolean("disabled"),this.eol=this._get_characters("eol","auto"),this.end_with_newline=this._get_boolean("end_with_newline"),this.indent_size=this._get_number("indent_size",4),this.indent_char=this._get_characters("indent_char"," "),this.indent_level=this._get_number("indent_level"),this.preserve_newlines=this._get_boolean("preserve_newlines",!0),this.max_preserve_newlines=this._get_number("max_preserve_newlines",32786),this.preserve_newlines||(this.max_preserve_newlines=0),this.indent_with_tabs=this._get_boolean("indent_with_tabs",this.indent_char===" "),this.indent_with_tabs&&(this.indent_char=" ",this.indent_size===1&&(this.indent_size=4)),this.wrap_line_length=this._get_number("wrap_line_length",this._get_number("max_char")),this.indent_empty_lines=this._get_boolean("indent_empty_lines"),this.templating=this._get_selection_list("templating",["auto","none","angular","django","erb","handlebars","php","smarty"],["auto"])}A.prototype._get_array=function(h,p){var _=this.raw_options[h],C=p||[];return typeof _=="object"?_!==null&&typeof _.concat=="function"&&(C=_.concat()):typeof _=="string"&&(C=_.split(/[^a-zA-Z0-9_\/\-]+/)),C},A.prototype._get_boolean=function(h,p){var _=this.raw_options[h],C=_===void 0?!!p:!!_;return C},A.prototype._get_characters=function(h,p){var _=this.raw_options[h],C=p||"";return typeof _=="string"&&(C=_.replace(/\\r/,"\r").replace(/\\n/,`
`).replace(/\\t/," ")),C},A.prototype._get_number=function(h,p){var _=this.raw_options[h];p=parseInt(p,10),isNaN(p)&&(p=0);var C=parseInt(_,10);return isNaN(C)&&(C=p),C},A.prototype._get_selection=function(h,p,_){var C=this._get_selection_list(h,p,_);if(C.length!==1)throw new Error("Invalid Option Value: The option '"+h+`' can only be one of the following values:
`+p+`
You passed in: '`+this.raw_options[h]+"'");return C[0]},A.prototype._get_selection_list=function(h,p,_){if(!p||p.length===0)throw new Error("Selection list cannot be empty.");if(_=_||[p[0]],!this._is_valid_selection(_,p))throw new Error("Invalid Default Value!");var C=this._get_array(h,_);if(!this._is_valid_selection(C,p))throw new Error("Invalid Option Value: The option '"+h+`' can contain only the following values:
`+p+`
You passed in: '`+this.raw_options[h]+"'");return C},A.prototype._is_valid_selection=function(h,p){return h.length&&p.length&&!h.some(function(_){return p.indexOf(_)===-1})};function E(h,p){var _={};h=x(h);var C;for(C in h)C!==p&&(_[C]=h[C]);if(p&&h[p])for(C in h[p])_[C]=h[p][C];return _}function x(h){var p={},_;for(_ in h){var C=_.replace(/-/g,"_");p[C]=h[_]}return p}ee.exports.Options=A,ee.exports.normalizeOpts=x,ee.exports.mergeOpts=E},,function(ee){var A=RegExp.prototype.hasOwnProperty("sticky");function E(x){this.__input=x||"",this.__input_length=this.__input.length,this.__position=0}E.prototype.restart=function(){this.__position=0},E.prototype.back=function(){this.__position>0&&(this.__position-=1)},E.prototype.hasNext=function(){return this.__position<this.__input_length},E.prototype.next=function(){var x=null;return this.hasNext()&&(x=this.__input.charAt(this.__position),this.__position+=1),x},E.prototype.peek=function(x){var h=null;return x=x||0,x+=this.__position,x>=0&&x<this.__input_length&&(h=this.__input.charAt(x)),h},E.prototype.__match=function(x,h){x.lastIndex=h;var p=x.exec(this.__input);return p&&!(A&&x.sticky)&&p.index!==h&&(p=null),p},E.prototype.test=function(x,h){return h=h||0,h+=this.__position,h>=0&&h<this.__input_length?!!this.__match(x,h):!1},E.prototype.testChar=function(x,h){var p=this.peek(h);return x.lastIndex=0,p!==null&&x.test(p)},E.prototype.match=function(x){var h=this.__match(x,this.__position);return h?this.__position+=h[0].length:h=null,h},E.prototype.read=function(x,h,p){var _="",C;return x&&(C=this.match(x),C&&(_+=C[0])),h&&(C||!x)&&(_+=this.readUntil(h,p)),_},E.prototype.readUntil=function(x,h){var p="",_=this.__position;x.lastIndex=this.__position;var C=x.exec(this.__input);return C?(_=C.index,h&&(_+=C[0].length)):_=this.__input_length,p=this.__input.substring(this.__position,_),this.__position=_,p},E.prototype.readUntilAfter=function(x){return this.readUntil(x,!0)},E.prototype.get_regexp=function(x,h){var p=null,_="g";return h&&A&&(_="y"),typeof x=="string"&&x!==""?p=new RegExp(x,_):x&&(p=new RegExp(x.source,_)),p},E.prototype.get_literal_regexp=function(x){return RegExp(x.replace(/[-\/\\^$*+?.()|[\]{}]/g,"\\$&"))},E.prototype.peekUntilAfter=function(x){var h=this.__position,p=this.readUntilAfter(x);return this.__position=h,p},E.prototype.lookBack=function(x){var h=this.__position-1;return h>=x.length&&this.__input.substring(h-x.length,h).toLowerCase()===x},ee.exports.InputScanner=E},,,,,function(ee){function A(E,x){E=typeof E=="string"?E:E.source,x=typeof x=="string"?x:x.source,this.__directives_block_pattern=new RegExp(E+/ beautify( \w+[:]\w+)+ /.source+x,"g"),this.__directive_pattern=/ (\w+)[:](\w+)/g,this.__directives_end_ignore_pattern=new RegExp(E+/\sbeautify\signore:end\s/.source+x,"g")}A.prototype.get_directives=function(E){if(!E.match(this.__directives_block_pattern))return null;var x={};this.__directive_pattern.lastIndex=0;for(var h=this.__directive_pattern.exec(E);h;)x[h[1]]=h[2],h=this.__directive_pattern.exec(E);return x},A.prototype.readIgnored=function(E){return E.readUntilAfter(this.__directives_end_ignore_pattern)},ee.exports.Directives=A},,function(ee,A,E){var x=E(16).Beautifier,h=E(17).Options;function p(_,C){var F=new x(_,C);return F.beautify()}ee.exports=p,ee.exports.defaultOptions=function(){return new h}},function(ee,A,E){var x=E(17).Options,h=E(2).Output,p=E(8).InputScanner,_=E(13).Directives,C=new _(/\/\*/,/\*\//),F=/\r\n|[\r\n]/,R=/\r\n|[\r\n]/g,K=/\s/,B=/(?:\s|\n)+/g,D=/\/\*(?:[\s\S]*?)((?:\*\/)|$)/g,I=/\/\/(?:[^\n\r\u2028\u2029]*)/g;function S(q,ae){this._source_text=q||"",this._options=new x(ae),this._ch=null,this._input=null,this.NESTED_AT_RULE={page:!0,"font-face":!0,keyframes:!0,media:!0,supports:!0,document:!0},this.CONDITIONAL_GROUP_RULE={media:!0,supports:!0,document:!0},this.NON_SEMICOLON_NEWLINE_PROPERTY=["grid-template-areas","grid-template"]}S.prototype.eatString=function(q){var ae="";for(this._ch=this._input.next();this._ch;){if(ae+=this._ch,this._ch==="\\")ae+=this._input.next();else if(q.indexOf(this._ch)!==-1||this._ch===`
`)break;this._ch=this._input.next()}return ae},S.prototype.eatWhitespace=function(q){for(var ae=K.test(this._input.peek()),j=0;K.test(this._input.peek());)this._ch=this._input.next(),q&&this._ch===`
`&&(j===0||j<this._options.max_preserve_newlines)&&(j++,this._output.add_new_line(!0));return ae},S.prototype.foundNestedPseudoClass=function(){for(var q=0,ae=1,j=this._input.peek(ae);j;){if(j==="{")return!0;if(j==="(")q+=1;else if(j===")"){if(q===0)return!1;q-=1}else if(j===";"||j==="}")return!1;ae++,j=this._input.peek(ae)}return!1},S.prototype.print_string=function(q){this._output.set_indent(this._indentLevel),this._output.non_breaking_space=!0,this._output.add_token(q)},S.prototype.preserveSingleSpace=function(q){q&&(this._output.space_before_token=!0)},S.prototype.indent=function(){this._indentLevel++},S.prototype.outdent=function(){this._indentLevel>0&&this._indentLevel--},S.prototype.beautify=function(){if(this._options.disabled)return this._source_text;var q=this._source_text,ae=this._options.eol;ae==="auto"&&(ae=`
`,q&&F.test(q||"")&&(ae=q.match(F)[0])),q=q.replace(R,`
`);var j=q.match(/^[\t ]*/)[0];this._output=new h(this._options,j),this._input=new p(q),this._indentLevel=0,this._nestedLevel=0,this._ch=null;for(var Y=0,ie=!1,de=!1,pe=!1,W=!1,M=!1,X=this._ch,G=!1,ne,Z,m;ne=this._input.read(B),Z=ne!=="",m=X,this._ch=this._input.next(),this._ch==="\\"&&this._input.hasNext()&&(this._ch+=this._input.next()),X=this._ch,this._ch;)if(this._ch==="/"&&this._input.peek()==="*"){this._output.add_new_line(),this._input.back();var v=this._input.read(D),Q=C.get_directives(v);Q&&Q.ignore==="start"&&(v+=C.readIgnored(this._input)),this.print_string(v),this.eatWhitespace(!0),this._output.add_new_line()}else if(this._ch==="/"&&this._input.peek()==="/")this._output.space_before_token=!0,this._input.back(),this.print_string(this._input.read(I)),this.eatWhitespace(!0);else if(this._ch==="$"){this.preserveSingleSpace(Z),this.print_string(this._ch);var he=this._input.peekUntilAfter(/[: ,;{}()[\]\/='"]/g);he.match(/[ :]$/)&&(he=this.eatString(": ").replace(/\s+$/,""),this.print_string(he),this._output.space_before_token=!0),Y===0&&he.indexOf(":")!==-1&&(de=!0,this.indent())}else if(this._ch==="@")if(this.preserveSingleSpace(Z),this._input.peek()==="{")this.print_string(this._ch+this.eatString("}"));else{this.print_string(this._ch);var Ue=this._input.peekUntilAfter(/[: ,;{}()[\]\/='"]/g);Ue.match(/[ :]$/)&&(Ue=this.eatString(": ").replace(/\s+$/,""),this.print_string(Ue),this._output.space_before_token=!0),Y===0&&Ue.indexOf(":")!==-1?(de=!0,this.indent()):Ue in this.NESTED_AT_RULE?(this._nestedLevel+=1,Ue in this.CONDITIONAL_GROUP_RULE&&(pe=!0)):Y===0&&!de&&(W=!0)}else if(this._ch==="#"&&this._input.peek()==="{")this.preserveSingleSpace(Z),this.print_string(this._ch+this.eatString("}"));else if(this._ch==="{")de&&(de=!1,this.outdent()),W=!1,pe?(pe=!1,ie=this._indentLevel>=this._nestedLevel):ie=this._indentLevel>=this._nestedLevel-1,this._options.newline_between_rules&&ie&&this._output.previous_line&&this._output.previous_line.item(-1)!=="{"&&this._output.ensure_empty_line_above("/",","),this._output.space_before_token=!0,this._options.brace_style==="expand"?(this._output.add_new_line(),this.print_string(this._ch),this.indent(),this._output.set_indent(this._indentLevel)):(m==="("?this._output.space_before_token=!1:m!==","&&this.indent(),this.print_string(this._ch)),this.eatWhitespace(!0),this._output.add_new_line();else if(this._ch==="}")this.outdent(),this._output.add_new_line(),m==="{"&&this._output.trim(!0),de&&(this.outdent(),de=!1),this.print_string(this._ch),ie=!1,this._nestedLevel&&this._nestedLevel--,this.eatWhitespace(!0),this._output.add_new_line(),this._options.newline_between_rules&&!this._output.just_added_blankline()&&this._input.peek()!=="}"&&this._output.add_new_line(!0),this._input.peek()===")"&&(this._output.trim(!0),this._options.brace_style==="expand"&&this._output.add_new_line(!0));else if(this._ch===":"){for(var Oe=0;Oe<this.NON_SEMICOLON_NEWLINE_PROPERTY.length;Oe++)if(this._input.lookBack(this.NON_SEMICOLON_NEWLINE_PROPERTY[Oe])){G=!0;break}(ie||pe)&&!(this._input.lookBack("&")||this.foundNestedPseudoClass())&&!this._input.lookBack("(")&&!W&&Y===0?(this.print_string(":"),de||(de=!0,this._output.space_before_token=!0,this.eatWhitespace(!0),this.indent())):(this._input.lookBack(" ")&&(this._output.space_before_token=!0),this._input.peek()===":"?(this._ch=this._input.next(),this.print_string("::")):this.print_string(":"))}else if(this._ch==='"'||this._ch==="'"){var ft=m==='"'||m==="'";this.preserveSingleSpace(ft||Z),this.print_string(this._ch+this.eatString(this._ch)),this.eatWhitespace(!0)}else if(this._ch===";")G=!1,Y===0?(de&&(this.outdent(),de=!1),W=!1,this.print_string(this._ch),this.eatWhitespace(!0),this._input.peek()!=="/"&&this._output.add_new_line()):(this.print_string(this._ch),this.eatWhitespace(!0),this._output.space_before_token=!0);else if(this._ch==="(")if(this._input.lookBack("url"))this.print_string(this._ch),this.eatWhitespace(),Y++,this.indent(),this._ch=this._input.next(),this._ch===")"||this._ch==='"'||this._ch==="'"?this._input.back():this._ch&&(this.print_string(this._ch+this.eatString(")")),Y&&(Y--,this.outdent()));else{var Et=!1;this._input.lookBack("with")&&(Et=!0),this.preserveSingleSpace(Z||Et),this.print_string(this._ch),de&&m==="$"&&this._options.selector_separator_newline?(this._output.add_new_line(),M=!0):(this.eatWhitespace(),Y++,this.indent())}else if(this._ch===")")Y&&(Y--,this.outdent()),M&&this._input.peek()===";"&&this._options.selector_separator_newline&&(M=!1,this.outdent(),this._output.add_new_line()),this.print_string(this._ch);else if(this._ch===",")this.print_string(this._ch),this.eatWhitespace(!0),this._options.selector_separator_newline&&(!de||M)&&Y===0&&!W?this._output.add_new_line():this._output.space_before_token=!0;else if((this._ch===">"||this._ch==="+"||this._ch==="~")&&!de&&Y===0)this._options.space_around_combinator?(this._output.space_before_token=!0,this.print_string(this._ch),this._output.space_before_token=!0):(this.print_string(this._ch),this.eatWhitespace(),this._ch&&K.test(this._ch)&&(this._ch=""));else if(this._ch==="]")this.print_string(this._ch);else if(this._ch==="[")this.preserveSingleSpace(Z),this.print_string(this._ch);else if(this._ch==="=")this.eatWhitespace(),this.print_string("="),K.test(this._ch)&&(this._ch="");else if(this._ch==="!"&&!this._input.lookBack("\\"))this._output.space_before_token=!0,this.print_string(this._ch);else{var Ft=m==='"'||m==="'";this.preserveSingleSpace(Ft||Z),this.print_string(this._ch),!this._output.just_added_newline()&&this._input.peek()===`
`&&G&&this._output.add_new_line()}var Ut=this._output.get_code(ae);return Ut},ee.exports.Beautifier=S},function(ee,A,E){var x=E(6).Options;function h(p){x.call(this,p,"css"),this.selector_separator_newline=this._get_boolean("selector_separator_newline",!0),this.newline_between_rules=this._get_boolean("newline_between_rules",!0);var _=this._get_boolean("space_around_selector_separator");this.space_around_combinator=this._get_boolean("space_around_combinator")||_;var C=this._get_selection_list("brace_style",["collapse","expand","end-expand","none","preserve-inline"]);this.brace_style="collapse";for(var F=0;F<C.length;F++)C[F]!=="expand"?this.brace_style="collapse":this.brace_style=C[F]}h.prototype=new x,ee.exports.Options=h}],U={};function f(ee){var A=U[ee];if(A!==void 0)return A.exports;var E=U[ee]={exports:{}};return se[ee](E,E.exports,f),E.exports}var fe=f(15);re=fe})();var ge=re;b=[],P=function(){return{css_beautify:ge}}.apply(tt,b),P!==void 0&&(Cn.exports=P)})()},40998:function(Cn,tt,b){var P,re;(function(){var ge;(function(){"use strict";var fe=[,,function(x){function h(C){this.__parent=C,this.__character_count=0,this.__indent_count=-1,this.__alignment_count=0,this.__wrap_point_index=0,this.__wrap_point_character_count=0,this.__wrap_point_indent_count=-1,this.__wrap_point_alignment_count=0,this.__items=[]}h.prototype.clone_empty=function(){var C=new h(this.__parent);return C.set_indent(this.__indent_count,this.__alignment_count),C},h.prototype.item=function(C){return C<0?this.__items[this.__items.length+C]:this.__items[C]},h.prototype.has_match=function(C){for(var F=this.__items.length-1;F>=0;F--)if(this.__items[F].match(C))return!0;return!1},h.prototype.set_indent=function(C,F){this.is_empty()&&(this.__indent_count=C||0,this.__alignment_count=F||0,this.__character_count=this.__parent.get_indent_size(this.__indent_count,this.__alignment_count))},h.prototype._set_wrap_point=function(){this.__parent.wrap_line_length&&(this.__wrap_point_index=this.__items.length,this.__wrap_point_character_count=this.__character_count,this.__wrap_point_indent_count=this.__parent.next_line.__indent_count,this.__wrap_point_alignment_count=this.__parent.next_line.__alignment_count)},h.prototype._should_wrap=function(){return this.__wrap_point_index&&this.__character_count>this.__parent.wrap_line_length&&this.__wrap_point_character_count>this.__parent.next_line.__character_count},h.prototype._allow_wrap=function(){if(this._should_wrap()){this.__parent.add_new_line();var C=this.__parent.current_line;return C.set_indent(this.__wrap_point_indent_count,this.__wrap_point_alignment_count),C.__items=this.__items.slice(this.__wrap_point_index),this.__items=this.__items.slice(0,this.__wrap_point_index),C.__character_count+=this.__character_count-this.__wrap_point_character_count,this.__character_count=this.__wrap_point_character_count,C.__items[0]===" "&&(C.__items.splice(0,1),C.__character_count-=1),!0}return!1},h.prototype.is_empty=function(){return this.__items.length===0},h.prototype.last=function(){return this.is_empty()?null:this.__items[this.__items.length-1]},h.prototype.push=function(C){this.__items.push(C);var F=C.lastIndexOf(`
`);F!==-1?this.__character_count=C.length-F:this.__character_count+=C.length},h.prototype.pop=function(){var C=null;return this.is_empty()||(C=this.__items.pop(),this.__character_count-=C.length),C},h.prototype._remove_indent=function(){this.__indent_count>0&&(this.__indent_count-=1,this.__character_count-=this.__parent.indent_size)},h.prototype._remove_wrap_indent=function(){this.__wrap_point_indent_count>0&&(this.__wrap_point_indent_count-=1)},h.prototype.trim=function(){for(;this.last()===" ";)this.__items.pop(),this.__character_count-=1},h.prototype.toString=function(){var C="";return this.is_empty()?this.__parent.indent_empty_lines&&(C=this.__parent.get_indent_string(this.__indent_count)):(C=this.__parent.get_indent_string(this.__indent_count,this.__alignment_count),C+=this.__items.join("")),C};function p(C,F){this.__cache=[""],this.__indent_size=C.indent_size,this.__indent_string=C.indent_char,C.indent_with_tabs||(this.__indent_string=new Array(C.indent_size+1).join(C.indent_char)),F=F||"",C.indent_level>0&&(F=new Array(C.indent_level+1).join(this.__indent_string)),this.__base_string=F,this.__base_string_length=F.length}p.prototype.get_indent_size=function(C,F){var R=this.__base_string_length;return F=F||0,C<0&&(R=0),R+=C*this.__indent_size,R+=F,R},p.prototype.get_indent_string=function(C,F){var R=this.__base_string;return F=F||0,C<0&&(C=0,R=""),F+=C*this.__indent_size,this.__ensure_cache(F),R+=this.__cache[F],R},p.prototype.__ensure_cache=function(C){for(;C>=this.__cache.length;)this.__add_column()},p.prototype.__add_column=function(){var C=this.__cache.length,F=0,R="";this.__indent_size&&C>=this.__indent_size&&(F=Math.floor(C/this.__indent_size),C-=F*this.__indent_size,R=new Array(F+1).join(this.__indent_string)),C&&(R+=new Array(C+1).join(" ")),this.__cache.push(R)};function _(C,F){this.__indent_cache=new p(C,F),this.raw=!1,this._end_with_newline=C.end_with_newline,this.indent_size=C.indent_size,this.wrap_line_length=C.wrap_line_length,this.indent_empty_lines=C.indent_empty_lines,this.__lines=[],this.previous_line=null,this.current_line=null,this.next_line=new h(this),this.space_before_token=!1,this.non_breaking_space=!1,this.previous_token_wrapped=!1,this.__add_outputline()}_.prototype.__add_outputline=function(){this.previous_line=this.current_line,this.current_line=this.next_line.clone_empty(),this.__lines.push(this.current_line)},_.prototype.get_line_number=function(){return this.__lines.length},_.prototype.get_indent_string=function(C,F){return this.__indent_cache.get_indent_string(C,F)},_.prototype.get_indent_size=function(C,F){return this.__indent_cache.get_indent_size(C,F)},_.prototype.is_empty=function(){return!this.previous_line&&this.current_line.is_empty()},_.prototype.add_new_line=function(C){return this.is_empty()||!C&&this.just_added_newline()?!1:(this.raw||this.__add_outputline(),!0)},_.prototype.get_code=function(C){this.trim(!0);var F=this.current_line.pop();F&&(F[F.length-1]===`
`&&(F=F.replace(/\n+$/g,"")),this.current_line.push(F)),this._end_with_newline&&this.__add_outputline();var R=this.__lines.join(`
`);return C!==`
`&&(R=R.replace(/[\n]/g,C)),R},_.prototype.set_wrap_point=function(){this.current_line._set_wrap_point()},_.prototype.set_indent=function(C,F){return C=C||0,F=F||0,this.next_line.set_indent(C,F),this.__lines.length>1?(this.current_line.set_indent(C,F),!0):(this.current_line.set_indent(),!1)},_.prototype.add_raw_token=function(C){for(var F=0;F<C.newlines;F++)this.__add_outputline();this.current_line.set_indent(-1),this.current_line.push(C.whitespace_before),this.current_line.push(C.text),this.space_before_token=!1,this.non_breaking_space=!1,this.previous_token_wrapped=!1},_.prototype.add_token=function(C){this.__add_space_before_token(),this.current_line.push(C),this.space_before_token=!1,this.non_breaking_space=!1,this.previous_token_wrapped=this.current_line._allow_wrap()},_.prototype.__add_space_before_token=function(){this.space_before_token&&!this.just_added_newline()&&(this.non_breaking_space||this.set_wrap_point(),this.current_line.push(" "))},_.prototype.remove_indent=function(C){for(var F=this.__lines.length;C<F;)this.__lines[C]._remove_indent(),C++;this.current_line._remove_wrap_indent()},_.prototype.trim=function(C){for(C=C===void 0?!1:C,this.current_line.trim();C&&this.__lines.length>1&&this.current_line.is_empty();)this.__lines.pop(),this.current_line=this.__lines[this.__lines.length-1],this.current_line.trim();this.previous_line=this.__lines.length>1?this.__lines[this.__lines.length-2]:null},_.prototype.just_added_newline=function(){return this.current_line.is_empty()},_.prototype.just_added_blankline=function(){return this.is_empty()||this.current_line.is_empty()&&this.previous_line.is_empty()},_.prototype.ensure_empty_line_above=function(C,F){for(var R=this.__lines.length-2;R>=0;){var K=this.__lines[R];if(K.is_empty())break;if(K.item(0).indexOf(C)!==0&&K.item(-1)!==F){this.__lines.splice(R+1,0,new h(this)),this.previous_line=this.__lines[this.__lines.length-2];break}R--}},x.exports.Output=_},function(x){function h(p,_,C,F){this.type=p,this.text=_,this.comments_before=null,this.newlines=C||0,this.whitespace_before=F||"",this.parent=null,this.next=null,this.previous=null,this.opened=null,this.closed=null,this.directives=null}x.exports.Token=h},,,function(x){function h(C,F){this.raw_options=p(C,F),this.disabled=this._get_boolean("disabled"),this.eol=this._get_characters("eol","auto"),this.end_with_newline=this._get_boolean("end_with_newline"),this.indent_size=this._get_number("indent_size",4),this.indent_char=this._get_characters("indent_char"," "),this.indent_level=this._get_number("indent_level"),this.preserve_newlines=this._get_boolean("preserve_newlines",!0),this.max_preserve_newlines=this._get_number("max_preserve_newlines",32786),this.preserve_newlines||(this.max_preserve_newlines=0),this.indent_with_tabs=this._get_boolean("indent_with_tabs",this.indent_char===" "),this.indent_with_tabs&&(this.indent_char=" ",this.indent_size===1&&(this.indent_size=4)),this.wrap_line_length=this._get_number("wrap_line_length",this._get_number("max_char")),this.indent_empty_lines=this._get_boolean("indent_empty_lines"),this.templating=this._get_selection_list("templating",["auto","none","angular","django","erb","handlebars","php","smarty"],["auto"])}h.prototype._get_array=function(C,F){var R=this.raw_options[C],K=F||[];return typeof R=="object"?R!==null&&typeof R.concat=="function"&&(K=R.concat()):typeof R=="string"&&(K=R.split(/[^a-zA-Z0-9_\/\-]+/)),K},h.prototype._get_boolean=function(C,F){var R=this.raw_options[C],K=R===void 0?!!F:!!R;return K},h.prototype._get_characters=function(C,F){var R=this.raw_options[C],K=F||"";return typeof R=="string"&&(K=R.replace(/\\r/,"\r").replace(/\\n/,`
`).replace(/\\t/," ")),K},h.prototype._get_number=function(C,F){var R=this.raw_options[C];F=parseInt(F,10),isNaN(F)&&(F=0);var K=parseInt(R,10);return isNaN(K)&&(K=F),K},h.prototype._get_selection=function(C,F,R){var K=this._get_selection_list(C,F,R);if(K.length!==1)throw new Error("Invalid Option Value: The option '"+C+`' can only be one of the following values:
`+F+`
You passed in: '`+this.raw_options[C]+"'");return K[0]},h.prototype._get_selection_list=function(C,F,R){if(!F||F.length===0)throw new Error("Selection list cannot be empty.");if(R=R||[F[0]],!this._is_valid_selection(R,F))throw new Error("Invalid Default Value!");var K=this._get_array(C,R);if(!this._is_valid_selection(K,F))throw new Error("Invalid Option Value: The option '"+C+`' can contain only the following values:
`+F+`
You passed in: '`+this.raw_options[C]+"'");return K},h.prototype._is_valid_selection=function(C,F){return C.length&&F.length&&!C.some(function(R){return F.indexOf(R)===-1})};function p(C,F){var R={};C=_(C);var K;for(K in C)K!==F&&(R[K]=C[K]);if(F&&C[F])for(K in C[F])R[K]=C[F][K];return R}function _(C){var F={},R;for(R in C){var K=R.replace(/-/g,"_");F[K]=C[R]}return F}x.exports.Options=h,x.exports.normalizeOpts=_,x.exports.mergeOpts=p},,function(x){var h=RegExp.prototype.hasOwnProperty("sticky");function p(_){this.__input=_||"",this.__input_length=this.__input.length,this.__position=0}p.prototype.restart=function(){this.__position=0},p.prototype.back=function(){this.__position>0&&(this.__position-=1)},p.prototype.hasNext=function(){return this.__position<this.__input_length},p.prototype.next=function(){var _=null;return this.hasNext()&&(_=this.__input.charAt(this.__position),this.__position+=1),_},p.prototype.peek=function(_){var C=null;return _=_||0,_+=this.__position,_>=0&&_<this.__input_length&&(C=this.__input.charAt(_)),C},p.prototype.__match=function(_,C){_.lastIndex=C;var F=_.exec(this.__input);return F&&!(h&&_.sticky)&&F.index!==C&&(F=null),F},p.prototype.test=function(_,C){return C=C||0,C+=this.__position,C>=0&&C<this.__input_length?!!this.__match(_,C):!1},p.prototype.testChar=function(_,C){var F=this.peek(C);return _.lastIndex=0,F!==null&&_.test(F)},p.prototype.match=function(_){var C=this.__match(_,this.__position);return C?this.__position+=C[0].length:C=null,C},p.prototype.read=function(_,C,F){var R="",K;return _&&(K=this.match(_),K&&(R+=K[0])),C&&(K||!_)&&(R+=this.readUntil(C,F)),R},p.prototype.readUntil=function(_,C){var F="",R=this.__position;_.lastIndex=this.__position;var K=_.exec(this.__input);return K?(R=K.index,C&&(R+=K[0].length)):R=this.__input_length,F=this.__input.substring(this.__position,R),this.__position=R,F},p.prototype.readUntilAfter=function(_){return this.readUntil(_,!0)},p.prototype.get_regexp=function(_,C){var F=null,R="g";return C&&h&&(R="y"),typeof _=="string"&&_!==""?F=new RegExp(_,R):_&&(F=new RegExp(_.source,R)),F},p.prototype.get_literal_regexp=function(_){return RegExp(_.replace(/[-\/\\^$*+?.()|[\]{}]/g,"\\$&"))},p.prototype.peekUntilAfter=function(_){var C=this.__position,F=this.readUntilAfter(_);return this.__position=C,F},p.prototype.lookBack=function(_){var C=this.__position-1;return C>=_.length&&this.__input.substring(C-_.length,C).toLowerCase()===_},x.exports.InputScanner=p},function(x,h,p){var _=p(8).InputScanner,C=p(3).Token,F=p(10).TokenStream,R=p(11).WhitespacePattern,K={START:"TK_START",RAW:"TK_RAW",EOF:"TK_EOF"},B=function(D,I){this._input=new _(D),this._options=I||{},this.__tokens=null,this._patterns={},this._patterns.whitespace=new R(this._input)};B.prototype.tokenize=function(){this._input.restart(),this.__tokens=new F,this._reset();for(var D,I=new C(K.START,""),S=null,q=[],ae=new F;I.type!==K.EOF;){for(D=this._get_next_token(I,S);this._is_comment(D);)ae.add(D),D=this._get_next_token(I,S);ae.isEmpty()||(D.comments_before=ae,ae=new F),D.parent=S,this._is_opening(D)?(q.push(S),S=D):S&&this._is_closing(D,S)&&(D.opened=S,S.closed=D,S=q.pop(),D.parent=S),D.previous=I,I.next=D,this.__tokens.add(D),I=D}return this.__tokens},B.prototype._is_first_token=function(){return this.__tokens.isEmpty()},B.prototype._reset=function(){},B.prototype._get_next_token=function(D,I){this._readWhitespace();var S=this._input.read(/.+/g);return S?this._create_token(K.RAW,S):this._create_token(K.EOF,"")},B.prototype._is_comment=function(D){return!1},B.prototype._is_opening=function(D){return!1},B.prototype._is_closing=function(D,I){return!1},B.prototype._create_token=function(D,I){var S=new C(D,I,this._patterns.whitespace.newline_count,this._patterns.whitespace.whitespace_before_token);return S},B.prototype._readWhitespace=function(){return this._patterns.whitespace.read()},x.exports.Tokenizer=B,x.exports.TOKEN=K},function(x){function h(p){this.__tokens=[],this.__tokens_length=this.__tokens.length,this.__position=0,this.__parent_token=p}h.prototype.restart=function(){this.__position=0},h.prototype.isEmpty=function(){return this.__tokens_length===0},h.prototype.hasNext=function(){return this.__position<this.__tokens_length},h.prototype.next=function(){var p=null;return this.hasNext()&&(p=this.__tokens[this.__position],this.__position+=1),p},h.prototype.peek=function(p){var _=null;return p=p||0,p+=this.__position,p>=0&&p<this.__tokens_length&&(_=this.__tokens[p]),_},h.prototype.add=function(p){this.__parent_token&&(p.parent=this.__parent_token),this.__tokens.push(p),this.__tokens_length+=1},x.exports.TokenStream=h},function(x,h,p){var _=p(12).Pattern;function C(F,R){_.call(this,F,R),R?this._line_regexp=this._input.get_regexp(R._line_regexp):this.__set_whitespace_patterns("",""),this.newline_count=0,this.whitespace_before_token=""}C.prototype=new _,C.prototype.__set_whitespace_patterns=function(F,R){F+="\\t ",R+="\\n\\r",this._match_pattern=this._input.get_regexp("["+F+R+"]+",!0),this._newline_regexp=this._input.get_regexp("\\r\\n|["+R+"]")},C.prototype.read=function(){this.newline_count=0,this.whitespace_before_token="";var F=this._input.read(this._match_pattern);if(F===" ")this.whitespace_before_token=" ";else if(F){var R=this.__split(this._newline_regexp,F);this.newline_count=R.length-1,this.whitespace_before_token=R[this.newline_count]}return F},C.prototype.matching=function(F,R){var K=this._create();return K.__set_whitespace_patterns(F,R),K._update(),K},C.prototype._create=function(){return new C(this._input,this)},C.prototype.__split=function(F,R){F.lastIndex=0;for(var K=0,B=[],D=F.exec(R);D;)B.push(R.substring(K,D.index)),K=D.index+D[0].length,D=F.exec(R);return K<R.length?B.push(R.substring(K,R.length)):B.push(""),B},x.exports.WhitespacePattern=C},function(x){function h(p,_){this._input=p,this._starting_pattern=null,this._match_pattern=null,this._until_pattern=null,this._until_after=!1,_&&(this._starting_pattern=this._input.get_regexp(_._starting_pattern,!0),this._match_pattern=this._input.get_regexp(_._match_pattern,!0),this._until_pattern=this._input.get_regexp(_._until_pattern),this._until_after=_._until_after)}h.prototype.read=function(){var p=this._input.read(this._starting_pattern);return(!this._starting_pattern||p)&&(p+=this._input.read(this._match_pattern,this._until_pattern,this._until_after)),p},h.prototype.read_match=function(){return this._input.match(this._match_pattern)},h.prototype.until_after=function(p){var _=this._create();return _._until_after=!0,_._until_pattern=this._input.get_regexp(p),_._update(),_},h.prototype.until=function(p){var _=this._create();return _._until_after=!1,_._until_pattern=this._input.get_regexp(p),_._update(),_},h.prototype.starting_with=function(p){var _=this._create();return _._starting_pattern=this._input.get_regexp(p,!0),_._update(),_},h.prototype.matching=function(p){var _=this._create();return _._match_pattern=this._input.get_regexp(p,!0),_._update(),_},h.prototype._create=function(){return new h(this._input,this)},h.prototype._update=function(){},x.exports.Pattern=h},function(x){function h(p,_){p=typeof p=="string"?p:p.source,_=typeof _=="string"?_:_.source,this.__directives_block_pattern=new RegExp(p+/ beautify( \w+[:]\w+)+ /.source+_,"g"),this.__directive_pattern=/ (\w+)[:](\w+)/g,this.__directives_end_ignore_pattern=new RegExp(p+/\sbeautify\signore:end\s/.source+_,"g")}h.prototype.get_directives=function(p){if(!p.match(this.__directives_block_pattern))return null;var _={};this.__directive_pattern.lastIndex=0;for(var C=this.__directive_pattern.exec(p);C;)_[C[1]]=C[2],C=this.__directive_pattern.exec(p);return _},h.prototype.readIgnored=function(p){return p.readUntilAfter(this.__directives_end_ignore_pattern)},x.exports.Directives=h},function(x,h,p){var _=p(12).Pattern,C={django:!1,erb:!1,handlebars:!1,php:!1,smarty:!1,angular:!1};function F(R,K){_.call(this,R,K),this.__template_pattern=null,this._disabled=Object.assign({},C),this._excluded=Object.assign({},C),K&&(this.__template_pattern=this._input.get_regexp(K.__template_pattern),this._excluded=Object.assign(this._excluded,K._excluded),this._disabled=Object.assign(this._disabled,K._disabled));var B=new _(R);this.__patterns={handlebars_comment:B.starting_with(/{{!--/).until_after(/--}}/),handlebars_unescaped:B.starting_with(/{{{/).until_after(/}}}/),handlebars:B.starting_with(/{{/).until_after(/}}/),php:B.starting_with(/<\?(?:[= ]|php)/).until_after(/\?>/),erb:B.starting_with(/<%[^%]/).until_after(/[^%]%>/),django:B.starting_with(/{%/).until_after(/%}/),django_value:B.starting_with(/{{/).until_after(/}}/),django_comment:B.starting_with(/{#/).until_after(/#}/),smarty:B.starting_with(/{(?=[^}{\s\n])/).until_after(/[^\s\n]}/),smarty_comment:B.starting_with(/{\*/).until_after(/\*}/),smarty_literal:B.starting_with(/{literal}/).until_after(/{\/literal}/)}}F.prototype=new _,F.prototype._create=function(){return new F(this._input,this)},F.prototype._update=function(){this.__set_templated_pattern()},F.prototype.disable=function(R){var K=this._create();return K._disabled[R]=!0,K._update(),K},F.prototype.read_options=function(R){var K=this._create();for(var B in C)K._disabled[B]=R.templating.indexOf(B)===-1;return K._update(),K},F.prototype.exclude=function(R){var K=this._create();return K._excluded[R]=!0,K._update(),K},F.prototype.read=function(){var R="";this._match_pattern?R=this._input.read(this._starting_pattern):R=this._input.read(this._starting_pattern,this.__template_pattern);for(var K=this._read_template();K;)this._match_pattern?K+=this._input.read(this._match_pattern):K+=this._input.readUntil(this.__template_pattern),R+=K,K=this._read_template();return this._until_after&&(R+=this._input.readUntilAfter(this._until_pattern)),R},F.prototype.__set_templated_pattern=function(){var R=[];this._disabled.php||R.push(this.__patterns.php._starting_pattern.source),this._disabled.handlebars||R.push(this.__patterns.handlebars._starting_pattern.source),this._disabled.angular||R.push(this.__patterns.handlebars._starting_pattern.source),this._disabled.erb||R.push(this.__patterns.erb._starting_pattern.source),this._disabled.django||(R.push(this.__patterns.django._starting_pattern.source),R.push(this.__patterns.django_value._starting_pattern.source),R.push(this.__patterns.django_comment._starting_pattern.source)),this._disabled.smarty||R.push(this.__patterns.smarty._starting_pattern.source),this._until_pattern&&R.push(this._until_pattern.source),this.__template_pattern=this._input.get_regexp("(?:"+R.join("|")+")")},F.prototype._read_template=function(){var R="",K=this._input.peek();if(K==="<"){var B=this._input.peek(1);!this._disabled.php&&!this._excluded.php&&B==="?"&&(R=R||this.__patterns.php.read()),!this._disabled.erb&&!this._excluded.erb&&B==="%"&&(R=R||this.__patterns.erb.read())}else K==="{"&&(!this._disabled.handlebars&&!this._excluded.handlebars&&(R=R||this.__patterns.handlebars_comment.read(),R=R||this.__patterns.handlebars_unescaped.read(),R=R||this.__patterns.handlebars.read()),this._disabled.django||(!this._excluded.django&&!this._excluded.handlebars&&(R=R||this.__patterns.django_value.read()),this._excluded.django||(R=R||this.__patterns.django_comment.read(),R=R||this.__patterns.django.read())),this._disabled.smarty||this._disabled.django&&this._disabled.handlebars&&(R=R||this.__patterns.smarty_comment.read(),R=R||this.__patterns.smarty_literal.read(),R=R||this.__patterns.smarty.read()));return R},x.exports.TemplatablePattern=F},,,,function(x,h,p){var _=p(19).Beautifier,C=p(20).Options;function F(R,K,B,D){var I=new _(R,K,B,D);return I.beautify()}x.exports=F,x.exports.defaultOptions=function(){return new C}},function(x,h,p){var _=p(20).Options,C=p(2).Output,F=p(21).Tokenizer,R=p(21).TOKEN,K=/\r\n|[\r\n]/,B=/\r\n|[\r\n]/g,D=function(W,M){this.indent_level=0,this.alignment_size=0,this.max_preserve_newlines=W.max_preserve_newlines,this.preserve_newlines=W.preserve_newlines,this._output=new C(W,M)};D.prototype.current_line_has_match=function(W){return this._output.current_line.has_match(W)},D.prototype.set_space_before_token=function(W,M){this._output.space_before_token=W,this._output.non_breaking_space=M},D.prototype.set_wrap_point=function(){this._output.set_indent(this.indent_level,this.alignment_size),this._output.set_wrap_point()},D.prototype.add_raw_token=function(W){this._output.add_raw_token(W)},D.prototype.print_preserved_newlines=function(W){var M=0;W.type!==R.TEXT&&W.previous.type!==R.TEXT&&(M=W.newlines?1:0),this.preserve_newlines&&(M=W.newlines<this.max_preserve_newlines+1?W.newlines:this.max_preserve_newlines+1);for(var X=0;X<M;X++)this.print_newline(X>0);return M!==0},D.prototype.traverse_whitespace=function(W){return W.whitespace_before||W.newlines?(this.print_preserved_newlines(W)||(this._output.space_before_token=!0),!0):!1},D.prototype.previous_token_wrapped=function(){return this._output.previous_token_wrapped},D.prototype.print_newline=function(W){this._output.add_new_line(W)},D.prototype.print_token=function(W){W.text&&(this._output.set_indent(this.indent_level,this.alignment_size),this._output.add_token(W.text))},D.prototype.indent=function(){this.indent_level++},D.prototype.deindent=function(){this.indent_level>0&&(this.indent_level--,this._output.set_indent(this.indent_level,this.alignment_size))},D.prototype.get_full_indent=function(W){return W=this.indent_level+(W||0),W<1?"":this._output.get_indent_string(W)};var I=function(W){for(var M=null,X=W.next;X.type!==R.EOF&&W.closed!==X;){if(X.type===R.ATTRIBUTE&&X.text==="type"){X.next&&X.next.type===R.EQUALS&&X.next.next&&X.next.next.type===R.VALUE&&(M=X.next.next.text);break}X=X.next}return M},S=function(W,M){var X=null,G=null;return M.closed?(W==="script"?X="text/javascript":W==="style"&&(X="text/css"),X=I(M)||X,X.search("text/css")>-1?G="css":X.search(/module|((text|application|dojo)\/(x-)?(javascript|ecmascript|jscript|livescript|(ld\+)?json|method|aspect))/)>-1?G="javascript":X.search(/(text|application|dojo)\/(x-)?(html)/)>-1?G="html":X.search(/test\/null/)>-1&&(G="null"),G):null};function q(W,M){return M.indexOf(W)!==-1}function ae(W,M,X){this.parent=W||null,this.tag=M?M.tag_name:"",this.indent_level=X||0,this.parser_token=M||null}function j(W){this._printer=W,this._current_frame=null}j.prototype.get_parser_token=function(){return this._current_frame?this._current_frame.parser_token:null},j.prototype.record_tag=function(W){var M=new ae(this._current_frame,W,this._printer.indent_level);this._current_frame=M},j.prototype._try_pop_frame=function(W){var M=null;return W&&(M=W.parser_token,this._printer.indent_level=W.indent_level,this._current_frame=W.parent),M},j.prototype._get_frame=function(W,M){for(var X=this._current_frame;X&&W.indexOf(X.tag)===-1;){if(M&&M.indexOf(X.tag)!==-1){X=null;break}X=X.parent}return X},j.prototype.try_pop=function(W,M){var X=this._get_frame([W],M);return this._try_pop_frame(X)},j.prototype.indent_to_tag=function(W){var M=this._get_frame(W);M&&(this._printer.indent_level=M.indent_level)};function Y(W,M,X,G){this._source_text=W||"",M=M||{},this._js_beautify=X,this._css_beautify=G,this._tag_stack=null;var ne=new _(M,"html");this._options=ne,this._is_wrap_attributes_force=this._options.wrap_attributes.substr(0,5)==="force",this._is_wrap_attributes_force_expand_multiline=this._options.wrap_attributes==="force-expand-multiline",this._is_wrap_attributes_force_aligned=this._options.wrap_attributes==="force-aligned",this._is_wrap_attributes_aligned_multiple=this._options.wrap_attributes==="aligned-multiple",this._is_wrap_attributes_preserve=this._options.wrap_attributes.substr(0,8)==="preserve",this._is_wrap_attributes_preserve_aligned=this._options.wrap_attributes==="preserve-aligned"}Y.prototype.beautify=function(){if(this._options.disabled)return this._source_text;var W=this._source_text,M=this._options.eol;this._options.eol==="auto"&&(M=`
`,W&&K.test(W)&&(M=W.match(K)[0])),W=W.replace(B,`
`);var X=W.match(/^[\t ]*/)[0],G={text:"",type:""},ne=new ie(this._options),Z=new D(this._options,X),m=new F(W,this._options).tokenize();this._tag_stack=new j(Z);for(var v=null,Q=m.next();Q.type!==R.EOF;)Q.type===R.TAG_OPEN||Q.type===R.COMMENT?(v=this._handle_tag_open(Z,Q,ne,G,m),ne=v):Q.type===R.ATTRIBUTE||Q.type===R.EQUALS||Q.type===R.VALUE||Q.type===R.TEXT&&!ne.tag_complete?v=this._handle_inside_tag(Z,Q,ne,G):Q.type===R.TAG_CLOSE?v=this._handle_tag_close(Z,Q,ne):Q.type===R.TEXT?v=this._handle_text(Z,Q,ne):Q.type===R.CONTROL_FLOW_OPEN?v=this._handle_control_flow_open(Z,Q):Q.type===R.CONTROL_FLOW_CLOSE?v=this._handle_control_flow_close(Z,Q):Z.add_raw_token(Q),G=v,Q=m.next();var he=Z._output.get_code(M);return he},Y.prototype._handle_control_flow_open=function(W,M){var X={text:M.text,type:M.type};return W.set_space_before_token(M.newlines||M.whitespace_before!=="",!0),M.newlines?W.print_preserved_newlines(M):W.set_space_before_token(M.newlines||M.whitespace_before!=="",!0),W.print_token(M),W.indent(),X},Y.prototype._handle_control_flow_close=function(W,M){var X={text:M.text,type:M.type};return W.deindent(),M.newlines?W.print_preserved_newlines(M):W.set_space_before_token(M.newlines||M.whitespace_before!=="",!0),W.print_token(M),X},Y.prototype._handle_tag_close=function(W,M,X){var G={text:M.text,type:M.type};return W.alignment_size=0,X.tag_complete=!0,W.set_space_before_token(M.newlines||M.whitespace_before!=="",!0),X.is_unformatted?W.add_raw_token(M):(X.tag_start_char==="<"&&(W.set_space_before_token(M.text[0]==="/",!0),this._is_wrap_attributes_force_expand_multiline&&X.has_wrapped_attrs&&W.print_newline(!1)),W.print_token(M)),X.indent_content&&!(X.is_unformatted||X.is_content_unformatted)&&(W.indent(),X.indent_content=!1),!X.is_inline_element&&!(X.is_unformatted||X.is_content_unformatted)&&W.set_wrap_point(),G},Y.prototype._handle_inside_tag=function(W,M,X,G){var ne=X.has_wrapped_attrs,Z={text:M.text,type:M.type};return W.set_space_before_token(M.newlines||M.whitespace_before!=="",!0),X.is_unformatted?W.add_raw_token(M):X.tag_start_char==="{"&&M.type===R.TEXT?W.print_preserved_newlines(M)?(M.newlines=0,W.add_raw_token(M)):W.print_token(M):(M.type===R.ATTRIBUTE?W.set_space_before_token(!0):(M.type===R.EQUALS||M.type===R.VALUE&&M.previous.type===R.EQUALS)&&W.set_space_before_token(!1),M.type===R.ATTRIBUTE&&X.tag_start_char==="<"&&((this._is_wrap_attributes_preserve||this._is_wrap_attributes_preserve_aligned)&&(W.traverse_whitespace(M),ne=ne||M.newlines!==0),this._is_wrap_attributes_force&&X.attr_count>=this._options.wrap_attributes_min_attrs&&(G.type!==R.TAG_OPEN||this._is_wrap_attributes_force_expand_multiline)&&(W.print_newline(!1),ne=!0)),W.print_token(M),ne=ne||W.previous_token_wrapped(),X.has_wrapped_attrs=ne),Z},Y.prototype._handle_text=function(W,M,X){var G={text:M.text,type:"TK_CONTENT"};return X.custom_beautifier_name?this._print_custom_beatifier_text(W,M,X):X.is_unformatted||X.is_content_unformatted?W.add_raw_token(M):(W.traverse_whitespace(M),W.print_token(M)),G},Y.prototype._print_custom_beatifier_text=function(W,M,X){var G=this;if(M.text!==""){var ne=M.text,Z,m=1,v="",Q="";X.custom_beautifier_name==="javascript"&&typeof this._js_beautify=="function"?Z=this._js_beautify:X.custom_beautifier_name==="css"&&typeof this._css_beautify=="function"?Z=this._css_beautify:X.custom_beautifier_name==="html"&&(Z=function(Ft,Ut){var Se=new Y(Ft,Ut,G._js_beautify,G._css_beautify);return Se.beautify()}),this._options.indent_scripts==="keep"?m=0:this._options.indent_scripts==="separate"&&(m=-W.indent_level);var he=W.get_full_indent(m);if(ne=ne.replace(/\n[ \t]*$/,""),X.custom_beautifier_name!=="html"&&ne[0]==="<"&&ne.match(/^(<!--|<!\[CDATA\[)/)){var Ue=/^(<!--[^\n]*|<!\[CDATA\[)(\n?)([ \t\n]*)([\s\S]*)(-->|]]>)$/.exec(ne);if(!Ue){W.add_raw_token(M);return}v=he+Ue[1]+`
`,ne=Ue[4],Ue[5]&&(Q=he+Ue[5]),ne=ne.replace(/\n[ \t]*$/,""),(Ue[2]||Ue[3].indexOf(`
`)!==-1)&&(Ue=Ue[3].match(/[ \t]+$/),Ue&&(M.whitespace_before=Ue[0]))}if(ne)if(Z){var Oe=function(){this.eol=`
`};Oe.prototype=this._options.raw_options;var ft=new Oe;ne=Z(he+ne,ft)}else{var Et=M.whitespace_before;Et&&(ne=ne.replace(new RegExp(`
(`+Et+")?","g"),`
`)),ne=he+ne.replace(/\n/g,`
`+he)}v&&(ne?ne=v+ne+`
`+Q:ne=v+Q),W.print_newline(!1),ne&&(M.text=ne,M.whitespace_before="",M.newlines=0,W.add_raw_token(M),W.print_newline(!0))}},Y.prototype._handle_tag_open=function(W,M,X,G,ne){var Z=this._get_tag_open_token(M);if((X.is_unformatted||X.is_content_unformatted)&&!X.is_empty_element&&M.type===R.TAG_OPEN&&!Z.is_start_tag?(W.add_raw_token(M),Z.start_tag_token=this._tag_stack.try_pop(Z.tag_name)):(W.traverse_whitespace(M),this._set_tag_position(W,M,Z,X,G),Z.is_inline_element||W.set_wrap_point(),W.print_token(M)),Z.is_start_tag&&this._is_wrap_attributes_force){var m=0,v;do v=ne.peek(m),v.type===R.ATTRIBUTE&&(Z.attr_count+=1),m+=1;while(v.type!==R.EOF&&v.type!==R.TAG_CLOSE)}return(this._is_wrap_attributes_force_aligned||this._is_wrap_attributes_aligned_multiple||this._is_wrap_attributes_preserve_aligned)&&(Z.alignment_size=M.text.length+1),!Z.tag_complete&&!Z.is_unformatted&&(W.alignment_size=Z.alignment_size),Z};var ie=function(W,M,X){if(this.parent=M||null,this.text="",this.type="TK_TAG_OPEN",this.tag_name="",this.is_inline_element=!1,this.is_unformatted=!1,this.is_content_unformatted=!1,this.is_empty_element=!1,this.is_start_tag=!1,this.is_end_tag=!1,this.indent_content=!1,this.multiline_content=!1,this.custom_beautifier_name=null,this.start_tag_token=null,this.attr_count=0,this.has_wrapped_attrs=!1,this.alignment_size=0,this.tag_complete=!1,this.tag_start_char="",this.tag_check="",!X)this.tag_complete=!0;else{var G;this.tag_start_char=X.text[0],this.text=X.text,this.tag_start_char==="<"?(G=X.text.match(/^<([^\s>]*)/),this.tag_check=G?G[1]:""):(G=X.text.match(/^{{~?(?:[\^]|#\*?)?([^\s}]+)/),this.tag_check=G?G[1]:"",(X.text.startsWith("{{#>")||X.text.startsWith("{{~#>"))&&this.tag_check[0]===">"&&(this.tag_check===">"&&X.next!==null?this.tag_check=X.next.text.split(" ")[0]:this.tag_check=X.text.split(">")[1])),this.tag_check=this.tag_check.toLowerCase(),X.type===R.COMMENT&&(this.tag_complete=!0),this.is_start_tag=this.tag_check.charAt(0)!=="/",this.tag_name=this.is_start_tag?this.tag_check:this.tag_check.substr(1),this.is_end_tag=!this.is_start_tag||X.closed&&X.closed.text==="/>";var ne=2;this.tag_start_char==="{"&&this.text.length>=3&&this.text.charAt(2)==="~"&&(ne=3),this.is_end_tag=this.is_end_tag||this.tag_start_char==="{"&&(!W.indent_handlebars||this.text.length<3||/[^#\^]/.test(this.text.charAt(ne)))}};Y.prototype._get_tag_open_token=function(W){var M=new ie(this._options,this._tag_stack.get_parser_token(),W);return M.alignment_size=this._options.wrap_attributes_indent_size,M.is_end_tag=M.is_end_tag||q(M.tag_check,this._options.void_elements),M.is_empty_element=M.tag_complete||M.is_start_tag&&M.is_end_tag,M.is_unformatted=!M.tag_complete&&q(M.tag_check,this._options.unformatted),M.is_content_unformatted=!M.is_empty_element&&q(M.tag_check,this._options.content_unformatted),M.is_inline_element=q(M.tag_name,this._options.inline)||this._options.inline_custom_elements&&M.tag_name.includes("-")||M.tag_start_char==="{",M},Y.prototype._set_tag_position=function(W,M,X,G,ne){if(X.is_empty_element||(X.is_end_tag?X.start_tag_token=this._tag_stack.try_pop(X.tag_name):(this._do_optional_end_element(X)&&(X.is_inline_element||W.print_newline(!1)),this._tag_stack.record_tag(X),(X.tag_name==="script"||X.tag_name==="style")&&!(X.is_unformatted||X.is_content_unformatted)&&(X.custom_beautifier_name=S(X.tag_check,M)))),q(X.tag_check,this._options.extra_liners)&&(W.print_newline(!1),W._output.just_added_blankline()||W.print_newline(!0)),X.is_empty_element){if(X.tag_start_char==="{"&&X.tag_check==="else"){this._tag_stack.indent_to_tag(["if","unless","each"]),X.indent_content=!0;var Z=W.current_line_has_match(/{{#if/);Z||W.print_newline(!1)}X.tag_name==="!--"&&ne.type===R.TAG_CLOSE&&G.is_end_tag&&X.text.indexOf(`
`)===-1||(X.is_inline_element||X.is_unformatted||W.print_newline(!1),this._calcluate_parent_multiline(W,X))}else if(X.is_end_tag){var m=!1;m=X.start_tag_token&&X.start_tag_token.multiline_content,m=m||!X.is_inline_element&&!(G.is_inline_element||G.is_unformatted)&&!(ne.type===R.TAG_CLOSE&&X.start_tag_token===G)&&ne.type!=="TK_CONTENT",(X.is_content_unformatted||X.is_unformatted)&&(m=!1),m&&W.print_newline(!1)}else X.indent_content=!X.custom_beautifier_name,X.tag_start_char==="<"&&(X.tag_name==="html"?X.indent_content=this._options.indent_inner_html:X.tag_name==="head"?X.indent_content=this._options.indent_head_inner_html:X.tag_name==="body"&&(X.indent_content=this._options.indent_body_inner_html)),!(X.is_inline_element||X.is_unformatted)&&(ne.type!=="TK_CONTENT"||X.is_content_unformatted)&&W.print_newline(!1),this._calcluate_parent_multiline(W,X)},Y.prototype._calcluate_parent_multiline=function(W,M){M.parent&&W._output.just_added_newline()&&!((M.is_inline_element||M.is_unformatted)&&M.parent.is_inline_element)&&(M.parent.multiline_content=!0)};var de=["address","article","aside","blockquote","details","div","dl","fieldset","figcaption","figure","footer","form","h1","h2","h3","h4","h5","h6","header","hr","main","menu","nav","ol","p","pre","section","table","ul"],pe=["a","audio","del","ins","map","noscript","video"];Y.prototype._do_optional_end_element=function(W){var M=null;if(!(W.is_empty_element||!W.is_start_tag||!W.parent)){if(W.tag_name==="body")M=M||this._tag_stack.try_pop("head");else if(W.tag_name==="li")M=M||this._tag_stack.try_pop("li",["ol","ul","menu"]);else if(W.tag_name==="dd"||W.tag_name==="dt")M=M||this._tag_stack.try_pop("dt",["dl"]),M=M||this._tag_stack.try_pop("dd",["dl"]);else if(W.parent.tag_name==="p"&&de.indexOf(W.tag_name)!==-1){var X=W.parent.parent;(!X||pe.indexOf(X.tag_name)===-1)&&(M=M||this._tag_stack.try_pop("p"))}else W.tag_name==="rp"||W.tag_name==="rt"?(M=M||this._tag_stack.try_pop("rt",["ruby","rtc"]),M=M||this._tag_stack.try_pop("rp",["ruby","rtc"])):W.tag_name==="optgroup"?M=M||this._tag_stack.try_pop("optgroup",["select"]):W.tag_name==="option"?M=M||this._tag_stack.try_pop("option",["select","datalist","optgroup"]):W.tag_name==="colgroup"?M=M||this._tag_stack.try_pop("caption",["table"]):W.tag_name==="thead"?(M=M||this._tag_stack.try_pop("caption",["table"]),M=M||this._tag_stack.try_pop("colgroup",["table"])):W.tag_name==="tbody"||W.tag_name==="tfoot"?(M=M||this._tag_stack.try_pop("caption",["table"]),M=M||this._tag_stack.try_pop("colgroup",["table"]),M=M||this._tag_stack.try_pop("thead",["table"]),M=M||this._tag_stack.try_pop("tbody",["table"])):W.tag_name==="tr"?(M=M||this._tag_stack.try_pop("caption",["table"]),M=M||this._tag_stack.try_pop("colgroup",["table"]),M=M||this._tag_stack.try_pop("tr",["table","thead","tbody","tfoot"])):(W.tag_name==="th"||W.tag_name==="td")&&(M=M||this._tag_stack.try_pop("td",["table","thead","tbody","tfoot","tr"]),M=M||this._tag_stack.try_pop("th",["table","thead","tbody","tfoot","tr"]));return W.parent=this._tag_stack.get_parser_token(),M}},x.exports.Beautifier=Y},function(x,h,p){var _=p(6).Options;function C(F){_.call(this,F,"html"),this.templating.length===1&&this.templating[0]==="auto"&&(this.templating=["django","erb","handlebars","php"]),this.indent_inner_html=this._get_boolean("indent_inner_html"),this.indent_body_inner_html=this._get_boolean("indent_body_inner_html",!0),this.indent_head_inner_html=this._get_boolean("indent_head_inner_html",!0),this.indent_handlebars=this._get_boolean("indent_handlebars",!0),this.wrap_attributes=this._get_selection("wrap_attributes",["auto","force","force-aligned","force-expand-multiline","aligned-multiple","preserve","preserve-aligned"]),this.wrap_attributes_min_attrs=this._get_number("wrap_attributes_min_attrs",2),this.wrap_attributes_indent_size=this._get_number("wrap_attributes_indent_size",this.indent_size),this.extra_liners=this._get_array("extra_liners",["head","body","/html"]),this.inline=this._get_array("inline",["a","abbr","area","audio","b","bdi","bdo","br","button","canvas","cite","code","data","datalist","del","dfn","em","embed","i","iframe","img","input","ins","kbd","keygen","label","map","mark","math","meter","noscript","object","output","progress","q","ruby","s","samp","select","small","span","strong","sub","sup","svg","template","textarea","time","u","var","video","wbr","text","acronym","big","strike","tt"]),this.inline_custom_elements=this._get_boolean("inline_custom_elements",!0),this.void_elements=this._get_array("void_elements",["area","base","br","col","embed","hr","img","input","keygen","link","menuitem","meta","param","source","track","wbr","!doctype","?xml","basefont","isindex"]),this.unformatted=this._get_array("unformatted",[]),this.content_unformatted=this._get_array("content_unformatted",["pre","textarea"]),this.unformatted_content_delimiter=this._get_characters("unformatted_content_delimiter"),this.indent_scripts=this._get_selection("indent_scripts",["normal","keep","separate"])}C.prototype=new _,x.exports.Options=C},function(x,h,p){var _=p(9).Tokenizer,C=p(9).TOKEN,F=p(13).Directives,R=p(14).TemplatablePattern,K=p(12).Pattern,B={TAG_OPEN:"TK_TAG_OPEN",TAG_CLOSE:"TK_TAG_CLOSE",CONTROL_FLOW_OPEN:"TK_CONTROL_FLOW_OPEN",CONTROL_FLOW_CLOSE:"TK_CONTROL_FLOW_CLOSE",ATTRIBUTE:"TK_ATTRIBUTE",EQUALS:"TK_EQUALS",VALUE:"TK_VALUE",COMMENT:"TK_COMMENT",TEXT:"TK_TEXT",UNKNOWN:"TK_UNKNOWN",START:C.START,RAW:C.RAW,EOF:C.EOF},D=new F(/<\!--/,/-->/),I=function(S,q){_.call(this,S,q),this._current_tag_name="";var ae=new R(this._input).read_options(this._options),j=new K(this._input);if(this.__patterns={word:ae.until(/[\n\r\t <]/),word_control_flow_close_excluded:ae.until(/[\n\r\t <}]/),single_quote:ae.until_after(/'/),double_quote:ae.until_after(/"/),attribute:ae.until(/[\n\r\t =>]|\/>/),element_name:ae.until(/[\n\r\t >\/]/),angular_control_flow_start:j.matching(/\@[a-zA-Z]+[^({]*[({]/),handlebars_comment:j.starting_with(/{{!--/).until_after(/--}}/),handlebars:j.starting_with(/{{/).until_after(/}}/),handlebars_open:j.until(/[\n\r\t }]/),handlebars_raw_close:j.until(/}}/),comment:j.starting_with(/<!--/).until_after(/-->/),cdata:j.starting_with(/<!\[CDATA\[/).until_after(/]]>/),conditional_comment:j.starting_with(/<!\[/).until_after(/]>/),processing:j.starting_with(/<\?/).until_after(/\?>/)},this._options.indent_handlebars&&(this.__patterns.word=this.__patterns.word.exclude("handlebars"),this.__patterns.word_control_flow_close_excluded=this.__patterns.word_control_flow_close_excluded.exclude("handlebars")),this._unformatted_content_delimiter=null,this._options.unformatted_content_delimiter){var Y=this._input.get_literal_regexp(this._options.unformatted_content_delimiter);this.__patterns.unformatted_content_delimiter=j.matching(Y).until_after(Y)}};I.prototype=new _,I.prototype._is_comment=function(S){return!1},I.prototype._is_opening=function(S){return S.type===B.TAG_OPEN||S.type===B.CONTROL_FLOW_OPEN},I.prototype._is_closing=function(S,q){return S.type===B.TAG_CLOSE&&q&&((S.text===">"||S.text==="/>")&&q.text[0]==="<"||S.text==="}}"&&q.text[0]==="{"&&q.text[1]==="{")||S.type===B.CONTROL_FLOW_CLOSE&&S.text==="}"&&q.text.endsWith("{")},I.prototype._reset=function(){this._current_tag_name=""},I.prototype._get_next_token=function(S,q){var ae=null;this._readWhitespace();var j=this._input.peek();return j===null?this._create_token(B.EOF,""):(ae=ae||this._read_open_handlebars(j,q),ae=ae||this._read_attribute(j,S,q),ae=ae||this._read_close(j,q),ae=ae||this._read_script_and_style(j,S),ae=ae||this._read_control_flows(j,q),ae=ae||this._read_raw_content(j,S,q),ae=ae||this._read_content_word(j,q),ae=ae||this._read_comment_or_cdata(j),ae=ae||this._read_processing(j),ae=ae||this._read_open(j,q),ae=ae||this._create_token(B.UNKNOWN,this._input.next()),ae)},I.prototype._read_comment_or_cdata=function(S){var q=null,ae=null,j=null;if(S==="<"){var Y=this._input.peek(1);Y==="!"&&(ae=this.__patterns.comment.read(),ae?(j=D.get_directives(ae),j&&j.ignore==="start"&&(ae+=D.readIgnored(this._input))):ae=this.__patterns.cdata.read()),ae&&(q=this._create_token(B.COMMENT,ae),q.directives=j)}return q},I.prototype._read_processing=function(S){var q=null,ae=null,j=null;if(S==="<"){var Y=this._input.peek(1);(Y==="!"||Y==="?")&&(ae=this.__patterns.conditional_comment.read(),ae=ae||this.__patterns.processing.read()),ae&&(q=this._create_token(B.COMMENT,ae),q.directives=j)}return q},I.prototype._read_open=function(S,q){var ae=null,j=null;return(!q||q.type===B.CONTROL_FLOW_OPEN)&&S==="<"&&(ae=this._input.next(),this._input.peek()==="/"&&(ae+=this._input.next()),ae+=this.__patterns.element_name.read(),j=this._create_token(B.TAG_OPEN,ae)),j},I.prototype._read_open_handlebars=function(S,q){var ae=null,j=null;return(!q||q.type===B.CONTROL_FLOW_OPEN)&&(this._options.templating.includes("angular")||this._options.indent_handlebars)&&S==="{"&&this._input.peek(1)==="{"&&(this._options.indent_handlebars&&this._input.peek(2)==="!"?(ae=this.__patterns.handlebars_comment.read(),ae=ae||this.__patterns.handlebars.read(),j=this._create_token(B.COMMENT,ae)):(ae=this.__patterns.handlebars_open.read(),j=this._create_token(B.TAG_OPEN,ae))),j},I.prototype._read_control_flows=function(S,q){var ae="",j=null;if(!this._options.templating.includes("angular"))return j;if(S==="@"){if(ae=this.__patterns.angular_control_flow_start.read(),ae==="")return j;for(var Y=ae.endsWith("(")?1:0,ie=0;!(ae.endsWith("{")&&Y===ie);){var de=this._input.next();if(de===null)break;de==="("?Y++:de===")"&&ie++,ae+=de}j=this._create_token(B.CONTROL_FLOW_OPEN,ae)}else S==="}"&&q&&q.type===B.CONTROL_FLOW_OPEN&&(ae=this._input.next(),j=this._create_token(B.CONTROL_FLOW_CLOSE,ae));return j},I.prototype._read_close=function(S,q){var ae=null,j=null;return q&&q.type===B.TAG_OPEN&&(q.text[0]==="<"&&(S===">"||S==="/"&&this._input.peek(1)===">")?(ae=this._input.next(),S==="/"&&(ae+=this._input.next()),j=this._create_token(B.TAG_CLOSE,ae)):q.text[0]==="{"&&S==="}"&&this._input.peek(1)==="}"&&(this._input.next(),this._input.next(),j=this._create_token(B.TAG_CLOSE,"}}"))),j},I.prototype._read_attribute=function(S,q,ae){var j=null,Y="";if(ae&&ae.text[0]==="<")if(S==="=")j=this._create_token(B.EQUALS,this._input.next());else if(S==='"'||S==="'"){var ie=this._input.next();S==='"'?ie+=this.__patterns.double_quote.read():ie+=this.__patterns.single_quote.read(),j=this._create_token(B.VALUE,ie)}else Y=this.__patterns.attribute.read(),Y&&(q.type===B.EQUALS?j=this._create_token(B.VALUE,Y):j=this._create_token(B.ATTRIBUTE,Y));return j},I.prototype._is_content_unformatted=function(S){return this._options.void_elements.indexOf(S)===-1&&(this._options.content_unformatted.indexOf(S)!==-1||this._options.unformatted.indexOf(S)!==-1)},I.prototype._read_raw_content=function(S,q,ae){var j="";if(ae&&ae.text[0]==="{")j=this.__patterns.handlebars_raw_close.read();else if(q.type===B.TAG_CLOSE&&q.opened.text[0]==="<"&&q.text[0]!=="/"){var Y=q.opened.text.substr(1).toLowerCase();this._is_content_unformatted(Y)&&(j=this._input.readUntil(new RegExp("</"+Y+"[\\n\\r\\t ]*?>","ig")))}return j?this._create_token(B.TEXT,j):null},I.prototype._read_script_and_style=function(S,q){if(q.type===B.TAG_CLOSE&&q.opened.text[0]==="<"&&q.text[0]!=="/"){var ae=q.opened.text.substr(1).toLowerCase();if(ae==="script"||ae==="style"){var j=this._read_comment_or_cdata(S);if(j)return j.type=B.TEXT,j;var Y=this._input.readUntil(new RegExp("</"+ae+"[\\n\\r\\t ]*?>","ig"));if(Y)return this._create_token(B.TEXT,Y)}}return null},I.prototype._read_content_word=function(S,q){var ae="";return this._options.unformatted_content_delimiter&&S===this._options.unformatted_content_delimiter[0]&&(ae=this.__patterns.unformatted_content_delimiter.read()),ae||(ae=q&&q.type===B.CONTROL_FLOW_OPEN?this.__patterns.word_control_flow_close_excluded.read():this.__patterns.word.read()),ae?this._create_token(B.TEXT,ae):null},x.exports.Tokenizer=I,x.exports.TOKEN=B}],ee={};function A(x){var h=ee[x];if(h!==void 0)return h.exports;var p=ee[x]={exports:{}};return fe[x](p,p.exports,A),p.exports}var E=A(18);ge=E})();var se=ge;if(1)P=[b,b(58553),b(87804)],re=function(fe){var ee=b(58553),A=b(87804);return{html_beautify:function(E,x){return se(E,x,ee.js_beautify,A.css_beautify)}}}.apply(tt,P),re!==void 0&&(Cn.exports=re);else var U,f})()},58553:function(Cn,tt){var b,P;(function(){var re;(function(){"use strict";var se=[function(ee,A,E){var x=E(1).Beautifier,h=E(5).Options;function p(_,C){var F=new x(_,C);return F.beautify()}ee.exports=p,ee.exports.defaultOptions=function(){return new h}},function(ee,A,E){var x=E(2).Output,h=E(3).Token,p=E(4),_=E(5).Options,C=E(7).Tokenizer,F=E(7).line_starters,R=E(7).positionable_operators,K=E(7).TOKEN;function B(v,Q){return Q.indexOf(v)!==-1}function D(v){return v.replace(/^\s+/g,"")}function I(v){for(var Q={},he=0;he<v.length;he++)Q[v[he].replace(/-/g,"_")]=v[he];return Q}function S(v,Q){return v&&v.type===K.RESERVED&&v.text===Q}function q(v,Q){return v&&v.type===K.RESERVED&&B(v.text,Q)}var ae=["case","return","do","if","throw","else","await","break","continue","async"],j=["before-newline","after-newline","preserve-newline"],Y=I(j),ie=[Y.before_newline,Y.preserve_newline],de={BlockStatement:"BlockStatement",Statement:"Statement",ObjectLiteral:"ObjectLiteral",ArrayLiteral:"ArrayLiteral",ForInitializer:"ForInitializer",Conditional:"Conditional",Expression:"Expression"};function pe(v,Q){Q.multiline_frame||Q.mode===de.ForInitializer||Q.mode===de.Conditional||v.remove_indent(Q.start_line_index)}function W(v){v=v.replace(p.allLineBreaks,`
`);for(var Q=[],he=v.indexOf(`
`);he!==-1;)Q.push(v.substring(0,he)),v=v.substring(he+1),he=v.indexOf(`
`);return v.length&&Q.push(v),Q}function M(v){return v===de.ArrayLiteral}function X(v){return B(v,[de.Expression,de.ForInitializer,de.Conditional])}function G(v,Q){for(var he=0;he<v.length;he++){var Ue=v[he].trim();if(Ue.charAt(0)!==Q)return!1}return!0}function ne(v,Q){for(var he=0,Ue=v.length,Oe;he<Ue;he++)if(Oe=v[he],Oe&&Oe.indexOf(Q)!==0)return!1;return!0}function Z(v,Q){Q=Q||{},this._source_text=v||"",this._output=null,this._tokens=null,this._last_last_text=null,this._flags=null,this._previous_flags=null,this._flag_store=null,this._options=new _(Q)}Z.prototype.create_flags=function(v,Q){var he=0;v&&(he=v.indentation_level,!this._output.just_added_newline()&&v.line_indent_level>he&&(he=v.line_indent_level));var Ue={mode:Q,parent:v,last_token:v?v.last_token:new h(K.START_BLOCK,""),last_word:v?v.last_word:"",declaration_statement:!1,declaration_assignment:!1,multiline_frame:!1,inline_frame:!1,if_block:!1,else_block:!1,class_start_block:!1,do_block:!1,do_while:!1,import_block:!1,in_case_statement:!1,in_case:!1,case_body:!1,case_block:!1,indentation_level:he,alignment:0,line_indent_level:v?v.line_indent_level:he,start_line_index:this._output.get_line_number(),ternary_depth:0};return Ue},Z.prototype._reset=function(v){var Q=v.match(/^[\t ]*/)[0];this._last_last_text="",this._output=new x(this._options,Q),this._output.raw=this._options.test_output_raw,this._flag_store=[],this.set_mode(de.BlockStatement);var he=new C(v,this._options);return this._tokens=he.tokenize(),v},Z.prototype.beautify=function(){if(this._options.disabled)return this._source_text;var v,Q=this._reset(this._source_text),he=this._options.eol;this._options.eol==="auto"&&(he=`
`,Q&&p.lineBreak.test(Q||"")&&(he=Q.match(p.lineBreak)[0]));for(var Ue=this._tokens.next();Ue;)this.handle_token(Ue),this._last_last_text=this._flags.last_token.text,this._flags.last_token=Ue,Ue=this._tokens.next();return v=this._output.get_code(he),v},Z.prototype.handle_token=function(v,Q){v.type===K.START_EXPR?this.handle_start_expr(v):v.type===K.END_EXPR?this.handle_end_expr(v):v.type===K.START_BLOCK?this.handle_start_block(v):v.type===K.END_BLOCK?this.handle_end_block(v):v.type===K.WORD?this.handle_word(v):v.type===K.RESERVED?this.handle_word(v):v.type===K.SEMICOLON?this.handle_semicolon(v):v.type===K.STRING?this.handle_string(v):v.type===K.EQUALS?this.handle_equals(v):v.type===K.OPERATOR?this.handle_operator(v):v.type===K.COMMA?this.handle_comma(v):v.type===K.BLOCK_COMMENT?this.handle_block_comment(v,Q):v.type===K.COMMENT?this.handle_comment(v,Q):v.type===K.DOT?this.handle_dot(v):v.type===K.EOF?this.handle_eof(v):v.type===K.UNKNOWN?this.handle_unknown(v,Q):this.handle_unknown(v,Q)},Z.prototype.handle_whitespace_and_comments=function(v,Q){var he=v.newlines,Ue=this._options.keep_array_indentation&&M(this._flags.mode);if(v.comments_before)for(var Oe=v.comments_before.next();Oe;)this.handle_whitespace_and_comments(Oe,Q),this.handle_token(Oe,Q),Oe=v.comments_before.next();if(Ue)for(var ft=0;ft<he;ft+=1)this.print_newline(ft>0,Q);else if(this._options.max_preserve_newlines&&he>this._options.max_preserve_newlines&&(he=this._options.max_preserve_newlines),this._options.preserve_newlines&&he>1){this.print_newline(!1,Q);for(var Et=1;Et<he;Et+=1)this.print_newline(!0,Q)}};var m=["async","break","continue","return","throw","yield"];Z.prototype.allow_wrap_or_preserved_newline=function(v,Q){if(Q=Q===void 0?!1:Q,!this._output.just_added_newline()){var he=this._options.preserve_newlines&&v.newlines||Q,Ue=B(this._flags.last_token.text,R)||B(v.text,R);if(Ue){var Oe=B(this._flags.last_token.text,R)&&B(this._options.operator_position,ie)||B(v.text,R);he=he&&Oe}if(he)this.print_newline(!1,!0);else if(this._options.wrap_line_length){if(q(this._flags.last_token,m))return;this._output.set_wrap_point()}}},Z.prototype.print_newline=function(v,Q){if(!Q&&this._flags.last_token.text!==";"&&this._flags.last_token.text!==","&&this._flags.last_token.text!=="="&&(this._flags.last_token.type!==K.OPERATOR||this._flags.last_token.text==="--"||this._flags.last_token.text==="++"))for(var he=this._tokens.peek();this._flags.mode===de.Statement&&!(this._flags.if_block&&S(he,"else"))&&!this._flags.do_block;)this.restore_mode();this._output.add_new_line(v)&&(this._flags.multiline_frame=!0)},Z.prototype.print_token_line_indentation=function(v){this._output.just_added_newline()&&(this._options.keep_array_indentation&&v.newlines&&(v.text==="["||M(this._flags.mode))?(this._output.current_line.set_indent(-1),this._output.current_line.push(v.whitespace_before),this._output.space_before_token=!1):this._output.set_indent(this._flags.indentation_level,this._flags.alignment)&&(this._flags.line_indent_level=this._flags.indentation_level))},Z.prototype.print_token=function(v){if(this._output.raw){this._output.add_raw_token(v);return}if(this._options.comma_first&&v.previous&&v.previous.type===K.COMMA&&this._output.just_added_newline()&&this._output.previous_line.last()===","){var Q=this._output.previous_line.pop();this._output.previous_line.is_empty()&&(this._output.previous_line.push(Q),this._output.trim(!0),this._output.current_line.pop(),this._output.trim()),this.print_token_line_indentation(v),this._output.add_token(","),this._output.space_before_token=!0}this.print_token_line_indentation(v),this._output.non_breaking_space=!0,this._output.add_token(v.text),this._output.previous_token_wrapped&&(this._flags.multiline_frame=!0)},Z.prototype.indent=function(){this._flags.indentation_level+=1,this._output.set_indent(this._flags.indentation_level,this._flags.alignment)},Z.prototype.deindent=function(){this._flags.indentation_level>0&&(!this._flags.parent||this._flags.indentation_level>this._flags.parent.indentation_level)&&(this._flags.indentation_level-=1,this._output.set_indent(this._flags.indentation_level,this._flags.alignment))},Z.prototype.set_mode=function(v){this._flags?(this._flag_store.push(this._flags),this._previous_flags=this._flags):this._previous_flags=this.create_flags(null,v),this._flags=this.create_flags(this._previous_flags,v),this._output.set_indent(this._flags.indentation_level,this._flags.alignment)},Z.prototype.restore_mode=function(){this._flag_store.length>0&&(this._previous_flags=this._flags,this._flags=this._flag_store.pop(),this._previous_flags.mode===de.Statement&&pe(this._output,this._previous_flags),this._output.set_indent(this._flags.indentation_level,this._flags.alignment))},Z.prototype.start_of_object_property=function(){return this._flags.parent.mode===de.ObjectLiteral&&this._flags.mode===de.Statement&&(this._flags.last_token.text===":"&&this._flags.ternary_depth===0||q(this._flags.last_token,["get","set"]))},Z.prototype.start_of_statement=function(v){var Q=!1;return Q=Q||q(this._flags.last_token,["var","let","const"])&&v.type===K.WORD,Q=Q||S(this._flags.last_token,"do"),Q=Q||!(this._flags.parent.mode===de.ObjectLiteral&&this._flags.mode===de.Statement)&&q(this._flags.last_token,m)&&!v.newlines,Q=Q||S(this._flags.last_token,"else")&&!(S(v,"if")&&!v.comments_before),Q=Q||this._flags.last_token.type===K.END_EXPR&&(this._previous_flags.mode===de.ForInitializer||this._previous_flags.mode===de.Conditional),Q=Q||this._flags.last_token.type===K.WORD&&this._flags.mode===de.BlockStatement&&!this._flags.in_case&&!(v.text==="--"||v.text==="++")&&this._last_last_text!=="function"&&v.type!==K.WORD&&v.type!==K.RESERVED,Q=Q||this._flags.mode===de.ObjectLiteral&&(this._flags.last_token.text===":"&&this._flags.ternary_depth===0||q(this._flags.last_token,["get","set"])),Q?(this.set_mode(de.Statement),this.indent(),this.handle_whitespace_and_comments(v,!0),this.start_of_object_property()||this.allow_wrap_or_preserved_newline(v,q(v,["do","for","if","while"])),!0):!1},Z.prototype.handle_start_expr=function(v){this.start_of_statement(v)||this.handle_whitespace_and_comments(v);var Q=de.Expression;if(v.text==="["){if(this._flags.last_token.type===K.WORD||this._flags.last_token.text===")"){q(this._flags.last_token,F)&&(this._output.space_before_token=!0),this.print_token(v),this.set_mode(Q),this.indent(),this._options.space_in_paren&&(this._output.space_before_token=!0);return}Q=de.ArrayLiteral,M(this._flags.mode)&&(this._flags.last_token.text==="["||this._flags.last_token.text===","&&(this._last_last_text==="]"||this._last_last_text==="}"))&&(this._options.keep_array_indentation||this.print_newline()),B(this._flags.last_token.type,[K.START_EXPR,K.END_EXPR,K.WORD,K.OPERATOR,K.DOT])||(this._output.space_before_token=!0)}else{if(this._flags.last_token.type===K.RESERVED)this._flags.last_token.text==="for"?(this._output.space_before_token=this._options.space_before_conditional,Q=de.ForInitializer):B(this._flags.last_token.text,["if","while","switch"])?(this._output.space_before_token=this._options.space_before_conditional,Q=de.Conditional):B(this._flags.last_word,["await","async"])?this._output.space_before_token=!0:this._flags.last_token.text==="import"&&v.whitespace_before===""?this._output.space_before_token=!1:(B(this._flags.last_token.text,F)||this._flags.last_token.text==="catch")&&(this._output.space_before_token=!0);else if(this._flags.last_token.type===K.EQUALS||this._flags.last_token.type===K.OPERATOR)this.start_of_object_property()||this.allow_wrap_or_preserved_newline(v);else if(this._flags.last_token.type===K.WORD){this._output.space_before_token=!1;var he=this._tokens.peek(-3);if(this._options.space_after_named_function&&he){var Ue=this._tokens.peek(-4);q(he,["async","function"])||he.text==="*"&&q(Ue,["async","function"])?this._output.space_before_token=!0:this._flags.mode===de.ObjectLiteral?(he.text==="{"||he.text===","||he.text==="*"&&(Ue.text==="{"||Ue.text===","))&&(this._output.space_before_token=!0):this._flags.parent&&this._flags.parent.class_start_block&&(this._output.space_before_token=!0)}}else this.allow_wrap_or_preserved_newline(v);(this._flags.last_token.type===K.RESERVED&&(this._flags.last_word==="function"||this._flags.last_word==="typeof")||this._flags.last_token.text==="*"&&(B(this._last_last_text,["function","yield"])||this._flags.mode===de.ObjectLiteral&&B(this._last_last_text,["{",","])))&&(this._output.space_before_token=this._options.space_after_anon_function)}this._flags.last_token.text===";"||this._flags.last_token.type===K.START_BLOCK?this.print_newline():(this._flags.last_token.type===K.END_EXPR||this._flags.last_token.type===K.START_EXPR||this._flags.last_token.type===K.END_BLOCK||this._flags.last_token.text==="."||this._flags.last_token.type===K.COMMA)&&this.allow_wrap_or_preserved_newline(v,v.newlines),this.print_token(v),this.set_mode(Q),this._options.space_in_paren&&(this._output.space_before_token=!0),this.indent()},Z.prototype.handle_end_expr=function(v){for(;this._flags.mode===de.Statement;)this.restore_mode();this.handle_whitespace_and_comments(v),this._flags.multiline_frame&&this.allow_wrap_or_preserved_newline(v,v.text==="]"&&M(this._flags.mode)&&!this._options.keep_array_indentation),this._options.space_in_paren&&(this._flags.last_token.type===K.START_EXPR&&!this._options.space_in_empty_paren?(this._output.trim(),this._output.space_before_token=!1):this._output.space_before_token=!0),this.deindent(),this.print_token(v),this.restore_mode(),pe(this._output,this._previous_flags),this._flags.do_while&&this._previous_flags.mode===de.Conditional&&(this._previous_flags.mode=de.Expression,this._flags.do_block=!1,this._flags.do_while=!1)},Z.prototype.handle_start_block=function(v){this.handle_whitespace_and_comments(v);var Q=this._tokens.peek(),he=this._tokens.peek(1);this._flags.last_word==="switch"&&this._flags.last_token.type===K.END_EXPR?(this.set_mode(de.BlockStatement),this._flags.in_case_statement=!0):this._flags.case_body?this.set_mode(de.BlockStatement):he&&(B(he.text,[":",","])&&B(Q.type,[K.STRING,K.WORD,K.RESERVED])||B(Q.text,["get","set","..."])&&B(he.type,[K.WORD,K.RESERVED]))?B(this._last_last_text,["class","interface"])&&!B(he.text,[":",","])?this.set_mode(de.BlockStatement):this.set_mode(de.ObjectLiteral):this._flags.last_token.type===K.OPERATOR&&this._flags.last_token.text==="=>"?this.set_mode(de.BlockStatement):B(this._flags.last_token.type,[K.EQUALS,K.START_EXPR,K.COMMA,K.OPERATOR])||q(this._flags.last_token,["return","throw","import","default"])?this.set_mode(de.ObjectLiteral):this.set_mode(de.BlockStatement),this._flags.last_token&&q(this._flags.last_token.previous,["class","extends"])&&(this._flags.class_start_block=!0);var Ue=!Q.comments_before&&Q.text==="}",Oe=Ue&&this._flags.last_word==="function"&&this._flags.last_token.type===K.END_EXPR;if(this._options.brace_preserve_inline){var ft=0,Et=null;this._flags.inline_frame=!0;do if(ft+=1,Et=this._tokens.peek(ft-1),Et.newlines){this._flags.inline_frame=!1;break}while(Et.type!==K.EOF&&!(Et.type===K.END_BLOCK&&Et.opened===v))}(this._options.brace_style==="expand"||this._options.brace_style==="none"&&v.newlines)&&!this._flags.inline_frame?this._flags.last_token.type!==K.OPERATOR&&(Oe||this._flags.last_token.type===K.EQUALS||q(this._flags.last_token,ae)&&this._flags.last_token.text!=="else")?this._output.space_before_token=!0:this.print_newline(!1,!0):(M(this._previous_flags.mode)&&(this._flags.last_token.type===K.START_EXPR||this._flags.last_token.type===K.COMMA)&&((this._flags.last_token.type===K.COMMA||this._options.space_in_paren)&&(this._output.space_before_token=!0),(this._flags.last_token.type===K.COMMA||this._flags.last_token.type===K.START_EXPR&&this._flags.inline_frame)&&(this.allow_wrap_or_preserved_newline(v),this._previous_flags.multiline_frame=this._previous_flags.multiline_frame||this._flags.multiline_frame,this._flags.multiline_frame=!1)),this._flags.last_token.type!==K.OPERATOR&&this._flags.last_token.type!==K.START_EXPR&&(B(this._flags.last_token.type,[K.START_BLOCK,K.SEMICOLON])&&!this._flags.inline_frame?this.print_newline():this._output.space_before_token=!0)),this.print_token(v),this.indent(),!Ue&&!(this._options.brace_preserve_inline&&this._flags.inline_frame)&&this.print_newline()},Z.prototype.handle_end_block=function(v){for(this.handle_whitespace_and_comments(v);this._flags.mode===de.Statement;)this.restore_mode();var Q=this._flags.last_token.type===K.START_BLOCK;this._flags.inline_frame&&!Q?this._output.space_before_token=!0:this._options.brace_style==="expand"?Q||this.print_newline():Q||(M(this._flags.mode)&&this._options.keep_array_indentation?(this._options.keep_array_indentation=!1,this.print_newline(),this._options.keep_array_indentation=!0):this.print_newline()),this.restore_mode(),this.print_token(v)},Z.prototype.handle_word=function(v){if(v.type===K.RESERVED){if(B(v.text,["set","get"])&&this._flags.mode!==de.ObjectLiteral)v.type=K.WORD;else if(v.text==="import"&&B(this._tokens.peek().text,["(","."]))v.type=K.WORD;else if(B(v.text,["as","from"])&&!this._flags.import_block)v.type=K.WORD;else if(this._flags.mode===de.ObjectLiteral){var Q=this._tokens.peek();Q.text===":"&&(v.type=K.WORD)}}if(this.start_of_statement(v)?q(this._flags.last_token,["var","let","const"])&&v.type===K.WORD&&(this._flags.declaration_statement=!0):v.newlines&&!X(this._flags.mode)&&(this._flags.last_token.type!==K.OPERATOR||this._flags.last_token.text==="--"||this._flags.last_token.text==="++")&&this._flags.last_token.type!==K.EQUALS&&(this._options.preserve_newlines||!q(this._flags.last_token,["var","let","const","set","get"]))?(this.handle_whitespace_and_comments(v),this.print_newline()):this.handle_whitespace_and_comments(v),this._flags.do_block&&!this._flags.do_while)if(S(v,"while")){this._output.space_before_token=!0,this.print_token(v),this._output.space_before_token=!0,this._flags.do_while=!0;return}else this.print_newline(),this._flags.do_block=!1;if(this._flags.if_block)if(!this._flags.else_block&&S(v,"else"))this._flags.else_block=!0;else{for(;this._flags.mode===de.Statement;)this.restore_mode();this._flags.if_block=!1,this._flags.else_block=!1}if(this._flags.in_case_statement&&q(v,["case","default"])){this.print_newline(),!this._flags.case_block&&(this._flags.case_body||this._options.jslint_happy)&&this.deindent(),this._flags.case_body=!1,this.print_token(v),this._flags.in_case=!0;return}if((this._flags.last_token.type===K.COMMA||this._flags.last_token.type===K.START_EXPR||this._flags.last_token.type===K.EQUALS||this._flags.last_token.type===K.OPERATOR)&&!this.start_of_object_property()&&!(B(this._flags.last_token.text,["+","-"])&&this._last_last_text===":"&&this._flags.parent.mode===de.ObjectLiteral)&&this.allow_wrap_or_preserved_newline(v),S(v,"function")){(B(this._flags.last_token.text,["}",";"])||this._output.just_added_newline()&&!(B(this._flags.last_token.text,["(","[","{",":","=",","])||this._flags.last_token.type===K.OPERATOR))&&!this._output.just_added_blankline()&&!v.comments_before&&(this.print_newline(),this.print_newline(!0)),this._flags.last_token.type===K.RESERVED||this._flags.last_token.type===K.WORD?q(this._flags.last_token,["get","set","new","export"])||q(this._flags.last_token,m)?this._output.space_before_token=!0:S(this._flags.last_token,"default")&&this._last_last_text==="export"?this._output.space_before_token=!0:this._flags.last_token.text==="declare"?this._output.space_before_token=!0:this.print_newline():this._flags.last_token.type===K.OPERATOR||this._flags.last_token.text==="="?this._output.space_before_token=!0:!this._flags.multiline_frame&&(X(this._flags.mode)||M(this._flags.mode))||this.print_newline(),this.print_token(v),this._flags.last_word=v.text;return}var he="NONE";if(this._flags.last_token.type===K.END_BLOCK?this._previous_flags.inline_frame?he="SPACE":q(v,["else","catch","finally","from"])?this._options.brace_style==="expand"||this._options.brace_style==="end-expand"||this._options.brace_style==="none"&&v.newlines?he="NEWLINE":(he="SPACE",this._output.space_before_token=!0):he="NEWLINE":this._flags.last_token.type===K.SEMICOLON&&this._flags.mode===de.BlockStatement?he="NEWLINE":this._flags.last_token.type===K.SEMICOLON&&X(this._flags.mode)?he="SPACE":this._flags.last_token.type===K.STRING?he="NEWLINE":this._flags.last_token.type===K.RESERVED||this._flags.last_token.type===K.WORD||this._flags.last_token.text==="*"&&(B(this._last_last_text,["function","yield"])||this._flags.mode===de.ObjectLiteral&&B(this._last_last_text,["{",","]))?he="SPACE":this._flags.last_token.type===K.START_BLOCK?this._flags.inline_frame?he="SPACE":he="NEWLINE":this._flags.last_token.type===K.END_EXPR&&(this._output.space_before_token=!0,he="NEWLINE"),q(v,F)&&this._flags.last_token.text!==")"&&(this._flags.inline_frame||this._flags.last_token.text==="else"||this._flags.last_token.text==="export"?he="SPACE":he="NEWLINE"),q(v,["else","catch","finally"]))if((!(this._flags.last_token.type===K.END_BLOCK&&this._previous_flags.mode===de.BlockStatement)||this._options.brace_style==="expand"||this._options.brace_style==="end-expand"||this._options.brace_style==="none"&&v.newlines)&&!this._flags.inline_frame)this.print_newline();else{this._output.trim(!0);var Ue=this._output.current_line;Ue.last()!=="}"&&this.print_newline(),this._output.space_before_token=!0}else he==="NEWLINE"?q(this._flags.last_token,ae)?this._output.space_before_token=!0:this._flags.last_token.text==="declare"&&q(v,["var","let","const"])?this._output.space_before_token=!0:this._flags.last_token.type!==K.END_EXPR?(this._flags.last_token.type!==K.START_EXPR||!q(v,["var","let","const"]))&&this._flags.last_token.text!==":"&&(S(v,"if")&&S(v.previous,"else")?this._output.space_before_token=!0:this.print_newline()):q(v,F)&&this._flags.last_token.text!==")"&&this.print_newline():this._flags.multiline_frame&&M(this._flags.mode)&&this._flags.last_token.text===","&&this._last_last_text==="}"?this.print_newline():he==="SPACE"&&(this._output.space_before_token=!0);v.previous&&(v.previous.type===K.WORD||v.previous.type===K.RESERVED)&&(this._output.space_before_token=!0),this.print_token(v),this._flags.last_word=v.text,v.type===K.RESERVED&&(v.text==="do"?this._flags.do_block=!0:v.text==="if"?this._flags.if_block=!0:v.text==="import"?this._flags.import_block=!0:this._flags.import_block&&S(v,"from")&&(this._flags.import_block=!1))},Z.prototype.handle_semicolon=function(v){this.start_of_statement(v)?this._output.space_before_token=!1:this.handle_whitespace_and_comments(v);for(var Q=this._tokens.peek();this._flags.mode===de.Statement&&!(this._flags.if_block&&S(Q,"else"))&&!this._flags.do_block;)this.restore_mode();this._flags.import_block&&(this._flags.import_block=!1),this.print_token(v)},Z.prototype.handle_string=function(v){v.text.startsWith("`")&&v.newlines===0&&v.whitespace_before===""&&(v.previous.text===")"||this._flags.last_token.type===K.WORD)||(this.start_of_statement(v)?this._output.space_before_token=!0:(this.handle_whitespace_and_comments(v),this._flags.last_token.type===K.RESERVED||this._flags.last_token.type===K.WORD||this._flags.inline_frame?this._output.space_before_token=!0:this._flags.last_token.type===K.COMMA||this._flags.last_token.type===K.START_EXPR||this._flags.last_token.type===K.EQUALS||this._flags.last_token.type===K.OPERATOR?this.start_of_object_property()||this.allow_wrap_or_preserved_newline(v):v.text.startsWith("`")&&this._flags.last_token.type===K.END_EXPR&&(v.previous.text==="]"||v.previous.text===")")&&v.newlines===0?this._output.space_before_token=!0:this.print_newline())),this.print_token(v)},Z.prototype.handle_equals=function(v){this.start_of_statement(v)||this.handle_whitespace_and_comments(v),this._flags.declaration_statement&&(this._flags.declaration_assignment=!0),this._output.space_before_token=!0,this.print_token(v),this._output.space_before_token=!0},Z.prototype.handle_comma=function(v){this.handle_whitespace_and_comments(v,!0),this.print_token(v),this._output.space_before_token=!0,this._flags.declaration_statement?(X(this._flags.parent.mode)&&(this._flags.declaration_assignment=!1),this._flags.declaration_assignment?(this._flags.declaration_assignment=!1,this.print_newline(!1,!0)):this._options.comma_first&&this.allow_wrap_or_preserved_newline(v)):this._flags.mode===de.ObjectLiteral||this._flags.mode===de.Statement&&this._flags.parent.mode===de.ObjectLiteral?(this._flags.mode===de.Statement&&this.restore_mode(),this._flags.inline_frame||this.print_newline()):this._options.comma_first&&this.allow_wrap_or_preserved_newline(v)},Z.prototype.handle_operator=function(v){var Q=v.text==="*"&&(q(this._flags.last_token,["function","yield"])||B(this._flags.last_token.type,[K.START_BLOCK,K.COMMA,K.END_BLOCK,K.SEMICOLON])),he=B(v.text,["-","+"])&&(B(this._flags.last_token.type,[K.START_BLOCK,K.START_EXPR,K.EQUALS,K.OPERATOR])||B(this._flags.last_token.text,F)||this._flags.last_token.text===",");if(!this.start_of_statement(v)){var Ue=!Q;this.handle_whitespace_and_comments(v,Ue)}if(v.text==="*"&&this._flags.last_token.type===K.DOT){this.print_token(v);return}if(v.text==="::"){this.print_token(v);return}if(B(v.text,["-","+"])&&this.start_of_object_property()){this.print_token(v);return}if(this._flags.last_token.type===K.OPERATOR&&B(this._options.operator_position,ie)&&this.allow_wrap_or_preserved_newline(v),v.text===":"&&this._flags.in_case){this.print_token(v),this._flags.in_case=!1,this._flags.case_body=!0,this._tokens.peek().type!==K.START_BLOCK?(this.indent(),this.print_newline(),this._flags.case_block=!1):(this._flags.case_block=!0,this._output.space_before_token=!0);return}var Oe=!0,ft=!0,Et=!1;if(v.text===":"?this._flags.ternary_depth===0?Oe=!1:(this._flags.ternary_depth-=1,Et=!0):v.text==="?"&&(this._flags.ternary_depth+=1),!he&&!Q&&this._options.preserve_newlines&&B(v.text,R)){var Ft=v.text===":",Ut=Ft&&Et,Se=Ft&&!Et;switch(this._options.operator_position){case Y.before_newline:this._output.space_before_token=!Se,this.print_token(v),(!Ft||Ut)&&this.allow_wrap_or_preserved_newline(v),this._output.space_before_token=!0;return;case Y.after_newline:this._output.space_before_token=!0,!Ft||Ut?this._tokens.peek().newlines?this.print_newline(!1,!0):this.allow_wrap_or_preserved_newline(v):this._output.space_before_token=!1,this.print_token(v),this._output.space_before_token=!0;return;case Y.preserve_newline:Se||this.allow_wrap_or_preserved_newline(v),Oe=!(this._output.just_added_newline()||Se),this._output.space_before_token=Oe,this.print_token(v),this._output.space_before_token=!0;return}}if(Q){this.allow_wrap_or_preserved_newline(v),Oe=!1;var Gt=this._tokens.peek();ft=Gt&&B(Gt.type,[K.WORD,K.RESERVED])}else if(v.text==="...")this.allow_wrap_or_preserved_newline(v),Oe=this._flags.last_token.type===K.START_BLOCK,ft=!1;else if(B(v.text,["--","++","!","~"])||he){if((this._flags.last_token.type===K.COMMA||this._flags.last_token.type===K.START_EXPR)&&this.allow_wrap_or_preserved_newline(v),Oe=!1,ft=!1,v.newlines&&(v.text==="--"||v.text==="++"||v.text==="~")){var ht=q(this._flags.last_token,ae)&&v.newlines;ht&&(this._previous_flags.if_block||this._previous_flags.else_block)&&this.restore_mode(),this.print_newline(ht,!0)}this._flags.last_token.text===";"&&X(this._flags.mode)&&(Oe=!0),this._flags.last_token.type===K.RESERVED?Oe=!0:this._flags.last_token.type===K.END_EXPR?Oe=!(this._flags.last_token.text==="]"&&(v.text==="--"||v.text==="++")):this._flags.last_token.type===K.OPERATOR&&(Oe=B(v.text,["--","-","++","+"])&&B(this._flags.last_token.text,["--","-","++","+"]),B(v.text,["+","-"])&&B(this._flags.last_token.text,["--","++"])&&(ft=!0)),(this._flags.mode===de.BlockStatement&&!this._flags.inline_frame||this._flags.mode===de.Statement)&&(this._flags.last_token.text==="{"||this._flags.last_token.text===";")&&this.print_newline()}this._output.space_before_token=this._output.space_before_token||Oe,this.print_token(v),this._output.space_before_token=ft},Z.prototype.handle_block_comment=function(v,Q){if(this._output.raw){this._output.add_raw_token(v),v.directives&&v.directives.preserve==="end"&&(this._output.raw=this._options.test_output_raw);return}if(v.directives){this.print_newline(!1,Q),this.print_token(v),v.directives.preserve==="start"&&(this._output.raw=!0),this.print_newline(!1,!0);return}if(!p.newline.test(v.text)&&!v.newlines){this._output.space_before_token=!0,this.print_token(v),this._output.space_before_token=!0;return}else this.print_block_commment(v,Q)},Z.prototype.print_block_commment=function(v,Q){var he=W(v.text),Ue,Oe=!1,ft=!1,Et=v.whitespace_before,Ft=Et.length;if(this.print_newline(!1,Q),this.print_token_line_indentation(v),this._output.add_token(he[0]),this.print_newline(!1,Q),he.length>1){for(he=he.slice(1),Oe=G(he,"*"),ft=ne(he,Et),Oe&&(this._flags.alignment=1),Ue=0;Ue<he.length;Ue++)Oe?(this.print_token_line_indentation(v),this._output.add_token(D(he[Ue]))):ft&&he[Ue]?(this.print_token_line_indentation(v),this._output.add_token(he[Ue].substring(Ft))):(this._output.current_line.set_indent(-1),this._output.add_token(he[Ue])),this.print_newline(!1,Q);this._flags.alignment=0}},Z.prototype.handle_comment=function(v,Q){v.newlines?this.print_newline(!1,Q):this._output.trim(!0),this._output.space_before_token=!0,this.print_token(v),this.print_newline(!1,Q)},Z.prototype.handle_dot=function(v){this.start_of_statement(v)||this.handle_whitespace_and_comments(v,!0),this._flags.last_token.text.match("^[0-9]+$")&&(this._output.space_before_token=!0),q(this._flags.last_token,ae)?this._output.space_before_token=!1:this.allow_wrap_or_preserved_newline(v,this._flags.last_token.text===")"&&this._options.break_chained_methods),this._options.unindent_chained_methods&&this._output.just_added_newline()&&this.deindent(),this.print_token(v)},Z.prototype.handle_unknown=function(v,Q){this.print_token(v),v.text[v.text.length-1]===`
`&&this.print_newline(!1,Q)},Z.prototype.handle_eof=function(v){for(;this._flags.mode===de.Statement;)this.restore_mode();this.handle_whitespace_and_comments(v)},ee.exports.Beautifier=Z},function(ee){function A(h){this.__parent=h,this.__character_count=0,this.__indent_count=-1,this.__alignment_count=0,this.__wrap_point_index=0,this.__wrap_point_character_count=0,this.__wrap_point_indent_count=-1,this.__wrap_point_alignment_count=0,this.__items=[]}A.prototype.clone_empty=function(){var h=new A(this.__parent);return h.set_indent(this.__indent_count,this.__alignment_count),h},A.prototype.item=function(h){return h<0?this.__items[this.__items.length+h]:this.__items[h]},A.prototype.has_match=function(h){for(var p=this.__items.length-1;p>=0;p--)if(this.__items[p].match(h))return!0;return!1},A.prototype.set_indent=function(h,p){this.is_empty()&&(this.__indent_count=h||0,this.__alignment_count=p||0,this.__character_count=this.__parent.get_indent_size(this.__indent_count,this.__alignment_count))},A.prototype._set_wrap_point=function(){this.__parent.wrap_line_length&&(this.__wrap_point_index=this.__items.length,this.__wrap_point_character_count=this.__character_count,this.__wrap_point_indent_count=this.__parent.next_line.__indent_count,this.__wrap_point_alignment_count=this.__parent.next_line.__alignment_count)},A.prototype._should_wrap=function(){return this.__wrap_point_index&&this.__character_count>this.__parent.wrap_line_length&&this.__wrap_point_character_count>this.__parent.next_line.__character_count},A.prototype._allow_wrap=function(){if(this._should_wrap()){this.__parent.add_new_line();var h=this.__parent.current_line;return h.set_indent(this.__wrap_point_indent_count,this.__wrap_point_alignment_count),h.__items=this.__items.slice(this.__wrap_point_index),this.__items=this.__items.slice(0,this.__wrap_point_index),h.__character_count+=this.__character_count-this.__wrap_point_character_count,this.__character_count=this.__wrap_point_character_count,h.__items[0]===" "&&(h.__items.splice(0,1),h.__character_count-=1),!0}return!1},A.prototype.is_empty=function(){return this.__items.length===0},A.prototype.last=function(){return this.is_empty()?null:this.__items[this.__items.length-1]},A.prototype.push=function(h){this.__items.push(h);var p=h.lastIndexOf(`
`);p!==-1?this.__character_count=h.length-p:this.__character_count+=h.length},A.prototype.pop=function(){var h=null;return this.is_empty()||(h=this.__items.pop(),this.__character_count-=h.length),h},A.prototype._remove_indent=function(){this.__indent_count>0&&(this.__indent_count-=1,this.__character_count-=this.__parent.indent_size)},A.prototype._remove_wrap_indent=function(){this.__wrap_point_indent_count>0&&(this.__wrap_point_indent_count-=1)},A.prototype.trim=function(){for(;this.last()===" ";)this.__items.pop(),this.__character_count-=1},A.prototype.toString=function(){var h="";return this.is_empty()?this.__parent.indent_empty_lines&&(h=this.__parent.get_indent_string(this.__indent_count)):(h=this.__parent.get_indent_string(this.__indent_count,this.__alignment_count),h+=this.__items.join("")),h};function E(h,p){this.__cache=[""],this.__indent_size=h.indent_size,this.__indent_string=h.indent_char,h.indent_with_tabs||(this.__indent_string=new Array(h.indent_size+1).join(h.indent_char)),p=p||"",h.indent_level>0&&(p=new Array(h.indent_level+1).join(this.__indent_string)),this.__base_string=p,this.__base_string_length=p.length}E.prototype.get_indent_size=function(h,p){var _=this.__base_string_length;return p=p||0,h<0&&(_=0),_+=h*this.__indent_size,_+=p,_},E.prototype.get_indent_string=function(h,p){var _=this.__base_string;return p=p||0,h<0&&(h=0,_=""),p+=h*this.__indent_size,this.__ensure_cache(p),_+=this.__cache[p],_},E.prototype.__ensure_cache=function(h){for(;h>=this.__cache.length;)this.__add_column()},E.prototype.__add_column=function(){var h=this.__cache.length,p=0,_="";this.__indent_size&&h>=this.__indent_size&&(p=Math.floor(h/this.__indent_size),h-=p*this.__indent_size,_=new Array(p+1).join(this.__indent_string)),h&&(_+=new Array(h+1).join(" ")),this.__cache.push(_)};function x(h,p){this.__indent_cache=new E(h,p),this.raw=!1,this._end_with_newline=h.end_with_newline,this.indent_size=h.indent_size,this.wrap_line_length=h.wrap_line_length,this.indent_empty_lines=h.indent_empty_lines,this.__lines=[],this.previous_line=null,this.current_line=null,this.next_line=new A(this),this.space_before_token=!1,this.non_breaking_space=!1,this.previous_token_wrapped=!1,this.__add_outputline()}x.prototype.__add_outputline=function(){this.previous_line=this.current_line,this.current_line=this.next_line.clone_empty(),this.__lines.push(this.current_line)},x.prototype.get_line_number=function(){return this.__lines.length},x.prototype.get_indent_string=function(h,p){return this.__indent_cache.get_indent_string(h,p)},x.prototype.get_indent_size=function(h,p){return this.__indent_cache.get_indent_size(h,p)},x.prototype.is_empty=function(){return!this.previous_line&&this.current_line.is_empty()},x.prototype.add_new_line=function(h){return this.is_empty()||!h&&this.just_added_newline()?!1:(this.raw||this.__add_outputline(),!0)},x.prototype.get_code=function(h){this.trim(!0);var p=this.current_line.pop();p&&(p[p.length-1]===`
`&&(p=p.replace(/\n+$/g,"")),this.current_line.push(p)),this._end_with_newline&&this.__add_outputline();var _=this.__lines.join(`
`);return h!==`
`&&(_=_.replace(/[\n]/g,h)),_},x.prototype.set_wrap_point=function(){this.current_line._set_wrap_point()},x.prototype.set_indent=function(h,p){return h=h||0,p=p||0,this.next_line.set_indent(h,p),this.__lines.length>1?(this.current_line.set_indent(h,p),!0):(this.current_line.set_indent(),!1)},x.prototype.add_raw_token=function(h){for(var p=0;p<h.newlines;p++)this.__add_outputline();this.current_line.set_indent(-1),this.current_line.push(h.whitespace_before),this.current_line.push(h.text),this.space_before_token=!1,this.non_breaking_space=!1,this.previous_token_wrapped=!1},x.prototype.add_token=function(h){this.__add_space_before_token(),this.current_line.push(h),this.space_before_token=!1,this.non_breaking_space=!1,this.previous_token_wrapped=this.current_line._allow_wrap()},x.prototype.__add_space_before_token=function(){this.space_before_token&&!this.just_added_newline()&&(this.non_breaking_space||this.set_wrap_point(),this.current_line.push(" "))},x.prototype.remove_indent=function(h){for(var p=this.__lines.length;h<p;)this.__lines[h]._remove_indent(),h++;this.current_line._remove_wrap_indent()},x.prototype.trim=function(h){for(h=h===void 0?!1:h,this.current_line.trim();h&&this.__lines.length>1&&this.current_line.is_empty();)this.__lines.pop(),this.current_line=this.__lines[this.__lines.length-1],this.current_line.trim();this.previous_line=this.__lines.length>1?this.__lines[this.__lines.length-2]:null},x.prototype.just_added_newline=function(){return this.current_line.is_empty()},x.prototype.just_added_blankline=function(){return this.is_empty()||this.current_line.is_empty()&&this.previous_line.is_empty()},x.prototype.ensure_empty_line_above=function(h,p){for(var _=this.__lines.length-2;_>=0;){var C=this.__lines[_];if(C.is_empty())break;if(C.item(0).indexOf(h)!==0&&C.item(-1)!==p){this.__lines.splice(_+1,0,new A(this)),this.previous_line=this.__lines[this.__lines.length-2];break}_--}},ee.exports.Output=x},function(ee){function A(E,x,h,p){this.type=E,this.text=x,this.comments_before=null,this.newlines=h||0,this.whitespace_before=p||"",this.parent=null,this.next=null,this.previous=null,this.opened=null,this.closed=null,this.directives=null}ee.exports.Token=A},function(ee,A){var E="\\x23\\x24\\x40\\x41-\\x5a\\x5f\\x61-\\x7a",x="\\x24\\x30-\\x39\\x41-\\x5a\\x5f\\x61-\\x7a",h="\\xaa\\xb5\\xba\\xc0-\\xd6\\xd8-\\xf6\\xf8-\\u02c1\\u02c6-\\u02d1\\u02e0-\\u02e4\\u02ec\\u02ee\\u0370-\\u0374\\u0376\\u0377\\u037a-\\u037d\\u0386\\u0388-\\u038a\\u038c\\u038e-\\u03a1\\u03a3-\\u03f5\\u03f7-\\u0481\\u048a-\\u0527\\u0531-\\u0556\\u0559\\u0561-\\u0587\\u05d0-\\u05ea\\u05f0-\\u05f2\\u0620-\\u064a\\u066e\\u066f\\u0671-\\u06d3\\u06d5\\u06e5\\u06e6\\u06ee\\u06ef\\u06fa-\\u06fc\\u06ff\\u0710\\u0712-\\u072f\\u074d-\\u07a5\\u07b1\\u07ca-\\u07ea\\u07f4\\u07f5\\u07fa\\u0800-\\u0815\\u081a\\u0824\\u0828\\u0840-\\u0858\\u08a0\\u08a2-\\u08ac\\u0904-\\u0939\\u093d\\u0950\\u0958-\\u0961\\u0971-\\u0977\\u0979-\\u097f\\u0985-\\u098c\\u098f\\u0990\\u0993-\\u09a8\\u09aa-\\u09b0\\u09b2\\u09b6-\\u09b9\\u09bd\\u09ce\\u09dc\\u09dd\\u09df-\\u09e1\\u09f0\\u09f1\\u0a05-\\u0a0a\\u0a0f\\u0a10\\u0a13-\\u0a28\\u0a2a-\\u0a30\\u0a32\\u0a33\\u0a35\\u0a36\\u0a38\\u0a39\\u0a59-\\u0a5c\\u0a5e\\u0a72-\\u0a74\\u0a85-\\u0a8d\\u0a8f-\\u0a91\\u0a93-\\u0aa8\\u0aaa-\\u0ab0\\u0ab2\\u0ab3\\u0ab5-\\u0ab9\\u0abd\\u0ad0\\u0ae0\\u0ae1\\u0b05-\\u0b0c\\u0b0f\\u0b10\\u0b13-\\u0b28\\u0b2a-\\u0b30\\u0b32\\u0b33\\u0b35-\\u0b39\\u0b3d\\u0b5c\\u0b5d\\u0b5f-\\u0b61\\u0b71\\u0b83\\u0b85-\\u0b8a\\u0b8e-\\u0b90\\u0b92-\\u0b95\\u0b99\\u0b9a\\u0b9c\\u0b9e\\u0b9f\\u0ba3\\u0ba4\\u0ba8-\\u0baa\\u0bae-\\u0bb9\\u0bd0\\u0c05-\\u0c0c\\u0c0e-\\u0c10\\u0c12-\\u0c28\\u0c2a-\\u0c33\\u0c35-\\u0c39\\u0c3d\\u0c58\\u0c59\\u0c60\\u0c61\\u0c85-\\u0c8c\\u0c8e-\\u0c90\\u0c92-\\u0ca8\\u0caa-\\u0cb3\\u0cb5-\\u0cb9\\u0cbd\\u0cde\\u0ce0\\u0ce1\\u0cf1\\u0cf2\\u0d05-\\u0d0c\\u0d0e-\\u0d10\\u0d12-\\u0d3a\\u0d3d\\u0d4e\\u0d60\\u0d61\\u0d7a-\\u0d7f\\u0d85-\\u0d96\\u0d9a-\\u0db1\\u0db3-\\u0dbb\\u0dbd\\u0dc0-\\u0dc6\\u0e01-\\u0e30\\u0e32\\u0e33\\u0e40-\\u0e46\\u0e81\\u0e82\\u0e84\\u0e87\\u0e88\\u0e8a\\u0e8d\\u0e94-\\u0e97\\u0e99-\\u0e9f\\u0ea1-\\u0ea3\\u0ea5\\u0ea7\\u0eaa\\u0eab\\u0ead-\\u0eb0\\u0eb2\\u0eb3\\u0ebd\\u0ec0-\\u0ec4\\u0ec6\\u0edc-\\u0edf\\u0f00\\u0f40-\\u0f47\\u0f49-\\u0f6c\\u0f88-\\u0f8c\\u1000-\\u102a\\u103f\\u1050-\\u1055\\u105a-\\u105d\\u1061\\u1065\\u1066\\u106e-\\u1070\\u1075-\\u1081\\u108e\\u10a0-\\u10c5\\u10c7\\u10cd\\u10d0-\\u10fa\\u10fc-\\u1248\\u124a-\\u124d\\u1250-\\u1256\\u1258\\u125a-\\u125d\\u1260-\\u1288\\u128a-\\u128d\\u1290-\\u12b0\\u12b2-\\u12b5\\u12b8-\\u12be\\u12c0\\u12c2-\\u12c5\\u12c8-\\u12d6\\u12d8-\\u1310\\u1312-\\u1315\\u1318-\\u135a\\u1380-\\u138f\\u13a0-\\u13f4\\u1401-\\u166c\\u166f-\\u167f\\u1681-\\u169a\\u16a0-\\u16ea\\u16ee-\\u16f0\\u1700-\\u170c\\u170e-\\u1711\\u1720-\\u1731\\u1740-\\u1751\\u1760-\\u176c\\u176e-\\u1770\\u1780-\\u17b3\\u17d7\\u17dc\\u1820-\\u1877\\u1880-\\u18a8\\u18aa\\u18b0-\\u18f5\\u1900-\\u191c\\u1950-\\u196d\\u1970-\\u1974\\u1980-\\u19ab\\u19c1-\\u19c7\\u1a00-\\u1a16\\u1a20-\\u1a54\\u1aa7\\u1b05-\\u1b33\\u1b45-\\u1b4b\\u1b83-\\u1ba0\\u1bae\\u1baf\\u1bba-\\u1be5\\u1c00-\\u1c23\\u1c4d-\\u1c4f\\u1c5a-\\u1c7d\\u1ce9-\\u1cec\\u1cee-\\u1cf1\\u1cf5\\u1cf6\\u1d00-\\u1dbf\\u1e00-\\u1f15\\u1f18-\\u1f1d\\u1f20-\\u1f45\\u1f48-\\u1f4d\\u1f50-\\u1f57\\u1f59\\u1f5b\\u1f5d\\u1f5f-\\u1f7d\\u1f80-\\u1fb4\\u1fb6-\\u1fbc\\u1fbe\\u1fc2-\\u1fc4\\u1fc6-\\u1fcc\\u1fd0-\\u1fd3\\u1fd6-\\u1fdb\\u1fe0-\\u1fec\\u1ff2-\\u1ff4\\u1ff6-\\u1ffc\\u2071\\u207f\\u2090-\\u209c\\u2102\\u2107\\u210a-\\u2113\\u2115\\u2119-\\u211d\\u2124\\u2126\\u2128\\u212a-\\u212d\\u212f-\\u2139\\u213c-\\u213f\\u2145-\\u2149\\u214e\\u2160-\\u2188\\u2c00-\\u2c2e\\u2c30-\\u2c5e\\u2c60-\\u2ce4\\u2ceb-\\u2cee\\u2cf2\\u2cf3\\u2d00-\\u2d25\\u2d27\\u2d2d\\u2d30-\\u2d67\\u2d6f\\u2d80-\\u2d96\\u2da0-\\u2da6\\u2da8-\\u2dae\\u2db0-\\u2db6\\u2db8-\\u2dbe\\u2dc0-\\u2dc6\\u2dc8-\\u2dce\\u2dd0-\\u2dd6\\u2dd8-\\u2dde\\u2e2f\\u3005-\\u3007\\u3021-\\u3029\\u3031-\\u3035\\u3038-\\u303c\\u3041-\\u3096\\u309d-\\u309f\\u30a1-\\u30fa\\u30fc-\\u30ff\\u3105-\\u312d\\u3131-\\u318e\\u31a0-\\u31ba\\u31f0-\\u31ff\\u3400-\\u4db5\\u4e00-\\u9fcc\\ua000-\\ua48c\\ua4d0-\\ua4fd\\ua500-\\ua60c\\ua610-\\ua61f\\ua62a\\ua62b\\ua640-\\ua66e\\ua67f-\\ua697\\ua6a0-\\ua6ef\\ua717-\\ua71f\\ua722-\\ua788\\ua78b-\\ua78e\\ua790-\\ua793\\ua7a0-\\ua7aa\\ua7f8-\\ua801\\ua803-\\ua805\\ua807-\\ua80a\\ua80c-\\ua822\\ua840-\\ua873\\ua882-\\ua8b3\\ua8f2-\\ua8f7\\ua8fb\\ua90a-\\ua925\\ua930-\\ua946\\ua960-\\ua97c\\ua984-\\ua9b2\\ua9cf\\uaa00-\\uaa28\\uaa40-\\uaa42\\uaa44-\\uaa4b\\uaa60-\\uaa76\\uaa7a\\uaa80-\\uaaaf\\uaab1\\uaab5\\uaab6\\uaab9-\\uaabd\\uaac0\\uaac2\\uaadb-\\uaadd\\uaae0-\\uaaea\\uaaf2-\\uaaf4\\uab01-\\uab06\\uab09-\\uab0e\\uab11-\\uab16\\uab20-\\uab26\\uab28-\\uab2e\\uabc0-\\uabe2\\uac00-\\ud7a3\\ud7b0-\\ud7c6\\ud7cb-\\ud7fb\\uf900-\\ufa6d\\ufa70-\\ufad9\\ufb00-\\ufb06\\ufb13-\\ufb17\\ufb1d\\ufb1f-\\ufb28\\ufb2a-\\ufb36\\ufb38-\\ufb3c\\ufb3e\\ufb40\\ufb41\\ufb43\\ufb44\\ufb46-\\ufbb1\\ufbd3-\\ufd3d\\ufd50-\\ufd8f\\ufd92-\\ufdc7\\ufdf0-\\ufdfb\\ufe70-\\ufe74\\ufe76-\\ufefc\\uff21-\\uff3a\\uff41-\\uff5a\\uff66-\\uffbe\\uffc2-\\uffc7\\uffca-\\uffcf\\uffd2-\\uffd7\\uffda-\\uffdc",p="\\u0300-\\u036f\\u0483-\\u0487\\u0591-\\u05bd\\u05bf\\u05c1\\u05c2\\u05c4\\u05c5\\u05c7\\u0610-\\u061a\\u0620-\\u0649\\u0672-\\u06d3\\u06e7-\\u06e8\\u06fb-\\u06fc\\u0730-\\u074a\\u0800-\\u0814\\u081b-\\u0823\\u0825-\\u0827\\u0829-\\u082d\\u0840-\\u0857\\u08e4-\\u08fe\\u0900-\\u0903\\u093a-\\u093c\\u093e-\\u094f\\u0951-\\u0957\\u0962-\\u0963\\u0966-\\u096f\\u0981-\\u0983\\u09bc\\u09be-\\u09c4\\u09c7\\u09c8\\u09d7\\u09df-\\u09e0\\u0a01-\\u0a03\\u0a3c\\u0a3e-\\u0a42\\u0a47\\u0a48\\u0a4b-\\u0a4d\\u0a51\\u0a66-\\u0a71\\u0a75\\u0a81-\\u0a83\\u0abc\\u0abe-\\u0ac5\\u0ac7-\\u0ac9\\u0acb-\\u0acd\\u0ae2-\\u0ae3\\u0ae6-\\u0aef\\u0b01-\\u0b03\\u0b3c\\u0b3e-\\u0b44\\u0b47\\u0b48\\u0b4b-\\u0b4d\\u0b56\\u0b57\\u0b5f-\\u0b60\\u0b66-\\u0b6f\\u0b82\\u0bbe-\\u0bc2\\u0bc6-\\u0bc8\\u0bca-\\u0bcd\\u0bd7\\u0be6-\\u0bef\\u0c01-\\u0c03\\u0c46-\\u0c48\\u0c4a-\\u0c4d\\u0c55\\u0c56\\u0c62-\\u0c63\\u0c66-\\u0c6f\\u0c82\\u0c83\\u0cbc\\u0cbe-\\u0cc4\\u0cc6-\\u0cc8\\u0cca-\\u0ccd\\u0cd5\\u0cd6\\u0ce2-\\u0ce3\\u0ce6-\\u0cef\\u0d02\\u0d03\\u0d46-\\u0d48\\u0d57\\u0d62-\\u0d63\\u0d66-\\u0d6f\\u0d82\\u0d83\\u0dca\\u0dcf-\\u0dd4\\u0dd6\\u0dd8-\\u0ddf\\u0df2\\u0df3\\u0e34-\\u0e3a\\u0e40-\\u0e45\\u0e50-\\u0e59\\u0eb4-\\u0eb9\\u0ec8-\\u0ecd\\u0ed0-\\u0ed9\\u0f18\\u0f19\\u0f20-\\u0f29\\u0f35\\u0f37\\u0f39\\u0f41-\\u0f47\\u0f71-\\u0f84\\u0f86-\\u0f87\\u0f8d-\\u0f97\\u0f99-\\u0fbc\\u0fc6\\u1000-\\u1029\\u1040-\\u1049\\u1067-\\u106d\\u1071-\\u1074\\u1082-\\u108d\\u108f-\\u109d\\u135d-\\u135f\\u170e-\\u1710\\u1720-\\u1730\\u1740-\\u1750\\u1772\\u1773\\u1780-\\u17b2\\u17dd\\u17e0-\\u17e9\\u180b-\\u180d\\u1810-\\u1819\\u1920-\\u192b\\u1930-\\u193b\\u1951-\\u196d\\u19b0-\\u19c0\\u19c8-\\u19c9\\u19d0-\\u19d9\\u1a00-\\u1a15\\u1a20-\\u1a53\\u1a60-\\u1a7c\\u1a7f-\\u1a89\\u1a90-\\u1a99\\u1b46-\\u1b4b\\u1b50-\\u1b59\\u1b6b-\\u1b73\\u1bb0-\\u1bb9\\u1be6-\\u1bf3\\u1c00-\\u1c22\\u1c40-\\u1c49\\u1c5b-\\u1c7d\\u1cd0-\\u1cd2\\u1d00-\\u1dbe\\u1e01-\\u1f15\\u200c\\u200d\\u203f\\u2040\\u2054\\u20d0-\\u20dc\\u20e1\\u20e5-\\u20f0\\u2d81-\\u2d96\\u2de0-\\u2dff\\u3021-\\u3028\\u3099\\u309a\\ua640-\\ua66d\\ua674-\\ua67d\\ua69f\\ua6f0-\\ua6f1\\ua7f8-\\ua800\\ua806\\ua80b\\ua823-\\ua827\\ua880-\\ua881\\ua8b4-\\ua8c4\\ua8d0-\\ua8d9\\ua8f3-\\ua8f7\\ua900-\\ua909\\ua926-\\ua92d\\ua930-\\ua945\\ua980-\\ua983\\ua9b3-\\ua9c0\\uaa00-\\uaa27\\uaa40-\\uaa41\\uaa4c-\\uaa4d\\uaa50-\\uaa59\\uaa7b\\uaae0-\\uaae9\\uaaf2-\\uaaf3\\uabc0-\\uabe1\\uabec\\uabed\\uabf0-\\uabf9\\ufb20-\\ufb28\\ufe00-\\ufe0f\\ufe20-\\ufe26\\ufe33\\ufe34\\ufe4d-\\ufe4f\\uff10-\\uff19\\uff3f",_="\\\\u[0-9a-fA-F]{4}|\\\\u\\{[0-9a-fA-F]+\\}",C="(?:"+_+"|["+E+h+"])",F="(?:"+_+"|["+x+h+p+"])*";A.identifier=new RegExp(C+F,"g"),A.identifierStart=new RegExp(C),A.identifierMatch=new RegExp("(?:"+_+"|["+x+h+p+"])+");var R=/[\u1680\u180e\u2000-\u200a\u202f\u205f\u3000\ufeff]/;A.newline=/[\n\r\u2028\u2029]/,A.lineBreak=new RegExp(`\r
|`+A.newline.source),A.allLineBreaks=new RegExp(A.lineBreak.source,"g")},function(ee,A,E){var x=E(6).Options,h=["before-newline","after-newline","preserve-newline"];function p(_){x.call(this,_,"js");var C=this.raw_options.brace_style||null;C==="expand-strict"?this.raw_options.brace_style="expand":C==="collapse-preserve-inline"?this.raw_options.brace_style="collapse,preserve-inline":this.raw_options.braces_on_own_line!==void 0&&(this.raw_options.brace_style=this.raw_options.braces_on_own_line?"expand":"collapse");var F=this._get_selection_list("brace_style",["collapse","expand","end-expand","none","preserve-inline"]);this.brace_preserve_inline=!1,this.brace_style="collapse";for(var R=0;R<F.length;R++)F[R]==="preserve-inline"?this.brace_preserve_inline=!0:this.brace_style=F[R];this.unindent_chained_methods=this._get_boolean("unindent_chained_methods"),this.break_chained_methods=this._get_boolean("break_chained_methods"),this.space_in_paren=this._get_boolean("space_in_paren"),this.space_in_empty_paren=this._get_boolean("space_in_empty_paren"),this.jslint_happy=this._get_boolean("jslint_happy"),this.space_after_anon_function=this._get_boolean("space_after_anon_function"),this.space_after_named_function=this._get_boolean("space_after_named_function"),this.keep_array_indentation=this._get_boolean("keep_array_indentation"),this.space_before_conditional=this._get_boolean("space_before_conditional",!0),this.unescape_strings=this._get_boolean("unescape_strings"),this.e4x=this._get_boolean("e4x"),this.comma_first=this._get_boolean("comma_first"),this.operator_position=this._get_selection("operator_position",h),this.test_output_raw=this._get_boolean("test_output_raw"),this.jslint_happy&&(this.space_after_anon_function=!0)}p.prototype=new x,ee.exports.Options=p},function(ee){function A(h,p){this.raw_options=E(h,p),this.disabled=this._get_boolean("disabled"),this.eol=this._get_characters("eol","auto"),this.end_with_newline=this._get_boolean("end_with_newline"),this.indent_size=this._get_number("indent_size",4),this.indent_char=this._get_characters("indent_char"," "),this.indent_level=this._get_number("indent_level"),this.preserve_newlines=this._get_boolean("preserve_newlines",!0),this.max_preserve_newlines=this._get_number("max_preserve_newlines",32786),this.preserve_newlines||(this.max_preserve_newlines=0),this.indent_with_tabs=this._get_boolean("indent_with_tabs",this.indent_char===" "),this.indent_with_tabs&&(this.indent_char=" ",this.indent_size===1&&(this.indent_size=4)),this.wrap_line_length=this._get_number("wrap_line_length",this._get_number("max_char")),this.indent_empty_lines=this._get_boolean("indent_empty_lines"),this.templating=this._get_selection_list("templating",["auto","none","angular","django","erb","handlebars","php","smarty"],["auto"])}A.prototype._get_array=function(h,p){var _=this.raw_options[h],C=p||[];return typeof _=="object"?_!==null&&typeof _.concat=="function"&&(C=_.concat()):typeof _=="string"&&(C=_.split(/[^a-zA-Z0-9_\/\-]+/)),C},A.prototype._get_boolean=function(h,p){var _=this.raw_options[h],C=_===void 0?!!p:!!_;return C},A.prototype._get_characters=function(h,p){var _=this.raw_options[h],C=p||"";return typeof _=="string"&&(C=_.replace(/\\r/,"\r").replace(/\\n/,`
`).replace(/\\t/," ")),C},A.prototype._get_number=function(h,p){var _=this.raw_options[h];p=parseInt(p,10),isNaN(p)&&(p=0);var C=parseInt(_,10);return isNaN(C)&&(C=p),C},A.prototype._get_selection=function(h,p,_){var C=this._get_selection_list(h,p,_);if(C.length!==1)throw new Error("Invalid Option Value: The option '"+h+`' can only be one of the following values:
`+p+`
You passed in: '`+this.raw_options[h]+"'");return C[0]},A.prototype._get_selection_list=function(h,p,_){if(!p||p.length===0)throw new Error("Selection list cannot be empty.");if(_=_||[p[0]],!this._is_valid_selection(_,p))throw new Error("Invalid Default Value!");var C=this._get_array(h,_);if(!this._is_valid_selection(C,p))throw new Error("Invalid Option Value: The option '"+h+`' can contain only the following values:
`+p+`
You passed in: '`+this.raw_options[h]+"'");return C},A.prototype._is_valid_selection=function(h,p){return h.length&&p.length&&!h.some(function(_){return p.indexOf(_)===-1})};function E(h,p){var _={};h=x(h);var C;for(C in h)C!==p&&(_[C]=h[C]);if(p&&h[p])for(C in h[p])_[C]=h[p][C];return _}function x(h){var p={},_;for(_ in h){var C=_.replace(/-/g,"_");p[C]=h[_]}return p}ee.exports.Options=A,ee.exports.normalizeOpts=x,ee.exports.mergeOpts=E},function(ee,A,E){var x=E(8).InputScanner,h=E(9).Tokenizer,p=E(9).TOKEN,_=E(13).Directives,C=E(4),F=E(12).Pattern,R=E(14).TemplatablePattern;function K(G,ne){return ne.indexOf(G)!==-1}var B={START_EXPR:"TK_START_EXPR",END_EXPR:"TK_END_EXPR",START_BLOCK:"TK_START_BLOCK",END_BLOCK:"TK_END_BLOCK",WORD:"TK_WORD",RESERVED:"TK_RESERVED",SEMICOLON:"TK_SEMICOLON",STRING:"TK_STRING",EQUALS:"TK_EQUALS",OPERATOR:"TK_OPERATOR",COMMA:"TK_COMMA",BLOCK_COMMENT:"TK_BLOCK_COMMENT",COMMENT:"TK_COMMENT",DOT:"TK_DOT",UNKNOWN:"TK_UNKNOWN",START:p.START,RAW:p.RAW,EOF:p.EOF},D=new _(/\/\*/,/\*\//),I=/0[xX][0123456789abcdefABCDEF_]*n?|0[oO][01234567_]*n?|0[bB][01_]*n?|\d[\d_]*n|(?:\.\d[\d_]*|\d[\d_]*\.?[\d_]*)(?:[eE][+-]?[\d_]+)?/,S=/[0-9]/,q=/[^\d\.]/,ae=">>> === !== &&= ??= ||= << && >= ** != == <= >> || ?? |> < / - + > : & % ? ^ | *".split(" "),j=">>>= ... >>= <<= === >>> !== **= &&= ??= ||= => ^= :: /= << <= == && -= >= >> != -- += ** || ?? ++ %= &= *= |= |> = ! ? > < : / ^ - + * & % ~ |";j=j.replace(/[-[\]{}()*+?.,\\^$|#]/g,"\\$&"),j="\\?\\.(?!\\d) "+j,j=j.replace(/ /g,"|");var Y=new RegExp(j),ie="continue,try,throw,return,var,let,const,if,switch,case,default,for,while,break,function,import,export".split(","),de=ie.concat(["do","in","of","else","get","set","new","catch","finally","typeof","yield","async","await","from","as","class","extends"]),pe=new RegExp("^(?:"+de.join("|")+")$"),W,M=function(G,ne){h.call(this,G,ne),this._patterns.whitespace=this._patterns.whitespace.matching(/\u00A0\u1680\u180e\u2000-\u200a\u202f\u205f\u3000\ufeff/.source,/\u2028\u2029/.source);var Z=new F(this._input),m=new R(this._input).read_options(this._options);this.__patterns={template:m,identifier:m.starting_with(C.identifier).matching(C.identifierMatch),number:Z.matching(I),punct:Z.matching(Y),comment:Z.starting_with(/\/\//).until(/[\n\r\u2028\u2029]/),block_comment:Z.starting_with(/\/\*/).until_after(/\*\//),html_comment_start:Z.matching(/<!--/),html_comment_end:Z.matching(/-->/),include:Z.starting_with(/#include/).until_after(C.lineBreak),shebang:Z.starting_with(/#!/).until_after(C.lineBreak),xml:Z.matching(/[\s\S]*?<(\/?)([-a-zA-Z:0-9_.]+|{[^}]+?}|!\[CDATA\[[^\]]*?\]\]|)(\s*{[^}]+?}|\s+[-a-zA-Z:0-9_.]+|\s+[-a-zA-Z:0-9_.]+\s*=\s*('[^']*'|"[^"]*"|{([^{}]|{[^}]+?})+?}))*\s*(\/?)\s*>/),single_quote:m.until(/['\\\n\r\u2028\u2029]/),double_quote:m.until(/["\\\n\r\u2028\u2029]/),template_text:m.until(/[`\\$]/),template_expression:m.until(/[`}\\]/)}};M.prototype=new h,M.prototype._is_comment=function(G){return G.type===B.COMMENT||G.type===B.BLOCK_COMMENT||G.type===B.UNKNOWN},M.prototype._is_opening=function(G){return G.type===B.START_BLOCK||G.type===B.START_EXPR},M.prototype._is_closing=function(G,ne){return(G.type===B.END_BLOCK||G.type===B.END_EXPR)&&ne&&(G.text==="]"&&ne.text==="["||G.text===")"&&ne.text==="("||G.text==="}"&&ne.text==="{")},M.prototype._reset=function(){W=!1},M.prototype._get_next_token=function(G,ne){var Z=null;this._readWhitespace();var m=this._input.peek();return m===null?this._create_token(B.EOF,""):(Z=Z||this._read_non_javascript(m),Z=Z||this._read_string(m),Z=Z||this._read_pair(m,this._input.peek(1)),Z=Z||this._read_word(G),Z=Z||this._read_singles(m),Z=Z||this._read_comment(m),Z=Z||this._read_regexp(m,G),Z=Z||this._read_xml(m,G),Z=Z||this._read_punctuation(),Z=Z||this._create_token(B.UNKNOWN,this._input.next()),Z)},M.prototype._read_word=function(G){var ne;if(ne=this.__patterns.identifier.read(),ne!=="")return ne=ne.replace(C.allLineBreaks,`
`),!(G.type===B.DOT||G.type===B.RESERVED&&(G.text==="set"||G.text==="get"))&&pe.test(ne)?(ne==="in"||ne==="of")&&(G.type===B.WORD||G.type===B.STRING)?this._create_token(B.OPERATOR,ne):this._create_token(B.RESERVED,ne):this._create_token(B.WORD,ne);if(ne=this.__patterns.number.read(),ne!=="")return this._create_token(B.WORD,ne)},M.prototype._read_singles=function(G){var ne=null;return G==="("||G==="["?ne=this._create_token(B.START_EXPR,G):G===")"||G==="]"?ne=this._create_token(B.END_EXPR,G):G==="{"?ne=this._create_token(B.START_BLOCK,G):G==="}"?ne=this._create_token(B.END_BLOCK,G):G===";"?ne=this._create_token(B.SEMICOLON,G):G==="."&&q.test(this._input.peek(1))?ne=this._create_token(B.DOT,G):G===","&&(ne=this._create_token(B.COMMA,G)),ne&&this._input.next(),ne},M.prototype._read_pair=function(G,ne){var Z=null;return G==="#"&&ne==="{"&&(Z=this._create_token(B.START_BLOCK,G+ne)),Z&&(this._input.next(),this._input.next()),Z},M.prototype._read_punctuation=function(){var G=this.__patterns.punct.read();if(G!=="")return G==="="?this._create_token(B.EQUALS,G):G==="?."?this._create_token(B.DOT,G):this._create_token(B.OPERATOR,G)},M.prototype._read_non_javascript=function(G){var ne="";if(G==="#"){if(this._is_first_token()&&(ne=this.__patterns.shebang.read(),ne))return this._create_token(B.UNKNOWN,ne.trim()+`
`);if(ne=this.__patterns.include.read(),ne)return this._create_token(B.UNKNOWN,ne.trim()+`
`);G=this._input.next();var Z="#";if(this._input.hasNext()&&this._input.testChar(S)){do G=this._input.next(),Z+=G;while(this._input.hasNext()&&G!=="#"&&G!=="=");return G==="#"||(this._input.peek()==="["&&this._input.peek(1)==="]"?(Z+="[]",this._input.next(),this._input.next()):this._input.peek()==="{"&&this._input.peek(1)==="}"&&(Z+="{}",this._input.next(),this._input.next())),this._create_token(B.WORD,Z)}this._input.back()}else if(G==="<"&&this._is_first_token()){if(ne=this.__patterns.html_comment_start.read(),ne){for(;this._input.hasNext()&&!this._input.testChar(C.newline);)ne+=this._input.next();return W=!0,this._create_token(B.COMMENT,ne)}}else if(W&&G==="-"&&(ne=this.__patterns.html_comment_end.read(),ne))return W=!1,this._create_token(B.COMMENT,ne);return null},M.prototype._read_comment=function(G){var ne=null;if(G==="/"){var Z="";if(this._input.peek(1)==="*"){Z=this.__patterns.block_comment.read();var m=D.get_directives(Z);m&&m.ignore==="start"&&(Z+=D.readIgnored(this._input)),Z=Z.replace(C.allLineBreaks,`
`),ne=this._create_token(B.BLOCK_COMMENT,Z),ne.directives=m}else this._input.peek(1)==="/"&&(Z=this.__patterns.comment.read(),ne=this._create_token(B.COMMENT,Z))}return ne},M.prototype._read_string=function(G){if(G==="`"||G==="'"||G==='"'){var ne=this._input.next();return this.has_char_escapes=!1,G==="`"?ne+=this._read_string_recursive("`",!0,"${"):ne+=this._read_string_recursive(G),this.has_char_escapes&&this._options.unescape_strings&&(ne=X(ne)),this._input.peek()===G&&(ne+=this._input.next()),ne=ne.replace(C.allLineBreaks,`
`),this._create_token(B.STRING,ne)}return null},M.prototype._allow_regexp_or_xml=function(G){return G.type===B.RESERVED&&K(G.text,["return","case","throw","else","do","typeof","yield"])||G.type===B.END_EXPR&&G.text===")"&&G.opened.previous.type===B.RESERVED&&K(G.opened.previous.text,["if","while","for"])||K(G.type,[B.COMMENT,B.START_EXPR,B.START_BLOCK,B.START,B.END_BLOCK,B.OPERATOR,B.EQUALS,B.EOF,B.SEMICOLON,B.COMMA])},M.prototype._read_regexp=function(G,ne){if(G==="/"&&this._allow_regexp_or_xml(ne)){for(var Z=this._input.next(),m=!1,v=!1;this._input.hasNext()&&(m||v||this._input.peek()!==G)&&!this._input.testChar(C.newline);)Z+=this._input.peek(),m?m=!1:(m=this._input.peek()==="\\",this._input.peek()==="["?v=!0:this._input.peek()==="]"&&(v=!1)),this._input.next();return this._input.peek()===G&&(Z+=this._input.next(),Z+=this._input.read(C.identifier)),this._create_token(B.STRING,Z)}return null},M.prototype._read_xml=function(G,ne){if(this._options.e4x&&G==="<"&&this._allow_regexp_or_xml(ne)){var Z="",m=this.__patterns.xml.read_match();if(m){for(var v=m[2].replace(/^{\s+/,"{").replace(/\s+}$/,"}"),Q=v.indexOf("{")===0,he=0;m;){var Ue=!!m[1],Oe=m[2],ft=!!m[m.length-1]||Oe.slice(0,8)==="![CDATA[";if(!ft&&(Oe===v||Q&&Oe.replace(/^{\s+/,"{").replace(/\s+}$/,"}"))&&(Ue?--he:++he),Z+=m[0],he<=0)break;m=this.__patterns.xml.read_match()}return m||(Z+=this._input.match(/[\s\S]*/g)[0]),Z=Z.replace(C.allLineBreaks,`
`),this._create_token(B.STRING,Z)}}return null};function X(G){for(var ne="",Z=0,m=new x(G),v=null;m.hasNext();)if(v=m.match(/([\s]|[^\\]|\\\\)+/g),v&&(ne+=v[0]),m.peek()==="\\"){if(m.next(),m.peek()==="x")v=m.match(/x([0-9A-Fa-f]{2})/g);else if(m.peek()==="u")v=m.match(/u([0-9A-Fa-f]{4})/g),v||(v=m.match(/u\{([0-9A-Fa-f]+)\}/g));else{ne+="\\",m.hasNext()&&(ne+=m.next());continue}if(!v||(Z=parseInt(v[1],16),Z>126&&Z<=255&&v[0].indexOf("x")===0))return G;Z>=0&&Z<32||Z>1114111?ne+="\\"+v[0]:Z===34||Z===39||Z===92?ne+="\\"+String.fromCharCode(Z):ne+=String.fromCharCode(Z)}return ne}M.prototype._read_string_recursive=function(G,ne,Z){var m,v;G==="'"?v=this.__patterns.single_quote:G==='"'?v=this.__patterns.double_quote:G==="`"?v=this.__patterns.template_text:G==="}"&&(v=this.__patterns.template_expression);for(var Q=v.read(),he="";this._input.hasNext();){if(he=this._input.next(),he===G||!ne&&C.newline.test(he)){this._input.back();break}else he==="\\"&&this._input.hasNext()?(m=this._input.peek(),m==="x"||m==="u"?this.has_char_escapes=!0:m==="\r"&&this._input.peek(1)===`
`&&this._input.next(),he+=this._input.next()):Z&&(Z==="${"&&he==="$"&&this._input.peek()==="{"&&(he+=this._input.next()),Z===he&&(G==="`"?he+=this._read_string_recursive("}",ne,"`"):he+=this._read_string_recursive("`",ne,"${"),this._input.hasNext()&&(he+=this._input.next())));he+=v.read(),Q+=he}return Q},ee.exports.Tokenizer=M,ee.exports.TOKEN=B,ee.exports.positionable_operators=ae.slice(),ee.exports.line_starters=ie.slice()},function(ee){var A=RegExp.prototype.hasOwnProperty("sticky");function E(x){this.__input=x||"",this.__input_length=this.__input.length,this.__position=0}E.prototype.restart=function(){this.__position=0},E.prototype.back=function(){this.__position>0&&(this.__position-=1)},E.prototype.hasNext=function(){return this.__position<this.__input_length},E.prototype.next=function(){var x=null;return this.hasNext()&&(x=this.__input.charAt(this.__position),this.__position+=1),x},E.prototype.peek=function(x){var h=null;return x=x||0,x+=this.__position,x>=0&&x<this.__input_length&&(h=this.__input.charAt(x)),h},E.prototype.__match=function(x,h){x.lastIndex=h;var p=x.exec(this.__input);return p&&!(A&&x.sticky)&&p.index!==h&&(p=null),p},E.prototype.test=function(x,h){return h=h||0,h+=this.__position,h>=0&&h<this.__input_length?!!this.__match(x,h):!1},E.prototype.testChar=function(x,h){var p=this.peek(h);return x.lastIndex=0,p!==null&&x.test(p)},E.prototype.match=function(x){var h=this.__match(x,this.__position);return h?this.__position+=h[0].length:h=null,h},E.prototype.read=function(x,h,p){var _="",C;return x&&(C=this.match(x),C&&(_+=C[0])),h&&(C||!x)&&(_+=this.readUntil(h,p)),_},E.prototype.readUntil=function(x,h){var p="",_=this.__position;x.lastIndex=this.__position;var C=x.exec(this.__input);return C?(_=C.index,h&&(_+=C[0].length)):_=this.__input_length,p=this.__input.substring(this.__position,_),this.__position=_,p},E.prototype.readUntilAfter=function(x){return this.readUntil(x,!0)},E.prototype.get_regexp=function(x,h){var p=null,_="g";return h&&A&&(_="y"),typeof x=="string"&&x!==""?p=new RegExp(x,_):x&&(p=new RegExp(x.source,_)),p},E.prototype.get_literal_regexp=function(x){return RegExp(x.replace(/[-\/\\^$*+?.()|[\]{}]/g,"\\$&"))},E.prototype.peekUntilAfter=function(x){var h=this.__position,p=this.readUntilAfter(x);return this.__position=h,p},E.prototype.lookBack=function(x){var h=this.__position-1;return h>=x.length&&this.__input.substring(h-x.length,h).toLowerCase()===x},ee.exports.InputScanner=E},function(ee,A,E){var x=E(8).InputScanner,h=E(3).Token,p=E(10).TokenStream,_=E(11).WhitespacePattern,C={START:"TK_START",RAW:"TK_RAW",EOF:"TK_EOF"},F=function(R,K){this._input=new x(R),this._options=K||{},this.__tokens=null,this._patterns={},this._patterns.whitespace=new _(this._input)};F.prototype.tokenize=function(){this._input.restart(),this.__tokens=new p,this._reset();for(var R,K=new h(C.START,""),B=null,D=[],I=new p;K.type!==C.EOF;){for(R=this._get_next_token(K,B);this._is_comment(R);)I.add(R),R=this._get_next_token(K,B);I.isEmpty()||(R.comments_before=I,I=new p),R.parent=B,this._is_opening(R)?(D.push(B),B=R):B&&this._is_closing(R,B)&&(R.opened=B,B.closed=R,B=D.pop(),R.parent=B),R.previous=K,K.next=R,this.__tokens.add(R),K=R}return this.__tokens},F.prototype._is_first_token=function(){return this.__tokens.isEmpty()},F.prototype._reset=function(){},F.prototype._get_next_token=function(R,K){this._readWhitespace();var B=this._input.read(/.+/g);return B?this._create_token(C.RAW,B):this._create_token(C.EOF,"")},F.prototype._is_comment=function(R){return!1},F.prototype._is_opening=function(R){return!1},F.prototype._is_closing=function(R,K){return!1},F.prototype._create_token=function(R,K){var B=new h(R,K,this._patterns.whitespace.newline_count,this._patterns.whitespace.whitespace_before_token);return B},F.prototype._readWhitespace=function(){return this._patterns.whitespace.read()},ee.exports.Tokenizer=F,ee.exports.TOKEN=C},function(ee){function A(E){this.__tokens=[],this.__tokens_length=this.__tokens.length,this.__position=0,this.__parent_token=E}A.prototype.restart=function(){this.__position=0},A.prototype.isEmpty=function(){return this.__tokens_length===0},A.prototype.hasNext=function(){return this.__position<this.__tokens_length},A.prototype.next=function(){var E=null;return this.hasNext()&&(E=this.__tokens[this.__position],this.__position+=1),E},A.prototype.peek=function(E){var x=null;return E=E||0,E+=this.__position,E>=0&&E<this.__tokens_length&&(x=this.__tokens[E]),x},A.prototype.add=function(E){this.__parent_token&&(E.parent=this.__parent_token),this.__tokens.push(E),this.__tokens_length+=1},ee.exports.TokenStream=A},function(ee,A,E){var x=E(12).Pattern;function h(p,_){x.call(this,p,_),_?this._line_regexp=this._input.get_regexp(_._line_regexp):this.__set_whitespace_patterns("",""),this.newline_count=0,this.whitespace_before_token=""}h.prototype=new x,h.prototype.__set_whitespace_patterns=function(p,_){p+="\\t ",_+="\\n\\r",this._match_pattern=this._input.get_regexp("["+p+_+"]+",!0),this._newline_regexp=this._input.get_regexp("\\r\\n|["+_+"]")},h.prototype.read=function(){this.newline_count=0,this.whitespace_before_token="";var p=this._input.read(this._match_pattern);if(p===" ")this.whitespace_before_token=" ";else if(p){var _=this.__split(this._newline_regexp,p);this.newline_count=_.length-1,this.whitespace_before_token=_[this.newline_count]}return p},h.prototype.matching=function(p,_){var C=this._create();return C.__set_whitespace_patterns(p,_),C._update(),C},h.prototype._create=function(){return new h(this._input,this)},h.prototype.__split=function(p,_){p.lastIndex=0;for(var C=0,F=[],R=p.exec(_);R;)F.push(_.substring(C,R.index)),C=R.index+R[0].length,R=p.exec(_);return C<_.length?F.push(_.substring(C,_.length)):F.push(""),F},ee.exports.WhitespacePattern=h},function(ee){function A(E,x){this._input=E,this._starting_pattern=null,this._match_pattern=null,this._until_pattern=null,this._until_after=!1,x&&(this._starting_pattern=this._input.get_regexp(x._starting_pattern,!0),this._match_pattern=this._input.get_regexp(x._match_pattern,!0),this._until_pattern=this._input.get_regexp(x._until_pattern),this._until_after=x._until_after)}A.prototype.read=function(){var E=this._input.read(this._starting_pattern);return(!this._starting_pattern||E)&&(E+=this._input.read(this._match_pattern,this._until_pattern,this._until_after)),E},A.prototype.read_match=function(){return this._input.match(this._match_pattern)},A.prototype.until_after=function(E){var x=this._create();return x._until_after=!0,x._until_pattern=this._input.get_regexp(E),x._update(),x},A.prototype.until=function(E){var x=this._create();return x._until_after=!1,x._until_pattern=this._input.get_regexp(E),x._update(),x},A.prototype.starting_with=function(E){var x=this._create();return x._starting_pattern=this._input.get_regexp(E,!0),x._update(),x},A.prototype.matching=function(E){var x=this._create();return x._match_pattern=this._input.get_regexp(E,!0),x._update(),x},A.prototype._create=function(){return new A(this._input,this)},A.prototype._update=function(){},ee.exports.Pattern=A},function(ee){function A(E,x){E=typeof E=="string"?E:E.source,x=typeof x=="string"?x:x.source,this.__directives_block_pattern=new RegExp(E+/ beautify( \w+[:]\w+)+ /.source+x,"g"),this.__directive_pattern=/ (\w+)[:](\w+)/g,this.__directives_end_ignore_pattern=new RegExp(E+/\sbeautify\signore:end\s/.source+x,"g")}A.prototype.get_directives=function(E){if(!E.match(this.__directives_block_pattern))return null;var x={};this.__directive_pattern.lastIndex=0;for(var h=this.__directive_pattern.exec(E);h;)x[h[1]]=h[2],h=this.__directive_pattern.exec(E);return x},A.prototype.readIgnored=function(E){return E.readUntilAfter(this.__directives_end_ignore_pattern)},ee.exports.Directives=A},function(ee,A,E){var x=E(12).Pattern,h={django:!1,erb:!1,handlebars:!1,php:!1,smarty:!1,angular:!1};function p(_,C){x.call(this,_,C),this.__template_pattern=null,this._disabled=Object.assign({},h),this._excluded=Object.assign({},h),C&&(this.__template_pattern=this._input.get_regexp(C.__template_pattern),this._excluded=Object.assign(this._excluded,C._excluded),this._disabled=Object.assign(this._disabled,C._disabled));var F=new x(_);this.__patterns={handlebars_comment:F.starting_with(/{{!--/).until_after(/--}}/),handlebars_unescaped:F.starting_with(/{{{/).until_after(/}}}/),handlebars:F.starting_with(/{{/).until_after(/}}/),php:F.starting_with(/<\?(?:[= ]|php)/).until_after(/\?>/),erb:F.starting_with(/<%[^%]/).until_after(/[^%]%>/),django:F.starting_with(/{%/).until_after(/%}/),django_value:F.starting_with(/{{/).until_after(/}}/),django_comment:F.starting_with(/{#/).until_after(/#}/),smarty:F.starting_with(/{(?=[^}{\s\n])/).until_after(/[^\s\n]}/),smarty_comment:F.starting_with(/{\*/).until_after(/\*}/),smarty_literal:F.starting_with(/{literal}/).until_after(/{\/literal}/)}}p.prototype=new x,p.prototype._create=function(){return new p(this._input,this)},p.prototype._update=function(){this.__set_templated_pattern()},p.prototype.disable=function(_){var C=this._create();return C._disabled[_]=!0,C._update(),C},p.prototype.read_options=function(_){var C=this._create();for(var F in h)C._disabled[F]=_.templating.indexOf(F)===-1;return C._update(),C},p.prototype.exclude=function(_){var C=this._create();return C._excluded[_]=!0,C._update(),C},p.prototype.read=function(){var _="";this._match_pattern?_=this._input.read(this._starting_pattern):_=this._input.read(this._starting_pattern,this.__template_pattern);for(var C=this._read_template();C;)this._match_pattern?C+=this._input.read(this._match_pattern):C+=this._input.readUntil(this.__template_pattern),_+=C,C=this._read_template();return this._until_after&&(_+=this._input.readUntilAfter(this._until_pattern)),_},p.prototype.__set_templated_pattern=function(){var _=[];this._disabled.php||_.push(this.__patterns.php._starting_pattern.source),this._disabled.handlebars||_.push(this.__patterns.handlebars._starting_pattern.source),this._disabled.angular||_.push(this.__patterns.handlebars._starting_pattern.source),this._disabled.erb||_.push(this.__patterns.erb._starting_pattern.source),this._disabled.django||(_.push(this.__patterns.django._starting_pattern.source),_.push(this.__patterns.django_value._starting_pattern.source),_.push(this.__patterns.django_comment._starting_pattern.source)),this._disabled.smarty||_.push(this.__patterns.smarty._starting_pattern.source),this._until_pattern&&_.push(this._until_pattern.source),this.__template_pattern=this._input.get_regexp("(?:"+_.join("|")+")")},p.prototype._read_template=function(){var _="",C=this._input.peek();if(C==="<"){var F=this._input.peek(1);!this._disabled.php&&!this._excluded.php&&F==="?"&&(_=_||this.__patterns.php.read()),!this._disabled.erb&&!this._excluded.erb&&F==="%"&&(_=_||this.__patterns.erb.read())}else C==="{"&&(!this._disabled.handlebars&&!this._excluded.handlebars&&(_=_||this.__patterns.handlebars_comment.read(),_=_||this.__patterns.handlebars_unescaped.read(),_=_||this.__patterns.handlebars.read()),this._disabled.django||(!this._excluded.django&&!this._excluded.handlebars&&(_=_||this.__patterns.django_value.read()),this._excluded.django||(_=_||this.__patterns.django_comment.read(),_=_||this.__patterns.django.read())),this._disabled.smarty||this._disabled.django&&this._disabled.handlebars&&(_=_||this.__patterns.smarty_comment.read(),_=_||this.__patterns.smarty_literal.read(),_=_||this.__patterns.smarty.read()));return _},ee.exports.TemplatablePattern=p}],U={};function f(ee){var A=U[ee];if(A!==void 0)return A.exports;var E=U[ee]={exports:{}};return se[ee](E,E.exports,f),E.exports}var fe=f(0);re=fe})();var ge=re;b=[],P=function(){return{js_beautify:ge}}.apply(tt,b),P!==void 0&&(Cn.exports=P)})()},32834:function(Cn){(function(tt,b){Cn.exports=b()})(this,function(){"use strict";function tt(We,Qe){for(var He=0;He<Qe.length;He++){var z=Qe[He];z.enumerable=z.enumerable||!1,z.configurable=!0,"value"in z&&(z.writable=!0),Object.defineProperty(We,z.key,z)}}function b(We,Qe,He){return Qe&&tt(We.prototype,Qe),He&&tt(We,He),We}function P(We,Qe){if(We){if(typeof We=="string")return re(We,Qe);var He=Object.prototype.toString.call(We).slice(8,-1);if(He==="Object"&&We.constructor&&(He=We.constructor.name),He==="Map"||He==="Set")return Array.from(We);if(He==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(He))return re(We,Qe)}}function re(We,Qe){(Qe==null||Qe>We.length)&&(Qe=We.length);for(var He=0,z=new Array(Qe);He<Qe;He++)z[He]=We[He];return z}function ge(We,Qe){var He=typeof Symbol!="undefined"&&We[Symbol.iterator]||We["@@iterator"];if(He)return(He=He.call(We)).next.bind(He);if(Array.isArray(We)||(He=P(We))||Qe&&We&&typeof We.length=="number"){He&&(We=He);var z=0;return function(){return z>=We.length?{done:!0}:{done:!1,value:We[z++]}}}throw new TypeError(`Invalid attempt to iterate non-iterable instance.
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}var se={exports:{}};function U(){return{baseUrl:null,breaks:!1,gfm:!0,headerIds:!0,headerPrefix:"",highlight:null,langPrefix:"language-",mangle:!0,pedantic:!1,renderer:null,sanitize:!1,sanitizer:null,silent:!1,smartLists:!1,smartypants:!1,tokenizer:null,walkTokens:null,xhtml:!1}}function f(We){se.exports.defaults=We}se.exports={defaults:U(),getDefaults:U,changeDefaults:f};var fe=/[&<>"']/,ee=/[&<>"']/g,A=/[<>"']|&(?!#?\w+;)/,E=/[<>"']|&(?!#?\w+;)/g,x={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;"},h=function(Qe){return x[Qe]};function p(We,Qe){if(Qe){if(fe.test(We))return We.replace(ee,h)}else if(A.test(We))return We.replace(E,h);return We}var _=/&(#(?:\d+)|(?:#x[0-9A-Fa-f]+)|(?:\w+));?/ig;function C(We){return We.replace(_,function(Qe,He){return He=He.toLowerCase(),He==="colon"?":":He.charAt(0)==="#"?He.charAt(1)==="x"?String.fromCharCode(parseInt(He.substring(2),16)):String.fromCharCode(+He.substring(1)):""})}var F=/(^|[^\[])\^/g;function R(We,Qe){We=We.source||We,Qe=Qe||"";var He={replace:function(le,me){return me=me.source||me,me=me.replace(F,"$1"),We=We.replace(le,me),He},getRegex:function(){return new RegExp(We,Qe)}};return He}var K=/[^\w:]/g,B=/^$|^[a-z][a-z0-9+.-]*:|^[?#]/i;function D(We,Qe,He){if(We){var z;try{z=decodeURIComponent(C(He)).replace(K,"").toLowerCase()}catch(le){return null}if(z.indexOf("javascript:")===0||z.indexOf("vbscript:")===0||z.indexOf("data:")===0)return null}Qe&&!B.test(He)&&(He=j(Qe,He));try{He=encodeURI(He).replace(/%25/g,"%")}catch(le){return null}return He}var I={},S=/^[^:]+:\/*[^/]*$/,q=/^([^:]+:)[\s\S]*$/,ae=/^([^:]+:\/*[^/]*)[\s\S]*$/;function j(We,Qe){I[" "+We]||(S.test(We)?I[" "+We]=We+"/":I[" "+We]=pe(We,"/",!0)),We=I[" "+We];var He=We.indexOf(":")===-1;return Qe.substring(0,2)==="//"?He?Qe:We.replace(q,"$1")+Qe:Qe.charAt(0)==="/"?He?Qe:We.replace(ae,"$1")+Qe:We+Qe}var Y={exec:function(){}};function ie(We){for(var Qe=1,He,z;Qe<arguments.length;Qe++){He=arguments[Qe];for(z in He)Object.prototype.hasOwnProperty.call(He,z)&&(We[z]=He[z])}return We}function de(We,Qe){var He=We.replace(/\|/g,function(me,Be,be){for(var Tt=!1,Wt=Be;--Wt>=0&&be[Wt]==="\\";)Tt=!Tt;return Tt?"|":" |"}),z=He.split(/ \|/),le=0;if(z.length>Qe)z.splice(Qe);else for(;z.length<Qe;)z.push("");for(;le<z.length;le++)z[le]=z[le].trim().replace(/\\\|/g,"|");return z}function pe(We,Qe,He){var z=We.length;if(z===0)return"";for(var le=0;le<z;){var me=We.charAt(z-le-1);if(me===Qe&&!He)le++;else if(me!==Qe&&He)le++;else break}return We.substr(0,z-le)}function W(We,Qe){if(We.indexOf(Qe[1])===-1)return-1;for(var He=We.length,z=0,le=0;le<He;le++)if(We[le]==="\\")le++;else if(We[le]===Qe[0])z++;else if(We[le]===Qe[1]&&(z--,z<0))return le;return-1}function M(We){We&&We.sanitize&&!We.silent&&console.warn("marked(): sanitize and sanitizer parameters are deprecated since version 0.7.0, should not be used and will be removed in the future. Read more here: https://marked.js.org/#/USING_ADVANCED.md#options")}function X(We,Qe){if(Qe<1)return"";for(var He="";Qe>1;)Qe&1&&(He+=We),Qe>>=1,We+=We;return He+We}var G={escape:p,unescape:C,edit:R,cleanUrl:D,resolveUrl:j,noopTest:Y,merge:ie,splitCells:de,rtrim:pe,findClosingBracket:W,checkSanitizeDeprecation:M,repeatString:X},ne=se.exports.defaults,Z=G.rtrim,m=G.splitCells,v=G.escape,Q=G.findClosingBracket;function he(We,Qe,He){var z=Qe.href,le=Qe.title?v(Qe.title):null,me=We[1].replace(/\\([\[\]])/g,"$1");return We[0].charAt(0)!=="!"?{type:"link",raw:He,href:z,title:le,text:me}:{type:"image",raw:He,href:z,title:le,text:v(me)}}function Ue(We,Qe){var He=We.match(/^(\s+)(?:```)/);if(He===null)return Qe;var z=He[1];return Qe.split(`
`).map(function(le){var me=le.match(/^\s+/);if(me===null)return le;var Be=me[0];return Be.length>=z.length?le.slice(z.length):le}).join(`
`)}var Oe=function(){function We(He){this.options=He||ne}var Qe=We.prototype;return Qe.space=function(z){var le=this.rules.block.newline.exec(z);if(le)return le[0].length>1?{type:"space",raw:le[0]}:{raw:`
`}},Qe.code=function(z){var le=this.rules.block.code.exec(z);if(le){var me=le[0].replace(/^ {1,4}/gm,"");return{type:"code",raw:le[0],codeBlockStyle:"indented",text:this.options.pedantic?me:Z(me,`
`)}}},Qe.fences=function(z){var le=this.rules.block.fences.exec(z);if(le){var me=le[0],Be=Ue(me,le[3]||"");return{type:"code",raw:me,lang:le[2]?le[2].trim():le[2],text:Be}}},Qe.heading=function(z){var le=this.rules.block.heading.exec(z);if(le){var me=le[2].trim();if(/#$/.test(me)){var Be=Z(me,"#");(this.options.pedantic||!Be||/ $/.test(Be))&&(me=Be.trim())}return{type:"heading",raw:le[0],depth:le[1].length,text:me}}},Qe.nptable=function(z){var le=this.rules.block.nptable.exec(z);if(le){var me={type:"table",header:m(le[1].replace(/^ *| *\| *$/g,"")),align:le[2].replace(/^ *|\| *$/g,"").split(/ *\| */),cells:le[3]?le[3].replace(/\n$/,"").split(`
`):[],raw:le[0]};if(me.header.length===me.align.length){var Be=me.align.length,be;for(be=0;be<Be;be++)/^ *-+: *$/.test(me.align[be])?me.align[be]="right":/^ *:-+: *$/.test(me.align[be])?me.align[be]="center":/^ *:-+ *$/.test(me.align[be])?me.align[be]="left":me.align[be]=null;for(Be=me.cells.length,be=0;be<Be;be++)me.cells[be]=m(me.cells[be],me.header.length);return me}}},Qe.hr=function(z){var le=this.rules.block.hr.exec(z);if(le)return{type:"hr",raw:le[0]}},Qe.blockquote=function(z){var le=this.rules.block.blockquote.exec(z);if(le){var me=le[0].replace(/^ *> ?/gm,"");return{type:"blockquote",raw:le[0],text:me}}},Qe.list=function(z){var le=this.rules.block.list.exec(z);if(le){var me=le[0],Be=le[2],be=Be.length>1,Tt={type:"list",raw:me,ordered:be,start:be?+Be.slice(0,-1):"",loose:!1,items:[]},Wt=le[0].match(this.rules.block.item),an=!1,_n,Wn,zn,On,Un,ar,mr,tr,gr,sn=Wt.length;zn=this.rules.block.listItemStart.exec(Wt[0]);for(var Kt=0;Kt<sn;Kt++){if(_n=Wt[Kt],me=_n,this.options.pedantic||(gr=_n.match(new RegExp("\\n\\s*\\n {0,"+(zn[0].length-1)+"}\\S")),gr&&(Un=_n.length-gr.index+Wt.slice(Kt+1).join(`
`).length,Tt.raw=Tt.raw.substring(0,Tt.raw.length-Un),_n=_n.substring(0,gr.index),me=_n,sn=Kt+1)),Kt!==sn-1){if(On=this.rules.block.listItemStart.exec(Wt[Kt+1]),this.options.pedantic?On[1].length>zn[1].length:On[1].length>=zn[0].length||On[1].length>3){Wt.splice(Kt,2,Wt[Kt]+(!this.options.pedantic&&On[1].length<zn[0].length&&!Wt[Kt].match(/\n$/)?"":`
`)+Wt[Kt+1]),Kt--,sn--;continue}else(!this.options.pedantic||this.options.smartLists?On[2][On[2].length-1]!==Be[Be.length-1]:be===(On[2].length===1))&&(Un=Wt.slice(Kt+1).join(`
`).length,Tt.raw=Tt.raw.substring(0,Tt.raw.length-Un),Kt=sn-1);zn=On}Wn=_n.length,_n=_n.replace(/^ *([*+-]|\d+[.)]) ?/,""),~_n.indexOf(`
`)&&(Wn-=_n.length,_n=this.options.pedantic?_n.replace(/^ {1,4}/gm,""):_n.replace(new RegExp("^ {1,"+Wn+"}","gm"),"")),_n=Z(_n,`
`),Kt!==sn-1&&(me=me+`
`),ar=an||/\n\n(?!\s*$)/.test(me),Kt!==sn-1&&(an=me.slice(-2)===`
`,ar||(ar=an)),ar&&(Tt.loose=!0),this.options.gfm&&(mr=/^\[[ xX]\] /.test(_n),tr=void 0,mr&&(tr=_n[1]!==" ",_n=_n.replace(/^\[[ xX]\] +/,""))),Tt.items.push({type:"list_item",raw:me,task:mr,checked:tr,loose:ar,text:_n})}return Tt}},Qe.html=function(z){var le=this.rules.block.html.exec(z);if(le)return{type:this.options.sanitize?"paragraph":"html",raw:le[0],pre:!this.options.sanitizer&&(le[1]==="pre"||le[1]==="script"||le[1]==="style"),text:this.options.sanitize?this.options.sanitizer?this.options.sanitizer(le[0]):v(le[0]):le[0]}},Qe.def=function(z){var le=this.rules.block.def.exec(z);if(le){le[3]&&(le[3]=le[3].substring(1,le[3].length-1));var me=le[1].toLowerCase().replace(/\s+/g," ");return{type:"def",tag:me,raw:le[0],href:le[2],title:le[3]}}},Qe.table=function(z){var le=this.rules.block.table.exec(z);if(le){var me={type:"table",header:m(le[1].replace(/^ *| *\| *$/g,"")),align:le[2].replace(/^ *|\| *$/g,"").split(/ *\| */),cells:le[3]?le[3].replace(/\n$/,"").split(`
`):[]};if(me.header.length===me.align.length){me.raw=le[0];var Be=me.align.length,be;for(be=0;be<Be;be++)/^ *-+: *$/.test(me.align[be])?me.align[be]="right":/^ *:-+: *$/.test(me.align[be])?me.align[be]="center":/^ *:-+ *$/.test(me.align[be])?me.align[be]="left":me.align[be]=null;for(Be=me.cells.length,be=0;be<Be;be++)me.cells[be]=m(me.cells[be].replace(/^ *\| *| *\| *$/g,""),me.header.length);return me}}},Qe.lheading=function(z){var le=this.rules.block.lheading.exec(z);if(le)return{type:"heading",raw:le[0],depth:le[2].charAt(0)==="="?1:2,text:le[1]}},Qe.paragraph=function(z){var le=this.rules.block.paragraph.exec(z);if(le)return{type:"paragraph",raw:le[0],text:le[1].charAt(le[1].length-1)===`
`?le[1].slice(0,-1):le[1]}},Qe.text=function(z){var le=this.rules.block.text.exec(z);if(le)return{type:"text",raw:le[0],text:le[0]}},Qe.escape=function(z){var le=this.rules.inline.escape.exec(z);if(le)return{type:"escape",raw:le[0],text:v(le[1])}},Qe.tag=function(z,le,me){var Be=this.rules.inline.tag.exec(z);if(Be)return!le&&/^<a /i.test(Be[0])?le=!0:le&&/^<\/a>/i.test(Be[0])&&(le=!1),!me&&/^<(pre|code|kbd|script)(\s|>)/i.test(Be[0])?me=!0:me&&/^<\/(pre|code|kbd|script)(\s|>)/i.test(Be[0])&&(me=!1),{type:this.options.sanitize?"text":"html",raw:Be[0],inLink:le,inRawBlock:me,text:this.options.sanitize?this.options.sanitizer?this.options.sanitizer(Be[0]):v(Be[0]):Be[0]}},Qe.link=function(z){var le=this.rules.inline.link.exec(z);if(le){var me=le[2].trim();if(!this.options.pedantic&&/^</.test(me)){if(!/>$/.test(me))return;var Be=Z(me.slice(0,-1),"\\");if((me.length-Be.length)%2===0)return}else{var be=Q(le[2],"()");if(be>-1){var Tt=le[0].indexOf("!")===0?5:4,Wt=Tt+le[1].length+be;le[2]=le[2].substring(0,be),le[0]=le[0].substring(0,Wt).trim(),le[3]=""}}var an=le[2],_n="";if(this.options.pedantic){var Wn=/^([^'"]*[^\s])\s+(['"])(.*)\2/.exec(an);Wn&&(an=Wn[1],_n=Wn[3])}else _n=le[3]?le[3].slice(1,-1):"";return an=an.trim(),/^</.test(an)&&(this.options.pedantic&&!/>$/.test(me)?an=an.slice(1):an=an.slice(1,-1)),he(le,{href:an&&an.replace(this.rules.inline._escapes,"$1"),title:_n&&_n.replace(this.rules.inline._escapes,"$1")},le[0])}},Qe.reflink=function(z,le){var me;if((me=this.rules.inline.reflink.exec(z))||(me=this.rules.inline.nolink.exec(z))){var Be=(me[2]||me[1]).replace(/\s+/g," ");if(Be=le[Be.toLowerCase()],!Be||!Be.href){var be=me[0].charAt(0);return{type:"text",raw:be,text:be}}return he(me,Be,me[0])}},Qe.emStrong=function(z,le,me){me===void 0&&(me="");var Be=this.rules.inline.emStrong.lDelim.exec(z);if(Be&&!(Be[3]&&me.match(/(?:[0-9A-Za-z\xAA\xB2\xB3\xB5\xB9\xBA\xBC-\xBE\xC0-\xD6\xD8-\xF6\xF8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0370-\u0374\u0376\u0377\u037A-\u037D\u037F\u0386\u0388-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5\u03F7-\u0481\u048A-\u052F\u0531-\u0556\u0559\u0560-\u0588\u05D0-\u05EA\u05EF-\u05F2\u0620-\u064A\u0660-\u0669\u066E\u066F\u0671-\u06D3\u06D5\u06E5\u06E6\u06EE-\u06FC\u06FF\u0710\u0712-\u072F\u074D-\u07A5\u07B1\u07C0-\u07EA\u07F4\u07F5\u07FA\u0800-\u0815\u081A\u0824\u0828\u0840-\u0858\u0860-\u086A\u08A0-\u08B4\u08B6-\u08C7\u0904-\u0939\u093D\u0950\u0958-\u0961\u0966-\u096F\u0971-\u0980\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2\u09B6-\u09B9\u09BD\u09CE\u09DC\u09DD\u09DF-\u09E1\u09E6-\u09F1\u09F4-\u09F9\u09FC\u0A05-\u0A0A\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39\u0A59-\u0A5C\u0A5E\u0A66-\u0A6F\u0A72-\u0A74\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABD\u0AD0\u0AE0\u0AE1\u0AE6-\u0AEF\u0AF9\u0B05-\u0B0C\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3D\u0B5C\u0B5D\u0B5F-\u0B61\u0B66-\u0B6F\u0B71-\u0B77\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BD0\u0BE6-\u0BF2\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C39\u0C3D\u0C58-\u0C5A\u0C60\u0C61\u0C66-\u0C6F\u0C78-\u0C7E\u0C80\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3\u0CB5-\u0CB9\u0CBD\u0CDE\u0CE0\u0CE1\u0CE6-\u0CEF\u0CF1\u0CF2\u0D04-\u0D0C\u0D0E-\u0D10\u0D12-\u0D3A\u0D3D\u0D4E\u0D54-\u0D56\u0D58-\u0D61\u0D66-\u0D78\u0D7A-\u0D7F\u0D85-\u0D96\u0D9A-\u0DB1\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0DE6-\u0DEF\u0E01-\u0E30\u0E32\u0E33\u0E40-\u0E46\u0E50-\u0E59\u0E81\u0E82\u0E84\u0E86-\u0E8A\u0E8C-\u0EA3\u0EA5\u0EA7-\u0EB0\u0EB2\u0EB3\u0EBD\u0EC0-\u0EC4\u0EC6\u0ED0-\u0ED9\u0EDC-\u0EDF\u0F00\u0F20-\u0F33\u0F40-\u0F47\u0F49-\u0F6C\u0F88-\u0F8C\u1000-\u102A\u103F-\u1049\u1050-\u1055\u105A-\u105D\u1061\u1065\u1066\u106E-\u1070\u1075-\u1081\u108E\u1090-\u1099\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310\u1312-\u1315\u1318-\u135A\u1369-\u137C\u1380-\u138F\u13A0-\u13F5\u13F8-\u13FD\u1401-\u166C\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u16EE-\u16F8\u1700-\u170C\u170E-\u1711\u1720-\u1731\u1740-\u1751\u1760-\u176C\u176E-\u1770\u1780-\u17B3\u17D7\u17DC\u17E0-\u17E9\u17F0-\u17F9\u1810-\u1819\u1820-\u1878\u1880-\u1884\u1887-\u18A8\u18AA\u18B0-\u18F5\u1900-\u191E\u1946-\u196D\u1970-\u1974\u1980-\u19AB\u19B0-\u19C9\u19D0-\u19DA\u1A00-\u1A16\u1A20-\u1A54\u1A80-\u1A89\u1A90-\u1A99\u1AA7\u1B05-\u1B33\u1B45-\u1B4B\u1B50-\u1B59\u1B83-\u1BA0\u1BAE-\u1BE5\u1C00-\u1C23\u1C40-\u1C49\u1C4D-\u1C7D\u1C80-\u1C88\u1C90-\u1CBA\u1CBD-\u1CBF\u1CE9-\u1CEC\u1CEE-\u1CF3\u1CF5\u1CF6\u1CFA\u1D00-\u1DBF\u1E00-\u1F15\u1F18-\u1F1D\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u2070\u2071\u2074-\u2079\u207F-\u2089\u2090-\u209C\u2102\u2107\u210A-\u2113\u2115\u2119-\u211D\u2124\u2126\u2128\u212A-\u212D\u212F-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2150-\u2189\u2460-\u249B\u24EA-\u24FF\u2776-\u2793\u2C00-\u2C2E\u2C30-\u2C5E\u2C60-\u2CE4\u2CEB-\u2CEE\u2CF2\u2CF3\u2CFD\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D80-\u2D96\u2DA0-\u2DA6\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE\u2DD0-\u2DD6\u2DD8-\u2DDE\u2E2F\u3005-\u3007\u3021-\u3029\u3031-\u3035\u3038-\u303C\u3041-\u3096\u309D-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312F\u3131-\u318E\u3192-\u3195\u31A0-\u31BF\u31F0-\u31FF\u3220-\u3229\u3248-\u324F\u3251-\u325F\u3280-\u3289\u32B1-\u32BF\u3400-\u4DBF\u4E00-\u9FFC\uA000-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA62B\uA640-\uA66E\uA67F-\uA69D\uA6A0-\uA6EF\uA717-\uA71F\uA722-\uA788\uA78B-\uA7BF\uA7C2-\uA7CA\uA7F5-\uA801\uA803-\uA805\uA807-\uA80A\uA80C-\uA822\uA830-\uA835\uA840-\uA873\uA882-\uA8B3\uA8D0-\uA8D9\uA8F2-\uA8F7\uA8FB\uA8FD\uA8FE\uA900-\uA925\uA930-\uA946\uA960-\uA97C\uA984-\uA9B2\uA9CF-\uA9D9\uA9E0-\uA9E4\uA9E6-\uA9FE\uAA00-\uAA28\uAA40-\uAA42\uAA44-\uAA4B\uAA50-\uAA59\uAA60-\uAA76\uAA7A\uAA7E-\uAAAF\uAAB1\uAAB5\uAAB6\uAAB9-\uAABD\uAAC0\uAAC2\uAADB-\uAADD\uAAE0-\uAAEA\uAAF2-\uAAF4\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E\uAB30-\uAB5A\uAB5C-\uAB69\uAB70-\uABE2\uABF0-\uABF9\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D\uFB1F-\uFB28\uFB2A-\uFB36\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE70-\uFE74\uFE76-\uFEFC\uFF10-\uFF19\uFF21-\uFF3A\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF\uFFD2-\uFFD7\uFFDA-\uFFDC]|\uD800[\uDC00-\uDC0B\uDC0D-\uDC26\uDC28-\uDC3A\uDC3C\uDC3D\uDC3F-\uDC4D\uDC50-\uDC5D\uDC80-\uDCFA\uDD07-\uDD33\uDD40-\uDD78\uDD8A\uDD8B\uDE80-\uDE9C\uDEA0-\uDED0\uDEE1-\uDEFB\uDF00-\uDF23\uDF2D-\uDF4A\uDF50-\uDF75\uDF80-\uDF9D\uDFA0-\uDFC3\uDFC8-\uDFCF\uDFD1-\uDFD5]|\uD801[\uDC00-\uDC9D\uDCA0-\uDCA9\uDCB0-\uDCD3\uDCD8-\uDCFB\uDD00-\uDD27\uDD30-\uDD63\uDE00-\uDF36\uDF40-\uDF55\uDF60-\uDF67]|\uD802[\uDC00-\uDC05\uDC08\uDC0A-\uDC35\uDC37\uDC38\uDC3C\uDC3F-\uDC55\uDC58-\uDC76\uDC79-\uDC9E\uDCA7-\uDCAF\uDCE0-\uDCF2\uDCF4\uDCF5\uDCFB-\uDD1B\uDD20-\uDD39\uDD80-\uDDB7\uDDBC-\uDDCF\uDDD2-\uDE00\uDE10-\uDE13\uDE15-\uDE17\uDE19-\uDE35\uDE40-\uDE48\uDE60-\uDE7E\uDE80-\uDE9F\uDEC0-\uDEC7\uDEC9-\uDEE4\uDEEB-\uDEEF\uDF00-\uDF35\uDF40-\uDF55\uDF58-\uDF72\uDF78-\uDF91\uDFA9-\uDFAF]|\uD803[\uDC00-\uDC48\uDC80-\uDCB2\uDCC0-\uDCF2\uDCFA-\uDD23\uDD30-\uDD39\uDE60-\uDE7E\uDE80-\uDEA9\uDEB0\uDEB1\uDF00-\uDF27\uDF30-\uDF45\uDF51-\uDF54\uDFB0-\uDFCB\uDFE0-\uDFF6]|\uD804[\uDC03-\uDC37\uDC52-\uDC6F\uDC83-\uDCAF\uDCD0-\uDCE8\uDCF0-\uDCF9\uDD03-\uDD26\uDD36-\uDD3F\uDD44\uDD47\uDD50-\uDD72\uDD76\uDD83-\uDDB2\uDDC1-\uDDC4\uDDD0-\uDDDA\uDDDC\uDDE1-\uDDF4\uDE00-\uDE11\uDE13-\uDE2B\uDE80-\uDE86\uDE88\uDE8A-\uDE8D\uDE8F-\uDE9D\uDE9F-\uDEA8\uDEB0-\uDEDE\uDEF0-\uDEF9\uDF05-\uDF0C\uDF0F\uDF10\uDF13-\uDF28\uDF2A-\uDF30\uDF32\uDF33\uDF35-\uDF39\uDF3D\uDF50\uDF5D-\uDF61]|\uD805[\uDC00-\uDC34\uDC47-\uDC4A\uDC50-\uDC59\uDC5F-\uDC61\uDC80-\uDCAF\uDCC4\uDCC5\uDCC7\uDCD0-\uDCD9\uDD80-\uDDAE\uDDD8-\uDDDB\uDE00-\uDE2F\uDE44\uDE50-\uDE59\uDE80-\uDEAA\uDEB8\uDEC0-\uDEC9\uDF00-\uDF1A\uDF30-\uDF3B]|\uD806[\uDC00-\uDC2B\uDCA0-\uDCF2\uDCFF-\uDD06\uDD09\uDD0C-\uDD13\uDD15\uDD16\uDD18-\uDD2F\uDD3F\uDD41\uDD50-\uDD59\uDDA0-\uDDA7\uDDAA-\uDDD0\uDDE1\uDDE3\uDE00\uDE0B-\uDE32\uDE3A\uDE50\uDE5C-\uDE89\uDE9D\uDEC0-\uDEF8]|\uD807[\uDC00-\uDC08\uDC0A-\uDC2E\uDC40\uDC50-\uDC6C\uDC72-\uDC8F\uDD00-\uDD06\uDD08\uDD09\uDD0B-\uDD30\uDD46\uDD50-\uDD59\uDD60-\uDD65\uDD67\uDD68\uDD6A-\uDD89\uDD98\uDDA0-\uDDA9\uDEE0-\uDEF2\uDFB0\uDFC0-\uDFD4]|\uD808[\uDC00-\uDF99]|\uD809[\uDC00-\uDC6E\uDC80-\uDD43]|[\uD80C\uD81C-\uD820\uD822\uD840-\uD868\uD86A-\uD86C\uD86F-\uD872\uD874-\uD879\uD880-\uD883][\uDC00-\uDFFF]|\uD80D[\uDC00-\uDC2E]|\uD811[\uDC00-\uDE46]|\uD81A[\uDC00-\uDE38\uDE40-\uDE5E\uDE60-\uDE69\uDED0-\uDEED\uDF00-\uDF2F\uDF40-\uDF43\uDF50-\uDF59\uDF5B-\uDF61\uDF63-\uDF77\uDF7D-\uDF8F]|\uD81B[\uDE40-\uDE96\uDF00-\uDF4A\uDF50\uDF93-\uDF9F\uDFE0\uDFE1\uDFE3]|\uD821[\uDC00-\uDFF7]|\uD823[\uDC00-\uDCD5\uDD00-\uDD08]|\uD82C[\uDC00-\uDD1E\uDD50-\uDD52\uDD64-\uDD67\uDD70-\uDEFB]|\uD82F[\uDC00-\uDC6A\uDC70-\uDC7C\uDC80-\uDC88\uDC90-\uDC99]|\uD834[\uDEE0-\uDEF3\uDF60-\uDF78]|\uD835[\uDC00-\uDC54\uDC56-\uDC9C\uDC9E\uDC9F\uDCA2\uDCA5\uDCA6\uDCA9-\uDCAC\uDCAE-\uDCB9\uDCBB\uDCBD-\uDCC3\uDCC5-\uDD05\uDD07-\uDD0A\uDD0D-\uDD14\uDD16-\uDD1C\uDD1E-\uDD39\uDD3B-\uDD3E\uDD40-\uDD44\uDD46\uDD4A-\uDD50\uDD52-\uDEA5\uDEA8-\uDEC0\uDEC2-\uDEDA\uDEDC-\uDEFA\uDEFC-\uDF14\uDF16-\uDF34\uDF36-\uDF4E\uDF50-\uDF6E\uDF70-\uDF88\uDF8A-\uDFA8\uDFAA-\uDFC2\uDFC4-\uDFCB\uDFCE-\uDFFF]|\uD838[\uDD00-\uDD2C\uDD37-\uDD3D\uDD40-\uDD49\uDD4E\uDEC0-\uDEEB\uDEF0-\uDEF9]|\uD83A[\uDC00-\uDCC4\uDCC7-\uDCCF\uDD00-\uDD43\uDD4B\uDD50-\uDD59]|\uD83B[\uDC71-\uDCAB\uDCAD-\uDCAF\uDCB1-\uDCB4\uDD01-\uDD2D\uDD2F-\uDD3D\uDE00-\uDE03\uDE05-\uDE1F\uDE21\uDE22\uDE24\uDE27\uDE29-\uDE32\uDE34-\uDE37\uDE39\uDE3B\uDE42\uDE47\uDE49\uDE4B\uDE4D-\uDE4F\uDE51\uDE52\uDE54\uDE57\uDE59\uDE5B\uDE5D\uDE5F\uDE61\uDE62\uDE64\uDE67-\uDE6A\uDE6C-\uDE72\uDE74-\uDE77\uDE79-\uDE7C\uDE7E\uDE80-\uDE89\uDE8B-\uDE9B\uDEA1-\uDEA3\uDEA5-\uDEA9\uDEAB-\uDEBB]|\uD83C[\uDD00-\uDD0C]|\uD83E[\uDFF0-\uDFF9]|\uD869[\uDC00-\uDEDD\uDF00-\uDFFF]|\uD86D[\uDC00-\uDF34\uDF40-\uDFFF]|\uD86E[\uDC00-\uDC1D\uDC20-\uDFFF]|\uD873[\uDC00-\uDEA1\uDEB0-\uDFFF]|\uD87A[\uDC00-\uDFE0]|\uD87E[\uDC00-\uDE1D]|\uD884[\uDC00-\uDF4A])/))){var be=Be[1]||Be[2]||"";if(!be||be&&(me===""||this.rules.inline.punctuation.exec(me))){var Tt=Be[0].length-1,Wt,an,_n=Tt,Wn=0,zn=Be[0][0]==="*"?this.rules.inline.emStrong.rDelimAst:this.rules.inline.emStrong.rDelimUnd;for(zn.lastIndex=0,le=le.slice(-1*z.length+Tt);(Be=zn.exec(le))!=null;)if(Wt=Be[1]||Be[2]||Be[3]||Be[4]||Be[5]||Be[6],!!Wt){if(an=Wt.length,Be[3]||Be[4]){_n+=an;continue}else if((Be[5]||Be[6])&&Tt%3&&!((Tt+an)%3)){Wn+=an;continue}if(_n-=an,!(_n>0))return an=Math.min(an,an+_n+Wn),Math.min(Tt,an)%2?{type:"em",raw:z.slice(0,Tt+Be.index+an+1),text:z.slice(1,Tt+Be.index+an)}:{type:"strong",raw:z.slice(0,Tt+Be.index+an+1),text:z.slice(2,Tt+Be.index+an-1)}}}}},Qe.codespan=function(z){var le=this.rules.inline.code.exec(z);if(le){var me=le[2].replace(/\n/g," "),Be=/[^ ]/.test(me),be=/^ /.test(me)&&/ $/.test(me);return Be&&be&&(me=me.substring(1,me.length-1)),me=v(me,!0),{type:"codespan",raw:le[0],text:me}}},Qe.br=function(z){var le=this.rules.inline.br.exec(z);if(le)return{type:"br",raw:le[0]}},Qe.del=function(z){var le=this.rules.inline.del.exec(z);if(le)return{type:"del",raw:le[0],text:le[2]}},Qe.autolink=function(z,le){var me=this.rules.inline.autolink.exec(z);if(me){var Be,be;return me[2]==="@"?(Be=v(this.options.mangle?le(me[1]):me[1]),be="mailto:"+Be):(Be=v(me[1]),be=Be),{type:"link",raw:me[0],text:Be,href:be,tokens:[{type:"text",raw:Be,text:Be}]}}},Qe.url=function(z,le){var me;if(me=this.rules.inline.url.exec(z)){var Be,be;if(me[2]==="@")Be=v(this.options.mangle?le(me[0]):me[0]),be="mailto:"+Be;else{var Tt;do Tt=me[0],me[0]=this.rules.inline._backpedal.exec(me[0])[0];while(Tt!==me[0]);Be=v(me[0]),me[1]==="www."?be="http://"+Be:be=Be}return{type:"link",raw:me[0],text:Be,href:be,tokens:[{type:"text",raw:Be,text:Be}]}}},Qe.inlineText=function(z,le,me){var Be=this.rules.inline.text.exec(z);if(Be){var be;return le?be=this.options.sanitize?this.options.sanitizer?this.options.sanitizer(Be[0]):v(Be[0]):Be[0]:be=v(this.options.smartypants?me(Be[0]):Be[0]),{type:"text",raw:Be[0],text:be}}},We}(),ft=G.noopTest,Et=G.edit,Ft=G.merge,Ut={newline:/^(?: *(?:\n|$))+/,code:/^( {4}[^\n]+(?:\n(?: *(?:\n|$))*)?)+/,fences:/^ {0,3}(`{3,}(?=[^`\n]*\n)|~{3,})([^\n]*)\n(?:|([\s\S]*?)\n)(?: {0,3}\1[~`]* *(?:\n+|$)|$)/,hr:/^ {0,3}((?:- *){3,}|(?:_ *){3,}|(?:\* *){3,})(?:\n+|$)/,heading:/^ {0,3}(#{1,6})(?=\s|$)(.*)(?:\n+|$)/,blockquote:/^( {0,3}> ?(paragraph|[^\n]*)(?:\n|$))+/,list:/^( {0,3})(bull) [\s\S]+?(?:hr|def|\n{2,}(?! )(?! {0,3}bull )\n*|\s*$)/,html:"^ {0,3}(?:<(script|pre|style)[\\s>][\\s\\S]*?(?:</\\1>[^\\n]*\\n+|$)|comment[^\\n]*(\\n+|$)|<\\?[\\s\\S]*?(?:\\?>\\n*|$)|<![A-Z][\\s\\S]*?(?:>\\n*|$)|<!\\[CDATA\\[[\\s\\S]*?(?:\\]\\]>\\n*|$)|</?(tag)(?: +|\\n|/?>)[\\s\\S]*?(?:(?:\\n *)+\\n|$)|<(?!script|pre|style)([a-z][\\w-]*)(?:attribute)*? */?>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n *)+\\n|$)|</(?!script|pre|style)[a-z][\\w-]*\\s*>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n *)+\\n|$))",def:/^ {0,3}\[(label)\]: *\n? *<?([^\s>]+)>?(?:(?: +\n? *| *\n *)(title))? *(?:\n+|$)/,nptable:ft,table:ft,lheading:/^([^\n]+)\n {0,3}(=+|-+) *(?:\n+|$)/,_paragraph:/^([^\n]+(?:\n(?!hr|heading|lheading|blockquote|fences|list|html| +\n)[^\n]+)*)/,text:/^[^\n]+/};Ut._label=/(?!\s*\])(?:\\[\[\]]|[^\[\]])+/,Ut._title=/(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/,Ut.def=Et(Ut.def).replace("label",Ut._label).replace("title",Ut._title).getRegex(),Ut.bullet=/(?:[*+-]|\d{1,9}[.)])/,Ut.item=/^( *)(bull) ?[^\n]*(?:\n(?! *bull ?)[^\n]*)*/,Ut.item=Et(Ut.item,"gm").replace(/bull/g,Ut.bullet).getRegex(),Ut.listItemStart=Et(/^( *)(bull) */).replace("bull",Ut.bullet).getRegex(),Ut.list=Et(Ut.list).replace(/bull/g,Ut.bullet).replace("hr","\\n+(?=\\1?(?:(?:- *){3,}|(?:_ *){3,}|(?:\\* *){3,})(?:\\n+|$))").replace("def","\\n+(?="+Ut.def.source+")").getRegex(),Ut._tag="address|article|aside|base|basefont|blockquote|body|caption|center|col|colgroup|dd|details|dialog|dir|div|dl|dt|fieldset|figcaption|figure|footer|form|frame|frameset|h[1-6]|head|header|hr|html|iframe|legend|li|link|main|menu|menuitem|meta|nav|noframes|ol|optgroup|option|p|param|section|source|summary|table|tbody|td|tfoot|th|thead|title|tr|track|ul",Ut._comment=/<!--(?!-?>)[\s\S]*?(?:-->|$)/,Ut.html=Et(Ut.html,"i").replace("comment",Ut._comment).replace("tag",Ut._tag).replace("attribute",/ +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex(),Ut.paragraph=Et(Ut._paragraph).replace("hr",Ut.hr).replace("heading"," {0,3}#{1,6} ").replace("|lheading","").replace("blockquote"," {0,3}>").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|!--)").replace("tag",Ut._tag).getRegex(),Ut.blockquote=Et(Ut.blockquote).replace("paragraph",Ut.paragraph).getRegex(),Ut.normal=Ft({},Ut),Ut.gfm=Ft({},Ut.normal,{nptable:"^ *([^|\\n ].*\\|.*)\\n {0,3}([-:]+ *\\|[-| :]*)(?:\\n((?:(?!\\n|hr|heading|blockquote|code|fences|list|html).*(?:\\n|$))*)\\n*|$)",table:"^ *\\|(.+)\\n {0,3}\\|?( *[-:]+[-| :]*)(?:\\n *((?:(?!\\n|hr|heading|blockquote|code|fences|list|html).*(?:\\n|$))*)\\n*|$)"}),Ut.gfm.nptable=Et(Ut.gfm.nptable).replace("hr",Ut.hr).replace("heading"," {0,3}#{1,6} ").replace("blockquote"," {0,3}>").replace("code"," {4}[^\\n]").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|!--)").replace("tag",Ut._tag).getRegex(),Ut.gfm.table=Et(Ut.gfm.table).replace("hr",Ut.hr).replace("heading"," {0,3}#{1,6} ").replace("blockquote"," {0,3}>").replace("code"," {4}[^\\n]").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|!--)").replace("tag",Ut._tag).getRegex(),Ut.pedantic=Ft({},Ut.normal,{html:Et(`^ *(?:comment *(?:\\n|\\s*$)|<(tag)[\\s\\S]+?</\\1> *(?:\\n{2,}|\\s*$)|<tag(?:"[^"]*"|'[^']*'|\\s[^'"/>\\s]*)*?/?> *(?:\\n{2,}|\\s*$))`).replace("comment",Ut._comment).replace(/tag/g,"(?!(?:a|em|strong|small|s|cite|q|dfn|abbr|data|time|code|var|samp|kbd|sub|sup|i|b|u|mark|ruby|rt|rp|bdi|bdo|span|br|wbr|ins|del|img)\\b)\\w+(?!:|[^\\w\\s@]*@)\\b").getRegex(),def:/^ *\[([^\]]+)\]: *<?([^\s>]+)>?(?: +(["(][^\n]+[")]))? *(?:\n+|$)/,heading:/^(#{1,6})(.*)(?:\n+|$)/,fences:ft,paragraph:Et(Ut.normal._paragraph).replace("hr",Ut.hr).replace("heading",` *#{1,6} *[^
]`).replace("lheading",Ut.lheading).replace("blockquote"," {0,3}>").replace("|fences","").replace("|list","").replace("|html","").getRegex()});var Se={escape:/^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/,autolink:/^<(scheme:[^\s\x00-\x1f<>]*|email)>/,url:ft,tag:"^comment|^</[a-zA-Z][\\w:-]*\\s*>|^<[a-zA-Z][\\w-]*(?:attribute)*?\\s*/?>|^<\\?[\\s\\S]*?\\?>|^<![a-zA-Z]+\\s[\\s\\S]*?>|^<!\\[CDATA\\[[\\s\\S]*?\\]\\]>",link:/^!?\[(label)\]\(\s*(href)(?:\s+(title))?\s*\)/,reflink:/^!?\[(label)\]\[(?!\s*\])((?:\\[\[\]]?|[^\[\]\\])+)\]/,nolink:/^!?\[(?!\s*\])((?:\[[^\[\]]*\]|\\[\[\]]|[^\[\]])*)\](?:\[\])?/,reflinkSearch:"reflink|nolink(?!\\()",emStrong:{lDelim:/^(?:\*+(?:([punct_])|[^\s*]))|^_+(?:([punct*])|([^\s_]))/,rDelimAst:/\_\_[^_*]*?\*[^_*]*?\_\_|[punct_](\*+)(?=[\s]|$)|[^punct*_\s](\*+)(?=[punct_\s]|$)|[punct_\s](\*+)(?=[^punct*_\s])|[\s](\*+)(?=[punct_])|[punct_](\*+)(?=[punct_])|[^punct*_\s](\*+)(?=[^punct*_\s])/,rDelimUnd:/\*\*[^_*]*?\_[^_*]*?\*\*|[punct*](\_+)(?=[\s]|$)|[^punct*_\s](\_+)(?=[punct*\s]|$)|[punct*\s](\_+)(?=[^punct*_\s])|[\s](\_+)(?=[punct*])|[punct*](\_+)(?=[punct*])/},code:/^(`+)([^`]|[^`][\s\S]*?[^`])\1(?!`)/,br:/^( {2,}|\\)\n(?!\s*$)/,del:ft,text:/^(`+|[^`])(?:(?= {2,}\n)|[\s\S]*?(?:(?=[\\<!\[`*_]|\b_|$)|[^ ](?= {2,}\n)))/,punctuation:/^([\spunctuation])/};Se._punctuation="!\"#$%&'()+\\-.,/:;<=>?@\\[\\]`^{|}~",Se.punctuation=Et(Se.punctuation).replace(/punctuation/g,Se._punctuation).getRegex(),Se.blockSkip=/\[[^\]]*?\]\([^\)]*?\)|`[^`]*?`|<[^>]*?>/g,Se.escapedEmSt=/\\\*|\\_/g,Se._comment=Et(Ut._comment).replace("(?:-->|$)","-->").getRegex(),Se.emStrong.lDelim=Et(Se.emStrong.lDelim).replace(/punct/g,Se._punctuation).getRegex(),Se.emStrong.rDelimAst=Et(Se.emStrong.rDelimAst,"g").replace(/punct/g,Se._punctuation).getRegex(),Se.emStrong.rDelimUnd=Et(Se.emStrong.rDelimUnd,"g").replace(/punct/g,Se._punctuation).getRegex(),Se._escapes=/\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/g,Se._scheme=/[a-zA-Z][a-zA-Z0-9+.-]{1,31}/,Se._email=/[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+(@)[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)+(?![-_])/,Se.autolink=Et(Se.autolink).replace("scheme",Se._scheme).replace("email",Se._email).getRegex(),Se._attribute=/\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/,Se.tag=Et(Se.tag).replace("comment",Se._comment).replace("attribute",Se._attribute).getRegex(),Se._label=/(?:\[(?:\\.|[^\[\]\\])*\]|\\.|`[^`]*`|[^\[\]\\`])*?/,Se._href=/<(?:\\.|[^\n<>\\])+>|[^\s\x00-\x1f]*/,Se._title=/"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/,Se.link=Et(Se.link).replace("label",Se._label).replace("href",Se._href).replace("title",Se._title).getRegex(),Se.reflink=Et(Se.reflink).replace("label",Se._label).getRegex(),Se.reflinkSearch=Et(Se.reflinkSearch,"g").replace("reflink",Se.reflink).replace("nolink",Se.nolink).getRegex(),Se.normal=Ft({},Se),Se.pedantic=Ft({},Se.normal,{strong:{start:/^__|\*\*/,middle:/^__(?=\S)([\s\S]*?\S)__(?!_)|^\*\*(?=\S)([\s\S]*?\S)\*\*(?!\*)/,endAst:/\*\*(?!\*)/g,endUnd:/__(?!_)/g},em:{start:/^_|\*/,middle:/^()\*(?=\S)([\s\S]*?\S)\*(?!\*)|^_(?=\S)([\s\S]*?\S)_(?!_)/,endAst:/\*(?!\*)/g,endUnd:/_(?!_)/g},link:Et(/^!?\[(label)\]\((.*?)\)/).replace("label",Se._label).getRegex(),reflink:Et(/^!?\[(label)\]\s*\[([^\]]*)\]/).replace("label",Se._label).getRegex()}),Se.gfm=Ft({},Se.normal,{escape:Et(Se.escape).replace("])","~|])").getRegex(),_extended_email:/[A-Za-z0-9._+-]+(@)[a-zA-Z0-9-_]+(?:\.[a-zA-Z0-9-_]*[a-zA-Z0-9])+(?![-_])/,url:/^((?:ftp|https?):\/\/|www\.)(?:[a-zA-Z0-9\-]+\.?)+[^\s<]*|^email/,_backpedal:/(?:[^?!.,:;*_~()&]+|\([^)]*\)|&(?![a-zA-Z0-9]+;$)|[?!.,:;*_~)]+(?!$))+/,del:/^(~~?)(?=[^\s~])([\s\S]*?[^\s~])\1(?=[^~]|$)/,text:/^([`~]+|[^`~])(?:(?= {2,}\n)|(?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)|[\s\S]*?(?:(?=[\\<!\[`*~_]|\b_|https?:\/\/|ftp:\/\/|www\.|$)|[^ ](?= {2,}\n)|[^a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-](?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)))/}),Se.gfm.url=Et(Se.gfm.url,"i").replace("email",Se.gfm._extended_email).getRegex(),Se.breaks=Ft({},Se.gfm,{br:Et(Se.br).replace("{2,}","*").getRegex(),text:Et(Se.gfm.text).replace("\\b_","\\b_| {2,}\\n").replace(/\{2,\}/g,"*").getRegex()});var Gt={block:Ut,inline:Se},ht=Oe,tn=se.exports.defaults,dt=Gt.block,Je=Gt.inline,xe=G.repeatString;function _e(We){return We.replace(/---/g,"\u2014").replace(/--/g,"\u2013").replace(/(^|[-\u2014/(\[{"\s])'/g,"$1\u2018").replace(/'/g,"\u2019").replace(/(^|[-\u2014/(\[{\u2018\s])"/g,"$1\u201C").replace(/"/g,"\u201D").replace(/\.{3}/g,"\u2026")}function N(We){var Qe="",He,z,le=We.length;for(He=0;He<le;He++)z=We.charCodeAt(He),Math.random()>.5&&(z="x"+z.toString(16)),Qe+="&#"+z+";";return Qe}var Fe=function(){function We(He){this.tokens=[],this.tokens.links=Object.create(null),this.options=He||tn,this.options.tokenizer=this.options.tokenizer||new ht,this.tokenizer=this.options.tokenizer,this.tokenizer.options=this.options;var z={block:dt.normal,inline:Je.normal};this.options.pedantic?(z.block=dt.pedantic,z.inline=Je.pedantic):this.options.gfm&&(z.block=dt.gfm,this.options.breaks?z.inline=Je.breaks:z.inline=Je.gfm),this.tokenizer.rules=z}We.lex=function(z,le){var me=new We(le);return me.lex(z)},We.lexInline=function(z,le){var me=new We(le);return me.inlineTokens(z)};var Qe=We.prototype;return Qe.lex=function(z){return z=z.replace(/\r\n|\r/g,`
`).replace(/\t/g," "),this.blockTokens(z,this.tokens,!0),this.inline(this.tokens),this.tokens},Qe.blockTokens=function(z,le,me){le===void 0&&(le=[]),me===void 0&&(me=!0),this.options.pedantic&&(z=z.replace(/^ +$/gm,""));for(var Be,be,Tt,Wt;z;){if(Be=this.tokenizer.space(z)){z=z.substring(Be.raw.length),Be.type&&le.push(Be);continue}if(Be=this.tokenizer.code(z)){z=z.substring(Be.raw.length),Wt=le[le.length-1],Wt&&Wt.type==="paragraph"?(Wt.raw+=`
`+Be.raw,Wt.text+=`
`+Be.text):le.push(Be);continue}if(Be=this.tokenizer.fences(z)){z=z.substring(Be.raw.length),le.push(Be);continue}if(Be=this.tokenizer.heading(z)){z=z.substring(Be.raw.length),le.push(Be);continue}if(Be=this.tokenizer.nptable(z)){z=z.substring(Be.raw.length),le.push(Be);continue}if(Be=this.tokenizer.hr(z)){z=z.substring(Be.raw.length),le.push(Be);continue}if(Be=this.tokenizer.blockquote(z)){z=z.substring(Be.raw.length),Be.tokens=this.blockTokens(Be.text,[],me),le.push(Be);continue}if(Be=this.tokenizer.list(z)){for(z=z.substring(Be.raw.length),Tt=Be.items.length,be=0;be<Tt;be++)Be.items[be].tokens=this.blockTokens(Be.items[be].text,[],!1);le.push(Be);continue}if(Be=this.tokenizer.html(z)){z=z.substring(Be.raw.length),le.push(Be);continue}if(me&&(Be=this.tokenizer.def(z))){z=z.substring(Be.raw.length),this.tokens.links[Be.tag]||(this.tokens.links[Be.tag]={href:Be.href,title:Be.title});continue}if(Be=this.tokenizer.table(z)){z=z.substring(Be.raw.length),le.push(Be);continue}if(Be=this.tokenizer.lheading(z)){z=z.substring(Be.raw.length),le.push(Be);continue}if(me&&(Be=this.tokenizer.paragraph(z))){z=z.substring(Be.raw.length),le.push(Be);continue}if(Be=this.tokenizer.text(z)){z=z.substring(Be.raw.length),Wt=le[le.length-1],Wt&&Wt.type==="text"?(Wt.raw+=`
`+Be.raw,Wt.text+=`
`+Be.text):le.push(Be);continue}if(z){var an="Infinite loop on byte: "+z.charCodeAt(0);if(this.options.silent){console.error(an);break}else throw new Error(an)}}return le},Qe.inline=function(z){var le,me,Be,be,Tt,Wt,an=z.length;for(le=0;le<an;le++)switch(Wt=z[le],Wt.type){case"paragraph":case"text":case"heading":{Wt.tokens=[],this.inlineTokens(Wt.text,Wt.tokens);break}case"table":{for(Wt.tokens={header:[],cells:[]},be=Wt.header.length,me=0;me<be;me++)Wt.tokens.header[me]=[],this.inlineTokens(Wt.header[me],Wt.tokens.header[me]);for(be=Wt.cells.length,me=0;me<be;me++)for(Tt=Wt.cells[me],Wt.tokens.cells[me]=[],Be=0;Be<Tt.length;Be++)Wt.tokens.cells[me][Be]=[],this.inlineTokens(Tt[Be],Wt.tokens.cells[me][Be]);break}case"blockquote":{this.inline(Wt.tokens);break}case"list":{for(be=Wt.items.length,me=0;me<be;me++)this.inline(Wt.items[me].tokens);break}}return z},Qe.inlineTokens=function(z,le,me,Be){le===void 0&&(le=[]),me===void 0&&(me=!1),Be===void 0&&(Be=!1);var be,Tt,Wt=z,an,_n,Wn;if(this.tokens.links){var zn=Object.keys(this.tokens.links);if(zn.length>0)for(;(an=this.tokenizer.rules.inline.reflinkSearch.exec(Wt))!=null;)zn.includes(an[0].slice(an[0].lastIndexOf("[")+1,-1))&&(Wt=Wt.slice(0,an.index)+"["+xe("a",an[0].length-2)+"]"+Wt.slice(this.tokenizer.rules.inline.reflinkSearch.lastIndex))}for(;(an=this.tokenizer.rules.inline.blockSkip.exec(Wt))!=null;)Wt=Wt.slice(0,an.index)+"["+xe("a",an[0].length-2)+"]"+Wt.slice(this.tokenizer.rules.inline.blockSkip.lastIndex);for(;(an=this.tokenizer.rules.inline.escapedEmSt.exec(Wt))!=null;)Wt=Wt.slice(0,an.index)+"++"+Wt.slice(this.tokenizer.rules.inline.escapedEmSt.lastIndex);for(;z;){if(_n||(Wn=""),_n=!1,be=this.tokenizer.escape(z)){z=z.substring(be.raw.length),le.push(be);continue}if(be=this.tokenizer.tag(z,me,Be)){z=z.substring(be.raw.length),me=be.inLink,Be=be.inRawBlock;var On=le[le.length-1];On&&be.type==="text"&&On.type==="text"?(On.raw+=be.raw,On.text+=be.text):le.push(be);continue}if(be=this.tokenizer.link(z)){z=z.substring(be.raw.length),be.type==="link"&&(be.tokens=this.inlineTokens(be.text,[],!0,Be)),le.push(be);continue}if(be=this.tokenizer.reflink(z,this.tokens.links)){z=z.substring(be.raw.length);var Un=le[le.length-1];be.type==="link"?(be.tokens=this.inlineTokens(be.text,[],!0,Be),le.push(be)):Un&&be.type==="text"&&Un.type==="text"?(Un.raw+=be.raw,Un.text+=be.text):le.push(be);continue}if(be=this.tokenizer.emStrong(z,Wt,Wn)){z=z.substring(be.raw.length),be.tokens=this.inlineTokens(be.text,[],me,Be),le.push(be);continue}if(be=this.tokenizer.codespan(z)){z=z.substring(be.raw.length),le.push(be);continue}if(be=this.tokenizer.br(z)){z=z.substring(be.raw.length),le.push(be);continue}if(be=this.tokenizer.del(z)){z=z.substring(be.raw.length),be.tokens=this.inlineTokens(be.text,[],me,Be),le.push(be);continue}if(be=this.tokenizer.autolink(z,N)){z=z.substring(be.raw.length),le.push(be);continue}if(!me&&(be=this.tokenizer.url(z,N))){z=z.substring(be.raw.length),le.push(be);continue}if(be=this.tokenizer.inlineText(z,Be,_e)){z=z.substring(be.raw.length),be.raw.slice(-1)!=="_"&&(Wn=be.raw.slice(-1)),_n=!0,Tt=le[le.length-1],Tt&&Tt.type==="text"?(Tt.raw+=be.raw,Tt.text+=be.text):le.push(be);continue}if(z){var ar="Infinite loop on byte: "+z.charCodeAt(0);if(this.options.silent){console.error(ar);break}else throw new Error(ar)}}return le},b(We,null,[{key:"rules",get:function(){return{block:dt,inline:Je}}}]),We}(),De=se.exports.defaults,V=G.cleanUrl,T=G.escape,J=function(){function We(He){this.options=He||De}var Qe=We.prototype;return Qe.code=function(z,le,me){var Be=(le||"").match(/\S*/)[0];if(this.options.highlight){var be=this.options.highlight(z,Be);be!=null&&be!==z&&(me=!0,z=be)}return z=z.replace(/\n$/,"")+`
`,Be?'<pre><code class="'+this.options.langPrefix+T(Be,!0)+'">'+(me?z:T(z,!0))+`</code></pre>
`:"<pre><code>"+(me?z:T(z,!0))+`</code></pre>
`},Qe.blockquote=function(z){return`<blockquote>
`+z+`</blockquote>
`},Qe.html=function(z){return z},Qe.heading=function(z,le,me,Be){return this.options.headerIds?"<h"+le+' id="'+this.options.headerPrefix+Be.slug(me)+'">'+z+"</h"+le+`>
`:"<h"+le+">"+z+"</h"+le+`>
`},Qe.hr=function(){return this.options.xhtml?`<hr/>
`:`<hr>
`},Qe.list=function(z,le,me){var Be=le?"ol":"ul",be=le&&me!==1?' start="'+me+'"':"";return"<"+Be+be+`>
`+z+"</"+Be+`>
`},Qe.listitem=function(z){return"<li>"+z+`</li>
`},Qe.checkbox=function(z){return"<input "+(z?'checked="" ':"")+'disabled="" type="checkbox"'+(this.options.xhtml?" /":"")+"> "},Qe.paragraph=function(z){return"<p>"+z+`</p>
`},Qe.table=function(z,le){return le&&(le="<tbody>"+le+"</tbody>"),`<table>
<thead>
`+z+`</thead>
`+le+`</table>
`},Qe.tablerow=function(z){return`<tr>
`+z+`</tr>
`},Qe.tablecell=function(z,le){var me=le.header?"th":"td",Be=le.align?"<"+me+' align="'+le.align+'">':"<"+me+">";return Be+z+"</"+me+`>
`},Qe.strong=function(z){return"<strong>"+z+"</strong>"},Qe.em=function(z){return"<em>"+z+"</em>"},Qe.codespan=function(z){return"<code>"+z+"</code>"},Qe.br=function(){return this.options.xhtml?"<br/>":"<br>"},Qe.del=function(z){return"<del>"+z+"</del>"},Qe.link=function(z,le,me){if(z=V(this.options.sanitize,this.options.baseUrl,z),z===null)return me;var Be='<a href="'+T(z)+'"';return le&&(Be+=' title="'+le+'"'),Be+=">"+me+"</a>",Be},Qe.image=function(z,le,me){if(z=V(this.options.sanitize,this.options.baseUrl,z),z===null)return me;var Be='<img src="'+z+'" alt="'+me+'"';return le&&(Be+=' title="'+le+'"'),Be+=this.options.xhtml?"/>":">",Be},Qe.text=function(z){return z},We}(),ve=function(){function We(){}var Qe=We.prototype;return Qe.strong=function(z){return z},Qe.em=function(z){return z},Qe.codespan=function(z){return z},Qe.del=function(z){return z},Qe.html=function(z){return z},Qe.text=function(z){return z},Qe.link=function(z,le,me){return""+me},Qe.image=function(z,le,me){return""+me},Qe.br=function(){return""},We}(),te=function(){function We(){this.seen={}}var Qe=We.prototype;return Qe.serialize=function(z){return z.toLowerCase().trim().replace(/<[!\/a-z].*?>/ig,"").replace(/[\u2000-\u206F\u2E00-\u2E7F\\'!"#$%&()*+,./:;<=>?@[\]^`{|}~]/g,"").replace(/\s/g,"-")},Qe.getNextSafeSlug=function(z,le){var me=z,Be=0;if(this.seen.hasOwnProperty(me)){Be=this.seen[z];do Be++,me=z+"-"+Be;while(this.seen.hasOwnProperty(me))}return le||(this.seen[z]=Be,this.seen[me]=0),me},Qe.slug=function(z,le){le===void 0&&(le={});var me=this.serialize(z);return this.getNextSafeSlug(me,le.dryrun)},We}(),$=J,ue=ve,Ie=te,Ce=se.exports.defaults,ke=G.unescape,Le=function(){function We(He){this.options=He||Ce,this.options.renderer=this.options.renderer||new $,this.renderer=this.options.renderer,this.renderer.options=this.options,this.textRenderer=new ue,this.slugger=new Ie}We.parse=function(z,le){var me=new We(le);return me.parse(z)},We.parseInline=function(z,le){var me=new We(le);return me.parseInline(z)};var Qe=We.prototype;return Qe.parse=function(z,le){le===void 0&&(le=!0);var me="",Be,be,Tt,Wt,an,_n,Wn,zn,On,Un,ar,mr,tr,gr,sn,Kt,yn,Yn,or=z.length;for(Be=0;Be<or;Be++)switch(Un=z[Be],Un.type){case"space":continue;case"hr":{me+=this.renderer.hr();continue}case"heading":{me+=this.renderer.heading(this.parseInline(Un.tokens),Un.depth,ke(this.parseInline(Un.tokens,this.textRenderer)),this.slugger);continue}case"code":{me+=this.renderer.code(Un.text,Un.lang,Un.escaped);continue}case"table":{for(zn="",Wn="",Wt=Un.header.length,be=0;be<Wt;be++)Wn+=this.renderer.tablecell(this.parseInline(Un.tokens.header[be]),{header:!0,align:Un.align[be]});for(zn+=this.renderer.tablerow(Wn),On="",Wt=Un.cells.length,be=0;be<Wt;be++){for(_n=Un.tokens.cells[be],Wn="",an=_n.length,Tt=0;Tt<an;Tt++)Wn+=this.renderer.tablecell(this.parseInline(_n[Tt]),{header:!1,align:Un.align[Tt]});On+=this.renderer.tablerow(Wn)}me+=this.renderer.table(zn,On);continue}case"blockquote":{On=this.parse(Un.tokens),me+=this.renderer.blockquote(On);continue}case"list":{for(ar=Un.ordered,mr=Un.start,tr=Un.loose,Wt=Un.items.length,On="",be=0;be<Wt;be++)sn=Un.items[be],Kt=sn.checked,yn=sn.task,gr="",sn.task&&(Yn=this.renderer.checkbox(Kt),tr?sn.tokens.length>0&&sn.tokens[0].type==="text"?(sn.tokens[0].text=Yn+" "+sn.tokens[0].text,sn.tokens[0].tokens&&sn.tokens[0].tokens.length>0&&sn.tokens[0].tokens[0].type==="text"&&(sn.tokens[0].tokens[0].text=Yn+" "+sn.tokens[0].tokens[0].text)):sn.tokens.unshift({type:"text",text:Yn}):gr+=Yn),gr+=this.parse(sn.tokens,tr),On+=this.renderer.listitem(gr,yn,Kt);me+=this.renderer.list(On,ar,mr);continue}case"html":{me+=this.renderer.html(Un.text);continue}case"paragraph":{me+=this.renderer.paragraph(this.parseInline(Un.tokens));continue}case"text":{for(On=Un.tokens?this.parseInline(Un.tokens):Un.text;Be+1<or&&z[Be+1].type==="text";)Un=z[++Be],On+=`
`+(Un.tokens?this.parseInline(Un.tokens):Un.text);me+=le?this.renderer.paragraph(On):On;continue}default:{var Ke='Token with "'+Un.type+'" type was not found.';if(this.options.silent){console.error(Ke);return}else throw new Error(Ke)}}return me},Qe.parseInline=function(z,le){le=le||this.renderer;var me="",Be,be,Tt=z.length;for(Be=0;Be<Tt;Be++)switch(be=z[Be],be.type){case"escape":{me+=le.text(be.text);break}case"html":{me+=le.html(be.text);break}case"link":{me+=le.link(be.href,be.title,this.parseInline(be.tokens,le));break}case"image":{me+=le.image(be.href,be.title,be.text);break}case"strong":{me+=le.strong(this.parseInline(be.tokens,le));break}case"em":{me+=le.em(this.parseInline(be.tokens,le));break}case"codespan":{me+=le.codespan(be.text);break}case"br":{me+=le.br();break}case"del":{me+=le.del(this.parseInline(be.tokens,le));break}case"text":{me+=le.text(be.text);break}default:{var Wt='Token with "'+be.type+'" type was not found.';if(this.options.silent){console.error(Wt);return}else throw new Error(Wt)}}return me},We}(),mt=Fe,je=Le,qe=Oe,ut=J,Nt=ve,It=te,bt=G.merge,on=G.checkSanitizeDeprecation,rn=G.escape,Ct=se.exports.getDefaults,gn=se.exports.changeDefaults,Ln=se.exports.defaults;function Mt(We,Qe,He){if(typeof We=="undefined"||We===null)throw new Error("marked(): input parameter is undefined or null");if(typeof We!="string")throw new Error("marked(): input parameter is of type "+Object.prototype.toString.call(We)+", string expected");if(typeof Qe=="function"&&(He=Qe,Qe=null),Qe=bt({},Mt.defaults,Qe||{}),on(Qe),He){var z=Qe.highlight,le;try{le=mt.lex(We,Qe)}catch(Tt){return He(Tt)}var me=function(Wt){var an;if(!Wt)try{Qe.walkTokens&&Mt.walkTokens(le,Qe.walkTokens),an=je.parse(le,Qe)}catch(_n){Wt=_n}return Qe.highlight=z,Wt?He(Wt):He(null,an)};if(!z||z.length<3||(delete Qe.highlight,!le.length))return me();var Be=0;Mt.walkTokens(le,function(Tt){Tt.type==="code"&&(Be++,setTimeout(function(){z(Tt.text,Tt.lang,function(Wt,an){if(Wt)return me(Wt);an!=null&&an!==Tt.text&&(Tt.text=an,Tt.escaped=!0),Be--,Be===0&&me()})},0))}),Be===0&&me();return}try{var be=mt.lex(We,Qe);return Qe.walkTokens&&Mt.walkTokens(be,Qe.walkTokens),je.parse(be,Qe)}catch(Tt){if(Tt.message+=`
Please report this to https://github.com/markedjs/marked.`,Qe.silent)return"<p>An error occurred:</p><pre>"+rn(Tt.message+"",!0)+"</pre>";throw Tt}}Mt.options=Mt.setOptions=function(We){return bt(Mt.defaults,We),gn(Mt.defaults),Mt},Mt.getDefaults=Ct,Mt.defaults=Ln,Mt.use=function(We){var Qe=bt({},We);if(We.renderer&&function(){var z=Mt.defaults.renderer||new ut,le=function(be){var Tt=z[be];z[be]=function(){for(var Wt=arguments.length,an=new Array(Wt),_n=0;_n<Wt;_n++)an[_n]=arguments[_n];var Wn=We.renderer[be].apply(z,an);return Wn===!1&&(Wn=Tt.apply(z,an)),Wn}};for(var me in We.renderer)le(me);Qe.renderer=z}(),We.tokenizer&&function(){var z=Mt.defaults.tokenizer||new qe,le=function(be){var Tt=z[be];z[be]=function(){for(var Wt=arguments.length,an=new Array(Wt),_n=0;_n<Wt;_n++)an[_n]=arguments[_n];var Wn=We.tokenizer[be].apply(z,an);return Wn===!1&&(Wn=Tt.apply(z,an)),Wn}};for(var me in We.tokenizer)le(me);Qe.tokenizer=z}(),We.walkTokens){var He=Mt.defaults.walkTokens;Qe.walkTokens=function(z){We.walkTokens(z),He&&He(z)}}Mt.setOptions(Qe)},Mt.walkTokens=function(We,Qe){for(var He=ge(We),z;!(z=He()).done;){var le=z.value;switch(Qe(le),le.type){case"table":{for(var me=ge(le.tokens.header),Be;!(Be=me()).done;){var be=Be.value;Mt.walkTokens(be,Qe)}for(var Tt=ge(le.tokens.cells),Wt;!(Wt=Tt()).done;)for(var an=Wt.value,_n=ge(an),Wn;!(Wn=_n()).done;){var zn=Wn.value;Mt.walkTokens(zn,Qe)}break}case"list":{Mt.walkTokens(le.items,Qe);break}default:le.tokens&&Mt.walkTokens(le.tokens,Qe)}}},Mt.parseInline=function(We,Qe){if(typeof We=="undefined"||We===null)throw new Error("marked.parseInline(): input parameter is undefined or null");if(typeof We!="string")throw new Error("marked.parseInline(): input parameter is of type "+Object.prototype.toString.call(We)+", string expected");Qe=bt({},Mt.defaults,Qe||{}),on(Qe);try{var He=mt.lexInline(We,Qe);return Qe.walkTokens&&Mt.walkTokens(He,Qe.walkTokens),je.parseInline(He,Qe)}catch(z){if(z.message+=`
Please report this to https://github.com/markedjs/marked.`,Qe.silent)return"<p>An error occurred:</p><pre>"+rn(z.message+"",!0)+"</pre>";throw z}},Mt.Parser=je,Mt.parser=je.parse,Mt.Renderer=ut,Mt.TextRenderer=Nt,Mt.Lexer=mt,Mt.lexer=mt.lex,Mt.Tokenizer=qe,Mt.Slugger=It,Mt.parse=Mt;var hn=Mt;return hn})},11690:function(Cn){const tt=/[&<>"']/,b=/[&<>"']/g,P=/[<>"']|&(?!#?\w+;)/,re=/[<>"']|&(?!#?\w+;)/g,ge={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;"},se=j=>ge[j];function U(j,Y){if(Y){if(tt.test(j))return j.replace(b,se)}else if(P.test(j))return j.replace(re,se);return j}const f=/&(#(?:\d+)|(?:#x[0-9A-Fa-f]+)|(?:\w+));?/ig;function fe(j){return j.replace(f,(Y,ie)=>(ie=ie.toLowerCase(),ie==="colon"?":":ie.charAt(0)==="#"?ie.charAt(1)==="x"?String.fromCharCode(parseInt(ie.substring(2),16)):String.fromCharCode(+ie.substring(1)):""))}const ee=/(^|[^\[])\^/g;function A(j,Y){j=j.source||j,Y=Y||"";const ie={replace:(de,pe)=>(pe=pe.source||pe,pe=pe.replace(ee,"$1"),j=j.replace(de,pe),ie),getRegex:()=>new RegExp(j,Y)};return ie}const E=/[^\w:]/g,x=/^$|^[a-z][a-z0-9+.-]*:|^[?#]/i;function h(j,Y,ie){if(j){let de;try{de=decodeURIComponent(fe(ie)).replace(E,"").toLowerCase()}catch(pe){return null}if(de.indexOf("javascript:")===0||de.indexOf("vbscript:")===0||de.indexOf("data:")===0)return null}Y&&!x.test(ie)&&(ie=R(Y,ie));try{ie=encodeURI(ie).replace(/%25/g,"%")}catch(de){return null}return ie}const p={},_=/^[^:]+:\/*[^/]*$/,C=/^([^:]+:)[\s\S]*$/,F=/^([^:]+:\/*[^/]*)[\s\S]*$/;function R(j,Y){p[" "+j]||(_.test(j)?p[" "+j]=j+"/":p[" "+j]=I(j,"/",!0)),j=p[" "+j];const ie=j.indexOf(":")===-1;return Y.substring(0,2)==="//"?ie?Y:j.replace(C,"$1")+Y:Y.charAt(0)==="/"?ie?Y:j.replace(F,"$1")+Y:j+Y}const K={exec:function(){}};function B(j){let Y=1,ie,de;for(;Y<arguments.length;Y++){ie=arguments[Y];for(de in ie)Object.prototype.hasOwnProperty.call(ie,de)&&(j[de]=ie[de])}return j}function D(j,Y){const ie=j.replace(/\|/g,(W,M,X)=>{let G=!1,ne=M;for(;--ne>=0&&X[ne]==="\\";)G=!G;return G?"|":" |"}),de=ie.split(/ \|/);let pe=0;if(de.length>Y)de.splice(Y);else for(;de.length<Y;)de.push("");for(;pe<de.length;pe++)de[pe]=de[pe].trim().replace(/\\\|/g,"|");return de}function I(j,Y,ie){const de=j.length;if(de===0)return"";let pe=0;for(;pe<de;){const W=j.charAt(de-pe-1);if(W===Y&&!ie)pe++;else if(W!==Y&&ie)pe++;else break}return j.substr(0,de-pe)}function S(j,Y){if(j.indexOf(Y[1])===-1)return-1;const ie=j.length;let de=0,pe=0;for(;pe<ie;pe++)if(j[pe]==="\\")pe++;else if(j[pe]===Y[0])de++;else if(j[pe]===Y[1]&&(de--,de<0))return pe;return-1}function q(j){j&&j.sanitize&&!j.silent&&console.warn("marked(): sanitize and sanitizer parameters are deprecated since version 0.7.0, should not be used and will be removed in the future. Read more here: https://marked.js.org/#/USING_ADVANCED.md#options")}function ae(j,Y){if(Y<1)return"";let ie="";for(;Y>1;)Y&1&&(ie+=j),Y>>=1,j+=j;return ie+j}Cn.exports={escape:U,unescape:fe,edit:A,cleanUrl:h,resolveUrl:R,noopTest:K,merge:B,splitCells:D,rtrim:I,findClosingBracket:S,checkSanitizeDeprecation:q,repeatString:ae}},75918:function(Cn,tt,b){"use strict";b.d(tt,{Wi:function(){return f},Z0:function(){return fe},aU:function(){return U},eZ:function(){return A},wY:function(){return ee}});var P=b(4348),re=b(69323),ge=b(13268),se=function(E,x,h,p){function _(C){return C instanceof h?C:new h(function(F){F(C)})}return new(h||(h=Promise))(function(C,F){function R(D){try{B(p.next(D))}catch(I){F(I)}}function K(D){try{B(p.throw(D))}catch(I){F(I)}}function B(D){D.done?C(D.value):_(D.value).then(R,K)}B((p=p.apply(E,x||[])).next())})};class U extends re.JT{constructor(x,h="",p="",_=!0,C){super(),this._onDidChange=this._register(new P.Q5),this.onDidChange=this._onDidChange.event,this._enabled=!0,this._id=x,this._label=h,this._cssClass=p,this._enabled=_,this._actionCallback=C}get id(){return this._id}get label(){return this._label}set label(x){this._setLabel(x)}_setLabel(x){this._label!==x&&(this._label=x,this._onDidChange.fire({label:x}))}get tooltip(){return this._tooltip||""}set tooltip(x){this._setTooltip(x)}_setTooltip(x){this._tooltip!==x&&(this._tooltip=x,this._onDidChange.fire({tooltip:x}))}get class(){return this._cssClass}set class(x){this._setClass(x)}_setClass(x){this._cssClass!==x&&(this._cssClass=x,this._onDidChange.fire({class:x}))}get enabled(){return this._enabled}set enabled(x){this._setEnabled(x)}_setEnabled(x){this._enabled!==x&&(this._enabled=x,this._onDidChange.fire({enabled:x}))}get checked(){return this._checked}set checked(x){this._setChecked(x)}_setChecked(x){this._checked!==x&&(this._checked=x,this._onDidChange.fire({checked:x}))}run(x,h){return se(this,void 0,void 0,function*(){this._actionCallback&&(yield this._actionCallback(x))})}}class f extends re.JT{constructor(){super(...arguments),this._onBeforeRun=this._register(new P.Q5),this.onBeforeRun=this._onBeforeRun.event,this._onDidRun=this._register(new P.Q5),this.onDidRun=this._onDidRun.event}run(x,h){return se(this,void 0,void 0,function*(){if(!x.enabled)return;this._onBeforeRun.fire({action:x});let p;try{yield this.runAction(x,h)}catch(_){p=_}this._onDidRun.fire({action:x,error:p})})}runAction(x,h){return se(this,void 0,void 0,function*(){yield x.run(h)})}}class fe extends U{constructor(x){super(fe.ID,x,x?"separator text":"separator"),this.checked=!1,this.enabled=!1}}fe.ID="vs.actions.separator";class ee{constructor(x,h,p,_){this.tooltip="",this.enabled=!0,this.checked=!1,this.id=x,this.label=h,this.class=_,this._actions=p}get actions(){return this._actions}dispose(){}run(){return se(this,void 0,void 0,function*(){})}}class A extends U{constructor(){super(A.ID,ge.N("submenu.empty","(empty)"),void 0,!1)}}A.ID="vs.actions.empty"},76068:function(Cn,tt,b){"use strict";b.d(tt,{ok:function(){return P}});function P(re,ge){if(!re)throw new Error(ge?`Assertion failed (${ge})`:"Assertion Failed")}},52615:function(Cn,tt,b){"use strict";b.d(tt,{CM:function(){return U},JL:function(){return f},dT:function(){return ee},fK:function(){return se},lA:function(){return fe}});var P=b(4348);class re{constructor(){this._icons=new Map,this._onDidRegister=new P.Q5}add(E){const x=this._icons.get(E.id);x?E.description?x.description=E.description:console.error(`Duplicate registration of codicon ${E.id}`):(this._icons.set(E.id,E),this._onDidRegister.fire(E))}get(E){return this._icons.get(E)}get all(){return this._icons.values()}get onDidRegister(){return this._onDidRegister.event}}const ge=new re,se=ge;function U(A,E){return new fe(A,E)}function f(A){return A?A.replace(/\$\((.*?)\)/g,(E,x)=>` ${x} `).trim():""}class fe{constructor(E,x,h){this.id=E,this.definition=x,this.description=h,ge.add(this)}get classNames(){return"codicon codicon-"+this.id}get classNamesArray(){return["codicon","codicon-"+this.id]}get cssSelector(){return".codicon.codicon-"+this.id}}var ee;(function(A){A.iconNameSegment="[A-Za-z0-9]+",A.iconNameExpression="[A-Za-z0-9\\-]+",A.iconModifierExpression="~[A-Za-z]+";const E=new RegExp(`^(${A.iconNameExpression})(${A.iconModifierExpression})?$`);function x(_){if(_ instanceof fe)return["codicon","codicon-"+_.id];const C=E.exec(_.id);if(!C)return x(fe.error);let[,F,R]=C;const K=["codicon","codicon-"+F];return R&&K.push("codicon-modifier-"+R.substr(1)),K}A.asClassNameArray=x;function h(_){return x(_).join(" ")}A.asClassName=h;function p(_){return"."+x(_).join(".")}A.asCSSSelector=p})(ee||(ee={})),function(A){A.add=new A("add",{fontCharacter:"\\ea60"}),A.plus=new A("plus",A.add.definition),A.gistNew=new A("gist-new",A.add.definition),A.repoCreate=new A("repo-create",A.add.definition),A.lightbulb=new A("lightbulb",{fontCharacter:"\\ea61"}),A.lightBulb=new A("light-bulb",{fontCharacter:"\\ea61"}),A.repo=new A("repo",{fontCharacter:"\\ea62"}),A.repoDelete=new A("repo-delete",{fontCharacter:"\\ea62"}),A.gistFork=new A("gist-fork",{fontCharacter:"\\ea63"}),A.repoForked=new A("repo-forked",{fontCharacter:"\\ea63"}),A.gitPullRequest=new A("git-pull-request",{fontCharacter:"\\ea64"}),A.gitPullRequestAbandoned=new A("git-pull-request-abandoned",{fontCharacter:"\\ea64"}),A.recordKeys=new A("record-keys",{fontCharacter:"\\ea65"}),A.keyboard=new A("keyboard",{fontCharacter:"\\ea65"}),A.tag=new A("tag",{fontCharacter:"\\ea66"}),A.tagAdd=new A("tag-add",{fontCharacter:"\\ea66"}),A.tagRemove=new A("tag-remove",{fontCharacter:"\\ea66"}),A.person=new A("person",{fontCharacter:"\\ea67"}),A.personFollow=new A("person-follow",{fontCharacter:"\\ea67"}),A.personOutline=new A("person-outline",{fontCharacter:"\\ea67"}),A.personFilled=new A("person-filled",{fontCharacter:"\\ea67"}),A.gitBranch=new A("git-branch",{fontCharacter:"\\ea68"}),A.gitBranchCreate=new A("git-branch-create",{fontCharacter:"\\ea68"}),A.gitBranchDelete=new A("git-branch-delete",{fontCharacter:"\\ea68"}),A.sourceControl=new A("source-control",{fontCharacter:"\\ea68"}),A.mirror=new A("mirror",{fontCharacter:"\\ea69"}),A.mirrorPublic=new A("mirror-public",{fontCharacter:"\\ea69"}),A.star=new A("star",{fontCharacter:"\\ea6a"}),A.starAdd=new A("star-add",{fontCharacter:"\\ea6a"}),A.starDelete=new A("star-delete",{fontCharacter:"\\ea6a"}),A.starEmpty=new A("star-empty",{fontCharacter:"\\ea6a"}),A.comment=new A("comment",{fontCharacter:"\\ea6b"}),A.commentAdd=new A("comment-add",{fontCharacter:"\\ea6b"}),A.alert=new A("alert",{fontCharacter:"\\ea6c"}),A.warning=new A("warning",{fontCharacter:"\\ea6c"}),A.search=new A("search",{fontCharacter:"\\ea6d"}),A.searchSave=new A("search-save",{fontCharacter:"\\ea6d"}),A.logOut=new A("log-out",{fontCharacter:"\\ea6e"}),A.signOut=new A("sign-out",{fontCharacter:"\\ea6e"}),A.logIn=new A("log-in",{fontCharacter:"\\ea6f"}),A.signIn=new A("sign-in",{fontCharacter:"\\ea6f"}),A.eye=new A("eye",{fontCharacter:"\\ea70"}),A.eyeUnwatch=new A("eye-unwatch",{fontCharacter:"\\ea70"}),A.eyeWatch=new A("eye-watch",{fontCharacter:"\\ea70"}),A.circleFilled=new A("circle-filled",{fontCharacter:"\\ea71"}),A.primitiveDot=new A("primitive-dot",{fontCharacter:"\\ea71"}),A.closeDirty=new A("close-dirty",{fontCharacter:"\\ea71"}),A.debugBreakpoint=new A("debug-breakpoint",{fontCharacter:"\\ea71"}),A.debugBreakpointDisabled=new A("debug-breakpoint-disabled",{fontCharacter:"\\ea71"}),A.debugHint=new A("debug-hint",{fontCharacter:"\\ea71"}),A.primitiveSquare=new A("primitive-square",{fontCharacter:"\\ea72"}),A.edit=new A("edit",{fontCharacter:"\\ea73"}),A.pencil=new A("pencil",{fontCharacter:"\\ea73"}),A.info=new A("info",{fontCharacter:"\\ea74"}),A.issueOpened=new A("issue-opened",{fontCharacter:"\\ea74"}),A.gistPrivate=new A("gist-private",{fontCharacter:"\\ea75"}),A.gitForkPrivate=new A("git-fork-private",{fontCharacter:"\\ea75"}),A.lock=new A("lock",{fontCharacter:"\\ea75"}),A.mirrorPrivate=new A("mirror-private",{fontCharacter:"\\ea75"}),A.close=new A("close",{fontCharacter:"\\ea76"}),A.removeClose=new A("remove-close",{fontCharacter:"\\ea76"}),A.x=new A("x",{fontCharacter:"\\ea76"}),A.repoSync=new A("repo-sync",{fontCharacter:"\\ea77"}),A.sync=new A("sync",{fontCharacter:"\\ea77"}),A.clone=new A("clone",{fontCharacter:"\\ea78"}),A.desktopDownload=new A("desktop-download",{fontCharacter:"\\ea78"}),A.beaker=new A("beaker",{fontCharacter:"\\ea79"}),A.microscope=new A("microscope",{fontCharacter:"\\ea79"}),A.vm=new A("vm",{fontCharacter:"\\ea7a"}),A.deviceDesktop=new A("device-desktop",{fontCharacter:"\\ea7a"}),A.file=new A("file",{fontCharacter:"\\ea7b"}),A.fileText=new A("file-text",{fontCharacter:"\\ea7b"}),A.more=new A("more",{fontCharacter:"\\ea7c"}),A.ellipsis=new A("ellipsis",{fontCharacter:"\\ea7c"}),A.kebabHorizontal=new A("kebab-horizontal",{fontCharacter:"\\ea7c"}),A.mailReply=new A("mail-reply",{fontCharacter:"\\ea7d"}),A.reply=new A("reply",{fontCharacter:"\\ea7d"}),A.organization=new A("organization",{fontCharacter:"\\ea7e"}),A.organizationFilled=new A("organization-filled",{fontCharacter:"\\ea7e"}),A.organizationOutline=new A("organization-outline",{fontCharacter:"\\ea7e"}),A.newFile=new A("new-file",{fontCharacter:"\\ea7f"}),A.fileAdd=new A("file-add",{fontCharacter:"\\ea7f"}),A.newFolder=new A("new-folder",{fontCharacter:"\\ea80"}),A.fileDirectoryCreate=new A("file-directory-create",{fontCharacter:"\\ea80"}),A.trash=new A("trash",{fontCharacter:"\\ea81"}),A.trashcan=new A("trashcan",{fontCharacter:"\\ea81"}),A.history=new A("history",{fontCharacter:"\\ea82"}),A.clock=new A("clock",{fontCharacter:"\\ea82"}),A.folder=new A("folder",{fontCharacter:"\\ea83"}),A.fileDirectory=new A("file-directory",{fontCharacter:"\\ea83"}),A.symbolFolder=new A("symbol-folder",{fontCharacter:"\\ea83"}),A.logoGithub=new A("logo-github",{fontCharacter:"\\ea84"}),A.markGithub=new A("mark-github",{fontCharacter:"\\ea84"}),A.github=new A("github",{fontCharacter:"\\ea84"}),A.terminal=new A("terminal",{fontCharacter:"\\ea85"}),A.console=new A("console",{fontCharacter:"\\ea85"}),A.repl=new A("repl",{fontCharacter:"\\ea85"}),A.zap=new A("zap",{fontCharacter:"\\ea86"}),A.symbolEvent=new A("symbol-event",{fontCharacter:"\\ea86"}),A.error=new A("error",{fontCharacter:"\\ea87"}),A.stop=new A("stop",{fontCharacter:"\\ea87"}),A.variable=new A("variable",{fontCharacter:"\\ea88"}),A.symbolVariable=new A("symbol-variable",{fontCharacter:"\\ea88"}),A.array=new A("array",{fontCharacter:"\\ea8a"}),A.symbolArray=new A("symbol-array",{fontCharacter:"\\ea8a"}),A.symbolModule=new A("symbol-module",{fontCharacter:"\\ea8b"}),A.symbolPackage=new A("symbol-package",{fontCharacter:"\\ea8b"}),A.symbolNamespace=new A("symbol-namespace",{fontCharacter:"\\ea8b"}),A.symbolObject=new A("symbol-object",{fontCharacter:"\\ea8b"}),A.symbolMethod=new A("symbol-method",{fontCharacter:"\\ea8c"}),A.symbolFunction=new A("symbol-function",{fontCharacter:"\\ea8c"}),A.symbolConstructor=new A("symbol-constructor",{fontCharacter:"\\ea8c"}),A.symbolBoolean=new A("symbol-boolean",{fontCharacter:"\\ea8f"}),A.symbolNull=new A("symbol-null",{fontCharacter:"\\ea8f"}),A.symbolNumeric=new A("symbol-numeric",{fontCharacter:"\\ea90"}),A.symbolNumber=new A("symbol-number",{fontCharacter:"\\ea90"}),A.symbolStructure=new A("symbol-structure",{fontCharacter:"\\ea91"}),A.symbolStruct=new A("symbol-struct",{fontCharacter:"\\ea91"}),A.symbolParameter=new A("symbol-parameter",{fontCharacter:"\\ea92"}),A.symbolTypeParameter=new A("symbol-type-parameter",{fontCharacter:"\\ea92"}),A.symbolKey=new A("symbol-key",{fontCharacter:"\\ea93"}),A.symbolText=new A("symbol-text",{fontCharacter:"\\ea93"}),A.symbolReference=new A("symbol-reference",{fontCharacter:"\\ea94"}),A.goToFile=new A("go-to-file",{fontCharacter:"\\ea94"}),A.symbolEnum=new A("symbol-enum",{fontCharacter:"\\ea95"}),A.symbolValue=new A("symbol-value",{fontCharacter:"\\ea95"}),A.symbolRuler=new A("symbol-ruler",{fontCharacter:"\\ea96"}),A.symbolUnit=new A("symbol-unit",{fontCharacter:"\\ea96"}),A.activateBreakpoints=new A("activate-breakpoints",{fontCharacter:"\\ea97"}),A.archive=new A("archive",{fontCharacter:"\\ea98"}),A.arrowBoth=new A("arrow-both",{fontCharacter:"\\ea99"}),A.arrowDown=new A("arrow-down",{fontCharacter:"\\ea9a"}),A.arrowLeft=new A("arrow-left",{fontCharacter:"\\ea9b"}),A.arrowRight=new A("arrow-right",{fontCharacter:"\\ea9c"}),A.arrowSmallDown=new A("arrow-small-down",{fontCharacter:"\\ea9d"}),A.arrowSmallLeft=new A("arrow-small-left",{fontCharacter:"\\ea9e"}),A.arrowSmallRight=new A("arrow-small-right",{fontCharacter:"\\ea9f"}),A.arrowSmallUp=new A("arrow-small-up",{fontCharacter:"\\eaa0"}),A.arrowUp=new A("arrow-up",{fontCharacter:"\\eaa1"}),A.bell=new A("bell",{fontCharacter:"\\eaa2"}),A.bold=new A("bold",{fontCharacter:"\\eaa3"}),A.book=new A("book",{fontCharacter:"\\eaa4"}),A.bookmark=new A("bookmark",{fontCharacter:"\\eaa5"}),A.debugBreakpointConditionalUnverified=new A("debug-breakpoint-conditional-unverified",{fontCharacter:"\\eaa6"}),A.debugBreakpointConditional=new A("debug-breakpoint-conditional",{fontCharacter:"\\eaa7"}),A.debugBreakpointConditionalDisabled=new A("debug-breakpoint-conditional-disabled",{fontCharacter:"\\eaa7"}),A.debugBreakpointDataUnverified=new A("debug-breakpoint-data-unverified",{fontCharacter:"\\eaa8"}),A.debugBreakpointData=new A("debug-breakpoint-data",{fontCharacter:"\\eaa9"}),A.debugBreakpointDataDisabled=new A("debug-breakpoint-data-disabled",{fontCharacter:"\\eaa9"}),A.debugBreakpointLogUnverified=new A("debug-breakpoint-log-unverified",{fontCharacter:"\\eaaa"}),A.debugBreakpointLog=new A("debug-breakpoint-log",{fontCharacter:"\\eaab"}),A.debugBreakpointLogDisabled=new A("debug-breakpoint-log-disabled",{fontCharacter:"\\eaab"}),A.briefcase=new A("briefcase",{fontCharacter:"\\eaac"}),A.broadcast=new A("broadcast",{fontCharacter:"\\eaad"}),A.browser=new A("browser",{fontCharacter:"\\eaae"}),A.bug=new A("bug",{fontCharacter:"\\eaaf"}),A.calendar=new A("calendar",{fontCharacter:"\\eab0"}),A.caseSensitive=new A("case-sensitive",{fontCharacter:"\\eab1"}),A.check=new A("check",{fontCharacter:"\\eab2"}),A.checklist=new A("checklist",{fontCharacter:"\\eab3"}),A.chevronDown=new A("chevron-down",{fontCharacter:"\\eab4"}),A.dropDownButton=new A("drop-down-button",A.chevronDown.definition),A.chevronLeft=new A("chevron-left",{fontCharacter:"\\eab5"}),A.chevronRight=new A("chevron-right",{fontCharacter:"\\eab6"}),A.chevronUp=new A("chevron-up",{fontCharacter:"\\eab7"}),A.chromeClose=new A("chrome-close",{fontCharacter:"\\eab8"}),A.chromeMaximize=new A("chrome-maximize",{fontCharacter:"\\eab9"}),A.chromeMinimize=new A("chrome-minimize",{fontCharacter:"\\eaba"}),A.chromeRestore=new A("chrome-restore",{fontCharacter:"\\eabb"}),A.circleOutline=new A("circle-outline",{fontCharacter:"\\eabc"}),A.debugBreakpointUnverified=new A("debug-breakpoint-unverified",{fontCharacter:"\\eabc"}),A.circleSlash=new A("circle-slash",{fontCharacter:"\\eabd"}),A.circuitBoard=new A("circuit-board",{fontCharacter:"\\eabe"}),A.clearAll=new A("clear-all",{fontCharacter:"\\eabf"}),A.clippy=new A("clippy",{fontCharacter:"\\eac0"}),A.closeAll=new A("close-all",{fontCharacter:"\\eac1"}),A.cloudDownload=new A("cloud-download",{fontCharacter:"\\eac2"}),A.cloudUpload=new A("cloud-upload",{fontCharacter:"\\eac3"}),A.code=new A("code",{fontCharacter:"\\eac4"}),A.collapseAll=new A("collapse-all",{fontCharacter:"\\eac5"}),A.colorMode=new A("color-mode",{fontCharacter:"\\eac6"}),A.commentDiscussion=new A("comment-discussion",{fontCharacter:"\\eac7"}),A.compareChanges=new A("compare-changes",{fontCharacter:"\\eafd"}),A.creditCard=new A("credit-card",{fontCharacter:"\\eac9"}),A.dash=new A("dash",{fontCharacter:"\\eacc"}),A.dashboard=new A("dashboard",{fontCharacter:"\\eacd"}),A.database=new A("database",{fontCharacter:"\\eace"}),A.debugContinue=new A("debug-continue",{fontCharacter:"\\eacf"}),A.debugDisconnect=new A("debug-disconnect",{fontCharacter:"\\ead0"}),A.debugPause=new A("debug-pause",{fontCharacter:"\\ead1"}),A.debugRestart=new A("debug-restart",{fontCharacter:"\\ead2"}),A.debugStart=new A("debug-start",{fontCharacter:"\\ead3"}),A.debugStepInto=new A("debug-step-into",{fontCharacter:"\\ead4"}),A.debugStepOut=new A("debug-step-out",{fontCharacter:"\\ead5"}),A.debugStepOver=new A("debug-step-over",{fontCharacter:"\\ead6"}),A.debugStop=new A("debug-stop",{fontCharacter:"\\ead7"}),A.debug=new A("debug",{fontCharacter:"\\ead8"}),A.deviceCameraVideo=new A("device-camera-video",{fontCharacter:"\\ead9"}),A.deviceCamera=new A("device-camera",{fontCharacter:"\\eada"}),A.deviceMobile=new A("device-mobile",{fontCharacter:"\\eadb"}),A.diffAdded=new A("diff-added",{fontCharacter:"\\eadc"}),A.diffIgnored=new A("diff-ignored",{fontCharacter:"\\eadd"}),A.diffModified=new A("diff-modified",{fontCharacter:"\\eade"}),A.diffRemoved=new A("diff-removed",{fontCharacter:"\\eadf"}),A.diffRenamed=new A("diff-renamed",{fontCharacter:"\\eae0"}),A.diff=new A("diff",{fontCharacter:"\\eae1"}),A.discard=new A("discard",{fontCharacter:"\\eae2"}),A.editorLayout=new A("editor-layout",{fontCharacter:"\\eae3"}),A.emptyWindow=new A("empty-window",{fontCharacter:"\\eae4"}),A.exclude=new A("exclude",{fontCharacter:"\\eae5"}),A.extensions=new A("extensions",{fontCharacter:"\\eae6"}),A.eyeClosed=new A("eye-closed",{fontCharacter:"\\eae7"}),A.fileBinary=new A("file-binary",{fontCharacter:"\\eae8"}),A.fileCode=new A("file-code",{fontCharacter:"\\eae9"}),A.fileMedia=new A("file-media",{fontCharacter:"\\eaea"}),A.filePdf=new A("file-pdf",{fontCharacter:"\\eaeb"}),A.fileSubmodule=new A("file-submodule",{fontCharacter:"\\eaec"}),A.fileSymlinkDirectory=new A("file-symlink-directory",{fontCharacter:"\\eaed"}),A.fileSymlinkFile=new A("file-symlink-file",{fontCharacter:"\\eaee"}),A.fileZip=new A("file-zip",{fontCharacter:"\\eaef"}),A.files=new A("files",{fontCharacter:"\\eaf0"}),A.filter=new A("filter",{fontCharacter:"\\eaf1"}),A.flame=new A("flame",{fontCharacter:"\\eaf2"}),A.foldDown=new A("fold-down",{fontCharacter:"\\eaf3"}),A.foldUp=new A("fold-up",{fontCharacter:"\\eaf4"}),A.fold=new A("fold",{fontCharacter:"\\eaf5"}),A.folderActive=new A("folder-active",{fontCharacter:"\\eaf6"}),A.folderOpened=new A("folder-opened",{fontCharacter:"\\eaf7"}),A.gear=new A("gear",{fontCharacter:"\\eaf8"}),A.gift=new A("gift",{fontCharacter:"\\eaf9"}),A.gistSecret=new A("gist-secret",{fontCharacter:"\\eafa"}),A.gist=new A("gist",{fontCharacter:"\\eafb"}),A.gitCommit=new A("git-commit",{fontCharacter:"\\eafc"}),A.gitCompare=new A("git-compare",{fontCharacter:"\\eafd"}),A.gitMerge=new A("git-merge",{fontCharacter:"\\eafe"}),A.githubAction=new A("github-action",{fontCharacter:"\\eaff"}),A.githubAlt=new A("github-alt",{fontCharacter:"\\eb00"}),A.globe=new A("globe",{fontCharacter:"\\eb01"}),A.grabber=new A("grabber",{fontCharacter:"\\eb02"}),A.graph=new A("graph",{fontCharacter:"\\eb03"}),A.gripper=new A("gripper",{fontCharacter:"\\eb04"}),A.heart=new A("heart",{fontCharacter:"\\eb05"}),A.home=new A("home",{fontCharacter:"\\eb06"}),A.horizontalRule=new A("horizontal-rule",{fontCharacter:"\\eb07"}),A.hubot=new A("hubot",{fontCharacter:"\\eb08"}),A.inbox=new A("inbox",{fontCharacter:"\\eb09"}),A.issueClosed=new A("issue-closed",{fontCharacter:"\\eba4"}),A.issueReopened=new A("issue-reopened",{fontCharacter:"\\eb0b"}),A.issues=new A("issues",{fontCharacter:"\\eb0c"}),A.italic=new A("italic",{fontCharacter:"\\eb0d"}),A.jersey=new A("jersey",{fontCharacter:"\\eb0e"}),A.json=new A("json",{fontCharacter:"\\eb0f"}),A.kebabVertical=new A("kebab-vertical",{fontCharacter:"\\eb10"}),A.key=new A("key",{fontCharacter:"\\eb11"}),A.law=new A("law",{fontCharacter:"\\eb12"}),A.lightbulbAutofix=new A("lightbulb-autofix",{fontCharacter:"\\eb13"}),A.linkExternal=new A("link-external",{fontCharacter:"\\eb14"}),A.link=new A("link",{fontCharacter:"\\eb15"}),A.listOrdered=new A("list-ordered",{fontCharacter:"\\eb16"}),A.listUnordered=new A("list-unordered",{fontCharacter:"\\eb17"}),A.liveShare=new A("live-share",{fontCharacter:"\\eb18"}),A.loading=new A("loading",{fontCharacter:"\\eb19"}),A.location=new A("location",{fontCharacter:"\\eb1a"}),A.mailRead=new A("mail-read",{fontCharacter:"\\eb1b"}),A.mail=new A("mail",{fontCharacter:"\\eb1c"}),A.markdown=new A("markdown",{fontCharacter:"\\eb1d"}),A.megaphone=new A("megaphone",{fontCharacter:"\\eb1e"}),A.mention=new A("mention",{fontCharacter:"\\eb1f"}),A.milestone=new A("milestone",{fontCharacter:"\\eb20"}),A.mortarBoard=new A("mortar-board",{fontCharacter:"\\eb21"}),A.move=new A("move",{fontCharacter:"\\eb22"}),A.multipleWindows=new A("multiple-windows",{fontCharacter:"\\eb23"}),A.mute=new A("mute",{fontCharacter:"\\eb24"}),A.noNewline=new A("no-newline",{fontCharacter:"\\eb25"}),A.note=new A("note",{fontCharacter:"\\eb26"}),A.octoface=new A("octoface",{fontCharacter:"\\eb27"}),A.openPreview=new A("open-preview",{fontCharacter:"\\eb28"}),A.package_=new A("package",{fontCharacter:"\\eb29"}),A.paintcan=new A("paintcan",{fontCharacter:"\\eb2a"}),A.pin=new A("pin",{fontCharacter:"\\eb2b"}),A.play=new A("play",{fontCharacter:"\\eb2c"}),A.run=new A("run",{fontCharacter:"\\eb2c"}),A.plug=new A("plug",{fontCharacter:"\\eb2d"}),A.preserveCase=new A("preserve-case",{fontCharacter:"\\eb2e"}),A.preview=new A("preview",{fontCharacter:"\\eb2f"}),A.project=new A("project",{fontCharacter:"\\eb30"}),A.pulse=new A("pulse",{fontCharacter:"\\eb31"}),A.question=new A("question",{fontCharacter:"\\eb32"}),A.quote=new A("quote",{fontCharacter:"\\eb33"}),A.radioTower=new A("radio-tower",{fontCharacter:"\\eb34"}),A.reactions=new A("reactions",{fontCharacter:"\\eb35"}),A.references=new A("references",{fontCharacter:"\\eb36"}),A.refresh=new A("refresh",{fontCharacter:"\\eb37"}),A.regex=new A("regex",{fontCharacter:"\\eb38"}),A.remoteExplorer=new A("remote-explorer",{fontCharacter:"\\eb39"}),A.remote=new A("remote",{fontCharacter:"\\eb3a"}),A.remove=new A("remove",{fontCharacter:"\\eb3b"}),A.replaceAll=new A("replace-all",{fontCharacter:"\\eb3c"}),A.replace=new A("replace",{fontCharacter:"\\eb3d"}),A.repoClone=new A("repo-clone",{fontCharacter:"\\eb3e"}),A.repoForcePush=new A("repo-force-push",{fontCharacter:"\\eb3f"}),A.repoPull=new A("repo-pull",{fontCharacter:"\\eb40"}),A.repoPush=new A("repo-push",{fontCharacter:"\\eb41"}),A.report=new A("report",{fontCharacter:"\\eb42"}),A.requestChanges=new A("request-changes",{fontCharacter:"\\eb43"}),A.rocket=new A("rocket",{fontCharacter:"\\eb44"}),A.rootFolderOpened=new A("root-folder-opened",{fontCharacter:"\\eb45"}),A.rootFolder=new A("root-folder",{fontCharacter:"\\eb46"}),A.rss=new A("rss",{fontCharacter:"\\eb47"}),A.ruby=new A("ruby",{fontCharacter:"\\eb48"}),A.saveAll=new A("save-all",{fontCharacter:"\\eb49"}),A.saveAs=new A("save-as",{fontCharacter:"\\eb4a"}),A.save=new A("save",{fontCharacter:"\\eb4b"}),A.screenFull=new A("screen-full",{fontCharacter:"\\eb4c"}),A.screenNormal=new A("screen-normal",{fontCharacter:"\\eb4d"}),A.searchStop=new A("search-stop",{fontCharacter:"\\eb4e"}),A.server=new A("server",{fontCharacter:"\\eb50"}),A.settingsGear=new A("settings-gear",{fontCharacter:"\\eb51"}),A.settings=new A("settings",{fontCharacter:"\\eb52"}),A.shield=new A("shield",{fontCharacter:"\\eb53"}),A.smiley=new A("smiley",{fontCharacter:"\\eb54"}),A.sortPrecedence=new A("sort-precedence",{fontCharacter:"\\eb55"}),A.splitHorizontal=new A("split-horizontal",{fontCharacter:"\\eb56"}),A.splitVertical=new A("split-vertical",{fontCharacter:"\\eb57"}),A.squirrel=new A("squirrel",{fontCharacter:"\\eb58"}),A.starFull=new A("star-full",{fontCharacter:"\\eb59"}),A.starHalf=new A("star-half",{fontCharacter:"\\eb5a"}),A.symbolClass=new A("symbol-class",{fontCharacter:"\\eb5b"}),A.symbolColor=new A("symbol-color",{fontCharacter:"\\eb5c"}),A.symbolConstant=new A("symbol-constant",{fontCharacter:"\\eb5d"}),A.symbolEnumMember=new A("symbol-enum-member",{fontCharacter:"\\eb5e"}),A.symbolField=new A("symbol-field",{fontCharacter:"\\eb5f"}),A.symbolFile=new A("symbol-file",{fontCharacter:"\\eb60"}),A.symbolInterface=new A("symbol-interface",{fontCharacter:"\\eb61"}),A.symbolKeyword=new A("symbol-keyword",{fontCharacter:"\\eb62"}),A.symbolMisc=new A("symbol-misc",{fontCharacter:"\\eb63"}),A.symbolOperator=new A("symbol-operator",{fontCharacter:"\\eb64"}),A.symbolProperty=new A("symbol-property",{fontCharacter:"\\eb65"}),A.wrench=new A("wrench",{fontCharacter:"\\eb65"}),A.wrenchSubaction=new A("wrench-subaction",{fontCharacter:"\\eb65"}),A.symbolSnippet=new A("symbol-snippet",{fontCharacter:"\\eb66"}),A.tasklist=new A("tasklist",{fontCharacter:"\\eb67"}),A.telescope=new A("telescope",{fontCharacter:"\\eb68"}),A.textSize=new A("text-size",{fontCharacter:"\\eb69"}),A.threeBars=new A("three-bars",{fontCharacter:"\\eb6a"}),A.thumbsdown=new A("thumbsdown",{fontCharacter:"\\eb6b"}),A.thumbsup=new A("thumbsup",{fontCharacter:"\\eb6c"}),A.tools=new A("tools",{fontCharacter:"\\eb6d"}),A.triangleDown=new A("triangle-down",{fontCharacter:"\\eb6e"}),A.triangleLeft=new A("triangle-left",{fontCharacter:"\\eb6f"}),A.triangleRight=new A("triangle-right",{fontCharacter:"\\eb70"}),A.triangleUp=new A("triangle-up",{fontCharacter:"\\eb71"}),A.twitter=new A("twitter",{fontCharacter:"\\eb72"}),A.unfold=new A("unfold",{fontCharacter:"\\eb73"}),A.unlock=new A("unlock",{fontCharacter:"\\eb74"}),A.unmute=new A("unmute",{fontCharacter:"\\eb75"}),A.unverified=new A("unverified",{fontCharacter:"\\eb76"}),A.verified=new A("verified",{fontCharacter:"\\eb77"}),A.versions=new A("versions",{fontCharacter:"\\eb78"}),A.vmActive=new A("vm-active",{fontCharacter:"\\eb79"}),A.vmOutline=new A("vm-outline",{fontCharacter:"\\eb7a"}),A.vmRunning=new A("vm-running",{fontCharacter:"\\eb7b"}),A.watch=new A("watch",{fontCharacter:"\\eb7c"}),A.whitespace=new A("whitespace",{fontCharacter:"\\eb7d"}),A.wholeWord=new A("whole-word",{fontCharacter:"\\eb7e"}),A.window=new A("window",{fontCharacter:"\\eb7f"}),A.wordWrap=new A("word-wrap",{fontCharacter:"\\eb80"}),A.zoomIn=new A("zoom-in",{fontCharacter:"\\eb81"}),A.zoomOut=new A("zoom-out",{fontCharacter:"\\eb82"}),A.listFilter=new A("list-filter",{fontCharacter:"\\eb83"}),A.listFlat=new A("list-flat",{fontCharacter:"\\eb84"}),A.listSelection=new A("list-selection",{fontCharacter:"\\eb85"}),A.selection=new A("selection",{fontCharacter:"\\eb85"}),A.listTree=new A("list-tree",{fontCharacter:"\\eb86"}),A.debugBreakpointFunctionUnverified=new A("debug-breakpoint-function-unverified",{fontCharacter:"\\eb87"}),A.debugBreakpointFunction=new A("debug-breakpoint-function",{fontCharacter:"\\eb88"}),A.debugBreakpointFunctionDisabled=new A("debug-breakpoint-function-disabled",{fontCharacter:"\\eb88"}),A.debugStackframeActive=new A("debug-stackframe-active",{fontCharacter:"\\eb89"}),A.debugStackframeDot=new A("debug-stackframe-dot",{fontCharacter:"\\eb8a"}),A.debugStackframe=new A("debug-stackframe",{fontCharacter:"\\eb8b"}),A.debugStackframeFocused=new A("debug-stackframe-focused",{fontCharacter:"\\eb8b"}),A.debugBreakpointUnsupported=new A("debug-breakpoint-unsupported",{fontCharacter:"\\eb8c"}),A.symbolString=new A("symbol-string",{fontCharacter:"\\eb8d"}),A.debugReverseContinue=new A("debug-reverse-continue",{fontCharacter:"\\eb8e"}),A.debugStepBack=new A("debug-step-back",{fontCharacter:"\\eb8f"}),A.debugRestartFrame=new A("debug-restart-frame",{fontCharacter:"\\eb90"}),A.callIncoming=new A("call-incoming",{fontCharacter:"\\eb92"}),A.callOutgoing=new A("call-outgoing",{fontCharacter:"\\eb93"}),A.menu=new A("menu",{fontCharacter:"\\eb94"}),A.expandAll=new A("expand-all",{fontCharacter:"\\eb95"}),A.feedback=new A("feedback",{fontCharacter:"\\eb96"}),A.groupByRefType=new A("group-by-ref-type",{fontCharacter:"\\eb97"}),A.ungroupByRefType=new A("ungroup-by-ref-type",{fontCharacter:"\\eb98"}),A.account=new A("account",{fontCharacter:"\\eb99"}),A.bellDot=new A("bell-dot",{fontCharacter:"\\eb9a"}),A.debugConsole=new A("debug-console",{fontCharacter:"\\eb9b"}),A.library=new A("library",{fontCharacter:"\\eb9c"}),A.output=new A("output",{fontCharacter:"\\eb9d"}),A.runAll=new A("run-all",{fontCharacter:"\\eb9e"}),A.syncIgnored=new A("sync-ignored",{fontCharacter:"\\eb9f"}),A.pinned=new A("pinned",{fontCharacter:"\\eba0"}),A.githubInverted=new A("github-inverted",{fontCharacter:"\\eba1"}),A.debugAlt=new A("debug-alt",{fontCharacter:"\\eb91"}),A.serverProcess=new A("server-process",{fontCharacter:"\\eba2"}),A.serverEnvironment=new A("server-environment",{fontCharacter:"\\eba3"}),A.pass=new A("pass",{fontCharacter:"\\eba4"}),A.stopCircle=new A("stop-circle",{fontCharacter:"\\eba5"}),A.playCircle=new A("play-circle",{fontCharacter:"\\eba6"}),A.record=new A("record",{fontCharacter:"\\eba7"}),A.debugAltSmall=new A("debug-alt-small",{fontCharacter:"\\eba8"}),A.vmConnect=new A("vm-connect",{fontCharacter:"\\eba9"}),A.cloud=new A("cloud",{fontCharacter:"\\ebaa"}),A.merge=new A("merge",{fontCharacter:"\\ebab"}),A.exportIcon=new A("export",{fontCharacter:"\\ebac"}),A.graphLeft=new A("graph-left",{fontCharacter:"\\ebad"}),A.magnet=new A("magnet",{fontCharacter:"\\ebae"}),A.notebook=new A("notebook",{fontCharacter:"\\ebaf"}),A.redo=new A("redo",{fontCharacter:"\\ebb0"}),A.checkAll=new A("check-all",{fontCharacter:"\\ebb1"}),A.pinnedDirty=new A("pinned-dirty",{fontCharacter:"\\ebb2"}),A.passFilled=new A("pass-filled",{fontCharacter:"\\ebb3"}),A.circleLargeFilled=new A("circle-large-filled",{fontCharacter:"\\ebb4"}),A.circleLargeOutline=new A("circle-large-outline",{fontCharacter:"\\ebb5"}),A.combine=new A("combine",{fontCharacter:"\\ebb6"}),A.gather=new A("gather",{fontCharacter:"\\ebb6"}),A.table=new A("table",{fontCharacter:"\\ebb7"}),A.variableGroup=new A("variable-group",{fontCharacter:"\\ebb8"}),A.typeHierarchy=new A("type-hierarchy",{fontCharacter:"\\ebb9"}),A.typeHierarchySub=new A("type-hierarchy-sub",{fontCharacter:"\\ebba"}),A.typeHierarchySuper=new A("type-hierarchy-super",{fontCharacter:"\\ebbb"}),A.gitPullRequestCreate=new A("git-pull-request-create",{fontCharacter:"\\ebbc"}),A.runAbove=new A("run-above",{fontCharacter:"\\ebbd"}),A.runBelow=new A("run-below",{fontCharacter:"\\ebbe"}),A.notebookTemplate=new A("notebook-template",{fontCharacter:"\\ebbf"}),A.debugRerun=new A("debug-rerun",{fontCharacter:"\\ebc0"}),A.workspaceTrusted=new A("workspace-trusted",{fontCharacter:"\\ebc1"}),A.workspaceUntrusted=new A("workspace-untrusted",{fontCharacter:"\\ebc2"}),A.workspaceUnspecified=new A("workspace-unspecified",{fontCharacter:"\\ebc3"}),A.terminalCmd=new A("terminal-cmd",{fontCharacter:"\\ebc4"}),A.terminalDebian=new A("terminal-debian",{fontCharacter:"\\ebc5"}),A.terminalLinux=new A("terminal-linux",{fontCharacter:"\\ebc6"}),A.terminalPowershell=new A("terminal-powershell",{fontCharacter:"\\ebc7"}),A.terminalTmux=new A("terminal-tmux",{fontCharacter:"\\ebc8"}),A.terminalUbuntu=new A("terminal-ubuntu",{fontCharacter:"\\ebc9"}),A.terminalBash=new A("terminal-bash",{fontCharacter:"\\ebca"}),A.arrowSwap=new A("arrow-swap",{fontCharacter:"\\ebcb"}),A.copy=new A("copy",{fontCharacter:"\\ebcc"}),A.personAdd=new A("person-add",{fontCharacter:"\\ebcd"}),A.filterFilled=new A("filter-filled",{fontCharacter:"\\ebce"}),A.wand=new A("wand",{fontCharacter:"\\ebcf"}),A.debugLineByLine=new A("debug-line-by-line",{fontCharacter:"\\ebd0"}),A.inspect=new A("inspect",{fontCharacter:"\\ebd1"}),A.layers=new A("layers",{fontCharacter:"\\ebd2"}),A.layersDot=new A("layers-dot",{fontCharacter:"\\ebd3"}),A.layersActive=new A("layers-active",{fontCharacter:"\\ebd4"}),A.compass=new A("compass",{fontCharacter:"\\ebd5"}),A.compassDot=new A("compass-dot",{fontCharacter:"\\ebd6"}),A.compassActive=new A("compass-active",{fontCharacter:"\\ebd7"}),A.azure=new A("azure",{fontCharacter:"\\ebd8"}),A.issueDraft=new A("issue-draft",{fontCharacter:"\\ebd9"}),A.gitPullRequestClosed=new A("git-pull-request-closed",{fontCharacter:"\\ebda"}),A.gitPullRequestDraft=new A("git-pull-request-draft",{fontCharacter:"\\ebdb"}),A.debugAll=new A("debug-all",{fontCharacter:"\\ebdc"}),A.debugCoverage=new A("debug-coverage",{fontCharacter:"\\ebdd"}),A.runErrors=new A("run-errors",{fontCharacter:"\\ebde"}),A.folderLibrary=new A("folder-library",{fontCharacter:"\\ebdf"}),A.debugContinueSmall=new A("debug-continue-small",{fontCharacter:"\\ebe0"}),A.beakerStop=new A("beaker-stop",{fontCharacter:"\\ebe1"}),A.graphLine=new A("graph-line",{fontCharacter:"\\ebe2"}),A.graphScatter=new A("graph-scatter",{fontCharacter:"\\ebe3"}),A.pieChart=new A("pie-chart",{fontCharacter:"\\ebe4"}),A.bracket=new A("bracket",A.json.definition),A.bracketDot=new A("bracket-dot",{fontCharacter:"\\ebe5"}),A.bracketError=new A("bracket-error",{fontCharacter:"\\ebe6"}),A.lockSmall=new A("lock-small",{fontCharacter:"\\ebe7"}),A.azureDevops=new A("azure-devops",{fontCharacter:"\\ebe8"}),A.verifiedFilled=new A("verified-filled",{fontCharacter:"\\ebe9"})}(fe||(fe={}))},79881:function(Cn,tt,b){"use strict";b.d(tt,{B8:function(){return x},Cp:function(){return se},F0:function(){return ee},L6:function(){return E},VV:function(){return fe},b1:function(){return A},dL:function(){return ge},ri:function(){return U}});class P{constructor(){this.listeners=[],this.unexpectedErrorHandler=function(p){setTimeout(()=>{throw p.stack?new Error(p.message+`
`+p.stack):p},0)}}emit(p){this.listeners.forEach(_=>{_(p)})}onUnexpectedError(p){this.unexpectedErrorHandler(p),this.emit(p)}onUnexpectedExternalError(p){this.unexpectedErrorHandler(p)}}const re=new P;function ge(h){fe(h)||re.onUnexpectedError(h)}function se(h){fe(h)||re.onUnexpectedExternalError(h)}function U(h){if(h instanceof Error){let{name:p,message:_}=h;const C=h.stacktrace||h.stack;return{$isError:!0,name:p,message:_,stack:C}}return h}const f="Canceled";function fe(h){return h instanceof Error&&h.name===f&&h.message===f}function ee(){const h=new Error(f);return h.name=h.message,h}function A(h){return h?new Error(`Illegal argument: ${h}`):new Error("Illegal argument")}function E(h){return h?new Error(`Illegal state: ${h}`):new Error("Illegal state")}class x extends Error{constructor(p){super("NotSupported"),p&&(this.message=p)}}},4348:function(Cn,tt,b){"use strict";b.d(tt,{D0:function(){return x},E7:function(){return h},K3:function(){return E},Q5:function(){return A},ZD:function(){return p},ju:function(){return U}});var P=b(79881),re=b(69323),ge=b(34502),se=b(95830),U;(function(_){_.None=()=>re.JT.None;function C(X){return(G,ne=null,Z)=>{let m=!1,v;return v=X(Q=>{if(!m)return v?v.dispose():m=!0,G.call(ne,Q)},null,Z),m&&v.dispose(),v}}_.once=C;function F(X,G){return S((ne,Z=null,m)=>X(v=>ne.call(Z,G(v)),null,m))}_.map=F;function R(X,G){return S((ne,Z=null,m)=>X(v=>{G(v),ne.call(Z,v)},null,m))}_.forEach=R;function K(X,G){return S((ne,Z=null,m)=>X(v=>G(v)&&ne.call(Z,v),null,m))}_.filter=K;function B(X){return X}_.signal=B;function D(...X){return(G,ne=null,Z)=>(0,re.F8)(...X.map(m=>m(v=>G.call(ne,v),null,Z)))}_.any=D;function I(X,G,ne){let Z=ne;return F(X,m=>(Z=G(Z,m),Z))}_.reduce=I;function S(X){let G;const ne=new A({onFirstListenerAdd(){G=X(ne.fire,ne)},onLastListenerRemove(){G.dispose()}});return ne.event}function q(X,G,ne=100,Z=!1,m){let v,Q,he,Ue=0;const Oe=new A({leakWarningThreshold:m,onFirstListenerAdd(){v=X(ft=>{Ue++,Q=G(Q,ft),Z&&!he&&(Oe.fire(Q),Q=void 0),clearTimeout(he),he=setTimeout(()=>{const Et=Q;Q=void 0,he=void 0,(!Z||Ue>1)&&Oe.fire(Et),Ue=0},ne)})},onLastListenerRemove(){v.dispose()}});return Oe.event}_.debounce=q;function ae(X,G=(ne,Z)=>ne===Z){let ne=!0,Z;return K(X,m=>{const v=ne||!G(m,Z);return ne=!1,Z=m,v})}_.latch=ae;function j(X,G){return[_.filter(X,G),_.filter(X,ne=>!G(ne))]}_.split=j;function Y(X,G=!1,ne=[]){let Z=ne.slice(),m=X(he=>{Z?Z.push(he):Q.fire(he)});const v=()=>{Z&&Z.forEach(he=>Q.fire(he)),Z=null},Q=new A({onFirstListenerAdd(){m||(m=X(he=>Q.fire(he)))},onFirstListenerDidAdd(){Z&&(G?setTimeout(v):v())},onLastListenerRemove(){m&&m.dispose(),m=null}});return Q.event}_.buffer=Y;class ie{constructor(G){this.event=G}map(G){return new ie(F(this.event,G))}forEach(G){return new ie(R(this.event,G))}filter(G){return new ie(K(this.event,G))}reduce(G,ne){return new ie(I(this.event,G,ne))}latch(){return new ie(ae(this.event))}debounce(G,ne=100,Z=!1,m){return new ie(q(this.event,G,ne,Z,m))}on(G,ne,Z){return this.event(G,ne,Z)}once(G,ne,Z){return C(this.event)(G,ne,Z)}}function de(X){return new ie(X)}_.chain=de;function pe(X,G,ne=Z=>Z){const Z=(...he)=>Q.fire(ne(...he)),m=()=>X.on(G,Z),v=()=>X.removeListener(G,Z),Q=new A({onFirstListenerAdd:m,onLastListenerRemove:v});return Q.event}_.fromNodeEventEmitter=pe;function W(X,G,ne=Z=>Z){const Z=(...he)=>Q.fire(ne(...he)),m=()=>X.addEventListener(G,Z),v=()=>X.removeEventListener(G,Z),Q=new A({onFirstListenerAdd:m,onLastListenerRemove:v});return Q.event}_.fromDOMEventEmitter=W;function M(X){return new Promise(G=>C(X)(G))}_.toPromise=M})(U||(U={}));class f{constructor(C){this._listenerCount=0,this._invocationCount=0,this._elapsedOverall=0,this._name=`${C}_${f._idPool++}`}start(C){this._stopWatch=new se.G(!0),this._listenerCount=C}stop(){if(this._stopWatch){const C=this._stopWatch.elapsed();this._elapsedOverall+=C,this._invocationCount+=1,console.info(`did FIRE ${this._name}: elapsed_ms: ${C.toFixed(5)}, listener: ${this._listenerCount} (elapsed_overall: ${this._elapsedOverall.toFixed(2)}, invocations: ${this._invocationCount})`),this._stopWatch=void 0}}}f._idPool=0;let fe=-1;class ee{constructor(C,F=Math.random().toString(18).slice(2,5)){this.customThreshold=C,this.name=F,this._warnCountdown=0}dispose(){this._stacks&&this._stacks.clear()}check(C){let F=fe;if(typeof this.customThreshold=="number"&&(F=this.customThreshold),F<=0||C<F)return;this._stacks||(this._stacks=new Map);const R=new Error().stack.split(`
`).slice(3).join(`
`),K=this._stacks.get(R)||0;if(this._stacks.set(R,K+1),this._warnCountdown-=1,this._warnCountdown<=0){this._warnCountdown=F*.5;let B,D=0;for(const[I,S]of this._stacks)(!B||D<S)&&(B=I,D=S);console.warn(`[${this.name}] potential listener LEAK detected, having ${C} listeners already. MOST frequent listener (${D}):`),console.warn(B)}return()=>{const B=this._stacks.get(R)||0;this._stacks.set(R,B-1)}}}class A{constructor(C){var F;this._disposed=!1,this._options=C,this._leakageMon=fe>0?new ee(this._options&&this._options.leakWarningThreshold):void 0,this._perfMon=!((F=this._options)===null||F===void 0)&&F._profName?new f(this._options._profName):void 0}get event(){return this._event||(this._event=(C,F,R)=>{var K;this._listeners||(this._listeners=new ge.S);const B=this._listeners.isEmpty();B&&this._options&&this._options.onFirstListenerAdd&&this._options.onFirstListenerAdd(this);const D=this._listeners.push(F?[C,F]:C);B&&this._options&&this._options.onFirstListenerDidAdd&&this._options.onFirstListenerDidAdd(this),this._options&&this._options.onListenerDidAdd&&this._options.onListenerDidAdd(this,C,F);const I=(K=this._leakageMon)===null||K===void 0?void 0:K.check(this._listeners.size),S=(0,re.OF)(()=>{I&&I(),this._disposed||(D(),this._options&&this._options.onLastListenerRemove&&(this._listeners&&!this._listeners.isEmpty()||this._options.onLastListenerRemove(this)))});return R instanceof re.SL?R.add(S):Array.isArray(R)&&R.push(S),S}),this._event}fire(C){var F,R;if(this._listeners){this._deliveryQueue||(this._deliveryQueue=new ge.S);for(let K of this._listeners)this._deliveryQueue.push([K,C]);for((F=this._perfMon)===null||F===void 0||F.start(this._deliveryQueue.size);this._deliveryQueue.size>0;){const[K,B]=this._deliveryQueue.shift();try{typeof K=="function"?K.call(void 0,B):K[0].call(K[1],B)}catch(D){(0,P.dL)(D)}}(R=this._perfMon)===null||R===void 0||R.stop()}}dispose(){var C,F,R,K,B;this._disposed||(this._disposed=!0,(C=this._listeners)===null||C===void 0||C.clear(),(F=this._deliveryQueue)===null||F===void 0||F.clear(),(K=(R=this._options)===null||R===void 0?void 0:R.onLastListenerRemove)===null||K===void 0||K.call(R),(B=this._leakageMon)===null||B===void 0||B.dispose())}}class E extends A{constructor(C){super(C),this._isPaused=0,this._eventQueue=new ge.S,this._mergeFn=C==null?void 0:C.merge}pause(){this._isPaused++}resume(){if(this._isPaused!==0&&--this._isPaused===0)if(this._mergeFn){const C=Array.from(this._eventQueue);this._eventQueue.clear(),super.fire(this._mergeFn(C))}else for(;!this._isPaused&&this._eventQueue.size!==0;)super.fire(this._eventQueue.shift())}fire(C){this._listeners&&(this._isPaused!==0?this._eventQueue.push(C):super.fire(C))}}class x extends E{constructor(C){var F;super(C),this._delay=(F=C.delay)!==null&&F!==void 0?F:100}fire(C){this._handle||(this.pause(),this._handle=setTimeout(()=>{this._handle=void 0,this.resume()},this._delay)),super.fire(C)}}class h{constructor(){this.buffers=[]}wrapEvent(C){return(F,R,K)=>C(B=>{const D=this.buffers[this.buffers.length-1];D?D.push(()=>F.call(R,B)):F.call(R,B)},void 0,K)}bufferEvents(C){const F=[];this.buffers.push(F);const R=C();return this.buffers.pop(),F.forEach(K=>K()),R}}class p{constructor(){this.listening=!1,this.inputEvent=U.None,this.inputEventListener=re.JT.None,this.emitter=new A({onFirstListenerDidAdd:()=>{this.listening=!0,this.inputEventListener=this.inputEvent(this.emitter.fire,this.emitter)},onLastListenerRemove:()=>{this.listening=!1,this.inputEventListener.dispose()}}),this.event=this.emitter.event}set input(C){this.inputEvent=C,this.listening&&(this.inputEventListener.dispose(),this.inputEventListener=C(this.emitter.fire,this.emitter))}dispose(){this.inputEventListener.dispose(),this.emitter.dispose()}}},17845:function(Cn,tt,b){"use strict";b.d(tt,{I:function(){return P}});function P(re){const ge=this;let se=!1,U;return function(){return se||(se=!0,U=re.apply(ge,arguments)),U}}},88226:function(Cn,tt,b){"use strict";b.d(tt,{$:function(){return P}});var P;(function(re){function ge(D){return D&&typeof D=="object"&&typeof D[Symbol.iterator]=="function"}re.is=ge;const se=Object.freeze([]);function U(){return se}re.empty=U;function*f(D){yield D}re.single=f;function fe(D){return D||se}re.from=fe;function ee(D){return!D||D[Symbol.iterator]().next().done===!0}re.isEmpty=ee;function A(D){return D[Symbol.iterator]().next().value}re.first=A;function E(D,I){for(const S of D)if(I(S))return!0;return!1}re.some=E;function x(D,I){for(const S of D)if(I(S))return S}re.find=x;function*h(D,I){for(const S of D)I(S)&&(yield S)}re.filter=h;function*p(D,I){let S=0;for(const q of D)yield I(q,S++)}re.map=p;function*_(...D){for(const I of D)for(const S of I)yield S}re.concat=_;function*C(D){for(const I of D)for(const S of I)yield S}re.concatNested=C;function F(D,I,S){let q=S;for(const ae of D)q=I(q,ae);return q}re.reduce=F;function*R(D,I,S=D.length){for(I<0&&(I+=D.length),S<0?S+=D.length:S>D.length&&(S=D.length);I<S;I++)yield D[I]}re.slice=R;function K(D,I=Number.POSITIVE_INFINITY){const S=[];if(I===0)return[S,D];const q=D[Symbol.iterator]();for(let ae=0;ae<I;ae++){const j=q.next();if(j.done)return[S,re.empty()];S.push(j.value)}return[S,{[Symbol.iterator](){return q}}]}re.consume=K;function B(D,I,S=(q,ae)=>q===ae){const q=D[Symbol.iterator](),ae=I[Symbol.iterator]();for(;;){const j=q.next(),Y=ae.next();if(j.done!==Y.done)return!1;if(j.done)return!0;if(!S(j.value,Y.value))return!1}}re.equals=B})(P||(P={}))},69323:function(Cn,tt,b){"use strict";b.d(tt,{B9:function(){return p},F8:function(){return _},JT:function(){return R},Jz:function(){return B},OF:function(){return C},SL:function(){return F},Wf:function(){return h},XK:function(){return K},dk:function(){return E}});var P=b(17845),re=b(88226);const ge=!1;let se=null;function U(D){se=D}if(ge){const D="__is_disposable_tracked__";U(new class{trackDisposable(I){const S=new Error("Potentially leaked disposable").stack;setTimeout(()=>{I[D]||console.log(S)},3e3)}setParent(I,S){if(I&&I!==R.None)try{I[D]=!0}catch(q){}}markAsDisposed(I){if(I&&I!==R.None)try{I[D]=!0}catch(S){}}markAsSingleton(I){}})}function f(D){return se==null||se.trackDisposable(D),D}function fe(D){se==null||se.markAsDisposed(D)}function ee(D,I){se==null||se.setParent(D,I)}function A(D,I){if(se)for(const S of D)se.setParent(S,I)}function E(D){return se==null||se.markAsSingleton(D),D}class x extends Error{constructor(I){super(`Encountered errors while disposing of store. Errors: [${I.join(", ")}]`),this.errors=I}}function h(D){return typeof D.dispose=="function"&&D.dispose.length===0}function p(D){if(re.$.is(D)){let I=[];for(const S of D)if(S)try{S.dispose()}catch(q){I.push(q)}if(I.length===1)throw I[0];if(I.length>1)throw new x(I);return Array.isArray(D)?[]:D}else if(D)return D.dispose(),D}function _(...D){const I=C(()=>p(D));return A(D,I),I}function C(D){const I=f({dispose:(0,P.I)(()=>{fe(I),D()})});return I}class F{constructor(){this._toDispose=new Set,this._isDisposed=!1,f(this)}dispose(){this._isDisposed||(fe(this),this._isDisposed=!0,this.clear())}clear(){try{p(this._toDispose.values())}finally{this._toDispose.clear()}}add(I){if(!I)return I;if(I===this)throw new Error("Cannot register a disposable on itself!");return ee(I,this),this._isDisposed?F.DISABLE_DISPOSED_WARNING||console.warn(new Error("Trying to add a disposable to a DisposableStore that has already been disposed of. The added object will be leaked!").stack):this._toDispose.add(I),I}}F.DISABLE_DISPOSED_WARNING=!1;class R{constructor(){this._store=new F,f(this),ee(this._store,this)}dispose(){fe(this),this._store.dispose()}_register(I){if(I===this)throw new Error("Cannot register a disposable on itself!");return this._store.add(I)}}R.None=Object.freeze({dispose(){}});class K{constructor(){this._isDisposed=!1,f(this)}get value(){return this._isDisposed?void 0:this._value}set value(I){var S;this._isDisposed||I===this._value||((S=this._value)===null||S===void 0||S.dispose(),I&&ee(I,this),this._value=I)}clear(){this.value=void 0}dispose(){var I;this._isDisposed=!0,fe(this),(I=this._value)===null||I===void 0||I.dispose(),this._value=void 0}clearAndLeak(){const I=this._value;return this._value=void 0,I&&ee(I,null),I}}class B{constructor(I){this.object=I}dispose(){}}},34502:function(Cn,tt,b){"use strict";b.d(tt,{S:function(){return re}});class P{constructor(se){this.element=se,this.next=P.Undefined,this.prev=P.Undefined}}P.Undefined=new P(void 0);class re{constructor(){this._first=P.Undefined,this._last=P.Undefined,this._size=0}get size(){return this._size}isEmpty(){return this._first===P.Undefined}clear(){let se=this._first;for(;se!==P.Undefined;){const U=se.next;se.prev=P.Undefined,se.next=P.Undefined,se=U}this._first=P.Undefined,this._last=P.Undefined,this._size=0}unshift(se){return this._insert(se,!1)}push(se){return this._insert(se,!0)}_insert(se,U){const f=new P(se);if(this._first===P.Undefined)this._first=f,this._last=f;else if(U){const ee=this._last;this._last=f,f.prev=ee,ee.next=f}else{const ee=this._first;this._first=f,f.next=ee,ee.prev=f}this._size+=1;let fe=!1;return()=>{fe||(fe=!0,this._remove(f))}}shift(){if(this._first!==P.Undefined){const se=this._first.element;return this._remove(this._first),se}}pop(){if(this._last!==P.Undefined){const se=this._last.element;return this._remove(this._last),se}}_remove(se){if(se.prev!==P.Undefined&&se.next!==P.Undefined){const U=se.prev;U.next=se.next,se.next.prev=U}else se.prev===P.Undefined&&se.next===P.Undefined?(this._first=P.Undefined,this._last=P.Undefined):se.next===P.Undefined?(this._last=this._last.prev,this._last.next=P.Undefined):se.prev===P.Undefined&&(this._first=this._first.next,this._first.prev=P.Undefined);this._size-=1}*[Symbol.iterator](){let se=this._first;for(;se!==P.Undefined;)yield se.element,se=se.next}}},23345:function(Cn,tt,b){"use strict";b.d(tt,{$L:function(){return q},ED:function(){return B},IJ:function(){return I},OS:function(){return ie},WE:function(){return j},dz:function(){return D},gn:function(){return ae},li:function(){return C},r:function(){return W},tY:function(){return S},xS:function(){return Y}});var P=b(97671),re;const ge="en";let se=!1,U=!1,f=!1,fe=!1,ee=!1,A=!1,E=!1,x,h=null,p=null,_;const C=typeof self=="object"?self:typeof b.g=="object"?b.g:{};let F;typeof C.vscode!="undefined"&&typeof C.vscode.process!="undefined"?F=C.vscode.process:typeof P!="undefined"&&(F=P);const R=typeof((re=F==null?void 0:F.versions)===null||re===void 0?void 0:re.electron)=="string"&&F.type==="renderer";if(typeof navigator=="object"&&!R)_=navigator.userAgent,se=_.indexOf("Windows")>=0,U=_.indexOf("Macintosh")>=0,E=(_.indexOf("Macintosh")>=0||_.indexOf("iPad")>=0||_.indexOf("iPhone")>=0)&&!!navigator.maxTouchPoints&&navigator.maxTouchPoints>0,f=_.indexOf("Linux")>=0,A=!0,x=navigator.language,h=x;else if(typeof F=="object"){se=F.platform==="win32",U=F.platform==="darwin",f=F.platform==="linux",fe=f&&!!F.env.SNAP&&!!F.env.SNAP_REVISION,x=ge,h=ge;const M=F.env.VSCODE_NLS_CONFIG;if(M)try{const X=JSON.parse(M),G=X.availableLanguages["*"];x=X.locale,h=G||ge,p=X._translationsConfigFile}catch(X){}ee=!0}else console.error("Unable to resolve platform.");let K=0;U?K=1:se?K=3:f&&(K=2);const B=se,D=U,I=f,S=ee,q=A,ae=E,j=_,Y=function(){if(C.setImmediate)return C.setImmediate.bind(C);if(typeof C.postMessage=="function"&&!C.importScripts){let G=[];C.addEventListener("message",Z=>{if(Z.data&&Z.data.vscodeSetImmediateId)for(let m=0,v=G.length;m<v;m++){const Q=G[m];if(Q.id===Z.data.vscodeSetImmediateId){G.splice(m,1),Q.callback();return}}});let ne=0;return Z=>{const m=++ne;G.push({id:m,callback:Z}),C.postMessage({vscodeSetImmediateId:m},"*")}}if(typeof(F==null?void 0:F.nextTick)=="function")return F.nextTick.bind(F);const X=Promise.resolve();return G=>X.then(G)}(),ie=U||E?2:se?1:3;let de=!0,pe=!1;function W(){if(!pe){pe=!0;const M=new Uint8Array(2);M[0]=1,M[1]=2,de=new Uint16Array(M.buffer)[0]===513}return de}},95830:function(Cn,tt,b){"use strict";b.d(tt,{G:function(){return ge}});var P=b(23345);const re=P.li.performance&&typeof P.li.performance.now=="function";class ge{constructor(U){this._highResolution=re&&U,this._startTime=this._now(),this._stopTime=-1}static create(U=!0){return new ge(U)}stop(){this._stopTime=this._now()}elapsed(){return this._stopTime!==-1?this._stopTime-this._startTime:this._now()-this._startTime}_now(){return this._highResolution?P.li.performance.now():Date.now()}}},82983:function(Cn,tt,b){"use strict";b.d(tt,{$i:function(){return Ue},C8:function(){return Ut},GF:function(){return x},HO:function(){return ne},IO:function(){return h},K7:function(){return Ft},Kw:function(){return ht},LC:function(){return C},Mh:function(){return Y},P1:function(){return ie},PJ:function(){return tn},Qe:function(){return Oe},R1:function(){return E},RP:function(){return Q},S6:function(){return dt},TT:function(){return B},Ut:function(){return m},V8:function(){return F},WU:function(){return ge},YK:function(){return pe},YU:function(){return se},ZG:function(){return de},ZH:function(){return M},ab:function(){return ft},c1:function(){return Se},df:function(){return q},ec:function(){return U},fi:function(){return Je},fy:function(){return f},j3:function(){return fe},j_:function(){return I},m5:function(){return P},mK:function(){return S},mr:function(){return p},oH:function(){return N},oL:function(){return ee},ok:function(){return j},ow:function(){return R},qq:function(){return ae},qu:function(){return K},rL:function(){return W},uS:function(){return Gt},un:function(){return A},uq:function(){return _},vH:function(){return G},xe:function(){return Et},zY:function(){return D}});function P(T){return!T||typeof T!="string"?!0:T.trim().length===0}const re=/{(\d+)}/g;function ge(T,...J){return J.length===0?T:T.replace(re,function(ve,te){const $=parseInt(te,10);return isNaN($)||$<0||$>=J.length?ve:J[$]})}function se(T){return T.replace(/[<>&]/g,function(J){switch(J){case"<":return"&lt;";case">":return"&gt;";case"&":return"&amp;";default:return J}})}function U(T){return T.replace(/[\\\{\}\*\+\?\|\^\$\.\[\]\(\)]/g,"\\$&")}function f(T,J=" "){const ve=fe(T,J);return ee(ve,J)}function fe(T,J){if(!T||!J)return T;const ve=J.length;if(ve===0||T.length===0)return T;let te=0;for(;T.indexOf(J,te)===te;)te=te+ve;return T.substring(te)}function ee(T,J){if(!T||!J)return T;const ve=J.length,te=T.length;if(ve===0||te===0)return T;let $=te,ue=-1;for(;ue=T.lastIndexOf(J,$-1),!(ue===-1||ue+ve!==$);){if(ue===0)return"";$=ue}return T.substring(0,$)}function A(T){return T.replace(/[\-\\\{\}\+\?\|\^\$\.\,\[\]\(\)\#\s]/g,"\\$&").replace(/[\*]/g,".*")}function E(T){return T.replace(/\*/g,"")}function x(T,J,ve={}){if(!T)throw new Error("Cannot create regex from empty string");J||(T=U(T)),ve.wholeWord&&(/\B/.test(T.charAt(0))||(T="\\b"+T),/\B/.test(T.charAt(T.length-1))||(T=T+"\\b"));let te="";return ve.global&&(te+="g"),ve.matchCase||(te+="i"),ve.multiline&&(te+="m"),ve.unicode&&(te+="u"),new RegExp(T,te)}function h(T){return T.source==="^"||T.source==="^$"||T.source==="$"||T.source==="^\\s*$"?!1:!!(T.exec("")&&T.lastIndex===0)}function p(T){return(T.global?"g":"")+(T.ignoreCase?"i":"")+(T.multiline?"m":"")+(T.unicode?"u":"")}function _(T){return T.split(/\r\n|\r|\n/)}function C(T){for(let J=0,ve=T.length;J<ve;J++){const te=T.charCodeAt(J);if(te!==32&&te!==9)return J}return-1}function F(T,J=0,ve=T.length){for(let te=J;te<ve;te++){const $=T.charCodeAt(te);if($!==32&&$!==9)return T.substring(J,te)}return T.substring(J,ve)}function R(T,J=T.length-1){for(let ve=J;ve>=0;ve--){const te=T.charCodeAt(ve);if(te!==32&&te!==9)return ve}return-1}function K(T,J){return T<J?-1:T>J?1:0}function B(T,J,ve=0,te=T.length,$=0,ue=J.length){for(;ve<te&&$<ue;ve++,$++){let ke=T.charCodeAt(ve),Le=J.charCodeAt($);if(ke<Le)return-1;if(ke>Le)return 1}const Ie=te-ve,Ce=ue-$;return Ie<Ce?-1:Ie>Ce?1:0}function D(T,J){return I(T,J,0,T.length,0,J.length)}function I(T,J,ve=0,te=T.length,$=0,ue=J.length){for(;ve<te&&$<ue;ve++,$++){let ke=T.charCodeAt(ve),Le=J.charCodeAt($);if(ke===Le)continue;if(ke>=128||Le>=128)return B(T.toLowerCase(),J.toLowerCase(),ve,te,$,ue);S(ke)&&(ke-=32),S(Le)&&(Le-=32);const mt=ke-Le;if(mt!==0)return mt}const Ie=te-ve,Ce=ue-$;return Ie<Ce?-1:Ie>Ce?1:0}function S(T){return T>=97&&T<=122}function q(T){return T>=65&&T<=90}function ae(T,J){return T.length===J.length&&I(T,J)===0}function j(T,J){const ve=J.length;return J.length>T.length?!1:I(T,J,0,ve)===0}function Y(T,J){let ve,te=Math.min(T.length,J.length);for(ve=0;ve<te;ve++)if(T.charCodeAt(ve)!==J.charCodeAt(ve))return ve;return te}function ie(T,J){let ve,te=Math.min(T.length,J.length);const $=T.length-1,ue=J.length-1;for(ve=0;ve<te;ve++)if(T.charCodeAt($-ve)!==J.charCodeAt(ue-ve))return ve;return te}function de(T){return 55296<=T&&T<=56319}function pe(T){return 56320<=T&&T<=57343}function W(T,J){return(T-55296<<10)+(J-56320)+65536}function M(T,J,ve){const te=T.charCodeAt(ve);if(de(te)&&ve+1<J){const $=T.charCodeAt(ve+1);if(pe($))return W(te,$)}return te}function X(T,J){const ve=T.charCodeAt(J-1);if(pe(ve)&&J>1){const te=T.charCodeAt(J-2);if(de(te))return W(te,ve)}return ve}function G(T,J){const ve=xe.getInstance(),te=J,$=T.length,ue=M(T,$,J);J+=ue>=65536?2:1;let Ie=ve.getGraphemeBreakType(ue);for(;J<$;){const Ce=M(T,$,J),ke=ve.getGraphemeBreakType(Ce);if(Je(Ie,ke))break;J+=Ce>=65536?2:1,Ie=ke}return J-te}function ne(T,J){const ve=xe.getInstance(),te=J,$=X(T,J);J-=$>=65536?2:1;let ue=ve.getGraphemeBreakType($);for(;J>0;){const Ie=X(T,J),Ce=ve.getGraphemeBreakType(Ie);if(Je(Ce,ue))break;J-=Ie>=65536?2:1,ue=Ce}return te-J}const Z=/(?:[\u05BE\u05C0\u05C3\u05C6\u05D0-\u05F4\u0608\u060B\u060D\u061B-\u064A\u066D-\u066F\u0671-\u06D5\u06E5\u06E6\u06EE\u06EF\u06FA-\u0710\u0712-\u072F\u074D-\u07A5\u07B1-\u07EA\u07F4\u07F5\u07FA-\u0815\u081A\u0824\u0828\u0830-\u0858\u085E-\u08BD\u200F\uFB1D\uFB1F-\uFB28\uFB2A-\uFD3D\uFD50-\uFDFC\uFE70-\uFEFC]|\uD802[\uDC00-\uDD1B\uDD20-\uDE00\uDE10-\uDE33\uDE40-\uDEE4\uDEEB-\uDF35\uDF40-\uDFFF]|\uD803[\uDC00-\uDCFF]|\uD83A[\uDC00-\uDCCF\uDD00-\uDD43\uDD50-\uDFFF]|\uD83B[\uDC00-\uDEBB])/;function m(T){return Z.test(T)}const v=/(?:[\u231A\u231B\u23F0\u23F3\u2600-\u27BF\u2B50\u2B55]|\uD83C[\uDDE6-\uDDFF\uDF00-\uDFFF]|\uD83D[\uDC00-\uDE4F\uDE80-\uDEFC\uDFE0-\uDFEB]|\uD83E[\uDD00-\uDDFF\uDE70-\uDED6])/;function Q(T){return v.test(T)}const he=/^[\t\n\r\x20-\x7E]*$/;function Ue(T){return he.test(T)}const Oe=/[\u2028\u2029]/;function ft(T){return Oe.test(T)}function Et(T){for(let J=0,ve=T.length;J<ve;J++)if(Ft(T.charCodeAt(J)))return!0;return!1}function Ft(T){return T=+T,T>=11904&&T<=55215||T>=63744&&T<=64255||T>=65281&&T<=65374}function Ut(T){return T>=127462&&T<=127487||T===8986||T===8987||T===9200||T===9203||T>=9728&&T<=10175||T===11088||T===11093||T>=127744&&T<=128591||T>=128640&&T<=128764||T>=128992&&T<=129003||T>=129280&&T<=129535||T>=129648&&T<=129750}const Se="\uFEFF";function Gt(T){return!!(T&&T.length>0&&T.charCodeAt(0)===65279)}function ht(T,J=!1){return T?(J&&(T=T.replace(/\\./g,"")),T.toLowerCase()!==T):!1}function tn(T){return T=T%(2*26),T<26?String.fromCharCode(97+T):String.fromCharCode(65+T-26)}function dt(T){return xe.getInstance().getGraphemeBreakType(T)}function Je(T,J){return T===0?J!==5&&J!==7:T===2&&J===3?!1:T===4||T===2||T===3||J===4||J===2||J===3?!0:!(T===8&&(J===8||J===9||J===11||J===12)||(T===11||T===9)&&(J===9||J===10)||(T===12||T===10)&&J===10||J===5||J===13||J===7||T===1||T===13&&J===14||T===6&&J===6)}class xe{constructor(){this._data=_e()}static getInstance(){return xe._INSTANCE||(xe._INSTANCE=new xe),xe._INSTANCE}getGraphemeBreakType(J){if(J<32)return J===10?3:J===13?2:4;if(J<127)return 0;const ve=this._data,te=ve.length/3;let $=1;for(;$<=te;)if(J<ve[3*$])$=2*$;else if(J>ve[3*$+1])$=2*$+1;else return ve[3*$+2];return 0}}xe._INSTANCE=null;function _e(){return JSON.parse("[0,0,0,51592,51592,11,44424,44424,11,72251,72254,5,7150,7150,7,48008,48008,11,55176,55176,11,128420,128420,14,3276,3277,5,9979,9980,14,46216,46216,11,49800,49800,11,53384,53384,11,70726,70726,5,122915,122916,5,129320,129327,14,2558,2558,5,5906,5908,5,9762,9763,14,43360,43388,8,45320,45320,11,47112,47112,11,48904,48904,11,50696,50696,11,52488,52488,11,54280,54280,11,70082,70083,1,71350,71350,7,73111,73111,5,127892,127893,14,128726,128727,14,129473,129474,14,2027,2035,5,2901,2902,5,3784,3789,5,6754,6754,5,8418,8420,5,9877,9877,14,11088,11088,14,44008,44008,5,44872,44872,11,45768,45768,11,46664,46664,11,47560,47560,11,48456,48456,11,49352,49352,11,50248,50248,11,51144,51144,11,52040,52040,11,52936,52936,11,53832,53832,11,54728,54728,11,69811,69814,5,70459,70460,5,71096,71099,7,71998,71998,5,72874,72880,5,119149,119149,7,127374,127374,14,128335,128335,14,128482,128482,14,128765,128767,14,129399,129400,14,129680,129685,14,1476,1477,5,2377,2380,7,2759,2760,5,3137,3140,7,3458,3459,7,4153,4154,5,6432,6434,5,6978,6978,5,7675,7679,5,9723,9726,14,9823,9823,14,9919,9923,14,10035,10036,14,42736,42737,5,43596,43596,5,44200,44200,11,44648,44648,11,45096,45096,11,45544,45544,11,45992,45992,11,46440,46440,11,46888,46888,11,47336,47336,11,47784,47784,11,48232,48232,11,48680,48680,11,49128,49128,11,49576,49576,11,50024,50024,11,50472,50472,11,50920,50920,11,51368,51368,11,51816,51816,11,52264,52264,11,52712,52712,11,53160,53160,11,53608,53608,11,54056,54056,11,54504,54504,11,54952,54952,11,68108,68111,5,69933,69940,5,70197,70197,7,70498,70499,7,70845,70845,5,71229,71229,5,71727,71735,5,72154,72155,5,72344,72345,5,73023,73029,5,94095,94098,5,121403,121452,5,126981,127182,14,127538,127546,14,127990,127990,14,128391,128391,14,128445,128449,14,128500,128505,14,128752,128752,14,129160,129167,14,129356,129356,14,129432,129442,14,129648,129651,14,129751,131069,14,173,173,4,1757,1757,1,2274,2274,1,2494,2494,5,2641,2641,5,2876,2876,5,3014,3016,7,3262,3262,7,3393,3396,5,3570,3571,7,3968,3972,5,4228,4228,7,6086,6086,5,6679,6680,5,6912,6915,5,7080,7081,5,7380,7392,5,8252,8252,14,9096,9096,14,9748,9749,14,9784,9786,14,9833,9850,14,9890,9894,14,9938,9938,14,9999,9999,14,10085,10087,14,12349,12349,14,43136,43137,7,43454,43456,7,43755,43755,7,44088,44088,11,44312,44312,11,44536,44536,11,44760,44760,11,44984,44984,11,45208,45208,11,45432,45432,11,45656,45656,11,45880,45880,11,46104,46104,11,46328,46328,11,46552,46552,11,46776,46776,11,47000,47000,11,47224,47224,11,47448,47448,11,47672,47672,11,47896,47896,11,48120,48120,11,48344,48344,11,48568,48568,11,48792,48792,11,49016,49016,11,49240,49240,11,49464,49464,11,49688,49688,11,49912,49912,11,50136,50136,11,50360,50360,11,50584,50584,11,50808,50808,11,51032,51032,11,51256,51256,11,51480,51480,11,51704,51704,11,51928,51928,11,52152,52152,11,52376,52376,11,52600,52600,11,52824,52824,11,53048,53048,11,53272,53272,11,53496,53496,11,53720,53720,11,53944,53944,11,54168,54168,11,54392,54392,11,54616,54616,11,54840,54840,11,55064,55064,11,65438,65439,5,69633,69633,5,69837,69837,1,70018,70018,7,70188,70190,7,70368,70370,7,70465,70468,7,70712,70719,5,70835,70840,5,70850,70851,5,71132,71133,5,71340,71340,7,71458,71461,5,71985,71989,7,72002,72002,7,72193,72202,5,72281,72283,5,72766,72766,7,72885,72886,5,73104,73105,5,92912,92916,5,113824,113827,4,119173,119179,5,121505,121519,5,125136,125142,5,127279,127279,14,127489,127490,14,127570,127743,14,127900,127901,14,128254,128254,14,128369,128370,14,128400,128400,14,128425,128432,14,128468,128475,14,128489,128494,14,128715,128720,14,128745,128745,14,128759,128760,14,129004,129023,14,129296,129304,14,129340,129342,14,129388,129392,14,129404,129407,14,129454,129455,14,129485,129487,14,129659,129663,14,129719,129727,14,917536,917631,5,13,13,2,1160,1161,5,1564,1564,4,1807,1807,1,2085,2087,5,2363,2363,7,2402,2403,5,2507,2508,7,2622,2624,7,2691,2691,7,2786,2787,5,2881,2884,5,3006,3006,5,3072,3072,5,3170,3171,5,3267,3268,7,3330,3331,7,3406,3406,1,3538,3540,5,3655,3662,5,3897,3897,5,4038,4038,5,4184,4185,5,4352,4447,8,6068,6069,5,6155,6157,5,6448,6449,7,6742,6742,5,6783,6783,5,6966,6970,5,7042,7042,7,7143,7143,7,7212,7219,5,7412,7412,5,8206,8207,4,8294,8303,4,8596,8601,14,9410,9410,14,9742,9742,14,9757,9757,14,9770,9770,14,9794,9794,14,9828,9828,14,9855,9855,14,9882,9882,14,9900,9903,14,9929,9933,14,9963,9967,14,9987,9988,14,10006,10006,14,10062,10062,14,10175,10175,14,11744,11775,5,42607,42607,5,43043,43044,7,43263,43263,5,43444,43445,7,43569,43570,5,43698,43700,5,43766,43766,5,44032,44032,11,44144,44144,11,44256,44256,11,44368,44368,11,44480,44480,11,44592,44592,11,44704,44704,11,44816,44816,11,44928,44928,11,45040,45040,11,45152,45152,11,45264,45264,11,45376,45376,11,45488,45488,11,45600,45600,11,45712,45712,11,45824,45824,11,45936,45936,11,46048,46048,11,46160,46160,11,46272,46272,11,46384,46384,11,46496,46496,11,46608,46608,11,46720,46720,11,46832,46832,11,46944,46944,11,47056,47056,11,47168,47168,11,47280,47280,11,47392,47392,11,47504,47504,11,47616,47616,11,47728,47728,11,47840,47840,11,47952,47952,11,48064,48064,11,48176,48176,11,48288,48288,11,48400,48400,11,48512,48512,11,48624,48624,11,48736,48736,11,48848,48848,11,48960,48960,11,49072,49072,11,49184,49184,11,49296,49296,11,49408,49408,11,49520,49520,11,49632,49632,11,49744,49744,11,49856,49856,11,49968,49968,11,50080,50080,11,50192,50192,11,50304,50304,11,50416,50416,11,50528,50528,11,50640,50640,11,50752,50752,11,50864,50864,11,50976,50976,11,51088,51088,11,51200,51200,11,51312,51312,11,51424,51424,11,51536,51536,11,51648,51648,11,51760,51760,11,51872,51872,11,51984,51984,11,52096,52096,11,52208,52208,11,52320,52320,11,52432,52432,11,52544,52544,11,52656,52656,11,52768,52768,11,52880,52880,11,52992,52992,11,53104,53104,11,53216,53216,11,53328,53328,11,53440,53440,11,53552,53552,11,53664,53664,11,53776,53776,11,53888,53888,11,54000,54000,11,54112,54112,11,54224,54224,11,54336,54336,11,54448,54448,11,54560,54560,11,54672,54672,11,54784,54784,11,54896,54896,11,55008,55008,11,55120,55120,11,64286,64286,5,66272,66272,5,68900,68903,5,69762,69762,7,69817,69818,5,69927,69931,5,70003,70003,5,70070,70078,5,70094,70094,7,70194,70195,7,70206,70206,5,70400,70401,5,70463,70463,7,70475,70477,7,70512,70516,5,70722,70724,5,70832,70832,5,70842,70842,5,70847,70848,5,71088,71089,7,71102,71102,7,71219,71226,5,71231,71232,5,71342,71343,7,71453,71455,5,71463,71467,5,71737,71738,5,71995,71996,5,72000,72000,7,72145,72147,7,72160,72160,5,72249,72249,7,72273,72278,5,72330,72342,5,72752,72758,5,72850,72871,5,72882,72883,5,73018,73018,5,73031,73031,5,73109,73109,5,73461,73462,7,94031,94031,5,94192,94193,7,119142,119142,7,119155,119162,4,119362,119364,5,121476,121476,5,122888,122904,5,123184,123190,5,126976,126979,14,127184,127231,14,127344,127345,14,127405,127461,14,127514,127514,14,127561,127567,14,127778,127779,14,127896,127896,14,127985,127986,14,127995,127999,5,128326,128328,14,128360,128366,14,128378,128378,14,128394,128397,14,128405,128406,14,128422,128423,14,128435,128443,14,128453,128464,14,128479,128480,14,128484,128487,14,128496,128498,14,128640,128709,14,128723,128724,14,128736,128741,14,128747,128748,14,128755,128755,14,128762,128762,14,128981,128991,14,129096,129103,14,129292,129292,14,129311,129311,14,129329,129330,14,129344,129349,14,129360,129374,14,129394,129394,14,129402,129402,14,129413,129425,14,129445,129450,14,129466,129471,14,129483,129483,14,129511,129535,14,129653,129655,14,129667,129670,14,129705,129711,14,129731,129743,14,917505,917505,4,917760,917999,5,10,10,3,127,159,4,768,879,5,1471,1471,5,1536,1541,1,1648,1648,5,1767,1768,5,1840,1866,5,2070,2073,5,2137,2139,5,2307,2307,7,2366,2368,7,2382,2383,7,2434,2435,7,2497,2500,5,2519,2519,5,2563,2563,7,2631,2632,5,2677,2677,5,2750,2752,7,2763,2764,7,2817,2817,5,2879,2879,5,2891,2892,7,2914,2915,5,3008,3008,5,3021,3021,5,3076,3076,5,3146,3149,5,3202,3203,7,3264,3265,7,3271,3272,7,3298,3299,5,3390,3390,5,3402,3404,7,3426,3427,5,3535,3535,5,3544,3550,7,3635,3635,7,3763,3763,7,3893,3893,5,3953,3966,5,3981,3991,5,4145,4145,7,4157,4158,5,4209,4212,5,4237,4237,5,4520,4607,10,5970,5971,5,6071,6077,5,6089,6099,5,6277,6278,5,6439,6440,5,6451,6456,7,6683,6683,5,6744,6750,5,6765,6770,7,6846,6846,5,6964,6964,5,6972,6972,5,7019,7027,5,7074,7077,5,7083,7085,5,7146,7148,7,7154,7155,7,7222,7223,5,7394,7400,5,7416,7417,5,8204,8204,5,8233,8233,4,8288,8292,4,8413,8416,5,8482,8482,14,8986,8987,14,9193,9203,14,9654,9654,14,9733,9733,14,9745,9745,14,9752,9752,14,9760,9760,14,9766,9766,14,9774,9775,14,9792,9792,14,9800,9811,14,9825,9826,14,9831,9831,14,9852,9853,14,9872,9873,14,9880,9880,14,9885,9887,14,9896,9897,14,9906,9916,14,9926,9927,14,9936,9936,14,9941,9960,14,9974,9974,14,9982,9985,14,9992,9997,14,10002,10002,14,10017,10017,14,10055,10055,14,10071,10071,14,10145,10145,14,11013,11015,14,11503,11505,5,12334,12335,5,12951,12951,14,42612,42621,5,43014,43014,5,43047,43047,7,43204,43205,5,43335,43345,5,43395,43395,7,43450,43451,7,43561,43566,5,43573,43574,5,43644,43644,5,43710,43711,5,43758,43759,7,44005,44005,5,44012,44012,7,44060,44060,11,44116,44116,11,44172,44172,11,44228,44228,11,44284,44284,11,44340,44340,11,44396,44396,11,44452,44452,11,44508,44508,11,44564,44564,11,44620,44620,11,44676,44676,11,44732,44732,11,44788,44788,11,44844,44844,11,44900,44900,11,44956,44956,11,45012,45012,11,45068,45068,11,45124,45124,11,45180,45180,11,45236,45236,11,45292,45292,11,45348,45348,11,45404,45404,11,45460,45460,11,45516,45516,11,45572,45572,11,45628,45628,11,45684,45684,11,45740,45740,11,45796,45796,11,45852,45852,11,45908,45908,11,45964,45964,11,46020,46020,11,46076,46076,11,46132,46132,11,46188,46188,11,46244,46244,11,46300,46300,11,46356,46356,11,46412,46412,11,46468,46468,11,46524,46524,11,46580,46580,11,46636,46636,11,46692,46692,11,46748,46748,11,46804,46804,11,46860,46860,11,46916,46916,11,46972,46972,11,47028,47028,11,47084,47084,11,47140,47140,11,47196,47196,11,47252,47252,11,47308,47308,11,47364,47364,11,47420,47420,11,47476,47476,11,47532,47532,11,47588,47588,11,47644,47644,11,47700,47700,11,47756,47756,11,47812,47812,11,47868,47868,11,47924,47924,11,47980,47980,11,48036,48036,11,48092,48092,11,48148,48148,11,48204,48204,11,48260,48260,11,48316,48316,11,48372,48372,11,48428,48428,11,48484,48484,11,48540,48540,11,48596,48596,11,48652,48652,11,48708,48708,11,48764,48764,11,48820,48820,11,48876,48876,11,48932,48932,11,48988,48988,11,49044,49044,11,49100,49100,11,49156,49156,11,49212,49212,11,49268,49268,11,49324,49324,11,49380,49380,11,49436,49436,11,49492,49492,11,49548,49548,11,49604,49604,11,49660,49660,11,49716,49716,11,49772,49772,11,49828,49828,11,49884,49884,11,49940,49940,11,49996,49996,11,50052,50052,11,50108,50108,11,50164,50164,11,50220,50220,11,50276,50276,11,50332,50332,11,50388,50388,11,50444,50444,11,50500,50500,11,50556,50556,11,50612,50612,11,50668,50668,11,50724,50724,11,50780,50780,11,50836,50836,11,50892,50892,11,50948,50948,11,51004,51004,11,51060,51060,11,51116,51116,11,51172,51172,11,51228,51228,11,51284,51284,11,51340,51340,11,51396,51396,11,51452,51452,11,51508,51508,11,51564,51564,11,51620,51620,11,51676,51676,11,51732,51732,11,51788,51788,11,51844,51844,11,51900,51900,11,51956,51956,11,52012,52012,11,52068,52068,11,52124,52124,11,52180,52180,11,52236,52236,11,52292,52292,11,52348,52348,11,52404,52404,11,52460,52460,11,52516,52516,11,52572,52572,11,52628,52628,11,52684,52684,11,52740,52740,11,52796,52796,11,52852,52852,11,52908,52908,11,52964,52964,11,53020,53020,11,53076,53076,11,53132,53132,11,53188,53188,11,53244,53244,11,53300,53300,11,53356,53356,11,53412,53412,11,53468,53468,11,53524,53524,11,53580,53580,11,53636,53636,11,53692,53692,11,53748,53748,11,53804,53804,11,53860,53860,11,53916,53916,11,53972,53972,11,54028,54028,11,54084,54084,11,54140,54140,11,54196,54196,11,54252,54252,11,54308,54308,11,54364,54364,11,54420,54420,11,54476,54476,11,54532,54532,11,54588,54588,11,54644,54644,11,54700,54700,11,54756,54756,11,54812,54812,11,54868,54868,11,54924,54924,11,54980,54980,11,55036,55036,11,55092,55092,11,55148,55148,11,55216,55238,9,65056,65071,5,65529,65531,4,68097,68099,5,68159,68159,5,69446,69456,5,69688,69702,5,69808,69810,7,69815,69816,7,69821,69821,1,69888,69890,5,69932,69932,7,69957,69958,7,70016,70017,5,70067,70069,7,70079,70080,7,70089,70092,5,70095,70095,5,70191,70193,5,70196,70196,5,70198,70199,5,70367,70367,5,70371,70378,5,70402,70403,7,70462,70462,5,70464,70464,5,70471,70472,7,70487,70487,5,70502,70508,5,70709,70711,7,70720,70721,7,70725,70725,7,70750,70750,5,70833,70834,7,70841,70841,7,70843,70844,7,70846,70846,7,70849,70849,7,71087,71087,5,71090,71093,5,71100,71101,5,71103,71104,5,71216,71218,7,71227,71228,7,71230,71230,7,71339,71339,5,71341,71341,5,71344,71349,5,71351,71351,5,71456,71457,7,71462,71462,7,71724,71726,7,71736,71736,7,71984,71984,5,71991,71992,7,71997,71997,7,71999,71999,1,72001,72001,1,72003,72003,5,72148,72151,5,72156,72159,7,72164,72164,7,72243,72248,5,72250,72250,1,72263,72263,5,72279,72280,7,72324,72329,1,72343,72343,7,72751,72751,7,72760,72765,5,72767,72767,5,72873,72873,7,72881,72881,7,72884,72884,7,73009,73014,5,73020,73021,5,73030,73030,1,73098,73102,7,73107,73108,7,73110,73110,7,73459,73460,5,78896,78904,4,92976,92982,5,94033,94087,7,94180,94180,5,113821,113822,5,119141,119141,5,119143,119145,5,119150,119154,5,119163,119170,5,119210,119213,5,121344,121398,5,121461,121461,5,121499,121503,5,122880,122886,5,122907,122913,5,122918,122922,5,123628,123631,5,125252,125258,5,126980,126980,14,127183,127183,14,127245,127247,14,127340,127343,14,127358,127359,14,127377,127386,14,127462,127487,6,127491,127503,14,127535,127535,14,127548,127551,14,127568,127569,14,127744,127777,14,127780,127891,14,127894,127895,14,127897,127899,14,127902,127984,14,127987,127989,14,127991,127994,14,128000,128253,14,128255,128317,14,128329,128334,14,128336,128359,14,128367,128368,14,128371,128377,14,128379,128390,14,128392,128393,14,128398,128399,14,128401,128404,14,128407,128419,14,128421,128421,14,128424,128424,14,128433,128434,14,128444,128444,14,128450,128452,14,128465,128467,14,128476,128478,14,128481,128481,14,128483,128483,14,128488,128488,14,128495,128495,14,128499,128499,14,128506,128591,14,128710,128714,14,128721,128722,14,128725,128725,14,128728,128735,14,128742,128744,14,128746,128746,14,128749,128751,14,128753,128754,14,128756,128758,14,128761,128761,14,128763,128764,14,128884,128895,14,128992,129003,14,129036,129039,14,129114,129119,14,129198,129279,14,129293,129295,14,129305,129310,14,129312,129319,14,129328,129328,14,129331,129338,14,129343,129343,14,129351,129355,14,129357,129359,14,129375,129387,14,129393,129393,14,129395,129398,14,129401,129401,14,129403,129403,14,129408,129412,14,129426,129431,14,129443,129444,14,129451,129453,14,129456,129465,14,129472,129472,14,129475,129482,14,129484,129484,14,129488,129510,14,129536,129647,14,129652,129652,14,129656,129658,14,129664,129666,14,129671,129679,14,129686,129704,14,129712,129718,14,129728,129730,14,129744,129750,14,917504,917504,4,917506,917535,4,917632,917759,4,918000,921599,4,0,9,4,11,12,4,14,31,4,169,169,14,174,174,14,1155,1159,5,1425,1469,5,1473,1474,5,1479,1479,5,1552,1562,5,1611,1631,5,1750,1756,5,1759,1764,5,1770,1773,5,1809,1809,5,1958,1968,5,2045,2045,5,2075,2083,5,2089,2093,5,2259,2273,5,2275,2306,5,2362,2362,5,2364,2364,5,2369,2376,5,2381,2381,5,2385,2391,5,2433,2433,5,2492,2492,5,2495,2496,7,2503,2504,7,2509,2509,5,2530,2531,5,2561,2562,5,2620,2620,5,2625,2626,5,2635,2637,5,2672,2673,5,2689,2690,5,2748,2748,5,2753,2757,5,2761,2761,7,2765,2765,5,2810,2815,5,2818,2819,7,2878,2878,5,2880,2880,7,2887,2888,7,2893,2893,5,2903,2903,5,2946,2946,5,3007,3007,7,3009,3010,7,3018,3020,7,3031,3031,5,3073,3075,7,3134,3136,5,3142,3144,5,3157,3158,5,3201,3201,5,3260,3260,5,3263,3263,5,3266,3266,5,3270,3270,5,3274,3275,7,3285,3286,5,3328,3329,5,3387,3388,5,3391,3392,7,3398,3400,7,3405,3405,5,3415,3415,5,3457,3457,5,3530,3530,5,3536,3537,7,3542,3542,5,3551,3551,5,3633,3633,5,3636,3642,5,3761,3761,5,3764,3772,5,3864,3865,5,3895,3895,5,3902,3903,7,3967,3967,7,3974,3975,5,3993,4028,5,4141,4144,5,4146,4151,5,4155,4156,7,4182,4183,7,4190,4192,5,4226,4226,5,4229,4230,5,4253,4253,5,4448,4519,9,4957,4959,5,5938,5940,5,6002,6003,5,6070,6070,7,6078,6085,7,6087,6088,7,6109,6109,5,6158,6158,4,6313,6313,5,6435,6438,7,6441,6443,7,6450,6450,5,6457,6459,5,6681,6682,7,6741,6741,7,6743,6743,7,6752,6752,5,6757,6764,5,6771,6780,5,6832,6845,5,6847,6848,5,6916,6916,7,6965,6965,5,6971,6971,7,6973,6977,7,6979,6980,7,7040,7041,5,7073,7073,7,7078,7079,7,7082,7082,7,7142,7142,5,7144,7145,5,7149,7149,5,7151,7153,5,7204,7211,7,7220,7221,7,7376,7378,5,7393,7393,7,7405,7405,5,7415,7415,7,7616,7673,5,8203,8203,4,8205,8205,13,8232,8232,4,8234,8238,4,8265,8265,14,8293,8293,4,8400,8412,5,8417,8417,5,8421,8432,5,8505,8505,14,8617,8618,14,9000,9000,14,9167,9167,14,9208,9210,14,9642,9643,14,9664,9664,14,9728,9732,14,9735,9741,14,9743,9744,14,9746,9746,14,9750,9751,14,9753,9756,14,9758,9759,14,9761,9761,14,9764,9765,14,9767,9769,14,9771,9773,14,9776,9783,14,9787,9791,14,9793,9793,14,9795,9799,14,9812,9822,14,9824,9824,14,9827,9827,14,9829,9830,14,9832,9832,14,9851,9851,14,9854,9854,14,9856,9861,14,9874,9876,14,9878,9879,14,9881,9881,14,9883,9884,14,9888,9889,14,9895,9895,14,9898,9899,14,9904,9905,14,9917,9918,14,9924,9925,14,9928,9928,14,9934,9935,14,9937,9937,14,9939,9940,14,9961,9962,14,9968,9973,14,9975,9978,14,9981,9981,14,9986,9986,14,9989,9989,14,9998,9998,14,10000,10001,14,10004,10004,14,10013,10013,14,10024,10024,14,10052,10052,14,10060,10060,14,10067,10069,14,10083,10084,14,10133,10135,14,10160,10160,14,10548,10549,14,11035,11036,14,11093,11093,14,11647,11647,5,12330,12333,5,12336,12336,14,12441,12442,5,12953,12953,14,42608,42610,5,42654,42655,5,43010,43010,5,43019,43019,5,43045,43046,5,43052,43052,5,43188,43203,7,43232,43249,5,43302,43309,5,43346,43347,7,43392,43394,5,43443,43443,5,43446,43449,5,43452,43453,5,43493,43493,5,43567,43568,7,43571,43572,7,43587,43587,5,43597,43597,7,43696,43696,5,43703,43704,5,43713,43713,5,43756,43757,5,43765,43765,7,44003,44004,7,44006,44007,7,44009,44010,7,44013,44013,5,44033,44059,12,44061,44087,12,44089,44115,12,44117,44143,12,44145,44171,12,44173,44199,12,44201,44227,12,44229,44255,12,44257,44283,12,44285,44311,12,44313,44339,12,44341,44367,12,44369,44395,12,44397,44423,12,44425,44451,12,44453,44479,12,44481,44507,12,44509,44535,12,44537,44563,12,44565,44591,12,44593,44619,12,44621,44647,12,44649,44675,12,44677,44703,12,44705,44731,12,44733,44759,12,44761,44787,12,44789,44815,12,44817,44843,12,44845,44871,12,44873,44899,12,44901,44927,12,44929,44955,12,44957,44983,12,44985,45011,12,45013,45039,12,45041,45067,12,45069,45095,12,45097,45123,12,45125,45151,12,45153,45179,12,45181,45207,12,45209,45235,12,45237,45263,12,45265,45291,12,45293,45319,12,45321,45347,12,45349,45375,12,45377,45403,12,45405,45431,12,45433,45459,12,45461,45487,12,45489,45515,12,45517,45543,12,45545,45571,12,45573,45599,12,45601,45627,12,45629,45655,12,45657,45683,12,45685,45711,12,45713,45739,12,45741,45767,12,45769,45795,12,45797,45823,12,45825,45851,12,45853,45879,12,45881,45907,12,45909,45935,12,45937,45963,12,45965,45991,12,45993,46019,12,46021,46047,12,46049,46075,12,46077,46103,12,46105,46131,12,46133,46159,12,46161,46187,12,46189,46215,12,46217,46243,12,46245,46271,12,46273,46299,12,46301,46327,12,46329,46355,12,46357,46383,12,46385,46411,12,46413,46439,12,46441,46467,12,46469,46495,12,46497,46523,12,46525,46551,12,46553,46579,12,46581,46607,12,46609,46635,12,46637,46663,12,46665,46691,12,46693,46719,12,46721,46747,12,46749,46775,12,46777,46803,12,46805,46831,12,46833,46859,12,46861,46887,12,46889,46915,12,46917,46943,12,46945,46971,12,46973,46999,12,47001,47027,12,47029,47055,12,47057,47083,12,47085,47111,12,47113,47139,12,47141,47167,12,47169,47195,12,47197,47223,12,47225,47251,12,47253,47279,12,47281,47307,12,47309,47335,12,47337,47363,12,47365,47391,12,47393,47419,12,47421,47447,12,47449,47475,12,47477,47503,12,47505,47531,12,47533,47559,12,47561,47587,12,47589,47615,12,47617,47643,12,47645,47671,12,47673,47699,12,47701,47727,12,47729,47755,12,47757,47783,12,47785,47811,12,47813,47839,12,47841,47867,12,47869,47895,12,47897,47923,12,47925,47951,12,47953,47979,12,47981,48007,12,48009,48035,12,48037,48063,12,48065,48091,12,48093,48119,12,48121,48147,12,48149,48175,12,48177,48203,12,48205,48231,12,48233,48259,12,48261,48287,12,48289,48315,12,48317,48343,12,48345,48371,12,48373,48399,12,48401,48427,12,48429,48455,12,48457,48483,12,48485,48511,12,48513,48539,12,48541,48567,12,48569,48595,12,48597,48623,12,48625,48651,12,48653,48679,12,48681,48707,12,48709,48735,12,48737,48763,12,48765,48791,12,48793,48819,12,48821,48847,12,48849,48875,12,48877,48903,12,48905,48931,12,48933,48959,12,48961,48987,12,48989,49015,12,49017,49043,12,49045,49071,12,49073,49099,12,49101,49127,12,49129,49155,12,49157,49183,12,49185,49211,12,49213,49239,12,49241,49267,12,49269,49295,12,49297,49323,12,49325,49351,12,49353,49379,12,49381,49407,12,49409,49435,12,49437,49463,12,49465,49491,12,49493,49519,12,49521,49547,12,49549,49575,12,49577,49603,12,49605,49631,12,49633,49659,12,49661,49687,12,49689,49715,12,49717,49743,12,49745,49771,12,49773,49799,12,49801,49827,12,49829,49855,12,49857,49883,12,49885,49911,12,49913,49939,12,49941,49967,12,49969,49995,12,49997,50023,12,50025,50051,12,50053,50079,12,50081,50107,12,50109,50135,12,50137,50163,12,50165,50191,12,50193,50219,12,50221,50247,12,50249,50275,12,50277,50303,12,50305,50331,12,50333,50359,12,50361,50387,12,50389,50415,12,50417,50443,12,50445,50471,12,50473,50499,12,50501,50527,12,50529,50555,12,50557,50583,12,50585,50611,12,50613,50639,12,50641,50667,12,50669,50695,12,50697,50723,12,50725,50751,12,50753,50779,12,50781,50807,12,50809,50835,12,50837,50863,12,50865,50891,12,50893,50919,12,50921,50947,12,50949,50975,12,50977,51003,12,51005,51031,12,51033,51059,12,51061,51087,12,51089,51115,12,51117,51143,12,51145,51171,12,51173,51199,12,51201,51227,12,51229,51255,12,51257,51283,12,51285,51311,12,51313,51339,12,51341,51367,12,51369,51395,12,51397,51423,12,51425,51451,12,51453,51479,12,51481,51507,12,51509,51535,12,51537,51563,12,51565,51591,12,51593,51619,12,51621,51647,12,51649,51675,12,51677,51703,12,51705,51731,12,51733,51759,12,51761,51787,12,51789,51815,12,51817,51843,12,51845,51871,12,51873,51899,12,51901,51927,12,51929,51955,12,51957,51983,12,51985,52011,12,52013,52039,12,52041,52067,12,52069,52095,12,52097,52123,12,52125,52151,12,52153,52179,12,52181,52207,12,52209,52235,12,52237,52263,12,52265,52291,12,52293,52319,12,52321,52347,12,52349,52375,12,52377,52403,12,52405,52431,12,52433,52459,12,52461,52487,12,52489,52515,12,52517,52543,12,52545,52571,12,52573,52599,12,52601,52627,12,52629,52655,12,52657,52683,12,52685,52711,12,52713,52739,12,52741,52767,12,52769,52795,12,52797,52823,12,52825,52851,12,52853,52879,12,52881,52907,12,52909,52935,12,52937,52963,12,52965,52991,12,52993,53019,12,53021,53047,12,53049,53075,12,53077,53103,12,53105,53131,12,53133,53159,12,53161,53187,12,53189,53215,12,53217,53243,12,53245,53271,12,53273,53299,12,53301,53327,12,53329,53355,12,53357,53383,12,53385,53411,12,53413,53439,12,53441,53467,12,53469,53495,12,53497,53523,12,53525,53551,12,53553,53579,12,53581,53607,12,53609,53635,12,53637,53663,12,53665,53691,12,53693,53719,12,53721,53747,12,53749,53775,12,53777,53803,12,53805,53831,12,53833,53859,12,53861,53887,12,53889,53915,12,53917,53943,12,53945,53971,12,53973,53999,12,54001,54027,12,54029,54055,12,54057,54083,12,54085,54111,12,54113,54139,12,54141,54167,12,54169,54195,12,54197,54223,12,54225,54251,12,54253,54279,12,54281,54307,12,54309,54335,12,54337,54363,12,54365,54391,12,54393,54419,12,54421,54447,12,54449,54475,12,54477,54503,12,54505,54531,12,54533,54559,12,54561,54587,12,54589,54615,12,54617,54643,12,54645,54671,12,54673,54699,12,54701,54727,12,54729,54755,12,54757,54783,12,54785,54811,12,54813,54839,12,54841,54867,12,54869,54895,12,54897,54923,12,54925,54951,12,54953,54979,12,54981,55007,12,55009,55035,12,55037,55063,12,55065,55091,12,55093,55119,12,55121,55147,12,55149,55175,12,55177,55203,12,55243,55291,10,65024,65039,5,65279,65279,4,65520,65528,4,66045,66045,5,66422,66426,5,68101,68102,5,68152,68154,5,68325,68326,5,69291,69292,5,69632,69632,7,69634,69634,7,69759,69761,5]")}function N(T,J){if(T===0)return 0;const ve=Fe(T,J);if(ve!==void 0)return ve;const te=X(J,T);return T-=De(te),T}function Fe(T,J){let ve=X(J,T);for(T-=De(ve);V(ve)||ve===65039||ve===8419;){if(T===0)return;ve=X(J,T),T-=De(ve)}if(Ut(ve)){if(T>=0){const te=X(J,T);te===8205&&(T-=De(te))}return T}}function De(T){return T>=65536?2:1}function V(T){return 127995<=T&&T<=127999}},72999:function(Cn,tt,b){"use strict";b.d(tt,{$E:function(){return C},$K:function(){return fe},D8:function(){return h},HD:function(){return re},IU:function(){return F},Jp:function(){return ee},Kn:function(){return ge},cW:function(){return E},f6:function(){return R},hj:function(){return se},jn:function(){return U},kJ:function(){return P},mf:function(){return x},o8:function(){return f},p_:function(){return A},vE:function(){return K}});function P(B){return Array.isArray(B)}function re(B){return typeof B=="string"}function ge(B){return typeof B=="object"&&B!==null&&!Array.isArray(B)&&!(B instanceof RegExp)&&!(B instanceof Date)}function se(B){return typeof B=="number"&&!isNaN(B)}function U(B){return B===!0||B===!1}function f(B){return typeof B=="undefined"}function fe(B){return!ee(B)}function ee(B){return f(B)||B===null}function A(B,D){if(!B)throw new Error(D?`Unexpected type, expected '${D}'`:"Unexpected type")}function E(B){if(ee(B))throw new Error("Assertion Failed: argument is undefined or null");return B}function x(B){return typeof B=="function"}function h(B,D){const I=Math.min(B.length,D.length);for(let S=0;S<I;S++)p(B[S],D[S])}function p(B,D){if(re(D)){if(typeof B!==D)throw new Error(`argument does not match constraint: typeof ${D}`)}else if(x(D)){try{if(B instanceof D)return}catch(I){}if(!ee(B)&&B.constructor===D||D.length===1&&D.call(void 0,B)===!0)return;throw new Error("argument does not match one of these constraints: arg instanceof constraint, arg.constructor === constraint, nor constraint(arg) === true")}}function _(B){let D=[],I=Object.getPrototypeOf(B);for(;Object.prototype!==I;)D=D.concat(Object.getOwnPropertyNames(I)),I=Object.getPrototypeOf(I);return D}function C(B){const D=[];for(const I of _(B))typeof B[I]=="function"&&D.push(I);return D}function F(B,D){const I=q=>function(){const ae=Array.prototype.slice.call(arguments,0);return D(q,ae)};let S={};for(const q of B)S[q]=I(q);return S}function R(B){return B===null?void 0:B}function K(B,D="Unreachable"){throw new Error(D)}},13268:function(Cn,tt,b){"use strict";b.d(tt,{N:function(){return re}});function P(ge,se){let U;return se.length===0?U=ge:U=ge.replace(/\{(\d+)\}/g,function(f,fe){const ee=fe[0];return typeof se[ee]!="undefined"?se[ee]:f}),U}function re(ge,se,...U){return P(se,U)}},96236:function(Cn,tt,b){"use strict";b.d(tt,{BH:function(){return F},NZ:function(){return R},U8:function(){return K},co:function(){return C},eH:function(){return _},vr:function(){return p}});var P=b(75918),re=b(52615),ge=b(4348),se=b(88226),U=b(69323),f=b(34502),fe=b(35884),ee=b(90689),A=b(16925),E=b(49055),x=function(B,D,I,S){var q=arguments.length,ae=q<3?D:S===null?S=Object.getOwnPropertyDescriptor(D,I):S,j;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")ae=Reflect.decorate(B,D,I,S);else for(var Y=B.length-1;Y>=0;Y--)(j=B[Y])&&(ae=(q<3?j(ae):q>3?j(D,I,ae):j(D,I))||ae);return q>3&&ae&&Object.defineProperty(D,I,ae),ae},h=function(B,D){return function(I,S){D(I,S,B)}};function p(B){return B.command!==void 0}class _{constructor(D){this.id=_._idPool++,this._debugName=D}}_._idPool=0,_.CommandPalette=new _("CommandPalette"),_.EditorContext=new _("EditorContext"),_.SimpleEditorContext=new _("SimpleEditorContext"),_.EditorContextCopy=new _("EditorContextCopy"),_.EditorContextPeek=new _("EditorContextPeek"),_.MenubarEditMenu=new _("MenubarEditMenu"),_.MenubarCopy=new _("MenubarCopy"),_.MenubarGoMenu=new _("MenubarGoMenu"),_.MenubarSelectionMenu=new _("MenubarSelectionMenu"),_.InlineCompletionsActions=new _("InlineCompletionsActions");const C=(0,A.yh)("menuService"),F=new class{constructor(){this._commands=new Map,this._menuItems=new Map,this._onDidChangeMenu=new ge.Q5,this.onDidChangeMenu=this._onDidChangeMenu.event,this._commandPaletteChangeEvent={has:B=>B===_.CommandPalette}}addCommand(B){return this.addCommands(se.$.single(B))}addCommands(B){for(const D of B)this._commands.set(D.id,D);return this._onDidChangeMenu.fire(this._commandPaletteChangeEvent),(0,U.OF)(()=>{let D=!1;for(const I of B)D=this._commands.delete(I.id)||D;D&&this._onDidChangeMenu.fire(this._commandPaletteChangeEvent)})}getCommand(B){return this._commands.get(B)}getCommands(){const B=new Map;return this._commands.forEach((D,I)=>B.set(I,D)),B}appendMenuItem(B,D){return this.appendMenuItems(se.$.single({id:B,item:D}))}appendMenuItems(B){const D=new Set,I=new f.S;for(const{id:S,item:q}of B){let ae=this._menuItems.get(S);ae||(ae=new f.S,this._menuItems.set(S,ae)),I.push(ae.push(q)),D.add(S)}return this._onDidChangeMenu.fire(D),(0,U.OF)(()=>{if(I.size>0){for(let S of I)S();this._onDidChangeMenu.fire(D),I.clear()}})}getMenuItems(B){let D;return this._menuItems.has(B)?D=[...this._menuItems.get(B)]:D=[],B===_.CommandPalette&&this._appendImplicitItems(D),D}_appendImplicitItems(B){const D=new Set;for(const I of B)p(I)&&(D.add(I.command.id),I.alt&&D.add(I.alt.id));this._commands.forEach((I,S)=>{D.has(S)||B.push({command:I})})}};class R extends P.wY{constructor(D,I,S,q){super(`submenuitem.${D.submenu.id}`,typeof D.title=="string"?D.title:D.title.value,[],"submenu"),this.item=D,this._menuService=I,this._contextKeyService=S,this._options=q}get actions(){const D=[],I=this._menuService.createMenu(this.item.submenu,this._contextKeyService),S=I.getActions(this._options);I.dispose();for(const[,q]of S)q.length>0&&(D.push(...q),D.push(new P.Z0));return D.length&&D.pop(),D}}let K=class ic{constructor(D,I,S,q,ae){var j,Y;if(this._commandService=ae,this.id=D.id,this.label=S!=null&&S.renderShortTitle&&D.shortTitle?typeof D.shortTitle=="string"?D.shortTitle:D.shortTitle.value:typeof D.title=="string"?D.title:D.title.value,this.tooltip=(Y=typeof D.tooltip=="string"?D.tooltip:(j=D.tooltip)===null||j===void 0?void 0:j.value)!==null&&Y!==void 0?Y:"",this.enabled=!D.precondition||q.contextMatchesRules(D.precondition),this.checked=void 0,D.toggled){const ie=D.toggled.condition?D.toggled:{condition:D.toggled};this.checked=q.contextMatchesRules(ie.condition),this.checked&&ie.tooltip&&(this.tooltip=typeof ie.tooltip=="string"?ie.tooltip:ie.tooltip.value),ie.title&&(this.label=typeof ie.title=="string"?ie.title:ie.title.value)}this.item=D,this.alt=I?new ic(I,void 0,S,q,ae):void 0,this._options=S,E.kS.isThemeIcon(D.icon)&&(this.class=re.dT.asClassName(D.icon))}dispose(){}run(...D){var I,S;let q=[];return!((I=this._options)===null||I===void 0)&&I.arg&&(q=[...q,this._options.arg]),!((S=this._options)===null||S===void 0)&&S.shouldForwardArgs&&(q=[...q,...D]),this._commandService.executeCommand(this.id,...q)}};K=x([h(3,ee.i6),h(4,fe.H)],K)},35884:function(Cn,tt,b){"use strict";b.d(tt,{H:function(){return fe},P:function(){return ee}});var P=b(4348),re=b(88226),ge=b(69323),se=b(34502),U=b(72999),f=b(16925);const fe=(0,f.yh)("commandService"),ee=new class{constructor(){this._commands=new Map,this._onDidRegisterCommand=new P.Q5,this.onDidRegisterCommand=this._onDidRegisterCommand.event}registerCommand(A,E){if(!A)throw new Error("invalid command");if(typeof A=="string"){if(!E)throw new Error("invalid command");return this.registerCommand({id:A,handler:E})}if(A.description){const C=[];for(let R of A.description.args)C.push(R.constraint);const F=A.handler;A.handler=function(R,...K){return(0,U.D8)(K,C),F(R,...K)}}const{id:x}=A;let h=this._commands.get(x);h||(h=new se.S,this._commands.set(x,h));let p=h.unshift(A),_=(0,ge.OF)(()=>{p();const C=this._commands.get(x);C!=null&&C.isEmpty()&&this._commands.delete(x)});return this._onDidRegisterCommand.fire(x),_}registerCommandAlias(A,E){return ee.registerCommand(A,(x,...h)=>x.get(fe).executeCommand(E,...h))}getCommand(A){const E=this._commands.get(A);if(!(!E||E.isEmpty()))return re.$.first(E)}getCommands(){const A=new Map;for(const E of this._commands.keys()){const x=this.getCommand(E);x&&A.set(E,x)}return A}};ee.registerCommand("noop",()=>{})},90689:function(Cn,tt,b){"use strict";b.d(tt,{Ao:function(){return fe},Eq:function(){return W},Fb:function(){return ee},K8:function(){return G},i6:function(){return pe},uy:function(){return de}});var P=b(23345),re=b(82983),ge=b(16925);let se=P.WE||"";const U=new Map;U.set("false",!1),U.set("true",!0),U.set("isMac",P.dz),U.set("isLinux",P.IJ),U.set("isWindows",P.ED),U.set("isWeb",P.$L),U.set("isMacNative",P.dz&&!P.$L),U.set("isEdge",se.indexOf("Edg/")>=0),U.set("isFirefox",se.indexOf("Firefox")>=0),U.set("isChrome",se.indexOf("Chrome")>=0),U.set("isSafari",se.indexOf("Safari")>=0);const f=Object.prototype.hasOwnProperty;class fe{static has(m){return h.create(m)}static equals(m,v){return p.create(m,v)}static regex(m,v){return q.create(m,v)}static not(m){return R.create(m)}static and(...m){return Y.create(m,null)}static or(...m){return ie.create(m,null,!0)}static deserialize(m,v=!1){if(m)return this._deserializeOrExpression(m,v)}static _deserializeOrExpression(m,v){let Q=m.split("||");return ie.create(Q.map(he=>this._deserializeAndExpression(he,v)),null,!0)}static _deserializeAndExpression(m,v){let Q=m.split("&&");return Y.create(Q.map(he=>this._deserializeOne(he,v)),null)}static _deserializeOne(m,v){if(m=m.trim(),m.indexOf("!=")>=0){let Q=m.split("!=");return F.create(Q[0].trim(),this._deserializeValue(Q[1],v))}if(m.indexOf("==")>=0){let Q=m.split("==");return p.create(Q[0].trim(),this._deserializeValue(Q[1],v))}if(m.indexOf("=~")>=0){let Q=m.split("=~");return q.create(Q[0].trim(),this._deserializeRegexValue(Q[1],v))}if(m.indexOf(" in ")>=0){let Q=m.split(" in ");return _.create(Q[0].trim(),Q[1].trim())}if(/^[^<=>]+>=[^<=>]+$/.test(m)){const Q=m.split(">=");return D.create(Q[0].trim(),Q[1].trim())}if(/^[^<=>]+>[^<=>]+$/.test(m)){const Q=m.split(">");return B.create(Q[0].trim(),Q[1].trim())}if(/^[^<=>]+<=[^<=>]+$/.test(m)){const Q=m.split("<=");return S.create(Q[0].trim(),Q[1].trim())}if(/^[^<=>]+<[^<=>]+$/.test(m)){const Q=m.split("<");return I.create(Q[0].trim(),Q[1].trim())}return/^\!\s*/.test(m)?R.create(m.substr(1).trim()):h.create(m)}static _deserializeValue(m,v){if(m=m.trim(),m==="true")return!0;if(m==="false")return!1;let Q=/^'([^']*)'$/.exec(m);return Q?Q[1].trim():m}static _deserializeRegexValue(m,v){if((0,re.m5)(m)){if(v)throw new Error("missing regexp-value for =~-expression");return console.warn("missing regexp-value for =~-expression"),null}let Q=m.indexOf("/"),he=m.lastIndexOf("/");if(Q===he||Q<0){if(v)throw new Error(`bad regexp-value '${m}', missing /-enclosure`);return console.warn(`bad regexp-value '${m}', missing /-enclosure`),null}let Ue=m.slice(Q+1,he),Oe=m[he+1]==="i"?"i":"";try{return new RegExp(Ue,Oe)}catch(ft){if(v)throw new Error(`bad regexp-value '${m}', parse error: ${ft}`);return console.warn(`bad regexp-value '${m}', parse error: ${ft}`),null}}}function ee(Z,m){const v=Z?Z.substituteConstants():void 0,Q=m?m.substituteConstants():void 0;return!v&&!Q?!0:!v||!Q?!1:v.equals(Q)}function A(Z,m){return Z.cmp(m)}class E{constructor(){this.type=0}cmp(m){return this.type-m.type}equals(m){return m.type===this.type}substituteConstants(){return this}evaluate(m){return!1}serialize(){return"false"}keys(){return[]}negate(){return x.INSTANCE}}E.INSTANCE=new E;class x{constructor(){this.type=1}cmp(m){return this.type-m.type}equals(m){return m.type===this.type}substituteConstants(){return this}evaluate(m){return!0}serialize(){return"true"}keys(){return[]}negate(){return E.INSTANCE}}x.INSTANCE=new x;class h{constructor(m,v){this.key=m,this.negated=v,this.type=2}static create(m,v=null){const Q=U.get(m);return typeof Q=="boolean"?Q?x.INSTANCE:E.INSTANCE:new h(m,v)}cmp(m){return m.type!==this.type?this.type-m.type:M(this.key,m.key)}equals(m){return m.type===this.type?this.key===m.key:!1}substituteConstants(){const m=U.get(this.key);return typeof m=="boolean"?m?x.INSTANCE:E.INSTANCE:this}evaluate(m){return!!m.getValue(this.key)}serialize(){return this.key}keys(){return[this.key]}negate(){return this.negated||(this.negated=R.create(this.key,this)),this.negated}}class p{constructor(m,v,Q){this.key=m,this.value=v,this.negated=Q,this.type=4}static create(m,v,Q=null){if(typeof v=="boolean")return v?h.create(m,Q):R.create(m,Q);const he=U.get(m);return typeof he=="boolean"?v===(he?"true":"false")?x.INSTANCE:E.INSTANCE:new p(m,v,Q)}cmp(m){return m.type!==this.type?this.type-m.type:X(this.key,this.value,m.key,m.value)}equals(m){return m.type===this.type?this.key===m.key&&this.value===m.value:!1}substituteConstants(){const m=U.get(this.key);if(typeof m=="boolean"){const v=m?"true":"false";return this.value===v?x.INSTANCE:E.INSTANCE}return this}evaluate(m){return m.getValue(this.key)==this.value}serialize(){return`${this.key} == '${this.value}'`}keys(){return[this.key]}negate(){return this.negated||(this.negated=F.create(this.key,this.value,this)),this.negated}}class _{constructor(m,v){this.key=m,this.valueKey=v,this.type=10,this.negated=null}static create(m,v){return new _(m,v)}cmp(m){return m.type!==this.type?this.type-m.type:X(this.key,this.valueKey,m.key,m.valueKey)}equals(m){return m.type===this.type?this.key===m.key&&this.valueKey===m.valueKey:!1}substituteConstants(){return this}evaluate(m){const v=m.getValue(this.valueKey),Q=m.getValue(this.key);return Array.isArray(v)?v.indexOf(Q)>=0:typeof Q=="string"&&typeof v=="object"&&v!==null?f.call(v,Q):!1}serialize(){return`${this.key} in '${this.valueKey}'`}keys(){return[this.key,this.valueKey]}negate(){return this.negated||(this.negated=C.create(this)),this.negated}}class C{constructor(m){this._actual=m,this.type=11}static create(m){return new C(m)}cmp(m){return m.type!==this.type?this.type-m.type:this._actual.cmp(m._actual)}equals(m){return m.type===this.type?this._actual.equals(m._actual):!1}substituteConstants(){return this}evaluate(m){return!this._actual.evaluate(m)}serialize(){throw new Error("Method not implemented.")}keys(){return this._actual.keys()}negate(){return this._actual}}class F{constructor(m,v,Q){this.key=m,this.value=v,this.negated=Q,this.type=5}static create(m,v,Q=null){if(typeof v=="boolean")return v?R.create(m,Q):h.create(m,Q);const he=U.get(m);return typeof he=="boolean"?v===(he?"true":"false")?E.INSTANCE:x.INSTANCE:new F(m,v,Q)}cmp(m){return m.type!==this.type?this.type-m.type:X(this.key,this.value,m.key,m.value)}equals(m){return m.type===this.type?this.key===m.key&&this.value===m.value:!1}substituteConstants(){const m=U.get(this.key);if(typeof m=="boolean"){const v=m?"true":"false";return this.value===v?E.INSTANCE:x.INSTANCE}return this}evaluate(m){return m.getValue(this.key)!=this.value}serialize(){return`${this.key} != '${this.value}'`}keys(){return[this.key]}negate(){return this.negated||(this.negated=p.create(this.key,this.value,this)),this.negated}}class R{constructor(m,v){this.key=m,this.negated=v,this.type=3}static create(m,v=null){const Q=U.get(m);return typeof Q=="boolean"?Q?E.INSTANCE:x.INSTANCE:new R(m,v)}cmp(m){return m.type!==this.type?this.type-m.type:M(this.key,m.key)}equals(m){return m.type===this.type?this.key===m.key:!1}substituteConstants(){const m=U.get(this.key);return typeof m=="boolean"?m?E.INSTANCE:x.INSTANCE:this}evaluate(m){return!m.getValue(this.key)}serialize(){return`!${this.key}`}keys(){return[this.key]}negate(){return this.negated||(this.negated=h.create(this.key,this)),this.negated}}function K(Z,m){if(typeof Z=="string"){const v=parseFloat(Z);isNaN(v)||(Z=v)}return typeof Z=="string"||typeof Z=="number"?m(Z):E.INSTANCE}class B{constructor(m,v,Q){this.key=m,this.value=v,this.negated=Q,this.type=12}static create(m,v,Q=null){return K(v,he=>new B(m,he,Q))}cmp(m){return m.type!==this.type?this.type-m.type:X(this.key,this.value,m.key,m.value)}equals(m){return m.type===this.type?this.key===m.key&&this.value===m.value:!1}substituteConstants(){return this}evaluate(m){return typeof this.value=="string"?!1:parseFloat(m.getValue(this.key))>this.value}serialize(){return`${this.key} > ${this.value}`}keys(){return[this.key]}negate(){return this.negated||(this.negated=S.create(this.key,this.value,this)),this.negated}}class D{constructor(m,v,Q){this.key=m,this.value=v,this.negated=Q,this.type=13}static create(m,v,Q=null){return K(v,he=>new D(m,he,Q))}cmp(m){return m.type!==this.type?this.type-m.type:X(this.key,this.value,m.key,m.value)}equals(m){return m.type===this.type?this.key===m.key&&this.value===m.value:!1}substituteConstants(){return this}evaluate(m){return typeof this.value=="string"?!1:parseFloat(m.getValue(this.key))>=this.value}serialize(){return`${this.key} >= ${this.value}`}keys(){return[this.key]}negate(){return this.negated||(this.negated=I.create(this.key,this.value,this)),this.negated}}class I{constructor(m,v,Q){this.key=m,this.value=v,this.negated=Q,this.type=14}static create(m,v,Q=null){return K(v,he=>new I(m,he,Q))}cmp(m){return m.type!==this.type?this.type-m.type:X(this.key,this.value,m.key,m.value)}equals(m){return m.type===this.type?this.key===m.key&&this.value===m.value:!1}substituteConstants(){return this}evaluate(m){return typeof this.value=="string"?!1:parseFloat(m.getValue(this.key))<this.value}serialize(){return`${this.key} < ${this.value}`}keys(){return[this.key]}negate(){return this.negated||(this.negated=D.create(this.key,this.value,this)),this.negated}}class S{constructor(m,v,Q){this.key=m,this.value=v,this.negated=Q,this.type=15}static create(m,v,Q=null){return K(v,he=>new S(m,he,Q))}cmp(m){return m.type!==this.type?this.type-m.type:X(this.key,this.value,m.key,m.value)}equals(m){return m.type===this.type?this.key===m.key&&this.value===m.value:!1}substituteConstants(){return this}evaluate(m){return typeof this.value=="string"?!1:parseFloat(m.getValue(this.key))<=this.value}serialize(){return`${this.key} <= ${this.value}`}keys(){return[this.key]}negate(){return this.negated||(this.negated=B.create(this.key,this.value,this)),this.negated}}class q{constructor(m,v){this.key=m,this.regexp=v,this.type=7,this.negated=null}static create(m,v){return new q(m,v)}cmp(m){if(m.type!==this.type)return this.type-m.type;if(this.key<m.key)return-1;if(this.key>m.key)return 1;const v=this.regexp?this.regexp.source:"",Q=m.regexp?m.regexp.source:"";return v<Q?-1:v>Q?1:0}equals(m){if(m.type===this.type){const v=this.regexp?this.regexp.source:"",Q=m.regexp?m.regexp.source:"";return this.key===m.key&&v===Q}return!1}substituteConstants(){return this}evaluate(m){let v=m.getValue(this.key);return this.regexp?this.regexp.test(v):!1}serialize(){const m=this.regexp?`/${this.regexp.source}/${this.regexp.ignoreCase?"i":""}`:"/invalid/";return`${this.key} =~ ${m}`}keys(){return[this.key]}negate(){return this.negated||(this.negated=ae.create(this)),this.negated}}class ae{constructor(m){this._actual=m,this.type=8}static create(m){return new ae(m)}cmp(m){return m.type!==this.type?this.type-m.type:this._actual.cmp(m._actual)}equals(m){return m.type===this.type?this._actual.equals(m._actual):!1}substituteConstants(){return this}evaluate(m){return!this._actual.evaluate(m)}serialize(){throw new Error("Method not implemented.")}keys(){return this._actual.keys()}negate(){return this._actual}}function j(Z){let m=null;for(let v=0,Q=Z.length;v<Q;v++){const he=Z[v].substituteConstants();if(Z[v]!==he&&m===null){m=[];for(let Ue=0;Ue<v;Ue++)m[Ue]=Z[Ue]}m!==null&&(m[v]=he)}return m===null?Z:m}class Y{constructor(m,v){this.expr=m,this.negated=v,this.type=6}static create(m,v){return Y._normalizeArr(m,v)}cmp(m){if(m.type!==this.type)return this.type-m.type;if(this.expr.length<m.expr.length)return-1;if(this.expr.length>m.expr.length)return 1;for(let v=0,Q=this.expr.length;v<Q;v++){const he=A(this.expr[v],m.expr[v]);if(he!==0)return he}return 0}equals(m){if(m.type===this.type){if(this.expr.length!==m.expr.length)return!1;for(let v=0,Q=this.expr.length;v<Q;v++)if(!this.expr[v].equals(m.expr[v]))return!1;return!0}return!1}substituteConstants(){const m=j(this.expr);return m===this.expr?this:Y.create(m,this.negated)}evaluate(m){for(let v=0,Q=this.expr.length;v<Q;v++)if(!this.expr[v].evaluate(m))return!1;return!0}static _normalizeArr(m,v){const Q=[];let he=!1;for(const Ue of m)if(Ue){if(Ue.type===1){he=!0;continue}if(Ue.type===0)return E.INSTANCE;if(Ue.type===6){Q.push(...Ue.expr);continue}Q.push(Ue)}if(Q.length===0&&he)return x.INSTANCE;if(Q.length!==0){if(Q.length===1)return Q[0];Q.sort(A);for(let Ue=1;Ue<Q.length;Ue++)Q[Ue-1].equals(Q[Ue])&&(Q.splice(Ue,1),Ue--);if(Q.length===1)return Q[0];for(;Q.length>1;){const Ue=Q[Q.length-1];if(Ue.type!==9)break;Q.pop();const Oe=Q.pop(),ft=Q.length===0,Et=ie.create(Ue.expr.map(Ft=>Y.create([Ft,Oe],null)),null,ft);Et&&(Q.push(Et),Q.sort(A))}return Q.length===1?Q[0]:new Y(Q,v)}}serialize(){return this.expr.map(m=>m.serialize()).join(" && ")}keys(){const m=[];for(let v of this.expr)m.push(...v.keys());return m}negate(){if(!this.negated){const m=[];for(let v of this.expr)m.push(v.negate());this.negated=ie.create(m,this,!0)}return this.negated}}class ie{constructor(m,v){this.expr=m,this.negated=v,this.type=9}static create(m,v,Q){return ie._normalizeArr(m,v,Q)}cmp(m){if(m.type!==this.type)return this.type-m.type;if(this.expr.length<m.expr.length)return-1;if(this.expr.length>m.expr.length)return 1;for(let v=0,Q=this.expr.length;v<Q;v++){const he=A(this.expr[v],m.expr[v]);if(he!==0)return he}return 0}equals(m){if(m.type===this.type){if(this.expr.length!==m.expr.length)return!1;for(let v=0,Q=this.expr.length;v<Q;v++)if(!this.expr[v].equals(m.expr[v]))return!1;return!0}return!1}substituteConstants(){const m=j(this.expr);return m===this.expr?this:ie.create(m,this.negated,!1)}evaluate(m){for(let v=0,Q=this.expr.length;v<Q;v++)if(this.expr[v].evaluate(m))return!0;return!1}static _normalizeArr(m,v,Q){let he=[],Ue=!1;if(m){for(let Oe=0,ft=m.length;Oe<ft;Oe++){const Et=m[Oe];if(Et){if(Et.type===0){Ue=!0;continue}if(Et.type===1)return x.INSTANCE;if(Et.type===9){he=he.concat(Et.expr);continue}he.push(Et)}}if(he.length===0&&Ue)return E.INSTANCE;he.sort(A)}if(he.length!==0){if(he.length===1)return he[0];for(let Oe=1;Oe<he.length;Oe++)he[Oe-1].equals(he[Oe])&&(he.splice(Oe,1),Oe--);if(he.length===1)return he[0];if(Q){for(let Oe=0;Oe<he.length;Oe++)for(let ft=Oe+1;ft<he.length;ft++)G(he[Oe],he[ft])&&(he.splice(ft,1),ft--);if(he.length===1)return he[0]}return new ie(he,v)}}serialize(){return this.expr.map(m=>m.serialize()).join(" || ")}keys(){const m=[];for(let v of this.expr)m.push(...v.keys());return m}negate(){if(!this.negated){let m=[];for(let v of this.expr)m.push(v.negate());for(;m.length>1;){const v=m.shift(),Q=m.shift(),he=[];for(const Oe of ne(v))for(const ft of ne(Q))he.push(Y.create([Oe,ft],null));const Ue=m.length===0;m.unshift(ie.create(he,null,Ue))}this.negated=m[0]}return this.negated}}class de extends h{constructor(m,v,Q){super(m,null),this._defaultValue=v,typeof Q=="object"?de._info.push(Object.assign(Object.assign({},Q),{key:m})):Q!==!0&&de._info.push({key:m,description:Q,type:v!=null?typeof v:void 0})}static all(){return de._info.values()}bindTo(m){return m.createKey(this.key,this._defaultValue)}getValue(m){return m.getContextKeyValue(this.key)}toNegated(){return this.negate()}isEqualTo(m){return p.create(this.key,m)}}de._info=[];const pe=(0,ge.yh)("contextKeyService"),W="setContext";function M(Z,m){return Z<m?-1:Z>m?1:0}function X(Z,m,v,Q){return Z<v?-1:Z>v?1:m<Q?-1:m>Q?1:0}function G(Z,m){if(m.type===6&&Z.type!==9&&Z.type!==6){for(const he of m.expr)if(Z.equals(he))return!0}const v=Z.negate(),Q=ne(v).concat(ne(m));Q.sort(A);for(let he=0;he<Q.length;he++){const Oe=Q[he].negate();for(let ft=he+1;ft<Q.length;ft++){const Et=Q[ft];if(Oe.equals(Et))return!0}}return!1}function ne(Z){return Z.type===9?Z.expr:[Z]}},16925:function(Cn,tt,b){"use strict";b.d(tt,{I8:function(){return P},TG:function(){return re},jt:function(){return U},yh:function(){return se}});var P;(function(f){f.serviceIds=new Map,f.DI_TARGET="$di$target",f.DI_DEPENDENCIES="$di$dependencies";function fe(ee){return ee[f.DI_DEPENDENCIES]||[]}f.getServiceDependencies=fe})(P||(P={}));const re=se("instantiationService");function ge(f,fe,ee,A){fe[P.DI_TARGET]===fe?fe[P.DI_DEPENDENCIES].push({id:f,index:ee,optional:A}):(fe[P.DI_DEPENDENCIES]=[{id:f,index:ee,optional:A}],fe[P.DI_TARGET]=fe)}function se(f){if(P.serviceIds.has(f))return P.serviceIds.get(f);const fe=function(ee,A,E){if(arguments.length!==3)throw new Error("@IServiceName-decorator can only be used to decorate a parameter");ge(fe,ee,E,!1)};return fe.toString=()=>f,P.serviceIds.set(f,fe),fe}function U(f){return function(fe,ee,A){if(arguments.length!==3)throw new Error("@optional-decorator can only be used to decorate a parameter");ge(f,fe,A,!0)}}},44650:function(Cn,tt,b){"use strict";b.d(tt,{B:function(){return se}});var P=b(76068),re=b(72999);class ge{constructor(){this.data=new Map}add(f,fe){P.ok(re.HD(f)),P.ok(re.Kn(fe)),P.ok(!this.data.has(f),"There is already an extension with this id"),this.data.set(f,fe)}as(f){return this.data.get(f)||null}}const se=new ge},66213:function(Cn,tt,b){"use strict";b.d(tt,{e:function(){return P}});var P;(function(re){re.DARK="dark",re.LIGHT="light",re.HIGH_CONTRAST="hc"})(P||(P={}))},49055:function(Cn,tt,b){"use strict";b.d(tt,{EN:function(){return A},IP:function(){return h},Ic:function(){return C},XE:function(){return fe},bB:function(){return F},kS:function(){return E},m6:function(){return x}});var P=b(52615),re=b(4348),ge=b(69323),se=b(16925),U=b(44650),f=b(66213);const fe=(0,se.yh)("themeService");var ee;(function(R){function K(B){return B&&typeof B=="object"&&typeof B.id=="string"}R.isThemeColor=K})(ee||(ee={}));function A(R){return{id:R}}var E;(function(R){function K(ae){return ae&&typeof ae=="object"&&typeof ae.id=="string"&&(typeof ae.color=="undefined"||ee.isThemeColor(ae.color))}R.isThemeIcon=K;const B=new RegExp(`^\\$\\((${P.dT.iconNameExpression}(?:${P.dT.iconModifierExpression})?)\\)$`);function D(ae){const j=B.exec(ae);if(!j)return;let[,Y]=j;return{id:Y}}R.fromString=D;function I(ae,j){let Y=ae.id;const ie=Y.lastIndexOf("~");return ie!==-1&&(Y=Y.substring(0,ie)),j&&(Y=`${Y}~${j}`),{id:Y}}R.modify=I;function S(ae,j){var Y,ie;return ae.id===j.id&&((Y=ae.color)===null||Y===void 0?void 0:Y.id)===((ie=j.color)===null||ie===void 0?void 0:ie.id)}R.isEqual=S;function q(ae,j){return{id:ae.id,color:j?A(j):void 0}}R.asThemeIcon=q,R.asClassNameArray=P.dT.asClassNameArray,R.asClassName=P.dT.asClassName,R.asCSSSelector=P.dT.asCSSSelector})(E||(E={}));function x(R){switch(R){case f.e.DARK:return"vs-dark";case f.e.HIGH_CONTRAST:return"hc-black";default:return"vs"}}const h={ThemingContribution:"base.contributions.theming"};class p{constructor(){this.themingParticipants=[],this.themingParticipants=[],this.onThemingParticipantAddedEmitter=new re.Q5}onColorThemeChange(K){return this.themingParticipants.push(K),this.onThemingParticipantAddedEmitter.fire(K),(0,ge.OF)(()=>{const B=this.themingParticipants.indexOf(K);this.themingParticipants.splice(B,1)})}getThemingParticipants(){return this.themingParticipants}}let _=new p;U.B.add(h.ThemingContribution,_);function C(R){return _.onColorThemeChange(R)}class F extends ge.JT{constructor(K){super(),this.themeService=K,this.theme=K.getColorTheme(),this._register(this.themeService.onDidColorThemeChange(B=>this.onThemeChange(B)))}onThemeChange(K){this.theme=K,this.updateStyles()}updateStyles(){}}},16632:function(Cn,tt,b){"use strict";var P=b(67711),re=b(98506),ge=b(52873),se=b(16886),U=b(33346),f=b(92310),fe=b.n(f),ee=b(18929),A=b(59301),E=["prefixCls","className","style","checked","disabled","defaultChecked","type","title","onChange"],x=(0,A.forwardRef)(function(h,p){var _=h.prefixCls,C=_===void 0?"rc-checkbox":_,F=h.className,R=h.style,K=h.checked,B=h.disabled,D=h.defaultChecked,I=D===void 0?!1:D,S=h.type,q=S===void 0?"checkbox":S,ae=h.title,j=h.onChange,Y=(0,U.Z)(h,E),ie=(0,A.useRef)(null),de=(0,A.useRef)(null),pe=(0,ee.Z)(I,{value:K}),W=(0,se.Z)(pe,2),M=W[0],X=W[1];(0,A.useImperativeHandle)(p,function(){return{focus:function(m){var v;(v=ie.current)===null||v===void 0||v.focus(m)},blur:function(){var m;(m=ie.current)===null||m===void 0||m.blur()},input:ie.current,nativeElement:de.current}});var G=fe()(C,F,(0,ge.Z)((0,ge.Z)({},"".concat(C,"-checked"),M),"".concat(C,"-disabled"),B)),ne=function(m){B||("checked"in h||X(m.target.checked),j==null||j({target:(0,re.Z)((0,re.Z)({},h),{},{type:q,checked:m.target.checked}),stopPropagation:function(){m.stopPropagation()},preventDefault:function(){m.preventDefault()},nativeEvent:m.nativeEvent}))};return A.createElement("span",{className:G,title:ae,style:R,ref:de},A.createElement("input",(0,P.Z)({},Y,{className:"".concat(C,"-input"),ref:ie,onChange:ne,disabled:B,checked:!!M,type:q})),A.createElement("span",{className:"".concat(C,"-inner")}))});tt.Z=x},96478:function(Cn,tt,b){"use strict";b.d(tt,{Z:function(){return ae}});var P=b(67711),re=b(52873),ge=b(16886),se=b(33346),U=b(65030),f=b(92310),fe=b.n(f),ee=b(8654),A=b(59301),E=b(10228),x=b(16089),h=E.Z.ESC,p=E.Z.TAB;function _(j){var Y=j.visible,ie=j.triggerRef,de=j.onVisibleChange,pe=j.autoFocus,W=j.overlayRef,M=A.useRef(!1),X=function(){if(Y){var m,v;(m=ie.current)===null||m===void 0||(v=m.focus)===null||v===void 0||v.call(m),de==null||de(!1)}},G=function(){var m;return(m=W.current)!==null&&m!==void 0&&m.focus?(W.current.focus(),M.current=!0,!0):!1},ne=function(m){switch(m.keyCode){case h:X();break;case p:{var v=!1;M.current||(v=G()),v?m.preventDefault():X();break}}};A.useEffect(function(){return Y?(window.addEventListener("keydown",ne),pe&&(0,x.Z)(G,3),function(){window.removeEventListener("keydown",ne),M.current=!1}):function(){M.current=!1}},[Y])}var C=(0,A.forwardRef)(function(j,Y){var ie=j.overlay,de=j.arrow,pe=j.prefixCls,W=(0,A.useMemo)(function(){var X;return typeof ie=="function"?X=ie():X=ie,X},[ie]),M=(0,ee.sQ)(Y,(0,ee.C4)(W));return A.createElement(A.Fragment,null,de&&A.createElement("div",{className:"".concat(pe,"-arrow")}),A.cloneElement(W,{ref:(0,ee.Yr)(W)?M:void 0}))}),F=C,R={adjustX:1,adjustY:1},K=[0,0],B={topLeft:{points:["bl","tl"],overflow:R,offset:[0,-4],targetOffset:K},top:{points:["bc","tc"],overflow:R,offset:[0,-4],targetOffset:K},topRight:{points:["br","tr"],overflow:R,offset:[0,-4],targetOffset:K},bottomLeft:{points:["tl","bl"],overflow:R,offset:[0,4],targetOffset:K},bottom:{points:["tc","bc"],overflow:R,offset:[0,4],targetOffset:K},bottomRight:{points:["tr","br"],overflow:R,offset:[0,4],targetOffset:K}},D=B,I=["arrow","prefixCls","transitionName","animation","align","placement","placements","getPopupContainer","showAction","hideAction","overlayClassName","overlayStyle","visible","trigger","autoFocus","overlay","children","onVisibleChange"];function S(j,Y){var ie,de=j.arrow,pe=de===void 0?!1:de,W=j.prefixCls,M=W===void 0?"rc-dropdown":W,X=j.transitionName,G=j.animation,ne=j.align,Z=j.placement,m=Z===void 0?"bottomLeft":Z,v=j.placements,Q=v===void 0?D:v,he=j.getPopupContainer,Ue=j.showAction,Oe=j.hideAction,ft=j.overlayClassName,Et=j.overlayStyle,Ft=j.visible,Ut=j.trigger,Se=Ut===void 0?["hover"]:Ut,Gt=j.autoFocus,ht=j.overlay,tn=j.children,dt=j.onVisibleChange,Je=(0,se.Z)(j,I),xe=A.useState(),_e=(0,ge.Z)(xe,2),N=_e[0],Fe=_e[1],De="visible"in j?Ft:N,V=A.useRef(null),T=A.useRef(null),J=A.useRef(null);A.useImperativeHandle(Y,function(){return V.current});var ve=function(je){Fe(je),dt==null||dt(je)};_({visible:De,triggerRef:J,onVisibleChange:ve,autoFocus:Gt,overlayRef:T});var te=function(je){var qe=j.onOverlayClick;Fe(!1),qe&&qe(je)},$=function(){return A.createElement(F,{ref:T,overlay:ht,prefixCls:M,arrow:pe})},ue=function(){return typeof ht=="function"?$:$()},Ie=function(){var je=j.minOverlayWidthMatchTrigger,qe=j.alignPoint;return"minOverlayWidthMatchTrigger"in j?je:!qe},Ce=function(){var je=j.openClassName;return je!==void 0?je:"".concat(M,"-open")},ke=A.cloneElement(tn,{className:fe()((ie=tn.props)===null||ie===void 0?void 0:ie.className,De&&Ce()),ref:(0,ee.Yr)(tn)?(0,ee.sQ)(J,(0,ee.C4)(tn)):void 0}),Le=Oe;return!Le&&Se.indexOf("contextMenu")!==-1&&(Le=["click"]),A.createElement(U.Z,(0,P.Z)({builtinPlacements:Q},Je,{prefixCls:M,ref:V,popupClassName:fe()(ft,(0,re.Z)({},"".concat(M,"-show-arrow"),pe)),popupStyle:Et,action:Se,showAction:Ue,hideAction:Le,popupPlacement:m,popupAlign:ne,popupTransitionName:X,popupAnimation:G,popupVisible:De,stretch:Ie()?"minWidth":"",popup:ue(),onPopupVisibleChange:ve,onPopupClick:te,getPopupContainer:he}),ke)}var q=A.forwardRef(S),ae=q},66003:function(Cn,tt,b){"use strict";b.d(tt,{Z:function(){return fe}});var P=b(33346),re=b(98506),ge=b(26420),se=b(59301),U=["show"];function f(ee,A){if(!A.max)return!0;var E=A.strategy(ee);return E<=A.max}function fe(ee,A){return se.useMemo(function(){var E={};A&&(E.show=(0,ge.Z)(A)==="object"&&A.formatter?A.formatter:!!A),E=(0,re.Z)((0,re.Z)({},E),ee);var x=E,h=x.show,p=(0,P.Z)(x,U);return(0,re.Z)((0,re.Z)({},p),{},{show:!!h,showFormatter:typeof h=="function"?h:void 0,strategy:p.strategy||function(_){return _.length}})},[ee,A])}},36901:function(Cn,tt,b){"use strict";b.r(tt),b.d(tt,{BaseInput:function(){return E},default:function(){return D}});var P=b(98506),re=b(67711),ge=b(52873),se=b(26420),U=b(92310),f=b.n(U),fe=b(59301),ee=b(30292),A=fe.forwardRef(function(I,S){var q,ae,j,Y=I.inputElement,ie=I.children,de=I.prefixCls,pe=I.prefix,W=I.suffix,M=I.addonBefore,X=I.addonAfter,G=I.className,ne=I.style,Z=I.disabled,m=I.readOnly,v=I.focused,Q=I.triggerFocus,he=I.allowClear,Ue=I.value,Oe=I.handleReset,ft=I.hidden,Et=I.classes,Ft=I.classNames,Ut=I.dataAttrs,Se=I.styles,Gt=I.components,ht=I.onClear,tn=ie!=null?ie:Y,dt=(Gt==null?void 0:Gt.affixWrapper)||"span",Je=(Gt==null?void 0:Gt.groupWrapper)||"span",xe=(Gt==null?void 0:Gt.wrapper)||"span",_e=(Gt==null?void 0:Gt.groupAddon)||"span",N=(0,fe.useRef)(null),Fe=function(Nt){var It;(It=N.current)!==null&&It!==void 0&&It.contains(Nt.target)&&(Q==null||Q())},De=(0,ee.X3)(I),V=(0,fe.cloneElement)(tn,{value:Ue,className:f()((q=tn.props)===null||q===void 0?void 0:q.className,!De&&(Ft==null?void 0:Ft.variant))||null}),T=(0,fe.useRef)(null);if(fe.useImperativeHandle(S,function(){return{nativeElement:T.current||N.current}}),De){var J=null;if(he){var ve=!Z&&!m&&Ue,te="".concat(de,"-clear-icon"),$=(0,se.Z)(he)==="object"&&he!==null&&he!==void 0&&he.clearIcon?he.clearIcon:"\u2716";J=fe.createElement("button",{type:"button",tabIndex:-1,onClick:function(Nt){Oe==null||Oe(Nt),ht==null||ht()},onMouseDown:function(Nt){return Nt.preventDefault()},className:f()(te,(0,ge.Z)((0,ge.Z)({},"".concat(te,"-hidden"),!ve),"".concat(te,"-has-suffix"),!!W))},$)}var ue="".concat(de,"-affix-wrapper"),Ie=f()(ue,(0,ge.Z)((0,ge.Z)((0,ge.Z)((0,ge.Z)((0,ge.Z)({},"".concat(de,"-disabled"),Z),"".concat(ue,"-disabled"),Z),"".concat(ue,"-focused"),v),"".concat(ue,"-readonly"),m),"".concat(ue,"-input-with-clear-btn"),W&&he&&Ue),Et==null?void 0:Et.affixWrapper,Ft==null?void 0:Ft.affixWrapper,Ft==null?void 0:Ft.variant),Ce=(W||he)&&fe.createElement("span",{className:f()("".concat(de,"-suffix"),Ft==null?void 0:Ft.suffix),style:Se==null?void 0:Se.suffix},J,W);V=fe.createElement(dt,(0,re.Z)({className:Ie,style:Se==null?void 0:Se.affixWrapper,onClick:Fe},Ut==null?void 0:Ut.affixWrapper,{ref:N}),pe&&fe.createElement("span",{className:f()("".concat(de,"-prefix"),Ft==null?void 0:Ft.prefix),style:Se==null?void 0:Se.prefix},pe),V,Ce)}if((0,ee.He)(I)){var ke="".concat(de,"-group"),Le="".concat(ke,"-addon"),mt="".concat(ke,"-wrapper"),je=f()("".concat(de,"-wrapper"),ke,Et==null?void 0:Et.wrapper,Ft==null?void 0:Ft.wrapper),qe=f()(mt,(0,ge.Z)({},"".concat(mt,"-disabled"),Z),Et==null?void 0:Et.group,Ft==null?void 0:Ft.groupWrapper);V=fe.createElement(Je,{className:qe,ref:T},fe.createElement(xe,{className:je},M&&fe.createElement(_e,{className:Le},M),V,X&&fe.createElement(_e,{className:Le},X)))}return fe.cloneElement(V,{className:f()((ae=V.props)===null||ae===void 0?void 0:ae.className,G)||null,style:(0,P.Z)((0,P.Z)({},(j=V.props)===null||j===void 0?void 0:j.style),ne),hidden:ft})}),E=A,x=b(15142),h=b(16886),p=b(33346),_=b(18929),C=b(2738),F=b(66003),R=["autoComplete","onChange","onFocus","onBlur","onPressEnter","onKeyDown","onKeyUp","prefixCls","disabled","htmlSize","className","maxLength","suffix","showCount","count","type","classes","classNames","styles","onCompositionStart","onCompositionEnd"],K=(0,fe.forwardRef)(function(I,S){var q=I.autoComplete,ae=I.onChange,j=I.onFocus,Y=I.onBlur,ie=I.onPressEnter,de=I.onKeyDown,pe=I.onKeyUp,W=I.prefixCls,M=W===void 0?"rc-input":W,X=I.disabled,G=I.htmlSize,ne=I.className,Z=I.maxLength,m=I.suffix,v=I.showCount,Q=I.count,he=I.type,Ue=he===void 0?"text":he,Oe=I.classes,ft=I.classNames,Et=I.styles,Ft=I.onCompositionStart,Ut=I.onCompositionEnd,Se=(0,p.Z)(I,R),Gt=(0,fe.useState)(!1),ht=(0,h.Z)(Gt,2),tn=ht[0],dt=ht[1],Je=(0,fe.useRef)(!1),xe=(0,fe.useRef)(!1),_e=(0,fe.useRef)(null),N=(0,fe.useRef)(null),Fe=function(hn){_e.current&&(0,ee.nH)(_e.current,hn)},De=(0,_.Z)(I.defaultValue,{value:I.value}),V=(0,h.Z)(De,2),T=V[0],J=V[1],ve=T==null?"":String(T),te=(0,fe.useState)(null),$=(0,h.Z)(te,2),ue=$[0],Ie=$[1],Ce=(0,F.Z)(Q,v),ke=Ce.max||Z,Le=Ce.strategy(ve),mt=!!ke&&Le>ke;(0,fe.useImperativeHandle)(S,function(){var Mt;return{focus:Fe,blur:function(){var We;(We=_e.current)===null||We===void 0||We.blur()},setSelectionRange:function(We,Qe,He){var z;(z=_e.current)===null||z===void 0||z.setSelectionRange(We,Qe,He)},select:function(){var We;(We=_e.current)===null||We===void 0||We.select()},input:_e.current,nativeElement:((Mt=N.current)===null||Mt===void 0?void 0:Mt.nativeElement)||_e.current}}),(0,fe.useEffect)(function(){xe.current&&(xe.current=!1),dt(function(Mt){return Mt&&X?!1:Mt})},[X]);var je=function(hn,We,Qe){var He=We;if(!Je.current&&Ce.exceedFormatter&&Ce.max&&Ce.strategy(We)>Ce.max){if(He=Ce.exceedFormatter(We,{max:Ce.max}),We!==He){var z,le;Ie([((z=_e.current)===null||z===void 0?void 0:z.selectionStart)||0,((le=_e.current)===null||le===void 0?void 0:le.selectionEnd)||0])}}else if(Qe.source==="compositionEnd")return;J(He),_e.current&&(0,ee.rJ)(_e.current,hn,ae,He)};(0,fe.useEffect)(function(){if(ue){var Mt;(Mt=_e.current)===null||Mt===void 0||Mt.setSelectionRange.apply(Mt,(0,x.Z)(ue))}},[ue]);var qe=function(hn){je(hn,hn.target.value,{source:"change"})},ut=function(hn){Je.current=!1,je(hn,hn.currentTarget.value,{source:"compositionEnd"}),Ut==null||Ut(hn)},Nt=function(hn){ie&&hn.key==="Enter"&&!xe.current&&(xe.current=!0,ie(hn)),de==null||de(hn)},It=function(hn){hn.key==="Enter"&&(xe.current=!1),pe==null||pe(hn)},bt=function(hn){dt(!0),j==null||j(hn)},on=function(hn){xe.current&&(xe.current=!1),dt(!1),Y==null||Y(hn)},rn=function(hn){J(""),Fe(),_e.current&&(0,ee.rJ)(_e.current,hn,ae)},Ct=mt&&"".concat(M,"-out-of-range"),gn=function(){var hn=(0,C.Z)(I,["prefixCls","onPressEnter","addonBefore","addonAfter","prefix","suffix","allowClear","defaultValue","showCount","count","classes","htmlSize","styles","classNames","onClear"]);return fe.createElement("input",(0,re.Z)({autoComplete:q},hn,{onChange:qe,onFocus:bt,onBlur:on,onKeyDown:Nt,onKeyUp:It,className:f()(M,(0,ge.Z)({},"".concat(M,"-disabled"),X),ft==null?void 0:ft.input),style:Et==null?void 0:Et.input,ref:_e,size:G,type:Ue,onCompositionStart:function(Qe){Je.current=!0,Ft==null||Ft(Qe)},onCompositionEnd:ut}))},Ln=function(){var hn=Number(ke)>0;if(m||Ce.show){var We=Ce.showFormatter?Ce.showFormatter({value:ve,count:Le,maxLength:ke}):"".concat(Le).concat(hn?" / ".concat(ke):"");return fe.createElement(fe.Fragment,null,Ce.show&&fe.createElement("span",{className:f()("".concat(M,"-show-count-suffix"),(0,ge.Z)({},"".concat(M,"-show-count-has-suffix"),!!m),ft==null?void 0:ft.count),style:(0,P.Z)({},Et==null?void 0:Et.count)},We),m)}return null};return fe.createElement(E,(0,re.Z)({},Se,{prefixCls:M,className:f()(ne,Ct),handleReset:rn,value:ve,focused:tn,triggerFocus:Fe,suffix:Ln(),disabled:X,classes:Oe,classNames:ft,styles:Et}),gn())}),B=K,D=B},30292:function(Cn,tt,b){"use strict";b.d(tt,{He:function(){return P},X3:function(){return re},nH:function(){return U},rJ:function(){return se}});function P(f){return!!(f.addonBefore||f.addonAfter)}function re(f){return!!(f.prefix||f.suffix||f.allowClear)}function ge(f,fe,ee){var A=fe.cloneNode(!0),E=Object.create(f,{target:{value:A},currentTarget:{value:A}});return A.value=ee,typeof fe.selectionStart=="number"&&typeof fe.selectionEnd=="number"&&(A.selectionStart=fe.selectionStart,A.selectionEnd=fe.selectionEnd),A.setSelectionRange=function(){fe.setSelectionRange.apply(fe,arguments)},E}function se(f,fe,ee,A){if(ee){var E=fe;if(fe.type==="click"){E=ge(fe,f,""),ee(E);return}if(f.type!=="file"&&A!==void 0){E=ge(fe,f,A),ee(E);return}ee(E)}}function U(f,fe){if(f){f.focus(fe);var ee=fe||{},A=ee.cursor;if(A){var E=f.value.length;switch(A){case"start":f.setSelectionRange(0,0);break;case"end":f.setSelectionRange(E,E);break;default:f.setSelectionRange(0,E)}}}}},28321:function(Cn,tt,b){"use strict";b.d(tt,{iz:function(){return Ke},ck:function(){return He},BW:function(){return qt},sN:function(){return He},Wd:function(){return Yn},ZP:function(){return Pt},Xl:function(){return ie}});var P=b(67711),re=b(52873),ge=b(98506),se=b(15142),U=b(16886),f=b(33346),fe=b(92310),ee=b.n(fe),A=b(11780),E=b(18929),x=b(13697),h=b(48736),p=b(59301),_=b(4676),C=p.createContext(null);function F(Re,Ye){return Re===void 0?null:"".concat(Re,"-").concat(Ye)}function R(Re){var Ye=p.useContext(C);return F(Ye,Re)}var K=b(80547),B=["children","locked"],D=p.createContext(null);function I(Re,Ye){var vt=(0,ge.Z)({},Re);return Object.keys(Ye).forEach(function(xt){var Vt=Ye[xt];Vt!==void 0&&(vt[xt]=Vt)}),vt}function S(Re){var Ye=Re.children,vt=Re.locked,xt=(0,f.Z)(Re,B),Vt=p.useContext(D),Jt=(0,K.Z)(function(){return I(Vt,xt)},[Vt,xt],function(Zt,vn){return!vt&&(Zt[0]!==vn[0]||!(0,x.Z)(Zt[1],vn[1],!0))});return p.createElement(D.Provider,{value:Jt},Ye)}var q=[],ae=p.createContext(null);function j(){return p.useContext(ae)}var Y=p.createContext(q);function ie(Re){var Ye=p.useContext(Y);return p.useMemo(function(){return Re!==void 0?[].concat((0,se.Z)(Ye),[Re]):Ye},[Ye,Re])}var de=p.createContext(null),pe=p.createContext({}),W=pe,M=b(29194);function X(Re){var Ye=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;if((0,M.Z)(Re)){var vt=Re.nodeName.toLowerCase(),xt=["input","select","textarea","button"].includes(vt)||Re.isContentEditable||vt==="a"&&!!Re.getAttribute("href"),Vt=Re.getAttribute("tabindex"),Jt=Number(Vt),Zt=null;return Vt&&!Number.isNaN(Jt)?Zt=Jt:xt&&Zt===null&&(Zt=0),xt&&Re.disabled&&(Zt=null),Zt!==null&&(Zt>=0||Ye&&Zt<0)}return!1}function G(Re){var Ye=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,vt=(0,se.Z)(Re.querySelectorAll("*")).filter(function(xt){return X(xt,Ye)});return X(Re,Ye)&&vt.unshift(Re),vt}var ne=null;function Z(){ne=document.activeElement}function m(){ne=null}function v(){if(ne)try{ne.focus()}catch(Re){}}function Q(Re,Ye){if(Ye.keyCode===9){var vt=G(Re),xt=vt[Ye.shiftKey?0:vt.length-1],Vt=xt===document.activeElement||Re===document.activeElement;if(Vt){var Jt=vt[Ye.shiftKey?vt.length-1:0];Jt.focus(),Ye.preventDefault()}}}var he=b(10228),Ue=b(16089),Oe=he.Z.LEFT,ft=he.Z.RIGHT,Et=he.Z.UP,Ft=he.Z.DOWN,Ut=he.Z.ENTER,Se=he.Z.ESC,Gt=he.Z.HOME,ht=he.Z.END,tn=[Et,Ft,Oe,ft];function dt(Re,Ye,vt,xt){var Vt,Jt="prev",Zt="next",vn="children",Bn="parent";if(Re==="inline"&&xt===Ut)return{inlineTrigger:!0};var Dn=(0,re.Z)((0,re.Z)({},Et,Jt),Ft,Zt),st=(0,re.Z)((0,re.Z)((0,re.Z)((0,re.Z)({},Oe,vt?Zt:Jt),ft,vt?Jt:Zt),Ft,vn),Ut,vn),En=(0,re.Z)((0,re.Z)((0,re.Z)((0,re.Z)((0,re.Z)((0,re.Z)({},Et,Jt),Ft,Zt),Ut,vn),Se,Bn),Oe,vt?vn:Bn),ft,vt?Bn:vn),mn={inline:Dn,horizontal:st,vertical:En,inlineSub:Dn,horizontalSub:En,verticalSub:En},L=(Vt=mn["".concat(Re).concat(Ye?"":"Sub")])===null||Vt===void 0?void 0:Vt[xt];switch(L){case Jt:return{offset:-1,sibling:!0};case Zt:return{offset:1,sibling:!0};case Bn:return{offset:-1,sibling:!1};case vn:return{offset:1,sibling:!1};default:return null}}function Je(Re){for(var Ye=Re;Ye;){if(Ye.getAttribute("data-menu-list"))return Ye;Ye=Ye.parentElement}return null}function xe(Re,Ye){for(var vt=Re||document.activeElement;vt;){if(Ye.has(vt))return vt;vt=vt.parentElement}return null}function _e(Re,Ye){var vt=G(Re,!0);return vt.filter(function(xt){return Ye.has(xt)})}function N(Re,Ye,vt){var xt=arguments.length>3&&arguments[3]!==void 0?arguments[3]:1;if(!Re)return null;var Vt=_e(Re,Ye),Jt=Vt.length,Zt=Vt.findIndex(function(vn){return vt===vn});return xt<0?Zt===-1?Zt=Jt-1:Zt-=1:xt>0&&(Zt+=1),Zt=(Zt+Jt)%Jt,Vt[Zt]}var Fe=function(Ye,vt){var xt=new Set,Vt=new Map,Jt=new Map;return Ye.forEach(function(Zt){var vn=document.querySelector("[data-menu-id='".concat(F(vt,Zt),"']"));vn&&(xt.add(vn),Jt.set(vn,Zt),Vt.set(Zt,vn))}),{elements:xt,key2element:Vt,element2key:Jt}};function De(Re,Ye,vt,xt,Vt,Jt,Zt,vn,Bn,Dn){var st=p.useRef(),En=p.useRef();En.current=Ye;var mn=function(){Ue.Z.cancel(st.current)};return p.useEffect(function(){return function(){mn()}},[]),function(L){var k=L.which;if([].concat(tn,[Ut,Se,Gt,ht]).includes(k)){var ce=Jt(),ye=Fe(ce,xt),Ge=ye,$e=Ge.elements,gt=Ge.key2element,Bt=Ge.element2key,Ht=gt.get(Ye),kt=xe(Ht,$e),St=Bt.get(kt),$t=dt(Re,Zt(St,!0).length===1,vt,k);if(!$t&&k!==Gt&&k!==ht)return;(tn.includes(k)||[Gt,ht].includes(k))&&L.preventDefault();var oe=function(it){if(it){var Ne=it,Xe=it.querySelector("a");Xe!=null&&Xe.getAttribute("href")&&(Ne=Xe);var nt=Bt.get(it);vn(nt),mn(),st.current=(0,Ue.Z)(function(){En.current===nt&&Ne.focus()})}};if([Gt,ht].includes(k)||$t.sibling||!kt){var Ve;!kt||Re==="inline"?Ve=Vt.current:Ve=Je(kt);var Te,Me=_e(Ve,$e);k===Gt?Te=Me[0]:k===ht?Te=Me[Me.length-1]:Te=N(Ve,$e,kt,$t.offset),oe(Te)}else if($t.inlineTrigger)Bn(St);else if($t.offset>0)Bn(St,!0),mn(),st.current=(0,Ue.Z)(function(){ye=Fe(ce,xt);var yt=kt.getAttribute("aria-controls"),it=document.getElementById(yt),Ne=N(it,ye.elements);oe(Ne)},5);else if($t.offset<0){var ze=Zt(St,!0),at=ze[ze.length-2],Dt=gt.get(at);Bn(at,!1),oe(Dt)}}Dn==null||Dn(L)}}function V(Re){Promise.resolve().then(Re)}var T="__RC_UTIL_PATH_SPLIT__",J=function(Ye){return Ye.join(T)},ve=function(Ye){return Ye.split(T)},te="rc-menu-more";function $(){var Re=p.useState({}),Ye=(0,U.Z)(Re,2),vt=Ye[1],xt=(0,p.useRef)(new Map),Vt=(0,p.useRef)(new Map),Jt=p.useState([]),Zt=(0,U.Z)(Jt,2),vn=Zt[0],Bn=Zt[1],Dn=(0,p.useRef)(0),st=(0,p.useRef)(!1),En=function(){st.current||vt({})},mn=(0,p.useCallback)(function(gt,Bt){var Ht=J(Bt);Vt.current.set(Ht,gt),xt.current.set(gt,Ht),Dn.current+=1;var kt=Dn.current;V(function(){kt===Dn.current&&En()})},[]),L=(0,p.useCallback)(function(gt,Bt){var Ht=J(Bt);Vt.current.delete(Ht),xt.current.delete(gt)},[]),k=(0,p.useCallback)(function(gt){Bn(gt)},[]),ce=(0,p.useCallback)(function(gt,Bt){var Ht=xt.current.get(gt)||"",kt=ve(Ht);return Bt&&vn.includes(kt[0])&&kt.unshift(te),kt},[vn]),ye=(0,p.useCallback)(function(gt,Bt){return gt.filter(function(Ht){return Ht!==void 0}).some(function(Ht){var kt=ce(Ht,!0);return kt.includes(Bt)})},[ce]),Ge=function(){var Bt=(0,se.Z)(xt.current.keys());return vn.length&&Bt.push(te),Bt},$e=(0,p.useCallback)(function(gt){var Bt="".concat(xt.current.get(gt)).concat(T),Ht=new Set;return(0,se.Z)(Vt.current.keys()).forEach(function(kt){kt.startsWith(Bt)&&Ht.add(Vt.current.get(kt))}),Ht},[]);return p.useEffect(function(){return function(){st.current=!0}},[]),{registerPath:mn,unregisterPath:L,refreshOverflowKeys:k,isSubPathKey:ye,getKeyPath:ce,getKeys:Ge,getSubPathKeys:$e}}function ue(Re){var Ye=p.useRef(Re);Ye.current=Re;var vt=p.useCallback(function(){for(var xt,Vt=arguments.length,Jt=new Array(Vt),Zt=0;Zt<Vt;Zt++)Jt[Zt]=arguments[Zt];return(xt=Ye.current)===null||xt===void 0?void 0:xt.call.apply(xt,[Ye].concat(Jt))},[]);return Re?vt:void 0}var Ie=Math.random().toFixed(5).toString().slice(2),Ce=0;function ke(Re){var Ye=(0,E.Z)(Re,{value:Re}),vt=(0,U.Z)(Ye,2),xt=vt[0],Vt=vt[1];return p.useEffect(function(){Ce+=1;var Jt="".concat(Ie,"-").concat(Ce);Vt("rc-menu-uuid-".concat(Jt))},[]),xt}var Le=b(42573),mt=b(58698),je=b(74700),qe=b(45080),ut=b(2738),Nt=b(8654);function It(Re,Ye,vt,xt){var Vt=p.useContext(D),Jt=Vt.activeKey,Zt=Vt.onActive,vn=Vt.onInactive,Bn={active:Jt===Re};return Ye||(Bn.onMouseEnter=function(Dn){vt==null||vt({key:Re,domEvent:Dn}),Zt(Re)},Bn.onMouseLeave=function(Dn){xt==null||xt({key:Re,domEvent:Dn}),vn(Re)}),Bn}function bt(Re){var Ye=p.useContext(D),vt=Ye.mode,xt=Ye.rtl,Vt=Ye.inlineIndent;if(vt!=="inline")return null;var Jt=Re;return xt?{paddingRight:Jt*Vt}:{paddingLeft:Jt*Vt}}function on(Re){var Ye=Re.icon,vt=Re.props,xt=Re.children,Vt;return Ye===null||Ye===!1?null:(typeof Ye=="function"?Vt=p.createElement(Ye,(0,ge.Z)({},vt)):typeof Ye!="boolean"&&(Vt=Ye),Vt||xt||null)}var rn=["item"];function Ct(Re){var Ye=Re.item,vt=(0,f.Z)(Re,rn);return Object.defineProperty(vt,"item",{get:function(){return(0,h.ZP)(!1,"`info.item` is deprecated since we will move to function component that not provides React Node instance in future."),Ye}}),vt}var gn=["title","attribute","elementRef"],Ln=["style","className","eventKey","warnKey","disabled","itemIcon","children","role","onMouseEnter","onMouseLeave","onClick","onKeyDown","onFocus"],Mt=["active"],hn=function(Re){(0,je.Z)(vt,Re);var Ye=(0,qe.Z)(vt);function vt(){return(0,Le.Z)(this,vt),Ye.apply(this,arguments)}return(0,mt.Z)(vt,[{key:"render",value:function(){var Vt=this.props,Jt=Vt.title,Zt=Vt.attribute,vn=Vt.elementRef,Bn=(0,f.Z)(Vt,gn),Dn=(0,ut.Z)(Bn,["eventKey","popupClassName","popupOffset","onTitleClick"]);return(0,h.ZP)(!Zt,"`attribute` of Menu.Item is deprecated. Please pass attribute directly."),p.createElement(A.Z.Item,(0,P.Z)({},Zt,{title:typeof Jt=="string"?Jt:void 0},Dn,{ref:vn}))}}]),vt}(p.Component),We=p.forwardRef(function(Re,Ye){var vt=Re.style,xt=Re.className,Vt=Re.eventKey,Jt=Re.warnKey,Zt=Re.disabled,vn=Re.itemIcon,Bn=Re.children,Dn=Re.role,st=Re.onMouseEnter,En=Re.onMouseLeave,mn=Re.onClick,L=Re.onKeyDown,k=Re.onFocus,ce=(0,f.Z)(Re,Ln),ye=R(Vt),Ge=p.useContext(D),$e=Ge.prefixCls,gt=Ge.onItemClick,Bt=Ge.disabled,Ht=Ge.overflowDisabled,kt=Ge.itemIcon,St=Ge.selectedKeys,$t=Ge.onActive,oe=p.useContext(W),Ve=oe._internalRenderMenuItem,Te="".concat($e,"-item"),Me=p.useRef(),ze=p.useRef(),at=Bt||Zt,Dt=(0,Nt.x1)(Ye,ze),yt=ie(Vt),it=function(dn){return{key:Vt,keyPath:(0,se.Z)(yt).reverse(),item:Me.current,domEvent:dn}},Ne=vn||kt,Xe=It(Vt,at,st,En),nt=Xe.active,et=(0,f.Z)(Xe,Mt),ot=St.includes(Vt),Qt=bt(yt.length),en=function(dn){if(!at){var Xn=it(dn);mn==null||mn(Ct(Xn)),gt(Xn)}},An=function(dn){if(L==null||L(dn),dn.which===he.Z.ENTER){var Xn=it(dn);mn==null||mn(Ct(Xn)),gt(Xn)}},bn=function(dn){$t(Vt),k==null||k(dn)},Fn={};Re.role==="option"&&(Fn["aria-selected"]=ot);var wn=p.createElement(hn,(0,P.Z)({ref:Me,elementRef:Dt,role:Dn===null?"none":Dn||"menuitem",tabIndex:Zt?null:-1,"data-menu-id":Ht&&ye?null:ye},(0,ut.Z)(ce,["extra"]),et,Fn,{component:"li","aria-disabled":Zt,style:(0,ge.Z)((0,ge.Z)({},Qt),vt),className:ee()(Te,(0,re.Z)((0,re.Z)((0,re.Z)({},"".concat(Te,"-active"),nt),"".concat(Te,"-selected"),ot),"".concat(Te,"-disabled"),at),xt),onClick:en,onKeyDown:An,onFocus:bn}),Bn,p.createElement(on,{props:(0,ge.Z)((0,ge.Z)({},Re),{},{isSelected:ot}),icon:Ne}));return Ve&&(wn=Ve(wn,Re,{selected:ot})),wn});function Qe(Re,Ye){var vt=Re.eventKey,xt=j(),Vt=ie(vt);return p.useEffect(function(){if(xt)return xt.registerPath(vt,Vt),function(){xt.unregisterPath(vt,Vt)}},[Vt]),xt?null:p.createElement(We,(0,P.Z)({},Re,{ref:Ye}))}var He=p.forwardRef(Qe),z=["className","children"],le=function(Ye,vt){var xt=Ye.className,Vt=Ye.children,Jt=(0,f.Z)(Ye,z),Zt=p.useContext(D),vn=Zt.prefixCls,Bn=Zt.mode,Dn=Zt.rtl;return p.createElement("ul",(0,P.Z)({className:ee()(vn,Dn&&"".concat(vn,"-rtl"),"".concat(vn,"-sub"),"".concat(vn,"-").concat(Bn==="inline"?"inline":"vertical"),xt),role:"menu"},Jt,{"data-menu-list":!0,ref:vt}),Vt)},me=p.forwardRef(le);me.displayName="SubMenuList";var Be=me,be=b(11592);function Tt(Re,Ye){return(0,be.Z)(Re).map(function(vt,xt){if(p.isValidElement(vt)){var Vt,Jt,Zt=vt.key,vn=(Vt=(Jt=vt.props)===null||Jt===void 0?void 0:Jt.eventKey)!==null&&Vt!==void 0?Vt:Zt,Bn=vn==null;Bn&&(vn="tmp_key-".concat([].concat((0,se.Z)(Ye),[xt]).join("-")));var Dn={key:vn,eventKey:vn};return p.cloneElement(vt,Dn)}return vt})}var Wt=b(65030),an={adjustX:1,adjustY:1},_n={topLeft:{points:["bl","tl"],overflow:an},topRight:{points:["br","tr"],overflow:an},bottomLeft:{points:["tl","bl"],overflow:an},bottomRight:{points:["tr","br"],overflow:an},leftTop:{points:["tr","tl"],overflow:an},leftBottom:{points:["br","bl"],overflow:an},rightTop:{points:["tl","tr"],overflow:an},rightBottom:{points:["bl","br"],overflow:an}},Wn={topLeft:{points:["bl","tl"],overflow:an},topRight:{points:["br","tr"],overflow:an},bottomLeft:{points:["tl","bl"],overflow:an},bottomRight:{points:["tr","br"],overflow:an},rightTop:{points:["tr","tl"],overflow:an},rightBottom:{points:["br","bl"],overflow:an},leftTop:{points:["tl","tr"],overflow:an},leftBottom:{points:["bl","br"],overflow:an}},zn=null;function On(Re,Ye,vt){if(Ye)return Ye;if(vt)return vt[Re]||vt.other}var Un={horizontal:"bottomLeft",vertical:"rightTop","vertical-left":"rightTop","vertical-right":"leftTop"};function ar(Re){var Ye=Re.prefixCls,vt=Re.visible,xt=Re.children,Vt=Re.popup,Jt=Re.popupStyle,Zt=Re.popupClassName,vn=Re.popupOffset,Bn=Re.disabled,Dn=Re.mode,st=Re.onVisibleChange,En=p.useContext(D),mn=En.getPopupContainer,L=En.rtl,k=En.subMenuOpenDelay,ce=En.subMenuCloseDelay,ye=En.builtinPlacements,Ge=En.triggerSubMenuAction,$e=En.forceSubMenuRender,gt=En.rootClassName,Bt=En.motion,Ht=En.defaultMotions,kt=p.useState(!1),St=(0,U.Z)(kt,2),$t=St[0],oe=St[1],Ve=L?(0,ge.Z)((0,ge.Z)({},Wn),ye):(0,ge.Z)((0,ge.Z)({},_n),ye),Te=Un[Dn],Me=On(Dn,Bt,Ht),ze=p.useRef(Me);Dn!=="inline"&&(ze.current=Me);var at=(0,ge.Z)((0,ge.Z)({},ze.current),{},{leavedClassName:"".concat(Ye,"-hidden"),removeOnLeave:!1,motionAppear:!0}),Dt=p.useRef();return p.useEffect(function(){return Dt.current=(0,Ue.Z)(function(){oe(vt)}),function(){Ue.Z.cancel(Dt.current)}},[vt]),p.createElement(Wt.Z,{prefixCls:Ye,popupClassName:ee()("".concat(Ye,"-popup"),(0,re.Z)({},"".concat(Ye,"-rtl"),L),Zt,gt),stretch:Dn==="horizontal"?"minWidth":null,getPopupContainer:mn,builtinPlacements:Ve,popupPlacement:Te,popupVisible:$t,popup:Vt,popupStyle:Jt,popupAlign:vn&&{offset:vn},action:Bn?[]:[Ge],mouseEnterDelay:k,mouseLeaveDelay:ce,onPopupVisibleChange:st,forceRender:$e,popupMotion:at,fresh:!0},xt)}var mr=b(77900);function tr(Re){var Ye=Re.id,vt=Re.open,xt=Re.keyPath,Vt=Re.children,Jt="inline",Zt=p.useContext(D),vn=Zt.prefixCls,Bn=Zt.forceSubMenuRender,Dn=Zt.motion,st=Zt.defaultMotions,En=Zt.mode,mn=p.useRef(!1);mn.current=En===Jt;var L=p.useState(!mn.current),k=(0,U.Z)(L,2),ce=k[0],ye=k[1],Ge=mn.current?vt:!1;p.useEffect(function(){mn.current&&ye(!1)},[En]);var $e=(0,ge.Z)({},On(Jt,Dn,st));xt.length>1&&($e.motionAppear=!1);var gt=$e.onVisibleChanged;return $e.onVisibleChanged=function(Bt){return!mn.current&&!Bt&&ye(!0),gt==null?void 0:gt(Bt)},ce?null:p.createElement(S,{mode:Jt,locked:!mn.current},p.createElement(mr.default,(0,P.Z)({visible:Ge},$e,{forceRender:Bn,removeOnLeave:!1,leavedClassName:"".concat(vn,"-hidden")}),function(Bt){var Ht=Bt.className,kt=Bt.style;return p.createElement(Be,{id:Ye,className:Ht,style:kt},Vt)}))}var gr=["style","className","title","eventKey","warnKey","disabled","internalPopupClose","children","itemIcon","expandIcon","popupClassName","popupOffset","popupStyle","onClick","onMouseEnter","onMouseLeave","onTitleClick","onTitleMouseEnter","onTitleMouseLeave"],sn=["active"],Kt=p.forwardRef(function(Re,Ye){var vt=Re.style,xt=Re.className,Vt=Re.title,Jt=Re.eventKey,Zt=Re.warnKey,vn=Re.disabled,Bn=Re.internalPopupClose,Dn=Re.children,st=Re.itemIcon,En=Re.expandIcon,mn=Re.popupClassName,L=Re.popupOffset,k=Re.popupStyle,ce=Re.onClick,ye=Re.onMouseEnter,Ge=Re.onMouseLeave,$e=Re.onTitleClick,gt=Re.onTitleMouseEnter,Bt=Re.onTitleMouseLeave,Ht=(0,f.Z)(Re,gr),kt=R(Jt),St=p.useContext(D),$t=St.prefixCls,oe=St.mode,Ve=St.openKeys,Te=St.disabled,Me=St.overflowDisabled,ze=St.activeKey,at=St.selectedKeys,Dt=St.itemIcon,yt=St.expandIcon,it=St.onItemClick,Ne=St.onOpenChange,Xe=St.onActive,nt=p.useContext(W),et=nt._internalRenderSubMenuItem,ot=p.useContext(de),Qt=ot.isSubPathKey,en=ie(),An="".concat($t,"-submenu"),bn=Te||vn,Fn=p.useRef(),wn=p.useRef(),Sn=st!=null?st:Dt,dn=En!=null?En:yt,Xn=Ve.includes(Jt),Mn=!Me&&Xn,cr=Qt(at,Jt),ln=It(Jt,bn,gt,Bt),Vn=ln.active,nr=(0,f.Z)(ln,sn),Jn=p.useState(!1),Kn=(0,U.Z)(Jn,2),Nn=Kn[0],xn=Kn[1],Pn=function(Ar){bn||xn(Ar)},In=function(Ar){Pn(!0),ye==null||ye({key:Jt,domEvent:Ar})},pr=function(Ar){Pn(!1),Ge==null||Ge({key:Jt,domEvent:Ar})},fr=p.useMemo(function(){return Vn||(oe!=="inline"?Nn||Qt([ze],Jt):!1)},[oe,Vn,ze,Nn,Jt,Qt]),hr=bt(en.length),Rr=function(Ar){bn||($e==null||$e({key:Jt,domEvent:Ar}),oe==="inline"&&Ne(Jt,!Xn))},Zr=ue(function(wr){ce==null||ce(Ct(wr)),it(wr)}),Yr=function(Ar){oe!=="inline"&&Ne(Jt,Ar)},ii=function(){Xe(Jt)},Xr=kt&&"".concat(kt,"-popup"),si=p.useMemo(function(){return p.createElement(on,{icon:oe!=="horizontal"?dn:void 0,props:(0,ge.Z)((0,ge.Z)({},Re),{},{isOpen:Mn,isSubMenu:!0})},p.createElement("i",{className:"".concat(An,"-arrow")}))},[oe,dn,Re,Mn,An]),Er=p.createElement("div",(0,P.Z)({role:"menuitem",style:hr,className:"".concat(An,"-title"),tabIndex:bn?null:-1,ref:Fn,title:typeof Vt=="string"?Vt:null,"data-menu-id":Me&&kt?null:kt,"aria-expanded":Mn,"aria-haspopup":!0,"aria-controls":Xr,"aria-disabled":bn,onClick:Rr,onFocus:ii},nr),Vt,si),Ir=p.useRef(oe);if(oe!=="inline"&&en.length>1?Ir.current="vertical":Ir.current=oe,!Me){var ti=Ir.current;Er=p.createElement(ar,{mode:ti,prefixCls:An,visible:!Bn&&Mn&&oe!=="inline",popupClassName:mn,popupOffset:L,popupStyle:k,popup:p.createElement(S,{mode:ti==="horizontal"?"vertical":ti},p.createElement(Be,{id:Xr,ref:wn},Dn)),disabled:bn,onVisibleChange:Yr},Er)}var xr=p.createElement(A.Z.Item,(0,P.Z)({ref:Ye,role:"none"},Ht,{component:"li",style:vt,className:ee()(An,"".concat(An,"-").concat(oe),xt,(0,re.Z)((0,re.Z)((0,re.Z)((0,re.Z)({},"".concat(An,"-open"),Mn),"".concat(An,"-active"),fr),"".concat(An,"-selected"),cr),"".concat(An,"-disabled"),bn)),onMouseEnter:In,onMouseLeave:pr}),Er,!Me&&p.createElement(tr,{id:Xr,open:Mn,keyPath:en},Dn));return et&&(xr=et(xr,Re,{selected:cr,active:fr,open:Mn,disabled:bn})),p.createElement(S,{onItemClick:Zr,mode:oe==="horizontal"?"vertical":oe,itemIcon:Sn,expandIcon:dn},xr)}),yn=p.forwardRef(function(Re,Ye){var vt=Re.eventKey,xt=Re.children,Vt=ie(vt),Jt=Tt(xt,Vt),Zt=j();p.useEffect(function(){if(Zt)return Zt.registerPath(vt,Vt),function(){Zt.unregisterPath(vt,Vt)}},[Vt]);var vn;return Zt?vn=Jt:vn=p.createElement(Kt,(0,P.Z)({ref:Ye},Re),Jt),p.createElement(Y.Provider,{value:Vt},vn)}),Yn=yn,or=b(26420);function Ke(Re){var Ye=Re.className,vt=Re.style,xt=p.useContext(D),Vt=xt.prefixCls,Jt=j();return Jt?null:p.createElement("li",{role:"separator",className:ee()("".concat(Vt,"-item-divider"),Ye),style:vt})}var Pe=["className","title","eventKey","children"],Yt=p.forwardRef(function(Re,Ye){var vt=Re.className,xt=Re.title,Vt=Re.eventKey,Jt=Re.children,Zt=(0,f.Z)(Re,Pe),vn=p.useContext(D),Bn=vn.prefixCls,Dn="".concat(Bn,"-item-group");return p.createElement("li",(0,P.Z)({ref:Ye,role:"presentation"},Zt,{onClick:function(En){return En.stopPropagation()},className:ee()(Dn,vt)}),p.createElement("div",{role:"presentation",className:"".concat(Dn,"-title"),title:typeof xt=="string"?xt:void 0},xt),p.createElement("ul",{role:"group",className:"".concat(Dn,"-list")},Jt))}),Lt=p.forwardRef(function(Re,Ye){var vt=Re.eventKey,xt=Re.children,Vt=ie(vt),Jt=Tt(xt,Vt),Zt=j();return Zt?Jt:p.createElement(Yt,(0,P.Z)({ref:Ye},(0,ut.Z)(Re,["warnKey"])),Jt)}),qt=Lt,nn=["label","children","key","type","extra"];function Xt(Re,Ye,vt){var xt=Ye.item,Vt=Ye.group,Jt=Ye.submenu,Zt=Ye.divider;return(Re||[]).map(function(vn,Bn){if(vn&&(0,or.Z)(vn)==="object"){var Dn=vn,st=Dn.label,En=Dn.children,mn=Dn.key,L=Dn.type,k=Dn.extra,ce=(0,f.Z)(Dn,nn),ye=mn!=null?mn:"tmp-".concat(Bn);return En||L==="group"?L==="group"?p.createElement(Vt,(0,P.Z)({key:ye},ce,{title:st}),Xt(En,Ye,vt)):p.createElement(Jt,(0,P.Z)({key:ye},ce,{title:st}),Xt(En,Ye,vt)):L==="divider"?p.createElement(Zt,(0,P.Z)({key:ye},ce)):p.createElement(xt,(0,P.Z)({key:ye},ce,{extra:k}),st,(!!k||k===0)&&p.createElement("span",{className:"".concat(vt,"-item-extra")},k))}return null}).filter(function(vn){return vn})}function zt(Re,Ye,vt,xt,Vt){var Jt=Re,Zt=(0,ge.Z)({divider:Ke,item:He,group:qt,submenu:Yn},xt);return Ye&&(Jt=Xt(Ye,Zt,Vt)),Tt(Jt,vt)}var pn=["prefixCls","rootClassName","style","className","tabIndex","items","children","direction","id","mode","inlineCollapsed","disabled","disabledOverflow","subMenuOpenDelay","subMenuCloseDelay","forceSubMenuRender","defaultOpenKeys","openKeys","activeKey","defaultActiveFirst","selectable","multiple","defaultSelectedKeys","selectedKeys","onSelect","onDeselect","inlineIndent","motion","defaultMotions","triggerSubMenuAction","builtinPlacements","itemIcon","expandIcon","overflowedIndicator","overflowedIndicatorPopupClassName","getPopupContainer","onClick","onOpenChange","onKeyDown","openAnimation","openTransitionName","_internalRenderMenuItem","_internalRenderSubMenuItem","_internalComponents"],Ot=[],cn=p.forwardRef(function(Re,Ye){var vt,xt=Re,Vt=xt.prefixCls,Jt=Vt===void 0?"rc-menu":Vt,Zt=xt.rootClassName,vn=xt.style,Bn=xt.className,Dn=xt.tabIndex,st=Dn===void 0?0:Dn,En=xt.items,mn=xt.children,L=xt.direction,k=xt.id,ce=xt.mode,ye=ce===void 0?"vertical":ce,Ge=xt.inlineCollapsed,$e=xt.disabled,gt=xt.disabledOverflow,Bt=xt.subMenuOpenDelay,Ht=Bt===void 0?.1:Bt,kt=xt.subMenuCloseDelay,St=kt===void 0?.1:kt,$t=xt.forceSubMenuRender,oe=xt.defaultOpenKeys,Ve=xt.openKeys,Te=xt.activeKey,Me=xt.defaultActiveFirst,ze=xt.selectable,at=ze===void 0?!0:ze,Dt=xt.multiple,yt=Dt===void 0?!1:Dt,it=xt.defaultSelectedKeys,Ne=xt.selectedKeys,Xe=xt.onSelect,nt=xt.onDeselect,et=xt.inlineIndent,ot=et===void 0?24:et,Qt=xt.motion,en=xt.defaultMotions,An=xt.triggerSubMenuAction,bn=An===void 0?"hover":An,Fn=xt.builtinPlacements,wn=xt.itemIcon,Sn=xt.expandIcon,dn=xt.overflowedIndicator,Xn=dn===void 0?"...":dn,Mn=xt.overflowedIndicatorPopupClassName,cr=xt.getPopupContainer,ln=xt.onClick,Vn=xt.onOpenChange,nr=xt.onKeyDown,Jn=xt.openAnimation,Kn=xt.openTransitionName,Nn=xt._internalRenderMenuItem,xn=xt._internalRenderSubMenuItem,Pn=xt._internalComponents,In=(0,f.Z)(xt,pn),pr=p.useMemo(function(){return[zt(mn,En,Ot,Pn,Jt),zt(mn,En,Ot,{},Jt)]},[mn,En,Pn]),fr=(0,U.Z)(pr,2),hr=fr[0],Rr=fr[1],Zr=p.useState(!1),Yr=(0,U.Z)(Zr,2),ii=Yr[0],Xr=Yr[1],si=p.useRef(),Er=ke(k),Ir=L==="rtl",ti=(0,E.Z)(oe,{value:Ve,postState:function(Hr){return Hr||Ot}}),xr=(0,U.Z)(ti,2),wr=xr[0],Ar=xr[1],Tn=function(Hr){var Wr=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;function pi(){Ar(Hr),Vn==null||Vn(Hr)}Wr?(0,_.flushSync)(pi):pi()},sr=p.useState(wr),lr=(0,U.Z)(sr,2),dr=lr[0],br=lr[1],Dr=p.useRef(!1),Sr=p.useMemo(function(){return(ye==="inline"||ye==="vertical")&&Ge?["vertical",Ge]:[ye,!1]},[ye,Ge]),kn=(0,U.Z)(Sr,2),er=kn[0],qn=kn[1],Cr=er==="inline",Tr=p.useState(er),$r=(0,U.Z)(Tr,2),ni=$r[0],Mr=$r[1],Ai=p.useState(qn),Ur=(0,U.Z)(Ai,2),mi=Ur[0],Si=Ur[1];p.useEffect(function(){Mr(er),Si(qn),Dr.current&&(Cr?Ar(dr):Tn(Ot))},[er,qn]);var Ti=p.useState(0),Kr=(0,U.Z)(Ti,2),Wi=Kr[0],zi=Kr[1],ns=Wi>=hr.length-1||ni!=="horizontal"||gt;p.useEffect(function(){Cr&&br(wr)},[wr]),p.useEffect(function(){return Dr.current=!0,function(){Dr.current=!1}},[]);var Ii=$(),Ui=Ii.registerPath,Mi=Ii.unregisterPath,As=Ii.refreshOverflowKeys,Jr=Ii.isSubPathKey,Di=Ii.getKeyPath,Ei=Ii.getKeys,li=Ii.getSubPathKeys,Li=p.useMemo(function(){return{registerPath:Ui,unregisterPath:Mi}},[Ui,Mi]),ds=p.useMemo(function(){return{isSubPathKey:Jr}},[Jr]);p.useEffect(function(){As(ns?Ot:hr.slice(Wi+1).map(function(jt){return jt.key}))},[Wi,ns]);var rs=(0,E.Z)(Te||Me&&((vt=hr[0])===null||vt===void 0?void 0:vt.key),{value:Te}),di=(0,U.Z)(rs,2),ui=di[0],Fr=di[1],Br=ue(function(jt){Fr(jt)}),Gr=ue(function(){Fr(void 0)});(0,p.useImperativeHandle)(Ye,function(){return{list:si.current,focus:function(Hr){var Wr,pi=Ei(),hi=Fe(pi,Er),Fi=hi.elements,hs=hi.key2element,Ds=hi.element2key,Js=_e(si.current,Fi),Yi=ui!=null?ui:Js[0]?Ds.get(Js[0]):(Wr=hr.find(function(ls){return!ls.props.disabled}))===null||Wr===void 0?void 0:Wr.key,Ki=hs.get(Yi);if(Yi&&Ki){var Gi;Ki==null||(Gi=Ki.focus)===null||Gi===void 0||Gi.call(Ki,Hr)}}}});var ri=(0,E.Z)(it||[],{value:Ne,postState:function(Hr){return Array.isArray(Hr)?Hr:Hr==null?Ot:[Hr]}}),ai=(0,U.Z)(ri,2),qr=ai[0],bi=ai[1],gi=function(Hr){if(at){var Wr=Hr.key,pi=qr.includes(Wr),hi;yt?pi?hi=qr.filter(function(hs){return hs!==Wr}):hi=[].concat((0,se.Z)(qr),[Wr]):hi=[Wr],bi(hi);var Fi=(0,ge.Z)((0,ge.Z)({},Hr),{},{selectedKeys:hi});pi?nt==null||nt(Fi):Xe==null||Xe(Fi)}!yt&&wr.length&&ni!=="inline"&&Tn(Ot)},Ni=ue(function(jt){ln==null||ln(Ct(jt)),gi(jt)}),Vr=ue(function(jt,Hr){var Wr=wr.filter(function(hi){return hi!==jt});if(Hr)Wr.push(jt);else if(ni!=="inline"){var pi=li(jt);Wr=Wr.filter(function(hi){return!pi.has(hi)})}(0,x.Z)(wr,Wr,!0)||Tn(Wr,!0)}),vi=function(Hr,Wr){var pi=Wr!=null?Wr:!wr.includes(Hr);Vr(Hr,pi)},ji=De(ni,ui,Ir,Er,si,Ei,Di,Fr,vi,nr);p.useEffect(function(){Xr(!0)},[]);var ki=p.useMemo(function(){return{_internalRenderMenuItem:Nn,_internalRenderSubMenuItem:xn}},[Nn,xn]),Hi=ni!=="horizontal"||gt?hr:hr.map(function(jt,Hr){return p.createElement(S,{key:jt.key,overflowDisabled:Hr>Wi},jt)}),Xs=p.createElement(A.Z,(0,P.Z)({id:k,ref:si,prefixCls:"".concat(Jt,"-overflow"),component:"ul",itemComponent:He,className:ee()(Jt,"".concat(Jt,"-root"),"".concat(Jt,"-").concat(ni),Bn,(0,re.Z)((0,re.Z)({},"".concat(Jt,"-inline-collapsed"),mi),"".concat(Jt,"-rtl"),Ir),Zt),dir:L,style:vn,role:"menu",tabIndex:st,data:Hi,renderRawItem:function(Hr){return Hr},renderRawRest:function(Hr){var Wr=Hr.length,pi=Wr?hr.slice(-Wr):null;return p.createElement(Yn,{eventKey:te,title:Xn,disabled:ns,internalPopupClose:Wr===0,popupClassName:Mn},pi)},maxCount:ni!=="horizontal"||gt?A.Z.INVALIDATE:A.Z.RESPONSIVE,ssr:"full","data-menu-list":!0,onVisibleChange:function(Hr){zi(Hr)},onKeyDown:ji},In));return p.createElement(W.Provider,{value:ki},p.createElement(C.Provider,{value:Er},p.createElement(S,{prefixCls:Jt,rootClassName:Zt,mode:ni,openKeys:wr,rtl:Ir,disabled:$e,motion:ii?Qt:null,defaultMotions:ii?en:null,activeKey:ui,onActive:Br,onInactive:Gr,selectedKeys:qr,inlineIndent:ot,subMenuOpenDelay:Ht,subMenuCloseDelay:St,forceSubMenuRender:$t,builtinPlacements:Fn,triggerSubMenuAction:bn,getPopupContainer:cr,itemIcon:wn,expandIcon:Sn,onItemClick:Ni,onOpenChange:Vr},p.createElement(de.Provider,{value:ds},Xs),p.createElement("div",{style:{display:"none"},"aria-hidden":!0},p.createElement(ae.Provider,{value:Li},Rr)))))}),un=cn,lt=un;lt.Item=He,lt.SubMenu=Yn,lt.ItemGroup=qt,lt.Divider=Ke;var Pt=lt},11780:function(Cn,tt,b){"use strict";b.d(tt,{Z:function(){return Z}});var P=b(67711),re=b(98506),ge=b(16886),se=b(33346),U=b(59301),f=b(92310),fe=b.n(f),ee=b(29301),A=b(34280),E=["prefixCls","invalidate","item","renderItem","responsive","responsiveDisabled","registerSize","itemKey","className","style","children","display","order","component"],x=void 0;function h(m,v){var Q=m.prefixCls,he=m.invalidate,Ue=m.item,Oe=m.renderItem,ft=m.responsive,Et=m.responsiveDisabled,Ft=m.registerSize,Ut=m.itemKey,Se=m.className,Gt=m.style,ht=m.children,tn=m.display,dt=m.order,Je=m.component,xe=Je===void 0?"div":Je,_e=(0,se.Z)(m,E),N=ft&&!tn;function Fe(ve){Ft(Ut,ve)}U.useEffect(function(){return function(){Fe(null)}},[]);var De=Oe&&Ue!==x?Oe(Ue,{index:dt}):ht,V;he||(V={opacity:N?0:1,height:N?0:x,overflowY:N?"hidden":x,order:ft?dt:x,pointerEvents:N?"none":x,position:N?"absolute":x});var T={};N&&(T["aria-hidden"]=!0);var J=U.createElement(xe,(0,P.Z)({className:fe()(!he&&Q,Se),style:(0,re.Z)((0,re.Z)({},V),Gt)},T,_e,{ref:v}),De);return ft&&(J=U.createElement(ee.Z,{onResize:function(te){var $=te.offsetWidth;Fe($)},disabled:Et},J)),J}var p=U.forwardRef(h);p.displayName="Item";var _=p,C=b(6089),F=b(4676),R=b(16089);function K(m){if(typeof MessageChannel=="undefined")(0,R.Z)(m);else{var v=new MessageChannel;v.port1.onmessage=function(){return m()},v.port2.postMessage(void 0)}}function B(){var m=U.useRef(null),v=function(he){m.current||(m.current=[],K(function(){(0,F.unstable_batchedUpdates)(function(){m.current.forEach(function(Ue){Ue()}),m.current=null})})),m.current.push(he)};return v}function D(m,v){var Q=U.useState(v),he=(0,ge.Z)(Q,2),Ue=he[0],Oe=he[1],ft=(0,C.Z)(function(Et){m(function(){Oe(Et)})});return[Ue,ft]}var I=U.createContext(null),S=["component"],q=["className"],ae=["className"],j=function(v,Q){var he=U.useContext(I);if(!he){var Ue=v.component,Oe=Ue===void 0?"div":Ue,ft=(0,se.Z)(v,S);return U.createElement(Oe,(0,P.Z)({},ft,{ref:Q}))}var Et=he.className,Ft=(0,se.Z)(he,q),Ut=v.className,Se=(0,se.Z)(v,ae);return U.createElement(I.Provider,{value:null},U.createElement(_,(0,P.Z)({ref:Q,className:fe()(Et,Ut)},Ft,Se)))},Y=U.forwardRef(j);Y.displayName="RawItem";var ie=Y,de=["prefixCls","data","renderItem","renderRawItem","itemKey","itemWidth","ssr","style","className","maxCount","renderRest","renderRawRest","suffix","component","itemComponent","onVisibleChange"],pe="responsive",W="invalidate";function M(m){return"+ ".concat(m.length," ...")}function X(m,v){var Q=m.prefixCls,he=Q===void 0?"rc-overflow":Q,Ue=m.data,Oe=Ue===void 0?[]:Ue,ft=m.renderItem,Et=m.renderRawItem,Ft=m.itemKey,Ut=m.itemWidth,Se=Ut===void 0?10:Ut,Gt=m.ssr,ht=m.style,tn=m.className,dt=m.maxCount,Je=m.renderRest,xe=m.renderRawRest,_e=m.suffix,N=m.component,Fe=N===void 0?"div":N,De=m.itemComponent,V=m.onVisibleChange,T=(0,se.Z)(m,de),J=Gt==="full",ve=B(),te=D(ve,null),$=(0,ge.Z)(te,2),ue=$[0],Ie=$[1],Ce=ue||0,ke=D(ve,new Map),Le=(0,ge.Z)(ke,2),mt=Le[0],je=Le[1],qe=D(ve,0),ut=(0,ge.Z)(qe,2),Nt=ut[0],It=ut[1],bt=D(ve,0),on=(0,ge.Z)(bt,2),rn=on[0],Ct=on[1],gn=D(ve,0),Ln=(0,ge.Z)(gn,2),Mt=Ln[0],hn=Ln[1],We=(0,U.useState)(null),Qe=(0,ge.Z)(We,2),He=Qe[0],z=Qe[1],le=(0,U.useState)(null),me=(0,ge.Z)(le,2),Be=me[0],be=me[1],Tt=U.useMemo(function(){return Be===null&&J?Number.MAX_SAFE_INTEGER:Be||0},[Be,ue]),Wt=(0,U.useState)(!1),an=(0,ge.Z)(Wt,2),_n=an[0],Wn=an[1],zn="".concat(he,"-item"),On=Math.max(Nt,rn),Un=dt===pe,ar=Oe.length&&Un,mr=dt===W,tr=ar||typeof dt=="number"&&Oe.length>dt,gr=(0,U.useMemo)(function(){var lt=Oe;return ar?ue===null&&J?lt=Oe:lt=Oe.slice(0,Math.min(Oe.length,Ce/Se)):typeof dt=="number"&&(lt=Oe.slice(0,dt)),lt},[Oe,Se,ue,dt,ar]),sn=(0,U.useMemo)(function(){return ar?Oe.slice(Tt+1):Oe.slice(gr.length)},[Oe,gr,ar,Tt]),Kt=(0,U.useCallback)(function(lt,Pt){var Re;return typeof Ft=="function"?Ft(lt):(Re=Ft&&(lt==null?void 0:lt[Ft]))!==null&&Re!==void 0?Re:Pt},[Ft]),yn=(0,U.useCallback)(ft||function(lt){return lt},[ft]);function Yn(lt,Pt,Re){Be===lt&&(Pt===void 0||Pt===He)||(be(lt),Re||(Wn(lt<Oe.length-1),V==null||V(lt)),Pt!==void 0&&z(Pt))}function or(lt,Pt){Ie(Pt.clientWidth)}function Ke(lt,Pt){je(function(Re){var Ye=new Map(Re);return Pt===null?Ye.delete(lt):Ye.set(lt,Pt),Ye})}function Pe(lt,Pt){Ct(Pt),It(rn)}function Yt(lt,Pt){hn(Pt)}function Lt(lt){return mt.get(Kt(gr[lt],lt))}(0,A.Z)(function(){if(Ce&&typeof On=="number"&&gr){var lt=Mt,Pt=gr.length,Re=Pt-1;if(!Pt){Yn(0,null);return}for(var Ye=0;Ye<Pt;Ye+=1){var vt=Lt(Ye);if(J&&(vt=vt||0),vt===void 0){Yn(Ye-1,void 0,!0);break}if(lt+=vt,Re===0&&lt<=Ce||Ye===Re-1&&lt+Lt(Re)<=Ce){Yn(Re,null);break}else if(lt+On>Ce){Yn(Ye-1,lt-vt-Mt+rn);break}}_e&&Lt(0)+Mt>Ce&&z(null)}},[Ce,mt,rn,Mt,Kt,gr]);var qt=_n&&!!sn.length,nn={};He!==null&&ar&&(nn={position:"absolute",left:He,top:0});var Xt={prefixCls:zn,responsive:ar,component:De,invalidate:mr},zt=Et?function(lt,Pt){var Re=Kt(lt,Pt);return U.createElement(I.Provider,{key:Re,value:(0,re.Z)((0,re.Z)({},Xt),{},{order:Pt,item:lt,itemKey:Re,registerSize:Ke,display:Pt<=Tt})},Et(lt,Pt))}:function(lt,Pt){var Re=Kt(lt,Pt);return U.createElement(_,(0,P.Z)({},Xt,{order:Pt,key:Re,item:lt,renderItem:yn,itemKey:Re,registerSize:Ke,display:Pt<=Tt}))},pn={order:qt?Tt:Number.MAX_SAFE_INTEGER,className:"".concat(zn,"-rest"),registerSize:Pe,display:qt},Ot=Je||M,cn=xe?U.createElement(I.Provider,{value:(0,re.Z)((0,re.Z)({},Xt),pn)},xe(sn)):U.createElement(_,(0,P.Z)({},Xt,pn),typeof Ot=="function"?Ot(sn):Ot),un=U.createElement(Fe,(0,P.Z)({className:fe()(!mr&&he,tn),style:ht,ref:v},T),gr.map(zt),tr?cn:null,_e&&U.createElement(_,(0,P.Z)({},Xt,{responsive:Un,responsiveDisabled:!ar,order:Tt,className:"".concat(zn,"-suffix"),registerSize:Yt,display:!0,style:nn}),_e));return Un?U.createElement(ee.Z,{onResize:or,disabled:!ar},un):un}var G=U.forwardRef(X);G.displayName="Overflow",G.Item=ie,G.RESPONSIVE=pe,G.INVALIDATE=W;var ne=G,Z=ne},23425:function(Cn,tt,b){"use strict";b.d(tt,{Z:function(){return ae}});var P=b(52873),re=b(67711),ge=b(26420),se=b(98506),U=b(16886),f=b(92310),fe=b.n(f),ee=b(18929),A=b(10228),E=b(26112),x=b(48736),h=b(59301),p=b(17119),_=[10,20,50,100],C=function(Y){var ie=Y.pageSizeOptions,de=ie===void 0?_:ie,pe=Y.locale,W=Y.changeSize,M=Y.pageSize,X=Y.goButton,G=Y.quickGo,ne=Y.rootPrefixCls,Z=Y.disabled,m=Y.buildOptionText,v=Y.showSizeChanger,Q=Y.sizeChangerRender,he=h.useState(""),Ue=(0,U.Z)(he,2),Oe=Ue[0],ft=Ue[1],Et=function(){return!Oe||Number.isNaN(Oe)?void 0:Number(Oe)},Ft=typeof m=="function"?m:function(_e){return"".concat(_e," ").concat(pe.items_per_page)},Ut=function(N){ft(N.target.value)},Se=function(N){X||Oe===""||(ft(""),!(N.relatedTarget&&(N.relatedTarget.className.indexOf("".concat(ne,"-item-link"))>=0||N.relatedTarget.className.indexOf("".concat(ne,"-item"))>=0))&&(G==null||G(Et())))},Gt=function(N){Oe!==""&&(N.keyCode===A.Z.ENTER||N.type==="click")&&(ft(""),G==null||G(Et()))},ht=function(){return de.some(function(N){return N.toString()===M.toString()})?de:de.concat([M]).sort(function(N,Fe){var De=Number.isNaN(Number(N))?0:Number(N),V=Number.isNaN(Number(Fe))?0:Number(Fe);return De-V})},tn="".concat(ne,"-options");if(!v&&!G)return null;var dt=null,Je=null,xe=null;return v&&Q&&(dt=Q({disabled:Z,size:M,onSizeChange:function(N){W==null||W(Number(N))},"aria-label":pe.page_size,className:"".concat(tn,"-size-changer"),options:ht().map(function(_e){return{label:Ft(_e),value:_e}})})),G&&(X&&(xe=typeof X=="boolean"?h.createElement("button",{type:"button",onClick:Gt,onKeyUp:Gt,disabled:Z,className:"".concat(tn,"-quick-jumper-button")},pe.jump_to_confirm):h.createElement("span",{onClick:Gt,onKeyUp:Gt},X)),Je=h.createElement("div",{className:"".concat(tn,"-quick-jumper")},pe.jump_to,h.createElement("input",{disabled:Z,type:"text",value:Oe,onChange:Ut,onKeyUp:Gt,onBlur:Se,"aria-label":pe.page}),pe.page,xe)),h.createElement("li",{className:tn},dt,Je)},F=C,R=function(Y){var ie=Y.rootPrefixCls,de=Y.page,pe=Y.active,W=Y.className,M=Y.showTitle,X=Y.onClick,G=Y.onKeyPress,ne=Y.itemRender,Z="".concat(ie,"-item"),m=fe()(Z,"".concat(Z,"-").concat(de),(0,P.Z)((0,P.Z)({},"".concat(Z,"-active"),pe),"".concat(Z,"-disabled"),!de),W),v=function(){X(de)},Q=function(Oe){G(Oe,X,de)},he=ne(de,"page",h.createElement("a",{rel:"nofollow"},de));return he?h.createElement("li",{title:M?String(de):null,className:m,onClick:v,onKeyDown:Q,tabIndex:0},he):null},K=R,B=function(Y,ie,de){return de};function D(){}function I(j){var Y=Number(j);return typeof Y=="number"&&!Number.isNaN(Y)&&isFinite(Y)&&Math.floor(Y)===Y}function S(j,Y,ie){var de=typeof j=="undefined"?Y:j;return Math.floor((ie-1)/de)+1}var q=function(Y){var ie=Y.prefixCls,de=ie===void 0?"rc-pagination":ie,pe=Y.selectPrefixCls,W=pe===void 0?"rc-select":pe,M=Y.className,X=Y.current,G=Y.defaultCurrent,ne=G===void 0?1:G,Z=Y.total,m=Z===void 0?0:Z,v=Y.pageSize,Q=Y.defaultPageSize,he=Q===void 0?10:Q,Ue=Y.onChange,Oe=Ue===void 0?D:Ue,ft=Y.hideOnSinglePage,Et=Y.align,Ft=Y.showPrevNextJumpers,Ut=Ft===void 0?!0:Ft,Se=Y.showQuickJumper,Gt=Y.showLessItems,ht=Y.showTitle,tn=ht===void 0?!0:ht,dt=Y.onShowSizeChange,Je=dt===void 0?D:dt,xe=Y.locale,_e=xe===void 0?p.Z:xe,N=Y.style,Fe=Y.totalBoundaryShowSizeChanger,De=Fe===void 0?50:Fe,V=Y.disabled,T=Y.simple,J=Y.showTotal,ve=Y.showSizeChanger,te=ve===void 0?m>De:ve,$=Y.sizeChangerRender,ue=Y.pageSizeOptions,Ie=Y.itemRender,Ce=Ie===void 0?B:Ie,ke=Y.jumpPrevIcon,Le=Y.jumpNextIcon,mt=Y.prevIcon,je=Y.nextIcon,qe=h.useRef(null),ut=(0,ee.Z)(10,{value:v,defaultValue:he}),Nt=(0,U.Z)(ut,2),It=Nt[0],bt=Nt[1],on=(0,ee.Z)(1,{value:X,defaultValue:ne,postState:function(gt){return Math.max(1,Math.min(gt,S(void 0,It,m)))}}),rn=(0,U.Z)(on,2),Ct=rn[0],gn=rn[1],Ln=h.useState(Ct),Mt=(0,U.Z)(Ln,2),hn=Mt[0],We=Mt[1];(0,h.useEffect)(function(){We(Ct)},[Ct]);var Qe=Oe!==D,He="current"in Y,z=Math.max(1,Ct-(Gt?3:5)),le=Math.min(S(void 0,It,m),Ct+(Gt?3:5));function me($e,gt){var Bt=$e||h.createElement("button",{type:"button","aria-label":gt,className:"".concat(de,"-item-link")});return typeof $e=="function"&&(Bt=h.createElement($e,(0,se.Z)({},Y))),Bt}function Be($e){var gt=$e.target.value,Bt=S(void 0,It,m),Ht;return gt===""?Ht=gt:Number.isNaN(Number(gt))?Ht=hn:gt>=Bt?Ht=Bt:Ht=Number(gt),Ht}function be($e){return I($e)&&$e!==Ct&&I(m)&&m>0}var Tt=m>It?Se:!1;function Wt($e){($e.keyCode===A.Z.UP||$e.keyCode===A.Z.DOWN)&&$e.preventDefault()}function an($e){var gt=Be($e);switch(gt!==hn&&We(gt),$e.keyCode){case A.Z.ENTER:zn(gt);break;case A.Z.UP:zn(gt-1);break;case A.Z.DOWN:zn(gt+1);break;default:break}}function _n($e){zn(Be($e))}function Wn($e){var gt=S($e,It,m),Bt=Ct>gt&&gt!==0?gt:Ct;bt($e),We(Bt),Je==null||Je(Ct,$e),gn(Bt),Oe==null||Oe(Bt,$e)}function zn($e){if(be($e)&&!V){var gt=S(void 0,It,m),Bt=$e;return $e>gt?Bt=gt:$e<1&&(Bt=1),Bt!==hn&&We(Bt),gn(Bt),Oe==null||Oe(Bt,It),Bt}return Ct}var On=Ct>1,Un=Ct<S(void 0,It,m);function ar(){On&&zn(Ct-1)}function mr(){Un&&zn(Ct+1)}function tr(){zn(z)}function gr(){zn(le)}function sn($e,gt){if($e.key==="Enter"||$e.charCode===A.Z.ENTER||$e.keyCode===A.Z.ENTER){for(var Bt=arguments.length,Ht=new Array(Bt>2?Bt-2:0),kt=2;kt<Bt;kt++)Ht[kt-2]=arguments[kt];gt.apply(void 0,Ht)}}function Kt($e){sn($e,ar)}function yn($e){sn($e,mr)}function Yn($e){sn($e,tr)}function or($e){sn($e,gr)}function Ke($e){var gt=Ce($e,"prev",me(mt,"prev page"));return h.isValidElement(gt)?h.cloneElement(gt,{disabled:!On}):gt}function Pe($e){var gt=Ce($e,"next",me(je,"next page"));return h.isValidElement(gt)?h.cloneElement(gt,{disabled:!Un}):gt}function Yt($e){($e.type==="click"||$e.keyCode===A.Z.ENTER)&&zn(hn)}var Lt=null,qt=(0,E.Z)(Y,{aria:!0,data:!0}),nn=J&&h.createElement("li",{className:"".concat(de,"-total-text")},J(m,[m===0?0:(Ct-1)*It+1,Ct*It>m?m:Ct*It])),Xt=null,zt=S(void 0,It,m);if(ft&&m<=It)return null;var pn=[],Ot={rootPrefixCls:de,onClick:zn,onKeyPress:sn,showTitle:tn,itemRender:Ce,page:-1},cn=Ct-1>0?Ct-1:0,un=Ct+1<zt?Ct+1:zt,lt=Se&&Se.goButton,Pt=(0,ge.Z)(T)==="object"?T.readOnly:!T,Re=lt,Ye=null;T&&(lt&&(typeof lt=="boolean"?Re=h.createElement("button",{type:"button",onClick:Yt,onKeyUp:Yt},_e.jump_to_confirm):Re=h.createElement("span",{onClick:Yt,onKeyUp:Yt},lt),Re=h.createElement("li",{title:tn?"".concat(_e.jump_to).concat(Ct,"/").concat(zt):null,className:"".concat(de,"-simple-pager")},Re)),Ye=h.createElement("li",{title:tn?"".concat(Ct,"/").concat(zt):null,className:"".concat(de,"-simple-pager")},Pt?hn:h.createElement("input",{type:"text","aria-label":_e.jump_to,value:hn,disabled:V,onKeyDown:Wt,onKeyUp:an,onChange:an,onBlur:_n,size:3}),h.createElement("span",{className:"".concat(de,"-slash")},"/"),zt));var vt=Gt?1:2;if(zt<=3+vt*2){zt||pn.push(h.createElement(K,(0,re.Z)({},Ot,{key:"noPager",page:1,className:"".concat(de,"-item-disabled")})));for(var xt=1;xt<=zt;xt+=1)pn.push(h.createElement(K,(0,re.Z)({},Ot,{key:xt,page:xt,active:Ct===xt})))}else{var Vt=Gt?_e.prev_3:_e.prev_5,Jt=Gt?_e.next_3:_e.next_5,Zt=Ce(z,"jump-prev",me(ke,"prev page")),vn=Ce(le,"jump-next",me(Le,"next page"));Ut&&(Lt=Zt?h.createElement("li",{title:tn?Vt:null,key:"prev",onClick:tr,tabIndex:0,onKeyDown:Yn,className:fe()("".concat(de,"-jump-prev"),(0,P.Z)({},"".concat(de,"-jump-prev-custom-icon"),!!ke))},Zt):null,Xt=vn?h.createElement("li",{title:tn?Jt:null,key:"next",onClick:gr,tabIndex:0,onKeyDown:or,className:fe()("".concat(de,"-jump-next"),(0,P.Z)({},"".concat(de,"-jump-next-custom-icon"),!!Le))},vn):null);var Bn=Math.max(1,Ct-vt),Dn=Math.min(Ct+vt,zt);Ct-1<=vt&&(Dn=1+vt*2),zt-Ct<=vt&&(Bn=zt-vt*2);for(var st=Bn;st<=Dn;st+=1)pn.push(h.createElement(K,(0,re.Z)({},Ot,{key:st,page:st,active:Ct===st})));if(Ct-1>=vt*2&&Ct!==3&&(pn[0]=h.cloneElement(pn[0],{className:fe()("".concat(de,"-item-after-jump-prev"),pn[0].props.className)}),pn.unshift(Lt)),zt-Ct>=vt*2&&Ct!==zt-2){var En=pn[pn.length-1];pn[pn.length-1]=h.cloneElement(En,{className:fe()("".concat(de,"-item-before-jump-next"),En.props.className)}),pn.push(Xt)}Bn!==1&&pn.unshift(h.createElement(K,(0,re.Z)({},Ot,{key:1,page:1}))),Dn!==zt&&pn.push(h.createElement(K,(0,re.Z)({},Ot,{key:zt,page:zt})))}var mn=Ke(cn);if(mn){var L=!On||!zt;mn=h.createElement("li",{title:tn?_e.prev_page:null,onClick:ar,tabIndex:L?null:0,onKeyDown:Kt,className:fe()("".concat(de,"-prev"),(0,P.Z)({},"".concat(de,"-disabled"),L)),"aria-disabled":L},mn)}var k=Pe(un);if(k){var ce,ye;T?(ce=!Un,ye=On?0:null):(ce=!Un||!zt,ye=ce?null:0),k=h.createElement("li",{title:tn?_e.next_page:null,onClick:mr,tabIndex:ye,onKeyDown:yn,className:fe()("".concat(de,"-next"),(0,P.Z)({},"".concat(de,"-disabled"),ce)),"aria-disabled":ce},k)}var Ge=fe()(de,M,(0,P.Z)((0,P.Z)((0,P.Z)((0,P.Z)((0,P.Z)({},"".concat(de,"-start"),Et==="start"),"".concat(de,"-center"),Et==="center"),"".concat(de,"-end"),Et==="end"),"".concat(de,"-simple"),T),"".concat(de,"-disabled"),V));return h.createElement("ul",(0,re.Z)({className:Ge,style:N,ref:qe},qt),nn,mn,T?Ye:pn,k,h.createElement(F,{locale:_e,rootPrefixCls:de,disabled:V,selectPrefixCls:W,changeSize:Wn,pageSize:It,pageSizeOptions:ue,quickGo:Tt?zn:null,goButton:Re,showSizeChanger:te,sizeChangerRender:$}))},ae=q},29301:function(Cn,tt,b){"use strict";b.d(tt,{Z:function(){return W}});var P=b(67711),re=b(59301),ge=b(11592),se=b(48736),U=b(98506),f=b(26420),fe=b(76846),ee=b(8654),A=re.createContext(null);function E(M){var X=M.children,G=M.onBatchResize,ne=re.useRef(0),Z=re.useRef([]),m=re.useContext(A),v=re.useCallback(function(Q,he,Ue){ne.current+=1;var Oe=ne.current;Z.current.push({size:Q,element:he,data:Ue}),Promise.resolve().then(function(){Oe===ne.current&&(G==null||G(Z.current),Z.current=[])}),m==null||m(Q,he,Ue)},[G,m]);return re.createElement(A.Provider,{value:v},X)}var x=b(76374),h=new Map;function p(M){M.forEach(function(X){var G,ne=X.target;(G=h.get(ne))===null||G===void 0||G.forEach(function(Z){return Z(ne)})})}var _=new x.Z(p),C=null,F=null;function R(M,X){h.has(M)||(h.set(M,new Set),_.observe(M)),h.get(M).add(X)}function K(M,X){h.has(M)&&(h.get(M).delete(X),h.get(M).size||(_.unobserve(M),h.delete(M)))}var B=b(42573),D=b(58698),I=b(74700),S=b(45080),q=function(M){(0,I.Z)(G,M);var X=(0,S.Z)(G);function G(){return(0,B.Z)(this,G),X.apply(this,arguments)}return(0,D.Z)(G,[{key:"render",value:function(){return this.props.children}}]),G}(re.Component);function ae(M,X){var G=M.children,ne=M.disabled,Z=re.useRef(null),m=re.useRef(null),v=re.useContext(A),Q=typeof G=="function",he=Q?G(Z):G,Ue=re.useRef({width:-1,height:-1,offsetWidth:-1,offsetHeight:-1}),Oe=!Q&&re.isValidElement(he)&&(0,ee.Yr)(he),ft=Oe?(0,ee.C4)(he):null,Et=(0,ee.x1)(ft,Z),Ft=function(){var ht;return(0,fe.ZP)(Z.current)||(Z.current&&(0,f.Z)(Z.current)==="object"?(0,fe.ZP)((ht=Z.current)===null||ht===void 0?void 0:ht.nativeElement):null)||(0,fe.ZP)(m.current)};re.useImperativeHandle(X,function(){return Ft()});var Ut=re.useRef(M);Ut.current=M;var Se=re.useCallback(function(Gt){var ht=Ut.current,tn=ht.onResize,dt=ht.data,Je=Gt.getBoundingClientRect(),xe=Je.width,_e=Je.height,N=Gt.offsetWidth,Fe=Gt.offsetHeight,De=Math.floor(xe),V=Math.floor(_e);if(Ue.current.width!==De||Ue.current.height!==V||Ue.current.offsetWidth!==N||Ue.current.offsetHeight!==Fe){var T={width:De,height:V,offsetWidth:N,offsetHeight:Fe};Ue.current=T;var J=N===Math.round(xe)?xe:N,ve=Fe===Math.round(_e)?_e:Fe,te=(0,U.Z)((0,U.Z)({},T),{},{offsetWidth:J,offsetHeight:ve});v==null||v(te,Gt,dt),tn&&Promise.resolve().then(function(){tn(te,Gt)})}},[]);return re.useEffect(function(){var Gt=Ft();return Gt&&!ne&&R(Gt,Se),function(){return K(Gt,Se)}},[Z.current,ne]),re.createElement(q,{ref:m},Oe?re.cloneElement(he,{ref:Et}):he)}var j=re.forwardRef(ae),Y=j,ie="rc-observer-key";function de(M,X){var G=M.children,ne=typeof G=="function"?[G]:(0,ge.Z)(G);return ne.map(function(Z,m){var v=(Z==null?void 0:Z.key)||"".concat(ie,"-").concat(m);return re.createElement(Y,(0,P.Z)({},M,{key:v,ref:m===0?X:void 0}),Z)})}var pe=re.forwardRef(de);pe.Collection=E;var W=pe},6551:function(Cn,tt,b){"use strict";b.d(tt,{ZP:function(){return fe}});var P=b(16886),re=b(59301),ge=b(47273),se=0,U=(0,ge.Z)();function f(){var ee;return U?(ee=se,se+=1):ee="TEST_OR_SSR",ee}function fe(ee){var A=re.useState(),E=(0,P.Z)(A,2),x=E[0],h=E[1];return re.useEffect(function(){h("rc_select_".concat(f()))},[]),ee||x}},37463:function(Cn,tt,b){"use strict";b.d(tt,{Ac:function(){return ut},Xo:function(){return It},Wx:function(){return on},ZP:function(){return or},lk:function(){return D}});var P=b(67711),re=b(15142),ge=b(52873),se=b(98506),U=b(16886),f=b(33346),fe=b(26420),ee=b(18929),A=b(48736),E=b(59301),x=b(92310),h=b.n(x),p=b(34280),_=b(49658),C=b(8654),F=function(Pe){var Yt=Pe.className,Lt=Pe.customizeIcon,qt=Pe.customizeIconProps,nn=Pe.children,Xt=Pe.onMouseDown,zt=Pe.onClick,pn=typeof Lt=="function"?Lt(qt):Lt;return E.createElement("span",{className:Yt,onMouseDown:function(cn){cn.preventDefault(),Xt==null||Xt(cn)},style:{userSelect:"none",WebkitUserSelect:"none"},unselectable:"on",onClick:zt,"aria-hidden":!0},pn!==void 0?pn:E.createElement("span",{className:h()(Yt.split(/\s+/).map(function(Ot){return"".concat(Ot,"-icon")}))},nn))},R=F,K=function(Pe,Yt,Lt,qt,nn){var Xt=arguments.length>5&&arguments[5]!==void 0?arguments[5]:!1,zt=arguments.length>6?arguments[6]:void 0,pn=arguments.length>7?arguments[7]:void 0,Ot=E.useMemo(function(){if((0,fe.Z)(qt)==="object")return qt.clearIcon;if(nn)return nn},[qt,nn]),cn=E.useMemo(function(){return!!(!Xt&&qt&&(Lt.length||zt)&&!(pn==="combobox"&&zt===""))},[qt,Xt,Lt.length,zt,pn]);return{allowClear:cn,clearIcon:E.createElement(R,{className:"".concat(Pe,"-clear"),onMouseDown:Yt,customizeIcon:Ot},"\xD7")}},B=E.createContext(null);function D(){return E.useContext(B)}function I(){var Ke=arguments.length>0&&arguments[0]!==void 0?arguments[0]:10,Pe=E.useState(!1),Yt=(0,U.Z)(Pe,2),Lt=Yt[0],qt=Yt[1],nn=E.useRef(null),Xt=function(){window.clearTimeout(nn.current)};E.useEffect(function(){return Xt},[]);var zt=function(Ot,cn){Xt(),nn.current=window.setTimeout(function(){qt(Ot),cn&&cn()},Ke)};return[Lt,zt,Xt]}function S(){var Ke=arguments.length>0&&arguments[0]!==void 0?arguments[0]:250,Pe=E.useRef(null),Yt=E.useRef(null);E.useEffect(function(){return function(){window.clearTimeout(Yt.current)}},[]);function Lt(qt){(qt||Pe.current===null)&&(Pe.current=qt),window.clearTimeout(Yt.current),Yt.current=window.setTimeout(function(){Pe.current=null},Ke)}return[function(){return Pe.current},Lt]}function q(Ke,Pe,Yt,Lt){var qt=E.useRef(null);qt.current={open:Pe,triggerOpen:Yt,customizedTrigger:Lt},E.useEffect(function(){function nn(Xt){var zt;if(!((zt=qt.current)!==null&&zt!==void 0&&zt.customizedTrigger)){var pn=Xt.target;pn.shadowRoot&&Xt.composed&&(pn=Xt.composedPath()[0]||pn),qt.current.open&&Ke().filter(function(Ot){return Ot}).every(function(Ot){return!Ot.contains(pn)&&Ot!==pn})&&qt.current.triggerOpen(!1)}}return window.addEventListener("mousedown",nn),function(){return window.removeEventListener("mousedown",nn)}},[])}var ae=b(10228);function j(Ke){return Ke&&![ae.Z.ESC,ae.Z.SHIFT,ae.Z.BACKSPACE,ae.Z.TAB,ae.Z.WIN_KEY,ae.Z.ALT,ae.Z.META,ae.Z.WIN_KEY_RIGHT,ae.Z.CTRL,ae.Z.SEMICOLON,ae.Z.EQUALS,ae.Z.CAPS_LOCK,ae.Z.CONTEXT_MENU,ae.Z.F1,ae.Z.F2,ae.Z.F3,ae.Z.F4,ae.Z.F5,ae.Z.F6,ae.Z.F7,ae.Z.F8,ae.Z.F9,ae.Z.F10,ae.Z.F11,ae.Z.F12].includes(Ke)}var Y=b(26112),ie=b(11780);function de(Ke,Pe,Yt){var Lt=(0,se.Z)((0,se.Z)({},Ke),Yt?Pe:{});return Object.keys(Pe).forEach(function(qt){var nn=Pe[qt];typeof nn=="function"&&(Lt[qt]=function(){for(var Xt,zt=arguments.length,pn=new Array(zt),Ot=0;Ot<zt;Ot++)pn[Ot]=arguments[Ot];return nn.apply(void 0,pn),(Xt=Ke[qt])===null||Xt===void 0?void 0:Xt.call.apply(Xt,[Ke].concat(pn))})}),Lt}var pe=de,W=["prefixCls","id","inputElement","autoFocus","autoComplete","editable","activeDescendantId","value","open","attrs"],M=function(Pe,Yt){var Lt=Pe.prefixCls,qt=Pe.id,nn=Pe.inputElement,Xt=Pe.autoFocus,zt=Pe.autoComplete,pn=Pe.editable,Ot=Pe.activeDescendantId,cn=Pe.value,un=Pe.open,lt=Pe.attrs,Pt=(0,f.Z)(Pe,W),Re=nn||E.createElement("input",null),Ye=Re,vt=Ye.ref,xt=Ye.props;return(0,A.Kp)(!("maxLength"in Re.props),"Passing 'maxLength' to input element directly may not work because input in BaseSelect is controlled."),Re=E.cloneElement(Re,(0,se.Z)((0,se.Z)((0,se.Z)({type:"search"},pe(Pt,xt,!0)),{},{id:qt,ref:(0,C.sQ)(Yt,vt),autoComplete:zt||"off",autoFocus:Xt,className:h()("".concat(Lt,"-selection-search-input"),xt==null?void 0:xt.className),role:"combobox","aria-expanded":un||!1,"aria-haspopup":"listbox","aria-owns":"".concat(qt,"_list"),"aria-autocomplete":"list","aria-controls":"".concat(qt,"_list"),"aria-activedescendant":un?Ot:void 0},lt),{},{value:pn?cn:"",readOnly:!pn,unselectable:pn?null:"on",style:(0,se.Z)((0,se.Z)({},xt.style),{},{opacity:pn?null:0})})),Re},X=E.forwardRef(M),G=X;function ne(Ke){return Array.isArray(Ke)?Ke:Ke!==void 0?[Ke]:[]}var Z=typeof window!="undefined"&&window.document&&window.document.documentElement,m=Z;function v(Ke){return Ke!=null}function Q(Ke){return!Ke&&Ke!==0}function he(Ke){return["string","number"].includes((0,fe.Z)(Ke))}function Ue(Ke){var Pe=void 0;return Ke&&(he(Ke.title)?Pe=Ke.title.toString():he(Ke.label)&&(Pe=Ke.label.toString())),Pe}function Oe(Ke,Pe){m?E.useLayoutEffect(Ke,Pe):E.useEffect(Ke,Pe)}function ft(Ke){var Pe;return(Pe=Ke.key)!==null&&Pe!==void 0?Pe:Ke.value}var Et=function(Pe){Pe.preventDefault(),Pe.stopPropagation()},Ft=function(Pe){var Yt=Pe.id,Lt=Pe.prefixCls,qt=Pe.values,nn=Pe.open,Xt=Pe.searchValue,zt=Pe.autoClearSearchValue,pn=Pe.inputRef,Ot=Pe.placeholder,cn=Pe.disabled,un=Pe.mode,lt=Pe.showSearch,Pt=Pe.autoFocus,Re=Pe.autoComplete,Ye=Pe.activeDescendantId,vt=Pe.tabIndex,xt=Pe.removeIcon,Vt=Pe.maxTagCount,Jt=Pe.maxTagTextLength,Zt=Pe.maxTagPlaceholder,vn=Zt===void 0?function(nt){return"+ ".concat(nt.length," ...")}:Zt,Bn=Pe.tagRender,Dn=Pe.onToggleOpen,st=Pe.onRemove,En=Pe.onInputChange,mn=Pe.onInputPaste,L=Pe.onInputKeyDown,k=Pe.onInputMouseDown,ce=Pe.onInputCompositionStart,ye=Pe.onInputCompositionEnd,Ge=Pe.onInputBlur,$e=E.useRef(null),gt=(0,E.useState)(0),Bt=(0,U.Z)(gt,2),Ht=Bt[0],kt=Bt[1],St=(0,E.useState)(!1),$t=(0,U.Z)(St,2),oe=$t[0],Ve=$t[1],Te="".concat(Lt,"-selection"),Me=nn||un==="multiple"&&zt===!1||un==="tags"?Xt:"",ze=un==="tags"||un==="multiple"&&zt===!1||lt&&(nn||oe);Oe(function(){kt($e.current.scrollWidth)},[Me]);var at=function(et,ot,Qt,en,An){return E.createElement("span",{title:Ue(et),className:h()("".concat(Te,"-item"),(0,ge.Z)({},"".concat(Te,"-item-disabled"),Qt))},E.createElement("span",{className:"".concat(Te,"-item-content")},ot),en&&E.createElement(R,{className:"".concat(Te,"-item-remove"),onMouseDown:Et,onClick:An,customizeIcon:xt},"\xD7"))},Dt=function(et,ot,Qt,en,An,bn){var Fn=function(Sn){Et(Sn),Dn(!nn)};return E.createElement("span",{onMouseDown:Fn},Bn({label:ot,value:et,disabled:Qt,closable:en,onClose:An,isMaxTag:!!bn}))},yt=function(et){var ot=et.disabled,Qt=et.label,en=et.value,An=!cn&&!ot,bn=Qt;if(typeof Jt=="number"&&(typeof Qt=="string"||typeof Qt=="number")){var Fn=String(bn);Fn.length>Jt&&(bn="".concat(Fn.slice(0,Jt),"..."))}var wn=function(dn){dn&&dn.stopPropagation(),st(et)};return typeof Bn=="function"?Dt(en,bn,ot,An,wn):at(et,bn,ot,An,wn)},it=function(et){if(!qt.length)return null;var ot=typeof vn=="function"?vn(et):vn;return typeof Bn=="function"?Dt(void 0,ot,!1,!1,void 0,!0):at({title:ot},ot,!1)},Ne=E.createElement("div",{className:"".concat(Te,"-search"),style:{width:Ht},onFocus:function(){Ve(!0)},onBlur:function(){Ve(!1)}},E.createElement(G,{ref:pn,open:nn,prefixCls:Lt,id:Yt,inputElement:null,disabled:cn,autoFocus:Pt,autoComplete:Re,editable:ze,activeDescendantId:Ye,value:Me,onKeyDown:L,onMouseDown:k,onChange:En,onPaste:mn,onCompositionStart:ce,onCompositionEnd:ye,onBlur:Ge,tabIndex:vt,attrs:(0,Y.Z)(Pe,!0)}),E.createElement("span",{ref:$e,className:"".concat(Te,"-search-mirror"),"aria-hidden":!0},Me,"\xA0")),Xe=E.createElement(ie.Z,{prefixCls:"".concat(Te,"-overflow"),data:qt,renderItem:yt,renderRest:it,suffix:Ne,itemKey:ft,maxCount:Vt});return E.createElement("span",{className:"".concat(Te,"-wrap")},Xe,!qt.length&&!Me&&E.createElement("span",{className:"".concat(Te,"-placeholder")},Ot))},Ut=Ft,Se=function(Pe){var Yt=Pe.inputElement,Lt=Pe.prefixCls,qt=Pe.id,nn=Pe.inputRef,Xt=Pe.disabled,zt=Pe.autoFocus,pn=Pe.autoComplete,Ot=Pe.activeDescendantId,cn=Pe.mode,un=Pe.open,lt=Pe.values,Pt=Pe.placeholder,Re=Pe.tabIndex,Ye=Pe.showSearch,vt=Pe.searchValue,xt=Pe.activeValue,Vt=Pe.maxLength,Jt=Pe.onInputKeyDown,Zt=Pe.onInputMouseDown,vn=Pe.onInputChange,Bn=Pe.onInputPaste,Dn=Pe.onInputCompositionStart,st=Pe.onInputCompositionEnd,En=Pe.onInputBlur,mn=Pe.title,L=E.useState(!1),k=(0,U.Z)(L,2),ce=k[0],ye=k[1],Ge=cn==="combobox",$e=Ge||Ye,gt=lt[0],Bt=vt||"";Ge&&xt&&!ce&&(Bt=xt),E.useEffect(function(){Ge&&ye(!1)},[Ge,xt]);var Ht=cn!=="combobox"&&!un&&!Ye?!1:!!Bt,kt=mn===void 0?Ue(gt):mn,St=E.useMemo(function(){return gt?null:E.createElement("span",{className:"".concat(Lt,"-selection-placeholder"),style:Ht?{visibility:"hidden"}:void 0},Pt)},[gt,Ht,Pt,Lt]);return E.createElement("span",{className:"".concat(Lt,"-selection-wrap")},E.createElement("span",{className:"".concat(Lt,"-selection-search")},E.createElement(G,{ref:nn,prefixCls:Lt,id:qt,open:un,inputElement:Yt,disabled:Xt,autoFocus:zt,autoComplete:pn,editable:$e,activeDescendantId:Ot,value:Bt,onKeyDown:Jt,onMouseDown:Zt,onChange:function(oe){ye(!0),vn(oe)},onPaste:Bn,onCompositionStart:Dn,onCompositionEnd:st,onBlur:En,tabIndex:Re,attrs:(0,Y.Z)(Pe,!0),maxLength:Ge?Vt:void 0})),!Ge&&gt?E.createElement("span",{className:"".concat(Lt,"-selection-item"),title:kt,style:Ht?{visibility:"hidden"}:void 0},gt.label):null,St)},Gt=Se,ht=function(Pe,Yt){var Lt=(0,E.useRef)(null),qt=(0,E.useRef)(!1),nn=Pe.prefixCls,Xt=Pe.open,zt=Pe.mode,pn=Pe.showSearch,Ot=Pe.tokenWithEnter,cn=Pe.disabled,un=Pe.prefix,lt=Pe.autoClearSearchValue,Pt=Pe.onSearch,Re=Pe.onSearchSubmit,Ye=Pe.onToggleOpen,vt=Pe.onInputKeyDown,xt=Pe.onInputBlur,Vt=Pe.domRef;E.useImperativeHandle(Yt,function(){return{focus:function(kt){Lt.current.focus(kt)},blur:function(){Lt.current.blur()}}});var Jt=S(0),Zt=(0,U.Z)(Jt,2),vn=Zt[0],Bn=Zt[1],Dn=function(kt){var St=kt.which,$t=Lt.current instanceof HTMLTextAreaElement;!$t&&Xt&&(St===ae.Z.UP||St===ae.Z.DOWN)&&kt.preventDefault(),vt&&vt(kt),St===ae.Z.ENTER&&zt==="tags"&&!qt.current&&!Xt&&(Re==null||Re(kt.target.value)),!($t&&!Xt&&~[ae.Z.UP,ae.Z.DOWN,ae.Z.LEFT,ae.Z.RIGHT].indexOf(St))&&j(St)&&Ye(!0)},st=function(){Bn(!0)},En=(0,E.useRef)(null),mn=function(kt){Pt(kt,!0,qt.current)!==!1&&Ye(!0)},L=function(){qt.current=!0},k=function(kt){qt.current=!1,zt!=="combobox"&&mn(kt.target.value)},ce=function(kt){var St=kt.target.value;if(Ot&&En.current&&/[\r\n]/.test(En.current)){var $t=En.current.replace(/[\r\n]+$/,"").replace(/\r\n/g," ").replace(/[\r\n]/g," ");St=St.replace($t,En.current)}En.current=null,mn(St)},ye=function(kt){var St=kt.clipboardData,$t=St==null?void 0:St.getData("text");En.current=$t||""},Ge=function(kt){var St=kt.target;if(St!==Lt.current){var $t=document.body.style.msTouchAction!==void 0;$t?setTimeout(function(){Lt.current.focus()}):Lt.current.focus()}},$e=function(kt){var St=vn();kt.target!==Lt.current&&!St&&!(zt==="combobox"&&cn)&&kt.preventDefault(),(zt!=="combobox"&&(!pn||!St)||!Xt)&&(Xt&&lt!==!1&&Pt("",!0,!1),Ye())},gt={inputRef:Lt,onInputKeyDown:Dn,onInputMouseDown:st,onInputChange:ce,onInputPaste:ye,onInputCompositionStart:L,onInputCompositionEnd:k,onInputBlur:xt},Bt=zt==="multiple"||zt==="tags"?E.createElement(Ut,(0,P.Z)({},Pe,gt)):E.createElement(Gt,(0,P.Z)({},Pe,gt));return E.createElement("div",{ref:Vt,className:"".concat(nn,"-selector"),onClick:Ge,onMouseDown:$e},un&&E.createElement("div",{className:"".concat(nn,"-prefix")},un),Bt)},tn=E.forwardRef(ht),dt=tn,Je=b(65030),xe=["prefixCls","disabled","visible","children","popupElement","animation","transitionName","dropdownStyle","dropdownClassName","direction","placement","builtinPlacements","dropdownMatchSelectWidth","dropdownRender","dropdownAlign","getPopupContainer","empty","getTriggerDOMNode","onPopupVisibleChange","onPopupMouseEnter"],_e=function(Pe){var Yt=Pe===!0?0:1;return{bottomLeft:{points:["tl","bl"],offset:[0,4],overflow:{adjustX:Yt,adjustY:1},htmlRegion:"scroll"},bottomRight:{points:["tr","br"],offset:[0,4],overflow:{adjustX:Yt,adjustY:1},htmlRegion:"scroll"},topLeft:{points:["bl","tl"],offset:[0,-4],overflow:{adjustX:Yt,adjustY:1},htmlRegion:"scroll"},topRight:{points:["br","tr"],offset:[0,-4],overflow:{adjustX:Yt,adjustY:1},htmlRegion:"scroll"}}},N=function(Pe,Yt){var Lt=Pe.prefixCls,qt=Pe.disabled,nn=Pe.visible,Xt=Pe.children,zt=Pe.popupElement,pn=Pe.animation,Ot=Pe.transitionName,cn=Pe.dropdownStyle,un=Pe.dropdownClassName,lt=Pe.direction,Pt=lt===void 0?"ltr":lt,Re=Pe.placement,Ye=Pe.builtinPlacements,vt=Pe.dropdownMatchSelectWidth,xt=Pe.dropdownRender,Vt=Pe.dropdownAlign,Jt=Pe.getPopupContainer,Zt=Pe.empty,vn=Pe.getTriggerDOMNode,Bn=Pe.onPopupVisibleChange,Dn=Pe.onPopupMouseEnter,st=(0,f.Z)(Pe,xe),En="".concat(Lt,"-dropdown"),mn=zt;xt&&(mn=xt(zt));var L=E.useMemo(function(){return Ye||_e(vt)},[Ye,vt]),k=pn?"".concat(En,"-").concat(pn):Ot,ce=typeof vt=="number",ye=E.useMemo(function(){return ce?null:vt===!1?"minWidth":"width"},[vt,ce]),Ge=cn;ce&&(Ge=(0,se.Z)((0,se.Z)({},Ge),{},{width:vt}));var $e=E.useRef(null);return E.useImperativeHandle(Yt,function(){return{getPopupElement:function(){var Bt;return(Bt=$e.current)===null||Bt===void 0?void 0:Bt.popupElement}}}),E.createElement(Je.Z,(0,P.Z)({},st,{showAction:Bn?["click"]:[],hideAction:Bn?["click"]:[],popupPlacement:Re||(Pt==="rtl"?"bottomRight":"bottomLeft"),builtinPlacements:L,prefixCls:En,popupTransitionName:k,popup:E.createElement("div",{onMouseEnter:Dn},mn),ref:$e,stretch:ye,popupAlign:Vt,popupVisible:nn,getPopupContainer:Jt,popupClassName:h()(un,(0,ge.Z)({},"".concat(En,"-empty"),Zt)),popupStyle:Ge,getTriggerDOMNode:vn,onPopupVisibleChange:Bn}),Xt)},Fe=E.forwardRef(N),De=Fe,V=b(57879);function T(Ke,Pe){var Yt=Ke.key,Lt;return"value"in Ke&&(Lt=Ke.value),Yt!=null?Yt:Lt!==void 0?Lt:"rc-index-key-".concat(Pe)}function J(Ke){return typeof Ke!="undefined"&&!Number.isNaN(Ke)}function ve(Ke,Pe){var Yt=Ke||{},Lt=Yt.label,qt=Yt.value,nn=Yt.options,Xt=Yt.groupLabel,zt=Lt||(Pe?"children":"label");return{label:zt,value:qt||"value",options:nn||"options",groupLabel:Xt||zt}}function te(Ke){var Pe=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},Yt=Pe.fieldNames,Lt=Pe.childrenAsData,qt=[],nn=ve(Yt,!1),Xt=nn.label,zt=nn.value,pn=nn.options,Ot=nn.groupLabel;function cn(un,lt){Array.isArray(un)&&un.forEach(function(Pt){if(lt||!(pn in Pt)){var Re=Pt[zt];qt.push({key:T(Pt,qt.length),groupOption:lt,data:Pt,label:Pt[Xt],value:Re})}else{var Ye=Pt[Ot];Ye===void 0&&Lt&&(Ye=Pt.label),qt.push({key:T(Pt,qt.length),group:!0,data:Pt,label:Ye}),cn(Pt[pn],!0)}})}return cn(Ke,!1),qt}function $(Ke){var Pe=(0,se.Z)({},Ke);return"props"in Pe||Object.defineProperty(Pe,"props",{get:function(){return(0,A.ZP)(!1,"Return type is option instead of Option instance. Please read value directly instead of reading from `props`."),Pe}}),Pe}var ue=function(Pe,Yt,Lt){if(!Yt||!Yt.length)return null;var qt=!1,nn=function zt(pn,Ot){var cn=(0,V.Z)(Ot),un=cn[0],lt=cn.slice(1);if(!un)return[pn];var Pt=pn.split(un);return qt=qt||Pt.length>1,Pt.reduce(function(Re,Ye){return[].concat((0,re.Z)(Re),(0,re.Z)(zt(Ye,lt)))},[]).filter(Boolean)},Xt=nn(Pe,Yt);return qt?typeof Lt!="undefined"?Xt.slice(0,Lt):Xt:null},Ie=E.createContext(null),Ce=Ie;function ke(Ke){var Pe=Ke.visible,Yt=Ke.values;if(!Pe)return null;var Lt=50;return E.createElement("span",{"aria-live":"polite",style:{width:0,height:0,position:"absolute",overflow:"hidden",opacity:0}},"".concat(Yt.slice(0,Lt).map(function(qt){var nn=qt.label,Xt=qt.value;return["number","string"].includes((0,fe.Z)(nn))?nn:Xt}).join(", ")),Yt.length>Lt?", ...":null)}var Le=["id","prefixCls","className","showSearch","tagRender","direction","omitDomProps","displayValues","onDisplayValuesChange","emptyOptions","notFoundContent","onClear","mode","disabled","loading","getInputElement","getRawInputElement","open","defaultOpen","onDropdownVisibleChange","activeValue","onActiveValueChange","activeDescendantId","searchValue","autoClearSearchValue","onSearch","onSearchSplit","tokenSeparators","allowClear","prefix","suffixIcon","clearIcon","OptionList","animation","transitionName","dropdownStyle","dropdownClassName","dropdownMatchSelectWidth","dropdownRender","dropdownAlign","placement","builtinPlacements","getPopupContainer","showAction","onFocus","onBlur","onKeyUp","onKeyDown","onMouseDown"],mt=["value","onChange","removeIcon","placeholder","autoFocus","maxTagCount","maxTagTextLength","maxTagPlaceholder","choiceTransitionName","onInputKeyDown","onPopupScroll","tabIndex"],je=function(Pe){return Pe==="tags"||Pe==="multiple"},qe=E.forwardRef(function(Ke,Pe){var Yt,Lt=Ke.id,qt=Ke.prefixCls,nn=Ke.className,Xt=Ke.showSearch,zt=Ke.tagRender,pn=Ke.direction,Ot=Ke.omitDomProps,cn=Ke.displayValues,un=Ke.onDisplayValuesChange,lt=Ke.emptyOptions,Pt=Ke.notFoundContent,Re=Pt===void 0?"Not Found":Pt,Ye=Ke.onClear,vt=Ke.mode,xt=Ke.disabled,Vt=Ke.loading,Jt=Ke.getInputElement,Zt=Ke.getRawInputElement,vn=Ke.open,Bn=Ke.defaultOpen,Dn=Ke.onDropdownVisibleChange,st=Ke.activeValue,En=Ke.onActiveValueChange,mn=Ke.activeDescendantId,L=Ke.searchValue,k=Ke.autoClearSearchValue,ce=Ke.onSearch,ye=Ke.onSearchSplit,Ge=Ke.tokenSeparators,$e=Ke.allowClear,gt=Ke.prefix,Bt=Ke.suffixIcon,Ht=Ke.clearIcon,kt=Ke.OptionList,St=Ke.animation,$t=Ke.transitionName,oe=Ke.dropdownStyle,Ve=Ke.dropdownClassName,Te=Ke.dropdownMatchSelectWidth,Me=Ke.dropdownRender,ze=Ke.dropdownAlign,at=Ke.placement,Dt=Ke.builtinPlacements,yt=Ke.getPopupContainer,it=Ke.showAction,Ne=it===void 0?[]:it,Xe=Ke.onFocus,nt=Ke.onBlur,et=Ke.onKeyUp,ot=Ke.onKeyDown,Qt=Ke.onMouseDown,en=(0,f.Z)(Ke,Le),An=je(vt),bn=(Xt!==void 0?Xt:An)||vt==="combobox",Fn=(0,se.Z)({},en);mt.forEach(function(Fr){delete Fn[Fr]}),Ot==null||Ot.forEach(function(Fr){delete Fn[Fr]});var wn=E.useState(!1),Sn=(0,U.Z)(wn,2),dn=Sn[0],Xn=Sn[1];E.useEffect(function(){Xn((0,_.Z)())},[]);var Mn=E.useRef(null),cr=E.useRef(null),ln=E.useRef(null),Vn=E.useRef(null),nr=E.useRef(null),Jn=E.useRef(!1),Kn=I(),Nn=(0,U.Z)(Kn,3),xn=Nn[0],Pn=Nn[1],In=Nn[2];E.useImperativeHandle(Pe,function(){var Fr,Br;return{focus:(Fr=Vn.current)===null||Fr===void 0?void 0:Fr.focus,blur:(Br=Vn.current)===null||Br===void 0?void 0:Br.blur,scrollTo:function(ri){var ai;return(ai=nr.current)===null||ai===void 0?void 0:ai.scrollTo(ri)},nativeElement:Mn.current||cr.current}});var pr=E.useMemo(function(){var Fr;if(vt!=="combobox")return L;var Br=(Fr=cn[0])===null||Fr===void 0?void 0:Fr.value;return typeof Br=="string"||typeof Br=="number"?String(Br):""},[L,vt,cn]),fr=vt==="combobox"&&typeof Jt=="function"&&Jt()||null,hr=typeof Zt=="function"&&Zt(),Rr=(0,C.x1)(cr,hr==null||(Yt=hr.props)===null||Yt===void 0?void 0:Yt.ref),Zr=E.useState(!1),Yr=(0,U.Z)(Zr,2),ii=Yr[0],Xr=Yr[1];(0,p.Z)(function(){Xr(!0)},[]);var si=(0,ee.Z)(!1,{defaultValue:Bn,value:vn}),Er=(0,U.Z)(si,2),Ir=Er[0],ti=Er[1],xr=ii?Ir:!1,wr=!Re&&lt;(xt||wr&&xr&&vt==="combobox")&&(xr=!1);var Ar=wr?!1:xr,Tn=E.useCallback(function(Fr){var Br=Fr!==void 0?Fr:!xr;xt||(ti(Br),xr!==Br&&(Dn==null||Dn(Br)))},[xt,xr,ti,Dn]),sr=E.useMemo(function(){return(Ge||[]).some(function(Fr){return[`
`,`\r
`].includes(Fr)})},[Ge]),lr=E.useContext(Ce)||{},dr=lr.maxCount,br=lr.rawValues,Dr=function(Br,Gr,ri){if(!(An&&J(dr)&&(br==null?void 0:br.size)>=dr)){var ai=!0,qr=Br;En==null||En(null);var bi=ue(Br,Ge,J(dr)?dr-br.size:void 0),gi=ri?null:bi;return vt!=="combobox"&&gi&&(qr="",ye==null||ye(gi),Tn(!1),ai=!1),ce&&pr!==qr&&ce(qr,{source:Gr?"typing":"effect"}),ai}},Sr=function(Br){!Br||!Br.trim()||ce(Br,{source:"submit"})};E.useEffect(function(){!xr&&!An&&vt!=="combobox"&&Dr("",!1,!1)},[xr]),E.useEffect(function(){Ir&&xt&&ti(!1),xt&&!Jn.current&&Pn(!1)},[xt]);var kn=S(),er=(0,U.Z)(kn,2),qn=er[0],Cr=er[1],Tr=E.useRef(!1),$r=function(Br){var Gr=qn(),ri=Br.key,ai=ri==="Enter";if(ai&&(vt!=="combobox"&&Br.preventDefault(),xr||Tn(!0)),Cr(!!pr),ri==="Backspace"&&!Gr&&An&&!pr&&cn.length){for(var qr=(0,re.Z)(cn),bi=null,gi=qr.length-1;gi>=0;gi-=1){var Ni=qr[gi];if(!Ni.disabled){qr.splice(gi,1),bi=Ni;break}}bi&&un(qr,{type:"remove",values:[bi]})}for(var Vr=arguments.length,vi=new Array(Vr>1?Vr-1:0),ji=1;ji<Vr;ji++)vi[ji-1]=arguments[ji];if(xr&&(!ai||!Tr.current)){var ki;ai&&(Tr.current=!0),(ki=nr.current)===null||ki===void 0||ki.onKeyDown.apply(ki,[Br].concat(vi))}ot==null||ot.apply(void 0,[Br].concat(vi))},ni=function(Br){for(var Gr=arguments.length,ri=new Array(Gr>1?Gr-1:0),ai=1;ai<Gr;ai++)ri[ai-1]=arguments[ai];if(xr){var qr;(qr=nr.current)===null||qr===void 0||qr.onKeyUp.apply(qr,[Br].concat(ri))}Br.key==="Enter"&&(Tr.current=!1),et==null||et.apply(void 0,[Br].concat(ri))},Mr=function(Br){var Gr=cn.filter(function(ri){return ri!==Br});un(Gr,{type:"remove",values:[Br]})},Ai=function(){Tr.current=!1},Ur=E.useRef(!1),mi=function(){Pn(!0),xt||(Xe&&!Ur.current&&Xe.apply(void 0,arguments),Ne.includes("focus")&&Tn(!0)),Ur.current=!0},Si=function(){Jn.current=!0,Pn(!1,function(){Ur.current=!1,Jn.current=!1,Tn(!1)}),!xt&&(pr&&(vt==="tags"?ce(pr,{source:"submit"}):vt==="multiple"&&ce("",{source:"blur"})),nt&&nt.apply(void 0,arguments))},Ti=[];E.useEffect(function(){return function(){Ti.forEach(function(Fr){return clearTimeout(Fr)}),Ti.splice(0,Ti.length)}},[]);var Kr=function(Br){var Gr,ri=Br.target,ai=(Gr=ln.current)===null||Gr===void 0?void 0:Gr.getPopupElement();if(ai&&ai.contains(ri)){var qr=setTimeout(function(){var Vr=Ti.indexOf(qr);if(Vr!==-1&&Ti.splice(Vr,1),In(),!dn&&!ai.contains(document.activeElement)){var vi;(vi=Vn.current)===null||vi===void 0||vi.focus()}});Ti.push(qr)}for(var bi=arguments.length,gi=new Array(bi>1?bi-1:0),Ni=1;Ni<bi;Ni++)gi[Ni-1]=arguments[Ni];Qt==null||Qt.apply(void 0,[Br].concat(gi))},Wi=E.useState({}),zi=(0,U.Z)(Wi,2),ns=zi[1];function Ii(){ns({})}var Ui;hr&&(Ui=function(Br){Tn(Br)}),q(function(){var Fr;return[Mn.current,(Fr=ln.current)===null||Fr===void 0?void 0:Fr.getPopupElement()]},Ar,Tn,!!hr);var Mi=E.useMemo(function(){return(0,se.Z)((0,se.Z)({},Ke),{},{notFoundContent:Re,open:xr,triggerOpen:Ar,id:Lt,showSearch:bn,multiple:An,toggleOpen:Tn})},[Ke,Re,Ar,xr,Lt,bn,An,Tn]),As=!!Bt||Vt,Jr;As&&(Jr=E.createElement(R,{className:h()("".concat(qt,"-arrow"),(0,ge.Z)({},"".concat(qt,"-arrow-loading"),Vt)),customizeIcon:Bt,customizeIconProps:{loading:Vt,searchValue:pr,open:xr,focused:xn,showSearch:bn}}));var Di=function(){var Br;Ye==null||Ye(),(Br=Vn.current)===null||Br===void 0||Br.focus(),un([],{type:"clear",values:cn}),Dr("",!1,!1)},Ei=K(qt,Di,cn,$e,Ht,xt,pr,vt),li=Ei.allowClear,Li=Ei.clearIcon,ds=E.createElement(kt,{ref:nr}),rs=h()(qt,nn,(0,ge.Z)((0,ge.Z)((0,ge.Z)((0,ge.Z)((0,ge.Z)((0,ge.Z)((0,ge.Z)((0,ge.Z)((0,ge.Z)((0,ge.Z)({},"".concat(qt,"-focused"),xn),"".concat(qt,"-multiple"),An),"".concat(qt,"-single"),!An),"".concat(qt,"-allow-clear"),$e),"".concat(qt,"-show-arrow"),As),"".concat(qt,"-disabled"),xt),"".concat(qt,"-loading"),Vt),"".concat(qt,"-open"),xr),"".concat(qt,"-customize-input"),fr),"".concat(qt,"-show-search"),bn)),di=E.createElement(De,{ref:ln,disabled:xt,prefixCls:qt,visible:Ar,popupElement:ds,animation:St,transitionName:$t,dropdownStyle:oe,dropdownClassName:Ve,direction:pn,dropdownMatchSelectWidth:Te,dropdownRender:Me,dropdownAlign:ze,placement:at,builtinPlacements:Dt,getPopupContainer:yt,empty:lt,getTriggerDOMNode:function(Br){return cr.current||Br},onPopupVisibleChange:Ui,onPopupMouseEnter:Ii},hr?E.cloneElement(hr,{ref:Rr}):E.createElement(dt,(0,P.Z)({},Ke,{domRef:cr,prefixCls:qt,inputElement:fr,ref:Vn,id:Lt,prefix:gt,showSearch:bn,autoClearSearchValue:k,mode:vt,activeDescendantId:mn,tagRender:zt,values:cn,open:xr,onToggleOpen:Tn,activeValue:st,searchValue:pr,onSearch:Dr,onSearchSubmit:Sr,onRemove:Mr,tokenWithEnter:sr,onInputBlur:Ai}))),ui;return hr?ui=di:ui=E.createElement("div",(0,P.Z)({className:rs},Fn,{ref:Mn,onMouseDown:Kr,onKeyDown:$r,onKeyUp:ni,onFocus:mi,onBlur:Si}),E.createElement(ke,{visible:xn&&!xr,values:cn}),di,Jr,li&&Li),E.createElement(B.Provider,{value:Mi},ui)}),ut=qe,Nt=function(){return null};Nt.isSelectOptGroup=!0;var It=Nt,bt=function(){return null};bt.isSelectOption=!0;var on=bt,rn=b(80547),Ct=b(2738),gn=b(6790);function Ln(){return/(mac\sos|macintosh)/i.test(navigator.appVersion)}var Mt=["disabled","title","children","style","className"];function hn(Ke){return typeof Ke=="string"||typeof Ke=="number"}var We=function(Pe,Yt){var Lt=D(),qt=Lt.prefixCls,nn=Lt.id,Xt=Lt.open,zt=Lt.multiple,pn=Lt.mode,Ot=Lt.searchValue,cn=Lt.toggleOpen,un=Lt.notFoundContent,lt=Lt.onPopupScroll,Pt=E.useContext(Ce),Re=Pt.maxCount,Ye=Pt.flattenOptions,vt=Pt.onActiveValue,xt=Pt.defaultActiveFirstOption,Vt=Pt.onSelect,Jt=Pt.menuItemSelectedIcon,Zt=Pt.rawValues,vn=Pt.fieldNames,Bn=Pt.virtual,Dn=Pt.direction,st=Pt.listHeight,En=Pt.listItemHeight,mn=Pt.optionRender,L="".concat(qt,"-item"),k=(0,rn.Z)(function(){return Ye},[Xt,Ye],function(it,Ne){return Ne[0]&&it[1]!==Ne[1]}),ce=E.useRef(null),ye=E.useMemo(function(){return zt&&J(Re)&&(Zt==null?void 0:Zt.size)>=Re},[zt,Re,Zt==null?void 0:Zt.size]),Ge=function(Ne){Ne.preventDefault()},$e=function(Ne){var Xe;(Xe=ce.current)===null||Xe===void 0||Xe.scrollTo(typeof Ne=="number"?{index:Ne}:Ne)},gt=E.useCallback(function(it){return pn==="combobox"?!1:Zt.has(it)},[pn,(0,re.Z)(Zt).toString(),Zt.size]),Bt=function(Ne){for(var Xe=arguments.length>1&&arguments[1]!==void 0?arguments[1]:1,nt=k.length,et=0;et<nt;et+=1){var ot=(Ne+et*Xe+nt)%nt,Qt=k[ot]||{},en=Qt.group,An=Qt.data;if(!en&&!(An!=null&&An.disabled)&&(gt(An.value)||!ye))return ot}return-1},Ht=E.useState(function(){return Bt(0)}),kt=(0,U.Z)(Ht,2),St=kt[0],$t=kt[1],oe=function(Ne){var Xe=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;$t(Ne);var nt={source:Xe?"keyboard":"mouse"},et=k[Ne];if(!et){vt(null,-1,nt);return}vt(et.value,Ne,nt)};(0,E.useEffect)(function(){oe(xt!==!1?Bt(0):-1)},[k.length,Ot]);var Ve=E.useCallback(function(it){return pn==="combobox"?String(it).toLowerCase()===Ot.toLowerCase():Zt.has(it)},[pn,Ot,(0,re.Z)(Zt).toString(),Zt.size]);(0,E.useEffect)(function(){var it=setTimeout(function(){if(!zt&&Xt&&Zt.size===1){var Xe=Array.from(Zt)[0],nt=k.findIndex(function(et){var ot=et.data;return Ot?String(ot.value).startsWith(Ot):ot.value===Xe});nt!==-1&&(oe(nt),$e(nt))}});if(Xt){var Ne;(Ne=ce.current)===null||Ne===void 0||Ne.scrollTo(void 0)}return function(){return clearTimeout(it)}},[Xt,Ot]);var Te=function(Ne){Ne!==void 0&&Vt(Ne,{selected:!Zt.has(Ne)}),zt||cn(!1)};if(E.useImperativeHandle(Yt,function(){return{onKeyDown:function(Ne){var Xe=Ne.which,nt=Ne.ctrlKey;switch(Xe){case ae.Z.N:case ae.Z.P:case ae.Z.UP:case ae.Z.DOWN:{var et=0;if(Xe===ae.Z.UP?et=-1:Xe===ae.Z.DOWN?et=1:Ln()&&nt&&(Xe===ae.Z.N?et=1:Xe===ae.Z.P&&(et=-1)),et!==0){var ot=Bt(St+et,et);$e(ot),oe(ot,!0)}break}case ae.Z.TAB:case ae.Z.ENTER:{var Qt,en=k[St];en&&!(en!=null&&(Qt=en.data)!==null&&Qt!==void 0&&Qt.disabled)&&!ye?Te(en.value):Te(void 0),Xt&&Ne.preventDefault();break}case ae.Z.ESC:cn(!1),Xt&&Ne.stopPropagation()}},onKeyUp:function(){},scrollTo:function(Ne){$e(Ne)}}}),k.length===0)return E.createElement("div",{role:"listbox",id:"".concat(nn,"_list"),className:"".concat(L,"-empty"),onMouseDown:Ge},un);var Me=Object.keys(vn).map(function(it){return vn[it]}),ze=function(Ne){return Ne.label};function at(it,Ne){var Xe=it.group;return{role:Xe?"presentation":"option",id:"".concat(nn,"_list_").concat(Ne)}}var Dt=function(Ne){var Xe=k[Ne];if(!Xe)return null;var nt=Xe.data||{},et=nt.value,ot=Xe.group,Qt=(0,Y.Z)(nt,!0),en=ze(Xe);return Xe?E.createElement("div",(0,P.Z)({"aria-label":typeof en=="string"&&!ot?en:null},Qt,{key:Ne},at(Xe,Ne),{"aria-selected":Ve(et)}),et):null},yt={role:"listbox",id:"".concat(nn,"_list")};return E.createElement(E.Fragment,null,Bn&&E.createElement("div",(0,P.Z)({},yt,{style:{height:0,width:0,overflow:"hidden"}}),Dt(St-1),Dt(St),Dt(St+1)),E.createElement(gn.Z,{itemKey:"key",ref:ce,data:k,height:st,itemHeight:En,fullHeight:!1,onMouseDown:Ge,onScroll:lt,virtual:Bn,direction:Dn,innerProps:Bn?null:yt},function(it,Ne){var Xe=it.group,nt=it.groupOption,et=it.data,ot=it.label,Qt=it.value,en=et.key;if(Xe){var An,bn=(An=et.title)!==null&&An!==void 0?An:hn(ot)?ot.toString():void 0;return E.createElement("div",{className:h()(L,"".concat(L,"-group"),et.className),title:bn},ot!==void 0?ot:en)}var Fn=et.disabled,wn=et.title,Sn=et.children,dn=et.style,Xn=et.className,Mn=(0,f.Z)(et,Mt),cr=(0,Ct.Z)(Mn,Me),ln=gt(Qt),Vn=Fn||!ln&&ye,nr="".concat(L,"-option"),Jn=h()(L,nr,Xn,(0,ge.Z)((0,ge.Z)((0,ge.Z)((0,ge.Z)({},"".concat(nr,"-grouped"),nt),"".concat(nr,"-active"),St===Ne&&!Vn),"".concat(nr,"-disabled"),Vn),"".concat(nr,"-selected"),ln)),Kn=ze(it),Nn=!Jt||typeof Jt=="function"||ln,xn=typeof Kn=="number"?Kn:Kn||Qt,Pn=hn(xn)?xn.toString():void 0;return wn!==void 0&&(Pn=wn),E.createElement("div",(0,P.Z)({},(0,Y.Z)(cr),Bn?{}:at(it,Ne),{"aria-selected":Ve(Qt),className:Jn,title:Pn,onMouseMove:function(){St===Ne||Vn||oe(Ne)},onClick:function(){Vn||Te(Qt)},style:dn}),E.createElement("div",{className:"".concat(nr,"-content")},typeof mn=="function"?mn(it,{index:Ne}):xn),E.isValidElement(Jt)||ln,Nn&&E.createElement(R,{className:"".concat(L,"-option-state"),customizeIcon:Jt,customizeIconProps:{value:Qt,disabled:Vn,isSelected:ln}},ln?"\u2713":null))}))},Qe=E.forwardRef(We),He=Qe,z=function(Ke,Pe){var Yt=E.useRef({values:new Map,options:new Map}),Lt=E.useMemo(function(){var nn=Yt.current,Xt=nn.values,zt=nn.options,pn=Ke.map(function(un){if(un.label===void 0){var lt;return(0,se.Z)((0,se.Z)({},un),{},{label:(lt=Xt.get(un.value))===null||lt===void 0?void 0:lt.label})}return un}),Ot=new Map,cn=new Map;return pn.forEach(function(un){Ot.set(un.value,un),cn.set(un.value,Pe.get(un.value)||zt.get(un.value))}),Yt.current.values=Ot,Yt.current.options=cn,pn},[Ke,Pe]),qt=E.useCallback(function(nn){return Pe.get(nn)||Yt.current.options.get(nn)},[Pe]);return[Lt,qt]};function le(Ke,Pe){return ne(Ke).join("").toUpperCase().includes(Pe)}var me=function(Ke,Pe,Yt,Lt,qt){return E.useMemo(function(){if(!Yt||Lt===!1)return Ke;var nn=Pe.options,Xt=Pe.label,zt=Pe.value,pn=[],Ot=typeof Lt=="function",cn=Yt.toUpperCase(),un=Ot?Lt:function(Pt,Re){return qt?le(Re[qt],cn):Re[nn]?le(Re[Xt!=="children"?Xt:"label"],cn):le(Re[zt],cn)},lt=Ot?function(Pt){return $(Pt)}:function(Pt){return Pt};return Ke.forEach(function(Pt){if(Pt[nn]){var Re=un(Yt,lt(Pt));if(Re)pn.push(Pt);else{var Ye=Pt[nn].filter(function(vt){return un(Yt,lt(vt))});Ye.length&&pn.push((0,se.Z)((0,se.Z)({},Pt),{},(0,ge.Z)({},nn,Ye)))}return}un(Yt,lt(Pt))&&pn.push(Pt)}),pn},[Ke,Lt,qt,Yt,Pe])},Be=b(6551),be=b(11592),Tt=["children","value"],Wt=["children"];function an(Ke){var Pe=Ke,Yt=Pe.key,Lt=Pe.props,qt=Lt.children,nn=Lt.value,Xt=(0,f.Z)(Lt,Tt);return(0,se.Z)({key:Yt,value:nn!==void 0?nn:Yt,children:qt},Xt)}function _n(Ke){var Pe=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;return(0,be.Z)(Ke).map(function(Yt,Lt){if(!E.isValidElement(Yt)||!Yt.type)return null;var qt=Yt,nn=qt.type.isSelectOptGroup,Xt=qt.key,zt=qt.props,pn=zt.children,Ot=(0,f.Z)(zt,Wt);return Pe||!nn?an(Yt):(0,se.Z)((0,se.Z)({key:"__RC_SELECT_GRP__".concat(Xt===null?Lt:Xt,"__"),label:Xt},Ot),{},{options:_n(pn)})}).filter(function(Yt){return Yt})}var Wn=function(Pe,Yt,Lt,qt,nn){return E.useMemo(function(){var Xt=Pe,zt=!Pe;zt&&(Xt=_n(Yt));var pn=new Map,Ot=new Map,cn=function(Pt,Re,Ye){Ye&&typeof Ye=="string"&&Pt.set(Re[Ye],Re)},un=function lt(Pt){for(var Re=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,Ye=0;Ye<Pt.length;Ye+=1){var vt=Pt[Ye];!vt[Lt.options]||Re?(pn.set(vt[Lt.value],vt),cn(Ot,vt,Lt.label),cn(Ot,vt,qt),cn(Ot,vt,nn)):lt(vt[Lt.options],!0)}};return un(Xt),{options:Xt,valueOptions:pn,labelOptions:Ot}},[Pe,Yt,Lt,qt,nn])},zn=Wn;function On(Ke){var Pe=E.useRef();Pe.current=Ke;var Yt=E.useCallback(function(){return Pe.current.apply(Pe,arguments)},[]);return Yt}function Un(Ke){var Pe=Ke.mode,Yt=Ke.options,Lt=Ke.children,qt=Ke.backfill,nn=Ke.allowClear,Xt=Ke.placeholder,zt=Ke.getInputElement,pn=Ke.showSearch,Ot=Ke.onSearch,cn=Ke.defaultOpen,un=Ke.autoFocus,lt=Ke.labelInValue,Pt=Ke.value,Re=Ke.inputValue,Ye=Ke.optionLabelProp,vt=isMultiple(Pe),xt=pn!==void 0?pn:vt||Pe==="combobox",Vt=Yt||convertChildrenToData(Lt);if(warning(Pe!=="tags"||Vt.every(function(Bn){return!Bn.disabled}),"Please avoid setting option to disabled in tags mode since user can always type text as tag."),Pe==="tags"||Pe==="combobox"){var Jt=Vt.some(function(Bn){return Bn.options?Bn.options.some(function(Dn){return typeof("value"in Dn?Dn.value:Dn.key)=="number"}):typeof("value"in Bn?Bn.value:Bn.key)=="number"});warning(!Jt,"`value` of Option should not use number type when `mode` is `tags` or `combobox`.")}if(warning(Pe!=="combobox"||!Ye,"`combobox` mode not support `optionLabelProp`. Please set `value` on Option directly."),warning(Pe==="combobox"||!qt,"`backfill` only works with `combobox` mode."),warning(Pe==="combobox"||!zt,"`getInputElement` only work with `combobox` mode."),noteOnce(Pe!=="combobox"||!zt||!nn||!Xt,"Customize `getInputElement` should customize clear and placeholder logic instead of configuring `allowClear` and `placeholder`."),Ot&&!xt&&Pe!=="combobox"&&Pe!=="tags"&&warning(!1,"`onSearch` should work with `showSearch` instead of use alone."),noteOnce(!cn||un,"`defaultOpen` makes Select open without focus which means it will not close by click outside. You can set `autoFocus` if needed."),Pt!=null){var Zt=toArray(Pt);warning(!lt||Zt.every(function(Bn){return _typeof(Bn)==="object"&&("key"in Bn||"value"in Bn)}),"`value` should in shape of `{ value: string | number, label?: ReactNode }` when you set `labelInValue` to `true`"),warning(!vt||Array.isArray(Pt),"`value` should be array when `mode` is `multiple` or `tags`")}if(Lt){var vn=null;toNodeArray(Lt).some(function(Bn){if(!React.isValidElement(Bn)||!Bn.type)return!1;var Dn=Bn,st=Dn.type;if(st.isSelectOption)return!1;if(st.isSelectOptGroup){var En=toNodeArray(Bn.props.children).every(function(mn){return!React.isValidElement(mn)||!Bn.type||mn.type.isSelectOption?!0:(vn=mn.type,!1)});return!En}return vn=st,!0}),vn&&warning(!1,"`children` should be `Select.Option` or `Select.OptGroup` instead of `".concat(vn.displayName||vn.name||vn,"`.")),warning(Re===void 0,"`inputValue` is deprecated, please use `searchValue` instead.")}}function ar(Ke,Pe){if(Ke){var Yt=function Lt(qt){for(var nn=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,Xt=0;Xt<qt.length;Xt++){var zt=qt[Xt];if(zt[Pe==null?void 0:Pe.value]===null)return warning(!1,"`value` in Select options should not be `null`."),!0;if(!nn&&Array.isArray(zt[Pe==null?void 0:Pe.options])&&Lt(zt[Pe==null?void 0:Pe.options],!0))break}};Yt(Ke)}}var mr=null,tr=["id","mode","prefixCls","backfill","fieldNames","inputValue","searchValue","onSearch","autoClearSearchValue","onSelect","onDeselect","dropdownMatchSelectWidth","filterOption","filterSort","optionFilterProp","optionLabelProp","options","optionRender","children","defaultActiveFirstOption","menuItemSelectedIcon","virtual","direction","listHeight","listItemHeight","labelRender","value","defaultValue","labelInValue","onChange","maxCount"],gr=["inputValue"];function sn(Ke){return!Ke||(0,fe.Z)(Ke)!=="object"}var Kt=E.forwardRef(function(Ke,Pe){var Yt=Ke.id,Lt=Ke.mode,qt=Ke.prefixCls,nn=qt===void 0?"rc-select":qt,Xt=Ke.backfill,zt=Ke.fieldNames,pn=Ke.inputValue,Ot=Ke.searchValue,cn=Ke.onSearch,un=Ke.autoClearSearchValue,lt=un===void 0?!0:un,Pt=Ke.onSelect,Re=Ke.onDeselect,Ye=Ke.dropdownMatchSelectWidth,vt=Ye===void 0?!0:Ye,xt=Ke.filterOption,Vt=Ke.filterSort,Jt=Ke.optionFilterProp,Zt=Ke.optionLabelProp,vn=Ke.options,Bn=Ke.optionRender,Dn=Ke.children,st=Ke.defaultActiveFirstOption,En=Ke.menuItemSelectedIcon,mn=Ke.virtual,L=Ke.direction,k=Ke.listHeight,ce=k===void 0?200:k,ye=Ke.listItemHeight,Ge=ye===void 0?20:ye,$e=Ke.labelRender,gt=Ke.value,Bt=Ke.defaultValue,Ht=Ke.labelInValue,kt=Ke.onChange,St=Ke.maxCount,$t=(0,f.Z)(Ke,tr),oe=(0,Be.ZP)(Yt),Ve=je(Lt),Te=!!(!vn&&Dn),Me=E.useMemo(function(){return xt===void 0&&Lt==="combobox"?!1:xt},[xt,Lt]),ze=E.useMemo(function(){return ve(zt,Te)},[JSON.stringify(zt),Te]),at=(0,ee.Z)("",{value:Ot!==void 0?Ot:pn,postState:function(sr){return sr||""}}),Dt=(0,U.Z)(at,2),yt=Dt[0],it=Dt[1],Ne=zn(vn,Dn,ze,Jt,Zt),Xe=Ne.valueOptions,nt=Ne.labelOptions,et=Ne.options,ot=E.useCallback(function(Tn){var sr=ne(Tn);return sr.map(function(lr){var dr,br,Dr,Sr,kn;if(sn(lr))dr=lr;else{var er;Dr=lr.key,br=lr.label,dr=(er=lr.value)!==null&&er!==void 0?er:Dr}var qn=Xe.get(dr);if(qn){var Cr;if(br===void 0&&(br=qn==null?void 0:qn[Zt||ze.label]),Dr===void 0&&(Dr=(Cr=qn==null?void 0:qn.key)!==null&&Cr!==void 0?Cr:dr),Sr=qn==null?void 0:qn.disabled,kn=qn==null?void 0:qn.title,0)var Tr}return{label:br,value:dr,key:Dr,disabled:Sr,title:kn}})},[ze,Zt,Xe]),Qt=(0,ee.Z)(Bt,{value:gt}),en=(0,U.Z)(Qt,2),An=en[0],bn=en[1],Fn=E.useMemo(function(){var Tn,sr=Ve&&An===null?[]:An,lr=ot(sr);return Lt==="combobox"&&Q((Tn=lr[0])===null||Tn===void 0?void 0:Tn.value)?[]:lr},[An,ot,Lt,Ve]),wn=z(Fn,Xe),Sn=(0,U.Z)(wn,2),dn=Sn[0],Xn=Sn[1],Mn=E.useMemo(function(){if(!Lt&&dn.length===1){var Tn=dn[0];if(Tn.value===null&&(Tn.label===null||Tn.label===void 0))return[]}return dn.map(function(sr){var lr;return(0,se.Z)((0,se.Z)({},sr),{},{label:(lr=typeof $e=="function"?$e(sr):sr.label)!==null&&lr!==void 0?lr:sr.value})})},[Lt,dn,$e]),cr=E.useMemo(function(){return new Set(dn.map(function(Tn){return Tn.value}))},[dn]);E.useEffect(function(){if(Lt==="combobox"){var Tn,sr=(Tn=dn[0])===null||Tn===void 0?void 0:Tn.value;it(v(sr)?String(sr):"")}},[dn]);var ln=On(function(Tn,sr){var lr=sr!=null?sr:Tn;return(0,ge.Z)((0,ge.Z)({},ze.value,Tn),ze.label,lr)}),Vn=E.useMemo(function(){if(Lt!=="tags")return et;var Tn=(0,re.Z)(et),sr=function(dr){return Xe.has(dr)};return(0,re.Z)(dn).sort(function(lr,dr){return lr.value<dr.value?-1:1}).forEach(function(lr){var dr=lr.value;sr(dr)||Tn.push(ln(dr,lr.label))}),Tn},[ln,et,Xe,dn,Lt]),nr=me(Vn,ze,yt,Me,Jt),Jn=E.useMemo(function(){return Lt!=="tags"||!yt||nr.some(function(Tn){return Tn[Jt||"value"]===yt})||nr.some(function(Tn){return Tn[ze.value]===yt})?nr:[ln(yt)].concat((0,re.Z)(nr))},[ln,Jt,Lt,nr,yt,ze]),Kn=function Tn(sr){var lr=(0,re.Z)(sr).sort(function(dr,br){return Vt(dr,br,{searchValue:yt})});return lr.map(function(dr){return Array.isArray(dr.options)?(0,se.Z)((0,se.Z)({},dr),{},{options:dr.options.length>0?Tn(dr.options):dr.options}):dr})},Nn=E.useMemo(function(){return Vt?Kn(Jn):Jn},[Jn,Vt,yt]),xn=E.useMemo(function(){return te(Nn,{fieldNames:ze,childrenAsData:Te})},[Nn,ze,Te]),Pn=function(sr){var lr=ot(sr);if(bn(lr),kt&&(lr.length!==dn.length||lr.some(function(Dr,Sr){var kn;return((kn=dn[Sr])===null||kn===void 0?void 0:kn.value)!==(Dr==null?void 0:Dr.value)}))){var dr=Ht?lr:lr.map(function(Dr){return Dr.value}),br=lr.map(function(Dr){return $(Xn(Dr.value))});kt(Ve?dr:dr[0],Ve?br:br[0])}},In=E.useState(null),pr=(0,U.Z)(In,2),fr=pr[0],hr=pr[1],Rr=E.useState(0),Zr=(0,U.Z)(Rr,2),Yr=Zr[0],ii=Zr[1],Xr=st!==void 0?st:Lt!=="combobox",si=E.useCallback(function(Tn,sr){var lr=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},dr=lr.source,br=dr===void 0?"keyboard":dr;ii(sr),Xt&&Lt==="combobox"&&Tn!==null&&br==="keyboard"&&hr(String(Tn))},[Xt,Lt]),Er=function(sr,lr,dr){var br=function(){var Mr,Ai=Xn(sr);return[Ht?{label:Ai==null?void 0:Ai[ze.label],value:sr,key:(Mr=Ai==null?void 0:Ai.key)!==null&&Mr!==void 0?Mr:sr}:sr,$(Ai)]};if(lr&&Pt){var Dr=br(),Sr=(0,U.Z)(Dr,2),kn=Sr[0],er=Sr[1];Pt(kn,er)}else if(!lr&&Re&&dr!=="clear"){var qn=br(),Cr=(0,U.Z)(qn,2),Tr=Cr[0],$r=Cr[1];Re(Tr,$r)}},Ir=On(function(Tn,sr){var lr,dr=Ve?sr.selected:!0;dr?lr=Ve?[].concat((0,re.Z)(dn),[Tn]):[Tn]:lr=dn.filter(function(br){return br.value!==Tn}),Pn(lr),Er(Tn,dr),Lt==="combobox"?hr(""):(!je||lt)&&(it(""),hr(""))}),ti=function(sr,lr){Pn(sr);var dr=lr.type,br=lr.values;(dr==="remove"||dr==="clear")&&br.forEach(function(Dr){Er(Dr.value,!1,dr)})},xr=function(sr,lr){if(it(sr),hr(null),lr.source==="submit"){var dr=(sr||"").trim();if(dr){var br=Array.from(new Set([].concat((0,re.Z)(cr),[dr])));Pn(br),Er(dr,!0),it("")}return}lr.source!=="blur"&&(Lt==="combobox"&&Pn(sr),cn==null||cn(sr))},wr=function(sr){var lr=sr;Lt!=="tags"&&(lr=sr.map(function(br){var Dr=nt.get(br);return Dr==null?void 0:Dr.value}).filter(function(br){return br!==void 0}));var dr=Array.from(new Set([].concat((0,re.Z)(cr),(0,re.Z)(lr))));Pn(dr),dr.forEach(function(br){Er(br,!0)})},Ar=E.useMemo(function(){var Tn=mn!==!1&&vt!==!1;return(0,se.Z)((0,se.Z)({},Ne),{},{flattenOptions:xn,onActiveValue:si,defaultActiveFirstOption:Xr,onSelect:Ir,menuItemSelectedIcon:En,rawValues:cr,fieldNames:ze,virtual:Tn,direction:L,listHeight:ce,listItemHeight:Ge,childrenAsData:Te,maxCount:St,optionRender:Bn})},[St,Ne,xn,si,Xr,Ir,En,cr,ze,mn,vt,L,ce,Ge,Te,Bn]);return E.createElement(Ce.Provider,{value:Ar},E.createElement(ut,(0,P.Z)({},$t,{id:oe,prefixCls:nn,ref:Pe,omitDomProps:gr,mode:Lt,displayValues:Mn,onDisplayValuesChange:ti,direction:L,searchValue:yt,onSearch:xr,autoClearSearchValue:lt,onSearchSplit:wr,dropdownMatchSelectWidth:vt,OptionList:He,emptyOptions:!xn.length,activeValue:fr,activeDescendantId:"".concat(oe,"_list_").concat(Yr)})))}),yn=Kt;yn.Option=on,yn.OptGroup=It;var Yn=yn,or=Yn},86351:function(Cn,tt,b){"use strict";b.d(tt,{R:function(){return re},w:function(){return P}});var P={},re="rc-table-internal-hook"},97347:function(Cn,tt,b){"use strict";b.d(tt,{L:function(){return F},Z:function(){return I}});var P=b(16886),re=b(52873),ge=b(15142),se=b(26420),U=b(98506),f=b(33346),fe=b(11592),ee=b(48736),A=b(59301),E=b(86351),x=b(54451);function h(S){var q=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"";return typeof q=="number"?q:q.endsWith("%")?S*parseFloat(q)/100:null}function p(S,q,ae){return A.useMemo(function(){if(q&&q>0){var j=0,Y=0;S.forEach(function(ne){var Z=h(q,ne.width);Z?j+=Z:Y+=1});var ie=Math.max(q,ae),de=Math.max(ie-j,Y),pe=Y,W=de/Y,M=0,X=S.map(function(ne){var Z=(0,U.Z)({},ne),m=h(q,Z.width);if(m)Z.width=m;else{var v=Math.floor(W);Z.width=pe===1?de:v,de-=v,pe-=1}return M+=Z.width,Z});if(M<ie){var G=ie/M;de=ie,X.forEach(function(ne,Z){var m=Math.floor(ne.width*G);ne.width=Z===X.length-1?de:m,de-=m})}return[X,Math.max(M,ie)]}return[S,q]},[S,q,ae])}var _=["children"],C=["fixed"];function F(S){return(0,fe.Z)(S).filter(function(q){return A.isValidElement(q)}).map(function(q){var ae=q.key,j=q.props,Y=j.children,ie=(0,f.Z)(j,_),de=(0,U.Z)({key:ae},ie);return Y&&(de.children=F(Y)),de})}function R(S){return S.filter(function(q){return q&&(0,se.Z)(q)==="object"&&!q.hidden}).map(function(q){var ae=q.children;return ae&&ae.length>0?(0,U.Z)((0,U.Z)({},q),{},{children:R(ae)}):q})}function K(S){var q=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"key";return S.filter(function(ae){return ae&&(0,se.Z)(ae)==="object"}).reduce(function(ae,j,Y){var ie=j.fixed,de=ie===!0?"left":ie,pe="".concat(q,"-").concat(Y),W=j.children;return W&&W.length>0?[].concat((0,ge.Z)(ae),(0,ge.Z)(K(W,pe).map(function(M){return(0,U.Z)({fixed:de},M)}))):[].concat((0,ge.Z)(ae),[(0,U.Z)((0,U.Z)({key:pe},j),{},{fixed:de})])},[])}function B(S){return S.map(function(q){var ae=q.fixed,j=(0,f.Z)(q,C),Y=ae;return ae==="left"?Y="right":ae==="right"&&(Y="left"),(0,U.Z)({fixed:Y},j)})}function D(S,q){var ae=S.prefixCls,j=S.columns,Y=S.children,ie=S.expandable,de=S.expandedKeys,pe=S.columnTitle,W=S.getRowKey,M=S.onTriggerExpand,X=S.expandIcon,G=S.rowExpandable,ne=S.expandIconColumnIndex,Z=S.direction,m=S.expandRowByClick,v=S.columnWidth,Q=S.fixed,he=S.scrollWidth,Ue=S.clientWidth,Oe=A.useMemo(function(){var dt=j||F(Y)||[];return R(dt.slice())},[j,Y]),ft=A.useMemo(function(){if(ie){var dt=Oe.slice();if(!dt.includes(E.w)){var Je=ne||0;Je>=0&&(Je||Q==="left"||!Q)&&dt.splice(Je,0,E.w),Q==="right"&&dt.splice(Oe.length,0,E.w)}var xe=dt.indexOf(E.w);dt=dt.filter(function(De,V){return De!==E.w||V===xe});var _e=Oe[xe],N;Q?N=Q:N=_e?_e.fixed:null;var Fe=(0,re.Z)((0,re.Z)((0,re.Z)((0,re.Z)((0,re.Z)((0,re.Z)({},x.v,{className:"".concat(ae,"-expand-icon-col"),columnType:"EXPAND_COLUMN"}),"title",pe),"fixed",N),"className","".concat(ae,"-row-expand-icon-cell")),"width",v),"render",function(V,T,J){var ve=W(T,J),te=de.has(ve),$=G?G(T):!0,ue=X({prefixCls:ae,expanded:te,expandable:$,record:T,onExpand:M});return m?A.createElement("span",{onClick:function(Ce){return Ce.stopPropagation()}},ue):ue});return dt.map(function(De){return De===E.w?Fe:De})}return Oe.filter(function(De){return De!==E.w})},[ie,Oe,W,de,X,Z]),Et=A.useMemo(function(){var dt=ft;return q&&(dt=q(dt)),dt.length||(dt=[{render:function(){return null}}]),dt},[q,ft,Z]),Ft=A.useMemo(function(){return Z==="rtl"?B(K(Et)):K(Et)},[Et,Z,he]),Ut=A.useMemo(function(){for(var dt=-1,Je=Ft.length-1;Je>=0;Je-=1){var xe=Ft[Je].fixed;if(xe==="left"||xe===!0){dt=Je;break}}if(dt>=0)for(var _e=0;_e<=dt;_e+=1){var N=Ft[_e].fixed;if(N!=="left"&&N!==!0)return!0}var Fe=Ft.findIndex(function(T){var J=T.fixed;return J==="right"});if(Fe>=0)for(var De=Fe;De<Ft.length;De+=1){var V=Ft[De].fixed;if(V!=="right")return!0}return!1},[Ft]),Se=p(Ft,he,Ue),Gt=(0,P.Z)(Se,2),ht=Gt[0],tn=Gt[1];return[Et,ht,tn,Ut]}var I=D},4030:function(Cn,tt,b){"use strict";b.d(tt,{w2:function(){return P.w},vP:function(){return hn.v},RQ:function(){return P.R},ER:function(){return ve},Q$:function(){return xt},TN:function(){return kt}});var P=b(86351),re=b(16886),ge=b(6089),se=b(34280),U=b(13697),f=b(59301),fe=b(4676);function ee(oe){var Ve=f.createContext(void 0),Te=function(ze){var at=ze.value,Dt=ze.children,yt=f.useRef(at);yt.current=at;var it=f.useState(function(){return{getValue:function(){return yt.current},listeners:new Set}}),Ne=(0,re.Z)(it,1),Xe=Ne[0];return(0,se.Z)(function(){(0,fe.unstable_batchedUpdates)(function(){Xe.listeners.forEach(function(nt){nt(at)})})},[at]),f.createElement(Ve.Provider,{value:Xe},Dt)};return{Context:Ve,Provider:Te,defaultValue:oe}}function A(oe,Ve){var Te=(0,ge.Z)(typeof Ve=="function"?Ve:function(nt){if(Ve===void 0)return nt;if(!Array.isArray(Ve))return nt[Ve];var et={};return Ve.forEach(function(ot){et[ot]=nt[ot]}),et}),Me=f.useContext(oe==null?void 0:oe.Context),ze=Me||{},at=ze.listeners,Dt=ze.getValue,yt=f.useRef();yt.current=Te(Me?Dt():oe==null?void 0:oe.defaultValue);var it=f.useState({}),Ne=(0,re.Z)(it,2),Xe=Ne[1];return(0,se.Z)(function(){if(!Me)return;function nt(et){var ot=Te(et);(0,U.Z)(yt.current,ot,!0)||Xe({})}return at.add(nt),function(){at.delete(nt)}},[Me]),yt.current}var E=b(67711),x=b(8654);function h(){var oe=f.createContext(null);function Ve(){return f.useContext(oe)}function Te(ze,at){var Dt=(0,x.Yr)(ze),yt=function(Ne,Xe){var nt=Dt?{ref:Xe}:{},et=f.useRef(0),ot=f.useRef(Ne),Qt=Ve();return Qt!==null?f.createElement(ze,(0,E.Z)({},Ne,nt)):((!at||at(ot.current,Ne))&&(et.current+=1),ot.current=Ne,f.createElement(oe.Provider,{value:et.current},f.createElement(ze,(0,E.Z)({},Ne,nt))))};return Dt?f.forwardRef(yt):yt}function Me(ze,at){var Dt=(0,x.Yr)(ze),yt=function(Ne,Xe){var nt=Dt?{ref:Xe}:{};return Ve(),f.createElement(ze,(0,E.Z)({},Ne,nt))};return Dt?f.memo(f.forwardRef(yt),at):f.memo(yt,at)}return{makeImmutable:Te,responseImmutable:Me,useImmutableMark:Ve}}var p=h(),_=p.makeImmutable,C=p.responseImmutable,F=p.useImmutableMark,R=h(),K=R.makeImmutable,B=R.responseImmutable,D=R.useImmutableMark,I=ee(),S=I;function q(oe,Ve){var Te=React.useRef(0);Te.current+=1;var Me=React.useRef(oe),ze=[];Object.keys(oe||{}).map(function(Dt){var yt;(oe==null?void 0:oe[Dt])!==((yt=Me.current)===null||yt===void 0?void 0:yt[Dt])&&ze.push(Dt)}),Me.current=oe;var at=React.useRef([]);return ze.length&&(at.current=ze),React.useDebugValue(Te.current),React.useDebugValue(at.current.join(", ")),Ve&&console.log("".concat(Ve,":"),Te.current,at.current),Te.current}var ae=null,j=null,Y=b(26420),ie=b(98506),de=b(52873),pe=b(92310),W=b.n(pe),M=b(80547),X=b(97938),G=b(48736),ne=f.createContext({renderWithProps:!1}),Z=ne,m="RC_TABLE_KEY";function v(oe){return oe==null?[]:Array.isArray(oe)?oe:[oe]}function Q(oe){var Ve=[],Te={};return oe.forEach(function(Me){for(var ze=Me||{},at=ze.key,Dt=ze.dataIndex,yt=at||v(Dt).join("-")||m;Te[yt];)yt="".concat(yt,"_next");Te[yt]=!0,Ve.push(yt)}),Ve}function he(oe){return oe!=null}function Ue(oe){return typeof oe=="number"&&!Number.isNaN(oe)}function Oe(oe){return oe&&(0,Y.Z)(oe)==="object"&&!Array.isArray(oe)&&!f.isValidElement(oe)}function ft(oe,Ve,Te,Me,ze,at){var Dt=f.useContext(Z),yt=D(),it=(0,M.Z)(function(){if(he(Me))return[Me];var Ne=Ve==null||Ve===""?[]:Array.isArray(Ve)?Ve:[Ve],Xe=(0,X.Z)(oe,Ne),nt=Xe,et=void 0;if(ze){var ot=ze(Xe,oe,Te);Oe(ot)?(nt=ot.children,et=ot.props,Dt.renderWithProps=!0):nt=ot}return[nt,et]},[yt,oe,Me,Ve,ze,Te],function(Ne,Xe){if(at){var nt=(0,re.Z)(Ne,2),et=nt[1],ot=(0,re.Z)(Xe,2),Qt=ot[1];return at(Qt,et)}return Dt.renderWithProps?!0:!(0,U.Z)(Ne,Xe,!0)});return it}function Et(oe,Ve,Te,Me){var ze=oe+Ve-1;return oe<=Me&&ze>=Te}function Ft(oe,Ve){return A(S,function(Te){var Me=Et(oe,Ve||1,Te.hoverStartRow,Te.hoverEndRow);return[Me,Te.onHover]})}var Ut=b(70425),Se=function(Ve){var Te=Ve.ellipsis,Me=Ve.rowType,ze=Ve.children,at,Dt=Te===!0?{showTitle:!0}:Te;return Dt&&(Dt.showTitle||Me==="header")&&(typeof ze=="string"||typeof ze=="number"?at=ze.toString():f.isValidElement(ze)&&typeof ze.props.children=="string"&&(at=ze.props.children)),at};function Gt(oe){var Ve,Te,Me,ze,at,Dt,yt,it,Ne=oe.component,Xe=oe.children,nt=oe.ellipsis,et=oe.scope,ot=oe.prefixCls,Qt=oe.className,en=oe.align,An=oe.record,bn=oe.render,Fn=oe.dataIndex,wn=oe.renderIndex,Sn=oe.shouldCellUpdate,dn=oe.index,Xn=oe.rowType,Mn=oe.colSpan,cr=oe.rowSpan,ln=oe.fixLeft,Vn=oe.fixRight,nr=oe.firstFixLeft,Jn=oe.lastFixLeft,Kn=oe.firstFixRight,Nn=oe.lastFixRight,xn=oe.appendNode,Pn=oe.additionalProps,In=Pn===void 0?{}:Pn,pr=oe.isSticky,fr="".concat(ot,"-cell"),hr=A(S,["supportSticky","allColumnsFixedLeft","rowHoverable"]),Rr=hr.supportSticky,Zr=hr.allColumnsFixedLeft,Yr=hr.rowHoverable,ii=ft(An,Fn,wn,Xe,bn,Sn),Xr=(0,re.Z)(ii,2),si=Xr[0],Er=Xr[1],Ir={},ti=typeof ln=="number"&&Rr,xr=typeof Vn=="number"&&Rr;ti&&(Ir.position="sticky",Ir.left=ln),xr&&(Ir.position="sticky",Ir.right=Vn);var wr=(Ve=(Te=(Me=Er==null?void 0:Er.colSpan)!==null&&Me!==void 0?Me:In.colSpan)!==null&&Te!==void 0?Te:Mn)!==null&&Ve!==void 0?Ve:1,Ar=(ze=(at=(Dt=Er==null?void 0:Er.rowSpan)!==null&&Dt!==void 0?Dt:In.rowSpan)!==null&&at!==void 0?at:cr)!==null&&ze!==void 0?ze:1,Tn=Ft(dn,Ar),sr=(0,re.Z)(Tn,2),lr=sr[0],dr=sr[1],br=(0,Ut.zX)(function(Tr){var $r;An&&dr(dn,dn+Ar-1),In==null||($r=In.onMouseEnter)===null||$r===void 0||$r.call(In,Tr)}),Dr=(0,Ut.zX)(function(Tr){var $r;An&&dr(-1,-1),In==null||($r=In.onMouseLeave)===null||$r===void 0||$r.call(In,Tr)});if(wr===0||Ar===0)return null;var Sr=(yt=In.title)!==null&&yt!==void 0?yt:Se({rowType:Xn,ellipsis:nt,children:si}),kn=W()(fr,Qt,(it={},(0,de.Z)((0,de.Z)((0,de.Z)((0,de.Z)((0,de.Z)((0,de.Z)((0,de.Z)((0,de.Z)((0,de.Z)((0,de.Z)(it,"".concat(fr,"-fix-left"),ti&&Rr),"".concat(fr,"-fix-left-first"),nr&&Rr),"".concat(fr,"-fix-left-last"),Jn&&Rr),"".concat(fr,"-fix-left-all"),Jn&&Zr&&Rr),"".concat(fr,"-fix-right"),xr&&Rr),"".concat(fr,"-fix-right-first"),Kn&&Rr),"".concat(fr,"-fix-right-last"),Nn&&Rr),"".concat(fr,"-ellipsis"),nt),"".concat(fr,"-with-append"),xn),"".concat(fr,"-fix-sticky"),(ti||xr)&&pr&&Rr),(0,de.Z)(it,"".concat(fr,"-row-hover"),!Er&&lr)),In.className,Er==null?void 0:Er.className),er={};en&&(er.textAlign=en);var qn=(0,ie.Z)((0,ie.Z)((0,ie.Z)((0,ie.Z)({},Er==null?void 0:Er.style),Ir),er),In.style),Cr=si;return(0,Y.Z)(Cr)==="object"&&!Array.isArray(Cr)&&!f.isValidElement(Cr)&&(Cr=null),nt&&(Jn||Kn)&&(Cr=f.createElement("span",{className:"".concat(fr,"-content")},Cr)),f.createElement(Ne,(0,E.Z)({},Er,In,{className:kn,style:qn,title:Sr,scope:et,onMouseEnter:Yr?br:void 0,onMouseLeave:Yr?Dr:void 0,colSpan:wr!==1?wr:null,rowSpan:Ar!==1?Ar:null}),xn,Cr)}var ht=f.memo(Gt);function tn(oe,Ve,Te,Me,ze){var at=Te[oe]||{},Dt=Te[Ve]||{},yt,it;at.fixed==="left"?yt=Me.left[ze==="rtl"?Ve:oe]:Dt.fixed==="right"&&(it=Me.right[ze==="rtl"?oe:Ve]);var Ne=!1,Xe=!1,nt=!1,et=!1,ot=Te[Ve+1],Qt=Te[oe-1],en=ot&&!ot.fixed||Qt&&!Qt.fixed||Te.every(function(Sn){return Sn.fixed==="left"});if(ze==="rtl"){if(yt!==void 0){var An=Qt&&Qt.fixed==="left";et=!An&&en}else if(it!==void 0){var bn=ot&&ot.fixed==="right";nt=!bn&&en}}else if(yt!==void 0){var Fn=ot&&ot.fixed==="left";Ne=!Fn&&en}else if(it!==void 0){var wn=Qt&&Qt.fixed==="right";Xe=!wn&&en}return{fixLeft:yt,fixRight:it,lastFixLeft:Ne,firstFixRight:Xe,lastFixRight:nt,firstFixLeft:et,isSticky:Me.isSticky}}var dt=f.createContext({}),Je=dt;function xe(oe){var Ve=oe.className,Te=oe.index,Me=oe.children,ze=oe.colSpan,at=ze===void 0?1:ze,Dt=oe.rowSpan,yt=oe.align,it=A(S,["prefixCls","direction"]),Ne=it.prefixCls,Xe=it.direction,nt=f.useContext(Je),et=nt.scrollColumnIndex,ot=nt.stickyOffsets,Qt=nt.flattenColumns,en=Te+at-1,An=en+1===et?at+1:at,bn=tn(Te,Te+An-1,Qt,ot,Xe);return f.createElement(ht,(0,E.Z)({className:Ve,index:Te,component:"td",prefixCls:Ne,record:null,dataIndex:null,align:yt,colSpan:An,rowSpan:Dt,render:function(){return Me}},bn))}var _e=b(33346),N=["children"];function Fe(oe){var Ve=oe.children,Te=(0,_e.Z)(oe,N);return f.createElement("tr",Te,Ve)}function De(oe){var Ve=oe.children;return Ve}De.Row=Fe,De.Cell=xe;var V=De;function T(oe){var Ve=oe.children,Te=oe.stickyOffsets,Me=oe.flattenColumns,ze=A(S,"prefixCls"),at=Me.length-1,Dt=Me[at],yt=f.useMemo(function(){return{stickyOffsets:Te,flattenColumns:Me,scrollColumnIndex:Dt!=null&&Dt.scrollbar?at:null}},[Dt,Me,at,Te]);return f.createElement(Je.Provider,{value:yt},f.createElement("tfoot",{className:"".concat(ze,"-summary")},Ve))}var J=B(T),ve=V,te=b(29301),$=b(24514),ue=b(75152),Ie=b(26112);function Ce(oe,Ve,Te,Me,ze,at,Dt){oe.push({record:Ve,indent:Te,index:Dt});var yt=at(Ve),it=ze==null?void 0:ze.has(yt);if(Ve&&Array.isArray(Ve[Me])&&it)for(var Ne=0;Ne<Ve[Me].length;Ne+=1)Ce(oe,Ve[Me][Ne],Te+1,Me,ze,at,Ne)}function ke(oe,Ve,Te,Me){var ze=f.useMemo(function(){if(Te!=null&&Te.size){for(var at=[],Dt=0;Dt<(oe==null?void 0:oe.length);Dt+=1){var yt=oe[Dt];Ce(at,yt,0,Ve,Te,Me,Dt)}return at}return oe==null?void 0:oe.map(function(it,Ne){return{record:it,indent:0,index:Ne}})},[oe,Ve,Te,Me]);return ze}function Le(oe,Ve,Te,Me){var ze=A(S,["prefixCls","fixedInfoList","flattenColumns","expandableType","expandRowByClick","onTriggerExpand","rowClassName","expandedRowClassName","indentSize","expandIcon","expandedRowRender","expandIconColumnIndex","expandedKeys","childrenColumnName","rowExpandable","onRow"]),at=ze.flattenColumns,Dt=ze.expandableType,yt=ze.expandedKeys,it=ze.childrenColumnName,Ne=ze.onTriggerExpand,Xe=ze.rowExpandable,nt=ze.onRow,et=ze.expandRowByClick,ot=ze.rowClassName,Qt=Dt==="nest",en=Dt==="row"&&(!Xe||Xe(oe)),An=en||Qt,bn=yt&&yt.has(Ve),Fn=it&&oe&&oe[it],wn=(0,Ut.zX)(Ne),Sn=nt==null?void 0:nt(oe,Te),dn=Sn==null?void 0:Sn.onClick,Xn=function(Vn){et&&An&&Ne(oe,Vn);for(var nr=arguments.length,Jn=new Array(nr>1?nr-1:0),Kn=1;Kn<nr;Kn++)Jn[Kn-1]=arguments[Kn];dn==null||dn.apply(void 0,[Vn].concat(Jn))},Mn;typeof ot=="string"?Mn=ot:typeof ot=="function"&&(Mn=ot(oe,Te,Me));var cr=Q(at);return(0,ie.Z)((0,ie.Z)({},ze),{},{columnsKey:cr,nestExpandable:Qt,expanded:bn,hasNestChildren:Fn,record:oe,onTriggerExpand:wn,rowSupportExpand:en,expandable:An,rowProps:(0,ie.Z)((0,ie.Z)({},Sn),{},{className:W()(Mn,Sn==null?void 0:Sn.className),onClick:Xn})})}function mt(oe){var Ve=oe.prefixCls,Te=oe.children,Me=oe.component,ze=oe.cellComponent,at=oe.className,Dt=oe.expanded,yt=oe.colSpan,it=oe.isEmpty,Ne=A(S,["scrollbarSize","fixHeader","fixColumn","componentWidth","horizonScroll"]),Xe=Ne.scrollbarSize,nt=Ne.fixHeader,et=Ne.fixColumn,ot=Ne.componentWidth,Qt=Ne.horizonScroll,en=Te;return(it?Qt&&ot:et)&&(en=f.createElement("div",{style:{width:ot-(nt&&!it?Xe:0),position:"sticky",left:0,overflow:"hidden"},className:"".concat(Ve,"-expanded-row-fixed")},en)),f.createElement(Me,{className:at,style:{display:Dt?null:"none"}},f.createElement(ht,{component:ze,prefixCls:Ve,colSpan:yt},en))}var je=mt;function qe(oe){var Ve=oe.prefixCls,Te=oe.record,Me=oe.onExpand,ze=oe.expanded,at=oe.expandable,Dt="".concat(Ve,"-row-expand-icon");if(!at)return f.createElement("span",{className:W()(Dt,"".concat(Ve,"-row-spaced"))});var yt=function(Ne){Me(Te,Ne),Ne.stopPropagation()};return f.createElement("span",{className:W()(Dt,(0,de.Z)((0,de.Z)({},"".concat(Ve,"-row-expanded"),ze),"".concat(Ve,"-row-collapsed"),!ze)),onClick:yt})}function ut(oe,Ve,Te){var Me=[];function ze(at){(at||[]).forEach(function(Dt,yt){Me.push(Ve(Dt,yt)),ze(Dt[Te])})}return ze(oe),Me}function Nt(oe,Ve,Te,Me){return typeof oe=="string"?oe:typeof oe=="function"?oe(Ve,Te,Me):""}function It(oe,Ve,Te,Me,ze){var at=oe.record,Dt=oe.prefixCls,yt=oe.columnsKey,it=oe.fixedInfoList,Ne=oe.expandIconColumnIndex,Xe=oe.nestExpandable,nt=oe.indentSize,et=oe.expandIcon,ot=oe.expanded,Qt=oe.hasNestChildren,en=oe.onTriggerExpand,An=yt[Te],bn=it[Te],Fn;Te===(Ne||0)&&Xe&&(Fn=f.createElement(f.Fragment,null,f.createElement("span",{style:{paddingLeft:"".concat(nt*Me,"px")},className:"".concat(Dt,"-row-indent indent-level-").concat(Me)}),et({prefixCls:Dt,expanded:ot,expandable:Qt,record:at,onExpand:en})));var wn;return Ve.onCell&&(wn=Ve.onCell(at,ze)),{key:An,fixedInfo:bn,appendCellNode:Fn,additionalCellProps:wn||{}}}function bt(oe){var Ve=oe.className,Te=oe.style,Me=oe.record,ze=oe.index,at=oe.renderIndex,Dt=oe.rowKey,yt=oe.indent,it=yt===void 0?0:yt,Ne=oe.rowComponent,Xe=oe.cellComponent,nt=oe.scopeCellComponent,et=Le(Me,Dt,ze,it),ot=et.prefixCls,Qt=et.flattenColumns,en=et.expandedRowClassName,An=et.expandedRowRender,bn=et.rowProps,Fn=et.expanded,wn=et.rowSupportExpand,Sn=f.useRef(!1);Sn.current||(Sn.current=Fn);var dn=Nt(en,Me,ze,it),Xn=f.createElement(Ne,(0,E.Z)({},bn,{"data-row-key":Dt,className:W()(Ve,"".concat(ot,"-row"),"".concat(ot,"-row-level-").concat(it),bn==null?void 0:bn.className,(0,de.Z)({},dn,it>=1)),style:(0,ie.Z)((0,ie.Z)({},Te),bn==null?void 0:bn.style)}),Qt.map(function(ln,Vn){var nr=ln.render,Jn=ln.dataIndex,Kn=ln.className,Nn=It(et,ln,Vn,it,ze),xn=Nn.key,Pn=Nn.fixedInfo,In=Nn.appendCellNode,pr=Nn.additionalCellProps;return f.createElement(ht,(0,E.Z)({className:Kn,ellipsis:ln.ellipsis,align:ln.align,scope:ln.rowScope,component:ln.rowScope?nt:Xe,prefixCls:ot,key:xn,record:Me,index:ze,renderIndex:at,dataIndex:Jn,render:nr,shouldCellUpdate:ln.shouldCellUpdate},Pn,{appendNode:In,additionalProps:pr}))})),Mn;if(wn&&(Sn.current||Fn)){var cr=An(Me,ze,it+1,Fn);Mn=f.createElement(je,{expanded:Fn,className:W()("".concat(ot,"-expanded-row"),"".concat(ot,"-expanded-row-level-").concat(it+1),dn),prefixCls:ot,component:Ne,cellComponent:Xe,colSpan:Qt.length,isEmpty:!1},cr)}return f.createElement(f.Fragment,null,Xn,Mn)}var on=B(bt);function rn(oe){var Ve=oe.columnKey,Te=oe.onColumnResize,Me=f.useRef();return(0,se.Z)(function(){Me.current&&Te(Ve,Me.current.offsetWidth)},[]),f.createElement(te.Z,{data:Ve},f.createElement("td",{ref:Me,style:{padding:0,border:0,height:0}},f.createElement("div",{style:{height:0,overflow:"hidden"}},"\xA0")))}var Ct=b(29194);function gn(oe){var Ve=oe.prefixCls,Te=oe.columnsKey,Me=oe.onColumnResize,ze=f.useRef(null);return f.createElement("tr",{"aria-hidden":"true",className:"".concat(Ve,"-measure-row"),style:{height:0,fontSize:0},ref:ze},f.createElement(te.Z.Collection,{onBatchResize:function(Dt){(0,Ct.Z)(ze.current)&&Dt.forEach(function(yt){var it=yt.data,Ne=yt.size;Me(it,Ne.offsetWidth)})}},Te.map(function(at){return f.createElement(rn,{key:at,columnKey:at,onColumnResize:Me})})))}function Ln(oe){var Ve=oe.data,Te=oe.measureColumnWidth,Me=A(S,["prefixCls","getComponent","onColumnResize","flattenColumns","getRowKey","expandedKeys","childrenColumnName","emptyNode"]),ze=Me.prefixCls,at=Me.getComponent,Dt=Me.onColumnResize,yt=Me.flattenColumns,it=Me.getRowKey,Ne=Me.expandedKeys,Xe=Me.childrenColumnName,nt=Me.emptyNode,et=ke(Ve,Xe,Ne,it),ot=f.useRef({renderWithProps:!1}),Qt=at(["body","wrapper"],"tbody"),en=at(["body","row"],"tr"),An=at(["body","cell"],"td"),bn=at(["body","cell"],"th"),Fn;Ve.length?Fn=et.map(function(Sn,dn){var Xn=Sn.record,Mn=Sn.indent,cr=Sn.index,ln=it(Xn,dn);return f.createElement(on,{key:ln,rowKey:ln,record:Xn,index:dn,renderIndex:cr,rowComponent:en,cellComponent:An,scopeCellComponent:bn,indent:Mn})}):Fn=f.createElement(je,{expanded:!0,className:"".concat(ze,"-placeholder"),prefixCls:ze,component:en,cellComponent:An,colSpan:yt.length,isEmpty:!0},nt);var wn=Q(yt);return f.createElement(Z.Provider,{value:ot.current},f.createElement(Qt,{className:"".concat(ze,"-tbody")},Te&&f.createElement(gn,{prefixCls:ze,columnsKey:wn,onColumnResize:Dt}),Fn))}var Mt=B(Ln),hn=b(54451),We=["columnType"];function Qe(oe){for(var Ve=oe.colWidths,Te=oe.columns,Me=oe.columCount,ze=A(S,["tableLayout"]),at=ze.tableLayout,Dt=[],yt=Me||Te.length,it=!1,Ne=yt-1;Ne>=0;Ne-=1){var Xe=Ve[Ne],nt=Te&&Te[Ne],et=void 0,ot=void 0;if(nt&&(et=nt[hn.v],at==="auto"&&(ot=nt.minWidth)),Xe||ot||et||it){var Qt=et||{},en=Qt.columnType,An=(0,_e.Z)(Qt,We);Dt.unshift(f.createElement("col",(0,E.Z)({key:Ne,style:{width:Xe,minWidth:ot}},An))),it=!0}}return f.createElement("colgroup",null,Dt)}var He=Qe,z=b(15142),le=["className","noData","columns","flattenColumns","colWidths","columCount","stickyOffsets","direction","fixHeader","stickyTopOffset","stickyBottomOffset","stickyClassName","onScroll","maxContentScroll","children"];function me(oe,Ve){return(0,f.useMemo)(function(){for(var Te=[],Me=0;Me<Ve;Me+=1){var ze=oe[Me];if(ze!==void 0)Te[Me]=ze;else return null}return Te},[oe.join("_"),Ve])}var Be=f.forwardRef(function(oe,Ve){var Te=oe.className,Me=oe.noData,ze=oe.columns,at=oe.flattenColumns,Dt=oe.colWidths,yt=oe.columCount,it=oe.stickyOffsets,Ne=oe.direction,Xe=oe.fixHeader,nt=oe.stickyTopOffset,et=oe.stickyBottomOffset,ot=oe.stickyClassName,Qt=oe.onScroll,en=oe.maxContentScroll,An=oe.children,bn=(0,_e.Z)(oe,le),Fn=A(S,["prefixCls","scrollbarSize","isSticky","getComponent"]),wn=Fn.prefixCls,Sn=Fn.scrollbarSize,dn=Fn.isSticky,Xn=Fn.getComponent,Mn=Xn(["header","table"],"table"),cr=dn&&!Xe?0:Sn,ln=f.useRef(null),Vn=f.useCallback(function(pr){(0,x.mH)(Ve,pr),(0,x.mH)(ln,pr)},[]);f.useEffect(function(){var pr;function fr(hr){var Rr=hr,Zr=Rr.currentTarget,Yr=Rr.deltaX;Yr&&(Qt({currentTarget:Zr,scrollLeft:Zr.scrollLeft+Yr}),hr.preventDefault())}return(pr=ln.current)===null||pr===void 0||pr.addEventListener("wheel",fr,{passive:!1}),function(){var hr;(hr=ln.current)===null||hr===void 0||hr.removeEventListener("wheel",fr)}},[]);var nr=f.useMemo(function(){return at.every(function(pr){return pr.width})},[at]),Jn=at[at.length-1],Kn={fixed:Jn?Jn.fixed:null,scrollbar:!0,onHeaderCell:function(){return{className:"".concat(wn,"-cell-scrollbar")}}},Nn=(0,f.useMemo)(function(){return cr?[].concat((0,z.Z)(ze),[Kn]):ze},[cr,ze]),xn=(0,f.useMemo)(function(){return cr?[].concat((0,z.Z)(at),[Kn]):at},[cr,at]),Pn=(0,f.useMemo)(function(){var pr=it.right,fr=it.left;return(0,ie.Z)((0,ie.Z)({},it),{},{left:Ne==="rtl"?[].concat((0,z.Z)(fr.map(function(hr){return hr+cr})),[0]):fr,right:Ne==="rtl"?pr:[].concat((0,z.Z)(pr.map(function(hr){return hr+cr})),[0]),isSticky:dn})},[cr,it,dn]),In=me(Dt,yt);return f.createElement("div",{style:(0,ie.Z)({overflow:"hidden"},dn?{top:nt,bottom:et}:{}),ref:Vn,className:W()(Te,(0,de.Z)({},ot,!!ot))},f.createElement(Mn,{style:{tableLayout:"fixed",visibility:Me||In?null:"hidden"}},(!Me||!en||nr)&&f.createElement(He,{colWidths:In?[].concat((0,z.Z)(In),[cr]):[],columCount:yt+1,columns:xn}),An((0,ie.Z)((0,ie.Z)({},bn),{},{stickyOffsets:Pn,columns:Nn,flattenColumns:xn}))))}),be=f.memo(Be),Tt=function(Ve){var Te=Ve.cells,Me=Ve.stickyOffsets,ze=Ve.flattenColumns,at=Ve.rowComponent,Dt=Ve.cellComponent,yt=Ve.onHeaderRow,it=Ve.index,Ne=A(S,["prefixCls","direction"]),Xe=Ne.prefixCls,nt=Ne.direction,et;yt&&(et=yt(Te.map(function(Qt){return Qt.column}),it));var ot=Q(Te.map(function(Qt){return Qt.column}));return f.createElement(at,et,Te.map(function(Qt,en){var An=Qt.column,bn=tn(Qt.colStart,Qt.colEnd,ze,Me,nt),Fn;return An&&An.onHeaderCell&&(Fn=Qt.column.onHeaderCell(An)),f.createElement(ht,(0,E.Z)({},Qt,{scope:An.title?Qt.colSpan>1?"colgroup":"col":null,ellipsis:An.ellipsis,align:An.align,component:Dt,prefixCls:Xe,key:ot[en]},bn,{additionalProps:Fn,rowType:"header"}))}))},Wt=Tt;function an(oe){var Ve=[];function Te(Dt,yt){var it=arguments.length>2&&arguments[2]!==void 0?arguments[2]:0;Ve[it]=Ve[it]||[];var Ne=yt,Xe=Dt.filter(Boolean).map(function(nt){var et={key:nt.key,className:nt.className||"",children:nt.title,column:nt,colStart:Ne},ot=1,Qt=nt.children;return Qt&&Qt.length>0&&(ot=Te(Qt,Ne,it+1).reduce(function(en,An){return en+An},0),et.hasSubColumns=!0),"colSpan"in nt&&(ot=nt.colSpan),"rowSpan"in nt&&(et.rowSpan=nt.rowSpan),et.colSpan=ot,et.colEnd=et.colStart+ot-1,Ve[it].push(et),Ne+=ot,ot});return Xe}Te(oe,0);for(var Me=Ve.length,ze=function(yt){Ve[yt].forEach(function(it){!("rowSpan"in it)&&!it.hasSubColumns&&(it.rowSpan=Me-yt)})},at=0;at<Me;at+=1)ze(at);return Ve}var _n=function(Ve){var Te=Ve.stickyOffsets,Me=Ve.columns,ze=Ve.flattenColumns,at=Ve.onHeaderRow,Dt=A(S,["prefixCls","getComponent"]),yt=Dt.prefixCls,it=Dt.getComponent,Ne=f.useMemo(function(){return an(Me)},[Me]),Xe=it(["header","wrapper"],"thead"),nt=it(["header","row"],"tr"),et=it(["header","cell"],"th");return f.createElement(Xe,{className:"".concat(yt,"-thead")},Ne.map(function(ot,Qt){var en=f.createElement(Wt,{key:Qt,flattenColumns:ze,cells:ot,stickyOffsets:Te,rowComponent:nt,cellComponent:et,onHeaderRow:at,index:Qt});return en}))},Wn=B(_n),zn=b(97347);function On(oe,Ve,Te){var Me=(0,hn.g)(oe),ze=Me.expandIcon,at=Me.expandedRowKeys,Dt=Me.defaultExpandedRowKeys,yt=Me.defaultExpandAllRows,it=Me.expandedRowRender,Ne=Me.onExpand,Xe=Me.onExpandedRowsChange,nt=Me.childrenColumnName,et=ze||qe,ot=nt||"children",Qt=f.useMemo(function(){return it?"row":oe.expandable&&oe.internalHooks===P.R&&oe.expandable.__PARENT_RENDER_ICON__||Ve.some(function(dn){return dn&&(0,Y.Z)(dn)==="object"&&dn[ot]})?"nest":!1},[!!it,Ve]),en=f.useState(function(){return Dt||(yt?ut(Ve,Te,ot):[])}),An=(0,re.Z)(en,2),bn=An[0],Fn=An[1],wn=f.useMemo(function(){return new Set(at||bn||[])},[at,bn]),Sn=f.useCallback(function(dn){var Xn=Te(dn,Ve.indexOf(dn)),Mn,cr=wn.has(Xn);cr?(wn.delete(Xn),Mn=(0,z.Z)(wn)):Mn=[].concat((0,z.Z)(wn),[Xn]),Fn(Mn),Ne&&Ne(!cr,dn),Xe&&Xe(Mn)},[Te,wn,Ve,Ne,Xe]);return[Me,Qt,wn,et,ot,Sn]}function Un(oe,Ve,Te){var Me=oe.map(function(ze,at){return tn(at,at,oe,Ve,Te)});return(0,M.Z)(function(){return Me},[Me],function(ze,at){return!(0,U.Z)(ze,at)})}function ar(oe){var Ve=(0,f.useRef)(oe),Te=(0,f.useState)({}),Me=(0,re.Z)(Te,2),ze=Me[1],at=(0,f.useRef)(null),Dt=(0,f.useRef)([]);function yt(it){Dt.current.push(it);var Ne=Promise.resolve();at.current=Ne,Ne.then(function(){if(at.current===Ne){var Xe=Dt.current,nt=Ve.current;Dt.current=[],Xe.forEach(function(et){Ve.current=et(Ve.current)}),at.current=null,nt!==Ve.current&&ze({})}})}return(0,f.useEffect)(function(){return function(){at.current=null}},[]),[Ve.current,yt]}function mr(oe){var Ve=(0,f.useRef)(oe||null),Te=(0,f.useRef)();function Me(){window.clearTimeout(Te.current)}function ze(Dt){Ve.current=Dt,Me(),Te.current=window.setTimeout(function(){Ve.current=null,Te.current=void 0},100)}function at(){return Ve.current}return(0,f.useEffect)(function(){return Me},[]),[ze,at]}function tr(){var oe=f.useState(-1),Ve=(0,re.Z)(oe,2),Te=Ve[0],Me=Ve[1],ze=f.useState(-1),at=(0,re.Z)(ze,2),Dt=at[0],yt=at[1],it=f.useCallback(function(Ne,Xe){Me(Ne),yt(Xe)},[]);return[Te,Dt,it]}var gr=b(47273),sn=(0,gr.Z)()?window:null;function Kt(oe,Ve){var Te=(0,Y.Z)(oe)==="object"?oe:{},Me=Te.offsetHeader,ze=Me===void 0?0:Me,at=Te.offsetSummary,Dt=at===void 0?0:at,yt=Te.offsetScroll,it=yt===void 0?0:yt,Ne=Te.getContainer,Xe=Ne===void 0?function(){return sn}:Ne,nt=Xe()||sn,et=!!oe;return f.useMemo(function(){return{isSticky:et,stickyClassName:et?"".concat(Ve,"-sticky-holder"):"",offsetHeader:ze,offsetSummary:Dt,offsetScroll:it,container:nt}},[et,it,ze,Dt,Ve,nt])}function yn(oe,Ve,Te){var Me=(0,f.useMemo)(function(){var ze=Ve.length,at=function(Ne,Xe,nt){for(var et=[],ot=0,Qt=Ne;Qt!==Xe;Qt+=nt)et.push(ot),Ve[Qt].fixed&&(ot+=oe[Qt]||0);return et},Dt=at(0,ze,1),yt=at(ze-1,-1,-1).reverse();return Te==="rtl"?{left:yt,right:Dt}:{left:Dt,right:yt}},[oe,Ve,Te]);return Me}var Yn=yn;function or(oe){var Ve=oe.className,Te=oe.children;return f.createElement("div",{className:Ve},Te)}var Ke=or,Pe=b(8224),Yt=b(16089),Lt=b(76846);function qt(oe){var Ve=(0,Lt.bn)(oe),Te=Ve.getBoundingClientRect(),Me=document.documentElement;return{left:Te.left+(window.pageXOffset||Me.scrollLeft)-(Me.clientLeft||document.body.clientLeft||0),top:Te.top+(window.pageYOffset||Me.scrollTop)-(Me.clientTop||document.body.clientTop||0)}}var nn=function(Ve,Te){var Me,ze,at=Ve.scrollBodyRef,Dt=Ve.onScroll,yt=Ve.offsetScroll,it=Ve.container,Ne=Ve.direction,Xe=A(S,"prefixCls"),nt=((Me=at.current)===null||Me===void 0?void 0:Me.scrollWidth)||0,et=((ze=at.current)===null||ze===void 0?void 0:ze.clientWidth)||0,ot=nt&&et*(et/nt),Qt=f.useRef(),en=ar({scrollLeft:0,isHiddenScrollBar:!0}),An=(0,re.Z)(en,2),bn=An[0],Fn=An[1],wn=f.useRef({delta:0,x:0}),Sn=f.useState(!1),dn=(0,re.Z)(Sn,2),Xn=dn[0],Mn=dn[1],cr=f.useRef(null);f.useEffect(function(){return function(){Yt.Z.cancel(cr.current)}},[]);var ln=function(){Mn(!1)},Vn=function(xn){xn.persist(),wn.current.delta=xn.pageX-bn.scrollLeft,wn.current.x=0,Mn(!0),xn.preventDefault()},nr=function(xn){var Pn,In=xn||((Pn=window)===null||Pn===void 0?void 0:Pn.event),pr=In.buttons;if(!Xn||pr===0){Xn&&Mn(!1);return}var fr=wn.current.x+xn.pageX-wn.current.x-wn.current.delta,hr=Ne==="rtl";fr=Math.max(hr?ot-et:0,Math.min(hr?0:et-ot,fr));var Rr=!hr||Math.abs(fr)+Math.abs(ot)<et;Rr&&(Dt({scrollLeft:fr/et*(nt+2)}),wn.current.x=xn.pageX)},Jn=function(){Yt.Z.cancel(cr.current),cr.current=(0,Yt.Z)(function(){if(at.current){var xn=qt(at.current).top,Pn=xn+at.current.offsetHeight,In=it===window?document.documentElement.scrollTop+window.innerHeight:qt(it).top+it.clientHeight;Pn-(0,ue.Z)()<=In||xn>=In-yt?Fn(function(pr){return(0,ie.Z)((0,ie.Z)({},pr),{},{isHiddenScrollBar:!0})}):Fn(function(pr){return(0,ie.Z)((0,ie.Z)({},pr),{},{isHiddenScrollBar:!1})})}})},Kn=function(xn){Fn(function(Pn){return(0,ie.Z)((0,ie.Z)({},Pn),{},{scrollLeft:xn/nt*et||0})})};return f.useImperativeHandle(Te,function(){return{setScrollLeft:Kn,checkScrollBarVisible:Jn}}),f.useEffect(function(){var Nn=(0,Pe.Z)(document.body,"mouseup",ln,!1),xn=(0,Pe.Z)(document.body,"mousemove",nr,!1);return Jn(),function(){Nn.remove(),xn.remove()}},[ot,Xn]),f.useEffect(function(){if(at.current){for(var Nn=[],xn=(0,Lt.bn)(at.current);xn;)Nn.push(xn),xn=xn.parentElement;return Nn.forEach(function(Pn){return Pn.addEventListener("scroll",Jn,!1)}),window.addEventListener("resize",Jn,!1),window.addEventListener("scroll",Jn,!1),it.addEventListener("scroll",Jn,!1),function(){Nn.forEach(function(Pn){return Pn.removeEventListener("scroll",Jn)}),window.removeEventListener("resize",Jn),window.removeEventListener("scroll",Jn),it.removeEventListener("scroll",Jn)}}},[it]),f.useEffect(function(){bn.isHiddenScrollBar||Fn(function(Nn){var xn=at.current;return xn?(0,ie.Z)((0,ie.Z)({},Nn),{},{scrollLeft:xn.scrollLeft/xn.scrollWidth*xn.clientWidth}):Nn})},[bn.isHiddenScrollBar]),nt<=et||!ot||bn.isHiddenScrollBar?null:f.createElement("div",{style:{height:(0,ue.Z)(),width:et,bottom:yt},className:"".concat(Xe,"-sticky-scroll")},f.createElement("div",{onMouseDown:Vn,ref:Qt,className:W()("".concat(Xe,"-sticky-scroll-bar"),(0,de.Z)({},"".concat(Xe,"-sticky-scroll-bar-active"),Xn)),style:{width:"".concat(ot,"px"),transform:"translate3d(".concat(bn.scrollLeft,"px, 0, 0)")}}))},Xt=f.forwardRef(nn);function zt(oe){return null}var pn=zt;function Ot(oe){return null}var cn=Ot,un="rc-table",lt=[],Pt={};function Re(){return"No Data"}function Ye(oe,Ve){var Te=(0,ie.Z)({rowKey:"key",prefixCls:un,emptyText:Re},oe),Me=Te.prefixCls,ze=Te.className,at=Te.rowClassName,Dt=Te.style,yt=Te.data,it=Te.rowKey,Ne=Te.scroll,Xe=Te.tableLayout,nt=Te.direction,et=Te.title,ot=Te.footer,Qt=Te.summary,en=Te.caption,An=Te.id,bn=Te.showHeader,Fn=Te.components,wn=Te.emptyText,Sn=Te.onRow,dn=Te.onHeaderRow,Xn=Te.onScroll,Mn=Te.internalHooks,cr=Te.transformColumns,ln=Te.internalRefs,Vn=Te.tailor,nr=Te.getContainerWidth,Jn=Te.sticky,Kn=Te.rowHoverable,Nn=Kn===void 0?!0:Kn,xn=yt||lt,Pn=!!xn.length,In=Mn===P.R,pr=f.useCallback(function(Or,Pr){return(0,X.Z)(Fn,Or)||Pr},[Fn]),fr=f.useMemo(function(){return typeof it=="function"?it:function(Or){var Pr=Or&&Or[it];return Pr}},[it]),hr=pr(["body"]),Rr=tr(),Zr=(0,re.Z)(Rr,3),Yr=Zr[0],ii=Zr[1],Xr=Zr[2],si=On(Te,xn,fr),Er=(0,re.Z)(si,6),Ir=Er[0],ti=Er[1],xr=Er[2],wr=Er[3],Ar=Er[4],Tn=Er[5],sr=Ne==null?void 0:Ne.x,lr=f.useState(0),dr=(0,re.Z)(lr,2),br=dr[0],Dr=dr[1],Sr=(0,zn.Z)((0,ie.Z)((0,ie.Z)((0,ie.Z)({},Te),Ir),{},{expandable:!!Ir.expandedRowRender,columnTitle:Ir.columnTitle,expandedKeys:xr,getRowKey:fr,onTriggerExpand:Tn,expandIcon:wr,expandIconColumnIndex:Ir.expandIconColumnIndex,direction:nt,scrollWidth:In&&Vn&&typeof sr=="number"?sr:null,clientWidth:br}),In?cr:null),kn=(0,re.Z)(Sr,4),er=kn[0],qn=kn[1],Cr=kn[2],Tr=kn[3],$r=Cr!=null?Cr:sr,ni=f.useMemo(function(){return{columns:er,flattenColumns:qn}},[er,qn]),Mr=f.useRef(),Ai=f.useRef(),Ur=f.useRef(),mi=f.useRef();f.useImperativeHandle(Ve,function(){return{nativeElement:Mr.current,scrollTo:function(Pr){var _i;if(Ur.current instanceof HTMLElement){var Ci=Pr.index,yi=Pr.top,Es=Pr.key;if(Ue(yi)){var ps;(ps=Ur.current)===null||ps===void 0||ps.scrollTo({top:yi})}else{var ms,Ps=Es!=null?Es:fr(xn[Ci]);(ms=Ur.current.querySelector('[data-row-key="'.concat(Ps,'"]')))===null||ms===void 0||ms.scrollIntoView()}}else(_i=Ur.current)!==null&&_i!==void 0&&_i.scrollTo&&Ur.current.scrollTo(Pr)}}});var Si=f.useRef(),Ti=f.useState(!1),Kr=(0,re.Z)(Ti,2),Wi=Kr[0],zi=Kr[1],ns=f.useState(!1),Ii=(0,re.Z)(ns,2),Ui=Ii[0],Mi=Ii[1],As=f.useState(new Map),Jr=(0,re.Z)(As,2),Di=Jr[0],Ei=Jr[1],li=Q(qn),Li=li.map(function(Or){return Di.get(Or)}),ds=f.useMemo(function(){return Li},[Li.join("_")]),rs=Yn(ds,qn,nt),di=Ne&&he(Ne.y),ui=Ne&&he($r)||!!Ir.fixed,Fr=ui&&qn.some(function(Or){var Pr=Or.fixed;return Pr}),Br=f.useRef(),Gr=Kt(Jn,Me),ri=Gr.isSticky,ai=Gr.offsetHeader,qr=Gr.offsetSummary,bi=Gr.offsetScroll,gi=Gr.stickyClassName,Ni=Gr.container,Vr=f.useMemo(function(){return Qt==null?void 0:Qt(xn)},[Qt,xn]),vi=(di||ri)&&f.isValidElement(Vr)&&Vr.type===V&&Vr.props.fixed,ji,ki,Hi;di&&(ki={overflowY:Pn?"scroll":"auto",maxHeight:Ne.y}),ui&&(ji={overflowX:"auto"},di||(ki={overflowY:"hidden"}),Hi={width:$r===!0?"auto":$r,minWidth:"100%"});var Xs=f.useCallback(function(Or,Pr){Ei(function(_i){if(_i.get(Or)!==Pr){var Ci=new Map(_i);return Ci.set(Or,Pr),Ci}return _i})},[]),jt=mr(null),Hr=(0,re.Z)(jt,2),Wr=Hr[0],pi=Hr[1];function hi(Or,Pr){Pr&&(typeof Pr=="function"?Pr(Or):Pr.scrollLeft!==Or&&(Pr.scrollLeft=Or,Pr.scrollLeft!==Or&&setTimeout(function(){Pr.scrollLeft=Or},0)))}var Fi=(0,ge.Z)(function(Or){var Pr=Or.currentTarget,_i=Or.scrollLeft,Ci=nt==="rtl",yi=typeof _i=="number"?_i:Pr.scrollLeft,Es=Pr||Pt;if(!pi()||pi()===Es){var ps;Wr(Es),hi(yi,Ai.current),hi(yi,Ur.current),hi(yi,Si.current),hi(yi,(ps=Br.current)===null||ps===void 0?void 0:ps.setScrollLeft)}var ms=Pr||Ai.current;if(ms){var Ps=In&&Vn&&typeof $r=="number"?$r:ms.scrollWidth,ws=ms.clientWidth;if(Ps===ws){zi(!1),Mi(!1);return}Ci?(zi(-yi<Ps-ws),Mi(-yi>0)):(zi(yi>0),Mi(yi<Ps-ws))}}),hs=(0,ge.Z)(function(Or){Fi(Or),Xn==null||Xn(Or)}),Ds=function(){if(ui&&Ur.current){var Pr;Fi({currentTarget:(0,Lt.bn)(Ur.current),scrollLeft:(Pr=Ur.current)===null||Pr===void 0?void 0:Pr.scrollLeft})}else zi(!1),Mi(!1)},Js=function(Pr){var _i,Ci=Pr.width;(_i=Br.current)===null||_i===void 0||_i.checkScrollBarVisible();var yi=Mr.current?Mr.current.offsetWidth:Ci;In&&nr&&Mr.current&&(yi=nr(Mr.current,yi)||yi),yi!==br&&(Ds(),Dr(yi))},Yi=f.useRef(!1);f.useEffect(function(){Yi.current&&Ds()},[ui,yt,er.length]),f.useEffect(function(){Yi.current=!0},[]);var Ki=f.useState(0),Gi=(0,re.Z)(Ki,2),ls=Gi[0],Fa=Gi[1],Ia=f.useState(!0),Da=(0,re.Z)(Ia,2),ua=Da[0],ca=Da[1];(0,se.Z)(function(){(!Vn||!In)&&(Ur.current instanceof Element?Fa((0,ue.o)(Ur.current).width):Fa((0,ue.o)(mi.current).width)),ca((0,$.G)("position","sticky"))},[]),f.useEffect(function(){In&&ln&&(ln.body.current=Ur.current)});var qs=f.useCallback(function(Or){return f.createElement(f.Fragment,null,f.createElement(Wn,Or),vi==="top"&&f.createElement(J,Or,Vr))},[vi,Vr]),Ls=f.useCallback(function(Or){return f.createElement(J,Or,Vr)},[Vr]),gs=pr(["table"],"table"),Rs=f.useMemo(function(){return Xe||(Fr?$r==="max-content"?"auto":"fixed":di||ri||qn.some(function(Or){var Pr=Or.ellipsis;return Pr})?"fixed":"auto")},[di,Fr,qn,Xe,ri]),ea,us={colWidths:ds,columCount:qn.length,stickyOffsets:rs,onHeaderRow:dn,fixHeader:di,scroll:Ne},La=f.useMemo(function(){return Pn?null:typeof wn=="function"?wn():wn},[Pn,wn]),Us=f.createElement(Mt,{data:xn,measureColumnWidth:di||ui||ri}),Ra=f.createElement(He,{colWidths:qn.map(function(Or){var Pr=Or.width;return Pr}),columns:qn}),Ua=en!=null?f.createElement("caption",{className:"".concat(Me,"-caption")},en):void 0,ks=(0,Ie.Z)(Te,{data:!0}),fa=(0,Ie.Z)(Te,{aria:!0});if(di||ri){var da;typeof hr=="function"?(da=hr(xn,{scrollbarSize:ls,ref:Ur,onScroll:Fi}),us.colWidths=qn.map(function(Or,Pr){var _i=Or.width,Ci=Pr===qn.length-1?_i-ls:_i;return typeof Ci=="number"&&!Number.isNaN(Ci)?Ci:0})):da=f.createElement("div",{style:(0,ie.Z)((0,ie.Z)({},ji),ki),onScroll:hs,ref:Ur,className:W()("".concat(Me,"-body"))},f.createElement(gs,(0,E.Z)({style:(0,ie.Z)((0,ie.Z)({},Hi),{},{tableLayout:Rs})},fa),Ua,Ra,Us,!vi&&Vr&&f.createElement(J,{stickyOffsets:rs,flattenColumns:qn},Vr)));var ha=(0,ie.Z)((0,ie.Z)((0,ie.Z)({noData:!xn.length,maxContentScroll:ui&&$r==="max-content"},us),ni),{},{direction:nt,stickyClassName:gi,onScroll:Fi});ea=f.createElement(f.Fragment,null,bn!==!1&&f.createElement(be,(0,E.Z)({},ha,{stickyTopOffset:ai,className:"".concat(Me,"-header"),ref:Ai}),qs),da,vi&&vi!=="top"&&f.createElement(be,(0,E.Z)({},ha,{stickyBottomOffset:qr,className:"".concat(Me,"-summary"),ref:Si}),Ls),ri&&Ur.current&&Ur.current instanceof Element&&f.createElement(Xt,{ref:Br,offsetScroll:bi,scrollBodyRef:Ur,onScroll:Fi,container:Ni,direction:nt}))}else ea=f.createElement("div",{style:(0,ie.Z)((0,ie.Z)({},ji),ki),className:W()("".concat(Me,"-content")),onScroll:Fi,ref:Ur},f.createElement(gs,(0,E.Z)({style:(0,ie.Z)((0,ie.Z)({},Hi),{},{tableLayout:Rs})},fa),Ua,Ra,bn!==!1&&f.createElement(Wn,(0,E.Z)({},us,ni)),Us,Vr&&f.createElement(J,{stickyOffsets:rs,flattenColumns:qn},Vr)));var ga=f.createElement("div",(0,E.Z)({className:W()(Me,ze,(0,de.Z)((0,de.Z)((0,de.Z)((0,de.Z)((0,de.Z)((0,de.Z)((0,de.Z)((0,de.Z)((0,de.Z)((0,de.Z)({},"".concat(Me,"-rtl"),nt==="rtl"),"".concat(Me,"-ping-left"),Wi),"".concat(Me,"-ping-right"),Ui),"".concat(Me,"-layout-fixed"),Xe==="fixed"),"".concat(Me,"-fixed-header"),di),"".concat(Me,"-fixed-column"),Fr),"".concat(Me,"-fixed-column-gapped"),Fr&&Tr),"".concat(Me,"-scroll-horizontal"),ui),"".concat(Me,"-has-fix-left"),qn[0]&&qn[0].fixed),"".concat(Me,"-has-fix-right"),qn[qn.length-1]&&qn[qn.length-1].fixed==="right")),style:Dt,id:An,ref:Mr},ks),et&&f.createElement(Ke,{className:"".concat(Me,"-title")},et(xn)),f.createElement("div",{ref:mi,className:"".concat(Me,"-container")},ea),ot&&f.createElement(Ke,{className:"".concat(Me,"-footer")},ot(xn)));ui&&(ga=f.createElement(te.Z,{onResize:Js},ga));var Os=Un(qn,rs,nt),pa=f.useMemo(function(){return{scrollX:$r,prefixCls:Me,getComponent:pr,scrollbarSize:ls,direction:nt,fixedInfoList:Os,isSticky:ri,supportSticky:ua,componentWidth:br,fixHeader:di,fixColumn:Fr,horizonScroll:ui,tableLayout:Rs,rowClassName:at,expandedRowClassName:Ir.expandedRowClassName,expandIcon:wr,expandableType:ti,expandRowByClick:Ir.expandRowByClick,expandedRowRender:Ir.expandedRowRender,onTriggerExpand:Tn,expandIconColumnIndex:Ir.expandIconColumnIndex,indentSize:Ir.indentSize,allColumnsFixedLeft:qn.every(function(Or){return Or.fixed==="left"}),emptyNode:La,columns:er,flattenColumns:qn,onColumnResize:Xs,hoverStartRow:Yr,hoverEndRow:ii,onHover:Xr,rowExpandable:Ir.rowExpandable,onRow:Sn,getRowKey:fr,expandedKeys:xr,childrenColumnName:Ar,rowHoverable:Nn}},[$r,Me,pr,ls,nt,Os,ri,ua,br,di,Fr,ui,Rs,at,Ir.expandedRowClassName,wr,ti,Ir.expandRowByClick,Ir.expandedRowRender,Tn,Ir.expandIconColumnIndex,Ir.indentSize,La,er,qn,Xs,Yr,ii,Xr,Ir.rowExpandable,Sn,fr,xr,Ar,Nn]);return f.createElement(S.Provider,{value:pa},ga)}var vt=f.forwardRef(Ye);function xt(oe){return K(vt,oe)}var Vt=xt();Vt.EXPAND_COLUMN=P.w,Vt.INTERNAL_HOOKS=P.R,Vt.Column=pn,Vt.ColumnGroup=cn,Vt.Summary=ve;var Jt=Vt,Zt=b(6790),vn=ee(null),Bn=ee(null);function Dn(oe,Ve,Te){var Me=Ve||1;return Te[oe+Me]-(Te[oe]||0)}function st(oe){var Ve=oe.rowInfo,Te=oe.column,Me=oe.colIndex,ze=oe.indent,at=oe.index,Dt=oe.component,yt=oe.renderIndex,it=oe.record,Ne=oe.style,Xe=oe.className,nt=oe.inverse,et=oe.getHeight,ot=Te.render,Qt=Te.dataIndex,en=Te.className,An=Te.width,bn=A(Bn,["columnsOffset"]),Fn=bn.columnsOffset,wn=It(Ve,Te,Me,ze,at),Sn=wn.key,dn=wn.fixedInfo,Xn=wn.appendCellNode,Mn=wn.additionalCellProps,cr=Mn.style,ln=Mn.colSpan,Vn=ln===void 0?1:ln,nr=Mn.rowSpan,Jn=nr===void 0?1:nr,Kn=Me-1,Nn=Dn(Kn,Vn,Fn),xn=Vn>1?An-Nn:0,Pn=(0,ie.Z)((0,ie.Z)((0,ie.Z)({},cr),Ne),{},{flex:"0 0 ".concat(Nn,"px"),width:"".concat(Nn,"px"),marginRight:xn,pointerEvents:"auto"}),In=f.useMemo(function(){return nt?Jn<=1:Vn===0||Jn===0||Jn>1},[Jn,Vn,nt]);In?Pn.visibility="hidden":nt&&(Pn.height=et==null?void 0:et(Jn));var pr=In?function(){return null}:ot,fr={};return(Jn===0||Vn===0)&&(fr.rowSpan=1,fr.colSpan=1),f.createElement(ht,(0,E.Z)({className:W()(en,Xe),ellipsis:Te.ellipsis,align:Te.align,scope:Te.rowScope,component:Dt,prefixCls:Ve.prefixCls,key:Sn,record:it,index:at,renderIndex:yt,dataIndex:Qt,render:pr,shouldCellUpdate:Te.shouldCellUpdate},dn,{appendNode:Xn,additionalProps:(0,ie.Z)((0,ie.Z)({},Mn),{},{style:Pn},fr)}))}var En=st,mn=["data","index","className","rowKey","style","extra","getHeight"],L=f.forwardRef(function(oe,Ve){var Te=oe.data,Me=oe.index,ze=oe.className,at=oe.rowKey,Dt=oe.style,yt=oe.extra,it=oe.getHeight,Ne=(0,_e.Z)(oe,mn),Xe=Te.record,nt=Te.indent,et=Te.index,ot=A(S,["prefixCls","flattenColumns","fixColumn","componentWidth","scrollX"]),Qt=ot.scrollX,en=ot.flattenColumns,An=ot.prefixCls,bn=ot.fixColumn,Fn=ot.componentWidth,wn=A(vn,["getComponent"]),Sn=wn.getComponent,dn=Le(Xe,at,Me,nt),Xn=Sn(["body","row"],"div"),Mn=Sn(["body","cell"],"div"),cr=dn.rowSupportExpand,ln=dn.expanded,Vn=dn.rowProps,nr=dn.expandedRowRender,Jn=dn.expandedRowClassName,Kn;if(cr&&ln){var Nn=nr(Xe,Me,nt+1,ln),xn=Nt(Jn,Xe,Me,nt),Pn={};bn&&(Pn={style:(0,de.Z)({},"--virtual-width","".concat(Fn,"px"))});var In="".concat(An,"-expanded-row-cell");Kn=f.createElement(Xn,{className:W()("".concat(An,"-expanded-row"),"".concat(An,"-expanded-row-level-").concat(nt+1),xn)},f.createElement(ht,{component:Mn,prefixCls:An,className:W()(In,(0,de.Z)({},"".concat(In,"-fixed"),bn)),additionalProps:Pn},Nn))}var pr=(0,ie.Z)((0,ie.Z)({},Dt),{},{width:Qt});yt&&(pr.position="absolute",pr.pointerEvents="none");var fr=f.createElement(Xn,(0,E.Z)({},Vn,Ne,{"data-row-key":at,ref:cr?null:Ve,className:W()(ze,"".concat(An,"-row"),Vn==null?void 0:Vn.className,(0,de.Z)({},"".concat(An,"-row-extra"),yt)),style:(0,ie.Z)((0,ie.Z)({},pr),Vn==null?void 0:Vn.style)}),en.map(function(hr,Rr){return f.createElement(En,{key:Rr,component:Mn,rowInfo:dn,column:hr,colIndex:Rr,indent:nt,index:Me,renderIndex:et,record:Xe,inverse:yt,getHeight:it})}));return cr?f.createElement("div",{ref:Ve},fr,Kn):fr}),k=B(L),ce=k,ye=f.forwardRef(function(oe,Ve){var Te=oe.data,Me=oe.onScroll,ze=A(S,["flattenColumns","onColumnResize","getRowKey","prefixCls","expandedKeys","childrenColumnName","scrollX","direction"]),at=ze.flattenColumns,Dt=ze.onColumnResize,yt=ze.getRowKey,it=ze.expandedKeys,Ne=ze.prefixCls,Xe=ze.childrenColumnName,nt=ze.scrollX,et=ze.direction,ot=A(vn),Qt=ot.sticky,en=ot.scrollY,An=ot.listItemHeight,bn=ot.getComponent,Fn=ot.onScroll,wn=f.useRef(),Sn=ke(Te,Xe,it,yt),dn=f.useMemo(function(){var Kn=0;return at.map(function(Nn){var xn=Nn.width,Pn=Nn.key;return Kn+=xn,[Pn,xn,Kn]})},[at]),Xn=f.useMemo(function(){return dn.map(function(Kn){return Kn[2]})},[dn]);f.useEffect(function(){dn.forEach(function(Kn){var Nn=(0,re.Z)(Kn,2),xn=Nn[0],Pn=Nn[1];Dt(xn,Pn)})},[dn]),f.useImperativeHandle(Ve,function(){var Kn,Nn={scrollTo:function(Pn){var In;(In=wn.current)===null||In===void 0||In.scrollTo(Pn)},nativeElement:(Kn=wn.current)===null||Kn===void 0?void 0:Kn.nativeElement};return Object.defineProperty(Nn,"scrollLeft",{get:function(){var Pn;return((Pn=wn.current)===null||Pn===void 0?void 0:Pn.getScrollInfo().x)||0},set:function(Pn){var In;(In=wn.current)===null||In===void 0||In.scrollTo({left:Pn})}}),Nn});var Mn=function(Nn,xn){var Pn,In=(Pn=Sn[xn])===null||Pn===void 0?void 0:Pn.record,pr=Nn.onCell;if(pr){var fr,hr=pr(In,xn);return(fr=hr==null?void 0:hr.rowSpan)!==null&&fr!==void 0?fr:1}return 1},cr=function(Nn){var xn=Nn.start,Pn=Nn.end,In=Nn.getSize,pr=Nn.offsetY;if(Pn<0)return null;for(var fr=at.filter(function(wr){return Mn(wr,xn)===0}),hr=xn,Rr=function(Ar){if(fr=fr.filter(function(Tn){return Mn(Tn,Ar)===0}),!fr.length)return hr=Ar,1},Zr=xn;Zr>=0&&!Rr(Zr);Zr-=1);for(var Yr=at.filter(function(wr){return Mn(wr,Pn)!==1}),ii=Pn,Xr=function(Ar){if(Yr=Yr.filter(function(Tn){return Mn(Tn,Ar)!==1}),!Yr.length)return ii=Math.max(Ar-1,Pn),1},si=Pn;si<Sn.length&&!Xr(si);si+=1);for(var Er=[],Ir=function(Ar){var Tn=Sn[Ar];if(!Tn)return 1;at.some(function(sr){return Mn(sr,Ar)>1})&&Er.push(Ar)},ti=hr;ti<=ii;ti+=1)Ir(ti);var xr=Er.map(function(wr){var Ar=Sn[wr],Tn=yt(Ar.record,wr),sr=function(br){var Dr=wr+br-1,Sr=yt(Sn[Dr].record,Dr),kn=In(Tn,Sr);return kn.bottom-kn.top},lr=In(Tn);return f.createElement(ce,{key:wr,data:Ar,rowKey:Tn,index:wr,style:{top:-pr+lr.top},extra:!0,getHeight:sr})});return xr},ln=f.useMemo(function(){return{columnsOffset:Xn}},[Xn]),Vn="".concat(Ne,"-tbody"),nr=bn(["body","wrapper"]),Jn={};return Qt&&(Jn.position="sticky",Jn.bottom=0,(0,Y.Z)(Qt)==="object"&&Qt.offsetScroll&&(Jn.bottom=Qt.offsetScroll)),f.createElement(Bn.Provider,{value:ln},f.createElement(Zt.Z,{fullHeight:!1,ref:wn,prefixCls:"".concat(Vn,"-virtual"),styles:{horizontalScrollBar:Jn},className:Vn,height:en,itemHeight:An||24,data:Sn,itemKey:function(Nn){return yt(Nn.record)},component:nr,scrollWidth:nt,direction:et,onVirtualScroll:function(Nn){var xn,Pn=Nn.x;Me({currentTarget:(xn=wn.current)===null||xn===void 0?void 0:xn.nativeElement,scrollLeft:Pn})},onScroll:Fn,extraRender:cr},function(Kn,Nn,xn){var Pn=yt(Kn.record,Nn);return f.createElement(ce,{data:Kn,rowKey:Pn,index:Nn,style:xn.style})}))}),Ge=B(ye),$e=Ge,gt=function(Ve,Te){var Me=Te.ref,ze=Te.onScroll;return f.createElement($e,{ref:Me,data:Ve,onScroll:ze})};function Bt(oe,Ve){var Te=oe.data,Me=oe.columns,ze=oe.scroll,at=oe.sticky,Dt=oe.prefixCls,yt=Dt===void 0?un:Dt,it=oe.className,Ne=oe.listItemHeight,Xe=oe.components,nt=oe.onScroll,et=ze||{},ot=et.x,Qt=et.y;typeof ot!="number"&&(ot=1),typeof Qt!="number"&&(Qt=500);var en=(0,Ut.zX)(function(Fn,wn){return(0,X.Z)(Xe,Fn)||wn}),An=(0,Ut.zX)(nt),bn=f.useMemo(function(){return{sticky:at,scrollY:Qt,listItemHeight:Ne,getComponent:en,onScroll:An}},[at,Qt,Ne,en,An]);return f.createElement(vn.Provider,{value:bn},f.createElement(Jt,(0,E.Z)({},oe,{className:W()(it,"".concat(yt,"-virtual")),scroll:(0,ie.Z)((0,ie.Z)({},ze),{},{x:ot}),components:(0,ie.Z)((0,ie.Z)({},Xe),{},{body:Te!=null&&Te.length?gt:void 0}),columns:Me,internalHooks:P.R,tailor:!0,ref:Ve})))}var Ht=f.forwardRef(Bt);function kt(oe){return K(Ht,oe)}var St=kt(),$t=null},54451:function(Cn,tt,b){"use strict";b.d(tt,{g:function(){return f},v:function(){return U}});var P=b(98506),re=b(33346),ge=b(48736),se=["expandable"],U="RC_TABLE_INTERNAL_COL_DEFINE";function f(fe){var ee=fe.expandable,A=(0,re.Z)(fe,se),E;return"expandable"in fe?E=(0,P.Z)((0,P.Z)({},A),ee):E=A,E.showExpandColumn===!1&&(E.expandIconColumnIndex=-1),E}},22711:function(Cn,tt,b){"use strict";b.r(tt),b.d(tt,{ResizableTextArea:function(){return pe},default:function(){return G}});var P=b(67711),re=b(52873),ge=b(98506),se=b(15142),U=b(16886),f=b(33346),fe=b(92310),ee=b.n(fe),A=b(36901),E=b(66003),x=b(30292),h=b(18929),p=b(59301),_=b(26420),C=b(29301),F=b(34280),R=b(16089),K=`
min-height:0 !important;
max-height:none !important;
height:0 !important;
visibility:hidden !important;
overflow:hidden !important;
position:absolute !important;
z-index:-1000 !important;
top:0 !important;
right:0 !important;
pointer-events: none !important;
`,B=["letter-spacing","line-height","padding-top","padding-bottom","font-family","font-weight","font-size","font-variant","text-rendering","text-transform","width","text-indent","padding-left","padding-right","border-width","box-sizing","word-break","white-space"],D={},I;function S(ne){var Z=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,m=ne.getAttribute("id")||ne.getAttribute("data-reactid")||ne.getAttribute("name");if(Z&&D[m])return D[m];var v=window.getComputedStyle(ne),Q=v.getPropertyValue("box-sizing")||v.getPropertyValue("-moz-box-sizing")||v.getPropertyValue("-webkit-box-sizing"),he=parseFloat(v.getPropertyValue("padding-bottom"))+parseFloat(v.getPropertyValue("padding-top")),Ue=parseFloat(v.getPropertyValue("border-bottom-width"))+parseFloat(v.getPropertyValue("border-top-width")),Oe=B.map(function(Et){return"".concat(Et,":").concat(v.getPropertyValue(Et))}).join(";"),ft={sizingStyle:Oe,paddingSize:he,borderSize:Ue,boxSizing:Q};return Z&&m&&(D[m]=ft),ft}function q(ne){var Z=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,m=arguments.length>2&&arguments[2]!==void 0?arguments[2]:null,v=arguments.length>3&&arguments[3]!==void 0?arguments[3]:null;I||(I=document.createElement("textarea"),I.setAttribute("tab-index","-1"),I.setAttribute("aria-hidden","true"),I.setAttribute("name","hiddenTextarea"),document.body.appendChild(I)),ne.getAttribute("wrap")?I.setAttribute("wrap",ne.getAttribute("wrap")):I.removeAttribute("wrap");var Q=S(ne,Z),he=Q.paddingSize,Ue=Q.borderSize,Oe=Q.boxSizing,ft=Q.sizingStyle;I.setAttribute("style","".concat(ft,";").concat(K)),I.value=ne.value||ne.placeholder||"";var Et=void 0,Ft=void 0,Ut,Se=I.scrollHeight;if(Oe==="border-box"?Se+=Ue:Oe==="content-box"&&(Se-=he),m!==null||v!==null){I.value=" ";var Gt=I.scrollHeight-he;m!==null&&(Et=Gt*m,Oe==="border-box"&&(Et=Et+he+Ue),Se=Math.max(Et,Se)),v!==null&&(Ft=Gt*v,Oe==="border-box"&&(Ft=Ft+he+Ue),Ut=Se>Ft?"":"hidden",Se=Math.min(Ft,Se))}var ht={height:Se,overflowY:Ut,resize:"none"};return Et&&(ht.minHeight=Et),Ft&&(ht.maxHeight=Ft),ht}var ae=["prefixCls","defaultValue","value","autoSize","onResize","className","style","disabled","onChange","onInternalAutoSize"],j=0,Y=1,ie=2,de=p.forwardRef(function(ne,Z){var m=ne,v=m.prefixCls,Q=m.defaultValue,he=m.value,Ue=m.autoSize,Oe=m.onResize,ft=m.className,Et=m.style,Ft=m.disabled,Ut=m.onChange,Se=m.onInternalAutoSize,Gt=(0,f.Z)(m,ae),ht=(0,h.Z)(Q,{value:he,postState:function(on){return on!=null?on:""}}),tn=(0,U.Z)(ht,2),dt=tn[0],Je=tn[1],xe=function(on){Je(on.target.value),Ut==null||Ut(on)},_e=p.useRef();p.useImperativeHandle(Z,function(){return{textArea:_e.current}});var N=p.useMemo(function(){return Ue&&(0,_.Z)(Ue)==="object"?[Ue.minRows,Ue.maxRows]:[]},[Ue]),Fe=(0,U.Z)(N,2),De=Fe[0],V=Fe[1],T=!!Ue,J=function(){try{if(document.activeElement===_e.current){var on=_e.current,rn=on.selectionStart,Ct=on.selectionEnd,gn=on.scrollTop;_e.current.setSelectionRange(rn,Ct),_e.current.scrollTop=gn}}catch(Ln){}},ve=p.useState(ie),te=(0,U.Z)(ve,2),$=te[0],ue=te[1],Ie=p.useState(),Ce=(0,U.Z)(Ie,2),ke=Ce[0],Le=Ce[1],mt=function(){ue(j)};(0,F.Z)(function(){T&&mt()},[he,De,V,T]),(0,F.Z)(function(){if($===j)ue(Y);else if($===Y){var bt=q(_e.current,!1,De,V);ue(ie),Le(bt)}else J()},[$]);var je=p.useRef(),qe=function(){R.Z.cancel(je.current)},ut=function(on){$===ie&&(Oe==null||Oe(on),Ue&&(qe(),je.current=(0,R.Z)(function(){mt()})))};p.useEffect(function(){return qe},[]);var Nt=T?ke:null,It=(0,ge.Z)((0,ge.Z)({},Et),Nt);return($===j||$===Y)&&(It.overflowY="hidden",It.overflowX="hidden"),p.createElement(C.Z,{onResize:ut,disabled:!(Ue||Oe)},p.createElement("textarea",(0,P.Z)({},Gt,{ref:_e,style:It,className:ee()(v,ft,(0,re.Z)({},"".concat(v,"-disabled"),Ft)),disabled:Ft,value:dt,onChange:xe})))}),pe=de,W=["defaultValue","value","onFocus","onBlur","onChange","allowClear","maxLength","onCompositionStart","onCompositionEnd","suffix","prefixCls","showCount","count","className","style","disabled","hidden","classNames","styles","onResize","onClear","onPressEnter","readOnly","autoSize","onKeyDown"],M=p.forwardRef(function(ne,Z){var m,v=ne.defaultValue,Q=ne.value,he=ne.onFocus,Ue=ne.onBlur,Oe=ne.onChange,ft=ne.allowClear,Et=ne.maxLength,Ft=ne.onCompositionStart,Ut=ne.onCompositionEnd,Se=ne.suffix,Gt=ne.prefixCls,ht=Gt===void 0?"rc-textarea":Gt,tn=ne.showCount,dt=ne.count,Je=ne.className,xe=ne.style,_e=ne.disabled,N=ne.hidden,Fe=ne.classNames,De=ne.styles,V=ne.onResize,T=ne.onClear,J=ne.onPressEnter,ve=ne.readOnly,te=ne.autoSize,$=ne.onKeyDown,ue=(0,f.Z)(ne,W),Ie=(0,h.Z)(v,{value:Q,defaultValue:v}),Ce=(0,U.Z)(Ie,2),ke=Ce[0],Le=Ce[1],mt=ke==null?"":String(ke),je=p.useState(!1),qe=(0,U.Z)(je,2),ut=qe[0],Nt=qe[1],It=p.useRef(!1),bt=p.useState(null),on=(0,U.Z)(bt,2),rn=on[0],Ct=on[1],gn=(0,p.useRef)(null),Ln=(0,p.useRef)(null),Mt=function(){var yn;return(yn=Ln.current)===null||yn===void 0?void 0:yn.textArea},hn=function(){Mt().focus()};(0,p.useImperativeHandle)(Z,function(){var Kt;return{resizableTextArea:Ln.current,focus:hn,blur:function(){Mt().blur()},nativeElement:((Kt=gn.current)===null||Kt===void 0?void 0:Kt.nativeElement)||Mt()}}),(0,p.useEffect)(function(){Nt(function(Kt){return!_e&&Kt})},[_e]);var We=p.useState(null),Qe=(0,U.Z)(We,2),He=Qe[0],z=Qe[1];p.useEffect(function(){if(He){var Kt;(Kt=Mt()).setSelectionRange.apply(Kt,(0,se.Z)(He))}},[He]);var le=(0,E.Z)(dt,tn),me=(m=le.max)!==null&&m!==void 0?m:Et,Be=Number(me)>0,be=le.strategy(mt),Tt=!!me&&be>me,Wt=function(yn,Yn){var or=Yn;!It.current&&le.exceedFormatter&&le.max&&le.strategy(Yn)>le.max&&(or=le.exceedFormatter(Yn,{max:le.max}),Yn!==or&&z([Mt().selectionStart||0,Mt().selectionEnd||0])),Le(or),(0,x.rJ)(yn.currentTarget,yn,Oe,or)},an=function(yn){It.current=!0,Ft==null||Ft(yn)},_n=function(yn){It.current=!1,Wt(yn,yn.currentTarget.value),Ut==null||Ut(yn)},Wn=function(yn){Wt(yn,yn.target.value)},zn=function(yn){yn.key==="Enter"&&J&&J(yn),$==null||$(yn)},On=function(yn){Nt(!0),he==null||he(yn)},Un=function(yn){Nt(!1),Ue==null||Ue(yn)},ar=function(yn){Le(""),hn(),(0,x.rJ)(Mt(),yn,Oe)},mr=Se,tr;le.show&&(le.showFormatter?tr=le.showFormatter({value:mt,count:be,maxLength:me}):tr="".concat(be).concat(Be?" / ".concat(me):""),mr=p.createElement(p.Fragment,null,mr,p.createElement("span",{className:ee()("".concat(ht,"-data-count"),Fe==null?void 0:Fe.count),style:De==null?void 0:De.count},tr)));var gr=function(yn){var Yn;V==null||V(yn),(Yn=Mt())!==null&&Yn!==void 0&&Yn.style.height&&Ct(!0)},sn=!te&&!tn&&!ft;return p.createElement(A.BaseInput,{ref:gn,value:mt,allowClear:ft,handleReset:ar,suffix:mr,prefixCls:ht,classNames:(0,ge.Z)((0,ge.Z)({},Fe),{},{affixWrapper:ee()(Fe==null?void 0:Fe.affixWrapper,(0,re.Z)((0,re.Z)({},"".concat(ht,"-show-count"),tn),"".concat(ht,"-textarea-allow-clear"),ft))}),disabled:_e,focused:ut,className:ee()(Je,Tt&&"".concat(ht,"-out-of-range")),style:(0,ge.Z)((0,ge.Z)({},xe),rn&&!sn?{height:"auto"}:{}),dataAttrs:{affixWrapper:{"data-count":typeof tr=="string"?tr:void 0}},hidden:N,readOnly:ve,onClear:T},p.createElement(pe,(0,P.Z)({},ue,{autoSize:te,maxLength:Et,onKeyDown:zn,onChange:Wn,onFocus:On,onBlur:Un,onCompositionStart:an,onCompositionEnd:_n,className:ee()(Fe==null?void 0:Fe.textarea),style:(0,ge.Z)((0,ge.Z)({},De==null?void 0:De.textarea),{},{resize:xe==null?void 0:xe.resize}),disabled:_e,prefixCls:ht,onResize:gr,ref:Ln,readOnly:ve})))}),X=M,G=X},29125:function(Cn,tt,b){"use strict";b.d(tt,{G:function(){return se},Z:function(){return K}});var P=b(92310),re=b.n(P),ge=b(59301);function se(B){var D=B.children,I=B.prefixCls,S=B.id,q=B.overlayInnerStyle,ae=B.bodyClassName,j=B.className,Y=B.style;return ge.createElement("div",{className:re()("".concat(I,"-content"),j),style:Y},ge.createElement("div",{className:re()("".concat(I,"-inner"),ae),id:S,role:"tooltip",style:q},typeof D=="function"?D():D))}var U=b(67711),f=b(98506),fe=b(33346),ee=b(65030),A={shiftX:64,adjustY:1},E={adjustX:1,shiftY:!0},x=[0,0],h={left:{points:["cr","cl"],overflow:E,offset:[-4,0],targetOffset:x},right:{points:["cl","cr"],overflow:E,offset:[4,0],targetOffset:x},top:{points:["bc","tc"],overflow:A,offset:[0,-4],targetOffset:x},bottom:{points:["tc","bc"],overflow:A,offset:[0,4],targetOffset:x},topLeft:{points:["bl","tl"],overflow:A,offset:[0,-4],targetOffset:x},leftTop:{points:["tr","tl"],overflow:E,offset:[-4,0],targetOffset:x},topRight:{points:["br","tr"],overflow:A,offset:[0,-4],targetOffset:x},rightTop:{points:["tl","tr"],overflow:E,offset:[4,0],targetOffset:x},bottomRight:{points:["tr","br"],overflow:A,offset:[0,4],targetOffset:x},rightBottom:{points:["bl","br"],overflow:E,offset:[4,0],targetOffset:x},bottomLeft:{points:["tl","bl"],overflow:A,offset:[0,4],targetOffset:x},leftBottom:{points:["br","bl"],overflow:E,offset:[-4,0],targetOffset:x}},p=null,_=b(80402),C=["overlayClassName","trigger","mouseEnterDelay","mouseLeaveDelay","overlayStyle","prefixCls","children","onVisibleChange","afterVisibleChange","transitionName","animation","motion","placement","align","destroyTooltipOnHide","defaultVisible","getTooltipContainer","overlayInnerStyle","arrowContent","overlay","id","showArrow","classNames","styles"],F=function(D,I){var S=D.overlayClassName,q=D.trigger,ae=q===void 0?["hover"]:q,j=D.mouseEnterDelay,Y=j===void 0?0:j,ie=D.mouseLeaveDelay,de=ie===void 0?.1:ie,pe=D.overlayStyle,W=D.prefixCls,M=W===void 0?"rc-tooltip":W,X=D.children,G=D.onVisibleChange,ne=D.afterVisibleChange,Z=D.transitionName,m=D.animation,v=D.motion,Q=D.placement,he=Q===void 0?"right":Q,Ue=D.align,Oe=Ue===void 0?{}:Ue,ft=D.destroyTooltipOnHide,Et=ft===void 0?!1:ft,Ft=D.defaultVisible,Ut=D.getTooltipContainer,Se=D.overlayInnerStyle,Gt=D.arrowContent,ht=D.overlay,tn=D.id,dt=D.showArrow,Je=dt===void 0?!0:dt,xe=D.classNames,_e=D.styles,N=(0,fe.Z)(D,C),Fe=(0,_.Z)(tn),De=(0,ge.useRef)(null);(0,ge.useImperativeHandle)(I,function(){return De.current});var V=(0,f.Z)({},N);"visible"in D&&(V.popupVisible=D.visible);var T=function(){return ge.createElement(se,{key:"content",prefixCls:M,id:Fe,bodyClassName:xe==null?void 0:xe.body,overlayInnerStyle:(0,f.Z)((0,f.Z)({},Se),_e==null?void 0:_e.body)},ht)},J=function(){var te=ge.Children.only(X),$=(te==null?void 0:te.props)||{},ue=(0,f.Z)((0,f.Z)({},$),{},{"aria-describedby":ht?Fe:null});return ge.cloneElement(X,ue)};return ge.createElement(ee.Z,(0,U.Z)({popupClassName:re()(S,xe==null?void 0:xe.root),prefixCls:M,popup:T,action:ae,builtinPlacements:h,popupPlacement:he,ref:De,popupAlign:Oe,getPopupContainer:Ut,onPopupVisibleChange:G,afterPopupVisibleChange:ne,popupTransitionName:Z,popupAnimation:m,popupMotion:v,defaultPopupVisible:Ft,autoDestroy:Et,mouseLeaveDelay:de,popupStyle:(0,f.Z)((0,f.Z)({},pe),_e==null?void 0:_e.root),mouseEnterDelay:Y,arrow:Je},V),J())},R=(0,ge.forwardRef)(F),K=R},639:function(Cn,tt,b){"use strict";b.d(tt,{Z:function(){return D}});var P=b(67711),re=b(52873),ge=b(98506),se=b(16886),U=b(33346),f=b(59301),fe=b(92310),ee=b.n(fe),A=b(26112),E=b(30699),x=function(S){for(var q=S.prefixCls,ae=S.level,j=S.isStart,Y=S.isEnd,ie="".concat(q,"-indent-unit"),de=[],pe=0;pe<ae;pe+=1)de.push(f.createElement("span",{key:pe,className:ee()(ie,(0,re.Z)((0,re.Z)({},"".concat(ie,"-start"),j[pe]),"".concat(ie,"-end"),Y[pe]))}));return f.createElement("span",{"aria-hidden":"true",className:"".concat(q,"-indent")},de)},h=f.memo(x),p=b(65065),_=b(34061),C=["eventKey","className","style","dragOver","dragOverGapTop","dragOverGapBottom","isLeaf","isStart","isEnd","expanded","selected","checked","halfChecked","loading","domRef","active","data","onMouseMove","selectable"],F="open",R="close",K="---",B=function(S){var q,ae,j,Y=S.eventKey,ie=S.className,de=S.style,pe=S.dragOver,W=S.dragOverGapTop,M=S.dragOverGapBottom,X=S.isLeaf,G=S.isStart,ne=S.isEnd,Z=S.expanded,m=S.selected,v=S.checked,Q=S.halfChecked,he=S.loading,Ue=S.domRef,Oe=S.active,ft=S.data,Et=S.onMouseMove,Ft=S.selectable,Ut=(0,U.Z)(S,C),Se=f.useContext(E.k),Gt=f.useContext(E.y),ht=f.useRef(null),tn=f.useState(!1),dt=(0,se.Z)(tn,2),Je=dt[0],xe=dt[1],_e=!!(Se.disabled||S.disabled||(q=Gt.nodeDisabled)!==null&&q!==void 0&&q.call(Gt,ft)),N=f.useMemo(function(){return!Se.checkable||S.checkable===!1?!1:Se.checkable},[Se.checkable,S.checkable]),Fe=function(be){_e||Se.onNodeSelect(be,(0,_.F)(S))},De=function(be){_e||!N||S.disableCheckbox||Se.onNodeCheck(be,(0,_.F)(S),!v)},V=f.useMemo(function(){return typeof Ft=="boolean"?Ft:Se.selectable},[Ft,Se.selectable]),T=function(be){Se.onNodeClick(be,(0,_.F)(S)),V?Fe(be):De(be)},J=function(be){Se.onNodeDoubleClick(be,(0,_.F)(S))},ve=function(be){Se.onNodeMouseEnter(be,(0,_.F)(S))},te=function(be){Se.onNodeMouseLeave(be,(0,_.F)(S))},$=function(be){Se.onNodeContextMenu(be,(0,_.F)(S))},ue=f.useMemo(function(){return!!(Se.draggable&&(!Se.draggable.nodeDraggable||Se.draggable.nodeDraggable(ft)))},[Se.draggable,ft]),Ie=function(be){be.stopPropagation(),xe(!0),Se.onNodeDragStart(be,S);try{be.dataTransfer.setData("text/plain","")}catch(Tt){}},Ce=function(be){be.preventDefault(),be.stopPropagation(),Se.onNodeDragEnter(be,S)},ke=function(be){be.preventDefault(),be.stopPropagation(),Se.onNodeDragOver(be,S)},Le=function(be){be.stopPropagation(),Se.onNodeDragLeave(be,S)},mt=function(be){be.stopPropagation(),xe(!1),Se.onNodeDragEnd(be,S)},je=function(be){be.preventDefault(),be.stopPropagation(),xe(!1),Se.onNodeDrop(be,S)},qe=function(be){he||Se.onNodeExpand(be,(0,_.F)(S))},ut=f.useMemo(function(){var Be=(0,p.Z)(Se.keyEntities,Y)||{},be=Be.children;return!!(be||[]).length},[Se.keyEntities,Y]),Nt=f.useMemo(function(){return X===!1?!1:X||!Se.loadData&&!ut||Se.loadData&&S.loaded&&!ut},[X,Se.loadData,ut,S.loaded]);f.useEffect(function(){he||typeof Se.loadData=="function"&&Z&&!Nt&&!S.loaded&&Se.onNodeLoad((0,_.F)(S))},[he,Se.loadData,Se.onNodeLoad,Z,Nt,S]);var It=f.useMemo(function(){var Be;return(Be=Se.draggable)!==null&&Be!==void 0&&Be.icon?f.createElement("span",{className:"".concat(Se.prefixCls,"-draggable-icon")},Se.draggable.icon):null},[Se.draggable]),bt=function(be){var Tt=S.switcherIcon||Se.switcherIcon;return typeof Tt=="function"?Tt((0,ge.Z)((0,ge.Z)({},S),{},{isLeaf:be})):Tt},on=function(){if(Nt){var be=bt(!0);return be!==!1?f.createElement("span",{className:ee()("".concat(Se.prefixCls,"-switcher"),"".concat(Se.prefixCls,"-switcher-noop"))},be):null}var Tt=bt(!1);return Tt!==!1?f.createElement("span",{onClick:qe,className:ee()("".concat(Se.prefixCls,"-switcher"),"".concat(Se.prefixCls,"-switcher_").concat(Z?F:R))},Tt):null},rn=f.useMemo(function(){if(!N)return null;var Be=typeof N!="boolean"?N:null;return f.createElement("span",{className:ee()("".concat(Se.prefixCls,"-checkbox"),(0,re.Z)((0,re.Z)((0,re.Z)({},"".concat(Se.prefixCls,"-checkbox-checked"),v),"".concat(Se.prefixCls,"-checkbox-indeterminate"),!v&&Q),"".concat(Se.prefixCls,"-checkbox-disabled"),_e||S.disableCheckbox)),onClick:De,role:"checkbox","aria-checked":Q?"mixed":v,"aria-disabled":_e||S.disableCheckbox,"aria-label":"Select ".concat(typeof S.title=="string"?S.title:"tree node")},Be)},[N,v,Q,_e,S.disableCheckbox,S.title]),Ct=f.useMemo(function(){return Nt?null:Z?F:R},[Nt,Z]),gn=f.useMemo(function(){return f.createElement("span",{className:ee()("".concat(Se.prefixCls,"-iconEle"),"".concat(Se.prefixCls,"-icon__").concat(Ct||"docu"),(0,re.Z)({},"".concat(Se.prefixCls,"-icon_loading"),he))})},[Se.prefixCls,Ct,he]),Ln=f.useMemo(function(){var Be=!!Se.draggable,be=!S.disabled&&Be&&Se.dragOverNodeKey===Y;return be?Se.dropIndicatorRender({dropPosition:Se.dropPosition,dropLevelOffset:Se.dropLevelOffset,indent:Se.indent,prefixCls:Se.prefixCls,direction:Se.direction}):null},[Se.dropPosition,Se.dropLevelOffset,Se.indent,Se.prefixCls,Se.direction,Se.draggable,Se.dragOverNodeKey,Se.dropIndicatorRender]),Mt=f.useMemo(function(){var Be=S.title,be=Be===void 0?K:Be,Tt="".concat(Se.prefixCls,"-node-content-wrapper"),Wt;if(Se.showIcon){var an=S.icon||Se.icon;Wt=an?f.createElement("span",{className:ee()("".concat(Se.prefixCls,"-iconEle"),"".concat(Se.prefixCls,"-icon__customize"))},typeof an=="function"?an(S):an):gn}else Se.loadData&&he&&(Wt=gn);var _n;return typeof be=="function"?_n=be(ft):Se.titleRender?_n=Se.titleRender(ft):_n=be,f.createElement("span",{ref:ht,title:typeof be=="string"?be:"",className:ee()(Tt,"".concat(Tt,"-").concat(Ct||"normal"),(0,re.Z)({},"".concat(Se.prefixCls,"-node-selected"),!_e&&(m||Je))),onMouseEnter:ve,onMouseLeave:te,onContextMenu:$,onClick:T,onDoubleClick:J},Wt,f.createElement("span",{className:"".concat(Se.prefixCls,"-title")},_n),Ln)},[Se.prefixCls,Se.showIcon,S,Se.icon,gn,Se.titleRender,ft,Ct,ve,te,$,T,J]),hn=(0,A.Z)(Ut,{aria:!0,data:!0}),We=(0,p.Z)(Se.keyEntities,Y)||{},Qe=We.level,He=ne[ne.length-1],z=!_e&&ue,le=Se.draggingNodeKey===Y,me=Ft!==void 0?{"aria-selected":!!Ft}:void 0;return f.createElement("div",(0,P.Z)({ref:Ue,role:"treeitem","aria-expanded":X?void 0:Z,className:ee()(ie,"".concat(Se.prefixCls,"-treenode"),(j={},(0,re.Z)((0,re.Z)((0,re.Z)((0,re.Z)((0,re.Z)((0,re.Z)((0,re.Z)((0,re.Z)((0,re.Z)((0,re.Z)(j,"".concat(Se.prefixCls,"-treenode-disabled"),_e),"".concat(Se.prefixCls,"-treenode-switcher-").concat(Z?"open":"close"),!X),"".concat(Se.prefixCls,"-treenode-checkbox-checked"),v),"".concat(Se.prefixCls,"-treenode-checkbox-indeterminate"),Q),"".concat(Se.prefixCls,"-treenode-selected"),m),"".concat(Se.prefixCls,"-treenode-loading"),he),"".concat(Se.prefixCls,"-treenode-active"),Oe),"".concat(Se.prefixCls,"-treenode-leaf-last"),He),"".concat(Se.prefixCls,"-treenode-draggable"),ue),"dragging",le),(0,re.Z)((0,re.Z)((0,re.Z)((0,re.Z)((0,re.Z)((0,re.Z)((0,re.Z)(j,"drop-target",Se.dropTargetKey===Y),"drop-container",Se.dropContainerKey===Y),"drag-over",!_e&&pe),"drag-over-gap-top",!_e&&W),"drag-over-gap-bottom",!_e&&M),"filter-node",(ae=Se.filterTreeNode)===null||ae===void 0?void 0:ae.call(Se,(0,_.F)(S))),"".concat(Se.prefixCls,"-treenode-leaf"),Nt))),style:de,draggable:z,onDragStart:z?Ie:void 0,onDragEnter:ue?Ce:void 0,onDragOver:ue?ke:void 0,onDragLeave:ue?Le:void 0,onDrop:ue?je:void 0,onDragEnd:ue?mt:void 0,onMouseMove:Et},me,hn),f.createElement(h,{prefixCls:Se.prefixCls,level:Qe,isStart:G,isEnd:ne}),It,on(),rn,Mt)};B.isTreeNode=1;var D=B},30699:function(Cn,tt,b){"use strict";b.d(tt,{k:function(){return re},y:function(){return ge}});var P=b(59301),re=P.createContext(null),ge=P.createContext({})},71598:function(Cn,tt,b){"use strict";b.d(tt,{OF:function(){return Y.Z},y6:function(){return R.y},ZP:function(){return _e}});var P=b(67711),re=b(26420),ge=b(98506),se=b(15142),U=b(42573),f=b(58698),fe=b(62437),ee=b(74700),A=b(45080),E=b(52873),x=b(92310),h=b.n(x),p=b(10228),_=b(26112),C=b(48736),F=b(59301),R=b(30699),K=function(Fe){var De=Fe.dropPosition,V=Fe.dropLevelOffset,T=Fe.indent,J={pointerEvents:"none",position:"absolute",right:0,backgroundColor:"red",height:2};switch(De){case-1:J.top=0,J.left=-V*T;break;case 1:J.bottom=0,J.left=-V*T;break;case 0:J.bottom=0,J.left=T;break}return F.createElement("div",{style:J})},B=K;function D(N){if(N==null)throw new TypeError("Cannot destructure "+N)}var I=b(16886),S=b(33346),q=b(34280),ae=b(6790),j=b(77900),Y=b(639);function ie(N,Fe){var De=F.useState(!1),V=(0,I.Z)(De,2),T=V[0],J=V[1];(0,q.Z)(function(){if(T)return N(),function(){Fe()}},[T]),(0,q.Z)(function(){return J(!0),function(){J(!1)}},[])}var de=ie,pe=b(34061),W=["className","style","motion","motionNodes","motionType","onMotionStart","onMotionEnd","active","treeNodeRequiredProps"],M=F.forwardRef(function(N,Fe){var De=N.className,V=N.style,T=N.motion,J=N.motionNodes,ve=N.motionType,te=N.onMotionStart,$=N.onMotionEnd,ue=N.active,Ie=N.treeNodeRequiredProps,Ce=(0,S.Z)(N,W),ke=F.useState(!0),Le=(0,I.Z)(ke,2),mt=Le[0],je=Le[1],qe=F.useContext(R.k),ut=qe.prefixCls,Nt=J&&ve!=="hide";(0,q.Z)(function(){J&&Nt!==mt&&je(Nt)},[J]);var It=function(){J&&te()},bt=F.useRef(!1),on=function(){J&&!bt.current&&(bt.current=!0,$())};de(It,on);var rn=function(gn){Nt===gn&&on()};return J?F.createElement(j.default,(0,P.Z)({ref:Fe,visible:mt},T,{motionAppear:ve==="show",onVisibleChanged:rn}),function(Ct,gn){var Ln=Ct.className,Mt=Ct.style;return F.createElement("div",{ref:gn,className:h()("".concat(ut,"-treenode-motion"),Ln),style:Mt},J.map(function(hn){var We=Object.assign({},(D(hn.data),hn.data)),Qe=hn.title,He=hn.key,z=hn.isStart,le=hn.isEnd;delete We.children;var me=(0,pe.H8)(He,Ie);return F.createElement(Y.Z,(0,P.Z)({},We,me,{title:Qe,active:ue,data:hn.data,key:He,isStart:z,isEnd:le}))}))}):F.createElement(Y.Z,(0,P.Z)({domRef:Fe,className:De,style:V},Ce,{active:ue}))}),X=M;function G(){var N=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[],Fe=arguments.length>1&&arguments[1]!==void 0?arguments[1]:[],De=N.length,V=Fe.length;if(Math.abs(De-V)!==1)return{add:!1,key:null};function T(J,ve){var te=new Map;J.forEach(function(ue){te.set(ue,!0)});var $=ve.filter(function(ue){return!te.has(ue)});return $.length===1?$[0]:null}return De<V?{add:!0,key:T(N,Fe)}:{add:!1,key:T(Fe,N)}}function ne(N,Fe,De){var V=N.findIndex(function(te){return te.key===De}),T=N[V+1],J=Fe.findIndex(function(te){return te.key===De});if(T){var ve=Fe.findIndex(function(te){return te.key===T.key});return Fe.slice(J+1,ve)}return Fe.slice(J+1)}var Z=["prefixCls","data","selectable","checkable","expandedKeys","selectedKeys","checkedKeys","loadedKeys","loadingKeys","halfCheckedKeys","keyEntities","disabled","dragging","dragOverNodeKey","dropPosition","motion","height","itemHeight","virtual","scrollWidth","focusable","activeItem","focused","tabIndex","onKeyDown","onFocus","onBlur","onActiveChange","onListChangeStart","onListChangeEnd"],m={width:0,height:0,display:"flex",overflow:"hidden",opacity:0,border:0,padding:0,margin:0},v=function(){},Q="RC_TREE_MOTION_".concat(Math.random()),he={key:Q},Ue={key:Q,level:0,index:0,pos:"0",node:he,nodes:[he]},Oe={parent:null,children:[],pos:Ue.pos,data:he,title:null,key:Q,isStart:[],isEnd:[]};function ft(N,Fe,De,V){return Fe===!1||!De?N:N.slice(0,Math.ceil(De/V)+1)}function Et(N){var Fe=N.key,De=N.pos;return(0,pe.km)(Fe,De)}function Ft(N){for(var Fe=String(N.data.key),De=N;De.parent;)De=De.parent,Fe="".concat(De.data.key," > ").concat(Fe);return Fe}var Ut=F.forwardRef(function(N,Fe){var De=N.prefixCls,V=N.data,T=N.selectable,J=N.checkable,ve=N.expandedKeys,te=N.selectedKeys,$=N.checkedKeys,ue=N.loadedKeys,Ie=N.loadingKeys,Ce=N.halfCheckedKeys,ke=N.keyEntities,Le=N.disabled,mt=N.dragging,je=N.dragOverNodeKey,qe=N.dropPosition,ut=N.motion,Nt=N.height,It=N.itemHeight,bt=N.virtual,on=N.scrollWidth,rn=N.focusable,Ct=N.activeItem,gn=N.focused,Ln=N.tabIndex,Mt=N.onKeyDown,hn=N.onFocus,We=N.onBlur,Qe=N.onActiveChange,He=N.onListChangeStart,z=N.onListChangeEnd,le=(0,S.Z)(N,Z),me=F.useRef(null),Be=F.useRef(null);F.useImperativeHandle(Fe,function(){return{scrollTo:function(zt){me.current.scrollTo(zt)},getIndentWidth:function(){return Be.current.offsetWidth}}});var be=F.useState(ve),Tt=(0,I.Z)(be,2),Wt=Tt[0],an=Tt[1],_n=F.useState(V),Wn=(0,I.Z)(_n,2),zn=Wn[0],On=Wn[1],Un=F.useState(V),ar=(0,I.Z)(Un,2),mr=ar[0],tr=ar[1],gr=F.useState([]),sn=(0,I.Z)(gr,2),Kt=sn[0],yn=sn[1],Yn=F.useState(null),or=(0,I.Z)(Yn,2),Ke=or[0],Pe=or[1],Yt=F.useRef(V);Yt.current=V;function Lt(){var Xt=Yt.current;On(Xt),tr(Xt),yn([]),Pe(null),z()}(0,q.Z)(function(){an(ve);var Xt=G(Wt,ve);if(Xt.key!==null)if(Xt.add){var zt=zn.findIndex(function(Pt){var Re=Pt.key;return Re===Xt.key}),pn=ft(ne(zn,V,Xt.key),bt,Nt,It),Ot=zn.slice();Ot.splice(zt+1,0,Oe),tr(Ot),yn(pn),Pe("show")}else{var cn=V.findIndex(function(Pt){var Re=Pt.key;return Re===Xt.key}),un=ft(ne(V,zn,Xt.key),bt,Nt,It),lt=V.slice();lt.splice(cn+1,0,Oe),tr(lt),yn(un),Pe("hide")}else zn!==V&&(On(V),tr(V))},[ve,V]),F.useEffect(function(){mt||Lt()},[mt]);var qt=ut?mr:V,nn={expandedKeys:ve,selectedKeys:te,loadedKeys:ue,loadingKeys:Ie,checkedKeys:$,halfCheckedKeys:Ce,dragOverNodeKey:je,dropPosition:qe,keyEntities:ke};return F.createElement(F.Fragment,null,gn&&Ct&&F.createElement("span",{style:m,"aria-live":"assertive"},Ft(Ct)),F.createElement("div",null,F.createElement("input",{style:m,disabled:rn===!1||Le,tabIndex:rn!==!1?Ln:null,onKeyDown:Mt,onFocus:hn,onBlur:We,value:"",onChange:v,"aria-label":"for screen reader"})),F.createElement("div",{className:"".concat(De,"-treenode"),"aria-hidden":!0,style:{position:"absolute",pointerEvents:"none",visibility:"hidden",height:0,overflow:"hidden",border:0,padding:0}},F.createElement("div",{className:"".concat(De,"-indent")},F.createElement("div",{ref:Be,className:"".concat(De,"-indent-unit")}))),F.createElement(ae.Z,(0,P.Z)({},le,{data:qt,itemKey:Et,height:Nt,fullHeight:!1,virtual:bt,itemHeight:It,scrollWidth:on,prefixCls:"".concat(De,"-list"),ref:me,role:"tree",onVisibleChange:function(zt){zt.every(function(pn){return Et(pn)!==Q})&&Lt()}}),function(Xt){var zt=Xt.pos,pn=Object.assign({},(D(Xt.data),Xt.data)),Ot=Xt.title,cn=Xt.key,un=Xt.isStart,lt=Xt.isEnd,Pt=(0,pe.km)(cn,zt);delete pn.key,delete pn.children;var Re=(0,pe.H8)(Pt,nn);return F.createElement(X,(0,P.Z)({},pn,Re,{title:Ot,active:!!Ct&&cn===Ct.key,pos:zt,data:Xt.data,isStart:un,isEnd:lt,motion:ut,motionNodes:cn===Q?Kt:null,motionType:Ke,onMotionStart:He,onMotionEnd:Lt,treeNodeRequiredProps:nn,onMouseMove:function(){Qe(null)}}))}))}),Se=Ut,Gt=b(82661),ht=b(34643),tn=b(65065),dt=10,Je=function(N){(0,ee.Z)(De,N);var Fe=(0,A.Z)(De);function De(){var V;(0,U.Z)(this,De);for(var T=arguments.length,J=new Array(T),ve=0;ve<T;ve++)J[ve]=arguments[ve];return V=Fe.call.apply(Fe,[this].concat(J)),(0,E.Z)((0,fe.Z)(V),"destroyed",!1),(0,E.Z)((0,fe.Z)(V),"delayedDragEnterLogic",void 0),(0,E.Z)((0,fe.Z)(V),"loadingRetryTimes",{}),(0,E.Z)((0,fe.Z)(V),"state",{keyEntities:{},indent:null,selectedKeys:[],checkedKeys:[],halfCheckedKeys:[],loadedKeys:[],loadingKeys:[],expandedKeys:[],draggingNodeKey:null,dragChildrenKeys:[],dropTargetKey:null,dropPosition:null,dropContainerKey:null,dropLevelOffset:null,dropTargetPos:null,dropAllowed:!0,dragOverNodeKey:null,treeData:[],flattenNodes:[],focused:!1,activeKey:null,listChanging:!1,prevProps:null,fieldNames:(0,pe.w$)()}),(0,E.Z)((0,fe.Z)(V),"dragStartMousePosition",null),(0,E.Z)((0,fe.Z)(V),"dragNodeProps",null),(0,E.Z)((0,fe.Z)(V),"currentMouseOverDroppableNodeKey",null),(0,E.Z)((0,fe.Z)(V),"listRef",F.createRef()),(0,E.Z)((0,fe.Z)(V),"onNodeDragStart",function(te,$){var ue=V.state,Ie=ue.expandedKeys,Ce=ue.keyEntities,ke=V.props.onDragStart,Le=$.eventKey;V.dragNodeProps=$,V.dragStartMousePosition={x:te.clientX,y:te.clientY};var mt=(0,Gt._5)(Ie,Le);V.setState({draggingNodeKey:Le,dragChildrenKeys:(0,Gt.wA)(Le,Ce),indent:V.listRef.current.getIndentWidth()}),V.setExpandedKeys(mt),window.addEventListener("dragend",V.onWindowDragEnd),ke==null||ke({event:te,node:(0,pe.F)($)})}),(0,E.Z)((0,fe.Z)(V),"onNodeDragEnter",function(te,$){var ue=V.state,Ie=ue.expandedKeys,Ce=ue.keyEntities,ke=ue.dragChildrenKeys,Le=ue.flattenNodes,mt=ue.indent,je=V.props,qe=je.onDragEnter,ut=je.onExpand,Nt=je.allowDrop,It=je.direction,bt=$.pos,on=$.eventKey;if(V.currentMouseOverDroppableNodeKey!==on&&(V.currentMouseOverDroppableNodeKey=on),!V.dragNodeProps){V.resetDragState();return}var rn=(0,Gt.OM)(te,V.dragNodeProps,$,mt,V.dragStartMousePosition,Nt,Le,Ce,Ie,It),Ct=rn.dropPosition,gn=rn.dropLevelOffset,Ln=rn.dropTargetKey,Mt=rn.dropContainerKey,hn=rn.dropTargetPos,We=rn.dropAllowed,Qe=rn.dragOverNodeKey;if(ke.includes(Ln)||!We){V.resetDragState();return}if(V.delayedDragEnterLogic||(V.delayedDragEnterLogic={}),Object.keys(V.delayedDragEnterLogic).forEach(function(He){clearTimeout(V.delayedDragEnterLogic[He])}),V.dragNodeProps.eventKey!==$.eventKey&&(te.persist(),V.delayedDragEnterLogic[bt]=window.setTimeout(function(){if(V.state.draggingNodeKey!==null){var He=(0,se.Z)(Ie),z=(0,tn.Z)(Ce,$.eventKey);z&&(z.children||[]).length&&(He=(0,Gt.L0)(Ie,$.eventKey)),V.props.hasOwnProperty("expandedKeys")||V.setExpandedKeys(He),ut==null||ut(He,{node:(0,pe.F)($),expanded:!0,nativeEvent:te.nativeEvent})}},800)),V.dragNodeProps.eventKey===Ln&&gn===0){V.resetDragState();return}V.setState({dragOverNodeKey:Qe,dropPosition:Ct,dropLevelOffset:gn,dropTargetKey:Ln,dropContainerKey:Mt,dropTargetPos:hn,dropAllowed:We}),qe==null||qe({event:te,node:(0,pe.F)($),expandedKeys:Ie})}),(0,E.Z)((0,fe.Z)(V),"onNodeDragOver",function(te,$){var ue=V.state,Ie=ue.dragChildrenKeys,Ce=ue.flattenNodes,ke=ue.keyEntities,Le=ue.expandedKeys,mt=ue.indent,je=V.props,qe=je.onDragOver,ut=je.allowDrop,Nt=je.direction;if(V.dragNodeProps){var It=(0,Gt.OM)(te,V.dragNodeProps,$,mt,V.dragStartMousePosition,ut,Ce,ke,Le,Nt),bt=It.dropPosition,on=It.dropLevelOffset,rn=It.dropTargetKey,Ct=It.dropContainerKey,gn=It.dropTargetPos,Ln=It.dropAllowed,Mt=It.dragOverNodeKey;Ie.includes(rn)||!Ln||(V.dragNodeProps.eventKey===rn&&on===0?V.state.dropPosition===null&&V.state.dropLevelOffset===null&&V.state.dropTargetKey===null&&V.state.dropContainerKey===null&&V.state.dropTargetPos===null&&V.state.dropAllowed===!1&&V.state.dragOverNodeKey===null||V.resetDragState():bt===V.state.dropPosition&&on===V.state.dropLevelOffset&&rn===V.state.dropTargetKey&&Ct===V.state.dropContainerKey&&gn===V.state.dropTargetPos&&Ln===V.state.dropAllowed&&Mt===V.state.dragOverNodeKey||V.setState({dropPosition:bt,dropLevelOffset:on,dropTargetKey:rn,dropContainerKey:Ct,dropTargetPos:gn,dropAllowed:Ln,dragOverNodeKey:Mt}),qe==null||qe({event:te,node:(0,pe.F)($)}))}}),(0,E.Z)((0,fe.Z)(V),"onNodeDragLeave",function(te,$){V.currentMouseOverDroppableNodeKey===$.eventKey&&!te.currentTarget.contains(te.relatedTarget)&&(V.resetDragState(),V.currentMouseOverDroppableNodeKey=null);var ue=V.props.onDragLeave;ue==null||ue({event:te,node:(0,pe.F)($)})}),(0,E.Z)((0,fe.Z)(V),"onWindowDragEnd",function(te){V.onNodeDragEnd(te,null,!0),window.removeEventListener("dragend",V.onWindowDragEnd)}),(0,E.Z)((0,fe.Z)(V),"onNodeDragEnd",function(te,$){var ue=V.props.onDragEnd;V.setState({dragOverNodeKey:null}),V.cleanDragState(),ue==null||ue({event:te,node:(0,pe.F)($)}),V.dragNodeProps=null,window.removeEventListener("dragend",V.onWindowDragEnd)}),(0,E.Z)((0,fe.Z)(V),"onNodeDrop",function(te,$){var ue,Ie=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1,Ce=V.state,ke=Ce.dragChildrenKeys,Le=Ce.dropPosition,mt=Ce.dropTargetKey,je=Ce.dropTargetPos,qe=Ce.dropAllowed;if(qe){var ut=V.props.onDrop;if(V.setState({dragOverNodeKey:null}),V.cleanDragState(),mt!==null){var Nt=(0,ge.Z)((0,ge.Z)({},(0,pe.H8)(mt,V.getTreeNodeRequiredProps())),{},{active:((ue=V.getActiveItem())===null||ue===void 0?void 0:ue.key)===mt,data:(0,tn.Z)(V.state.keyEntities,mt).node}),It=ke.includes(mt);(0,C.ZP)(!It,"Can not drop to dragNode's children node. This is a bug of rc-tree. Please report an issue.");var bt=(0,Gt.yx)(je),on={event:te,node:(0,pe.F)(Nt),dragNode:V.dragNodeProps?(0,pe.F)(V.dragNodeProps):null,dragNodesKeys:[V.dragNodeProps.eventKey].concat(ke),dropToGap:Le!==0,dropPosition:Le+Number(bt[bt.length-1])};Ie||ut==null||ut(on),V.dragNodeProps=null}}}),(0,E.Z)((0,fe.Z)(V),"cleanDragState",function(){var te=V.state.draggingNodeKey;te!==null&&V.setState({draggingNodeKey:null,dropPosition:null,dropContainerKey:null,dropTargetKey:null,dropLevelOffset:null,dropAllowed:!0,dragOverNodeKey:null}),V.dragStartMousePosition=null,V.currentMouseOverDroppableNodeKey=null}),(0,E.Z)((0,fe.Z)(V),"triggerExpandActionExpand",function(te,$){var ue=V.state,Ie=ue.expandedKeys,Ce=ue.flattenNodes,ke=$.expanded,Le=$.key,mt=$.isLeaf;if(!(mt||te.shiftKey||te.metaKey||te.ctrlKey)){var je=Ce.filter(function(ut){return ut.key===Le})[0],qe=(0,pe.F)((0,ge.Z)((0,ge.Z)({},(0,pe.H8)(Le,V.getTreeNodeRequiredProps())),{},{data:je.data}));V.setExpandedKeys(ke?(0,Gt._5)(Ie,Le):(0,Gt.L0)(Ie,Le)),V.onNodeExpand(te,qe)}}),(0,E.Z)((0,fe.Z)(V),"onNodeClick",function(te,$){var ue=V.props,Ie=ue.onClick,Ce=ue.expandAction;Ce==="click"&&V.triggerExpandActionExpand(te,$),Ie==null||Ie(te,$)}),(0,E.Z)((0,fe.Z)(V),"onNodeDoubleClick",function(te,$){var ue=V.props,Ie=ue.onDoubleClick,Ce=ue.expandAction;Ce==="doubleClick"&&V.triggerExpandActionExpand(te,$),Ie==null||Ie(te,$)}),(0,E.Z)((0,fe.Z)(V),"onNodeSelect",function(te,$){var ue=V.state.selectedKeys,Ie=V.state,Ce=Ie.keyEntities,ke=Ie.fieldNames,Le=V.props,mt=Le.onSelect,je=Le.multiple,qe=$.selected,ut=$[ke.key],Nt=!qe;Nt?je?ue=(0,Gt.L0)(ue,ut):ue=[ut]:ue=(0,Gt._5)(ue,ut);var It=ue.map(function(bt){var on=(0,tn.Z)(Ce,bt);return on?on.node:null}).filter(Boolean);V.setUncontrolledState({selectedKeys:ue}),mt==null||mt(ue,{event:"select",selected:Nt,node:$,selectedNodes:It,nativeEvent:te.nativeEvent})}),(0,E.Z)((0,fe.Z)(V),"onNodeCheck",function(te,$,ue){var Ie=V.state,Ce=Ie.keyEntities,ke=Ie.checkedKeys,Le=Ie.halfCheckedKeys,mt=V.props,je=mt.checkStrictly,qe=mt.onCheck,ut=$.key,Nt,It={event:"check",node:$,checked:ue,nativeEvent:te.nativeEvent};if(je){var bt=ue?(0,Gt.L0)(ke,ut):(0,Gt._5)(ke,ut),on=(0,Gt._5)(Le,ut);Nt={checked:bt,halfChecked:on},It.checkedNodes=bt.map(function(hn){return(0,tn.Z)(Ce,hn)}).filter(Boolean).map(function(hn){return hn.node}),V.setUncontrolledState({checkedKeys:bt})}else{var rn=(0,ht.S)([].concat((0,se.Z)(ke),[ut]),!0,Ce),Ct=rn.checkedKeys,gn=rn.halfCheckedKeys;if(!ue){var Ln=new Set(Ct);Ln.delete(ut);var Mt=(0,ht.S)(Array.from(Ln),{checked:!1,halfCheckedKeys:gn},Ce);Ct=Mt.checkedKeys,gn=Mt.halfCheckedKeys}Nt=Ct,It.checkedNodes=[],It.checkedNodesPositions=[],It.halfCheckedKeys=gn,Ct.forEach(function(hn){var We=(0,tn.Z)(Ce,hn);if(We){var Qe=We.node,He=We.pos;It.checkedNodes.push(Qe),It.checkedNodesPositions.push({node:Qe,pos:He})}}),V.setUncontrolledState({checkedKeys:Ct},!1,{halfCheckedKeys:gn})}qe==null||qe(Nt,It)}),(0,E.Z)((0,fe.Z)(V),"onNodeLoad",function(te){var $,ue=te.key,Ie=V.state.keyEntities,Ce=(0,tn.Z)(Ie,ue);if(!(Ce!=null&&($=Ce.children)!==null&&$!==void 0&&$.length)){var ke=new Promise(function(Le,mt){V.setState(function(je){var qe=je.loadedKeys,ut=qe===void 0?[]:qe,Nt=je.loadingKeys,It=Nt===void 0?[]:Nt,bt=V.props,on=bt.loadData,rn=bt.onLoad;if(!on||ut.includes(ue)||It.includes(ue))return null;var Ct=on(te);return Ct.then(function(){var gn=V.state.loadedKeys,Ln=(0,Gt.L0)(gn,ue);rn==null||rn(Ln,{event:"load",node:te}),V.setUncontrolledState({loadedKeys:Ln}),V.setState(function(Mt){return{loadingKeys:(0,Gt._5)(Mt.loadingKeys,ue)}}),Le()}).catch(function(gn){if(V.setState(function(Mt){return{loadingKeys:(0,Gt._5)(Mt.loadingKeys,ue)}}),V.loadingRetryTimes[ue]=(V.loadingRetryTimes[ue]||0)+1,V.loadingRetryTimes[ue]>=dt){var Ln=V.state.loadedKeys;(0,C.ZP)(!1,"Retry for `loadData` many times but still failed. No more retry."),V.setUncontrolledState({loadedKeys:(0,Gt.L0)(Ln,ue)}),Le()}mt(gn)}),{loadingKeys:(0,Gt.L0)(It,ue)}})});return ke.catch(function(){}),ke}}),(0,E.Z)((0,fe.Z)(V),"onNodeMouseEnter",function(te,$){var ue=V.props.onMouseEnter;ue==null||ue({event:te,node:$})}),(0,E.Z)((0,fe.Z)(V),"onNodeMouseLeave",function(te,$){var ue=V.props.onMouseLeave;ue==null||ue({event:te,node:$})}),(0,E.Z)((0,fe.Z)(V),"onNodeContextMenu",function(te,$){var ue=V.props.onRightClick;ue&&(te.preventDefault(),ue({event:te,node:$}))}),(0,E.Z)((0,fe.Z)(V),"onFocus",function(){var te=V.props.onFocus;V.setState({focused:!0});for(var $=arguments.length,ue=new Array($),Ie=0;Ie<$;Ie++)ue[Ie]=arguments[Ie];te==null||te.apply(void 0,ue)}),(0,E.Z)((0,fe.Z)(V),"onBlur",function(){var te=V.props.onBlur;V.setState({focused:!1}),V.onActiveChange(null);for(var $=arguments.length,ue=new Array($),Ie=0;Ie<$;Ie++)ue[Ie]=arguments[Ie];te==null||te.apply(void 0,ue)}),(0,E.Z)((0,fe.Z)(V),"getTreeNodeRequiredProps",function(){var te=V.state,$=te.expandedKeys,ue=te.selectedKeys,Ie=te.loadedKeys,Ce=te.loadingKeys,ke=te.checkedKeys,Le=te.halfCheckedKeys,mt=te.dragOverNodeKey,je=te.dropPosition,qe=te.keyEntities;return{expandedKeys:$||[],selectedKeys:ue||[],loadedKeys:Ie||[],loadingKeys:Ce||[],checkedKeys:ke||[],halfCheckedKeys:Le||[],dragOverNodeKey:mt,dropPosition:je,keyEntities:qe}}),(0,E.Z)((0,fe.Z)(V),"setExpandedKeys",function(te){var $=V.state,ue=$.treeData,Ie=$.fieldNames,Ce=(0,pe.oH)(ue,te,Ie);V.setUncontrolledState({expandedKeys:te,flattenNodes:Ce},!0)}),(0,E.Z)((0,fe.Z)(V),"onNodeExpand",function(te,$){var ue=V.state.expandedKeys,Ie=V.state,Ce=Ie.listChanging,ke=Ie.fieldNames,Le=V.props,mt=Le.onExpand,je=Le.loadData,qe=$.expanded,ut=$[ke.key];if(!Ce){var Nt=ue.includes(ut),It=!qe;if((0,C.ZP)(qe&&Nt||!qe&&!Nt,"Expand state not sync with index check"),ue=It?(0,Gt.L0)(ue,ut):(0,Gt._5)(ue,ut),V.setExpandedKeys(ue),mt==null||mt(ue,{node:$,expanded:It,nativeEvent:te.nativeEvent}),It&&je){var bt=V.onNodeLoad($);bt&&bt.then(function(){var on=(0,pe.oH)(V.state.treeData,ue,ke);V.setUncontrolledState({flattenNodes:on})}).catch(function(){var on=V.state.expandedKeys,rn=(0,Gt._5)(on,ut);V.setExpandedKeys(rn)})}}}),(0,E.Z)((0,fe.Z)(V),"onListChangeStart",function(){V.setUncontrolledState({listChanging:!0})}),(0,E.Z)((0,fe.Z)(V),"onListChangeEnd",function(){setTimeout(function(){V.setUncontrolledState({listChanging:!1})})}),(0,E.Z)((0,fe.Z)(V),"onActiveChange",function(te){var $=V.state.activeKey,ue=V.props,Ie=ue.onActiveChange,Ce=ue.itemScrollOffset,ke=Ce===void 0?0:Ce;$!==te&&(V.setState({activeKey:te}),te!==null&&V.scrollTo({key:te,offset:ke}),Ie==null||Ie(te))}),(0,E.Z)((0,fe.Z)(V),"getActiveItem",function(){var te=V.state,$=te.activeKey,ue=te.flattenNodes;return $===null?null:ue.find(function(Ie){var Ce=Ie.key;return Ce===$})||null}),(0,E.Z)((0,fe.Z)(V),"offsetActiveKey",function(te){var $=V.state,ue=$.flattenNodes,Ie=$.activeKey,Ce=ue.findIndex(function(mt){var je=mt.key;return je===Ie});Ce===-1&&te<0&&(Ce=ue.length),Ce=(Ce+te+ue.length)%ue.length;var ke=ue[Ce];if(ke){var Le=ke.key;V.onActiveChange(Le)}else V.onActiveChange(null)}),(0,E.Z)((0,fe.Z)(V),"onKeyDown",function(te){var $=V.state,ue=$.activeKey,Ie=$.expandedKeys,Ce=$.checkedKeys,ke=$.fieldNames,Le=V.props,mt=Le.onKeyDown,je=Le.checkable,qe=Le.selectable;switch(te.which){case p.Z.UP:{V.offsetActiveKey(-1),te.preventDefault();break}case p.Z.DOWN:{V.offsetActiveKey(1),te.preventDefault();break}}var ut=V.getActiveItem();if(ut&&ut.data){var Nt=V.getTreeNodeRequiredProps(),It=ut.data.isLeaf===!1||!!(ut.data[ke.children]||[]).length,bt=(0,pe.F)((0,ge.Z)((0,ge.Z)({},(0,pe.H8)(ue,Nt)),{},{data:ut.data,active:!0}));switch(te.which){case p.Z.LEFT:{It&&Ie.includes(ue)?V.onNodeExpand({},bt):ut.parent&&V.onActiveChange(ut.parent.key),te.preventDefault();break}case p.Z.RIGHT:{It&&!Ie.includes(ue)?V.onNodeExpand({},bt):ut.children&&ut.children.length&&V.onActiveChange(ut.children[0].key),te.preventDefault();break}case p.Z.ENTER:case p.Z.SPACE:{je&&!bt.disabled&&bt.checkable!==!1&&!bt.disableCheckbox?V.onNodeCheck({},bt,!Ce.includes(ue)):!je&&qe&&!bt.disabled&&bt.selectable!==!1&&V.onNodeSelect({},bt);break}}}mt==null||mt(te)}),(0,E.Z)((0,fe.Z)(V),"setUncontrolledState",function(te){var $=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,ue=arguments.length>2&&arguments[2]!==void 0?arguments[2]:null;if(!V.destroyed){var Ie=!1,Ce=!0,ke={};Object.keys(te).forEach(function(Le){if(V.props.hasOwnProperty(Le)){Ce=!1;return}Ie=!0,ke[Le]=te[Le]}),Ie&&(!$||Ce)&&V.setState((0,ge.Z)((0,ge.Z)({},ke),ue))}}),(0,E.Z)((0,fe.Z)(V),"scrollTo",function(te){V.listRef.current.scrollTo(te)}),V}return(0,f.Z)(De,[{key:"componentDidMount",value:function(){this.destroyed=!1,this.onUpdated()}},{key:"componentDidUpdate",value:function(){this.onUpdated()}},{key:"onUpdated",value:function(){var T=this.props,J=T.activeKey,ve=T.itemScrollOffset,te=ve===void 0?0:ve;J!==void 0&&J!==this.state.activeKey&&(this.setState({activeKey:J}),J!==null&&this.scrollTo({key:J,offset:te}))}},{key:"componentWillUnmount",value:function(){window.removeEventListener("dragend",this.onWindowDragEnd),this.destroyed=!0}},{key:"resetDragState",value:function(){this.setState({dragOverNodeKey:null,dropPosition:null,dropLevelOffset:null,dropTargetKey:null,dropContainerKey:null,dropTargetPos:null,dropAllowed:!1})}},{key:"render",value:function(){var T=this.state,J=T.focused,ve=T.flattenNodes,te=T.keyEntities,$=T.draggingNodeKey,ue=T.activeKey,Ie=T.dropLevelOffset,Ce=T.dropContainerKey,ke=T.dropTargetKey,Le=T.dropPosition,mt=T.dragOverNodeKey,je=T.indent,qe=this.props,ut=qe.prefixCls,Nt=qe.className,It=qe.style,bt=qe.showLine,on=qe.focusable,rn=qe.tabIndex,Ct=rn===void 0?0:rn,gn=qe.selectable,Ln=qe.showIcon,Mt=qe.icon,hn=qe.switcherIcon,We=qe.draggable,Qe=qe.checkable,He=qe.checkStrictly,z=qe.disabled,le=qe.motion,me=qe.loadData,Be=qe.filterTreeNode,be=qe.height,Tt=qe.itemHeight,Wt=qe.scrollWidth,an=qe.virtual,_n=qe.titleRender,Wn=qe.dropIndicatorRender,zn=qe.onContextMenu,On=qe.onScroll,Un=qe.direction,ar=qe.rootClassName,mr=qe.rootStyle,tr=(0,_.Z)(this.props,{aria:!0,data:!0}),gr;We&&((0,re.Z)(We)==="object"?gr=We:typeof We=="function"?gr={nodeDraggable:We}:gr={});var sn={prefixCls:ut,selectable:gn,showIcon:Ln,icon:Mt,switcherIcon:hn,draggable:gr,draggingNodeKey:$,checkable:Qe,checkStrictly:He,disabled:z,keyEntities:te,dropLevelOffset:Ie,dropContainerKey:Ce,dropTargetKey:ke,dropPosition:Le,dragOverNodeKey:mt,indent:je,direction:Un,dropIndicatorRender:Wn,loadData:me,filterTreeNode:Be,titleRender:_n,onNodeClick:this.onNodeClick,onNodeDoubleClick:this.onNodeDoubleClick,onNodeExpand:this.onNodeExpand,onNodeSelect:this.onNodeSelect,onNodeCheck:this.onNodeCheck,onNodeLoad:this.onNodeLoad,onNodeMouseEnter:this.onNodeMouseEnter,onNodeMouseLeave:this.onNodeMouseLeave,onNodeContextMenu:this.onNodeContextMenu,onNodeDragStart:this.onNodeDragStart,onNodeDragEnter:this.onNodeDragEnter,onNodeDragOver:this.onNodeDragOver,onNodeDragLeave:this.onNodeDragLeave,onNodeDragEnd:this.onNodeDragEnd,onNodeDrop:this.onNodeDrop};return F.createElement(R.k.Provider,{value:sn},F.createElement("div",{className:h()(ut,Nt,ar,(0,E.Z)((0,E.Z)((0,E.Z)({},"".concat(ut,"-show-line"),bt),"".concat(ut,"-focused"),J),"".concat(ut,"-active-focused"),ue!==null)),style:mr},F.createElement(Se,(0,P.Z)({ref:this.listRef,prefixCls:ut,style:It,data:ve,disabled:z,selectable:gn,checkable:!!Qe,motion:le,dragging:$!==null,height:be,itemHeight:Tt,virtual:an,focusable:on,focused:J,tabIndex:Ct,activeItem:this.getActiveItem(),onFocus:this.onFocus,onBlur:this.onBlur,onKeyDown:this.onKeyDown,onActiveChange:this.onActiveChange,onListChangeStart:this.onListChangeStart,onListChangeEnd:this.onListChangeEnd,onContextMenu:zn,onScroll:On,scrollWidth:Wt},this.getTreeNodeRequiredProps(),tr))))}}],[{key:"getDerivedStateFromProps",value:function(T,J){var ve=J.prevProps,te={prevProps:T};function $(Ct){return!ve&&T.hasOwnProperty(Ct)||ve&&ve[Ct]!==T[Ct]}var ue,Ie=J.fieldNames;if($("fieldNames")&&(Ie=(0,pe.w$)(T.fieldNames),te.fieldNames=Ie),$("treeData")?ue=T.treeData:$("children")&&((0,C.ZP)(!1,"`children` of Tree is deprecated. Please use `treeData` instead."),ue=(0,pe.zn)(T.children)),ue){te.treeData=ue;var Ce=(0,pe.I8)(ue,{fieldNames:Ie});te.keyEntities=(0,ge.Z)((0,E.Z)({},Q,Ue),Ce.keyEntities)}var ke=te.keyEntities||J.keyEntities;if($("expandedKeys")||ve&&$("autoExpandParent"))te.expandedKeys=T.autoExpandParent||!ve&&T.defaultExpandParent?(0,Gt.r7)(T.expandedKeys,ke):T.expandedKeys;else if(!ve&&T.defaultExpandAll){var Le=(0,ge.Z)({},ke);delete Le[Q];var mt=[];Object.keys(Le).forEach(function(Ct){var gn=Le[Ct];gn.children&&gn.children.length&&mt.push(gn.key)}),te.expandedKeys=mt}else!ve&&T.defaultExpandedKeys&&(te.expandedKeys=T.autoExpandParent||T.defaultExpandParent?(0,Gt.r7)(T.defaultExpandedKeys,ke):T.defaultExpandedKeys);if(te.expandedKeys||delete te.expandedKeys,ue||te.expandedKeys){var je=(0,pe.oH)(ue||J.treeData,te.expandedKeys||J.expandedKeys,Ie);te.flattenNodes=je}if(T.selectable&&($("selectedKeys")?te.selectedKeys=(0,Gt.BT)(T.selectedKeys,T):!ve&&T.defaultSelectedKeys&&(te.selectedKeys=(0,Gt.BT)(T.defaultSelectedKeys,T))),T.checkable){var qe;if($("checkedKeys")?qe=(0,Gt.E6)(T.checkedKeys)||{}:!ve&&T.defaultCheckedKeys?qe=(0,Gt.E6)(T.defaultCheckedKeys)||{}:ue&&(qe=(0,Gt.E6)(T.checkedKeys)||{checkedKeys:J.checkedKeys,halfCheckedKeys:J.halfCheckedKeys}),qe){var ut=qe,Nt=ut.checkedKeys,It=Nt===void 0?[]:Nt,bt=ut.halfCheckedKeys,on=bt===void 0?[]:bt;if(!T.checkStrictly){var rn=(0,ht.S)(It,!0,ke);It=rn.checkedKeys,on=rn.halfCheckedKeys}te.checkedKeys=It,te.halfCheckedKeys=on}}return $("loadedKeys")&&(te.loadedKeys=T.loadedKeys),te}}]),De}(F.Component);(0,E.Z)(Je,"defaultProps",{prefixCls:"rc-tree",showLine:!1,showIcon:!0,selectable:!0,multiple:!1,checkable:!1,disabled:!1,checkStrictly:!1,draggable:!1,defaultExpandParent:!0,autoExpandParent:!1,defaultExpandAll:!1,defaultExpandedKeys:[],defaultCheckedKeys:[],defaultSelectedKeys:[],dropIndicatorRender:B,allowDrop:function(){return!0},expandAction:!1}),(0,E.Z)(Je,"TreeNode",Y.Z);var xe=Je,_e=xe},82661:function(Cn,tt,b){"use strict";b.d(tt,{BT:function(){return F},E6:function(){return B},L0:function(){return E},OM:function(){return C},_5:function(){return A},r7:function(){return D},wA:function(){return h},yx:function(){return x}});var P=b(15142),re=b(26420),ge=b(48736),se=b(59301),U=b(639),f=b(65065),fe=b(34061),ee=null;function A(I,S){if(!I)return[];var q=I.slice(),ae=q.indexOf(S);return ae>=0&&q.splice(ae,1),q}function E(I,S){var q=(I||[]).slice();return q.indexOf(S)===-1&&q.push(S),q}function x(I){return I.split("-")}function h(I,S){var q=[],ae=(0,f.Z)(S,I);function j(){var Y=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[];Y.forEach(function(ie){var de=ie.key,pe=ie.children;q.push(de),j(pe)})}return j(ae.children),q}function p(I){if(I.parent){var S=x(I.pos);return Number(S[S.length-1])===I.parent.children.length-1}return!1}function _(I){var S=x(I.pos);return Number(S[S.length-1])===0}function C(I,S,q,ae,j,Y,ie,de,pe,W){var M,X=I.clientX,G=I.clientY,ne=I.target.getBoundingClientRect(),Z=ne.top,m=ne.height,v=(W==="rtl"?-1:1)*(((j==null?void 0:j.x)||0)-X),Q=(v-12)/ae,he=pe.filter(function(_e){var N;return(N=de[_e])===null||N===void 0||(N=N.children)===null||N===void 0?void 0:N.length}),Ue=(0,f.Z)(de,q.eventKey);if(G<Z+m/2){var Oe=ie.findIndex(function(_e){return _e.key===Ue.key}),ft=Oe<=0?0:Oe-1,Et=ie[ft].key;Ue=(0,f.Z)(de,Et)}var Ft=Ue.key,Ut=Ue,Se=Ue.key,Gt=0,ht=0;if(!he.includes(Ft))for(var tn=0;tn<Q&&p(Ue);tn+=1)Ue=Ue.parent,ht+=1;var dt=S.data,Je=Ue.node,xe=!0;return _(Ue)&&Ue.level===0&&G<Z+m/2&&Y({dragNode:dt,dropNode:Je,dropPosition:-1})&&Ue.key===q.eventKey?Gt=-1:(Ut.children||[]).length&&he.includes(Se)?Y({dragNode:dt,dropNode:Je,dropPosition:0})?Gt=0:xe=!1:ht===0?Q>-1.5?Y({dragNode:dt,dropNode:Je,dropPosition:1})?Gt=1:xe=!1:Y({dragNode:dt,dropNode:Je,dropPosition:0})?Gt=0:Y({dragNode:dt,dropNode:Je,dropPosition:1})?Gt=1:xe=!1:Y({dragNode:dt,dropNode:Je,dropPosition:1})?Gt=1:xe=!1,{dropPosition:Gt,dropLevelOffset:ht,dropTargetKey:Ue.key,dropTargetPos:Ue.pos,dragOverNodeKey:Se,dropContainerKey:Gt===0?null:((M=Ue.parent)===null||M===void 0?void 0:M.key)||null,dropAllowed:xe}}function F(I,S){if(I){var q=S.multiple;return q?I.slice():I.length?[I[0]]:I}}var R=function(S){return S};function K(I,S){if(!I)return[];var q=S||{},ae=q.processProps,j=ae===void 0?R:ae,Y=Array.isArray(I)?I:[I];return Y.map(function(ie){var de=ie.children,pe=_objectWithoutProperties(ie,ee),W=K(de,S);return React.createElement(TreeNode,_extends({key:pe.key},j(pe)),W)})}function B(I){if(!I)return null;var S;if(Array.isArray(I))S={checkedKeys:I,halfCheckedKeys:void 0};else if((0,re.Z)(I)==="object")S={checkedKeys:I.checked||void 0,halfCheckedKeys:I.halfChecked||void 0};else return(0,ge.ZP)(!1,"`checkedKeys` is not an array or an object"),null;return S}function D(I,S){var q=new Set;function ae(j){if(!q.has(j)){var Y=(0,f.Z)(S,j);if(Y){q.add(j);var ie=Y.parent,de=Y.node;de.disabled||ie&&ae(ie.key)}}}return(I||[]).forEach(function(j){ae(j)}),(0,P.Z)(q)}},34643:function(Cn,tt,b){"use strict";b.d(tt,{S:function(){return fe}});var P=b(48736),re=b(65065);function ge(ee,A){var E=new Set;return ee.forEach(function(x){A.has(x)||E.add(x)}),E}function se(ee){var A=ee||{},E=A.disabled,x=A.disableCheckbox,h=A.checkable;return!!(E||x)||h===!1}function U(ee,A,E,x){for(var h=new Set(ee),p=new Set,_=0;_<=E;_+=1){var C=A.get(_)||new Set;C.forEach(function(B){var D=B.key,I=B.node,S=B.children,q=S===void 0?[]:S;h.has(D)&&!x(I)&&q.filter(function(ae){return!x(ae.node)}).forEach(function(ae){h.add(ae.key)})})}for(var F=new Set,R=E;R>=0;R-=1){var K=A.get(R)||new Set;K.forEach(function(B){var D=B.parent,I=B.node;if(!(x(I)||!B.parent||F.has(B.parent.key))){if(x(B.parent.node)){F.add(D.key);return}var S=!0,q=!1;(D.children||[]).filter(function(ae){return!x(ae.node)}).forEach(function(ae){var j=ae.key,Y=h.has(j);S&&!Y&&(S=!1),!q&&(Y||p.has(j))&&(q=!0)}),S&&h.add(D.key),q&&p.add(D.key),F.add(D.key)}})}return{checkedKeys:Array.from(h),halfCheckedKeys:Array.from(ge(p,h))}}function f(ee,A,E,x,h){for(var p=new Set(ee),_=new Set(A),C=0;C<=x;C+=1){var F=E.get(C)||new Set;F.forEach(function(D){var I=D.key,S=D.node,q=D.children,ae=q===void 0?[]:q;!p.has(I)&&!_.has(I)&&!h(S)&&ae.filter(function(j){return!h(j.node)}).forEach(function(j){p.delete(j.key)})})}_=new Set;for(var R=new Set,K=x;K>=0;K-=1){var B=E.get(K)||new Set;B.forEach(function(D){var I=D.parent,S=D.node;if(!(h(S)||!D.parent||R.has(D.parent.key))){if(h(D.parent.node)){R.add(I.key);return}var q=!0,ae=!1;(I.children||[]).filter(function(j){return!h(j.node)}).forEach(function(j){var Y=j.key,ie=p.has(Y);q&&!ie&&(q=!1),!ae&&(ie||_.has(Y))&&(ae=!0)}),q||p.delete(I.key),ae&&_.add(I.key),R.add(I.key)}})}return{checkedKeys:Array.from(p),halfCheckedKeys:Array.from(ge(_,p))}}function fe(ee,A,E,x){var h=[],p;x?p=x:p=se;var _=new Set(ee.filter(function(K){var B=!!(0,re.Z)(E,K);return B||h.push(K),B})),C=new Map,F=0;Object.keys(E).forEach(function(K){var B=E[K],D=B.level,I=C.get(D);I||(I=new Set,C.set(D,I)),I.add(B),F=Math.max(F,D)}),(0,P.ZP)(!h.length,"Tree missing follow keys: ".concat(h.slice(0,100).map(function(K){return"'".concat(K,"'")}).join(", ")));var R;return A===!0?R=U(_,C,F,p):R=f(_,A.halfCheckedKeys,C,F,p),R}},65065:function(Cn,tt,b){"use strict";b.d(tt,{Z:function(){return P}});function P(re,ge){return re[ge]}},34061:function(Cn,tt,b){"use strict";b.d(tt,{F:function(){return D},H8:function(){return B},I8:function(){return K},km:function(){return h},oH:function(){return F},w$:function(){return p},zn:function(){return C}});var P=b(26420),re=b(15142),ge=b(98506),se=b(33346),U=b(11592),f=b(2738),fe=b(48736),ee=b(65065),A=["children"];function E(I,S){return"".concat(I,"-").concat(S)}function x(I){return I&&I.type&&I.type.isTreeNode}function h(I,S){return I!=null?I:S}function p(I){var S=I||{},q=S.title,ae=S._title,j=S.key,Y=S.children,ie=q||"title";return{title:ie,_title:ae||[ie],key:j||"key",children:Y||"children"}}function _(I,S){var q=new Map;function ae(j){var Y=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"";(j||[]).forEach(function(ie){var de=ie[S.key],pe=ie[S.children];warning(de!=null,"Tree node must have a certain key: [".concat(Y).concat(de,"]"));var W=String(de);warning(!q.has(W)||de===null||de===void 0,"Same 'key' exist in the Tree: ".concat(W)),q.set(W,!0),ae(pe,"".concat(Y).concat(W," > "))})}ae(I)}function C(I){function S(q){var ae=(0,U.Z)(q);return ae.map(function(j){if(!x(j))return(0,fe.ZP)(!j,"Tree/TreeNode can only accept TreeNode as children."),null;var Y=j.key,ie=j.props,de=ie.children,pe=(0,se.Z)(ie,A),W=(0,ge.Z)({key:Y},pe),M=S(de);return M.length&&(W.children=M),W}).filter(function(j){return j})}return S(I)}function F(I,S,q){var ae=p(q),j=ae._title,Y=ae.key,ie=ae.children,de=new Set(S===!0?[]:S),pe=[];function W(M){var X=arguments.length>1&&arguments[1]!==void 0?arguments[1]:null;return M.map(function(G,ne){for(var Z=E(X?X.pos:"0",ne),m=h(G[Y],Z),v,Q=0;Q<j.length;Q+=1){var he=j[Q];if(G[he]!==void 0){v=G[he];break}}var Ue=Object.assign((0,f.Z)(G,[].concat((0,re.Z)(j),[Y,ie])),{title:v,key:m,parent:X,pos:Z,children:null,data:G,isStart:[].concat((0,re.Z)(X?X.isStart:[]),[ne===0]),isEnd:[].concat((0,re.Z)(X?X.isEnd:[]),[ne===M.length-1])});return pe.push(Ue),S===!0||de.has(m)?Ue.children=W(G[ie]||[],Ue):Ue.children=[],Ue})}return W(I),pe}function R(I,S,q){var ae={};(0,P.Z)(q)==="object"?ae=q:ae={externalGetKey:q},ae=ae||{};var j=ae,Y=j.childrenPropName,ie=j.externalGetKey,de=j.fieldNames,pe=p(de),W=pe.key,M=pe.children,X=Y||M,G;ie?typeof ie=="string"?G=function(m){return m[ie]}:typeof ie=="function"&&(G=function(m){return ie(m)}):G=function(m,v){return h(m[W],v)};function ne(Z,m,v,Q){var he=Z?Z[X]:I,Ue=Z?E(v.pos,m):"0",Oe=Z?[].concat((0,re.Z)(Q),[Z]):[];if(Z){var ft=G(Z,Ue),Et={node:Z,index:m,pos:Ue,key:ft,parentPos:v.node?v.pos:null,level:v.level+1,nodes:Oe};S(Et)}he&&he.forEach(function(Ft,Ut){ne(Ft,Ut,{node:Z,pos:Ue,level:v?v.level+1:-1},Oe)})}ne(null)}function K(I){var S=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},q=S.initWrapper,ae=S.processEntity,j=S.onProcessFinished,Y=S.externalGetKey,ie=S.childrenPropName,de=S.fieldNames,pe=arguments.length>2?arguments[2]:void 0,W=Y||pe,M={},X={},G={posEntities:M,keyEntities:X};return q&&(G=q(G)||G),R(I,function(ne){var Z=ne.node,m=ne.index,v=ne.pos,Q=ne.key,he=ne.parentPos,Ue=ne.level,Oe=ne.nodes,ft={node:Z,nodes:Oe,index:m,key:Q,pos:v,level:Ue},Et=h(Q,v);M[v]=ft,X[Et]=ft,ft.parent=M[he],ft.parent&&(ft.parent.children=ft.parent.children||[],ft.parent.children.push(ft)),ae&&ae(ft,G)},{externalGetKey:W,childrenPropName:ie,fieldNames:de}),j&&j(G),G}function B(I,S){var q=S.expandedKeys,ae=S.selectedKeys,j=S.loadedKeys,Y=S.loadingKeys,ie=S.checkedKeys,de=S.halfCheckedKeys,pe=S.dragOverNodeKey,W=S.dropPosition,M=S.keyEntities,X=(0,ee.Z)(M,I),G={eventKey:I,expanded:q.indexOf(I)!==-1,selected:ae.indexOf(I)!==-1,loaded:j.indexOf(I)!==-1,loading:Y.indexOf(I)!==-1,checked:ie.indexOf(I)!==-1,halfChecked:de.indexOf(I)!==-1,pos:String(X?X.pos:""),dragOver:pe===I&&W===0,dragOverGapTop:pe===I&&W===-1,dragOverGapBottom:pe===I&&W===1};return G}function D(I){var S=I.data,q=I.expanded,ae=I.selected,j=I.checked,Y=I.loaded,ie=I.loading,de=I.halfChecked,pe=I.dragOver,W=I.dragOverGapTop,M=I.dragOverGapBottom,X=I.pos,G=I.active,ne=I.eventKey,Z=(0,ge.Z)((0,ge.Z)({},S),{},{expanded:q,selected:ae,checked:j,loaded:Y,loading:ie,halfChecked:de,dragOver:pe,dragOverGapTop:W,dragOverGapBottom:M,pos:X,active:G,key:ne});return"props"in Z||Object.defineProperty(Z,"props",{get:function(){return(0,fe.ZP)(!1,"Second param return from event is node data instead of TreeNode instance. Please read value directly instead of reading from `props`."),I}}),Z}},8224:function(Cn,tt,b){"use strict";b.d(tt,{Z:function(){return re}});var P=b(4676);function re(ge,se,U,f){var fe=P.unstable_batchedUpdates?function(A){P.unstable_batchedUpdates(U,A)}:U;return ge!=null&&ge.addEventListener&&ge.addEventListener(se,fe,f),{remove:function(){ge!=null&&ge.removeEventListener&&ge.removeEventListener(se,fe,f)}}}},24514:function(Cn,tt,b){"use strict";b.d(tt,{G:function(){return se}});var P=b(47273),re=function(f){if((0,P.Z)()&&window.document.documentElement){var fe=Array.isArray(f)?f:[f],ee=window.document.documentElement;return fe.some(function(A){return A in ee.style})}return!1},ge=function(f,fe){if(!re(f))return!1;var ee=document.createElement("div"),A=ee.style[f];return ee.style[f]=fe,ee.style[f]!==A};function se(U,f){return!Array.isArray(U)&&f!==void 0?ge(U,f):re(U)}},49658:function(Cn,tt){"use strict";tt.Z=function(){if(typeof navigator=="undefined"||typeof window=="undefined")return!1;var b=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(b)||/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(b==null?void 0:b.substr(0,4))}},6790:function(Cn,tt,b){"use strict";b.d(tt,{Z:function(){return dt}});var P=b(67711),re=b(26420),ge=b(98506),se=b(52873),U=b(16886),f=b(33346),fe=b(92310),ee=b.n(fe),A=b(29301),E=b(70425),x=b(34280),h=b(59301),p=b(4676),_=h.forwardRef(function(Je,xe){var _e=Je.height,N=Je.offsetY,Fe=Je.offsetX,De=Je.children,V=Je.prefixCls,T=Je.onInnerResize,J=Je.innerProps,ve=Je.rtl,te=Je.extra,$={},ue={display:"flex",flexDirection:"column"};return N!==void 0&&($={height:_e,position:"relative",overflow:"hidden"},ue=(0,ge.Z)((0,ge.Z)({},ue),{},(0,se.Z)((0,se.Z)((0,se.Z)((0,se.Z)((0,se.Z)({transform:"translateY(".concat(N,"px)")},ve?"marginRight":"marginLeft",-Fe),"position","absolute"),"left",0),"right",0),"top",0))),h.createElement("div",{style:$},h.createElement(A.Z,{onResize:function(Ce){var ke=Ce.offsetHeight;ke&&T&&T()}},h.createElement("div",(0,P.Z)({style:ue,className:ee()((0,se.Z)({},"".concat(V,"-holder-inner"),V)),ref:xe},J),De,te)))});_.displayName="Filler";var C=_;function F(Je){var xe=Je.children,_e=Je.setRef,N=h.useCallback(function(Fe){_e(Fe)},[]);return h.cloneElement(xe,{ref:N})}function R(Je,xe,_e,N,Fe,De,V,T){var J=T.getKey;return Je.slice(xe,_e+1).map(function(ve,te){var $=xe+te,ue=V(ve,$,{style:{width:N},offsetX:Fe}),Ie=J(ve);return h.createElement(F,{key:Ie,setRef:function(ke){return De(ve,ke)}},ue)})}function K(Je,xe,_e,N){var Fe=_e-Je,De=xe-_e,V=Math.min(Fe,De)*2;if(N<=V){var T=Math.floor(N/2);return N%2?_e+T+1:_e-T}return Fe>De?_e-(N-De):_e+(N-Fe)}function B(Je,xe,_e){var N=Je.length,Fe=xe.length,De,V;if(N===0&&Fe===0)return null;N<Fe?(De=Je,V=xe):(De=xe,V=Je);var T={__EMPTY_ITEM__:!0};function J(Ce){return Ce!==void 0?_e(Ce):T}for(var ve=null,te=Math.abs(N-Fe)!==1,$=0;$<V.length;$+=1){var ue=J(De[$]),Ie=J(V[$]);if(ue!==Ie){ve=$,te=te||ue!==J(V[$+1]);break}}return ve===null?null:{index:ve,multiple:te}}function D(Je,xe,_e){var N=h.useState(Je),Fe=(0,U.Z)(N,2),De=Fe[0],V=Fe[1],T=h.useState(null),J=(0,U.Z)(T,2),ve=J[0],te=J[1];return h.useEffect(function(){var $=B(De||[],Je||[],xe);($==null?void 0:$.index)!==void 0&&(_e==null||_e($.index),te(Je[$.index])),V(Je)},[Je]),[ve]}var I=b(16089),S=(typeof navigator=="undefined"?"undefined":(0,re.Z)(navigator))==="object"&&/Firefox/i.test(navigator.userAgent),q=S,ae=function(Je,xe,_e,N){var Fe=(0,h.useRef)(!1),De=(0,h.useRef)(null);function V(){clearTimeout(De.current),Fe.current=!0,De.current=setTimeout(function(){Fe.current=!1},50)}var T=(0,h.useRef)({top:Je,bottom:xe,left:_e,right:N});return T.current.top=Je,T.current.bottom=xe,T.current.left=_e,T.current.right=N,function(J,ve){var te=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1,$=J?ve<0&&T.current.left||ve>0&&T.current.right:ve<0&&T.current.top||ve>0&&T.current.bottom;return te&&$?(clearTimeout(De.current),Fe.current=!1):(!$||Fe.current)&&V(),!Fe.current&&$}};function j(Je,xe,_e,N,Fe,De,V){var T=(0,h.useRef)(0),J=(0,h.useRef)(null),ve=(0,h.useRef)(null),te=(0,h.useRef)(!1),$=ae(xe,_e,N,Fe);function ue(je,qe){if(I.Z.cancel(J.current),!$(!1,qe)){var ut=je;if(!ut._virtualHandled)ut._virtualHandled=!0;else return;T.current+=qe,ve.current=qe,q||ut.preventDefault(),J.current=(0,I.Z)(function(){var Nt=te.current?10:1;V(T.current*Nt,!1),T.current=0})}}function Ie(je,qe){V(qe,!0),q||je.preventDefault()}var Ce=(0,h.useRef)(null),ke=(0,h.useRef)(null);function Le(je){if(Je){I.Z.cancel(ke.current),ke.current=(0,I.Z)(function(){Ce.current=null},2);var qe=je.deltaX,ut=je.deltaY,Nt=je.shiftKey,It=qe,bt=ut;(Ce.current==="sx"||!Ce.current&&Nt&&ut&&!qe)&&(It=ut,bt=0,Ce.current="sx");var on=Math.abs(It),rn=Math.abs(bt);Ce.current===null&&(Ce.current=De&&on>rn?"x":"y"),Ce.current==="y"?ue(je,bt):Ie(je,It)}}function mt(je){Je&&(te.current=je.detail===ve.current)}return[Le,mt]}function Y(Je,xe,_e,N){var Fe=h.useMemo(function(){return[new Map,[]]},[Je,_e.id,N]),De=(0,U.Z)(Fe,2),V=De[0],T=De[1],J=function(te){var $=arguments.length>1&&arguments[1]!==void 0?arguments[1]:te,ue=V.get(te),Ie=V.get($);if(ue===void 0||Ie===void 0)for(var Ce=Je.length,ke=T.length;ke<Ce;ke+=1){var Le,mt=Je[ke],je=xe(mt);V.set(je,ke);var qe=(Le=_e.get(je))!==null&&Le!==void 0?Le:N;if(T[ke]=(T[ke-1]||0)+qe,je===te&&(ue=ke),je===$&&(Ie=ke),ue!==void 0&&Ie!==void 0)break}return{top:T[ue-1]||0,bottom:T[Ie]}};return J}var ie=b(42573),de=b(58698),pe=function(){function Je(){(0,ie.Z)(this,Je),(0,se.Z)(this,"maps",void 0),(0,se.Z)(this,"id",0),(0,se.Z)(this,"diffRecords",new Map),this.maps=Object.create(null)}return(0,de.Z)(Je,[{key:"set",value:function(_e,N){this.diffRecords.set(_e,this.maps[_e]),this.maps[_e]=N,this.id+=1}},{key:"get",value:function(_e){return this.maps[_e]}},{key:"resetRecord",value:function(){this.diffRecords.clear()}},{key:"getRecord",value:function(){return this.diffRecords}}]),Je}(),W=pe;function M(Je){var xe=parseFloat(Je);return isNaN(xe)?0:xe}function X(Je,xe,_e){var N=h.useState(0),Fe=(0,U.Z)(N,2),De=Fe[0],V=Fe[1],T=(0,h.useRef)(new Map),J=(0,h.useRef)(new W),ve=(0,h.useRef)(0);function te(){ve.current+=1}function $(){var Ie=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!1;te();var Ce=function(){var mt=!1;T.current.forEach(function(je,qe){if(je&&je.offsetParent){var ut=je.offsetHeight,Nt=getComputedStyle(je),It=Nt.marginTop,bt=Nt.marginBottom,on=M(It),rn=M(bt),Ct=ut+on+rn;J.current.get(qe)!==Ct&&(J.current.set(qe,Ct),mt=!0)}}),mt&&V(function(je){return je+1})};if(Ie)Ce();else{ve.current+=1;var ke=ve.current;Promise.resolve().then(function(){ke===ve.current&&Ce()})}}function ue(Ie,Ce){var ke=Je(Ie),Le=T.current.get(ke);Ce?(T.current.set(ke,Ce),$()):T.current.delete(ke),!Le!=!Ce&&(Ce?xe==null||xe(Ie):_e==null||_e(Ie))}return(0,h.useEffect)(function(){return te},[]),[ue,$,J.current,De]}var G=14/15;function ne(Je,xe,_e){var N=(0,h.useRef)(!1),Fe=(0,h.useRef)(0),De=(0,h.useRef)(0),V=(0,h.useRef)(null),T=(0,h.useRef)(null),J,ve=function(Ie){if(N.current){var Ce=Math.ceil(Ie.touches[0].pageX),ke=Math.ceil(Ie.touches[0].pageY),Le=Fe.current-Ce,mt=De.current-ke,je=Math.abs(Le)>Math.abs(mt);je?Fe.current=Ce:De.current=ke;var qe=_e(je,je?Le:mt,!1,Ie);qe&&Ie.preventDefault(),clearInterval(T.current),qe&&(T.current=setInterval(function(){je?Le*=G:mt*=G;var ut=Math.floor(je?Le:mt);(!_e(je,ut,!0)||Math.abs(ut)<=.1)&&clearInterval(T.current)},16))}},te=function(){N.current=!1,J()},$=function(Ie){J(),Ie.touches.length===1&&!N.current&&(N.current=!0,Fe.current=Math.ceil(Ie.touches[0].pageX),De.current=Math.ceil(Ie.touches[0].pageY),V.current=Ie.target,V.current.addEventListener("touchmove",ve,{passive:!1}),V.current.addEventListener("touchend",te,{passive:!0}))};J=function(){V.current&&(V.current.removeEventListener("touchmove",ve),V.current.removeEventListener("touchend",te))},(0,x.Z)(function(){return Je&&xe.current.addEventListener("touchstart",$,{passive:!0}),function(){var ue;(ue=xe.current)===null||ue===void 0||ue.removeEventListener("touchstart",$),J(),clearInterval(T.current)}},[Je])}function Z(Je){return Math.floor(Math.pow(Je,.5))}function m(Je,xe){var _e="touches"in Je?Je.touches[0]:Je;return _e[xe?"pageX":"pageY"]-window[xe?"scrollX":"scrollY"]}function v(Je,xe,_e){h.useEffect(function(){var N=xe.current;if(Je&&N){var Fe=!1,De,V,T=function(){I.Z.cancel(De)},J=function ue(){T(),De=(0,I.Z)(function(){_e(V),ue()})},ve=function(Ie){if(!(Ie.target.draggable||Ie.button!==0)){var Ce=Ie;Ce._virtualHandled||(Ce._virtualHandled=!0,Fe=!0)}},te=function(){Fe=!1,T()},$=function(Ie){if(Fe){var Ce=m(Ie,!1),ke=N.getBoundingClientRect(),Le=ke.top,mt=ke.bottom;if(Ce<=Le){var je=Le-Ce;V=-Z(je),J()}else if(Ce>=mt){var qe=Ce-mt;V=Z(qe),J()}else T()}};return N.addEventListener("mousedown",ve),N.ownerDocument.addEventListener("mouseup",te),N.ownerDocument.addEventListener("mousemove",$),function(){N.removeEventListener("mousedown",ve),N.ownerDocument.removeEventListener("mouseup",te),N.ownerDocument.removeEventListener("mousemove",$),T()}}},[Je])}var Q=10;function he(Je,xe,_e,N,Fe,De,V,T){var J=h.useRef(),ve=h.useState(null),te=(0,U.Z)(ve,2),$=te[0],ue=te[1];return(0,x.Z)(function(){if($&&$.times<Q){if(!Je.current){ue(function(le){return(0,ge.Z)({},le)});return}De();var Ie=$.targetAlign,Ce=$.originAlign,ke=$.index,Le=$.offset,mt=Je.current.clientHeight,je=!1,qe=Ie,ut=null;if(mt){for(var Nt=Ie||Ce,It=0,bt=0,on=0,rn=Math.min(xe.length-1,ke),Ct=0;Ct<=rn;Ct+=1){var gn=Fe(xe[Ct]);bt=It;var Ln=_e.get(gn);on=bt+(Ln===void 0?N:Ln),It=on}for(var Mt=Nt==="top"?Le:mt-Le,hn=rn;hn>=0;hn-=1){var We=Fe(xe[hn]),Qe=_e.get(We);if(Qe===void 0){je=!0;break}if(Mt-=Qe,Mt<=0)break}switch(Nt){case"top":ut=bt-Le;break;case"bottom":ut=on-mt+Le;break;default:{var He=Je.current.scrollTop,z=He+mt;bt<He?qe="top":on>z&&(qe="bottom")}}ut!==null&&V(ut),ut!==$.lastTop&&(je=!0)}je&&ue((0,ge.Z)((0,ge.Z)({},$),{},{times:$.times+1,targetAlign:qe,lastTop:ut}))}},[$,Je.current]),function(Ie){if(Ie==null){T();return}if(I.Z.cancel(J.current),typeof Ie=="number")V(Ie);else if(Ie&&(0,re.Z)(Ie)==="object"){var Ce,ke=Ie.align;"index"in Ie?Ce=Ie.index:Ce=xe.findIndex(function(je){return Fe(je)===Ie.key});var Le=Ie.offset,mt=Le===void 0?0:Le;ue({times:0,index:Ce,offset:mt,originAlign:ke})}}}var Ue=h.forwardRef(function(Je,xe){var _e=Je.prefixCls,N=Je.rtl,Fe=Je.scrollOffset,De=Je.scrollRange,V=Je.onStartMove,T=Je.onStopMove,J=Je.onScroll,ve=Je.horizontal,te=Je.spinSize,$=Je.containerSize,ue=Je.style,Ie=Je.thumbStyle,Ce=Je.showScrollBar,ke=h.useState(!1),Le=(0,U.Z)(ke,2),mt=Le[0],je=Le[1],qe=h.useState(null),ut=(0,U.Z)(qe,2),Nt=ut[0],It=ut[1],bt=h.useState(null),on=(0,U.Z)(bt,2),rn=on[0],Ct=on[1],gn=!N,Ln=h.useRef(),Mt=h.useRef(),hn=h.useState(Ce),We=(0,U.Z)(hn,2),Qe=We[0],He=We[1],z=h.useRef(),le=function(){Ce===!0||Ce===!1||(clearTimeout(z.current),He(!0),z.current=setTimeout(function(){He(!1)},3e3))},me=De-$||0,Be=$-te||0,be=h.useMemo(function(){if(Fe===0||me===0)return 0;var ar=Fe/me;return ar*Be},[Fe,me,Be]),Tt=function(mr){mr.stopPropagation(),mr.preventDefault()},Wt=h.useRef({top:be,dragging:mt,pageY:Nt,startTop:rn});Wt.current={top:be,dragging:mt,pageY:Nt,startTop:rn};var an=function(mr){je(!0),It(m(mr,ve)),Ct(Wt.current.top),V(),mr.stopPropagation(),mr.preventDefault()};h.useEffect(function(){var ar=function(sn){sn.preventDefault()},mr=Ln.current,tr=Mt.current;return mr.addEventListener("touchstart",ar,{passive:!1}),tr.addEventListener("touchstart",an,{passive:!1}),function(){mr.removeEventListener("touchstart",ar),tr.removeEventListener("touchstart",an)}},[]);var _n=h.useRef();_n.current=me;var Wn=h.useRef();Wn.current=Be,h.useEffect(function(){if(mt){var ar,mr=function(sn){var Kt=Wt.current,yn=Kt.dragging,Yn=Kt.pageY,or=Kt.startTop;I.Z.cancel(ar);var Ke=Ln.current.getBoundingClientRect(),Pe=$/(ve?Ke.width:Ke.height);if(yn){var Yt=(m(sn,ve)-Yn)*Pe,Lt=or;!gn&&ve?Lt-=Yt:Lt+=Yt;var qt=_n.current,nn=Wn.current,Xt=nn?Lt/nn:0,zt=Math.ceil(Xt*qt);zt=Math.max(zt,0),zt=Math.min(zt,qt),ar=(0,I.Z)(function(){J(zt,ve)})}},tr=function(){je(!1),T()};return window.addEventListener("mousemove",mr,{passive:!0}),window.addEventListener("touchmove",mr,{passive:!0}),window.addEventListener("mouseup",tr,{passive:!0}),window.addEventListener("touchend",tr,{passive:!0}),function(){window.removeEventListener("mousemove",mr),window.removeEventListener("touchmove",mr),window.removeEventListener("mouseup",tr),window.removeEventListener("touchend",tr),I.Z.cancel(ar)}}},[mt]),h.useEffect(function(){return le(),function(){clearTimeout(z.current)}},[Fe]),h.useImperativeHandle(xe,function(){return{delayHidden:le}});var zn="".concat(_e,"-scrollbar"),On={position:"absolute",visibility:Qe?null:"hidden"},Un={position:"absolute",borderRadius:99,background:"var(--rc-virtual-list-scrollbar-bg, rgba(0, 0, 0, 0.5))",cursor:"pointer",userSelect:"none"};return ve?(Object.assign(On,{height:8,left:0,right:0,bottom:0}),Object.assign(Un,(0,se.Z)({height:"100%",width:te},gn?"left":"right",be))):(Object.assign(On,(0,se.Z)({width:8,top:0,bottom:0},gn?"right":"left",0)),Object.assign(Un,{width:"100%",height:te,top:be})),h.createElement("div",{ref:Ln,className:ee()(zn,(0,se.Z)((0,se.Z)((0,se.Z)({},"".concat(zn,"-horizontal"),ve),"".concat(zn,"-vertical"),!ve),"".concat(zn,"-visible"),Qe)),style:(0,ge.Z)((0,ge.Z)({},On),ue),onMouseDown:Tt,onMouseMove:le},h.createElement("div",{ref:Mt,className:ee()("".concat(zn,"-thumb"),(0,se.Z)({},"".concat(zn,"-thumb-moving"),mt)),style:(0,ge.Z)((0,ge.Z)({},Un),Ie),onMouseDown:an}))}),Oe=Ue,ft=20;function Et(){var Je=arguments.length>0&&arguments[0]!==void 0?arguments[0]:0,xe=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,_e=Je/xe*Je;return isNaN(_e)&&(_e=0),_e=Math.max(_e,ft),Math.floor(_e)}var Ft=["prefixCls","className","height","itemHeight","fullHeight","style","data","children","itemKey","virtual","direction","scrollWidth","component","onScroll","onVirtualScroll","onVisibleChange","innerProps","extraRender","styles","showScrollBar"],Ut=[],Se={overflowY:"auto",overflowAnchor:"none"};function Gt(Je,xe){var _e=Je.prefixCls,N=_e===void 0?"rc-virtual-list":_e,Fe=Je.className,De=Je.height,V=Je.itemHeight,T=Je.fullHeight,J=T===void 0?!0:T,ve=Je.style,te=Je.data,$=Je.children,ue=Je.itemKey,Ie=Je.virtual,Ce=Je.direction,ke=Je.scrollWidth,Le=Je.component,mt=Le===void 0?"div":Le,je=Je.onScroll,qe=Je.onVirtualScroll,ut=Je.onVisibleChange,Nt=Je.innerProps,It=Je.extraRender,bt=Je.styles,on=Je.showScrollBar,rn=on===void 0?"optional":on,Ct=(0,f.Z)(Je,Ft),gn=h.useCallback(function(Ne){return typeof ue=="function"?ue(Ne):Ne==null?void 0:Ne[ue]},[ue]),Ln=X(gn,null,null),Mt=(0,U.Z)(Ln,4),hn=Mt[0],We=Mt[1],Qe=Mt[2],He=Mt[3],z=!!(Ie!==!1&&De&&V),le=h.useMemo(function(){return Object.values(Qe.maps).reduce(function(Ne,Xe){return Ne+Xe},0)},[Qe.id,Qe.maps]),me=z&&te&&(Math.max(V*te.length,le)>De||!!ke),Be=Ce==="rtl",be=ee()(N,(0,se.Z)({},"".concat(N,"-rtl"),Be),Fe),Tt=te||Ut,Wt=(0,h.useRef)(),an=(0,h.useRef)(),_n=(0,h.useRef)(),Wn=(0,h.useState)(0),zn=(0,U.Z)(Wn,2),On=zn[0],Un=zn[1],ar=(0,h.useState)(0),mr=(0,U.Z)(ar,2),tr=mr[0],gr=mr[1],sn=(0,h.useState)(!1),Kt=(0,U.Z)(sn,2),yn=Kt[0],Yn=Kt[1],or=function(){Yn(!0)},Ke=function(){Yn(!1)},Pe={getKey:gn};function Yt(Ne){Un(function(Xe){var nt;typeof Ne=="function"?nt=Ne(Xe):nt=Ne;var et=st(nt);return Wt.current.scrollTop=et,et})}var Lt=(0,h.useRef)({start:0,end:Tt.length}),qt=(0,h.useRef)(),nn=D(Tt,gn),Xt=(0,U.Z)(nn,1),zt=Xt[0];qt.current=zt;var pn=h.useMemo(function(){if(!z)return{scrollHeight:void 0,start:0,end:Tt.length-1,offset:void 0};if(!me){var Ne;return{scrollHeight:((Ne=an.current)===null||Ne===void 0?void 0:Ne.offsetHeight)||0,start:0,end:Tt.length-1,offset:void 0}}for(var Xe=0,nt,et,ot,Qt=Tt.length,en=0;en<Qt;en+=1){var An=Tt[en],bn=gn(An),Fn=Qe.get(bn),wn=Xe+(Fn===void 0?V:Fn);wn>=On&&nt===void 0&&(nt=en,et=Xe),wn>On+De&&ot===void 0&&(ot=en),Xe=wn}return nt===void 0&&(nt=0,et=0,ot=Math.ceil(De/V)),ot===void 0&&(ot=Tt.length-1),ot=Math.min(ot+1,Tt.length-1),{scrollHeight:Xe,start:nt,end:ot,offset:et}},[me,z,On,Tt,He,De]),Ot=pn.scrollHeight,cn=pn.start,un=pn.end,lt=pn.offset;Lt.current.start=cn,Lt.current.end=un,h.useLayoutEffect(function(){var Ne=Qe.getRecord();if(Ne.size===1){var Xe=Array.from(Ne.keys())[0],nt=Ne.get(Xe),et=Tt[cn];if(et&&nt===void 0){var ot=gn(et);if(ot===Xe){var Qt=Qe.get(Xe),en=Qt-V;Yt(function(An){return An+en})}}}Qe.resetRecord()},[Ot]);var Pt=h.useState({width:0,height:De}),Re=(0,U.Z)(Pt,2),Ye=Re[0],vt=Re[1],xt=function(Xe){vt({width:Xe.offsetWidth,height:Xe.offsetHeight})},Vt=(0,h.useRef)(),Jt=(0,h.useRef)(),Zt=h.useMemo(function(){return Et(Ye.width,ke)},[Ye.width,ke]),vn=h.useMemo(function(){return Et(Ye.height,Ot)},[Ye.height,Ot]),Bn=Ot-De,Dn=(0,h.useRef)(Bn);Dn.current=Bn;function st(Ne){var Xe=Ne;return Number.isNaN(Dn.current)||(Xe=Math.min(Xe,Dn.current)),Xe=Math.max(Xe,0),Xe}var En=On<=0,mn=On>=Bn,L=tr<=0,k=tr>=ke,ce=ae(En,mn,L,k),ye=function(){return{x:Be?-tr:tr,y:On}},Ge=(0,h.useRef)(ye()),$e=(0,E.zX)(function(Ne){if(qe){var Xe=(0,ge.Z)((0,ge.Z)({},ye()),Ne);(Ge.current.x!==Xe.x||Ge.current.y!==Xe.y)&&(qe(Xe),Ge.current=Xe)}});function gt(Ne,Xe){var nt=Ne;Xe?((0,p.flushSync)(function(){gr(nt)}),$e()):Yt(nt)}function Bt(Ne){var Xe=Ne.currentTarget.scrollTop;Xe!==On&&Yt(Xe),je==null||je(Ne),$e()}var Ht=function(Xe){var nt=Xe,et=ke?ke-Ye.width:0;return nt=Math.max(nt,0),nt=Math.min(nt,et),nt},kt=(0,E.zX)(function(Ne,Xe){Xe?((0,p.flushSync)(function(){gr(function(nt){var et=nt+(Be?-Ne:Ne);return Ht(et)})}),$e()):Yt(function(nt){var et=nt+Ne;return et})}),St=j(z,En,mn,L,k,!!ke,kt),$t=(0,U.Z)(St,2),oe=$t[0],Ve=$t[1];ne(z,Wt,function(Ne,Xe,nt,et){var ot=et;return ce(Ne,Xe,nt)?!1:!ot||!ot._virtualHandled?(ot&&(ot._virtualHandled=!0),oe({preventDefault:function(){},deltaX:Ne?Xe:0,deltaY:Ne?0:Xe}),!0):!1}),v(me,Wt,function(Ne){Yt(function(Xe){return Xe+Ne})}),(0,x.Z)(function(){function Ne(nt){var et=En&&nt.detail<0,ot=mn&&nt.detail>0;z&&!et&&!ot&&nt.preventDefault()}var Xe=Wt.current;return Xe.addEventListener("wheel",oe,{passive:!1}),Xe.addEventListener("DOMMouseScroll",Ve,{passive:!0}),Xe.addEventListener("MozMousePixelScroll",Ne,{passive:!1}),function(){Xe.removeEventListener("wheel",oe),Xe.removeEventListener("DOMMouseScroll",Ve),Xe.removeEventListener("MozMousePixelScroll",Ne)}},[z,En,mn]),(0,x.Z)(function(){if(ke){var Ne=Ht(tr);gr(Ne),$e({x:Ne})}},[Ye.width,ke]);var Te=function(){var Xe,nt;(Xe=Vt.current)===null||Xe===void 0||Xe.delayHidden(),(nt=Jt.current)===null||nt===void 0||nt.delayHidden()},Me=he(Wt,Tt,Qe,V,gn,function(){return We(!0)},Yt,Te);h.useImperativeHandle(xe,function(){return{nativeElement:_n.current,getScrollInfo:ye,scrollTo:function(Xe){function nt(et){return et&&(0,re.Z)(et)==="object"&&("left"in et||"top"in et)}nt(Xe)?(Xe.left!==void 0&&gr(Ht(Xe.left)),Me(Xe.top)):Me(Xe)}}}),(0,x.Z)(function(){if(ut){var Ne=Tt.slice(cn,un+1);ut(Ne,Tt)}},[cn,un,Tt]);var ze=Y(Tt,gn,Qe,V),at=It==null?void 0:It({start:cn,end:un,virtual:me,offsetX:tr,offsetY:lt,rtl:Be,getSize:ze}),Dt=R(Tt,cn,un,ke,tr,hn,$,Pe),yt=null;De&&(yt=(0,ge.Z)((0,se.Z)({},J?"height":"maxHeight",De),Se),z&&(yt.overflowY="hidden",ke&&(yt.overflowX="hidden"),yn&&(yt.pointerEvents="none")));var it={};return Be&&(it.dir="rtl"),h.createElement("div",(0,P.Z)({ref:_n,style:(0,ge.Z)((0,ge.Z)({},ve),{},{position:"relative"}),className:be},it,Ct),h.createElement(A.Z,{onResize:xt},h.createElement(mt,{className:"".concat(N,"-holder"),style:yt,ref:Wt,onScroll:Bt,onMouseEnter:Te},h.createElement(C,{prefixCls:N,height:Ot,offsetX:tr,offsetY:lt,scrollWidth:ke,onInnerResize:We,ref:an,innerProps:Nt,rtl:Be,extra:at},Dt))),me&&Ot>De&&h.createElement(Oe,{ref:Vt,prefixCls:N,scrollOffset:On,scrollRange:Ot,rtl:Be,onScroll:gt,onStartMove:or,onStopMove:Ke,spinSize:vn,containerSize:Ye.height,style:bt==null?void 0:bt.verticalScrollBar,thumbStyle:bt==null?void 0:bt.verticalScrollBarThumb,showScrollBar:rn}),me&&ke>Ye.width&&h.createElement(Oe,{ref:Jt,prefixCls:N,scrollOffset:tr,scrollRange:ke,rtl:Be,onScroll:gt,onStartMove:or,onStopMove:Ke,spinSize:Zt,containerSize:Ye.width,horizontal:!0,style:bt==null?void 0:bt.horizontalScrollBar,thumbStyle:bt==null?void 0:bt.horizontalScrollBarThumb,showScrollBar:rn}))}var ht=h.forwardRef(Gt);ht.displayName="List";var tn=ht,dt=tn},83145:function(Cn,tt,b){"use strict";Object.defineProperty(tt,"__esModule",{value:!0}),tt.CopyToClipboard=void 0;var P=ge(b(59301)),re=ge(b(25769));function ge(B){return B&&B.__esModule?B:{default:B}}function se(B){return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?se=function(I){return typeof I}:se=function(I){return I&&typeof Symbol=="function"&&I.constructor===Symbol&&I!==Symbol.prototype?"symbol":typeof I},se(B)}function U(B,D){var I=Object.keys(B);if(Object.getOwnPropertySymbols){var S=Object.getOwnPropertySymbols(B);D&&(S=S.filter(function(q){return Object.getOwnPropertyDescriptor(B,q).enumerable})),I.push.apply(I,S)}return I}function f(B){for(var D=1;D<arguments.length;D++){var I=arguments[D]!=null?arguments[D]:{};D%2?U(I,!0).forEach(function(S){R(B,S,I[S])}):Object.getOwnPropertyDescriptors?Object.defineProperties(B,Object.getOwnPropertyDescriptors(I)):U(I).forEach(function(S){Object.defineProperty(B,S,Object.getOwnPropertyDescriptor(I,S))})}return B}function fe(B,D){if(B==null)return{};var I=ee(B,D),S,q;if(Object.getOwnPropertySymbols){var ae=Object.getOwnPropertySymbols(B);for(q=0;q<ae.length;q++)S=ae[q],!(D.indexOf(S)>=0)&&Object.prototype.propertyIsEnumerable.call(B,S)&&(I[S]=B[S])}return I}function ee(B,D){if(B==null)return{};var I={},S=Object.keys(B),q,ae;for(ae=0;ae<S.length;ae++)q=S[ae],!(D.indexOf(q)>=0)&&(I[q]=B[q]);return I}function A(B,D){if(!(B instanceof D))throw new TypeError("Cannot call a class as a function")}function E(B,D){for(var I=0;I<D.length;I++){var S=D[I];S.enumerable=S.enumerable||!1,S.configurable=!0,"value"in S&&(S.writable=!0),Object.defineProperty(B,S.key,S)}}function x(B,D,I){return D&&E(B.prototype,D),I&&E(B,I),B}function h(B,D){return D&&(se(D)==="object"||typeof D=="function")?D:_(B)}function p(B){return p=Object.setPrototypeOf?Object.getPrototypeOf:function(I){return I.__proto__||Object.getPrototypeOf(I)},p(B)}function _(B){if(B===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return B}function C(B,D){if(typeof D!="function"&&D!==null)throw new TypeError("Super expression must either be null or a function");B.prototype=Object.create(D&&D.prototype,{constructor:{value:B,writable:!0,configurable:!0}}),D&&F(B,D)}function F(B,D){return F=Object.setPrototypeOf||function(S,q){return S.__proto__=q,S},F(B,D)}function R(B,D,I){return D in B?Object.defineProperty(B,D,{value:I,enumerable:!0,configurable:!0,writable:!0}):B[D]=I,B}var K=function(B){C(D,B);function D(){var I,S;A(this,D);for(var q=arguments.length,ae=new Array(q),j=0;j<q;j++)ae[j]=arguments[j];return S=h(this,(I=p(D)).call.apply(I,[this].concat(ae))),R(_(S),"onClick",function(Y){var ie=S.props,de=ie.text,pe=ie.onCopy,W=ie.children,M=ie.options,X=P.default.Children.only(W),G=(0,re.default)(de,M);pe&&pe(de,G),X&&X.props&&typeof X.props.onClick=="function"&&X.props.onClick(Y)}),S}return x(D,[{key:"render",value:function(){var S=this.props,q=S.text,ae=S.onCopy,j=S.options,Y=S.children,ie=fe(S,["text","onCopy","options","children"]),de=P.default.Children.only(Y);return P.default.cloneElement(de,f({},ie,{onClick:this.onClick}))}}]),D}(P.default.PureComponent);tt.CopyToClipboard=K,R(K,"defaultProps",{onCopy:void 0,options:void 0})},56102:function(Cn,tt,b){"use strict";var P=b(83145),re=P.CopyToClipboard;re.CopyToClipboard=re,Cn.exports=re},76374:function(Cn,tt,b){"use strict";var P=function(){if(typeof Map!="undefined")return Map;function W(M,X){var G=-1;return M.some(function(ne,Z){return ne[0]===X?(G=Z,!0):!1}),G}return function(){function M(){this.__entries__=[]}return Object.defineProperty(M.prototype,"size",{get:function(){return this.__entries__.length},enumerable:!0,configurable:!0}),M.prototype.get=function(X){var G=W(this.__entries__,X),ne=this.__entries__[G];return ne&&ne[1]},M.prototype.set=function(X,G){var ne=W(this.__entries__,X);~ne?this.__entries__[ne][1]=G:this.__entries__.push([X,G])},M.prototype.delete=function(X){var G=this.__entries__,ne=W(G,X);~ne&&G.splice(ne,1)},M.prototype.has=function(X){return!!~W(this.__entries__,X)},M.prototype.clear=function(){this.__entries__.splice(0)},M.prototype.forEach=function(X,G){G===void 0&&(G=null);for(var ne=0,Z=this.__entries__;ne<Z.length;ne++){var m=Z[ne];X.call(G,m[1],m[0])}},M}()}(),re=typeof window!="undefined"&&typeof document!="undefined"&&window.document===document,ge=function(){return typeof b.g!="undefined"&&b.g.Math===Math?b.g:typeof self!="undefined"&&self.Math===Math?self:typeof window!="undefined"&&window.Math===Math?window:Function("return this")()}(),se=function(){return typeof requestAnimationFrame=="function"?requestAnimationFrame.bind(ge):function(W){return setTimeout(function(){return W(Date.now())},1e3/60)}}(),U=2;function f(W,M){var X=!1,G=!1,ne=0;function Z(){X&&(X=!1,W()),G&&v()}function m(){se(Z)}function v(){var Q=Date.now();if(X){if(Q-ne<U)return;G=!0}else X=!0,G=!1,setTimeout(m,M);ne=Q}return v}var fe=20,ee=["top","right","bottom","left","width","height","size","weight"],A=typeof MutationObserver!="undefined",E=function(){function W(){this.connected_=!1,this.mutationEventsAdded_=!1,this.mutationsObserver_=null,this.observers_=[],this.onTransitionEnd_=this.onTransitionEnd_.bind(this),this.refresh=f(this.refresh.bind(this),fe)}return W.prototype.addObserver=function(M){~this.observers_.indexOf(M)||this.observers_.push(M),this.connected_||this.connect_()},W.prototype.removeObserver=function(M){var X=this.observers_,G=X.indexOf(M);~G&&X.splice(G,1),!X.length&&this.connected_&&this.disconnect_()},W.prototype.refresh=function(){var M=this.updateObservers_();M&&this.refresh()},W.prototype.updateObservers_=function(){var M=this.observers_.filter(function(X){return X.gatherActive(),X.hasActive()});return M.forEach(function(X){return X.broadcastActive()}),M.length>0},W.prototype.connect_=function(){!re||this.connected_||(document.addEventListener("transitionend",this.onTransitionEnd_),window.addEventListener("resize",this.refresh),A?(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)},W.prototype.disconnect_=function(){!re||!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)},W.prototype.onTransitionEnd_=function(M){var X=M.propertyName,G=X===void 0?"":X,ne=ee.some(function(Z){return!!~G.indexOf(Z)});ne&&this.refresh()},W.getInstance=function(){return this.instance_||(this.instance_=new W),this.instance_},W.instance_=null,W}(),x=function(W,M){for(var X=0,G=Object.keys(M);X<G.length;X++){var ne=G[X];Object.defineProperty(W,ne,{value:M[ne],enumerable:!1,writable:!1,configurable:!0})}return W},h=function(W){var M=W&&W.ownerDocument&&W.ownerDocument.defaultView;return M||ge},p=q(0,0,0,0);function _(W){return parseFloat(W)||0}function C(W){for(var M=[],X=1;X<arguments.length;X++)M[X-1]=arguments[X];return M.reduce(function(G,ne){var Z=W["border-"+ne+"-width"];return G+_(Z)},0)}function F(W){for(var M=["top","right","bottom","left"],X={},G=0,ne=M;G<ne.length;G++){var Z=ne[G],m=W["padding-"+Z];X[Z]=_(m)}return X}function R(W){var M=W.getBBox();return q(0,0,M.width,M.height)}function K(W){var M=W.clientWidth,X=W.clientHeight;if(!M&&!X)return p;var G=h(W).getComputedStyle(W),ne=F(G),Z=ne.left+ne.right,m=ne.top+ne.bottom,v=_(G.width),Q=_(G.height);if(G.boxSizing==="border-box"&&(Math.round(v+Z)!==M&&(v-=C(G,"left","right")+Z),Math.round(Q+m)!==X&&(Q-=C(G,"top","bottom")+m)),!D(W)){var he=Math.round(v+Z)-M,Ue=Math.round(Q+m)-X;Math.abs(he)!==1&&(v-=he),Math.abs(Ue)!==1&&(Q-=Ue)}return q(ne.left,ne.top,v,Q)}var B=function(){return typeof SVGGraphicsElement!="undefined"?function(W){return W instanceof h(W).SVGGraphicsElement}:function(W){return W instanceof h(W).SVGElement&&typeof W.getBBox=="function"}}();function D(W){return W===h(W).document.documentElement}function I(W){return re?B(W)?R(W):K(W):p}function S(W){var M=W.x,X=W.y,G=W.width,ne=W.height,Z=typeof DOMRectReadOnly!="undefined"?DOMRectReadOnly:Object,m=Object.create(Z.prototype);return x(m,{x:M,y:X,width:G,height:ne,top:X,right:M+G,bottom:ne+X,left:M}),m}function q(W,M,X,G){return{x:W,y:M,width:X,height:G}}var ae=function(){function W(M){this.broadcastWidth=0,this.broadcastHeight=0,this.contentRect_=q(0,0,0,0),this.target=M}return W.prototype.isActive=function(){var M=I(this.target);return this.contentRect_=M,M.width!==this.broadcastWidth||M.height!==this.broadcastHeight},W.prototype.broadcastRect=function(){var M=this.contentRect_;return this.broadcastWidth=M.width,this.broadcastHeight=M.height,M},W}(),j=function(){function W(M,X){var G=S(X);x(this,{target:M,contentRect:G})}return W}(),Y=function(){function W(M,X,G){if(this.activeObservations_=[],this.observations_=new P,typeof M!="function")throw new TypeError("The callback provided as parameter 1 is not a function.");this.callback_=M,this.controller_=X,this.callbackCtx_=G}return W.prototype.observe=function(M){if(!arguments.length)throw new TypeError("1 argument required, but only 0 present.");if(!(typeof Element=="undefined"||!(Element instanceof Object))){if(!(M instanceof h(M).Element))throw new TypeError('parameter 1 is not of type "Element".');var X=this.observations_;X.has(M)||(X.set(M,new ae(M)),this.controller_.addObserver(this),this.controller_.refresh())}},W.prototype.unobserve=function(M){if(!arguments.length)throw new TypeError("1 argument required, but only 0 present.");if(!(typeof Element=="undefined"||!(Element instanceof Object))){if(!(M instanceof h(M).Element))throw new TypeError('parameter 1 is not of type "Element".');var X=this.observations_;X.has(M)&&(X.delete(M),X.size||this.controller_.removeObserver(this))}},W.prototype.disconnect=function(){this.clearActive(),this.observations_.clear(),this.controller_.removeObserver(this)},W.prototype.gatherActive=function(){var M=this;this.clearActive(),this.observations_.forEach(function(X){X.isActive()&&M.activeObservations_.push(X)})},W.prototype.broadcastActive=function(){if(this.hasActive()){var M=this.callbackCtx_,X=this.activeObservations_.map(function(G){return new j(G.target,G.broadcastRect())});this.callback_.call(M,X,M),this.clearActive()}},W.prototype.clearActive=function(){this.activeObservations_.splice(0)},W.prototype.hasActive=function(){return this.activeObservations_.length>0},W}(),ie=typeof WeakMap!="undefined"?new WeakMap:new P,de=function(){function W(M){if(!(this instanceof W))throw new TypeError("Cannot call a class as a function.");if(!arguments.length)throw new TypeError("1 argument required, but only 0 present.");var X=E.getInstance(),G=new Y(M,X,this);ie.set(this,G)}return W}();["observe","unobserve","disconnect"].forEach(function(W){de.prototype[W]=function(){var M;return(M=ie.get(this))[W].apply(M,arguments)}});var pe=function(){return typeof ge.ResizeObserver!="undefined"?ge.ResizeObserver:de}();tt.Z=pe},27774:function(Cn,tt){"use strict";Object.defineProperty(tt,"__esModule",{value:!0}),tt.SizeSensorId=tt.SensorTabIndex=tt.SensorClassName=void 0;var b="size-sensor-id";tt.SizeSensorId=b;var P="size-sensor-object";tt.SensorClassName=P;var re="-1";tt.SensorTabIndex=re},79301:function(Cn,tt){"use strict";Object.defineProperty(tt,"__esModule",{value:!0}),tt.default=void 0;var b=function(re){var ge=arguments.length>1&&arguments[1]!==void 0?arguments[1]:60,se=null;return function(){for(var U=this,f=arguments.length,fe=new Array(f),ee=0;ee<f;ee++)fe[ee]=arguments[ee];clearTimeout(se),se=setTimeout(function(){re.apply(U,fe)},ge)}};tt.default=b},79789:function(Cn,tt){"use strict";Object.defineProperty(tt,"__esModule",{value:!0}),tt.default=void 0;var b=1,P=function(){return"".concat(b++)};tt.default=P},47242:function(Cn,tt,b){"use strict";Object.defineProperty(tt,"__esModule",{value:!0}),tt.ver=tt.clear=tt.bind=void 0;var P=b(95270),re=function(f,fe){var ee=(0,P.getSensor)(f);return ee.bind(fe),function(){ee.unbind(fe)}};tt.bind=re;var ge=function(f){var fe=(0,P.getSensor)(f);(0,P.removeSensor)(fe)};tt.clear=ge;var se="1.0.2";tt.ver=se},95270:function(Cn,tt,b){"use strict";Object.defineProperty(tt,"__esModule",{value:!0}),tt.removeSensor=tt.getSensor=tt.Sensors=void 0;var P=se(b(79789)),re=b(57829),ge=b(27774);function se(A){return A&&A.__esModule?A:{default:A}}var U={};tt.Sensors=U;function f(A){A&&U[A]&&delete U[A]}var fe=function(E){var x=E.getAttribute(ge.SizeSensorId);if(x&&U[x])return U[x];var h=(0,P.default)();E.setAttribute(ge.SizeSensorId,h);var p=(0,re.createSensor)(E,function(){return f(h)});return U[h]=p,p};tt.getSensor=fe;var ee=function(E){var x=E.element.getAttribute(ge.SizeSensorId);E.destroy(),f(x)};tt.removeSensor=ee},57829:function(Cn,tt,b){"use strict";Object.defineProperty(tt,"__esModule",{value:!0}),tt.createSensor=void 0;var P=b(20953),re=b(55202),ge=typeof ResizeObserver!="undefined"?re.createSensor:P.createSensor;tt.createSensor=ge},20953:function(Cn,tt,b){"use strict";Object.defineProperty(tt,"__esModule",{value:!0}),tt.createSensor=void 0;var P=ge(b(79301)),re=b(27774);function ge(U){return U&&U.__esModule?U:{default:U}}var se=function(f,fe){var ee=void 0,A=[],E=function(){getComputedStyle(f).position==="static"&&(f.style.position="relative");var F=document.createElement("object");return F.onload=function(){F.contentDocument.defaultView.addEventListener("resize",x),x()},F.style.display="block",F.style.position="absolute",F.style.top="0",F.style.left="0",F.style.height="100%",F.style.width="100%",F.style.overflow="hidden",F.style.pointerEvents="none",F.style.zIndex="-1",F.style.opacity="0",F.setAttribute("class",re.SensorClassName),F.setAttribute("tabindex",re.SensorTabIndex),F.type="text/html",f.appendChild(F),F.data="about:blank",F},x=(0,P.default)(function(){A.forEach(function(C){C(f)})}),h=function(F){ee||(ee=E()),A.indexOf(F)===-1&&A.push(F)},p=function(){ee&&ee.parentNode&&(ee.contentDocument&&ee.contentDocument.defaultView.removeEventListener("resize",x),ee.parentNode.removeChild(ee),f.removeAttribute(re.SizeSensorId),ee=void 0,A=[],fe&&fe())},_=function(F){var R=A.indexOf(F);R!==-1&&A.splice(R,1),A.length===0&&ee&&p()};return{element:f,bind:h,destroy:p,unbind:_}};tt.createSensor=se},55202:function(Cn,tt,b){"use strict";Object.defineProperty(tt,"__esModule",{value:!0}),tt.createSensor=void 0;var P=b(27774),re=ge(b(79301));function ge(U){return U&&U.__esModule?U:{default:U}}var se=function(f,fe){var ee=void 0,A=[],E=(0,re.default)(function(){A.forEach(function(C){C(f)})}),x=function(){var F=new ResizeObserver(E);return F.observe(f),E(),F},h=function(F){ee||(ee=x()),A.indexOf(F)===-1&&A.push(F)},p=function(){ee.disconnect(),A=[],ee=void 0,f.removeAttribute(P.SizeSensorId),fe&&fe()},_=function(F){var R=A.indexOf(F);R!==-1&&A.splice(R,1),A.length===0&&ee&&p()};return{element:f,bind:h,destroy:p,unbind:_}};tt.createSensor=se},98040:function(Cn){Cn.exports=function(){var tt=document.getSelection();if(!tt.rangeCount)return function(){};for(var b=document.activeElement,P=[],re=0;re<tt.rangeCount;re++)P.push(tt.getRangeAt(re));switch(b.tagName.toUpperCase()){case"INPUT":case"TEXTAREA":b.blur();break;default:b=null;break}return tt.removeAllRanges(),function(){tt.type==="Caret"&&tt.removeAllRanges(),tt.rangeCount||P.forEach(function(ge){tt.addRange(ge)}),b&&b.focus()}}},93314:function(Cn){"use strict";Cn.exports="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAMwAAACaCAYAAADl9acYAAAAAXNSR0IArs4c6QAAIABJREFUeF7tXQd4U1Ubfs/NaJtO9kzLahFQEJkiUBBFUFFkCCjiAAVFERT5FREQQQXBBcpysWRP2RtkKRsEOphNodCZdDfjnv85CU2TZt2bhABNDw9PmtzvrO+c957xLQIP0pkz1yrQIEmwwcDzHhTj91klEo7jpcG5zetWUJdmRjmPvTM9GI9JgSGvadOoLE9KJJ5kPp2YXLtZdO1kT8ooz2vigCNelvPYezPEG7z0CDAn4pJqPvJA5A3vdcl/S3LEy3Iee29OeIOX5YDx3nh4VFI5YDxin6DM5YARxKb7g6gcMHd+nMoBc+d57LKGhCQ1ZURBCoVL2nKCO8sBZWW50x1TOWDuLP8FlV4OGEFs8glROWB8wmbPKikHjGf882bucsB4k5t3qKxywNwhxrpRbJkGTOx0ehlA3d9e5VEtzA3ulGe55zmg1QOfrCVo34BgQGvr5rLDRl4RRZG+5NjBESBc4FHw1LlrCAuPsCo0JjKi7J5hYqfTXADBq4byCJLf82Nf3kA3OfD9LgKdgeCzZ4CUTJ1VKQFyKQgpmeMSjiKvQC+oplspN/wOMDcBVFv0Bo+KwYJ4VE50H3Jg7j6CWzkEX74A3MrSgTfeKZpSaBCHcAVn/JunBHlFPDR5BkG9LMjPt7mZLOtbskQADea9wqOW9coqiGHlRPcHBxYcJriQQvB9P+v2cqCwWFxgoOJk6JeTNX4HmJMAHv6xP4/6VXw/+OxNx/bM/pIohdUE9VW/VxwjOHiJYO5A6xolpGSpYW3jIW4w/A8wM+h+UHSY2pvHgzV9NXymeor0wPc7Cf7XzWJ/4Nsm+Ly2LzZx+OwZ3yuVbzhNsPEMwcI3rM8wMikHiURi5gNbbQoKrc84zpjkj2eYzQC6f96DomUd305ctrp8tp5gSk/f1utzlFhUOHYthy9f8D1gdpwnWHiEYOVQ6zNM6QM/AY+CImHnF9YtfwTMCgB9P+5G0SHa9xP3bk2gT9cBU3r6Hjp95nBYNcz3gDlwkRhX843vlfS59PmFHfjFzgC/2pJ1nEEnEIpIAG+834Wia2Ox7PJ8wt0twLz7J8Gsl3zf316zCVYPsz5oe85F1yUcu0YwcQPBjlElZyjL8wsrQeyBn+XxK8DETqefgyACFCPe6kjxfDPfT6C7BpilBLMG+L6/A34h+P1VikCZ60nuTYpzN4AxqznjCqPOMZ1RSp9f2OVLYZH1lbOrNvjVlswIGEAKYOyrj1K82NL3E+huAWbEMnbFSn1+Qzd4AcE3fajPZV6X04D3lnHGM4xOawKFJwLLYiD5H2AoCkHwJQMLA42v090CzJjVBBN7UCh8rN3AgDrqCYq6lX3L6RQ1MGQRhwWvA7UrALbnFzCJjOhG+d2WjFCkUYKZPZpSDIv1PWDGrycY34NCahI0+yxN/Ivg3c4UlUN8VqWxok/XEfRrSdG0tm/rzcoHBv7KYc5AILqqLWDcOb/45RmGEFyhFL8/0Yga33y+Tl9uJhjxOEVIoG9rnrqVKSJSRFb0fb3tG1A81sC39TLRSu85HL57Eaii0Bm3oqEKqZXSJaUURUxTU0Tyuy0ZAc5SYCUbxE+6+x4w3+0kGNiWooqP3/Qz9xB0bUTRsLqI2eEFUlbvA9WBJxv5ltdMit9jFocpLwB1InQIkBEQTmLUHStOBoMBOr24K2+/AwwPHOKArS2iKCY9VzKIg34jyMgTv6f1wpwqL8JLHKgUTLHwjZIxZTKg0V2Bzg2tLzvYBYA75xe/25J1mkEnGAzYyXE40KQmMK23uLeLN8b1j0ME7epTxFTzRmnCy/jzXyCqIny+NVryDzFeKfd+xLcrDOMMO8MMfgx45iFrOZA7AstiTvvVoZ91usM3tClHcLpeZWDmAN8DZtlRgkY1KJr5+BC87hQQLAeebCwcZN6gXH6MgG2P+rfyDmD+WLoV8xZugkIRiNh2TTHghcfRoF4tFBZpkXgpGQ81rmdu9puLOLzwMPBYPR1Cgzw/v7CC/WpLxjrc/jtaT2LApRrhwC+DfA+Y9aeI0dKzbT3vTCChk3r7eaBABzzfTGgO79CtPUmM9b7U2jv9bf3kOyjSlihLcoSg93MdkZ2Th227j2Hoq8/inTeeNzZ+xFIOsTHAsw/pAeL5+cUvAdPuG1pVRnArQgEsGex7wGw7RxAgBTo19M4EEjqtD1wEkrPYm15oDu/QbfkPSM0hHsu8du0/gSnfLkFGVrbThjFLynULJ6FOZHUw2RNbyd/qUJLFHZV+ywr9aksWO4Ou0BK8KueRz/bVq++CUuD+RGbhB3R/0LeAOZEEnFIRvPGYb+vdGw+cvU7w3uOe1dv+mfeRk5svCMUfvz8AA3o9jgkbCJQVgPe7lGTz5MDvj4f+VXs/JH1ip1PmAkHy17u8z42bjl4lxjf9C809m0CCZo4FUVwKsDPOJLz0ZTp6Fdh6jtnWe1bvuCm/4q/tRwQ1/b03e2LIwGfw1RaCkADg425AOvPkYCHZd0cG43dbsk4zaDFgWHiHcG85wjBQoEhnMhAzf5r/Jihkf9/+fjXDtDXqGA108+Eqcy0DYAfwMU95NnEFzVgLovibwK8HCab19qze61s24Pf5K7A5KwB5vHM1CblMij9m/Q87rtc1jsek54CMPIBayGD0BgP0ImUw/gwYFiqjllhHGAcvAkuPcijU8cgv0KGgSGv8LNJqweu1MOh14A3ss+S78W+Dzuo3RsPoTy0YgIjQALFz0C36tBzg570EE3p4NnHFVn5TA0zaSPDzy57Vu2bIS6jF67BDHYBHgnVI0kow+6ZjLyZNm9RD+35jkZINfNO7ZIVhEn+e16NQ6157/OqWjJ1h9n1IXoydTi8AeGD+KzxqinCEsfkswfBJC2HQacXOG7v0B+e9CGXVUK+U5aoQdm5iE3eqh296R/XoDEBu0e3/hcz3FzF+Z292trI91Zgav7N2tKrDrrfFTdgTI4dAl61BipZDDXYINRCMvBrusNvBikAMHT8LTM3/pwElK4xMAuQV6uBuKK4yA5hEVfY8SvmmHCETGyjDtzqbQLHf0KMgaCnWEcaW/whGT1mAHHZP6oW09bueaFy3khdKcl0EO+y+v4xgphs2MWxbs+K46bLCDIoi6+9iVLKY4PbTp8UB5t8h/UB53qimz1aJA9lyLExz7H1vyMCnUa15L/x9EfhtkIk/nh74y9ShPz5JnUGA26qFZIdcTofWqR5xxd5Uip1O9wDoJNYRxs4LBB9PXYxUdaHrGSqAYuWUp9GmSQ0BlN4h8cTq8qVfOGgKStpBeAoJb4DEYPrPsU89b/5e/LvEYPubLCIQX06NEtWpfwa/yA4h0FEgqVCK71OCUeTARdLLfbpg9PAXsfGsBBtOA0uHmKpyV0PZsqFl5lo5QaXWgRqNw4pTHiEYGa2M+KX0yMROpxsA9BDrCGNvAsG4GcuQdMt45eJx+nXsk3iyNbOY9k161wOry8/GqZCr1t4GBA/O3T0Nm7gSDl/89IBRHiU0nRk3CgU3knEmT4pZN51rrjI5TN2oGmCOMP44BKx7B8jINemP8ZRCK2Y5LNXAMrMlS0hSpwKw9TRGME+XHf5ekybEfPCInU7/BDBArCOMw5cIPvt+JRJUGqHj7JRu2rsd0P+JGBuanELTTVpwwO3/cnjFxNcTwMz95hquxud5pd+skIEfR6NJA+F2y6o1S3Fj4xpj/X9lBmK7OsDuChMUKMf+v36AXC4Fc4QxYwew/X0gM8/k5VKvN0BvcF9gfc8CJuGWuh4twgoQnJSBzK+nDP+3eLTsBahJSNL8DdD29kaUAFsDSU4vpVJp3FTETqdzAbwl1hHGySSCCTPX41RimlcmzthBrTCsV1Obss5cJ2hWXQupTIoiHUW+1nRYZkcn5kRbTzlIOQq5hBmimfRu2RwoeU4gl5rAFiI3Odpmb/NRK0zXu+zgKzZtWZWK/VvTxWZzSP/EK5HoEivcxsFQWIBzk8caVxmWmMT+g6thNlfMg/p1xYfv9DXSMEcYEzYAu247wnBXQ9myE/fslixRpf6FUgw2N5bgDChmk6Lw33MMqkqlg8JeVKmn8hRjHI0QIdgbiJynGWhiZ9AZoPhgaEeK50Q4wmDCvwmzt+HwGe8EcH67V1N8MshWV4UBpnlNLQID3Lcn5nkKrZ6iUEex4azEqC08di0BW1XDgsTP+2NHsrH6F+/0m9Xetns1PN9b3IWHPi8XyetXIOPoEeg1WbhYKMGK9CCoiiSoWq0SnuvWzqhLVuyoz+wI411mmi3epZI9Lt2zgElIUht9INtpdDJPMUsSGf59NCFFxc8TknI6AoZ9LqbCmj+V4X33zMAEAOMHtaXoJ0KLVpUJjJuzD3v+vSh+xtnJ0ffxaMwY0dHuCtO8pg6BAcK3LI4axCTai/4hRsBM3kww5DGK6o5vYx32S52pw9QxbEi8k6o2DMeoj2q5VVhqNnB29JsI0TP5M6Dj5Gg7dwmkpVZOsyOMtyg4joDyBhRq3d+Osbru3S2ZSp0LCmf+9ZM5CUY3qBWx3LREUy5RpbkKQOl0FAimvrksPAME08Q6wmD74DGz/8H2A/+5NdClM8U2r4VFE7rZBcwjtXQIkHsOGLbSLP7XBJhvdxD0fJiinhs+pVk5n41IBM/UFryQSHggvpxRooovpsgdFwjoD8MQri3ZIso/XYzm9a2FwDfUAFPxX/AaRYSCeCR/KW7fvQuYJE0RQF3vSQh2UQn3bsOaYXEJSZrPADrJBfP5BceCVx+4LO0r1hGG3gC8//Np/LXrmJjxdUhbv1YE9vzU22eAmbOPBRmieNCNFzvP8/jhaxVSL3vn4M9zBJN/bgSZgJsyplZ0KQ24oSZgq8vmE4V4+9hrkNIS8O5uPhbNOz+CprWpWRhd7Ahj9svMYM871rT38pbM/q2XvelHoeU4bpxBgt+Jjr8MAqfi80NXZEW/H1UEuOMIY/zCRPyxZr9XABMSJMP5pbelahYlsjNMi1p6402Pp8lyhWEhIBpVp2hdV1yp6nwgPAhYvzQF/+zOEpfZCfXgz6LRIMrxKsq0B5YcKsL6UxRFvBygelBdLjhZGMCx/RfTKWMCUGZzbAClvJEmtiGH97oEGLdhzBHGjL4UDyvLOmBUmn9AaamAay7GimAXgdErzG1RlX36k9el+PlgsPFtK9YRxtwtNzBl7havTZoLywYhuJRbSCNgauvBlAg9TQYDjyVHOeOWbOVxoEoo0Mn2JttpNZvOcmhfn0KTXoTr8TlITSnCrRSt8TMvV7gj79KVPDskCo+1tb/rZkLScavzcTlTARBrZUu+MB1coHNHZ8rQXEzvH4T+8yWY9DzQrj6QptFDzzRlPUj37JbM5pZMeCfZK5CNgsPt3PlbEny3LwSlHWEIqWLzcTWGfbFaCKkgml0zeyNaaa3QdqcAs+msSa2k+4OCmmYm2nyWQ98W9idabo4eqSla3EopMn6m3mRgKkJ6KlM6dV5Plz418ES3CjZE7Ar9w2X5UGXbv3bmC1NBAiqBEOf34zFhKlzLq40PuxK0i8qFutBzRdd7FjDx1zSDCKELxA2tmZoyyztqqc9tUdDlDAm+2hUCdxxhHIwrwOAJy5EvIkSCsz78Nq4rnmhpfU/BANOytgEydwQmpSpjQro/b68we+JNArzej4jjKouz0q+luDwGAzWCxnI1Kr0qPfpEZTzXv6pVwUzf6+MVBTiX6vi+hxoKQfUF4AJswWZZGF+UCUN2IsYMaINnbcVd4jp0m/qePcNcvJlTldcaUm5vVN3qnKNM1zUcJm4LhTuOMP65qMWYGWtxJcU76jGT3nwUrz1j7ZnCCBilAbLS96RucIFJtv88ZpLD/HMZSEgFXmkrrqANp2yjEYsroYRar6f44I3zxh9qNwnH8FHWNxBLj2ix6F85SKltmGV9lBrAF6RConCuh8fotCn7MSC2Fob3ELkPddDBexYwrL2JSZqtFPQpdwfHUT7mf+zjTWFwxxHG8St6zPhtCw6cZXcSnqdhLzTF2FethZcMMK2UBki9DBgmbz18mYAJbMUk5shiYBsxORzT5ucZ8PHbcUaC4OpBGDe55AbiShqP9/40gHLOt058UZbxXMPJnQuUKK+DLi8DEs0R/PJBLIIVwjULHPXgnt2SsQbHq7JeIJSYFIi8mNgeeeT6cFRQAItFOsL4L5li0do9WLrLriK06FZ2e7QO5v3PwugcgDcBo9MbsPT2CnMxFcYwdiNFuMhlKjcs/J23AMMEoONHJhj5JA2T44tvS2TTo5cX4kKqY5X9YuYacq9CEhzlMngmr8uGQasFLUpDPcUV/DCiKwrcNBwrrvueBsyKFVTSvG32aQraRPRMdJKBWaa+vSrcqNAo1hEGsyD8Y/1R/LzmjFea1EBZAbtn9rIqywiYSB5Siecey3U6A5YeN23JmCCPORIcK8IWhV0ps1Wpj8hzjyPmsDPN5P+ZNCWInMOXPz9g/PtgohZfbpEZ3SE5TxSGXBUkIa61vPnCDLCzFEuGrOMY1q02Xunq2VS6p7dkrKOJ17N7UAPP1PG9moatCoOBJ9go0hEGe+P+vC4e3yw84JX2VAoLxMmFL9sApnUkD4kXAKPV6bHsuNQIGDb5p28nmCwixmZSJnA5jeCZh1x3NzfpKi7M/xlFGRmo0qoNqnfohPAG1mcH1dUCfDP+sqkwjuCreY2Mf478swiJGa6V3Az518EFVgHhXMu0DYUZ4G8Dhuqy0Sg0EfM+8myHf88DhjEzIUmzAaA9XA+ZcIqR60KRp+XgjiOM3Sdu4s0vtyAkSIrgQCmCg6QIYZ+BMuPf7Dfzs9vP2bPi34ICZTh2szJ6NM41HuyrV7f2G8tWmNZRPCSc5yuMJWCYGcjHawm+7Sv8DPPfdSBfS9C5oWveHhg+GFqNyfRBEhgIeWgY2kz7AZysRDh5KT4fP0y5vZ0lwBdzGoO9FwbOK4S6KMDpCkP1eaD6fCNghCSDNhe8zmTsVznrMD59XIGa7Wx194SUVUxzT2/JihuZmJJThWoNZ0HgNY/EH28MRUY+B7GOMFibcrJzkJuXB3Z1zXHc7U9ivNlh0mX2aXpm/7ekLA57E6R44zHm5slWAs0A0ybKpDDoaWLhHJafMK0wLIm1ujx0iYD56WgrQO3ryuplSN6xzajkqM83+RCr1aUrol95A5zUJIT971QO5n2bZPybXYRNntsYvx4guLJrL1qkbsD2moOQHP6wlUskRkt5PfiCm5AEC/exa9DmgNcVoVL2KQy59RsqhAQg6tPvwAU5U1F0zvH7AjCsC4mqnE6UGpitvsfSJ0IIHb8lmNzIlkCsIwxPJzDLf10NrDtJMNyBjzDvAkaH5SdkbgOGOf5oVAN4sKawnl+YOwspf+81EzPIh9VvgCbvfoDAKlVx9JAai+ZcNz4PVBBE9W+M07uPo9/laeBgknSeC22ObbVeQ06QCRzselivuQhZBNveCX+JGAoyEZEThyE3fkIYNa00yh69UPdF6y2wsJ6ZqO6LLZl5pUlW9wHFMkrh6mTokgdf7QzG5UwpxDrCcFmwAAImPPztIMHorva3RkbA1GEhGoRPDkfVMj/EVoARaabM2vliCxj9QQtJ1GDAtU3rcGPXDmjVWWDfWWJbtHp9BiCwRScU6KQICJRg4VEp4g8ex4tXvrFSpGT0JxXNsKraIEgVFaHLuQ5ZSE1wAeLsEioRFZ5PnAVlTok5hiQwCG1+mAupwr1V5r4CDGNkgkrzEij93Znqi5CB/XafAhduySDWEYaQsl3RFGiB6Tsce4NkgGlbx+WtqatqjM9ZlOAVJ0tWmPeWEvzYX3gYcOY9cuKzsLE1EVK5oagQJ7/4DDlXS67gZTVqI6dlXxwNaIXrJ06j75UZkFhoHbNyK7Zqh2E3usHAlCupDgFhtSAJEmdsxsqJqZSHevmJaHPoC6vm1nvpNdTu7t6R+L4DjAk06t7M+tKuDb+QkQTw00EFTl2XQawjDIHFOyVj6h+frSeY4uC2it1MRVXgIeUIpBLTWcjdxMJArDgpN2/JPlpF8PlzwoPDjl9v0vZ1N2k1apz+ehJyVaZzS3HimUMKIoWUWrusqtDqUTR46308/bUKekghU1QBkbq+PbPXPkNuEog8DAOS5+ABzVEzSWj9GDSf+JVbXbovAcNs+oODFYSjsp8oqCm2gcj06z9BOHJNbjTZ7RDt/oQQWa2ZXEw0ZWY1yYzYGdCYuj5L7AJNwgBlvHRgj3mjnfvtx0YlS/Zcp9dj6wU5nmpiysccdLMYm5UECr3HruHwQ3/P+KPLzcWZ6VOQfdG5xWbVzl0R9fJgEI7DjO0Eu85rQSTuH1lbV45HbmYSzl1OR+2im4g0ZEJpyETdAC26zpnv1tDdt4AptulPNJ1rplMKUY6uFh8PxL5LARDrCMMtLtvJJAYw3qqTlcOCw7JYLUoBwWHZWWvBIYJxz3jeAiZxv7R0AZJ3bIetdT1B7T4voebTPc0VMbe2G08Wur26sII+6JyD5x4JQU6+FkfOp+DA2es4fO4GsvO1qFk5BE3qVEaTupWNn9G1K0AmILT1fQ8YxhhKqfTi9ewBoPQjSiFAxAasOh2AbfGBRr0qMY4wPJ86phLuFmBm7ibo2oSioYAL+uPXgKvpBIMe9VavgctnE5C7fyuyz58Bc2oRVKMWaj7XBxVbWGuELjxMsOxIAYjUtaqMo9Z90CkHz7WwXkoNPMXZy2k4ePYGDvx3HVdSTHIjBqCVn7verJQJwBQzjKnzJyRlPcZJuJ6UxwsAHEoP/joXgA3nAiHWEYa3ps7dAgyTeTwSRdHcuecDYzdXHCN4oBrwaH3v9Fqr55GWmY2ICNe3XWtOEvyy17MVZmRsLnq2dH4bdv5qBt6Ytg3d29TDOAFvhjIFmNLDGp+c1UxCycs8xTu3jcrMJDvi5VhxOghiHWF4Z+rcvRXGGBy2EvCYABB8sZHggycpqoa6f+lgya/MXC20RUUIDXV9gGJueb/d5tkZ5r0OOejd2nldm/+5gkkLDuOzQe3QrY1r2+0yDZjiwbp4PUNJeelKSqlZSX3/ZRkWHVNArCMMbwFm/AaC8c9Qt65rPWkDCw7Lggw9YVLhcprWnCCoH5qKGmHUaC4tl8sgl0kgl7FPqWhdt6upuQiWc1AoXN96MSd849ez62/31YPeeSwHL7Z1DpixvxzA7hNJWP9lL1RmjgtcJL8ADOOBSkWDCqiGaQoYlYn+TZJh/hEF3HGE4YqpQp7/sC0PrzRPhYxPg9yQjmCkoTA/HUV5aZDq0wBZBQQ0my6kKFE028/BGODpOYHBYfPy8qDT6aDT6Y2flolpUxeDhznscAWkfxKzEFNDAbncteIk8xIzYinxSBj1VrtcvPSo4y0Zs0Z96qPVqFpBgcXjnhXEx/saMCZfZNmTQCjTmZCAEC0oUglPU3iOnDEYtCcb16nCrDaN6ZxKU1HK0xOEIOrMDSlmHnDPEYZLzhoKAW0aivLSQXRpCKRp4HTpKMxNAy1KN36XE+cRAHjKIb/pckhk7h967bXz70STao47wWHZ9bZebwJOMYDY38Zrb4vEtKwZeAKMq5IJSDKZFOuPpqFr8yqCNBjYDd3AXwwgnPu+2Qa3zccrjzleNY7G3cR7P+7G8+2jMWaAMH8r9zVg4pKynudA1jmawExnjKf8fwRkAwF+j46MuJSoyupEKdkdnyoh0/e65wjDUX1c3MdA3hUEEO+YL6fU+BwRNUQa07tAM7v5OpNM8LoXg8PqDXrotHrojUDSQafXgXmrKZ3i0uV4vKkwiT2TJ/WcqYWBBLp8PzkieK1NIV5r71iO8/2qE1i2O8542GeHfiHpvgbMRVX2RzzlpwnpKCGEOa76i5dynxCeTriaTvpP2RnqliMMhwC9MBaBBaeFNEcQTU7FvpDWeU0QrVCiCynA7jjHip9Cy3FFxxz/mVYi0//sPD2u5wWgXUOBSmkAXvtVj7R819s3R215ta0Orz/m2FVVnwkbkJyWa7xOZtfKQtJ9DZiEpKzXAfKbkI6W0JAiQrDyZjZ5adyWUM4dRxiO6qOqRVCkLRPXHCfUt2gjhLXw7jmGBYdl18Uf+Tg47K4LBCz0uZh6P1oJnL/p/qH/5dYGvNnBfv5rN7PRb9JGVAoLwoavrC1enQ3gfQ2YC1ey6kil3CV2lhE7S7MKuMIxf4UGuuMIw1FdhszjCLk6XmxTHNLrqRT5TVdAJnNfPaR04cbgsPsIJjzrmbqL2E4evgxsPy+uXubM7+Vfmbss9661X2lDMdhuABRgyc4LmLnmJGKbKfHlW8KNyu5rwLBBS0zSbKBuWGOyWCoj1rrnCMPRZNEX5SLk3ACmVih2PjmkV9WYiso1RHrec1I7i1HJ5Ct3Kjiso6rPXgeY9P6bPsKB2uSRWKSlZbjNy3FjhuOTD5kIzja9891OnEhMxVs9muHVbsL5e98DJu5ydkNOxh934enfhmPsUDl0ZRgCZUS0IwyHWzJmqPPfcATorrk9yKUzZld5DTKlKUCQNxLr98jlJhV/X6ZrmcBXmwnmDBReb2R0CxQWmiOaiG5uj+5dsOyPH23yMd2ybmNWg6nJfDv8cbRpLDzO6H0PGMaN2zYyi8Q6/Ru+Ogw6A8FfIh1hOBs5evE7KLJ3ih5cRxluSR5FWLNxXiuPFeRJ6D53G5KWC3y4gmDhG8IAw7Ssa9Vlpsrup8jaNXHh+A6bAnYcu4bPfjto/H3z1D4IZ5JcgalMAIb1NVGlHkwpmQ1QwRf3H6wPRU6Re44wHPHXcGMTQm7+LJD9rsnU+soIaO2ux1z75Yu163fdStcUuYXA6wsIVg4VBpjMLDUeaOrgAOK6OjNFcvwhVCiluzbh90PYdvQqqlcMxuovSjSkhRRbZgDDOnsxOaczpYaFlEKQp4Sxm0KQlidxyxGGI+Zqs+IRfuUDIbwXTJMWsxghIc79CAsu7C6Ndg0lAAAdVklEQVStMEws88Jsgg3DhQEmSXUdLdt55hLJuIKs/g2x7UvcdrJtWPcxq40q/h2bKfGViAM/K69MAYZ16NKlzHCDlHwBwr0FUKdr7efbQpCs8a4jjMKCfITHDQRH3d97l578qmqTUblWczGYcErLzjDT+/hej63HLA5r32YOCl135dyFeHTuahtsynVOa4qvPv8II4aVyLJOXUzFsG9NW+bXuz+EISK9lJc5wBSz69KNzEheLxlFQVnEIrvmUlN3B+NiuncdYWi1OsjjP0KQznvxIDVVh0Bem1kreCcZg8N2pwhzX4juVkN6zebwx+u8oHr/OXoCPXrZBpsSW/GAvj3wy6yvzdl+WnsKi3aYnKFPHtIBnZu79qBpWWeZBUxxJ69coYE6ae4zlOqfIyBPM59uxc++36/AuZvedYTBJNz6+OkIL3AVn1b40N8K6oawRu8Jz+CCcvImgiEdKKoLF7p7pe4B8zl8148XVO+uPQcwYNAwj+tt0iga/+4t0Z4a8MUms9HY0vE9ECnUHc7tlpR5wFhyfA+l0lqq7L4A/QlAhTmHgnA8We51Rxh5FxejcvZSjwe7uIAk/cOo0nqK18qbsYPghebUGO7Dl+n1Pzh89iwvqN71G7fhzbc/9Lh5LALCzr+PQVMkR2w0Na4u566m49J1tVElRqyDEb8CTDH3LyblPMhTw67fjwZVPXTV+44wspP2oVq6IBU3QRPiprYWwtvOE0QrhGj2PoKO0dSoR+fL9O5SDm/H8oLq/XP5Gowc7R2tic9/XIlNyU2wY5RH1gJGVvklYFjHL6k0Ty85EbhxV6KceNsRRuatS6h1fYTX5mK+IQR5TZcbDb+8kVhw2MY1KFrV8UZpwsv4ZC3BCw8LC0o7/7fF+HRCydnDWS1FOSmQh1S363aX5XtlxGTEBfbCxveAIMFCB/s1+i1gGDsGL9Cvvpgm6eVtRxgZGZmomTQYHNUKn01OKHlIcEG5AfWE+eB2WefKY0DVMCDWO0G5XNZXTMDOTu3qUzxuinDhNH0/cx6+nGYrpS+diflxLkhPgFRRGfIQ+wzq9OxA5DUei5VDgYruObw0V+vXgOn8LR3L85jibUcY6iw1KiV9CLnhpqt5Ieg5DxkOV16PRyKFyTBcFbrxDPNZJj44rKtyXT1nvsYaVqeC4k1OmfoDfpjl2ncYb9CiMOOS0edyUOVoEGM4cuvUuGkrBHdbgIVvALWs4++6arLNc78GTOx0yq6efvS2I4zs7ByEJY1HkNYUactZ4kkg9FwE9JIKMEgijH8bjN/Z36bftCQcudLaeKC6q9KEPd8dB2Tliw8OK6x0x1Q/7SWoGkrRt4XrksZN/Brzfl3skpB59S9IN13hy0KrQxZkK+ANCQ1Do7ePYO5AoIF1DFqX5Zcm8G/AfENfB8Fv3naEkZubi6CkbxCou2yc9CZARJgBwcCRVlgZV3KC0aSmAhwnQYBcYowHI5FIwIN9MjPfkt/shcUQPdq3Mxy5DLDwfQNFBod1t77ifMyxuVxCBdX7wZgJWLzUdXh3Zh7NtmSgPCQBIQgIt+8/qtmw3fj5zep4yDoGregu+TVgOk2nTNl8pbcdYeTnFyA9U2MMDhQYIIFcwoGTSGCgnHHLECTnIJVIMG2H1BjywtcCRBYc9shlgrdEBocVPbtKZVjyDwGLLyqk3mHvjsGa9ZtdV0k4FGZdBa/NM/JbUcX+wSy692z8PDoWAjwpOa3TvwEzjXajHLa0b0DxSXfvnA9cj3AJxfe7TG5bq4aKyeU5bWIqsOkswcguvu3zyuPE6IBDSL2DBr+Hrdv3uOxshVqNkZqwH7q8NCNtYKUG4CS2V2G1OozE7ClvoZOHFx3+DZjptD0F/m4RRTHpOd9OHja4c/cRdHuQGh3r+TKxScuMuXz9kmDRmM/dgKB6+wwYgv0HjrhkS6+Bb2PlbzNQpDbZILEtGdualU4VH3gaX0/92ii89HZSVpY7NQllzvOLfYG7W7d7Nqe3a/NGA1hR7WfQZhKKU0yAN62396wkhTKFyUPa1qVo6KXDvNB62YH/2x0EXzzv/cnjrA07zhPsT4SgepkeGdMnc5V++nE6Phz/PTITmEIlhSykOmQK24M/W3mmzV2Lpxp7f5z9BjCPT6P1DRwuetMRhqsBtnzOnFHEVAMeVvp24hbpmata4lHcFzH9LKZl8TJXn4Cgep98+kWcPmtSknSWVi/7BZNmrsc/G2eC1xVAqqgEeYjtVRjhpPji1wN49qE7x+uYyAi7C4E3XvA+XWFU6Vo1ABsP2MzJwvDlMnjTEYarAbZ8zrYoVUKBR+vduUF01J67YUR2OhmYs49g9suu+9uhy/OIT2DyFedpz/bVWLXtFL77/F3o8zMhCQxHQJh9nZ/RU5diYJc7p95QZgCTnKHLppTaHK3Zm3bwYhkqKIDFg72/VLsabLZFYbYhnRu6nkCuyhL7/G4AJuEWwKT9QsyUWz3WDdeSkl1268zR3ThwLgtDBzyFIo0KnDwYgRH2VfYrP/jCzKTdX3pPZ8ll60wE990Kk5yhi6OU2kSaZx5OBy2UIkDqPUcYAnloJDtwkSC7AHj6Dm4THK4wIoPDiumXI1pVJjBqBcGqYa5fEA+16IxbqaabL2cp+dJJ3MqRoGXL1si7cRKcNAiBFe2vIopqDZemn133kqsyvf38fgTMJkops4WxSUOWSFGoI9joRUcYQhl+SgUkZZK7EtBp3DpgsjhzdqHdckiXlQcMWcReTq4Bw+z5mV2/sxQcrMCVuH+NoQof7DwESf/+aTz4B1WyH8tDHl7zhDpxlwA9A4+7alXAfQcYVYb2V1C8YY8N7y6XQl1AsGoojyD3vZK6zWHm9siDmK9u13u3Mgrtb71GbZCbm+e0mbVq1cDJIyavMK99OAvrfp0IfVEOFJWj7earUKUG9mxZ45WuOzqv2Cv8vgNMcqZuCuXpWHudGb1GipvZxKuOMLwyIn5eSGSDR8AiQDtLDzZ+ALu3rTKSzPrzAMa//xK0OSlQVLHZfd8uhuDQ/p1QKDyPiFCmAaNK17KD3g/2mP/ZXxJcyeAw/xUeNT3UZPXzOe7V7tes2wx6vcFpme3btcaa5SbX2gfP56Dnk62NipiKqo7tB1at+BMPPdjE47a6kr1YVnD/rTAZ+r6U8ivscWnyVgnibnL4sT+P+l6yN/F4NMoLQLXIh2zizpRmy9PduuCP+ab3YE4h8OCjzyMzfrvDMwyjm/rVZPR8vofHHC7TgLmRpetoMFC7Ximm75TgVDJn1G96srHrw6jHnC4vQBAHqipd+zvu/2JP/Dhjsrm8zv0n4sSWHx3KYRjh0DcH44NRnt8sl2nApGTROnqD7oq9kZq1T4IjV0Q7/xc06OVE7nPg6DS2bXL+AqvW4hVEdvnEXEna2bW4uGY4pEGO99ZPPv4YZs3y3DNpmQYM42hyujaBAjbXJxvOcFhxggHGI+UD92dGeU67HDg6/SGAd36GqfHoMNTuULJaFGZexem5T4CTOL7ufCCmAf7dv0EQ11MyrWN6WmYq84C5lqEdyVF8J4hTlkQc+URZUSbMG4PowsVlSEhSO3zlBtm5+alR0UOPD+KaZ5fa0aQryM+3oi/d/ocfaYOCQudxQCeOHYUPRrxpLocZk8U0i8Wt1HSHLQ+Qy3Hj0jFjzE1Xya8Bw4IuJWfoFgJ42RWjip8TQlbVqijtbwz3dw8kfwJM23YdkaXWOOX6tMljMWzIQCuawW9/hJVrNznNt37Fr+jc8VGXI+rXgCnmjipT353w/Es80IIALDAIM56QMFBQSpmkLAUEJzmeX1qrSuBfLrnqQwJ/AkyXJ7sh+bo5ALZdLs+cPgmvDuxj9ezPFesxbETJucZexrfeeAnTv3QdQqTMAyY5TdeZEspcjdjXjfDm5Ka4REDerF1F5tos0Ev1+hNger7QGxfiLzrl3PyfpqJfb+sr4vSMTDR4qCOYy15HSVmrJs4ddx3Dp8wDRpWhvQQKYfGjvTGJCS4rK8nvPDhvt9WfADPwlUE4etx5ROpFv/6A55950mYkn+zxMv45etLpCB/esw5NGjm3Vy77gEnX+lyQIua2xFOM+hNghg8fjp17Djhl2aolc9C1i21A1x9//h3jJn3jNO+EsaPwocWFgT3isg+Y8hXGatzv51uyTz75GGvWb3E66Teu+h0dLYIlFRNfuapCs7bOgzG1a9MCW9ezKI+OU5kHTPkZxnrw72fAfP3VFPy+yK42k7mTOzf+idYt7cfB7PBkH6cmzsz/29ULhxAe5thlT5kHjOV0SUzKfp6CLwkMAnIjJjLcyo3bRZV6Kk8xxpyPIjsmqiQgYkKS5jpAzfauBFzP6Miw9Z5urdzN709bsjmzZ+K7mb84ZdWBnavR9MFGdmm+/XE+Jn7pXOy2cP536NnD8UrkX4BRaSZQSieauUnIphhl+LNWoFJpFlFKSy7yCYmLUYabRyBBpdkISp8pzkMImRitDP/c3QnvaT5/AsyyJQswYcq3Tll29O+NaBht/45HyLZs0Et9MOvbSQ7r8DfArKOUPm/BjSkxkRFWl++JKvUuSvF4CSCwO1oZ0aX4e0KSmmn2fWoBmPXRynAf2ymW9MCfALNt8zqMGD3BKWDOHt2BKKVj36+du/XD8VNnHZZRu2YNnD+xqxwwjAOJKvU1SlHiDYGgT4wywspZb8I19QUQlBhPULokJqqCecVJUKl7g8JkocS0zQiSopURUZ6uFO7m9yfA/HtoL14Z8r5TViWe2Y9qVR2HUftp7kJ84iLGjLNVqsysMKcTk2s3i67t0KXIheTsSlJK0yilJRqVFPVjoiIuW59z1Ew5q8T9EsE3McoI85km4Zq6HgjMvn4IIVRPSJVGtcMy3J30nuTzJ8AkXjiJZ3uXRD+2xzdV/BGEhzsO1JlyMxWNHnncqRDzmymfYuhg+9pS3gKMq/kqZE54pBp85sy1CjRIEmww2BfnKoKC23NEsrzk/IKc/PycRjzTzrudQoLCAi3BwH6mlH6eV5Bjjo3HEUIUitALoDBfpfDU0C+/IM+5gEAIB9ygCVGEXXeUrawpX2bcvIx2jzuPHJ167SQCA5yHZevR9w3s+9uxy9mnn+qMZQtYyFPb5Awwaek3BcUBkEg4jhQY8po2jcpyY8gtprAnuV3kTVCpPwKFOcgkIdgbrYzobJntokrTgKfUKjY4B/RvEBlRAjTT1m4Ppehk0fIxMcoI51KxO9Q3f1phaFEmHmhuNWQ2XNWknHMYpq+YePGytXhnpPkYalNGSEgwkuIOQyq11V721grjjeng0QrjqgGJKs0SSqmF/ynyfUxk+CjLfAlJWR0BYmWFKZVyHevVDPvbmk7zHUBHFv9GCPkzWhkuWOPZVVvFPPcnwFQI5lE1qrlD9jA1/bSkUy7Zl52TiwYPdkBhUZFD2u0blqBta9u6/AcwSZrzFNR8PcxR8mqDqHCm2m9O8Uma/gTUKjY4R0h0A2W4lcbfxWuaQTyhC8yAAbkQHRne2OVI3QECfwIME7pWr9sC+QUFdjkZFhqK5MR/BHH5taEfOtUa+GT0u/hk9Ds2ZfkFYG7coIo8gyabUpiDHUqItGl9ZYjV/WJikmYUBbW66A+RhgfXrEmsLJsuqXIfMlD9mZIVBoZgSXhYaTpBI+chkb8BpknLJ6BKvmGXa1WrVMbFs/sFcXT7rv3o8/Iwh7SO1GT8AjCJydmPUp4/ZMGdwmhleCghRG+11VKpp4HiI4vfNDGRETbG4JRSaaJKk8Ni9ZhBw3HtomuHHRY0Wl4kEgsYL1bt9aJcWVyyCnv1HYBz5+x78K9Zswb27NwqqF16gwGxnZ9Eerr9y01mffnv4QNQKIIElceIfKl0y+q7Y2eY+CTNOwS05NqDkKMxyvDWpTmRqNIsppRanEXIhRgHW60ElYb5I21VXAYFGd4wMtxzTwqCh8dE6G+AGfzW2zhwwPLdV8KwunXqYOtm4VpKX0+bjt//cKxs+cu8n9Gh/WOCR6TMACZRlT2PUr7E0Jtw82KUYUNLcyL+mno3ISi5hiFkV4wy/Al7HEtQZc8F5d8q2ZZx86OVYebvgrnsIaG/Aeaj/43Fhr/smxs3bBiDDWtXCubohbg49OzVzyH9kMGv46MPzXc7LsstO4BJ0hyloC3Nkxt4JzoyYnZpDiRcU8eBwOxTlFK6uGFUhVfscSoxSf02BcwrCgE5Fh0Zbl5xXHLXSwRiAXM/ayuztn88/mv8PM/qrsbMyRbNH8KeLVYSAJdcZnKd/87H26Vr3uxB7NtmrR1d5s8w7LxxUZWdQ0Etzhvk0eja4TaSq4Qko4cFs5iYI9y0Bsqw/9kFTLKmLeWp+cxCQAobKMNszkUuR8xDAn8DzLTv5mDy1B/tcq1d25bYus4+mByxedacBRg7cardxxzH4VrcYSt1/zIPmMuqzKZ6ylnatRpCpPlhNWvWtLr5unmTBmdrNbmWnCOUjIqOCv/eHjdv3LihyNUrspmzjOLnUsI3q6esaL498xALgrL7G2B+W7gcI8fYVw5/PPYxrFvO3DcIT2npGWj4cGfo9Vb3P+YCmMSfSf6LU5kHTPy17FcJ4f8o2Y6R89GR4Taepy+pNNEGShOsAYN+0VERDi2WEpM05yioWf5CKfdaw6gws3xG+LC5T+lvgNmwaQcGDravgNm9a2csX2hfpcUZh/u/+i42b9ttl2T40Ffx1eclm4wyD5jEJM131FoqvyRaGW7tuMqo7pIVSynZa8k1Cr5jw8iKVlJ+y+elb9UIyPfRpbQH3IeCsJz+BphDR46jW0+7x0qj4RczABObNm7ZhZdef89uNmaMxozS/GaFSVSp91KKWAtufBQTGTG9NHcuXtf05w3WUn4CNIiOjHAYhTQhST0agFmHjBDsi1ZGlOiYiR05N+j9DTDxiZfRqoOVzZ+Za/369MD8WfbPI85Yq9Pp0fDhTmDumEondo5hZssRtzWgy/QKw1T5L6o0WZbq+pTiiYZRETYWQolJ2R9Q8DMsGRakDFcoCbGvhwEg/pq6CyEwO7MigKaBMrwCU/l3Y+67lcXfAMNC9tVp1M4ur159uQ9mznBsLemMwWMnTMOsueaduxXp0j9m4ZluJpvCMg2YxCR1fQqY9cDYRA4MC6usDCc2r5KEJDVbKdiKUZzUMZERFZwxWaXSVCwE0i1tbFytSm6hwkkmR4Cxp9rPirnfr5WZM75KymYwGGw99Qr1XmmPnefjEtG2k6UxbgmV5TmmbAMmWd2H8jBLsgjBtWhlhN1wuglJmiWAlTbz+Rg7lwOlmZ2oUl+lFGaLS8Khb3TtCLNFprcBUro8fwMM6z/zYpmaZutc/L23X8eUCZaaTeK437l7Pxw/aWu+3Oyhxvh7h2lIyzZgktRTKGCOY0kI1kUrI+xaICUkqZl715LzB8WumKgIu1J+y2FIVKnXUgqzTT8BvoyOjHBsbCFuDF1SiwWMywLvIoEQXTLWvB49+yAhwcpsydjqYUOHYNT79g/vQrq1bPkqTPj8CxtSdo759/DfCA1lLrcdp/te0p+g0myCRWhx5jGmYVQFu5f4CSpNHCg1S/kJIYuileGDXDE6/lrWBOY5xkxHyOYYZbjZq4yr/J4+90fAvPbGWzh8xFaNf8S772D4OzYaT4JZnJubi/Ydu9gNqTF39kx0irX1qGlZuM8Bc+PGZa86k8jVVzwGwOwRQQLD4CCpxq5LkFxDxXOgCC5mAOEwO5jLdHnlUqAP72KA5FcLxqWHSDPNajiCR8tNwlx9xav2sjo6w9ymTeCobjTR3bpjQlaDvLbddjnrptAV5oPRH2PTZlsPmLVrVv1q7+bf57rJSmO2Zu36TM3LLzArmAVWqo+qD/dD96c6Y1T3CiASx/F1JNpku9t9T9rjLO8d01a+Uw0uL/fucCCoSqPvCYGN9JJS8n5B2nn7ejMCmxpUpUl7TsL9HRHdBVWbD0CYspXRNZA+Lz394IQq91SI4HLACBxUfydTVGs8FpROseUDHZafGufRCtNxOh1nyM+YKFVUMqs86fLSaW7y0U1n5j/teahlLw5eOWC8yMyyXJSiWqMhoLBRGiOUvpaXFueRalLsdPongAGMfwUZl6G4sARtcw4e/XrXNhv7qbvN43sCMGcSUyy1Asw8aRpdw+gcw9FzMcwrLktMnnLaEg4oqjV8DpSzsRSjPAYUpF9Y5gmvOs2gbXke069tm8A9l7enaYNQWXCAhKMNK4ZFdl6yxqHfO0/qdDfvPQEYdxtfns93HIj9xpBm0BVUpgYteH0ReL0W1FAEWXDl/w5+VvEhIS1JSbli98VYnLdGjbr7furWZVGYXDawYlAAgmTSMY8vXn1XXGk56k+ZBYw3ViV7TLvXVipXk1DIRHZGwyYxex47nf4LwJ6xXuK+0cR5CDERjdjzWs8IXsvdvJRTGDDt7HXt9QLtmIJbF34QUcQdJS2zgLmjXPPHwmu2UCj0+SxYr1XiCN8l91a8fT19kXwqBv9Xg975fuHZaw9reZN6YLWqlfYe2rGoRO4motxiwIvI4pS0HDDe4qSflDPrqS5aA6UyAtAR23dz3u52gyffH3vj9HYWrcE0Nyl0lCOjC255dnXtrXaWA8ZbnPSTcna/3PsyBa0LILPLkjWVvN3tyk2emp+fljTEVC5N43j0zU2Ps/KM6u06xZRXDhgx3Cqnxe6Xe12gYKFJSF6XJaudK3qJ5xdRVG3ETNvZJcI5nqPPFt6ME629IL5a4TnKNGAopfLkbIRIDAgBj2BQnUJPiUIqQRD7JNSgAIgCBIGUkkCOIIAHH0gIFwBKAkH5QEogJwRyUCKn4OWEcDJCIQeBnFLIACoFAfOgLQX7TnH7O5UCHAdQCQjhQKkEIKbvAGf8m4DAFAqEEGIcCnLbbMH4m3FDAtDbtj70dtADCmb7w/6B8gB4gBiMfxNiAGW/se8sogLRg0IPYvyvA2D6DqIn7DuFlhJoKeV1BJwWhGophZZQaEG4QhBaSClfxIEr/HbR1mZrli2unp/8X6tcHW92bhJdv/6cLRvW/AIiyweHPIMEubXDkEsI0QqfhibK4KqNXqEA86hxOF9X1B1Zl5mDlHsq3dOASU2lIQYZKuv0usrgSCUJIRUBvgLlSQVKEMGBhPOgEaB8OEDCKBBGYAyJEUKBEAI2ocuTOxw4dfoMzp0/j/j4RJw5+x/i4uJZGBKbotq0boWFf9jGwKSAjgDMwUkuBXIIkA3QbBBOw4GoeVANoVATjmYBXJaB0syWrR79SSaX33rhuef7zpr2P/u+ad3pjBfz3BXAUEq5lCzUNhj0dQmhUQBRArQWBalBCGoAtBqlqAZAuM9QLzKlvCjgzaHDceCgydslc+Eqk8nNoSiYIRn7r9PpUCEiAn/vMxvAepN1BYTgFkBuUYoUApoCEBYcWEUpuSaRSK/UqIBkQghbZX2W7jhgKKWylCx9WwOPdoTQhylIE0IRbemzzGe9La+oTHGA+aWjBIkE9Byl5JSEw6EaFaRHCCFs+3lH0h0FTHK6bjIFhoNtm8pTOQd8wgGiJsBPtSvLrAIPe6vqOw8YguGg5YDx1oCVl+OCA4SoCb1PAcO6Zt6SAe0IpQ9TigcBRANwHhSxfGaUc8A1B1g4s0RC8B8l5JQE9/mWzFF/iw/9hOjrGkCiYKDmQz9AaxKCqpSSagAtP/S7njRllIIUEELZgT+VgqZwIDeMh34JUUlAr1FaRg/9noxm8bUy1esq6+1cK5vORiS8/FrZEy7fmbzOrpUBqgGImhCoCUqulaU8zSBSWbpEh/SqVYmVz+0700rxpd7RM4z45ng3hz3BJSREoadQSDkSZKBQgPIKUAeCS8IHMiElE16aBZeAnICTWQouCYHUJMQ0Ci9vCy6JlIJKOJOAkqNMcGkrwCTMFJdYCCwtBZilBZbsO5NWwiQPoaUFlsQouGQSS8oTkzCzRHAJGIWVtLTgEryOAtpiwSUTWjJhJqi14JKnKCKEFoKgEITLlxDk63laICXIh4Hme0Nw6d3RvzOl/R8AdGoXzom1qQAAAABJRU5ErkJggg=="},81168:function(Cn,tt,b){"use strict";b.d(tt,{ZP:function(){return Is}});const P=Number.isFinite||function(i){return typeof i=="number"&&isFinite(i)},re=Number.isSafeInteger||function(i){return typeof i=="number"&&Math.abs(i)<=ge},ge=Number.MAX_SAFE_INTEGER||9007199254740991;let se=function(i){return i.NETWORK_ERROR="networkError",i.MEDIA_ERROR="mediaError",i.KEY_SYSTEM_ERROR="keySystemError",i.MUX_ERROR="muxError",i.OTHER_ERROR="otherError",i}({}),U=function(i){return i.KEY_SYSTEM_NO_KEYS="keySystemNoKeys",i.KEY_SYSTEM_NO_ACCESS="keySystemNoAccess",i.KEY_SYSTEM_NO_SESSION="keySystemNoSession",i.KEY_SYSTEM_NO_CONFIGURED_LICENSE="keySystemNoConfiguredLicense",i.KEY_SYSTEM_LICENSE_REQUEST_FAILED="keySystemLicenseRequestFailed",i.KEY_SYSTEM_SERVER_CERTIFICATE_REQUEST_FAILED="keySystemServerCertificateRequestFailed",i.KEY_SYSTEM_SERVER_CERTIFICATE_UPDATE_FAILED="keySystemServerCertificateUpdateFailed",i.KEY_SYSTEM_SESSION_UPDATE_FAILED="keySystemSessionUpdateFailed",i.KEY_SYSTEM_STATUS_OUTPUT_RESTRICTED="keySystemStatusOutputRestricted",i.KEY_SYSTEM_STATUS_INTERNAL_ERROR="keySystemStatusInternalError",i.KEY_SYSTEM_DESTROY_MEDIA_KEYS_ERROR="keySystemDestroyMediaKeysError",i.KEY_SYSTEM_DESTROY_CLOSE_SESSION_ERROR="keySystemDestroyCloseSessionError",i.KEY_SYSTEM_DESTROY_REMOVE_SESSION_ERROR="keySystemDestroyRemoveSessionError",i.MANIFEST_LOAD_ERROR="manifestLoadError",i.MANIFEST_LOAD_TIMEOUT="manifestLoadTimeOut",i.MANIFEST_PARSING_ERROR="manifestParsingError",i.MANIFEST_INCOMPATIBLE_CODECS_ERROR="manifestIncompatibleCodecsError",i.LEVEL_EMPTY_ERROR="levelEmptyError",i.LEVEL_LOAD_ERROR="levelLoadError",i.LEVEL_LOAD_TIMEOUT="levelLoadTimeOut",i.LEVEL_PARSING_ERROR="levelParsingError",i.LEVEL_SWITCH_ERROR="levelSwitchError",i.AUDIO_TRACK_LOAD_ERROR="audioTrackLoadError",i.AUDIO_TRACK_LOAD_TIMEOUT="audioTrackLoadTimeOut",i.SUBTITLE_LOAD_ERROR="subtitleTrackLoadError",i.SUBTITLE_TRACK_LOAD_TIMEOUT="subtitleTrackLoadTimeOut",i.FRAG_LOAD_ERROR="fragLoadError",i.FRAG_LOAD_TIMEOUT="fragLoadTimeOut",i.FRAG_DECRYPT_ERROR="fragDecryptError",i.FRAG_PARSING_ERROR="fragParsingError",i.FRAG_GAP="fragGap",i.REMUX_ALLOC_ERROR="remuxAllocError",i.KEY_LOAD_ERROR="keyLoadError",i.KEY_LOAD_TIMEOUT="keyLoadTimeOut",i.BUFFER_ADD_CODEC_ERROR="bufferAddCodecError",i.BUFFER_INCOMPATIBLE_CODECS_ERROR="bufferIncompatibleCodecsError",i.BUFFER_APPEND_ERROR="bufferAppendError",i.BUFFER_APPENDING_ERROR="bufferAppendingError",i.BUFFER_STALLED_ERROR="bufferStalledError",i.BUFFER_FULL_ERROR="bufferFullError",i.BUFFER_SEEK_OVER_HOLE="bufferSeekOverHole",i.BUFFER_NUDGE_ON_STALL="bufferNudgeOnStall",i.ASSET_LIST_LOAD_ERROR="assetListLoadError",i.ASSET_LIST_LOAD_TIMEOUT="assetListLoadTimeout",i.ASSET_LIST_PARSING_ERROR="assetListParsingError",i.INTERSTITIAL_ASSET_ITEM_ERROR="interstitialAssetItemError",i.INTERNAL_EXCEPTION="internalException",i.INTERNAL_ABORTED="aborted",i.ATTACH_MEDIA_ERROR="attachMediaError",i.UNKNOWN="unknown",i}({}),f=function(i){return i.MEDIA_ATTACHING="hlsMediaAttaching",i.MEDIA_ATTACHED="hlsMediaAttached",i.MEDIA_DETACHING="hlsMediaDetaching",i.MEDIA_DETACHED="hlsMediaDetached",i.MEDIA_ENDED="hlsMediaEnded",i.STALL_RESOLVED="hlsStallResolved",i.BUFFER_RESET="hlsBufferReset",i.BUFFER_CODECS="hlsBufferCodecs",i.BUFFER_CREATED="hlsBufferCreated",i.BUFFER_APPENDING="hlsBufferAppending",i.BUFFER_APPENDED="hlsBufferAppended",i.BUFFER_EOS="hlsBufferEos",i.BUFFERED_TO_END="hlsBufferedToEnd",i.BUFFER_FLUSHING="hlsBufferFlushing",i.BUFFER_FLUSHED="hlsBufferFlushed",i.MANIFEST_LOADING="hlsManifestLoading",i.MANIFEST_LOADED="hlsManifestLoaded",i.MANIFEST_PARSED="hlsManifestParsed",i.LEVEL_SWITCHING="hlsLevelSwitching",i.LEVEL_SWITCHED="hlsLevelSwitched",i.LEVEL_LOADING="hlsLevelLoading",i.LEVEL_LOADED="hlsLevelLoaded",i.LEVEL_UPDATED="hlsLevelUpdated",i.LEVEL_PTS_UPDATED="hlsLevelPtsUpdated",i.LEVELS_UPDATED="hlsLevelsUpdated",i.AUDIO_TRACKS_UPDATED="hlsAudioTracksUpdated",i.AUDIO_TRACK_SWITCHING="hlsAudioTrackSwitching",i.AUDIO_TRACK_SWITCHED="hlsAudioTrackSwitched",i.AUDIO_TRACK_LOADING="hlsAudioTrackLoading",i.AUDIO_TRACK_LOADED="hlsAudioTrackLoaded",i.AUDIO_TRACK_UPDATED="hlsAudioTrackUpdated",i.SUBTITLE_TRACKS_UPDATED="hlsSubtitleTracksUpdated",i.SUBTITLE_TRACKS_CLEARED="hlsSubtitleTracksCleared",i.SUBTITLE_TRACK_SWITCH="hlsSubtitleTrackSwitch",i.SUBTITLE_TRACK_LOADING="hlsSubtitleTrackLoading",i.SUBTITLE_TRACK_LOADED="hlsSubtitleTrackLoaded",i.SUBTITLE_TRACK_UPDATED="hlsSubtitleTrackUpdated",i.SUBTITLE_FRAG_PROCESSED="hlsSubtitleFragProcessed",i.CUES_PARSED="hlsCuesParsed",i.NON_NATIVE_TEXT_TRACKS_FOUND="hlsNonNativeTextTracksFound",i.INIT_PTS_FOUND="hlsInitPtsFound",i.FRAG_LOADING="hlsFragLoading",i.FRAG_LOAD_EMERGENCY_ABORTED="hlsFragLoadEmergencyAborted",i.FRAG_LOADED="hlsFragLoaded",i.FRAG_DECRYPTED="hlsFragDecrypted",i.FRAG_PARSING_INIT_SEGMENT="hlsFragParsingInitSegment",i.FRAG_PARSING_USERDATA="hlsFragParsingUserdata",i.FRAG_PARSING_METADATA="hlsFragParsingMetadata",i.FRAG_PARSED="hlsFragParsed",i.FRAG_BUFFERED="hlsFragBuffered",i.FRAG_CHANGED="hlsFragChanged",i.FPS_DROP="hlsFpsDrop",i.FPS_DROP_LEVEL_CAPPING="hlsFpsDropLevelCapping",i.MAX_AUTO_LEVEL_UPDATED="hlsMaxAutoLevelUpdated",i.ERROR="hlsError",i.DESTROYING="hlsDestroying",i.KEY_LOADING="hlsKeyLoading",i.KEY_LOADED="hlsKeyLoaded",i.LIVE_BACK_BUFFER_REACHED="hlsLiveBackBufferReached",i.BACK_BUFFER_REACHED="hlsBackBufferReached",i.STEERING_MANIFEST_LOADED="hlsSteeringManifestLoaded",i.ASSET_LIST_LOADING="hlsAssetListLoading",i.ASSET_LIST_LOADED="hlsAssetListLoaded",i.INTERSTITIALS_UPDATED="hlsInterstitialsUpdated",i.INTERSTITIALS_BUFFERED_TO_BOUNDARY="hlsInterstitialsBufferedToBoundary",i.INTERSTITIAL_ASSET_PLAYER_CREATED="hlsInterstitialAssetPlayerCreated",i.INTERSTITIAL_STARTED="hlsInterstitialStarted",i.INTERSTITIAL_ASSET_STARTED="hlsInterstitialAssetStarted",i.INTERSTITIAL_ASSET_ENDED="hlsInterstitialAssetEnded",i.INTERSTITIAL_ASSET_ERROR="hlsInterstitialAssetError",i.INTERSTITIAL_ENDED="hlsInterstitialEnded",i.INTERSTITIALS_PRIMARY_RESUMED="hlsInterstitialsPrimaryResumed",i.PLAYOUT_LIMIT_REACHED="hlsPlayoutLimitReached",i.EVENT_CUE_ENTER="hlsEventCueEnter",i}({});var fe={MANIFEST:"manifest",LEVEL:"level",AUDIO_TRACK:"audioTrack",SUBTITLE_TRACK:"subtitleTrack"},ee={MAIN:"main",AUDIO:"audio",SUBTITLE:"subtitle"};class A{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 E{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 A(e),this.fast_=new A(t),this.defaultTTFB_=r,this.ttfb_=new A(e)}update(e,t){const{slow_:n,fast_:r,ttfb_:s}=this;n.halfLife!==e&&(this.slow_=new A(e,n.getEstimate(),n.getTotalWeight())),r.halfLife!==t&&(this.fast_=new A(t,r.getEstimate(),r.getTotalWeight())),s.halfLife!==e&&(this.ttfb_=new A(e,s.getEstimate(),s.getTotalWeight()))}sample(e,t){e=Math.max(e,this.minDelayMs_);const n=8*t,r=e/1e3,s=n/r;this.fast_.sample(r,s),this.slow_.sample(r,s)}sampleTTFB(e){const t=e/1e3,n=Math.sqrt(2)*Math.exp(-Math.pow(t,2)/2);this.ttfb_.sample(n,Math.max(e,5))}canEstimate(){return this.fast_.getTotalWeight()>=this.minWeight_}getEstimate(){return this.canEstimate()?Math.min(this.fast_.getEstimate(),this.slow_.getEstimate()):this.defaultEstimate_}getEstimateTTFB(){return this.ttfb_.getTotalWeight()>=this.minWeight_?this.ttfb_.getEstimate():this.defaultTTFB_}get defaultEstimate(){return this.defaultEstimate_}destroy(){}}function x(i,e,t){return(e=F(e))in i?Object.defineProperty(i,e,{value:t,enumerable:!0,configurable:!0,writable:!0}):i[e]=t,i}function h(){return h=Object.assign?Object.assign.bind():function(i){for(var e=1;e<arguments.length;e++){var t=arguments[e];for(var n in t)({}).hasOwnProperty.call(t,n)&&(i[n]=t[n])}return i},h.apply(null,arguments)}function p(i,e){var t=Object.keys(i);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(i);e&&(n=n.filter(function(r){return Object.getOwnPropertyDescriptor(i,r).enumerable})),t.push.apply(t,n)}return t}function _(i){for(var e=1;e<arguments.length;e++){var t=arguments[e]!=null?arguments[e]:{};e%2?p(Object(t),!0).forEach(function(n){x(i,n,t[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(i,Object.getOwnPropertyDescriptors(t)):p(Object(t)).forEach(function(n){Object.defineProperty(i,n,Object.getOwnPropertyDescriptor(t,n))})}return i}function C(i,e){if(typeof i!="object"||!i)return i;var t=i[Symbol.toPrimitive];if(t!==void 0){var n=t.call(i,e);if(typeof n!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(i)}function F(i){var e=C(i,"string");return typeof e=="symbol"?e:e+""}class R{constructor(e,t){this.trace=void 0,this.debug=void 0,this.log=void 0,this.warn=void 0,this.info=void 0,this.error=void 0;const n=`[${e}]:`;this.trace=K,this.debug=t.debug.bind(null,n),this.log=t.log.bind(null,n),this.warn=t.warn.bind(null,n),this.info=t.info.bind(null,n),this.error=t.error.bind(null,n)}}const K=function(){},B={trace:K,debug:K,log:K,warn:K,info:K,error:K};function D(){return h({},B)}function I(i,e){const t=self.console[i];return t?t.bind(self.console,`${e?"["+e+"] ":""}[${i}] >`):K}function S(i,e,t){return e[i]?e[i].bind(e):I(i,t)}const q=D();function ae(i,e,t){const n=D();if(typeof console=="object"&&i===!0||typeof i=="object"){const r=["debug","log","info","warn","error"];r.forEach(s=>{n[s]=S(s,i,t)});try{n.log(`Debug logs enabled for "${e}" in hls.js version 1.6.7`)}catch(s){return D()}r.forEach(s=>{q[s]=S(s,i)})}else h(q,n);return n}const j=q;function Y(i=!0){return typeof self=="undefined"?void 0:(i||!self.MediaSource)&&self.ManagedMediaSource||self.MediaSource||self.WebKitMediaSource}function ie(i){return typeof self!="undefined"&&i===self.ManagedMediaSource}function de(i,e){const t=Object.keys(i),n=Object.keys(e),r=t.length,s=n.length;return!r||!s||r===s&&!t.some(a=>n.indexOf(a)===-1)}function pe(i,e=!1){if(typeof TextDecoder!="undefined"){const l=new TextDecoder("utf-8").decode(i);if(e){const c=l.indexOf("\0");return c!==-1?l.substring(0,c):l}return l.replace(/\0/g,"")}const t=i.length;let n,r,s,a="",o=0;for(;o<t;){if(n=i[o++],n===0&&e)return a;if(n===0||n===3)continue;switch(n>>4){case 0:case 1:case 2:case 3:case 4:case 5:case 6:case 7:a+=String.fromCharCode(n);break;case 12:case 13:r=i[o++],a+=String.fromCharCode((n&31)<<6|r&63);break;case 14:r=i[o++],s=i[o++],a+=String.fromCharCode((n&15)<<12|(r&63)<<6|(s&63)<<0);break}}return a}const W={hexDump:function(i){let e="";for(let t=0;t<i.length;t++){let n=i[t].toString(16);n.length<2&&(n="0"+n),e+=n}return e}};function M(i){return Uint8Array.from(i.replace(/^0x/,"").replace(/([\da-fA-F]{2}) ?/g,"0x$1 ").replace(/ +$/,"").split(" ")).buffer}function X(i){return i&&i.__esModule&&Object.prototype.hasOwnProperty.call(i,"default")?i.default:i}var G={exports:{}},ne;function Z(){return ne||(ne=1,function(i,e){(function(t){var n=/^(?=((?:[a-zA-Z0-9+\-.]+:)?))\1(?=((?:\/\/[^\/?#]*)?))\2(?=((?:(?:[^?#\/]*\/)*[^;?#\/]*)?))\3((?:;[^?#]*)?)(\?[^#]*)?(#[^]*)?$/,r=/^(?=([^\/?#]*))\1([^]*)$/,s=/(?:\/|^)\.(?=\/)/g,a=/(?:\/|^)\.\.\/(?!\.\.\/)[^\/]*(?=\/)/g,o={buildAbsoluteURL:function(u,l,c){if(c=c||{},u=u.trim(),l=l.trim(),!l){if(!c.alwaysNormalize)return u;var d=o.parseURL(u);if(!d)throw new Error("Error trying to parse base URL.");return d.path=o.normalizePath(d.path),o.buildURLFromParts(d)}var g=o.parseURL(l);if(!g)throw new Error("Error trying to parse relative URL.");if(g.scheme)return c.alwaysNormalize?(g.path=o.normalizePath(g.path),o.buildURLFromParts(g)):l;var w=o.parseURL(u);if(!w)throw new Error("Error trying to parse base URL.");if(!w.netLoc&&w.path&&w.path[0]!=="/"){var y=r.exec(w.path);w.netLoc=y[1],w.path=y[2]}w.netLoc&&!w.path&&(w.path="/");var O={scheme:w.scheme,netLoc:g.netLoc,path:null,params:g.params,query:g.query,fragment:g.fragment};if(!g.netLoc&&(O.netLoc=w.netLoc,g.path[0]!=="/"))if(!g.path)O.path=w.path,g.params||(O.params=w.params,g.query||(O.query=w.query));else{var H=w.path,Ae=H.substring(0,H.lastIndexOf("/")+1)+g.path;O.path=o.normalizePath(Ae)}return O.path===null&&(O.path=c.alwaysNormalize?o.normalizePath(g.path):g.path),o.buildURLFromParts(O)},parseURL:function(u){var l=n.exec(u);return l?{scheme:l[1]||"",netLoc:l[2]||"",path:l[3]||"",params:l[4]||"",query:l[5]||"",fragment:l[6]||""}:null},normalizePath:function(u){for(u=u.split("").reverse().join("").replace(s,"");u.length!==(u=u.replace(a,"")).length;);return u.split("").reverse().join("")},buildURLFromParts:function(u){return u.scheme+u.netLoc+u.path+u.params+u.query+u.fragment}};i.exports=o})()}(G)),G.exports}var m=Z();class v{constructor(){this.aborted=!1,this.loaded=0,this.retry=0,this.total=0,this.chunkCount=0,this.bwEstimate=0,this.loading={start:0,first:0,end:0},this.parsing={start:0,end:0},this.buffering={start:0,first:0,end:0}}}var Q={AUDIO:"audio",VIDEO:"video",AUDIOVIDEO:"audiovideo"};class he{constructor(e){this._byteRange=null,this._url=null,this._stats=null,this._streams=null,this.base=void 0,this.relurl=void 0,typeof e=="string"&&(e={url:e}),this.base=e,Ft(this,"stats")}setByteRange(e,t){const n=e.split("@",2);let r;n.length===1?r=(t==null?void 0:t.byteRangeEndOffset)||0:r=parseInt(n[1]),this._byteRange=[r,parseInt(n[0])+r]}get baseurl(){return this.base.url}get byteRange(){return this._byteRange===null?[]:this._byteRange}get byteRangeStartOffset(){return this.byteRange[0]}get byteRangeEndOffset(){return this.byteRange[1]}get elementaryStreams(){return this._streams===null&&(this._streams={[Q.AUDIO]:null,[Q.VIDEO]:null,[Q.AUDIOVIDEO]:null}),this._streams}set elementaryStreams(e){this._streams=e}get hasStats(){return this._stats!==null}get hasStreams(){return this._streams!==null}get stats(){return this._stats===null&&(this._stats=new v),this._stats}set stats(e){this._stats=e}get url(){return!this._url&&this.baseurl&&this.relurl&&(this._url=m.buildAbsoluteURL(this.baseurl,this.relurl,{alwaysNormalize:!0})),this._url||""}set url(e){this._url=e}clearElementaryStreamInfo(){const{elementaryStreams:e}=this;e[Q.AUDIO]=null,e[Q.VIDEO]=null,e[Q.AUDIOVIDEO]=null}}function Ue(i){return i.sn!=="initSegment"}class Oe extends he{constructor(e,t){super(t),this._decryptdata=null,this._programDateTime=null,this._ref=null,this._bitrate=void 0,this.rawProgramDateTime=null,this.tagList=[],this.duration=0,this.sn=0,this.levelkeys=void 0,this.type=void 0,this.loader=null,this.keyLoader=null,this.level=-1,this.cc=0,this.startPTS=void 0,this.endPTS=void 0,this.startDTS=void 0,this.endDTS=void 0,this.start=0,this.playlistOffset=0,this.deltaPTS=void 0,this.maxStartPTS=void 0,this.minEndPTS=void 0,this.data=void 0,this.bitrateTest=!1,this.title=null,this.initSegment=null,this.endList=void 0,this.gap=void 0,this.urlId=0,this.type=e}get byteLength(){if(this.hasStats){const e=this.stats.total;if(e)return e}if(this.byteRange){const e=this.byteRange[0],t=this.byteRange[1];if(P(e)&&P(t))return t-e}return null}get bitrate(){return this.byteLength?this.byteLength*8/this.duration:this._bitrate?this._bitrate:null}set bitrate(e){this._bitrate=e}get decryptdata(){const{levelkeys:e}=this;if(!e&&!this._decryptdata)return null;if(!this._decryptdata&&this.levelkeys&&!this.levelkeys.NONE){const t=this.levelkeys.identity;if(t)this._decryptdata=t.getDecryptData(this.sn);else{const n=Object.keys(this.levelkeys);if(n.length===1)return this._decryptdata=this.levelkeys[n[0]].getDecryptData(this.sn)}}return this._decryptdata}get end(){return this.start+this.duration}get endProgramDateTime(){if(this.programDateTime===null)return null;const e=P(this.duration)?this.duration:0;return this.programDateTime+e*1e3}get encrypted(){var e;if((e=this._decryptdata)!=null&&e.encrypted)return!0;if(this.levelkeys){const t=Object.keys(this.levelkeys),n=t.length;if(n>1||n===1&&this.levelkeys[t[0]].encrypted)return!0}return!1}get programDateTime(){return this._programDateTime===null&&this.rawProgramDateTime&&(this.programDateTime=Date.parse(this.rawProgramDateTime)),this._programDateTime}set programDateTime(e){if(!P(e)){this._programDateTime=this.rawProgramDateTime=null;return}this._programDateTime=e}get ref(){return Ue(this)?(this._ref||(this._ref={base:this.base,start:this.start,duration:this.duration,sn:this.sn,programDateTime:this.programDateTime}),this._ref):null}addStart(e){this.setStart(this.start+e)}setStart(e){this.start=e,this._ref&&(this._ref.start=e)}setDuration(e){this.duration=e,this._ref&&(this._ref.duration=e)}setKeyFormat(e){if(this.levelkeys){const t=this.levelkeys[e];t&&!this._decryptdata&&(this._decryptdata=t.getDecryptData(this.sn))}}abortRequests(){var e,t;(e=this.loader)==null||e.abort(),(t=this.keyLoader)==null||t.abort()}setElementaryStreamInfo(e,t,n,r,s,a=!1){const{elementaryStreams:o}=this,u=o[e];if(!u){o[e]={startPTS:t,endPTS:n,startDTS:r,endDTS:s,partial:a};return}u.startPTS=Math.min(u.startPTS,t),u.endPTS=Math.max(u.endPTS,n),u.startDTS=Math.min(u.startDTS,r),u.endDTS=Math.max(u.endDTS,s)}}class ft extends he{constructor(e,t,n,r,s){super(n),this.fragOffset=0,this.duration=0,this.gap=!1,this.independent=!1,this.relurl=void 0,this.fragment=void 0,this.index=void 0,this.duration=e.decimalFloatingPoint("DURATION"),this.gap=e.bool("GAP"),this.independent=e.bool("INDEPENDENT"),this.relurl=e.enumeratedString("URI"),this.fragment=t,this.index=r;const a=e.enumeratedString("BYTERANGE");a&&this.setByteRange(a,s),s&&(this.fragOffset=s.fragOffset+s.duration)}get start(){return this.fragment.start+this.fragOffset}get end(){return this.start+this.duration}get loaded(){const{elementaryStreams:e}=this;return!!(e.audio||e.video||e.audiovideo)}}function Et(i,e){const t=Object.getPrototypeOf(i);if(t){const n=Object.getOwnPropertyDescriptor(t,e);return n||Et(t,e)}}function Ft(i,e){const t=Et(i,e);t&&(t.enumerable=!0,Object.defineProperty(i,e,t))}const Ut=Math.pow(2,32)-1,Se=[].push,Gt={video:1,audio:2,id3:3,text:4};function ht(i){return String.fromCharCode.apply(null,i)}function tn(i,e){const t=i[e]<<8|i[e+1];return t<0?65536+t:t}function dt(i,e){const t=xe(i,e);return t<0?4294967296+t:t}function Je(i,e){let t=dt(i,e);return t*=Math.pow(2,32),t+=dt(i,e+4),t}function xe(i,e){return i[e]<<24|i[e+1]<<16|i[e+2]<<8|i[e+3]}function _e(i){const e=i.byteLength;for(let t=0;t<e;){const n=dt(i,t);if(n>8&&i[t+4]===109&&i[t+5]===111&&i[t+6]===111&&i[t+7]===102)return!0;t=n>1?t+n:e}return!1}function N(i,e){const t=[];if(!e.length)return t;const n=i.byteLength;for(let r=0;r<n;){const s=dt(i,r),a=ht(i.subarray(r+4,r+8)),o=s>1?r+s:n;if(a===e[0])if(e.length===1)t.push(i.subarray(r+8,o));else{const u=N(i.subarray(r+8,o),e.slice(1));u.length&&Se.apply(t,u)}r=o}return t}function Fe(i){const e=[],t=i[0];let n=8;const r=dt(i,n);n+=4;let s=0,a=0;t===0?(s=dt(i,n),a=dt(i,n+4),n+=8):(s=Je(i,n),a=Je(i,n+8),n+=16),n+=2;let o=i.length+a;const u=tn(i,n);n+=2;for(let l=0;l<u;l++){let c=n;const d=dt(i,c);c+=4;const g=d&2147483647;if((d&2147483648)>>>31===1)return j.warn("SIDX has hierarchical references (not supported)"),null;const y=dt(i,c);c+=4,e.push({referenceSize:g,subsegmentDuration:y,info:{duration:y/r,start:o,end:o+g-1}}),o+=g,c+=4,n=c}return{earliestPresentationTime:s,timescale:r,version:t,referencesCount:u,references:e}}function De(i){const e=[],t=N(i,["moov","trak"]);for(let r=0;r<t.length;r++){const s=t[r],a=N(s,["tkhd"])[0];if(a){let o=a[0];const u=dt(a,o===0?12:20),l=N(s,["mdia","mdhd"])[0];if(l){o=l[0];const c=dt(l,o===0?12:20),d=N(s,["mdia","hdlr"])[0];if(d){const g=ht(d.subarray(8,12)),w={soun:Q.AUDIO,vide:Q.VIDEO}[g],y=N(s,["mdia","minf","stbl","stsd"])[0],O=V(y);w?(e[u]={timescale:c,type:w,stsd:O},e[w]=_({timescale:c,id:u},O)):e[u]={timescale:c,type:g,stsd:O}}}}}return N(i,["moov","mvex","trex"]).forEach(r=>{const s=dt(r,4),a=e[s];a&&(a.default={duration:dt(r,12),flags:dt(r,20)})}),e}function V(i){const e=i.subarray(8),t=e.subarray(86),n=ht(e.subarray(4,8));let r=n,s;const a=n==="enca"||n==="encv";if(a){const l=N(e,[n])[0].subarray(n==="enca"?28:78);N(l,["sinf"]).forEach(d=>{const g=N(d,["schm"])[0];if(g){const w=ht(g.subarray(4,8));if(w==="cbcs"||w==="cenc"){const y=N(d,["frma"])[0];y&&(r=ht(y))}}})}const o=r;switch(r){case"avc1":case"avc2":case"avc3":case"avc4":{const u=N(t,["avcC"])[0];u&&u.length>3&&(r+="."+te(u[1])+te(u[2])+te(u[3]),s=T(o==="avc1"?"dva1":"dvav",t));break}case"mp4a":{const u=N(e,[n])[0],l=N(u.subarray(28),["esds"])[0];if(l&&l.length>7){let c=4;if(l[c++]!==3)break;c=ve(l,c),c+=2;const d=l[c++];if(d&128&&(c+=2),d&64&&(c+=l[c++]),l[c++]!==4)break;c=ve(l,c);const g=l[c++];if(g===64)r+="."+te(g);else break;if(c+=12,l[c++]!==5)break;c=ve(l,c);const w=l[c++];let y=(w&248)>>3;y===31&&(y+=1+((w&7)<<3)+((l[c]&224)>>5)),r+="."+y}break}case"hvc1":case"hev1":{const u=N(t,["hvcC"])[0];if(u&&u.length>12){const l=u[1],c=["","A","B","C"][l>>6],d=l&31,g=dt(u,2),w=(l&32)>>5?"H":"L",y=u[12],O=u.subarray(6,12);r+="."+c+d,r+="."+J(g).toString(16).toUpperCase(),r+="."+w+y;let H="";for(let Ae=O.length;Ae--;){const Ee=O[Ae];(Ee||H)&&(H="."+Ee.toString(16).toUpperCase()+H)}r+=H}s=T(o=="hev1"?"dvhe":"dvh1",t);break}case"dvh1":case"dvhe":case"dvav":case"dva1":case"dav1":{r=T(r,t)||r;break}case"vp09":{const u=N(t,["vpcC"])[0];if(u&&u.length>6){const l=u[4],c=u[5],d=u[6]>>4&15;r+="."+$(l)+"."+$(c)+"."+$(d)}break}case"av01":{const u=N(t,["av1C"])[0];if(u&&u.length>2){const l=u[1]>>>5,c=u[1]&31,d=u[2]>>>7?"H":"M",g=(u[2]&64)>>6,w=(u[2]&32)>>5,y=l===2&&g?w?12:10:g?10:8,O=(u[2]&16)>>4,H=(u[2]&8)>>3,Ae=(u[2]&4)>>2,Ee=u[2]&3;r+="."+l+"."+$(c)+d+"."+$(y)+"."+O+"."+H+Ae+Ee+"."+$(1)+"."+$(1)+"."+$(1)+"."+0,s=T("dav1",t)}break}}return{codec:r,encrypted:a,supplemental:s}}function T(i,e){const t=N(e,["dvvC"]),n=t.length?t[0]:N(e,["dvcC"])[0];if(n){const r=n[2]>>1&127,s=n[2]<<5&32|n[3]>>3&31;return i+"."+$(r)+"."+$(s)}}function J(i){let e=0;for(let t=0;t<32;t++)e|=(i>>t&1)<<31-t;return e>>>0}function ve(i,e){const t=e+5;for(;i[e++]&128&&e<t;);return e}function te(i){return("0"+i.toString(16).toUpperCase()).slice(-2)}function $(i){return(i<10?"0":"")+i}function ue(i,e){if(!i||!e)return i;const t=e.keyId;return t&&e.isCommonEncryption&&N(i,["moov","trak"]).forEach(r=>{const a=N(r,["mdia","minf","stbl","stsd"])[0].subarray(8);let o=N(a,["enca"]);const u=o.length>0;u||(o=N(a,["encv"])),o.forEach(l=>{const c=u?l.subarray(28):l.subarray(78);N(c,["sinf"]).forEach(g=>{const w=Ie(g);if(w){const y=w.subarray(8,24);y.some(O=>O!==0)||(j.log(`[eme] Patching keyId in 'enc${u?"a":"v"}>sinf>>tenc' box: ${W.hexDump(y)} -> ${W.hexDump(t)}`),w.set(t,8))}})})}),i}function Ie(i){const e=N(i,["schm"])[0];if(e){const t=ht(e.subarray(4,8));if(t==="cbcs"||t==="cenc")return N(i,["schi","tenc"])[0]}return null}function Ce(i,e,t){const n={},r=N(i,["moof","traf"]);for(let s=0;s<r.length;s++){const a=r[s],o=N(a,["tfhd"])[0],u=dt(o,4),l=e[u];if(!l)continue;const c=n[u]||(n[u]={start:NaN,duration:0,sampleCount:0,timescale:l.timescale,type:l.type}),d=N(a,["tfdt"])[0];if(d){const we=d[0];let Ze=dt(d,4);we===1&&(Ze===Ut?t.warn("[mp4-demuxer]: Ignoring assumed invalid signed 64-bit track fragment decode time"):(Ze*=Ut+1,Ze+=dt(d,8))),P(Ze)&&(!P(c.start)||Ze<c.start)&&(c.start=Ze)}const g=l.default,w=dt(o,0)|(g==null?void 0:g.flags);let y=(g==null?void 0:g.duration)||0;w&8&&(w&2?y=dt(o,12):y=dt(o,8));const O=N(a,["trun"]);let H=c.start||0,Ae=0,Ee=y;for(let we=0;we<O.length;we++){const Ze=O[we],rt=dt(Ze,4),pt=c.sampleCount;c.sampleCount+=rt;const At=Ze[3]&1,wt=Ze[3]&4,_t=Ze[2]&1,ct=Ze[2]&2,fn=Ze[2]&4,Rn=Ze[2]&8;let $n=8,jn=rt;for(At&&($n+=4),wt&&rt&&(!(Ze[$n+1]&1)&&c.keyFrameIndex===void 0&&(c.keyFrameIndex=pt),$n+=4,_t?(Ee=dt(Ze,$n),$n+=4):Ee=y,ct&&($n+=4),Rn&&($n+=4),H+=Ee,Ae+=Ee,jn--);jn--;)_t?(Ee=dt(Ze,$n),$n+=4):Ee=y,ct&&($n+=4),fn&&(Ze[$n+1]&1||c.keyFrameIndex===void 0&&(c.keyFrameIndex=c.sampleCount-(jn+1),c.keyFrameStart=H),$n+=4),Rn&&($n+=4),H+=Ee,Ae+=Ee;!Ae&&y&&(Ae+=y*rt)}c.duration+=Ae}if(!Object.keys(n).some(s=>n[s].duration)){let s=1/0,a=0;const o=N(i,["sidx"]);for(let u=0;u<o.length;u++){const l=Fe(o[u]);if(l!=null&&l.references){s=Math.min(s,l.earliestPresentationTime/l.timescale);const c=l.references.reduce((d,g)=>d+g.info.duration||0,0);a=Math.max(a,c+l.earliestPresentationTime/l.timescale)}}a&&P(a)&&Object.keys(n).forEach(u=>{n[u].duration||(n[u].duration=a*n[u].timescale-n[u].start)})}return n}function ke(i){const e={valid:null,remainder:null},t=N(i,["moof"]);if(t.length<2)return e.remainder=i,e;const n=t[t.length-1];return e.valid=i.slice(0,n.byteOffset-8),e.remainder=i.slice(n.byteOffset-8),e}function Le(i,e){const t=new Uint8Array(i.length+e.length);return t.set(i),t.set(e,i.length),t}function mt(i,e){const t=[],n=e.samples,r=e.timescale,s=e.id;let a=!1;return N(n,["moof"]).map(u=>{const l=u.byteOffset-8;N(u,["traf"]).map(d=>{const g=N(d,["tfdt"]).map(w=>{const y=w[0];let O=dt(w,4);return y===1&&(O*=Math.pow(2,32),O+=dt(w,8)),O/r})[0];return g!==void 0&&(i=g),N(d,["tfhd"]).map(w=>{const y=dt(w,4),O=dt(w,0)&16777215,H=(O&1)!==0,Ae=(O&2)!==0,Ee=(O&8)!==0;let we=0;const Ze=(O&16)!==0;let rt=0;const pt=(O&32)!==0;let At=8;y===s&&(H&&(At+=8),Ae&&(At+=4),Ee&&(we=dt(w,At),At+=4),Ze&&(rt=dt(w,At),At+=4),pt&&(At+=4),e.type==="video"&&(a=je(e.codec)),N(d,["trun"]).map(wt=>{const _t=wt[0],ct=dt(wt,0)&16777215,fn=(ct&1)!==0;let Rn=0;const $n=(ct&4)!==0,jn=(ct&256)!==0;let ir=0;const Gn=(ct&512)!==0;let vr=0;const Hn=(ct&1024)!==0,yr=(ct&2048)!==0;let _r=0;const Zn=dt(wt,4);let Qn=8;fn&&(Rn=dt(wt,Qn),Qn+=4),$n&&(Qn+=4);let Lr=Rn+l;for(let kr=0;kr<Zn;kr++){if(jn?(ir=dt(wt,Qn),Qn+=4):ir=we,Gn?(vr=dt(wt,Qn),Qn+=4):vr=rt,Hn&&(Qn+=4),yr&&(_t===0?_r=dt(wt,Qn):_r=xe(wt,Qn),Qn+=4),e.type===Q.VIDEO){let Qr=0;for(;Qr<vr;){const Nr=dt(n,Lr);if(Lr+=4,qe(a,n[Lr])){const oi=n.subarray(Lr,Lr+Nr);ut(oi,a?2:1,i+_r/r,t)}Lr+=Nr,Qr+=Nr+4}}i+=ir/r}}))})})}),t}function je(i){if(!i)return!1;const e=i.substring(0,4);return e==="hvc1"||e==="hev1"||e==="dvh1"||e==="dvhe"}function qe(i,e){if(i){const t=e>>1&63;return t===39||t===40}else return(e&31)===6}function ut(i,e,t,n){const r=Nt(i);let s=0;s+=e;let a=0,o=0,u=0;for(;s<r.length;){a=0;do{if(s>=r.length)break;u=r[s++],a+=u}while(u===255);o=0;do{if(s>=r.length)break;u=r[s++],o+=u}while(u===255);const l=r.length-s;let c=s;if(o<l)s+=o;else if(o>l){j.error(`Malformed SEI payload. ${o} is too small, only ${l} bytes left to parse.`);break}if(a===4){if(r[c++]===181){const g=tn(r,c);if(c+=2,g===49){const w=dt(r,c);if(c+=4,w===1195456820){const y=r[c++];if(y===3){const O=r[c++],H=31&O,Ae=64&O,Ee=Ae?2+H*3:0,we=new Uint8Array(Ee);if(Ae){we[0]=O;for(let Ze=1;Ze<Ee;Ze++)we[Ze]=r[c++]}n.push({type:y,payloadType:a,pts:t,bytes:we})}}}}}else if(a===5&&o>16){const d=[];for(let y=0;y<16;y++){const O=r[c++].toString(16);d.push(O.length==1?"0"+O:O),(y===3||y===5||y===7||y===9)&&d.push("-")}const g=o-16,w=new Uint8Array(g);for(let y=0;y<g;y++)w[y]=r[c++];n.push({payloadType:a,pts:t,uuid:d.join(""),userData:pe(w),userDataBytes:w})}}}function Nt(i){const e=i.byteLength,t=[];let n=1;for(;n<e-2;)i[n]===0&&i[n+1]===0&&i[n+2]===3?(t.push(n+2),n+=2):n++;if(t.length===0)return i;const r=e-t.length,s=new Uint8Array(r);let a=0;for(n=0;n<r;a++,n++)a===t[0]&&(a++,t.shift()),s[n]=i[a];return s}function It(i){const e=i[0];let t="",n="",r=0,s=0,a=0,o=0,u=0,l=0;if(e===0){for(;ht(i.subarray(l,l+1))!=="\0";)t+=ht(i.subarray(l,l+1)),l+=1;for(t+=ht(i.subarray(l,l+1)),l+=1;ht(i.subarray(l,l+1))!=="\0";)n+=ht(i.subarray(l,l+1)),l+=1;n+=ht(i.subarray(l,l+1)),l+=1,r=dt(i,12),s=dt(i,16),o=dt(i,20),u=dt(i,24),l=28}else if(e===1){l+=4,r=dt(i,l),l+=4;const d=dt(i,l);l+=4;const g=dt(i,l);for(l+=4,a=nc(2,32)*d+g,re(a)||(a=Number.MAX_SAFE_INTEGER,j.warn("Presentation time exceeds safe integer limit and wrapped to max safe integer in parsing emsg box")),o=dt(i,l),l+=4,u=dt(i,l),l+=4;ht(i.subarray(l,l+1))!=="\0";)t+=ht(i.subarray(l,l+1)),l+=1;for(t+=ht(i.subarray(l,l+1)),l+=1;ht(i.subarray(l,l+1))!=="\0";)n+=ht(i.subarray(l,l+1)),l+=1;n+=ht(i.subarray(l,l+1)),l+=1}const c=i.subarray(l,i.byteLength);return{schemeIdUri:t,value:n,timeScale:r,presentationTime:a,presentationTimeDelta:s,eventDuration:o,id:u,payload:c}}function bt(i,...e){const t=e.length;let n=8,r=t;for(;r--;)n+=e[r].byteLength;const s=new Uint8Array(n);for(s[0]=n>>24&255,s[1]=n>>16&255,s[2]=n>>8&255,s[3]=n&255,s.set(i,4),r=0,n=8;r<t;r++)s.set(e[r],n),n+=e[r].byteLength;return s}function on(i,e,t){if(i.byteLength!==16)throw new RangeError("Invalid system id");let n,r;n=0,r=new Uint8Array;let s;n>0?(s=new Uint8Array(4),e.length>0&&new DataView(s.buffer).setUint32(0,e.length,!1)):s=new Uint8Array;const a=new Uint8Array(4);return t&&t.byteLength>0&&new DataView(a.buffer).setUint32(0,t.byteLength,!1),bt([112,115,115,104],new Uint8Array([n,0,0,0]),i,s,r,a,t||new Uint8Array)}const rn=()=>/\(Windows.+Firefox\//i.test(navigator.userAgent),Ct={audio:{a3ds:1,"ac-3":.95,"ac-4":1,alac:.9,alaw:1,dra1:1,"dts+":1,"dts-":1,dtsc:1,dtse:1,dtsh:1,"ec-3":.9,enca:1,fLaC:.9,flac:.9,FLAC:.9,g719:1,g726:1,m4ae:1,mha1:1,mha2:1,mhm1:1,mhm2:1,mlpa:1,mp4a:1,"raw ":1,Opus:1,opus:1,samr:1,sawb:1,sawp:1,sevc:1,sqcp:1,ssmv:1,twos:1,ulaw:1},video:{avc1:1,avc2:1,avc3:1,avc4:1,avcp:1,av01:.8,dav1:.8,drac:1,dva1:1,dvav:1,dvh1:.7,dvhe:.7,encv:1,hev1:.75,hvc1:.75,mjp2:1,mp4v:1,mvc1:1,mvc2:1,mvc3:1,mvc4:1,resv:1,rv60:1,s263:1,svc1:1,svc2:1,"vc-1":1,vp08:1,vp09:.9},text:{stpp:1,wvtt:1}};function gn(i,e){const t=Ct[e];return!!t&&!!t[i.slice(0,4)]}function Ln(i,e,t=!0){return!i.split(",").some(n=>!Mt(n,e,t))}function Mt(i,e,t=!0){var n;const r=Y(t);return(n=r==null?void 0:r.isTypeSupported(hn(i,e)))!=null?n:!1}function hn(i,e){return`${e}/mp4;codecs=${i}`}function We(i){if(i){const e=i.substring(0,4);return Ct.video[e]}return 2}function Qe(i){const e=rn();return i.split(",").reduce((t,n)=>{const s=e&&je(n)?9:Ct.video[n];return s?(s*2+t)/(t?3:2):(Ct.audio[n]+t)/(t?2:1)},0)}const He={};function z(i,e=!0){if(He[i])return He[i];const t={flac:["flac","fLaC","FLAC"],opus:["opus","Opus"],"mp4a.40.34":["mp3"]}[i];for(let r=0;r<t.length;r++){var n;if(Mt(t[r],"audio",e))return He[i]=t[r],t[r];if(t[r]==="mp3"&&(n=Y(e))!=null&&n.isTypeSupported("audio/mpeg"))return""}return i}const le=/flac|opus|mp4a\.40\.34/i;function me(i,e=!0){return i.replace(le,t=>z(t.toLowerCase(),e))}function Be(i,e){const t=[];if(i){const n=i.split(",");for(let r=0;r<n.length;r++)gn(n[r],"video")||t.push(n[r])}return e&&t.push(e),t.join(",")}function be(i,e){if(i&&(i.length>4||["ac-3","ec-3","alac","fLaC","Opus"].indexOf(i)!==-1)&&(Tt(i,"audio")||Tt(i,"video")))return i;if(e){const t=e.split(",");if(t.length>1){if(i){for(let n=t.length;n--;)if(t[n].substring(0,4)===i.substring(0,4))return t[n]}return t[0]}}return e||i}function Tt(i,e){return gn(i,e)&&Mt(i,e)}function Wt(i){const e=i.split(",");for(let t=0;t<e.length;t++){const n=e[t].split(".");n.length>2&&n[0]==="avc1"&&(e[t]=`avc1.${parseInt(n[1]).toString(16)}${("000"+parseInt(n[2]).toString(16)).slice(-4)}`)}return e.join(",")}function an(i){if(i.startsWith("av01.")){const e=i.split("."),t=["0","111","01","01","01","0"];for(let n=e.length;n>4&&n<10;n++)e[n]=t[n-4];return e.join(".")}return i}function _n(i){const e=Y(i)||{isTypeSupported:()=>!1};return{mpeg:e.isTypeSupported("audio/mpeg"),mp3:e.isTypeSupported('audio/mp4; codecs="mp3"'),ac3:e.isTypeSupported('audio/mp4; codecs="ac-3"')}}function Wn(i){return i.replace(/^.+codecs=["']?([^"']+).*$/,"$1")}const zn={supported:!0,configurations:[],decodingInfoResults:[{supported:!0,powerEfficient:!0,smooth:!0}]};function On(i,e){return{supported:!1,configurations:e,decodingInfoResults:[{supported:!1,smooth:!1,powerEfficient:!1}],error:i}}function Un(i,e,t,n,r,s){const a=i.videoCodec,o=i.audioCodec?i.audioGroups:null,u=s==null?void 0:s.audioCodec,l=s==null?void 0:s.channels,c=l?parseInt(l):u?1/0:2;let d=null;if(o!=null&&o.length)try{o.length===1&&o[0]?d=e.groups[o[0]].channels:d=o.reduce((g,w)=>{if(w){const y=e.groups[w];if(!y)throw new Error(`Audio track group ${w} not found`);Object.keys(y.channels).forEach(O=>{g[O]=(g[O]||0)+y.channels[O]})}return g},{2:0})}catch(g){return!0}return a!==void 0&&(a.split(",").some(g=>je(g))||i.width>1920&&i.height>1088||i.height>1920&&i.width>1088||i.frameRate>Math.max(n,30)||i.videoRange!=="SDR"&&i.videoRange!==t||i.bitrate>Math.max(r,8e6))||!!d&&P(c)&&Object.keys(d).some(g=>parseInt(g)>c)}function ar(i,e,t,n={}){const r=i.videoCodec;if(!r&&!i.audioCodec||!t)return Promise.resolve(zn);const s=[],a=mr(i),o=a.length,u=tr(i,e,o>0),l=u.length;for(let c=o||1*l||1;c--;){const d={type:"media-source"};if(o&&(d.video=a[c%o]),l){d.audio=u[c%l];const g=d.audio.bitrate;d.video&&g&&(d.video.bitrate-=g)}s.push(d)}if(r){const c=navigator.userAgent;if(r.split(",").some(d=>je(d))&&rn())return Promise.resolve(On(new Error(`Overriding Windows Firefox HEVC MediaCapabilities result based on user-agent string: (${c})`),s))}return Promise.all(s.map(c=>{const d=Kt(c);return n[d]||(n[d]=t.decodingInfo(c))})).then(c=>({supported:!c.some(d=>!d.supported),configurations:s,decodingInfoResults:c})).catch(c=>({supported:!1,configurations:s,decodingInfoResults:[],error:c}))}function mr(i){var e;const t=(e=i.videoCodec)==null?void 0:e.split(","),n=sn(i),r=i.width||640,s=i.height||480,a=i.frameRate||30,o=i.videoRange.toLowerCase();return t?t.map(u=>{const l={contentType:hn(an(u),"video"),width:r,height:s,bitrate:n,framerate:a};return o!=="sdr"&&(l.transferFunction=o),l}):[]}function tr(i,e,t){var n;const r=(n=i.audioCodec)==null?void 0:n.split(","),s=sn(i);return r&&i.audioGroups?i.audioGroups.reduce((a,o)=>{var u;const l=o?(u=e.groups[o])==null?void 0:u.tracks:null;return l?l.reduce((c,d)=>{if(d.groupId===o){const g=parseFloat(d.channels||"");r.forEach(w=>{const y={contentType:hn(w,"audio"),bitrate:t?gr(w,s):s};g&&(y.channels=""+g),c.push(y)})}return c},a):a},[]):[]}function gr(i,e){if(e<=1)return 1;let t=128e3;return i==="ec-3"?t=768e3:i==="ac-3"&&(t=64e4),Math.min(e/2,t)}function sn(i){return Math.ceil(Math.max(i.bitrate*.9,i.averageBitrate)/1e3)*1e3||1}function Kt(i){let e="";const{audio:t,video:n}=i;if(n){const r=Wn(n.contentType);e+=`${r}_r${n.height}x${n.width}f${Math.ceil(n.framerate)}${n.transferFunction||"sd"}_${Math.ceil(n.bitrate/1e5)}`}if(t){const r=Wn(t.contentType);e+=`${n?"_":""}${r}_c${t.channels}`}return e}const yn=["NONE","TYPE-0","TYPE-1",null];function Yn(i){return yn.indexOf(i)>-1}const or=["SDR","PQ","HLG"];function Ke(i){return!!i&&or.indexOf(i)>-1}var Pe={No:"",Yes:"YES",v2:"v2"};function Yt(i){const{canSkipUntil:e,canSkipDateRanges:t,age:n}=i,r=n<e/2;return e&&r?t?Pe.v2:Pe.Yes:Pe.No}class Lt{constructor(e,t,n){this.msn=void 0,this.part=void 0,this.skip=void 0,this.msn=e,this.part=t,this.skip=n}addDirectives(e){const t=new self.URL(e);return this.msn!==void 0&&t.searchParams.set("_HLS_msn",this.msn.toString()),this.part!==void 0&&t.searchParams.set("_HLS_part",this.part.toString()),this.skip&&t.searchParams.set("_HLS_skip",this.skip),t.href}}class qt{constructor(e){if(this._attrs=void 0,this.audioCodec=void 0,this.bitrate=void 0,this.codecSet=void 0,this.url=void 0,this.frameRate=void 0,this.height=void 0,this.id=void 0,this.name=void 0,this.supplemental=void 0,this.videoCodec=void 0,this.width=void 0,this.details=void 0,this.fragmentError=0,this.loadError=0,this.loaded=void 0,this.realBitrate=0,this.supportedPromise=void 0,this.supportedResult=void 0,this._avgBitrate=0,this._audioGroups=void 0,this._subtitleGroups=void 0,this._urlId=0,this.url=[e.url],this._attrs=[e.attrs],this.bitrate=e.bitrate,e.details&&(this.details=e.details),this.id=e.id||0,this.name=e.name,this.width=e.width||0,this.height=e.height||0,this.frameRate=e.attrs.optionalFloat("FRAME-RATE",0),this._avgBitrate=e.attrs.decimalInteger("AVERAGE-BANDWIDTH"),this.audioCodec=e.audioCodec,this.videoCodec=e.videoCodec,this.codecSet=[e.videoCodec,e.audioCodec].filter(n=>!!n).map(n=>n.substring(0,4)).join(","),"supplemental"in e){var t;this.supplemental=e.supplemental;const n=(t=e.supplemental)==null?void 0:t.videoCodec;n&&n!==e.videoCodec&&(this.codecSet+=`,${n.substring(0,4)}`)}this.addGroupId("audio",e.attrs.AUDIO),this.addGroupId("text",e.attrs.SUBTITLES)}get maxBitrate(){return Math.max(this.realBitrate,this.bitrate)}get averageBitrate(){return this._avgBitrate||this.realBitrate||this.bitrate}get attrs(){return this._attrs[0]}get codecs(){return this.attrs.CODECS||""}get pathwayId(){return this.attrs["PATHWAY-ID"]||"."}get videoRange(){return this.attrs["VIDEO-RANGE"]||"SDR"}get score(){return this.attrs.optionalFloat("SCORE",0)}get uri(){return this.url[0]||""}hasAudioGroup(e){return nn(this._audioGroups,e)}hasSubtitleGroup(e){return nn(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 nn(i,e){return!e||!i?!1:i.indexOf(e)!==-1}function Xt(){if(typeof matchMedia=="function"){const i=matchMedia("(dynamic-range: high)"),e=matchMedia("bad query");if(i.media!==e.media)return i.matches===!0}return!1}function zt(i,e){let t=!1,n=[];if(i&&(t=i!=="SDR",n=[i]),e){n=e.allowedVideoRanges||or.slice(0);const r=n.join("")!=="SDR"&&!e.videoCodec;t=e.preferHDR!==void 0?e.preferHDR:r&&Xt(),t||(n=["SDR"])}return{preferHDR:t,allowedVideoRanges:n}}const pn=i=>{const e=new WeakSet;return(t,n)=>{if(i&&(n=i(t,n)),typeof n=="object"&&n!==null){if(e.has(n))return;e.add(n)}return n}},Ot=(i,e)=>JSON.stringify(i,pn(e));function cn(i,e,t,n,r){const s=Object.keys(i),a=n==null?void 0:n.channels,o=n==null?void 0:n.audioCodec,u=r==null?void 0:r.videoCodec,l=a&&parseInt(a)===2;let c=!1,d=!1,g=1/0,w=1/0,y=1/0,O=1/0,H=0,Ae=[];const{preferHDR:Ee,allowedVideoRanges:we}=zt(e,r);for(let wt=s.length;wt--;){const _t=i[s[wt]];c||(c=_t.channels[2]>0),g=Math.min(g,_t.minHeight),w=Math.min(w,_t.minFramerate),y=Math.min(y,_t.minBitrate),we.filter(fn=>_t.videoRanges[fn]>0).length>0&&(d=!0)}g=P(g)?g:0,w=P(w)?w:0;const Ze=Math.max(1080,g),rt=Math.max(30,w);y=P(y)?y:t,t=Math.max(y,t),d||(e=void 0);const pt=s.length>1;return{codecSet:s.reduce((wt,_t)=>{const ct=i[_t];if(_t===wt)return wt;if(Ae=d?we.filter(fn=>ct.videoRanges[fn]>0):[],pt){if(ct.minBitrate>t)return un(_t,`min bitrate of ${ct.minBitrate} > current estimate of ${t}`),wt;if(!ct.hasDefaultAudio)return un(_t,"no renditions with default or auto-select sound found"),wt;if(o&&_t.indexOf(o.substring(0,4))%5!==0)return un(_t,`audio codec preference "${o}" not found`),wt;if(a&&!l){if(!ct.channels[a])return un(_t,`no renditions with ${a} channel sound found (channels options: ${Object.keys(ct.channels)})`),wt}else if((!o||l)&&c&&ct.channels[2]===0)return un(_t,"no renditions with stereo sound found"),wt;if(ct.minHeight>Ze)return un(_t,`min resolution of ${ct.minHeight} > maximum of ${Ze}`),wt;if(ct.minFramerate>rt)return un(_t,`min framerate of ${ct.minFramerate} > maximum of ${rt}`),wt;if(!Ae.some(fn=>ct.videoRanges[fn]>0))return un(_t,`no variants with VIDEO-RANGE of ${Ot(Ae)} found`),wt;if(u&&_t.indexOf(u.substring(0,4))%5!==0)return un(_t,`video codec preference "${u}" not found`),wt;if(ct.maxScore<H)return un(_t,`max score of ${ct.maxScore} < selected max of ${H}`),wt}return wt&&(Qe(_t)>=Qe(wt)||ct.fragmentError>i[wt].fragmentError)?wt:(O=ct.minIndex,H=ct.maxScore,_t)},void 0),videoRanges:Ae,preferHDR:Ee,minFramerate:w,minBitrate:y,minIndex:O}}function un(i,e){j.log(`[abr] start candidates with "${i}" ignored because ${e}`)}function lt(i){return i.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 Pt(i,e,t,n){return i.slice(t,n+1).reduce((r,s,a)=>{if(!s.codecSet)return r;const o=s.audioGroups;let u=r[s.codecSet];u||(r[s.codecSet]=u={minBitrate:1/0,minHeight:1/0,minFramerate:1/0,minIndex:a,maxScore:0,videoRanges:{SDR:0},channels:{2:0},hasDefaultAudio:!o,fragmentError:0}),u.minBitrate=Math.min(u.minBitrate,s.bitrate);const l=Math.min(s.height,s.width);return u.minHeight=Math.min(u.minHeight,l),u.minFramerate=Math.min(u.minFramerate,s.frameRate),u.minIndex=Math.min(u.minIndex,a),u.maxScore=Math.max(u.maxScore,s.score),u.fragmentError+=s.fragmentError,u.videoRanges[s.videoRange]=(u.videoRanges[s.videoRange]||0)+1,o&&o.forEach(c=>{if(!c)return;const d=e.groups[c];d&&(u.hasDefaultAudio=u.hasDefaultAudio||e.hasDefaultAudio?d.hasDefault:d.hasAutoSelect||!e.hasDefaultAudio&&!e.hasAutoSelectAudio,Object.keys(d.channels).forEach(g=>{u.channels[g]=(u.channels[g]||0)+d.channels[g]}))}),r},{})}function Re(i){if(!i)return i;const{lang:e,assocLang:t,characteristics:n,channels:r,audioCodec:s}=i;return{lang:e,assocLang:t,characteristics:n,channels:r,audioCodec:s}}function Ye(i,e,t){if("attrs"in i){const n=e.indexOf(i);if(n!==-1)return n}for(let n=0;n<e.length;n++){const r=e[n];if(vt(i,r,t))return n}return-1}function vt(i,e,t){const{groupId:n,name:r,lang:s,assocLang:a,default:o}=i,u=i.forced;return(n===void 0||e.groupId===n)&&(r===void 0||e.name===r)&&(s===void 0||xt(s,e.lang))&&(s===void 0||e.assocLang===a)&&(o===void 0||e.default===o)&&(u===void 0||e.forced===u)&&(!("characteristics"in i)||Vt(i.characteristics||"",e.characteristics))&&(t===void 0||t(i,e))}function xt(i,e="--"){return i.length===e.length?i===e:i.startsWith(e)||e.startsWith(i)}function Vt(i,e=""){const t=i.split(","),n=e.split(",");return t.length===n.length&&!t.some(r=>n.indexOf(r)===-1)}function Jt(i,e){const{audioCodec:t,channels:n}=i;return(t===void 0||(e.audioCodec||"").substring(0,4)===t.substring(0,4))&&(n===void 0||n===(e.channels||"2"))}function Zt(i,e,t,n,r){const s=e[n],o=e.reduce((g,w,y)=>{const O=w.uri;return(g[O]||(g[O]=[])).push(y),g},{})[s.uri];o.length>1&&(n=Math.max.apply(Math,o));const u=s.videoRange,l=s.frameRate,c=s.codecSet.substring(0,4),d=vn(e,n,g=>{if(g.videoRange!==u||g.frameRate!==l||g.codecSet.substring(0,4)!==c)return!1;const w=g.audioGroups,y=t.filter(O=>!w||w.indexOf(O.groupId)!==-1);return Ye(i,y,r)>-1});return d>-1?d:vn(e,n,g=>{const w=g.audioGroups,y=t.filter(O=>!w||w.indexOf(O.groupId)!==-1);return Ye(i,y,r)>-1})}function vn(i,e,t){for(let n=e;n>-1;n--)if(t(i[n]))return n;for(let n=e+1;n<i.length;n++)if(t(i[n]))return n;return-1}function Bn(i,e){var t;return!!i&&i!==((t=e.loadLevelObj)==null?void 0:t.uri)}class Dn extends R{constructor(e){super("abr",e.logger),this.hls=void 0,this.lastLevelLoadSec=0,this.lastLoadedFragLevel=-1,this.firstSelection=-1,this._nextAutoLevel=-1,this.nextAutoLevelKey="",this.audioTracksByGroup=null,this.codecTiers=null,this.timer=-1,this.fragCurrent=null,this.partCurrent=null,this.bitrateTestDelay=0,this.rebufferNotice=-1,this.supportedCache={},this.bwEstimator=void 0,this._abandonRulesCheck=t=>{var n;const{fragCurrent:r,partCurrent:s,hls:a}=this,{autoLevelEnabled:o,media:u}=a;if(!r||!u)return;const l=performance.now(),c=s?s.stats:r.stats,d=s?s.duration:r.duration,g=l-c.loading.start,w=a.minAutoLevel,y=r.level,O=this._nextAutoLevel;if(c.aborted||c.loaded&&c.loaded===c.total||y<=w){this.clearTimer(),this._nextAutoLevel=-1;return}if(!o)return;const H=O>-1&&O!==y,Ae=!!t||H;if(!Ae&&(u.paused||!u.playbackRate||!u.readyState))return;const Ee=a.mainForwardBufferInfo;if(!Ae&&Ee===null)return;const we=this.bwEstimator.getEstimateTTFB(),Ze=Math.abs(u.playbackRate);if(g<=Math.max(we,1e3*(d/(Ze*2))))return;const rt=Ee?Ee.len/Ze:0,pt=c.loading.first?c.loading.first-c.loading.start:-1,At=c.loaded&&pt>-1,wt=this.getBwEstimate(),_t=a.levels,ct=_t[y],fn=Math.max(c.loaded,Math.round(d*(r.bitrate||ct.averageBitrate)/8));let Rn=At?g-pt:g;Rn<1&&At&&(Rn=Math.min(g,c.loaded*8/wt));const $n=At?c.loaded*1e3/Rn:0,jn=we/1e3,ir=$n?(fn-c.loaded)/$n:fn*8/wt+jn;if(ir<=rt)return;const Gn=$n?$n*8:wt,vr=((n=(t==null?void 0:t.details)||this.hls.latestLevelDetails)==null?void 0:n.live)===!0,Hn=this.hls.config.abrBandWidthUpFactor;let yr=Number.POSITIVE_INFINITY,_r;for(_r=y-1;_r>w;_r--){const kr=_t[_r].maxBitrate,Qr=!_t[_r].details||vr;if(yr=this.getTimeToLoadFrag(jn,Gn,d*kr,Qr),yr<Math.min(rt,d+jn))break}if(yr>=ir||yr>d*10)return;At?this.bwEstimator.sample(g-Math.min(we,pt),c.loaded):this.bwEstimator.sampleTTFB(g);const Zn=_t[_r].maxBitrate;this.getBwEstimate()*Hn>Zn&&this.resetEstimator(Zn);const Qn=this.findBestLevel(Zn,w,_r,0,rt,1,1);Qn>-1&&(_r=Qn),this.warn(`Fragment ${r.sn}${s?" part "+s.index:""} of level ${y} is loading too slowly;
Fragment duration: ${r.duration.toFixed(3)}
Time to underbuffer: ${rt.toFixed(3)} s
Estimated load time for current fragment: ${ir.toFixed(3)} s
Estimated load time for down switch fragment: ${yr.toFixed(3)} s
TTFB estimate: ${pt|0} ms
Current BW estimate: ${P(wt)?wt|0:"Unknown"} bps
New BW estimate: ${this.getBwEstimate()|0} bps
Switching to level ${_r} @ ${Zn|0} bps`),a.nextLoadLevel=a.nextAutoLevel=_r,this.clearTimer();const Lr=()=>{if(this.clearTimer(),this.fragCurrent===r&&this.hls.loadLevel===_r&&_r>0){const kr=this.getStarvationDelay();if(this.warn(`Aborting inflight request ${_r>0?"and switching down":""}
Fragment duration: ${r.duration.toFixed(3)} s
Time to underbuffer: ${kr.toFixed(3)} s`),r.abortRequests(),this.fragCurrent=this.partCurrent=null,_r>w){let Qr=this.findBestLevel(this.hls.levels[w].bitrate,w,_r,0,kr,1,1);Qr===-1&&(Qr=w),this.hls.nextLoadLevel=this.hls.nextAutoLevel=Qr,this.resetEstimator(this.hls.levels[Qr].bitrate)}}};H||ir>yr*2?Lr():this.timer=self.setInterval(Lr,yr*1e3),a.trigger(f.FRAG_LOAD_EMERGENCY_ABORTED,{frag:r,part:s,stats:c})},this.hls=e,this.bwEstimator=this.initEstimator(),this.registerListeners()}resetEstimator(e){e&&(this.log(`setting initial bwe to ${e}`),this.hls.config.abrEwmaDefaultEstimate=e),this.firstSelection=-1,this.bwEstimator=this.initEstimator()}initEstimator(){const e=this.hls.config;return new E(e.abrEwmaSlowVoD,e.abrEwmaFastVoD,e.abrEwmaDefaultEstimate)}registerListeners(){const{hls:e}=this;e.on(f.MANIFEST_LOADING,this.onManifestLoading,this),e.on(f.FRAG_LOADING,this.onFragLoading,this),e.on(f.FRAG_LOADED,this.onFragLoaded,this),e.on(f.FRAG_BUFFERED,this.onFragBuffered,this),e.on(f.LEVEL_SWITCHING,this.onLevelSwitching,this),e.on(f.LEVEL_LOADED,this.onLevelLoaded,this),e.on(f.LEVELS_UPDATED,this.onLevelsUpdated,this),e.on(f.MAX_AUTO_LEVEL_UPDATED,this.onMaxAutoLevelUpdated,this),e.on(f.ERROR,this.onError,this)}unregisterListeners(){const{hls:e}=this;e&&(e.off(f.MANIFEST_LOADING,this.onManifestLoading,this),e.off(f.FRAG_LOADING,this.onFragLoading,this),e.off(f.FRAG_LOADED,this.onFragLoaded,this),e.off(f.FRAG_BUFFERED,this.onFragBuffered,this),e.off(f.LEVEL_SWITCHING,this.onLevelSwitching,this),e.off(f.LEVEL_LOADED,this.onLevelLoaded,this),e.off(f.LEVELS_UPDATED,this.onLevelsUpdated,this),e.off(f.MAX_AUTO_LEVEL_UPDATED,this.onMaxAutoLevelUpdated,this),e.off(f.ERROR,this.onError,this))}destroy(){this.unregisterListeners(),this.clearTimer(),this.hls=this._abandonRulesCheck=this.supportedCache=null,this.fragCurrent=this.partCurrent=null}onManifestLoading(e,t){this.lastLoadedFragLevel=-1,this.firstSelection=-1,this.lastLevelLoadSec=0,this.supportedCache={},this.fragCurrent=this.partCurrent=null,this.onLevelsUpdated(),this.clearTimer()}onLevelsUpdated(){this.lastLoadedFragLevel>-1&&this.fragCurrent&&(this.lastLoadedFragLevel=this.fragCurrent.level),this._nextAutoLevel=-1,this.onMaxAutoLevelUpdated(),this.codecTiers=null,this.audioTracksByGroup=null}onMaxAutoLevelUpdated(){this.firstSelection=-1,this.nextAutoLevelKey=""}onFragLoading(e,t){const n=t.frag;if(!this.ignoreFragment(n)){if(!n.bitrateTest){var r;this.fragCurrent=n,this.partCurrent=(r=t.part)!=null?r:null}this.clearTimer(),this.timer=self.setInterval(this._abandonRulesCheck,100)}}onLevelSwitching(e,t){this.clearTimer()}onError(e,t){if(!t.fatal)switch(t.details){case U.BUFFER_ADD_CODEC_ERROR:case U.BUFFER_APPEND_ERROR:this.lastLoadedFragLevel=-1,this.firstSelection=-1;break;case U.FRAG_LOAD_TIMEOUT:{const n=t.frag,{fragCurrent:r,partCurrent:s}=this;if(n&&r&&n.sn===r.sn&&n.level===r.level){const a=performance.now(),o=s?s.stats:n.stats,u=a-o.loading.start,l=o.loading.first?o.loading.first-o.loading.start:-1;if(o.loaded&&l>-1){const d=this.bwEstimator.getEstimateTTFB();this.bwEstimator.sample(u-Math.min(d,l),o.loaded)}else this.bwEstimator.sampleTTFB(u)}break}}}getTimeToLoadFrag(e,t,n,r){const s=e+n/t,a=r?e+this.lastLevelLoadSec:0;return s+a}onLevelLoaded(e,t){const n=this.hls.config,{loading:r}=t.stats,s=r.end-r.first;P(s)&&(this.lastLevelLoadSec=s/1e3),t.details.live?this.bwEstimator.update(n.abrEwmaSlowLive,n.abrEwmaFastLive):this.bwEstimator.update(n.abrEwmaSlowVoD,n.abrEwmaFastVoD),this.timer>-1&&this._abandonRulesCheck(t.levelInfo)}onFragLoaded(e,{frag:t,part:n}){const r=n?n.stats:t.stats;if(t.type===ee.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 s=n?n.duration:t.duration,a=this.hls.levels[t.level],o=(a.loaded?a.loaded.bytes:0)+r.loaded,u=(a.loaded?a.loaded.duration:0)+s;a.loaded={bytes:o,duration:u},a.realBitrate=Math.round(8*o/u)}if(t.bitrateTest){const s={stats:r,frag:t,part:n,id:t.type};this.onFragBuffered(f.FRAG_BUFFERED,s),t.bitrateTest=!1}else this.lastLoadedFragLevel=t.level}}onFragBuffered(e,t){const{frag:n,part:r}=t,s=r!=null&&r.stats.loaded?r.stats:n.stats;if(s.aborted||this.ignoreFragment(n))return;const a=s.parsing.end-s.loading.start-Math.min(s.loading.first-s.loading.start,this.bwEstimator.getEstimateTTFB());this.bwEstimator.sample(a,s.loaded),s.bwEstimate=this.getBwEstimate(),n.bitrateTest?this.bitrateTestDelay=a/1e3:this.bitrateTestDelay=0}ignoreFragment(e){return e.type!==ee.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,s=this.findBestLevel(n,t,e,0,r,1,1);if(s>-1)return s;const a=this.hls.firstLevel,o=Math.min(Math.max(a,t),e);return this.warn(`Could not find best starting auto level. Defaulting to first in playlist ${a} 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 s=n&&r?this.getNextABRAutoLevel():this.firstAutoLevel;if(e!==-1){const a=this.hls.levels;if(a.length>Math.max(e,s)&&a[e].loadError<=a[s].loadError)return e}return this._nextAutoLevel=s,this.nextAutoLevelKey=this.getAutoLevelKey(),s}getAutoLevelKey(){return`${this.getBwEstimate()}_${this.getStarvationDelay().toFixed(2)}`}getNextABRAutoLevel(){const{fragCurrent:e,partCurrent:t,hls:n}=this;if(n.levels.length<=1)return n.loadLevel;const{maxAutoLevel:r,config:s,minAutoLevel:a}=n,o=t?t.duration:e?e.duration:0,u=this.getBwEstimate(),l=this.getStarvationDelay();let c=s.abrBandWidthFactor,d=s.abrBandWidthUpFactor;if(l){const H=this.findBestLevel(u,a,r,l,0,c,d);if(H>=0)return this.rebufferNotice=-1,H}let g=o?Math.min(o,s.maxStarvationDelay):s.maxStarvationDelay;if(!l){const H=this.bitrateTestDelay;H&&(g=(o?Math.min(o,s.maxLoadingDelay):s.maxLoadingDelay)-H,this.info(`bitrate test took ${Math.round(1e3*H)}ms, set first fragment max fetchDuration to ${Math.round(1e3*g)} ms`),c=d=1)}const w=this.findBestLevel(u,a,r,l,g,c,d);if(this.rebufferNotice!==w&&(this.rebufferNotice=w,this.info(`${l?"rebuffering expected":"buffer is empty"}, optimal quality level ${w}`)),w>-1)return w;const y=n.levels[a],O=n.loadLevelObj;return O&&(y==null?void 0:y.bitrate)<O.bitrate?a: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,s,a,o){var u;const l=r+s,c=this.lastLoadedFragLevel,d=c===-1?this.hls.firstLevel:c,{fragCurrent:g,partCurrent:w}=this,{levels:y,allAudioTracks:O,loadLevel:H,config:Ae}=this.hls;if(y.length===1)return 0;const Ee=y[d],we=!!((u=this.hls.latestLevelDetails)!=null&&u.live),Ze=H===-1||c===-1;let rt,pt="SDR",At=(Ee==null?void 0:Ee.frameRate)||0;const{audioPreference:wt,videoPreference:_t}=Ae,ct=this.audioTracksByGroup||(this.audioTracksByGroup=lt(O));let fn=-1;if(Ze){if(this.firstSelection!==-1)return this.firstSelection;const vr=this.codecTiers||(this.codecTiers=Pt(y,ct,t,n)),Hn=cn(vr,pt,e,wt,_t),{codecSet:yr,videoRanges:_r,minFramerate:Zn,minBitrate:Qn,minIndex:Lr,preferHDR:kr}=Hn;fn=Lr,rt=yr,pt=kr?_r[_r.length-1]:_r[0],At=Zn,e=Math.max(e,Qn),this.log(`picked start tier ${Ot(Hn)}`)}else rt=Ee==null?void 0:Ee.codecSet,pt=Ee==null?void 0:Ee.videoRange;const Rn=w?w.duration:g?g.duration:0,$n=this.bwEstimator.getEstimateTTFB()/1e3,jn=[];for(let vr=n;vr>=t;vr--){var ir,Gn;const Hn=y[vr],yr=vr>d;if(!Hn)continue;if(Ae.useMediaCapabilities&&!Hn.supportedResult&&!Hn.supportedPromise){const Nr=navigator.mediaCapabilities;typeof(Nr==null?void 0:Nr.decodingInfo)=="function"&&Un(Hn,ct,pt,At,e,wt)?(Hn.supportedPromise=ar(Hn,ct,Nr,this.supportedCache),Hn.supportedPromise.then(oi=>{if(!this.hls)return;Hn.supportedResult=oi;const as=this.hls.levels,Pi=as.indexOf(Hn);oi.error?this.warn(`MediaCapabilities decodingInfo error: "${oi.error}" for level ${Pi} ${Ot(oi)}`):oi.supported?oi.decodingInfoResults.some(os=>os.smooth===!1||os.powerEfficient===!1)&&this.log(`MediaCapabilities decodingInfo for level ${Pi} not smooth or powerEfficient: ${Ot(oi)}`):(this.warn(`Unsupported MediaCapabilities decodingInfo result for level ${Pi} ${Ot(oi)}`),Pi>-1&&as.length>1&&(this.log(`Removing unsupported level ${Pi}`),this.hls.removeLevel(Pi),this.hls.loadLevel===-1&&(this.hls.nextLoadLevel=0)))})):Hn.supportedResult=zn}if((rt&&Hn.codecSet!==rt||pt&&Hn.videoRange!==pt||yr&&At>Hn.frameRate||!yr&&At>0&&At<Hn.frameRate||(ir=Hn.supportedResult)!=null&&(Gn=ir.decodingInfoResults)!=null&&Gn.some(Nr=>Nr.smooth===!1))&&(!Ze||vr!==fn)){jn.push(vr);continue}const _r=Hn.details,Zn=(w?_r==null?void 0:_r.partTarget:_r==null?void 0:_r.averagetargetduration)||Rn;let Qn;yr?Qn=o*e:Qn=a*e;const Lr=Rn&&r>=Rn*2&&s===0?Hn.averageBitrate:Hn.maxBitrate,kr=this.getTimeToLoadFrag($n,Qn,Lr*Zn,_r===void 0);if(Qn>=Lr&&(vr===c||Hn.loadError===0&&Hn.fragmentError===0)&&(kr<=$n||!P(kr)||we&&!this.bitrateTestDelay||kr<l)){const Nr=this.forcedAutoLevel;return vr!==H&&(Nr===-1||Nr!==H)&&(jn.length&&this.trace(`Skipped level(s) ${jn.join(",")} of ${n} max with CODECS and VIDEO-RANGE:"${y[jn[0]].codecs}" ${y[jn[0]].videoRange}; not compatible with "${rt}" ${pt}`),this.info(`switch candidate:${d}->${vr} adjustedbw(${Math.round(Qn)})-bitrate=${Math.round(Qn-Lr)} ttfb:${$n.toFixed(1)} avgDuration:${Zn.toFixed(1)} maxFetchDuration:${l.toFixed(1)} fetchDuration:${kr.toFixed(1)} firstSelection:${Ze} codecSet:${Hn.codecSet} videoRange:${Hn.videoRange} hls.loadLevel:${H}`)),Ze&&(this.firstSelection=vr),vr}}return-1}set nextAutoLevel(e){const t=this.deriveNextAutoLevel(e);this._nextAutoLevel!==t&&(this.nextAutoLevelKey="",this._nextAutoLevel=t)}deriveNextAutoLevel(e){const{maxAutoLevel:t,minAutoLevel:n}=this.hls;return Math.min(Math.max(e,n),t)}}const st={search:function(i,e){let t=0,n=i.length-1,r=null,s=null;for(;t<=n;){r=(t+n)/2|0,s=i[r];const a=e(s);if(a>0)t=r+1;else if(a<0)n=r-1;else return s}return null}};function En(i,e,t){if(e===null||!Array.isArray(i)||!i.length||!P(e))return null;const n=i[0].programDateTime;if(e<(n||0))return null;const r=i[i.length-1].endProgramDateTime;if(e>=(r||0))return null;for(let s=0;s<i.length;++s){const a=i[s];if(ce(e,t,a))return a}return null}function mn(i,e,t=0,n=0,r=.005){let s=null;if(i){s=e[1+i.sn-e[0].sn]||null;const o=i.endDTS-t;o>0&&o<15e-7&&(t+=15e-7),s&&i.level!==s.level&&s.end<=i.end&&(s=e[2+i.sn-e[0].sn]||null)}else t===0&&e[0].start===0&&(s=e[0]);if(s&&((!i||i.level===s.level)&&k(t,n,s)===0||L(s,i,Math.min(r,n))))return s;const a=st.search(e,k.bind(null,t,n));return a&&(a!==i||!s)?a:s}function L(i,e,t){if(e&&e.start===0&&e.level<i.level&&(e.endPTS||0)>0){const n=e.tagList.reduce((r,s)=>(s[0]==="INF"&&(r+=parseFloat(s[1])),r),t);return i.start<=n}return!1}function k(i=0,e=0,t){if(t.start<=i&&t.start+t.duration>i)return 0;const n=Math.min(e,t.duration+(t.deltaPTS?t.deltaPTS:0));return t.start+t.duration-n<=i?1:t.start-n>i&&t.start?-1:0}function ce(i,e,t){const n=Math.min(e,t.duration+(t.deltaPTS?t.deltaPTS:0))*1e3;return(t.endProgramDateTime||0)-n>i}function ye(i,e,t){if(i&&i.startCC<=e&&i.endCC>=e){let n=i.fragments;const{fragmentHint:r}=i;r&&(n=n.concat(r));let s;return st.search(n,a=>a.cc<e?1:a.cc>e?-1:(s=a,a.end<=t?1:a.start>t?-1:0)),s||null}return null}function Ge(i){switch(i.details){case U.FRAG_LOAD_TIMEOUT:case U.KEY_LOAD_TIMEOUT:case U.LEVEL_LOAD_TIMEOUT:case U.MANIFEST_LOAD_TIMEOUT:return!0}return!1}function $e(i,e){const t=Ge(e);return i.default[`${t?"timeout":"error"}Retry`]}function gt(i,e){const t=i.backoff==="linear"?1:Math.pow(2,e);return Math.min(t*i.retryDelayMs,i.maxRetryDelayMs)}function Bt(i){return _(_({},i),{errorRetry:null,timeoutRetry:null})}function Ht(i,e,t,n){if(!i)return!1;const r=n==null?void 0:n.code,s=e<i.maxNumRetry&&(kt(r)||!!t);return i.shouldRetry?i.shouldRetry(i,e,t,n,s):s}function kt(i){return i===0&&navigator.onLine===!1||!!i&&(i<400||i>499)}var St={DoNothing:0,SendEndCallback:1,SendAlternateToPenaltyBox:2,RemoveAlternatePermanently:3,InsertDiscontinuity:4,RetryRequest:5},$t={None:0,MoveAllAlternatesMatchingHost:1,MoveAllAlternatesMatchingHDCP:2,SwitchToSDR:4};class oe extends R{constructor(e){super("error-controller",e.logger),this.hls=void 0,this.playlistError=0,this.penalizedRenditions={},this.hls=e,this.registerListeners()}registerListeners(){const e=this.hls;e.on(f.ERROR,this.onError,this),e.on(f.MANIFEST_LOADING,this.onManifestLoading,this),e.on(f.LEVEL_UPDATED,this.onLevelUpdated,this)}unregisterListeners(){const e=this.hls;e&&(e.off(f.ERROR,this.onError,this),e.off(f.ERROR,this.onErrorOut,this),e.off(f.MANIFEST_LOADING,this.onManifestLoading,this),e.off(f.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)===ee.MAIN?e.level:this.hls.loadLevel}onManifestLoading(){this.playlistError=0,this.penalizedRenditions={}}onLevelUpdated(){this.playlistError=0}onError(e,t){var n;if(t.fatal)return;const r=this.hls,s=t.context;switch(t.details){case U.FRAG_LOAD_ERROR:case U.FRAG_LOAD_TIMEOUT:case U.KEY_LOAD_ERROR:case U.KEY_LOAD_TIMEOUT:t.errorAction=this.getFragRetryOrSwitchAction(t);return;case U.FRAG_PARSING_ERROR:if((n=t.frag)!=null&&n.gap){t.errorAction=Ve();return}case U.FRAG_GAP:case U.FRAG_DECRYPT_ERROR:{t.errorAction=this.getFragRetryOrSwitchAction(t),t.errorAction.action=St.SendAlternateToPenaltyBox;return}case U.LEVEL_EMPTY_ERROR:case U.LEVEL_PARSING_ERROR:{var a,o;const l=t.parent===ee.MAIN?t.level:r.loadLevel;t.details===U.LEVEL_EMPTY_ERROR&&((a=t.context)!=null&&(o=a.levelDetails)!=null&&o.live)?t.errorAction=this.getPlaylistRetryOrSwitchAction(t,l):(t.levelRetry=!1,t.errorAction=this.getLevelSwitchAction(t,l))}return;case U.LEVEL_LOAD_ERROR:case U.LEVEL_LOAD_TIMEOUT:typeof(s==null?void 0:s.level)=="number"&&(t.errorAction=this.getPlaylistRetryOrSwitchAction(t,s.level));return;case U.AUDIO_TRACK_LOAD_ERROR:case U.AUDIO_TRACK_LOAD_TIMEOUT:case U.SUBTITLE_LOAD_ERROR:case U.SUBTITLE_TRACK_LOAD_TIMEOUT:if(s){const l=r.loadLevelObj;if(l&&(s.type===fe.AUDIO_TRACK&&l.hasAudioGroup(s.groupId)||s.type===fe.SUBTITLE_TRACK&&l.hasSubtitleGroup(s.groupId))){t.errorAction=this.getPlaylistRetryOrSwitchAction(t,r.loadLevel),t.errorAction.action=St.SendAlternateToPenaltyBox,t.errorAction.flags=$t.MoveAllAlternatesMatchingHost;return}}return;case U.KEY_SYSTEM_STATUS_OUTPUT_RESTRICTED:{const l=r.loadLevelObj,c=l==null?void 0:l.attrs["HDCP-LEVEL"];c?t.errorAction={action:St.SendAlternateToPenaltyBox,flags:$t.MoveAllAlternatesMatchingHDCP,hdcpLevel:c}:this.keySystemError(t)}return;case U.BUFFER_ADD_CODEC_ERROR:case U.REMUX_ALLOC_ERROR:case U.BUFFER_APPEND_ERROR:if(!t.errorAction){var u;t.errorAction=this.getLevelSwitchAction(t,(u=t.level)!=null?u:r.loadLevel)}return;case U.INTERNAL_EXCEPTION:case U.BUFFER_APPENDING_ERROR:case U.BUFFER_FULL_ERROR:case U.LEVEL_SWITCH_ERROR:case U.BUFFER_STALLED_ERROR:case U.BUFFER_SEEK_OVER_HOLE:case U.BUFFER_NUDGE_ON_STALL:t.errorAction=Ve();return}t.type===se.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=$e(n.config.playlistLoadPolicy,e),s=this.playlistError++;if(Ht(r,s,Ge(e),e.response))return{action:St.RetryRequest,flags:$t.None,retryConfig:r,retryCount:s};const o=this.getLevelSwitchAction(e,t);return r&&(o.retryConfig=r,o.retryCount=s),o}getFragRetryOrSwitchAction(e){const t=this.hls,n=this.getVariantLevelIndex(e.frag),r=t.levels[n],{fragLoadPolicy:s,keyLoadPolicy:a}=t.config,o=$e(e.details.startsWith("key")?a:s,e),u=t.levels.reduce((c,d)=>c+d.fragmentError,0);if(r&&(e.details!==U.FRAG_GAP&&r.fragmentError++,Ht(o,u,Ge(e),e.response)))return{action:St.RetryRequest,flags:$t.None,retryConfig:o,retryCount:u};const l=this.getLevelSwitchAction(e,n);return o&&(l.retryConfig=o,l.retryCount=u),l}getLevelSwitchAction(e,t){const n=this.hls;t==null&&(t=n.loadLevel);const r=this.hls.levels[t];if(r){var s,a;const l=e.details;r.loadError++,l===U.BUFFER_APPEND_ERROR&&r.fragmentError++;let c=-1;const{levels:d,loadLevel:g,minAutoLevel:w,maxAutoLevel:y}=n;!n.autoLevelEnabled&&!n.config.preserveManualLevelOnError&&(n.loadLevel=-1);const O=(s=e.frag)==null?void 0:s.type,Ae=(O===ee.AUDIO&&l===U.FRAG_PARSING_ERROR||e.sourceBufferName==="audio"&&(l===U.BUFFER_ADD_CODEC_ERROR||l===U.BUFFER_APPEND_ERROR))&&d.some(({audioCodec:pt})=>r.audioCodec!==pt),we=e.sourceBufferName==="video"&&(l===U.BUFFER_ADD_CODEC_ERROR||l===U.BUFFER_APPEND_ERROR)&&d.some(({codecSet:pt,audioCodec:At})=>r.codecSet!==pt&&r.audioCodec===At),{type:Ze,groupId:rt}=(a=e.context)!=null?a:{};for(let pt=d.length;pt--;){const At=(pt+g)%d.length;if(At!==g&&At>=w&&At<=y&&d[At].loadError===0){var o,u;const wt=d[At];if(l===U.FRAG_GAP&&O===ee.MAIN&&e.frag){const _t=d[At].details;if(_t){const ct=mn(e.frag,_t.fragments,e.frag.start);if(ct!=null&&ct.gap)continue}}else{if(Ze===fe.AUDIO_TRACK&&wt.hasAudioGroup(rt)||Ze===fe.SUBTITLE_TRACK&&wt.hasSubtitleGroup(rt))continue;if(O===ee.AUDIO&&(o=r.audioGroups)!=null&&o.some(_t=>wt.hasAudioGroup(_t))||O===ee.SUBTITLE&&(u=r.subtitleGroups)!=null&&u.some(_t=>wt.hasSubtitleGroup(_t))||Ae&&r.audioCodec===wt.audioCodec||!Ae&&r.audioCodec!==wt.audioCodec||we&&r.codecSet===wt.codecSet)continue}c=At;break}}if(c>-1&&n.loadLevel!==c)return e.levelRetry=!0,this.playlistError=0,{action:St.SendAlternateToPenaltyBox,flags:$t.None,nextAutoLevel:c}}return{action:St.SendAlternateToPenaltyBox,flags:$t.MoveAllAlternatesMatchingHost}}onErrorOut(e,t){var n;switch((n=t.errorAction)==null?void 0:n.action){case St.DoNothing:break;case St.SendAlternateToPenaltyBox:this.sendAlternateToPenaltyBox(t),!t.errorAction.resolved&&t.details!==U.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 St.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:s,nextAutoLevel:a}=n;switch(r){case $t.None:this.switchLevel(e,a);break;case $t.MoveAllAlternatesMatchingHDCP:s&&(t.maxHdcpLevel=yn[yn.indexOf(s)-1],n.resolved=!0),this.warn(`Restricting playback to HDCP-LEVEL of "${t.maxHdcpLevel}" or lower`);break}n.resolved||this.switchLevel(e,a)}switchLevel(e,t){if(t!==void 0&&e.errorAction&&(this.warn(`switching to level ${t} after ${e.details}`),this.hls.nextAutoLevel=t,e.errorAction.resolved=!0,this.hls.nextLoadLevel=this.hls.nextAutoLevel,e.details===U.BUFFER_ADD_CODEC_ERROR&&e.mimeType&&e.sourceBufferName!=="audiovideo")){const n=Wn(e.mimeType),r=this.hls.levels;for(let s=r.length;s--;)r[s][`${e.sourceBufferName}Codec`]===n&&this.hls.removeLevel(s)}}}function Ve(i){const e={action:St.DoNothing,flags:$t.None};return i&&(e.resolved=!0),e}var Te={NOT_LOADED:"NOT_LOADED",APPENDING:"APPENDING",PARTIAL:"PARTIAL",OK:"OK"};class Me{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(f.MANIFEST_LOADING,this.onManifestLoading,this),e.on(f.BUFFER_APPENDED,this.onBufferAppended,this),e.on(f.FRAG_BUFFERED,this.onFragBuffered,this),e.on(f.FRAG_LOADED,this.onFragLoaded,this)}_unregisterListeners(){const{hls:e}=this;e.off(f.MANIFEST_LOADING,this.onManifestLoading,this),e.off(f.BUFFER_APPENDED,this.onBufferAppended,this),e.off(f.FRAG_BUFFERED,this.onFragBuffered,this),e.off(f.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 s=n[r];if(!s)break;const a=s.end;if(s.start<=e&&a!==null&&e<=a)return s}return this.getBufferedFrag(e,t)}getBufferedFrag(e,t){return this.getFragAtPos(e,t,!0)}getFragAtPos(e,t,n){const{fragments:r}=this,s=Object.keys(r);for(let a=s.length;a--;){const o=r[s[a]];if((o==null?void 0:o.body.type)===t&&(!n||o.buffered)){const u=o.body;if(u.start<=e&&e<=u.end)return u}}return null}detectEvictedFragments(e,t,n,r,s){this.timeRanges&&(this.timeRanges[e]=t);const a=(r==null?void 0:r.fragment.sn)||-1;Object.keys(this.fragments).forEach(o=>{const u=this.fragments[o];if(!u||a>=u.body.sn)return;if(!u.buffered&&(!u.loaded||s)){u.body.type===n&&this.removeFragment(u.body);return}const l=u.range[e];if(l){if(l.time.length===0){this.removeFragment(u.body);return}l.time.some(c=>{const d=!this.isTimeBuffered(c.startPTS,c.endPTS,t);return d&&this.removeFragment(u.body),d})}})}detectPartialFragments(e){const t=this.timeRanges;if(!t||e.frag.sn==="initSegment")return;const n=e.frag,r=at(n),s=this.fragments[r];if(!s||s.buffered&&n.gap)return;const a=!n.relurl;Object.keys(t).forEach(o=>{const u=n.elementaryStreams[o];if(!u)return;const l=t[o],c=a||u.partial===!0;s.range[o]=this.getBufferedTimes(n,e.part,c,l)}),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),ze(s)||this.removeParts(n.sn-1,n.type)):this.removeFragment(s.body)}removeParts(e,t){const n=this.activePartLists[t];n&&(this.activePartLists[t]=Dt(n,r=>r.fragment.sn>=e))}fragBuffered(e,t){const n=at(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 s={time:[],partial:n},a=e.start,o=e.end,u=e.minEndPTS||o,l=e.maxStartPTS||a;for(let c=0;c<r.length;c++){const d=r.start(c)-this.bufferPadding,g=r.end(c)+this.bufferPadding;if(l>=d&&u<=g){s.time.push({startPTS:Math.max(a,r.start(c)),endPTS:Math.min(o,r.end(c))});break}else if(a<g&&o>d){const w=Math.max(a,r.start(c)),y=Math.min(o,r.end(c));y>w&&(s.partial=!0,s.time.push({startPTS:w,endPTS:y}))}else if(o<=d)break}return s}getPartialFragment(e){let t=null,n,r,s,a=0;const{bufferPadding:o,fragments:u}=this;return Object.keys(u).forEach(l=>{const c=u[l];c&&ze(c)&&(r=c.body.start-o,s=c.body.end+o,e>=r&&e<=s&&(n=Math.min(e-r,s-e),a<=n&&(t=c.body,a=n)))}),t}isEndListAppended(e){const t=this.endListFragments[e];return t!==void 0&&(t.buffered||ze(t))}getState(e){const t=at(e),n=this.fragments[t];return n?n.buffered?ze(n)?Te.PARTIAL:Te.OK:Te.APPENDING:Te.NOT_LOADED}isTimeBuffered(e,t,n){let r,s;for(let a=0;a<n.length;a++){if(r=n.start(a)-this.bufferPadding,s=n.end(a)+this.bufferPadding,e>=r&&t<=s)return!0;if(t<=r)return!1}return!1}onManifestLoading(){this.removeAllFragments()}onFragLoaded(e,t){if(t.frag.sn==="initSegment"||t.frag.bitrateTest)return;const n=t.frag,r=t.part?null:t,s=at(n);this.fragments[s]={body:n,appendedPTS:null,loaded:r,buffered:!1,range:Object.create(null)}}onBufferAppended(e,t){const{frag:n,part:r,timeRanges:s,type:a}=t;if(n.sn==="initSegment")return;const o=n.type;if(r){let l=this.activePartLists[o];l||(this.activePartLists[o]=l=[]),l.push(r)}this.timeRanges=s;const u=s[a];this.detectEvictedFragments(a,u,o,r)}onFragBuffered(e,t){this.detectPartialFragments(t)}hasFragment(e){const t=at(e);return!!this.fragments[t]}hasFragments(e){const{fragments:t}=this,n=Object.keys(t);if(!e)return n.length>0;for(let r=n.length;r--;){const s=t[n[r]];if((s==null?void 0:s.body.type)===e)return!0}return!1}hasParts(e){var t;return!!((t=this.activePartLists[e])!=null&&t.length)}removeFragmentsInRange(e,t,n,r,s){r&&!this.hasGaps||Object.keys(this.fragments).forEach(a=>{const o=this.fragments[a];if(!o)return;const u=o.body;u.type!==n||r&&!u.gap||u.start<t&&u.end>e&&(o.buffered||s)&&this.removeFragment(u)})}removeFragment(e){const t=at(e);e.clearElementaryStreamInfo();const n=this.activePartLists[e.type];if(n){const r=e.sn;this.activePartLists[e.type]=Dt(n,s=>s.fragment.sn!==r)}delete this.fragments[t],e.endList&&delete this.endListFragments[e.type]}removeAllFragments(){var e,t;this.fragments=Object.create(null),this.endListFragments=Object.create(null),this.activePartLists=Object.create(null),this.hasGaps=!1;const n=(e=this.hls)==null||(t=e.latestLevelDetails)==null?void 0:t.partList;n&&n.forEach(r=>r.clearElementaryStreamInfo())}}function ze(i){var e,t,n;return i.buffered&&(i.body.gap||((e=i.range.video)==null?void 0:e.partial)||((t=i.range.audio)==null?void 0:t.partial)||((n=i.range.audiovideo)==null?void 0:n.partial))}function at(i){return`${i.type}_${i.level}_${i.sn}`}function Dt(i,e){return i.filter(t=>{const n=e(t);return n||t.clearElementaryStreamInfo(),n})}var yt={cbc:0,ctr:1};class it{constructor(e,t,n){this.subtle=void 0,this.aesIV=void 0,this.aesMode=void 0,this.subtle=e,this.aesIV=t,this.aesMode=n}decrypt(e,t){switch(this.aesMode){case yt.cbc:return this.subtle.decrypt({name:"AES-CBC",iv:this.aesIV},t,e);case yt.ctr:return this.subtle.decrypt({name:"AES-CTR",counter:this.aesIV,length:64},t,e);default:throw new Error(`[AESCrypto] invalid aes mode ${this.aesMode}`)}}}function Ne(i){const e=i.byteLength,t=e&&new DataView(i.buffer).getUint8(e-1);return t?i.slice(0,e-t):i}class Xe{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],s=n[1],a=n[2],o=n[3],u=this.invSubMix,l=u[0],c=u[1],d=u[2],g=u[3],w=new Uint32Array(256);let y=0,O=0,H=0;for(H=0;H<256;H++)H<128?w[H]=H<<1:w[H]=H<<1^283;for(H=0;H<256;H++){let Ae=O^O<<1^O<<2^O<<3^O<<4;Ae=Ae>>>8^Ae&255^99,e[y]=Ae,t[Ae]=y;const Ee=w[y],we=w[Ee],Ze=w[we];let rt=w[Ae]*257^Ae*16843008;r[y]=rt<<24|rt>>>8,s[y]=rt<<16|rt>>>16,a[y]=rt<<8|rt>>>24,o[y]=rt,rt=Ze*16843009^we*65537^Ee*257^y*16843008,l[Ae]=rt<<24|rt>>>8,c[Ae]=rt<<16|rt>>>16,d[Ae]=rt<<8|rt>>>24,g[Ae]=rt,y?(y=Ee^w[w[w[Ze^Ee]]],O^=w[w[O]]):y=O=1}}expandKey(e){const t=this.uint8ArrayToUint32Array_(e);let n=!0,r=0;for(;r<t.length&&n;)n=t[r]===this.key[r],r++;if(n)return;this.key=t;const s=this.keySize=t.length;if(s!==4&&s!==6&&s!==8)throw new Error("Invalid aes key size="+s);const a=this.ksRows=(s+6+1)*4;let o,u;const l=this.keySchedule=new Uint32Array(a),c=this.invKeySchedule=new Uint32Array(a),d=this.sBox,g=this.rcon,w=this.invSubMix,y=w[0],O=w[1],H=w[2],Ae=w[3];let Ee,we;for(o=0;o<a;o++){if(o<s){Ee=l[o]=t[o];continue}we=Ee,o%s===0?(we=we<<8|we>>>24,we=d[we>>>24]<<24|d[we>>>16&255]<<16|d[we>>>8&255]<<8|d[we&255],we^=g[o/s|0]<<24):s>6&&o%s===4&&(we=d[we>>>24]<<24|d[we>>>16&255]<<16|d[we>>>8&255]<<8|d[we&255]),l[o]=Ee=(l[o-s]^we)>>>0}for(u=0;u<a;u++)o=a-u,u&3?we=l[o]:we=l[o-4],u<4||o<=4?c[u]=we:c[u]=y[d[we>>>24]]^O[d[we>>>16&255]]^H[d[we>>>8&255]]^Ae[d[we&255]],c[u]=c[u]>>>0}networkToHostOrderSwap(e){return e<<24|(e&65280)<<8|(e&16711680)>>8|e>>>24}decrypt(e,t,n){const r=this.keySize+6,s=this.invKeySchedule,a=this.invSBox,o=this.invSubMix,u=o[0],l=o[1],c=o[2],d=o[3],g=this.uint8ArrayToUint32Array_(n);let w=g[0],y=g[1],O=g[2],H=g[3];const Ae=new Int32Array(e),Ee=new Int32Array(Ae.length);let we,Ze,rt,pt,At,wt,_t,ct,fn,Rn,$n,jn,ir,Gn;const vr=this.networkToHostOrderSwap;for(;t<Ae.length;){for(fn=vr(Ae[t]),Rn=vr(Ae[t+1]),$n=vr(Ae[t+2]),jn=vr(Ae[t+3]),At=fn^s[0],wt=jn^s[1],_t=$n^s[2],ct=Rn^s[3],ir=4,Gn=1;Gn<r;Gn++)we=u[At>>>24]^l[wt>>16&255]^c[_t>>8&255]^d[ct&255]^s[ir],Ze=u[wt>>>24]^l[_t>>16&255]^c[ct>>8&255]^d[At&255]^s[ir+1],rt=u[_t>>>24]^l[ct>>16&255]^c[At>>8&255]^d[wt&255]^s[ir+2],pt=u[ct>>>24]^l[At>>16&255]^c[wt>>8&255]^d[_t&255]^s[ir+3],At=we,wt=Ze,_t=rt,ct=pt,ir=ir+4;we=a[At>>>24]<<24^a[wt>>16&255]<<16^a[_t>>8&255]<<8^a[ct&255]^s[ir],Ze=a[wt>>>24]<<24^a[_t>>16&255]<<16^a[ct>>8&255]<<8^a[At&255]^s[ir+1],rt=a[_t>>>24]<<24^a[ct>>16&255]<<16^a[At>>8&255]<<8^a[wt&255]^s[ir+2],pt=a[ct>>>24]<<24^a[At>>16&255]<<16^a[wt>>8&255]<<8^a[_t&255]^s[ir+3],Ee[t]=vr(we^w),Ee[t+1]=vr(pt^y),Ee[t+2]=vr(rt^O),Ee[t+3]=vr(Ze^H),w=fn,y=Rn,O=$n,H=jn,t=t+4}return Ee.buffer}}class nt{constructor(e,t,n){this.subtle=void 0,this.key=void 0,this.aesMode=void 0,this.subtle=e,this.key=t,this.aesMode=n}expandKey(){const e=et(this.aesMode);return this.subtle.importKey("raw",this.key,{name:e},!1,["encrypt","decrypt"])}}function et(i){switch(i){case yt.cbc:return"AES-CBC";case yt.ctr:return"AES-CTR";default:throw new Error(`[FastAESKey] invalid aes mode ${i}`)}}const ot=16;class Qt{constructor(e,{removePKCS7Padding:t=!0}={}){if(this.logEnabled=!0,this.removePKCS7Padding=void 0,this.subtle=null,this.softwareDecrypter=null,this.key=null,this.fastAesKey=null,this.remainderData=null,this.currentIV=null,this.currentResult=null,this.useSoftware=void 0,this.enableSoftwareAES=void 0,this.enableSoftwareAES=e.enableSoftwareAES,this.removePKCS7Padding=t,t)try{const n=self.crypto;n&&(this.subtle=n.subtle||n.webkitSubtle)}catch(n){}this.useSoftware=!this.subtle}destroy(){this.subtle=null,this.softwareDecrypter=null,this.key=null,this.fastAesKey=null,this.remainderData=null,this.currentIV=null,this.currentResult=null}isSync(){return this.useSoftware}flush(){const{currentResult:e,remainderData:t}=this;if(!e||t)return this.reset(),null;const n=new Uint8Array(e);return this.reset(),this.removePKCS7Padding?Ne(n):n}reset(){this.currentResult=null,this.currentIV=null,this.remainderData=null,this.softwareDecrypter&&(this.softwareDecrypter=null)}decrypt(e,t,n,r){return this.useSoftware?new Promise((s,a)=>{const o=ArrayBuffer.isView(e)?e:new Uint8Array(e);this.softwareDecrypt(o,t,n,r);const u=this.flush();u?s(u.buffer):a(new Error("[softwareDecrypt] Failed to decrypt data"))}):this.webCryptoDecrypt(new Uint8Array(e),t,n,r)}softwareDecrypt(e,t,n,r){const{currentIV:s,currentResult:a,remainderData:o}=this;if(r!==yt.cbc||t.byteLength!==16)return j.warn("SoftwareDecrypt: can only handle AES-128-CBC"),null;this.logOnce("JS AES decrypt"),o&&(e=Le(o,e),this.remainderData=null);const u=this.getValidChunk(e);if(!u.length)return null;s&&(n=s);let l=this.softwareDecrypter;l||(l=this.softwareDecrypter=new Xe),l.expandKey(t);const c=a;return this.currentResult=l.decrypt(u.buffer,0,n),this.currentIV=u.slice(-16).buffer,c||null}webCryptoDecrypt(e,t,n,r){if(this.key!==t||!this.fastAesKey){if(!this.subtle)return Promise.resolve(this.onWebCryptoError(e,t,n,r));this.key=t,this.fastAesKey=new nt(this.subtle,t,r)}return this.fastAesKey.expandKey().then(s=>this.subtle?(this.logOnce("WebCrypto AES decrypt"),new it(this.subtle,new Uint8Array(n),r).decrypt(e.buffer,s)):Promise.reject(new Error("web crypto not initialized"))).catch(s=>(j.warn(`[decrypter]: WebCrypto Error, disable WebCrypto API, ${s.name}: ${s.message}`),this.onWebCryptoError(e,t,n,r)))}onWebCryptoError(e,t,n,r){const s=this.enableSoftwareAES;if(s){this.useSoftware=!0,this.logEnabled=!0,this.softwareDecrypt(e,t,n,r);const a=this.flush();if(a)return a.buffer}throw new Error("WebCrypto"+(s?" and softwareDecrypt":"")+": failed to decrypt data")}getValidChunk(e){let t=e;const n=e.length-e.length%ot;return n!==e.length&&(t=e.slice(0,n),this.remainderData=e.slice(n)),t}logOnce(e){this.logEnabled&&(j.log(`[decrypter]: ${e}`),this.logEnabled=!1)}}const en=Math.pow(2,17);class An{constructor(e){this.config=void 0,this.loader=null,this.partLoadTimeout=-1,this.config=e}destroy(){this.loader&&(this.loader.destroy(),this.loader=null)}abort(){this.loader&&this.loader.abort()}load(e,t){const n=e.url;if(!n)return Promise.reject(new Sn({type:se.NETWORK_ERROR,details:U.FRAG_LOAD_ERROR,fatal:!1,frag:e,error:new Error(`Fragment does not have a ${n?"part list":"url"}`),networkDetails:null}));this.abort();const r=this.config,s=r.fLoader,a=r.loader;return new Promise((o,u)=>{if(this.loader&&this.loader.destroy(),e.gap)if(e.tagList.some(y=>y[0]==="GAP")){u(Fn(e));return}else e.gap=!1;const l=this.loader=s?new s(r):new a(r),c=bn(e);e.loader=l;const d=Bt(r.fragLoadPolicy.default),g={loadPolicy:d,timeout:d.maxLoadTimeMs,maxRetry:0,retryDelay:0,maxRetryDelay:0,highWaterMark:e.sn==="initSegment"?1/0:en};e.stats=l.stats;const w={onSuccess:(y,O,H,Ae)=>{this.resetLoader(e,l);let Ee=y.data;H.resetIV&&e.decryptdata&&(e.decryptdata.iv=new Uint8Array(Ee.slice(0,16)),Ee=Ee.slice(16)),o({frag:e,part:null,payload:Ee,networkDetails:Ae})},onError:(y,O,H,Ae)=>{this.resetLoader(e,l),u(new Sn({type:se.NETWORK_ERROR,details:U.FRAG_LOAD_ERROR,fatal:!1,frag:e,response:_({url:n,data:void 0},y),error:new Error(`HTTP Error ${y.code} ${y.text}`),networkDetails:H,stats:Ae}))},onAbort:(y,O,H)=>{this.resetLoader(e,l),u(new Sn({type:se.NETWORK_ERROR,details:U.INTERNAL_ABORTED,fatal:!1,frag:e,error:new Error("Aborted"),networkDetails:H,stats:y}))},onTimeout:(y,O,H)=>{this.resetLoader(e,l),u(new Sn({type:se.NETWORK_ERROR,details:U.FRAG_LOAD_TIMEOUT,fatal:!1,frag:e,error:new Error(`Timeout after ${g.timeout}ms`),networkDetails:H,stats:y}))}};t&&(w.onProgress=(y,O,H,Ae)=>t({frag:e,part:null,payload:H,networkDetails:Ae})),l.load(c,g,w)})}loadPart(e,t,n){this.abort();const r=this.config,s=r.fLoader,a=r.loader;return new Promise((o,u)=>{if(this.loader&&this.loader.destroy(),e.gap||t.gap){u(Fn(e,t));return}const l=this.loader=s?new s(r):new a(r),c=bn(e,t);e.loader=l;const d=Bt(r.fragLoadPolicy.default),g={loadPolicy:d,timeout:d.maxLoadTimeMs,maxRetry:0,retryDelay:0,maxRetryDelay:0,highWaterMark:en};t.stats=l.stats,l.load(c,g,{onSuccess:(w,y,O,H)=>{this.resetLoader(e,l),this.updateStatsFromPart(e,t);const Ae={frag:e,part:t,payload:w.data,networkDetails:H};n(Ae),o(Ae)},onError:(w,y,O,H)=>{this.resetLoader(e,l),u(new Sn({type:se.NETWORK_ERROR,details:U.FRAG_LOAD_ERROR,fatal:!1,frag:e,part:t,response:_({url:c.url,data:void 0},w),error:new Error(`HTTP Error ${w.code} ${w.text}`),networkDetails:O,stats:H}))},onAbort:(w,y,O)=>{e.stats.aborted=t.stats.aborted,this.resetLoader(e,l),u(new Sn({type:se.NETWORK_ERROR,details:U.INTERNAL_ABORTED,fatal:!1,frag:e,part:t,error:new Error("Aborted"),networkDetails:O,stats:w}))},onTimeout:(w,y,O)=>{this.resetLoader(e,l),u(new Sn({type:se.NETWORK_ERROR,details:U.FRAG_LOAD_TIMEOUT,fatal:!1,frag:e,part:t,error:new Error(`Timeout after ${g.timeout}ms`),networkDetails:O,stats:w}))}})})}updateStatsFromPart(e,t){const n=e.stats,r=t.stats,s=r.total;if(n.loaded+=r.loaded,s){const u=Math.round(e.duration/t.duration),l=Math.min(Math.round(n.loaded/s),u),d=(u-l)*Math.round(n.loaded/l);n.total=n.loaded+d}else n.total=Math.max(n.loaded,n.total);const a=n.loading,o=r.loading;a.start?a.first+=o.first-o.start:(a.start=o.start,a.first=o.first),a.end=o.end}resetLoader(e,t){e.loader=null,this.loader===t&&(self.clearTimeout(this.partLoadTimeout),this.loader=null),t.destroy()}}function bn(i,e=null){const t=e||i,n={frag:i,part:e,responseType:"arraybuffer",url:t.url,headers:{},rangeStart:0,rangeEnd:0},r=t.byteRangeStartOffset,s=t.byteRangeEndOffset;if(P(r)&&P(s)){var a;let o=r,u=s;if(i.sn==="initSegment"&&wn((a=i.decryptdata)==null?void 0:a.method)){const l=s-r;l%16&&(u=s+(16-l%16)),r!==0&&(n.resetIV=!0,o=r-16)}n.rangeStart=o,n.rangeEnd=u}return n}function Fn(i,e){const t=new Error(`GAP ${i.gap?"tag":"attribute"} found`),n={type:se.MEDIA_ERROR,details:U.FRAG_GAP,fatal:!1,frag:i,error:t,networkDetails:null};return e&&(n.part=e),(e||i).stats.aborted=!0,new Sn(n)}function wn(i){return i==="AES-128"||i==="AES-256"}class Sn extends Error{constructor(e){super(e.error.message),this.data=void 0,this.data=e}}class dn extends R{constructor(e,t){super(e,t),this._boundTick=void 0,this._tickTimer=null,this._tickInterval=null,this._tickCallCount=0,this._boundTick=this.tick.bind(this)}destroy(){this.onHandlerDestroying(),this.onHandlerDestroyed()}onHandlerDestroying(){this.clearNextTick(),this.clearInterval()}onHandlerDestroyed(){}hasInterval(){return!!this._tickInterval}hasNextTick(){return!!this._tickTimer}setInterval(e){return this._tickInterval?!1:(this._tickCallCount=0,this._tickInterval=self.setInterval(this._boundTick,e),!0)}clearInterval(){return this._tickInterval?(self.clearInterval(this._tickInterval),this._tickInterval=null,!0):!1}clearNextTick(){return this._tickTimer?(self.clearTimeout(this._tickTimer),this._tickTimer=null,!0):!1}tick(){this._tickCallCount++,this._tickCallCount===1&&(this.doTick(),this._tickCallCount>1&&this.tickImmediate(),this._tickCallCount=0)}tickImmediate(){this.clearNextTick(),this._tickTimer=self.setTimeout(this._boundTick,0)}doTick(){}}class Xn{constructor(e,t,n,r=0,s=-1,a=!1){this.level=void 0,this.sn=void 0,this.part=void 0,this.id=void 0,this.size=void 0,this.partial=void 0,this.transmuxing=Mn(),this.buffering={audio:Mn(),video:Mn(),audiovideo:Mn()},this.level=e,this.sn=t,this.id=n,this.size=r,this.part=s,this.partial=a}}function Mn(){return{start:0,executeStart:0,executeEnd:0,end:0}}const cr={length:0,start:()=>0,end:()=>0};class ln{static isBuffered(e,t){if(e){const n=ln.getBuffered(e);for(let r=n.length;r--;)if(t>=n.start(r)&&t<=n.end(r))return!0}return!1}static bufferedRanges(e){if(e){const t=ln.getBuffered(e);return ln.timeRangesToArray(t)}return[]}static timeRangesToArray(e){const t=[];for(let n=0;n<e.length;n++)t.push({start:e.start(n),end:e.end(n)});return t}static bufferInfo(e,t,n){if(e){const r=ln.bufferedRanges(e);if(r.length)return ln.bufferedInfo(r,t,n)}return{len:0,start:t,end:t,bufferedIndex:-1}}static bufferedInfo(e,t,n){t=Math.max(0,t),e.length>1&&e.sort((c,d)=>c.start-d.start||d.end-c.end);let r=-1,s=[];if(n)for(let c=0;c<e.length;c++){t>=e[c].start&&t<=e[c].end&&(r=c);const d=s.length;if(d){const g=s[d-1].end;e[c].start-g<n?e[c].end>g&&(s[d-1].end=e[c].end):s.push(e[c])}else s.push(e[c])}else s=e;let a=0,o,u=t,l=t;for(let c=0;c<s.length;c++){const d=s[c].start,g=s[c].end;if(r===-1&&t>=d&&t<=g&&(r=c),t+n>=d&&t<g)u=d,l=g,a=l-t;else if(t+n<d){o=d;break}}return{len:a,start:u||0,end:l||0,nextStart:o,buffered:e,bufferedIndex:r}}static getBuffered(e){try{return e.buffered||cr}catch(t){return j.log("failed to get media.buffered",t),cr}}}const Vn=/\{\$([a-zA-Z0-9-_]+)\}/g;function nr(i){return Vn.test(i)}function Jn(i,e){if(i.variableList!==null||i.hasVariableRefs){const t=i.variableList;return e.replace(Vn,n=>{const r=n.substring(2,n.length-1),s=t==null?void 0:t[r];return s===void 0?(i.playlistParsingError||(i.playlistParsingError=new Error(`Missing preceding EXT-X-DEFINE tag for Variable Reference: "${r}"`)),n):s})}return e}function Kn(i,e,t){let n=i.variableList;n||(i.variableList=n={});let r,s;if("QUERYPARAM"in e){r=e.QUERYPARAM;try{const a=new self.URL(t).searchParams;if(a.has(r))s=a.get(r);else throw new Error(`"${r}" does not match any query parameter in URI: "${t}"`)}catch(a){i.playlistParsingError||(i.playlistParsingError=new Error(`EXT-X-DEFINE QUERYPARAM: ${a.message}`))}}else r=e.NAME,s=e.VALUE;r in n?i.playlistParsingError||(i.playlistParsingError=new Error(`EXT-X-DEFINE duplicate Variable Name declarations: "${r}"`)):n[r]=s||""}function Nn(i,e,t){const n=e.IMPORT;if(t&&n in t){let r=i.variableList;r||(i.variableList=r={}),r[n]=t[n]}else i.playlistParsingError||(i.playlistParsingError=new Error(`EXT-X-DEFINE IMPORT attribute not found in Multivariant Playlist: "${n}"`))}const xn=/^(\d+)x(\d+)$/,Pn=/(.+?)=(".*?"|.*?)(?:,|$)/g;class In{constructor(e,t){typeof e=="string"&&(e=In.parseAttrList(e,t)),h(this,e)}get clientAttrs(){return Object.keys(this).filter(e=>e.substring(0,2)==="X-")}decimalInteger(e){const t=parseInt(this[e],10);return t>Number.MAX_SAFE_INTEGER?1/0:t}hexadecimalInteger(e){if(this[e]){let t=(this[e]||"0x").slice(2);t=(t.length&1?"0":"")+t;const n=new Uint8Array(t.length/2);for(let r=0;r<t.length/2;r++)n[r]=parseInt(t.slice(r*2,r*2+2),16);return n}return null}hexadecimalIntegerAsNumber(e){const t=parseInt(this[e],16);return t>Number.MAX_SAFE_INTEGER?1/0:t}decimalFloatingPoint(e){return parseFloat(this[e])}optionalFloat(e,t){const n=this[e];return n?parseFloat(n):t}enumeratedString(e){return this[e]}enumeratedStringList(e,t){const n=this[e];return(n?n.split(/[ ,]+/):[]).reduce((r,s)=>(r[s.toLowerCase()]=!0,r),t)}bool(e){return this[e]==="YES"}decimalResolution(e){const t=xn.exec(this[e]);if(t!==null)return{width:parseInt(t[1],10),height:parseInt(t[2],10)}}static parseAttrList(e,t){let n;const r={},s='"';for(Pn.lastIndex=0;(n=Pn.exec(e))!==null;){const a=n[1].trim();let o=n[2];const u=o.indexOf(s)===0&&o.lastIndexOf(s)===o.length-1;let l=!1;if(u)o=o.slice(1,-1);else switch(a){case"IV":case"SCTE35-CMD":case"SCTE35-IN":case"SCTE35-OUT":l=!0}if(t&&(u||l))o=Jn(t,o);else if(!l&&!u)switch(a){case"CLOSED-CAPTIONS":if(o==="NONE")break;case"ALLOWED-CPC":case"CLASS":case"ASSOC-LANGUAGE":case"AUDIO":case"BYTERANGE":case"CHANNELS":case"CHARACTERISTICS":case"CODECS":case"DATA-ID":case"END-DATE":case"GROUP-ID":case"ID":case"IMPORT":case"INSTREAM-ID":case"KEYFORMAT":case"KEYFORMATVERSIONS":case"LANGUAGE":case"NAME":case"PATHWAY-ID":case"QUERYPARAM":case"RECENTLY-REMOVED-DATERANGES":case"SERVER-URI":case"STABLE-RENDITION-ID":case"STABLE-VARIANT-ID":case"START-DATE":case"SUBTITLES":case"SUPPLEMENTAL-CODECS":case"URI":case"VALUE":case"VIDEO":case"X-ASSET-LIST":case"X-ASSET-URI":j.warn(`${e}: attribute ${a} is missing quotes`)}r[a]=o}return r}}const pr="com.apple.hls.interstitial";function fr(i){return i!=="ID"&&i!=="CLASS"&&i!=="CUE"&&i!=="START-DATE"&&i!=="DURATION"&&i!=="END-DATE"&&i!=="END-ON-NEXT"}function hr(i){return i==="SCTE35-OUT"||i==="SCTE35-IN"||i==="SCTE35-CMD"}class Rr{constructor(e,t,n=0){var r;if(this.attr=void 0,this.tagAnchor=void 0,this.tagOrder=void 0,this._startDate=void 0,this._endDate=void 0,this._dateAtEnd=void 0,this._cue=void 0,this._badValueForSameId=void 0,this.tagAnchor=(t==null?void 0:t.tagAnchor)||null,this.tagOrder=(r=t==null?void 0:t.tagOrder)!=null?r:n,t){const s=t.attr;for(const a in s)if(Object.prototype.hasOwnProperty.call(e,a)&&e[a]!==s[a]){j.warn(`DATERANGE tag attribute: "${a}" does not match for tags with ID: "${e.ID}"`),this._badValueForSameId=a;break}e=h(new In({}),s,e)}if(this.attr=e,t?(this._startDate=t._startDate,this._cue=t._cue,this._endDate=t._endDate,this._dateAtEnd=t._dateAtEnd):this._startDate=new Date(e["START-DATE"]),"END-DATE"in this.attr){const s=(t==null?void 0:t.endDate)||new Date(this.attr["END-DATE"]);P(s.getTime())&&(this._endDate=s)}}get id(){return this.attr.ID}get class(){return this.attr.CLASS}get cue(){const e=this._cue;return e===void 0?this._cue=this.attr.enumeratedStringList(this.attr.CUE?"CUE":"X-CUE",{pre:!1,post:!1,once:!1}):e}get startTime(){const{tagAnchor:e}=this;return e===null||e.programDateTime===null?(j.warn(`Expected tagAnchor Fragment with PDT set for DateRange "${this.id}": ${e}`),NaN):e.start+(this.startDate.getTime()-e.programDateTime)/1e3}get startDate(){return this._startDate}get endDate(){const e=this._endDate||this._dateAtEnd;if(e)return e;const t=this.duration;return t!==null?this._dateAtEnd=new Date(this._startDate.getTime()+t*1e3):null}get duration(){if("DURATION"in this.attr){const e=this.attr.decimalFloatingPoint("DURATION");if(P(e))return e}else if(this._endDate)return(this._endDate.getTime()-this._startDate.getTime())/1e3;return null}get plannedDuration(){return"PLANNED-DURATION"in this.attr?this.attr.decimalFloatingPoint("PLANNED-DURATION"):null}get endOnNext(){return this.attr.bool("END-ON-NEXT")}get isInterstitial(){return this.class===pr}get isValid(){return!!this.id&&!this._badValueForSameId&&P(this.startDate.getTime())&&(this.duration===null||this.duration>=0)&&(!this.endOnNext||!!this.class)&&(!this.attr.CUE||!this.cue.pre&&!this.cue.post||this.cue.pre!==this.cue.post)&&(!this.isInterstitial||"X-ASSET-URI"in this.attr||"X-ASSET-LIST"in this.attr)}}const Zr=10;class Yr{constructor(e){this.PTSKnown=!1,this.alignedSliding=!1,this.averagetargetduration=void 0,this.endCC=0,this.endSN=0,this.fragments=void 0,this.fragmentHint=void 0,this.partList=null,this.dateRanges=void 0,this.dateRangeTagCount=0,this.live=!0,this.requestScheduled=-1,this.ageHeader=0,this.advancedDateTime=void 0,this.updated=!0,this.advanced=!0,this.misses=0,this.startCC=0,this.startSN=0,this.startTimeOffset=null,this.targetduration=0,this.totalduration=0,this.type=null,this.url=void 0,this.m3u8="",this.version=null,this.canBlockReload=!1,this.canSkipUntil=0,this.canSkipDateRanges=!1,this.skippedSegments=0,this.recentlyRemovedDateranges=void 0,this.partHoldBack=0,this.holdBack=0,this.partTarget=0,this.preloadHint=void 0,this.renditionReports=void 0,this.tuneInGoal=0,this.deltaUpdateFailed=void 0,this.driftStartTime=0,this.driftEndTime=0,this.driftStart=0,this.driftEnd=0,this.encryptedFragments=void 0,this.playlistParsingError=null,this.variableList=null,this.hasVariableRefs=!1,this.appliedTimelineOffset=void 0,this.fragments=[],this.encryptedFragments=[],this.dateRanges={},this.url=e}reloaded(e){if(!e){this.advanced=!0,this.updated=!0;return}const t=this.lastPartSn-e.lastPartSn,n=this.lastPartIndex-e.lastPartIndex;this.updated=this.endSN!==e.endSN||!!n||!!t||!this.live,this.advanced=this.endSN>e.endSN||t>0||t===0&&n>0,this.updated||this.advanced?this.misses=Math.floor(e.misses*.6):this.misses=e.misses+1}get hasProgramDateTime(){return this.fragments.length?P(this.fragments[this.fragments.length-1].programDateTime):!1}get levelTargetDuration(){return this.averagetargetduration||this.targetduration||Zr}get drift(){const e=this.driftEndTime-this.driftStartTime;return e>0?(this.driftEnd-this.driftStart)*1e3/e:1}get edge(){return this.partEnd||this.fragmentEnd}get partEnd(){var e;return(e=this.partList)!=null&&e.length?this.partList[this.partList.length-1].end:this.fragmentEnd}get fragmentEnd(){var e;return(e=this.fragments)!=null&&e.length?this.fragments[this.fragments.length-1].end:0}get fragmentStart(){var e;return(e=this.fragments)!=null&&e.length?this.fragments[0].start:0}get age(){return this.advancedDateTime?Math.max(Date.now()-this.advancedDateTime,0)/1e3:0}get lastPartIndex(){var e;return(e=this.partList)!=null&&e.length?this.partList[this.partList.length-1].index:-1}get maxPartIndex(){const e=this.partList;if(e){const t=this.lastPartIndex;if(t!==-1){for(let n=e.length;n--;)if(e[n].index>t)return e[n].index;return t}}return 0}get lastPartSn(){var e;return(e=this.partList)!=null&&e.length?this.partList[this.partList.length-1].fragment.sn:this.endSN}get expired(){if(this.live&&this.age&&this.misses<3){const e=this.partEnd-this.fragmentStart;return this.age>Math.max(e,this.totalduration)+this.levelTargetDuration}return!1}}function ii(i){return i==="AES-128"||i==="AES-256"||i==="AES-256-CTR"}function Xr(i){switch(i){case"AES-128":case"AES-256":return yt.cbc;case"AES-256-CTR":return yt.ctr;default:throw new Error(`invalid full segment method ${i}`)}}function si(i){return Uint8Array.from(atob(i),e=>e.charCodeAt(0))}function Er(i){return Uint8Array.from(unescape(encodeURIComponent(i)),e=>e.charCodeAt(0))}function Ir(i){const e=Er(i).subarray(0,16),t=new Uint8Array(16);return t.set(e,16-e.length),t}function ti(i){const e=function(n,r,s){const a=n[r];n[r]=n[s],n[s]=a};e(i,0,3),e(i,1,2),e(i,4,5),e(i,6,7)}function xr(i){const e=i.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 s=r[0]==="base64",a=r[1];s?(n.splice(-1,1),t=si(a)):t=Ir(a)}}return t}const wr=typeof self!="undefined"?self:void 0;var Ar={CLEARKEY:"org.w3.clearkey",FAIRPLAY:"com.apple.fps",PLAYREADY:"com.microsoft.playready",WIDEVINE:"com.widevine.alpha"},Tn={CLEARKEY:"org.w3.clearkey",FAIRPLAY:"com.apple.streamingkeydelivery",PLAYREADY:"com.microsoft.playready",WIDEVINE:"urn:uuid:edef8ba9-79d6-4ace-a3c8-27dcd51d21ed"};function sr(i){switch(i){case Tn.FAIRPLAY:return Ar.FAIRPLAY;case Tn.PLAYREADY:return Ar.PLAYREADY;case Tn.WIDEVINE:return Ar.WIDEVINE;case Tn.CLEARKEY:return Ar.CLEARKEY}}function lr(i){switch(i){case Ar.FAIRPLAY:return Tn.FAIRPLAY;case Ar.PLAYREADY:return Tn.PLAYREADY;case Ar.WIDEVINE:return Tn.WIDEVINE;case Ar.CLEARKEY:return Tn.CLEARKEY}}function dr(i){const{drmSystems:e,widevineLicenseUrl:t}=i,n=e?[Ar.FAIRPLAY,Ar.WIDEVINE,Ar.PLAYREADY,Ar.CLEARKEY].filter(r=>!!e[r]):[];return!n[Ar.WIDEVINE]&&t&&n.push(Ar.WIDEVINE),n}const br=function(i){return wr!=null&&(i=wr.navigator)!=null&&i.requestMediaKeySystemAccess?self.navigator.requestMediaKeySystemAccess.bind(self.navigator):null}();function Dr(i,e,t,n){let r;switch(i){case Ar.FAIRPLAY:r=["cenc","sinf"];break;case Ar.WIDEVINE:case Ar.PLAYREADY:r=["cenc"];break;case Ar.CLEARKEY:r=["cenc","keyids"];break;default:throw new Error(`Unknown key-system: ${i}`)}return Sr(r,e,t,n)}function Sr(i,e,t,n){return[{initDataTypes:i,persistentState:n.persistentState||"optional",distinctiveIdentifier:n.distinctiveIdentifier||"optional",sessionTypes:n.sessionTypes||[n.sessionType||"temporary"],audioCapabilities:e.map(s=>({contentType:`audio/mp4; codecs=${s}`,robustness:n.audioRobustness||"",encryptionScheme:n.audioEncryptionScheme||null})),videoCapabilities:t.map(s=>({contentType:`video/mp4; codecs=${s}`,robustness:n.videoRobustness||"",encryptionScheme:n.videoEncryptionScheme||null}))}]}function kn(i){var e;return i.sessionType==="persistent-license"||!!((e=i.sessionTypes)!=null&&e.some(t=>t==="persistent-license"))}function er(i){const e=new Uint16Array(i.buffer,i.byteOffset,i.byteLength/2),t=String.fromCharCode.apply(null,Array.from(e)),n=t.substring(t.indexOf("<"),t.length),a=new DOMParser().parseFromString(n,"text/xml").getElementsByTagName("KID")[0];if(a){const o=a.childNodes[0]?a.childNodes[0].nodeValue:a.getAttribute("VALUE");if(o){const u=si(o).subarray(0,16);return ti(u),u}}return null}let qn={};class Cr{static clearKeyUriToKeyIdMap(){qn={}}constructor(e,t,n,r=[1],s=null,a){this.uri=void 0,this.method=void 0,this.keyFormat=void 0,this.keyFormatVersions=void 0,this.encrypted=void 0,this.isCommonEncryption=void 0,this.iv=null,this.key=null,this.keyId=null,this.pssh=null,this.method=e,this.uri=t,this.keyFormat=n,this.keyFormatVersions=r,this.iv=s,this.encrypted=e?e!=="NONE":!1,this.isCommonEncryption=this.encrypted&&!ii(e),a!=null&&a.startsWith("0x")&&(this.keyId=new Uint8Array(M(a)))}matches(e){var t,n;return e.uri===this.uri&&e.method===this.method&&e.encrypted===this.encrypted&&e.keyFormat===this.keyFormat&&e.keyFormatVersions.join(",")===this.keyFormatVersions.join(",")&&((t=e.iv)==null?void 0:t.join(","))===((n=this.iv)==null?void 0:n.join(","))}isSupported(){if(this.method){if(ii(this.method)||this.method==="NONE")return!0;if(this.keyFormat==="identity")return this.method==="SAMPLE-AES";switch(this.keyFormat){case Tn.FAIRPLAY:case Tn.WIDEVINE:case Tn.PLAYREADY:case Tn.CLEARKEY:return["ISO-23001-7","SAMPLE-AES","SAMPLE-AES-CENC","SAMPLE-AES-CTR"].indexOf(this.method)!==-1}}return!1}getDecryptData(e){if(!this.encrypted||!this.uri)return null;if(ii(this.method)&&this.uri&&!this.iv){typeof e!="number"&&(j.warn(`missing IV for initialization segment with method="${this.method}" - compliance issue`),e=0);const n=Tr(e);return new Cr(this.method,this.uri,"identity",this.keyFormatVersions,n)}if(this.pssh&&this.keyId)return this;const t=xr(this.uri);if(t)switch(this.keyFormat){case Tn.WIDEVINE:if(this.pssh=t,!this.keyId&&t.length>=22){const n=t.length-22;this.keyId=t.subarray(n,n+16)}break;case Tn.PLAYREADY:{const n=new Uint8Array([154,4,240,121,152,64,66,134,171,146,230,91,224,136,95,149]);this.pssh=on(n,null,t),this.keyId=er(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=qn[this.uri];if(!n){const r=Object.keys(qn).length%Number.MAX_SAFE_INTEGER;n=new Uint8Array(16),new DataView(n.buffer,12,4).setUint32(0,r),qn[this.uri]=n}this.keyId=n}return this}}function Tr(i){const e=new Uint8Array(16);for(let t=12;t<16;t++)e[t]=i>>8*(15-t)&255;return e}const $r=/#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,ni=/#EXT-X-MEDIA:(.*)/g,Mr=/^#EXT(?:INF|-X-TARGETDURATION):/m,Ai=new RegExp([/#EXTINF:\s*(\d*(?:\.\d+)?)(?:,(.*)\s+)?/.source,/(?!#) *(\S[^\r\n]*)/.source,/#.*/.source].join("|"),"g"),Ur=new RegExp([/#EXT-X-(PROGRAM-DATE-TIME|BYTERANGE|DATERANGE|DEFINE|KEY|MAP|PART|PART-INF|PLAYLIST-TYPE|PRELOAD-HINT|RENDITION-REPORT|SERVER-CONTROL|SKIP|START):(.+)/.source,/#EXT-X-(BITRATE|DISCONTINUITY-SEQUENCE|MEDIA-SEQUENCE|TARGETDURATION|VERSION): *(\d+)/.source,/#EXT-X-(DISCONTINUITY|ENDLIST|GAP|INDEPENDENT-SEGMENTS)/.source,/(#)([^:]*):(.*)/.source,/(#)(.*)(?:.*)\r?\n?/.source].join("|"));class mi{static findGroup(e,t){for(let n=0;n<e.length;n++){const r=e[n];if(r.id===t)return r}}static resolve(e,t){return m.buildAbsoluteURL(t,e,{alwaysNormalize:!0})}static isMediaPlaylist(e){return Mr.test(e)}static parseMasterPlaylist(e,t){const n=nr(e),r={contentSteering:null,levels:[],playlistParsingError:null,sessionData:null,sessionKeys:null,startTimeOffset:null,variableList:null,hasVariableRefs:n},s=[];$r.lastIndex=0;let a;for(;(a=$r.exec(e))!=null;)if(a[1]){var o;const l=new In(a[1],r),c=Jn(r,a[2]),d={attrs:l,bitrate:l.decimalInteger("BANDWIDTH")||l.decimalInteger("AVERAGE-BANDWIDTH"),name:l.NAME,url:mi.resolve(c,t)},g=l.decimalResolution("RESOLUTION");g&&(d.width=g.width,d.height=g.height),zi(l.CODECS,d);const w=l["SUPPLEMENTAL-CODECS"];w&&(d.supplemental={},zi(w,d.supplemental)),(o=d.unknownCodecs)!=null&&o.length||s.push(d),r.levels.push(d)}else if(a[3]){const l=a[3],c=a[4];switch(l){case"SESSION-DATA":{const d=new In(c,r),g=d["DATA-ID"];g&&(r.sessionData===null&&(r.sessionData={}),r.sessionData[g]=d);break}case"SESSION-KEY":{const d=Kr(c,t,r);d.encrypted&&d.isSupported()?(r.sessionKeys===null&&(r.sessionKeys=[]),r.sessionKeys.push(d)):j.warn(`[Keys] Ignoring invalid EXT-X-SESSION-KEY tag: "${c}"`);break}case"DEFINE":{{const d=new In(c,r);Kn(r,d,t)}break}case"CONTENT-STEERING":{const d=new In(c,r);r.contentSteering={uri:mi.resolve(d["SERVER-URI"],t),pathwayId:d["PATHWAY-ID"]||"."};break}case"START":{r.startTimeOffset=Wi(c);break}}}const u=s.length>0&&s.length<r.levels.length;return r.levels=u?s:r.levels,r.levels.length===0&&(r.playlistParsingError=new Error("no levels found in manifest")),r}static parseMasterPlaylistMedia(e,t,n){let r;const s={},a=n.levels,o={AUDIO:a.map(l=>({id:l.attrs.AUDIO,audioCodec:l.audioCodec})),SUBTITLES:a.map(l=>({id:l.attrs.SUBTITLES,textCodec:l.textCodec})),"CLOSED-CAPTIONS":[]};let u=0;for(ni.lastIndex=0;(r=ni.exec(e))!==null;){const l=new In(r[1],n),c=l.TYPE;if(c){const d=o[c],g=s[c]||[];s[c]=g;const w=l.LANGUAGE,y=l["ASSOC-LANGUAGE"],O=l.CHANNELS,H=l.CHARACTERISTICS,Ae=l["INSTREAM-ID"],Ee={attrs:l,bitrate:0,id:u++,groupId:l["GROUP-ID"]||"",name:l.NAME||w||"",type:c,default:l.bool("DEFAULT"),autoselect:l.bool("AUTOSELECT"),forced:l.bool("FORCED"),lang:w,url:l.URI?mi.resolve(l.URI,t):""};if(y&&(Ee.assocLang=y),O&&(Ee.channels=O),H&&(Ee.characteristics=H),Ae&&(Ee.instreamId=Ae),d!=null&&d.length){const we=mi.findGroup(d,Ee.groupId)||d[0];ns(Ee,we,"audioCodec"),ns(Ee,we,"textCodec")}g.push(Ee)}}return s}static parseLevelPlaylist(e,t,n,r,s,a){var o;const u={url:t},l=new Yr(t),c=l.fragments,d=[];let g=null,w=0,y=0,O=0,H=0,Ae=0,Ee=null,we=new Oe(r,u),Ze,rt,pt,At=-1,wt=!1,_t=null,ct;if(Ai.lastIndex=0,l.m3u8=e,l.hasVariableRefs=nr(e),((o=Ai.exec(e))==null?void 0:o[0])!=="#EXTM3U")return l.playlistParsingError=new Error("Missing format identifier #EXTM3U"),l;for(;(Ze=Ai.exec(e))!==null;){wt&&(wt=!1,we=new Oe(r,u),we.playlistOffset=O,we.start=O,we.sn=w,we.cc=H,Ae&&(we.bitrate=Ae),we.level=n,g&&(we.initSegment=g,g.rawProgramDateTime&&(we.rawProgramDateTime=g.rawProgramDateTime,g.rawProgramDateTime=null),_t&&(we.setByteRange(_t),_t=null)));const jn=Ze[1];if(jn){we.duration=parseFloat(jn);const ir=(" "+Ze[2]).slice(1);we.title=ir||null,we.tagList.push(ir?["INF",jn,ir]:["INF",jn])}else if(Ze[3]){if(P(we.duration)){we.playlistOffset=O,we.start=O,pt&&As(we,pt,l),we.sn=w,we.level=n,we.cc=H,c.push(we);const ir=(" "+Ze[3]).slice(1);we.relurl=Jn(l,ir),Ui(we,Ee,d),Ee=we,O+=we.duration,w++,y=0,wt=!0}}else{if(Ze=Ze[0].match(Ur),!Ze){j.warn("No matches on slow regex match for level playlist!");continue}for(rt=1;rt<Ze.length&&Ze[rt]===void 0;rt++);const ir=(" "+Ze[rt]).slice(1),Gn=(" "+Ze[rt+1]).slice(1),vr=Ze[rt+2]?(" "+Ze[rt+2]).slice(1):null;switch(ir){case"BYTERANGE":Ee?we.setByteRange(Gn,Ee):we.setByteRange(Gn);break;case"PROGRAM-DATE-TIME":we.rawProgramDateTime=Gn,we.tagList.push(["PROGRAM-DATE-TIME",Gn]),At===-1&&(At=c.length);break;case"PLAYLIST-TYPE":l.type&&Jr(l,ir,Ze),l.type=Gn.toUpperCase();break;case"MEDIA-SEQUENCE":l.startSN!==0?Jr(l,ir,Ze):c.length>0&&Di(l,ir,Ze),w=l.startSN=parseInt(Gn);break;case"SKIP":{l.skippedSegments&&Jr(l,ir,Ze);const Hn=new In(Gn,l),yr=Hn.decimalInteger("SKIPPED-SEGMENTS");if(P(yr)){l.skippedSegments+=yr;for(let Zn=yr;Zn--;)c.push(null);w+=yr}const _r=Hn.enumeratedString("RECENTLY-REMOVED-DATERANGES");_r&&(l.recentlyRemovedDateranges=(l.recentlyRemovedDateranges||[]).concat(_r.split(" ")));break}case"TARGETDURATION":l.targetduration!==0&&Jr(l,ir,Ze),l.targetduration=Math.max(parseInt(Gn),1);break;case"VERSION":l.version!==null&&Jr(l,ir,Ze),l.version=parseInt(Gn);break;case"INDEPENDENT-SEGMENTS":break;case"ENDLIST":l.live||Jr(l,ir,Ze),l.live=!1;break;case"#":(Gn||vr)&&we.tagList.push(vr?[Gn,vr]:[Gn]);break;case"DISCONTINUITY":H++,we.tagList.push(["DIS"]);break;case"GAP":we.gap=!0,we.tagList.push([ir]);break;case"BITRATE":we.tagList.push([ir,Gn]),Ae=parseInt(Gn)*1e3,P(Ae)?we.bitrate=Ae:Ae=0;break;case"DATERANGE":{const Hn=new In(Gn,l),yr=new Rr(Hn,l.dateRanges[Hn.ID],l.dateRangeTagCount);l.dateRangeTagCount++,yr.isValid||l.skippedSegments?l.dateRanges[yr.id]=yr:j.warn(`Ignoring invalid DATERANGE tag: "${Gn}"`),we.tagList.push(["EXT-X-DATERANGE",Gn]);break}case"DEFINE":{{const Hn=new In(Gn,l);"IMPORT"in Hn?Nn(l,Hn,a):Kn(l,Hn,t)}break}case"DISCONTINUITY-SEQUENCE":l.startCC!==0?Jr(l,ir,Ze):c.length>0&&Di(l,ir,Ze),l.startCC=H=parseInt(Gn);break;case"KEY":{const Hn=Kr(Gn,t,l);if(Hn.isSupported()){if(Hn.method==="NONE"){pt=void 0;break}pt||(pt={});const yr=pt[Hn.keyFormat];yr!=null&&yr.matches(Hn)||(yr&&(pt=h({},pt)),pt[Hn.keyFormat]=Hn)}else j.warn(`[Keys] Ignoring invalid EXT-X-KEY tag: "${Gn}"`);break}case"START":l.startTimeOffset=Wi(Gn);break;case"MAP":{const Hn=new In(Gn,l);if(we.duration){const yr=new Oe(r,u);Mi(yr,Hn,n,pt),g=yr,we.initSegment=g,g.rawProgramDateTime&&!we.rawProgramDateTime&&(we.rawProgramDateTime=g.rawProgramDateTime)}else{const yr=we.byteRangeEndOffset;if(yr){const _r=we.byteRangeStartOffset;_t=`${yr-_r}@${_r}`}else _t=null;Mi(we,Hn,n,pt),g=we,wt=!0}g.cc=H;break}case"SERVER-CONTROL":{ct&&Jr(l,ir,Ze),ct=new In(Gn),l.canBlockReload=ct.bool("CAN-BLOCK-RELOAD"),l.canSkipUntil=ct.optionalFloat("CAN-SKIP-UNTIL",0),l.canSkipDateRanges=l.canSkipUntil>0&&ct.bool("CAN-SKIP-DATERANGES"),l.partHoldBack=ct.optionalFloat("PART-HOLD-BACK",0),l.holdBack=ct.optionalFloat("HOLD-BACK",0);break}case"PART-INF":{l.partTarget&&Jr(l,ir,Ze);const Hn=new In(Gn);l.partTarget=Hn.decimalFloatingPoint("PART-TARGET");break}case"PART":{let Hn=l.partList;Hn||(Hn=l.partList=[]);const yr=y>0?Hn[Hn.length-1]:void 0,_r=y++,Zn=new In(Gn,l),Qn=new ft(Zn,we,u,_r,yr);Hn.push(Qn),we.duration+=Qn.duration;break}case"PRELOAD-HINT":{const Hn=new In(Gn,l);l.preloadHint=Hn;break}case"RENDITION-REPORT":{const Hn=new In(Gn,l);l.renditionReports=l.renditionReports||[],l.renditionReports.push(Hn);break}default:j.warn(`line parsed but not handled: ${Ze}`);break}}}Ee&&!Ee.relurl?(c.pop(),O-=Ee.duration,l.partList&&(l.fragmentHint=Ee)):l.partList&&(Ui(we,Ee,d),we.cc=H,l.fragmentHint=we,pt&&As(we,pt,l)),l.targetduration||(l.playlistParsingError=new Error("#EXT-X-TARGETDURATION is required"));const fn=c.length,Rn=c[0],$n=c[fn-1];if(O+=l.skippedSegments*l.targetduration,O>0&&fn&&$n){l.averagetargetduration=O/fn;const jn=$n.sn;l.endSN=jn!=="initSegment"?jn:0,l.live||($n.endList=!0),Rn&&l.startCC===void 0&&(l.startCC=Rn.cc),At>0&&(Ii(c,At),Rn&&d.unshift(Rn))}else l.endSN=0,l.startCC=0;return l.fragmentHint&&(O+=l.fragmentHint.duration),l.totalduration=O,d.length&&l.dateRangeTagCount&&Rn&&Si(d,l),l.endCC=H,l}}function Si(i,e){const t=i.length;if(!t)return;const n=i[t-1],r=e.live?1/0:e.totalduration,s=Object.keys(e.dateRanges);for(let a=s.length;a--;){const o=e.dateRanges[s[a]],u=o.startDate.getTime();o.tagAnchor=n.ref;for(let l=t;l--;){const c=Ti(e,u,i,l,r);if(c!==-1){o.tagAnchor=e.fragments[c].ref;break}}}}function Ti(i,e,t,n,r){const s=t[n];if(s){const o=s.programDateTime;if(e>=o||n===0){var a;const u=(((a=t[n+1])==null?void 0:a.start)||r)-s.start;if(e<=o+u*1e3){const l=t[n].sn-i.startSN,c=i.fragments;if(c.length>t.length){const g=(t[n+1]||c[c.length-1]).sn-i.startSN;for(let w=g;w>l;w--){const y=c[w].programDateTime;if(e>=y&&e<y+c[w].duration*1e3)return w}}return l}}}return-1}function Kr(i,e,t){var n,r;const s=new In(i,t),a=(n=s.METHOD)!=null?n:"",o=s.URI,u=s.hexadecimalInteger("IV"),l=s.KEYFORMATVERSIONS,c=(r=s.KEYFORMAT)!=null?r:"identity";o&&s.IV&&!u&&j.error(`Invalid IV: ${s.IV}`);const d=o?mi.resolve(o,e):"",g=(l||"1").split("/").map(Number).filter(Number.isFinite);return new Cr(a,d,c,g,u,s.KEYID)}function Wi(i){const t=new In(i).decimalFloatingPoint("TIME-OFFSET");return P(t)?t:null}function zi(i,e){let t=(i||"").split(/[ ,]+/).filter(n=>n);["video","audio","text"].forEach(n=>{const r=t.filter(s=>gn(s,n));r.length&&(e[`${n}Codec`]=r.map(s=>s.split("/")[0]).join(","),t=t.filter(s=>r.indexOf(s)===-1))}),e.unknownCodecs=t}function ns(i,e,t){const n=e[t];n&&(i[t]=n)}function Ii(i,e){let t=i[e];for(let n=e;n--;){const r=i[n];if(!r)return;r.programDateTime=t.programDateTime-r.duration*1e3,t=r}}function Ui(i,e,t){i.rawProgramDateTime?t.push(i):e!=null&&e.programDateTime&&(i.programDateTime=e.endProgramDateTime)}function Mi(i,e,t,n){i.relurl=e.URI,e.BYTERANGE&&i.setByteRange(e.BYTERANGE),i.level=t,i.sn="initSegment",n&&(i.levelkeys=n),i.initSegment=null}function As(i,e,t){i.levelkeys=e;const{encryptedFragments:n}=t;(!n.length||n[n.length-1].levelkeys!==e)&&Object.keys(e).some(r=>e[r].isCommonEncryption)&&n.push(i)}function Jr(i,e,t){i.playlistParsingError=new Error(`#EXT-X-${e} must not appear more than once (${t[0]})`)}function Di(i,e,t){i.playlistParsingError=new Error(`#EXT-X-${e} must appear before the first Media Segment (${t[0]})`)}function Ei(i,e){const t=e.startPTS;if(P(t)){let n=0,r;e.sn>i.sn?(n=t-i.start,r=i):(n=i.start-t,r=e),r.duration!==n&&r.setDuration(n)}else e.sn>i.sn?i.cc===e.cc&&i.minEndPTS?e.setStart(i.start+(i.minEndPTS-i.start)):e.setStart(i.start+i.duration):e.setStart(Math.max(i.start-e.duration,0))}function li(i,e,t,n,r,s){n-t<=0&&(j.warn("Fragment should have a positive duration",e),n=t+e.duration,s=r+e.duration);let o=t,u=n;const l=e.startPTS,c=e.endPTS;if(P(l)){const H=Math.abs(l-t);P(e.deltaPTS)?e.deltaPTS=Math.max(H,e.deltaPTS):e.deltaPTS=H,o=Math.max(t,l),t=Math.min(t,l),r=Math.min(r,e.startDTS),u=Math.min(n,c),n=Math.max(n,c),s=Math.max(s,e.endDTS)}const d=t-e.start;e.start!==0&&e.setStart(t),e.setDuration(n-e.start),e.startPTS=t,e.maxStartPTS=o,e.startDTS=r,e.endPTS=n,e.minEndPTS=u,e.endDTS=s;const g=e.sn;if(!i||g<i.startSN||g>i.endSN)return 0;let w;const y=g-i.startSN,O=i.fragments;for(O[y]=e,w=y;w>0;w--)Ei(O[w],O[w-1]);for(w=y;w<O.length-1;w++)Ei(O[w],O[w+1]);return i.fragmentHint&&Ei(O[O.length-1],i.fragmentHint),i.PTSKnown=i.alignedSliding=!0,d}function Li(i,e){if(i===e)return;let t=null;const n=i.fragments;for(let l=n.length-1;l>=0;l--){const c=n[l].initSegment;if(c){t=c;break}}i.fragmentHint&&delete i.fragmentHint.endPTS;let r;di(i,e,(l,c,d,g)=>{if((!e.startCC||e.skippedSegments)&&c.cc!==l.cc){const w=l.cc-c.cc;for(let y=d;y<g.length;y++)g[y].cc+=w;e.endCC=g[g.length-1].cc}P(l.startPTS)&&P(l.endPTS)&&(c.setStart(c.startPTS=l.startPTS),c.startDTS=l.startDTS,c.maxStartPTS=l.maxStartPTS,c.endPTS=l.endPTS,c.endDTS=l.endDTS,c.minEndPTS=l.minEndPTS,c.setDuration(l.endPTS-l.startPTS),c.duration&&(r=c),e.PTSKnown=e.alignedSliding=!0),l.hasStreams&&(c.elementaryStreams=l.elementaryStreams),c.loader=l.loader,l.hasStats&&(c.stats=l.stats),l.initSegment&&(c.initSegment=l.initSegment,t=l.initSegment)});const s=e.fragments,a=e.fragmentHint?s.concat(e.fragmentHint):s;if(t&&a.forEach(l=>{var c;l&&(!l.initSegment||l.initSegment.relurl===((c=t)==null?void 0:c.relurl))&&(l.initSegment=t)}),e.skippedSegments){if(e.deltaUpdateFailed=s.some(l=>!l),e.deltaUpdateFailed){j.warn("[level-helper] Previous playlist missing segments skipped in delta playlist");for(let l=e.skippedSegments;l--;)s.shift();e.startSN=s[0].sn}else{e.canSkipDateRanges&&(e.dateRanges=ds(i.dateRanges,e));const l=i.fragments.filter(c=>c.rawProgramDateTime);if(i.hasProgramDateTime&&!e.hasProgramDateTime)for(let c=1;c<a.length;c++)a[c].programDateTime===null&&Ui(a[c],a[c-1],l);Si(l,e)}e.endCC=s[s.length-1].cc}if(!e.startCC){var o;const l=ri(i,e.startSN-1);e.startCC=(o=l==null?void 0:l.cc)!=null?o:s[0].cc}rs(i.partList,e.partList,(l,c)=>{c.elementaryStreams=l.elementaryStreams,c.stats=l.stats}),r?li(e,r,r.startPTS,r.endPTS,r.startDTS,r.endDTS):Fr(i,e),s.length&&(e.totalduration=e.edge-s[0].start),e.driftStartTime=i.driftStartTime,e.driftStart=i.driftStart;const u=e.advancedDateTime;if(e.advanced&&u){const l=e.edge;e.driftStart||(e.driftStartTime=u,e.driftStart=l),e.driftEndTime=u,e.driftEnd=l}else e.driftEndTime=i.driftEndTime,e.driftEnd=i.driftEnd,e.advancedDateTime=i.advancedDateTime;e.requestScheduled===-1&&(e.requestScheduled=i.requestScheduled)}function ds(i,e){const{dateRanges:t,recentlyRemovedDateranges:n}=e,r=h({},i);n&&n.forEach(o=>{delete r[o]});const a=Object.keys(r).length;return a&&Object.keys(t).forEach(o=>{const u=r[o],l=new Rr(t[o].attr,u);l.isValid?(r[o]=l,u||(l.tagOrder+=a)):j.warn(`Ignoring invalid Playlist Delta Update DATERANGE tag: "${Ot(t[o].attr)}"`)}),r}function rs(i,e,t){if(i&&e){let n=0;for(let r=0,s=i.length;r<=s;r++){const a=i[r],o=e[r+n];a&&o&&a.index===o.index&&a.fragment.sn===o.fragment.sn?t(a,o):n--}}}function di(i,e,t){const n=e.skippedSegments,r=Math.max(i.startSN,e.startSN)-e.startSN,s=(i.fragmentHint?1:0)+(n?e.endSN:Math.min(i.endSN,e.endSN))-e.startSN,a=e.startSN-i.startSN,o=e.fragmentHint?e.fragments.concat(e.fragmentHint):e.fragments,u=i.fragmentHint?i.fragments.concat(i.fragmentHint):i.fragments;for(let l=r;l<=s;l++){const c=u[a+l];let d=o[l];if(n&&!d&&c&&(d=e.fragments[l]=c),c&&d){if(t(c,d,l,o),c.url&&c.url!==d.url){e.playlistParsingError=ui(`media sequence mismatch ${d.sn}:`,i,e,c,d);return}else if(c.cc!==d.cc){e.playlistParsingError=ui(`discontinuity sequence mismatch (${c.cc}!=${d.cc})`,i,e,c,d);return}}}}function ui(i,e,t,n,r){return new Error(`${i} ${r.url}
Playlist starting @${e.startSN}
${e.m3u8}
Playlist starting @${t.startSN}
${t.m3u8}`)}function Fr(i,e,t=!0){const n=e.startSN+e.skippedSegments-i.startSN,r=i.fragments,s=n>=0;let a=0;if(s&&n<r.length)a=r[n].start;else if(s&&e.startSN===i.endSN+1)a=i.fragmentEnd;else if(s&&t)a=i.fragmentStart+n*e.levelTargetDuration;else if(!e.skippedSegments&&e.fragmentStart===0)a=i.fragmentStart;else return;Br(e,a)}function Br(i,e){if(e){const t=i.fragments;for(let n=i.skippedSegments;n<t.length;n++)t[n].addStart(e);i.fragmentHint&&i.fragmentHint.addStart(e)}}function Gr(i,e=1/0){let t=1e3*i.targetduration;if(i.updated){const n=i.fragments;if(n.length&&t*4>e){const s=n[n.length-1].duration*1e3;s<t&&(t=s)}}else t/=2;return Math.round(t)}function ri(i,e,t){if(!i)return null;let n=i.fragments[e-i.startSN];return n||(n=i.fragmentHint,n&&n.sn===e)?n:e<i.startSN&&t&&t.sn===e?t:null}function ai(i,e,t){return i?qr(i.partList,e,t):null}function qr(i,e,t){if(i)for(let n=i.length;n--;){const r=i[n];if(r.index===t&&r.fragment.sn===e)return r}return null}function bi(i){i.forEach((e,t)=>{var n;(n=e.details)==null||n.fragments.forEach(r=>{r.level=t,r.initSegment&&(r.initSegment.level=t)})})}function gi(i,e){for(let n=0,r=i.length;n<r;n++){var t;if(((t=i[n])==null?void 0:t.cc)===e)return i[n]}return null}function Ni(i,e){return!!(i&&e.startCC<i.endCC&&e.endCC>i.startCC)}function Vr(i,e){if(i){const t=i.start+e;i.start=i.startPTS=t,i.endPTS=t+i.duration}}function vi(i,e){const t=e.fragments;for(let n=0,r=t.length;n<r;n++)Vr(t[n],i);e.fragmentHint&&Vr(e.fragmentHint,i),e.alignedSliding=!0}function ji(i,e){i&&(ki(e,i),!e.alignedSliding&&i&&Hi(e,i),!e.alignedSliding&&i&&!e.skippedSegments&&Fr(i,e,!1))}function ki(i,e){if(!Ni(e,i))return;const t=Math.min(e.endCC,i.endCC),n=gi(e.fragments,t),r=gi(i.fragments,t);if(!n||!r)return;j.log(`Aligning playlist at start of dicontinuity sequence ${t}`);const s=n.start-r.start;vi(s,i)}function Hi(i,e){if(!i.hasProgramDateTime||!e.hasProgramDateTime)return;const t=i.fragments,n=e.fragments;if(!t.length||!n.length)return;let r,s;const a=Math.min(e.endCC,i.endCC);e.startCC<a&&i.startCC<a&&(r=gi(n,a),s=gi(t,a)),(!r||!s)&&(r=n[Math.floor(n.length/2)],s=gi(t,r.cc)||t[Math.floor(t.length/2)]);const o=r.programDateTime,u=s.programDateTime;if(!o||!u)return;const l=(u-o)/1e3-(s.start-r.start);vi(l,i)}const Xs={toString:function(i){let e="";const t=i.length;for(let n=0;n<t;n++)e+=`[${i.start(n).toFixed(3)}-${i.end(n).toFixed(3)}]`;return e}},jt={STOPPED:"STOPPED",IDLE:"IDLE",KEY_LOADING:"KEY_LOADING",FRAG_LOADING:"FRAG_LOADING",FRAG_LOADING_WAITING_RETRY:"FRAG_LOADING_WAITING_RETRY",WAITING_TRACK:"WAITING_TRACK",PARSING:"PARSING",PARSED:"PARSED",ENDED:"ENDED",ERROR:"ERROR",WAITING_INIT_PTS:"WAITING_INIT_PTS",WAITING_LEVEL:"WAITING_LEVEL"};class Hr extends dn{constructor(e,t,n,r,s){super(r,e.logger),this.hls=void 0,this.fragPrevious=null,this.fragCurrent=null,this.fragmentTracker=void 0,this.transmuxer=null,this._state=jt.STOPPED,this.playlistType=void 0,this.media=null,this.mediaBuffer=null,this.config=void 0,this.bitrateTest=!1,this.lastCurrentTime=0,this.nextLoadPosition=0,this.startPosition=0,this.startTimeOffset=null,this.retryDate=0,this.levels=null,this.fragmentLoader=void 0,this.keyLoader=void 0,this.levelLastLoaded=null,this.startFragRequested=!1,this.decrypter=void 0,this.initPTS=[],this.buffering=!0,this.loadingParts=!1,this.loopSn=void 0,this.onMediaSeeking=()=>{const{config:a,fragCurrent:o,media:u,mediaBuffer:l,state:c}=this,d=u?u.currentTime:0,g=ln.bufferInfo(l||u,d,a.maxBufferHole),w=!g.len;if(this.log(`Media seeking to ${P(d)?d.toFixed(3):d}, state: ${c}, ${w?"out of":"in"} buffer`),this.state===jt.ENDED)this.resetLoadingState();else if(o){const y=a.maxFragLookUpTolerance,O=o.start-y,H=o.start+o.duration+y;if(w||H<g.start||O>g.end){const Ae=d>H;(d<O||Ae)&&(Ae&&o.loader&&(this.log(`Cancelling fragment load for seek (sn: ${o.sn})`),o.abortRequests(),this.resetLoadingState()),this.fragPrevious=null)}}if(u){this.fragmentTracker.removeFragmentsInRange(d,1/0,this.playlistType,!0);const y=this.lastCurrentTime;if(d>y&&(this.lastCurrentTime=d),!this.loadingParts){const O=Math.max(g.end,d),H=this.shouldLoadParts(this.getLevelDetails(),O);H&&(this.log(`LL-Part loading ON after seeking to ${d.toFixed(2)} with buffer @${O.toFixed(2)}`),this.loadingParts=H)}}this.hls.hasEnoughToStart||(this.log(`Setting ${w?"startPosition":"nextLoadPosition"} to ${d} for seek without enough to start`),this.nextLoadPosition=d,w&&(this.startPosition=d)),this.tickImmediate()},this.onMediaEnded=()=>{this.log("setting startPosition to 0 because media ended"),this.startPosition=this.lastCurrentTime=0},this.playlistType=s,this.hls=e,this.fragmentLoader=new An(e.config),this.keyLoader=n,this.fragmentTracker=t,this.config=e.config,this.decrypter=new Qt(e.config)}registerListeners(){const{hls:e}=this;e.on(f.MEDIA_ATTACHED,this.onMediaAttached,this),e.on(f.MEDIA_DETACHING,this.onMediaDetaching,this),e.on(f.MANIFEST_LOADING,this.onManifestLoading,this),e.on(f.MANIFEST_LOADED,this.onManifestLoaded,this),e.on(f.ERROR,this.onError,this)}unregisterListeners(){const{hls:e}=this;e.off(f.MEDIA_ATTACHED,this.onMediaAttached,this),e.off(f.MEDIA_DETACHING,this.onMediaDetaching,this),e.off(f.MANIFEST_LOADING,this.onManifestLoading,this),e.off(f.MANIFEST_LOADED,this.onManifestLoaded,this),e.off(f.ERROR,this.onError,this)}doTick(){this.onTickEnd()}onTickEnd(){}startLoad(e){}stopLoad(){if(this.state===jt.STOPPED)return;this.fragmentLoader.abort(),this.keyLoader.abort(this.playlistType);const e=this.fragCurrent;e!=null&&e.loader&&(e.abortRequests(),this.fragmentTracker.removeFragment(e)),this.resetTransmuxer(),this.fragCurrent=null,this.fragPrevious=null,this.clearInterval(),this.clearNextTick(),this.state=jt.STOPPED}get startPositionValue(){const{nextLoadPosition:e,startPosition:t}=this;return t===-1&&e?e:t}get bufferingEnabled(){return this.buffering}pauseBuffering(){this.buffering=!1}resumeBuffering(){this.buffering=!0}get inFlightFrag(){return{frag:this.fragCurrent,state:this.state}}_streamEnded(e,t){if(t.live||!this.media)return!1;const n=e.end||0,r=this.config.timelineOffset||0;if(n<=r)return!1;const s=e.buffered;this.config.maxBufferHole&&s&&s.length>1&&(e=ln.bufferedInfo(s,e.start,0));const a=e.nextStart;if(a&&a>r&&a<t.edge||this.media.currentTime<e.start)return!1;const u=t.partList;if(u!=null&&u.length){const c=u[u.length-1];return ln.isBuffered(this.media,c.start+c.duration/2)}const l=t.fragments[t.fragments.length-1].type;return this.fragmentTracker.isEndListAppended(l)}getLevelDetails(){if(this.levels&&this.levelLastLoaded!==null){var e;return(e=this.levelLastLoaded)==null?void 0:e.details}}get timelineOffset(){const e=this.config.timelineOffset;if(e){var t;return((t=this.getLevelDetails())==null?void 0:t.appliedTimelineOffset)||e}return 0}onMediaAttached(e,t){const n=this.media=this.mediaBuffer=t.media;n.removeEventListener("seeking",this.onMediaSeeking),n.removeEventListener("ended",this.onMediaEnded),n.addEventListener("seeking",this.onMediaSeeking),n.addEventListener("ended",this.onMediaEnded);const r=this.config;this.levels&&r.autoStartLoad&&this.state===jt.STOPPED&&this.startLoad(r.startPosition)}onMediaDetaching(e,t){const n=!!t.transferMedia,r=this.media;if(r!==null){if(r.ended&&(this.log("MSE detaching and video ended, reset startPosition"),this.startPosition=this.lastCurrentTime=0),r.removeEventListener("seeking",this.onMediaSeeking),r.removeEventListener("ended",this.onMediaEnded),this.keyLoader&&!n&&this.keyLoader.detach(),this.media=this.mediaBuffer=null,this.loopSn=void 0,n){this.resetLoadingState(),this.resetTransmuxer();return}this.loadingParts=!1,this.fragmentTracker.removeAllFragments(),this.stopLoad()}}onManifestLoading(){this.initPTS=[],this.levels=this.levelLastLoaded=this.fragCurrent=null,this.lastCurrentTime=this.startPosition=0,this.startFragRequested=!1}onError(e,t){}onManifestLoaded(e,t){this.startTimeOffset=t.startTimeOffset}onHandlerDestroying(){this.stopLoad(),this.transmuxer&&(this.transmuxer.destroy(),this.transmuxer=null),super.onHandlerDestroying(),this.hls=this.onMediaSeeking=this.onMediaEnded=null}onHandlerDestroyed(){this.state=jt.STOPPED,this.fragmentLoader&&this.fragmentLoader.destroy(),this.keyLoader&&this.keyLoader.destroy(),this.decrypter&&this.decrypter.destroy(),this.hls=this.log=this.warn=this.decrypter=this.keyLoader=this.fragmentLoader=this.fragmentTracker=null,super.onHandlerDestroyed()}loadFragment(e,t,n){this.startFragRequested=!0,this._loadFragForPlayback(e,t,n)}_loadFragForPlayback(e,t,n){const r=s=>{const a=s.frag;if(this.fragContextChanged(a)){this.warn(`${a.type} sn: ${a.sn}${s.part?" part: "+s.part.index:""} of ${this.fragInfo(a,!1,s.part)}) was dropped during download.`),this.fragmentTracker.removeFragment(a);return}a.stats.chunkCount++,this._handleFragmentLoadProgress(s)};this._doFragLoad(e,t,n,r).then(s=>{if(!s)return;const a=this.state,o=s.frag;if(this.fragContextChanged(o)){(a===jt.FRAG_LOADING||!this.fragCurrent&&a===jt.PARSING)&&(this.fragmentTracker.removeFragment(o),this.state=jt.IDLE);return}"payload"in s&&(this.log(`Loaded ${o.type} sn: ${o.sn} of ${this.playlistLabel()} ${o.level}`),this.hls.trigger(f.FRAG_LOADED,s)),this._handleFragmentLoadComplete(s)}).catch(s=>{this.state===jt.STOPPED||this.state===jt.ERROR||(this.warn(`Frag error: ${(s==null?void 0:s.message)||s}`),this.resetFragmentLoading(e))})}clearTrackerIfNeeded(e){var t;const{fragmentTracker:n}=this;if(n.getState(e)===Te.APPENDING){const s=e.type,a=this.getFwdBufferInfo(this.mediaBuffer,s),o=Math.max(e.duration,a?a.len:this.config.maxBufferLength),u=this.backtrackFragment;((u?e.sn-u.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)===Te.PARTIAL&&n.removeFragment(e))}checkLiveUpdate(e){if(e.updated&&!e.live){const t=e.fragments[e.fragments.length-1];this.fragmentTracker.detectPartialFragments({frag:t,part:null,stats:t.stats,id:t.type})}e.fragments[0]||(e.deltaUpdateFailed=!0)}waitForLive(e){const t=e.details;return(t==null?void 0:t.live)&&t.type!=="EVENT"&&(this.levelLastLoaded!==e||t.expired)}flushMainBuffer(e,t,n=null){if(!(e-t))return;const r={startOffset:e,endOffset:t,type:n};this.hls.trigger(f.BUFFER_FLUSHING,r)}_loadInitSegment(e,t){this._doFragLoad(e,t).then(n=>{const r=n==null?void 0:n.frag;if(!r||this.fragContextChanged(r)||!this.levels)throw new Error("init load aborted");return n}).then(n=>{const{hls:r}=this,{frag:s,payload:a}=n,o=s.decryptdata;if(a&&a.byteLength>0&&o!=null&&o.key&&o.iv&&ii(o.method)){const u=self.performance.now();return this.decrypter.decrypt(new Uint8Array(a),o.key.buffer,o.iv.buffer,Xr(o.method)).catch(l=>{throw r.trigger(f.ERROR,{type:se.MEDIA_ERROR,details:U.FRAG_DECRYPT_ERROR,fatal:!1,error:l,reason:l.message,frag:s}),l}).then(l=>{const c=self.performance.now();return r.trigger(f.FRAG_DECRYPTED,{frag:s,payload:l,stats:{tstart:u,tdecrypt:c}}),n.payload=l,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.STOPPED&&(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){const n=this.mediaBuffer?this.mediaBuffer:this.media;if(this.log(`Buffered ${e.type} sn: ${e.sn}${t?" part: "+t.index:""} of ${this.fragInfo(e,!1,t)} > buffer:${n?Xs.toString(ln.getBuffered(n)):"(detached)"})`),Ue(e)){var r;if(e.type!==ee.SUBTITLE){const a=e.elementaryStreams;if(!Object.keys(a).some(o=>!!a[o])){this.state=jt.IDLE;return}}const s=(r=this.levels)==null?void 0:r[e.level];s!=null&&s.fragmentError&&(this.log(`Resetting level fragment error count of ${s.fragmentError} on frag buffered`),s.fragmentError=0)}this.state=jt.IDLE}_handleFragmentLoadComplete(e){const{transmuxer:t}=this;if(!t)return;const{frag:n,part:r,partsLoaded:s}=e,a=!s||s.length===0||s.some(u=>!u),o=new Xn(n.level,n.sn,n.stats.chunkCount+1,0,r?r.index:-1,!a);t.flush(o)}_handleFragmentLoadProgress(e){}_doFragLoad(e,t,n=null,r){var s;this.fragCurrent=e;const a=t==null?void 0:t.details;if(!this.levels||!a)throw new Error(`frag load aborted, missing level${a?"":" detail"}s`);let o=null;e.encrypted&&!((s=e.decryptdata)!=null&&s.key)?(this.log(`Loading key for ${e.sn} of [${a.startSN}-${a.endSN}], ${this.playlistLabel()} ${e.level}`),this.state=jt.KEY_LOADING,this.fragCurrent=e,o=this.keyLoader.load(e).then(d=>{if(!this.fragContextChanged(d.frag))return this.hls.trigger(f.KEY_LOADED,d),this.state===jt.KEY_LOADING&&(this.state=jt.IDLE),d}),this.hls.trigger(f.KEY_LOADING,{frag:e}),this.fragCurrent===null&&(o=Promise.reject(new Error("frag load aborted, context changed in KEY_LOADING")))):e.encrypted||(o=this.keyLoader.loadClear(e,a.encryptedFragments,this.startFragRequested),o&&this.log("[eme] blocking frag load until media-keys acquired"));const u=this.fragPrevious;if(Ue(e)&&(!u||e.sn!==u.sn)){const d=this.shouldLoadParts(t.details,e.end);d!==this.loadingParts&&(this.log(`LL-Part loading ${d?"ON":"OFF"} loading sn ${u==null?void 0:u.sn}->${e.sn}`),this.loadingParts=d)}if(n=Math.max(e.start,n||0),this.loadingParts&&Ue(e)){const d=a.partList;if(d&&r){n>e.end&&a.fragmentHint&&(e=a.fragmentHint);const g=this.getNextPart(d,e,n);if(g>-1){const w=d[g];e=this.fragCurrent=w.fragment,this.log(`Loading ${e.type} sn: ${e.sn} part: ${w.index} (${g}/${d.length-1}) of ${this.fragInfo(e,!1,w)}) cc: ${e.cc} [${a.startSN}-${a.endSN}], target: ${parseFloat(n.toFixed(3))}`),this.nextLoadPosition=w.start+w.duration,this.state=jt.FRAG_LOADING;let y;return o?y=o.then(O=>!O||this.fragContextChanged(O.frag)?null:this.doFragPartsLoad(e,w,t,r)).catch(O=>this.handleFragLoadError(O)):y=this.doFragPartsLoad(e,w,t,r).catch(O=>this.handleFragLoadError(O)),this.hls.trigger(f.FRAG_LOADING,{frag:e,part:w,targetBufferTime:n}),this.fragCurrent===null?Promise.reject(new Error("frag load aborted, context changed in FRAG_LOADING parts")):y}else if(!e.url||this.loadedEndOfParts(d,n))return Promise.resolve(null)}}if(Ue(e)&&this.loadingParts)this.log(`LL-Part loading OFF after next part miss @${n.toFixed(2)}`),this.loadingParts=!1;else if(!e.url)return Promise.resolve(null);this.log(`Loading ${e.type} sn: ${e.sn} of ${this.fragInfo(e,!1)}) cc: ${e.cc} ${a?"["+a.startSN+"-"+a.endSN+"]":""}, target: ${parseFloat(n.toFixed(3))}`),P(e.sn)&&!this.bitrateTest&&(this.nextLoadPosition=e.start+e.duration),this.state=jt.FRAG_LOADING;const l=this.config.progressive;let c;return l&&o?c=o.then(d=>!d||this.fragContextChanged(d==null?void 0:d.frag)?null:this.fragmentLoader.load(e,r)).catch(d=>this.handleFragLoadError(d)):c=Promise.all([this.fragmentLoader.load(e,l?r:void 0),o]).then(([d])=>(!l&&d&&r&&r(d),d)).catch(d=>this.handleFragLoadError(d)),this.hls.trigger(f.FRAG_LOADING,{frag:e,targetBufferTime:n}),this.fragCurrent===null?Promise.reject(new Error("frag load aborted, context changed in FRAG_LOADING")):c}doFragPartsLoad(e,t,n,r){return new Promise((s,a)=>{var o;const u=[],l=(o=n.details)==null?void 0:o.partList,c=d=>{this.fragmentLoader.loadPart(e,d,r).then(g=>{u[d.index]=g;const w=g.part;this.hls.trigger(f.FRAG_LOADED,g);const y=ai(n.details,e.sn,d.index+1)||qr(l,e.sn,d.index+1);if(y)c(y);else return s({frag:e,part:w,partsLoaded:u})}).catch(a)};c(t)})}handleFragLoadError(e){if("data"in e){const t=e.data;e.data&&t.details===U.INTERNAL_ABORTED?this.handleFragLoadAborted(t.frag,t.part):this.hls.trigger(f.ERROR,t)}else this.hls.trigger(f.ERROR,{type:se.OTHER_ERROR,details:U.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:s}=t,a=self.performance.now();n.stats.parsing.end=a,r&&(r.stats.parsing.end=a);const o=this.getLevelDetails(),l=o&&n.sn>o.endSN||this.shouldLoadParts(o,n.end);l!==this.loadingParts&&(this.log(`LL-Part loading ${l?"ON":"OFF"} after parsing segment ending @${n.end.toFixed(2)}`),this.loadingParts=l),this.updateLevelTiming(n,r,s,e.partial)}shouldLoadParts(e,t){if(this.config.lowLatencyMode){if(!e)return this.loadingParts;if(e!=null&&e.partList){var n;const s=e.partList[0],a=s.end+(((n=e.fragmentHint)==null?void 0:n.duration)||0);if(t>=a){var r;if((this.hls.hasEnoughToStart?((r=this.media)==null?void 0:r.currentTime)||this.lastCurrentTime:this.getLoadPosition())>s.start-s.fragment.duration)return!0}}}return!1}getCurrentContext(e){const{levels:t,fragCurrent:n}=this,{level:r,sn:s,part:a}=e;if(!(t!=null&&t[r]))return this.warn(`Levels object was unset while buffering fragment ${s} of ${this.playlistLabel()} ${r}. The current chunk will not be buffered.`),null;const o=t[r],u=o.details,l=a>-1?ai(u,s,a):null,c=l?l.fragment:ri(u,s,n);return c?(n&&n!==c&&(c.stats=n.stats),{frag:c,part:l,level:o}):null}bufferFragmentData(e,t,n,r,s){var a;if(!e||this.state!==jt.PARSING)return;const{data1:o,data2:u}=e;let l=o;if(o&&u&&(l=Le(o,u)),!((a=l)!=null&&a.length))return;const c=this.initPTS[t.cc],d=c?-c.baseTime/c.timescale:void 0,g={type:e.type,frag:t,part:n,chunkMeta:r,offset:d,parent:t.type,data:l};if(this.hls.trigger(f.BUFFER_APPENDING,g),e.dropped&&e.independent&&!n){if(s)return;this.flushBufferGap(t)}}flushBufferGap(e){const t=this.media;if(!t)return;if(!ln.isBuffered(t,t.currentTime)){this.flushMainBuffer(0,e.start);return}const n=t.currentTime,r=ln.bufferInfo(t,n,0),s=e.duration,a=Math.min(this.config.maxFragLookUpTolerance*2,s*.25),o=Math.max(Math.min(e.start-a,r.end-a),n+a);e.start-o>a&&this.flushMainBuffer(o,e.start)}getFwdBufferInfo(e,t){var n;const r=this.getLoadPosition();if(!P(r))return null;const a=this.lastCurrentTime>r||(n=this.media)!=null&&n.paused?0:this.config.maxBufferHole;return this.getFwdBufferInfoAtPos(e,r,t,a)}getFwdBufferInfoAtPos(e,t,n,r){const s=ln.bufferInfo(e,t,r);if(s.len===0&&s.nextStart!==void 0){const a=this.fragmentTracker.getBufferedFrag(t,n);if(a&&(s.nextStart<=a.end||a.gap)){const o=Math.max(Math.min(s.nextStart,a.end)-t,r);return ln.bufferInfo(e,t,o)}}return s}getMaxBufferLength(e){const{config:t}=this;let n;return e?n=Math.max(8*t.maxBufferSize/e,t.maxBufferLength):n=t.maxBufferLength,Math.min(n,t.maxMaxBufferLength)}reduceMaxBufferLength(e,t){const n=this.config,r=Math.max(Math.min(e-t,n.maxBufferLength),t),s=Math.max(e-t*3,n.maxMaxBufferLength/2,r);return s>=r?(n.maxMaxBufferLength=s,this.warn(`Reduce max buffer length to ${s}s`),!0):!1}getAppendedFrag(e,t=ee.MAIN){var n;const r=(n=this.fragmentTracker)==null?void 0:n.getAppendedFrag(e,t);return r&&"fragment"in r?r.fragment:r}getNextFragment(e,t){const n=t.fragments,r=n.length;if(!r)return null;const{config:s}=this,a=n[0].start,o=s.lowLatencyMode&&!!t.partList;let u=null;if(t.live){const d=s.initialLiveManifestSize;if(r<d)return this.warn(`Not enough fragments to start playback (have: ${r}, need: ${d})`),null;if(!t.PTSKnown&&!this.startFragRequested&&this.startPosition===-1||e<a){var l;o&&!this.loadingParts&&(this.log("LL-Part loading ON for initial live fragment"),this.loadingParts=!0),u=this.getInitialLiveFragment(t);const g=this.hls.startPosition,w=this.hls.liveSyncPosition,y=u?(g!==-1&&g>=a?g:w)||u.start:e;this.log(`Setting startPosition to ${y} to match start frag at live edge. mainStart: ${g} liveSyncPosition: ${w} frag.start: ${(l=u)==null?void 0:l.start}`),this.startPosition=this.nextLoadPosition=y}}else e<=a&&(u=n[0]);if(!u){const d=this.loadingParts?t.partEnd:t.fragmentEnd;u=this.getFragmentAtPosition(e,d,t)}let c=this.filterReplacedPrimary(u,t);if(!c&&u){const d=u.sn-t.startSN;c=this.filterReplacedPrimary(n[d+1]||null,t)}return this.mapToInitFragWhenRequired(c)}isLoopLoading(e,t){const n=this.fragmentTracker.getState(e);return(n===Te.OK||n===Te.PARTIAL&&!!e.gap)&&this.nextLoadPosition>t}getNextFragmentLoopLoading(e,t,n,r,s){let a=null;if(e.gap&&(a=this.getNextFragment(this.nextLoadPosition,t),a&&!a.gap&&n.nextStart)){const o=this.getFwdBufferInfoAtPos(this.mediaBuffer?this.mediaBuffer:this.media,n.nextStart,r,0);if(o!==null&&n.len+o.len>=s){const u=a.sn;return this.loopSn!==u&&(this.log(`buffer full after gaps in "${r}" playlist starting at sn: ${u}`),this.loopSn=u),null}}return this.loopSn=void 0,a}get primaryPrefetch(){if(Wr(this.hls.config)){var e,t;if((e=this.hls.interstitialsManager)==null||(t=e.playingItem)==null?void 0:t.event)return!0}return!1}filterReplacedPrimary(e,t){if(!e)return e;if(Wr(this.hls.config)&&e.type!==ee.SUBTITLE){const n=this.hls.interstitialsManager,r=n==null?void 0:n.bufferingItem;if(r){const a=r.event;if(a){if(a.appendInPlace||Math.abs(e.start-r.start)>1||r.start===0)return null}else if(e.end<=r.start&&(t==null?void 0:t.live)===!1||e.start>r.end&&r.nextEvent&&(r.nextEvent.appendInPlace||e.start-r.end>1))return null}const s=n==null?void 0:n.playerQueue;if(s)for(let a=s.length;a--;){const o=s[a].interstitial;if(o.appendInPlace&&e.start>=o.startTime&&e.end<=o.resumeTime)return null}}return e}mapToInitFragWhenRequired(e){return e!=null&&e.initSegment&&!(e!=null&&e.initSegment.data)&&!this.bitrateTest?e.initSegment:e}getNextPart(e,t,n){let r=-1,s=!1,a=!0;for(let o=0,u=e.length;o<u;o++){const l=e[o];if(a=a&&!l.independent,r>-1&&n<l.start)break;const c=l.loaded;c?r=-1:(s||l.independent||a)&&l.fragment===t&&(r=o),s=c}return r}loadedEndOfParts(e,t){const n=e[e.length-1];return n&&t>n.start&&n.loaded}getInitialLiveFragment(e){const t=e.fragments,n=this.fragPrevious;let r=null;if(n){if(e.hasProgramDateTime&&(this.log(`Live playlist, switching playlist, load frag with same PDT: ${n.programDateTime}`),r=En(t,n.endProgramDateTime,this.config.maxFragLookUpTolerance)),!r){const s=n.sn+1;if(s>=e.startSN&&s<=e.endSN){const a=t[s-e.startSN];n.cc===a.cc&&(r=a,this.log(`Live playlist, switching playlist, load frag with next SN: ${r.sn}`))}r||(r=ye(e,n.cc,n.end),r&&this.log(`Live playlist, switching playlist, load frag with same CC: ${r.sn}`))}}else{const s=this.hls.liveSyncPosition;s!==null&&(r=this.getFragmentAtPosition(s,this.bitrateTest?e.fragmentEnd:e.edge,e))}return r}getFragmentAtPosition(e,t,n){const{config:r}=this;let{fragPrevious:s}=this,{fragments:a,endSN:o}=n;const{fragmentHint:u}=n,{maxFragLookUpTolerance:l}=r,c=n.partList,d=!!(this.loadingParts&&c!=null&&c.length&&u);d&&u&&!this.bitrateTest&&c[c.length-1].fragment.sn===u.sn&&(a=a.concat(u),o=u.sn);let g;if(e<t){var w;const O=e<this.lastCurrentTime||e>t-l||(w=this.media)!=null&&w.paused||!this.startFragRequested?0:l;g=mn(s,a,e,O)}else g=a[a.length-1];if(g){const y=g.sn-n.startSN,O=this.fragmentTracker.getState(g);if((O===Te.OK||O===Te.PARTIAL&&g.gap)&&(s=g),s&&g.sn===s.sn&&(!d||c[0].fragment.sn>g.sn||!n.live&&!d)&&s&&g.level===s.level){const Ae=a[y+1];g.sn<o&&this.fragmentTracker.getState(Ae)!==Te.OK?g=Ae:g=null}}return g}alignPlaylists(e,t,n){const r=e.fragments.length;if(!r)return this.warn("No fragments in live playlist"),0;const s=e.fragmentStart,a=!t,o=e.alignedSliding&&P(s);if(a||!o&&!s){ji(n,e);const u=e.fragmentStart;return this.log(`Live playlist sliding: ${u.toFixed(2)} start-sn: ${t?t.startSN:"na"}->${e.startSN} fragments: ${r}`),u}return s}waitForCdnTuneIn(e){return e.live&&e.canBlockReload&&e.partTarget&&e.tuneInGoal>Math.max(e.partHoldBack,e.partTarget*3)}setStartPosition(e,t){let n=this.startPosition;n<t&&(n=-1);const r=this.timelineOffset;if(n===-1){const s=this.startTimeOffset!==null,a=s?this.startTimeOffset:e.startTimeOffset;a!==null&&P(a)?(n=t+a,a<0&&(n+=e.edge),n=Math.min(Math.max(t,n),t+e.totalduration),this.log(`Setting startPosition to ${n} for start time offset ${a} found in ${s?"multivariant":"media"} playlist`),this.startPosition=n):e.live?(n=this.hls.liveSyncPosition||t,this.log(`Setting startPosition to -1 to start at live edge ${n}`),this.startPosition=-1):(this.log("setting startPosition to 0 by default"),this.startPosition=n=0),this.lastCurrentTime=n+r}this.nextLoadPosition=n+r}getLoadPosition(){var e;const{media:t}=this;let n=0;return(e=this.hls)!=null&&e.hasEnoughToStart&&t?n=t.currentTime:this.nextLoadPosition>=0&&(n=this.nextLoadPosition),n}handleFragLoadAborted(e,t){this.transmuxer&&e.type===this.playlistType&&Ue(e)&&e.stats.aborted&&(this.log(`Fragment ${e.sn}${t?" part "+t.index:""} of ${this.playlistLabel()} ${e.level} was aborted`),this.resetFragmentLoading(e))}resetFragmentLoading(e){(!this.fragCurrent||!this.fragContextChanged(e)&&this.state!==jt.FRAG_LOADING_WAITING_RETRY)&&(this.state=jt.IDLE)}onFragmentOrKeyLoadError(e,t){if(t.chunkMeta&&!t.frag){const y=this.getCurrentContext(t.chunkMeta);y&&(t.frag=y.frag)}const n=t.frag;if(!n||n.type!==e||!this.levels)return;if(this.fragContextChanged(n)){var r;this.warn(`Frag load error must match current frag to retry ${n.url} > ${(r=this.fragCurrent)==null?void 0:r.url}`);return}const s=t.details===U.FRAG_GAP;s&&this.fragmentTracker.fragBuffered(n,!0);const a=t.errorAction,{action:o,flags:u,retryCount:l=0,retryConfig:c}=a||{},d=!!a&&!!c,g=d&&o===St.RetryRequest,w=d&&!a.resolved&&u===$t.MoveAllAlternatesMatchingHost;if(!g&&w&&Ue(n)&&!n.endList)this.resetFragmentErrors(e),this.treatAsGap(n),a.resolved=!0;else if((g||w)&&l<c.maxNumRetry){this.resetStartWhenNotLoaded(this.levelLastLoaded);const y=gt(c,l);this.warn(`Fragment ${n.sn} of ${e} ${n.level} errored with ${t.details}, retrying loading ${l+1}/${c.maxNumRetry} in ${y}ms`),a.resolved=!0,this.retryDate=self.performance.now()+y,this.state=jt.FRAG_LOADING_WAITING_RETRY}else if(c&&a)if(this.resetFragmentErrors(e),l<c.maxNumRetry)!s&&o!==St.RemoveAlternatePermanently&&(a.resolved=!0);else{this.warn(`${t.details} reached or exceeded max retry (${l})`);return}else o===St.SendAlternateToPenaltyBox?this.state=jt.WAITING_LEVEL:this.state=jt.ERROR;this.tickImmediate()}reduceLengthAndFlushBuffer(e){if(this.state===jt.PARSING||this.state===jt.PARSED){const t=e.frag,n=e.parent,r=this.getFwdBufferInfo(this.mediaBuffer,n),s=r&&r.len>.5;s&&this.reduceMaxBufferLength(r.len,(t==null?void 0:t.duration)||10);const a=!s;return a&&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(),a}return!1}resetFragmentErrors(e){e===ee.AUDIO&&(this.fragCurrent=null),this.hls.hasEnoughToStart||(this.startFragRequested=!1),this.state!==jt.STOPPED&&(this.state=jt.IDLE)}afterBufferFlushed(e,t,n){if(!e)return;const r=ln.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.STOPPED&&(this.state=jt.IDLE)}resetStartWhenNotLoaded(e){if(!this.hls.hasEnoughToStart){this.startFragRequested=!1;const t=e?e.details:null;t!=null&&t.live?(this.log("resetting startPosition for live start"),this.startPosition=-1,this.setStartPosition(t,t.fragmentStart),this.resetLoadingState()):this.nextLoadPosition=this.startPosition}}resetWhenMissingContext(e){this.warn(`The loading context changed while buffering fragment ${e.sn} of ${this.playlistLabel()} ${e.level}. This chunk will not be buffered.`),this.removeUnbufferedFrags(),this.resetStartWhenNotLoaded(this.levelLastLoaded),this.resetLoadingState()}removeUnbufferedFrags(e=0){this.fragmentTracker.removeFragmentsInRange(e,1/0,this.playlistType,!1,!0)}updateLevelTiming(e,t,n,r){const s=n.details;if(!s){this.warn("level.details undefined");return}if(!Object.keys(e.elementaryStreams).reduce((u,l)=>{const c=e.elementaryStreams[l];if(c){const d=c.endPTS-c.startPTS;if(d<=0)return this.warn(`Could not parse fragment ${e.sn} ${l} duration reliably (${d})`),u||!1;const g=r?0:li(s,e,c.startPTS,c.endPTS,c.startDTS,c.endDTS);return this.hls.trigger(f.LEVEL_PTS_UPDATED,{details:s,level:n,drift:g,type:l,frag:e,start:c.startPTS,end:c.endPTS}),!0}return u},!1)){var o;if(n.fragmentError===0&&this.treatAsGap(e,n),((o=this.transmuxer)==null?void 0:o.error)===null){const u=new Error(`Found no media in fragment ${e.sn} of ${this.playlistLabel()} ${e.level} resetting transmuxer to fallback to playlist timing`);if(this.warn(u.message),this.hls.trigger(f.ERROR,{type:se.MEDIA_ERROR,details:U.FRAG_PARSING_ERROR,fatal:!1,error:u,frag:e,reason:`Found no media in msn ${e.sn} of ${this.playlistLabel()} "${n.url}"`}),!this.hls)return;this.resetTransmuxer()}}this.state=jt.PARSED,this.log(`Parsed ${e.type} sn: ${e.sn}${t?" part: "+t.index:""} of ${this.fragInfo(e,!1,t)})`),this.hls.trigger(f.FRAG_PARSED,{frag:e,part:t})}playlistLabel(){return this.playlistType===ee.MAIN?"level":"track"}fragInfo(e,t=!0,n){var r,s;return`${this.playlistLabel()} ${e.level} (${n?"part":"frag"}:[${((r=t&&!n?e.startPTS:(n||e).start)!=null?r:NaN).toFixed(3)}-${((s=t&&!n?e.endPTS:(n||e).end)!=null?s:NaN).toFixed(3)}]${n&&e.type==="main"?"INDEPENDENT="+(n.independent?"YES":"NO"):""}`}treatAsGap(e,t){t&&t.fragmentError++,e.gap=!0,this.fragmentTracker.removeFragment(e),this.fragmentTracker.fragBuffered(e,!0)}resetTransmuxer(){var e;(e=this.transmuxer)==null||e.reset()}recoverWorkerError(e){e.event==="demuxerWorker"&&(this.fragmentTracker.removeAllFragments(),this.transmuxer&&(this.transmuxer.destroy(),this.transmuxer=null),this.resetStartWhenNotLoaded(this.levelLastLoaded),this.resetLoadingState())}set state(e){const t=this._state;t!==e&&(this._state=e,this.log(`${t}->${e}`))}get state(){return this._state}}function Wr(i){return!!i.interstitialsController&&i.enableInterstitialPlayback!==!1}class pi{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=hi(e,t);else return new Uint8Array(0);return this.reset(),n}reset(){this.chunks.length=0,this.dataLength=0}}function hi(i,e){const t=new Uint8Array(e);let n=0;for(let r=0;r<i.length;r++){const s=i[r];t.set(s,n),n+=s.length}return t}var Fi={exports:{}},hs;function Ds(){return hs||(hs=1,function(i){var e=Object.prototype.hasOwnProperty,t="~";function n(){}Object.create&&(n.prototype=Object.create(null),new n().__proto__||(t=!1));function r(u,l,c){this.fn=u,this.context=l,this.once=c||!1}function s(u,l,c,d,g){if(typeof c!="function")throw new TypeError("The listener must be a function");var w=new r(c,d||u,g),y=t?t+l:l;return u._events[y]?u._events[y].fn?u._events[y]=[u._events[y],w]:u._events[y].push(w):(u._events[y]=w,u._eventsCount++),u}function a(u,l){--u._eventsCount===0?u._events=new n:delete u._events[l]}function o(){this._events=new n,this._eventsCount=0}o.prototype.eventNames=function(){var l=[],c,d;if(this._eventsCount===0)return l;for(d in c=this._events)e.call(c,d)&&l.push(t?d.slice(1):d);return Object.getOwnPropertySymbols?l.concat(Object.getOwnPropertySymbols(c)):l},o.prototype.listeners=function(l){var c=t?t+l:l,d=this._events[c];if(!d)return[];if(d.fn)return[d.fn];for(var g=0,w=d.length,y=new Array(w);g<w;g++)y[g]=d[g].fn;return y},o.prototype.listenerCount=function(l){var c=t?t+l:l,d=this._events[c];return d?d.fn?1:d.length:0},o.prototype.emit=function(l,c,d,g,w,y){var O=t?t+l:l;if(!this._events[O])return!1;var H=this._events[O],Ae=arguments.length,Ee,we;if(H.fn){switch(H.once&&this.removeListener(l,H.fn,void 0,!0),Ae){case 1:return H.fn.call(H.context),!0;case 2:return H.fn.call(H.context,c),!0;case 3:return H.fn.call(H.context,c,d),!0;case 4:return H.fn.call(H.context,c,d,g),!0;case 5:return H.fn.call(H.context,c,d,g,w),!0;case 6:return H.fn.call(H.context,c,d,g,w,y),!0}for(we=1,Ee=new Array(Ae-1);we<Ae;we++)Ee[we-1]=arguments[we];H.fn.apply(H.context,Ee)}else{var Ze=H.length,rt;for(we=0;we<Ze;we++)switch(H[we].once&&this.removeListener(l,H[we].fn,void 0,!0),Ae){case 1:H[we].fn.call(H[we].context);break;case 2:H[we].fn.call(H[we].context,c);break;case 3:H[we].fn.call(H[we].context,c,d);break;case 4:H[we].fn.call(H[we].context,c,d,g);break;default:if(!Ee)for(rt=1,Ee=new Array(Ae-1);rt<Ae;rt++)Ee[rt-1]=arguments[rt];H[we].fn.apply(H[we].context,Ee)}}return!0},o.prototype.on=function(l,c,d){return s(this,l,c,d,!1)},o.prototype.once=function(l,c,d){return s(this,l,c,d,!0)},o.prototype.removeListener=function(l,c,d,g){var w=t?t+l:l;if(!this._events[w])return this;if(!c)return a(this,w),this;var y=this._events[w];if(y.fn)y.fn===c&&(!g||y.once)&&(!d||y.context===d)&&a(this,w);else{for(var O=0,H=[],Ae=y.length;O<Ae;O++)(y[O].fn!==c||g&&!y[O].once||d&&y[O].context!==d)&&H.push(y[O]);H.length?this._events[w]=H.length===1?H[0]:H:a(this,w)}return this},o.prototype.removeAllListeners=function(l){var c;return l?(c=t?t+l:l,this._events[c]&&a(this,c)):(this._events=new n,this._eventsCount=0),this},o.prototype.off=o.prototype.removeListener,o.prototype.addListener=o.prototype.on,o.prefixed=t,o.EventEmitter=o,i.exports=o}(Fi)),Fi.exports}var Js=Ds(),Yi=X(Js);const Ki="1.6.7",Gi={};function ls(){return typeof __HLS_WORKER_BUNDLE__=="function"}function Fa(){const i=Gi[Ki];if(i)return i.clientCount++,i;const e=new self.Blob([`var exports={};var module={exports:exports};function define(f){f()};define.amd=true;(${__HLS_WORKER_BUNDLE__.toString()})(true);`],{type:"text/javascript"}),t=self.URL.createObjectURL(e),r={worker:new self.Worker(t),objectURL:t,clientCount:1};return Gi[Ki]=r,r}function Ia(i){const e=Gi[i];if(e)return e.clientCount++,e;const t=new self.URL(i,self.location.href).href,r={worker:new self.Worker(t),scriptURL:t,clientCount:1};return Gi[i]=r,r}function Da(i){const e=Gi[i||Ki];if(e&&e.clientCount--===1){const{worker:n,objectURL:r}=e;delete Gi[i||Ki],r&&self.URL.revokeObjectURL(r),n.terminate()}}function ua(i,e){return e+10<=i.length&&i[e]===51&&i[e+1]===68&&i[e+2]===73&&i[e+3]<255&&i[e+4]<255&&i[e+6]<128&&i[e+7]<128&&i[e+8]<128&&i[e+9]<128}function ca(i,e){return e+10<=i.length&&i[e]===73&&i[e+1]===68&&i[e+2]===51&&i[e+3]<255&&i[e+4]<255&&i[e+6]<128&&i[e+7]<128&&i[e+8]<128&&i[e+9]<128}function qs(i,e){let t=0;return t=(i[e]&127)<<21,t|=(i[e+1]&127)<<14,t|=(i[e+2]&127)<<7,t|=i[e+3]&127,t}function Ls(i,e){const t=e;let n=0;for(;ca(i,e);){n+=10;const r=qs(i,e+6);n+=r,ua(i,e+10)&&(n+=10),e+=n}if(n>0)return i.subarray(t,t+n)}function gs(i,e,t,n){const r=[96e3,88200,64e3,48e3,44100,32e3,24e3,22050,16e3,12e3,11025,8e3,7350],s=e[t+2],a=s>>2&15;if(a>12){const w=new Error(`invalid ADTS sampling index:${a}`);i.emit(f.ERROR,f.ERROR,{type:se.MEDIA_ERROR,details:U.FRAG_PARSING_ERROR,fatal:!0,error:w,reason:w.message});return}const o=(s>>6&3)+1,u=e[t+3]>>6&3|(s&1)<<2,l="mp4a.40."+o,c=r[a];let d=a;(o===5||o===29)&&(d-=3);const g=[o<<3|(d&14)>>1,(d&1)<<7|u<<3];return j.log(`manifest codec:${n}, parsed codec:${l}, channels:${u}, rate:${c} (ADTS object type:${o} sampling index:${a})`),{config:g,samplerate:c,channelCount:u,codec:l,parsedCodec:l,manifestCodec:n}}function Rs(i,e){return i[e]===255&&(i[e+1]&246)===240}function ea(i,e){return i[e+1]&1?7:9}function us(i,e){return(i[e+3]&3)<<11|i[e+4]<<3|(i[e+5]&224)>>>5}function La(i,e){return e+5<i.length}function Us(i,e){return e+1<i.length&&Rs(i,e)}function Ra(i,e){return La(i,e)&&Rs(i,e)&&us(i,e)<=i.length-e}function Ua(i,e){if(Us(i,e)){const t=ea(i,e);if(e+t>=i.length)return!1;const n=us(i,e);if(n<=t)return!1;const r=e+n;return r===i.length||Us(i,r)}return!1}function ks(i,e,t,n,r){if(!i.samplerate){const s=gs(e,t,n,r);if(!s)return;h(i,s)}}function fa(i){return 1024*9e4/i}function da(i,e){const t=ea(i,e);if(e+t<=i.length){const n=us(i,e)-t;if(n>0)return{headerLength:t,frameLength:n}}}function ha(i,e,t,n,r){const s=fa(i.samplerate),a=n+r*s,o=da(e,t);let u;if(o){const{frameLength:d,headerLength:g}=o,w=g+d,y=Math.max(0,t+w-e.length);y?(u=new Uint8Array(w-g),u.set(e.subarray(t+g,e.length),0)):u=e.subarray(t+g,t+w);const O={unit:u,pts:a};return y||i.samples.push(O),{sample:O,length:w,missing:y}}const l=e.length-t;return u=new Uint8Array(l),u.set(e.subarray(t,e.length),0),{sample:{unit:u,pts:a},length:l,missing:-1}}function ga(i,e){return ca(i,e)&&qs(i,e+6)+10<=i.length-e}function Os(i){return i instanceof ArrayBuffer?i:i.byteOffset==0&&i.byteLength==i.buffer.byteLength?i.buffer:new Uint8Array(i).buffer}function pa(i,e=0,t=1/0){return Or(i,e,t,Uint8Array)}function Or(i,e,t,n){const r=Pr(i);let s=1;"BYTES_PER_ELEMENT"in n&&(s=n.BYTES_PER_ELEMENT);const a=_i(i)?i.byteOffset:0,o=(a+i.byteLength)/s,u=(a+e)/s,l=Math.floor(Math.max(0,Math.min(u,o))),c=Math.floor(Math.min(l+Math.max(t,0),o));return new n(r,l,c-l)}function Pr(i){return i instanceof ArrayBuffer?i:i.buffer}function _i(i){return i&&i.buffer instanceof ArrayBuffer&&i.byteLength!==void 0&&i.byteOffset!==void 0}function Ci(i){const e={key:i.type,description:"",data:"",mimeType:null,pictureType:null},t=3;if(i.size<2)return;if(i.data[0]!==t){console.log("Ignore frame with unrecognized character encoding");return}const n=i.data.subarray(1).indexOf(0);if(n===-1)return;const r=pe(pa(i.data,1,n)),s=i.data[2+n],a=i.data.subarray(3+n).indexOf(0);if(a===-1)return;const o=pe(pa(i.data,3+n,a));let u;return r==="-->"?u=pe(pa(i.data,4+n+a)):u=Os(i.data.subarray(4+n+a)),e.mimeType=r,e.pictureType=s,e.description=o,e.data=u,e}function yi(i){if(i.size<2)return;const e=pe(i.data,!0),t=new Uint8Array(i.data.subarray(e.length+1));return{key:i.type,info:e,data:t.buffer}}function Es(i){if(i.size<2)return;if(i.type==="TXXX"){let t=1;const n=pe(i.data.subarray(t),!0);t+=n.length+1;const r=pe(i.data.subarray(t));return{key:i.type,info:n,data:r}}const e=pe(i.data.subarray(1));return{key:i.type,info:"",data:e}}function ps(i){if(i.type==="WXXX"){if(i.size<2)return;let t=1;const n=pe(i.data.subarray(t),!0);t+=n.length+1;const r=pe(i.data.subarray(t));return{key:i.type,info:n,data:r}}const e=pe(i.data);return{key:i.type,info:"",data:e}}function ms(i){return i.type==="PRIV"?yi(i):i.type[0]==="W"?ps(i):i.type==="APIC"?Ci(i):Es(i)}function Ps(i){const e=String.fromCharCode(i[0],i[1],i[2],i[3]),t=qs(i,4),n=10;return{type:e,size:t,data:i.subarray(n,n+t)}}const ws=10,_l=10;function uA(i){let e=0;const t=[];for(;ca(i,e);){const n=qs(i,e+6);i[e+5]>>6&1&&(e+=ws),e+=ws;const r=e+n;for(;e+_l<r;){const s=Ps(i.subarray(e)),a=ms(s);a&&t.push(a),e+=s.size+ws}ua(i,e)&&(e+=ws)}return t}function cA(i){return i&&i.key==="PRIV"&&i.info==="com.apple.streaming.transportStreamTimestamp"}function yl(i){if(i.data.byteLength===8){const e=new Uint8Array(i.data),t=e[3]&1;let n=(e[4]<<23)+(e[5]<<15)+(e[6]<<7)+e[7];return n/=45,t&&(n+=4772185884e-2),Math.round(n)}}function ta(i){const e=uA(i);for(let t=0;t<e.length;t++){const n=e[t];if(cA(n))return yl(n)}}let Vi=function(i){return i.audioId3="org.id3",i.dateRange="com.apple.quicktime.HLS",i.emsg="https://aomedia.org/emsg/ID3",i.misbklv="urn:misb:KLV:bin:1910.1",i}({});function cs(i="",e=9e4){return{type:i,id:-1,pid:-1,inputTimeScale:e,sequenceNumber:-1,samples:[],dropped:0}}class ka{constructor(){this._audioTrack=void 0,this._id3Track=void 0,this.frameIndex=0,this.cachedData=null,this.basePTS=null,this.initPTS=null,this.lastPTS=null}resetInitSegment(e,t,n,r){this._id3Track={type:"id3",id:3,pid:-1,inputTimeScale:9e4,sequenceNumber:0,samples:[],dropped:0}}resetTimeStamp(e){this.initPTS=e,this.resetContiguity()}resetContiguity(){this.basePTS=null,this.lastPTS=null,this.frameIndex=0}canParse(e,t){return!1}appendFrame(e,t,n){}demux(e,t){this.cachedData&&(e=Le(this.cachedData,e),this.cachedData=null);let n=Ls(e,0),r=n?n.length:0,s;const a=this._audioTrack,o=this._id3Track,u=n?ta(n):void 0,l=e.length;for((this.basePTS===null||this.frameIndex===0&&P(u))&&(this.basePTS=El(u,t,this.initPTS),this.lastPTS=this.basePTS),this.lastPTS===null&&(this.lastPTS=this.basePTS),n&&n.length>0&&o.samples.push({pts:this.lastPTS,dts:this.lastPTS,data:n,type:Vi.audioId3,duration:Number.POSITIVE_INFINITY});r<l;){if(this.canParse(e,r)){const c=this.appendFrame(a,e,r);c?(this.frameIndex++,this.lastPTS=c.sample.pts,r+=c.length,s=r):r=l}else ga(e,r)?(n=Ls(e,r),o.samples.push({pts:this.lastPTS,dts:this.lastPTS,data:n,type:Vi.audioId3,duration:Number.POSITIVE_INFINITY}),r+=n.length,s=r):r++;if(r===l&&s!==l){const c=e.slice(s);this.cachedData?this.cachedData=Le(this.cachedData,c):this.cachedData=c}}return{audioTrack:a,videoTrack:cs(),id3Track:o,textTrack:cs()}}demuxSampleAes(e,t,n){return Promise.reject(new Error(`[${this}] This demuxer does not support Sample-AES decryption`))}flush(e){const t=this.cachedData;return t&&(this.cachedData=null,this.demux(t,0)),{audioTrack:this._audioTrack,videoTrack:cs(),id3Track:this._id3Track,textTrack:cs()}}destroy(){this.cachedData=null,this._audioTrack=this._id3Track=void 0}}const El=(i,e,t)=>{if(P(i))return i*90;const n=t?t.baseTime*9e4/t.timescale:0;return e*9e4+n};let Oa=null;const po=[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],Pa=[44100,48e3,32e3,22050,24e3,16e3,11025,12e3,8e3],wl=[[0,72,144,12],[0,0,0,0],[0,72,144,12],[0,144,144,12]],Bl=[0,1,1,4];function fA(i,e,t,n,r){if(t+24>e.length)return;const s=dA(e,t);if(s&&t+s.frameLength<=e.length){const a=s.samplesPerFrame*9e4/s.sampleRate,o=n+r*a,u={unit:e.subarray(t,t+s.frameLength),pts:o,dts:o};return i.config=[],i.channelCount=s.channelCount,i.samplerate=s.sampleRate,i.samples.push(u),{sample:u,length:s.frameLength,missing:0}}}function dA(i,e){const t=i[e+1]>>3&3,n=i[e+1]>>1&3,r=i[e+2]>>4&15,s=i[e+2]>>2&3;if(t!==1&&r!==0&&r!==15&&s!==3){const a=i[e+2]>>1&1,o=i[e+3]>>6,u=t===3?3-n:n===3?3:4,l=po[u*14+r-1]*1e3,d=Pa[(t===3?0:t===2?1:2)*3+s],g=o===3?1:2,w=wl[t][n],y=Bl[n],O=w*8*y,H=Math.floor(w*l/d+a)*y;if(Oa===null){const we=(navigator.userAgent||"").match(/Chrome\/(\d+)/i);Oa=we?parseInt(we[1]):0}return!!Oa&&Oa<=87&&n===2&&l>=224e3&&o===0&&(i[e+3]=i[e+3]|128),{sampleRate:d,channelCount:g,frameLength:H,samplesPerFrame:O}}}function mo(i,e){return i[e]===255&&(i[e+1]&224)===224&&(i[e+1]&6)!==0}function hA(i,e){return e+1<i.length&&mo(i,e)}function Qa(i,e){return mo(i,e)&&4<=i.length-e}function gA(i,e){if(e+1<i.length&&mo(i,e)){const n=dA(i,e);let r=4;n!=null&&n.frameLength&&(r=n.frameLength);const s=e+r;return s===i.length||hA(i,s)}return!1}class bl extends ka{constructor(e,t){super(),this.observer=void 0,this.config=void 0,this.observer=e,this.config=t}resetInitSegment(e,t,n,r){super.resetInitSegment(e,t,n,r),this._audioTrack={container:"audio/adts",type:"audio",id:2,pid:-1,sequenceNumber:0,segmentCodec:"aac",samples:[],manifestCodec:t,duration:r,inputTimeScale:9e4,dropped:0}}static probe(e,t){if(!e)return!1;const n=Ls(e,0);let r=(n==null?void 0:n.length)||0;if(gA(e,r))return!1;for(let s=e.length;r<s;r++)if(Ua(e,r))return t.log("ADTS sync word found !"),!0;return!1}canParse(e,t){return Ra(e,t)}appendFrame(e,t,n){ks(e,this.observer,t,n,e.manifestCodec);const r=ha(e,t,n,this.basePTS,this.frameIndex);if(r&&r.missing===0)return r}}const pA=(i,e)=>{let t=0,n=5;e+=n;const r=new Uint32Array(1),s=new Uint32Array(1),a=new Uint8Array(1);for(;n>0;){a[0]=i[e];const o=Math.min(n,8),u=8-o;s[0]=4278190080>>>24+u<<u,r[0]=(a[0]&s[0])>>u,t=t?t<<o|r[0]:r[0],e+=1,n-=o}return t};class Cl extends ka{constructor(e){super(),this.observer=void 0,this.observer=e}resetInitSegment(e,t,n,r){super.resetInitSegment(e,t,n,r),this._audioTrack={container:"audio/ac-3",type:"audio",id:2,pid:-1,sequenceNumber:0,segmentCodec:"ac3",samples:[],manifestCodec:t,duration:r,inputTimeScale:9e4,dropped:0}}canParse(e,t){return t+64<e.length}appendFrame(e,t,n){const r=mA(e,t,n,this.basePTS,this.frameIndex);if(r!==-1)return{sample:e.samples[e.samples.length-1],length:r,missing:0}}static probe(e){if(!e)return!1;const t=Ls(e,0);if(!t)return!1;const n=t.length;return e[n]===11&&e[n+1]===119&&ta(t)!==void 0&&pA(e,n)<16}}function mA(i,e,t,n,r){if(t+8>e.length||e[t]!==11||e[t+1]!==119)return-1;const s=e[t+4]>>6;if(s>=3)return-1;const o=[48e3,44100,32e3][s],u=e[t+4]&63,c=[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][u*3+s]*2;if(t+c>e.length)return-1;const d=e[t+6]>>5;let g=0;d===2?g+=2:(d&1&&d!==1&&(g+=2),d&4&&(g+=2));const w=(e[t+6]<<8|e[t+7])>>12-g&1,O=[2,1,2,3,3,4,4,5][d]+w,H=e[t+5]>>3,Ae=e[t+5]&7,Ee=new Uint8Array([s<<6|H<<1|Ae>>2,(Ae&3)<<6|d<<3|w<<2|u>>4,u<<4&224]),we=1536/o*9e4,Ze=n+r*we,rt=e.subarray(t,t+c);return i.config=Ee,i.channelCount=O,i.samplerate=o,i.samples.push({unit:rt,pts:Ze}),c}class xl extends ka{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=Ls(e,0);let n=(t==null?void 0:t.length)||0;if(t&&e[n]===11&&e[n+1]===119&&ta(t)!==void 0&&pA(e,n)<=16)return!1;for(let r=e.length;n<r;n++)if(gA(e,n))return j.log("MPEG Audio sync word found !"),!0;return!1}canParse(e,t){return Qa(e,t)}appendFrame(e,t,n){if(this.basePTS!==null)return fA(e,t,n,this.basePTS,this.frameIndex)}}const Sl=/\/emsg[-/]ID3/i;class Tl{constructor(e,t){this.remainderData=null,this.timeOffset=0,this.config=void 0,this.videoTrack=void 0,this.audioTrack=void 0,this.id3Track=void 0,this.txtTrack=void 0,this.config=t}resetTimeStamp(){}resetInitSegment(e,t,n,r){const s=this.videoTrack=cs("video",1),a=this.audioTrack=cs("audio",1),o=this.txtTrack=cs("text",1);if(this.id3Track=cs("id3",1),this.timeOffset=0,!(e!=null&&e.byteLength))return;const u=De(e);if(u.video){const{id:l,timescale:c,codec:d,supplemental:g}=u.video;s.id=l,s.timescale=o.timescale=c,s.codec=d,s.supplemental=g}if(u.audio){const{id:l,timescale:c,codec:d}=u.audio;a.id=l,a.timescale=c,a.codec=d}o.id=Gt.text,s.sampleDuration=0,s.duration=a.duration=r}resetContiguity(){this.remainderData=null}static probe(e){return _e(e)}demux(e,t){this.timeOffset=t;let n=e;const r=this.videoTrack,s=this.txtTrack;if(this.config.progressive){this.remainderData&&(n=Le(this.remainderData,e));const o=ke(n);this.remainderData=o.remainder,r.samples=o.valid||new Uint8Array}else r.samples=n;const a=this.extractID3Track(r,t);return s.samples=mt(t,r),{videoTrack:r,audioTrack:this.audioTrack,id3Track:a,textTrack:this.txtTrack}}flush(){const e=this.timeOffset,t=this.videoTrack,n=this.txtTrack;t.samples=this.remainderData||new Uint8Array,this.remainderData=null;const r=this.extractID3Track(t,this.timeOffset);return n.samples=mt(e,t),{videoTrack:t,audioTrack:cs(),id3Track:r,textTrack:cs()}}extractID3Track(e,t){const n=this.id3Track;if(e.samples.length){const r=N(e.samples,["emsg"]);r&&r.forEach(s=>{const a=It(s);if(Sl.test(a.schemeIdUri)){const o=vA(a,t);let u=a.eventDuration===4294967295?Number.POSITIVE_INFINITY:a.eventDuration/a.timeScale;u<=.001&&(u=Number.POSITIVE_INFINITY);const l=a.payload;n.samples.push({data:l,len:l.byteLength,dts:o,pts:o,type:Vi.emsg,duration:u})}else if(this.config.enableEmsgKLVMetadata&&a.schemeIdUri.startsWith("urn:misb:KLV:bin:1910.1")){const o=vA(a,t);n.samples.push({data:a.payload,len:a.payload.byteLength,dts:o,pts:o,type:Vi.misbklv,duration:Number.POSITIVE_INFINITY})}})}return n}demuxSampleAes(e,t,n){return Promise.reject(new Error("The MP4 demuxer does not support SAMPLE-AES decryption"))}destroy(){this.config=null,this.remainderData=null,this.videoTrack=this.audioTrack=this.id3Track=this.txtTrack=void 0}}function vA(i,e){return P(i.presentationTime)?i.presentationTime/i.timeScale:e+i.presentationTimeDelta/i.timeScale}class Fl{constructor(e,t,n){this.keyData=void 0,this.decrypter=void 0,this.keyData=n,this.decrypter=new Qt(t,{removePKCS7Padding:!1})}decryptBuffer(e){return this.decrypter.decrypt(e,this.keyData.key.buffer,this.keyData.iv.buffer,yt.cbc)}decryptAacSample(e,t,n){const r=e[t].unit;if(r.length<=16)return;const s=r.subarray(16,r.length-r.length%16),a=s.buffer.slice(s.byteOffset,s.byteOffset+s.length);this.decryptBuffer(a).then(o=>{const u=new Uint8Array(o);r.set(u,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 s=32;s<e.length-16;s+=160,r+=16)n.set(e.subarray(s,s+16),r);return n}getAvcDecryptedUnit(e,t){const n=new Uint8Array(t);let r=0;for(let s=32;s<e.length-16;s+=160,r+=16)e.set(n.subarray(r,r+16),s);return e}decryptAvcSample(e,t,n,r,s){const a=Nt(s.data),o=this.getAvcEncryptedData(a);this.decryptBuffer(o.buffer).then(u=>{s.data=this.getAvcDecryptedUnit(a,u),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 s=e[t].units;for(;!(n>=s.length);n++){const a=s[n];if(!(a.data.length<=48||a.type!==1&&a.type!==5)&&(this.decryptAvcSample(e,t,n,r,a),!this.decrypter.isSync()))return}}}}class _A{constructor(){this.VideoSample=null}createVideoSample(e,t,n){return{key:e,frame:!1,pts:t,dts:n,units:[],length:0}}getLastNalUnit(e){var t;let n=this.VideoSample,r;if((!n||n.units.length===0)&&(n=e[e.length-1]),(t=n)!=null&&t.units){const s=n.units;r=s[s.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 s=n[r-1];e.pts=s.pts,e.dts=s.dts}else{t.dropped++;return}}t.samples.push(e)}}parseNALu(e,t,n){const r=t.byteLength;let s=e.naluState||0;const a=s,o=[];let u=0,l,c,d,g=-1,w=0;for(s===-1&&(g=0,w=this.getNALuType(t,0),s=0,u=1);u<r;){if(l=t[u++],!s){s=l?0:1;continue}if(s===1){s=l?0:2;continue}if(!l)s=3;else if(l===1){if(c=u-s-1,g>=0){const y={data:t.subarray(g,c),type:w};o.push(y)}else{const y=this.getLastNalUnit(e.samples);y&&(a&&u<=4-a&&y.state&&(y.data=y.data.subarray(0,y.data.byteLength-a)),c>0&&(y.data=Le(y.data,t.subarray(0,c)),y.state=0))}u<r?(d=this.getNALuType(t,u),g=u,w=d,s=0):s=-1}else s=0}if(g>=0&&s>=0){const y={data:t.subarray(g,r),type:w,state:s};o.push(y)}if(o.length===0){const y=this.getLastNalUnit(e.samples);y&&(y.data=Le(y.data,t))}return e.naluState=s,o}}class ma{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),s=Math.min(4,t);if(s===0)throw new Error("no bytes available");r.set(e.subarray(n,n+s)),this.word=new DataView(r.buffer).getUint32(0),this.bitsAvailable=s*8,this.bytesAvailable-=s}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&&j.error("Cannot read more than 32 bits at a time"),this.bitsAvailable-=t,this.bitsAvailable>0)this.word<<=t;else if(this.bytesAvailable>0)this.loadWord();else throw new Error("no bits available");return t=e-t,t>0&&this.bitsAvailable?n<<t|this.readBits(t):n}skipLZ(){let e;for(e=0;e<this.bitsAvailable;++e)if(this.word&2147483648>>>e)return this.word<<=e,this.bitsAvailable-=e,e;return this.loadWord(),e+this.skipLZ()}skipUEG(){this.skipBits(1+this.skipLZ())}skipEG(){this.skipBits(1+this.skipLZ())}readUEG(){const e=this.skipLZ();return this.readBits(e+1)-1}readEG(){const e=this.readUEG();return 1&e?1+e>>>1:-1*(e>>>1)}readBoolean(){return this.readBits(1)===1}readUByte(){return this.readBits(8)}readUShort(){return this.readBits(16)}readUInt(){return this.readBits(32)}}class vo extends _A{parsePES(e,t,n,r){const s=this.parseNALu(e,n.data,r);let a=this.VideoSample,o,u=!1;n.data=null,a&&s.length&&!e.audFound&&(this.pushAccessUnit(a,e),a=this.VideoSample=this.createVideoSample(!1,n.pts,n.dts)),s.forEach(l=>{var c,d;switch(l.type){case 1:{let O=!1;o=!0;const H=l.data;if(u&&H.length>4){const Ae=this.readSliceType(H);(Ae===2||Ae===4||Ae===7||Ae===9)&&(O=!0)}if(O){var g;(g=a)!=null&&g.frame&&!a.key&&(this.pushAccessUnit(a,e),a=this.VideoSample=null)}a||(a=this.VideoSample=this.createVideoSample(!0,n.pts,n.dts)),a.frame=!0,a.key=O;break}case 5:o=!0,(c=a)!=null&&c.frame&&!a.key&&(this.pushAccessUnit(a,e),a=this.VideoSample=null),a||(a=this.VideoSample=this.createVideoSample(!0,n.pts,n.dts)),a.key=!0,a.frame=!0;break;case 6:{o=!0,ut(l.data,1,n.pts,t.samples);break}case 7:{var w,y;o=!0,u=!0;const O=l.data,H=this.readSPS(O);if(!e.sps||e.width!==H.width||e.height!==H.height||((w=e.pixelRatio)==null?void 0:w[0])!==H.pixelRatio[0]||((y=e.pixelRatio)==null?void 0:y[1])!==H.pixelRatio[1]){e.width=H.width,e.height=H.height,e.pixelRatio=H.pixelRatio,e.sps=[O];const Ae=O.subarray(1,4);let Ee="avc1.";for(let we=0;we<3;we++){let Ze=Ae[we].toString(16);Ze.length<2&&(Ze="0"+Ze),Ee+=Ze}e.codec=Ee}break}case 8:o=!0,e.pps=[l.data];break;case 9:o=!0,e.audFound=!0,(d=a)!=null&&d.frame&&(this.pushAccessUnit(a,e),a=null),a||(a=this.VideoSample=this.createVideoSample(!1,n.pts,n.dts));break;case 12:o=!0;break;default:o=!1;break}a&&o&&a.units.push(l)}),r&&a&&(this.pushAccessUnit(a,e),this.VideoSample=null)}getNALuType(e,t){return e[t]&31}readSliceType(e){const t=new ma(e);return t.readUByte(),t.readUEG(),t.readUEG()}skipScalingList(e,t){let n=8,r=8,s;for(let a=0;a<e;a++)r!==0&&(s=t.readEG(),r=(n+s+256)%256),n=r===0?n:r}readSPS(e){const t=new ma(e);let n=0,r=0,s=0,a=0,o,u,l;const c=t.readUByte.bind(t),d=t.readBits.bind(t),g=t.readUEG.bind(t),w=t.readBoolean.bind(t),y=t.skipBits.bind(t),O=t.skipEG.bind(t),H=t.skipUEG.bind(t),Ae=this.skipScalingList.bind(this);c();const Ee=c();if(d(5),y(3),c(),H(),Ee===100||Ee===110||Ee===122||Ee===244||Ee===44||Ee===83||Ee===86||Ee===118||Ee===128){const wt=g();if(wt===3&&y(1),H(),H(),y(1),w())for(u=wt!==3?8:12,l=0;l<u;l++)w()&&(l<6?Ae(16,t):Ae(64,t))}H();const we=g();if(we===0)g();else if(we===1)for(y(1),O(),O(),o=g(),l=0;l<o;l++)O();H(),y(1);const Ze=g(),rt=g(),pt=d(1);pt===0&&y(1),y(1),w()&&(n=g(),r=g(),s=g(),a=g());let At=[1,1];if(w()&&w())switch(c()){case 1:At=[1,1];break;case 2:At=[12,11];break;case 3:At=[10,11];break;case 4:At=[16,11];break;case 5:At=[40,33];break;case 6:At=[24,11];break;case 7:At=[20,11];break;case 8:At=[32,11];break;case 9:At=[80,33];break;case 10:At=[18,11];break;case 11:At=[15,11];break;case 12:At=[64,33];break;case 13:At=[160,99];break;case 14:At=[4,3];break;case 15:At=[3,2];break;case 16:At=[2,1];break;case 255:{At=[c()<<8|c(),c()<<8|c()];break}}return{width:Math.ceil((Ze+1)*16-n*2-r*2),height:(2-pt)*(rt+1)*16-(pt?2:4)*(s+a),pixelRatio:At}}}class yA extends _A{constructor(...e){super(...e),this.initVPS=null}parsePES(e,t,n,r){const s=this.parseNALu(e,n.data,r);let a=this.VideoSample,o,u=!1;n.data=null,a&&s.length&&!e.audFound&&(this.pushAccessUnit(a,e),a=this.VideoSample=this.createVideoSample(!1,n.pts,n.dts)),s.forEach(l=>{var c,d;switch(l.type){case 0:case 1:case 2:case 3:case 4:case 5:case 6:case 7:case 8:case 9:a||(a=this.VideoSample=this.createVideoSample(!1,n.pts,n.dts)),a.frame=!0,o=!0;break;case 16:case 17:case 18:case 21:if(o=!0,u){var g;(g=a)!=null&&g.frame&&!a.key&&(this.pushAccessUnit(a,e),a=this.VideoSample=null)}a||(a=this.VideoSample=this.createVideoSample(!0,n.pts,n.dts)),a.key=!0,a.frame=!0;break;case 19:case 20:o=!0,(c=a)!=null&&c.frame&&!a.key&&(this.pushAccessUnit(a,e),a=this.VideoSample=null),a||(a=this.VideoSample=this.createVideoSample(!0,n.pts,n.dts)),a.key=!0,a.frame=!0;break;case 39:o=!0,ut(l.data,2,n.pts,t.samples);break;case 32:o=!0,e.vps||(typeof e.params!="object"&&(e.params={}),e.params=h(e.params,this.readVPS(l.data)),this.initVPS=l.data),e.vps=[l.data];break;case 33:if(o=!0,u=!0,e.vps!==void 0&&e.vps[0]!==this.initVPS&&e.sps!==void 0&&!this.matchSPS(e.sps[0],l.data)&&(this.initVPS=e.vps[0],e.sps=e.pps=void 0),!e.sps){const w=this.readSPS(l.data);e.width=w.width,e.height=w.height,e.pixelRatio=w.pixelRatio,e.codec=w.codecString,e.sps=[],typeof e.params!="object"&&(e.params={});for(const y in w.params)e.params[y]=w.params[y]}this.pushParameterSet(e.sps,l.data,e.vps),a||(a=this.VideoSample=this.createVideoSample(!0,n.pts,n.dts)),a.key=!0;break;case 34:if(o=!0,typeof e.params=="object"){if(!e.pps){e.pps=[];const w=this.readPPS(l.data);for(const y in w)e.params[y]=w[y]}this.pushParameterSet(e.pps,l.data,e.vps)}break;case 35:o=!0,e.audFound=!0,(d=a)!=null&&d.frame&&(this.pushAccessUnit(a,e),a=null),a||(a=this.VideoSample=this.createVideoSample(!1,n.pts,n.dts));break;default:o=!1;break}a&&o&&a.units.push(l)}),r&&a&&(this.pushAccessUnit(a,e),this.VideoSample=null)}pushParameterSet(e,t,n){(n&&n[0]===this.initVPS||!n&&!e.length)&&e.push(t)}getNALuType(e,t){return(e[t]&126)>>>1}ebsp2rbsp(e){const t=new Uint8Array(e.byteLength);let n=0;for(let r=0;r<e.byteLength;r++)r>=2&&e[r]===3&&e[r-1]===0&&e[r-2]===0||(t[n]=e[r],n++);return new Uint8Array(t.buffer,0,n)}pushAccessUnit(e,t){super.pushAccessUnit(e,t),this.initVPS&&(this.initVPS=null)}readVPS(e){const t=new ma(e);t.readUByte(),t.readUByte(),t.readBits(4),t.skipBits(2),t.readBits(6);const n=t.readBits(3),r=t.readBoolean();return{numTemporalLayers:n+1,temporalIdNested:r}}readSPS(e){const t=new ma(this.ebsp2rbsp(e));t.readUByte(),t.readUByte(),t.readBits(4);const n=t.readBits(3);t.readBoolean();const r=t.readBits(2),s=t.readBoolean(),a=t.readBits(5),o=t.readUByte(),u=t.readUByte(),l=t.readUByte(),c=t.readUByte(),d=t.readUByte(),g=t.readUByte(),w=t.readUByte(),y=t.readUByte(),O=t.readUByte(),H=t.readUByte(),Ae=t.readUByte(),Ee=[],we=[];for(let jr=0;jr<n;jr++)Ee.push(t.readBoolean()),we.push(t.readBoolean());if(n>0)for(let jr=n;jr<8;jr++)t.readBits(2);for(let jr=0;jr<n;jr++)Ee[jr]&&(t.readUByte(),t.readUByte(),t.readUByte(),t.readUByte(),t.readUByte(),t.readUByte(),t.readUByte(),t.readUByte(),t.readUByte(),t.readUByte(),t.readUByte()),we[jr]&&t.readUByte();t.readUEG();const Ze=t.readUEG();Ze==3&&t.skipBits(1);const rt=t.readUEG(),pt=t.readUEG(),At=t.readBoolean();let wt=0,_t=0,ct=0,fn=0;At&&(wt+=t.readUEG(),_t+=t.readUEG(),ct+=t.readUEG(),fn+=t.readUEG());const Rn=t.readUEG(),$n=t.readUEG(),jn=t.readUEG(),ir=t.readBoolean();for(let jr=ir?0:n;jr<=n;jr++)t.skipUEG(),t.skipUEG(),t.skipUEG();if(t.skipUEG(),t.skipUEG(),t.skipUEG(),t.skipUEG(),t.skipUEG(),t.skipUEG(),t.readBoolean()&&t.readBoolean())for(let Qi=0;Qi<4;Qi++)for(let fs=0;fs<(Qi===3?2:6);fs++)if(!t.readBoolean())t.readUEG();else{const ys=Math.min(64,1<<4+(Qi<<1));Qi>1&&t.readEG();for(let go=0;go<ys;go++)t.readEG()}t.readBoolean(),t.readBoolean(),t.readBoolean()&&(t.readUByte(),t.skipUEG(),t.skipUEG(),t.readBoolean());const Hn=t.readUEG();let yr=0;for(let jr=0;jr<Hn;jr++){let Qi=!1;if(jr!==0&&(Qi=t.readBoolean()),Qi){jr===Hn&&t.readUEG(),t.readBoolean(),t.readUEG();let fs=0;for(let Sa=0;Sa<=yr;Sa++){const ys=t.readBoolean();let go=!1;ys||(go=t.readBoolean()),(ys||go)&&fs++}yr=fs}else{const fs=t.readUEG(),Sa=t.readUEG();yr=fs+Sa;for(let ys=0;ys<fs;ys++)t.readUEG(),t.readBoolean();for(let ys=0;ys<Sa;ys++)t.readUEG(),t.readBoolean()}}if(t.readBoolean()){const jr=t.readUEG();for(let Qi=0;Qi<jr;Qi++){for(let fs=0;fs<jn+4;fs++)t.readBits(1);t.readBits(1)}}let Zn=0,Qn=1,Lr=1,kr=!0,Qr=1,Nr=0;t.readBoolean(),t.readBoolean();let oi=!1;if(t.readBoolean()){if(t.readBoolean()){const Ta=t.readUByte(),Xu=[1,12,10,16,40,24,20,32,80,18,15,64,160,4,3,2],vl=[1,11,11,11,33,11,11,11,33,11,11,33,99,3,2,1];Ta>0&&Ta<16?(Qn=Xu[Ta-1],Lr=vl[Ta-1]):Ta===255&&(Qn=t.readBits(16),Lr=t.readBits(16))}if(t.readBoolean()&&t.readBoolean(),t.readBoolean()&&(t.readBits(3),t.readBoolean(),t.readBoolean()&&(t.readUByte(),t.readUByte(),t.readUByte())),t.readBoolean()&&(t.readUEG(),t.readUEG()),t.readBoolean(),t.readBoolean(),t.readBoolean(),oi=t.readBoolean(),oi&&(wt+=t.readUEG(),_t+=t.readUEG(),ct+=t.readUEG(),fn+=t.readUEG()),t.readBoolean()&&(Qr=t.readBits(32),Nr=t.readBits(32),t.readBoolean()&&t.readUEG(),t.readBoolean())){const vl=t.readBoolean(),Ju=t.readBoolean();let AA=!1;(vl||Ju)&&(AA=t.readBoolean(),AA&&(t.readUByte(),t.readBits(5),t.readBoolean(),t.readBits(5)),t.readBits(4),t.readBits(4),AA&&t.readBits(4),t.readBits(5),t.readBits(5),t.readBits(5));for(let qu=0;qu<=n;qu++){kr=t.readBoolean();const ac=kr||t.readBoolean();let ec=!1;ac?t.readEG():ec=t.readBoolean();const tc=ec?1:t.readUEG()+1;if(vl)for(let lA=0;lA<tc;lA++)t.readUEG(),t.readUEG(),AA&&(t.readUEG(),t.readUEG()),t.skipBits(1);if(Ju)for(let lA=0;lA<tc;lA++)t.readUEG(),t.readUEG(),AA&&(t.readUEG(),t.readUEG()),t.skipBits(1)}}t.readBoolean()&&(t.readBoolean(),t.readBoolean(),t.readBoolean(),Zn=t.readUEG())}let Pi=rt,os=pt;if(At||oi){let jr=1,Qi=1;Ze===1?jr=Qi=2:Ze==2&&(jr=2),Pi=rt-jr*_t-jr*wt,os=pt-Qi*fn-Qi*ct}const xa=r?["A","B","C"][r]:"",sc=o<<24|u<<16|l<<8|c;let Zu=0;for(let jr=0;jr<32;jr++)Zu=(Zu|(sc>>jr&1)<<31-jr)>>>0;let Wu=Zu.toString(16);return a===1&&Wu==="2"&&(Wu="6"),{codecString:`hvc1.${xa}${a}.${Wu}.${s?"H":"L"}${Ae}.B0`,params:{general_tier_flag:s,general_profile_idc:a,general_profile_space:r,general_profile_compatibility_flags:[o,u,l,c],general_constraint_indicator_flags:[d,g,w,y,O,H],general_level_idc:Ae,bit_depth:Rn+8,bit_depth_luma_minus8:Rn,bit_depth_chroma_minus8:$n,min_spatial_segmentation_idc:Zn,chroma_format_idc:Ze,frame_rate:{fixed:kr,fps:Nr/Qr}},width:Pi,height:os,pixelRatio:[Qn,Lr]}}readPPS(e){const t=new ma(this.ebsp2rbsp(e));t.readUByte(),t.readUByte(),t.skipUEG(),t.skipUEG(),t.skipBits(2),t.skipBits(3),t.skipBits(2),t.skipUEG(),t.skipUEG(),t.skipEG(),t.skipBits(2),t.readBoolean()&&t.skipUEG(),t.skipEG(),t.skipEG(),t.skipBits(4);const r=t.readBoolean(),s=t.readBoolean();let a=1;return s&&r?a=0:s?a=3:r&&(a=2),{parallelismType:a}}matchSPS(e,t){return String.fromCharCode.apply(null,e).substr(3)===String.fromCharCode.apply(null,t).substr(3)}}const wi=188;class Bs{constructor(e,t,n,r){this.logger=void 0,this.observer=void 0,this.config=void 0,this.typeSupported=void 0,this.sampleAes=null,this.pmtParsed=!1,this.audioCodec=void 0,this.videoCodec=void 0,this._pmtId=-1,this._videoTrack=void 0,this._audioTrack=void 0,this._id3Track=void 0,this._txtTrack=void 0,this.aacOverFlow=null,this.remainderData=null,this.videoParser=void 0,this.observer=e,this.config=t,this.typeSupported=n,this.logger=r,this.videoParser=null}static probe(e,t){const n=Bs.syncOffset(e);return n>0&&t.warn(`MPEG2-TS detected but first sync word found @ offset ${n}`),n!==-1}static syncOffset(e){const t=e.length;let n=Math.min(wi*5,t-wi)+1,r=0;for(;r<n;){let s=!1,a=-1,o=0;for(let u=r;u<t;u+=wi)if(e[u]===71&&(t-u===wi||e[u+wi]===71)){if(o++,a===-1&&(a=u,a!==0&&(n=Math.min(a+wi*99,e.length-wi)+1)),s||(s=Qs(e,u)===0),s&&o>1&&(a===0&&o>2||u+wi>n))return a}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:Gt[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=Bs.createTrack("video"),this._videoTrack.duration=r,this._audioTrack=Bs.createTrack("audio",r),this._id3Track=Bs.createTrack("id3"),this._txtTrack=Bs.createTrack("text"),this._audioTrack.segmentCodec="aac",this.aacOverFlow=null,this.remainderData=null,this.audioCodec=t,this.videoCodec=n}resetTimeStamp(){}resetContiguity(){const{_audioTrack:e,_videoTrack:t,_id3Track:n}=this;e&&(e.pesData=null),t&&(t.pesData=null),n&&(n.pesData=null),this.aacOverFlow=null,this.remainderData=null}demux(e,t,n=!1,r=!1){n||(this.sampleAes=null);let s;const a=this._videoTrack,o=this._audioTrack,u=this._id3Track,l=this._txtTrack;let c=a.pid,d=a.pesData,g=o.pid,w=u.pid,y=o.pesData,O=u.pesData,H=null,Ae=this.pmtParsed,Ee=this._pmtId,we=e.length;if(this.remainderData&&(e=Le(this.remainderData,e),we=e.length,this.remainderData=null),we<wi&&!r)return this.remainderData=e,{audioTrack:o,videoTrack:a,id3Track:u,textTrack:l};const Ze=Math.max(0,Bs.syncOffset(e));we-=(we-Ze)%wi,we<e.byteLength&&!r&&(this.remainderData=new Uint8Array(e.buffer,we,e.buffer.byteLength-we));let rt=0;for(let At=Ze;At<we;At+=wi)if(e[At]===71){const wt=!!(e[At+1]&64),_t=Qs(e,At),ct=(e[At+3]&48)>>4;let fn;if(ct>1){if(fn=At+5+e[At+4],fn===At+wi)continue}else fn=At+4;switch(_t){case c:if(wt){if(d&&(s=na(d,this.logger))){if(this.videoParser===null)switch(a.segmentCodec){case"avc":this.videoParser=new vo;break;case"hevc":this.videoParser=new yA;break}this.videoParser!==null&&this.videoParser.parsePES(a,l,s,!1)}d={data:[],size:0}}d&&(d.data.push(e.subarray(fn,At+wi)),d.size+=At+wi-fn);break;case g:if(wt){if(y&&(s=na(y,this.logger)))switch(o.segmentCodec){case"aac":this.parseAACPES(o,s);break;case"mp3":this.parseMPEGPES(o,s);break;case"ac3":this.parseAC3PES(o,s);break}y={data:[],size:0}}y&&(y.data.push(e.subarray(fn,At+wi)),y.size+=At+wi-fn);break;case w:wt&&(O&&(s=na(O,this.logger))&&this.parseID3PES(u,s),O={data:[],size:0}),O&&(O.data.push(e.subarray(fn,At+wi)),O.size+=At+wi-fn);break;case 0:wt&&(fn+=e[fn]+1),Ee=this._pmtId=Il(e,fn);break;case Ee:{wt&&(fn+=e[fn]+1);const Rn=Dl(e,fn,this.typeSupported,n,this.observer,this.logger);c=Rn.videoPid,c>0&&(a.pid=c,a.segmentCodec=Rn.segmentVideoCodec),g=Rn.audioPid,g>0&&(o.pid=g,o.segmentCodec=Rn.segmentAudioCodec),w=Rn.id3Pid,w>0&&(u.pid=w),H!==null&&!Ae&&(this.logger.warn(`MPEG-TS PMT found at ${At} after unknown PID '${H}'. Backtracking to sync byte @${Ze} to parse all TS packets.`),H=null,At=Ze-188),Ae=this.pmtParsed=!0;break}case 17:case 8191:break;default:H=_t;break}}else rt++;rt>0&&Ma(this.observer,new Error(`Found ${rt} TS packet/s that do not start with 0x47`),void 0,this.logger),a.pesData=d,o.pesData=y,u.pesData=O;const pt={audioTrack:o,videoTrack:a,id3Track:u,textTrack:l};return r&&this.extractRemainingSamples(pt),pt}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:s}=e,a=n.pesData,o=t.pesData,u=r.pesData;let l;if(a&&(l=na(a,this.logger))){if(this.videoParser===null)switch(n.segmentCodec){case"avc":this.videoParser=new vo;break;case"hevc":this.videoParser=new yA;break}this.videoParser!==null&&(this.videoParser.parsePES(n,s,l,!0),n.pesData=null)}else n.pesData=a;if(o&&(l=na(o,this.logger))){switch(t.segmentCodec){case"aac":this.parseAACPES(t,l);break;case"mp3":this.parseMPEGPES(t,l);break;case"ac3":this.parseAC3PES(t,l);break}t.pesData=null}else o!=null&&o.size&&this.logger.log("last AAC PES packet truncated,might overlap between fragments"),t.pesData=o;u&&(l=na(u,this.logger))?(this.parseID3PES(r,l),r.pesData=null):r.pesData=u}demuxSampleAes(e,t,n){const r=this.demux(e,n,!0,!this.config.progressive),s=this.sampleAes=new Fl(this.observer,this.config,t);return this.decrypt(r,s)}decrypt(e,t){return new Promise(n=>{const{audioTrack:r,videoTrack:s}=e;r.samples&&r.segmentCodec==="aac"?t.decryptAacSamples(r.samples,0,()=>{s.samples?t.decryptAvcSamples(s.samples,0,0,()=>{n(e)}):n(e)}):s.samples&&t.decryptAvcSamples(s.samples,0,0,()=>{n(e)})})}destroy(){this.observer&&this.observer.removeAllListeners(),this.config=this.logger=this.observer=null,this.aacOverFlow=this.videoParser=this.remainderData=this.sampleAes=null,this._videoTrack=this._audioTrack=this._id3Track=this._txtTrack=void 0}parseAACPES(e,t){let n=0;const r=this.aacOverFlow;let s=t.data;if(r){this.aacOverFlow=null;const d=r.missing,g=r.sample.unit.byteLength;if(d===-1)s=Le(r.sample.unit,s);else{const w=g-d;r.sample.unit.set(s.subarray(0,d),w),e.samples.push(r.sample),n=r.missing}}let a,o;for(a=n,o=s.length;a<o-1&&!Us(s,a);a++);if(a!==n){let d;const g=a<o-1;if(g?d=`AAC PES did not start with ADTS header,offset:${a}`:d="No ADTS header found in AAC PES",Ma(this.observer,new Error(d),g,this.logger),!g)return}ks(e,this.observer,s,a,this.audioCodec);let u;if(t.pts!==void 0)u=t.pts;else if(r){const d=fa(e.samplerate);u=r.sample.pts+d}else{this.logger.warn("[tsdemuxer]: AAC PES unknown PTS");return}let l=0,c;for(;a<o;)if(c=ha(e,s,a,u,l),a+=c.length,c.missing){this.aacOverFlow=c;break}else for(l++;a<o-1&&!Us(s,a);a++);}parseMPEGPES(e,t){const n=t.data,r=n.length;let s=0,a=0;const o=t.pts;if(o===void 0){this.logger.warn("[tsdemuxer]: MPEG PES unknown PTS");return}for(;a<r;)if(hA(n,a)){const u=fA(e,n,a,o,s);if(u)a+=u.length,s++;else break}else a++}parseAC3PES(e,t){{const n=t.data,r=t.pts;if(r===void 0){this.logger.warn("[tsdemuxer]: AC3 PES unknown PTS");return}const s=n.length;let a=0,o=0,u;for(;o<s&&(u=mA(e,n,o,r,a++))>0;)o+=u}}parseID3PES(e,t){if(t.pts===void 0){this.logger.warn("[tsdemuxer]: ID3 PES unknown PTS");return}const n=h({},t,{type:this._videoTrack?Vi.emsg:Vi.audioId3,duration:Number.POSITIVE_INFINITY});e.samples.push(n)}}function Qs(i,e){return((i[e+1]&31)<<8)+i[e+2]}function Il(i,e){return(i[e+10]&31)<<8|i[e+11]}function Dl(i,e,t,n,r,s){const a={audioPid:-1,videoPid:-1,id3Pid:-1,segmentVideoCodec:"avc",segmentAudioCodec:"aac"},o=(i[e+1]&15)<<8|i[e+2],u=e+3+o-4,l=(i[e+10]&15)<<8|i[e+11];for(e+=12+l;e<u;){const c=Qs(i,e),d=(i[e+3]&15)<<8|i[e+4];switch(i[e]){case 207:if(!n){_o("ADTS AAC",s);break}case 15:a.audioPid===-1&&(a.audioPid=c);break;case 21:a.id3Pid===-1&&(a.id3Pid=c);break;case 219:if(!n){_o("H.264",s);break}case 27:a.videoPid===-1&&(a.videoPid=c);break;case 3:case 4:!t.mpeg&&!t.mp3?s.log("MPEG audio found, not supported in this browser"):a.audioPid===-1&&(a.audioPid=c,a.segmentAudioCodec="mp3");break;case 193:if(!n){_o("AC-3",s);break}case 129:t.ac3?a.audioPid===-1&&(a.audioPid=c,a.segmentAudioCodec="ac3"):s.log("AC-3 audio found, not supported in this browser");break;case 6:if(a.audioPid===-1&&d>0){let g=e+5,w=d;for(;w>2;){switch(i[g]){case 106:t.ac3!==!0?s.log("AC-3 audio found, not supported in this browser for now"):(a.audioPid=c,a.segmentAudioCodec="ac3");break}const O=i[g+1]+2;g+=O,w-=O}}break;case 194:case 135:return Ma(r,new Error("Unsupported EC-3 in M2TS found"),void 0,s),a;case 36:a.videoPid===-1&&(a.videoPid=c,a.segmentVideoCodec="hevc",s.log("HEVC in M2TS found"));break}e+=d+5}return a}function Ma(i,e,t,n){n.warn(`parsing error: ${e.message}`),i.emit(f.ERROR,f.ERROR,{type:se.MEDIA_ERROR,details:U.FRAG_PARSING_ERROR,fatal:!1,levelRetry:t,error:e,reason:e.message})}function _o(i,e){e.log(`${i} with AES-128-CBC encryption found in unencrypted stream`)}function na(i,e){let t=0,n,r,s,a,o;const u=i.data;if(!i||i.size===0)return null;for(;u[0].length<19&&u.length>1;)u[0]=Le(u[0],u[1]),u.splice(1,1);if(n=u[0],(n[0]<<16)+(n[1]<<8)+n[2]===1){if(r=(n[4]<<8)+n[5],r&&r>i.size-6)return null;const c=n[7];c&192&&(a=(n[9]&14)*536870912+(n[10]&255)*4194304+(n[11]&254)*16384+(n[12]&255)*128+(n[13]&254)/2,c&64?(o=(n[14]&14)*536870912+(n[15]&255)*4194304+(n[16]&254)*16384+(n[17]&255)*128+(n[18]&254)/2,a-o>60*9e4&&(e.warn(`${Math.round((a-o)/9e4)}s delta between PTS and DTS, align them`),a=o)):o=a),s=n[8];let d=s+9;if(i.size<=d)return null;i.size-=d;const g=new Uint8Array(i.size);for(let w=0,y=u.length;w<y;w++){n=u[w];let O=n.byteLength;if(d)if(d>O){d-=O;continue}else n=n.subarray(d),O-=d,d=0;g.set(n,t),t+=O}return r&&(r-=s+3),{data:g,pts:a,dts:o,len:r}}return null}class Ll{static getSilentFrame(e,t){switch(e){case"mp4a.40.2":if(t===1)return new Uint8Array([0,200,0,128,35,128]);if(t===2)return new Uint8Array([33,0,73,144,2,25,0,35,128]);if(t===3)return new Uint8Array([0,200,0,128,32,132,1,38,64,8,100,0,142]);if(t===4)return new Uint8Array([0,200,0,128,32,132,1,38,64,8,100,0,128,44,128,8,2,56]);if(t===5)return new Uint8Array([0,200,0,128,32,132,1,38,64,8,100,0,130,48,4,153,0,33,144,2,56]);if(t===6)return new Uint8Array([0,200,0,128,32,132,1,38,64,8,100,0,130,48,4,153,0,33,144,2,0,178,0,32,8,224]);break;default:if(t===1)return new Uint8Array([1,64,34,128,163,78,230,128,186,8,0,0,0,28,6,241,193,10,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,94]);if(t===2)return new Uint8Array([1,64,34,128,163,94,230,128,186,8,0,0,0,0,149,0,6,241,161,10,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,94]);if(t===3)return new Uint8Array([1,64,34,128,163,94,230,128,186,8,0,0,0,0,149,0,6,241,161,10,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,94]);break}}}const bs=Math.pow(2,32)-1;class Rt{static init(){Rt.types={avc1:[],avcC:[],hvc1:[],hvcC:[],btrt:[],dinf:[],dref:[],esds:[],ftyp:[],hdlr:[],mdat:[],mdhd:[],mdia:[],mfhd:[],minf:[],moof:[],moov:[],mp4a:[],".mp3":[],dac3:[],"ac-3":[],mvex:[],mvhd:[],pasp:[],sdtp:[],stbl:[],stco:[],stsc:[],stsd:[],stsz:[],stts:[],tfdt:[],tfhd:[],traf:[],trak:[],trun:[],trex:[],tkhd:[],vmhd:[],smhd:[]};let e;for(e in Rt.types)Rt.types.hasOwnProperty(e)&&(Rt.types[e]=[e.charCodeAt(0),e.charCodeAt(1),e.charCodeAt(2),e.charCodeAt(3)]);const t=new Uint8Array([0,0,0,0,0,0,0,0,118,105,100,101,0,0,0,0,0,0,0,0,0,0,0,0,86,105,100,101,111,72,97,110,100,108,101,114,0]),n=new Uint8Array([0,0,0,0,0,0,0,0,115,111,117,110,0,0,0,0,0,0,0,0,0,0,0,0,83,111,117,110,100,72,97,110,100,108,101,114,0]);Rt.HDLR_TYPES={video:t,audio:n};const r=new Uint8Array([0,0,0,0,0,0,0,1,0,0,0,12,117,114,108,32,0,0,0,1]),s=new Uint8Array([0,0,0,0,0,0,0,0]);Rt.STTS=Rt.STSC=Rt.STCO=s,Rt.STSZ=new Uint8Array([0,0,0,0,0,0,0,0,0,0,0,0]),Rt.VMHD=new Uint8Array([0,0,0,1,0,0,0,0,0,0,0,0]),Rt.SMHD=new Uint8Array([0,0,0,0,0,0,0,0]),Rt.STSD=new Uint8Array([0,0,0,0,0,0,0,1]);const a=new Uint8Array([105,115,111,109]),o=new Uint8Array([97,118,99,49]),u=new Uint8Array([0,0,0,1]);Rt.FTYP=Rt.box(Rt.types.ftyp,a,u,a,o),Rt.DINF=Rt.box(Rt.types.dinf,Rt.box(Rt.types.dref,r))}static box(e,...t){let n=8,r=t.length;const s=r;for(;r--;)n+=t[r].byteLength;const a=new Uint8Array(n);for(a[0]=n>>24&255,a[1]=n>>16&255,a[2]=n>>8&255,a[3]=n&255,a.set(e,4),r=0,n=8;r<s;r++)a.set(t[r],n),n+=t[r].byteLength;return a}static hdlr(e){return Rt.box(Rt.types.hdlr,Rt.HDLR_TYPES[e])}static mdat(e){return Rt.box(Rt.types.mdat,e)}static mdhd(e,t){t*=e;const n=Math.floor(t/(bs+1)),r=Math.floor(t%(bs+1));return Rt.box(Rt.types.mdhd,new Uint8Array([1,0,0,0,0,0,0,0,0,0,0,2,0,0,0,0,0,0,0,3,e>>24&255,e>>16&255,e>>8&255,e&255,n>>24,n>>16&255,n>>8&255,n&255,r>>24,r>>16&255,r>>8&255,r&255,85,196,0,0]))}static mdia(e){return Rt.box(Rt.types.mdia,Rt.mdhd(e.timescale||0,e.duration||0),Rt.hdlr(e.type),Rt.minf(e))}static mfhd(e){return Rt.box(Rt.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"?Rt.box(Rt.types.minf,Rt.box(Rt.types.smhd,Rt.SMHD),Rt.DINF,Rt.stbl(e)):Rt.box(Rt.types.minf,Rt.box(Rt.types.vmhd,Rt.VMHD),Rt.DINF,Rt.stbl(e))}static moof(e,t,n){return Rt.box(Rt.types.moof,Rt.mfhd(e),Rt.traf(n,t))}static moov(e){let t=e.length;const n=[];for(;t--;)n[t]=Rt.trak(e[t]);return Rt.box.apply(null,[Rt.types.moov,Rt.mvhd(e[0].timescale||0,e[0].duration||0)].concat(n).concat(Rt.mvex(e)))}static mvex(e){let t=e.length;const n=[];for(;t--;)n[t]=Rt.trex(e[t]);return Rt.box.apply(null,[Rt.types.mvex,...n])}static mvhd(e,t){t*=e;const n=Math.floor(t/(bs+1)),r=Math.floor(t%(bs+1)),s=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 Rt.box(Rt.types.mvhd,s)}static sdtp(e){const t=e.samples||[],n=new Uint8Array(4+t.length);let r,s;for(r=0;r<t.length;r++)s=t[r].flags,n[r+4]=s.dependsOn<<4|s.isDependedOn<<2|s.hasRedundancy;return Rt.box(Rt.types.sdtp,n)}static stbl(e){return Rt.box(Rt.types.stbl,Rt.stsd(e),Rt.box(Rt.types.stts,Rt.STTS),Rt.box(Rt.types.stsc,Rt.STSC),Rt.box(Rt.types.stsz,Rt.STSZ),Rt.box(Rt.types.stco,Rt.STCO))}static avc1(e){let t=[],n=[],r,s,a;for(r=0;r<e.sps.length;r++)s=e.sps[r],a=s.byteLength,t.push(a>>>8&255),t.push(a&255),t=t.concat(Array.prototype.slice.call(s));for(r=0;r<e.pps.length;r++)s=e.pps[r],a=s.byteLength,n.push(a>>>8&255),n.push(a&255),n=n.concat(Array.prototype.slice.call(s));const o=Rt.box(Rt.types.avcC,new Uint8Array([1,t[3],t[4],t[5],255,224|e.sps.length].concat(t).concat([e.pps.length]).concat(n))),u=e.width,l=e.height,c=e.pixelRatio[0],d=e.pixelRatio[1];return Rt.box(Rt.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,u>>8&255,u&255,l>>8&255,l&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,Rt.box(Rt.types.btrt,new Uint8Array([0,28,156,128,0,45,198,192,0,45,198,192])),Rt.box(Rt.types.pasp,new Uint8Array([c>>24,c>>16&255,c>>8&255,c&255,d>>24,d>>16&255,d>>8&255,d&255])))}static esds(e){const t=e.config;return new Uint8Array([0,0,0,0,3,25,0,1,0,4,17,64,21,0,0,0,0,0,0,0,0,0,0,0,5,2,...t,6,1,2])}static audioStsd(e){const t=e.samplerate||0;return new Uint8Array([0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,e.channelCount||0,0,16,0,0,0,0,t>>8&255,t&255,0,0])}static mp4a(e){return Rt.box(Rt.types.mp4a,Rt.audioStsd(e),Rt.box(Rt.types.esds,Rt.esds(e)))}static mp3(e){return Rt.box(Rt.types[".mp3"],Rt.audioStsd(e))}static ac3(e){return Rt.box(Rt.types["ac-3"],Rt.audioStsd(e),Rt.box(Rt.types.dac3,e.config))}static stsd(e){const{segmentCodec:t}=e;if(e.type==="audio"){if(t==="aac")return Rt.box(Rt.types.stsd,Rt.STSD,Rt.mp4a(e));if(t==="ac3"&&e.config)return Rt.box(Rt.types.stsd,Rt.STSD,Rt.ac3(e));if(t==="mp3"&&e.codec==="mp3")return Rt.box(Rt.types.stsd,Rt.STSD,Rt.mp3(e))}else if(e.pps&&e.sps){if(t==="avc")return Rt.box(Rt.types.stsd,Rt.STSD,Rt.avc1(e));if(t==="hevc"&&e.vps)return Rt.box(Rt.types.stsd,Rt.STSD,Rt.hvc1(e))}else throw new Error("video track missing pps or sps");throw new Error(`unsupported ${e.type} segment codec (${t}/${e.codec})`)}static tkhd(e){const t=e.id,n=(e.duration||0)*(e.timescale||0),r=e.width||0,s=e.height||0,a=Math.floor(n/(bs+1)),o=Math.floor(n%(bs+1));return Rt.box(Rt.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,a>>24,a>>16&255,a>>8&255,a&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,s>>8&255,s&255,0,0]))}static traf(e,t){const n=Rt.sdtp(e),r=e.id,s=Math.floor(t/(bs+1)),a=Math.floor(t%(bs+1));return Rt.box(Rt.types.traf,Rt.box(Rt.types.tfhd,new Uint8Array([0,0,0,0,r>>24,r>>16&255,r>>8&255,r&255])),Rt.box(Rt.types.tfdt,new Uint8Array([1,0,0,0,s>>24,s>>16&255,s>>8&255,s&255,a>>24,a>>16&255,a>>8&255,a&255])),Rt.trun(e,n.length+16+20+8+16+8+8),n)}static trak(e){return e.duration=e.duration||4294967295,Rt.box(Rt.types.trak,Rt.tkhd(e),Rt.mdia(e))}static trex(e){const t=e.id;return Rt.box(Rt.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,s=12+16*r,a=new Uint8Array(s);let o,u,l,c,d,g;for(t+=8+s,a.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<r;o++)u=n[o],l=u.duration,c=u.size,d=u.flags,g=u.cts,a.set([l>>>24&255,l>>>16&255,l>>>8&255,l&255,c>>>24&255,c>>>16&255,c>>>8&255,c&255,d.isLeading<<2|d.dependsOn,d.isDependedOn<<6|d.hasRedundancy<<4|d.paddingValue<<1|d.isNonSync,d.degradPrio&61440,d.degradPrio&15,g>>>24&255,g>>>16&255,g>>>8&255,g&255],12+16*o);return Rt.box(Rt.types.trun,a)}static initSegment(e){Rt.types||Rt.init();const t=Rt.moov(e);return Le(Rt.FTYP,t)}static hvc1(e){const t=e.params,n=[e.vps,e.sps,e.pps],r=4,s=new Uint8Array([1,t.general_profile_space<<6|(t.general_tier_flag?32:0)|t.general_profile_idc,t.general_profile_compatibility_flags[0],t.general_profile_compatibility_flags[1],t.general_profile_compatibility_flags[2],t.general_profile_compatibility_flags[3],t.general_constraint_indicator_flags[0],t.general_constraint_indicator_flags[1],t.general_constraint_indicator_flags[2],t.general_constraint_indicator_flags[3],t.general_constraint_indicator_flags[4],t.general_constraint_indicator_flags[5],t.general_level_idc,240|t.min_spatial_segmentation_idc>>8,255&t.min_spatial_segmentation_idc,252|t.parallelismType,252|t.chroma_format_idc,248|t.bit_depth_luma_minus8,248|t.bit_depth_chroma_minus8,0,parseInt(t.frame_rate.fps),r-1|t.temporal_id_nested<<2|t.num_temporal_layers<<3|(t.frame_rate.fixed?64:0),n.length]);let a=s.length;for(let y=0;y<n.length;y+=1){a+=3;for(let O=0;O<n[y].length;O+=1)a+=2+n[y][O].length}const o=new Uint8Array(a);o.set(s,0),a=s.length;const u=n.length-1;for(let y=0;y<n.length;y+=1){o.set(new Uint8Array([32+y|(y===u?128:0),0,n[y].length]),a),a+=3;for(let O=0;O<n[y].length;O+=1)o.set(new Uint8Array([n[y][O].length>>8,n[y][O].length&255]),a),a+=2,o.set(n[y][O],a),a+=n[y][O].length}const l=Rt.box(Rt.types.hvcC,o),c=e.width,d=e.height,g=e.pixelRatio[0],w=e.pixelRatio[1];return Rt.box(Rt.types.hvc1,new Uint8Array([0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,c>>8&255,c&255,d>>8&255,d&255,0,72,0,0,0,72,0,0,0,0,0,0,0,1,18,100,97,105,108,121,109,111,116,105,111,110,47,104,108,115,46,106,115,0,0,0,0,0,0,0,0,0,0,0,0,0,0,24,17,17]),l,Rt.box(Rt.types.btrt,new Uint8Array([0,28,156,128,0,45,198,192,0,45,198,192])),Rt.box(Rt.types.pasp,new Uint8Array([g>>24,g>>16&255,g>>8&255,g&255,w>>24,w>>16&255,w>>8&255,w&255])))}}Rt.types=void 0,Rt.HDLR_TYPES=void 0,Rt.STTS=void 0,Rt.STSC=void 0,Rt.STCO=void 0,Rt.STSZ=void 0,Rt.VMHD=void 0,Rt.SMHD=void 0,Rt.STSD=void 0,Rt.FTYP=void 0,Rt.DINF=void 0;const EA=9e4;function yo(i,e,t=1,n=!1){const r=i*e*t;return n?Math.round(r):r}function Rl(i,e,t=1,n=!1){return yo(i,e,1/t,n)}function fi(i,e=!1){return yo(i,1e3,1/EA,e)}function Ul(i,e=1){return yo(i,EA,1/e)}const kl=10*1e3,Ol=1024,Pl=1152,Ql=1536;let Ms=null,Eo=null;function wA(i,e,t,n){return{duration:e,size:t,cts:n,flags:{isLeading:0,isDependedOn:0,hasRedundancy:0,degradPrio:0,dependsOn:i?2:1,isNonSync:i?0:1}}}class Na extends R{constructor(e,t,n,r){if(super("mp4-remuxer",r),this.observer=void 0,this.config=void 0,this.typeSupported=void 0,this.ISGenerated=!1,this._initPTS=null,this._initDTS=null,this.nextVideoTs=null,this.nextAudioTs=null,this.videoSampleDuration=null,this.isAudioContiguous=!1,this.isVideoContiguous=!1,this.videoTrackConfig=void 0,this.observer=e,this.config=t,this.typeSupported=n,this.ISGenerated=!1,Ms===null){const a=(navigator.userAgent||"").match(/Chrome\/(\d+)/i);Ms=a?parseInt(a[1]):0}if(Eo===null){const s=navigator.userAgent.match(/Safari\/(\d+)/i);Eo=s?parseInt(s[1]):0}}destroy(){this.config=this.videoTrackConfig=this._initPTS=this._initDTS=null}resetTimeStamp(e){this.log("initPTS & initDTS reset"),this._initPTS=this._initDTS=e}resetNextTimestamp(){this.log("reset next timestamp"),this.isVideoContiguous=!1,this.isAudioContiguous=!1}resetInitSegment(){this.log("ISGenerated flag reset"),this.ISGenerated=!1,this.videoTrackConfig=void 0}getVideoStartPts(e){let t=!1;const n=e[0].pts,r=e.reduce((s,a)=>{let o=a.pts,u=o-s;return u<-4294967296&&(t=!0,o=Xi(o,n),u=o-s),u>0?s:o},n);return t&&this.debug("PTS rollover detected"),r}remux(e,t,n,r,s,a,o,u){let l,c,d,g,w,y,O=s,H=s;const Ae=e.pid>-1,Ee=t.pid>-1,we=t.samples.length,Ze=e.samples.length>0,rt=o&&we>0||we>1;if((!Ae||Ze)&&(!Ee||rt)||this.ISGenerated||o){if(this.ISGenerated){var At,wt,_t,ct;const jn=this.videoTrackConfig;(jn&&(t.width!==jn.width||t.height!==jn.height||((At=t.pixelRatio)==null?void 0:At[0])!==((wt=jn.pixelRatio)==null?void 0:wt[0])||((_t=t.pixelRatio)==null?void 0:_t[1])!==((ct=jn.pixelRatio)==null?void 0:ct[1]))||!jn&&rt||this.nextAudioTs===null&&Ze)&&this.resetInitSegment()}this.ISGenerated||(d=this.generateIS(e,t,s,a));const fn=this.isVideoContiguous;let Rn=-1,$n;if(rt&&(Rn=Ml(t.samples),!fn&&this.config.forceKeyFrameOnDiscontinuity))if(y=!0,Rn>0){this.warn(`Dropped ${Rn} out of ${we} video samples due to a missing keyframe`);const jn=this.getVideoStartPts(t.samples);t.samples=t.samples.slice(Rn),t.dropped+=Rn,H+=(t.samples[0].pts-jn)/t.inputTimeScale,$n=H}else Rn===-1&&(this.warn(`No keyframe found out of ${we} video samples`),y=!1);if(this.ISGenerated){if(Ze&&rt){const jn=this.getVideoStartPts(t.samples),Gn=(Xi(e.samples[0].pts,jn)-jn)/t.inputTimeScale;O+=Math.max(0,Gn),H+=Math.max(0,-Gn)}if(Ze){if(e.samplerate||(this.warn("regenerate InitSegment as audio detected"),d=this.generateIS(e,t,s,a)),c=this.remuxAudio(e,O,this.isAudioContiguous,a,Ee||rt||u===ee.AUDIO?H:void 0),rt){const jn=c?c.endPTS-c.startPTS:0;t.inputTimeScale||(this.warn("regenerate InitSegment as video detected"),d=this.generateIS(e,t,s,a)),l=this.remuxVideo(t,H,fn,jn)}}else rt&&(l=this.remuxVideo(t,H,fn,0));l&&(l.firstKeyFrame=Rn,l.independent=Rn!==-1,l.firstKeyFramePTS=$n)}}return this.ISGenerated&&this._initPTS&&this._initDTS&&(n.samples.length&&(w=BA(n,s,this._initPTS,this._initDTS)),r.samples.length&&(g=wo(r,s,this._initPTS))),{audio:c,video:l,initSegment:d,independent:y,text:g,id3:w}}generateIS(e,t,n,r){const s=e.samples,a=t.samples,o=this.typeSupported,u={},l=this._initPTS;let c=!l||r,d="audio/mp4",g,w,y,O;if(c&&(g=w=1/0),e.config&&s.length){switch(e.timescale=e.samplerate,e.segmentCodec){case"mp3":o.mpeg?(d="audio/mpeg",e.codec=""):o.mp3&&(e.codec="mp3");break;case"ac3":e.codec="ac-3";break}u.audio={id:"audio",container:d,codec:e.codec,initSegment:e.segmentCodec==="mp3"&&o.mpeg?new Uint8Array(0):Rt.initSegment([e]),metadata:{channelCount:e.channelCount}},c&&(O=e.id,y=e.inputTimeScale,!l||y!==l.timescale?g=w=s[0].pts-Math.round(y*n):c=!1)}if(t.sps&&t.pps&&a.length){if(t.timescale=t.inputTimeScale,u.video={id:"main",container:"video/mp4",codec:t.codec,initSegment:Rt.initSegment([t]),metadata:{width:t.width,height:t.height}},c)if(O=t.id,y=t.inputTimeScale,!l||y!==l.timescale){const H=this.getVideoStartPts(a),Ae=Math.round(y*n);w=Math.min(w,Xi(a[0].dts,H)-Ae),g=Math.min(g,H-Ae)}else c=!1;this.videoTrackConfig={width:t.width,height:t.height,pixelRatio:t.pixelRatio}}if(Object.keys(u).length)return this.ISGenerated=!0,c?(this._initPTS={baseTime:g,timescale:y},this._initDTS={baseTime:w,timescale:y}):g=y=void 0,{tracks:u,initPTS:g,timescale:y,trackId:O}}remuxVideo(e,t,n,r){const s=e.inputTimeScale,a=e.samples,o=[],u=a.length,l=this._initPTS,c=l.baseTime*s/l.timescale;let d=this.nextVideoTs,g=8,w=this.videoSampleDuration,y,O,H=Number.POSITIVE_INFINITY,Ae=Number.NEGATIVE_INFINITY,Ee=!1;if(!n||d===null){const Zn=c+t*s,Qn=a[0].pts-Xi(a[0].dts,a[0].pts);Ms&&d!==null&&Math.abs(Zn-Qn-(d+c))<15e3?n=!0:d=Zn-Qn-c}const we=d+c;for(let Zn=0;Zn<u;Zn++){const Qn=a[Zn];Qn.pts=Xi(Qn.pts,we),Qn.dts=Xi(Qn.dts,we),Qn.dts<a[Zn>0?Zn-1:Zn].dts&&(Ee=!0)}Ee&&a.sort(function(Zn,Qn){const Lr=Zn.dts-Qn.dts,kr=Zn.pts-Qn.pts;return Lr||kr}),y=a[0].dts,O=a[a.length-1].dts;const Ze=O-y,rt=Ze?Math.round(Ze/(u-1)):w||e.inputTimeScale/30;if(n){const Zn=y-we,Qn=Zn>rt,Lr=Zn<-1;if((Qn||Lr)&&(Qn?this.warn(`${(e.segmentCodec||"").toUpperCase()}: ${fi(Zn,!0)} ms (${Zn}dts) hole between fragments detected at ${t.toFixed(3)}`):this.warn(`${(e.segmentCodec||"").toUpperCase()}: ${fi(-Zn,!0)} ms (${Zn}dts) overlapping between fragments detected at ${t.toFixed(3)}`),!Lr||we>=a[0].pts||Ms)){y=we;const kr=a[0].pts-Zn;if(Qn)a[0].dts=y,a[0].pts=kr;else{let Qr=!0;for(let Nr=0;Nr<a.length&&!(a[Nr].dts>kr&&Qr);Nr++){const oi=a[Nr].pts;if(a[Nr].dts-=Zn,a[Nr].pts-=Zn,Nr<a.length-1){const as=a[Nr+1].pts,Pi=a[Nr].pts,os=as<=Pi,xa=as<=oi;Qr=os==xa}}}this.log(`Video: Initial PTS/DTS adjusted: ${fi(kr,!0)}/${fi(y,!0)}, delta: ${fi(Zn,!0)} ms`)}}y=Math.max(0,y);let pt=0,At=0,wt=y;for(let Zn=0;Zn<u;Zn++){const Qn=a[Zn],Lr=Qn.units,kr=Lr.length;let Qr=0;for(let Nr=0;Nr<kr;Nr++)Qr+=Lr[Nr].data.length;At+=Qr,pt+=kr,Qn.length=Qr,Qn.dts<wt?(Qn.dts=wt,wt+=rt/4|0||1):wt=Qn.dts,H=Math.min(Qn.pts,H),Ae=Math.max(Qn.pts,Ae)}O=a[u-1].dts;const _t=At+4*pt+8;let ct;try{ct=new Uint8Array(_t)}catch(Zn){this.observer.emit(f.ERROR,f.ERROR,{type:se.MUX_ERROR,details:U.REMUX_ALLOC_ERROR,fatal:!1,error:Zn,bytes:_t,reason:`fail allocating video mdat ${_t}`});return}const fn=new DataView(ct.buffer);fn.setUint32(0,_t),ct.set(Rt.types.mdat,4);let Rn=!1,$n=Number.POSITIVE_INFINITY,jn=Number.POSITIVE_INFINITY,ir=Number.NEGATIVE_INFINITY,Gn=Number.NEGATIVE_INFINITY;for(let Zn=0;Zn<u;Zn++){const Qn=a[Zn],Lr=Qn.units;let kr=0;for(let oi=0,as=Lr.length;oi<as;oi++){const Pi=Lr[oi],os=Pi.data,xa=Pi.data.byteLength;fn.setUint32(g,xa),g+=4,ct.set(os,g),g+=xa,kr+=4+xa}let Qr;if(Zn<u-1)w=a[Zn+1].dts-Qn.dts,Qr=a[Zn+1].pts-Qn.pts;else{const oi=this.config,as=Zn>0?Qn.dts-a[Zn-1].dts:rt;if(Qr=Zn>0?Qn.pts-a[Zn-1].pts:rt,oi.stretchShortVideoTrack&&this.nextAudioTs!==null){const Pi=Math.floor(oi.maxBufferHole*s),os=(r?H+r*s:this.nextAudioTs+c)-Qn.pts;os>Pi?(w=os-as,w<0?w=as:Rn=!0,this.log(`It is approximately ${os/90} ms to the next segment; using duration ${w/90} ms for the last video frame.`)):w=as}else w=as}const Nr=Math.round(Qn.pts-Qn.dts);$n=Math.min($n,w),ir=Math.max(ir,w),jn=Math.min(jn,Qr),Gn=Math.max(Gn,Qr),o.push(wA(Qn.key,w,kr,Nr))}if(o.length){if(Ms){if(Ms<70){const Zn=o[0].flags;Zn.dependsOn=2,Zn.isNonSync=0}}else if(Eo&&Gn-jn<ir-$n&&rt/ir<.025&&o[0].cts===0){this.warn("Found irregular gaps in sample duration. Using PTS instead of DTS to determine MP4 sample duration.");let Zn=y;for(let Qn=0,Lr=o.length;Qn<Lr;Qn++){const kr=Zn+o[Qn].duration,Qr=Zn+o[Qn].cts;if(Qn<Lr-1){const Nr=kr+o[Qn+1].cts;o[Qn].duration=Nr-Qr}else o[Qn].duration=Qn?o[Qn-1].duration:rt;o[Qn].cts=0,Zn=kr}}}w=Rn||!w?rt:w;const vr=O+w;this.nextVideoTs=d=vr-c,this.videoSampleDuration=w,this.isVideoContiguous=!0;const _r={data1:Rt.moof(e.sequenceNumber++,y,h(e,{samples:o})),data2:ct,startPTS:(H-c)/s,endPTS:(Ae+w-c)/s,startDTS:(y-c)/s,endDTS:d/s,type:"video",hasAudio:!1,hasVideo:!0,nb:o.length,dropped:e.dropped};return e.samples=[],e.dropped=0,_r}getSamplesPerFrame(e){switch(e.segmentCodec){case"mp3":return Pl;case"ac3":return Ql;default:return Ol}}remuxAudio(e,t,n,r,s){const a=e.inputTimeScale,o=e.samplerate?e.samplerate:a,u=a/o,l=this.getSamplesPerFrame(e),c=l*u,d=this._initPTS,g=e.segmentCodec==="mp3"&&this.typeSupported.mpeg,w=[],y=s!==void 0;let O=e.samples,H=g?0:8,Ae=this.nextAudioTs||-1;const Ee=d.baseTime*a/d.timescale,we=Ee+t*a;if(this.isAudioContiguous=n=n||O.length&&Ae>0&&(r&&Math.abs(we-(Ae+Ee))<9e3||Math.abs(Xi(O[0].pts,we)-(Ae+Ee))<20*c),O.forEach(function(Gn){Gn.pts=Xi(Gn.pts,we)}),!n||Ae<0){if(O=O.filter(Gn=>Gn.pts>=0),!O.length)return;s===0?Ae=0:r&&!y?Ae=Math.max(0,we-Ee):Ae=O[0].pts-Ee}if(e.segmentCodec==="aac"){const Gn=this.config.maxAudioFramesDrift;for(let vr=0,Hn=Ae+Ee;vr<O.length;vr++){const yr=O[vr],_r=yr.pts,Zn=_r-Hn,Qn=Math.abs(1e3*Zn/a);if(Zn<=-Gn*c&&y)vr===0&&(this.warn(`Audio frame @ ${(_r/a).toFixed(3)}s overlaps marker by ${Math.round(1e3*Zn/a)} ms.`),this.nextAudioTs=Ae=_r-Ee,Hn=_r);else if(Zn>=Gn*c&&Qn<kl&&y){let Lr=Math.round(Zn/c);for(Hn=_r-Lr*c;Hn<0&&Lr&&c;)Lr--,Hn+=c;vr===0&&(this.nextAudioTs=Ae=Hn-Ee),this.warn(`Injecting ${Lr} audio frames @ ${((Hn-Ee)/a).toFixed(3)}s due to ${Math.round(1e3*Zn/a)} ms gap.`);for(let kr=0;kr<Lr;kr++){let Qr=Ll.getSilentFrame(e.parsedCodec||e.manifestCodec||e.codec,e.channelCount);Qr||(this.log("Unable to get silent frame for given audio codec; duplicating last frame instead."),Qr=yr.unit.subarray()),O.splice(vr,0,{unit:Qr,pts:Hn}),Hn+=c,vr++}}yr.pts=Hn,Hn+=c}}let Ze=null,rt=null,pt,At=0,wt=O.length;for(;wt--;)At+=O[wt].unit.byteLength;for(let Gn=0,vr=O.length;Gn<vr;Gn++){const Hn=O[Gn],yr=Hn.unit;let _r=Hn.pts;if(rt!==null){const Qn=w[Gn-1];Qn.duration=Math.round((_r-rt)/u)}else if(n&&e.segmentCodec==="aac"&&(_r=Ae+Ee),Ze=_r,At>0){At+=H;try{pt=new Uint8Array(At)}catch(Qn){this.observer.emit(f.ERROR,f.ERROR,{type:se.MUX_ERROR,details:U.REMUX_ALLOC_ERROR,fatal:!1,error:Qn,bytes:At,reason:`fail allocating audio mdat ${At}`});return}g||(new DataView(pt.buffer).setUint32(0,At),pt.set(Rt.types.mdat,4))}else return;pt.set(yr,H);const Zn=yr.byteLength;H+=Zn,w.push(wA(!0,l,Zn,0)),rt=_r}const _t=w.length;if(!_t)return;const ct=w[w.length-1];Ae=rt-Ee,this.nextAudioTs=Ae+u*ct.duration;const fn=g?new Uint8Array(0):Rt.moof(e.sequenceNumber++,Ze/u,h({},e,{samples:w}));e.samples=[];const Rn=(Ze-Ee)/a,$n=Ae/a,ir={data1:fn,data2:pt,startPTS:Rn,endPTS:$n,startDTS:Rn,endDTS:$n,type:"audio",hasAudio:!0,hasVideo:!1,nb:_t};return this.isAudioContiguous=!0,ir}}function Xi(i,e){let t;if(e===null)return i;for(e<i?t=-8589934592:t=8589934592;Math.abs(i-e)>4294967296;)i+=t;return i}function Ml(i){for(let e=0;e<i.length;e++)if(i[e].key)return e;return-1}function BA(i,e,t,n){const r=i.samples.length;if(!r)return;const s=i.inputTimeScale;for(let o=0;o<r;o++){const u=i.samples[o];u.pts=Xi(u.pts-t.baseTime*s/t.timescale,e*s)/s,u.dts=Xi(u.dts-n.baseTime*s/n.timescale,e*s)/s}const a=i.samples;return i.samples=[],{samples:a}}function wo(i,e,t){const n=i.samples.length;if(!n)return;const r=i.inputTimeScale;for(let a=0;a<n;a++){const o=i.samples[a];o.pts=Xi(o.pts-t.baseTime*r/t.timescale,e*r)/r}i.samples.sort((a,o)=>a.pts-o.pts);const s=i.samples;return i.samples=[],{samples:s}}class ur extends R{constructor(e,t,n,r){super("passthrough-remuxer",r),this.emitInitSegment=!1,this.audioCodec=void 0,this.videoCodec=void 0,this.initData=void 0,this.initPTS=null,this.initTracks=void 0,this.lastEndTime=null,this.isVideoContiguous=!1}destroy(){}resetTimeStamp(e){this.lastEndTime=null;const t=this.initPTS;t&&e&&t.baseTime===e.baseTime&&t.timescale===e.timescale||(this.initPTS=e)}resetNextTimestamp(){this.isVideoContiguous=!1,this.lastEndTime=null}resetInitSegment(e,t,n,r){this.audioCodec=t,this.videoCodec=n,this.generateInitSegment(ue(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=De(e);r.audio&&(t=Ka(r.audio,Q.AUDIO,this)),r.video&&(n=Ka(r.video,Q.VIDEO,this));const s={};r.audio&&r.video?s.audiovideo={container:"video/mp4",codec:t+","+n,supplemental:r.video.supplemental,initSegment:e,id:"main"}:r.audio?s.audio={container:"audio/mp4",codec:t,initSegment:e,id:"audio"}:r.video?s.video={container:"video/mp4",codec:n,supplemental:r.video.supplemental,initSegment:e,id:"main"}:this.warn("initSegment does not contain moov or trak boxes."),this.initTracks=s}remux(e,t,n,r,s,a){var o,u;let{initPTS:l,lastEndTime:c}=this;const d={audio:void 0,video:void 0,text:r,id3:n,initSegment:void 0};P(c)||(c=this.lastEndTime=s||0);const g=t.samples;if(!(g!=null&&g.length))return d;const w={initPTS:void 0,timescale:void 0,trackId:void 0};let y=this.initData;if((o=y)!=null&&o.length||(this.generateInitSegment(g),y=this.initData),!((u=y)!=null&&u.length))return this.warn("Failed to generate initSegment."),d;this.emitInitSegment&&(w.tracks=this.initTracks,this.emitInitSegment=!1);const O=Ce(g,y,this),H=y.audio?O[y.audio.id]:null,Ae=y.video?O[y.video.id]:null,Ee=Ha(Ae,1/0),we=Ha(H,1/0),Ze=Ha(Ae,0,!0),rt=Ha(H,0,!0);let pt,At=s,wt=0;if(H&&(!Ae||!l&&we<Ee||l&&l.trackId===y.audio.id)?(w.trackId=y.audio.id,pt=H,wt=rt-we):Ae&&(w.trackId=y.video.id,pt=Ae,wt=Ze-Ee),pt){const Gn=pt.timescale;At=pt.start/Gn,w.initPTS=pt.start-s*Gn,w.timescale=Gn,l||(this.initPTS=l={baseTime:w.initPTS,timescale:Gn,trackId:w.trackId})}(a||!l)&&(Nl(l,At,s,wt)||w.timescale!==l.timescale)&&(w.initPTS=At-s,w.timescale=1,l&&l.timescale===1&&this.warn(`Adjusting initPTS @${s} from ${l.baseTime/l.timescale} to ${w.initPTS}`),this.initPTS=l={baseTime:w.initPTS,timescale:1});const _t=e?At-l.baseTime/l.timescale:c,ct=_t+wt;wt>0?this.lastEndTime=ct:(this.warn("Duration parsed from mp4 should be greater than zero"),this.resetNextTimestamp());const fn=!!y.audio,Rn=!!y.video;let $n="";fn&&($n+="audio"),Rn&&($n+="video");const jn={data1:g,startPTS:_t,startDTS:_t,endPTS:ct,endDTS:ct,type:$n,hasAudio:fn,hasVideo:Rn,nb:1,dropped:0};d.audio=fn&&!Rn?jn:void 0,d.video=Rn?jn:void 0;const ir=Ae==null?void 0:Ae.sampleCount;if(ir){const Gn=Ae.keyFrameIndex,vr=Gn!==-1;jn.nb=ir,jn.dropped=Gn===0||this.isVideoContiguous?0:vr?Gn:ir,jn.independent=vr,jn.firstKeyFrame=Gn,vr&&Ae.keyFrameStart&&(jn.firstKeyFramePTS=(Ae.keyFrameStart-l.baseTime)/l.timescale),this.isVideoContiguous||(d.independent=vr),this.isVideoContiguous||(this.isVideoContiguous=vr),jn.dropped&&this.warn(`fmp4 does not start with IDR: firstIDR ${Gn}/${ir} dropped: ${jn.dropped} start: ${jn.firstKeyFramePTS||"NA"}`)}return d.initSegment=w,d.id3=BA(n,s,l,l),r.samples.length&&(d.text=wo(r,s,l)),d}}function Ha(i,e,t=!1){return(i==null?void 0:i.start)!==void 0?(i.start+(t?i.duration:0))/i.timescale:e}function Nl(i,e,t,n){if(i===null)return!0;const r=Math.max(n,1),s=e-i.baseTime/i.timescale;return Math.abs(s-t)>r}function Ka(i,e,t){const n=i==null?void 0:i.codec;return n&&n.length>4?n:e===Q.AUDIO?n==="ec-3"||n==="ac-3"||n==="alac"?n:n==="fLaC"||n==="Opus"?me(n,!1):(t.warn(`Unhandled audio codec "${n}" in mp4 MAP`),n||"mp4a"):(t.warn(`Unhandled video codec "${n}" in mp4 MAP`),n||"avc1")}let Bi;try{Bi=self.performance.now.bind(self.performance)}catch(i){Bi=Date.now}const Ga=[{demux:Tl,remux:ur},{demux:Bs,remux:Na},{demux:bl,remux:Na},{demux:xl,remux:Na}];Ga.splice(2,0,{demux:Cl,remux:Na});class Bo{constructor(e,t,n,r,s,a){this.asyncResult=!1,this.logger=void 0,this.observer=void 0,this.typeSupported=void 0,this.config=void 0,this.id=void 0,this.demuxer=void 0,this.remuxer=void 0,this.decrypter=void 0,this.probe=void 0,this.decryptionPromise=null,this.transmuxConfig=void 0,this.currentTransmuxState=void 0,this.observer=e,this.typeSupported=t,this.config=n,this.id=s,this.logger=a}configure(e){this.transmuxConfig=e,this.decrypter&&this.decrypter.reset()}push(e,t,n,r){const s=n.transmuxing;s.executeStart=Bi();let a=new Uint8Array(e);const{currentTransmuxState:o,transmuxConfig:u}=this;r&&(this.currentTransmuxState=r);const{contiguous:l,discontinuity:c,trackSwitch:d,accurateTimeOffset:g,timeOffset:w,initSegmentChange:y}=r||o,{audioCodec:O,videoCodec:H,defaultInitPts:Ae,duration:Ee,initSegmentData:we}=u,Ze=va(a,t);if(Ze&&ii(Ze.method)){const wt=this.getDecrypter(),_t=Xr(Ze.method);if(wt.isSync()){let ct=wt.softwareDecrypt(a,Ze.key.buffer,Ze.iv.buffer,_t);if(n.part>-1){const Rn=wt.flush();ct=Rn&&Rn.buffer}if(!ct)return s.executeEnd=Bi(),ra(n);a=new Uint8Array(ct)}else return this.asyncResult=!0,this.decryptionPromise=wt.webCryptoDecrypt(a,Ze.key.buffer,Ze.iv.buffer,_t).then(ct=>{const fn=this.push(ct,null,n);return this.decryptionPromise=null,fn}),this.decryptionPromise}const rt=this.needsProbing(c,d);if(rt){const wt=this.configureTransmuxer(a);if(wt)return this.logger.warn(`[transmuxer] ${wt.message}`),this.observer.emit(f.ERROR,f.ERROR,{type:se.MEDIA_ERROR,details:U.FRAG_PARSING_ERROR,fatal:!1,error:wt,reason:wt.message}),s.executeEnd=Bi(),ra(n)}(c||d||y||rt)&&this.resetInitSegment(we,O,H,Ee,t),(c||y||rt)&&this.resetInitialTimestamp(Ae),l||this.resetContiguity();const pt=this.transmux(a,Ze,w,g,n);this.asyncResult=_a(pt);const At=this.currentTransmuxState;return At.contiguous=!0,At.discontinuity=!1,At.trackSwitch=!1,s.executeEnd=Bi(),pt}flush(e){const t=e.transmuxing;t.executeStart=Bi();const{decrypter:n,currentTransmuxState:r,decryptionPromise:s}=this;if(s)return this.asyncResult=!0,s.then(()=>this.flush(e));const a=[],{timeOffset:o}=r;if(n){const d=n.flush();d&&a.push(this.push(d.buffer,null,e))}const{demuxer:u,remuxer:l}=this;if(!u||!l){t.executeEnd=Bi();const d=[ra(e)];return this.asyncResult?Promise.resolve(d):d}const c=u.flush(o);return _a(c)?(this.asyncResult=!0,c.then(d=>(this.flushRemux(a,d,e),a))):(this.flushRemux(a,c,e),this.asyncResult?Promise.resolve(a):a)}flushRemux(e,t,n){const{audioTrack:r,videoTrack:s,id3Track:a,textTrack:o}=t,{accurateTimeOffset:u,timeOffset:l}=this.currentTransmuxState;this.logger.log(`[transmuxer.ts]: Flushed ${this.id} sn: ${n.sn}${n.part>-1?" part: "+n.part:""} of ${this.id===ee.MAIN?"level":"track"} ${n.level}`);const c=this.remuxer.remux(r,s,a,o,l,u,!0,this.id);e.push({remuxResult:c,chunkMeta:n}),n.transmuxing.executeEnd=Bi()}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,s){const{demuxer:a,remuxer:o}=this;!a||!o||(a.resetInitSegment(e,t,n,r),o.resetInitSegment(e,t,n,s))}destroy(){this.demuxer&&(this.demuxer.destroy(),this.demuxer=void 0),this.remuxer&&(this.remuxer.destroy(),this.remuxer=void 0)}transmux(e,t,n,r,s){let a;return t&&t.method==="SAMPLE-AES"?a=this.transmuxSampleAes(e,t,n,r,s):a=this.transmuxUnencrypted(e,n,r,s),a}transmuxUnencrypted(e,t,n,r){const{audioTrack:s,videoTrack:a,id3Track:o,textTrack:u}=this.demuxer.demux(e,t,!1,!this.config.progressive);return{remuxResult:this.remuxer.remux(s,a,o,u,t,n,!1,this.id),chunkMeta:r}}transmuxSampleAes(e,t,n,r,s){return this.demuxer.demuxSampleAes(e,t,n).then(a=>({remuxResult:this.remuxer.remux(a.audioTrack,a.videoTrack,a.id3Track,a.textTrack,n,r,!1,this.id),chunkMeta:s}))}configureTransmuxer(e){const{config:t,observer:n,typeSupported:r}=this;let s;for(let d=0,g=Ga.length;d<g;d++){var a;if((a=Ga[d].demux)!=null&&a.probe(e,this.logger)){s=Ga[d];break}}if(!s)return new Error("Failed to find demuxer by probing fragment data");const o=this.demuxer,u=this.remuxer,l=s.remux,c=s.demux;(!u||!(u instanceof l))&&(this.remuxer=new l(n,t,r,this.logger)),(!o||!(o instanceof c))&&(this.demuxer=new c(n,t,r,this.logger),this.probe=c.probe)}needsProbing(e,t){return!this.demuxer||!this.remuxer||e||t}getDecrypter(){let e=this.decrypter;return e||(e=this.decrypter=new Qt(this.config)),e}}function va(i,e){let t=null;return i.byteLength>0&&(e==null?void 0:e.key)!=null&&e.iv!==null&&e.method!=null&&(t=e),t}const ra=i=>({remuxResult:{},chunkMeta:i});function _a(i){return"then"in i&&i.then instanceof Function}class Hl{constructor(e,t,n,r,s){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=s||null}}class Kl{constructor(e,t,n,r,s,a){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=s,this.initSegmentChange=a}}let Cs=0;class Va{constructor(e,t,n,r){this.error=null,this.hls=void 0,this.id=void 0,this.instanceNo=Cs++,this.observer=void 0,this.frag=null,this.part=null,this.useWorker=void 0,this.workerContext=null,this.transmuxer=null,this.onTransmuxComplete=void 0,this.onFlush=void 0,this.onWorkerMessage=u=>{const l=u.data,c=this.hls;if(!(!c||!(l!=null&&l.event)||l.instanceNo!==this.instanceNo))switch(l.event){case"init":{var d;const g=(d=this.workerContext)==null?void 0:d.objectURL;g&&self.URL.revokeObjectURL(g);break}case"transmuxComplete":{this.handleTransmuxComplete(l.data);break}case"flush":{this.onFlush(l.data);break}case"workerLog":{c.logger[l.data.logType]&&c.logger[l.data.logType](l.data.message);break}default:{l.data=l.data||{},l.data.frag=this.frag,l.data.part=this.part,l.data.id=this.id,c.trigger(l.event,l.data);break}}},this.onWorkerError=u=>{if(!this.hls)return;const l=new Error(`${u.message} (${u.filename}:${u.lineno})`);this.hls.config.enableWorker=!1,this.hls.logger.warn(`Error in "${this.id}" Web Worker, fallback to inline`),this.hls.trigger(f.ERROR,{type:se.OTHER_ERROR,details:U.INTERNAL_EXCEPTION,fatal:!1,event:"demuxerWorker",error:l})};const s=e.config;this.hls=e,this.id=t,this.useWorker=!!s.enableWorker,this.onTransmuxComplete=n,this.onFlush=r;const a=(u,l)=>{l=l||{},l.frag=this.frag||void 0,u===f.ERROR&&(l=l,l.parent=this.id,l.part=this.part,this.error=l.error),this.hls.trigger(u,l)};this.observer=new Yi,this.observer.on(f.FRAG_DECRYPTED,a),this.observer.on(f.ERROR,a);const o=_n(s.preferManagedMediaSource);if(this.useWorker&&typeof Worker!="undefined"){const u=this.hls.logger;if(s.workerPath||ls()){try{s.workerPath?(u.log(`loading Web Worker ${s.workerPath} for "${t}"`),this.workerContext=Ia(s.workerPath)):(u.log(`injecting Web Worker for "${t}"`),this.workerContext=Fa());const{worker:c}=this.workerContext;c.addEventListener("message",this.onWorkerMessage),c.addEventListener("error",this.onWorkerError),c.postMessage({instanceNo:this.instanceNo,cmd:"init",typeSupported:o,id:t,config:Ot(s)})}catch(c){u.warn(`Error setting up "${t}" Web Worker, fallback to inline`,c),this.terminateWorker(),this.error=null,this.transmuxer=new Bo(this.observer,o,s,"",t,e.logger)}return}}this.transmuxer=new Bo(this.observer,o,s,"",t,e.logger)}reset(){if(this.frag=null,this.part=null,this.workerContext){const e=this.instanceNo;this.instanceNo=Cs++;const t=this.hls.config,n=_n(t.preferManagedMediaSource);this.workerContext.worker.postMessage({instanceNo:this.instanceNo,cmd:"reset",resetNo:e,typeSupported:n,id:this.id,config:Ot(t)})}}terminateWorker(){if(this.workerContext){const{worker:e}=this.workerContext;this.workerContext=null,e.removeEventListener("message",this.onWorkerMessage),e.removeEventListener("error",this.onWorkerError),Da(this.hls.config.workerPath)}}destroy(){if(this.workerContext)this.terminateWorker(),this.onWorkerMessage=this.onWorkerError=null;else{const t=this.transmuxer;t&&(t.destroy(),this.transmuxer=null)}const e=this.observer;e&&e.removeAllListeners(),this.frag=null,this.part=null,this.observer=null,this.hls=null}push(e,t,n,r,s,a,o,u,l,c){var d,g;l.transmuxing.start=self.performance.now();const{instanceNo:w,transmuxer:y}=this,O=a?a.start:s.start,H=s.decryptdata,Ae=this.frag,Ee=!(Ae&&s.cc===Ae.cc),we=!(Ae&&l.level===Ae.level),Ze=Ae?l.sn-Ae.sn:-1,rt=this.part?l.part-this.part.index:-1,pt=Ze===0&&l.id>1&&l.id===(Ae==null?void 0:Ae.stats.chunkCount),At=!we&&(Ze===1||Ze===0&&(rt===1||pt&&rt<=0)),wt=self.performance.now();(we||Ze||s.stats.parsing.start===0)&&(s.stats.parsing.start=wt),a&&(rt||!At)&&(a.stats.parsing.start=wt);const _t=!(Ae&&((d=s.initSegment)==null?void 0:d.url)===((g=Ae.initSegment)==null?void 0:g.url)),ct=new Kl(Ee,At,u,we,O,_t);if(!At||Ee||_t){this.hls.logger.log(`[transmuxer-interface]: Starting new transmux session for ${s.type} sn: ${l.sn}${l.part>-1?" part: "+l.part:""} ${this.id===ee.MAIN?"level":"track"}: ${l.level} id: ${l.id}
discontinuity: ${Ee}
trackSwitch: ${we}
contiguous: ${At}
accurateTimeOffset: ${u}
timeOffset: ${O}
initSegmentChange: ${_t}`);const fn=new Hl(n,r,t,o,c);this.configureTransmuxer(fn)}if(this.frag=s,this.part=a,this.workerContext)this.workerContext.worker.postMessage({instanceNo:w,cmd:"demux",data:e,decryptdata:H,chunkMeta:l,state:ct},e instanceof ArrayBuffer?[e]:[]);else if(y){const fn=y.push(e,H,l,ct);_a(fn)?fn.then(Rn=>{this.handleTransmuxComplete(Rn)}).catch(Rn=>{this.transmuxerError(Rn,l,"transmuxer-interface push error")}):this.handleTransmuxComplete(fn)}}flush(e){e.transmuxing.start=self.performance.now();const{instanceNo:t,transmuxer:n}=this;if(this.workerContext)this.workerContext.worker.postMessage({instanceNo:t,cmd:"flush",chunkMeta:e});else if(n){const r=n.flush(e);_a(r)?r.then(s=>{this.handleFlushResult(s,e)}).catch(s=>{this.transmuxerError(s,e,"transmuxer-interface flush error")}):this.handleFlushResult(r,e)}}transmuxerError(e,t,n){this.hls&&(this.error=e,this.hls.trigger(f.ERROR,{type:se.MEDIA_ERROR,details:U.FRAG_PARSING_ERROR,chunkMeta:t,frag:this.frag||void 0,part:this.part||void 0,fatal:!1,error:e,err:e,reason:n}))}handleFlushResult(e,t){e.forEach(n=>{this.handleTransmuxComplete(n)}),this.onFlush(t)}configureTransmuxer(e){const{instanceNo:t,transmuxer:n}=this;this.workerContext?this.workerContext.worker.postMessage({instanceNo:t,cmd:"configure",config:e}):n&&n.configure(e)}handleTransmuxComplete(e){e.chunkMeta.transmuxing.end=self.performance.now(),this.onTransmuxComplete(e)}}const $a=100;class Gl extends Hr{constructor(e,t,n){super(e,t,n,"audio-stream-controller",ee.AUDIO),this.mainAnchor=null,this.mainFragLoading=null,this.audioOnly=!1,this.bufferedTrack=null,this.switchingTrack=null,this.trackId=-1,this.waitingData=null,this.mainDetails=null,this.flushing=!1,this.bufferFlushed=!1,this.cachedTrackLoadedData=null,this.registerListeners()}onHandlerDestroying(){this.unregisterListeners(),super.onHandlerDestroying(),this.resetItem()}resetItem(){this.mainDetails=this.mainAnchor=this.mainFragLoading=this.bufferedTrack=this.switchingTrack=this.waitingData=this.cachedTrackLoadedData=null}registerListeners(){super.registerListeners();const{hls:e}=this;e.on(f.LEVEL_LOADED,this.onLevelLoaded,this),e.on(f.AUDIO_TRACKS_UPDATED,this.onAudioTracksUpdated,this),e.on(f.AUDIO_TRACK_SWITCHING,this.onAudioTrackSwitching,this),e.on(f.AUDIO_TRACK_LOADED,this.onAudioTrackLoaded,this),e.on(f.BUFFER_RESET,this.onBufferReset,this),e.on(f.BUFFER_CREATED,this.onBufferCreated,this),e.on(f.BUFFER_FLUSHING,this.onBufferFlushing,this),e.on(f.BUFFER_FLUSHED,this.onBufferFlushed,this),e.on(f.INIT_PTS_FOUND,this.onInitPtsFound,this),e.on(f.FRAG_LOADING,this.onFragLoading,this),e.on(f.FRAG_BUFFERED,this.onFragBuffered,this)}unregisterListeners(){const{hls:e}=this;e&&(super.unregisterListeners(),e.off(f.LEVEL_LOADED,this.onLevelLoaded,this),e.off(f.AUDIO_TRACKS_UPDATED,this.onAudioTracksUpdated,this),e.off(f.AUDIO_TRACK_SWITCHING,this.onAudioTrackSwitching,this),e.off(f.AUDIO_TRACK_LOADED,this.onAudioTrackLoaded,this),e.off(f.BUFFER_RESET,this.onBufferReset,this),e.off(f.BUFFER_CREATED,this.onBufferCreated,this),e.off(f.BUFFER_FLUSHING,this.onBufferFlushing,this),e.off(f.BUFFER_FLUSHED,this.onBufferFlushed,this),e.off(f.INIT_PTS_FOUND,this.onInitPtsFound,this),e.off(f.FRAG_LOADING,this.onFragLoading,this),e.off(f.FRAG_BUFFERED,this.onFragBuffered,this))}onInitPtsFound(e,{frag:t,id:n,initPTS:r,timescale:s}){if(n===ee.MAIN){const a=t.cc,o=this.fragCurrent;if(this.initPTS[a]={baseTime:r,timescale:s},this.log(`InitPTS for cc: ${a} found from main: ${r}/${s}`),this.mainAnchor=t,this.state===jt.WAITING_INIT_PTS){const u=this.waitingData;(!u&&!this.loadingParts||u&&u.frag.cc!==a)&&this.syncWithAnchor(t,u==null?void 0:u.frag)}else!this.hls.hasEnoughToStart&&o&&o.cc!==a?(o.abortRequests(),this.syncWithAnchor(t,o)):this.state===jt.IDLE&&this.tick()}}getLoadPosition(){return!this.startFragRequested&&this.nextLoadPosition>=0?this.nextLoadPosition:super.getLoadPosition()}syncWithAnchor(e,t){var n;const r=((n=this.mainFragLoading)==null?void 0:n.frag)||null;if(t&&(r==null?void 0:r.cc)===t.cc)return;const s=(r||e).cc,a=this.getLevelDetails(),o=this.getLoadPosition(),u=ye(a,s,o);u&&(this.log(`Syncing with main frag at ${u.start} cc ${u.cc}`),this.startFragRequested=!1,this.nextLoadPosition=u.start,this.resetLoadingState(),this.state===jt.IDLE&&this.doTickIdle())}startLoad(e,t){if(!this.levels){this.startPosition=e,this.state=jt.STOPPED;return}const n=this.lastCurrentTime;this.stopLoad(),this.setInterval($a),n>0&&e===-1?(this.log(`Override startPosition with lastCurrentTime @${n.toFixed(3)}`),e=n,this.state=jt.IDLE):this.state=jt.WAITING_TRACK,this.nextLoadPosition=this.lastCurrentTime=e+this.timelineOffset,this.startPosition=t?-1:e,this.tick()}doTick(){switch(this.state){case jt.IDLE:this.doTickIdle();break;case jt.WAITING_TRACK:{const{levels:t,trackId:n}=this,r=t==null?void 0:t[n],s=r==null?void 0:r.details;if(s&&!this.waitForLive(r)){if(this.waitForCdnTuneIn(s))break;this.state=jt.WAITING_INIT_PTS}break}case jt.FRAG_LOADING_WAITING_RETRY:{var e;const t=performance.now(),n=this.retryDate;if(!n||t>=n||(e=this.media)!=null&&e.seeking){const{levels:r,trackId:s}=this;this.log("RetryDate reached, switch back to IDLE state"),this.resetStartWhenNotLoaded((r==null?void 0:r[s])||null),this.state=jt.IDLE}break}case jt.WAITING_INIT_PTS:{const t=this.waitingData;if(t){const{frag:n,part:r,cache:s,complete:a}=t,o=this.mainAnchor;if(this.initPTS[n.cc]!==void 0){this.waitingData=null,this.state=jt.FRAG_LOADING;const u=s.flush().buffer,l={frag:n,part:r,payload:u,networkDetails:null};this._handleFragmentLoadProgress(l),a&&super._handleFragmentLoadComplete(l)}else o&&o.cc!==t.frag.cc&&this.syncWithAnchor(o,t.frag)}else this.state=jt.IDLE}}this.onTickEnd()}resetLoadingState(){const e=this.waitingData;e&&(this.fragmentTracker.removeFragment(e.frag),this.waitingData=null),super.resetLoadingState()}onTickEnd(){const{media:e}=this;e!=null&&e.readyState&&(this.lastCurrentTime=e.currentTime)}doTickIdle(){var e;const{hls:t,levels:n,media:r,trackId:s}=this,a=t.config;if(!this.buffering||!r&&!this.primaryPrefetch&&(this.startFragRequested||!a.startFragPrefetch)||!(n!=null&&n[s]))return;const o=n[s],u=o.details;if(!u||this.waitForLive(o)||this.waitForCdnTuneIn(u)){this.state=jt.WAITING_TRACK,this.startFragRequested=!1;return}const l=this.mediaBuffer?this.mediaBuffer:this.media;this.bufferFlushed&&l&&(this.bufferFlushed=!1,this.afterBufferFlushed(l,Q.AUDIO,ee.AUDIO));const c=this.getFwdBufferInfo(l,ee.AUDIO);if(c===null)return;if(!this.switchingTrack&&this._streamEnded(c,u)){t.trigger(f.BUFFER_EOS,{type:"audio"}),this.state=jt.ENDED;return}const d=c.len,g=t.maxBufferLength,w=u.fragments,y=w[0].start,O=this.getLoadPosition(),H=this.flushing?O:c.end;if(this.switchingTrack&&r){const we=O;u.PTSKnown&&we<y&&(c.end>y||c.nextStart)&&(this.log("Alt audio track ahead of main track, seek to start of alt audio track"),r.currentTime=y+.05)}if(d>=g&&!this.switchingTrack&&H<w[w.length-1].start)return;let Ae=this.getNextFragment(H,u);if(Ae&&this.isLoopLoading(Ae,H)&&(Ae=this.getNextFragmentLoopLoading(Ae,u,c,ee.MAIN,g)),!Ae){this.bufferFlushed=!0;return}let Ee=((e=this.mainFragLoading)==null?void 0:e.frag)||null;if(!this.audioOnly&&this.startFragRequested&&Ee&&Ue(Ae)&&!Ae.endList&&(!u.live||!this.loadingParts&&H<this.hls.liveSyncPosition)&&(this.fragmentTracker.getState(Ee)===Te.OK&&(this.mainFragLoading=Ee=null),Ee&&Ue(Ee))){if(Ae.start>Ee.end){const Ze=this.fragmentTracker.getFragAtPos(H,ee.MAIN);Ze&&Ze.end>Ee.end&&(Ee=Ze,this.mainFragLoading={frag:Ze,targetBufferTime:null})}if(Ae.start>Ee.end)return}this.loadFragment(Ae,o,H)}onMediaDetaching(e,t){this.bufferFlushed=this.flushing=!1,super.onMediaDetaching(e,t)}onAudioTracksUpdated(e,{audioTracks:t}){this.resetTransmuxer(),this.levels=t.map(n=>new qt(n))}onAudioTrackSwitching(e,t){const n=!!t.url;this.trackId=t.id;const{fragCurrent:r}=this;r&&(r.abortRequests(),this.removeUnbufferedFrags(r.start)),this.resetLoadingState(),n?(this.switchingTrack=t,this.flushAudioIfNeeded(t),this.state!==jt.STOPPED&&(this.setInterval($a),this.state=jt.IDLE,this.tick())):(this.resetTransmuxer(),this.switchingTrack=null,this.bufferedTrack=t,this.clearInterval())}onManifestLoading(){super.onManifestLoading(),this.bufferFlushed=this.flushing=this.audioOnly=!1,this.resetItem(),this.trackId=-1}onLevelLoaded(e,t){this.mainDetails=t.details;const n=this.cachedTrackLoadedData;n&&(this.cachedTrackLoadedData=null,this.onAudioTrackLoaded(f.AUDIO_TRACK_LOADED,n))}onAudioTrackLoaded(e,t){var n;const{levels:r}=this,{details:s,id:a,groupId:o,track:u}=t;if(!r){this.warn(`Audio tracks reset while loading track ${a} "${u.name}" of "${o}"`);return}const l=this.mainDetails;if(!l||s.endCC>l.endCC||l.expired){this.cachedTrackLoadedData=t,this.state!==jt.STOPPED&&(this.state=jt.WAITING_TRACK);return}this.cachedTrackLoadedData=null,this.log(`Audio track ${a} "${u.name}" of "${o}" loaded [${s.startSN},${s.endSN}]${s.lastPartSn?`[part-${s.lastPartSn}-${s.lastPartIndex}]`:""},duration:${s.totalduration}`);const c=r[a];let d=0;if(s.live||(n=c.details)!=null&&n.live){if(this.checkLiveUpdate(s),s.deltaUpdateFailed)return;if(c.details){var g;d=this.alignPlaylists(s,c.details,(g=this.levelLastLoaded)==null?void 0:g.details)}s.alignedSliding||(ki(s,l),s.alignedSliding||Hi(s,l),d=s.fragmentStart)}c.details=s,this.levelLastLoaded=c,this.startFragRequested||this.setStartPosition(l,d),this.hls.trigger(f.AUDIO_TRACK_UPDATED,{details:s,id:a,groupId:t.groupId}),this.state===jt.WAITING_TRACK&&!this.waitForCdnTuneIn(s)&&(this.state=jt.IDLE),this.tick()}_handleFragmentLoadProgress(e){var t;const n=e.frag,{part:r,payload:s}=e,{config:a,trackId:o,levels:u}=this;if(!u){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 l=u[o];if(!l){this.warn("Audio track is undefined on fragment load progress");return}const c=l.details;if(!c){this.warn("Audio track details undefined on fragment load progress"),this.removeUnbufferedFrags(n.start);return}const d=a.defaultAudioCodec||l.audioCodec||"mp4a.40.2";let g=this.transmuxer;g||(g=this.transmuxer=new Va(this.hls,ee.AUDIO,this._handleTransmuxComplete.bind(this),this._handleTransmuxerFlush.bind(this)));const w=this.initPTS[n.cc],y=(t=n.initSegment)==null?void 0:t.data;if(w!==void 0){const H=r?r.index:-1,Ae=H!==-1,Ee=new Xn(n.level,n.sn,n.stats.chunkCount,s.byteLength,H,Ae);g.push(s,y,d,"",n,r,c.totalduration,!1,Ee,w)}else{this.log(`Unknown video PTS for cc ${n.cc}, waiting for video PTS before demuxing audio frag ${n.sn} of [${c.startSN} ,${c.endSN}],track ${o}`);const{cache:O}=this.waitingData=this.waitingData||{frag:n,part:r,cache:new pi,complete:!1};O.push(new Uint8Array(s)),this.state!==jt.STOPPED&&(this.state=jt.WAITING_INIT_PTS)}}_handleFragmentLoadComplete(e){if(this.waitingData){this.waitingData.complete=!0;return}super._handleFragmentLoadComplete(e)}onBufferReset(){this.mediaBuffer=null}onBufferCreated(e,t){this.bufferFlushed=this.flushing=!1;const n=t.tracks.audio;n&&(this.mediaBuffer=n.buffer||null)}onFragLoading(e,t){!this.audioOnly&&t.frag.type===ee.MAIN&&Ue(t.frag)&&(this.mainFragLoading=t,this.state===jt.IDLE&&this.tick())}onFragBuffered(e,t){const{frag:n,part:r}=t;if(n.type!==ee.AUDIO){!this.audioOnly&&n.type===ee.MAIN&&!n.elementaryStreams.video&&!n.elementaryStreams.audiovideo&&(this.audioOnly=!0,this.mainFragLoading=null);return}if(this.fragContextChanged(n)){this.warn(`Fragment ${n.sn}${r?" p: "+r.index:""} of level ${n.level} finished buffering, but was aborted. state: ${this.state}, audioSwitch: ${this.switchingTrack?this.switchingTrack.name:"false"}`);return}if(Ue(n)){this.fragPrevious=n;const s=this.switchingTrack;s&&(this.bufferedTrack=s,this.switchingTrack=null,this.hls.trigger(f.AUDIO_TRACK_SWITCHED,_({},s)))}this.fragBufferedComplete(n,r),this.media&&this.tick()}onError(e,t){var n;if(t.fatal){this.state=jt.ERROR;return}switch(t.details){case U.FRAG_GAP:case U.FRAG_PARSING_ERROR:case U.FRAG_DECRYPT_ERROR:case U.FRAG_LOAD_ERROR:case U.FRAG_LOAD_TIMEOUT:case U.KEY_LOAD_ERROR:case U.KEY_LOAD_TIMEOUT:this.onFragmentOrKeyLoadError(ee.AUDIO,t);break;case U.AUDIO_TRACK_LOAD_ERROR:case U.AUDIO_TRACK_LOAD_TIMEOUT:case U.LEVEL_PARSING_ERROR:!t.levelRetry&&this.state===jt.WAITING_TRACK&&((n=t.context)==null?void 0:n.type)===fe.AUDIO_TRACK&&(this.state=jt.IDLE);break;case U.BUFFER_ADD_CODEC_ERROR:case U.BUFFER_APPEND_ERROR:if(t.parent!=="audio")return;this.reduceLengthAndFlushBuffer(t)||this.resetLoadingState();break;case U.BUFFER_FULL_ERROR:if(t.parent!=="audio")return;this.reduceLengthAndFlushBuffer(t)&&(this.bufferedTrack=null,super.flushMainBuffer(0,Number.POSITIVE_INFINITY,"audio"));break;case U.INTERNAL_EXCEPTION:this.recoverWorkerError(t);break}}onBufferFlushing(e,{type:t}){t!==Q.VIDEO&&(this.flushing=!0)}onBufferFlushed(e,{type:t}){if(t!==Q.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,ee.AUDIO),this.tick())}}_handleTransmuxComplete(e){var t;const n="audio",{hls:r}=this,{remuxResult:s,chunkMeta:a}=e,o=this.getCurrentContext(a);if(!o){this.resetWhenMissingContext(a);return}const{frag:u,part:l,level:c}=o,{details:d}=c,{audio:g,text:w,id3:y,initSegment:O}=s;if(this.fragContextChanged(u)||!d){this.fragmentTracker.removeFragment(u);return}if(this.state=jt.PARSING,this.switchingTrack&&g&&this.completeAudioSwitch(this.switchingTrack),O!=null&&O.tracks){const H=u.initSegment||u;this._bufferInitSegment(c,O.tracks,H,a),r.trigger(f.FRAG_PARSING_INIT_SEGMENT,{frag:H,id:n,tracks:O.tracks})}if(g){const{startPTS:H,endPTS:Ae,startDTS:Ee,endDTS:we}=g;l&&(l.elementaryStreams[Q.AUDIO]={startPTS:H,endPTS:Ae,startDTS:Ee,endDTS:we}),u.setElementaryStreamInfo(Q.AUDIO,H,Ae,Ee,we),this.bufferFragmentData(g,u,l,a)}if(y!=null&&(t=y.samples)!=null&&t.length){const H=h({id:n,frag:u,details:d},y);r.trigger(f.FRAG_PARSING_METADATA,H)}if(w){const H=h({id:n,frag:u,details:d},w);r.trigger(f.FRAG_PARSING_USERDATA,H)}}_bufferInitSegment(e,t,n,r){if(this.state!==jt.PARSING||(t.video&&delete t.video,t.audiovideo&&delete t.audiovideo,!t.audio))return;const s=t.audio;s.id=ee.AUDIO;const a=e.audioCodec;this.log(`Init audio buffer, container:${s.container}, codecs[level/parsed]=[${a}/${s.codec}]`),a&&a.split(",").length===1&&(s.levelCodec=a),this.hls.trigger(f.BUFFER_CODECS,t);const o=s.initSegment;if(o!=null&&o.byteLength){const u={type:"audio",frag:n,part:null,chunkMeta:r,parent:n.type,data:o};this.hls.trigger(f.BUFFER_APPENDING,u)}this.tickImmediate()}loadFragment(e,t,n){const r=this.fragmentTracker.getState(e);if(this.switchingTrack||r===Te.NOT_LOADED||r===Te.PARTIAL){var s;if(!Ue(e))this._loadInitSegment(e,t);else if((s=t.details)!=null&&s.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 a=this.mainDetails;a&&a.fragmentStart!==t.details.fragmentStart&&Hi(t.details,a)}else super.loadFragment(e,t,n)}else this.clearTrackerIfNeeded(e)}flushAudioIfNeeded(e){if(this.media&&this.bufferedTrack){const{name:t,lang:n,assocLang:r,characteristics:s,audioCodec:a,channels:o}=this.bufferedTrack;vt({name:t,lang:n,assocLang:r,characteristics:s,audioCodec:a,channels:o},e,Jt)||(Bn(e.url,this.hls)?(this.log("Switching audio track : flushing all audio"),super.flushMainBuffer(0,Number.POSITIVE_INFINITY,"audio"),this.bufferedTrack=null):this.bufferedTrack=e)}}completeAudioSwitch(e){const{hls:t}=this;this.flushAudioIfNeeded(e),this.bufferedTrack=e,this.switchingTrack=null,t.trigger(f.AUDIO_TRACK_SWITCHED,_({},e))}}class Za extends R{constructor(e,t){super(t,e.logger),this.hls=void 0,this.canLoad=!1,this.timer=-1,this.hls=e}destroy(){this.clearTimer(),this.hls=this.log=this.warn=null}clearTimer(){this.timer!==-1&&(self.clearTimeout(this.timer),this.timer=-1)}startLoad(){this.canLoad=!0,this.loadPlaylist()}stopLoad(){this.canLoad=!1,this.clearTimer()}switchParams(e,t,n){const r=t==null?void 0:t.renditionReports;if(r){let s=-1;for(let a=0;a<r.length;a++){const o=r[a];let u;try{u=new self.URL(o.URI,t.url).href}catch(l){this.warn(`Could not construct new URL for Rendition Report: ${l}`),u=o.URI||""}if(u===e){s=a;break}else u===e.substring(0,u.length)&&(s=a)}if(s!==-1){const a=r[s],o=parseInt(a["LAST-MSN"])||(t==null?void 0:t.lastPartSn);let u=parseInt(a["LAST-PART"])||(t==null?void 0:t.lastPartIndex);if(this.hls.config.lowLatencyMode){const c=Math.min(t.age-t.partTarget,t.targetduration);u>=0&&c>t.partTarget&&(u+=1)}const l=n&&Yt(n);return new Lt(o,u>=0?u:void 0,l)}}}loadPlaylist(e){this.clearTimer()}loadingPlaylist(e,t){this.clearTimer()}shouldLoadPlaylist(e){return this.canLoad&&!!e&&!!e.url&&(!e.details||e.details.live)}getUrlWithDirectives(e,t){if(t)try{return t.addDirectives(e)}catch(n){this.warn(`Could not construct new URL with HLS Delivery Directives: ${n}`)}return e}playlistLoaded(e,t,n){const{details:r,stats:s}=t,a=self.performance.now(),o=s.loading.first?Math.max(0,a-s.loading.first):0;r.advancedDateTime=Date.now()-o;const u=this.hls.config.timelineOffset;if(u!==r.appliedTimelineOffset){const c=Math.max(u||0,0);r.appliedTimelineOffset=c,r.fragments.forEach(d=>{d.start=d.playlistOffset+c})}if(r.live||n!=null&&n.live){const c="levelInfo"in t?t.levelInfo:t.track;if(r.reloaded(n),n&&r.fragments.length>0){Li(n,r);const Ee=r.playlistParsingError;if(Ee){this.warn(Ee);const we=this.hls;if(!we.config.ignorePlaylistParsingErrors){var l;const{networkDetails:Ze}=t;we.trigger(f.ERROR,{type:se.NETWORK_ERROR,details:U.LEVEL_PARSING_ERROR,fatal:!1,url:r.url,error:Ee,reason:Ee.message,level:t.level||void 0,parent:(l=r.fragments[0])==null?void 0:l.type,networkDetails:Ze,stats:s});return}r.playlistParsingError=null}}r.requestScheduled===-1&&(r.requestScheduled=s.loading.start);const d=this.hls.mainForwardBufferInfo,g=d?d.end-d.len:0,w=(r.edge-g)*1e3,y=Gr(r,w);if(r.requestScheduled+y<a?r.requestScheduled=a:r.requestScheduled+=y,this.log(`live playlist ${e} ${r.advanced?"REFRESHED "+r.lastPartSn+"-"+r.lastPartIndex:r.updated?"UPDATED":"MISSED"}`),!this.canLoad||!r.live)return;let O,H,Ae;if(r.canBlockReload&&r.endSN&&r.advanced){const Ee=this.hls.config.lowLatencyMode,we=r.lastPartSn,Ze=r.endSN,rt=r.lastPartIndex,pt=rt!==-1,At=we===Ze;pt?At?(H=Ze+1,Ae=Ee?0:rt):(H=we,Ae=Ee?rt+1:r.maxPartIndex):H=Ze+1;const wt=r.age,_t=wt+r.ageHeader;let ct=Math.min(_t-r.partTarget,r.targetduration*1.5);if(ct>0){if(_t>r.targetduration*3)this.log(`Playlist last advanced ${wt.toFixed(2)}s ago. Omitting segment and part directives.`),H=void 0,Ae=void 0;else if(n!=null&&n.tuneInGoal&&_t-r.partTarget>n.tuneInGoal)this.warn(`CDN Tune-in goal increased from: ${n.tuneInGoal} to: ${ct} with playlist age: ${r.age}`),ct=0;else{const fn=Math.floor(ct/r.targetduration);if(H+=fn,Ae!==void 0){const Rn=Math.round(ct%r.targetduration/r.partTarget);Ae+=Rn}this.log(`CDN Tune-in age: ${r.ageHeader}s last advanced ${wt.toFixed(2)}s goal: ${ct} skip sn ${fn} to part ${Ae}`)}r.tuneInGoal=ct}if(O=this.getDeliveryDirectives(r,t.deliveryDirectives,H,Ae),Ee||!At){r.requestScheduled=a,this.loadingPlaylist(c,O);return}}else(r.canBlockReload||r.canSkipUntil)&&(O=this.getDeliveryDirectives(r,t.deliveryDirectives,H,Ae));O&&H!==void 0&&r.canBlockReload&&(r.requestScheduled=s.loading.first+Math.max(y-o*2,y/2)),this.scheduleLoading(c,O,r)}else this.clearTimer()}scheduleLoading(e,t,n){const r=n||e.details;if(!r){this.loadingPlaylist(e,t);return}const s=self.performance.now(),a=r.requestScheduled;if(s>=a){this.loadingPlaylist(e,t);return}const o=a-s;this.log(`reload live playlist ${e.name||e.bitrate+"bps"} in ${Math.round(o)} ms`),this.clearTimer(),this.timer=self.setTimeout(()=>this.loadingPlaylist(e,t),o)}getDeliveryDirectives(e,t,n,r){let s=Yt(e);return t!=null&&t.skip&&e.deltaUpdateFailed&&(n=t.msn,r=t.part,s=Pe.No),new Lt(n,r,s)}checkRetry(e){const t=e.details,n=Ge(e),r=e.errorAction,{action:s,retryCount:a=0,retryConfig:o}=r||{},u=!!r&&!!o&&(s===St.RetryRequest||!r.resolved&&s===St.SendAlternateToPenaltyBox);if(u){var l;if(a>=o.maxNumRetry)return!1;if(n&&(l=e.context)!=null&&l.deliveryDirectives)this.warn(`Retrying playlist loading ${a+1}/${o.maxNumRetry} after "${t}" without delivery-directives`),this.loadPlaylist();else{const c=gt(o,a);this.clearTimer(),this.timer=self.setTimeout(()=>this.loadPlaylist(),c),this.warn(`Retrying playlist loading ${a+1}/${o.maxNumRetry} after "${t}" in ${c}ms`)}e.levelRetry=!0,r.resolved=!0}return u}}function bA(i,e){if(i.length!==e.length)return!1;for(let t=0;t<i.length;t++)if(!Ns(i[t].attrs,e[t].attrs))return!1;return!0}function Ns(i,e,t){const n=i["STABLE-RENDITION-ID"];return n&&!t?n===e["STABLE-RENDITION-ID"]:!(t||["LANGUAGE","NAME","CHARACTERISTICS","AUTOSELECT","DEFAULT","FORCED","ASSOC-LANGUAGE"]).some(r=>i[r]!==e[r])}function bo(i,e){return e.label.toLowerCase()===i.name.toLowerCase()&&(!e.language||e.language.toLowerCase()===(i.lang||"").toLowerCase())}class Vl extends Za{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(f.MANIFEST_LOADING,this.onManifestLoading,this),e.on(f.MANIFEST_PARSED,this.onManifestParsed,this),e.on(f.LEVEL_LOADING,this.onLevelLoading,this),e.on(f.LEVEL_SWITCHING,this.onLevelSwitching,this),e.on(f.AUDIO_TRACK_LOADED,this.onAudioTrackLoaded,this),e.on(f.ERROR,this.onError,this)}unregisterListeners(){const{hls:e}=this;e.off(f.MANIFEST_LOADING,this.onManifestLoading,this),e.off(f.MANIFEST_PARSED,this.onManifestParsed,this),e.off(f.LEVEL_LOADING,this.onLevelLoading,this),e.off(f.LEVEL_SWITCHING,this.onLevelSwitching,this),e.off(f.AUDIO_TRACK_LOADED,this.onAudioTrackLoaded,this),e.off(f.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:s}=t,a=this.tracksInGroup[n];if(!a||a.groupId!==r){this.warn(`Audio track with id:${n} and group:${r} not found in active group ${a==null?void 0:a.groupId}`);return}const o=a.details;a.details=t.details,this.log(`Audio track ${n} "${a.name}" lang:${a.lang} group:${r} loaded [${s.startSN}-${s.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 s=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(g=>!n||n.indexOf(g.groupId)!==-1);if(o.length)this.selectDefaultTrack&&!o.some(g=>g.default)&&(this.selectDefaultTrack=!1),o.forEach((g,w)=>{g.id=w});else if(!s&&!this.tracksInGroup.length)return;this.tracksInGroup=o;const u=this.hls.config.audioPreference;if(!s&&u){const g=Ye(u,o,Jt);if(g>-1)s=o[g];else{const w=Ye(u,this.tracks);s=this.tracks[w]}}let l=this.findTrackId(s);l===-1&&s&&(l=this.findTrackId(null));const c={audioTracks:o};this.log(`Updating audio tracks, ${o.length} track(s) found in group(s): ${n==null?void 0:n.join(",")}`),this.hls.trigger(f.AUDIO_TRACKS_UPDATED,c);const d=this.trackId;if(l!==-1&&d===-1)this.setAudioTrack(l);else if(o.length&&d===-1){var a;const g=new Error(`No audio track selected for current audio group-ID(s): ${(a=this.groupIds)==null?void 0:a.join(",")} track count: ${o.length}`);this.warn(g.message),this.hls.trigger(f.ERROR,{type:se.MEDIA_ERROR,details:U.AUDIO_TRACK_LOAD_ERROR,fatal:!0,error:g})}}}onError(e,t){t.fatal||!t.context||t.context.type===fe.AUDIO_TRACK&&t.context.id===this.trackId&&(!this.groupIds||this.groupIds.indexOf(t.context.groupId)!==-1)&&this.checkRetry(t)}get allAudioTracks(){return this.tracks}get audioTracks(){return this.tracksInGroup}get audioTrack(){return this.trackId}set audioTrack(e){this.selectDefaultTrack=!1,this.setAudioTrack(e)}setAudioOption(e){const t=this.hls;if(t.config.audioPreference=e,e){const n=this.allAudioTracks;if(this.selectDefaultTrack=!1,n.length){const r=this.currentTrack;if(r&&vt(e,r,Jt))return r;const s=Ye(e,this.tracksInGroup,Jt);if(s>-1){const a=this.tracksInGroup[s];return this.setAudioTrack(s),a}else if(r){let a=t.loadLevel;a===-1&&(a=t.firstAutoLevel);const o=Zt(e,t.levels,n,a,Jt);if(o===-1)return null;t.nextLoadLevel=o}if(e.channels||e.audioCodec){const a=Ye(e,n);if(a>-1)return n[a]}}}return null}setAudioTrack(e){const t=this.tracksInGroup;if(e<0||e>=t.length){this.warn(`Invalid audio track id: ${e}`);return}this.selectDefaultTrack=!1;const n=this.currentTrack,r=t[e],s=r.details&&!r.details.live;if(e===this.trackId&&r===n&&s||(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(f.AUDIO_TRACK_SWITCHING,_({},r)),s))return;const a=this.switchParams(r.url,n==null?void 0:n.details,r.details);this.loadPlaylist(a)}findTrackId(e){const t=this.tracksInGroup;for(let n=0;n<t.length;n++){const r=t[n];if(!(this.selectDefaultTrack&&!r.default)&&(!e||vt(e,r,Jt)))return n}if(e){const{name:n,lang:r,assocLang:s,characteristics:a,audioCodec:o,channels:u}=e;for(let l=0;l<t.length;l++){const c=t[l];if(vt({name:n,lang:r,assocLang:s,characteristics:a,audioCodec:o,channels:u},c,Jt))return l}for(let l=0;l<t.length;l++){const c=t[l];if(Ns(e.attrs,c.attrs,["LANGUAGE","ASSOC-LANGUAGE","CHARACTERISTICS"]))return l}for(let l=0;l<t.length;l++){const c=t[l];if(Ns(e.attrs,c.attrs,["LANGUAGE"]))return l}}return-1}loadPlaylist(e){super.loadPlaylist();const t=this.currentTrack;this.shouldLoadPlaylist(t)&&Bn(t.url,this.hls)&&this.scheduleLoading(t,e)}loadingPlaylist(e,t){super.loadingPlaylist(e,t);const n=e.id,r=e.groupId,s=this.getUrlWithDirectives(e.url,t),a=e.details,o=a==null?void 0:a.age;this.log(`Loading audio-track ${n} "${e.name}" lang:${e.lang} group:${r}${(t==null?void 0:t.msn)!==void 0?" at sn "+t.msn+" part "+t.part:""}${o&&a.live?" age "+o.toFixed(1)+(a.type?" "+a.type||0:""):""} ${s}`),this.hls.trigger(f.AUDIO_TRACK_LOADING,{url:s,id:n,groupId:r,deliveryDirectives:t||null,track:e})}}class $l{constructor(e){this.tracks=void 0,this.queues={video:[],audio:[],audiovideo:[]},this.tracks=e}destroy(){this.tracks=this.queues=null}append(e,t,n){if(this.queues===null||this.tracks===null)return;const r=this.queues[t];r.push(e),r.length===1&&!n&&this.executeNext(t)}appendBlocker(e){return new Promise(t=>{const n={label:"async-blocker",execute:t,onStart:()=>{},onComplete:()=>{},onError:()=>{}};this.append(n,e)})}prependBlocker(e){return new Promise(t=>{if(this.queues){const n={label:"async-blocker-prepend",execute:t,onStart:()=>{},onComplete:()=>{},onError:()=>{}};this.queues[e].unshift(n)}})}removeBlockers(){this.queues!==null&&[this.queues.video,this.queues.audio,this.queues.audiovideo].forEach(e=>{var t;const n=(t=e[0])==null?void 0:t.label;(n==="async-blocker"||n==="async-blocker-prepend")&&(e[0].execute(),e.splice(0,1))})}unblockAudio(e){if(this.queues===null)return;this.queues.audio[0]===e&&this.shiftAndExecuteNext("audio")}executeNext(e){if(this.queues===null||this.tracks===null)return;const t=this.queues[e];if(t.length){const r=t[0];try{r.execute()}catch(s){var n;if(r.onError(s),this.queues===null||this.tracks===null)return;const a=(n=this.tracks[e])==null?void 0:n.buffer;a!=null&&a.updating||this.shiftAndExecuteNext(e)}}}shiftAndExecuteNext(e){this.queues!==null&&(this.queues[e].shift(),this.executeNext(e))}current(e){var t;return((t=this.queues)==null?void 0:t[e][0])||null}toString(){const{queues:e,tracks:t}=this;return e===null||t===null?"<destroyed>":`
${this.list("video")}
${this.list("audio")}
${this.list("audiovideo")}}`}list(e){var t,n;return(t=this.queues)!=null&&t[e]||(n=this.tracks)!=null&&n[e]?`${e}: (${this.listSbInfo(e)}) ${this.listOps(e)}`:""}listSbInfo(e){var t;const n=(t=this.tracks)==null?void 0:t[e],r=n==null?void 0:n.buffer;return r?`SourceBuffer${r.updating?" updating":""}${n.ended?" ended":""}${n.ending?" ending":""}`:"none"}listOps(e){var t;return((t=this.queues)==null?void 0:t[e].map(n=>n.label).join(", "))||""}}const CA=/(avc[1234]|hvc1|hev1|dvh[1e]|vp09|av01)(?:\.[^.,]+)+/,xA="HlsJsTrackRemovedError";class Zl extends Error{constructor(e){super(e),this.name=xA}}class Wl extends R{constructor(e,t){super("buffer-controller",e.logger),this.hls=void 0,this.fragmentTracker=void 0,this.details=null,this._objectUrl=null,this.operationQueue=null,this.bufferCodecEventsTotal=0,this.media=null,this.mediaSource=null,this.lastMpegAudioChunk=null,this.blockedAudioAppend=null,this.lastVideoAppendEnd=0,this.appendSource=void 0,this.transferData=void 0,this.overrides=void 0,this.appendErrors={audio:0,video:0,audiovideo:0},this.tracks={},this.sourceBuffers=[[null,null],[null,null]],this._onEndStreaming=n=>{var r;this.hls&&((r=this.mediaSource)==null?void 0:r.readyState)==="open"&&this.hls.pauseBuffering()},this._onStartStreaming=n=>{this.hls&&this.hls.resumeBuffering()},this._onMediaSourceOpen=n=>{const{media:r,mediaSource:s}=this;n&&this.log("Media source opened"),!(!r||!s)&&(s.removeEventListener("sourceopen",this._onMediaSourceOpen),r.removeEventListener("emptied",this._onMediaEmptied),this.updateDuration(),this.hls.trigger(f.MEDIA_ATTACHED,{media:r,mediaSource:s}),this.mediaSource!==null&&this.checkPendingTracks())},this._onMediaSourceClose=()=>{this.log("Media source closed")},this._onMediaSourceEnded=()=>{this.log("Media source ended")},this._onMediaEmptied=()=>{const{mediaSrc:n,_objectUrl:r}=this;n!==r&&this.error(`Media element src was set while attaching MediaSource (${r} > ${n})`)},this.hls=e,this.fragmentTracker=t,this.appendSource=ie(Y(e.config.preferManagedMediaSource)),this.initTracks(),this.registerListeners()}hasSourceTypes(){return Object.keys(this.tracks).length>0}destroy(){this.unregisterListeners(),this.details=null,this.lastMpegAudioChunk=this.blockedAudioAppend=null,this.transferData=this.overrides=void 0,this.operationQueue&&(this.operationQueue.destroy(),this.operationQueue=null),this.hls=this.fragmentTracker=null,this._onMediaSourceOpen=this._onMediaSourceClose=null,this._onMediaSourceEnded=null,this._onStartStreaming=this._onEndStreaming=null}registerListeners(){const{hls:e}=this;e.on(f.MEDIA_ATTACHING,this.onMediaAttaching,this),e.on(f.MEDIA_DETACHING,this.onMediaDetaching,this),e.on(f.MANIFEST_LOADING,this.onManifestLoading,this),e.on(f.MANIFEST_PARSED,this.onManifestParsed,this),e.on(f.BUFFER_RESET,this.onBufferReset,this),e.on(f.BUFFER_APPENDING,this.onBufferAppending,this),e.on(f.BUFFER_CODECS,this.onBufferCodecs,this),e.on(f.BUFFER_EOS,this.onBufferEos,this),e.on(f.BUFFER_FLUSHING,this.onBufferFlushing,this),e.on(f.LEVEL_UPDATED,this.onLevelUpdated,this),e.on(f.FRAG_PARSED,this.onFragParsed,this),e.on(f.FRAG_CHANGED,this.onFragChanged,this),e.on(f.ERROR,this.onError,this)}unregisterListeners(){const{hls:e}=this;e.off(f.MEDIA_ATTACHING,this.onMediaAttaching,this),e.off(f.MEDIA_DETACHING,this.onMediaDetaching,this),e.off(f.MANIFEST_LOADING,this.onManifestLoading,this),e.off(f.MANIFEST_PARSED,this.onManifestParsed,this),e.off(f.BUFFER_RESET,this.onBufferReset,this),e.off(f.BUFFER_APPENDING,this.onBufferAppending,this),e.off(f.BUFFER_CODECS,this.onBufferCodecs,this),e.off(f.BUFFER_EOS,this.onBufferEos,this),e.off(f.BUFFER_FLUSHING,this.onBufferFlushing,this),e.off(f.LEVEL_UPDATED,this.onLevelUpdated,this),e.off(f.FRAG_PARSED,this.onFragParsed,this),e.off(f.FRAG_CHANGED,this.onFragChanged,this),e.off(f.ERROR,this.onError,this)}transferMedia(){const{media:e,mediaSource:t}=this;if(!e)return null;const n={};if(this.operationQueue){const s=this.isUpdating();s||this.operationQueue.removeBlockers();const a=this.isQueued();(s||a)&&this.warn(`Transfering MediaSource with${a?" operations in queue":""}${s?" updating SourceBuffer(s)":""} ${this.operationQueue}`),this.operationQueue.destroy()}const r=this.transferData;return!this.sourceBufferCount&&r&&r.mediaSource===t?h(n,r.tracks):this.sourceBuffers.forEach(s=>{const[a]=s;a&&(n[a]=h({},this.tracks[a]),this.removeBuffer(a)),s[0]=s[1]=null}),{media:e,mediaSource:t,tracks:n}}initTracks(){const e={};this.sourceBuffers=[[null,null],[null,null]],this.tracks=e,this.resetQueue(),this.resetAppendErrors(),this.lastMpegAudioChunk=this.blockedAudioAppend=null,this.lastVideoAppendEnd=0}onManifestLoading(){this.bufferCodecEventsTotal=0,this.details=null}onManifestParsed(e,t){var n;let r=2;(t.audio&&!t.video||!t.altAudio)&&(r=1),this.bufferCodecEventsTotal=r,this.log(`${r} bufferCodec event(s) expected.`),(n=this.transferData)!=null&&n.mediaSource&&this.sourceBufferCount&&r&&this.bufferCreated()}onMediaAttaching(e,t){const n=this.media=t.media,r=Y(this.appendSource);if(this.transferData=this.overrides=void 0,n&&r){const s=!!t.mediaSource;(s||t.overrides)&&(this.transferData=t,this.overrides=t.overrides);const a=this.mediaSource=t.mediaSource||new r;if(this.assignMediaSource(a),s)this._objectUrl=n.src,this.attachTransferred();else{const o=this._objectUrl=self.URL.createObjectURL(a);if(this.appendSource)try{n.removeAttribute("src");const u=self.ManagedMediaSource;n.disableRemotePlayback=n.disableRemotePlayback||u&&a instanceof u,SA(n),TA(n,o),n.load()}catch(u){n.src=o}else n.src=o}n.addEventListener("emptied",this._onMediaEmptied)}}assignMediaSource(e){var t,n;this.log(`${((t=this.transferData)==null?void 0:t.mediaSource)===e?"transferred":"created"} media source: ${(n=e.constructor)==null?void 0:n.name}`),e.addEventListener("sourceopen",this._onMediaSourceOpen),e.addEventListener("sourceended",this._onMediaSourceEnded),e.addEventListener("sourceclose",this._onMediaSourceClose),this.appendSource&&(e.addEventListener("startstreaming",this._onStartStreaming),e.addEventListener("endstreaming",this._onEndStreaming))}attachTransferred(){const e=this.media,t=this.transferData;if(!t||!e)return;const n=this.tracks,r=t.tracks,s=r?Object.keys(r):null,a=s?s.length:0,o=()=>{this.media&&this.mediaSourceOpenOrEnded&&this._onMediaSourceOpen()};if(r&&s&&a){if(!this.tracksReady){this.hls.config.startFragPrefetch=!0,this.log("attachTransferred: waiting for SourceBuffer track info");return}if(this.log(`attachTransferred: (bufferCodecEventsTotal ${this.bufferCodecEventsTotal})
required tracks: ${Ot(n,(u,l)=>u==="initSegment"?void 0:l)};
transfer tracks: ${Ot(r,(u,l)=>u==="initSegment"?void 0:l)}}`),!de(r,n)){t.mediaSource=null,t.tracks=void 0;const u=e.currentTime,l=this.details,c=Math.max(u,(l==null?void 0:l.fragments[0].start)||0);if(c-u>1){this.log(`attachTransferred: waiting for playback to reach new tracks start time ${u} -> ${c}`);return}this.warn(`attachTransferred: resetting MediaSource for incompatible tracks ("${Object.keys(r)}"->"${Object.keys(n)}") start time: ${c} currentTime: ${u}`),this.onMediaDetaching(f.MEDIA_DETACHING,{}),this.onMediaAttaching(f.MEDIA_ATTACHING,t),e.currentTime=c;return}this.transferData=void 0,s.forEach(u=>{const l=u,c=r[l];if(c){const d=c.buffer;if(d){const g=this.fragmentTracker,w=c.id;if(g.hasFragments(w)||g.hasParts(w)){const H=ln.getBuffered(d);g.detectEvictedFragments(l,H,w,null,!0)}const y=Co(l),O=[l,d];this.sourceBuffers[y]=O,d.updating&&this.operationQueue&&this.operationQueue.prependBlocker(l),this.trackSourceBuffer(l,c)}}}),o(),this.bufferCreated()}else this.log("attachTransferred: MediaSource w/o SourceBuffers"),o()}get mediaSourceOpenOrEnded(){var e;const t=(e=this.mediaSource)==null?void 0:e.readyState;return t==="open"||t==="ended"}onMediaDetaching(e,t){const n=!!t.transferMedia;this.transferData=this.overrides=void 0;const{media:r,mediaSource:s,_objectUrl:a}=this;if(s){if(this.log(`media source ${n?"transferring":"detaching"}`),n)this.sourceBuffers.forEach(([o])=>{o&&this.removeBuffer(o)}),this.resetQueue();else{if(this.mediaSourceOpenOrEnded){const o=s.readyState==="open";try{const u=s.sourceBuffers;for(let l=u.length;l--;)o&&u[l].abort(),s.removeSourceBuffer(u[l]);o&&s.endOfStream()}catch(u){this.warn(`onMediaDetaching: ${u.message} while calling endOfStream`)}}this.sourceBufferCount&&this.onBufferReset()}s.removeEventListener("sourceopen",this._onMediaSourceOpen),s.removeEventListener("sourceended",this._onMediaSourceEnded),s.removeEventListener("sourceclose",this._onMediaSourceClose),this.appendSource&&(s.removeEventListener("startstreaming",this._onStartStreaming),s.removeEventListener("endstreaming",this._onEndStreaming)),this.mediaSource=null,this._objectUrl=null}r&&(r.removeEventListener("emptied",this._onMediaEmptied),n||(a&&self.URL.revokeObjectURL(a),this.mediaSrc===a?(r.removeAttribute("src"),this.appendSource&&SA(r),r.load()):this.warn("media|source.src was changed by a third party - skip cleanup")),this.media=null),this.hls.trigger(f.MEDIA_DETACHED,t)}onBufferReset(){this.sourceBuffers.forEach(([e])=>{e&&this.resetBuffer(e)}),this.initTracks()}resetBuffer(e){var t;const n=(t=this.tracks[e])==null?void 0:t.buffer;if(this.removeBuffer(e),n)try{var r;(r=this.mediaSource)!=null&&r.sourceBuffers.length&&this.mediaSource.removeSourceBuffer(n)}catch(s){this.warn(`onBufferReset ${e}`,s)}delete this.tracks[e]}removeBuffer(e){this.removeBufferListeners(e),this.sourceBuffers[Co(e)]=[null,null];const t=this.tracks[e];t&&(t.buffer=void 0)}resetQueue(){this.operationQueue&&this.operationQueue.destroy(),this.operationQueue=new $l(this.tracks)}onBufferCodecs(e,t){const n=this.tracks,r=Object.keys(t);this.log(`BUFFER_CODECS: "${r}" (current SB count ${this.sourceBufferCount})`);const s="audiovideo"in t&&(n.audio||n.video)||n.audiovideo&&("audio"in t||"video"in t),a=!s&&this.sourceBufferCount&&this.media&&r.some(o=>!n[o]);if(s||a){this.warn(`Unsupported transition between "${Object.keys(n)}" and "${r}" SourceBuffers`);return}r.forEach(o=>{var u,l,c;const d=t[o],{id:g,codec:w,levelCodec:y,container:O,metadata:H,supplemental:Ae}=d;let Ee=n[o];const we=(u=this.transferData)==null||(l=u.tracks)==null?void 0:l[o],Ze=we!=null&&we.buffer?we:Ee,rt=(Ze==null?void 0:Ze.pendingCodec)||(Ze==null?void 0:Ze.codec),pt=Ze==null?void 0:Ze.levelCodec;Ee||(Ee=n[o]={buffer:void 0,listeners:[],codec:w,supplemental:Ae,container:O,levelCodec:y,metadata:H,id:g});const At=be(rt,pt),wt=At==null?void 0:At.replace(CA,"$1");let _t=be(w,y);const ct=(c=_t)==null?void 0:c.replace(CA,"$1");_t&&At&&wt!==ct&&(o.slice(0,5)==="audio"&&(_t=me(_t,this.appendSource)),this.log(`switching codec ${rt} to ${_t}`),_t!==(Ee.pendingCodec||Ee.codec)&&(Ee.pendingCodec=_t),Ee.container=O,this.appendChangeType(o,O,_t))}),(this.tracksReady||this.sourceBufferCount)&&(t.tracks=this.sourceBufferTracks),!this.sourceBufferCount&&this.mediaSourceOpenOrEnded&&this.checkPendingTracks()}get sourceBufferTracks(){return Object.keys(this.tracks).reduce((e,t)=>{const n=this.tracks[t];return e[t]={id:n.id,container:n.container,codec:n.codec,levelCodec:n.levelCodec},e},{})}appendChangeType(e,t,n){const r=`${t};codecs=${n}`,s={label:`change-type=${r}`,execute:()=>{const a=this.tracks[e];if(a){const o=a.buffer;o!=null&&o.changeType&&(this.log(`changing ${e} sourceBuffer type to ${r}`),o.changeType(r),a.codec=n,a.container=t)}this.shiftAndExecuteNext(e)},onStart:()=>{},onComplete:()=>{},onError:a=>{this.warn(`Failed to change ${e} SourceBuffer type`,a)}};this.append(s,e,this.isPending(this.tracks[e]))}blockAudio(e){var t;const n=e.start,r=n+e.duration*.05;if(((t=this.fragmentTracker.getAppendedFrag(n,ee.MAIN))==null?void 0:t.gap)===!0)return;const a={label:"block-audio",execute:()=>{var o;const u=this.tracks.video;(this.lastVideoAppendEnd>r||u!=null&&u.buffer&&ln.isBuffered(u.buffer,r)||((o=this.fragmentTracker.getAppendedFrag(r,ee.MAIN))==null?void 0:o.gap)===!0)&&(this.blockedAudioAppend=null,this.shiftAndExecuteNext("audio"))},onStart:()=>{},onComplete:()=>{},onError:o=>{this.warn("Error executing block-audio operation",o)}};this.blockedAudioAppend={op:a,frag:e},this.append(a,"audio",!0)}unblockAudio(){const{blockedAudioAppend:e,operationQueue:t}=this;e&&t&&(this.blockedAudioAppend=null,t.unblockAudio(e.op))}onBufferAppending(e,t){const{tracks:n}=this,{data:r,type:s,parent:a,frag:o,part:u,chunkMeta:l,offset:c}=t,d=l.buffering[s],{sn:g,cc:w}=o,y=self.performance.now();d.start=y;const O=o.stats.buffering,H=u?u.stats.buffering:null;O.start===0&&(O.start=y),H&&H.start===0&&(H.start=y);const Ae=n.audio;let Ee=!1;s==="audio"&&(Ae==null?void 0:Ae.container)==="audio/mpeg"&&(Ee=!this.lastMpegAudioChunk||l.id===1||this.lastMpegAudioChunk.sn!==l.sn,this.lastMpegAudioChunk=l);const we=n.video,Ze=we==null?void 0:we.buffer;if(Ze&&g!=="initSegment"){const At=u||o,wt=this.blockedAudioAppend;if(s==="audio"&&a!=="main"&&!this.blockedAudioAppend){const ct=At.start+At.duration*.05,fn=Ze.buffered,Rn=this.currentOp("video");!fn.length&&!Rn?this.blockAudio(At):!Rn&&!ln.isBuffered(Ze,ct)&&this.lastVideoAppendEnd<ct&&this.blockAudio(At)}else if(s==="video"){const _t=At.end;if(wt){const ct=wt.frag.start;(_t>ct||_t<this.lastVideoAppendEnd||ln.isBuffered(Ze,ct))&&this.unblockAudio()}this.lastVideoAppendEnd=_t}}const rt=(u||o).start,pt={label:`append-${s}`,execute:()=>{var At;d.executeStart=self.performance.now();const wt=(At=this.tracks[s])==null?void 0:At.buffer;wt&&(Ee?this.updateTimestampOffset(wt,rt,.1,s,g,w):c!==void 0&&P(c)&&this.updateTimestampOffset(wt,c,1e-6,s,g,w)),this.appendExecutor(r,s)},onStart:()=>{},onComplete:()=>{const At=self.performance.now();d.executeEnd=d.end=At,O.first===0&&(O.first=At),H&&H.first===0&&(H.first=At);const wt={};this.sourceBuffers.forEach(([_t,ct])=>{_t&&(wt[_t]=ln.getBuffered(ct))}),this.appendErrors[s]=0,s==="audio"||s==="video"?this.appendErrors.audiovideo=0:(this.appendErrors.audio=0,this.appendErrors.video=0),this.hls.trigger(f.BUFFER_APPENDED,{type:s,frag:o,part:u,chunkMeta:l,parent:o.type,timeRanges:wt})},onError:At=>{var wt;const _t={type:se.MEDIA_ERROR,parent:o.type,details:U.BUFFER_APPEND_ERROR,sourceBufferName:s,frag:o,part:u,chunkMeta:l,error:At,err:At,fatal:!1},ct=(wt=this.media)==null?void 0:wt.error;if(At.code===DOMException.QUOTA_EXCEEDED_ERR||At.name=="QuotaExceededError"||"quota"in At)_t.details=U.BUFFER_FULL_ERROR;else if(At.code===DOMException.INVALID_STATE_ERR&&this.mediaSourceOpenOrEnded&&!ct)_t.errorAction=Ve(!0);else if(At.name===xA&&this.sourceBufferCount===0)_t.errorAction=Ve(!0);else{const fn=++this.appendErrors[s];this.warn(`Failed ${fn}/${this.hls.config.appendErrorMaxRetry} times to append segment in "${s}" sourceBuffer (${ct||"no media error"})`),(fn>=this.hls.config.appendErrorMaxRetry||ct)&&(_t.fatal=!0)}this.hls.trigger(f.ERROR,_t)}};this.append(pt,s,this.isPending(this.tracks[s]))}getFlushOp(e,t,n){return this.log(`queuing "${e}" remove ${t}-${n}`),{label:"remove",execute:()=>{this.removeExecutor(e,t,n)},onStart:()=>{},onComplete:()=>{this.hls.trigger(f.BUFFER_FLUSHED,{type:e})},onError:r=>{this.warn(`Failed to remove ${t}-${n} from "${e}" SourceBuffer`,r)}}}onBufferFlushing(e,t){const{type:n,startOffset:r,endOffset:s}=t;n?this.append(this.getFlushOp(n,r,s),n):this.sourceBuffers.forEach(([a])=>{a&&this.append(this.getFlushOp(a,r,s),a)})}onFragParsed(e,t){const{frag:n,part:r}=t,s=[],a=r?r.elementaryStreams:n.elementaryStreams;a[Q.AUDIOVIDEO]?s.push("audiovideo"):(a[Q.AUDIO]&&s.push("audio"),a[Q.VIDEO]&&s.push("video"));const o=()=>{const u=self.performance.now();n.stats.buffering.end=u,r&&(r.stats.buffering.end=u);const l=r?r.stats:n.stats;this.hls.trigger(f.FRAG_BUFFERED,{frag:n,part:r,stats:l,id:n.type})};s.length===0&&this.warn(`Fragments must have at least one ElementaryStreamType set. type: ${n.type} level: ${n.level} sn: ${n.sn}`),this.blockBuffers(o,s).catch(u=>{this.warn(`Fragment buffered callback ${u}`),this.stepOperationQueue(this.sourceBufferTypes)})}onFragChanged(e,t){this.trimBuffers()}get bufferedToEnd(){return this.sourceBufferCount>0&&!this.sourceBuffers.some(([e])=>{var t,n;return e&&(!((t=this.tracks[e])!=null&&t.ended)||((n=this.tracks[e])==null?void 0:n.ending))})}onBufferEos(e,t){var n;this.sourceBuffers.forEach(([a])=>{if(a){const o=this.tracks[a];(!t.type||t.type===a)&&(o.ending=!0,o.ended||(o.ended=!0,this.log(`${a} buffer reached EOS`)))}});const r=((n=this.overrides)==null?void 0:n.endOfStream)!==!1;this.sourceBufferCount>0&&!this.sourceBuffers.some(([a])=>{var o;return a&&!((o=this.tracks[a])!=null&&o.ended)})&&(r?(this.log("Queueing EOS"),this.blockUntilOpen(()=>{this.tracksEnded();const{mediaSource:a}=this;if(!a||a.readyState!=="open"){a&&this.log(`Could not call mediaSource.endOfStream(). mediaSource.readyState: ${a.readyState}`);return}this.log("Calling mediaSource.endOfStream()"),a.endOfStream(),this.hls.trigger(f.BUFFERED_TO_END,void 0)})):(this.tracksEnded(),this.hls.trigger(f.BUFFERED_TO_END,void 0)))}tracksEnded(){this.sourceBuffers.forEach(([e])=>{if(e!==null){const t=this.tracks[e];t&&(t.ending=!1)}})}onLevelUpdated(e,{details:t}){t.fragments.length&&(this.details=t,this.updateDuration())}updateDuration(){this.blockUntilOpen(()=>{const e=this.getDurationAndRange();e&&this.updateMediaSource(e)})}onError(e,t){if(t.details===U.BUFFER_APPEND_ERROR&&t.frag){var n;const r=(n=t.errorAction)==null?void 0:n.nextAutoLevel;P(r)&&r!==t.frag.level&&this.resetAppendErrors()}}resetAppendErrors(){this.appendErrors={audio:0,video:0,audiovideo:0}}trimBuffers(){const{hls:e,details:t,media:n}=this;if(!n||t===null||!this.sourceBufferCount)return;const r=e.config,s=n.currentTime,a=t.levelTargetDuration,o=t.live&&r.liveBackBufferLength!==null?r.liveBackBufferLength:r.backBufferLength;if(P(o)&&o>=0){const u=Math.max(o,a),l=Math.floor(s/a)*a-u;this.flushBackBuffer(s,a,l)}if(P(r.frontBufferFlushThreshold)&&r.frontBufferFlushThreshold>0){const u=Math.max(r.maxBufferLength,r.frontBufferFlushThreshold),l=Math.max(u,a),c=Math.floor(s/a)*a+l;this.flushFrontBuffer(s,a,c)}}flushBackBuffer(e,t,n){this.sourceBuffers.forEach(([r,s])=>{if(s){const o=ln.getBuffered(s);if(o.length>0&&n>o.start(0)){var a;this.hls.trigger(f.BACK_BUFFER_REACHED,{bufferEnd:n});const u=this.tracks[r];if((a=this.details)!=null&&a.live)this.hls.trigger(f.LIVE_BACK_BUFFER_REACHED,{bufferEnd:n});else if(u!=null&&u.ended){this.log(`Cannot flush ${r} back buffer while SourceBuffer is in ended state`);return}this.hls.trigger(f.BUFFER_FLUSHING,{startOffset:0,endOffset:n,type:r})}}})}flushFrontBuffer(e,t,n){this.sourceBuffers.forEach(([r,s])=>{if(s){const a=ln.getBuffered(s),o=a.length;if(o<2)return;const u=a.start(o-1),l=a.end(o-1);if(n>u||e>=u&&e<=l)return;this.hls.trigger(f.BUFFER_FLUSHING,{startOffset:u,endOffset:1/0,type:r})}})}getDurationAndRange(){var e;const{details:t,mediaSource:n}=this;if(!t||!this.media||(n==null?void 0:n.readyState)!=="open")return null;const r=t.edge;if(t.live&&this.hls.config.liveDurationInfinity){if(t.fragments.length&&t.live&&n.setLiveSeekableRange){const l=Math.max(0,t.fragmentStart),c=Math.max(l,r);return{duration:1/0,start:l,end:c}}return{duration:1/0}}const s=(e=this.overrides)==null?void 0:e.duration;if(s)return P(s)?{duration:s}:null;const a=this.media.duration,o=P(n.duration)?n.duration:0;return r>o&&r>a||!P(a)?{duration:r}:null}updateMediaSource({duration:e,start:t,end:n}){const r=this.mediaSource;!this.media||!r||r.readyState!=="open"||(r.duration!==e&&(P(e)&&this.log(`Updating MediaSource duration to ${e.toFixed(3)}`),r.duration=e),t!==void 0&&n!==void 0&&(this.log(`MediaSource duration is set to ${r.duration}. Setting seekable range to ${t}-${n}.`),r.setLiveSeekableRange(t,n)))}get tracksReady(){const e=this.pendingTrackCount;return e>0&&(e>=this.bufferCodecEventsTotal||this.isPending(this.tracks.audiovideo))}checkPendingTracks(){const{bufferCodecEventsTotal:e,pendingTrackCount:t,tracks:n}=this;if(this.log(`checkPendingTracks (pending: ${t} codec events expected: ${e}) ${Ot(n)}`),this.tracksReady){var r;const s=(r=this.transferData)==null?void 0:r.tracks;s&&Object.keys(s).length?this.attachTransferred():this.createSourceBuffers()}}bufferCreated(){if(this.sourceBufferCount){const e={};this.sourceBuffers.forEach(([t,n])=>{if(t){const r=this.tracks[t];e[t]={buffer:n,container:r.container,codec:r.codec,supplemental:r.supplemental,levelCodec:r.levelCodec,id:r.id,metadata:r.metadata}}}),this.hls.trigger(f.BUFFER_CREATED,{tracks:e}),this.log(`SourceBuffers created. Running queue: ${this.operationQueue}`),this.sourceBuffers.forEach(([t])=>{this.executeNext(t)})}else{const e=new Error("could not create source buffer for media codec(s)");this.hls.trigger(f.ERROR,{type:se.MEDIA_ERROR,details:U.BUFFER_INCOMPATIBLE_CODECS_ERROR,fatal:!0,error:e,reason:e.message})}}createSourceBuffers(){const{tracks:e,sourceBuffers:t,mediaSource:n}=this;if(!n)throw new Error("createSourceBuffers called when mediaSource was null");for(const s in e){const a=s,o=e[a];if(this.isPending(o)){const u=this.getTrackCodec(o,a),l=`${o.container};codecs=${u}`;o.codec=u,this.log(`creating sourceBuffer(${l})${this.currentOp(a)?" Queued":""} ${Ot(o)}`);try{const c=n.addSourceBuffer(l),d=Co(a),g=[a,c];t[d]=g,o.buffer=c}catch(c){var r;this.error(`error while trying to add sourceBuffer: ${c.message}`),this.shiftAndExecuteNext(a),(r=this.operationQueue)==null||r.removeBlockers(),delete this.tracks[a],this.hls.trigger(f.ERROR,{type:se.MEDIA_ERROR,details:U.BUFFER_ADD_CODEC_ERROR,fatal:!1,error:c,sourceBufferName:a,mimeType:l,parent:o.id});return}this.trackSourceBuffer(a,o)}}this.bufferCreated()}getTrackCodec(e,t){const n=e.supplemental;let r=e.codec;n&&(t==="video"||t==="audiovideo")&&Ln(n,"video")&&(r=Be(r,n));const s=be(r,e.levelCodec);return s?t.slice(0,5)==="audio"?me(s,this.appendSource):s:""}trackSourceBuffer(e,t){const n=t.buffer;if(!n)return;const r=this.getTrackCodec(t,e);this.tracks[e]={buffer:n,codec:r,container:t.container,levelCodec:t.levelCodec,supplemental:t.supplemental,metadata:t.metadata,id:t.id,listeners:[]},this.removeBufferListeners(e),this.addBufferListener(e,"updatestart",this.onSBUpdateStart),this.addBufferListener(e,"updateend",this.onSBUpdateEnd),this.addBufferListener(e,"error",this.onSBUpdateError),this.appendSource&&this.addBufferListener(e,"bufferedchange",(s,a)=>{const o=a.removedRanges;o!=null&&o.length&&this.hls.trigger(f.BUFFER_FLUSHED,{type:s})})}get mediaSrc(){var e,t;const n=((e=this.media)==null||(t=e.querySelector)==null?void 0:t.call(e,"source"))||this.media;return n==null?void 0:n.src}onSBUpdateStart(e){const t=this.currentOp(e);t&&t.onStart()}onSBUpdateEnd(e){var t;if(((t=this.mediaSource)==null?void 0:t.readyState)==="closed"){this.resetBuffer(e);return}const n=this.currentOp(e);n&&(n.onComplete(),this.shiftAndExecuteNext(e))}onSBUpdateError(e,t){var n;const r=new Error(`${e} SourceBuffer error. MediaSource readyState: ${(n=this.mediaSource)==null?void 0:n.readyState}`);this.error(`${r}`,t),this.hls.trigger(f.ERROR,{type:se.MEDIA_ERROR,details:U.BUFFER_APPENDING_ERROR,sourceBufferName:e,error:r,fatal:!1});const s=this.currentOp(e);s&&s.onError(r)}updateTimestampOffset(e,t,n,r,s,a){const o=t-e.timestampOffset;Math.abs(o)>=n&&(this.log(`Updating ${r} SourceBuffer timestampOffset to ${t} (sn: ${s} cc: ${a})`),e.timestampOffset=t)}removeExecutor(e,t,n){const{media:r,mediaSource:s}=this,a=this.tracks[e],o=a==null?void 0:a.buffer;if(!r||!s||!o){this.warn(`Attempting to remove from the ${e} SourceBuffer, but it does not exist`),this.shiftAndExecuteNext(e);return}const u=P(r.duration)?r.duration:1/0,l=P(s.duration)?s.duration:1/0,c=Math.max(0,t),d=Math.min(n,u,l);d>c&&(!a.ending||a.ended)?(a.ended=!1,this.log(`Removing [${c},${d}] from the ${e} SourceBuffer`),o.remove(c,d)):this.shiftAndExecuteNext(e)}appendExecutor(e,t){const n=this.tracks[t],r=n==null?void 0:n.buffer;if(!r)throw new Zl(`Attempting to append to the ${t} SourceBuffer, but it does not exist`);n.ending=!1,n.ended=!1,r.appendBuffer(e)}blockUntilOpen(e){if(this.isUpdating()||this.isQueued())this.blockBuffers(e).catch(t=>{this.warn(`SourceBuffer blocked callback ${t}`),this.stepOperationQueue(this.sourceBufferTypes)});else try{e()}catch(t){this.warn(`Callback run without blocking ${this.operationQueue} ${t}`)}}isUpdating(){return this.sourceBuffers.some(([e,t])=>e&&t.updating)}isQueued(){return this.sourceBuffers.some(([e])=>e&&!!this.currentOp(e))}isPending(e){return!!e&&!e.buffer}blockBuffers(e,t=this.sourceBufferTypes){if(!t.length)return this.log("Blocking operation requested, but no SourceBuffers exist"),Promise.resolve().then(e);const{operationQueue:n}=this,r=t.map(a=>this.appendBlocker(a));return t.length>1&&!!this.blockedAudioAppend&&this.unblockAudio(),Promise.all(r).then(a=>{n===this.operationQueue&&(e(),this.stepOperationQueue(this.sourceBufferTypes))})}stepOperationQueue(e){e.forEach(t=>{var n;const r=(n=this.tracks[t])==null?void 0:n.buffer;!r||r.updating||this.shiftAndExecuteNext(t)})}append(e,t,n){this.operationQueue&&this.operationQueue.append(e,t,n)}appendBlocker(e){if(this.operationQueue)return this.operationQueue.appendBlocker(e)}currentOp(e){return this.operationQueue?this.operationQueue.current(e):null}executeNext(e){e&&this.operationQueue&&this.operationQueue.executeNext(e)}shiftAndExecuteNext(e){this.operationQueue&&this.operationQueue.shiftAndExecuteNext(e)}get pendingTrackCount(){return Object.keys(this.tracks).reduce((e,t)=>e+(this.isPending(this.tracks[t])?1:0),0)}get sourceBufferCount(){return this.sourceBuffers.reduce((e,[t])=>e+(t?1:0),0)}get sourceBufferTypes(){return this.sourceBuffers.map(([e])=>e).filter(e=>!!e)}addBufferListener(e,t,n){const r=this.tracks[e];if(!r)return;const s=r.buffer;if(!s)return;const a=n.bind(this,e);r.listeners.push({event:t,listener:a}),s.addEventListener(t,a)}removeBufferListeners(e){const t=this.tracks[e];if(!t)return;const n=t.buffer;n&&(t.listeners.forEach(r=>{n.removeEventListener(r.event,r.listener)}),t.listeners.length=0)}}function SA(i){const e=i.querySelectorAll("source");[].slice.call(e).forEach(t=>{i.removeChild(t)})}function TA(i,e){const t=self.document.createElement("source");t.type="video/mp4",t.src=e,i.appendChild(t)}function Co(i){return i==="audio"?1:0}class xo{constructor(e){this.hls=void 0,this.autoLevelCapping=void 0,this.firstLevel=void 0,this.media=void 0,this.restrictedLevels=void 0,this.timer=void 0,this.clientRect=void 0,this.streamController=void 0,this.hls=e,this.autoLevelCapping=Number.POSITIVE_INFINITY,this.firstLevel=-1,this.media=null,this.restrictedLevels=[],this.timer=void 0,this.clientRect=null,this.registerListeners()}setStreamController(e){this.streamController=e}destroy(){this.hls&&this.unregisterListener(),this.timer&&this.stopCapping(),this.media=null,this.clientRect=null,this.hls=this.streamController=null}registerListeners(){const{hls:e}=this;e.on(f.FPS_DROP_LEVEL_CAPPING,this.onFpsDropLevelCapping,this),e.on(f.MEDIA_ATTACHING,this.onMediaAttaching,this),e.on(f.MANIFEST_PARSED,this.onManifestParsed,this),e.on(f.LEVELS_UPDATED,this.onLevelsUpdated,this),e.on(f.BUFFER_CODECS,this.onBufferCodecs,this),e.on(f.MEDIA_DETACHING,this.onMediaDetaching,this)}unregisterListener(){const{hls:e}=this;e.off(f.FPS_DROP_LEVEL_CAPPING,this.onFpsDropLevelCapping,this),e.off(f.MEDIA_ATTACHING,this.onMediaAttaching,this),e.off(f.MANIFEST_PARSED,this.onManifestParsed,this),e.off(f.LEVELS_UPDATED,this.onLevelsUpdated,this),e.off(f.BUFFER_CODECS,this.onBufferCodecs,this),e.off(f.MEDIA_DETACHING,this.onMediaDetaching,this)}onFpsDropLevelCapping(e,t){const n=this.hls.levels[t.droppedLevel];this.isLevelAllowed(n)&&this.restrictedLevels.push({bitrate:n.bitrate,height:n.height,width:n.width})}onMediaAttaching(e,t){this.media=t.media instanceof HTMLVideoElement?t.media:null,this.clientRect=null,this.timer&&this.hls.levels.length&&this.detectPlayerSize()}onManifestParsed(e,t){const n=this.hls;this.restrictedLevels=[],this.firstLevel=t.firstLevel,n.config.capLevelToPlayerSize&&t.video&&this.startCapping()}onLevelsUpdated(e,t){this.timer&&P(this.autoLevelCapping)&&this.detectPlayerSize()}onBufferCodecs(e,t){this.hls.config.capLevelToPlayerSize&&t.video&&this.startCapping()}onMediaDetaching(){this.stopCapping(),this.media=null}detectPlayerSize(){if(this.media){if(this.mediaHeight<=0||this.mediaWidth<=0){this.clientRect=null;return}const e=this.hls.levels;if(e.length){const t=this.hls,n=this.getMaxLevel(e.length-1);n!==this.autoLevelCapping&&t.logger.log(`Setting autoLevelCapping to ${n}: ${e[n].height}p@${e[n].bitrate} for media ${this.mediaWidth}x${this.mediaHeight}`),t.autoLevelCapping=n,t.autoLevelEnabled&&t.autoLevelCapping>this.autoLevelCapping&&this.streamController&&this.streamController.nextLevelSwitch(),this.autoLevelCapping=t.autoLevelCapping}}}getMaxLevel(e){const t=this.hls.levels;if(!t.length)return-1;const n=t.filter((r,s)=>this.isLevelAllowed(r)&&s<=e);return this.clientRect=null,xo.getMaxLevelByMediaSize(n,this.mediaWidth,this.mediaHeight)}startCapping(){this.timer||(this.autoLevelCapping=Number.POSITIVE_INFINITY,self.clearInterval(this.timer),this.timer=self.setInterval(this.detectPlayerSize.bind(this),1e3),this.detectPlayerSize())}stopCapping(){this.restrictedLevels=[],this.firstLevel=-1,this.autoLevelCapping=Number.POSITIVE_INFINITY,this.timer&&(self.clearInterval(this.timer),this.timer=void 0)}getDimensions(){if(this.clientRect)return this.clientRect;const e=this.media,t={width:0,height:0};if(e){const n=e.getBoundingClientRect();t.width=n.width,t.height=n.height,!t.width&&!t.height&&(t.width=n.right-n.left||e.width||0,t.height=n.bottom-n.top||e.height||0)}return this.clientRect=t,t}get mediaWidth(){return this.getDimensions().width*this.contentScaleFactor}get mediaHeight(){return this.getDimensions().height*this.contentScaleFactor}get contentScaleFactor(){let e=1;if(!this.hls.config.ignoreDevicePixelRatio)try{e=self.devicePixelRatio}catch(t){}return Math.min(e,this.hls.config.maxDevicePixelRatio)}isLevelAllowed(e){return!this.restrictedLevels.some(n=>e.bitrate===n.bitrate&&e.width===n.width&&e.height===n.height)}static getMaxLevelByMediaSize(e,t,n){if(!(e!=null&&e.length))return-1;const r=(o,u)=>u?o.width!==u.width||o.height!==u.height:!0;let s=e.length-1;const a=Math.max(t,n);for(let o=0;o<e.length;o+=1){const u=e[o];if((u.width>=a||u.height>=a)&&r(u,e[o+1])){s=o;break}}return s}}const Ri={MANIFEST:"m",AUDIO:"a",VIDEO:"v",MUXED:"av",INIT:"i",CAPTION:"c",TIMED_TEXT:"tt",KEY:"k",OTHER:"o"},Wa={HLS:"h"},ia={OBJECT:"CMCD-Object",REQUEST:"CMCD-Request",SESSION:"CMCD-Session",STATUS:"CMCD-Status"},jl={[ia.OBJECT]:["br","ab","d","ot","tb","tpb","lb","tab","lab","url"],[ia.REQUEST]:["pb","bl","tbl","dl","ltc","mtp","nor","nrr","rc","sn","sta","su","ttfb","ttfbb","ttlb","cmsdd","cmsds","smrt","df","cs"],[ia.SESSION]:["cid","pr","sf","sid","st","v","msd"],[ia.STATUS]:["bs","bsd","cdn","rtp","bg","pt","ec","e"]};class Hs{constructor(e,t){Array.isArray(e)&&(e=e.map(n=>n instanceof Hs?n:new Hs(n))),this.value=e,this.params=t}}const So="Dict";function To(i){return Array.isArray(i)?JSON.stringify(i):i instanceof Map?"Map{}":i instanceof Set?"Set{}":typeof i=="object"?JSON.stringify(i):String(i)}function DA(i,e,t,n){return new Error(`failed to ${i} "${To(e)}" as ${t}`,{cause:n})}function is(i,e,t){return DA("serialize",i,e,t)}class Fo{constructor(e){this.description=e}}const Io="Bare Item",Do="Boolean";function Yl(i){if(typeof i!="boolean")throw is(i,Do);return i?"?1":"?0"}function Xl(i){return btoa(String.fromCharCode(...i))}const Jl="Byte Sequence";function Ji(i){if(ArrayBuffer.isView(i)===!1)throw is(i,Jl);return`:${Xl(i)}:`}const Lo="Integer";function ql(i){return i<-999999999999999||999999999999999<i}function LA(i){if(ql(i))throw is(i,Lo);return i.toString()}function eu(i){return`@${LA(i.getTime()/1e3)}`}function RA(i,e){if(i<0)return-RA(-i,e);const t=Math.pow(10,e);if(Math.abs(i*t%1-.5)<Number.EPSILON){const r=Math.floor(i*t);return(r%2===0?r:r+1)/t}else return Math.round(i*t)/t}const tu="Decimal";function nu(i){const e=RA(i,3);if(Math.floor(Math.abs(e)).toString().length>12)throw is(i,tu);const t=e.toString();return t.includes(".")?t:`${t}.0`}const ru="String",iu=/[\x00-\x1f\x7f]+/;function su(i){if(iu.test(i))throw is(i,ru);return`"${i.replace(/\\/g,"\\\\").replace(/"/g,'\\"')}"`}function UA(i){return i.description||i.toString().slice(7,-1)}const au="Token";function za(i){const e=UA(i);if(/^([a-zA-Z*])([!#$%&'*+\-.^_`|~\w:/]*)$/.test(e)===!1)throw is(e,au);return e}function ja(i){switch(typeof i){case"number":if(!P(i))throw is(i,Io);return Number.isInteger(i)?LA(i):nu(i);case"string":return su(i);case"symbol":return za(i);case"boolean":return Yl(i);case"object":if(i instanceof Date)return eu(i);if(i instanceof Uint8Array)return Ji(i);if(i instanceof Fo)return za(i);default:throw is(i,Io)}}const xi="Key";function Ks(i){if(/^[a-z*][a-z0-9\-_.*]*$/.test(i)===!1)throw is(i,xi);return i}function Ro(i){return i==null?"":Object.entries(i).map(([e,t])=>t===!0?`;${Ks(e)}`:`;${Ks(e)}=${ja(t)}`).join("")}function kA(i){return i instanceof Hs?`${ja(i.value)}${Ro(i.params)}`:ja(i)}function OA(i){return`(${i.value.map(kA).join(" ")})${Ro(i.params)}`}function Uo(i,e={whitespace:!0}){if(typeof i!="object")throw is(i,So);const t=i instanceof Map?i.entries():Object.entries(i),n=e!=null&&e.whitespace?" ":"";return Array.from(t).map(([r,s])=>{s instanceof Hs||(s=new Hs(s));let a=Ks(r);return s.value===!0?a+=Ro(s.params):(a+="=",Array.isArray(s.value)?a+=OA(s):a+=kA(s)),a}).join(`,${n}`)}function ou(i,e){return Uo(i,e)}function Au(i){return["ot","sf","st","e","sta"].includes(i)}function lu(i){return typeof i=="number"?P(i):i!=null&&i!==""&&i!==!1}function uu(i,e){const t=new URL(i),n=new URL(e);if(t.origin!==n.origin)return i;const r=t.pathname.split("/").slice(1),s=n.pathname.split("/").slice(1,-1);for(;r[0]===s[0];)r.shift(),s.shift();for(;s.length;)s.shift(),r.unshift("..");return r.join("/")}const Ya=i=>Math.round(i),cu=(i,e)=>(e!=null&&e.baseUrl&&(i=uu(i,e.baseUrl)),encodeURIComponent(i)),Xa=i=>Ya(i/100)*100,fu={br:Ya,d:Ya,bl:Xa,dl:Xa,mtp:Xa,nor:cu,rtp:Xa,tb:Ya};function PA(i,e){const t={};if(i==null||typeof i!="object")return t;const n=Object.keys(i).sort(),r=h({},fu,e==null?void 0:e.formatters),s=e==null?void 0:e.filter;return n.forEach(a=>{if((s==null?void 0:s(a))===!1)return;let o=i[a];const u=r[a];u&&(o=u(o,e)),!(a==="v"&&o===1)&&(a=="pr"&&o===1||lu(o)&&(Au(a)&&typeof o=="string"&&(o=new Fo(o)),t[a]=o))}),t}function ko(i,e={}){return i?ou(PA(i,e),h({whitespace:!1},e)):""}function QA(i,e={}){const t={};if(!i)return t;const n=Object.entries(i),r=Object.entries(jl).concat(Object.entries((e==null?void 0:e.customHeaderMap)||{})),s=n.reduce((a,o)=>{var u,l;const[c,d]=o,g=((u=r.find(w=>w[1].includes(c)))===null||u===void 0?void 0:u[0])||ia.REQUEST;return(l=a[g])!==null&&l!==void 0||(a[g]={}),a[g][c]=d,a},{});return Object.entries(s).reduce((a,[o,u])=>(a[o]=ko(u,e),a),t)}function MA(i,e,t){return h(i,QA(e,t))}const Oo="CMCD";function du(i,e={}){if(!i)return"";const t=ko(i,e);return`${Oo}=${encodeURIComponent(t)}`}const NA=/CMCD=[^&#]+/;function hu(i,e,t){const n=du(e,t);if(!n)return i;if(NA.test(i))return i.replace(NA,n);const r=i.includes("?")?"&":"?";return`${i}${r}${n}`}class gu{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:Ri.MANIFEST,su:!this.initialized})}catch(s){this.hls.logger.warn("Could not generate manifest CMCD data.",s)}},this.applyFragmentData=r=>{try{const{frag:s,part:a}=r,o=this.hls.levels[s.level],u=this.getObjectType(s),l={d:(a||s).duration*1e3,ot:u};(u===Ri.VIDEO||u===Ri.AUDIO||u==Ri.MUXED)&&(l.br=o.bitrate/1e3,l.tb=this.getTopBandwidth(u)/1e3,l.bl=this.getBufferLength(u));const c=a?this.getNextPart(a):this.getNextFrag(s);c!=null&&c.url&&c.url!==s.url&&(l.nor=c.url),this.apply(r,l)}catch(s){this.hls.logger.warn("Could not generate segment CMCD data.",s)}},this.hls=e;const t=this.config=e.config,{cmcd:n}=t;n!=null&&(t.pLoader=this.createPlaylistLoader(),t.fLoader=this.createFragmentLoader(),this.sid=n.sessionId||e.sessionId,this.cid=n.contentId,this.useHeaders=n.useHeaders===!0,this.includeKeys=n.includeKeys,this.registerListeners())}registerListeners(){const e=this.hls;e.on(f.MEDIA_ATTACHED,this.onMediaAttached,this),e.on(f.MEDIA_DETACHED,this.onMediaDetached,this),e.on(f.BUFFER_CREATED,this.onBufferCreated,this)}unregisterListeners(){const e=this.hls;e.off(f.MEDIA_ATTACHED,this.onMediaAttached,this),e.off(f.MEDIA_DETACHED,this.onMediaDetached,this),e.off(f.BUFFER_CREATED,this.onBufferCreated,this)}destroy(){this.unregisterListeners(),this.onMediaDetached(),this.hls=this.config=this.audioBuffer=this.videoBuffer=null,this.onWaiting=this.onPlaying=this.media=null}onMediaAttached(e,t){this.media=t.media,this.media.addEventListener("waiting",this.onWaiting),this.media.addEventListener("playing",this.onPlaying)}onMediaDetached(){this.media&&(this.media.removeEventListener("waiting",this.onWaiting),this.media.removeEventListener("playing",this.onPlaying),this.media=null)}onBufferCreated(e,t){var n,r;this.audioBuffer=(n=t.tracks.audio)==null?void 0:n.buffer,this.videoBuffer=(r=t.tracks.video)==null?void 0:r.buffer}createData(){var e;return{v:1,sf:Wa.HLS,sid:this.sid,cid:this.cid,pr:(e=this.media)==null?void 0:e.playbackRate,mtp:this.hls.bandwidthEstimate/1e3}}apply(e,t={}){h(t,this.createData());const n=t.ot===Ri.INIT||t.ot===Ri.VIDEO||t.ot===Ri.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((a,o)=>(r.includes(o)&&(a[o]=t[o]),a),{}));const s={baseUrl:e.url};this.useHeaders?(e.headers||(e.headers={}),MA(e.headers,t,s)):e.url=hu(e.url,t,s)}getNextFrag(e){var t;const n=(t=this.hls.levels[e.level])==null?void 0:t.details;if(n){const r=e.sn-n.startSN;return n.fragments[r+1]}}getNextPart(e){var t,n;const{index:r,fragment:s}=e,a=(t=this.hls.levels[s.level])==null||(n=t.details)==null?void 0:n.partList;if(a){const{sn:o}=s;for(let u=a.length-1;u>=0;u--){const l=a[u];if(l.index===r&&l.fragment.sn===o)return a[u+1]}}}getObjectType(e){const{type:t}=e;if(t==="subtitle")return Ri.TIMED_TEXT;if(e.sn==="initSegment")return Ri.INIT;if(t==="audio")return Ri.AUDIO;if(t==="main")return this.hls.audioTracks.length?Ri.VIDEO:Ri.MUXED}getTopBandwidth(e){let t=0,n;const r=this.hls;if(e===Ri.AUDIO)n=r.audioTracks;else{const s=r.maxAutoLevel,a=s>-1?s+1:r.levels.length;n=r.levels.slice(0,a)}return n.forEach(s=>{s.bitrate>t&&(t=s.bitrate)}),t>0?t:NaN}getBufferLength(e){const t=this.media,n=e===Ri.AUDIO?this.audioBuffer:this.videoBuffer;return!n||!t?NaN:ln.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(s){this.loader=void 0,this.loader=new n(s)}get stats(){return this.loader.stats}get context(){return this.loader.context}destroy(){this.loader.destroy()}abort(){this.loader.abort()}load(s,a,o){t(s),this.loader.load(s,a,o)}}}createFragmentLoader(){const{fLoader:e}=this.config,t=this.applyFragmentData,n=e||this.config.loader;return class{constructor(s){this.loader=void 0,this.loader=new n(s)}get stats(){return this.loader.stats}get context(){return this.loader.context}destroy(){this.loader.destroy()}abort(){this.loader.abort()}load(s,a,o){t(s),this.loader.load(s,a,o)}}}}const Ja=3e5;class qa extends R{constructor(e){super("content-steering",e.logger),this.hls=void 0,this.loader=null,this.uri=null,this.pathwayId=".",this._pathwayPriority=null,this.timeToLoad=300,this.reloadTimer=-1,this.updated=0,this.started=!1,this.enabled=!0,this.levels=null,this.audioTracks=null,this.subtitleTracks=null,this.penalizedPathways={},this.hls=e,this.registerListeners()}registerListeners(){const e=this.hls;e.on(f.MANIFEST_LOADING,this.onManifestLoading,this),e.on(f.MANIFEST_LOADED,this.onManifestLoaded,this),e.on(f.MANIFEST_PARSED,this.onManifestParsed,this),e.on(f.ERROR,this.onError,this)}unregisterListeners(){const e=this.hls;e&&(e.off(f.MANIFEST_LOADING,this.onManifestLoading,this),e.off(f.MANIFEST_LOADED,this.onManifestLoaded,this),e.off(f.MANIFEST_PARSED,this.onManifestParsed,this),e.off(f.ERROR,this.onError,this))}pathways(){return(this.levels||[]).reduce((e,t)=>(e.indexOf(t.pathwayId)===-1&&e.push(t.pathwayId),e),[])}get pathwayPriority(){return this._pathwayPriority}set pathwayPriority(e){this.updatePathwayPriority(e)}startLoad(){if(this.started=!0,this.clearTimeout(),this.enabled&&this.uri){if(this.updated){const e=this.timeToLoad*1e3-(performance.now()-this.updated);if(e>0){this.scheduleRefresh(this.uri,e);return}}this.loadSteeringManifest(this.uri)}}stopLoad(){this.started=!1,this.loader&&(this.loader.destroy(),this.loader=null),this.clearTimeout()}clearTimeout(){this.reloadTimer!==-1&&(self.clearTimeout(this.reloadTimer),this.reloadTimer=-1)}destroy(){this.unregisterListeners(),this.stopLoad(),this.hls=null,this.levels=this.audioTracks=this.subtitleTracks=null}removeLevel(e){const t=this.levels;t&&(this.levels=t.filter(n=>n!==e))}onManifestLoading(){this.stopLoad(),this.enabled=!0,this.timeToLoad=300,this.updated=0,this.uri=null,this.pathwayId=".",this.levels=this.audioTracks=this.subtitleTracks=null}onManifestLoaded(e,t){const{contentSteering:n}=t;n!==null&&(this.pathwayId=n.pathwayId,this.uri=n.uri,this.started&&this.startLoad())}onManifestParsed(e,t){this.audioTracks=t.audioTracks,this.subtitleTracks=t.subtitleTracks}onError(e,t){const{errorAction:n}=t;if((n==null?void 0:n.action)===St.SendAlternateToPenaltyBox&&n.flags===$t.MoveAllAlternatesMatchingHost){const r=this.levels;let s=this._pathwayPriority,a=this.pathwayId;if(t.context){const{groupId:o,pathwayId:u,type:l}=t.context;o&&r?a=this.getPathwayForGroupId(o,l,a):u&&(a=u)}a in this.penalizedPathways||(this.penalizedPathways[a]=performance.now()),!s&&r&&(s=this.pathways()),s&&s.length>1&&(this.updatePathwayPriority(s),n.resolved=this.pathwayId!==a),t.details===U.BUFFER_APPEND_ERROR&&!t.fatal?n.resolved=!0:n.resolved||this.warn(`Could not resolve ${t.details} ("${t.error.message}") with content-steering for Pathway: ${a} levels: ${r&&r.length} priorities: ${Ot(s)} penalized: ${Ot(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(s=>{r-n[s]>Ja&&delete n[s]});for(let s=0;s<e.length;s++){const a=e[s];if(a in n)continue;if(a===this.pathwayId)return;const o=this.hls.nextLoadLevel,u=this.hls.levels[o];if(t=this.getLevelsForPathway(a),t.length>0){this.log(`Setting Pathway to "${a}"`),this.pathwayId=a,bi(t),this.hls.trigger(f.LEVELS_UPDATED,{levels:t});const l=this.hls.levels[o];u&&l&&this.levels&&(l.attrs["STABLE-VARIANT-ID"]!==u.attrs["STABLE-VARIANT-ID"]&&l.bitrate!==u.bitrate&&this.log(`Unstable Pathways change from bitrate ${u.bitrate} to ${l.bitrate}`),this.hls.nextLoadLevel=o);break}}}getPathwayForGroupId(e,t,n){const r=this.getLevelsForPathway(n).concat(this.levels||[]);for(let s=0;s<r.length;s++)if(t===fe.AUDIO_TRACK&&r[s].hasAudioGroup(e)||t===fe.SUBTITLE_TRACK&&r[s].hasSubtitleGroup(e))return r[s].pathwayId;return n}clonePathways(e){const t=this.levels;if(!t)return;const n={},r={};e.forEach(s=>{const{ID:a,"BASE-ID":o,"URI-REPLACEMENT":u}=s;if(t.some(c=>c.pathwayId===a))return;const l=this.getLevelsForPathway(o).map(c=>{const d=new In(c.attrs);d["PATHWAY-ID"]=a;const g=d.AUDIO&&`${d.AUDIO}_clone_${a}`,w=d.SUBTITLES&&`${d.SUBTITLES}_clone_${a}`;g&&(n[d.AUDIO]=g,d.AUDIO=g),w&&(r[d.SUBTITLES]=w,d.SUBTITLES=w);const y=Po(c.uri,d["STABLE-VARIANT-ID"],"PER-VARIANT-URIS",u),O=new qt({attrs:d,audioCodec:c.audioCodec,bitrate:c.bitrate,height:c.height,name:c.name,url:y,videoCodec:c.videoCodec,width:c.width});if(c.audioGroups)for(let H=1;H<c.audioGroups.length;H++)O.addGroupId("audio",`${c.audioGroups[H]}_clone_${a}`);if(c.subtitleGroups)for(let H=1;H<c.subtitleGroups.length;H++)O.addGroupId("text",`${c.subtitleGroups[H]}_clone_${a}`);return O});t.push(...l),HA(this.audioTracks,n,u,a),HA(this.subtitleTracks,r,u,a)})}loadSteeringManifest(e){const t=this.hls.config,n=t.loader;this.loader&&this.loader.destroy(),this.loader=new n(t);let r;try{r=new self.URL(e)}catch(c){this.enabled=!1,this.log(`Failed to parse Steering Manifest URI: ${e}`);return}if(r.protocol!=="data:"){const c=(this.hls.bandwidthEstimate||t.abrEwmaDefaultEstimate)|0;r.searchParams.set("_HLS_pathway",this.pathwayId),r.searchParams.set("_HLS_throughput",""+c)}const s={responseType:"json",url:r.href},a=t.steeringManifestLoadPolicy.default,o=a.errorRetry||a.timeoutRetry||{},u={loadPolicy:a,timeout:a.maxLoadTimeMs,maxRetry:o.maxNumRetry||0,retryDelay:o.retryDelayMs||0,maxRetryDelay:o.maxRetryDelayMs||0},l={onSuccess:(c,d,g,w)=>{this.log(`Loaded steering manifest: "${r}"`);const y=c.data;if((y==null?void 0:y.VERSION)!==1){this.log(`Steering VERSION ${y.VERSION} not supported!`);return}this.updated=performance.now(),this.timeToLoad=y.TTL;const{"RELOAD-URI":O,"PATHWAY-CLONES":H,"PATHWAY-PRIORITY":Ae}=y;if(O)try{this.uri=new self.URL(O,r).href}catch(we){this.enabled=!1,this.log(`Failed to parse Steering Manifest RELOAD-URI: ${O}`);return}this.scheduleRefresh(this.uri||g.url),H&&this.clonePathways(H);const Ee={steeringManifest:y,url:r.toString()};this.hls.trigger(f.STEERING_MANIFEST_LOADED,Ee),Ae&&this.updatePathwayPriority(Ae)},onError:(c,d,g,w)=>{if(this.log(`Error loading steering manifest: ${c.code} ${c.text} (${d.url})`),this.stopLoad(),c.code===410){this.enabled=!1,this.log(`Steering manifest ${d.url} no longer available`);return}let y=this.timeToLoad*1e3;if(c.code===429){const O=this.loader;if(typeof(O==null?void 0:O.getResponseHeader)=="function"){const H=O.getResponseHeader("Retry-After");H&&(y=parseFloat(H)*1e3)}this.log(`Steering manifest ${d.url} rate limited`);return}this.scheduleRefresh(this.uri||d.url,y)},onTimeout:(c,d,g)=>{this.log(`Timeout loading steering manifest (${d.url})`),this.scheduleRefresh(this.uri||d.url)}};this.log(`Requesting steering manifest: ${r}`),this.loader.load(s,u,l)}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 HA(i,e,t,n){i&&Object.keys(e).forEach(r=>{const s=i.filter(a=>a.groupId===r).map(a=>{const o=h({},a);return o.details=void 0,o.attrs=new In(o.attrs),o.url=o.attrs.URI=Po(a.url,a.attrs["STABLE-RENDITION-ID"],"PER-RENDITION-URIS",t),o.groupId=o.attrs["GROUP-ID"]=e[r],o.attrs["PATHWAY-ID"]=n,o});i.push(...s)})}function Po(i,e,t,n){const{HOST:r,PARAMS:s,[t]:a}=n;let o;e&&(o=a==null?void 0:a[e],o&&(i=o));const u=new self.URL(i);return r&&!o&&(u.host=r),s&&Object.keys(s).sort().forEach(l=>{l&&u.searchParams.set(l,s[l])}),u.href}function Oi(i,e,t){qi(i,e,t),i.addEventListener(e,t)}function qi(i,e,t){i.removeEventListener(e,t)}class Gs extends R{constructor(e){super("eme",e.logger),this.hls=void 0,this.config=void 0,this.media=null,this.keyFormatPromise=null,this.keySystemAccessPromises={},this._requestLicenseFailureCount=0,this.mediaKeySessions=[],this.keyIdToKeySessionPromise={},this.mediaKeys=null,this.setMediaKeysQueue=Gs.CDMCleanupPromise?[Gs.CDMCleanupPromise]:[],this.onWaitingForKey=t=>{this.log(`"${t.type}" event`)},this.hls=e,this.config=e.config,this.registerListeners()}destroy(){this.onDestroying(),this.onMediaDetached();const e=this.config;e.requestMediaKeySystemAccessFunc=null,e.licenseXhrSetup=e.licenseResponseCallback=void 0,e.drmSystems=e.drmSystemOptions={},this.hls=this.config=this.keyIdToKeySessionPromise=null,this.onWaitingForKey=null}registerListeners(){this.hls.on(f.MEDIA_ATTACHED,this.onMediaAttached,this),this.hls.on(f.MEDIA_DETACHED,this.onMediaDetached,this),this.hls.on(f.MANIFEST_LOADING,this.onManifestLoading,this),this.hls.on(f.MANIFEST_LOADED,this.onManifestLoaded,this),this.hls.on(f.DESTROYING,this.onDestroying,this)}unregisterListeners(){this.hls.off(f.MEDIA_ATTACHED,this.onMediaAttached,this),this.hls.off(f.MEDIA_DETACHED,this.onMediaDetached,this),this.hls.off(f.MANIFEST_LOADING,this.onManifestLoading,this),this.hls.off(f.MANIFEST_LOADED,this.onManifestLoaded,this),this.hls.off(f.DESTROYING,this.onDestroying,this)}getLicenseServerUrl(e){const{drmSystems:t,widevineLicenseUrl:n}=this.config,r=t[e];if(r)return r.licenseUrl;if(e===Ar.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=(a,o,u)=>!!a&&u.indexOf(a)===o,r=t.map(a=>a.audioCodec).filter(n),s=t.map(a=>a.videoCodec).filter(n);return r.length+s.length===0&&s.push("avc1.42e01e"),new Promise((a,o)=>{const u=l=>{const c=l.shift();this.getMediaKeysPromise(c,r,s).then(d=>a({keySystem:c,mediaKeys:d})).catch(d=>{l.length?u(l):d instanceof $i?o(d):o(new $i({type:se.KEY_SYSTEM_ERROR,details:U.KEY_SYSTEM_NO_ACCESS,error:d,fatal:!0},d.message))})};u(e)})}requestMediaKeySystemAccess(e,t){const{requestMediaKeySystemAccessFunc:n}=this.config;if(typeof n!="function"){let r=`Configured requestMediaKeySystemAccess is not a function ${n}`;return br===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=Dr(e,t,n,this.config.drmSystemOptions),s=this.keySystemAccessPromises[e];let a=s==null?void 0:s.keySystemAccess;if(!a){this.log(`Requesting encrypted media "${e}" key-system access with config: ${Ot(r)}`),a=this.requestMediaKeySystemAccess(e,r);const o=this.keySystemAccessPromises[e]={keySystemAccess:a};return a.catch(u=>{this.log(`Failed to obtain access to key-system "${e}": ${u}`)}),a.then(u=>{this.log(`Access for key-system "${u.keySystem}" obtained`);const l=this.fetchServerCertificate(e);return this.log(`Create media-keys for "${e}"`),o.mediaKeys=u.createMediaKeys().then(c=>(this.log(`Media-keys created for "${e}"`),o.hasMediaKeys=!0,l.then(d=>d?this.setMediaKeysServerCertificate(c,e,d):c))),o.mediaKeys.catch(c=>{this.error(`Failed to create media-keys for "${e}"}: ${c}`)}),o.mediaKeys})}return a.then(()=>s.mediaKeys)}createMediaKeySessionContext({decryptdata:e,keySystem:t,mediaKeys:n}){this.log(`Creating key-system session "${t}" keyId: ${W.hexDump(e.keyId||[])}`);const r=n.createSession(),s={decryptdata:e,keySystem:t,mediaKeys:n,mediaKeysSession:r,keyStatus:"status-pending"};return this.mediaKeySessions.push(s),s}renewKeySession(e){const t=e.decryptdata;if(t.pssh){const n=this.createMediaKeySessionContext(e),r=this.getKeyIdString(t),s="cenc";this.keyIdToKeySessionPromise[r]=this.generateRequestWithPreferredKeySession(n,s,t.pssh.buffer,"expired")}else this.warn("Could not renew expired session. Missing pssh initData.");this.removeSession(e)}getKeyIdString(e){if(!e)throw new Error("Could not read keyId of undefined decryptdata");if(e.keyId===null)throw new Error("keyId is null");return W.hexDump(e.keyId)}updateKeySession(e,t){var n;const r=e.mediaKeysSession;return this.log(`Updating key-session "${r.sessionId}" for keyID ${W.hexDump(((n=e.decryptdata)==null?void 0:n.keyId)||[])}
} (data length: ${t&&t.byteLength})`),r.update(t)}getSelectedKeySystemFormats(){return Object.keys(this.keySystemAccessPromises).map(e=>({keySystem:e,hasMediaKeys:this.keySystemAccessPromises[e].hasMediaKeys})).filter(({hasMediaKeys:e})=>!!e).map(({keySystem:e})=>lr(e)).filter(e=>!!e)}getKeySystemAccess(e){return this.getKeySystemSelectionPromise(e).then(({keySystem:t,mediaKeys:n})=>this.attemptSetMediaKeys(t,n))}selectKeySystem(e){return new Promise((t,n)=>this.getKeySystemSelectionPromise(e).then(({keySystem:r})=>{const s=lr(r);s?t(s):n(new Error(`Unable to find format for key-system "${r}"`))}).catch(n))}selectKeySystemFormat(e){const t=Object.keys(e.levelkeys||{});return this.keyFormatPromise||(this.log(`Selecting key-system from fragment (sn: ${e.sn} ${e.type}: ${e.level}) key formats ${t.join(", ")}`),this.keyFormatPromise=this.getKeyFormatPromise(t)),this.keyFormatPromise}getKeyFormatPromise(e){const t=dr(this.config),n=e.map(sr).filter(r=>!!r&&t.indexOf(r)!==-1);return this.selectKeySystem(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 s=this.keyIdToKeySessionPromise[n];return s||(s=this.getKeySystemForKeyPromise(t).then(({keySystem:o,mediaKeys:u})=>(this.throwIfDestroyed(),this.log(`Handle encrypted media sn: ${e.frag.sn} ${e.frag.type}: ${e.frag.level} using key ${r}`),this.attemptSetMediaKeys(o,u).then(()=>(this.throwIfDestroyed(),this.createMediaKeySessionContext({keySystem:o,mediaKeys:u,decryptdata:t}))))),(this.keyIdToKeySessionPromise[n]=s.then(o=>{const u="cenc",l=t.pssh?t.pssh.buffer:null;return this.generateRequestWithPreferredKeySession(o,u,l,"playlist-key")})).catch(o=>this.handleError(o))),s}throwIfDestroyed(e="Invalid state"){if(!this.hls)throw new Error("invalid state")}handleError(e){this.hls&&(this.error(e.message),e instanceof $i?this.hls.trigger(f.ERROR,e.data):this.hls.trigger(f.ERROR,{type:se.KEY_SYSTEM_ERROR,details:U.KEY_SYSTEM_NO_KEYS,error:e,fatal:!0}))}getKeySystemForKeyPromise(e){const t=this.getKeyIdString(e),n=this.keyIdToKeySessionPromise[t];if(!n){const r=sr(e.keyFormat),s=r?[r]:dr(this.config);return this.attemptKeySystemAccess(s)}return n}getKeySystemSelectionPromise(e){if(e.length||(e=dr(this.config)),e.length===0)throw new $i({type:se.KEY_SYSTEM_ERROR,details:U.KEY_SYSTEM_NO_CONFIGURED_LICENSE,fatal:!0},`Missing key-system license configuration options ${Ot({drmSystems:this.config.drmSystems})}`);return this.attemptKeySystemAccess(e)}attemptSetMediaKeys(e,t){if(this.mediaKeys===t)return Promise.resolve();const n=this.setMediaKeysQueue.slice();this.log(`Setting media-keys for "${e}"`);const r=Promise.all(n).then(()=>{if(!this.media)throw this.mediaKeys=null,new Error("Attempted to set mediaKeys without media element attached");return this.media.setMediaKeys(t)});return this.mediaKeys=t,this.setMediaKeysQueue.push(r),r.then(()=>{this.log(`Media-keys set for "${e}"`),n.push(r),this.setMediaKeysQueue=this.setMediaKeysQueue.filter(s=>n.indexOf(s)===-1)})}generateRequestWithPreferredKeySession(e,t,n,r){var s,a;const o=(s=this.config.drmSystems)==null||(a=s[e.keySystem])==null?void 0:a.generateRequest;if(o)try{const y=o.call(this.hls,t,n,e);if(!y)throw new Error("Invalid response from configured generateRequest filter");t=y.initDataType,n=y.initData?y.initData:null,e.decryptdata.pssh=n?new Uint8Array(n):null}catch(y){var u;if(this.warn(y.message),(u=this.hls)!=null&&u.config.debug)throw y}if(n===null)return this.log(`Skipping key-session request for "${r}" (no initData)`),Promise.resolve(e);const l=this.getKeyIdString(e.decryptdata);this.log(`Generating key-session request for "${r}": ${l} (init data type: ${t} length: ${n?n.byteLength:null})`);const c=new Yi,d=e._onmessage=y=>{const O=e.mediaKeysSession;if(!O){c.emit("error",new Error("invalid state"));return}const{messageType:H,message:Ae}=y;this.log(`"${H}" message event for session "${O.sessionId}" message size: ${Ae.byteLength}`),H==="license-request"||H==="license-renewal"?this.renewLicense(e,Ae).catch(Ee=>{c.eventNames().length?c.emit("error",Ee):this.handleError(Ee)}):H==="license-release"?e.keySystem===Ar.FAIRPLAY&&(this.updateKeySession(e,Er("acknowledged")),this.removeSession(e)):this.warn(`unhandled media key message type "${H}"`)},g=e._onkeystatuseschange=y=>{if(!e.mediaKeysSession){c.emit("error",new Error("invalid state"));return}this.onKeyStatusChange(e);const H=e.keyStatus;c.emit("keyStatus",H),H==="expired"&&(this.warn(`${e.keySystem} expired for key ${l}`),this.renewKeySession(e))};Oi(e.mediaKeysSession,"message",d),Oi(e.mediaKeysSession,"keystatuseschange",g);const w=new Promise((y,O)=>{c.on("error",O),c.on("keyStatus",H=>{H.startsWith("usable")?y():H==="output-restricted"?O(new $i({type:se.KEY_SYSTEM_ERROR,details:U.KEY_SYSTEM_STATUS_OUTPUT_RESTRICTED,fatal:!1},"HDCP level output restricted")):H==="internal-error"?O(new $i({type:se.KEY_SYSTEM_ERROR,details:U.KEY_SYSTEM_STATUS_INTERNAL_ERROR,fatal:!0},`key status changed to "${H}"`)):H==="expired"?O(new Error("key expired while generating request")):this.warn(`unhandled key status change "${H}"`)})});return e.mediaKeysSession.generateRequest(t,n).then(()=>{var y;this.log(`Request generated for key-session "${(y=e.mediaKeysSession)==null?void 0:y.sessionId}" keyId: ${l}`)}).catch(y=>{throw new $i({type:se.KEY_SYSTEM_ERROR,details:U.KEY_SYSTEM_NO_SESSION,error:y,fatal:!1},`Error generating key-session request: ${y}`)}).then(()=>w).catch(y=>{throw c.removeAllListeners(),this.removeSession(e),y}).then(()=>(c.removeAllListeners(),e))}onKeyStatusChange(e){e.mediaKeysSession.keyStatuses.forEach((t,n)=>{if(typeof n=="string"&&typeof t=="object"){const r=n;n=t,t=r}this.log(`key status change "${t}" for keyStatuses keyId: ${W.hexDump("buffer"in n?new Uint8Array(n.buffer,n.byteOffset,n.byteLength):new Uint8Array(n))} session keyId: ${W.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),s=this.getServerCertificateUrl(e);return s?(this.log(`Fetching server certificate for "${e}"`),new Promise((a,o)=>{const u={responseType:"arraybuffer",url:s},l=t.certLoadPolicy.default,c={loadPolicy:l,timeout:l.maxLoadTimeMs,maxRetry:0,retryDelay:0,maxRetryDelay:0},d={onSuccess:(g,w,y,O)=>{a(g.data)},onError:(g,w,y,O)=>{o(new $i({type:se.KEY_SYSTEM_ERROR,details:U.KEY_SYSTEM_SERVER_CERTIFICATE_REQUEST_FAILED,fatal:!0,networkDetails:y,response:_({url:u.url,data:void 0},g)},`"${e}" certificate request failed (${s}). Status: ${g.code} (${g.text})`))},onTimeout:(g,w,y)=>{o(new $i({type:se.KEY_SYSTEM_ERROR,details:U.KEY_SYSTEM_SERVER_CERTIFICATE_REQUEST_FAILED,fatal:!0,networkDetails:y,response:{url:u.url,data:void 0}},`"${e}" certificate request timed out (${s})`))},onAbort:(g,w,y)=>{o(new Error("aborted"))}};r.load(u,c,d)})):Promise.resolve()}setMediaKeysServerCertificate(e,t,n){return new Promise((r,s)=>{e.setServerCertificate(n).then(a=>{this.log(`setServerCertificate ${a?"success":"not supported by CDM"} (${n==null?void 0:n.byteLength}) on "${t}"`),r(e)}).catch(a=>{s(new $i({type:se.KEY_SYSTEM_ERROR,details:U.KEY_SYSTEM_SERVER_CERTIFICATE_UPDATE_FAILED,error:a,fatal:!0},a.message))})})}renewLicense(e,t){return this.requestLicense(e,new Uint8Array(t)).then(n=>this.updateKeySession(e,new Uint8Array(n)).catch(r=>{throw new $i({type:se.KEY_SYSTEM_ERROR,details:U.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"),s=r.querySelectorAll("HttpHeader");if(s.length>0){let c;for(let d=0,g=s.length;d<g;d++){var a,o;c=s[d];const w=(a=c.querySelector("name"))==null?void 0:a.textContent,y=(o=c.querySelector("value"))==null?void 0:o.textContent;w&&y&&e.setRequestHeader(w,y)}}const u=r.querySelector("Challenge"),l=u==null?void 0:u.textContent;if(!l)throw new Error("Cannot find <Challenge> in key message");return Er(atob(l))}setupLicenseXHR(e,t,n,r){const s=this.config.licenseXhrSetup;return s?Promise.resolve().then(()=>{if(!n.decryptdata)throw new Error("Key removed");return s.call(this.hls,e,t,n,r)}).catch(a=>{if(!n.decryptdata)throw a;return e.open("POST",t,!0),s.call(this.hls,e,t,n,r)}).then(a=>(e.readyState||e.open("POST",t,!0),{xhr:e,licenseChallenge:a||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,s)=>{const a=this.getLicenseServerUrlOrThrow(e.keySystem);this.log(`Sending license request to URL: ${a}`);const o=new XMLHttpRequest;o.responseType="arraybuffer",o.onreadystatechange=()=>{if(!this.hls||!e.mediaKeysSession)return s(new Error("invalid state"));if(o.readyState===4)if(o.status===200){this._requestLicenseFailureCount=0;let u=o.response;this.log(`License received ${u instanceof ArrayBuffer?u.byteLength:u}`);const l=this.config.licenseResponseCallback;if(l)try{u=l.call(this.hls,o,a,e)}catch(c){this.error(c)}r(u)}else{const u=n.errorRetry,l=u?u.maxNumRetry:0;if(this._requestLicenseFailureCount++,this._requestLicenseFailureCount>l||o.status>=400&&o.status<500)s(new $i({type:se.KEY_SYSTEM_ERROR,details:U.KEY_SYSTEM_LICENSE_REQUEST_FAILED,fatal:!0,networkDetails:o,response:{url:a,data:void 0,code:o.status,text:o.statusText}},`License Request XHR failed (${a}). Status: ${o.status} (${o.statusText})`));else{const c=l-this._requestLicenseFailureCount+1;this.warn(`Retrying license request, ${c} attempts left`),this.requestLicense(e,t).then(r,s)}}},e.licenseXhr&&e.licenseXhr.readyState!==XMLHttpRequest.DONE&&e.licenseXhr.abort(),e.licenseXhr=o,this.setupLicenseXHR(o,a,e,t).then(({xhr:u,licenseChallenge:l})=>{e.keySystem==Ar.PLAYREADY&&(l=this.unpackPlayReadyKeyMessage(u,l)),u.send(l)})})}onDestroying(){this.unregisterListeners(),this._clear()}onMediaAttached(e,t){if(!this.config.emeEnabled)return;const n=t.media;this.media=n,Oi(n,"waitingforkey",this.onWaitingForKey)}onMediaDetached(){const e=this.media;e&&(qi(e,"waitingforkey",this.onWaitingForKey),this.media=null,this.mediaKeys=null)}_clear(){var e;if(this._requestLicenseFailureCount=0,this.keyIdToKeySessionPromise={},!this.mediaKeys&&!this.mediaKeySessions.length)return;const t=this.media,n=this.mediaKeySessions.slice();this.mediaKeySessions=[],this.mediaKeys=null,Cr.clearKeyUriToKeyIdMap();const r=n.length;Gs.CDMCleanupPromise=Promise.all(n.map(s=>this.removeSession(s)).concat(t==null||(e=t.setMediaKeys(null))==null?void 0:e.catch(s=>{var a;this.log(`Could not clear media keys: ${s}`),(a=this.hls)==null||a.trigger(f.ERROR,{type:se.OTHER_ERROR,details:U.KEY_SYSTEM_DESTROY_MEDIA_KEYS_ERROR,fatal:!1,error:new Error(`Could not clear media keys: ${s}`)})}))).catch(s=>{var a;this.log(`Could not close sessions and clear media keys: ${s}`),(a=this.hls)==null||a.trigger(f.ERROR,{type:se.OTHER_ERROR,details:U.KEY_SYSTEM_DESTROY_CLOSE_SESSION_ERROR,fatal:!1,error:new Error(`Could not close sessions and clear media keys: ${s}`)})}).then(()=>{r&&this.log("finished closing key sessions and clearing media keys")})}onManifestLoading(){this.keyFormatPromise=null}onManifestLoaded(e,{sessionKeys:t}){if(!(!t||!this.config.emeEnabled)&&!this.keyFormatPromise){const n=t.reduce((r,s)=>(r.indexOf(s.keyFormat)===-1&&r.push(s.keyFormat),r),[]);this.log(`Selecting key-system from session-keys ${n.join(", ")}`),this.keyFormatPromise=this.getKeyFormatPromise(n)}}removeSession(e){const{mediaKeysSession:t,licenseXhr:n}=e;if(t){this.log(`Remove licenses and keys and close session ${t.sessionId}`),e._onmessage&&(t.removeEventListener("message",e._onmessage),e._onmessage=void 0),e._onkeystatuseschange&&(t.removeEventListener("keystatuseschange",e._onkeystatuseschange),e._onkeystatuseschange=void 0),n&&n.readyState!==XMLHttpRequest.DONE&&n.abort(),e.mediaKeysSession=e.decryptdata=e.licenseXhr=void 0;const r=this.mediaKeySessions.indexOf(e);r>-1&&this.mediaKeySessions.splice(r,1);const{drmSystemOptions:s}=this.config;return(kn(s)?new Promise((o,u)=>{self.setTimeout(()=>u(new Error("MediaKeySession.remove() timeout")),8e3),t.remove().then(o)}):Promise.resolve()).catch(o=>{var u;this.log(`Could not remove session: ${o}`),(u=this.hls)==null||u.trigger(f.ERROR,{type:se.OTHER_ERROR,details:U.KEY_SYSTEM_DESTROY_REMOVE_SESSION_ERROR,fatal:!1,error:new Error(`Could not remove session: ${o}`)})}).then(()=>t.close()).catch(o=>{var u;this.log(`Could not close session: ${o}`),(u=this.hls)==null||u.trigger(f.ERROR,{type:se.OTHER_ERROR,details:U.KEY_SYSTEM_DESTROY_CLOSE_SESSION_ERROR,fatal:!1,error:new Error(`Could not close session: ${o}`)})})}}}Gs.CDMCleanupPromise=void 0;class $i extends Error{constructor(e,t){super(t),this.data=void 0,e.error||(e.error=new Error(t)),this.data=e,e.err=e.error}}class pu{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(f.MEDIA_ATTACHING,this.onMediaAttaching,this),this.hls.on(f.MEDIA_DETACHING,this.onMediaDetaching,this)}unregisterListeners(){this.hls.off(f.MEDIA_ATTACHING,this.onMediaAttaching,this),this.hls.off(f.MEDIA_DETACHING,this.onMediaDetaching,this)}destroy(){this.timer&&clearInterval(this.timer),this.unregisterListeners(),this.isVideoPlaybackQualityAvailable=!1,this.media=null}onMediaAttaching(e,t){const n=this.hls.config;if(n.capLevelOnFPSDrop){const r=t.media instanceof self.HTMLVideoElement?t.media:null;this.media=r,r&&typeof r.getVideoPlaybackQuality=="function"&&(this.isVideoPlaybackQualityAvailable=!0),self.clearInterval(this.timer),this.timer=self.setInterval(this.checkFPSInterval.bind(this),n.fpsDroppedMonitoringPeriod)}}onMediaDetaching(){this.media=null}checkFPS(e,t,n){const r=performance.now();if(t){if(this.lastTime){const s=r-this.lastTime,a=n-this.lastDroppedFrames,o=t-this.lastDecodedFrames,u=1e3*a/s,l=this.hls;if(l.trigger(f.FPS_DROP,{currentDropped:a,currentDecoded:o,totalDroppedFrames:n}),u>0&&a>l.config.fpsDroppedMonitoringThreshold*o){let c=l.currentLevel;l.logger.warn("drop FPS ratio greater than max allowed value for currentLevel: "+c),c>0&&(l.autoLevelCapping===-1||l.autoLevelCapping>=c)&&(c=c-1,l.trigger(f.FPS_DROP_LEVEL_CAPPING,{level:c,droppedLevel:l.currentLevel}),l.autoLevelCapping=c,this.streamController.nextLevelSwitch())}}this.lastTime=r,this.lastDroppedFrames=n,this.lastDecodedFrames=t}}checkFPSInterval(){const e=this.media;if(e)if(this.isVideoPlaybackQualityAvailable){const t=e.getVideoPlaybackQuality();this.checkFPS(e,t.totalVideoFrames,t.droppedVideoFrames)}else this.checkFPS(e,e.webkitDecodedFrameCount,e.webkitDroppedFrameCount)}}function ya(i,e){let t;try{t=new Event("addtrack")}catch(n){t=document.createEvent("Event"),t.initEvent("addtrack",!1,!1)}t.track=i,e.dispatchEvent(t)}function Qo(i,e){const t=i.mode;if(t==="disabled"&&(i.mode="hidden"),i.cues&&!i.cues.getCueById(e.id))try{if(i.addCue(e),!i.cues.getCueById(e.id))throw new Error(`addCue is failed for: ${e}`)}catch(n){j.debug(`[texttrack-utils]: ${n}`);try{const r=new self.TextTrackCue(e.startTime,e.endTime,e.text);r.id=e.id,i.addCue(r)}catch(r){j.debug(`[texttrack-utils]: Legacy TextTrackCue fallback failed: ${r}`)}}t==="disabled"&&(i.mode=t)}function Vs(i,e){const t=i.mode;if(t==="disabled"&&(i.mode="hidden"),i.cues)for(let n=i.cues.length;n--;)e&&i.cues[n].removeEventListener("enter",e),i.removeCue(i.cues[n]);t==="disabled"&&(i.mode=t)}function Mo(i,e,t,n){const r=i.mode;if(r==="disabled"&&(i.mode="hidden"),i.cues&&i.cues.length>0){const s=KA(i.cues,e,t);for(let a=0;a<s.length;a++)(!n||n(s[a]))&&i.removeCue(s[a])}r==="disabled"&&(i.mode=r)}function mu(i,e){if(e<=i[0].startTime)return 0;const t=i.length-1;if(e>i[t].endTime)return-1;let n=0,r=t,s;for(;n<=r;)if(s=Math.floor((r+n)/2),e<i[s].startTime)r=s-1;else if(e>i[s].startTime&&n<t)n=s+1;else return s;return i[n].startTime-e<e-i[r].startTime?n:r}function KA(i,e,t){const n=[],r=mu(i,e);if(r>-1)for(let s=r,a=i.length;s<a;s++){const o=i[s];if(o.startTime>=e&&o.endTime<=t)n.push(o);else if(o.startTime>t)return n}return n}function vs(i){const e=[];for(let t=0;t<i.length;t++){const n=i[t];(n.kind==="subtitles"||n.kind==="captions")&&n.label&&e.push(i[t])}return e}class No extends Za{constructor(e){super(e,"subtitle-track-controller"),this.media=null,this.tracks=[],this.groupIds=null,this.tracksInGroup=[],this.trackId=-1,this.currentTrack=null,this.selectDefaultTrack=!0,this.queuedDefaultTrack=-1,this.useTextTrackPolling=!1,this.subtitlePollingInterval=-1,this._subtitleDisplay=!0,this.asyncPollTrackChange=()=>this.pollTrackChange(0),this.onTextTracksChanged=()=>{if(this.useTextTrackPolling||self.clearInterval(this.subtitlePollingInterval),!this.media||!this.hls.config.renderTextTracksNatively)return;let t=null;const n=vs(this.media.textTracks);for(let s=0;s<n.length;s++)if(n[s].mode==="hidden")t=n[s];else if(n[s].mode==="showing"){t=n[s];break}const r=this.findTrackForTextTrack(t);this.subtitleTrack!==r&&this.setSubtitleTrack(r)},this.registerListeners()}destroy(){this.unregisterListeners(),this.tracks.length=0,this.tracksInGroup.length=0,this.currentTrack=null,this.onTextTracksChanged=this.asyncPollTrackChange=null,super.destroy()}get subtitleDisplay(){return this._subtitleDisplay}set subtitleDisplay(e){this._subtitleDisplay=e,this.trackId>-1&&this.toggleTrackModes()}registerListeners(){const{hls:e}=this;e.on(f.MEDIA_ATTACHED,this.onMediaAttached,this),e.on(f.MEDIA_DETACHING,this.onMediaDetaching,this),e.on(f.MANIFEST_LOADING,this.onManifestLoading,this),e.on(f.MANIFEST_PARSED,this.onManifestParsed,this),e.on(f.LEVEL_LOADING,this.onLevelLoading,this),e.on(f.LEVEL_SWITCHING,this.onLevelSwitching,this),e.on(f.SUBTITLE_TRACK_LOADED,this.onSubtitleTrackLoaded,this),e.on(f.ERROR,this.onError,this)}unregisterListeners(){const{hls:e}=this;e.off(f.MEDIA_ATTACHED,this.onMediaAttached,this),e.off(f.MEDIA_DETACHING,this.onMediaDetaching,this),e.off(f.MANIFEST_LOADING,this.onManifestLoading,this),e.off(f.MANIFEST_PARSED,this.onManifestParsed,this),e.off(f.LEVEL_LOADING,this.onLevelLoading,this),e.off(f.LEVEL_SWITCHING,this.onLevelSwitching,this),e.off(f.SUBTITLE_TRACK_LOADED,this.onSubtitleTrackLoaded,this),e.off(f.ERROR,this.onError,this)}onMediaAttached(e,t){this.media=t.media,this.media&&(this.queuedDefaultTrack>-1&&(this.subtitleTrack=this.queuedDefaultTrack,this.queuedDefaultTrack=-1),this.useTextTrackPolling=!(this.media.textTracks&&"onchange"in this.media.textTracks),this.useTextTrackPolling?this.pollTrackChange(500):this.media.textTracks.addEventListener("change",this.asyncPollTrackChange))}pollTrackChange(e){self.clearInterval(this.subtitlePollingInterval),this.subtitlePollingInterval=self.setInterval(this.onTextTracksChanged,e)}onMediaDetaching(e,t){const n=this.media;if(!n)return;const r=!!t.transferMedia;if(self.clearInterval(this.subtitlePollingInterval),this.useTextTrackPolling||n.textTracks.removeEventListener("change",this.asyncPollTrackChange),this.trackId>-1&&(this.queuedDefaultTrack=this.trackId),this.subtitleTrack=-1,this.media=null,r)return;vs(n.textTracks).forEach(a=>{Vs(a)})}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:s}=t,a=this.tracksInGroup[n];if(!a||a.groupId!==r){this.warn(`Subtitle track with id:${n} and group:${r} not found in active group ${a==null?void 0:a.groupId}`);return}const o=a.details;a.details=t.details,this.log(`Subtitle track ${n} "${a.name}" lang:${a.lang} group:${r} loaded [${s.startSN}-${s.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 s=this.currentTrack;if(!n||(r==null?void 0:r.length)!==(n==null?void 0:n.length)||n!=null&&n.some(a=>(r==null?void 0:r.indexOf(a))===-1)){this.groupIds=n,this.trackId=-1,this.currentTrack=null;const a=this.tracks.filter(c=>!n||n.indexOf(c.groupId)!==-1);if(a.length)this.selectDefaultTrack&&!a.some(c=>c.default)&&(this.selectDefaultTrack=!1),a.forEach((c,d)=>{c.id=d});else if(!s&&!this.tracksInGroup.length)return;this.tracksInGroup=a;const o=this.hls.config.subtitlePreference;if(!s&&o){this.selectDefaultTrack=!1;const c=Ye(o,a);if(c>-1)s=a[c];else{const d=Ye(o,this.tracks);s=this.tracks[d]}}let u=this.findTrackId(s);u===-1&&s&&(u=this.findTrackId(null));const l={subtitleTracks:a};this.log(`Updating subtitle tracks, ${a.length} track(s) found in "${n==null?void 0:n.join(",")}" group-id`),this.hls.trigger(f.SUBTITLE_TRACKS_UPDATED,l),u!==-1&&this.trackId===-1&&this.setSubtitleTrack(u)}}findTrackId(e){const t=this.tracksInGroup,n=this.selectDefaultTrack;for(let r=0;r<t.length;r++){const s=t[r];if(!(n&&!s.default||!n&&!e)&&(!e||vt(s,e)))return r}if(e){for(let r=0;r<t.length;r++){const s=t[r];if(Ns(e.attrs,s.attrs,["LANGUAGE","ASSOC-LANGUAGE","CHARACTERISTICS"]))return r}for(let r=0;r<t.length;r++){const s=t[r];if(Ns(e.attrs,s.attrs,["LANGUAGE"]))return r}}return-1}findTrackForTextTrack(e){if(e){const t=this.tracksInGroup;for(let n=0;n<t.length;n++){const r=t[n];if(bo(r,e))return n}}return-1}onError(e,t){t.fatal||!t.context||t.context.type===fe.SUBTITLE_TRACK&&t.context.id===this.trackId&&(!this.groupIds||this.groupIds.indexOf(t.context.groupId)!==-1)&&this.checkRetry(t)}get allSubtitleTracks(){return this.tracks}get subtitleTracks(){return this.tracksInGroup}get subtitleTrack(){return this.trackId}set subtitleTrack(e){this.selectDefaultTrack=!1,this.setSubtitleTrack(e)}setSubtitleOption(e){if(this.hls.config.subtitlePreference=e,e){if(e.id===-1)return this.setSubtitleTrack(-1),null;const t=this.allSubtitleTracks;if(this.selectDefaultTrack=!1,t.length){const n=this.currentTrack;if(n&&vt(e,n))return n;const r=Ye(e,this.tracksInGroup);if(r>-1){const s=this.tracksInGroup[r];return this.setSubtitleTrack(r),s}else{if(n)return null;{const s=Ye(e,t);if(s>-1)return t[s]}}}}return null}loadPlaylist(e){super.loadPlaylist(),this.shouldLoadPlaylist(this.currentTrack)&&this.scheduleLoading(this.currentTrack,e)}loadingPlaylist(e,t){super.loadingPlaylist(e,t);const n=e.id,r=e.groupId,s=this.getUrlWithDirectives(e.url,t),a=e.details,o=a==null?void 0:a.age;this.log(`Loading subtitle ${n} "${e.name}" lang:${e.lang} group:${r}${(t==null?void 0:t.msn)!==void 0?" at sn "+t.msn+" part "+t.part:""}${o&&a.live?" age "+o.toFixed(1)+(a.type?" "+a.type||0:""):""} ${s}`),this.hls.trigger(f.SUBTITLE_TRACK_LOADING,{url:s,id:n,groupId:r,deliveryDirectives:t||null,track:e})}toggleTrackModes(){const{media:e}=this;if(!e)return;const t=vs(e.textTracks),n=this.currentTrack;let r;if(n&&(r=t.filter(s=>bo(n,s))[0],r||this.warn(`Unable to find subtitle TextTrack with name "${n.name}" and language "${n.lang}"`)),[].slice.call(t).forEach(s=>{s.mode!=="disabled"&&s!==r&&(s.mode="disabled")}),r){const s=this.subtitleDisplay?"showing":"hidden";r.mode!==s&&(r.mode=s)}}setSubtitleTrack(e){const t=this.tracksInGroup;if(!this.media){this.queuedDefaultTrack=e;return}if(e<-1||e>=t.length||!P(e)){this.warn(`Invalid subtitle track id: ${e}`);return}this.selectDefaultTrack=!1;const n=this.currentTrack,r=t[e]||null;if(this.trackId=e,this.currentTrack=r,this.toggleTrackModes(),!r){this.hls.trigger(f.SUBTITLE_TRACK_SWITCH,{id:e});return}const s=!!r.details&&!r.details.live;if(e===this.trackId&&r===n&&s)return;this.log(`Switching to subtitle-track ${e}`+(r?` "${r.name}" lang:${r.lang} group:${r.groupId}`:""));const{id:a,groupId:o="",name:u,type:l,url:c}=r;this.hls.trigger(f.SUBTITLE_TRACK_SWITCH,{id:a,groupId:o,name:u,type:l,url:c});const d=this.switchParams(r.url,n==null?void 0:n.details,r.details);this.loadPlaylist(d)}}function eo(){try{return crypto.randomUUID()}catch(i){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 s=(t+Math.random()*16)%16|0;return t=Math.floor(t/16),(r=="x"?s:s&3|8).toString(16)})}}}function Ea(i){let e=5381,t=i.length;for(;t;)e=e*33^i.charCodeAt(--t);return(e>>>0).toString()}const sa=.025;let to=function(i){return i[i.Point=0]="Point",i[i.Range=1]="Range",i}({});function vu(i,e,t){return`${i.identifier}-${t+1}-${Ea(e)}`}class GA{constructor(e,t){this.base=void 0,this._duration=null,this._timelineStart=null,this.appendInPlaceDisabled=void 0,this.appendInPlaceStarted=void 0,this.dateRange=void 0,this.hasPlayed=!1,this.cumulativeDuration=0,this.resumeOffset=NaN,this.playoutLimit=NaN,this.restrictions={skip:!1,jump:!1},this.snapOptions={out:!1,in:!1},this.assetList=[],this.assetListLoader=void 0,this.assetListResponse=null,this.resumeAnchor=void 0,this.error=void 0,this.resetOnResume=void 0,this.base=t,this.dateRange=e,this.setDateRange(e)}setDateRange(e){this.dateRange=e,this.resumeOffset=e.attr.optionalFloat("X-RESUME-OFFSET",this.resumeOffset),this.playoutLimit=e.attr.optionalFloat("X-PLAYOUT-LIMIT",this.playoutLimit),this.restrictions=e.attr.enumeratedStringList("X-RESTRICT",this.restrictions),this.snapOptions=e.attr.enumeratedStringList("X-SNAP",this.snapOptions)}reset(){var e;this.appendInPlaceStarted=!1,(e=this.assetListLoader)==null||e.destroy(),this.assetListLoader=void 0,this.supplementsPrimary||(this.assetListResponse=null,this.assetList=[],this._duration=null)}isAssetPastPlayoutLimit(e){var t;if(e>0&&e>=this.assetList.length)return!0;const n=this.playoutLimit;return e<=0||isNaN(n)?!1:n===0?!0:(((t=this.assetList[e])==null?void 0:t.startOffset)||0)>n}findAssetIndex(e){return this.assetList.indexOf(e)}get identifier(){return this.dateRange.id}get startDate(){return this.dateRange.startDate}get startTime(){const e=this.dateRange.startTime;if(this.snapOptions.out){const t=this.dateRange.tagAnchor;if(t)return wa(e,t)}return e}get startOffset(){return this.cue.pre?0:this.startTime}get startIsAligned(){if(this.startTime===0||this.snapOptions.out)return!0;const e=this.dateRange.tagAnchor;if(e){const t=this.dateRange.startTime,n=wa(t,e);return t-n<.1}return!1}get resumptionOffset(){const e=this.resumeOffset,t=P(e)?e:this.duration;return this.cumulativeDuration+t}get resumeTime(){const e=this.startOffset+this.resumptionOffset;if(this.snapOptions.in){const t=this.resumeAnchor;if(t)return wa(e,t)}return e}get appendInPlace(){return this.appendInPlaceStarted?!0:this.appendInPlaceDisabled?!1:!!(!this.cue.once&&!this.cue.pre&&this.startIsAligned&&(isNaN(this.playoutLimit)&&isNaN(this.resumeOffset)||this.resumeOffset&&this.duration&&Math.abs(this.resumeOffset-this.duration)<sa))}set appendInPlace(e){if(this.appendInPlaceStarted){this.resetOnResume=!e;return}this.appendInPlaceDisabled=!e}get timelineStart(){return this._timelineStart!==null?this._timelineStart:this.startTime}set timelineStart(e){this._timelineStart=e}get duration(){const e=this.playoutLimit;let t;return this._duration!==null?t=this._duration:this.dateRange.duration?t=this.dateRange.duration:t=this.dateRange.plannedDuration||0,!isNaN(e)&&e<t&&(t=e),t}set duration(e){this._duration=e}get cue(){return this.dateRange.cue}get timelineOccupancy(){return this.dateRange.attr["X-TIMELINE-OCCUPIES"]==="RANGE"?to.Range:to.Point}get supplementsPrimary(){return this.dateRange.attr["X-TIMELINE-STYLE"]==="PRIMARY"}get contentMayVary(){return this.dateRange.attr["X-CONTENT-MAY-VARY"]!=="NO"}get assetUrl(){return this.dateRange.attr["X-ASSET-URI"]}get assetListUrl(){return this.dateRange.attr["X-ASSET-LIST"]}get baseUrl(){return this.base.url}get assetListLoaded(){return this.assetList.length>0||this.assetListResponse!==null}toString(){return Ko(this)}}function wa(i,e){return i-e.start<e.duration/2&&!(Math.abs(i-(e.start+e.duration))<sa)?e.start:e.start+e.duration}function Ho(i,e,t){const n=new self.URL(i,t);return n.protocol!=="data:"&&n.searchParams.set("_HLS_primary_id",e),n}function no(i,e){for(;(t=i.assetList[++e])!=null&&t.error;)var t;return e}function Ko(i){return`["${i.identifier}" ${i.cue.pre?"<pre>":i.cue.post?"<post>":""}${i.timelineStart.toFixed(2)}-${i.resumeTime.toFixed(2)}]`}function $s(i){const e=i.timelineStart,t=i.duration||0;return`["${i.identifier}" ${e.toFixed(2)}-${(e+t).toFixed(2)}]`}class VA{constructor(e,t,n,r){this.hls=void 0,this.interstitial=void 0,this.assetItem=void 0,this.tracks=null,this.hasDetails=!1,this.mediaAttached=null,this._currentTime=void 0,this._bufferedEosTime=void 0,this.checkPlayout=()=>{this.reachedPlayout(this.currentTime)&&this.hls.trigger(f.PLAYOUT_LIMIT_REACHED,{})};const s=this.hls=new e(t);this.interstitial=n,this.assetItem=r;let a=r.uri;try{a=Ho(a,t.primarySessionId).href}catch(u){}s.loadSource(a);const o=()=>{this.hasDetails=!0};s.once(f.LEVEL_LOADED,o),s.once(f.AUDIO_TRACK_LOADED,o),s.once(f.SUBTITLE_TRACK_LOADED,o),s.on(f.MEDIA_ATTACHING,(u,{media:l})=>{this.removeMediaListeners(),this.mediaAttached=l,this.interstitial.playoutLimit&&(l.addEventListener("timeupdate",this.checkPlayout),this.appendInPlace&&s.on(f.BUFFER_APPENDED,()=>{const d=this.bufferedEnd;this.reachedPlayout(d)&&(this._bufferedEosTime=d,s.trigger(f.BUFFERED_TO_END,void 0))}))})}get appendInPlace(){var e;return((e=this.interstitial)==null?void 0:e.appendInPlace)||!1}bufferedInPlaceToEnd(e){var t;if(!this.appendInPlace)return!1;if((t=this.hls)!=null&&t.bufferedToEnd)return!0;if(!e||!this._bufferedEosTime)return!1;const n=this.timelineOffset,r=ln.bufferInfo(e,n,0);return this.getAssetTime(r.end)>=this._bufferedEosTime-.02}reachedPlayout(e){const n=this.interstitial.playoutLimit;return this.startOffset+e>=n}get destroyed(){var e;return!((e=this.hls)!=null&&e.userConfig)}get assetId(){return this.assetItem.identifier}get interstitialId(){return this.assetItem.parentIdentifier}get media(){var e;return((e=this.hls)==null?void 0:e.media)||null}get bufferedEnd(){const e=this.media||this.mediaAttached;if(!e)return this._bufferedEosTime?this._bufferedEosTime:this.currentTime;const t=ln.bufferInfo(e,e.currentTime,.001);return this.getAssetTime(t.end)}get currentTime(){const e=this.media||this.mediaAttached;return e?this.getAssetTime(e.currentTime):this._currentTime||0}get duration(){const e=this.assetItem.duration;return e||0}get remaining(){const e=this.duration;return e?Math.max(0,e-this.currentTime):0}get startOffset(){return this.assetItem.startOffset}get timelineOffset(){var e;return((e=this.hls)==null?void 0:e.config.timelineOffset)||0}set timelineOffset(e){const t=this.timelineOffset;if(e!==t){const n=e-t;if(Math.abs(n)>1/9e4){if(this.hasDetails)throw new Error("Cannot set timelineOffset after playlists are loaded");this.hls.config.timelineOffset=e}}}getAssetTime(e){const t=this.timelineOffset,n=this.duration;return Math.min(Math.max(0,e-t),n)}removeMediaListeners(){const e=this.mediaAttached;e&&(this._currentTime=e.currentTime,this.bufferSnapShot(),e.removeEventListener("timeupdate",this.checkPlayout))}bufferSnapShot(){if(this.mediaAttached){var e;(e=this.hls)!=null&&e.bufferedToEnd&&(this._bufferedEosTime=this.bufferedEnd)}}destroy(){this.removeMediaListeners(),this.hls.destroy(),this.hls=this.interstitial=null,this.tracks=this.mediaAttached=this.checkPlayout=null}attachMedia(e){this.hls.attachMedia(e)}detachMedia(){this.removeMediaListeners(),this.mediaAttached=null,this.hls.detachMedia()}resumeBuffering(){this.hls.resumeBuffering()}pauseBuffering(){this.hls.pauseBuffering()}transferMedia(){return this.bufferSnapShot(),this.hls.transferMedia()}resetDetails(){const e=this.hls;if(this.hasDetails){e.stopLoad();const t=n=>delete n.details;e.levels.forEach(t),e.allAudioTracks.forEach(t),e.allSubtitleTracks.forEach(t),this.hasDetails=!1}}on(e,t,n){this.hls.on(e,t)}once(e,t,n){this.hls.once(e,t)}off(e,t,n){this.hls.off(e,t)}toString(){var e;return`HlsAssetPlayer: ${$s(this.assetItem)} ${(e=this.hls)==null?void 0:e.sessionId} ${this.appendInPlace?"append-in-place":""}`}}const $A=.033;class ro extends R{constructor(e,t){super("interstitials-sched",t),this.onScheduleUpdate=void 0,this.eventMap={},this.events=null,this.items=null,this.durations={primary:0,playout:0,integrated:0},this.onScheduleUpdate=e}destroy(){this.reset(),this.onScheduleUpdate=null}reset(){this.eventMap={},this.setDurations(0,0,0),this.events&&this.events.forEach(e=>e.reset()),this.events=this.items=null}resetErrorsInRange(e,t){return this.events?this.events.reduce((n,r)=>e<=r.startOffset&&t>r.startOffset?(delete r.error,n+1):n,0):0}get duration(){const e=this.items;return e?e[e.length-1].end:0}get length(){return this.items?this.items.length:0}getEvent(e){return e&&this.eventMap[e]||null}hasEvent(e){return e in this.eventMap}findItemIndex(e,t){if(e.event)return this.findEventIndex(e.event.identifier);let n=-1;e.nextEvent?n=this.findEventIndex(e.nextEvent.identifier)-1:e.previousEvent&&(n=this.findEventIndex(e.previousEvent.identifier)+1);const r=this.items;if(r)for(r[n]||(t===void 0&&(t=e.start),n=this.findItemIndexAtTime(t));n>=0&&(s=r[n])!=null&&s.event;){var s;n--}return n}findItemIndexAtTime(e,t){const n=this.items;if(n)for(let r=0;r<n.length;r++){let s=n[r];if(t&&t!=="primary"&&(s=s[t]),e===s.start||e>s.start&&e<s.end)return r}return-1}findJumpRestrictedIndex(e,t){const n=this.items;if(n)for(let r=e;r<=t&&n[r];r++){const s=n[r].event;if(s!=null&&s.restrictions.jump&&!s.appendInPlace)return r}return-1}findEventIndex(e){const t=this.items;if(t)for(let r=t.length;r--;){var n;if(((n=t[r].event)==null?void 0:n.identifier)===e)return r}return-1}findAssetIndex(e,t){const n=e.assetList,r=n.length;if(r>1)for(let s=0;s<r;s++){const a=n[s];if(!a.error){const o=a.timelineStart;if(t===o||t>o&&t<o+(a.duration||0))return s}}return 0}get assetIdAtEnd(){var e,t;const n=(e=this.items)==null||(t=e[this.length-1])==null?void 0:t.event;if(n){const r=n.assetList,s=r[r.length-1];if(s)return s.identifier}return null}parseInterstitialDateRanges(e,t){const n=e.main.details,{dateRanges:r}=n,s=this.events,a=this.parseDateRanges(r,{url:n.url},t),o=Object.keys(r),u=s?s.filter(l=>!o.includes(l.identifier)):[];a.length&&a.sort((l,c)=>{const d=l.cue.pre,g=l.cue.post,w=c.cue.pre,y=c.cue.post;if(d&&!w)return-1;if(w&&!d||g&&!y)return 1;if(y&&!g)return-1;if(!d&&!w&&!g&&!y){const O=l.startTime,H=c.startTime;if(O!==H)return O-H}return l.dateRange.tagOrder-c.dateRange.tagOrder}),this.events=a,u.forEach(l=>{this.removeEvent(l)}),this.updateSchedule(e,u)}updateSchedule(e,t=[]){const n=this.events||[];if(n.length||t.length||this.length<2){const r=this.items,s=this.parseSchedule(n,e);(t.length||(r==null?void 0:r.length)!==s.length||s.some((o,u)=>Math.abs(o.playout.start-r[u].playout.start)>.005||Math.abs(o.playout.end-r[u].playout.end)>.005))&&(this.items=s,this.onScheduleUpdate(t,r))}}parseDateRanges(e,t,n){const r=[],s=Object.keys(e);for(let a=0;a<s.length;a++){const o=s[a],u=e[o];if(u.isInterstitial){let l=this.eventMap[o];l?l.setDateRange(u):(l=new GA(u,t),this.eventMap[o]=l,n===!1&&(l.appendInPlace=n)),r.push(l)}}return r}parseSchedule(e,t){const n=[],r=t.main.details,s=r.live?1/0:r.edge;let a=0;if(e=e.filter(u=>!u.error&&!(u.cue.once&&u.hasPlayed)),e.length){this.resolveOffsets(e,t);let u=0,l=0;if(e.forEach((c,d)=>{const g=c.cue.pre,w=c.cue.post,y=e[d-1]||null,O=c.appendInPlace,H=w?s:c.startOffset,Ae=c.duration,Ee=c.timelineOccupancy===to.Range?Ae:0,we=c.resumptionOffset,Ze=(y==null?void 0:y.startTime)===H,rt=H+c.cumulativeDuration;let pt=O?rt+Ae:H+we;if(g||!w&&H<=0){const wt=l;l+=Ee,c.timelineStart=rt;const _t=a;a+=Ae,n.push({event:c,start:rt,end:pt,playout:{start:_t,end:a},integrated:{start:wt,end:l}})}else if(H<=s){if(!Ze){const ct=H-u;if(ct>$A){const fn=u,Rn=l;l+=ct;const $n=a;a+=ct;const jn={previousEvent:e[d-1]||null,nextEvent:c,start:fn,end:fn+ct,playout:{start:$n,end:a},integrated:{start:Rn,end:l}};n.push(jn)}else ct>0&&y&&(y.cumulativeDuration+=ct,n[n.length-1].end=H)}w&&(pt=rt),c.timelineStart=rt;const wt=l;l+=Ee;const _t=a;a+=Ae,n.push({event:c,start:rt,end:pt,playout:{start:_t,end:a},integrated:{start:wt,end:l}})}else return;const At=c.resumeTime;w||At>s?u=s:u=At}),u<s){var o;const c=u,d=l,g=s-u;l+=g;const w=a;a+=g,n.push({previousEvent:((o=n[n.length-1])==null?void 0:o.event)||null,nextEvent:null,start:u,end:c+g,playout:{start:w,end:a},integrated:{start:d,end:l}})}this.setDurations(s,a,l)}else n.push({previousEvent:null,nextEvent:null,start:0,end:s,playout:{start:0,end:s},integrated:{start:0,end:s}}),this.setDurations(s,s,s);return n}setDurations(e,t,n){this.durations={primary:e,playout:t,integrated:n}}resolveOffsets(e,t){const n=t.main.details,r=n.live?1/0:n.edge;let s=0,a=-1;e.forEach((o,u)=>{const l=o.cue.pre,c=o.cue.post,d=l?0:c?r:o.startTime;this.updateAssetDurations(o),a===d?o.cumulativeDuration=s:(s=0,a=d),!c&&o.snapOptions.in&&(o.resumeAnchor=mn(null,n.fragments,o.startOffset+o.resumptionOffset,0,0)||void 0),o.appendInPlace&&!o.appendInPlaceStarted&&(this.primaryCanResumeInPlaceAt(o,t)||(o.appendInPlace=!1)),!o.appendInPlace&&u+1<e.length&&e[u+1].startTime-e[u].resumeTime<$A&&(e[u+1].appendInPlace=!1,e[u+1].appendInPlace&&this.warn(`Could not change append strategy for abutting event ${o}`));const w=P(o.resumeOffset)?o.resumeOffset:o.duration;s+=w})}primaryCanResumeInPlaceAt(e,t){const n=e.resumeTime,r=e.startTime+e.resumptionOffset;return Math.abs(n-r)>sa?(this.log(`"${e.identifier}" resumption ${n} not aligned with estimated timeline end ${r}`),!1):t?!Object.keys(t).some(a=>{const o=t[a].details,u=o.edge;if(n>=u)return this.log(`"${e.identifier}" resumption ${n} past ${a} playlist end ${u}`),!1;const l=mn(null,o.fragments,n);if(!l)return this.log(`"${e.identifier}" resumption ${n} does not align with any fragments in ${a} playlist (${o.fragStart}-${o.fragmentEnd})`),!0;const c=a==="audio"?.175:0;return Math.abs(l.start-n)<sa+c||Math.abs(l.end-n)<sa+c?!1:(this.log(`"${e.identifier}" resumption ${n} not aligned with ${a} fragment bounds (${l.start}-${l.end} sn: ${l.sn} cc: ${l.cc})`),!0)}):(this.log(`"${e.identifier}" resumption ${n} can not be aligned with media (none selected)`),!1)}updateAssetDurations(e){if(!e.assetListLoaded)return;const t=e.timelineStart;let n=0,r=!1,s=!1;e.assetList.forEach((a,o)=>{const u=t+n;a.startOffset=n,a.timelineStart=u,r||(r=a.duration===null),s||(s=!!a.error);const l=a.error?0:a.duration||0;n+=l}),r&&!s?e.duration=Math.max(n,e.duration):e.duration=n}removeEvent(e){e.reset(),delete this.eventMap[e.identifier]}}function ss(i){return`[${i.event?'"'+i.event.identifier+'"':"primary"}: ${i.start.toFixed(2)}-${i.end.toFixed(2)}]`}class ZA{constructor(e){this.hls=void 0,this.hls=e}destroy(){this.hls=null}loadAssetList(e,t){const n=e.assetListUrl;let r;try{r=Ho(n,this.hls.sessionId,e.baseUrl)}catch(g){const w=this.assignAssetListError(e,U.ASSET_LIST_LOAD_ERROR,g,n);this.hls.trigger(f.ERROR,w);return}t&&r.protocol!=="data:"&&r.searchParams.set("_HLS_start_offset",""+t);const s=this.hls.config,a=s.loader,o=new a(s),u={responseType:"json",url:r.href},l=s.interstitialAssetListLoadPolicy.default,c={loadPolicy:l,timeout:l.maxLoadTimeMs,maxRetry:0,retryDelay:0,maxRetryDelay:0},d={onSuccess:(g,w,y,O)=>{const H=g.data,Ae=H==null?void 0:H.ASSETS;if(!Array.isArray(Ae)){const Ee=this.assignAssetListError(e,U.ASSET_LIST_PARSING_ERROR,new Error("Invalid interstitial asset list"),y.url,w,O);this.hls.trigger(f.ERROR,Ee);return}e.assetListResponse=H,this.hls.trigger(f.ASSET_LIST_LOADED,{event:e,assetListResponse:H,networkDetails:O})},onError:(g,w,y,O)=>{const H=this.assignAssetListError(e,U.ASSET_LIST_LOAD_ERROR,new Error(`Error loading X-ASSET-LIST: HTTP status ${g.code} ${g.text} (${w.url})`),w.url,O,y);this.hls.trigger(f.ERROR,H)},onTimeout:(g,w,y)=>{const O=this.assignAssetListError(e,U.ASSET_LIST_LOAD_TIMEOUT,new Error(`Timeout loading X-ASSET-LIST (${w.url})`),w.url,g,y);this.hls.trigger(f.ERROR,O)}};return o.load(u,c,d),this.hls.trigger(f.ASSET_LIST_LOADING,{event:e}),o}assignAssetListError(e,t,n,r,s,a){return e.error=n,{type:se.NETWORK_ERROR,details:t,fatal:!1,interstitial:e,url:r,error:n,networkDetails:a,stats:s}}}function Go(i){i==null||i.play().catch(()=>{})}class _u extends R{constructor(e,t){super("interstitials",e.logger),this.HlsPlayerClass=void 0,this.hls=void 0,this.assetListLoader=void 0,this.mediaSelection=null,this.altSelection=null,this.media=null,this.detachedData=null,this.requiredTracks=null,this.manager=null,this.playerQueue=[],this.bufferedPos=-1,this.timelinePos=-1,this.schedule=void 0,this.playingItem=null,this.bufferingItem=null,this.waitingItem=null,this.endedItem=null,this.playingAsset=null,this.endedAsset=null,this.bufferingAsset=null,this.shouldPlay=!1,this.onPlay=()=>{this.shouldPlay=!0},this.onPause=()=>{this.shouldPlay=!1},this.onSeeking=()=>{const n=this.currentTime;if(n===void 0||this.playbackDisabled)return;const r=n-this.timelinePos;if(Math.abs(r)<1/7056e5)return;const a=r<=-.01;this.timelinePos=n,this.bufferedPos=n;const o=this.playingItem;if(!o){this.checkBuffer();return}if(a&&this.schedule.resetErrorsInRange(n,n-r)&&this.updateSchedule(),this.checkBuffer(),a&&n<o.start||n>=o.end){var u;const g=this.schedule.findItemIndexAtTime(this.timelinePos);if(!this.isInterstitial(o)&&(u=this.media)!=null&&u.paused&&(this.shouldPlay=!1),!a){const w=this.findItemIndex(o);if(g>w){const y=this.schedule.findJumpRestrictedIndex(w+1,g);if(y>w){this.setSchedulePosition(y);return}}}this.setSchedulePosition(g);return}const l=this.playingAsset;if(!l){if(this.playingLastItem&&this.isInterstitial(o)){const g=o.event.assetList[0];g&&(this.endedItem=this.playingItem,this.playingItem=null,this.setScheduleToAssetAtTime(n,g))}return}const c=l.timelineStart,d=l.duration||0;(a&&n<c||n>=c+d)&&this.setScheduleToAssetAtTime(n,l)},this.onTimeupdate=()=>{const n=this.currentTime;if(n===void 0||this.playbackDisabled)return;if(n>this.timelinePos)this.timelinePos=n,n>this.bufferedPos&&this.checkBuffer();else return;const r=this.playingItem;if(!r||this.playingLastItem)return;if(n>=r.end){this.timelinePos=r.end;const o=this.findItemIndex(r);this.setSchedulePosition(o+1)}const s=this.playingAsset;if(!s)return;const a=s.timelineStart+(s.duration||0);n>=a&&this.setScheduleToAssetAtTime(n,s)},this.onScheduleUpdate=(n,r)=>{const s=this.schedule,a=this.playingItem,o=s.events||[],u=s.items||[],l=s.durations,c=n.map(y=>y.identifier),d=!!(o.length||c.length);(d||r)&&this.log(`INTERSTITIALS_UPDATED (${o.length}): ${o}
Schedule: ${u.map(y=>ss(y))} pos: ${this.timelinePos}`),c.length&&this.log(`Removed events ${c}`),this.playerQueue.forEach(y=>{if(y.interstitial.appendInPlace){const O=y.assetItem.timelineStart,H=y.timelineOffset-O;if(H)try{y.timelineOffset=O}catch(Ae){Math.abs(H)>sa&&this.warn(`${Ae} ("${y.assetId}" ${y.timelineOffset}->${O})`)}}});let g=null;if(a){const y=this.updateItem(a,this.timelinePos);this.itemsMatch(a,y)&&(this.playingItem=y,this.waitingItem=this.endedItem=null,g=()=>this.trimInPlace(y,a))}else this.waitingItem=this.updateItem(this.waitingItem),this.endedItem=this.updateItem(this.endedItem);const w=this.bufferingItem;if(w){const y=this.updateItem(w,this.bufferedPos);this.itemsMatch(w,y)?(this.bufferingItem=y,g||(g=()=>this.trimInPlace(y,w))):w.event&&(this.bufferingItem=this.playingItem,this.clearInterstitial(w.event,null))}if(n.forEach(y=>{y.assetList.forEach(O=>{this.clearAssetPlayer(O.identifier,null)})}),d||r){if(this.hls.trigger(f.INTERSTITIALS_UPDATED,{events:o.slice(0),schedule:u.slice(0),durations:l,removedIds:c}),this.isInterstitial(a)&&c.includes(a.event.identifier)){this.warn(`Interstitial "${a.event.identifier}" removed while playing`),this.primaryFallback(a.event);return}g&&g(),this.checkBuffer()}},this.hls=e,this.HlsPlayerClass=t,this.assetListLoader=new ZA(e),this.schedule=new ro(this.onScheduleUpdate,e.logger),this.registerListeners()}registerListeners(){const e=this.hls;e.on(f.MEDIA_ATTACHING,this.onMediaAttaching,this),e.on(f.MEDIA_ATTACHED,this.onMediaAttached,this),e.on(f.MEDIA_DETACHING,this.onMediaDetaching,this),e.on(f.MANIFEST_LOADING,this.onManifestLoading,this),e.on(f.LEVEL_UPDATED,this.onLevelUpdated,this),e.on(f.AUDIO_TRACK_SWITCHING,this.onAudioTrackSwitching,this),e.on(f.AUDIO_TRACK_UPDATED,this.onAudioTrackUpdated,this),e.on(f.SUBTITLE_TRACK_SWITCH,this.onSubtitleTrackSwitch,this),e.on(f.SUBTITLE_TRACK_UPDATED,this.onSubtitleTrackUpdated,this),e.on(f.EVENT_CUE_ENTER,this.onInterstitialCueEnter,this),e.on(f.ASSET_LIST_LOADED,this.onAssetListLoaded,this),e.on(f.BUFFER_APPENDED,this.onBufferAppended,this),e.on(f.BUFFER_FLUSHED,this.onBufferFlushed,this),e.on(f.BUFFERED_TO_END,this.onBufferedToEnd,this),e.on(f.MEDIA_ENDED,this.onMediaEnded,this),e.on(f.ERROR,this.onError,this),e.on(f.DESTROYING,this.onDestroying,this)}unregisterListeners(){const e=this.hls;e&&(e.off(f.MEDIA_ATTACHING,this.onMediaAttaching,this),e.off(f.MEDIA_ATTACHED,this.onMediaAttached,this),e.off(f.MEDIA_DETACHING,this.onMediaDetaching,this),e.off(f.MANIFEST_LOADING,this.onManifestLoading,this),e.off(f.LEVEL_UPDATED,this.onLevelUpdated,this),e.off(f.AUDIO_TRACK_SWITCHING,this.onAudioTrackSwitching,this),e.off(f.AUDIO_TRACK_UPDATED,this.onAudioTrackUpdated,this),e.off(f.SUBTITLE_TRACK_SWITCH,this.onSubtitleTrackSwitch,this),e.off(f.SUBTITLE_TRACK_UPDATED,this.onSubtitleTrackUpdated,this),e.off(f.EVENT_CUE_ENTER,this.onInterstitialCueEnter,this),e.off(f.ASSET_LIST_LOADED,this.onAssetListLoaded,this),e.off(f.BUFFER_CODECS,this.onBufferCodecs,this),e.off(f.BUFFER_APPENDED,this.onBufferAppended,this),e.off(f.BUFFER_FLUSHED,this.onBufferFlushed,this),e.off(f.BUFFERED_TO_END,this.onBufferedToEnd,this),e.off(f.MEDIA_ENDED,this.onMediaEnded,this),e.off(f.ERROR,this.onError,this),e.off(f.DESTROYING,this.onDestroying,this))}startLoad(){this.resumeBuffering()}stopLoad(){this.pauseBuffering()}resumeBuffering(){var e;(e=this.getBufferingPlayer())==null||e.resumeBuffering()}pauseBuffering(){var e;(e=this.getBufferingPlayer())==null||e.pauseBuffering()}destroy(){this.unregisterListeners(),this.stopLoad(),this.assetListLoader&&this.assetListLoader.destroy(),this.emptyPlayerQueue(),this.clearScheduleState(),this.schedule&&this.schedule.destroy(),this.media=this.detachedData=this.mediaSelection=this.requiredTracks=this.altSelection=this.manager=null,this.hls=this.HlsPlayerClass=this.schedule=this.log=null,this.assetListLoader=null,this.onPlay=this.onPause=this.onSeeking=this.onTimeupdate=null,this.onScheduleUpdate=null}onDestroying(){const e=this.primaryMedia||this.media;e&&this.removeMediaListeners(e)}removeMediaListeners(e){qi(e,"play",this.onPlay),qi(e,"pause",this.onPause),qi(e,"seeking",this.onSeeking),qi(e,"timeupdate",this.onTimeupdate)}onMediaAttaching(e,t){const n=this.media=t.media;Oi(n,"seeking",this.onSeeking),Oi(n,"timeupdate",this.onTimeupdate),Oi(n,"play",this.onPlay),Oi(n,"pause",this.onPause)}onMediaAttached(e,t){const n=this.effectivePlayingItem,r=this.detachedData;if(this.detachedData=null,n===null)this.checkStart();else if(!r){this.clearScheduleState();const s=this.findItemIndex(n);this.setSchedulePosition(s)}}clearScheduleState(){this.playingItem=this.bufferingItem=this.waitingItem=this.endedItem=this.playingAsset=this.endedAsset=this.bufferingAsset=null}onMediaDetaching(e,t){const n=!!t.transferMedia,r=this.media;if(this.media=null,!n&&(r&&this.removeMediaListeners(r),this.detachedData)){const s=this.getBufferingPlayer();s&&(this.playingAsset=this.endedAsset=this.bufferingAsset=this.bufferingItem=this.waitingItem=this.detachedData=null,s.detachMedia()),this.shouldPlay=!1}}get interstitialsManager(){if(!this.manager){if(!this.hls)return null;const e=this,t=()=>e.bufferingItem||e.waitingItem,n=d=>d&&e.getAssetPlayer(d.identifier),r=(d,g,w,y,O)=>{if(d){let H=d[g].start;const Ae=d.event;if(Ae){if(g==="playout"||Ae.timelineOccupancy!==to.Point){const Ee=n(w);(Ee==null?void 0:Ee.interstitial)===Ae&&(H+=Ee.assetItem.startOffset+Ee[O])}}else{const Ee=y==="bufferedPos"?a():e[y];H+=Ee-d.start}return H}return 0},s=(d,g)=>{if(d!==0&&g!=="primary"&&e.schedule.length){var w;const y=e.schedule.findItemIndexAtTime(d),O=(w=e.schedule.items)==null?void 0:w[y];if(O){const H=O[g].start-O.start;return d+H}}return d},a=()=>{const d=e.bufferedPos;return d===Number.MAX_VALUE?o("primary"):Math.max(d,0)},o=d=>{var g;return(g=e.primaryDetails)!=null&&g.live?e.primaryDetails.edge:e.schedule.durations[d]},u=(d,g)=>{var w,y;const O=e.effectivePlayingItem;if(O!=null&&(w=O.event)!=null&&w.restrictions.skip)return;e.log(`seek to ${d} "${g}"`);const H=e.effectivePlayingItem,Ae=e.schedule.findItemIndexAtTime(d,g),Ee=(y=e.schedule.items)==null?void 0:y[Ae],we=e.getBufferingPlayer(),Ze=we==null?void 0:we.interstitial,rt=Ze==null?void 0:Ze.appendInPlace,pt=H&&e.itemsMatch(H,Ee);if(H&&(rt||pt)){const wt=n(e.playingAsset),_t=(wt==null?void 0:wt.media)||e.primaryMedia;if(_t){const ct=g==="primary"?_t.currentTime:r(H,g,e.playingAsset,"timelinePos","currentTime"),fn=d-ct,Rn=(rt?ct:_t.currentTime)+fn;if(Rn>=0&&(!wt||rt||Rn<=wt.duration)){_t.currentTime=Rn;return}}}if(Ee){let wt=d;if(g!=="primary"){const ct=Ee[g].start,fn=d-ct;wt=Ee.start+fn}const _t=!e.isInterstitial(Ee);if((!e.isInterstitial(H)||H.event.appendInPlace)&&(_t||Ee.event.appendInPlace)){const ct=e.media||(rt?we==null?void 0:we.media:null);ct&&(ct.currentTime=wt)}else if(H){const ct=e.findItemIndex(H);if(Ae>ct){const Rn=e.schedule.findJumpRestrictedIndex(ct+1,Ae);if(Rn>ct){e.setSchedulePosition(Rn);return}}let fn=0;if(_t)e.timelinePos=wt,e.checkBuffer();else{var At;const Rn=Ee==null||(At=Ee.event)==null?void 0:At.assetList;if(Rn){const $n=d-(Ee[g]||Ee).start;for(let jn=Rn.length;jn--;){const ir=Rn[jn];if(ir.duration&&$n>=ir.startOffset&&$n<ir.startOffset+ir.duration){fn=jn;break}}}}e.setSchedulePosition(Ae,fn)}}},l=()=>{const d=e.effectivePlayingItem;if(e.isInterstitial(d))return d;const g=t();return e.isInterstitial(g)?g:null},c={get currentTime(){const d=l(),g=e.effectivePlayingItem;return g&&g===d?r(g,"playout",e.effectivePlayingAsset,"timelinePos","currentTime")-g.playout.start:0},set currentTime(d){const g=l(),w=e.effectivePlayingItem;w&&w===g&&u(d+w.playout.start,"playout")},get duration(){const d=l();return d?d.playout.end-d.playout.start:0},get assetPlayers(){var d;const g=(d=l())==null?void 0:d.event.assetList;return g?g.map(w=>e.getAssetPlayer(w.identifier)):[]},get playingIndex(){var d;const g=(d=l())==null?void 0:d.event;return g&&e.effectivePlayingAsset?g.findAssetIndex(e.effectivePlayingAsset):-1},get scheduleItem(){return l()}};this.manager={get events(){var d,g;return((d=e.schedule)==null||(g=d.events)==null?void 0:g.slice(0))||[]},get schedule(){var d,g;return((d=e.schedule)==null||(g=d.items)==null?void 0:g.slice(0))||[]},get interstitialPlayer(){return l()?c:null},get playerQueue(){return e.playerQueue.slice(0)},get bufferingAsset(){return e.bufferingAsset},get bufferingItem(){return t()},get bufferingIndex(){const d=t();return e.findItemIndex(d)},get playingAsset(){return e.effectivePlayingAsset},get playingItem(){return e.effectivePlayingItem},get playingIndex(){const d=e.effectivePlayingItem;return e.findItemIndex(d)},primary:{get bufferedEnd(){return a()},get currentTime(){const d=e.timelinePos;return d>0?d:0},set currentTime(d){u(d,"primary")},get duration(){return o("primary")},get seekableStart(){var d;return((d=e.primaryDetails)==null?void 0:d.fragmentStart)||0}},integrated:{get bufferedEnd(){return r(t(),"integrated",e.bufferingAsset,"bufferedPos","bufferedEnd")},get currentTime(){return r(e.effectivePlayingItem,"integrated",e.effectivePlayingAsset,"timelinePos","currentTime")},set currentTime(d){u(d,"integrated")},get duration(){return o("integrated")},get seekableStart(){var d;return s(((d=e.primaryDetails)==null?void 0:d.fragmentStart)||0,"integrated")}},skip:()=>{const d=e.effectivePlayingItem,g=d==null?void 0:d.event;if(g&&!g.restrictions.skip){const w=e.findItemIndex(d);if(g.appendInPlace){const y=d.playout.start+d.event.duration;u(y+.001,"playout")}else e.advanceAfterAssetEnded(g,w,1/0)}}}}return this.manager}get effectivePlayingItem(){return this.waitingItem||this.playingItem||this.endedItem}get effectivePlayingAsset(){return this.playingAsset||this.endedAsset}get playingLastItem(){var e;const t=this.playingItem,n=(e=this.schedule)==null?void 0:e.items;return!this.playbackStarted||!t||!n?!1:this.findItemIndex(t)===n.length-1}get playbackStarted(){return this.effectivePlayingItem!==null}get currentTime(){var e,t,n;if(this.mediaSelection===null)return;const r=this.waitingItem||this.playingItem;if(this.isInterstitial(r)&&!r.event.appendInPlace)return;let s=this.media;!s&&(e=this.bufferingItem)!=null&&(t=e.event)!=null&&t.appendInPlace&&(s=this.primaryMedia);const a=(n=s)==null?void 0:n.currentTime;if(!(a===void 0||!P(a)))return a}get primaryMedia(){var e;return this.media||((e=this.detachedData)==null?void 0:e.media)||null}isInterstitial(e){return!!(e!=null&&e.event)}retreiveMediaSource(e,t){const n=this.getAssetPlayer(e);n&&this.transferMediaFromPlayer(n,t)}transferMediaFromPlayer(e,t){const n=e.interstitial.appendInPlace,r=e.media;if(n&&r===this.primaryMedia){if(this.bufferingAsset=null,(!t||this.isInterstitial(t)&&!t.event.appendInPlace)&&t&&r){this.detachedData={media:r};return}const s=e.transferMedia();this.log(`transfer MediaSource from ${e} ${Ot(s)}`),this.detachedData=s}else t&&r&&(this.shouldPlay||(this.shouldPlay=!r.paused))}transferMediaTo(e,t){var n,r;if(e.media===t)return;let s=null;const a=this.hls,o=e!==a,u=o&&e.interstitial.appendInPlace,l=(n=this.detachedData)==null?void 0:n.mediaSource;let c;if(a.media)u&&(s=a.transferMedia(),this.detachedData=s),c="Primary";else if(l){const w=this.getBufferingPlayer();w?(s=w.transferMedia(),c=`${w}`):c="detached MediaSource"}else c="detached media";if(!s){if(l)s=this.detachedData,this.log(`using detachedData: MediaSource ${Ot(s)}`);else if(!this.detachedData||a.media===t){const w=this.playerQueue;w.length>1&&w.forEach(y=>{if(o&&y.interstitial.appendInPlace!==u){const O=y.interstitial;this.clearInterstitial(y.interstitial,null),O.appendInPlace=!1,O.appendInPlace&&this.warn(`Could not change append strategy for queued assets ${O}`)}}),this.hls.detachMedia(),this.detachedData={media:t}}}const d=s&&"mediaSource"in s&&((r=s.mediaSource)==null?void 0:r.readyState)!=="closed",g=d&&s?s:t;if(this.log(`${d?"transfering MediaSource":"attaching media"} to ${o?e:"Primary"} from ${c}`),g===s){const w=o&&e.assetId===this.schedule.assetIdAtEnd;g.overrides={duration:this.schedule.duration,endOfStream:!o||w,cueRemoval:!o}}e.attachMedia(g)}onInterstitialCueEnter(){this.onTimeupdate()}checkStart(){const e=this.schedule,t=e.events;if(!t||this.playbackDisabled||!this.media)return;this.bufferedPos===-1&&(this.bufferedPos=0);const n=this.timelinePos,r=this.effectivePlayingItem;if(n===-1){const s=this.hls.startPosition;if(this.timelinePos=s,t.length&&t[0].cue.pre){const a=e.findEventIndex(t[0].identifier);this.setSchedulePosition(a)}else if(s>=0||!this.primaryLive){const a=this.timelinePos=s>0?s:0,o=e.findItemIndexAtTime(a);this.setSchedulePosition(o)}}else if(r&&!this.playingItem){const s=e.findItemIndex(r);this.setSchedulePosition(s)}}advanceAfterAssetEnded(e,t,n){const r=no(e,n);if(!e.isAssetPastPlayoutLimit(r))this.setSchedulePosition(t,r);else{const s=this.schedule.items;if(s){const a=t+1,o=s.length;if(a>=o){this.setSchedulePosition(-1);return}const u=e.resumeTime;this.timelinePos<u&&(this.timelinePos=u,this.checkBuffer()),this.setSchedulePosition(a)}}}setScheduleToAssetAtTime(e,t){const n=this.schedule,r=t.parentIdentifier,s=n.getEvent(r);if(s){const a=n.findEventIndex(r),o=n.findAssetIndex(s,e);this.advanceAfterAssetEnded(s,a,o-1)}}setSchedulePosition(e,t){const n=this.schedule.items;if(!n||this.playbackDisabled)return;this.log(`setSchedulePosition ${e}, ${t}`);const r=e>=0?n[e]:null,s=this.playingItem,a=this.playingLastItem;if(this.isInterstitial(s)){var o;const l=s.event,c=this.playingAsset,d=c==null?void 0:c.identifier,g=d?this.getAssetPlayer(d):null;if(g&&d&&(!this.eventItemsMatch(s,r)||t!==void 0&&d!==((o=l.assetList)==null?void 0:o[t].identifier))){var u;const w=l.findAssetIndex(c);if(this.log(`INTERSTITIAL_ASSET_ENDED ${w+1}/${l.assetList.length} ${$s(c)}`),this.endedAsset=c,this.playingAsset=null,this.hls.trigger(f.INTERSTITIAL_ASSET_ENDED,{asset:c,assetListIndex:w,event:l,schedule:n.slice(0),scheduleIndex:e,player:g}),s!==this.playingItem){this.itemsMatch(s,this.playingItem)&&!this.playingAsset&&this.advanceAfterAssetEnded(l,this.findItemIndex(this.playingItem),w);return}this.retreiveMediaSource(d,r),g.media&&!((u=this.detachedData)!=null&&u.mediaSource)&&g.detachMedia()}if(!this.eventItemsMatch(s,r)&&(this.endedItem=s,this.playingItem=null,this.log(`INTERSTITIAL_ENDED ${l} ${ss(s)}`),l.hasPlayed=!0,this.hls.trigger(f.INTERSTITIAL_ENDED,{event:l,schedule:n.slice(0),scheduleIndex:e}),l.cue.once)){this.updateSchedule();const w=this.schedule.items;if(r&&w){const y=this.findItemIndex(r);this.advanceSchedule(y,w,t,s,a)}return}}this.advanceSchedule(e,n,t,s,a)}advanceSchedule(e,t,n,r,s){const a=e>=0?t[e]:null,o=this.primaryMedia,u=this.playerQueue;if(u.length&&u.forEach(l=>{const c=l.interstitial,d=this.schedule.findEventIndex(c.identifier);(d<e||d>e+1)&&this.clearInterstitial(c,a)}),this.isInterstitial(a)){this.timelinePos=Math.min(Math.max(this.timelinePos,a.start),a.end);const l=a.event;if(n===void 0){n=this.schedule.findAssetIndex(l,this.timelinePos);const w=no(l,n-1);if(l.isAssetPastPlayoutLimit(w)){this.advanceAfterAssetEnded(l,e,n);return}n=w}const c=this.waitingItem;this.assetsBuffered(a,o)||this.setBufferingItem(a);let d=this.preloadAssets(l,n);if(this.eventItemsMatch(a,c||r)||(this.waitingItem=a,this.log(`INTERSTITIAL_STARTED ${ss(a)} ${l.appendInPlace?"append in place":""}`),this.hls.trigger(f.INTERSTITIAL_STARTED,{event:l,schedule:t.slice(0),scheduleIndex:e})),!l.assetListLoaded){this.log(`Waiting for ASSET-LIST to complete loading ${l}`);return}if(l.assetListLoader&&(l.assetListLoader.destroy(),l.assetListLoader=void 0),!o){this.log(`Waiting for attachMedia to start Interstitial ${l}`);return}this.waitingItem=this.endedItem=null,this.playingItem=a;const g=l.assetList[n];if(!g){const w=t[e+1],y=this.media;w&&y&&!this.isInterstitial(w)&&y.currentTime<w.start&&(y.currentTime=this.timelinePos=w.start),this.advanceAfterAssetEnded(l,e,n||0);return}if(d||(d=this.getAssetPlayer(g.identifier)),d===null||d.destroyed){const w=l.assetList.length;this.warn(`asset ${n+1}/${w} player destroyed ${l}`),d=this.createAssetPlayer(l,g,n)}if(!this.eventItemsMatch(a,this.bufferingItem)&&l.appendInPlace&&this.isAssetBuffered(g))return;this.startAssetPlayer(d,n,t,e,o),this.shouldPlay&&Go(d.media)}else a!==null?(this.resumePrimary(a,e,r),this.shouldPlay&&Go(this.hls.media)):s&&this.isInterstitial(r)&&(this.endedItem=null,this.playingItem=r,r.event.appendInPlace||this.attachPrimary(this.schedule.durations.primary,null))}get playbackDisabled(){return this.hls.config.enableInterstitialPlayback===!1}get primaryDetails(){var e,t;return(e=this.mediaSelection)==null||(t=e.main)==null?void 0:t.details}get primaryLive(){var e;return!!((e=this.primaryDetails)!=null&&e.live)}resumePrimary(e,t,n){var r;if(this.playingItem=e,this.playingAsset=this.endedAsset=null,this.waitingItem=this.endedItem=null,this.bufferedToItem(e),this.log(`resuming ${ss(e)}`),!((r=this.detachedData)!=null&&r.mediaSource)){let a=this.timelinePos;(a<e.start||a>=e.end)&&(a=this.getPrimaryResumption(e,t),this.timelinePos=a),this.attachPrimary(a,e)}if(!n)return;const s=this.schedule.items;s&&(this.log(`INTERSTITIALS_PRIMARY_RESUMED ${ss(e)}`),this.hls.trigger(f.INTERSTITIALS_PRIMARY_RESUMED,{schedule:s.slice(0),scheduleIndex:t}),this.checkBuffer())}getPrimaryResumption(e,t){const n=e.start;if(this.primaryLive){const r=this.primaryDetails;if(t===0)return this.hls.startPosition;if(r&&(n<r.fragmentStart||n>r.edge))return this.hls.liveSyncPosition||-1}return n}isAssetBuffered(e){const t=this.getAssetPlayer(e.identifier);return t!=null&&t.hls?t.hls.bufferedToEnd:ln.bufferInfo(this.primaryMedia,this.timelinePos,0).end+1>=e.timelineStart+(e.duration||0)}attachPrimary(e,t,n){t?this.setBufferingItem(t):this.bufferingItem=this.playingItem,this.bufferingAsset=null;const r=this.primaryMedia;if(!r)return;const s=this.hls;s.media?this.checkBuffer():(this.transferMediaTo(s,r),n&&this.startLoadingPrimaryAt(e,n)),n||(this.timelinePos=e,this.startLoadingPrimaryAt(e,n))}startLoadingPrimaryAt(e,t){var n;const r=this.hls;!r.loadingEnabled||!r.media||Math.abs((((n=r.mainForwardBufferInfo)==null?void 0:n.start)||r.media.currentTime)-e)>.5?r.startLoad(e,t):r.bufferingEnabled||r.resumeBuffering()}onManifestLoading(){this.stopLoad(),this.schedule.reset(),this.emptyPlayerQueue(),this.clearScheduleState(),this.shouldPlay=!1,this.bufferedPos=this.timelinePos=-1,this.mediaSelection=this.altSelection=this.manager=this.requiredTracks=null,this.hls.off(f.BUFFER_CODECS,this.onBufferCodecs,this),this.hls.on(f.BUFFER_CODECS,this.onBufferCodecs,this)}onLevelUpdated(e,t){if(t.level===-1)return;const n=this.hls.levels[t.level],r=_(_({},this.mediaSelection||this.altSelection),{},{main:n});this.mediaSelection=r,this.schedule.parseInterstitialDateRanges(r,this.hls.config.interstitialAppendInPlace),!this.effectivePlayingItem&&this.schedule.items&&this.checkStart()}onAudioTrackUpdated(e,t){const n=this.hls.audioTracks[t.id],r=this.mediaSelection;if(!r){this.altSelection=_(_({},this.altSelection),{},{audio:n});return}const s=_(_({},r),{},{audio:n});this.mediaSelection=s}onSubtitleTrackUpdated(e,t){const n=this.hls.subtitleTracks[t.id],r=this.mediaSelection;if(!r){this.altSelection=_(_({},this.altSelection),{},{subtitles:n});return}const s=_(_({},r),{},{subtitles:n});this.mediaSelection=s}onAudioTrackSwitching(e,t){const n=Re(t);this.playerQueue.forEach(r=>r.hls.setAudioOption(t)||r.hls.setAudioOption(n))}onSubtitleTrackSwitch(e,t){const n=Re(t);this.playerQueue.forEach(r=>r.hls.setSubtitleOption(t)||t.id!==-1&&r.hls.setSubtitleOption(n))}onBufferCodecs(e,t){const n=t.tracks;n&&(this.requiredTracks=n)}onBufferAppended(e,t){this.checkBuffer()}onBufferFlushed(e,t){const n=this.playingItem;if(n&&!this.itemsMatch(n,this.bufferingItem)&&!this.isInterstitial(n)){const r=this.timelinePos;this.bufferedPos=r,this.checkBuffer()}}onBufferedToEnd(e){const t=this.schedule.events;if(this.bufferedPos<Number.MAX_VALUE&&t){for(let r=0;r<t.length;r++){const s=t[r];if(s.cue.post){var n;const a=this.schedule.findEventIndex(s.identifier),o=(n=this.schedule.items)==null?void 0:n[a];this.isInterstitial(o)&&this.eventItemsMatch(o,this.bufferingItem)&&this.bufferedToItem(o,0);break}}this.bufferedPos=Number.MAX_VALUE}}onMediaEnded(e){const t=this.playingItem;if(!this.playingLastItem&&t){const n=this.findItemIndex(t);this.setSchedulePosition(n+1)}else this.shouldPlay=!1}updateItem(e,t){const n=this.schedule.items;if(e&&n){const r=this.findItemIndex(e,t);return n[r]||null}return null}trimInPlace(e,t){if(this.isInterstitial(e)&&e.event.appendInPlace&&t.end-e.end>.25){e.event.assetList.forEach((s,a)=>{e.event.isAssetPastPlayoutLimit(a)&&this.clearAssetPlayer(s.identifier,null)});const n=e.end+.25,r=ln.bufferInfo(this.primaryMedia,n,0);(r.end>n||(r.nextStart||0)>n)&&(this.attachPrimary(n,null),this.flushFrontBuffer(n))}}itemsMatch(e,t){return!!t&&(e===t||e.event&&t.event&&this.eventItemsMatch(e,t)||!e.event&&!t.event&&this.findItemIndex(e)===this.findItemIndex(t))}eventItemsMatch(e,t){var n;return!!t&&(e===t||e.event.identifier===((n=t.event)==null?void 0:n.identifier))}findItemIndex(e,t){return e?this.schedule.findItemIndex(e,t):-1}updateSchedule(){const e=this.mediaSelection;e&&this.schedule.updateSchedule(e,[])}checkBuffer(e){const t=this.schedule.items;if(!t)return;const n=ln.bufferInfo(this.primaryMedia,this.timelinePos,0);e&&(this.bufferedPos=this.timelinePos),e||(e=n.len<1),this.updateBufferedPos(n.end,t,e)}updateBufferedPos(e,t,n){const r=this.schedule,s=this.bufferingItem;if(this.bufferedPos>e)return;if(t.length===1&&this.itemsMatch(t[0],s)){this.bufferedPos=e;return}const a=this.playingItem,o=this.findItemIndex(a);let u=r.findItemIndexAtTime(e);if(this.bufferedPos<e){var l,c;const d=this.findItemIndex(s),g=Math.min(d+1,t.length-1),w=t[g];if((u===-1&&s&&e>=s.end||(l=w.event)!=null&&l.appendInPlace&&e+.01>=w.start)&&(u=g),g-o>1&&(s==null||(c=s.event)==null?void 0:c.appendInPlace)===!1)return;if(this.bufferedPos=e,u>d&&u>o)this.bufferedToItem(w);else{const y=this.primaryDetails;this.primaryLive&&y&&e>y.edge-y.targetduration&&w.start<y.edge+this.hls.config.interstitialLiveLookAhead&&this.isInterstitial(w)&&this.preloadAssets(w.event,0)}}else n&&a&&!this.itemsMatch(a,s)&&(u===o?this.bufferedToItem(a):u===o+1&&this.bufferedToItem(t[u]))}assetsBuffered(e,t){return e.event.assetList.length===0?!1:!e.event.assetList.some(r=>{const s=this.getAssetPlayer(r.identifier);return!(s!=null&&s.bufferedInPlaceToEnd(t))})}setBufferingItem(e){const t=this.bufferingItem,n=this.schedule;if(this.itemsMatch(e,t))this.bufferingItem!==e&&(this.bufferingItem=e);else{const{items:r,events:s}=n;if(!r||!s)return t;const a=this.isInterstitial(e),o=this.getBufferingPlayer();this.bufferingItem=e,this.bufferedPos=Math.max(e.start,Math.min(e.end,this.timelinePos));const u=o?o.remaining:t?t.end-this.timelinePos:0;this.log(`INTERSTITIALS_BUFFERED_TO_BOUNDARY ${ss(e)}`+(t?` (${u.toFixed(2)} remaining)`:"")),this.playbackDisabled||(a?e.event.assetList.forEach(l=>{const c=this.getAssetPlayer(l.identifier);c&&c.resumeBuffering()}):(this.hls.resumeBuffering(),this.playerQueue.forEach(l=>l.pauseBuffering()))),this.hls.trigger(f.INTERSTITIALS_BUFFERED_TO_BOUNDARY,{events:s.slice(0),schedule:r.slice(0),bufferingIndex:this.findItemIndex(e),playingIndex:this.findItemIndex(this.playingItem)})}return t}bufferedToItem(e,t=0){const n=this.setBufferingItem(e);if(!this.playbackDisabled){if(this.isInterstitial(e))this.bufferedToEvent(e,t);else if(n!==null){this.bufferingAsset=null;const r=this.detachedData;r?r.mediaSource?this.attachPrimary(e.start,e,!0):this.preloadPrimary(e):this.preloadPrimary(e)}}}preloadPrimary(e){const t=this.findItemIndex(e),n=this.getPrimaryResumption(e,t);this.startLoadingPrimaryAt(n)}bufferedToEvent(e,t){const n=e.event,r=n.assetList.length===0&&!n.assetListLoader,s=n.cue.once;if(r||!s){const a=this.preloadAssets(n,t);if(a!=null&&a.interstitial.appendInPlace){const o=n.assetList[t],u=this.primaryMedia;o&&u&&this.bufferAssetPlayer(a,u)}}}preloadAssets(e,t){const n=e.assetUrl,r=e.assetList.length,s=r===0&&!e.assetListLoader,a=e.cue.once;if(s){const u=e.timelineStart;if(e.appendInPlace){var o;const g=this.playingItem;!this.isInterstitial(g)&&(g==null||(o=g.nextEvent)==null?void 0:o.identifier)===e.identifier&&this.flushFrontBuffer(u+.25)}let l,c=0;if(!this.playingItem&&this.primaryLive&&(c=this.hls.startPosition,c===-1&&(c=this.hls.liveSyncPosition||0)),c&&!(e.cue.pre||e.cue.post)){const g=c-u;g>0&&(l=Math.round(g*1e3)/1e3)}if(this.log(`Load interstitial asset ${t+1}/${n?1:r} ${e}${l?` live-start: ${c} start-offset: ${l}`:""}`),n)return this.createAsset(e,0,0,u,e.duration,n);const d=this.assetListLoader.loadAssetList(e,l);d&&(e.assetListLoader=d)}else if(!a&&r){for(let u=t;u<r;u++){const l=e.assetList[u],c=this.getAssetPlayerQueueIndex(l.identifier);(c===-1||this.playerQueue[c].destroyed)&&!l.error&&this.createAssetPlayer(e,l,u)}return this.getAssetPlayer(e.assetList[t].identifier)}return null}flushFrontBuffer(e){const t=this.requiredTracks;if(!t)return;this.log(`Removing front buffer starting at ${e}`),Object.keys(t).forEach(r=>{this.hls.trigger(f.BUFFER_FLUSHING,{startOffset:e,endOffset:1/0,type:r})})}getAssetPlayerQueueIndex(e){const t=this.playerQueue;for(let n=0;n<t.length;n++)if(e===t[n].assetId)return n;return-1}getAssetPlayer(e){const t=this.getAssetPlayerQueueIndex(e);return this.playerQueue[t]||null}getBufferingPlayer(){const{playerQueue:e,primaryMedia:t}=this;if(t){for(let n=0;n<e.length;n++)if(e[n].media===t)return e[n]}return null}createAsset(e,t,n,r,s,a){const o={parentIdentifier:e.identifier,identifier:vu(e,a,t),duration:s,startOffset:n,timelineStart:r,uri:a};return this.createAssetPlayer(e,o,t)}createAssetPlayer(e,t,n){const r=this.hls,s=r.userConfig;let a=s.videoPreference;const o=r.loadLevelObj||r.levels[r.currentLevel];(a||o)&&(a=h({},a),o.videoCodec&&(a.videoCodec=o.videoCodec),o.videoRange&&(a.allowedVideoRanges=[o.videoRange]));const u=r.audioTracks[r.audioTrack],l=r.subtitleTracks[r.subtitleTrack];let c=0;if(this.primaryLive||e.appendInPlace){const we=this.timelinePos-t.timelineStart;if(we>1){const Ze=t.duration;Ze&&we<Ze&&(c=we)}}const d=t.identifier,g=_(_({},s),{},{autoStartLoad:!0,startFragPrefetch:!0,primarySessionId:r.sessionId,assetPlayerId:d,abrEwmaDefaultEstimate:r.bandwidthEstimate,interstitialsController:void 0,startPosition:c,liveDurationInfinity:!1,testBandwidth:!1,videoPreference:a,audioPreference:u||s.audioPreference,subtitlePreference:l||s.subtitlePreference});e.appendInPlace&&(e.appendInPlaceStarted=!0,t.timelineStart&&(g.timelineOffset=t.timelineStart));const w=g.cmcd;w!=null&&w.sessionId&&w.contentId&&(g.cmcd=h({},w,{contentId:Ea(t.uri)})),this.getAssetPlayer(d)&&this.warn(`Duplicate date range identifier ${e} and asset ${d}`);const y=new VA(this.HlsPlayerClass,g,e,t);this.playerQueue.push(y),e.assetList[n]=t;const O=we=>{if(we.live){const pt=new Error(`Interstitials MUST be VOD assets ${e}`),At={fatal:!0,type:se.OTHER_ERROR,details:U.INTERSTITIAL_ASSET_ITEM_ERROR,error:pt};this.handleAssetItemError(At,e,this.schedule.findEventIndex(e.identifier),n,pt.message);return}const Ze=we.edge-we.fragmentStart,rt=t.duration;(rt===null||Ze>rt)&&(this.log(`Interstitial asset "${d}" duration change ${rt} > ${Ze}`),t.duration=Ze,this.updateSchedule())};y.on(f.LEVEL_UPDATED,(we,{details:Ze})=>O(Ze)),y.on(f.LEVEL_PTS_UPDATED,(we,{details:Ze})=>O(Ze));const H=(we,Ze)=>{const rt=this.getAssetPlayer(d);if(rt&&Ze.tracks){rt.off(f.BUFFER_CODECS,H),rt.tracks=Ze.tracks;const pt=this.primaryMedia;this.bufferingAsset===rt.assetItem&&pt&&!rt.media&&this.bufferAssetPlayer(rt,pt)}};y.on(f.BUFFER_CODECS,H);const Ae=()=>{var we;const Ze=this.getAssetPlayer(d);if(this.log(`buffered to end of asset ${Ze}`),!Ze)return;const rt=this.schedule.findEventIndex(e.identifier),pt=(we=this.schedule.items)==null?void 0:we[rt];if(this.isInterstitial(pt)){const wt=e.findAssetIndex(t),_t=no(e,wt);if(!e.isAssetPastPlayoutLimit(_t))this.bufferedToItem(pt,_t);else{var At;const ct=(At=this.schedule.items)==null?void 0:At[rt+1];ct&&this.bufferedToItem(ct)}}};y.on(f.BUFFERED_TO_END,Ae);const Ee=we=>()=>{if(!this.getAssetPlayer(d))return;this.shouldPlay=!0;const rt=this.schedule.findEventIndex(e.identifier);this.advanceAfterAssetEnded(e,rt,we)};return y.once(f.MEDIA_ENDED,Ee(n)),y.once(f.PLAYOUT_LIMIT_REACHED,Ee(1/0)),y.on(f.ERROR,(we,Ze)=>{const rt=this.getAssetPlayer(d);if(Ze.details===U.BUFFER_STALLED_ERROR){if(rt!=null&&rt.media){const pt=rt.currentTime,At=rt.duration-pt;pt&&e.appendInPlace&&At/rt.media.playbackRate<.5?(this.log(`Advancing buffer past end of asset ${d} ${e} at ${rt.media.currentTime}`),Ae()):(this.warn(`Stalled at ${pt} of ${pt+At} in asset ${d} ${e}`),this.onTimeupdate(),this.checkBuffer(!0))}return}this.handleAssetItemError(Ze,e,this.schedule.findEventIndex(e.identifier),n,`Asset player error ${Ze.error} ${e}`)}),y.on(f.DESTROYING,()=>{if(!this.getAssetPlayer(d))return;const Ze=new Error(`Asset player destroyed unexpectedly ${d}`),rt={fatal:!0,type:se.OTHER_ERROR,details:U.INTERSTITIAL_ASSET_ITEM_ERROR,error:Ze};this.handleAssetItemError(rt,e,this.schedule.findEventIndex(e.identifier),n,Ze.message)}),this.log(`INTERSTITIAL_ASSET_PLAYER_CREATED ${$s(t)}`),this.hls.trigger(f.INTERSTITIAL_ASSET_PLAYER_CREATED,{asset:t,assetListIndex:n,event:e,player:y}),y}clearInterstitial(e,t){e.assetList.forEach(n=>{this.clearAssetPlayer(n.identifier,t)}),e.reset()}resetAssetPlayer(e){const t=this.getAssetPlayerQueueIndex(e);if(t!==-1){this.log(`reset asset player "${e}" after error`);const n=this.playerQueue[t];this.transferMediaFromPlayer(n,null),n.resetDetails()}}clearAssetPlayer(e,t){const n=this.getAssetPlayerQueueIndex(e);if(n!==-1){this.log(`clear asset player "${e}" toSegment: ${t&&ss(t)}`);const r=this.playerQueue[n];this.transferMediaFromPlayer(r,t),this.playerQueue.splice(n,1),r.destroy()}}emptyPlayerQueue(){let e;for(;e=this.playerQueue.pop();)e.destroy();this.playerQueue=[]}startAssetPlayer(e,t,n,r,s){const{interstitial:a,assetItem:o,assetId:u}=e,l=a.assetList.length,c=this.playingAsset;this.endedAsset=null,this.playingAsset=o,(!c||c.identifier!==u)&&(c&&(this.clearAssetPlayer(c.identifier,n[r]),delete c.error),this.log(`INTERSTITIAL_ASSET_STARTED ${t+1}/${l} ${$s(o)}`),this.hls.trigger(f.INTERSTITIAL_ASSET_STARTED,{asset:o,assetListIndex:t,event:a,schedule:n.slice(0),scheduleIndex:r,player:e})),this.bufferAssetPlayer(e,s)}bufferAssetPlayer(e,t){var n,r;const{interstitial:s,assetItem:a}=e,o=this.schedule.findEventIndex(s.identifier),u=(n=this.schedule.items)==null?void 0:n[o];if(!u)return;this.setBufferingItem(u),this.bufferingAsset=a;const l=this.getBufferingPlayer();if(l===e)return;const c=s.appendInPlace;if(c&&(l==null?void 0:l.interstitial.appendInPlace)===!1)return;const d=(l==null?void 0:l.tracks)||((r=this.detachedData)==null?void 0:r.tracks)||this.requiredTracks;if(c&&a!==this.playingAsset){if(!e.tracks)return;if(d&&!de(d,e.tracks)){const g=new Error(`Asset ${$s(a)} SourceBuffer tracks ('${Object.keys(e.tracks)}') are not compatible with primary content tracks ('${Object.keys(d)}')`),w={fatal:!0,type:se.OTHER_ERROR,details:U.INTERSTITIAL_ASSET_ITEM_ERROR,error:g},y=s.findAssetIndex(a);this.handleAssetItemError(w,s,o,y,g.message);return}}this.transferMediaTo(e,t)}handleAssetItemError(e,t,n,r,s){if(e.details===U.BUFFER_STALLED_ERROR)return;const a=t.assetList[r];this.warn(`INTERSTITIAL_ASSET_ERROR ${a&&$s(a)} ${e.error}`);const o=a==null?void 0:a.identifier,u=this.getAssetPlayerQueueIndex(o),l=this.playerQueue[u]||null,c=this.schedule.items,d=h({},e,{fatal:!1,errorAction:Ve(!0),asset:a,assetListIndex:r,event:t,schedule:c,scheduleIndex:n,player:l});if(this.hls.trigger(f.INTERSTITIAL_ASSET_ERROR,d),!e.fatal)return;const g=this.playingAsset,w=new Error(s);if(a&&(this.clearAssetPlayer(o,null),a.error=w),!t.assetList.some(y=>!y.error))t.error=w;else{for(let y=r;y<t.assetList.length;y++)this.resetAssetPlayer(t.assetList[y].identifier);this.updateSchedule()}t.error?this.primaryFallback(t):g&&g.identifier===o&&this.advanceAfterAssetEnded(t,n,r)}primaryFallback(e){const t=e.timelineStart,n=this.effectivePlayingItem;if(this.updateSchedule(),n){this.log(`Fallback to primary from event "${e.identifier}" start: ${t} pos: ${this.timelinePos} playing: ${n?ss(n):"<none>"} error: ${e.error}`);let r=this.timelinePos;r===-1&&(r=this.hls.startPosition);const s=this.updateItem(n,r);this.itemsMatch(n,s)&&this.clearInterstitial(e,null),e.appendInPlace&&(this.attachPrimary(t,null),this.flushFrontBuffer(t));const a=this.schedule.findItemIndexAtTime(r);this.setSchedulePosition(a)}else this.checkStart()}onAssetListLoaded(e,t){var n;const r=t.event,s=r.identifier,a=t.assetListResponse.ASSETS;if(!this.schedule.hasEvent(s))return;const o=r.timelineStart,u=r.duration;let l=0;a.forEach((y,O)=>{const H=parseFloat(y.DURATION);this.createAsset(r,O,l,o+l,H,y.URI),l+=H}),r.duration=l,this.log(`Loaded asset-list with duration: ${l} (was: ${u}) ${r}`);const c=this.waitingItem,d=(c==null?void 0:c.event.identifier)===s;this.updateSchedule();const g=(n=this.bufferingItem)==null?void 0:n.event;if(d){var w;const y=this.schedule.findEventIndex(s),O=(w=this.schedule.items)==null?void 0:w[y];if(O){if(!this.playingItem&&this.timelinePos>O.end&&this.schedule.findItemIndexAtTime(this.timelinePos)!==y){r.error=new Error(`Interstitial no longer within playback range ${this.timelinePos} ${r}`),this.primaryFallback(r);return}this.setBufferingItem(O)}this.setSchedulePosition(y)}else if((g==null?void 0:g.identifier)===s&&g.appendInPlace){const y=r.assetList[0],O=this.getAssetPlayer(y.identifier),H=this.primaryMedia;y&&O&&H&&this.bufferAssetPlayer(O,H)}}onError(e,t){switch(t.details){case U.ASSET_LIST_PARSING_ERROR:case U.ASSET_LIST_LOAD_ERROR:case U.ASSET_LIST_LOAD_TIMEOUT:{const n=t.interstitial;n&&this.primaryFallback(n);break}case U.BUFFER_STALLED_ERROR:{this.onTimeupdate(),this.checkBuffer(!0);break}}}}const Vo=500;class WA extends Hr{constructor(e,t,n){super(e,t,n,"subtitle-stream-controller",ee.SUBTITLE),this.currentTrackId=-1,this.tracksBuffered=[],this.mainDetails=null,this.registerListeners()}onHandlerDestroying(){this.unregisterListeners(),super.onHandlerDestroying(),this.mainDetails=null}registerListeners(){super.registerListeners();const{hls:e}=this;e.on(f.LEVEL_LOADED,this.onLevelLoaded,this),e.on(f.SUBTITLE_TRACKS_UPDATED,this.onSubtitleTracksUpdated,this),e.on(f.SUBTITLE_TRACK_SWITCH,this.onSubtitleTrackSwitch,this),e.on(f.SUBTITLE_TRACK_LOADED,this.onSubtitleTrackLoaded,this),e.on(f.SUBTITLE_FRAG_PROCESSED,this.onSubtitleFragProcessed,this),e.on(f.BUFFER_FLUSHING,this.onBufferFlushing,this)}unregisterListeners(){super.unregisterListeners();const{hls:e}=this;e.off(f.LEVEL_LOADED,this.onLevelLoaded,this),e.off(f.SUBTITLE_TRACKS_UPDATED,this.onSubtitleTracksUpdated,this),e.off(f.SUBTITLE_TRACK_SWITCH,this.onSubtitleTrackSwitch,this),e.off(f.SUBTITLE_TRACK_LOADED,this.onSubtitleTrackLoaded,this),e.off(f.SUBTITLE_FRAG_PROCESSED,this.onSubtitleFragProcessed,this),e.off(f.BUFFER_FLUSHING,this.onBufferFlushing,this)}startLoad(e,t){this.stopLoad(),this.state=jt.IDLE,this.setInterval(Vo),this.nextLoadPosition=this.lastCurrentTime=e+this.timelineOffset,this.startPosition=t?-1:e,this.tick()}onManifestLoading(){super.onManifestLoading(),this.mainDetails=null}onMediaDetaching(e,t){this.tracksBuffered=[],super.onMediaDetaching(e,t)}onLevelLoaded(e,t){this.mainDetails=t.details}onSubtitleFragProcessed(e,t){const{frag:n,success:r}=t;if(this.fragContextChanged(n)||(Ue(n)&&(this.fragPrevious=n),this.state=jt.IDLE),!r)return;const s=this.tracksBuffered[this.currentTrackId];if(!s)return;let a;const o=n.start;for(let l=0;l<s.length;l++)if(o>=s[l].start&&o<=s[l].end){a=s[l];break}const u=n.start+n.duration;a?a.end=u:(a={start:o,end:u},s.push(a)),this.fragmentTracker.fragBuffered(n),this.fragBufferedComplete(n,null),this.media&&this.tick()}onBufferFlushing(e,t){const{startOffset:n,endOffset:r}=t;if(n===0&&r!==Number.POSITIVE_INFINITY){const s=r-1;if(s<=0)return;t.endOffsetSubtitles=Math.max(0,s),this.tracksBuffered.forEach(a=>{for(let o=0;o<a.length;){if(a[o].end<=s){a.shift();continue}else if(a[o].start<s)a[o].start=s;else break;o++}}),this.fragmentTracker.removeFragmentsInRange(n,s,ee.SUBTITLE)}}onError(e,t){const n=t.frag;(n==null?void 0:n.type)===ee.SUBTITLE&&(t.details===U.FRAG_GAP&&this.fragmentTracker.fragBuffered(n,!0),this.fragCurrent&&this.fragCurrent.abortRequests(),this.state!==jt.STOPPED&&(this.state=jt.IDLE))}onSubtitleTracksUpdated(e,{subtitleTracks:t}){if(this.levels&&bA(this.levels,t)){this.levels=t.map(n=>new qt(n));return}this.tracksBuffered=[],this.levels=t.map(n=>{const r=new qt(n);return this.tracksBuffered[r.id]=[],r}),this.fragmentTracker.removeFragmentsInRange(0,Number.POSITIVE_INFINITY,ee.SUBTITLE),this.fragPrevious=null,this.mediaBuffer=null}onSubtitleTrackSwitch(e,t){var n;if(this.currentTrackId=t.id,!((n=this.levels)!=null&&n.length)||this.currentTrackId===-1){this.clearInterval();return}const r=this.levels[this.currentTrackId];r!=null&&r.details?this.mediaBuffer=this.mediaBufferTimeRanges:this.mediaBuffer=null,r&&this.state!==jt.STOPPED&&this.setInterval(Vo)}onSubtitleTrackLoaded(e,t){var n;const{currentTrackId:r,levels:s}=this,{details:a,id:o}=t;if(!s){this.warn(`Subtitle tracks were reset while loading level ${o}`);return}const u=s[o];if(o>=s.length||!u)return;this.log(`Subtitle track ${o} loaded [${a.startSN},${a.endSN}]${a.lastPartSn?`[part-${a.lastPartSn}-${a.lastPartIndex}]`:""},duration:${a.totalduration}`),this.mediaBuffer=this.mediaBufferTimeRanges;let l=0;if(a.live||(n=u.details)!=null&&n.live){if(a.deltaUpdateFailed)return;const d=this.mainDetails;if(!d){this.startFragRequested=!1;return}const g=d.fragments[0];if(!u.details)a.hasProgramDateTime&&d.hasProgramDateTime?(Hi(a,d),l=a.fragmentStart):g&&(l=g.start,Br(a,l));else{var c;l=this.alignPlaylists(a,u.details,(c=this.levelLastLoaded)==null?void 0:c.details),l===0&&g&&(l=g.start,Br(a,l))}d&&!this.startFragRequested&&this.setStartPosition(d,l)}u.details=a,this.levelLastLoaded=u,o===r&&(this.hls.trigger(f.SUBTITLE_TRACK_UPDATED,{details:a,id:o,groupId:t.groupId}),this.tick(),a.live&&!this.fragCurrent&&this.media&&this.state===jt.IDLE&&(mn(null,a.fragments,this.media.currentTime,0)||(this.warn("Subtitle playlist not aligned with playback"),u.details=void 0)))}_handleFragmentLoadComplete(e){const{frag:t,payload:n}=e,r=t.decryptdata,s=this.hls;if(!this.fragContextChanged(t)&&n&&n.byteLength>0&&r!=null&&r.key&&r.iv&&ii(r.method)){const a=performance.now();this.decrypter.decrypt(new Uint8Array(n),r.key.buffer,r.iv.buffer,Xr(r.method)).catch(o=>{throw s.trigger(f.ERROR,{type:se.MEDIA_ERROR,details:U.FRAG_DECRYPT_ERROR,fatal:!1,error:o,reason:o.message,frag:t}),o}).then(o=>{const u=performance.now();s.trigger(f.FRAG_DECRYPTED,{frag:t,payload:o,stats:{tstart:a,tdecrypt:u}})}).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||this.waitForLive(n))return;const{config:r}=this,s=this.getLoadPosition(),a=ln.bufferedInfo(this.tracksBuffered[this.currentTrackId]||[],s,r.maxBufferHole),{end:o,len:u}=a,l=n.details,c=this.hls.maxBufferLength+l.levelTargetDuration;if(u>c)return;const d=l.fragments,g=d.length,w=l.edge;let y=null;const O=this.fragPrevious;if(o<w){const Ee=r.maxFragLookUpTolerance,we=o>w-Ee?0:Ee;y=mn(O,d,Math.max(d[0].start,o),we),!y&&O&&O.start<d[0].start&&(y=d[0])}else y=d[g-1];if(y=this.filterReplacedPrimary(y,n.details),!y)return;const H=y.sn-l.startSN,Ae=d[H-1];if(Ae&&Ae.cc===y.cc&&this.fragmentTracker.getState(Ae)===Te.NOT_LOADED&&(y=Ae),this.fragmentTracker.getState(y)===Te.NOT_LOADED){const Ee=this.mapToInitFragWhenRequired(y);Ee&&this.loadFragment(Ee,n,o)}}}loadFragment(e,t,n){Ue(e)?super.loadFragment(e,t,n):this._loadInitSegment(e,t)}get mediaBufferTimeRanges(){return new yu(this.tracksBuffered[this.currentTrackId]||[])}}class yu{constructor(e){this.buffered=void 0;const t=(n,r,s)=>{if(r=r>>>0,r>s-1)throw new DOMException(`Failed to execute '${n}' on 'TimeRanges': The index provided (${r}) is greater than the maximum bound (${s})`);return e[r][n]};this.buffered={get length(){return e.length},end(n){return t("end",n,e.length)},start(n){return t("start",n,e.length)}}}}const Eu={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},Zs=i=>String.fromCharCode(Eu[i]||i),es=15,ei=100,Ws={17:1,18:3,21:5,22:7,23:9,16:11,19:12,20:14},aa={17:2,18:4,21:6,22:8,23:10,19:13,20:15},xs={25:1,26:3,29:5,30:7,31:9,24:11,27:12,28:14},Ss={25:2,26:4,29:6,30:8,31:10,27:13,28:15},Ba=["white","green","blue","cyan","red","yellow","magenta","black","transparent"];class _s{constructor(){this.time=null,this.verboseLevel=0}log(e,t){if(this.verboseLevel>=e){const n=typeof t=="function"?t():t;j.log(`${this.time} [${e}] ${n}`)}}}const Ts=function(e){const t=[];for(let n=0;n<e.length;n++)t.push(e[n].toString(16));return t};class $o{constructor(){this.foreground="white",this.underline=!1,this.italics=!1,this.background="black",this.flash=!1}reset(){this.foreground="white",this.underline=!1,this.italics=!1,this.background="black",this.flash=!1}setStyles(e){const t=["foreground","underline","italics","background","flash"];for(let n=0;n<t.length;n++){const r=t[n];e.hasOwnProperty(r)&&(this[r]=e[r])}}isDefault(){return this.foreground==="white"&&!this.underline&&!this.italics&&this.background==="black"&&!this.flash}equals(e){return this.foreground===e.foreground&&this.underline===e.underline&&this.italics===e.italics&&this.background===e.background&&this.flash===e.flash}copy(e){this.foreground=e.foreground,this.underline=e.underline,this.italics=e.italics,this.background=e.background,this.flash=e.flash}toString(){return"color="+this.foreground+", underline="+this.underline+", italics="+this.italics+", background="+this.background+", flash="+this.flash}}class zA{constructor(){this.uchar=" ",this.penState=new $o}reset(){this.uchar=" ",this.penState.reset()}setChar(e,t){this.uchar=e,this.penState.copy(t)}setPenState(e){this.penState.copy(e)}equals(e){return this.uchar===e.uchar&&this.penState.equals(e.penState)}copy(e){this.uchar=e.uchar,this.penState.copy(e.penState)}isEmpty(){return this.uchar===" "&&this.penState.isDefault()}}class Zo{constructor(e){this.chars=[],this.pos=0,this.currPenState=new $o,this.cueStartTime=null,this.logger=void 0;for(let t=0;t<ei;t++)this.chars.push(new zA);this.logger=e}equals(e){for(let t=0;t<ei;t++)if(!this.chars[t].equals(e.chars[t]))return!1;return!0}copy(e){for(let t=0;t<ei;t++)this.chars[t].copy(e.chars[t])}isEmpty(){let e=!0;for(let t=0;t<ei;t++)if(!this.chars[t].isEmpty()){e=!1;break}return e}setCursor(e){this.pos!==e&&(this.pos=e),this.pos<0?(this.logger.log(3,"Negative cursor position "+this.pos),this.pos=0):this.pos>ei&&(this.logger.log(3,"Too large cursor position "+this.pos),this.pos=ei)}moveCursor(e){const t=this.pos+e;if(e>1)for(let n=this.pos+1;n<t+1;n++)this.chars[n].setPenState(this.currPenState);this.setCursor(t)}backSpace(){this.moveCursor(-1),this.chars[this.pos].setChar(" ",this.currPenState)}insertChar(e){e>=144&&this.backSpace();const t=Zs(e);if(this.pos>=ei){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<ei;t++)this.chars[t].reset()}clear(){this.clearFromPos(0),this.pos=0,this.currPenState.reset()}clearToEndOfRow(){this.clearFromPos(this.pos)}getTextString(){const e=[];let t=!0;for(let n=0;n<ei;n++){const r=this.chars[n].uchar;r!==" "&&(t=!1),e.push(r)}return t?"":e.join("")}setPenStyles(e){this.currPenState.setStyles(e),this.chars[this.pos].setPenState(this.currPenState)}}class zs{constructor(e){this.rows=[],this.currRow=es-1,this.nrRollUpRows=null,this.lastOutputScreen=null,this.logger=void 0;for(let t=0;t<es;t++)this.rows.push(new Zo(e));this.logger=e}reset(){for(let e=0;e<es;e++)this.rows[e].clear();this.currRow=es-1}equals(e){let t=!0;for(let n=0;n<es;n++)if(!this.rows[n].equals(e.rows[n])){t=!1;break}return t}copy(e){for(let t=0;t<es;t++)this.rows[t].copy(e.rows[t])}isEmpty(){let e=!0;for(let t=0;t<es;t++)if(!this.rows[t].isEmpty()){e=!1;break}return e}backSpace(){this.rows[this.currRow].backSpace()}clearToEndOfRow(){this.rows[this.currRow].clearToEndOfRow()}insertChar(e){this.rows[this.currRow].insertChar(e)}setPen(e){this.rows[this.currRow].setPenStyles(e)}moveCursor(e){this.rows[this.currRow].moveCursor(e)}setCursor(e){this.logger.log(2,"setCursor: "+e),this.rows[this.currRow].setCursor(e)}setPAC(e){this.logger.log(2,()=>"pacData = "+Ot(e));let t=e.row-1;if(this.nrRollUpRows&&t<this.nrRollUpRows-1&&(t=this.nrRollUpRows-1),this.nrRollUpRows&&this.currRow!==t){for(let o=0;o<es;o++)this.rows[o].clear();const s=this.currRow+1-this.nrRollUpRows,a=this.lastOutputScreen;if(a){const o=a.rows[s].cueStartTime,u=this.logger.time;if(o!==null&&u!==null&&o<u)for(let l=0;l<this.nrRollUpRows;l++)this.rows[t-this.nrRollUpRows+l+1].copy(a.rows[s+l])}}this.currRow=t;const n=this.rows[this.currRow];if(e.indent!==null){const s=e.indent,a=Math.max(s-1,0);n.setCursor(e.indent),e.color=n.chars[a].penState.foreground}const r={foreground:e.color,underline:e.underline,italics:e.italics,background:"black",flash:!1};this.setPen(r)}setBkgData(e){this.logger.log(2,()=>"bkgData = "+Ot(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 s=0;s<es;s++){const a=this.rows[s].getTextString();a&&(r=s+1,e?t.push("Row "+r+": '"+a+"'"):t.push(a.trim()))}return t.length>0&&(e?n="["+t.join(" | ")+"]":n=t.join(`
`)),n}getTextAndFormat(){return this.rows}}class Wo{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 zs(n),this.nonDisplayedMemory=new zs(n),this.lastOutputScreen=new zs(n),this.currRollUpRow=this.displayedMemory.rows[es-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[es-1],this.writeScreen=this.displayedMemory,this.mode=null,this.cueStartTime=null}getHandler(){return this.outputFilter}setHandler(e){this.outputFilter=e}setPAC(e){this.writeScreen.setPAC(e)}setBkgData(e){this.writeScreen.setBkgData(e)}setMode(e){e!==this.mode&&(this.mode=e,this.logger.log(2,()=>"MODE="+e),this.mode==="MODE_POP-ON"?this.writeScreen=this.nonDisplayedMemory:(this.writeScreen=this.displayedMemory,this.writeScreen.reset()),this.mode!=="MODE_ROLL-UP"&&(this.displayedMemory.nrRollUpRows=null,this.nonDisplayedMemory.nrRollUpRows=null),this.mode=e)}insertChars(e){for(let n=0;n<e.length;n++)this.writeScreen.insertChar(e[n]);const t=this.writeScreen===this.displayedMemory?"DISP":"NON_DISP";this.logger.log(2,()=>t+": "+this.writeScreen.getDisplayText(!0)),(this.mode==="MODE_PAINT-ON"||this.mode==="MODE_ROLL-UP")&&(this.logger.log(1,()=>"DISPLAYED: "+this.displayedMemory.getDisplayText(!0)),this.outputDataUpdate())}ccRCL(){this.logger.log(2,"RCL - Resume Caption Loading"),this.setMode("MODE_POP-ON")}ccBS(){this.logger.log(2,"BS - BackSpace"),this.mode!=="MODE_TEXT"&&(this.writeScreen.backSpace(),this.writeScreen===this.displayedMemory&&this.outputDataUpdate())}ccAOF(){}ccAON(){}ccDER(){this.logger.log(2,"DER- Delete to End of Row"),this.writeScreen.clearToEndOfRow(),this.outputDataUpdate()}ccRU(e){this.logger.log(2,"RU("+e+") - Roll Up"),this.writeScreen=this.displayedMemory,this.setMode("MODE_ROLL-UP"),this.writeScreen.setRollUpRows(e)}ccFON(){this.logger.log(2,"FON - Flash On"),this.writeScreen.setPen({flash:!0})}ccRDC(){this.logger.log(2,"RDC - Resume Direct Captioning"),this.setMode("MODE_PAINT-ON")}ccTR(){this.logger.log(2,"TR"),this.setMode("MODE_TEXT")}ccRTD(){this.logger.log(2,"RTD"),this.setMode("MODE_TEXT")}ccEDM(){this.logger.log(2,"EDM - Erase Displayed Memory"),this.displayedMemory.reset(),this.outputDataUpdate(!0)}ccCR(){this.logger.log(2,"CR - Carriage Return"),this.writeScreen.rollUp(),this.outputDataUpdate(!0)}ccENM(){this.logger.log(2,"ENM - Erase Non-displayed Memory"),this.nonDisplayedMemory.reset()}ccEOC(){if(this.logger.log(2,"EOC - End Of Caption"),this.mode==="MODE_POP-ON"){const e=this.displayedMemory;this.displayedMemory=this.nonDisplayedMemory,this.nonDisplayedMemory=e,this.writeScreen=this.nonDisplayedMemory,this.logger.log(1,()=>"DISP: "+this.displayedMemory.getDisplayText())}this.outputDataUpdate(!0)}ccTO(e){this.logger.log(2,"TO("+e+") - Tab Offset"),this.writeScreen.moveCursor(e)}ccMIDROW(e){const t={flash:!1};if(t.underline=e%2===1,t.italics=e>=46,t.italics)t.foreground="white";else{const n=Math.floor(e/2)-16,r=["white","green","blue","cyan","red","yellow","magenta"];t.foreground=r[n]}this.logger.log(2,"MIDROW: "+Ot(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 zo{constructor(e,t,n){this.channels=void 0,this.currentChannel=0,this.cmdHistory=Bu(),this.logger=void 0;const r=this.logger=new _s;this.channels=[null,new Wo(e,t,r),new Wo(e+1,n,r)]}getHandler(e){return this.channels[e].getHandler()}setHandler(e,t){this.channels[e].setHandler(t)}addData(e,t){this.logger.time=e;for(let n=0;n<t.length;n+=2){const r=t[n]&127,s=t[n+1]&127;let a=!1,o=null;if(r===0&&s===0)continue;this.logger.log(3,()=>"["+Ts([t[n],t[n+1]])+"] -> ("+Ts([r,s])+")");const u=this.cmdHistory;if(r>=16&&r<=31){if(wu(r,s,u)){Fs(null,null,u),this.logger.log(3,()=>"Repeated command ("+Ts([r,s])+") is dropped");continue}Fs(r,s,this.cmdHistory),a=this.parseCmd(r,s),a||(a=this.parseMidrow(r,s)),a||(a=this.parsePAC(r,s)),a||(a=this.parseBackgroundAttributes(r,s))}else Fs(null,null,u);if(!a&&(o=this.parseChars(r,s),o)){const c=this.currentChannel;c&&c>0?this.channels[c].insertChars(o):this.logger.log(2,"No channel found yet. TEXT-MODE?")}!a&&!o&&this.logger.log(2,()=>"Couldn't parse cleaned data "+Ts([r,s])+" orig: "+Ts([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 s=e===20||e===21||e===23?1:2,a=this.channels[s];return e===20||e===21||e===28||e===29?t===32?a.ccRCL():t===33?a.ccBS():t===34?a.ccAOF():t===35?a.ccAON():t===36?a.ccDER():t===37?a.ccRU(2):t===38?a.ccRU(3):t===39?a.ccRU(4):t===40?a.ccFON():t===41?a.ccRDC():t===42?a.ccTR():t===43?a.ccRTD():t===44?a.ccEDM():t===45?a.ccCR():t===46?a.ccENM():t===47&&a.ccEOC():a.ccTO(t-32),this.currentChannel=s,!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 ("+Ts([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,s=(e===16||e===24)&&t>=64&&t<=95;if(!(r||s))return!1;const a=e<=23?1:2;t>=64&&t<=95?n=a===1?Ws[e]:xs[e]:n=a===1?aa[e]:Ss[e];const o=this.channels[a];return o?(o.setPAC(this.interpretPAC(n,t)),this.currentChannel=a,!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,s=null;if(e>=25?(n=2,s=e-8):(n=1,s=e),s>=17&&s<=19){let a;s===17?a=t+80:s===18?a=t+112:a=t+144,this.logger.log(2,()=>"Special char '"+Zs(a)+"' in channel "+n),r=[a]}else e>=32&&e<=127&&(r=t===0?[e]:[e,t]);return r&&this.logger.log(3,()=>"Char codes = "+Ts(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 s;const a={};e===16||e===24?(s=Math.floor((t-32)/2),a.background=Ba[s],t%2===1&&(a.background=a.background+"_semi")):t===45?a.background="transparent":(a.foreground="black",t===47&&(a.underline=!0));const o=e<=23?1:2;return this.channels[o].setBkgData(a),!0}reset(){for(let e=0;e<Object.keys(this.channels).length;e++){const t=this.channels[e];t&&t.reset()}Fs(null,null,this.cmdHistory)}cueSplitAtTime(e){for(let t=0;t<this.channels.length;t++){const n=this.channels[t];n&&n.cueSplitAtTime(e)}}}function Fs(i,e,t){t.a=i,t.b=e}function wu(i,e,t){return t.a===i&&t.b===e}function Bu(){return{a:null,b:null}}var jo=function(){if(wr!=null&&wr.VTTCue)return self.VTTCue;const i=["","lr","rl"],e=["start","middle","end","left","right"];function t(o,u){if(typeof u!="string"||!Array.isArray(o))return!1;const l=u.toLowerCase();return~o.indexOf(l)?l:!1}function n(o){return t(i,o)}function r(o){return t(e,o)}function s(o,...u){let l=1;for(;l<arguments.length;l++){const c=arguments[l];for(const d in c)o[d]=c[d]}return o}function a(o,u,l){const c=this,d={enumerable:!0};c.hasBeenReset=!1;let g="",w=!1,y=o,O=u,H=l,Ae=null,Ee="",we=!0,Ze="auto",rt="start",pt=50,At="middle",wt=50,_t="middle";Object.defineProperty(c,"id",s({},d,{get:function(){return g},set:function(ct){g=""+ct}})),Object.defineProperty(c,"pauseOnExit",s({},d,{get:function(){return w},set:function(ct){w=!!ct}})),Object.defineProperty(c,"startTime",s({},d,{get:function(){return y},set:function(ct){if(typeof ct!="number")throw new TypeError("Start time must be set to a number.");y=ct,this.hasBeenReset=!0}})),Object.defineProperty(c,"endTime",s({},d,{get:function(){return O},set:function(ct){if(typeof ct!="number")throw new TypeError("End time must be set to a number.");O=ct,this.hasBeenReset=!0}})),Object.defineProperty(c,"text",s({},d,{get:function(){return H},set:function(ct){H=""+ct,this.hasBeenReset=!0}})),Object.defineProperty(c,"region",s({},d,{get:function(){return Ae},set:function(ct){Ae=ct,this.hasBeenReset=!0}})),Object.defineProperty(c,"vertical",s({},d,{get:function(){return Ee},set:function(ct){const fn=n(ct);if(fn===!1)throw new SyntaxError("An invalid or illegal string was specified.");Ee=fn,this.hasBeenReset=!0}})),Object.defineProperty(c,"snapToLines",s({},d,{get:function(){return we},set:function(ct){we=!!ct,this.hasBeenReset=!0}})),Object.defineProperty(c,"line",s({},d,{get:function(){return Ze},set:function(ct){if(typeof ct!="number"&&ct!=="auto")throw new SyntaxError("An invalid number or illegal string was specified.");Ze=ct,this.hasBeenReset=!0}})),Object.defineProperty(c,"lineAlign",s({},d,{get:function(){return rt},set:function(ct){const fn=r(ct);if(!fn)throw new SyntaxError("An invalid or illegal string was specified.");rt=fn,this.hasBeenReset=!0}})),Object.defineProperty(c,"position",s({},d,{get:function(){return pt},set:function(ct){if(ct<0||ct>100)throw new Error("Position must be between 0 and 100.");pt=ct,this.hasBeenReset=!0}})),Object.defineProperty(c,"positionAlign",s({},d,{get:function(){return At},set:function(ct){const fn=r(ct);if(!fn)throw new SyntaxError("An invalid or illegal string was specified.");At=fn,this.hasBeenReset=!0}})),Object.defineProperty(c,"size",s({},d,{get:function(){return wt},set:function(ct){if(ct<0||ct>100)throw new Error("Size must be between 0 and 100.");wt=ct,this.hasBeenReset=!0}})),Object.defineProperty(c,"align",s({},d,{get:function(){return _t},set:function(ct){const fn=r(ct);if(!fn)throw new SyntaxError("An invalid or illegal string was specified.");_t=fn,this.hasBeenReset=!0}})),c.displayState=void 0}return a.prototype.getCueAsHTML=function(){return self.WebVTT.convertCueToDOMTree(self,this.text)},a}();class bu{decode(e,t){if(!e)return"";if(typeof e!="string")throw new Error("Error - expected string data.");return decodeURIComponent(encodeURIComponent(e))}}function jA(i){function e(n,r,s,a){return(n|0)*3600+(r|0)*60+(s|0)+parseFloat(a||0)}const t=i.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 Yo{constructor(){this.values=Object.create(null)}set(e,t){!this.get(e)&&t!==""&&(this.values[e]=t)}get(e,t,n){return n?this.has(e)?this.values[e]:t[n]:this.has(e)?this.values[e]:t}has(e){return e in this.values}alt(e,t,n){for(let r=0;r<n.length;++r)if(t===n[r]){this.set(e,t);break}}integer(e,t){/^-?\d+$/.test(t)&&this.set(e,parseInt(t,10))}percent(e,t){if(/^([\d]{1,3})(\.[\d]*)?%$/.test(t)){const n=parseFloat(t);if(n>=0&&n<=100)return this.set(e,n),!0}return!1}}function YA(i,e,t,n){const r=n?i.split(n):[i];for(const s in r){if(typeof r[s]!="string")continue;const a=r[s].split(t);if(a.length!==2)continue;const o=a[0],u=a[1];e(o,u)}}const Xo=new jo(0,0,""),io=Xo.align==="middle"?"middle":"center";function Cu(i,e,t){const n=i;function r(){const o=jA(i);if(o===null)throw new Error("Malformed timestamp: "+n);return i=i.replace(/^[^\sa-zA-Z-]+/,""),o}function s(o,u){const l=new Yo;YA(o,function(g,w){let y;switch(g){case"region":for(let O=t.length-1;O>=0;O--)if(t[O].id===w){l.set(g,t[O].region);break}break;case"vertical":l.alt(g,w,["rl","lr"]);break;case"line":y=w.split(","),l.integer(g,y[0]),l.percent(g,y[0])&&l.set("snapToLines",!1),l.alt(g,y[0],["auto"]),y.length===2&&l.alt("lineAlign",y[1],["start",io,"end"]);break;case"position":y=w.split(","),l.percent(g,y[0]),y.length===2&&l.alt("positionAlign",y[1],["start",io,"end","line-left","line-right","auto"]);break;case"size":l.percent(g,w);break;case"align":l.alt(g,w,["start",io,"end","left","right"]);break}},/:/,/\s/),u.region=l.get("region",null),u.vertical=l.get("vertical","");let c=l.get("line","auto");c==="auto"&&Xo.line===-1&&(c=-1),u.line=c,u.lineAlign=l.get("lineAlign","start"),u.snapToLines=l.get("snapToLines",!0),u.size=l.get("size",100),u.align=l.get("align",io);let d=l.get("position","auto");d==="auto"&&Xo.position===50&&(d=u.align==="start"||u.align==="left"?0:u.align==="end"||u.align==="right"?100:50),u.position=d}function a(){i=i.replace(/^\s+/,"")}if(a(),e.startTime=r(),a(),i.slice(0,3)!=="-->")throw new Error("Malformed time stamp (time stamps must be separated by '-->'): "+n);i=i.slice(3),a(),e.endTime=r(),a(),s(i,e)}function XA(i){return i.replace(/<br(?: \/)?>/gi,`
`)}class Jo{constructor(){this.state="INITIAL",this.buffer="",this.decoder=new bu,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 s=t.buffer,a=0;for(s=XA(s);a<s.length&&s[a]!=="\r"&&s[a]!==`
`;)++a;const o=s.slice(0,a);return s[a]==="\r"&&++a,s[a]===`
`&&++a,t.buffer=s.slice(a),o}function r(s){YA(s,function(a,o){},/:/)}try{let s="";if(t.state==="INITIAL"){if(!/\r\n|\n/.test(t.buffer))return this;s=n();const o=s.match(/^()?WEBVTT([ \t].*)?$/);if(!(o!=null&&o[0]))throw new Error("Malformed WebVTT signature.");t.state="HEADER"}let a=!1;for(;t.buffer;){if(!/\r\n|\n/.test(t.buffer))return this;switch(a?a=!1:s=n(),t.state){case"HEADER":/:/.test(s)?r(s):s||(t.state="ID");continue;case"NOTE":s||(t.state="ID");continue;case"ID":if(/^NOTE($|[ \t])/.test(s)){t.state="NOTE";break}if(!s)continue;if(t.cue=new jo(0,0,""),t.state="CUE",s.indexOf("-->")===-1){t.cue.id=s;continue}case"CUE":if(!t.cue){t.state="BADCUE";continue}try{Cu(s,t.cue,t.regionList)}catch(o){t.cue=null,t.state="BADCUE";continue}t.state="CUETEXT";continue;case"CUETEXT":{const o=s.indexOf("-->")!==-1;if(!s||o&&(a=!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+=s}continue;case"BADCUE":s||(t.state="ID")}}}catch(s){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 qo=/\r\n|\n\r|\n|\r/g,so=function(e,t,n=0){return e.slice(n,n+t.length)===t},xu=function(e){let t=parseInt(e.slice(-3));const n=parseInt(e.slice(-6,-4)),r=parseInt(e.slice(-9,-7)),s=e.length>9?parseInt(e.substring(0,e.indexOf(":"))):0;if(!P(t)||!P(n)||!P(r)||!P(s))throw Error(`Malformed X-TIMESTAMP-MAP: Local:${e}`);return t+=1e3*n,t+=60*1e3*r,t+=60*60*1e3*s,t};function eA(i,e,t){return Ea(i.toString())+Ea(e.toString())+Ea(t)}const JA=function(e,t,n){let r=e[t],s=e[r.prevCC];if(!s||!s.new&&r.new){e.ccOffset=e.presentationOffset=r.start,r.new=!1;return}for(;(a=s)!=null&&a.new;){var a;e.ccOffset+=r.start-s.start,r.new=!1,r=s,s=e[r.prevCC]}e.presentationOffset=n};function Su(i,e,t,n,r,s,a){const o=new Jo,u=pe(new Uint8Array(i)).trim().replace(qo,`
`).split(`
`),l=[],c=e?Ul(e.baseTime,e.timescale):0;let d="00:00.000",g=0,w=0,y,O=!0;o.oncue=function(H){const Ae=t[n];let Ee=t.ccOffset;const we=(g-c)/9e4;if(Ae!=null&&Ae.new&&(w!==void 0?Ee=t.ccOffset=Ae.start:JA(t,n,we)),we){if(!e){y=new Error("Missing initPTS for VTT MPEGTS");return}Ee=we-t.presentationOffset}const Ze=H.endTime-H.startTime,rt=Xi((H.startTime+Ee-w)*9e4,r*9e4)/9e4;H.startTime=Math.max(rt,0),H.endTime=Math.max(rt+Ze,0);const pt=H.text.trim();H.text=decodeURIComponent(encodeURIComponent(pt)),H.id||(H.id=eA(H.startTime,H.endTime,pt)),H.endTime>0&&l.push(H)},o.onparsingerror=function(H){y=H},o.onflush=function(){if(y){a(y);return}s(l)},u.forEach(H=>{if(O)if(so(H,"X-TIMESTAMP-MAP=")){O=!1,H.slice(16).split(",").forEach(Ae=>{so(Ae,"LOCAL:")?d=Ae.slice(6):so(Ae,"MPEGTS:")&&(g=parseInt(Ae.slice(7)))});try{w=xu(d)/1e3}catch(Ae){y=Ae}return}else H===""&&(O=!1);o.parse(H+`
`)}),o.flush()}const tA="stpp.ttml.im1t",qA=/^(\d{2,}):(\d{2}):(\d{2}):(\d{2})\.?(\d+)?$/,el=/^(\d*(?:\.\d*)?)(h|m|s|ms|f|t)$/,Tu={left:"start",center:"center",right:"end",start:"start",end:"end"};function ao(i,e,t,n){const r=N(new Uint8Array(i),["mdat"]);if(r.length===0){n(new Error("Could not parse IMSC1 mdat"));return}const s=r.map(o=>pe(o)),a=Rl(e.baseTime,1,e.timescale);try{s.forEach(o=>t(Fu(o,a)))}catch(o){n(o)}}function Fu(i,e){const r=new DOMParser().parseFromString(i,"text/xml").getElementsByTagName("tt")[0];if(!r)throw new Error("Invalid ttml");const s={frameRate:30,subFrameRate:1,frameRateMultiplier:0,tickRate:0},a=Object.keys(s).reduce((d,g)=>(d[g]=r.getAttribute(`ttp:${g}`)||s[g],d),{}),o=r.getAttribute("xml:space")!=="preserve",u=tl(ba(r,"styling","style")),l=tl(ba(r,"layout","region")),c=ba(r,"body","[begin]");return[].map.call(c,d=>{const g=rr(d,o);if(!g||!d.hasAttribute("begin"))return null;const w=nA(d.getAttribute("begin"),a),y=nA(d.getAttribute("dur"),a);let O=nA(d.getAttribute("end"),a);if(w===null)throw Zi(d);if(O===null){if(y===null)throw Zi(d);O=w+y}const H=new jo(w-e,O-e,g);H.id=eA(H.startTime,H.endTime,H.text);const Ae=l[d.getAttribute("region")],Ee=u[d.getAttribute("style")],we=oa(Ae,Ee,u),{textAlign:Ze}=we;if(Ze){const rt=Tu[Ze];rt&&(H.lineAlign=rt),H.align=Ze}return h(H,we),H}).filter(d=>d!==null)}function ba(i,e,t){const n=i.getElementsByTagName(e)[0];return n?[].slice.call(n.querySelectorAll(t)):[]}function tl(i){return i.reduce((e,t)=>{const n=t.getAttribute("xml:id");return n&&(e[n]=t),e},{})}function rr(i,e){return[].slice.call(i.childNodes).reduce((t,n,r)=>{var s;return n.nodeName==="br"&&r?t+`
`:(s=n.childNodes)!=null&&s.length?rr(n,e):e?t+n.textContent.trim().replace(/\s+/g," "):t+n.textContent},"")}function oa(i,e,t){const n="http://www.w3.org/ns/ttml#styling";let r=null;const s=["displayAlign","textAlign","color","backgroundColor","fontSize","fontFamily"],a=i!=null&&i.hasAttribute("style")?i.getAttribute("style"):null;return a&&t.hasOwnProperty(a)&&(r=t[a]),s.reduce((o,u)=>{const l=Aa(e,n,u)||Aa(i,n,u)||Aa(r,n,u);return l&&(o[u]=l),o},{})}function Aa(i,e,t){return i&&i.hasAttributeNS(e,t)?i.getAttributeNS(e,t):null}function Zi(i){return new Error(`Could not parse ttml timestamp ${i}`)}function nA(i,e){if(!i)return null;let t=jA(i);return t===null&&(qA.test(i)?t=zr(i,e):el.test(i)&&(t=ci(i,e))),t}function zr(i,e){const t=qA.exec(i),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 ci(i,e){const t=el.exec(i),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 js{constructor(e,t){this.timelineController=void 0,this.cueRanges=[],this.trackName=void 0,this.startTime=null,this.endTime=null,this.screen=null,this.timelineController=e,this.trackName=t}dispatchCue(){this.startTime!==null&&(this.timelineController.addCues(this.trackName,this.startTime,this.endTime,this.screen,this.cueRanges),this.startTime=null)}newCue(e,t,n){(this.startTime===null||this.startTime>e)&&(this.startTime=e),this.endTime=t,this.screen=n,this.timelineController.createCaptionsTrack(this.trackName)}reset(){this.cueRanges=[],this.startTime=null}}class Iu{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=rl(),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(f.MEDIA_ATTACHING,this.onMediaAttaching,this),e.on(f.MEDIA_DETACHING,this.onMediaDetaching,this),e.on(f.MANIFEST_LOADING,this.onManifestLoading,this),e.on(f.MANIFEST_LOADED,this.onManifestLoaded,this),e.on(f.SUBTITLE_TRACKS_UPDATED,this.onSubtitleTracksUpdated,this),e.on(f.FRAG_LOADING,this.onFragLoading,this),e.on(f.FRAG_LOADED,this.onFragLoaded,this),e.on(f.FRAG_PARSING_USERDATA,this.onFragParsingUserdata,this),e.on(f.FRAG_DECRYPTED,this.onFragDecrypted,this),e.on(f.INIT_PTS_FOUND,this.onInitPtsFound,this),e.on(f.SUBTITLE_TRACKS_CLEARED,this.onSubtitleTracksCleared,this),e.on(f.BUFFER_FLUSHING,this.onBufferFlushing,this)}destroy(){const{hls:e}=this;e.off(f.MEDIA_ATTACHING,this.onMediaAttaching,this),e.off(f.MEDIA_DETACHING,this.onMediaDetaching,this),e.off(f.MANIFEST_LOADING,this.onManifestLoading,this),e.off(f.MANIFEST_LOADED,this.onManifestLoaded,this),e.off(f.SUBTITLE_TRACKS_UPDATED,this.onSubtitleTracksUpdated,this),e.off(f.FRAG_LOADING,this.onFragLoading,this),e.off(f.FRAG_LOADED,this.onFragLoaded,this),e.off(f.FRAG_PARSING_USERDATA,this.onFragParsingUserdata,this),e.off(f.FRAG_DECRYPTED,this.onFragDecrypted,this),e.off(f.INIT_PTS_FOUND,this.onInitPtsFound,this),e.off(f.SUBTITLE_TRACKS_CLEARED,this.onSubtitleTracksCleared,this),e.off(f.BUFFER_FLUSHING,this.onBufferFlushing,this),this.hls=this.config=this.media=null,this.cea608Parser1=this.cea608Parser2=void 0}initCea608Parsers(){const e=new js(this,"textTrack1"),t=new js(this,"textTrack2"),n=new js(this,"textTrack3"),r=new js(this,"textTrack4");this.cea608Parser1=new zo(1,e,t),this.cea608Parser2=new zo(3,n,r)}addCues(e,t,n,r,s){let a=!1;for(let o=s.length;o--;){const u=s[o],l=oo(u[0],u[1],t,n);if(l>=0&&(u[0]=Math.min(u[0],t),u[1]=Math.max(u[1],n),a=!0,l/(n-t)>.5))return}if(a||s.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(f.CUES_PARSED,{type:"captions",cues:o,track:e})}}onInitPtsFound(e,{frag:t,id:n,initPTS:r,timescale:s}){const{unparsedVttFrags:a}=this;n===ee.MAIN&&(this.initPTS[t.cc]={baseTime:r,timescale:s}),a.length&&(this.unparsedVttFrags=[],a.forEach(o=>{this.initPTS[o.frag.cc]?this.onFragLoaded(f.FRAG_LOADED,o):this.hls.trigger(f.SUBTITLE_FRAG_PROCESSED,{success:!1,frag:o.frag,error:new Error("Subtitle discontinuity domain does not match main")})}))}getExistingTrack(e,t){const{media:n}=this;if(n)for(let r=0;r<n.textTracks.length;r++){const s=n.textTracks[r];if(nl(s,{name:e,lang:t,characteristics:"transcribes-spoken-dialog,describes-music-and-sound"}))return s}return null}createCaptionsTrack(e){this.config.renderTextTracksNatively?this.createNativeTrack(e):this.createNonNativeTrack(e)}createNativeTrack(e){if(this.captionsTracks[e])return;const{captionsProperties:t,captionsTracks:n,media:r}=this,{label:s,languageCode:a}=t[e],o=this.getExistingTrack(s,a);if(o)n[e]=o,Vs(n[e]),ya(n[e],r);else{const u=this.createTextTrack("captions",s,a);u&&(u[e]=!0,n[e]=u)}}createNonNativeTrack(e){if(this.nonNativeCaptionsTracks[e])return;const t=this.captionsProperties[e];if(!t)return;const n=t.label,r={_id:e,label:n,kind:"captions",default:t.media?!!t.media.default:!1,closedCaptions:t.media};this.nonNativeCaptionsTracks[e]=r,this.hls.trigger(f.NON_NATIVE_TEXT_TRACKS_FOUND,{tracks:[r]})}createTextTrack(e,t,n){const r=this.media;if(r)return r.addTextTrack(e,t,n)}onMediaAttaching(e,t){this.media=t.media,t.mediaSource||this._cleanTracks()}onMediaDetaching(e,t){const n=!!t.transferMedia;if(this.media=null,n)return;const{captionsTracks:r}=this;Object.keys(r).forEach(s=>{Vs(r[s]),delete r[s]}),this.nonNativeCaptionsTracks={}}onManifestLoading(){this.lastCc=-1,this.lastSn=-1,this.lastPartIndex=-1,this.prevCC=-1,this.vttCCs=rl(),this._cleanTracks(),this.tracks=[],this.captionsTracks={},this.nonNativeCaptionsTracks={},this.textTracks=[],this.unparsedVttFrags=[],this.initPTS=[],this.cea608Parser1&&this.cea608Parser2&&(this.cea608Parser1.reset(),this.cea608Parser2.reset())}_cleanTracks(){const{media:e}=this;if(!e)return;const t=e.textTracks;if(t)for(let n=0;n<t.length;n++)Vs(t[n])}onSubtitleTracksUpdated(e,t){const n=t.subtitleTracks||[],r=n.some(s=>s.textCodec===tA);if(this.config.enableWebVTT||r&&this.config.enableIMSC1){if(bA(this.tracks,n)){this.tracks=n;return}if(this.textTracks=[],this.tracks=n,this.config.renderTextTracksNatively){const a=this.media,o=a?vs(a.textTracks):null;if(this.tracks.forEach((u,l)=>{let c;if(o){let d=null;for(let g=0;g<o.length;g++)if(o[g]&&nl(o[g],u)){d=o[g],o[g]=null;break}d&&(c=d)}if(c)Vs(c);else{const d=Ca(u);c=this.createTextTrack(d,u.name,u.lang),c&&(c.mode="disabled")}c&&this.textTracks.push(c)}),o!=null&&o.length){const u=o.filter(l=>l!==null).map(l=>l.label);u.length&&this.hls.logger.warn(`Media element contains unused subtitle tracks: ${u.join(", ")}. Replace media element for each source to clear TextTracks and captions menu.`)}}else if(this.tracks.length){const a=this.tracks.map(o=>({label:o.name,kind:o.type.toLowerCase(),default:o.default,subtitleTrack:o}));this.hls.trigger(f.NON_NATIVE_TEXT_TRACKS_FOUND,{tracks:a})}}}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 s=`textTrack${r[1]}`,a=this.captionsProperties[s];a&&(a.label=n.name,n.lang&&(a.languageCode=n.lang),a.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===ee.MAIN){var n,r;const{cea608Parser1:s,cea608Parser2:a,lastSn:o}=this,{cc:u,sn:l}=t.frag,c=(n=(r=t.part)==null?void 0:r.index)!=null?n:-1;s&&a&&(l!==o+1||l===o&&c!==this.lastPartIndex+1||u!==this.lastCc)&&(s.reset(),a.reset()),this.lastCc=u,this.lastSn=l,this.lastPartIndex=c}}onFragLoaded(e,t){const{frag:n,payload:r}=t;if(n.type===ee.SUBTITLE)if(r.byteLength){const s=n.decryptdata,a="stats"in t;if(s==null||!s.encrypted||a){const o=this.tracks[n.level],u=this.vttCCs;u[n.cc]||(u[n.cc]={start:n.start,prevCC:this.prevCC,new:!0},this.prevCC=n.cc),o&&o.textCodec===tA?this._parseIMSC1(n,r):this._parseVTTs(t)}}else this.hls.trigger(f.SUBTITLE_FRAG_PROCESSED,{success:!1,frag:n,error:new Error("Empty subtitle payload")})}_parseIMSC1(e,t){const n=this.hls;ao(t,this.initPTS[e.cc],r=>{this._appendCues(r,e.level),n.trigger(f.SUBTITLE_FRAG_PROCESSED,{success:!0,frag:e})},r=>{n.logger.log(`Failed to parse IMSC1: ${r}`),n.trigger(f.SUBTITLE_FRAG_PROCESSED,{success:!1,frag:e,error:r})})}_parseVTTs(e){var t;const{frag:n,payload:r}=e,{initPTS:s,unparsedVttFrags:a}=this,o=s.length-1;if(!s[n.cc]&&o===-1){a.push(e);return}const u=this.hls,l=(t=n.initSegment)!=null&&t.data?Le(n.initSegment.data,new Uint8Array(r)).buffer:r;Su(l,this.initPTS[n.cc],this.vttCCs,n.cc,n.start,c=>{this._appendCues(c,n.level),u.trigger(f.SUBTITLE_FRAG_PROCESSED,{success:!0,frag:n})},c=>{const d=c.message==="Missing initPTS for VTT MPEGTS";d?a.push(e):this._fallbackToIMSC1(n,r),u.logger.log(`Failed to parse VTT cue: ${c}`),!(d&&o>n.cc)&&u.trigger(f.SUBTITLE_FRAG_PROCESSED,{success:!1,frag:n,error:c})})}_fallbackToIMSC1(e,t){const n=this.tracks[e.level];n.textCodec||ao(t,this.initPTS[e.cc],()=>{n.textCodec=tA,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(s=>Qo(r,s))}else{const r=this.tracks[t];if(!r)return;const s=r.default?"default":"subtitles"+t;n.trigger(f.CUES_PARSED,{type:"subtitles",cues:e,track:s})}}onFragDecrypted(e,t){const{frag:n}=t;n.type===ee.SUBTITLE&&this.onFragLoaded(f.FRAG_LOADED,t)}onSubtitleTracksCleared(){this.tracks=[],this.captionsTracks={}}onFragParsingUserdata(e,t){if(!this.enabled||!this.config.enableCEA708Captions)return;const{frag:n,samples:r}=t;if(!(n.type===ee.MAIN&&this.closedCaptionsForLevel(n)==="NONE"))for(let s=0;s<r.length;s++){const a=r[s].bytes;if(a){this.cea608Parser1||this.initCea608Parsers();const o=this.extractCea608Data(a);this.cea608Parser1.addData(r[s].pts,o[0]),this.cea608Parser2.addData(r[s].pts,o[1])}}}onBufferFlushing(e,{startOffset:t,endOffset:n,endOffsetSubtitles:r,type:s}){const{media:a}=this;if(!(!a||a.currentTime<n)){if(!s||s==="video"){const{captionsTracks:o}=this;Object.keys(o).forEach(u=>Mo(o[u],t,n))}if(this.config.renderTextTracksNatively&&t===0&&r!==void 0){const{textTracks:o}=this;Object.keys(o).forEach(u=>Mo(o[u],t,r))}}}extractCea608Data(e){const t=[[],[]],n=e[0]&31;let r=2;for(let s=0;s<n;s++){const a=e[r++],o=127&e[r++],u=127&e[r++];if(o===0&&u===0)continue;if((4&a)!==0){const c=3&a;(c===0||c===1)&&(t[c].push(o),t[c].push(u))}}return t}}function Ca(i){return i.characteristics&&/transcribes-spoken-dialog/gi.test(i.characteristics)&&/describes-music-and-sound/gi.test(i.characteristics)?"captions":"subtitles"}function nl(i,e){return!!i&&i.kind===Ca(e)&&bo(e,i)}function oo(i,e,t,n){return Math.min(e,n)-Math.max(i,t)}function rl(){return{ccOffset:0,presentationOffset:0,0:{start:0,prevCC:-1,new:!0}}}const Du=/\s/,il={newCue(i,e,t,n){const r=[];let s,a,o,u,l;const c=self.VTTCue||self.TextTrackCue;for(let g=0;g<n.rows.length;g++)if(s=n.rows[g],o=!0,u=0,l="",!s.isEmpty()){var d;for(let O=0;O<s.chars.length;O++)Du.test(s.chars[O].uchar)&&o?u++:(l+=s.chars[O].uchar,o=!1);s.cueStartTime=e,e===t&&(t+=1e-4),u>=16?u--:u++;const w=XA(l.trim()),y=eA(e,t,w);i!=null&&(d=i.cues)!=null&&d.getCueById(y)||(a=new c(e,t,w),a.id=y,a.line=g+1,a.align="left",a.position=10+Math.min(80,Math.floor(u*8/32)*10),r.push(a))}return i&&r.length&&(r.sort((g,w)=>g.line==="auto"||w.line==="auto"?0:g.line>8&&w.line>8?w.line-g.line:g.line-w.line),r.forEach(g=>Qo(i,g))),r}};function Lu(){if(self.fetch&&self.AbortController&&self.ReadableStream&&self.Request)try{return new self.ReadableStream({}),!0}catch(i){}return!1}const sl=/(\d+)-(\d+)\/(\d+)/;class al{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||ll,this.controller=new self.AbortController,this.stats=new v}destroy(){this.loader=this.callbacks=this.context=this.config=this.request=null,this.abortInternal(),this.response=null,this.fetchSetup=this.controller=this.stats=null}abortInternal(){this.controller&&!this.stats.loading.end&&(this.stats.aborted=!0,this.controller.abort())}abort(){var e;this.abortInternal(),(e=this.callbacks)!=null&&e.onAbort&&this.callbacks.onAbort(this.stats,this.context,this.response)}load(e,t,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 s=ol(e,this.controller.signal),a=e.responseType==="arraybuffer",o=a?"byteLength":"length",{maxTimeToFirstByteMs:u,maxLoadTimeMs:l}=t.loadPolicy;this.context=e,this.config=t,this.callbacks=n,this.request=this.fetchSetup(e,s),self.clearTimeout(this.requestTimeout),t.timeout=u&&P(u)?u:l,this.requestTimeout=self.setTimeout(()=>{this.callbacks&&(this.abortInternal(),this.callbacks.onTimeout(r,e,this.response))},t.timeout),(_a(this.request)?this.request.then(self.fetch):self.fetch(this.request)).then(d=>{var g;this.response=this.loader=d;const w=Math.max(self.performance.now(),r.loading.start);if(self.clearTimeout(this.requestTimeout),t.timeout=l,this.requestTimeout=self.setTimeout(()=>{this.callbacks&&(this.abortInternal(),this.callbacks.onTimeout(r,e,this.response))},l-(w-r.loading.start)),!d.ok){const{status:O,statusText:H}=d;throw new Ru(H||"fetch, bad network response",O,d)}r.loading.first=w,r.total=rA(d.headers)||r.total;const y=(g=this.callbacks)==null?void 0:g.onProgress;return y&&P(t.highWaterMark)?this.loadProgressively(d,r,e,t.highWaterMark,y):a?d.arrayBuffer():e.responseType==="json"?d.json():d.text()}).then(d=>{var g,w;const y=this.response;if(!y)throw new Error("loader destroyed");self.clearTimeout(this.requestTimeout),r.loading.end=Math.max(self.performance.now(),r.loading.first);const O=d[o];O&&(r.loaded=r.total=O);const H={url:y.url,data:d,code:y.status},Ae=(g=this.callbacks)==null?void 0:g.onProgress;Ae&&!P(t.highWaterMark)&&Ae(r,e,d,y),(w=this.callbacks)==null||w.onSuccess(H,r,e,y)}).catch(d=>{var g;if(self.clearTimeout(this.requestTimeout),r.aborted)return;const w=d&&d.code||0,y=d?d.message:null;(g=this.callbacks)==null||g.onError({code:w,text:y},e,d?d.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,s){const a=new pi,o=e.body.getReader(),u=()=>o.read().then(l=>{if(l.done)return a.dataLength&&s(t,n,a.flush().buffer,e),Promise.resolve(new ArrayBuffer(0));const c=l.value,d=c.length;return t.loaded+=d,d<r||a.dataLength?(a.push(c),a.dataLength>=r&&s(t,n,a.flush().buffer,e)):s(t,n,c.buffer,e),u()}).catch(()=>Promise.reject());return u()}}function ol(i,e){const t={method:"GET",mode:"cors",credentials:"same-origin",signal:e,headers:new self.Headers(h({},i.headers))};return i.rangeEnd&&t.headers.set("Range","bytes="+i.rangeStart+"-"+String(i.rangeEnd-1)),t}function Al(i){const e=sl.exec(i);if(e)return parseInt(e[2])-parseInt(e[1])+1}function rA(i){const e=i.get("Content-Range");if(e){const n=Al(e);if(P(n))return n}const t=i.get("Content-Length");if(t)return parseInt(t)}function ll(i,e){return new self.Request(i.url,e)}class Ru extends Error{constructor(e,t,n){super(e),this.code=void 0,this.details=void 0,this.code=t,this.details=n}}const ul=/^age:\s*[\d.]+\s*$/im;class cl{constructor(e){this.xhrSetup=void 0,this.requestTimeout=void 0,this.retryTimeout=void 0,this.retryDelay=void 0,this.config=null,this.callbacks=null,this.context=null,this.loader=null,this.stats=void 0,this.xhrSetup=e&&e.xhrSetup||null,this.stats=new v,this.retryDelay=0}destroy(){this.callbacks=null,this.abortInternal(),this.loader=null,this.config=null,this.context=null,this.xhrSetup=null}abortInternal(){const e=this.loader;self.clearTimeout(this.requestTimeout),self.clearTimeout(this.retryTimeout),e&&(e.onreadystatechange=null,e.onprogress=null,e.readyState!==4&&(this.stats.aborted=!0,e.abort()))}abort(){var e;this.abortInternal(),(e=this.callbacks)!=null&&e.onAbort&&this.callbacks.onAbort(this.stats,this.context,this.loader)}load(e,t,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 s=this.xhrSetup;s?Promise.resolve().then(()=>{if(!(this.loader!==n||this.stats.aborted))return s(n,t.url)}).catch(a=>{if(!(this.loader!==n||this.stats.aborted))return n.open("GET",t.url,!0),s(n,t.url)}).then(()=>{this.loader!==n||this.stats.aborted||this.openAndSendXhr(n,t,e)}).catch(a=>{var o;(o=this.callbacks)==null||o.onError({code:n.status,text:a.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:s,maxLoadTimeMs:a}=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=s&&P(s)?s:a,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,s=this.config;if(!n.aborted&&r>=2&&(n.loading.first===0&&(n.loading.first=Math.max(self.performance.now(),n.loading.start),s.timeout!==s.loadPolicy.maxLoadTimeMs&&(self.clearTimeout(this.requestTimeout),s.timeout=s.loadPolicy.maxLoadTimeMs,this.requestTimeout=self.setTimeout(this.loadtimeout.bind(this),s.loadPolicy.maxLoadTimeMs-(n.loading.first-n.loading.start)))),r===4)){self.clearTimeout(this.requestTimeout),t.onreadystatechange=null,t.onprogress=null;const l=t.status,c=t.responseType==="text"?t.responseText:null;if(l>=200&&l<300){const y=c!=null?c:t.response;if(y!=null){var a,o;n.loading.end=Math.max(self.performance.now(),n.loading.first);const O=t.responseType==="arraybuffer"?y.byteLength:y.length;n.loaded=n.total=O,n.bwEstimate=n.total*8e3/(n.loading.end-n.loading.first);const H=(a=this.callbacks)==null?void 0:a.onProgress;H&&H(n,e,y,t);const Ae={url:t.responseURL,data:y,code:l};(o=this.callbacks)==null||o.onSuccess(Ae,n,e,t);return}}const d=s.loadPolicy.errorRetry,g=n.retry,w={url:e.url,data:void 0,code:l};if(Ht(d,g,!1,w))this.retry(d);else{var u;j.error(`${l} while loading ${e.url}`),(u=this.callbacks)==null||u.onError({code:l,text:t.statusText},e,t,n)}}}loadtimeout(){if(!this.config)return;const e=this.config.loadPolicy.timeoutRetry,t=this.stats.retry;if(Ht(e,t,!0))this.retry(e);else{var n;j.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=gt(e,n.retry),n.retry++,j.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&&ul.test(this.loader.getAllResponseHeaders())){const t=this.loader.getResponseHeader("age");e=t?parseFloat(t):null}return e}getResponseHeader(e){return this.loader&&new RegExp(`^${e}:\\s*[\\d.]+\\s*$`,"im").test(this.loader.getAllResponseHeaders())?this.loader.getResponseHeader(e):null}}const Uu={maxTimeToFirstByteMs:8e3,maxLoadTimeMs:2e4,timeoutRetry:null,errorRetry:null},ku=_(_({autoStartLoad:!0,startPosition:-1,defaultAudioCodec:void 0,debug:!1,capLevelOnFPSDrop:!1,capLevelToPlayerSize:!1,ignoreDevicePixelRatio:!1,maxDevicePixelRatio:Number.POSITIVE_INFINITY,preferManagedMediaSource:!0,initialLiveManifestSize:1,maxBufferLength:30,backBufferLength:1/0,frontBufferFlushThreshold:1/0,startOnSegmentBoundary:!1,maxBufferSize:60*1e3*1e3,maxFragLookUpTolerance:.25,maxBufferHole:.1,detectStallWithCurrentTimeMs:1250,highBufferWatchdogPeriod:2,nudgeOffset:.1,nudgeMaxRetry:3,nudgeOnVideoHole:!0,liveSyncMode:"edge",liveSyncDurationCount:3,liveSyncOnStallIncrease:1,liveMaxLatencyDurationCount:1/0,liveSyncDuration:void 0,liveMaxLatencyDuration:void 0,maxLiveSyncPlaybackRate:1,liveDurationInfinity:!1,liveBackBufferLength:null,maxMaxBufferLength:600,enableWorker:!0,workerPath:null,enableSoftwareAES:!0,startLevel:void 0,startFragPrefetch:!1,fpsDroppedMonitoringPeriod:5e3,fpsDroppedMonitoringThreshold:.2,appendErrorMaxRetry:3,ignorePlaylistParsingErrors:!1,loader:cl,fLoader:void 0,pLoader:void 0,xhrSetup:void 0,licenseXhrSetup:void 0,licenseResponseCallback:void 0,abrController:Dn,bufferController:Wl,capLevelController:xo,errorController:oe,fpsController:pu,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:br,requireKeySystemAccessOnStart:!1,testBandwidth:!0,progressive:!1,lowLatencyMode:!0,cmcd:void 0,enableDateRangeMetadataCues:!0,enableEmsgMetadataCues:!0,enableEmsgKLVMetadata:!1,enableID3MetadataCues:!0,enableInterstitialPlayback:!0,interstitialAppendInPlace:!0,interstitialLiveLookAhead:10,useMediaCapabilities:!0,preserveManualLevelOnError:!1,certLoadPolicy:{default:Uu},keyLoadPolicy:{default:{maxTimeToFirstByteMs:8e3,maxLoadTimeMs:2e4,timeoutRetry:{maxNumRetry:1,retryDelayMs:1e3,maxRetryDelayMs:2e4,backoff:"linear"},errorRetry:{maxNumRetry:8,retryDelayMs:1e3,maxRetryDelayMs:2e4,backoff:"linear"}}},manifestLoadPolicy:{default:{maxTimeToFirstByteMs:1/0,maxLoadTimeMs:2e4,timeoutRetry:{maxNumRetry:2,retryDelayMs:0,maxRetryDelayMs:0},errorRetry:{maxNumRetry:1,retryDelayMs:1e3,maxRetryDelayMs:8e3}}},playlistLoadPolicy:{default:{maxTimeToFirstByteMs:1e4,maxLoadTimeMs:2e4,timeoutRetry:{maxNumRetry:2,retryDelayMs:0,maxRetryDelayMs:0},errorRetry:{maxNumRetry:2,retryDelayMs:1e3,maxRetryDelayMs:8e3}}},fragLoadPolicy:{default:{maxTimeToFirstByteMs:1e4,maxLoadTimeMs:12e4,timeoutRetry:{maxNumRetry:4,retryDelayMs:0,maxRetryDelayMs:0},errorRetry:{maxNumRetry:6,retryDelayMs:1e3,maxRetryDelayMs:8e3}}},steeringManifestLoadPolicy:{default:{maxTimeToFirstByteMs:1e4,maxLoadTimeMs:2e4,timeoutRetry:{maxNumRetry:2,retryDelayMs:0,maxRetryDelayMs:0},errorRetry:{maxNumRetry:1,retryDelayMs:1e3,maxRetryDelayMs:8e3}}},interstitialAssetListLoadPolicy:{default:{maxTimeToFirstByteMs:1e4,maxLoadTimeMs:3e4,timeoutRetry:{maxNumRetry:0,retryDelayMs:0,maxRetryDelayMs:0},errorRetry:{maxNumRetry:0,retryDelayMs:1e3,maxRetryDelayMs:8e3}}},manifestLoadingTimeOut:1e4,manifestLoadingMaxRetry:1,manifestLoadingRetryDelay:1e3,manifestLoadingMaxRetryTimeout:64e3,levelLoadingTimeOut:1e4,levelLoadingMaxRetry:4,levelLoadingRetryDelay:1e3,levelLoadingMaxRetryTimeout:64e3,fragLoadingTimeOut:2e4,fragLoadingMaxRetry:6,fragLoadingRetryDelay:1e3,fragLoadingMaxRetryTimeout:64e3},Ao()),{},{subtitleStreamController:WA,subtitleTrackController:No,timelineController:Iu,audioStreamController:Gl,audioTrackController:Vl,emeController:Gs,cmcdController:gu,contentSteeringController:qa,interstitialsController:_u});function Ao(){return{cueHandler:il,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 ts(i,e,t){if((e.liveSyncDurationCount||e.liveMaxLatencyDurationCount)&&(e.liveSyncDuration||e.liveMaxLatencyDuration))throw new Error("Illegal hls.js config: don't mix up liveSyncDurationCount/liveMaxLatencyDurationCount and liveSyncDuration/liveMaxLatencyDuration");if(e.liveMaxLatencyDurationCount!==void 0&&(e.liveSyncDurationCount===void 0||e.liveMaxLatencyDurationCount<=e.liveSyncDurationCount))throw new Error('Illegal hls.js config: "liveMaxLatencyDurationCount" must be greater than "liveSyncDurationCount"');if(e.liveMaxLatencyDuration!==void 0&&(e.liveSyncDuration===void 0||e.liveMaxLatencyDuration<=e.liveSyncDuration))throw new Error('Illegal hls.js config: "liveMaxLatencyDuration" must be greater than "liveSyncDuration"');const n=lo(i),r=["manifest","level","frag"],s=["TimeOut","MaxRetry","RetryDelay","MaxRetryTimeout"];return r.forEach(a=>{const o=`${a==="level"?"playlist":a}LoadPolicy`,u=e[o]===void 0,l=[];s.forEach(c=>{const d=`${a}Loading${c}`,g=e[d];if(g!==void 0&&u){l.push(d);const w=n[o].default;switch(e[o]={default:w},c){case"TimeOut":w.maxLoadTimeMs=g,w.maxTimeToFirstByteMs=g;break;case"MaxRetry":w.errorRetry.maxNumRetry=g,w.timeoutRetry.maxNumRetry=g;break;case"RetryDelay":w.errorRetry.retryDelayMs=g,w.timeoutRetry.retryDelayMs=g;break;case"MaxRetryTimeout":w.errorRetry.maxRetryDelayMs=g,w.timeoutRetry.maxRetryDelayMs=g;break}}}),l.length&&t.warn(`hls.js config: "${l.join('", "')}" setting(s) are deprecated, use "${o}": ${Ot(e[o])}`)}),_(_({},n),e)}function lo(i){return i&&typeof i=="object"?Array.isArray(i)?i.map(lo):Object.keys(i).reduce((e,t)=>(e[t]=lo(i[t]),e),{}):i}function uo(i,e){const t=i.loader;t!==al&&t!==cl?(e.log("[config]: Custom loader detected, cannot enable progressive streaming"),i.progressive=!1):Lu()&&(i.loader=al,i.progressive=!0,i.enableSoftwareAES=!0,e.log("[config]: Progressive streaming enabled, using FetchLoader"))}const co=2,Ou=.1,iA=.05,la=100;class fo extends dn{constructor(e,t){super("gap-controller",e.logger),this.hls=null,this.fragmentTracker=null,this.media=null,this.mediaSource=void 0,this.nudgeRetry=0,this.stallReported=!1,this.stalled=null,this.moved=!1,this.seeking=!1,this.buffered={},this.lastCurrentTime=0,this.ended=0,this.waiting=0,this.onMediaPlaying=()=>{this.ended=0,this.waiting=0},this.onMediaWaiting=()=>{var n;(n=this.media)!=null&&n.seeking||(this.waiting=self.performance.now(),this.tick())},this.onMediaEnded=()=>{if(this.hls){var n;this.ended=((n=this.media)==null?void 0:n.currentTime)||1,this.hls.trigger(f.MEDIA_ENDED,{stalled:!1})}},this.hls=e,this.fragmentTracker=t,this.registerListeners()}registerListeners(){const{hls:e}=this;e&&(e.on(f.MEDIA_ATTACHED,this.onMediaAttached,this),e.on(f.MEDIA_DETACHING,this.onMediaDetaching,this),e.on(f.BUFFER_APPENDED,this.onBufferAppended,this))}unregisterListeners(){const{hls:e}=this;e&&(e.off(f.MEDIA_ATTACHED,this.onMediaAttached,this),e.off(f.MEDIA_DETACHING,this.onMediaDetaching,this),e.off(f.BUFFER_APPENDED,this.onBufferAppended,this))}destroy(){super.destroy(),this.unregisterListeners(),this.media=this.hls=this.fragmentTracker=null,this.mediaSource=void 0}onMediaAttached(e,t){this.setInterval(la),this.mediaSource=t.mediaSource;const n=this.media=t.media;Oi(n,"playing",this.onMediaPlaying),Oi(n,"waiting",this.onMediaWaiting),Oi(n,"ended",this.onMediaEnded)}onMediaDetaching(e,t){this.clearInterval();const{media:n}=this;n&&(qi(n,"playing",this.onMediaPlaying),qi(n,"waiting",this.onMediaWaiting),qi(n,"ended",this.onMediaEnded),this.media=null),this.mediaSource=void 0}onBufferAppended(e,t){this.buffered=t.timeRanges}get hasBuffered(){return Object.keys(this.buffered).length>0}tick(){var e;if(!((e=this.media)!=null&&e.readyState)||!this.hasBuffered)return;const t=this.media.currentTime;this.poll(t,this.lastCurrentTime),this.lastCurrentTime=t}poll(e,t){var n,r;const s=(n=this.hls)==null?void 0:n.config;if(!s)return;const a=this.media;if(!a)return;const{seeking:o}=a,u=this.seeking&&!o,l=!this.seeking&&o,c=a.paused&&!o||a.ended||a.playbackRate===0;if(this.seeking=o,e!==t){t&&(this.ended=0),this.moved=!0,o||(this.nudgeRetry=0,s.nudgeOnVideoHole&&!c&&e>t&&this.nudgeOnVideoHole(e,t)),this.waiting===0&&this.stallResolved(e);return}if(l||u){u&&this.stallResolved(e);return}if(c){this.nudgeRetry=0,this.stallResolved(e),!this.ended&&a.ended&&this.hls&&(this.ended=e||1,this.hls.trigger(f.MEDIA_ENDED,{stalled:!1}));return}if(!ln.getBuffered(a).length){this.nudgeRetry=0;return}const d=ln.bufferInfo(a,e,0),g=d.nextStart||0,w=this.fragmentTracker;if(o&&w&&this.hls){const pt=fl(this.hls.inFlightFragments,e),At=d.len>co,wt=!g||pt||g-e>co&&!w.getPartialFragment(e);if(At||wt)return;this.moved=!1}const y=(r=this.hls)==null?void 0:r.latestLevelDetails;if(!this.moved&&this.stalled!==null&&w){if(!(d.len>0)&&!g)return;const At=Math.max(g,d.start||0)-e,_t=!!(y!=null&&y.live)?y.targetduration*2:co,ct=w.getPartialFragment(e);if(At>0&&(At<=_t||ct)){a.paused||this._trySkipBufferHole(ct);return}}const O=s.detectStallWithCurrentTimeMs,H=self.performance.now(),Ae=this.waiting;let Ee=this.stalled;if(Ee===null)if(Ae>0&&H-Ae<O)Ee=this.stalled=Ae;else{this.stalled=H;return}const we=H-Ee;if(!o&&(we>=O||Ae)&&this.hls){var Ze;if(((Ze=this.mediaSource)==null?void 0:Ze.readyState)==="ended"&&!(y!=null&&y.live)&&Math.abs(e-((y==null?void 0:y.edge)||0))<1){if(this.ended)return;this.ended=e||1,this.hls.trigger(f.MEDIA_ENDED,{stalled:!0});return}if(this._reportStall(d),!this.media||!this.hls)return}const rt=ln.bufferInfo(a,e,s.maxBufferHole);this._tryFixBufferStall(rt,we,e)}stallResolved(e){const t=this.stalled;if(t&&this.hls&&(this.stalled=null,this.stallReported)){const n=self.performance.now()-t;this.log(`playback not stuck anymore @${e}, after ${Math.round(n)}ms`),this.stallReported=!1,this.waiting=0,this.hls.trigger(f.STALL_RESOLVED,{})}}nudgeOnVideoHole(e,t){var n;const r=this.buffered.video;if(this.hls&&this.media&&this.fragmentTracker&&(n=this.buffered.audio)!=null&&n.length&&r&&r.length>1&&e>r.end(0)){const s=ln.bufferedInfo(ln.timeRangesToArray(this.buffered.audio),e,0);if(s.len>1&&t>=s.start){const a=ln.timeRangesToArray(r),o=ln.bufferedInfo(a,t,0).bufferedIndex;if(o>-1&&o<a.length-1){const u=ln.bufferedInfo(a,e,0).bufferedIndex,l=a[o].end,c=a[o+1].start;if((u===-1||u>o)&&c-l<1&&e-l<2){const d=new Error(`nudging playhead to flush pipeline after video hole. currentTime: ${e} hole: ${l} -> ${c} buffered index: ${u}`);this.warn(d.message),this.media.currentTime+=1e-6;const g=this.fragmentTracker.getPartialFragment(e)||void 0,w=ln.bufferInfo(this.media,e,0);this.hls.trigger(f.ERROR,{type:se.MEDIA_ERROR,details:U.BUFFER_SEEK_OVER_HOLE,fatal:!1,error:d,reason:d.message,frag:g,buffer:w.len,bufferInfo:w})}}}}}_tryFixBufferStall(e,t,n){var r,s;const{fragmentTracker:a,media:o}=this,u=(r=this.hls)==null?void 0:r.config;if(!o||!a||!u)return;const l=(s=this.hls)==null?void 0:s.latestLevelDetails,c=a.getPartialFragment(n);if((c||l!=null&&l.live&&n<l.fragmentStart)&&(this._trySkipBufferHole(c)||!this.media))return;const d=e.buffered,g=this.adjacentTraversal(e,n);(d&&d.length>1&&e.len>u.maxBufferHole||e.nextStart&&(e.nextStart-n<u.maxBufferHole||g))&&(t>u.highBufferWatchdogPeriod*1e3||this.waiting)&&(this.warn("Trying to nudge playhead over buffer-hole"),this._tryNudgeBuffer(e))}adjacentTraversal(e,t){const n=this.fragmentTracker,r=e.nextStart;if(n&&r){const s=n.getFragAtPos(t,ee.MAIN),a=n.getFragAtPos(r,ee.MAIN);if(s&&a)return a.sn-s.sn<2}return!1}_reportStall(e){const{hls:t,media:n,stallReported:r,stalled:s}=this;if(!r&&s!==null&&n&&t){this.stallReported=!0;const a=new Error(`Playback stalling at @${n.currentTime} due to low buffer (${Ot(e)})`);this.warn(a.message),t.trigger(f.ERROR,{type:se.MEDIA_ERROR,details:U.BUFFER_STALLED_ERROR,fatal:!1,error:a,buffer:e.len,bufferInfo:e,stalled:{start:s}})}}_trySkipBufferHole(e){var t;const{fragmentTracker:n,media:r}=this,s=(t=this.hls)==null?void 0:t.config;if(!r||!n||!s)return 0;const a=r.currentTime,o=ln.bufferInfo(r,a,0),u=a<o.start?o.start:o.nextStart;if(u&&this.hls){const c=o.len<=s.maxBufferHole,d=o.len>0&&o.len<1&&r.readyState<3,g=u-a;if(g>0&&(c||d)){if(g>s.maxBufferHole){let y=!1;if(a===0){const O=n.getAppendedFrag(0,ee.MAIN);O&&u<O.end&&(y=!0)}if(!y){const O=e||n.getAppendedFrag(a,ee.MAIN);if(O){var l;if(!((l=this.hls.loadLevelObj)!=null&&l.details)||fl(this.hls.inFlightFragments,u))return 0;let Ae=!1,Ee=O.end;for(;Ee<u;){const we=n.getAppendedFrag(Ee,ee.MAIN)||n.getPartialFragment(Ee);if(we)Ee+=we.duration;else{Ae=!0;break}}if(Ae)return 0}}}const w=Math.max(u+iA,a+Ou);if(this.warn(`skipping hole, adjusting currentTime from ${a} to ${w}`),this.moved=!0,r.currentTime=w,!(e!=null&&e.gap)){const y=new Error(`fragment loaded with buffer holes, seeking from ${a} to ${w}`);this.hls.trigger(f.ERROR,{type:se.MEDIA_ERROR,details:U.BUFFER_SEEK_OVER_HOLE,fatal:!1,error:y,reason:y.message,frag:e||void 0,buffer:o.len,bufferInfo:o})}return w}}return 0}_tryNudgeBuffer(e){const{hls:t,media:n,nudgeRetry:r}=this,s=t==null?void 0:t.config;if(!n||!s)return 0;const a=n.currentTime;if(this.nudgeRetry++,r<s.nudgeMaxRetry){const o=a+(r+1)*s.nudgeOffset,u=new Error(`Nudging 'currentTime' from ${a} to ${o}`);this.warn(u.message),n.currentTime=o,t.trigger(f.ERROR,{type:se.MEDIA_ERROR,details:U.BUFFER_NUDGE_ON_STALL,error:u,fatal:!1,buffer:e.len,bufferInfo:e})}else{const o=new Error(`Playhead still not moving while enough data buffered @${a} after ${s.nudgeMaxRetry} nudges`);this.error(o.message),t.trigger(f.ERROR,{type:se.MEDIA_ERROR,details:U.BUFFER_STALLED_ERROR,error:o,fatal:!0,buffer:e.len,bufferInfo:e})}}}function fl(i,e){const t=Ys(i.main);if(t&&t.start<=e)return t;const n=Ys(i.audio);return n&&n.start<=e?n:null}function Ys(i){if(!i)return null;switch(i.state){case jt.IDLE:case jt.STOPPED:case jt.ENDED:case jt.ERROR:return null}return i.frag}const Pu=.25;function sA(){if(typeof self!="undefined")return self.VTTCue||self.TextTrackCue}function aA(i,e,t,n,r){let s=new i(e,t,"");try{s.value=n,r&&(s.type=r)}catch(a){s=new i(e,t,Ot(r?_({type:r},n):n))}return s}const ho=(()=>{const i=sA();try{i&&new i(0,Number.POSITIVE_INFINITY,"")}catch(e){return Number.MAX_VALUE}return Number.POSITIVE_INFINITY})();class dl{constructor(e){this.hls=void 0,this.id3Track=null,this.media=null,this.dateRangeCuesAppended={},this.removeCues=!0,this.onEventCueEnter=()=>{this.hls&&this.hls.trigger(f.EVENT_CUE_ENTER,{})},this.hls=e,this._registerListeners()}destroy(){this._unregisterListeners(),this.id3Track=null,this.media=null,this.dateRangeCuesAppended={},this.hls=this.onEventCueEnter=null}_registerListeners(){const{hls:e}=this;e.on(f.MEDIA_ATTACHING,this.onMediaAttaching,this),e.on(f.MEDIA_ATTACHED,this.onMediaAttached,this),e.on(f.MEDIA_DETACHING,this.onMediaDetaching,this),e.on(f.MANIFEST_LOADING,this.onManifestLoading,this),e.on(f.FRAG_PARSING_METADATA,this.onFragParsingMetadata,this),e.on(f.BUFFER_FLUSHING,this.onBufferFlushing,this),e.on(f.LEVEL_UPDATED,this.onLevelUpdated,this),e.on(f.LEVEL_PTS_UPDATED,this.onLevelPtsUpdated,this)}_unregisterListeners(){const{hls:e}=this;e.off(f.MEDIA_ATTACHING,this.onMediaAttaching,this),e.off(f.MEDIA_ATTACHED,this.onMediaAttached,this),e.off(f.MEDIA_DETACHING,this.onMediaDetaching,this),e.off(f.MANIFEST_LOADING,this.onManifestLoading,this),e.off(f.FRAG_PARSING_METADATA,this.onFragParsingMetadata,this),e.off(f.BUFFER_FLUSHING,this.onBufferFlushing,this),e.off(f.LEVEL_UPDATED,this.onLevelUpdated,this),e.off(f.LEVEL_PTS_UPDATED,this.onLevelPtsUpdated,this)}onMediaAttaching(e,t){var n;this.media=t.media,((n=t.overrides)==null?void 0:n.cueRemoval)===!1&&(this.removeCues=!1)}onMediaAttached(){const e=this.hls.latestLevelDetails;e&&this.updateDateRangeCues(e)}onMediaDetaching(e,t){this.media=null,!t.transferMedia&&(this.id3Track&&(this.removeCues&&Vs(this.id3Track,this.onEventCueEnter),this.id3Track=null),this.dateRangeCuesAppended={})}onManifestLoading(){this.dateRangeCuesAppended={}}createTrack(e){const t=this.getID3Track(e.textTracks);return t.mode="hidden",t}getID3Track(e){if(this.media){for(let t=0;t<e.length;t++){const n=e[t];if(n.kind==="metadata"&&n.label==="id3")return ya(n,this.media),n}return this.media.addTextTrack("metadata","id3")}}onFragParsingMetadata(e,t){if(!this.media)return;const{hls:{config:{enableEmsgMetadataCues:n,enableID3MetadataCues:r}}}=this;if(!n&&!r)return;const{samples:s}=t;this.id3Track||(this.id3Track=this.createTrack(this.media));const a=sA();if(a)for(let o=0;o<s.length;o++){const u=s[o].type;if(u===Vi.emsg&&!n||!r)continue;const l=uA(s[o].data);if(l){const c=s[o].pts;let d=c+s[o].duration;d>ho&&(d=ho),d-c<=0&&(d=c+Pu);for(let w=0;w<l.length;w++){const y=l[w];if(!cA(y)){this.updateId3CueEnds(c,u);const O=aA(a,c,d,y,u);O&&this.id3Track.addCue(O)}}}}}updateId3CueEnds(e,t){var n;const r=(n=this.id3Track)==null?void 0:n.cues;if(r)for(let s=r.length;s--;){const a=r[s];a.type===t&&a.startTime<e&&a.endTime===ho&&(a.endTime=e)}}onBufferFlushing(e,{startOffset:t,endOffset:n,type:r}){const{id3Track:s,hls:a}=this;if(!a)return;const{config:{enableEmsgMetadataCues:o,enableID3MetadataCues:u}}=a;if(s&&(o||u)){let l;r==="audio"?l=c=>c.type===Vi.audioId3&&u:r==="video"?l=c=>c.type===Vi.emsg&&o:l=c=>c.type===Vi.audioId3&&u||c.type===Vi.emsg&&o,Mo(s,t,n,l)}}onLevelUpdated(e,{details:t}){this.updateDateRangeCues(t,!0)}onLevelPtsUpdated(e,t){Math.abs(t.drift)>.01&&this.updateDateRangeCues(t.details)}updateDateRangeCues(e,t){if(!this.media||!e.hasProgramDateTime||!this.hls.config.enableDateRangeMetadataCues)return;const{id3Track:n}=this,{dateRanges:r}=e,s=Object.keys(r);let a=this.dateRangeCuesAppended;if(n&&t){var o;if((o=n.cues)!=null&&o.length){const c=Object.keys(a).filter(d=>!s.includes(d));for(let d=c.length;d--;){const g=c[d],w=a[g].cues;delete a[g],Object.keys(w).forEach(y=>{try{const O=w[y];O.removeEventListener("enter",this.onEventCueEnter),n.removeCue(O)}catch(O){}})}}else a=this.dateRangeCuesAppended={}}const u=e.fragments[e.fragments.length-1];if(s.length===0||!P(u==null?void 0:u.programDateTime))return;this.id3Track||(this.id3Track=this.createTrack(this.media));const l=sA();for(let c=0;c<s.length;c++){const d=s[c],g=r[d],w=g.startTime,y=a[d],O=(y==null?void 0:y.cues)||{};let H=(y==null?void 0:y.durationKnown)||!1,Ae=ho;const{duration:Ee,endDate:we}=g;if(we&&Ee!==null)Ae=w+Ee,H=!0;else if(g.endOnNext&&!H){const rt=s.reduce((pt,At)=>{if(At!==g.id){const wt=r[At];if(wt.class===g.class&&wt.startDate>g.startDate&&(!pt||g.startDate<pt.startDate))return wt}return pt},null);rt&&(Ae=rt.startTime,H=!0)}const Ze=Object.keys(g.attr);for(let rt=0;rt<Ze.length;rt++){const pt=Ze[rt];if(!fr(pt))continue;const At=O[pt];if(At)H&&!y.durationKnown?At.endTime=Ae:Math.abs(At.startTime-w)>.01&&(At.startTime=w,At.endTime=Ae);else if(l){let wt=g.attr[pt];hr(pt)&&(wt=M(wt));const ct=aA(l,w,Ae,{key:pt,data:wt},Vi.dateRange);ct&&(ct.id=d,this.id3Track.addCue(ct),O[pt]=ct,this.hls.config.interstitialsController&&(pt==="X-ASSET-LIST"||pt==="X-ASSET-URL")&&ct.addEventListener("enter",this.onEventCueEnter))}}a[d]={cues:O,dateRange:g,durationKnown:H}}}}class Qu{constructor(e){this.hls=void 0,this.config=void 0,this.media=null,this.currentTime=0,this.stallCount=0,this._latency=null,this._targetLatencyUpdated=!1,this.onTimeupdate=()=>{const{media:t}=this,n=this.levelDetails;if(!t||!n)return;this.currentTime=t.currentTime;const r=this.computeLatency();if(r===null)return;this._latency=r;const{lowLatencyMode:s,maxLiveSyncPlaybackRate:a}=this.config;if(!s||a===1||!n.live)return;const o=this.targetLatency;if(o===null)return;const u=r-o,l=Math.min(this.maxLatency,o+n.targetduration);if(u<l&&u>.05&&this.forwardBufferLength>1){const d=Math.min(2,Math.max(1,a)),g=Math.round(2/(1+Math.exp(-.75*u-this.edgeStalled))*20)/20,w=Math.min(d,Math.max(1,g));this.changeMediaPlaybackRate(t,w)}else t.playbackRate!==1&&t.playbackRate!==0&&this.changeMediaPlaybackRate(t,1)},this.hls=e,this.config=e.config,this.registerListeners()}get levelDetails(){var e;return((e=this.hls)==null?void 0:e.latestLevelDetails)||null}get latency(){return this._latency||0}get maxLatency(){const{config:e}=this;if(e.liveMaxLatencyDuration!==void 0)return e.liveMaxLatencyDuration;const t=this.levelDetails;return t?e.liveMaxLatencyDurationCount*t.targetduration:0}get targetLatency(){const e=this.levelDetails;if(e===null||this.hls===null)return null;const{holdBack:t,partHoldBack:n,targetduration:r}=e,{liveSyncDuration:s,liveSyncDurationCount:a,lowLatencyMode:o}=this.config,u=this.hls.userConfig;let l=o&&n||t;(this._targetLatencyUpdated||u.liveSyncDuration||u.liveSyncDurationCount||l===0)&&(l=s!==void 0?s:a*r);const c=r;return l+Math.min(this.stallCount*this.config.liveSyncOnStallIncrease,c)}set targetLatency(e){this.stallCount=0,this.config.liveSyncDuration=e,this._targetLatencyUpdated=!0}get liveSyncPosition(){const e=this.estimateLiveEdge(),t=this.targetLatency;if(e===null||t===null)return null;const n=this.levelDetails;if(n===null)return null;const r=n.edge,s=e-t-this.edgeStalled,a=r-n.totalduration,o=r-(this.config.lowLatencyMode&&n.partTarget||n.targetduration);return Math.min(Math.max(a,s),o)}get drift(){const e=this.levelDetails;return e===null?1:e.drift}get edgeStalled(){const e=this.levelDetails;if(e===null)return 0;const t=(this.config.lowLatencyMode&&e.partTarget||e.targetduration)*3;return Math.max(e.age-t,0)}get forwardBufferLength(){const{media:e}=this,t=this.levelDetails;if(!e||!t)return 0;const n=e.buffered.length;return(n?e.buffered.end(n-1):t.edge)-this.currentTime}destroy(){this.unregisterListeners(),this.onMediaDetaching(),this.hls=null}registerListeners(){const{hls:e}=this;e&&(e.on(f.MEDIA_ATTACHED,this.onMediaAttached,this),e.on(f.MEDIA_DETACHING,this.onMediaDetaching,this),e.on(f.MANIFEST_LOADING,this.onManifestLoading,this),e.on(f.LEVEL_UPDATED,this.onLevelUpdated,this),e.on(f.ERROR,this.onError,this))}unregisterListeners(){const{hls:e}=this;e&&(e.off(f.MEDIA_ATTACHED,this.onMediaAttached,this),e.off(f.MEDIA_DETACHING,this.onMediaDetaching,this),e.off(f.MANIFEST_LOADING,this.onManifestLoading,this),e.off(f.LEVEL_UPDATED,this.onLevelUpdated,this),e.off(f.ERROR,this.onError,this))}onMediaAttached(e,t){this.media=t.media,this.media.addEventListener("timeupdate",this.onTimeupdate)}onMediaDetaching(){this.media&&(this.media.removeEventListener("timeupdate",this.onTimeupdate),this.media=null)}onManifestLoading(){this._latency=null,this.stallCount=0}onLevelUpdated(e,{details:t}){t.advanced&&this.onTimeupdate(),!t.live&&this.media&&this.media.removeEventListener("timeupdate",this.onTimeupdate)}onError(e,t){var n;t.details===U.BUFFER_STALLED_ERROR&&(this.stallCount++,this.hls&&(n=this.levelDetails)!=null&&n.live&&this.hls.logger.warn("[latency-controller]: Stall detected, adjusting target latency"))}changeMediaPlaybackRate(e,t){var n,r;e.playbackRate!==t&&((n=this.hls)==null||n.logger.debug(`[latency-controller]: latency=${this.latency.toFixed(3)}, targetLatency=${(r=this.targetLatency)==null?void 0:r.toFixed(3)}, forwardBufferLength=${this.forwardBufferLength.toFixed(3)}: adjusting playback rate from ${e.playbackRate} to ${t}`),e.playbackRate=t)}estimateLiveEdge(){const e=this.levelDetails;return e===null?null:e.edge+e.age}computeLatency(){const e=this.estimateLiveEdge();return e===null?null:e-this.currentTime}}class Mu extends Za{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(f.MANIFEST_LOADING,this.onManifestLoading,this),e.on(f.MANIFEST_LOADED,this.onManifestLoaded,this),e.on(f.LEVEL_LOADED,this.onLevelLoaded,this),e.on(f.LEVELS_UPDATED,this.onLevelsUpdated,this),e.on(f.FRAG_BUFFERED,this.onFragBuffered,this),e.on(f.ERROR,this.onError,this)}_unregisterListeners(){const{hls:e}=this;e.off(f.MANIFEST_LOADING,this.onManifestLoading,this),e.off(f.MANIFEST_LOADED,this.onManifestLoaded,this),e.off(f.LEVEL_LOADED,this.onLevelLoaded,this),e.off(f.LEVELS_UPDATED,this.onLevelsUpdated,this),e.off(f.FRAG_BUFFERED,this.onFragBuffered,this),e.off(f.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=[],s={},a={};let o=!1,u=!1,l=!1;t.levels.forEach(c=>{const d=c.attrs;let{audioCodec:g,videoCodec:w}=c;g&&(c.audioCodec=g=me(g,n)||void 0),w&&(w=c.videoCodec=Wt(w));const{width:y,height:O,unknownCodecs:H}=c;let Ae=H?H.length:0;if(H)for(let ct=Ae;ct--;){const fn=H[ct];this.isAudioSupported(fn)?(c.audioCodec=g=g?`${g},${fn}`:fn,Ae--,Ct.audio[g.substring(0,4)]=2):this.isVideoSupported(fn)&&(c.videoCodec=w=w?`${w},${fn}`:fn,Ae--,Ct.video[w.substring(0,4)]=2)}if(o||(o=!!(y&&O)),u||(u=!!w),l||(l=!!g),Ae||g&&!this.isAudioSupported(g)||w&&!this.isVideoSupported(w)){this.log(`Some or all CODECS not supported "${d.CODECS}"`);return}const{CODECS:Ee,"FRAME-RATE":we,"HDCP-LEVEL":Ze,"PATHWAY-ID":rt,RESOLUTION:pt,"VIDEO-RANGE":At}=d,_t=`${`${rt||"."}-`}${c.bitrate}-${pt}-${we}-${Ee}-${At}-${Ze}`;if(s[_t])if(s[_t].uri!==c.url&&!c.attrs["PATHWAY-ID"]){const ct=a[_t]+=1;c.attrs["PATHWAY-ID"]=new Array(ct+1).join(".");const fn=this.createLevel(c);s[_t]=fn,r.push(fn)}else s[_t].addGroupId("audio",d.AUDIO),s[_t].addGroupId("text",d.SUBTITLES);else{const ct=this.createLevel(c);s[_t]=ct,a[_t]=1,r.push(ct)}}),this.filterAndSortMediaOptions(r,t,o,u,l)}createLevel(e){const t=new qt(e),n=e.supplemental;if(n!=null&&n.videoCodec&&!this.isVideoSupported(n.videoCodec)){const r=new Error(`SUPPLEMENTAL-CODECS not supported "${n.videoCodec}"`);this.log(r.message),t.supportedResult=On(r,[])}return t}isAudioSupported(e){return Ln(e,"audio",this.hls.config.preferManagedMediaSource)}isVideoSupported(e){return Ln(e,"video",this.hls.config.preferManagedMediaSource)}filterAndSortMediaOptions(e,t,n,r,s){let a=[],o=[],u=e;if((n||r)&&s&&(u=u.filter(({videoCodec:H,videoRange:Ae,width:Ee,height:we})=>(!!H||!!(Ee&&we))&&Ke(Ae))),u.length===0){Promise.resolve().then(()=>{if(this.hls){let H="no level with compatible codecs found in manifest",Ae=H;t.levels.length&&(Ae=`one or more CODECS in variant not supported: ${Ot(t.levels.map(we=>we.attrs.CODECS).filter((we,Ze,rt)=>rt.indexOf(we)===Ze))}`,this.warn(Ae),H+=` (${Ae})`);const Ee=new Error(H);this.hls.trigger(f.ERROR,{type:se.MEDIA_ERROR,details:U.MANIFEST_INCOMPATIBLE_CODECS_ERROR,fatal:!0,url:t.url,error:Ee,reason:Ae})}});return}t.audioTracks&&(a=t.audioTracks.filter(H=>!H.audioCodec||this.isAudioSupported(H.audioCodec)),hl(a)),t.subtitles&&(o=t.subtitles,hl(o));const l=u.slice(0);u.sort((H,Ae)=>{if(H.attrs["HDCP-LEVEL"]!==Ae.attrs["HDCP-LEVEL"])return(H.attrs["HDCP-LEVEL"]||"")>(Ae.attrs["HDCP-LEVEL"]||"")?1:-1;if(n&&H.height!==Ae.height)return H.height-Ae.height;if(H.frameRate!==Ae.frameRate)return H.frameRate-Ae.frameRate;if(H.videoRange!==Ae.videoRange)return or.indexOf(H.videoRange)-or.indexOf(Ae.videoRange);if(H.videoCodec!==Ae.videoCodec){const Ee=We(H.videoCodec),we=We(Ae.videoCodec);if(Ee!==we)return we-Ee}if(H.uri===Ae.uri&&H.codecSet!==Ae.codecSet){const Ee=Qe(H.codecSet),we=Qe(Ae.codecSet);if(Ee!==we)return we-Ee}return H.averageBitrate!==Ae.averageBitrate?H.averageBitrate-Ae.averageBitrate:0});let c=l[0];if(this.steering&&(u=this.steering.filterParsedLevels(u),u.length!==l.length)){for(let H=0;H<l.length;H++)if(l[H].pathwayId===u[0].pathwayId){c=l[H];break}}this._levels=u;for(let H=0;H<u.length;H++)if(u[H]===c){var d;this._firstLevel=H;const Ae=c.bitrate,Ee=this.hls.bandwidthEstimate;if(this.log(`manifest loaded, ${u.length} level(s) found, first bitrate: ${Ae}`),((d=this.hls.userConfig)==null?void 0:d.abrEwmaDefaultEstimate)===void 0){const we=Math.min(Ae,this.hls.config.abrEwmaDefaultEstimateMax);we>Ee&&Ee===this.hls.abrEwmaDefaultEstimate&&(this.hls.bandwidthEstimate=we)}break}const g=s&&!r,w=this.hls.config,y=!!(w.audioStreamController&&w.audioTrackController),O={levels:u,audioTracks:a,subtitleTracks:o,sessionData:t.sessionData,sessionKeys:t.sessionKeys,firstLevel:this._firstLevel,stats:t.stats,audio:s,video:r,altAudio:y&&!g&&a.some(H=>!!H.url)};this.hls.trigger(f.MANIFEST_PARSED,O)}get levels(){return this._levels.length===0?null:this._levels}get loadLevelObj(){return this.currentLevel}get level(){return this.currentLevelIndex}set level(e){const t=this._levels;if(t.length===0)return;if(e<0||e>=t.length){const c=new Error("invalid level idx"),d=e<0;if(this.hls.trigger(f.ERROR,{type:se.OTHER_ERROR,details:U.LEVEL_SWITCH_ERROR,level:e,fatal:d,error:c,reason:c.message}),d)return;e=Math.min(e,t.length-1)}const n=this.currentLevelIndex,r=this.currentLevel,s=r?r.attrs["PATHWAY-ID"]:void 0,a=t[e],o=a.attrs["PATHWAY-ID"];if(this.currentLevelIndex=e,this.currentLevel=a,n===e&&r&&s===o)return;this.log(`Switching to level ${e} (${a.height?a.height+"p ":""}${a.videoRange?a.videoRange+" ":""}${a.codecSet?a.codecSet+" ":""}@${a.bitrate})${o?" with Pathway "+o:""} from level ${n}${s?" with Pathway "+s:""}`);const u={level:e,attrs:a.attrs,details:a.details,bitrate:a.bitrate,averageBitrate:a.averageBitrate,maxBitrate:a.maxBitrate,realBitrate:a.realBitrate,width:a.width,height:a.height,codecSet:a.codecSet,audioCodec:a.audioCodec,videoCodec:a.videoCodec,audioGroups:a.audioGroups,subtitleGroups:a.subtitleGroups,loaded:a.loaded,loadError:a.loadError,fragmentError:a.fragmentError,name:a.name,id:a.id,uri:a.uri,url:a.url,urlId:0,audioGroupIds:a.audioGroupIds,textGroupIds:a.textGroupIds};this.hls.trigger(f.LEVEL_SWITCHING,u);const l=a.details;if(!l||l.live){const c=this.switchParams(a.uri,r==null?void 0:r.details,l);this.loadPlaylist(c)}}get manualLevel(){return this.manualLevelIndex}set manualLevel(e){this.manualLevelIndex=e,this._startLevel===void 0&&(this._startLevel=e),e!==-1&&(this.level=e)}get firstLevel(){return this._firstLevel}set firstLevel(e){this._firstLevel=e}get startLevel(){if(this._startLevel===void 0){const e=this.hls.config.startLevel;return e!==void 0?e:this.hls.firstAutoLevel}return this._startLevel}set startLevel(e){this._startLevel=e}get pathways(){return this.steering?this.steering.pathways():[]}get pathwayPriority(){return this.steering?this.steering.pathwayPriority:null}set pathwayPriority(e){if(this.steering){const t=this.steering.pathways(),n=e.filter(r=>t.indexOf(r)!==-1);if(e.length<1){this.warn(`pathwayPriority ${e} should contain at least one pathway from list: ${t}`);return}this.steering.pathwayPriority=n}}onError(e,t){t.fatal||!t.context||t.context.type===fe.LEVEL&&t.context.level===this.level&&this.checkRetry(t)}onFragBuffered(e,{frag:t}){if(t!==void 0&&t.type===ee.MAIN){const n=t.elementaryStreams;if(!Object.keys(n).some(s=>!!n[s]))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:s}=t,a=t.levelInfo;if(!a){var o;this.warn(`Invalid level index ${r}`),(o=t.deliveryDirectives)!=null&&o.skip&&(s.deltaUpdateFailed=!0);return}if(a===this.currentLevel||t.withoutMultiVariant){a.fragmentError===0&&(a.loadError=0);let u=a.details;u===t.details&&u.advanced&&(u=void 0),this.playlistLoaded(r,t,u)}else(n=t.deliveryDirectives)!=null&&n.skip&&(s.deltaUpdateFailed=!0)}loadPlaylist(e){super.loadPlaylist(),this.shouldLoadPlaylist(this.currentLevel)&&this.scheduleLoading(this.currentLevel,e)}loadingPlaylist(e,t){super.loadingPlaylist(e,t);const n=this.getUrlWithDirectives(e.uri,t),r=this.currentLevelIndex,s=e.attrs["PATHWAY-ID"],a=e.details,o=a==null?void 0:a.age;this.log(`Loading level index ${r}${(t==null?void 0:t.msn)!==void 0?" at sn "+t.msn+" part "+t.part:""}${s?" Pathway "+s:""}${o&&a.live?" age "+o.toFixed(1)+(a.type?" "+a.type||0:""):""} ${n}`),this.hls.trigger(f.LEVEL_LOADING,{url:n,level:r,levelInfo:e,pathwayId:e.attrs["PATHWAY-ID"],id:0,deliveryDirectives:t||null})}get nextLoadLevel(){return this.manualLevelIndex!==-1?this.manualLevelIndex:this.hls.nextAutoLevel}set nextLoadLevel(e){this.level=e,this.manualLevelIndex===-1&&(this.hls.nextAutoLevel=e)}removeLevel(e){var t;if(this._levels.length===1)return;const n=this._levels.filter((s,a)=>a!==e?!0:(this.steering&&this.steering.removeLevel(s),s===this.currentLevel&&(this.currentLevel=null,this.currentLevelIndex=-1,s.details&&s.details.fragments.forEach(o=>o.level=-1)),!1));bi(n),this._levels=n,this.currentLevelIndex>-1&&(t=this.currentLevel)!=null&&t.details&&(this.currentLevelIndex=this.currentLevel.details.fragments[0].level),this.manualLevelIndex>-1&&(this.manualLevelIndex=this.currentLevelIndex);const r=n.length-1;this._firstLevel=Math.min(this._firstLevel,r),this._startLevel&&(this._startLevel=Math.min(this._startLevel,r)),this.hls.trigger(f.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(f.MAX_AUTO_LEVEL_UPDATED,{autoLevelCapping:e,levels:this.levels,maxAutoLevel:t,minAutoLevel:this.hls.minAutoLevel,maxHdcpLevel:n}))}}function hl(i){const e={};i.forEach(t=>{const n=t.groupId||"";t.id=e[n]=e[n]||0,e[n]++})}function gl(){return self.SourceBuffer||self.WebKitSourceBuffer}function pl(){if(!Y())return!1;const e=gl();return!e||e.prototype&&typeof e.prototype.appendBuffer=="function"&&typeof e.prototype.remove=="function"}function Nu(){if(!pl())return!1;const i=Y();return typeof(i==null?void 0:i.isTypeSupported)=="function"&&(["avc1.42E01E,mp4a.40.2","av01.0.01M.08","vp09.00.50.08"].some(e=>i.isTypeSupported(hn(e,"video")))||["mp4a.40.2","fLaC"].some(e=>i.isTypeSupported(hn(e,"audio"))))}function Hu(){var i;const e=gl();return typeof(e==null||(i=e.prototype)==null?void 0:i.changeType)=="function"}const Ku=100;class Gu extends Hr{constructor(e,t,n){super(e,t,n,"stream-controller",ee.MAIN),this.audioCodecSwap=!1,this.level=-1,this._forceStartLoad=!1,this._hasEnoughToStart=!1,this.altAudio=0,this.audioOnly=!1,this.fragPlaying=null,this.fragLastKbps=0,this.couldBacktrack=!1,this.backtrackFragment=null,this.audioCodecSwitch=!1,this.videoBuffer=null,this.onMediaPlaying=()=>{this.tick()},this.onMediaSeeked=()=>{const r=this.media,s=r?r.currentTime:null;if(s===null||!P(s)||(this.log(`Media seeked to ${s.toFixed(3)}`),!this.getBufferedFrag(s)))return;const a=this.getFwdBufferInfoAtPos(r,s,ee.MAIN,0);if(a===null||a.len===0){this.warn(`Main forward buffer length at ${s} on "seeked" event ${a?a.len:"empty"})`);return}this.tick()},this.registerListeners()}registerListeners(){super.registerListeners();const{hls:e}=this;e.on(f.MANIFEST_PARSED,this.onManifestParsed,this),e.on(f.LEVEL_LOADING,this.onLevelLoading,this),e.on(f.LEVEL_LOADED,this.onLevelLoaded,this),e.on(f.FRAG_LOAD_EMERGENCY_ABORTED,this.onFragLoadEmergencyAborted,this),e.on(f.AUDIO_TRACK_SWITCHING,this.onAudioTrackSwitching,this),e.on(f.AUDIO_TRACK_SWITCHED,this.onAudioTrackSwitched,this),e.on(f.BUFFER_CREATED,this.onBufferCreated,this),e.on(f.BUFFER_FLUSHED,this.onBufferFlushed,this),e.on(f.LEVELS_UPDATED,this.onLevelsUpdated,this),e.on(f.FRAG_BUFFERED,this.onFragBuffered,this)}unregisterListeners(){super.unregisterListeners();const{hls:e}=this;e.off(f.MANIFEST_PARSED,this.onManifestParsed,this),e.off(f.LEVEL_LOADED,this.onLevelLoaded,this),e.off(f.FRAG_LOAD_EMERGENCY_ABORTED,this.onFragLoadEmergencyAborted,this),e.off(f.AUDIO_TRACK_SWITCHING,this.onAudioTrackSwitching,this),e.off(f.AUDIO_TRACK_SWITCHED,this.onAudioTrackSwitched,this),e.off(f.BUFFER_CREATED,this.onBufferCreated,this),e.off(f.BUFFER_FLUSHED,this.onBufferFlushed,this),e.off(f.LEVELS_UPDATED,this.onLevelsUpdated,this),e.off(f.FRAG_BUFFERED,this.onFragBuffered,this)}onHandlerDestroying(){this.onMediaPlaying=this.onMediaSeeked=null,this.unregisterListeners(),super.onHandlerDestroying()}startLoad(e,t){if(this.levels){const{lastCurrentTime:n,hls:r}=this;if(this.stopLoad(),this.setInterval(Ku),this.level=-1,!this.startFragRequested){let s=r.startLevel;s===-1&&(r.config.testBandwidth&&this.levels.length>1?(s=0,this.bitrateTest=!0):s=r.firstAutoLevel),r.nextLoadLevel=s,this.level=r.loadLevel,this._hasEnoughToStart=!!t}n>0&&e===-1&&!t&&(this.log(`Override startPosition with lastCurrentTime @${n.toFixed(3)}`),e=n),this.state=jt.IDLE,this.nextLoadPosition=this.lastCurrentTime=e+this.timelineOffset,this.startPosition=t?-1: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],s=r==null?void 0:r.details;if(s&&(!s.live||this.levelLastLoaded===r&&!this.waitForLive(r))){if(this.waitForCdnTuneIn(s))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:s}=this,a=r==null?void 0:r[s];this.resetStartWhenNotLoaded(a||null),this.state=jt.IDLE}}break}this.state===jt.IDLE&&this.doTickIdle(),this.onTickEnd()}onTickEnd(){var e;super.onTickEnd(),(e=this.media)!=null&&e.readyState&&this.media.seeking===!1&&(this.lastCurrentTime=this.media.currentTime),this.checkFragmentChanged()}doTickIdle(){const{hls:e,levelLastLoaded:t,levels:n,media:r}=this;if(t===null||!r&&!this.primaryPrefetch&&(this.startFragRequested||!e.config.startFragPrefetch)||this.altAudio&&this.audioOnly)return;const s=this.buffering?e.nextLoadLevel:e.loadLevel;if(!(n!=null&&n[s]))return;const a=n[s],o=this.getMainFwdBufferInfo();if(o===null)return;const u=this.getLevelDetails();if(u&&this._streamEnded(o,u)){const O={};this.altAudio===2&&(O.type="video"),this.hls.trigger(f.BUFFER_EOS,O),this.state=jt.ENDED;return}if(!this.buffering)return;e.loadLevel!==s&&e.manualLevel===-1&&this.log(`Adapting to level ${s} from level ${this.level}`),this.level=e.nextLoadLevel=s;const l=a.details;if(!l||this.state===jt.WAITING_LEVEL||this.waitForLive(a)){this.level=s,this.state=jt.WAITING_LEVEL,this.startFragRequested=!1;return}const c=o.len,d=this.getMaxBufferLength(a.maxBitrate);if(c>=d)return;this.backtrackFragment&&this.backtrackFragment.start>o.end&&(this.backtrackFragment=null);const g=this.backtrackFragment?this.backtrackFragment.start:o.end;let w=this.getNextFragment(g,l);if(this.couldBacktrack&&!this.fragPrevious&&w&&Ue(w)&&this.fragmentTracker.getState(w)!==Te.OK){var y;const H=((y=this.backtrackFragment)!=null?y:w).sn-l.startSN,Ae=l.fragments[H-1];Ae&&w.cc===Ae.cc&&(w=Ae,this.fragmentTracker.removeFragment(Ae))}else this.backtrackFragment&&o.len&&(this.backtrackFragment=null);if(w&&this.isLoopLoading(w,g)){if(!w.gap){const H=this.audioOnly&&!this.altAudio?Q.AUDIO:Q.VIDEO,Ae=(H===Q.VIDEO?this.videoBuffer:this.mediaBuffer)||this.media;Ae&&this.afterBufferFlushed(Ae,H,ee.MAIN)}w=this.getNextFragmentLoopLoading(w,l,o,ee.MAIN,d)}w&&(w.initSegment&&!w.initSegment.data&&!this.bitrateTest&&(w=w.initSegment),this.loadFragment(w,a,g))}loadFragment(e,t,n){const r=this.fragmentTracker.getState(e);r===Te.NOT_LOADED||r===Te.PARTIAL?Ue(e)?this.bitrateTest?(this.log(`Fragment ${e.sn} of level ${e.level} is being downloaded to test bitrate and will not be buffered`),this._loadBitrateTestFrag(e,t)):super.loadFragment(e,t,n):this._loadInitSegment(e,t):this.clearTrackerIfNeeded(e)}getBufferedFrag(e){return this.fragmentTracker.getBufferedFrag(e,ee.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 s=this.getLevelDetails();if(s!=null&&s.live){const o=this.getMainFwdBufferInfo();if(!o||o.len<s.targetduration*2)return}if(!t.paused&&e){const o=this.hls.nextLoadLevel,u=e[o],l=this.fragLastKbps;l&&this.fragCurrent?n=this.fragCurrent.duration*u.maxBitrate/(1e3*l)+1:n=0}else n=0;const a=this.getBufferedFrag(t.currentTime+n);if(a){const o=this.followingBufferedFrag(a);if(o){this.abortCurrentFrag();const u=o.maxStartPTS?o.maxStartPTS:o.start,l=o.duration,c=Math.max(a.end,u+Math.min(Math.max(l-this.config.maxFragLookUpTolerance,l*(this.couldBacktrack?.5:.125)),l*(this.couldBacktrack?.75:.25)));this.flushMainBuffer(c,Number.POSITIVE_INFINITY)}}}}abortCurrentFrag(){const e=this.fragCurrent;switch(this.fragCurrent=null,this.backtrackFragment=null,e&&(e.abortRequests(),this.fragmentTracker.removeFragment(e)),this.state){case jt.KEY_LOADING:case jt.FRAG_LOADING:case jt.FRAG_LOADING_WAITING_RETRY:case jt.PARSING:case jt.PARSED:this.state=jt.IDLE;break}this.nextLoadPosition=this.getLoadPosition()}flushMainBuffer(e,t){super.flushMainBuffer(e,t,this.altAudio===2?"video":null)}onMediaAttached(e,t){super.onMediaAttached(e,t);const n=t.media;Oi(n,"playing",this.onMediaPlaying),Oi(n,"seeked",this.onMediaSeeked)}onMediaDetaching(e,t){const{media:n}=this;n&&(qi(n,"playing",this.onMediaPlaying),qi(n,"seeked",this.onMediaSeeked)),this.videoBuffer=null,this.fragPlaying=null,super.onMediaDetaching(e,t),!t.transferMedia&&(this._hasEnoughToStart=!1)}onManifestLoading(){super.onManifestLoading(),this.log("Trigger BUFFER_RESET"),this.hls.trigger(f.BUFFER_RESET,void 0),this.couldBacktrack=!1,this.fragLastKbps=0,this.fragPlaying=this.backtrackFragment=null,this.altAudio=0,this.audioOnly=!1}onManifestParsed(e,t){let n=!1,r=!1;t.levels.forEach(s=>{const a=s.audioCodec;a&&(n=n||a.indexOf("mp4a.40.2")!==-1,r=r||a.indexOf("mp4a.40.5")!==-1)}),this.audioCodecSwitch=n&&r&&!Hu(),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=t.levelInfo;(!r.details||r.details.live&&(this.levelLastLoaded!==r||r.details.expired)||this.waitForCdnTuneIn(r.details))&&(this.state=jt.WAITING_LEVEL)}onLevelLoaded(e,t){var n;const{levels:r,startFragRequested:s}=this,a=t.level,o=t.details,u=o.totalduration;if(!r){this.warn(`Levels were reset while loading level ${a}`);return}this.log(`Level ${a} loaded [${o.startSN},${o.endSN}]${o.lastPartSn?`[part-${o.lastPartSn}-${o.lastPartIndex}]`:""}, cc [${o.startCC}, ${o.endCC}] duration:${u}`);const l=t.levelInfo,c=this.fragCurrent;c&&(this.state===jt.FRAG_LOADING||this.state===jt.FRAG_LOADING_WAITING_RETRY)&&c.level!==t.level&&c.loader&&this.abortCurrentFrag();let d=0;if(o.live||(n=l.details)!=null&&n.live){var g;if(this.checkLiveUpdate(o),o.deltaUpdateFailed)return;d=this.alignPlaylists(o,l.details,(g=this.levelLastLoaded)==null?void 0:g.details)}if(l.details=o,this.levelLastLoaded=l,s||this.setStartPosition(o,d),this.hls.trigger(f.LEVEL_UPDATED,{details:o,level:a}),this.state===jt.WAITING_LEVEL){if(this.waitForCdnTuneIn(o))return;this.state=jt.IDLE}s&&o.live&&this.synchronizeToLiveEdge(o),this.tick()}synchronizeToLiveEdge(e){const{config:t,media:n}=this;if(!n)return;const r=this.hls.liveSyncPosition,s=this.getLoadPosition(),a=e.fragmentStart,o=e.edge,u=s>=a-t.maxFragLookUpTolerance&&s<=o;if(r!==null&&n.duration>r&&(s<r||!u)){const c=t.liveMaxLatencyDuration!==void 0?t.liveMaxLatencyDuration:t.liveMaxLatencyDurationCount*e.targetduration;if((!u&&n.readyState<4||s<o-c)&&(this._hasEnoughToStart||(this.nextLoadPosition=r),n.readyState))if(this.warn(`Playback: ${s.toFixed(3)} is located too far from the end of live sliding playlist: ${o}, reset currentTime to : ${r.toFixed(3)}`),this.config.liveSyncMode==="buffered"){var l;const d=ln.bufferInfo(n,r,0);if(!(d!=null&&(l=d.buffered)!=null&&l.length)){n.currentTime=r;return}if(d.start<=s){n.currentTime=r;return}const{nextStart:w}=ln.bufferedInfo(d.buffered,s,0);w&&(n.currentTime=w)}else n.currentTime=r}}_handleFragmentLoadProgress(e){var t;const n=e.frag,{part:r,payload:s}=e,{levels:a}=this;if(!a){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=a[n.level];if(!o){this.warn(`Level ${n.level} not found on progress`);return}const u=o.details;if(!u){this.warn(`Dropping fragment ${n.sn} of level ${n.level} after level details were reset`),this.fragmentTracker.removeFragment(n);return}const l=o.videoCodec,c=u.PTSKnown||!u.live,d=(t=n.initSegment)==null?void 0:t.data,g=this._getAudioCodec(o),w=this.transmuxer=this.transmuxer||new Va(this.hls,ee.MAIN,this._handleTransmuxComplete.bind(this),this._handleTransmuxerFlush.bind(this)),y=r?r.index:-1,O=y!==-1,H=new Xn(n.level,n.sn,n.stats.chunkCount,s.byteLength,y,O),Ae=this.initPTS[n.cc];w.push(s,d,g,l,n,r,u.totalduration,c,H,Ae)}onAudioTrackSwitching(e,t){const n=this.hls,r=this.altAudio===2;if(Bn(t.url,n))this.altAudio=1;else{if(this.mediaBuffer!==this.media){this.log("Switching on main audio, use media.buffered to schedule main fragment loading"),this.mediaBuffer=this.media;const a=this.fragCurrent;a&&(this.log("Switching to main audio track, cancel main fragment load"),a.abortRequests(),this.fragmentTracker.removeFragment(a)),this.resetTransmuxer(),this.resetLoadingState()}else this.audioOnly&&this.resetTransmuxer();if(r){this.fragmentTracker.removeAllFragments(),n.once(f.BUFFER_FLUSHED,()=>{var a;(a=this.hls)==null||a.trigger(f.AUDIO_TRACK_SWITCHED,t)}),n.trigger(f.BUFFER_FLUSHING,{startOffset:0,endOffset:Number.POSITIVE_INFINITY,type:null});return}n.trigger(f.AUDIO_TRACK_SWITCHED,t)}}onAudioTrackSwitched(e,t){const n=Bn(t.url,this.hls);if(n){const r=this.videoBuffer;r&&this.mediaBuffer!==r&&(this.log("Switching on alternate audio, use video.buffered to schedule main fragment loading"),this.mediaBuffer=r)}this.altAudio=n?2:0,this.tick()}onBufferCreated(e,t){const n=t.tracks;let r,s,a=!1;for(const o in n){const u=n[o];if(u.id==="main"){if(s=o,r=u,o==="video"){const l=n[o];l&&(this.videoBuffer=l.buffer)}}else a=!0}a&&r?(this.log(`Alternate track found, use ${s}.buffered to schedule main fragment loading`),this.mediaBuffer=r.buffer):this.mediaBuffer=this.media}onFragBuffered(e,t){const{frag:n,part:r}=t,s=n.type===ee.MAIN;if(s){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 o=r?r.stats:n.stats;this.fragLastKbps=Math.round(8*o.total/(o.buffering.end-o.loading.first)),Ue(n)&&(this.fragPrevious=n),this.fragBufferedComplete(n,r)}const a=this.media;a&&(!this._hasEnoughToStart&&ln.getBuffered(a).length&&(this._hasEnoughToStart=!0,this.seekToStartPos()),s&&this.tick())}get hasEnoughToStart(){return this._hasEnoughToStart}onError(e,t){var n;if(t.fatal){this.state=jt.ERROR;return}switch(t.details){case U.FRAG_GAP:case U.FRAG_PARSING_ERROR:case U.FRAG_DECRYPT_ERROR:case U.FRAG_LOAD_ERROR:case U.FRAG_LOAD_TIMEOUT:case U.KEY_LOAD_ERROR:case U.KEY_LOAD_TIMEOUT:this.onFragmentOrKeyLoadError(ee.MAIN,t);break;case U.LEVEL_LOAD_ERROR:case U.LEVEL_LOAD_TIMEOUT:case U.LEVEL_PARSING_ERROR:!t.levelRetry&&this.state===jt.WAITING_LEVEL&&((n=t.context)==null?void 0:n.type)===fe.LEVEL&&(this.state=jt.IDLE);break;case U.BUFFER_ADD_CODEC_ERROR:case U.BUFFER_APPEND_ERROR:if(t.parent!=="main")return;this.reduceLengthAndFlushBuffer(t)&&this.resetLoadingState();break;case U.BUFFER_FULL_ERROR:if(t.parent!=="main")return;this.reduceLengthAndFlushBuffer(t)&&this.flushMainBuffer(0,Number.POSITIVE_INFINITY);break;case U.INTERNAL_EXCEPTION:this.recoverWorkerError(t);break}}onFragLoadEmergencyAborted(){this.state=jt.IDLE,this._hasEnoughToStart||(this.startFragRequested=!1,this.nextLoadPosition=this.lastCurrentTime),this.tickImmediate()}onBufferFlushed(e,{type:t}){if(t!==Q.AUDIO||!this.altAudio){const n=(t===Q.VIDEO?this.videoBuffer:this.mediaBuffer)||this.media;n&&(this.afterBufferFlushed(n,t,ee.MAIN),this.tick())}}onLevelsUpdated(e,t){this.level>-1&&this.fragCurrent&&(this.level=this.fragCurrent.level,this.level===-1&&this.resetWhenMissingContext(this.fragCurrent)),this.levels=t.levels}swapAudioCodec(){this.audioCodecSwap=!this.audioCodecSwap}seekToStartPos(){const{media:e}=this;if(!e)return;const t=e.currentTime;let n=this.startPosition;if(n>=0&&t<n){if(e.seeking){this.log(`could not seek to ${n}, already seeking at ${t}`);return}const r=this.timelineOffset;r&&n&&(n+=r);const s=this.getLevelDetails(),a=ln.getBuffered(e),o=a.length?a.start(0):0,u=o-n,l=Math.max(this.config.maxBufferHole,this.config.maxFragLookUpTolerance);(this.config.startOnSegmentBoundary||u>0&&(u<l||this.loadingParts&&u<2*((s==null?void 0:s.partTarget)||0)))&&(this.log(`adjusting start position by ${u} to match buffer start`),n+=u,this.startPosition=n),t<n&&(this.log(`seek to target start position ${n} from current time ${t} buffer start ${o}`),e.currentTime=n)}}_getAudioCodec(e){let t=this.config.defaultAudioCodec||e.audioCodec;return this.audioCodecSwap&&t&&(this.log("Swapping audio codec"),t.indexOf("mp4a.40.5")!==-1?t="mp4a.40.2":t="mp4a.40.5"),t}_loadBitrateTestFrag(e,t){e.bitrateTest=!0,this._doFragLoad(e,t).then(n=>{const{hls:r}=this,s=n==null?void 0:n.frag;if(!s||this.fragContextChanged(s))return;t.fragmentError=0,this.state=jt.IDLE,this.startFragRequested=!1,this.bitrateTest=!1;const a=s.stats;a.parsing.start=a.parsing.end=a.buffering.start=a.buffering.end=self.performance.now(),r.trigger(f.FRAG_LOADED,n),s.bitrateTest=!1})}_handleTransmuxComplete(e){var t;const n=this.playlistType,{hls:r}=this,{remuxResult:s,chunkMeta:a}=e,o=this.getCurrentContext(a);if(!o){this.resetWhenMissingContext(a);return}const{frag:u,part:l,level:c}=o,{video:d,text:g,id3:w,initSegment:y}=s,{details:O}=c,H=this.altAudio?void 0:s.audio;if(this.fragContextChanged(u)){this.fragmentTracker.removeFragment(u);return}if(this.state=jt.PARSING,y){if(y!=null&&y.tracks){const Ze=u.initSegment||u;this._bufferInitSegment(c,y.tracks,Ze,a),r.trigger(f.FRAG_PARSING_INIT_SEGMENT,{frag:Ze,id:n,tracks:y.tracks})}const Ae=y.initPTS,Ee=y.timescale,we=this.initPTS[u.cc];P(Ae)&&(!we||we.baseTime!==Ae||we.timescale!==Ee)&&(this.initPTS[u.cc]={baseTime:Ae,timescale:Ee},r.trigger(f.INIT_PTS_FOUND,{frag:u,id:n,initPTS:Ae,timescale:Ee}))}if(d&&O){H&&d.type==="audiovideo"&&this.logMuxedErr(u);const Ae=O.fragments[u.sn-1-O.startSN],Ee=u.sn===O.startSN,we=!Ae||u.cc>Ae.cc;if(s.independent!==!1){const{startPTS:Ze,endPTS:rt,startDTS:pt,endDTS:At}=d;if(l)l.elementaryStreams[d.type]={startPTS:Ze,endPTS:rt,startDTS:pt,endDTS:At};else if(d.firstKeyFrame&&d.independent&&a.id===1&&!we&&(this.couldBacktrack=!0),d.dropped&&d.independent){const wt=this.getMainFwdBufferInfo(),_t=(wt?wt.end:this.getLoadPosition())+this.config.maxBufferHole,ct=d.firstKeyFramePTS?d.firstKeyFramePTS:Ze;if(!Ee&&_t<ct-this.config.maxBufferHole&&!we){this.backtrack(u);return}else we&&(u.gap=!0);u.setElementaryStreamInfo(d.type,u.start,rt,u.start,At,!0)}else Ee&&Ze-(O.appliedTimelineOffset||0)>co&&(u.gap=!0);u.setElementaryStreamInfo(d.type,Ze,rt,pt,At),this.backtrackFragment&&(this.backtrackFragment=u),this.bufferFragmentData(d,u,l,a,Ee||we)}else if(Ee||we)u.gap=!0;else{this.backtrack(u);return}}if(H){const{startPTS:Ae,endPTS:Ee,startDTS:we,endDTS:Ze}=H;l&&(l.elementaryStreams[Q.AUDIO]={startPTS:Ae,endPTS:Ee,startDTS:we,endDTS:Ze}),u.setElementaryStreamInfo(Q.AUDIO,Ae,Ee,we,Ze),this.bufferFragmentData(H,u,l,a)}if(O&&w!=null&&(t=w.samples)!=null&&t.length){const Ae={id:n,frag:u,details:O,samples:w.samples};r.trigger(f.FRAG_PARSING_METADATA,Ae)}if(O&&g){const Ae={id:n,frag:u,details:O,samples:g.samples};r.trigger(f.FRAG_PARSING_USERDATA,Ae)}}logMuxedErr(e){this.warn(`${Ue(e)?"Media":"Init"} segment with muxed audiovideo where only video expected: ${e.url}`)}_bufferInitSegment(e,t,n,r){if(this.state!==jt.PARSING)return;this.audioOnly=!!t.audio&&!t.video,this.altAudio&&!this.audioOnly&&(delete t.audio,t.audiovideo&&this.logMuxedErr(n));const{audio:s,video:a,audiovideo:o}=t;if(s){const l=e.audioCodec;let c=be(s.codec,l);c==="mp4a"&&(c="mp4a.40.5");const d=navigator.userAgent.toLowerCase();if(this.audioCodecSwitch){c&&(c.indexOf("mp4a.40.5")!==-1?c="mp4a.40.2":c="mp4a.40.5");const g=s.metadata;g&&"channelCount"in g&&(g.channelCount||1)!==1&&d.indexOf("firefox")===-1&&(c="mp4a.40.5")}c&&c.indexOf("mp4a.40.5")!==-1&&d.indexOf("android")!==-1&&s.container!=="audio/mpeg"&&(c="mp4a.40.2",this.log(`Android: force audio codec to ${c}`)),l&&l!==c&&this.log(`Swapping manifest audio codec "${l}" for "${c}"`),s.levelCodec=c,s.id=ee.MAIN,this.log(`Init audio buffer, container:${s.container}, codecs[selected/level/parsed]=[${c||""}/${l||""}/${s.codec}]`),delete t.audiovideo}if(a){a.levelCodec=e.videoCodec,a.id=ee.MAIN;const l=a.codec;if((l==null?void 0:l.length)===4)switch(l){case"hvc1":case"hev1":a.codec="hvc1.1.6.L120.90";break;case"av01":a.codec="av01.0.04M.08";break;case"avc1":a.codec="avc1.42e01e";break}this.log(`Init video buffer, container:${a.container}, codecs[level/parsed]=[${e.videoCodec||""}/${l}]${a.codec!==l?" parsed-corrected="+a.codec:""}${a.supplemental?" supplemental="+a.supplemental:""}`),delete t.audiovideo}o&&(this.log(`Init audiovideo buffer, container:${o.container}, codecs[level/parsed]=[${e.codecs}/${o.codec}]`),delete t.video,delete t.audio);const u=Object.keys(t);if(u.length){if(this.hls.trigger(f.BUFFER_CODECS,t),!this.hls)return;u.forEach(l=>{const d=t[l].initSegment;d!=null&&d.byteLength&&this.hls.trigger(f.BUFFER_APPENDING,{type:l,data:d,frag:n,part:null,chunkMeta:r,parent:n.type})})}this.tickImmediate()}getMainFwdBufferInfo(){const e=this.mediaBuffer&&this.altAudio===2?this.mediaBuffer:this.media;return this.getFwdBufferInfo(e,ee.MAIN)}get maxBufferLength(){const{levels:e,level:t}=this,n=e==null?void 0:e[t];return n?this.getMaxBufferLength(n.maxBitrate):this.config.maxBufferLength}backtrack(e){this.couldBacktrack=!0,this.backtrackFragment=e,this.resetTransmuxer(),this.flushBufferGap(e),this.fragmentTracker.removeFragment(e),this.fragPrevious=null,this.nextLoadPosition=e.start,this.state=jt.IDLE}checkFragmentChanged(){const e=this.media;let t=null;if(e&&e.readyState>1&&e.seeking===!1){const n=e.currentTime;if(ln.isBuffered(e,n)?t=this.getAppendedFrag(n):ln.isBuffered(e,n+.1)&&(t=this.getAppendedFrag(n+.1)),t){this.backtrackFragment=null;const r=this.fragPlaying,s=t.level;(!r||t.sn!==r.sn||r.level!==s)&&(this.fragPlaying=t,this.hls.trigger(f.FRAG_CHANGED,{frag:t}),(!r||r.level!==s)&&this.hls.trigger(f.LEVEL_SWITCHED,{level:s}))}}}get nextLevel(){const e=this.nextBufferedFrag;return e?e.level:-1}get currentFrag(){var e;if(this.fragPlaying)return this.fragPlaying;const t=((e=this.media)==null?void 0:e.currentTime)||this.lastCurrentTime;return P(t)?this.getAppendedFrag(t):null}get currentProgramDateTime(){var e;const t=((e=this.media)==null?void 0:e.currentTime)||this.lastCurrentTime;if(P(t)){const n=this.getLevelDetails(),r=this.currentFrag||(n?mn(null,n.fragments,t):null);if(r){const s=r.programDateTime;if(s!==null){const a=s+(t-r.start)*1e3;return new Date(a)}}}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 Vu{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=U.KEY_LOAD_ERROR,n,r,s){return new Sn({type:se.NETWORK_ERROR,details:t,fatal:!1,frag:e,response:s,error:n,networkDetails:r})}loadClear(e,t,n){if(this.emeController&&this.config.emeEnabled&&!this.emeController.getSelectedKeySystemFormats().length){if(t.length)for(let r=0,s=t.length;r<s;r++){const a=t[r];if(e.cc<=a.cc&&(!Ue(e)||!Ue(a)||e.sn<a.sn)||!n&&r==s-1)return this.emeController.selectKeySystemFormat(a).then(o=>{if(!this.emeController)return;a.setKeyFormat(o);const u=sr(o);if(u)return this.emeController.getKeySystemAccess([u])})}if(this.config.requireKeySystemAccessOnStart){const r=dr(this.config);if(r.length)return this.emeController.getKeySystemAccess(r)}}return null}load(e){return!e.decryptdata&&e.encrypted&&this.emeController&&this.config.emeEnabled?this.emeController.selectKeySystemFormat(e).then(t=>this.loadInternal(e,t)):this.loadInternal(e)}loadInternal(e,t){var n,r;t&&e.setKeyFormat(t);const s=e.decryptdata;if(!s){const l=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,U.KEY_LOAD_ERROR,l))}const a=s.uri;if(!a)return Promise.reject(this.createKeyLoadError(e,U.KEY_LOAD_ERROR,new Error(`Invalid key URI: "${a}"`)));let o=this.keyUriToKeyInfo[a];if((n=o)!=null&&n.decryptdata.key)return s.key=o.decryptdata.key,Promise.resolve({frag:e,keyInfo:o});if((r=o)!=null&&r.keyLoadPromise){var u;switch((u=o.mediaKeySessionContext)==null?void 0:u.keyStatus){case void 0:case"status-pending":case"usable":case"usable-in-future":return o.keyLoadPromise.then(l=>(s.key=l.keyInfo.decryptdata.key,{frag:e,keyInfo:o}))}}switch(o=this.keyUriToKeyInfo[a]={decryptdata:s,keyLoadPromise:null,loader:null,mediaKeySessionContext:null},s.method){case"ISO-23001-7":case"SAMPLE-AES":case"SAMPLE-AES-CENC":case"SAMPLE-AES-CTR":return s.keyFormat==="identity"?this.loadKeyHTTP(o,e):this.loadKeyEME(o,e);case"AES-128":case"AES-256":case"AES-256-CTR":return this.loadKeyHTTP(o,e);default:return Promise.reject(this.createKeyLoadError(e,U.KEY_LOAD_ERROR,new Error(`Key supplied with unsupported METHOD: "${s.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(s=>(e.mediaKeySessionContext=s,n))).catch(s=>{throw e.keyLoadPromise=null,s})}return Promise.resolve(n)}loadKeyHTTP(e,t){const n=this.config,r=n.loader,s=new r(n);return t.keyLoader=e.loader=s,e.keyLoadPromise=new Promise((a,o)=>{const u={keyInfo:e,frag:t,responseType:"arraybuffer",url:e.decryptdata.uri},l=n.keyLoadPolicy.default,c={loadPolicy:l,timeout:l.maxLoadTimeMs,maxRetry:0,retryDelay:0,maxRetryDelay:0},d={onSuccess:(g,w,y,O)=>{const{frag:H,keyInfo:Ae,url:Ee}=y;if(!H.decryptdata||Ae!==this.keyUriToKeyInfo[Ee])return o(this.createKeyLoadError(H,U.KEY_LOAD_ERROR,new Error("after key load, decryptdata unset or changed"),O));Ae.decryptdata.key=H.decryptdata.key=new Uint8Array(g.data),H.keyLoader=null,Ae.loader=null,a({frag:H,keyInfo:Ae})},onError:(g,w,y,O)=>{this.resetLoader(w),o(this.createKeyLoadError(t,U.KEY_LOAD_ERROR,new Error(`HTTP Error ${g.code} loading key ${g.text}`),y,_({url:u.url,data:void 0},g)))},onTimeout:(g,w,y)=>{this.resetLoader(w),o(this.createKeyLoadError(t,U.KEY_LOAD_TIMEOUT,new Error("key loading timed out"),y))},onAbort:(g,w,y)=>{this.resetLoader(w),o(this.createKeyLoadError(t,U.INTERNAL_ABORTED,new Error("key loading aborted"),y))}};s.load(u,c,d)})}resetLoader(e){const{frag:t,keyInfo:n,url:r}=e,s=n.loader;t.keyLoader===s&&(t.keyLoader=null,n.loader=null),delete this.keyUriToKeyInfo[r],s&&s.destroy()}}function ml(i){const{type:e}=i;switch(e){case fe.AUDIO_TRACK:return ee.AUDIO;case fe.SUBTITLE_TRACK:return ee.SUBTITLE;default:return ee.MAIN}}function oA(i,e){let t=i.url;return(t===void 0||t.indexOf("data:")===0)&&(t=e.url),t}class $u{constructor(e){this.hls=void 0,this.loaders=Object.create(null),this.variableList=null,this.onManifestLoaded=this.checkAutostartLoad,this.hls=e,this.registerListeners()}startLoad(e){}stopLoad(){this.destroyInternalLoaders()}registerListeners(){const{hls:e}=this;e.on(f.MANIFEST_LOADING,this.onManifestLoading,this),e.on(f.LEVEL_LOADING,this.onLevelLoading,this),e.on(f.AUDIO_TRACK_LOADING,this.onAudioTrackLoading,this),e.on(f.SUBTITLE_TRACK_LOADING,this.onSubtitleTrackLoading,this),e.on(f.LEVELS_UPDATED,this.onLevelsUpdated,this)}unregisterListeners(){const{hls:e}=this;e.off(f.MANIFEST_LOADING,this.onManifestLoading,this),e.off(f.LEVEL_LOADING,this.onLevelLoading,this),e.off(f.AUDIO_TRACK_LOADING,this.onAudioTrackLoading,this),e.off(f.SUBTITLE_TRACK_LOADING,this.onSubtitleTrackLoading,this),e.off(f.LEVELS_UPDATED,this.onLevelsUpdated,this)}createInternalLoader(e){const t=this.hls.config,n=t.pLoader,r=t.loader,s=n||r,a=new s(t);return this.loaders[e.type]=a,a}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:fe.MANIFEST,url:n,deliveryDirectives:null,levelOrTrack:null})}onLevelLoading(e,t){const{id:n,level:r,pathwayId:s,url:a,deliveryDirectives:o,levelInfo:u}=t;this.load({id:n,level:r,pathwayId:s,responseType:"text",type:fe.LEVEL,url:a,deliveryDirectives:o,levelOrTrack:u})}onAudioTrackLoading(e,t){const{id:n,groupId:r,url:s,deliveryDirectives:a,track:o}=t;this.load({id:n,groupId:r,level:null,responseType:"text",type:fe.AUDIO_TRACK,url:s,deliveryDirectives:a,levelOrTrack:o})}onSubtitleTrackLoading(e,t){const{id:n,groupId:r,url:s,deliveryDirectives:a,track:o}=t;this.load({id:n,groupId:r,level:null,responseType:"text",type:fe.SUBTITLE_TRACK,url:s,deliveryDirectives:a,levelOrTrack:o})}onLevelsUpdated(e,t){const n=this.loaders[fe.LEVEL];if(n){const r=n.context;r&&!t.levels.some(s=>s===r.levelOrTrack)&&(n.abort(),delete this.loaders[fe.LEVEL])}}load(e){var t;const n=this.hls.config;let r=this.getInternalLoader(e);if(r){const l=this.hls.logger,c=r.context;if(c&&c.levelOrTrack===e.levelOrTrack&&(c.url===e.url||c.deliveryDirectives&&!e.deliveryDirectives)){c.url===e.url?l.log(`[playlist-loader]: ignore ${e.url} ongoing request`):l.log(`[playlist-loader]: ignore ${e.url} in favor of ${c.url}`);return}l.log(`[playlist-loader]: aborting previous loader for type: ${e.type}`),r.abort()}let s;if(e.type===fe.MANIFEST?s=n.manifestLoadPolicy.default:s=h({},n.playlistLoadPolicy.default,{timeoutRetry:null,errorRetry:null}),r=this.createInternalLoader(e),P((t=e.deliveryDirectives)==null?void 0:t.part)){let l;if(e.type===fe.LEVEL&&e.level!==null?l=this.hls.levels[e.level].details:e.type===fe.AUDIO_TRACK&&e.id!==null?l=this.hls.audioTracks[e.id].details:e.type===fe.SUBTITLE_TRACK&&e.id!==null&&(l=this.hls.subtitleTracks[e.id].details),l){const c=l.partTarget,d=l.targetduration;if(c&&d){const g=Math.max(c*3,d*.8)*1e3;s=h({},s,{maxTimeToFirstByteMs:Math.min(g,s.maxTimeToFirstByteMs),maxLoadTimeMs:Math.min(g,s.maxTimeToFirstByteMs)})}}}const a=s.errorRetry||s.timeoutRetry||{},o={loadPolicy:s,timeout:s.maxLoadTimeMs,maxRetry:a.maxNumRetry||0,retryDelay:a.retryDelayMs||0,maxRetryDelay:a.maxRetryDelayMs||0},u={onSuccess:(l,c,d,g)=>{const w=this.getInternalLoader(d);this.resetInternalLoader(d.type);const y=l.data;if(y.indexOf("#EXTM3U")!==0){this.handleManifestParsingError(l,d,new Error("no EXTM3U delimiter"),g||null,c);return}c.parsing.start=performance.now(),mi.isMediaPlaylist(y)||d.type!==fe.MANIFEST?this.handleTrackOrLevelPlaylist(l,c,d,g||null,w):this.handleMasterPlaylist(l,c,d,g)},onError:(l,c,d,g)=>{this.handleNetworkError(c,d,!1,l,g)},onTimeout:(l,c,d)=>{this.handleNetworkError(c,d,!0,void 0,l)}};r.load(e,o,u)}checkAutostartLoad(){if(!this.hls)return;const{config:{autoStartLoad:e,startPosition:t},forceStartLoad:n}=this.hls;(e||n)&&(this.hls.logger.log(`${e?"auto":"force"} startLoad with configured startPosition ${t}`),this.hls.startLoad(t))}handleMasterPlaylist(e,t,n,r){const s=this.hls,a=e.data,o=oA(e,n),u=mi.parseMasterPlaylist(a,o);if(u.playlistParsingError){this.handleManifestParsingError(e,n,u.playlistParsingError,r,t);return}const{contentSteering:l,levels:c,sessionData:d,sessionKeys:g,startTimeOffset:w,variableList:y}=u;this.variableList=y;const{AUDIO:O=[],SUBTITLES:H,"CLOSED-CAPTIONS":Ae}=mi.parseMasterPlaylistMedia(a,o,u);O.length&&!O.some(we=>!we.url)&&c[0].audioCodec&&!c[0].attrs.AUDIO&&(this.hls.logger.log("[playlist-loader]: audio codec signaled in quality level, but no embedded audio track signaled, create one"),O.unshift({type:"main",name:"main",groupId:"main",default:!1,autoselect:!1,forced:!1,id:-1,attrs:new In({}),bitrate:0,url:""})),s.trigger(f.MANIFEST_LOADED,{levels:c,audioTracks:O,subtitles:H,captions:Ae,contentSteering:l,url:o,stats:t,networkDetails:r,sessionData:d,sessionKeys:g,startTimeOffset:w,variableList:y})}handleTrackOrLevelPlaylist(e,t,n,r,s){const a=this.hls,{id:o,level:u,type:l}=n,c=oA(e,n),d=P(u)?u:P(o)?o:0,g=ml(n),w=mi.parseLevelPlaylist(e.data,c,d,g,0,this.variableList);if(l===fe.MANIFEST){const y={attrs:new In({}),bitrate:0,details:w,name:"",url:c};w.requestScheduled=t.loading.start+Gr(w,0),a.trigger(f.MANIFEST_LOADED,{levels:[y],audioTracks:[],url:c,stats:t,networkDetails:r,sessionData:null,sessionKeys:null,contentSteering:null,startTimeOffset:null,variableList:null})}t.parsing.end=performance.now(),n.levelDetails=w,this.handlePlaylistLoaded(w,e,t,n,r,s)}handleManifestParsingError(e,t,n,r,s){this.hls.trigger(f.ERROR,{type:se.NETWORK_ERROR,details:U.MANIFEST_PARSING_ERROR,fatal:t.type===fe.MANIFEST,url:e.url,err:n,error:n,reason:n.message,response:e,context:t,networkDetails:r,stats:s})}handleNetworkError(e,t,n=!1,r,s){let a=`A network ${n?"timeout":"error"+(r?" (status "+r.code+")":"")} occurred while loading ${e.type}`;e.type===fe.LEVEL?a+=`: ${e.level} id: ${e.id}`:(e.type===fe.AUDIO_TRACK||e.type===fe.SUBTITLE_TRACK)&&(a+=` id: ${e.id} group-id: "${e.groupId}"`);const o=new Error(a);this.hls.logger.warn(`[playlist-loader]: ${a}`);let u=U.UNKNOWN,l=!1;const c=this.getInternalLoader(e);switch(e.type){case fe.MANIFEST:u=n?U.MANIFEST_LOAD_TIMEOUT:U.MANIFEST_LOAD_ERROR,l=!0;break;case fe.LEVEL:u=n?U.LEVEL_LOAD_TIMEOUT:U.LEVEL_LOAD_ERROR,l=!1;break;case fe.AUDIO_TRACK:u=n?U.AUDIO_TRACK_LOAD_TIMEOUT:U.AUDIO_TRACK_LOAD_ERROR,l=!1;break;case fe.SUBTITLE_TRACK:u=n?U.SUBTITLE_TRACK_LOAD_TIMEOUT:U.SUBTITLE_LOAD_ERROR,l=!1;break}c&&this.resetInternalLoader(e.type);const d={type:se.NETWORK_ERROR,details:u,fatal:l,url:e.url,loader:c,context:e,error:o,networkDetails:t,stats:s};if(r){const g=(t==null?void 0:t.url)||e.url;d.response=_({url:g,data:void 0},r)}this.hls.trigger(f.ERROR,d)}handlePlaylistLoaded(e,t,n,r,s,a){const o=this.hls,{type:u,level:l,id:c,groupId:d,deliveryDirectives:g}=r,w=oA(t,r),y=ml(r),O=typeof r.level=="number"&&y===ee.MAIN?l:void 0;if(!e.fragments.length){const Ae=e.playlistParsingError=new Error("No Segments found in Playlist");o.trigger(f.ERROR,{type:se.NETWORK_ERROR,details:U.LEVEL_EMPTY_ERROR,fatal:!1,url:w,error:Ae,reason:Ae.message,response:t,context:r,level:O,parent:y,networkDetails:s,stats:n});return}e.targetduration||(e.playlistParsingError=new Error("Missing Target Duration"));const H=e.playlistParsingError;if(H){if(this.hls.logger.warn(H),!o.config.ignorePlaylistParsingErrors){o.trigger(f.ERROR,{type:se.NETWORK_ERROR,details:U.LEVEL_PARSING_ERROR,fatal:!1,url:w,error:H,reason:H.message,response:t,context:r,level:O,parent:y,networkDetails:s,stats:n});return}e.playlistParsingError=null}switch(e.live&&a&&(a.getCacheAge&&(e.ageHeader=a.getCacheAge()||0),(!a.getCacheAge||isNaN(e.ageHeader))&&(e.ageHeader=0)),u){case fe.MANIFEST:case fe.LEVEL:o.trigger(f.LEVEL_LOADED,{details:e,levelInfo:r.levelOrTrack||o.levels[0],level:O||0,id:c||0,stats:n,networkDetails:s,deliveryDirectives:g,withoutMultiVariant:u===fe.MANIFEST});break;case fe.AUDIO_TRACK:o.trigger(f.AUDIO_TRACK_LOADED,{details:e,track:r.levelOrTrack,id:c||0,groupId:d||"",stats:n,networkDetails:s,deliveryDirectives:g});break;case fe.SUBTITLE_TRACK:o.trigger(f.SUBTITLE_TRACK_LOADED,{details:e,track:r.levelOrTrack,id:c||0,groupId:d||"",stats:n,networkDetails:s,deliveryDirectives:g});break}}}class Is{static get version(){return Ki}static isMSESupported(){return pl()}static isSupported(){return Nu()}static getMediaSource(){return Y()}static get Events(){return f}static get MetadataSchema(){return Vi}static get ErrorTypes(){return se}static get ErrorDetails(){return U}static get DefaultConfig(){return Is.defaultConfig?Is.defaultConfig:ku}static set DefaultConfig(e){Is.defaultConfig=e}constructor(e={}){this.config=void 0,this.userConfig=void 0,this.logger=void 0,this.coreComponents=void 0,this.networkControllers=void 0,this._emitter=new Yi,this._autoLevelCapping=-1,this._maxHdcpLevel=null,this.abrController=void 0,this.bufferController=void 0,this.capLevelController=void 0,this.latencyController=void 0,this.levelController=void 0,this.streamController=void 0,this.audioStreamController=void 0,this.subtititleStreamController=void 0,this.audioTrackController=void 0,this.subtitleTrackController=void 0,this.interstitialsController=void 0,this.gapController=void 0,this.emeController=void 0,this.cmcdController=void 0,this._media=null,this._url=null,this._sessionId=void 0,this.triggeringException=void 0,this.started=!1;const t=this.logger=ae(e.debug||!1,"Hls instance",e.assetPlayerId),n=this.config=ts(Is.DefaultConfig,e,t);this.userConfig=e,n.progressive&&uo(n,t);const{abrController:r,bufferController:s,capLevelController:a,errorController:o,fpsController:u}=n,l=new o(this),c=this.abrController=new r(this),d=new Me(this),g=n.interstitialsController,w=g?this.interstitialsController=new g(this,Is):null,y=this.bufferController=new s(this,d),O=this.capLevelController=new a(this),H=new u(this),Ae=new $u(this),Ee=n.contentSteeringController,we=Ee?new Ee(this):null,Ze=this.levelController=new Mu(this,we),rt=new dl(this),pt=new Vu(this.config),At=this.streamController=new Gu(this,d,pt),wt=this.gapController=new fo(this,d);O.setStreamController(At),H.setStreamController(At);const _t=[Ae,Ze,At];w&&_t.splice(1,0,w),we&&_t.splice(1,0,we),this.networkControllers=_t;const ct=[c,y,wt,O,H,rt,d];this.audioTrackController=this.createController(n.audioTrackController,_t);const fn=n.audioStreamController;fn&&_t.push(this.audioStreamController=new fn(this,d,pt)),this.subtitleTrackController=this.createController(n.subtitleTrackController,_t);const Rn=n.subtitleStreamController;Rn&&_t.push(this.subtititleStreamController=new Rn(this,d,pt)),this.createController(n.timelineController,ct),pt.emeController=this.emeController=this.createController(n.emeController,ct),this.cmcdController=this.createController(n.cmcdController,ct),this.latencyController=this.createController(Qu,ct),this.coreComponents=ct,_t.push(l);const $n=l.onErrorOut;typeof $n=="function"&&this.on(f.ERROR,$n,l),this.on(f.MANIFEST_LOADED,Ae.onManifestLoaded,Ae)}createController(e,t){if(e){const n=new e(this);return t&&t.push(n),n}return null}on(e,t,n=this){this._emitter.on(e,t,n)}once(e,t,n=this){this._emitter.once(e,t,n)}removeAllListeners(e){this._emitter.removeAllListeners(e)}off(e,t,n=this,r){this._emitter.off(e,t,n,r)}listeners(e){return this._emitter.listeners(e)}emit(e,t,n){return this._emitter.emit(e,t,n)}trigger(e,t){if(this.config.debug)return this.emit(e,e,t);try{return this.emit(e,e,t)}catch(n){if(this.logger.error("An internal error happened while handling event "+e+'. Error message: "'+n.message+'". Here is a stacktrace:',n),!this.triggeringException){this.triggeringException=!0;const r=e===f.ERROR;this.trigger(f.ERROR,{type:se.OTHER_ERROR,details:U.INTERNAL_EXCEPTION,fatal:r,event:e,error:n}),this.triggeringException=!1}}return!1}listenerCount(e){return this._emitter.listenerCount(e)}destroy(){this.logger.log("destroy"),this.trigger(f.DESTROYING,void 0),this.detachMedia(),this.removeAllListeners(),this._autoLevelCapping=-1,this._url=null,this.networkControllers.forEach(t=>t.destroy()),this.networkControllers.length=0,this.coreComponents.forEach(t=>t.destroy()),this.coreComponents.length=0;const e=this.config;e.xhrSetup=e.fetchSetup=void 0,this.userConfig=null}attachMedia(e){if(!e||"media"in e&&!e.media){const s=new Error(`attachMedia failed: invalid argument (${e})`);this.trigger(f.ERROR,{type:se.OTHER_ERROR,details:U.ATTACH_MEDIA_ERROR,fatal:!0,error:s});return}this.logger.log("attachMedia"),this._media&&(this.logger.warn("media must be detached before attaching"),this.detachMedia());const t="media"in e,n=t?e.media:e,r=t?e:{media:n};this._media=n,this.trigger(f.MEDIA_ATTACHING,r)}detachMedia(){this.logger.log("detachMedia"),this.trigger(f.MEDIA_DETACHING,{}),this._media=null}transferMedia(){this._media=null;const e=this.bufferController.transferMedia();return this.trigger(f.MEDIA_DETACHING,{transferMedia:e}),e}loadSource(e){this.stopLoad();const t=this.media,n=this._url,r=this._url=m.buildAbsoluteURL(self.location.href,e,{alwaysNormalize:!0});this._autoLevelCapping=-1,this._maxHdcpLevel=null,this.logger.log(`loadSource:${r}`),t&&n&&(n!==r||this.bufferController.hasSourceTypes())&&(this.detachMedia(),this.attachMedia(t)),this.trigger(f.MANIFEST_LOADING,{url:e})}get url(){return this._url}get hasEnoughToStart(){return this.streamController.hasEnoughToStart}get startPosition(){return this.streamController.startPositionValue}startLoad(e=-1,t){this.logger.log(`startLoad(${e+(t?", <skip seek to start>":"")})`),this.started=!0,this.resumeBuffering();for(let n=0;n<this.networkControllers.length&&(this.networkControllers[n].startLoad(e,t),!(!this.started||!this.networkControllers));n++);}stopLoad(){this.logger.log("stopLoad"),this.started=!1;for(let e=0;e<this.networkControllers.length&&(this.networkControllers[e].stopLoad(),!(this.started||!this.networkControllers));e++);}get loadingEnabled(){return this.started}get bufferingEnabled(){return this.streamController.bufferingEnabled}resumeBuffering(){this.bufferingEnabled||(this.logger.log("resume buffering"),this.networkControllers.forEach(e=>{e.resumeBuffering&&e.resumeBuffering()}))}pauseBuffering(){this.bufferingEnabled&&(this.logger.log("pause buffering"),this.networkControllers.forEach(e=>{e.pauseBuffering&&e.pauseBuffering()}))}get inFlightFragments(){const e={[ee.MAIN]:this.streamController.inFlightFrag};return this.audioStreamController&&(e[ee.AUDIO]=this.audioStreamController.inFlightFrag),this.subtititleStreamController&&(e[ee.SUBTITLE]=this.subtititleStreamController.inFlightFrag),e}swapAudioCodec(){this.logger.log("swapAudioCodec"),this.streamController.swapAudioCodec()}recoverMediaError(){this.logger.log("recoverMediaError");const e=this._media,t=e==null?void 0:e.currentTime;this.detachMedia(),e&&(this.attachMedia(e),t&&this.startLoad(t))}removeLevel(e){this.levelController.removeLevel(e)}get sessionId(){let e=this._sessionId;return e||(e=this._sessionId=eo()),e}get levels(){const e=this.levelController.levels;return e||[]}get latestLevelDetails(){return this.streamController.getLevelDetails()||null}get loadLevelObj(){return this.levelController.loadLevelObj}get currentLevel(){return this.streamController.currentLevel}set currentLevel(e){this.logger.log(`set currentLevel:${e}`),this.levelController.manualLevel=e,this.streamController.immediateLevelSwitch()}get nextLevel(){return this.streamController.nextLevel}set nextLevel(e){this.logger.log(`set nextLevel:${e}`),this.levelController.manualLevel=e,this.streamController.nextLevelSwitch()}get loadLevel(){return this.levelController.level}set loadLevel(e){this.logger.log(`set loadLevel:${e}`),this.levelController.manualLevel=e}get nextLoadLevel(){return this.levelController.nextLoadLevel}set nextLoadLevel(e){this.levelController.nextLoadLevel=e}get firstLevel(){return Math.max(this.levelController.firstLevel,this.minAutoLevel)}set firstLevel(e){this.logger.log(`set firstLevel:${e}`),this.levelController.firstLevel=e}get startLevel(){const e=this.levelController.startLevel;return e===-1&&this.abrController.forcedAutoLevel>-1?this.abrController.forcedAutoLevel:e}set startLevel(e){this.logger.log(`set startLevel:${e}`),e!==-1&&(e=Math.max(e,this.minAutoLevel)),this.levelController.startLevel=e}get capLevelToPlayerSize(){return this.config.capLevelToPlayerSize}set capLevelToPlayerSize(e){const t=!!e;t!==this.config.capLevelToPlayerSize&&(t?this.capLevelController.startCapping():(this.capLevelController.stopCapping(),this.autoLevelCapping=-1,this.streamController.nextLevelSwitch()),this.config.capLevelToPlayerSize=t)}get autoLevelCapping(){return this._autoLevelCapping}get bandwidthEstimate(){const{bwEstimator:e}=this.abrController;return e?e.getEstimate():NaN}set bandwidthEstimate(e){this.abrController.resetEstimator(e)}get abrEwmaDefaultEstimate(){const{bwEstimator:e}=this.abrController;return e?e.defaultEstimate:NaN}get ttfbEstimate(){const{bwEstimator:e}=this.abrController;return e?e.getEstimateTTFB():NaN}set autoLevelCapping(e){this._autoLevelCapping!==e&&(this.logger.log(`set autoLevelCapping:${e}`),this._autoLevelCapping=e,this.levelController.checkMaxAutoUpdated())}get maxHdcpLevel(){return this._maxHdcpLevel}set maxHdcpLevel(e){Yn(e)&&this._maxHdcpLevel!==e&&(this._maxHdcpLevel=e,this.levelController.checkMaxAutoUpdated())}get autoLevelEnabled(){return this.levelController.manualLevel===-1}get manualLevel(){return this.levelController.manualLevel}get minAutoLevel(){const{levels:e,config:{minAutoBitrate:t}}=this;if(!e)return 0;const n=e.length;for(let r=0;r<n;r++)if(e[r].maxBitrate>=t)return r;return 0}get maxAutoLevel(){const{levels:e,autoLevelCapping:t,maxHdcpLevel:n}=this;let r;if(t===-1&&e!=null&&e.length?r=e.length-1:r=t,n)for(let s=r;s--;){const a=e[s].attrs["HDCP-LEVEL"];if(a&&a<=n)return s}return r}get firstAutoLevel(){return this.abrController.firstAutoLevel}get nextAutoLevel(){return this.abrController.nextAutoLevel}set nextAutoLevel(e){this.abrController.nextAutoLevel=e}get playingDate(){return this.streamController.currentProgramDateTime}get mainForwardBufferInfo(){return this.streamController.getMainFwdBufferInfo()}get maxBufferLength(){return this.streamController.maxBufferLength}setAudioOption(e){var t;return((t=this.audioTrackController)==null?void 0:t.setAudioOption(e))||null}setSubtitleOption(e){var t;return((t=this.subtitleTrackController)==null?void 0:t.setSubtitleOption(e))||null}get allAudioTracks(){const e=this.audioTrackController;return e?e.allAudioTracks:[]}get audioTracks(){const e=this.audioTrackController;return e?e.audioTracks:[]}get audioTrack(){const e=this.audioTrackController;return e?e.audioTrack:-1}set audioTrack(e){const t=this.audioTrackController;t&&(t.audioTrack=e)}get allSubtitleTracks(){const e=this.subtitleTrackController;return e?e.allSubtitleTracks:[]}get subtitleTracks(){const e=this.subtitleTrackController;return e?e.subtitleTracks:[]}get subtitleTrack(){const e=this.subtitleTrackController;return e?e.subtitleTrack:-1}get media(){return this._media}set subtitleTrack(e){const t=this.subtitleTrackController;t&&(t.subtitleTrack=e)}get subtitleDisplay(){const e=this.subtitleTrackController;return e?e.subtitleDisplay:!1}set subtitleDisplay(e){const t=this.subtitleTrackController;t&&(t.subtitleDisplay=e)}get lowLatencyMode(){return this.config.lowLatencyMode}set lowLatencyMode(e){this.config.lowLatencyMode=e}get liveSyncPosition(){return this.latencyController.liveSyncPosition}get latency(){return this.latencyController.latency}get maxLatency(){return this.latencyController.maxLatency}get targetLatency(){return this.latencyController.targetLatency}set targetLatency(e){this.latencyController.targetLatency=e}get drift(){return this.latencyController.drift}get forceStartLoad(){return this.streamController.forceStartLoad}get pathways(){return this.levelController.pathways}get pathwayPriority(){return this.levelController.pathwayPriority}set pathwayPriority(e){this.levelController.pathwayPriority=e}get bufferedToEnd(){var e;return!!((e=this.bufferController)!=null&&e.bufferedToEnd)}get interstitialsManager(){var e;return((e=this.interstitialsController)==null?void 0:e.interstitialsManager)||null}getMediaDecodingInfo(e,t=this.allAudioTracks){const n=lt(t);return ar(e,n,navigator.mediaCapabilities)}}Is.defaultConfig=void 0},16722:function(Cn,tt,b){"use strict";b.d(tt,{Z:function(){return ee}});const P=A=>typeof A=="object"&&A!=null&&A.nodeType===1,re=(A,E)=>(!E||A!=="hidden")&&A!=="visible"&&A!=="clip",ge=(A,E)=>{if(A.clientHeight<A.scrollHeight||A.clientWidth<A.scrollWidth){const x=getComputedStyle(A,null);return re(x.overflowY,E)||re(x.overflowX,E)||(h=>{const p=(_=>{if(!_.ownerDocument||!_.ownerDocument.defaultView)return null;try{return _.ownerDocument.defaultView.frameElement}catch(C){return null}})(h);return!!p&&(p.clientHeight<h.scrollHeight||p.clientWidth<h.scrollWidth)})(A)}return!1},se=(A,E,x,h,p,_,C,F)=>_<A&&C>E||_>A&&C<E?0:_<=A&&F<=x||C>=E&&F>=x?_-A-h:C>E&&F<x||_<A&&F>x?C-E+p:0,U=A=>{const E=A.parentElement;return E==null?A.getRootNode().host||null:E},f=(A,E)=>{var x,h,p,_;if(typeof document=="undefined")return[];const{scrollMode:C,block:F,inline:R,boundary:K,skipOverflowHiddenElements:B}=E,D=typeof K=="function"?K:Oe=>Oe!==K;if(!P(A))throw new TypeError("Invalid target");const I=document.scrollingElement||document.documentElement,S=[];let q=A;for(;P(q)&&D(q);){if(q=U(q),q===I){S.push(q);break}q!=null&&q===document.body&&ge(q)&&!ge(document.documentElement)||q!=null&&ge(q,B)&&S.push(q)}const ae=(h=(x=window.visualViewport)==null?void 0:x.width)!=null?h:innerWidth,j=(_=(p=window.visualViewport)==null?void 0:p.height)!=null?_:innerHeight,{scrollX:Y,scrollY:ie}=window,{height:de,width:pe,top:W,right:M,bottom:X,left:G}=A.getBoundingClientRect(),{top:ne,right:Z,bottom:m,left:v}=(Oe=>{const ft=window.getComputedStyle(Oe);return{top:parseFloat(ft.scrollMarginTop)||0,right:parseFloat(ft.scrollMarginRight)||0,bottom:parseFloat(ft.scrollMarginBottom)||0,left:parseFloat(ft.scrollMarginLeft)||0}})(A);let Q=F==="start"||F==="nearest"?W-ne:F==="end"?X+m:W+de/2-ne+m,he=R==="center"?G+pe/2-v+Z:R==="end"?M+Z:G-v;const Ue=[];for(let Oe=0;Oe<S.length;Oe++){const ft=S[Oe],{height:Et,width:Ft,top:Ut,right:Se,bottom:Gt,left:ht}=ft.getBoundingClientRect();if(C==="if-needed"&&W>=0&&G>=0&&X<=j&&M<=ae&&(ft===I&&!ge(ft)||W>=Ut&&X<=Gt&&G>=ht&&M<=Se))return Ue;const tn=getComputedStyle(ft),dt=parseInt(tn.borderLeftWidth,10),Je=parseInt(tn.borderTopWidth,10),xe=parseInt(tn.borderRightWidth,10),_e=parseInt(tn.borderBottomWidth,10);let N=0,Fe=0;const De="offsetWidth"in ft?ft.offsetWidth-ft.clientWidth-dt-xe:0,V="offsetHeight"in ft?ft.offsetHeight-ft.clientHeight-Je-_e:0,T="offsetWidth"in ft?ft.offsetWidth===0?0:Ft/ft.offsetWidth:0,J="offsetHeight"in ft?ft.offsetHeight===0?0:Et/ft.offsetHeight:0;if(I===ft)N=F==="start"?Q:F==="end"?Q-j:F==="nearest"?se(ie,ie+j,j,Je,_e,ie+Q,ie+Q+de,de):Q-j/2,Fe=R==="start"?he:R==="center"?he-ae/2:R==="end"?he-ae:se(Y,Y+ae,ae,dt,xe,Y+he,Y+he+pe,pe),N=Math.max(0,N+ie),Fe=Math.max(0,Fe+Y);else{N=F==="start"?Q-Ut-Je:F==="end"?Q-Gt+_e+V:F==="nearest"?se(Ut,Gt,Et,Je,_e+V,Q,Q+de,de):Q-(Ut+Et/2)+V/2,Fe=R==="start"?he-ht-dt:R==="center"?he-(ht+Ft/2)+De/2:R==="end"?he-Se+xe+De:se(ht,Se,Ft,dt,xe+De,he,he+pe,pe);const{scrollLeft:ve,scrollTop:te}=ft;N=J===0?0:Math.max(0,Math.min(te+N/J,ft.scrollHeight-Et/J+V)),Fe=T===0?0:Math.max(0,Math.min(ve+Fe/T,ft.scrollWidth-Ft/T+De)),Q+=te-N,he+=ve-Fe}Ue.push({el:ft,top:N,left:Fe})}return Ue},fe=A=>A===!1?{block:"end",inline:"nearest"}:(E=>E===Object(E)&&Object.keys(E).length!==0)(A)?A:{block:"start",inline:"nearest"};function ee(A,E){if(!A.isConnected||!(p=>{let _=p;for(;_&&_.parentNode;){if(_.parentNode===document)return!0;_=_.parentNode instanceof ShadowRoot?_.parentNode.host:_.parentNode}return!1})(A))return;const x=(p=>{const _=window.getComputedStyle(p);return{top:parseFloat(_.scrollMarginTop)||0,right:parseFloat(_.scrollMarginRight)||0,bottom:parseFloat(_.scrollMarginBottom)||0,left:parseFloat(_.scrollMarginLeft)||0}})(A);if((p=>typeof p=="object"&&typeof p.behavior=="function")(E))return E.behavior(f(A,E));const h=typeof E=="boolean"||E==null?void 0:E.behavior;for(const{el:p,top:_,left:C}of f(A,fe(E))){const F=_-x.top+x.bottom,R=C-x.left+x.right;p.scroll({top:F,left:R,behavior:h})}}}}]);
}());