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.
1046 lines
1.5 MiB
1046 lines
1.5 MiB
!(function(){var Hc=Object.defineProperty;var kc=Object.getOwnPropertySymbols;var Kc=Object.prototype.hasOwnProperty,Gc=Object.prototype.propertyIsEnumerable;var Oc=Math.pow,Sc=(Vn,ct,x)=>ct in Vn?Hc(Vn,ct,{enumerable:!0,configurable:!0,writable:!0,value:x}):Vn[ct]=x,Tc=(Vn,ct)=>{for(var x in ct||(ct={}))Kc.call(ct,x)&&Sc(Vn,x,ct[x]);if(kc)for(var x of kc(ct))Gc.call(ct,x)&&Sc(Vn,x,ct[x]);return Vn};var qi=(Vn,ct,x)=>Sc(Vn,typeof ct!="symbol"?ct+"":ct,x);(self.webpackChunk=self.webpackChunk||[]).push([[5902],{67921:function(Vn,ct,x){"use strict";x.d(ct,{Z:function(){return le}});var V=x(32855),fe=x(59301),Ce={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"},ge=Ce,G=x(7657),g=function(S,U){return fe.createElement(G.Z,(0,V.Z)({},S,{ref:U,icon:ge}))},ye=fe.forwardRef(g),le=ye},4958:function(Vn,ct,x){"use strict";x.d(ct,{Z:function(){return le}});var V=x(32855),fe=x(59301),Ce={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"},ge=Ce,G=x(7657),g=function(S,U){return fe.createElement(G.Z,(0,V.Z)({},S,{ref:U,icon:ge}))},ye=fe.forwardRef(g),le=ye},65030:function(Vn,ct,x){"use strict";x.d(ct,{Z:function(){return ht}});var V=x(27247),fe=x(11913),Ce=x(43079),ge=x(43403),G=x(92310),g=x.n(G),ye=x(29301),le=x(76846),o=x(96452),S=x(6089),U=x(80402),_=x(34280),w=x(49658),b=x(59301),R=x(32855),M=x(77900),H=x(8654);function J(Oe){var Fe=Oe.prefixCls,j=Oe.align,Ne=Oe.arrow,Ze=Oe.arrowPos,ee=Ne||{},O=ee.className,ue=ee.content,De=Ze.x,Ae=De===void 0?0:De,Be=Ze.y,Se=Be===void 0?0:Be,ot=b.useRef();if(!j||!j.points)return null;var Xe={position:"absolute"};if(j.autoArrow!==!1){var je=j.points[0],qe=j.points[1],kt=je[0],gt=je[1],_t=qe[0],Pe=qe[1];kt===_t||!["t","b"].includes(kt)?Xe.top=Se:kt==="t"?Xe.top=0:Xe.bottom=0,gt===Pe||!["l","r"].includes(gt)?Xe.left=Ae:gt==="l"?Xe.left=0:Xe.right=0}return b.createElement("div",{ref:ot,className:g()("".concat(Fe,"-arrow"),O),style:Xe},ue)}function T(Oe){var Fe=Oe.prefixCls,j=Oe.open,Ne=Oe.zIndex,Ze=Oe.mask,ee=Oe.motion;return Ze?b.createElement(M.default,(0,R.Z)({},ee,{motionAppear:!0,visible:j,removeOnLeave:!0}),function(O){var ue=O.className;return b.createElement("div",{style:{zIndex:Ne},className:g()("".concat(Fe,"-mask"),ue)})}):null}var N=b.memo(function(Oe){var Fe=Oe.children;return Fe},function(Oe,Fe){return Fe.cache}),P=N,k=b.forwardRef(function(Oe,Fe){var j=Oe.popup,Ne=Oe.className,Ze=Oe.prefixCls,ee=Oe.style,O=Oe.target,ue=Oe.onVisibleChanged,De=Oe.open,Ae=Oe.keepDom,Be=Oe.fresh,Se=Oe.onClick,ot=Oe.mask,Xe=Oe.arrow,je=Oe.arrowPos,qe=Oe.align,kt=Oe.motion,gt=Oe.maskMotion,_t=Oe.forceRender,Pe=Oe.getPopupContainer,Wt=Oe.autoDestroy,St=Oe.portal,vt=Oe.zIndex,dn=Oe.onMouseEnter,hn=Oe.onMouseLeave,Ot=Oe.onPointerEnter,Ln=Oe.onPointerDownCapture,qn=Oe.ready,sn=Oe.offsetX,Mn=Oe.offsetY,ut=Oe.offsetR,nt=Oe.offsetB,ze=Oe.onAlign,ne=Oe.onPrepare,me=Oe.stretch,Ie=Oe.targetWidth,Ue=Oe.targetHeight,ke=typeof j=="function"?j():j,Gt=De||Ae,_n=(Pe==null?void 0:Pe.length)>0,wn=b.useState(!Pe||!_n),$n=(0,fe.Z)(wn,2),mr=$n[0],sr=$n[1];if((0,_.Z)(function(){!mr&&_n&&O&&sr(!0)},[mr,_n,O]),!mr)return null;var lr="auto",zn={left:"-1000vw",top:"-1000vh",right:lr,bottom:lr};if(qn||!De){var Lr,Sr=qe.points,xr=qe.dynamicInset||((Lr=qe._experimental)===null||Lr===void 0?void 0:Lr.dynamicInset),Zr=xr&&Sr[0][1]==="r",Tn=xr&&Sr[0][0]==="b";Zr?(zn.right=ut,zn.left=lr):(zn.left=sn,zn.right=lr),Tn?(zn.bottom=nt,zn.top=lr):(zn.top=Mn,zn.bottom=lr)}var fn={};return me&&(me.includes("height")&&Ue?fn.height=Ue:me.includes("minHeight")&&Ue&&(fn.minHeight=Ue),me.includes("width")&&Ie?fn.width=Ie:me.includes("minWidth")&&Ie&&(fn.minWidth=Ie)),De||(fn.pointerEvents="none"),b.createElement(St,{open:_t||Gt,getContainer:Pe&&function(){return Pe(O)},autoDestroy:Wt},b.createElement(T,{prefixCls:Ze,open:De,zIndex:vt,mask:ot,motion:gt}),b.createElement(ye.Z,{onResize:ze,disabled:!De},function(Zn){return b.createElement(M.default,(0,R.Z)({motionAppear:!0,motionEnter:!0,motionLeave:!0,removeOnLeave:!1,forceRender:_t,leavedClassName:"".concat(Ze,"-hidden")},kt,{onAppearPrepare:ne,onEnterPrepare:ne,visible:De,onVisibleChanged:function(Hr){var it;kt==null||(it=kt.onVisibleChanged)===null||it===void 0||it.call(kt,Hr),ue(Hr)}}),function(vr,Hr){var it=vr.className,tt=vr.style,mn=g()(Ze,it,Ne);return b.createElement("div",{ref:(0,H.sQ)(Zn,Fe,Hr),className:mn,style:(0,V.Z)((0,V.Z)((0,V.Z)((0,V.Z)({"--arrow-x":"".concat(je.x||0,"px"),"--arrow-y":"".concat(je.y||0,"px")},zn),fn),tt),{},{boxSizing:"border-box",zIndex:vt},ee),onMouseEnter:dn,onMouseLeave:hn,onPointerEnter:Ot,onClick:Se,onPointerDownCapture:Ln},Xe&&b.createElement(J,{prefixCls:Ze,arrow:Xe,arrowPos:je,align:qe}),b.createElement(P,{cache:!De&&!Be},ke))})}))}),oe=k,de=b.forwardRef(function(Oe,Fe){var j=Oe.children,Ne=Oe.getTriggerDOMNode,Ze=(0,H.Yr)(j),ee=b.useCallback(function(ue){(0,H.mH)(Fe,Ne?Ne(ue):ue)},[Ne]),O=(0,H.x1)(ee,(0,H.C4)(j));return Ze?b.cloneElement(j,{ref:O}):j}),ie=de,ae=b.createContext(null),we=ae;function Te(Oe){return Oe?Array.isArray(Oe)?Oe:[Oe]:[]}function Re(Oe,Fe,j,Ne){return b.useMemo(function(){var Ze=Te(j!=null?j:Fe),ee=Te(Ne!=null?Ne:Fe),O=new Set(Ze),ue=new Set(ee);return Oe&&(O.has("hover")&&(O.delete("hover"),O.add("click")),ue.has("hover")&&(ue.delete("hover"),ue.add("click"))),[O,ue]},[Oe,Fe,j,Ne])}var Y=x(29194);function $(){var Oe=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[],Fe=arguments.length>1&&arguments[1]!==void 0?arguments[1]:[],j=arguments.length>2?arguments[2]:void 0;return j?Oe[0]===Fe[0]:Oe[0]===Fe[0]&&Oe[1]===Fe[1]}function te(Oe,Fe,j,Ne){for(var Ze=j.points,ee=Object.keys(Oe),O=0;O<ee.length;O+=1){var ue,De=ee[O];if($((ue=Oe[De])===null||ue===void 0?void 0:ue.points,Ze,Ne))return"".concat(Fe,"-placement-").concat(De)}return""}function q(Oe,Fe,j,Ne){return Fe||(j?{motionName:"".concat(Oe,"-").concat(j)}:Ne?{motionName:Ne}:null)}function he(Oe){return Oe.ownerDocument.defaultView}function re(Oe){for(var Fe=[],j=Oe==null?void 0:Oe.parentElement,Ne=["hidden","scroll","clip","auto"];j;){var Ze=he(j).getComputedStyle(j),ee=Ze.overflowX,O=Ze.overflowY,ue=Ze.overflow;[ee,O,ue].some(function(De){return Ne.includes(De)})&&Fe.push(j),j=j.parentElement}return Fe}function E(Oe){var Fe=arguments.length>1&&arguments[1]!==void 0?arguments[1]:1;return Number.isNaN(Oe)?Fe:Oe}function C(Oe){return E(parseFloat(Oe),0)}function W(Oe,Fe){var j=(0,V.Z)({},Oe);return(Fe||[]).forEach(function(Ne){if(!(Ne instanceof HTMLBodyElement||Ne instanceof HTMLHtmlElement)){var Ze=he(Ne).getComputedStyle(Ne),ee=Ze.overflow,O=Ze.overflowClipMargin,ue=Ze.borderTopWidth,De=Ze.borderBottomWidth,Ae=Ze.borderLeftWidth,Be=Ze.borderRightWidth,Se=Ne.getBoundingClientRect(),ot=Ne.offsetHeight,Xe=Ne.clientHeight,je=Ne.offsetWidth,qe=Ne.clientWidth,kt=C(ue),gt=C(De),_t=C(Ae),Pe=C(Be),Wt=E(Math.round(Se.width/je*1e3)/1e3),St=E(Math.round(Se.height/ot*1e3)/1e3),vt=(je-qe-_t-Pe)*Wt,dn=(ot-Xe-kt-gt)*St,hn=kt*St,Ot=gt*St,Ln=_t*Wt,qn=Pe*Wt,sn=0,Mn=0;if(ee==="clip"){var ut=C(O);sn=ut*Wt,Mn=ut*St}var nt=Se.x+Ln-sn,ze=Se.y+hn-Mn,ne=nt+Se.width+2*sn-Ln-qn-vt,me=ze+Se.height+2*Mn-hn-Ot-dn;j.left=Math.max(j.left,nt),j.top=Math.max(j.top,ze),j.right=Math.min(j.right,ne),j.bottom=Math.min(j.bottom,me)}}),j}function be(Oe){var Fe=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,j="".concat(Fe),Ne=j.match(/^(.*)\%$/);return Ne?Oe*(parseFloat(Ne[1])/100):parseFloat(j)}function Ve(Oe,Fe){var j=Fe||[],Ne=(0,fe.Z)(j,2),Ze=Ne[0],ee=Ne[1];return[be(Oe.width,Ze),be(Oe.height,ee)]}function Ke(){var Oe=arguments.length>0&&arguments[0]!==void 0?arguments[0]:"";return[Oe[0],Oe[1]]}function Ct(Oe,Fe){var j=Fe[0],Ne=Fe[1],Ze,ee;return j==="t"?ee=Oe.y:j==="b"?ee=Oe.y+Oe.height:ee=Oe.y+Oe.height/2,Ne==="l"?Ze=Oe.x:Ne==="r"?Ze=Oe.x+Oe.width:Ze=Oe.x+Oe.width/2,{x:Ze,y:ee}}function Rt(Oe,Fe){var j={t:"b",b:"t",l:"r",r:"l"};return Oe.map(function(Ne,Ze){return Ze===Fe?j[Ne]||"c":Ne}).join("")}function Vt(Oe,Fe,j,Ne,Ze,ee,O){var ue=b.useState({ready:!1,offsetX:0,offsetY:0,offsetR:0,offsetB:0,arrowX:0,arrowY:0,scaleX:1,scaleY:1,align:Ze[Ne]||{}}),De=(0,fe.Z)(ue,2),Ae=De[0],Be=De[1],Se=b.useRef(0),ot=b.useMemo(function(){return Fe?re(Fe):[]},[Fe]),Xe=b.useRef({}),je=function(){Xe.current={}};Oe||je();var qe=(0,S.Z)(function(){if(Fe&&j&&Oe){let ai=function(li,gr){var Fr=arguments.length>2&&arguments[2]!==void 0?arguments[2]:vn,Gr=Gt.x+li,$r=Gt.y+gr,Dr=Gr+Tn,Xr=$r+Zr,ti=Math.max(Gr,Fr.left),rr=Math.max($r,Fr.top),_r=Math.min(Dr,Fr.right),Er=Math.min(Xr,Fr.bottom);return Math.max(0,(_r-ti)*(Er-rr))},si=function(){dt=Gt.y+st,jt=dt+Zr,Nt=Gt.x+Le,wt=Nt+Tn};var _t,Pe,Wt,St,vt=Fe,dn=vt.ownerDocument,hn=he(vt),Ot=hn.getComputedStyle(vt),Ln=Ot.position,qn=vt.style.left,sn=vt.style.top,Mn=vt.style.right,ut=vt.style.bottom,nt=vt.style.overflow,ze=(0,V.Z)((0,V.Z)({},Ze[Ne]),ee),ne=dn.createElement("div");(_t=vt.parentElement)===null||_t===void 0||_t.appendChild(ne),ne.style.left="".concat(vt.offsetLeft,"px"),ne.style.top="".concat(vt.offsetTop,"px"),ne.style.position=Ln,ne.style.height="".concat(vt.offsetHeight,"px"),ne.style.width="".concat(vt.offsetWidth,"px"),vt.style.left="0",vt.style.top="0",vt.style.right="auto",vt.style.bottom="auto",vt.style.overflow="hidden";var me;if(Array.isArray(j))me={x:j[0],y:j[1],width:0,height:0};else{var Ie,Ue,ke=j.getBoundingClientRect();ke.x=(Ie=ke.x)!==null&&Ie!==void 0?Ie:ke.left,ke.y=(Ue=ke.y)!==null&&Ue!==void 0?Ue:ke.top,me={x:ke.x,y:ke.y,width:ke.width,height:ke.height}}var Gt=vt.getBoundingClientRect(),_n=hn.getComputedStyle(vt),wn=_n.height,$n=_n.width;Gt.x=(Pe=Gt.x)!==null&&Pe!==void 0?Pe:Gt.left,Gt.y=(Wt=Gt.y)!==null&&Wt!==void 0?Wt:Gt.top;var mr=dn.documentElement,sr=mr.clientWidth,lr=mr.clientHeight,zn=mr.scrollWidth,Lr=mr.scrollHeight,Sr=mr.scrollTop,xr=mr.scrollLeft,Zr=Gt.height,Tn=Gt.width,fn=me.height,Zn=me.width,vr={left:0,top:0,right:sr,bottom:lr},Hr={left:-xr,top:-Sr,right:zn-xr,bottom:Lr-Sr},it=ze.htmlRegion,tt="visible",mn="visibleFirst";it!=="scroll"&&it!==mn&&(it=tt);var Jt=it===mn,Bn=W(Hr,ot),xn=W(vr,ot),vn=it===tt?xn:Bn,yn=Jt?xn:vn;vt.style.left="auto",vt.style.top="auto",vt.style.right="0",vt.style.bottom="0";var Qn=vt.getBoundingClientRect();vt.style.left=qn,vt.style.top=sn,vt.style.right=Mn,vt.style.bottom=ut,vt.style.overflow=nt,(St=vt.parentElement)===null||St===void 0||St.removeChild(ne);var bn=E(Math.round(Tn/parseFloat($n)*1e3)/1e3),Un=E(Math.round(Zr/parseFloat(wn)*1e3)/1e3);if(bn===0||Un===0||(0,le.Sh)(j)&&!(0,Y.Z)(j))return;var Sn=ze.offset,Tt=ze.targetOffset,Dt=Ve(Gt,Sn),$e=(0,fe.Z)(Dt,2),ft=$e[0],Qt=$e[1],Lt=Ve(me,Tt),on=(0,fe.Z)(Lt,2),Cn=on[0],pn=on[1];me.x-=Cn,me.y-=pn;var Hn=ze.points||[],Xn=(0,fe.Z)(Hn,2),Jn=Xn[0],yt=Xn[1],On=Ke(yt),Kn=Ke(Jn),Q=Ct(me,On),K=Ct(Gt,Kn),Ee=(0,V.Z)({},ze),Le=Q.x-K.x+ft,st=Q.y-K.y+Qt,rt=ai(Le,st),Ft=ai(Le,st,xn),Ht=Ct(me,["t","l"]),an=Ct(Gt,["t","l"]),Xt=Ct(me,["b","r"]),Kt=Ct(Gt,["b","r"]),en=ze.overflow||{},pe=en.adjustX,Ye=en.adjustY,Ge=en.shiftX,et=en.shiftY,lt=function(gr){return typeof gr=="boolean"?gr:gr>=0},dt,jt,Nt,wt;si();var Je=lt(Ye),At=Kn[0]===On[0];if(Je&&Kn[0]==="t"&&(jt>yn.bottom||Xe.current.bt)){var Bt=st;At?Bt-=Zr-fn:Bt=Ht.y-Kt.y-Qt;var mt=ai(Le,Bt),bt=ai(Le,Bt,xn);mt>rt||mt===rt&&(!Jt||bt>=Ft)?(Xe.current.bt=!0,st=Bt,Qt=-Qt,Ee.points=[Rt(Kn,0),Rt(On,0)]):Xe.current.bt=!1}if(Je&&Kn[0]==="b"&&(dt<yn.top||Xe.current.tb)){var An=st;At?An+=Zr-fn:An=Xt.y-an.y-Qt;var En=ai(Le,An),In=ai(Le,An,xn);En>rt||En===rt&&(!Jt||In>=Ft)?(Xe.current.tb=!0,st=An,Qt=-Qt,Ee.points=[Rt(Kn,0),Rt(On,0)]):Xe.current.tb=!1}var jn=lt(pe),tr=Kn[1]===On[1];if(jn&&Kn[1]==="l"&&(wt>yn.right||Xe.current.rl)){var Yn=Le;tr?Yn-=Tn-Zn:Yn=Ht.x-Kt.x-ft;var ar=ai(Yn,st),Pn=ai(Yn,st,xn);ar>rt||ar===rt&&(!Jt||Pn>=Ft)?(Xe.current.rl=!0,Le=Yn,ft=-ft,Ee.points=[Rt(Kn,1),Rt(On,1)]):Xe.current.rl=!1}if(jn&&Kn[1]==="r"&&(Nt<yn.left||Xe.current.lr)){var yr=Le;tr?yr+=Tn-Zn:yr=Xt.x-an.x-ft;var ir=ai(yr,st),Kr=ai(yr,st,xn);ir>rt||ir===rt&&(!Jt||Kr>=Ft)?(Xe.current.lr=!0,Le=yr,ft=-ft,Ee.points=[Rt(Kn,1),Rt(On,1)]):Xe.current.lr=!1}si();var fr=Ge===!0?0:Ge;typeof fr=="number"&&(Nt<xn.left&&(Le-=Nt-xn.left-ft,me.x+Zn<xn.left+fr&&(Le+=me.x-xn.left+Zn-fr)),wt>xn.right&&(Le-=wt-xn.right-ft,me.x>xn.right-fr&&(Le+=me.x-xn.right+fr)));var hr=et===!0?0:et;typeof hr=="number"&&(dt<xn.top&&(st-=dt-xn.top-Qt,me.y+fn<xn.top+hr&&(st+=me.y-xn.top+fn-hr)),jt>xn.bottom&&(st-=jt-xn.bottom-Qt,me.y>xn.bottom-hr&&(st+=me.y-xn.bottom+hr)));var Tr=Gt.x+Le,kn=Tr+Tn,pr=Gt.y+st,cr=pr+Zr,Wn=me.x,ur=Wn+Zn,Ir=me.y,Vr=Ir+fn,Ur=Math.max(Tr,Wn),or=Math.min(kn,ur),hi=(Ur+or)/2,Ki=hi-Tr,Ji=Math.max(pr,Ir),ds=Math.min(cr,Vr),ss=(Ji+ds)/2,zi=ss-pr;O==null||O(Fe,Ee);var ii=Qn.right-Gt.x-(Le+Gt.width),ci=Qn.bottom-Gt.y-(st+Gt.height);bn===1&&(Le=Math.round(Le),ii=Math.round(ii)),Un===1&&(st=Math.round(st),ci=Math.round(ci));var Pi={ready:!0,offsetX:Le/bn,offsetY:st/Un,offsetR:ii/bn,offsetB:ci/Un,arrowX:Ki/bn,arrowY:zi/Un,scaleX:bn,scaleY:Un,align:Ee};Be(Pi)}}),kt=function(){Se.current+=1;var Pe=Se.current;Promise.resolve().then(function(){Se.current===Pe&&qe()})},gt=function(){Be(function(Pe){return(0,V.Z)((0,V.Z)({},Pe),{},{ready:!1})})};return(0,_.Z)(gt,[Ne]),(0,_.Z)(function(){Oe||gt()},[Oe]),[Ae.ready,Ae.offsetX,Ae.offsetY,Ae.offsetR,Ae.offsetB,Ae.arrowX,Ae.arrowY,Ae.scaleX,Ae.scaleY,Ae.align,kt]}var rn=x(3300);function He(Oe,Fe,j,Ne,Ze){(0,_.Z)(function(){if(Oe&&Fe&&j){let Se=function(){Ne(),Ze()};var ee=Fe,O=j,ue=re(ee),De=re(O),Ae=he(O),Be=new Set([Ae].concat((0,rn.Z)(ue),(0,rn.Z)(De)));return Be.forEach(function(ot){ot.addEventListener("scroll",Se,{passive:!0})}),Ae.addEventListener("resize",Se,{passive:!0}),Ne(),function(){Be.forEach(function(ot){ot.removeEventListener("scroll",Se),Ae.removeEventListener("resize",Se)})}}},[Oe,Fe,j])}var ln=x(48736);function It(Oe,Fe,j,Ne,Ze,ee,O,ue){var De=b.useRef(Oe);De.current=Oe;var Ae=b.useRef(!1);b.useEffect(function(){if(Fe&&Ne&&(!Ze||ee)){var Se=function(){Ae.current=!1},ot=function(Wt){var St;De.current&&!O(((St=Wt.composedPath)===null||St===void 0||(St=St.call(Wt))===null||St===void 0?void 0:St[0])||Wt.target)&&!Ae.current&&ue(!1)},Xe=he(Ne);Xe.addEventListener("pointerdown",Se,!0),Xe.addEventListener("mousedown",ot,!0),Xe.addEventListener("contextmenu",ot,!0);var je=(0,o.A)(j);if(je&&(je.addEventListener("mousedown",ot,!0),je.addEventListener("contextmenu",ot,!0)),0)var qe,kt,gt,_t;return function(){Xe.removeEventListener("pointerdown",Se,!0),Xe.removeEventListener("mousedown",ot,!0),Xe.removeEventListener("contextmenu",ot,!0),je&&(je.removeEventListener("mousedown",ot,!0),je.removeEventListener("contextmenu",ot,!0))}}},[Fe,j,Ne,Ze,ee]);function Be(){Ae.current=!0}return Be}var cn=["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 xt(){var Oe=arguments.length>0&&arguments[0]!==void 0?arguments[0]:ge.Z,Fe=b.forwardRef(function(j,Ne){var Ze=j.prefixCls,ee=Ze===void 0?"rc-trigger-popup":Ze,O=j.children,ue=j.action,De=ue===void 0?"hover":ue,Ae=j.showAction,Be=j.hideAction,Se=j.popupVisible,ot=j.defaultPopupVisible,Xe=j.onPopupVisibleChange,je=j.afterPopupVisibleChange,qe=j.mouseEnterDelay,kt=j.mouseLeaveDelay,gt=kt===void 0?.1:kt,_t=j.focusDelay,Pe=j.blurDelay,Wt=j.mask,St=j.maskClosable,vt=St===void 0?!0:St,dn=j.getPopupContainer,hn=j.forceRender,Ot=j.autoDestroy,Ln=j.destroyPopupOnHide,qn=j.popup,sn=j.popupClassName,Mn=j.popupStyle,ut=j.popupPlacement,nt=j.builtinPlacements,ze=nt===void 0?{}:nt,ne=j.popupAlign,me=j.zIndex,Ie=j.stretch,Ue=j.getPopupClassNameFromAlign,ke=j.fresh,Gt=j.alignPoint,_n=j.onPopupClick,wn=j.onPopupAlign,$n=j.arrow,mr=j.popupMotion,sr=j.maskMotion,lr=j.popupTransitionName,zn=j.popupAnimation,Lr=j.maskTransitionName,Sr=j.maskAnimation,xr=j.className,Zr=j.getTriggerDOMNode,Tn=(0,Ce.Z)(j,cn),fn=Ot||Ln||!1,Zn=b.useState(!1),vr=(0,fe.Z)(Zn,2),Hr=vr[0],it=vr[1];(0,_.Z)(function(){it((0,w.Z)())},[]);var tt=b.useRef({}),mn=b.useContext(we),Jt=b.useMemo(function(){return{registerSubPopup:function(_r,Er){tt.current[_r]=Er,mn==null||mn.registerSubPopup(_r,Er)}}},[mn]),Bn=(0,U.Z)(),xn=b.useState(null),vn=(0,fe.Z)(xn,2),yn=vn[0],Qn=vn[1],bn=b.useRef(null),Un=(0,S.Z)(function(rr){bn.current=rr,(0,le.Sh)(rr)&&yn!==rr&&Qn(rr),mn==null||mn.registerSubPopup(Bn,rr)}),Sn=b.useState(null),Tt=(0,fe.Z)(Sn,2),Dt=Tt[0],$e=Tt[1],ft=b.useRef(null),Qt=(0,S.Z)(function(rr){(0,le.Sh)(rr)&&Dt!==rr&&($e(rr),ft.current=rr)}),Lt=b.Children.only(O),on=(Lt==null?void 0:Lt.props)||{},Cn={},pn=(0,S.Z)(function(rr){var _r,Er,ui=Dt;return(ui==null?void 0:ui.contains(rr))||((_r=(0,o.A)(ui))===null||_r===void 0?void 0:_r.host)===rr||rr===ui||(yn==null?void 0:yn.contains(rr))||((Er=(0,o.A)(yn))===null||Er===void 0?void 0:Er.host)===rr||rr===yn||Object.values(tt.current).some(function(fi){return(fi==null?void 0:fi.contains(rr))||rr===fi})}),Hn=q(ee,mr,zn,lr),Xn=q(ee,sr,Sr,Lr),Jn=b.useState(ot||!1),yt=(0,fe.Z)(Jn,2),On=yt[0],Kn=yt[1],Q=Se!=null?Se:On,K=(0,S.Z)(function(rr){Se===void 0&&Kn(rr)});(0,_.Z)(function(){Kn(Se||!1)},[Se]);var Ee=b.useRef(Q);Ee.current=Q;var Le=b.useRef([]);Le.current=[];var st=(0,S.Z)(function(rr){var _r;K(rr),((_r=Le.current[Le.current.length-1])!==null&&_r!==void 0?_r:Q)!==rr&&(Le.current.push(rr),Xe==null||Xe(rr))}),rt=b.useRef(),Ft=function(){clearTimeout(rt.current)},Ht=function(_r){var Er=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0;Ft(),Er===0?st(_r):rt.current=setTimeout(function(){st(_r)},Er*1e3)};b.useEffect(function(){return Ft},[]);var an=b.useState(!1),Xt=(0,fe.Z)(an,2),Kt=Xt[0],en=Xt[1];(0,_.Z)(function(rr){(!rr||Q)&&en(!0)},[Q]);var pe=b.useState(null),Ye=(0,fe.Z)(pe,2),Ge=Ye[0],et=Ye[1],lt=b.useState(null),dt=(0,fe.Z)(lt,2),jt=dt[0],Nt=dt[1],wt=function(_r){Nt([_r.clientX,_r.clientY])},Je=Vt(Q,yn,Gt&&jt!==null?jt:Dt,ut,ze,ne,wn),At=(0,fe.Z)(Je,11),Bt=At[0],mt=At[1],bt=At[2],An=At[3],En=At[4],In=At[5],jn=At[6],tr=At[7],Yn=At[8],ar=At[9],Pn=At[10],yr=Re(Hr,De,Ae,Be),ir=(0,fe.Z)(yr,2),Kr=ir[0],fr=ir[1],hr=Kr.has("click"),Tr=fr.has("click")||fr.has("contextMenu"),kn=(0,S.Z)(function(){Kt||Pn()}),pr=function(){Ee.current&&Gt&&Tr&&Ht(!1)};He(Q,Dt,yn,kn,pr),(0,_.Z)(function(){kn()},[jt,ut]),(0,_.Z)(function(){Q&&!(ze!=null&&ze[ut])&&kn()},[JSON.stringify(ne)]);var cr=b.useMemo(function(){var rr=te(ze,ee,ar,Gt);return g()(rr,Ue==null?void 0:Ue(ar))},[ar,Ue,ze,ee,Gt]);b.useImperativeHandle(Ne,function(){return{nativeElement:ft.current,popupElement:bn.current,forceAlign:kn}});var Wn=b.useState(0),ur=(0,fe.Z)(Wn,2),Ir=ur[0],Vr=ur[1],Ur=b.useState(0),or=(0,fe.Z)(Ur,2),hi=or[0],Ki=or[1],Ji=function(){if(Ie&&Dt){var _r=Dt.getBoundingClientRect();Vr(_r.width),Ki(_r.height)}},ds=function(){Ji(),kn()},ss=function(_r){en(!1),Pn(),je==null||je(_r)},zi=function(){return new Promise(function(_r){Ji(),et(function(){return _r})})};(0,_.Z)(function(){Ge&&(Pn(),Ge(),et(null))},[Ge]);function ii(rr,_r,Er,ui){Cn[rr]=function(fi){var Gi;ui==null||ui(fi),Ht(_r,Er);for(var as=arguments.length,Bi=new Array(as>1?as-1:0),ls=1;ls<as;ls++)Bi[ls-1]=arguments[ls];(Gi=on[rr])===null||Gi===void 0||Gi.call.apply(Gi,[on,fi].concat(Bi))}}(hr||Tr)&&(Cn.onClick=function(rr){var _r;Ee.current&&Tr?Ht(!1):!Ee.current&&hr&&(wt(rr),Ht(!0));for(var Er=arguments.length,ui=new Array(Er>1?Er-1:0),fi=1;fi<Er;fi++)ui[fi-1]=arguments[fi];(_r=on.onClick)===null||_r===void 0||_r.call.apply(_r,[on,rr].concat(ui))});var ci=It(Q,Tr,Dt,yn,Wt,vt,pn,Ht),Pi=Kr.has("hover"),ai=fr.has("hover"),si,li;Pi&&(ii("onMouseEnter",!0,qe,function(rr){wt(rr)}),ii("onPointerEnter",!0,qe,function(rr){wt(rr)}),si=function(_r){(Q||Kt)&&yn!==null&&yn!==void 0&&yn.contains(_r.target)&&Ht(!0,qe)},Gt&&(Cn.onMouseMove=function(rr){var _r;(_r=on.onMouseMove)===null||_r===void 0||_r.call(on,rr)})),ai&&(ii("onMouseLeave",!1,gt),ii("onPointerLeave",!1,gt),li=function(){Ht(!1,gt)}),Kr.has("focus")&&ii("onFocus",!0,_t),fr.has("focus")&&ii("onBlur",!1,Pe),Kr.has("contextMenu")&&(Cn.onContextMenu=function(rr){var _r;Ee.current&&fr.has("contextMenu")?Ht(!1):(wt(rr),Ht(!0)),rr.preventDefault();for(var Er=arguments.length,ui=new Array(Er>1?Er-1:0),fi=1;fi<Er;fi++)ui[fi-1]=arguments[fi];(_r=on.onContextMenu)===null||_r===void 0||_r.call.apply(_r,[on,rr].concat(ui))}),xr&&(Cn.className=g()(on.className,xr));var gr=b.useRef(!1);gr.current||(gr.current=hn||Q||Kt);var Fr=(0,V.Z)((0,V.Z)({},on),Cn),Gr={},$r=["onContextMenu","onClick","onMouseDown","onTouchStart","onMouseEnter","onMouseLeave","onFocus","onBlur"];$r.forEach(function(rr){Tn[rr]&&(Gr[rr]=function(){for(var _r,Er=arguments.length,ui=new Array(Er),fi=0;fi<Er;fi++)ui[fi]=arguments[fi];(_r=Fr[rr])===null||_r===void 0||_r.call.apply(_r,[Fr].concat(ui)),Tn[rr].apply(Tn,ui)})});var Dr=b.cloneElement(Lt,(0,V.Z)((0,V.Z)({},Fr),Gr)),Xr={x:In,y:jn},ti=$n?(0,V.Z)({},$n!==!0?$n:{}):null;return b.createElement(b.Fragment,null,b.createElement(ye.Z,{disabled:!Q,ref:Qt,onResize:ds},b.createElement(ie,{getTriggerDOMNode:Zr},Dr)),gr.current&&b.createElement(we.Provider,{value:Jt},b.createElement(oe,{portal:Oe,ref:Un,prefixCls:ee,popup:qn,className:g()(sn,cr),style:Mn,target:Dt,onMouseEnter:si,onMouseLeave:li,onPointerEnter:si,zIndex:me,open:Q,keepDom:Kt,fresh:ke,onClick:_n,onPointerDownCapture:ci,mask:Wt,motion:Hn,maskMotion:Xn,onVisibleChanged:ss,onPrepare:zi,forceRender:hn,autoDestroy:fn,getPopupContainer:dn,align:ar,arrow:ti,arrowPos:Xr,ready:Bt,offsetX:mt,offsetY:bt,offsetR:An,offsetB:En,onAlign:kn,stretch:Ie,targetWidth:Ir/tr,targetHeight:hi/Yn})))});return Fe}var ht=xt(ge.Z)},57884:function(Vn,ct,x){"use strict";var V=x(59301),fe=x(93314),Ce=x(99571),ge=Object.defineProperty,G=Object.defineProperties,g=Object.getOwnPropertyDescriptors,ye=Object.getOwnPropertySymbols,le=Object.prototype.hasOwnProperty,o=Object.prototype.propertyIsEnumerable,S=(b,R,M)=>R in b?ge(b,R,{enumerable:!0,configurable:!0,writable:!0,value:M}):b[R]=M,U=(b,R)=>{for(var M in R||(R={}))le.call(R,M)&&S(b,M,R[M]);if(ye)for(var M of ye(R))o.call(R,M)&&S(b,M,R[M]);return b},_=(b,R)=>G(b,g(R));const w=({img:b,buttonProps:R={},styles:M={},customText:H,ButtonText:J,ButtonClick:T,Buttonclass:N,ButtonTwo:P,imgStyles:k,loading:oe=!1,className:de=""})=>V.createElement("section",{className:`tc animated fadeIn ${de}`,style:U({color:"#999",margin:"100px auto",visibility:oe?"hidden":"visible"},M)},V.createElement("img",{src:b||fe,style:_(U({},k),{pointerEvents:"none",userSelect:"none"})}),V.createElement("p",{className:"mt20 font14"},H||"\u6682\u65F6\u8FD8\u6CA1\u6709\u76F8\u5173\u6570\u636E\u54E6!"),J&&V.createElement(Ce.ZP,U({className:N,onClick:T},R),J),P&&P);ct.Z=w},41550:function(Vn,ct,x){"use strict";x.d(ct,{Z:function(){return N}});var V=x(59301),fe={wrp:"wrp___dq7YK",bgBlack:"bgBlack___ARIUV",monaco:"monaco___VnZC3",darkBlue:"darkBlue___UprA9",close:"close___LKoWu",embed:"embed___hvpEJ"},Ce=x(99571),ge=x(70557),G=x(51124),g=x(25399),ye=x(49661),le=x(72664),o=x(57884),S=x(90524),U=x(14794),_=x(59301),w=Object.defineProperty,b=Object.getOwnPropertySymbols,R=Object.prototype.hasOwnProperty,M=Object.prototype.propertyIsEnumerable,H=(P,k,oe)=>k in P?w(P,k,{enumerable:!0,configurable:!0,writable:!0,value:oe}):P[k]=oe,J=(P,k)=>{for(var oe in k||(k={}))R.call(k,oe)&&H(P,oe,k[oe]);if(b)for(var oe of b(k))M.call(k,oe)&&H(P,oe,k[oe]);return P},T=(P,k,oe)=>new Promise((de,ie)=>{var ae=Re=>{try{Te(oe.next(Re))}catch(Y){ie(Y)}},we=Re=>{try{Te(oe.throw(Re))}catch(Y){ie(Y)}},Te=Re=>Re.done?de(Re.value):Promise.resolve(Re.value).then(ae,we);Te((oe=oe.apply(P,k)).next())}),N=({editOffice:P="view",data:k,issaver:oe,onSaver:de,theme:ie,type:ae,filename:we,monacoEditor:Te,className:Re,style:Y,close:$,onClose:te,hasMask:q,disabledDownload:he,onImgDimensions:re,showNodata:E,recordInfo:C})=>{const[W,be]=(0,V.useState)("https://view.officeapps.live.com/op/view.aspx?src=http://testgs.educoder.net//rails/active_storage/blobs/eyJfcmFpbHMiOnsibWVzc2FnZSI6IkJBaHBCZz09IiwiZXhwIjpudWxsLCJwdXIiOiJibG9iX2lkIn19--03541f6234b93d7ac3b2d84e7eb0e6594a952945/1.ppt"),[Ve,Ke]=(0,V.useState)(""),[Ct,Rt]=(0,V.useState)(),Vt=window.ENV==="build"?"/react/build":"",rn=location.host.startsWith("localhost")?S.Z.PROXY_SERVER:S.Z.API_SERVER,ln=10*(1024*1024),It=(0,V.useRef)();k!=null&&k.startsWith("/api")&&ae!=="txt"&&(k=S.Z.API_SERVER+k);const cn=j=>j.substring(j.lastIndexOf("/")+1).split(".").pop();we&&Te&&(Te.filename=we),(0,V.useEffect)(()=>{var j,Ne;const Ze=(Ne=(j=document.cookie)==null?void 0:j.replace(/\s/g,""))==null?void 0:Ne.split(";");Ze==null||Ze.map(ee=>{let O=ee.split("=");O[0]==="_educoder_session"&&Ke(O[1])})},[]),(0,V.useEffect)(()=>{ae==="office"&&(k.indexOf("bigfilescdn.")>-1||k.indexOf("bigfiles1")>-1?Rt({url:k,fileType:cn(k),model:k.indexOf("model=edit")?"edit":"view"}):ht())},[ae,k]);function xt(j){return T(this,null,function*(){j.data.type==="pdfdata"&&(de(j.data.data),window.removeEventListener("message",xt,!1)),console.log("mess---:",j.data)})}const ht=()=>T(void 0,null,function*(){console.log("data:",k);let j=k;k.startsWith("http")||(j=location.origin+j);let Ne=new URL(j).pathname.split("/").pop();const Ze=yield(0,le.gJ)({attachment_id:Ne});Ze.url=rn+Ze.url,Rt(Ze)}),Oe=()=>{if(k.startsWith("http")||k.startsWith("blob:")){Fe();return}(0,ye.Sv)(we||"educoder",k,we)},Fe=()=>{C&&(0,U.fc)({id:C==null?void 0:C.id,watch_type:1,course_id:C==null?void 0:C.course_id}),(0,ye.Nd)(we||"educoder",decodeURIComponent(k))};return _.createElement("div",{style:J({},Y||{}),className:`${q&&fe.bgBlack} ${ae?fe.wrp:"hide"}`},$&&_.createElement("div",{className:fe.close,ref:It},!!re&&_.createElement(g.Z,{title:"\u70B9\u51FB\u5BF9\u56FE\u7247\u8FDB\u884C\u6279\u6CE8",getPopupContainer:()=>It.current},_.createElement("span",{onClick:()=>{te(),re()}},_.createElement("i",{className:"icon-yulanpizhu"}))),!he&&_.createElement(g.Z,{title:"\u70B9\u51FB\u4E0B\u8F7D\u6B64\u6587\u4EF6",getPopupContainer:()=>It.current},_.createElement("span",{onClick:Fe},_.createElement("i",{className:"icon-quxiaozhiding"}))),oe&&_.createElement(g.Z,{title:"\u4FDD\u5B58pdf\u5E76\u9000\u51FA",getPopupContainer:()=>It.current},_.createElement("span",{className:"",onClick:()=>{const j=document.getElementById("pdfiframe");window.addEventListener("message",xt,!1),setTimeout(()=>{j.contentWindow.postMessage("getData","*")},300)}},_.createElement("i",{className:"icon-baocun"}))),_.createElement(g.Z,{title:"\u5173\u95ED",getPopupContainer:()=>It.current},_.createElement("span",{className:"",onClick:()=>{te()}},_.createElement("i",{className:"icon-guanbi1"})))),_.createElement("div",{className:`${fe[Re]} ${Re} ${fe.monaco} ${ae==="txt"?"show":"hide"}`},ae==="txt"&&_.createElement(_.Fragment,null,_.createElement(G.ZP,J({},Te)))),ae==="audio"&&_.createElement("audio",{src:`${(k==null?void 0:k.indexOf("http://"))>-1||(k==null?void 0:k.indexOf("https://"))>-1?"":"data:audio/mp3;base64,"}${k}`,autoPlay:!0}),ae==="video"&&_.createElement(_.Fragment,null,(k==null?void 0:k.indexOf("http"))>-1?_.createElement("video",{controls:!0,src:`${k}`,autoPlay:!0}):_.createElement("video",{controls:!0,src:`data:video/mp4;base64,${k}`,autoPlay:!0})),ae==="office"&&Ct&&_.createElement("iframe",{src:`${Vt}/office.html?key=${Ct.key}&url=${btoa(Ct.url)}&callbackUrl=${rn+(Ct.callbackUrl||"")}&fileType=${Ct.fileType}&title=${Ct.title||""}&model=${P}&officeServer=${S.Z.ONLYOFFICE}&disabledDownload=${!!he}`}),ae==="html"&&_.createElement("iframe",{src:k+"&disposition=inline"}),ae==="pdf"&&_.createElement("iframe",{id:"pdfiframe",src:`${Vt}/js/pdfview/index.html?filename=${we||"educoder.pdf"}&url=${encodeURIComponent(k)}&disabledDownload=${!!he}&model=${P}`}),ae==="image"&&_.createElement("img",{src:`${(k==null?void 0:k.indexOf("http://"))>-1||(k==null?void 0:k.indexOf("https://"))>-1?"":"data:image/png;base64,"}${k}`}),(ae==="other"||ae==="download")&&_.createElement(_.Fragment,null,E?_.createElement(o.Z,{customText:"\u5F53\u524D\u6587\u4EF6\u4E0D\u652F\u6301\u9884\u89C8\uFF0C\u53EF\u70B9\u51FB\u4E0B\u8F7D\u67E5\u770B",ButtonTwo:_.createElement(Ce.ZP,{icon:_.createElement("i",{className:"iconfont icon-xiazai4 font14"}),type:"primary",size:"middle",onClick:Oe,disabled:he},"\u4E0B\u8F7D")}):_.createElement(Ce.ZP,{type:"primary",size:"middle",onClick:Oe,disabled:he},_.createElement(ge.Z,null),"\u70B9\u51FB\u4E0B\u8F7D")),ae==="flowChart"&&_.createElement("div",{className:"embed"},_.createElement("iframe",{src:`/drawio/src/main/webapp/viewer.html?id=${k||""}&gapi=0&od=0&db=0&gh=0&gl=0`,width:"100%",height:"100%",frameBorder:"0"})))}},38394:function(Vn,ct,x){"use strict";x.d(ct,{z:function(){return Te},Z:function(){return Re}});var V=x(59301),fe=x(88831),Ce=x(90290),ge=x(64018),G=x(68535),g=x(90524),ye=x(49661),le=x(15342),o=x(77736),S=x(99571),U=x(1012),_=x(41550),w=x(59301),R=({html:Y})=>{const $=(0,V.useRef)(null),te=(0,V.useRef)(null),q=`.markdown-body p {
|
|
margin: 0 0 16px 0 !important;
|
|
line-height: 28px;
|
|
white-space: pre-wrap;
|
|
}
|
|
|
|
ol,
|
|
ul,
|
|
li {
|
|
list-style-type: none
|
|
}
|
|
|
|
ol,
|
|
ul,
|
|
dl {
|
|
margin-bottom: 0px;
|
|
}
|
|
|
|
.markdown-body {
|
|
-ms-text-size-adjust: 100%;
|
|
-webkit-text-size-adjust: 100%;
|
|
color: #333;
|
|
overflow: hidden;
|
|
font-family: "Microsoft YaHei", Helvetica, "Meiryo UI", "Malgun Gothic", "Segoe UI", "Trebuchet MS", "Monaco", monospace, Tahoma, STXihei, "\u534E\u6587\u7EC6\u9ED1", STHeiti, "Helvetica Neue", "Droid Sans", "wenquanyi micro hei", FreeSans, Arimo, Arial, SimSun, "\u5B8B\u4F53", Heiti, "\u9ED1\u4F53", sans-serif;
|
|
word-break: break-word;
|
|
font-size: 16px;
|
|
line-height: 1.6;
|
|
white-space: normal;
|
|
word-wrap: break-word;
|
|
position: relative;
|
|
}
|
|
|
|
.markdown-body ul>li {
|
|
list-style-type: disc;
|
|
}
|
|
|
|
.markdown-body ol>li {
|
|
list-style-type: decimal;
|
|
}
|
|
|
|
.markdown-body a {
|
|
background: transparent;
|
|
}
|
|
|
|
.markdown-body a:active,
|
|
.markdown-body a:hover {
|
|
outline: 0;
|
|
}
|
|
|
|
.markdown-body strong {
|
|
font-weight: bold;
|
|
}
|
|
|
|
.markdown-body h1 {
|
|
font-size: 2em;
|
|
margin: 0.67em 0;
|
|
}
|
|
|
|
.markdown-body img {
|
|
border: 0;
|
|
}
|
|
|
|
.markdown-body hr {
|
|
-moz-box-sizing: content-box;
|
|
box-sizing: content-box;
|
|
height: 0;
|
|
}
|
|
|
|
.markdown-body pre {
|
|
overflow: auto;
|
|
}
|
|
|
|
.markdown-body code,
|
|
.markdown-body kbd,
|
|
.markdown-body pre {
|
|
font-family: "Meiryo UI", "YaHei Consolas Hybrid", Consolas, "Malgun Gothic", "Segoe UI", "Trebuchet MS", Helvetica, monospace, monospace;
|
|
font-size: 1em;
|
|
}
|
|
|
|
.markdown-body input {
|
|
color: inherit;
|
|
font: inherit;
|
|
margin: 0;
|
|
}
|
|
|
|
.markdown-body html input[disabled] {
|
|
cursor: default;
|
|
}
|
|
|
|
.markdown-body input {
|
|
line-height: normal;
|
|
}
|
|
|
|
.markdown-body input[type="checkbox"] {
|
|
-moz-box-sizing: border-box;
|
|
box-sizing: border-box;
|
|
padding: 0;
|
|
}
|
|
|
|
.markdown-body table {
|
|
border-collapse: collapse;
|
|
border-spacing: 0;
|
|
}
|
|
|
|
.markdown-body td,
|
|
.markdown-body th {
|
|
padding: 0;
|
|
}
|
|
|
|
.markdown-body * {
|
|
-moz-box-sizing: border-box;
|
|
box-sizing: border-box;
|
|
}
|
|
|
|
.markdown-body input {
|
|
font: 13px/1.4 Helvetica, arial, freesans, clean, sans-serif, "Segoe UI Emoji", "Segoe UI Symbol";
|
|
}
|
|
|
|
.markdown-body a {
|
|
color: #4183c4;
|
|
text-decoration: none;
|
|
}
|
|
|
|
.markdown-body a:hover,
|
|
.markdown-body a:active {
|
|
text-decoration: underline;
|
|
}
|
|
|
|
.markdown-body hr {
|
|
height: 0;
|
|
margin: 15px 0;
|
|
overflow: hidden;
|
|
background: transparent;
|
|
border: 0;
|
|
border-bottom: 1px solid #ddd;
|
|
}
|
|
|
|
.markdown-body hr:before {
|
|
display: table;
|
|
content: "";
|
|
}
|
|
|
|
.markdown-body hr:after {
|
|
display: table;
|
|
clear: both;
|
|
content: "";
|
|
}
|
|
|
|
.markdown-body h1,
|
|
.markdown-body h2,
|
|
.markdown-body h3,
|
|
.markdown-body h4,
|
|
.markdown-body h5,
|
|
.markdown-body h6 {
|
|
margin-top: 15px;
|
|
margin-bottom: 15px;
|
|
line-height: 1.1;
|
|
}
|
|
|
|
.markdown-body h1 {
|
|
font-size: 30px;
|
|
}
|
|
|
|
.markdown-body h2 {
|
|
font-size: 21px;
|
|
}
|
|
|
|
.markdown-body h3 {
|
|
font-size: 16px;
|
|
}
|
|
|
|
.markdown-body h4 {
|
|
font-size: 14px;
|
|
}
|
|
|
|
.markdown-body h5 {
|
|
font-size: 12px;
|
|
}
|
|
|
|
.markdown-body h6 {
|
|
font-size: 11px;
|
|
}
|
|
|
|
.markdown-body blockquote {
|
|
margin: 0;
|
|
}
|
|
|
|
.markdown-body ul,
|
|
.markdown-body ol {
|
|
padding: 0;
|
|
margin-top: 0;
|
|
margin-bottom: 0;
|
|
}
|
|
|
|
ul.linenums,
|
|
ol.linenums {
|
|
padding: 16px 0 0 56px !important;
|
|
}
|
|
|
|
.markdown-body ul,
|
|
.markdown-body ol {
|
|
padding-left: 2em;
|
|
}
|
|
|
|
|
|
.markdown-body ol ol,
|
|
.markdown-body ul ol {
|
|
list-style-type: lower-roman;
|
|
}
|
|
|
|
.markdown-body ul ul ol,
|
|
.markdown-body ul ol ol,
|
|
.markdown-body ol ul ol,
|
|
.markdown-body ol ol ol {
|
|
list-style-type: lower-alpha;
|
|
}
|
|
|
|
.markdown-body dd {
|
|
margin-left: 0;
|
|
}
|
|
|
|
.markdown-body code {
|
|
font-family: Consolas, "Liberation Mono", Menlo, Courier, monospace;
|
|
font-size: 12px;
|
|
}
|
|
|
|
.markdown-body pre {
|
|
margin-top: 0;
|
|
margin-bottom: 0;
|
|
font: 12px Consolas, "Liberation Mono", Menlo, Courier, monospace;
|
|
}
|
|
|
|
.markdown-body .octicon {
|
|
font: normal normal 16px octicons-anchor;
|
|
line-height: 1;
|
|
display: inline-block;
|
|
text-decoration: none;
|
|
-webkit-font-smoothing: antialiased;
|
|
-moz-osx-font-smoothing: grayscale;
|
|
-webkit-user-select: none;
|
|
-moz-user-select: none;
|
|
-ms-user-select: none;
|
|
user-select: none;
|
|
}
|
|
|
|
.markdown-body .octicon-link:before {
|
|
content: '\f05c';
|
|
}
|
|
|
|
.markdown-body>*:first-child {
|
|
margin-top: 0 !important;
|
|
}
|
|
|
|
.markdown-body>*:last-child {
|
|
margin-bottom: 0 !important;
|
|
}
|
|
|
|
.markdown-body .anchor {
|
|
position: absolute;
|
|
top: 0;
|
|
left: 0;
|
|
display: block;
|
|
padding-right: 6px;
|
|
padding-left: 30px;
|
|
margin-left: -30px;
|
|
}
|
|
|
|
.markdown-body .anchor:focus {
|
|
outline: none;
|
|
}
|
|
|
|
.markdown-body h1,
|
|
.markdown-body h2,
|
|
.markdown-body h3,
|
|
.markdown-body h4,
|
|
.markdown-body h5,
|
|
.markdown-body h6 {
|
|
position: relative;
|
|
margin-top: 1em;
|
|
margin-bottom: 16px;
|
|
font-weight: bold;
|
|
line-height: 1.4;
|
|
}
|
|
|
|
.markdown-body h1 .octicon-link,
|
|
.markdown-body h2 .octicon-link,
|
|
.markdown-body h3 .octicon-link,
|
|
.markdown-body h4 .octicon-link,
|
|
.markdown-body h5 .octicon-link,
|
|
.markdown-body h6 .octicon-link {
|
|
display: none;
|
|
color: #000;
|
|
vertical-align: middle;
|
|
}
|
|
|
|
.markdown-body h1:hover .anchor,
|
|
.markdown-body h2:hover .anchor,
|
|
.markdown-body h3:hover .anchor,
|
|
.markdown-body h4:hover .anchor,
|
|
.markdown-body h5:hover .anchor,
|
|
.markdown-body h6:hover .anchor {
|
|
padding-left: 8px;
|
|
margin-left: -30px;
|
|
text-decoration: none;
|
|
}
|
|
|
|
.markdown-body h1:hover .anchor .octicon-link,
|
|
.markdown-body h2:hover .anchor .octicon-link,
|
|
.markdown-body h3:hover .anchor .octicon-link,
|
|
.markdown-body h4:hover .anchor .octicon-link,
|
|
.markdown-body h5:hover .anchor .octicon-link,
|
|
.markdown-body h6:hover .anchor .octicon-link {
|
|
display: inline-block;
|
|
}
|
|
|
|
.markdown-body h1 {
|
|
padding-bottom: 0.3em;
|
|
font-size: 2.25em;
|
|
line-height: 1.2;
|
|
border-bottom: 1px solid #eee;
|
|
}
|
|
|
|
.markdown-body h1 .anchor {
|
|
line-height: 1;
|
|
}
|
|
|
|
.markdown-body h2 {
|
|
padding-bottom: 0.3em;
|
|
font-size: 1.75em;
|
|
line-height: 1.225;
|
|
border-bottom: 1px solid #eee;
|
|
}
|
|
|
|
.markdown-body h2 .anchor {
|
|
line-height: 1;
|
|
}
|
|
|
|
.markdown-body h3 {
|
|
font-size: 1.5em;
|
|
line-height: 1.43;
|
|
}
|
|
|
|
.markdown-body h3 .anchor {
|
|
line-height: 1.2;
|
|
}
|
|
|
|
.markdown-body h4 {
|
|
font-size: 1.25em;
|
|
}
|
|
|
|
.markdown-body h4 .anchor {
|
|
line-height: 1.2;
|
|
}
|
|
|
|
.markdown-body h5 {
|
|
font-size: 1em;
|
|
}
|
|
|
|
.markdown-body h5 .anchor {
|
|
line-height: 1.1;
|
|
}
|
|
|
|
.markdown-body h6 {
|
|
font-size: 1em;
|
|
color: #777;
|
|
}
|
|
|
|
.markdown-body h6 .anchor {
|
|
line-height: 1.1;
|
|
}
|
|
|
|
.markdown-body p,
|
|
.markdown-body blockquote,
|
|
.markdown-body ul,
|
|
.markdown-body ol,
|
|
.markdown-body dl,
|
|
.markdown-body table,
|
|
.markdown-body pre {
|
|
margin-top: 0;
|
|
margin-bottom: 16px;
|
|
}
|
|
|
|
.markdown-body ul ul,
|
|
.markdown-body ul ol,
|
|
.markdown-body ol ol,
|
|
.markdown-body ol ul {
|
|
margin-top: 0;
|
|
margin-bottom: 0;
|
|
}
|
|
|
|
.markdown-body li>p {
|
|
margin-top: 16px;
|
|
}
|
|
|
|
.markdown-body dl {
|
|
padding: 0;
|
|
}
|
|
|
|
.markdown-body dl dt {
|
|
padding: 0;
|
|
margin-top: 16px;
|
|
font-size: 1em;
|
|
font-style: italic;
|
|
font-weight: bold;
|
|
}
|
|
|
|
.markdown-body dl dd {
|
|
padding: 0 16px;
|
|
margin-bottom: 16px;
|
|
}
|
|
|
|
.markdown-body blockquote {
|
|
padding: 0 15px;
|
|
color: #777;
|
|
border-left: 4px solid #ddd;
|
|
}
|
|
|
|
.markdown-body blockquote> :first-child {
|
|
margin-top: 0;
|
|
}
|
|
|
|
.markdown-body blockquote> :last-child {
|
|
margin-bottom: 0;
|
|
}
|
|
|
|
.markdown-body table {
|
|
display: block;
|
|
width: 100%;
|
|
overflow: auto;
|
|
word-break: normal;
|
|
word-break: keep-all;
|
|
}
|
|
|
|
.markdown-body table th {
|
|
font-weight: bold;
|
|
text-align: revert;
|
|
}
|
|
|
|
.markdown-body table th,
|
|
.markdown-body table td {
|
|
padding: 6px 13px;
|
|
border: 1px solid #ddd;
|
|
}
|
|
|
|
.markdown-body table tr {
|
|
background-color: #fff;
|
|
border-top: 1px solid #ccc;
|
|
}
|
|
|
|
.markdown-body table tr:nth-child(2n) {
|
|
background-color: #f8f8f8;
|
|
}
|
|
|
|
.markdown-body img {
|
|
max-width: 100%;
|
|
-moz-box-sizing: border-box;
|
|
box-sizing: border-box;
|
|
}
|
|
|
|
.markdown-body code {
|
|
padding: 0;
|
|
padding-top: 0.2em;
|
|
padding-bottom: 0.2em;
|
|
margin: 0;
|
|
font-size: 85%;
|
|
background-color: rgba(0, 0, 0, 0.04);
|
|
border-radius: 3px;
|
|
}
|
|
|
|
.markdown-body code:has(.katex) {
|
|
background-color: transparent;
|
|
}
|
|
|
|
.markdown-body code:before,
|
|
.markdown-body code:after {
|
|
letter-spacing: -0.2em;
|
|
content: "\\00a0";
|
|
}
|
|
|
|
.markdown-body pre>code {
|
|
padding: 0;
|
|
margin: 0;
|
|
font-size: 100%;
|
|
word-break: normal;
|
|
white-space: pre;
|
|
background: transparent;
|
|
border: 0;
|
|
}
|
|
|
|
.markdown-body .highlight {
|
|
margin-bottom: 16px;
|
|
}
|
|
|
|
.markdown-body .highlight pre,
|
|
.markdown-body pre {
|
|
padding: 16px;
|
|
overflow: auto;
|
|
font-size: 85%;
|
|
line-height: 1.45;
|
|
background-color: #f7f7f7;
|
|
border-radius: 3px;
|
|
}
|
|
|
|
.markdown-body .highlight pre {
|
|
margin-bottom: 0;
|
|
word-break: normal;
|
|
}
|
|
|
|
.markdown-body pre {
|
|
word-wrap: normal;
|
|
}
|
|
|
|
.markdown-body pre code {
|
|
display: inline;
|
|
max-width: initial;
|
|
padding: 0;
|
|
margin: 0;
|
|
overflow: initial;
|
|
line-height: inherit;
|
|
word-wrap: normal;
|
|
background-color: transparent;
|
|
border: 0;
|
|
}
|
|
|
|
.markdown-body pre code:before,
|
|
.markdown-body pre code:after {
|
|
content: normal;
|
|
}
|
|
|
|
.markdown-body kbd {
|
|
display: inline-block;
|
|
padding: 3px 5px;
|
|
font-size: 11px;
|
|
line-height: 10px;
|
|
color: #555;
|
|
vertical-align: middle;
|
|
background-color: #fcfcfc;
|
|
border: solid 1px #ccc;
|
|
border-bottom-color: #bbb;
|
|
border-radius: 3px;
|
|
box-shadow: inset 0 -1px 0 #bbb;
|
|
}
|
|
|
|
.markdown-body .pl-c {
|
|
color: #969896;
|
|
}
|
|
|
|
.markdown-body .pl-c1,
|
|
.markdown-body .pl-mdh,
|
|
.markdown-body .pl-mm,
|
|
.markdown-body .pl-mp,
|
|
.markdown-body .pl-mr,
|
|
.markdown-body .pl-s1 .pl-v,
|
|
.markdown-body .pl-s3,
|
|
.markdown-body .pl-sc,
|
|
.markdown-body .pl-sv {
|
|
color: #0086b3;
|
|
}
|
|
|
|
.markdown-body .pl-e,
|
|
.markdown-body .pl-en {
|
|
color: #795da3;
|
|
}
|
|
|
|
.markdown-body .pl-s1 .pl-s2,
|
|
.markdown-body .pl-smi,
|
|
.markdown-body .pl-smp,
|
|
.markdown-body .pl-stj,
|
|
.markdown-body .pl-vo,
|
|
.markdown-body .pl-vpf {
|
|
color: #333;
|
|
}
|
|
|
|
.markdown-body .pl-ent {
|
|
color: #63a35c;
|
|
}
|
|
|
|
.markdown-body .pl-k,
|
|
.markdown-body .pl-s,
|
|
.markdown-body .pl-st {
|
|
color: #a71d5d;
|
|
}
|
|
|
|
.markdown-body .pl-pds,
|
|
.markdown-body .pl-s1,
|
|
.markdown-body .pl-s1 .pl-pse .pl-s2,
|
|
.markdown-body .pl-sr,
|
|
.markdown-body .pl-sr .pl-cce,
|
|
.markdown-body .pl-sr .pl-sra,
|
|
.markdown-body .pl-sr .pl-sre,
|
|
.markdown-body .pl-src {
|
|
color: #df5000;
|
|
}
|
|
|
|
.markdown-body .pl-mo,
|
|
.markdown-body .pl-v {
|
|
color: #1d3e81;
|
|
}
|
|
|
|
.markdown-body .pl-id {
|
|
color: #b52a1d;
|
|
}
|
|
|
|
.markdown-body .pl-ii {
|
|
background-color: #b52a1d;
|
|
color: #f8f8f8;
|
|
}
|
|
|
|
.markdown-body .pl-sr .pl-cce {
|
|
color: #63a35c;
|
|
font-weight: bold;
|
|
}
|
|
|
|
.markdown-body .pl-ml {
|
|
color: #693a17;
|
|
}
|
|
|
|
.markdown-body .pl-mh,
|
|
.markdown-body .pl-mh .pl-en,
|
|
.markdown-body .pl-ms {
|
|
color: #1d3e81;
|
|
font-weight: bold;
|
|
}
|
|
|
|
.markdown-body .pl-mq {
|
|
color: #008080;
|
|
}
|
|
|
|
.markdown-body .pl-mi {
|
|
color: #333;
|
|
font-style: italic;
|
|
}
|
|
|
|
.markdown-body .pl-mb {
|
|
color: #333;
|
|
font-weight: bold;
|
|
}
|
|
|
|
.markdown-body .pl-md,
|
|
.markdown-body .pl-mdhf {
|
|
background-color: #ffecec;
|
|
color: #bd2c00;
|
|
}
|
|
|
|
.markdown-body .pl-mdht,
|
|
.markdown-body .pl-mi1 {
|
|
background-color: #eaffea;
|
|
color: #55a532;
|
|
}
|
|
|
|
.markdown-body .pl-mdr {
|
|
color: #795da3;
|
|
font-weight: bold;
|
|
}
|
|
|
|
.markdown-body kbd {
|
|
display: inline-block;
|
|
padding: 3px 5px;
|
|
font: 11px Consolas, "Liberation Mono", Menlo, Courier, monospace;
|
|
line-height: 10px;
|
|
color: #555;
|
|
vertical-align: middle;
|
|
background-color: #fcfcfc;
|
|
border: solid 1px #ccc;
|
|
border-bottom-color: #bbb;
|
|
border-radius: 3px;
|
|
box-shadow: inset 0 -1px 0 #bbb;
|
|
}
|
|
|
|
.markdown-body .task-list-item {
|
|
list-style-type: none;
|
|
}
|
|
|
|
.markdown-body .task-list-item+.task-list-item {
|
|
margin-top: 3px;
|
|
}
|
|
|
|
.markdown-body .task-list-item input {
|
|
float: left;
|
|
margin: 0.3em 0 0.25em -1.6em;
|
|
vertical-align: middle;
|
|
}
|
|
|
|
.markdown-body :checked+.radio-label {
|
|
z-index: 1;
|
|
position: relative;
|
|
border-color: #4183c4;
|
|
}
|
|
|
|
|
|
/*! Pretty printing styles. Used with prettify.js. */
|
|
/* SPAN elements with the classes below are added by prettyprint. */
|
|
.pln {
|
|
color: #000
|
|
}
|
|
|
|
/* plain text */
|
|
|
|
@media screen {
|
|
.str {
|
|
color: #080
|
|
}
|
|
|
|
/* string content */
|
|
.kwd {
|
|
color: #008
|
|
}
|
|
|
|
/* a keyword */
|
|
.com {
|
|
color: #800
|
|
}
|
|
|
|
/* a comment */
|
|
.typ {
|
|
color: #606
|
|
}
|
|
|
|
/* a type name */
|
|
.lit {
|
|
color: #066
|
|
}
|
|
|
|
/* a literal value */
|
|
/* punctuation, lisp open bracket, lisp close bracket */
|
|
.pun,
|
|
.opn,
|
|
.clo {
|
|
color: #660
|
|
}
|
|
|
|
.tag {
|
|
color: #008
|
|
}
|
|
|
|
/* a markup tag name */
|
|
.atn {
|
|
color: #606
|
|
}
|
|
|
|
/* a markup attribute name */
|
|
.atv {
|
|
color: #080
|
|
}
|
|
|
|
/* a markup attribute value */
|
|
.dec,
|
|
.var {
|
|
color: #606
|
|
}
|
|
|
|
/* a declaration; a variable name */
|
|
.fun {
|
|
color: red
|
|
}
|
|
|
|
/* a function name */
|
|
}
|
|
|
|
/* Use higher contrast and text-weight for printable form. */
|
|
@media print,
|
|
projection {
|
|
.str {
|
|
color: #060
|
|
}
|
|
|
|
.kwd {
|
|
color: #006;
|
|
font-weight: bold
|
|
}
|
|
|
|
.com {
|
|
color: #600;
|
|
font-style: italic
|
|
}
|
|
|
|
.typ {
|
|
color: #404;
|
|
font-weight: bold
|
|
}
|
|
|
|
.lit {
|
|
color: #044
|
|
}
|
|
|
|
.pun,
|
|
.opn,
|
|
.clo {
|
|
color: #440
|
|
}
|
|
|
|
.tag {
|
|
color: #006;
|
|
font-weight: bold
|
|
}
|
|
|
|
.atn {
|
|
color: #404
|
|
}
|
|
|
|
.atv {
|
|
color: #060
|
|
}
|
|
}
|
|
|
|
/* Put a border around prettyprinted code snippets. */
|
|
pre.prettyprint {
|
|
padding: 2px;
|
|
/* border: 1px solid #888 */
|
|
}
|
|
|
|
/* Specify class=linenums on a pre to get line numbering */
|
|
ol.linenums {
|
|
margin-top: 0;
|
|
margin-bottom: 0
|
|
}
|
|
|
|
/* IE indents via margin-left */
|
|
li.L0,
|
|
li.L1,
|
|
li.L2,
|
|
li.L3,
|
|
li.L5,
|
|
li.L6,
|
|
li.L7,
|
|
li.L8 {
|
|
list-style-type: none
|
|
}
|
|
|
|
/* Alternate shading for lines */
|
|
li.L1,
|
|
li.L3,
|
|
li.L5,
|
|
li.L7,
|
|
li.L9 {
|
|
background: #eee
|
|
}
|
|
|
|
.markdown-body p,
|
|
.markdown-body blockquote,
|
|
.markdown-body ul,
|
|
.markdown-body ol,
|
|
.markdown-body dl,
|
|
.markdown-body table,
|
|
.markdown-body pre {
|
|
margin-top: 0;
|
|
margin-bottom: 16px;
|
|
}`;return(0,V.useEffect)(()=>{const he=$.current.attachShadow({mode:"open"});te.current=document.createElement("div"),te.current.className="markdown-body",te.current.innerHTML=Y,he.appendChild(te.current);const re=document.createElement("style");return re.textContent=q,he.appendChild(re),()=>{he.innerHTML=""}},[]),(0,V.useEffect)(()=>{te.current&&(te.current.innerHTML=Y)},[Y]),w.createElement("div",{ref:$})};function M(Y){const $=["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"],te=new RegExp(`\\b(${$.join("|")})\\s*=\\s*(?:"[^"]*"|'[^']*'|[^\\s>]*)`,"gi");return Y.replace(te,"").trim()}var H={mdBody:"mdBody___raKXb",button:"button___Ch5Pc",previewFlowChart:"previewFlowChart___vY1dq"},J=Object.defineProperty,T=Object.getOwnPropertySymbols,N=Object.prototype.hasOwnProperty,P=Object.prototype.propertyIsEnumerable,k=(Y,$,te)=>$ in Y?J(Y,$,{enumerable:!0,configurable:!0,writable:!0,value:te}):Y[$]=te,oe=(Y,$)=>{for(var te in $||($={}))N.call($,te)&&k(Y,te,$[te]);if(T)for(var te of T($))P.call($,te)&&k(Y,te,$[te]);return Y};const de="@\u2581\u2581@",ie="@\u2581@",ae=/<pre[^>]*>/g;function we(Y){let $=document.createElement("div");return $.innerHTML=Y,$.childNodes.length===0?"":$.childNodes[0].nodeValue}const Te=(Y,$)=>{Y=Y||"";const te=/(?:https?:\/\/[^\/]+)?\/api\/attachments\/([A-Za-z0-9+/=]+)(\?.*?)?\)|(?:https?:\/\/[^\/]+)?\/api\/attachments\/([A-Za-z0-9+/=]+)(\?.*?)?|(?:https?:\/\/[^\/]+)?\/attachments\/download\/([A-Za-z0-9+/=]+)(\?.*?)?\//g,q=/\"(?:https?:\/\/[^\/]+)?\/api\/attachments\/([A-Za-z0-9+/=]+)(\?.*?)?|\"(?:https?:\/\/[^\/]+)?\/attachments\/download\/([A-Za-z0-9+/=]+)(\?.*?)?\//g,he=/\(\s+(?:https?:\/\/[^\/]+)?\/files\/uploads\/([A-Za-z0-9+/=]+)(\?.*?)?|\"(?:https?:\/\/[^\/]+)?\/files\/uploads\/([A-Za-z0-9+/=]+)(\?.*?)?\//g,re=/(?:https?:\/\/[^\/]+)?\/attachments\/download\/([A-Za-z0-9+/=]+)(\?.*?)?\//g;return $?Y.replaceAll("https://www.educoder.net","").replaceAll("https://www-cdn.educoder.net","").replaceAll("//api/attachments","/api/attachments").replace(te,(E,C,W,be,Ve,Ke,Ct)=>{const Rt=C||be||Ke,Vt=W||Ve||Ct||"?";return g.Z.API_SERVER+"/api/attachments/"+Rt+Vt+"&t="+(0,ye.Jn)(Rt,Date.now())+(E.indexOf(")")>-1?")":"&")}).replaceAll('src="(','src="').replaceAll("src='(",'src="'):(Y=Y.replace(re,(E,C,W,be,Ve,Ke,Ct)=>{const Rt=C||be||Ke,Vt=W||Ve||Ct||"?";return g.Z.API_SERVER+"/attachments/download/"+Rt+Vt+"&t="+(0,ye.Jn)(Rt,Date.now())+(E.indexOf(")")>-1?")":"&")}).replace(te,(E,C,W,be,Ve,Ke,Ct)=>{const Rt=C||be||Ke,Vt=W||Ve||Ct||"?";return g.Z.API_SERVER+"/api/attachments/"+Rt+Vt+"&t="+(0,ye.Jn)(Rt,Date.now())+(E.indexOf(")")>-1?")":"&")}).replace(q,(E,C,W,be,Ve)=>{const Ke=C||be,Ct=W||Ve||"";return'"'+g.Z.API_SERVER+"/api/attachments/"+Ke+Ct+Ke+Ct+"&t="+(0,ye.Jn)(Ke,Date.now())}).replace(he,(E,C,W,be,Ve)=>{const Ke=C||be,Ct=W||Ve||"";return"("+g.Z.API_SERVER+"/files/uploads/"+Ke+Ct+Ke+Ct+"&t="+(0,ye.Jn)(Ke,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,`
|
|
`),Y)};var Re=({value:Y="",edit:$=!1,className:te,showTextOnly:q,showLines:he,style:re={},stylesPrev:E={},highlightKeywords:C,showProgramFill:W,isProgramFill:be,disabledFill:Ve=!1,programFillValue:Ke,openEditor:Ct=()=>{},onFillChange:Rt=He=>{},onFillBlur:Vt=()=>{},onFillFocus:rn=()=>{}})=>{let He=M(String(Y||""));const ln=(0,V.useRef)(),It=(0,V.useRef)(),[cn,xt]=(0,V.useState)(""),[ht,Oe]=(0,V.useState)("office"),[Fe,j]=(0,V.useState)([]),Ne=(0,V.useRef)("a"+(0,U.Z)()),Ze={},ee=Pe=>/<style[\s\S]*?>/i.test(Pe||""),O=(Pe,Wt,St)=>{const vt=document.createElement(Pe===ie?"input":"textarea");vt.style.width="100%",vt.style.height=Pe===ie?"40px":"151px",vt.rows=5,vt.spellcheck=!1,vt.name="edu-program-fill",vt.placeholder="\u8BF7\u8F93\u5165",vt.dataset.id=Wt;const dn=Object.keys(Ze).length;return Ze[dn]=vt,`<span class="edu-program-fill-wrap ${Pe===ie?"":"show"}" style="width:${Pe===ie?"600px":"100%"}" title=${St||""}><span>${vt.outerHTML}<span class="edu-program-fill-score" style="margin:0 6px"></span></span></span>`};function ue(Pe){return Pe=Pe.replace(/!\[.*?\]\(.*?\)/g,""),Pe=Pe.replace(/\[.*?\]\(.*?\)/g,""),Pe=Pe.replace(new RegExp("<iframe.*?<\\/iframe>","gs"),""),Pe=Pe.replace(/<embed.*?>/g,""),Pe=Pe.replace(/<img.*?>/g,""),Pe=Pe.replace(new RegExp("<video.*?>.*?<\\/video>","gs"),""),Pe=Pe.replace(new RegExp("<audio.*?>.*?<\\/audio>","gs"),""),Pe=Pe.replace(new RegExp("<style.*?>.*?<\\/style>","gs"),""),Pe=Pe.replace(new RegExp("<script.*?>.*?<\\/script>","gs"),""),Pe}const De=Pe=>!q&&ee(He)?Pe:Pe.replace(/<style.*?>([\s\S]+?)<\/style>/gim,function(Wt,St){let vt=St.replace(/(\n|\r)/g,"").split("}"),dn=[];return vt.map(hn=>{hn!=""&&dn.push(`.${Ne.current} ${hn}`)}),`<style>${dn.join("}")}</style>`}),Ae=(0,V.useMemo)(()=>{try{const vt=/\(\s+\/api\/attachments\/|\(\/api\/attachments\//g,dn=/\"\/api\/attachments\/|\"\/attachments\/download\//g,hn=/\(\s+\/files\/uploads\/|\"\/files\/uploads\//g,Ot=/\(\/attachments\/download\//g;He=He.replace(Ot,"("+g.Z.API_SERVER+"/attachments/download/").replace(vt,"("+g.Z.API_SERVER+"/api/attachments/").replace(dn,'"'+g.Z.API_SERVER+"/api/attachments/").replace(hn,'"'+g.Z.API_SERVER+"/files/uploads/").replaceAll("http://video.educoder","https://video.educoder").replaceAll("http://www.educoder.net/api","https://data.educoder.net/api").replaceAll("https://www.educoder.net/api","https://data.educoder.net/api").replace(/\r\n/g,`
|
|
`),ln.current.style.display="none"}catch(vt){}if(W){let vt=-1;return He=He.replaceAll("<","<").replaceAll(">",">").replace(/(@▁▁@|@▁@)/g,function(dn,hn,Ot){var Ln;return++vt,O(dn,vt,(Ln=Ke==null?void 0:Ke[vt])==null?void 0:Ln.value.replaceAll("<","<").replaceAll(">",">"))}),`<pre style="background:#fff;padding:4px">${De(He||"")}</pre>`}let Pe=De(He);Pe=(0,Ce.ZP)(Pe);const Wt=(0,Ce.ez)();He.match(/\[TOC\]/)&&(Pe=Pe.replace("<p>[TOC]</p>",(0,Ce.Qv)()),(0,Ce.Iy)()),Pe=Pe.replace(/(__special_katext_id_\d+__)/g,(vt,dn)=>{const{type:hn,expression:Ot}=Wt[dn];return(0,le.renderToString)(we(Ot)||"",{displayMode:hn==="block",throwOnError:!1,output:"html"})}),Pe=Pe.replace(/▁/g,"\u2581\u2581\u2581\u2581\u2581"),(0,Ce.AL)();const St=document.createElement("div");if(St.innerHTML=Pe,q)return St.innerText;if(C){const vt=C.replace(/[.*+?^${}()|[\]\\]/g,"\\$&");return Xe(St,vt),St.innerHTML}return setTimeout(()=>kt(),500),St.innerHTML},[He,C]);(0,V.useEffect)(()=>{je.current&&je.current.querySelectorAll(["input","textarea"]).forEach(Wt=>{Wt.oninput=Be,Wt.onblur=Se,Wt.onfocus=ot})},[Fe]),(0,V.useEffect)(()=>{var Pe,Wt,St,vt,dn;if(Ke!=null&&Ke.length)try{const hn=je.current.querySelectorAll(".edu-program-fill-score"),Ot=je.current.querySelectorAll('[name="edu-program-fill"]');for(const[Ln,qn]of Ot.entries())qn.value=((Pe=Ke==null?void 0:Ke[Ln])==null?void 0:Pe.value)||"",((Wt=Ke==null?void 0:Ke[Ln])==null?void 0:Wt.type)==="warning"?qn.className="program-fill-warning":((St=Ke==null?void 0:Ke[Ln])==null?void 0:St.type)==="success"?qn.className="program-fill-success":qn.className="";for(const[Ln,qn]of hn.entries())qn.innerHTML=(vt=Ke==null?void 0:Ke[Ln])!=null&&vt.score?`${(dn=Ke==null?void 0:Ke[Ln])==null?void 0:dn.score}\u5206`:"";j(Ke)}catch(hn){console.log(hn,"error")}},[Ke]);const Be=Pe=>{Fe[Pe.target.dataset.id]=Fe[Pe.target.dataset.id]||{},Fe[Pe.target.dataset.id].value=Pe.target.value,j([...Fe]),Rt(Fe,Pe.target.dataset.id)},Se=Pe=>{Fe[Pe.target.dataset.id]=Fe[Pe.target.dataset.id]||{},Fe[Pe.target.dataset.id].value=Pe.target.value,j([...Fe]),Vt(Fe,Pe.target.dataset.id)},ot=Pe=>{Fe[Pe.target.dataset.id]=Fe[Pe.target.dataset.id]||{},Fe[Pe.target.dataset.id].value=Pe.target.value,j([...Fe]),rn(Fe,Pe.target.dataset.id)};function Xe(Pe,Wt){return Pe.childNodes.forEach(St=>{var vt;if(St.childNodes.length>0)Xe(St,Wt);else if(St.nodeName!=="IMG")if(St.innerHTML)St.innerHTML=(vt=St.innerHTML)==null?void 0:vt.replace(new RegExp(Wt,"gi"),'<span style="color:#0152d9;background-color:#1890ff33">$&</span>');else{const dn=document.createElement("span");dn.innerHTML=St.textContent.replace(new RegExp(Wt,"gi"),'<span style="color:#0152d9;background-color:#1890ff33">$&</span>'),St.replaceWith(dn)}})}const je=(0,V.useRef)();Ce.jb.WebkitLineClamp=he,he&&(re=oe(oe({},re),Ce.jb));function qe(Pe){let Wt=Pe.target;if(Wt.tagName.toUpperCase()==="A"){let St=Wt.getAttribute("href");if(St.indexOf("office")>-1)Pe.preventDefault(),xt(St),Oe("office");else if(St.indexOf("application/pdf")>-1)Pe.preventDefault(),xt(St),Oe("pdf");else if(St.indexOf("text/html")>-1)Pe.preventDefault(),xt(St),Oe("html");else if(St.startsWith("#")){Pe.preventDefault();let vt=document.getElementById(St.replace("#",""));vt&&vt.scrollIntoView(!0)}}}const kt=()=>{var Pe;const Wt=(Pe=je.current)==null?void 0:Pe.querySelectorAll("video");Wt==null||Wt.forEach(St=>{if(St.oncontextmenu=()=>!1,St.src.indexOf(".m3u8")>-1&&!St.canPlayType("application/vnd.apple.mpegurl")){if(G.ZP.isSupported()){var vt=new G.ZP;vt.loadSource(St.src),vt.attachMedia(St)}}})};(0,V.useEffect)(()=>{if(je.current&&Ae&&Ae.match(ae)&&window.PR.prettyPrint(),je.current)return je.current.addEventListener("click",qe),()=>{var Pe;(Pe=je.current)==null||Pe.removeEventListener("click",qe),(0,Ce.AL)(),(0,Ce.Iy)()}},[Ae,je.current,qe]);const gt=Pe=>{Pe.target.nodeName==="IMG"&&Pe.target.className.indexOf("draw-flowchart")>-1?(ln.current.style.zIndex=1,ln.current.style.display="flex",ln.current.style.width=Pe.target.clientWidth+"px",ln.current.style.height=Pe.target.clientHeight+"px",ln.current.style.top=Pe.target.offsetTop+"px",ln.current.style.left=Pe.target.offsetLeft+"px",Pe.target.id&&(It.current=Pe.target.id)):ln.current.style.display="none"},_t=()=>{ln.current.style.display="none"};return(0,V.useEffect)(()=>{var Pe;const Wt=St=>{St.preventDefault(),St.clipboardData.setData("text",window.getSelection().toString())};return(Pe=je.current)==null||Pe.addEventListener("copy",Wt),()=>{var St;(St=je.current)==null||St.removeEventListener("copy",Wt)}},[je.current]),V.createElement("div",{style:{position:"relative"},onMouseLeave:_t},q&&V.createElement("div",{ref:je,className:`${H.mdBody} `},Ae),!q&&!ee(Ae)&&V.createElement("div",{ref:je,style:oe({},re),onMouseOver:gt,className:`${te||""} ${Ve?"disabled-fill":""} markdown-body ${H.mdBody} ${Ne.current}`,dangerouslySetInnerHTML:{__html:Ae}}),!q&&ee(Ae)&&V.createElement(R,{html:Ae}),V.createElement("div",{ref:ln,className:`${H.button} ${$?"":H.previewFlowChart}`},V.createElement(o.Z,null,V.createElement(S.ZP,{onClick:()=>{$?Ct(It.current):(xt(It.current),Oe("flowChart"))}},$?"\u7F16\u8F91":"\u9884\u89C8"))),V.createElement(_.Z,{close:!0,data:cn,type:cn!=null&&cn.length?ht:"",style:oe({},E),onClose:()=>xt("")}))}},51124:function(Vn,ct,x){"use strict";x.d(ct,{SV:function(){return ln},ZP:function(){return He}});var V=x(59301),fe=x(76374);const Ce={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"]},ge={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"]},G={keywords:["abstract","amp","array","auto","bool","break","case","catch","char","class","const","constexpr","const_cast","continue","cpu","decltype","default","delegate","delete","do","double","dynamic_cast","each","else","enum","event","explicit","export","extern","false","final","finally","float","friend","gcnew","generic","goto","in","initonly","inline","int","interface","interior_ptr","internal","literal","long","mutable","namespace","new","noexcept","nullptr","__nullptr","operator","override","partial","pascal","pin_ptr","private","property","protected","public","ref","register","reinterpret_cast","restrict","return","safe_cast","sealed","short","signed","sizeof","static","static_assert","static_cast","struct","switch","template","this","thread_local","throw","tile_static","true","try","typedef","typeid","typename","union","unsigned","using","virtual","void","volatile","wchar_t","where","while","_asm","_based","_cdecl","_declspec","_fastcall","_if_exists","_if_not_exists","_inline","_multiple_inheritance","_pascal","_single_inheritance","_stdcall","_virtual_inheritance","_w64","__abstract","__alignof","__asm","__assume","__based","__box","__builtin_alignof","__cdecl","__clrcall","__declspec","__delegate","__event","__except","__fastcall","__finally","__forceinline","__gc","__hook","__identifier","__if_exists","__if_not_exists","__inline","__int128","__int16","__int32","__int64","__int8","__interface","__leave","__m128","__m128d","__m128i","__m256","__m256d","__m256i","__m64","__multiple_inheritance","__newslot","__nogc","__noop","__nounwind","__novtordisp","__pascal","__pin","__pragma","__property","__ptr32","__ptr64","__raise","__restrict","__resume","__sealed","__single_inheritance","__stdcall","__super","__thiscall","__try","__try_cast","__typeof","__unaligned","__unhook","__uuidof","__value","__virtual_inheritance","__w64","__wchar_t"],operators:["=",">","<","!","~","?",":","==","<=",">=","!=","&&","||","++","--","+","-","*","/","&","|","^","%","<<",">>",">>>","+=","-=","*=","/=","&=","|=","^=","%=","<<=",">>=",">>>="],quickKey:[{label:"ifelse",content:["if (${1:condition}) {"," $0","} else {"," ","}"].join(`
|
|
`)},{label:"include",content:"include<$0>"},{label:"printf",content:"printf($0)"},{label:"system",content:'system("$0")'},{label:"main",content:["int main () {"," $0","}"].join(`
|
|
`)},{label:"if",content:["if () {"," $0","}"].join(`
|
|
`)},{label:"for",content:["for(int j=0 ; j<10; j++){"," $0","}"].join(`
|
|
`)},{label:"trycatch",content:["try{"," $0","}catch(ExceptionName e){","}"].join(`
|
|
`)},{label:"using namespace std;",content:["using namespace std;"].join(`
|
|
`)},{label:"include <iostream>",content:["#include <iostream>"].join(`
|
|
`)},{label:"include <vector>",content:["#include <vector>"].join(`
|
|
`)},{label:"include <cstdio>",content:["#include <cstdio>"].join(`
|
|
`)},{label:"include <cstring>",content:["#include <cstring>"].join(`
|
|
`)},{label:"include <sstream>",content:["#include <sstream>"].join(`
|
|
`)},{label:"include <fstream>",content:["#include <fstream>"].join(`
|
|
`)},{label:"include <map>",content:["#include <map>"].join(`
|
|
`)},{label:"include <string>",content:["#include <string>"].join(`
|
|
`)},{label:"include <cmath>",content:["#include <cmath>"].join(`
|
|
`)}]},g={keywords:["and","as","assert","break","class","continue","def","del","elif","else","except","exec","finally","for","from","global","if","import","in","is","lambda","None","not","or","pass","raise","return","self","try","while","with","yield","int","float","long","complex","hex","abs","all","any","apply","basestring","bin","bool","buffer","bytearray","callable","chr","classmethod","cmp","coerce","compile","complex","delattr","dict","dir","divmod","enumerate","eval","execfile","file","filter","format","frozenset","getattr","globals","hasattr","hash","help","id","input","intern","isinstance","issubclass","iter","len","locals","list","map","max","memoryview","min","next","object","oct","open","ord","pow","print","property","reversed","range","raw_input","reduce","reload","repr","reversed","round","set","setattr","slice","sorted","staticmethod","str","sum","super","tuple","type","unichr","unicode","vars","xrange","zip","True","False","__dict__","__methods__","__members__","__class__","__bases__","__name__","__mro__","__subclasses__","__init__","__import__"],quickKey:[{label:"print",content:["print($0)"].join(`
|
|
`)}]},ye={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 le=x(53184),o=x.n(le),S=(It,cn,xt)=>new Promise((ht,Oe)=>{var Fe=Ze=>{try{Ne(xt.next(Ze))}catch(ee){Oe(ee)}},j=Ze=>{try{Ne(xt.throw(Ze))}catch(ee){Oe(ee)}},Ne=Ze=>Ze.done?ht(Ze.value):Promise.resolve(Ze.value).then(Fe,j);Ne((xt=xt.apply(It,cn)).next())});const U={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"]}},_=(It,cn,xt,ht)=>{const Oe=cn.getValueInRange({startLineNumber:1,startColumn:1,endLineNumber:xt.lineNumber,endColumn:xt.column});return Array.from(new Set(Oe.match(/\b\w{2,}\b/g)||[])).map(j=>({label:j,kind:It.languages.CompletionItemKind.Text,insertText:j,range:ht}))},w=(It,cn,xt,ht)=>{It.languages.registerCompletionItemProvider(cn,{provideCompletionItems(Oe,Fe){const j=Oe.getWordUntilPosition(Fe),Ne={startLineNumber:Fe.lineNumber,endLineNumber:Fe.lineNumber,startColumn:j.startColumn,endColumn:j.endColumn},Ze=Oe.getLineContent(Fe.lineNumber).substring(j.startColumn-2,j.endColumn);return{suggestions:[..._(It,Oe,Fe,Ne),...xt.map(O=>({label:O,kind:It.languages.CompletionItemKind.Keyword,documentation:O,insertText:O,insertTextRules:It.languages.CompletionItemInsertTextRule.InsertAsSnippet,range:Ne})),...ht.map(O=>({label:O.label,kind:It.languages.CompletionItemKind.Snippet,documentation:O.content,insertText:Ze.startsWith("#")?O.content.replace(/#/,""):O.content,insertTextRules:It.languages.CompletionItemInsertTextRule.InsertAsSnippet,range:Ne}))]}}})};var b=It=>{U.languages.forEach(cn=>{It.languages.registerDocumentFormattingEditProvider(cn,{provideDocumentFormattingEdits(xt){return S(this,null,function*(){const ht=o()(xt.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:xt.getFullModelRange(),text:ht}]})}})}),w(It,"java",ge.keywords,ge.quickKey),w(It,"cpp",G.keywords,G.quickKey),w(It,"c",Ce.keywords,[]),w(It,"python",g.keywords,g.quickKey),w(It,"scala",ye.keywords,ye.quickKey)};const R="\u8BE5\u4EFB\u52A1\u5173\u5361\u8BBE\u7F6E\u4E86\u7981\u6B62\u590D\u5236\u7C98\u8D34\uFF0C\u8BF7\u624B\u52A8\u8F93\u5165\u4EE3\u7801\u3002";var M=Object.defineProperty,H=(It,cn,xt)=>cn in It?M(It,cn,{enumerable:!0,configurable:!0,writable:!0,value:xt}):It[cn]=xt,J=(It,cn,xt)=>H(It,typeof cn!="symbol"?cn+"":cn,xt);const T=class Pc{constructor(cn,xt,ht){this.placeholder=cn,this.editor=xt,this.monaco=ht,xt.onDidChangeModelContent(()=>this.onDidChangeModelContent()),this.onDidChangeModelContent()}onDidChangeModelContent(){this.editor.getValue()===""?this.editor.addContentWidget(this):this.editor.removeContentWidget(this)}getId(){return Pc.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)}};J(T,"ID","editor.widget.placeholderHint");var P=T,k=x(96236),oe=x(6767),de=x(25399),ie=x(89392),ae=x(33796),we=x(56102),Te=Object.defineProperty,Re=Object.defineProperties,Y=Object.getOwnPropertyDescriptors,$=Object.getOwnPropertySymbols,te=Object.prototype.hasOwnProperty,q=Object.prototype.propertyIsEnumerable,he=(It,cn,xt)=>cn in It?Te(It,cn,{enumerable:!0,configurable:!0,writable:!0,value:xt}):It[cn]=xt,re=(It,cn)=>{for(var xt in cn||(cn={}))te.call(cn,xt)&&he(It,xt,cn[xt]);if($)for(var xt of $(cn))q.call(cn,xt)&&he(It,xt,cn[xt]);return It},E=(It,cn)=>Re(It,Y(cn)),C=(It,cn)=>{var xt={};for(var ht in It)te.call(It,ht)&&cn.indexOf(ht)<0&&(xt[ht]=It[ht]);if(It!=null&&$)for(var ht of $(It))cn.indexOf(ht)<0&&q.call(It,ht)&&(xt[ht]=It[ht]);return xt},W=(It,cn,xt)=>new Promise((ht,Oe)=>{var Fe=Ze=>{try{Ne(xt.next(Ze))}catch(ee){Oe(ee)}},j=Ze=>{try{Ne(xt.throw(Ze))}catch(ee){Oe(ee)}},Ne=Ze=>Ze.done?ht(Ze.value):Promise.resolve(Ze.value).then(Fe,j);Ne((xt=xt.apply(It,cn)).next())});function be(It){return/^\d+$/.test(It)?`${It}px`:It}function Ve(){}let Ke=!1;const Ct={"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 Rt(It=[]){let cn=It;if(Array.isArray(It)){for(let xt=0;xt<It.length;xt++){let ht=Ct[It[xt]];if(ht)return ht}return cn[0]}return Ct[cn]||cn}let Vt=null;const rn=()=>W(void 0,null,function*(){try{yield navigator.clipboard.writeText(" "),console.log("\u5185\u5BB9\u5DF2\u81EA\u52A8\u590D\u5236\u5230\u526A\u8D34\u677F:")}catch(It){console.error("\u81EA\u52A8\u590D\u5236\u5931\u8D25:",It)}});var He=It=>{var cn=It,{width:xt="100%",height:ht="100%",value:Oe,language:Fe="javascript",style:j={},options:Ne={},overrideServices:Ze={},theme:ee="vs-dark",onEditBlur:O,isCopy:ue=!1,onSave:De,autoHeight:Ae=!1,forbidCopy:Be=!1,onChange:Se=Ve,editorDidMount:ot=Ve,onFocus:Xe=Ve,onBreakPoint:je=Ve,breakPointValue:qe=[],filename:kt="educoder.txt",errorLine:gt,errorContent:_t="",highlightLine:Pe,openBreakPoint:Wt=!1,placeholder:St="",showMiniMap:vt=!0}=cn,dn=C(cn,["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 hn=(0,V.useRef)(),Ot=(0,V.useRef)({}),Ln=(0,V.useRef)(),qn=(0,V.useRef)(),sn=(0,V.useRef)([]),Mn=(0,V.useRef)(!1),ut=(0,V.useRef)(),nt=(0,V.useRef)(),ze=(0,V.useRef)(!1),[ne,me]=(0,V.useState)(!1);function Ie(){let Tn;return hn.current&&(Tn=new fe.Z(fn=>{for(let Zn of fn)(Zn.target.offsetHeight>0||Zn.target.offsetWidth>0)&&Ot.current.instance.layout()}),Tn.observe(hn.current)),Tn}function Ue(){oe.ZP.warning({content:decodeURIComponent(R),key:"monaco-editor-tip"})}const ke=()=>{let Tn=Ot.current.instance;if(Oe!=null&&Tn&&ne){const fn=Tn.getModel();fn&&Oe!==fn.getValue()&&(Ke=!0,fn.setValue(Oe),Tn.layout(),Ke=!1)}};(0,V.useEffect)(()=>{const Tn=ae.Z.subscribe("formatDocument",fn=>{var Zn;let vr=Ot.current.instance;(Zn=vr==null?void 0:vr.getAction)==null||Zn.call(vr,"editor.action.formatDocument").run()});return window.updateMonacoValue=fn=>{Se(fn)},Tn},[]),(0,V.useEffect)(()=>{var Tn;let fn=Ot.current.instance;qn.current&&clearTimeout(qn.current),qn.current=setTimeout(()=>{ke()},500),Oe&&(Oe!=null&&Oe.length)&&((Tn=fn==null?void 0:fn.updateOptions)==null||Tn.call(fn,{lineNumbersMinChars:Math.max(Math.floor(Math.log10(Oe.split(/\r\n|\r|\n/g).length))+3,5)}))},[Oe,ne,Ot.current]),(0,V.useEffect)(()=>{if(gt&&Ot.current&&Ot.current.instance){let fn=Ot.current.instance;fn.changeViewZones(function(Zn){var vr=document.createElement("div");vr.style.padding="10px 20px",vr.style.width="calc(100% - 20px)",vr.className="my-error-line-wrp",vr.innerHTML=_t,Zn.addZone({afterLineNumber:gt||11,heightInLines:3,domNode:vr})});var Tn={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}};fn.addOverlayWidget(Tn),fn.revealPositionInCenter({lineNumber:20,column:1})}},[gt,Ot.current,ne]);const Gt=(Tn="",fn)=>{if(!Tn||Tn.trim()==="")return!0;const vr=Ot.current.instance.getModel().getLineTokens(fn);let Hr=!1;for(let it=0;it<2;it++)vr.getStandardTokenType(it)===1&&(Hr=!0);return Hr};(0,V.useEffect)(()=>{var Tn;const fn=(Tn=Ot.current)==null?void 0:Tn.instance;if(fn&&ne&&Be){const Zn=fn.onDidBlurEditorWidget(()=>{ze.current=!1}),vr=fn.onDidFocusEditorText(()=>{ze.current=!0});return()=>{Zn.dispose(),vr.dispose()}}},[Ot.current,ne,Be]),(0,V.useEffect)(()=>{var Tn;if((Tn=Ot.current)!=null&&Tn.instance&&ne&&Wt){let fn=Ot.current.instance,Zn=fn.getModel();if(!Zn)return;(()=>{var bn;let Un=[],Sn=[];const Tt=Zn.getAllDecorations();for(let $e of Tt)$e.options.className==="highlighted-line"&&(Un.push((bn=$e==null?void 0:$e.range)==null?void 0:bn.startLineNumber),Sn.push($e==null?void 0:$e.id));if(Pe===Un[0])return;Zn.deltaDecorations(Sn,[]);const Dt=Zn.getLineCount();Pe&&Pe<=Dt&&(fn.deltaDecorations([],[{range:new Vt.Range(Pe,1,Pe,Zn.getLineMaxColumn(Pe)),options:{isWholeLine:!0,className:"highlighted-line"}}]),fn.revealLineInCenter(Pe))})();const Hr=(bn=!1)=>{var Un;let Sn=[],Tt=[];const Dt=Zn.getAllDecorations();for(let $e of Dt)$e.options.linesDecorationsClassName==="breakpoints-select"&&(Sn.push((Un=$e==null?void 0:$e.range)==null?void 0:Un.startLineNumber),Tt.push($e==null?void 0:$e.id));if(bn)return{lines:Sn,ids:Tt};je(Sn)},it=bn=>W(void 0,null,function*(){let Un={range:new Vt.Range(bn,1,bn,1),options:{isWholeLine:!1,linesDecorationsClassName:"breakpoints-select"}};yield Zn.deltaDecorations([],[Un]),Hr()}),tt=bn=>W(void 0,null,function*(){let Un=[];const Sn=fn.getLineDecorations(bn);for(let Tt of Sn)Tt.options.linesDecorationsClassName==="breakpoints-select"&&Un.push(Tt.id);yield Zn.deltaDecorations(Un,[]),Hr()}),mn=bn=>{let Un=fn.getLineDecorations(bn);for(let Sn of Un)if(Sn.options.linesDecorationsClassName==="breakpoints-select")return!0;return!1};if(!(0,ie.isEqual)(qe,Hr(!0).lines)){Zn.deltaDecorations(Hr(!0).ids,[]);const bn=qe.map(Un=>({range:new Vt.Range(Un,1,Un,1),options:{isWholeLine:!1,linesDecorationsClassName:"breakpoints-select"}}));Zn.deltaDecorations([],bn)}const Jt=fn.onDidChangeModelContent(bn=>{let Un=fn.getPosition();if(Un){let Sn=Un.lineNumber;clearTimeout(nt.current),nt.current=setTimeout(()=>{Gt(Zn.getLineContent(Sn),Sn)?tt(Sn):mn(Sn)?(tt(Sn),it(Sn)):Hr()},100)}}),Bn=fn.onMouseDown(bn=>{var Un,Sn,Tt;if(bn.target.detail&&((Tt=(Sn=(Un=bn.target)==null?void 0:Un.element)==null?void 0:Sn.className)!=null&&Tt.includes("line-numbers"))){let Dt=bn.target.position.lineNumber;if(Gt(Zn.getLineContent(Dt),Dt))return;mn(Dt)?tt(Dt):it(Dt)}}),xn=bn=>{let Un={range:new Vt.Range(bn,1,bn,1),options:{isWholeLine:!1,linesDecorationsClassName:"breakpoints-fake"}};sn.current=fn.deltaDecorations(sn.current,[Un])},vn=()=>{sn.current=fn.deltaDecorations(sn.current,[])},yn=fn.onMouseMove(bn=>{var Un,Sn,Tt;if(vn(),bn.target.detail&&((Tt=(Sn=(Un=bn.target)==null?void 0:Un.element)==null?void 0:Sn.className)!=null&&Tt.includes("line-numbers"))){let Dt=bn.target.position.lineNumber;if(Gt(Zn.getLineContent(Dt),Dt))return;xn(Dt)}}),Qn=fn.onMouseLeave(()=>{vn()});return()=>{Jt.dispose(),Bn.dispose(),yn.dispose(),Qn.dispose()}}},[Ot.current,ne,qe,Pe,Wt,Fe]),(0,V.useEffect)(()=>{var Tn;(Tn=Ot.current)!=null&&Tn.instance&&Wt&&Ot.current.instance.setPosition({lineNumber:0,column:0})},[Pe]);function _n(){let Tn=Ot.current.instance;if(Tn){const fn=Tn.getSelection(),Zn=Ot.current.pastePos||{},vr=new Vt.Range(Zn.startLineNumber||fn.endLineNumber,Zn.startColumn||fn.endColumn,Zn.endLineNumber||fn.endLineNumber,Zn.endColumn||fn.endColumn);setTimeout(()=>{Tn.executeEdits("",[{range:vr,text:""}])},300)}}function wn(Tn){(window.navigator.platform.match("Mac")?Tn.metaKey:Tn.ctrlKey)&&Tn.keyCode==83&&(Tn.preventDefault(),De())}const $n=()=>{if(Ae&&Ot.current.instance){const Tn=Ot.current.instance.getContentHeight();xr(Tn<ht?ht:Tn)}else xr(ht)};function mr(Tn){var fn=document.createEvent("MouseEvents");fn.initMouseEvent("click",!0,!1,window,0,0,0,0,0,!1,!1,!1,!1,0,null),Tn.dispatchEvent(fn)}const sr=Tn=>{if(!ze.current)return;const{keyCode:fn,ctrlKey:Zn,metaKey:vr,target:Hr,type:it}=Tn;return(it==="paste"||(fn===67||fn===86)&&(vr||Zn))&&Hr.nodeName==="TEXTAREA"&&(Ue(),Tn.preventDefault()),!1};function lr(Tn,fn){var Zn=window.URL||window.webkitURL||window,vr=new Blob([fn]),Hr=document.createElementNS("http://www.w3.org/1999/xhtml","a");Hr.href=Zn.createObjectURL(vr),Hr.download=Tn,mr(Hr)}(0,V.useEffect)(()=>{$n()},[$n]),(0,V.useEffect)(()=>{hn.current&&!ne&&Promise.all([x.e(8909),x.e(5028)]).then(x.bind(x,71448)).then(Tn=>{try{Vt=Tn,Ot.current.instance=Vt.editor.create(hn.current,{value:Oe,language:Rt(Fe),theme:ee,requireConfig:{"vs/nls":{availableLanguages:{"*":"zh-cn"}}},wordWrap:!0,autoIndent:!0,contextmenu:!0,formatOnType:!0,minimap:{enabled:vt||!1}},Ze);const fn=Ot.current.instance;let Hr=[...k.BH._menuItems].find(Jt=>Jt[0]._debugName=="EditorContext")[1],it=["editor.action.clipboardCopyWithSyntaxHighlightingAction","editor.action.quickCommand","editor.action.clipboardCopyAction","editor.action.clipboardPasteAction","editor.action.clipboardCutAction"],tt=(Jt,Bn)=>{var xn,vn;let yn=Jt._first;do Bn.includes((vn=(xn=yn.element)==null?void 0:xn.command)==null?void 0:vn.id)&&Jt._remove(yn);while(yn=yn.next)};if(ot(fn,Vt),setTimeout(()=>{$n(),Ot.current.instance.addAction({id:"d123123",label:"Download File",contextMenuGroupId:"9_cutcopypaste",run:()=>{lr(kt||"educoder.txt",fn.getValue())}})},500),Ot.current.subscription=fn.onDidChangeModelContent(Jt=>{Mn.current?clearTimeout(ut.current):($n(),Se(fn.getValue(),Jt)),ut.current=setTimeout(()=>{Mn.current=!1},500)}),window.Monaco||b(Vt,Rt(Fe)),Be&&(tt(Hr,it),hn.current.classList.add("noCopyPaste"),window.removeEventListener("keydown",sr),window.removeEventListener("paste",sr),window.addEventListener("keydown",sr),window.addEventListener("paste",sr)),window.Monaco=Vt,O&&fn.onDidBlurEditorWidget(()=>{O(fn.getValue())}),Xe&&fn.onDidFocusEditorText(()=>{Be&&rn(),Xe(fn.getValue())}),Be){rn();try{fn.onDidPaste(Jt=>{const Bn=fn.getSelection(),xn=Ot.current.pastePos||{},vn=new Vt.Range(xn.startLineNumber||Bn.endLineNumber,xn.startColumn||Bn.endColumn,xn.endLineNumber||Bn.endLineNumber,xn.endColumn||Bn.endColumn);fn.executeEdits("",[{range:Jt.range,text:""}])})}catch(Jt){}}let mn=Ie();return St&&typeof St=="string"&&new P(St,fn,Vt),me(!0),()=>{const Jt=Ot.current.instance;Jt.dispose();const Bn=Jt.getModel();Bn&&Bn.dispose(),Ot.current.subscription&&Ot.current.subscription.dispose(),mn.unobserve(hn.current)}}catch(fn){}})},[]),(0,V.useEffect)(()=>{if(Ot.current.instance&&ne)return document.addEventListener("keydown",wn,!1),()=>{document.removeEventListener("keydown",wn)}},[De,ne]),(0,V.useEffect)(()=>{let Tn=Ot.current.instance;if(Tn&&ne){let fn=Rt(Fe);Vt.editor.setModelLanguage(Tn.getModel(),fn)}},[Fe,ne]),(0,V.useEffect)(()=>{Ot.current.instance&&ne&&Vt.editor.setTheme(ee)},[ee,ne]),(0,V.useEffect)(()=>{let Tn=Ot.current.instance;Ln.current=Ne,Tn&&ne&&(Tn.updateOptions(re({},Ne)),setTimeout(()=>{Tn.getModel().updateOptions(re({},Ne))},200))},[JSON.stringify(Ne),ne]),(0,V.useEffect)(()=>{let Tn=Ot.current.instance;Tn&&ne&&Tn.layout()},[xt,ht,ne]);const[zn,Lr]=(0,V.useState)(be(xt)),[Sr,xr]=(0,V.useState)(be(ht)),Zr=E(re({},j),{width:zn,height:Sr,position:"relative"});return V.createElement("div",{className:"my-monaco-editor",ref:hn,style:Zr},ue&&V.createElement(we.CopyToClipboard,{text:Oe,onCopy:()=>oe.ZP.success("\u590D\u5236\u6210\u529F")},V.createElement(de.Z,{title:"\u590D\u5236\u4EE3\u7801"},V.createElement("div",{style:{position:"absolute",top:0,right:10,cursor:"pointer",zIndex:10,color:"#165DFF"}},V.createElement("i",{className:"iconfont icon-fuzhi8",style:{fontSize:14}})," \u590D\u5236\u4EE3\u7801"))))};function ln({width:It="100%",height:cn="100%",original:xt,modified:ht,language:Oe,options:Fe={}}){const j=(0,V.useRef)(),[Ne,Ze]=(0,V.useState)(null);function ee(Ae){let Be;return j.current&&(Be=new fe.Z(Se=>{for(let ot of Se)(ot.target.offsetHeight>0||ot.target.offsetWidth>0)&&Ae.layout()}),Be.observe(j.current)),Be}(0,V.useEffect)(()=>(j.current&&Promise.all([x.e(8909),x.e(9404)]).then(x.bind(x,2550)).then(Ae=>{Vt=Ae;const Be=Vt.editor.createDiffEditor(j.current,E(re({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},Fe),{wordWrap:!0}));Ze(Be);let Se=ee(Be);return()=>{Be.dispose();const ot=Be.getModel();ot&&ot.dispose(),Se.unobserve(j.current)}}),()=>{window.removeEventListener("keydown",checkPaste),window.removeEventListener("paste",checkPaste)}),[]),(0,V.useEffect)(()=>{Ne&&Ne.setModel({original:Vt.editor.createModel(xt,Oe),modified:Vt.editor.createModel(ht,Oe)})},[xt,ht,Oe,Ne]);const O=be(It),ue=be(cn),De={width:O,height:ue};return V.createElement("div",{className:"my-diff-editor",ref:j,style:De})}},30373:function(Vn,ct,x){"use strict";x.d(ct,{H:function(){return ye}});var V=x(59301),fe=x(28284),Ce=x(37568),ge=x(42441),G=x(38394);const g=({form:le,index:o=1,field:S,ParentName:U=[]})=>{(typeof U=="string"||typeof U=="number")&&(U=[U]);const _=fe.default.useWatch([...U,S.name,"chart_1"],{form:le}),w=fe.default.useWatch([...U,S.name,"chart_2"],{form:le}),b=fe.default.useWatch([...U,S.name,"name"],{form:le}),R=fe.default.useWatch([...U,S.name,"question_type"],{form:le}),M=(0,V.useMemo)(()=>{const J=[],T=[];return _==null||_.forEach(N=>{J.push(N==null?void 0:N.x_axis),T.push(N==null?void 0:N.y_axis)}),{tooltip:{},grid:{left:"7%",right:"5%",bottom:"15%",top:"15%",containLabel:!0},xAxis:{type:"category",data:[...J||[],[4,5,6,7,8].includes(R)?"\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:T,barMaxWidth:"40px",itemStyle:{color:"#A2BEFF",borderColor:"#165DFF"},type:"bar"}]}},[_]),H=(0,V.useMemo)(()=>{const J=[],T=[];return w==null||w.forEach(N=>{J.push(N==null?void 0:N.x_axis),T.push(Math.round((N==null?void 0:N.y_axis)*1e4)/100)}),{tooltip:{},grid:{left:"5%",right:"5%",bottom:"7%",containLabel:!0},xAxis:{type:"category",data:[...J||[],"\u9898\u76EE"],axisTick:{show:!1},axisLine:{lineStyle:{color:"#EBEBEB"}},axisLabel:{color:"#666666",interval:0,formatter:(N,P)=>N!=="\u9898\u76EE"?`${P+1}
|
|
|
|
{subtext|${(N.length>6?N==null?void 0:N.slice(0,6):N).split("").join(`
|
|
`)}}`:N,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:T,barMaxWidth:"40px",itemStyle:{color:"#2EC25B"},type:"bar",label:{color:"#666",show:!0,position:"top",valueAnimation:!0,formatter:"{c}%"}}]}},[w]);return V.createElement(V.Fragment,null,V.createElement("div",{className:"text-500 font14 mb10"},o,".",b),V.createElement(fe.default.Item,{name:[S.name,"content"]},V.createElement(Ce.default.TextArea,{rows:3})),V.createElement("div",{className:"mt20"},V.createElement("div",{className:"font14 mb10"},"\u5B66\u5458\u7B54\u9898\u60C5\u51B5"),V.createElement(ge.Z,{className:"bg-white",style:{border:"1px solid #EBEBEB"},option:M})),V.createElement("div",{className:"mt20"},V.createElement("div",{className:"font14 mb10"},"\u5404\u5C0F\u9898\u7B54\u9898\u60C5\u51B5"),V.createElement(ge.Z,{className:"bg-white",style:{border:"1px solid #EBEBEB",height:331},option:H})))};ct.Z=V.memo(g);const ye=V.memo(({form:le,index:o=1,data:S})=>{const U=(0,V.useMemo)(()=>{var w;const b=[],R=[];return(w=S==null?void 0:S.chart_1)==null||w.forEach(M=>{b.push(M==null?void 0:M.x_axis),R.push(M==null?void 0:M.y_axis)}),{tooltip:{},grid:{left:"5%",right:"5%",bottom:"15%",top:"20%",containLabel:!0},xAxis:{type:"category",data:[...b||[],[4,5,6,7,8].includes(S==null?void 0:S.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:R,barMaxWidth:"40px",itemStyle:{color:"#A2BEFF",borderColor:"#165DFF"},type:"bar"}]}},[S==null?void 0:S.chart_1]),_=(0,V.useMemo)(()=>{var w;const b=[],R=[];return(w=S==null?void 0:S.chart_2)==null||w.forEach(M=>{b.push(M==null?void 0:M.x_axis),R.push(Math.round((M==null?void 0:M.y_axis)*1e4)/100)}),{tooltip:{},grid:{left:"5%",right:"5%",bottom:"7%",containLabel:!0},xAxis:{type:"category",data:[...b||[],"\u9898\u76EE"],axisTick:{show:!1},axisLine:{lineStyle:{color:"#EBEBEB"}},axisLabel:{color:"#666666",interval:0,formatter:(M,H)=>M!=="\u9898\u76EE"?`${H+1}
|
|
|
|
{subtext|${(M.length>6?M==null?void 0:M.slice(0,6):M).split("").join(`
|
|
`)}}`:M,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:R,barMaxWidth:"40px",itemStyle:{color:"#2EC25B"},type:"bar",label:{color:"#666",show:!0,position:"top",valueAnimation:!0,formatter:"{c}%"}}]}},[S==null?void 0:S.chart_2]);return V.createElement("div",{className:"text-start pl10 pr10"},V.createElement("div",{className:"text-500 font14 mb10 c-black"},o,".",S==null?void 0:S.name),V.createElement("div",null,V.createElement(G.Z,{className:"font14 c-grey-333",value:S==null?void 0:S.content})),V.createElement("div",{className:"mt20"},V.createElement(ge.Z,{className:"bg-white",style:{background:"#F6F7F9"},option:U}),V.createElement("div",{className:"font14 mt10 text-center"},"\u56FE",o*2-1,"\xA0\xA0",S==null?void 0:S.name,"\u7B54\u9898\u5F97\u5206\u60C5\u51B5\u5206\u5E03")),V.createElement("div",{className:"mt20"},V.createElement(ge.Z,{className:"bg-white",style:{background:"#F6F7F9",height:331},option:_}),V.createElement("div",{className:"font14 mt10 text-center"},"\u56FE",o*2,"\xA0\xA0",S==null?void 0:S.name,"\u5404\u5C0F\u9898\u5F97\u5206\u7387")))})},41604:function(Vn,ct,x){"use strict";var V=x(41550),fe=x(72664),Ce=x(98072),ge=x(28284),G=x(62957),g=x(99571),ye=x(29787),le=x(62673),o=x(47889),S=x(77736),U=x(59301),_=x(76560),w=x(90524),b=x(59301),R=(H,J,T)=>new Promise((N,P)=>{var k=ie=>{try{de(T.next(ie))}catch(ae){P(ae)}},oe=ie=>{try{de(T.throw(ie))}catch(ae){P(ae)}},de=ie=>ie.done?N(ie.value):Promise.resolve(ie.value).then(k,oe);de((T=T.apply(H,J)).next())});const M=({exercise:H,dispatch:J})=>{var T,N,P,k;const oe=(0,_.useParams)(),[de]=(0,_.useSearchParams)(),ie=de.getAll("exercise_group_id").map(Ke=>Ke==="all"?Ke:Number(Ke)),{actionTabs:ae}=H,[we]=ge.default.useForm(),[Te,Re]=(0,U.useState)(!1),Y=(0,U.useRef)(null),[$,te]=(0,U.useState)(!1),[,q,he,re]=(0,Ce.U)(fe.aU,{}),[E,C]=(0,U.useState)({}),W=()=>{J({type:"exercise/setActionTabs",payload:{title:""}})},be=(Ke,Ct)=>{_.history.push(`/classrooms/${oe.coursesId}/exercise/${(oe==null?void 0:oe.categoryId)||(oe==null?void 0:oe.exerciseId)}/sumup?exam_summary_id=${(Ct==null?void 0:Ct.exam_summary_id)||""}&template=${Ke==null?void 0:Ke.exam_summary_template_id}&${Ke==null?void 0:Ke.exercise_group_id.map(Rt=>`exercise_group_id=${Rt}`).join("&")}`)},Ve=()=>R(void 0,null,function*(){var Ke,Ct,Rt,Vt,rn;const He=yield he({id:(oe==null?void 0:oe.categoryId)||(oe==null?void 0:oe.exerciseId)});we.setFieldsValue({exercise_group_id:ae!=null&&ae.isEdit&&ie.length>0?ie:["all",...((Ct=(Ke=He==null?void 0:He.data)==null?void 0:Ke.course_groups)==null?void 0:Ct.map(ln=>ln==null?void 0:ln.exercise_group_id))||[]],exam_summary_template_id:ae!=null&&ae.isEdit?Number(de.get("template")):(rn=(Vt=(Rt=He==null?void 0:He.data)==null?void 0:Rt.exam_summary_templates)==null?void 0:Vt[0])==null?void 0:rn.id})});return(0,U.useEffect)(()=>{Y.current&&Y.current.scrollHeight>134&&te(!0)},[Y]),(0,U.useEffect)(()=>{(ae==null?void 0:ae.title)==="\u8003\u8BD5\u603B\u7ED3\u8BBE\u7F6E"?Ve():we.resetFields()},[ae==null?void 0:ae.title]),b.createElement(b.Fragment,null,b.createElement(G.default,{title:ae.title,width:800,centered:!0,open:(ae==null?void 0:ae.title)==="\u8003\u8BD5\u603B\u7ED3\u8BBE\u7F6E",footer:b.createElement("div",{style:{textAlign:"center"}},b.createElement(g.ZP,{type:"primary",onClick:()=>{we.submit()}},"\u603B\u7ED3\u62A5\u544A\u9884\u89C8")),onCancel:()=>{W()}},b.createElement(ye.Z,{spinning:q},b.createElement(ge.default,{form:we,onFinish:Ke=>R(void 0,null,function*(){var Ct,Rt;const Vt=(Rt=(Ct=re==null?void 0:re.data)==null?void 0:Ct.exam_summaries)==null?void 0:Rt.find(rn=>(rn==null?void 0:rn.exam_summary_template_id)===Ke.exam_summary_template_id);if(Vt!=null&&Vt.exam_summary_id){const rn=G.default.confirm({title:"\u63D0\u793A",icon:null,centered:!0,closeIcon:b.createElement("i",{className:"iconfont icon-guanbi1 current",style:{fontSize:"10px"},onClick:He=>{He.preventDefault(),He.stopPropagation(),rn.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:()=>{be(Ke,Vt),W()},cancelText:"\u91CD\u65B0\u751F\u6210",okText:"\u67E5\u770B\u5DF2\u6709\u62A5\u544A",onCancel:()=>{be(Ke,{}),W()}});return}be(Ke,Vt),W()})},b.createElement("div",{ref:Y,className:"mt5 flex flex-wrap gap-20px",style:{maxHeight:Te?"none":"134px",overflow:"hidden",transition:"max-height 0.3s ease",position:"relative"}},b.createElement(ge.default.Item,{name:"exercise_group_id",label:"\u5206\u6790\u5BF9\u8C61",normalize:(Ke,Ct=[],Rt)=>{var Vt,rn;let He=Ke;const ln=((rn=(Vt=re==null?void 0:re.data)==null?void 0:Vt.course_groups)==null?void 0:rn.map(It=>It==null?void 0:It.exercise_group_id))||[];return!(Ct!=null&&Ct.includes("all"))&&(Ke.includes("all")||Ke.length===ln.length)?He=[...ln,"all"]:Ke.includes("all")&&Ke.length!==ln.length+1?He=Ke.filter(It=>It!=="all"):Ct!=null&&Ct.includes("all")&&!Ke.includes("all")&&(He=[]),He}},b.createElement(le.default.Group,{options:[{label:"\u5168\u90E8",value:"all"},...((N=(T=re==null?void 0:re.data)==null?void 0:T.course_groups)==null?void 0:N.map(Ke=>({value:Ke==null?void 0:Ke.exercise_group_id,label:`${Ke==null?void 0:Ke.exercise_group_name}\uFF08${Ke==null?void 0:Ke.exercise_group_students}\uFF09`})))||[]]})),$&&b.createElement("div",{className:"current",style:{position:"absolute",bottom:24,right:0,lineHeight:"32px"},onClick:()=>Re(!Te)},Te?"\u6536\u8D77":"\u5C55\u5F00",b.createElement("i",{className:"iconfont icon-a-bianzu11 font12"}))),b.createElement(ge.default.Item,{className:"mb0",name:"exam_summary_template_id",label:"\u5206\u6790\u6A21\u677F"},b.createElement(o.ZP.Group,null,b.createElement(S.Z,{className:"mt5",direction:"vertical"},(k=(P=re==null?void 0:re.data)==null?void 0:P.exam_summary_templates)==null?void 0:k.map((Ke,Ct)=>b.createElement(o.ZP,{key:Ct,value:Ke==null?void 0:Ke.id},`\u6A21\u677F${Ct+1}-${Ke==null?void 0:Ke.name}`,b.createElement("a",{className:"ml5",onClick:()=>{var Rt,Vt;C({url:w.Z.API_SERVER+((Rt=Ke==null?void 0:Ke.attachment_info)==null?void 0:Rt.url),file_type:(Vt=Ke==null?void 0:Ke.attachment_info)==null?void 0:Vt.file_type})}},"\u67E5\u770B"))))))))),b.createElement(V.Z,{close:!0,hasMask:!0,style:{zIndex:9999},data:E==null?void 0:E.url,type:E==null?void 0:E.file_type,onClose:()=>C({})}))};ct.Z=(0,_.connect)(({exercise:H})=>({exercise:H}))(M)},34887:function(Vn,ct,x){"use strict";x.r(ct),x.d(ct,{default:function(){return ee}});var V=x(76560),fe=x(59301),Ce=x(29787),ge=x(91882),G=x(99571),g=x(27812),ye=x(67921),le=x(4958),o=x(49661),S=x(57309),U=x.n(S),_=x(74756),w=x.n(_),b=x(22688),R=x(30373),M=x(38394),H=x(42441),J=x(54172),T=x(59301),N=Object.defineProperty,P=Object.getOwnPropertySymbols,k=Object.prototype.hasOwnProperty,oe=Object.prototype.propertyIsEnumerable,de=(O,ue,De)=>ue in O?N(O,ue,{enumerable:!0,configurable:!0,writable:!0,value:De}):O[ue]=De,ie=(O,ue)=>{for(var De in ue||(ue={}))k.call(ue,De)&&de(O,De,ue[De]);if(P)for(var De of P(ue))oe.call(ue,De)&&de(O,De,ue[De]);return O};U().extend(w());const ae=({items:O,labelClassName:ue,labelStyle:De})=>T.createElement("div",{className:"flex flex-col text-start gap-8px"},O==null?void 0:O.map((Ae,Be)=>T.createElement("div",{key:Be,className:"flex item-center gap-20px"},Ae.label&&T.createElement("div",{className:`w-56px c-grey-666 ${ue||""} ${(Ae==null?void 0:Ae.labelClassName)||""}`,style:ie(ie({textAlignLast:"justify"},De||{}),(Ae==null?void 0:Ae.labelStyle)||{})},Ae.label),(Ae==null?void 0:Ae.children)&&T.createElement("div",null,Ae==null?void 0:Ae.children)))),we=({exercise:O,dispatch:ue})=>{var De,Ae,Be,Se,ot,Xe,je,qe,kt,gt,_t,Pe,Wt,St,vt,dn,hn,Ot,Ln,qn,sn,Mn,ut,nt,ze,ne,me,Ie,Ue,ke,Gt,_n,wn,$n,mr,sr,lr,zn,Lr,Sr,xr,Zr,Tn,fn,Zn,vr,Hr,it,tt,mn,Jt,Bn,xn,vn,yn,Qn,bn,Un,Sn,Tt,Dt,$e,ft,Qt,Lt,on,Cn,pn,Hn,Xn,Jn;const{SumupDetail:yt}=O,On="text-500 text-16px",Kn=Q=>Q?" \u2713 ":T.createElement(T.Fragment,null,"\xA0\xA0\xA0\xA0");return T.createElement("section",{className:"flex flex-col item-center"},T.createElement("div",{className:"font30 mb40",style:{fontWeight:600}},(yt==null?void 0:yt.big_title)||"XXXX\u5927\u5B66\u672C\u79D1\u8BFE\u7A0B\u8003\u6838\u5C0F\u7ED3"),T.createElement("table",{className:"w-full native_table",border:1,style:{borderColor:"#dcdcdc"}},T.createElement("tr",null,T.createElement("td",{className:On,width:160},"\u8BFE\u7A0B\u540D\u79F0"),T.createElement("td",{colSpan:4},(yt==null?void 0:yt.course_list_name)||""),T.createElement("td",{className:On},"\u8BFE\u7A0B\u7F16\u53F7"),T.createElement("td",{colSpan:2},(yt==null?void 0:yt.course_number)||"")),T.createElement("tr",null,T.createElement("td",{className:On},"\u5F00\u8BFE\u5355\u4F4D"),T.createElement("td",{colSpan:7},(yt==null?void 0:yt.school_name)||"")),T.createElement("tr",null,T.createElement("td",{className:On},"\u8003\u6838\u5BF9\u8C61"),T.createElement("td",{colSpan:7},(yt==null?void 0:yt.course_group_names)||"")),T.createElement("tr",null,T.createElement("td",{className:On},"\u7EC8\u7ED3\u6027\u8003\u6838\u65E5\u671F"),T.createElement("td",{width:145},(yt==null?void 0:yt.exercise_start_time)&&U()(yt==null?void 0:yt.exercise_start_time).format("YYYY\u5E74MM\u6708DD\u65E5")),T.createElement("td",{className:On,width:145},"\u7EC8\u7ED3\u6027\u8003\u6838\u65F6\u95F4 "),T.createElement("td",{width:185},(yt==null?void 0:yt.exercise_time_slot)||""),T.createElement("td",{className:On},"\u5E94\u8003\u4EBA\u6570"),T.createElement("td",null,yt!=null&&yt.candidate_num?`${yt==null?void 0:yt.candidate_num}\u4EBA`:""),T.createElement("td",{className:On},"\u5B9E\u8003\u4EBA\u6570"),T.createElement("td",null,yt!=null&&yt.exam_num?`${yt==null?void 0:yt.exam_num}\u4EBA`:"")),T.createElement("tr",null,T.createElement("td",{className:On},"\u8003\u6559\u5206\u79BB"),T.createElement("td",{colSpan:3},"\u662F\uFF08",Kn(yt==null?void 0:yt.is_split_exam_teaching),"\uFF09 \u5426\uFF08",Kn(!(yt!=null&&yt.is_split_exam_teaching)),"\uFF09"),T.createElement("td",{className:On,width:110},"\u7EC8\u7ED3\u6027\u8003\u6838\u547D\u9898\u5F62\u5F0F"),T.createElement("td",{colSpan:3},"\u8BD5\u9898\u5E93\uFF08",Kn((yt==null?void 0:yt.set_problem_mode)===b.gW.PROBLEM),"\uFF09 \u8BD5\u5377\u5E93\uFF08",Kn((yt==null?void 0:yt.set_problem_mode)===b.gW.PAPER),"\uFF09 \u5176\u4ED6\uFF08",Kn((yt==null?void 0:yt.set_problem_mode)===b.gW.OTHER),"\uFF09")),T.createElement("tr",null,T.createElement("td",{className:On},"\u9605\u5377\u5F62\u5F0F"),T.createElement("td",{colSpan:7},"\u5355\u4EBA\u9605\u5377\uFF08",Kn((yt==null?void 0:yt.review_paper_mode)===b.a2.SINGLE),"\uFF09 \u591A\u4EBA\u6D41\u6C34\u4F5C\u4E1A\u9605\u5377\uFF08",Kn((yt==null?void 0:yt.review_paper_mode)===b.a2.MULTIPLEFLOW),"\uFF09 \u591A\u4EBA\u72EC\u7ACB\u9605\u5377\uFF08",Kn((yt==null?void 0:yt.review_paper_mode)===b.a2.MULTIPLEFIXED),"\uFF09 \u5176\u4ED6\uFF08",Kn((yt==null?void 0:yt.review_paper_mode)===b.a2.OTHER),"\uFF09")),T.createElement("tr",null,T.createElement("td",{className:On},"\u7EC8\u7ED3\u6027\u8003\u6838\u8BD5\u9898\u7C7B\u578B\u53CA\u5176\u5206\u6570\u6BD4\u4F8B"),T.createElement("td",{colSpan:7},T.createElement("div",{className:"w-full flex flex-col gap-10px text-start font14"},((De=yt==null?void 0:yt.exercise_questions_info)==null?void 0:De.content)||"",T.createElement("br",null),(Be=(Ae=yt==null?void 0:yt.exercise_questions_info)==null?void 0:Ae.exercise_questions)==null?void 0:Be.map((Q,K)=>T.createElement("div",{key:K},K+1,"\u3001",Q==null?void 0:Q.name,Q==null?void 0:Q.count,"\u9053\uFF0C\u5171",Q==null?void 0:Q.score,"\u5206\uFF0C\u5360",Math.round((Q==null?void 0:Q.rate)*1e4)/100,"%"))))),T.createElement("tr",null,T.createElement("td",{className:On,rowSpan:2},"\u7EC8\u7ED3\u6027\u8003\u6838\u5185\u5BB9\u5206\u6790"),T.createElement("td",{colSpan:7},T.createElement(ae,{items:[{label:"\u8986\u76D6\u9762",children:T.createElement("span",null,"\u5BBD\uFF08",Kn(((Se=yt==null?void 0:yt.content_analysis)==null?void 0:Se.coverage)==="wide"),"\uFF09 \u4E2D\uFF08",Kn(((ot=yt==null?void 0:yt.content_analysis)==null?void 0:ot.coverage)==="medium"),"\uFF09 \u7A84\uFF08",Kn(((Xe=yt==null?void 0:yt.content_analysis)==null?void 0:Xe.coverage)==="narrow"),"\uFF09")},{label:"\u96BE\u5EA6",children:T.createElement("span",null,"\u96BE\uFF08",Kn(((je=yt==null?void 0:yt.content_analysis)==null?void 0:je.difficulty)==1),"\uFF09 \u8F83\u96BE\uFF08",Kn(((qe=yt==null?void 0:yt.content_analysis)==null?void 0:qe.difficulty)==2),"\uFF09 \u4E2D\uFF08",Kn(((kt=yt==null?void 0:yt.content_analysis)==null?void 0:kt.difficulty)==3),"\uFF09 \u8F83\u6613\uFF08",Kn(((gt=yt==null?void 0:yt.content_analysis)==null?void 0:gt.difficulty)==4),"\uFF09 \u6613\uFF08",Kn(((_t=yt==null?void 0:yt.content_analysis)==null?void 0:_t.difficulty)==5),"\uFF09")},{label:"\u9898\u91CF",children:T.createElement("span",null,">100\uFF08",Kn(((Pe=yt==null?void 0:yt.content_analysis)==null?void 0:Pe.question_quantity)==1),"\uFF09 70-100\uFF08",Kn(((Wt=yt==null?void 0:yt.content_analysis)==null?void 0:Wt.question_quantity)==2),"\uFF09 50-70\uFF08",Kn(((St=yt==null?void 0:yt.content_analysis)==null?void 0:St.question_quantity)==3),"\uFF09 <50\uFF08",Kn(((vt=yt==null?void 0:yt.content_analysis)==null?void 0:vt.question_quantity)==4),"\uFF09")},{label:"\u6709\u65E0\u9519\u8BEF",children:T.createElement("span",null,"\u6709\uFF08",Kn((dn=yt==null?void 0:yt.content_analysis)==null?void 0:dn.is_wrong),"\uFF09 \u65E0\uFF08",Kn(!((hn=yt==null?void 0:yt.content_analysis)!=null&&hn.is_wrong)),"\uFF09")}]}))),T.createElement("tr",null,T.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)")),T.createElement("tr",null,T.createElement("td",{className:On},"\u8003\u6838\u7EC4\u7EC7\u60C5\u51B5"),T.createElement("td",{colSpan:7},T.createElement(ae,{items:[{label:"\u7EC4\u7EC7\u5F62\u5F0F",children:(Ot=yt==null?void 0:yt.organization_condition)==null?void 0:Ot.organization_mode},{label:"\u8003\u8BD5\u6279\u6B21",children:(Ln=yt==null?void 0:yt.organization_condition)==null?void 0:Ln.exam_count},{label:"\u8003\u8BD5\u5F62\u5F0F",children:(qn=yt==null?void 0:yt.organization_condition)==null?void 0:qn.exam_mode},{label:"\u8003\u8BD5\u7CFB\u7EDF",children:(sn=yt==null?void 0:yt.organization_condition)==null?void 0:sn.exam_system},{label:"\u662F\u5426\u5F00\u5377",children:(Mn=yt==null?void 0:yt.organization_condition)!=null&&Mn.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:(ut=yt==null?void 0:yt.organization_condition)==null?void 0:ut.is_single_exercise},{children:(nt=yt==null?void 0:yt.organization_condition)==null?void 0:nt.end_examine}]}))),T.createElement("tr",null,T.createElement("td",{className:On,rowSpan:4},"\u8003\u6838\u6210\u7EE9\u5206\u5E03"),T.createElement("td",{colSpan:7},T.createElement("div",{className:"flex gap-40px item-center justify-center"},[{label:"\u6700\u9AD8",num:`${((ze=yt==null?void 0:yt.score_distribution)==null?void 0:ze.max_score)||0}\u5206`},{label:"\u6700\u4F4E",num:`${((ne=yt==null?void 0:yt.score_distribution)==null?void 0:ne.min_score)||0}\u5206`},{label:"\u5E73\u5747",num:`${((me=yt==null?void 0:yt.score_distribution)==null?void 0:me.average_score)||0}\u5206`},{label:"\u53CA\u683C\u7387",num:`${Math.round((((Ie=yt==null?void 0:yt.score_distribution)==null?void 0:Ie.rate)||0)*1e4)/100}%`}].map((Q,K)=>T.createElement("span",{key:K,className:"c-grey-666"},Q==null?void 0:Q.label,T.createElement("span",{className:"ml10 c-black"},Q==null?void 0:Q.num)))))),T.createElement("tr",null,T.createElement("td",{colSpan:3},"\u4F18\u79C0\uFF08",((ke=(Ue=yt==null?void 0:yt.score_distribution)==null?void 0:Ue.best)==null?void 0:ke.score_area)||0,"\u5206\uFF09\u4EBA\u6570\uFF1A",((_n=(Gt=yt==null?void 0:yt.score_distribution)==null?void 0:Gt.best)==null?void 0:_n.people_count)||0,"\xA0\xA0 \u6BD4\u4F8B\uFF1A",Math.round(((($n=(wn=yt==null?void 0:yt.score_distribution)==null?void 0:wn.best)==null?void 0:$n.rate)||0)*1e4)/100,"%"),T.createElement("td",{colSpan:4},"\u826F\u597D\uFF08",((sr=(mr=yt==null?void 0:yt.score_distribution)==null?void 0:mr.good)==null?void 0:sr.score_area)||0,"\u5206\uFF09\u4EBA\u6570\uFF1A",((zn=(lr=yt==null?void 0:yt.score_distribution)==null?void 0:lr.good)==null?void 0:zn.people_count)||0,"\xA0\xA0 \u6BD4\u4F8B\uFF1A",Math.round((((Sr=(Lr=yt==null?void 0:yt.score_distribution)==null?void 0:Lr.good)==null?void 0:Sr.rate)||0)*1e4)/100,"%")),T.createElement("tr",null,T.createElement("td",{colSpan:3},"\u4E2D\u7B49\uFF08",((Zr=(xr=yt==null?void 0:yt.score_distribution)==null?void 0:xr.middle)==null?void 0:Zr.score_area)||0,"\u5206\uFF09\u4EBA\u6570\uFF1A",((fn=(Tn=yt==null?void 0:yt.score_distribution)==null?void 0:Tn.middle)==null?void 0:fn.people_count)||0,"\xA0\xA0 \u6BD4\u4F8B\uFF1A",Math.round((((vr=(Zn=yt==null?void 0:yt.score_distribution)==null?void 0:Zn.middle)==null?void 0:vr.rate)||0)*1e4)/100,"%"),T.createElement("td",{colSpan:4},"\u53CA\u683C\uFF08",((it=(Hr=yt==null?void 0:yt.score_distribution)==null?void 0:Hr.pass)==null?void 0:it.score_area)||0,"\u5206\uFF09\u4EBA\u6570\uFF1A",((mn=(tt=yt==null?void 0:yt.score_distribution)==null?void 0:tt.pass)==null?void 0:mn.people_count)||0,"\xA0\xA0 \u6BD4\u4F8B\uFF1A",Math.round((((Bn=(Jt=yt==null?void 0:yt.score_distribution)==null?void 0:Jt.pass)==null?void 0:Bn.rate)||0)*1e4)/100,"%")),T.createElement("tr",null,T.createElement("td",{colSpan:7},"\u4E0D\u53CA\u683C\uFF08",((vn=(xn=yt==null?void 0:yt.score_distribution)==null?void 0:xn.fails)==null?void 0:vn.score_area)||0,"\u5206\uFF09\u4EBA\u6570\uFF1A",((Qn=(yn=yt==null?void 0:yt.score_distribution)==null?void 0:yn.fails)==null?void 0:Qn.people_count)||0,"\xA0\xA0 \u6BD4\u4F8B\uFF1A",Math.round((((Un=(bn=yt==null?void 0:yt.score_distribution)==null?void 0:bn.fails)==null?void 0:Un.rate)||0)*1e4)/100,"%")),T.createElement("tr",null,T.createElement("td",{className:On},"\u7EC8\u7ED3\u6027\u8003\u6838\u5404\u7C7B\u9898\u578B\u5B66\u5458\u7B54\u9898\u60C5\u51B5\u5206\u6790"),T.createElement("td",{colSpan:7},T.createElement("div",{className:"flex flex-col gap-40px"},(Tt=(Sn=yt==null?void 0:yt.answer_analysis)==null?void 0:Sn.exercise_questions)==null?void 0:Tt.map((Q,K)=>T.createElement(R.H,{key:K,data:Q,index:K+1}))),T.createElement(M.Z,{className:"font14 c-grey-333 text-start mt20 pl10",value:((Dt=yt==null?void 0:yt.answer_analysis)==null?void 0:Dt.question_analysis)||""}))),T.createElement("tr",null,T.createElement("td",{className:On},"\u5B66\u5458\u8003\u6838\u6210\u7EE9\u53CA\u5B66\u4E60\u60C5\u51B5\u5206\u6790"),T.createElement("td",{colSpan:7},T.createElement("div",{className:"pl10 pr10 text-start"},T.createElement(M.Z,{className:"font14 c-grey-333 text-start",value:(($e=yt==null?void 0:yt.condition_analysis)==null?void 0:$e.content)||""}),((ft=yt==null?void 0:yt.condition_analysis)==null?void 0:ft.chart_1)&&T.createElement("div",{className:"mt20"},T.createElement(H.Z,{style:{background:"#F6F7F9"},option:(()=>{var Q,K;const Ee=[],Le=[];return(K=(Q=yt==null?void 0:yt.condition_analysis)==null?void 0:Q.chart_1)==null||K.forEach(st=>{Ee.push(st==null?void 0:st.x_axis),Le.push(Math.round((st==null?void 0:st.y_axis)*1e4)/100)}),{tooltip:{},grid:{left:"7%",right:"5%",bottom:"15%",top:"15%",containLabel:!0},xAxis:{type:"category",data:[...Ee||[],"\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:Le,barWidth:"40px",itemStyle:{color:"#A2BEFF",borderColor:"#165DFF"},type:"bar"}]}})()}),T.createElement("div",{className:"font14 mt10 text-center"},"\u56FE",((((Lt=(Qt=yt==null?void 0:yt.answer_analysis)==null?void 0:Qt.exercise_questions)==null?void 0:Lt.length)||0)+1)*2-1,"\xA0\xA0\u7EC8\u7ED3\u6027\u8003\u6838\u7B54\u9898\u5F97\u5206\u60C5\u51B5\u5206\u5E03")),((on=yt==null?void 0:yt.condition_analysis)==null?void 0:on.chart_2)&&T.createElement("div",{className:"mt20"},T.createElement(J.default,{dataSource:((Cn=yt==null?void 0:yt.condition_analysis)==null?void 0:Cn.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}),T.createElement("div",{className:"font14 mt10 text-center"},"\u56FE",((((Hn=(pn=yt==null?void 0:yt.answer_analysis)==null?void 0:pn.exercise_questions)==null?void 0:Hn.length)||0)+1)*2,"\xA0\xA0\u5404\u4E13\u4E1A\u8003\u7EC8\u7ED3\u6027\u8003\u8BD5\u6210\u7EE9\u5BF9\u6BD4")),T.createElement(M.Z,{className:"font14 c-grey-333 text-start mt20",value:((Xn=yt==null?void 0:yt.condition_analysis)==null?void 0:Xn.student_condition_analysis)||""})))),T.createElement("tr",null,T.createElement("td",{className:On},"\u5B58\u5728\u7684\u95EE\u9898\u4EE5\u53CA\u6539\u8FDB\u610F\u89C1"),T.createElement("td",{colSpan:7},T.createElement(M.Z,{className:"font14 c-grey-333 text-start pr10 pl10",value:((Jn=yt==null?void 0:yt.suggestion)==null?void 0:Jn.suggestion_content)||""}))),T.createElement("tr",null,T.createElement("td",{colSpan:4,height:200},T.createElement("div",{className:"flex flex-col justify-between h-full"},T.createElement("div",{className:"text-start"},"\u4EFB\u8BFE\u6559\u5E08\uFF08\u7B7E\u540D\uFF09"),T.createElement("div",{className:"text-end"},"\u5E74\xA0\xA0\xA0\xA0\xA0\xA0\xA0\xA0\u6708\xA0\xA0\xA0\xA0\xA0\xA0\xA0\xA0\u65E5"))),T.createElement("td",{colSpan:4,height:200},T.createElement("div",{className:"flex flex-col justify-between h-full"},T.createElement("div",{className:"text-start"},"\u7CFB\uFF08\u6240\u3001\u5BA4\uFF09\u4E3B\u4EFB\uFF08\u7B7E\u540D\uFF09"),T.createElement("div",{className:"text-end"},"\u5E74\xA0\xA0\xA0\xA0\xA0\xA0\xA0\xA0\u6708\xA0\xA0\xA0\xA0\xA0\xA0\xA0\xA0\u65E5")))),T.createElement("tr",null,T.createElement("td",{colSpan:8},T.createElement("div",{className:"text-start"},"\u6CE8\uFF1A\u6BCF\u95E8\u8BFE\u7A0B\u5E94\u586B\u5199\u4E00\u4EFD\u8003\u6838\u5C0F\u7ED3\u3002")))))};var Te=(0,V.connect)(({exercise:O})=>({exercise:O}))(we),Re=x(59301),Y=Object.defineProperty,$=Object.defineProperties,te=Object.getOwnPropertyDescriptors,q=Object.getOwnPropertySymbols,he=Object.prototype.hasOwnProperty,re=Object.prototype.propertyIsEnumerable,E=(O,ue,De)=>ue in O?Y(O,ue,{enumerable:!0,configurable:!0,writable:!0,value:De}):O[ue]=De,C=(O,ue)=>{for(var De in ue||(ue={}))he.call(ue,De)&&E(O,De,ue[De]);if(q)for(var De of q(ue))re.call(ue,De)&&E(O,De,ue[De]);return O},W=(O,ue)=>$(O,te(ue));const be=({items:O,labelClassName:ue,labelStyle:De})=>Re.createElement("div",{className:"flex flex-col text-start gap-8px"},O==null?void 0:O.map((Ae,Be)=>Re.createElement("div",{key:Be,className:"flex gap-20px"},Ae.label&&Re.createElement("div",{className:`w-56px c-grey-666 ${ue||""} ${(Ae==null?void 0:Ae.labelClassName)||""}`,style:C(C({whiteSpace:"nowrap",textAlignLast:"justify",lineHeight:"28px"},De||{}),(Ae==null?void 0:Ae.labelStyle)||{})},Ae.label),(Ae==null?void 0:Ae.children)&&Re.createElement("div",null,Ae==null?void 0:Ae.children)))),Ve=({data:O=[],ylabel:ue="",xlabel:De="",className:Ae="",itemStyle:Be={},formatter:Se="{c}%"})=>{const ot=(0,fe.useMemo)(()=>{const Xe=[],je=[];return O==null||O.forEach(qe=>{Xe.push(qe==null?void 0:qe.x_axis),je.push(qe==null?void 0:qe.y_axis)}),{tooltip:{},grid:{left:"5%",right:"5%",bottom:"7%",top:"20%",containLabel:!0},xAxis:{type:"category",data:[...Xe||[],De],axisTick:{show:!1},axisLine:{lineStyle:{color:"#EBEBEB"}},axisLabel:{color:"#666666",interval:0}},yAxis:{name:ue,nameTextStyle:{color:"#666",padding:[0,0,10,0]},type:"value",splitLine:{show:!1},axisLine:{show:!0,lineStyle:{color:"#EBEBEB"}},axisLabel:{color:"#666666"}},series:[{data:je,barMaxWidth:"40px",itemStyle:C({color:"#A2BEFF",borderColor:"#165DFF"},Be),type:"bar",label:{color:"#666",show:!0,position:"top",valueAnimation:!0,formatter:Se}}]}},[O]);return Re.createElement(H.Z,{className:Ae,style:{background:"#F6F7F9"},option:ot})},Ke=({exercise:O,dispatch:ue})=>{var De,Ae,Be,Se,ot,Xe,je,qe,kt,gt,_t,Pe,Wt,St,vt,dn,hn,Ot,Ln,qn,sn,Mn,ut,nt,ze,ne,me,Ie,Ue,ke,Gt,_n,wn,$n,mr,sr,lr,zn,Lr,Sr,xr,Zr,Tn,fn,Zn,vr,Hr,it,tt,mn,Jt,Bn,xn,vn,yn,Qn,bn,Un,Sn;const{SumupDetail:Tt}=O,Dt="text-500 text-16px",$e=ft=>ft?" \u2713 ":Re.createElement(Re.Fragment,null,"\xA0\xA0\xA0\xA0");return Re.createElement("section",{className:"flex flex-col item-center"},Re.createElement("div",{className:"font30 mb20",style:{fontWeight:600}},(Tt==null?void 0:Tt.big_title)||"XXXX\u5927\u5B66\u8BFE\u7A0B\u8003\u6838\u8BD5\u5377\u5206\u6790\u8868"),Re.createElement("div",{className:"w-full",style:{textAlign:"end"}},Tt==null?void 0:Tt.teaching_semester),Re.createElement("table",{className:"w-full native_table",border:1,style:{borderColor:"#dcdcdc"}},Re.createElement("tr",null,Re.createElement("td",{className:Dt,colSpan:2},"\u8BFE\u7A0B\u540D\u79F0"),Re.createElement("td",{colSpan:6},(Tt==null?void 0:Tt.course_list_name)||"")),Re.createElement("tr",null,Re.createElement("td",{className:Dt,colSpan:2},"\u6559\u5B66\u73ED\u7EA7"),Re.createElement("td",{colSpan:6},(Tt==null?void 0:Tt.course_group_names)||"")),Re.createElement("tr",null,Re.createElement("td",{className:Dt,colSpan:2},"\u4EFB\u8BFE\u6559\u5E08"),Re.createElement("td",null,(Tt==null?void 0:Tt.exercise_creator)||""),Re.createElement("td",{className:Dt},"\u8003\u8BD5\u65B9\u5F0F"),Re.createElement("td",{colSpan:4},"\u7B14\u8BD5\uFF08",$e((Tt==null?void 0:Tt.exercise_type_number)===b.k.BISHI),"\uFF09 \u673A\u8BD5\uFF08",$e((Tt==null?void 0:Tt.exercise_type_number)===b.k.JISHI),"\uFF09 \u53E3\u8BD5\uFF08",$e((Tt==null?void 0:Tt.exercise_type_number)===b.k.KOUSHI),"\uFF09 \u5176\u4ED6\uFF08",$e((Tt==null?void 0:Tt.exercise_type_number)===b.k.OTHER),"\uFF09")),Re.createElement("tr",null,Re.createElement("td",{className:Dt,rowSpan:5,width:80},"\u7EC8\u7ED3\u6027\u6210\u7EE9\u7EDF\u8BA1"),Re.createElement("td",{className:Dt,rowSpan:4,width:80},"\u6210\u7EE9\u5206\u5E03"),Re.createElement("td",{className:Dt,width:180},"\u6700\u9AD8\u5206"),Re.createElement("td",{width:180},(De=Tt==null?void 0:Tt.score_distribution)==null?void 0:De.max_score),Re.createElement("td",{className:Dt},"\u6700\u4F4E\u5206"),Re.createElement("td",null,(Ae=Tt==null?void 0:Tt.score_distribution)==null?void 0:Ae.min_score),Re.createElement("td",{className:Dt},"\u5E73\u5747\u5206"),Re.createElement("td",null,(Be=Tt==null?void 0:Tt.score_distribution)==null?void 0:Be.average_score)),Re.createElement("tr",null,Re.createElement("td",{className:Dt},"\u6210\u7EE9"),Re.createElement("td",null,(ot=(Se=Tt==null?void 0:Tt.score_distribution)==null?void 0:Se.best)==null?void 0:ot.score_area),Re.createElement("td",null,(je=(Xe=Tt==null?void 0:Tt.score_distribution)==null?void 0:Xe.good)==null?void 0:je.score_area),Re.createElement("td",null,(kt=(qe=Tt==null?void 0:Tt.score_distribution)==null?void 0:qe.middle)==null?void 0:kt.score_area),Re.createElement("td",null,(_t=(gt=Tt==null?void 0:Tt.score_distribution)==null?void 0:gt.pass)==null?void 0:_t.score_area),Re.createElement("td",null,(Wt=(Pe=Tt==null?void 0:Tt.score_distribution)==null?void 0:Pe.fails)==null?void 0:Wt.score_area,"\u4EE5\u4E0B")),Re.createElement("tr",null,Re.createElement("td",{className:Dt},"\u4EBA\u6570"),Re.createElement("td",null,(vt=(St=Tt==null?void 0:Tt.score_distribution)==null?void 0:St.best)==null?void 0:vt.people_count),Re.createElement("td",null,(hn=(dn=Tt==null?void 0:Tt.score_distribution)==null?void 0:dn.good)==null?void 0:hn.people_count),Re.createElement("td",null,(Ln=(Ot=Tt==null?void 0:Tt.score_distribution)==null?void 0:Ot.middle)==null?void 0:Ln.people_count),Re.createElement("td",null,(sn=(qn=Tt==null?void 0:Tt.score_distribution)==null?void 0:qn.pass)==null?void 0:sn.people_count),Re.createElement("td",null,(ut=(Mn=Tt==null?void 0:Tt.score_distribution)==null?void 0:Mn.fails)==null?void 0:ut.people_count)),Re.createElement("tr",null,Re.createElement("td",{className:Dt},"\u767E\u5206\u6BD4"),Re.createElement("td",null,Math.round((((ze=(nt=Tt==null?void 0:Tt.score_distribution)==null?void 0:nt.best)==null?void 0:ze.rate)||0)*1e4)/100,"%"),Re.createElement("td",null,Math.round((((me=(ne=Tt==null?void 0:Tt.score_distribution)==null?void 0:ne.good)==null?void 0:me.rate)||0)*1e4)/100,"%"),Re.createElement("td",null,Math.round((((Ue=(Ie=Tt==null?void 0:Tt.score_distribution)==null?void 0:Ie.middle)==null?void 0:Ue.rate)||0)*1e4)/100,"%"),Re.createElement("td",null,Math.round((((Gt=(ke=Tt==null?void 0:Tt.score_distribution)==null?void 0:ke.pass)==null?void 0:Gt.rate)||0)*1e4)/100,"%"),Re.createElement("td",null,Math.round((((wn=(_n=Tt==null?void 0:Tt.score_distribution)==null?void 0:_n.fails)==null?void 0:wn.rate)||0)*1e4)/100,"%")),Re.createElement("tr",null,Re.createElement("td",{colSpan:7},(Tt==null?void 0:Tt.score_distribution)&&Re.createElement(Ve,{data:[{x_axis:`<=${(mr=($n=Tt==null?void 0:Tt.score_distribution)==null?void 0:$n.fails)==null?void 0:mr.score_area}`,y_axis:((lr=(sr=Tt==null?void 0:Tt.score_distribution)==null?void 0:sr.fails)==null?void 0:lr.people_count)||0},{x_axis:`${(Lr=(zn=Tt==null?void 0:Tt.score_distribution)==null?void 0:zn.pass)==null?void 0:Lr.score_area}`,y_axis:((xr=(Sr=Tt==null?void 0:Tt.score_distribution)==null?void 0:Sr.pass)==null?void 0:xr.people_count)||0},{x_axis:`${(Tn=(Zr=Tt==null?void 0:Tt.score_distribution)==null?void 0:Zr.middle)==null?void 0:Tn.score_area}`,y_axis:((Zn=(fn=Tt==null?void 0:Tt.score_distribution)==null?void 0:fn.middle)==null?void 0:Zn.people_count)||0},{x_axis:`${(Hr=(vr=Tt==null?void 0:Tt.score_distribution)==null?void 0:vr.good)==null?void 0:Hr.score_area}`,y_axis:((tt=(it=Tt==null?void 0:Tt.score_distribution)==null?void 0:it.good)==null?void 0:tt.people_count)||0},{x_axis:`${(Jt=(mn=Tt==null?void 0:Tt.score_distribution)==null?void 0:mn.best)==null?void 0:Jt.score_area}`,y_axis:((xn=(Bn=Tt==null?void 0:Tt.score_distribution)==null?void 0:Bn.best)==null?void 0:xn.people_count)||0}],ylabel:"\u4EBA\u6570\uFF08\u5355\u4F4D\uFF1A\u4EBA\uFF09",xlabel:"\u5206\u6570\u533A\u95F4",formatter:"{c}"}))),Re.createElement("tr",null,Re.createElement("td",{className:Dt},"\u8BD5\u5377\uFF08\u6216\u8003\u6838\uFF09\u60C5\u51B5\u5206\u6790"),Re.createElement("td",{colSpan:7},Re.createElement("div",{className:"flex flex-col gap-20px pl10 pr10 text-start"},Re.createElement(M.Z,{className:"font14 c-grey-333",value:`${((vn=Tt==null?void 0:Tt.exercise_questions_info)==null?void 0:vn.exercise_questions_str)||""}
|
|
${((yn=Tt==null?void 0:Tt.exercise_questions_info)==null?void 0:yn.exercise_content)||""}`}),(bn=(Qn=Tt==null?void 0:Tt.exercise_questions_info)==null?void 0:Qn.exercise_questions)==null?void 0:bn.map((ft,Qt)=>{var Lt,on,Cn;return Re.createElement("div",{key:Qt},Re.createElement("div",{className:"text-500 c-black mb10 "},Qt+1,"\u3001",ft==null?void 0:ft.name),Re.createElement(be,{items:(Lt=ft==null?void 0:ft.items)==null?void 0:Lt.map((pn,Hn)=>{var Xn,Jn;return{label:`\u7B2C${Hn+1}\u9898`,labelClassName:"w-auto h-full",children:Re.createElement(Re.Fragment,null,Re.createElement(M.Z,{className:"font14 c-grey-333 text-start",value:(pn==null?void 0:pn.question_title)||""}),((Xn=pn==null?void 0:pn.tag_discipline_names)==null?void 0:Xn.length)>0&&Re.createElement("div",null,"\u8003\u70B9\uFF1A",(Jn=pn==null?void 0:pn.tag_discipline_names)==null?void 0:Jn.join("\u3001")))}})}),Re.createElement("div",{className:"text-500 c-black mb10 mt20"},"\u7EC8\u7ED3\u6027\u8003\u6838\u6210\u7EE9\u5206\u5E03\u56FE"),Re.createElement(Ve,{data:(on=ft==null?void 0:ft.chart_1)==null?void 0:on.map((pn={},Hn)=>W(C({},pn),{x_axis:Hn+1,y_axis:Math.round(pn.y_axis*1e4)/100})),ylabel:"\u6B63\u786E\u7387",xlabel:"\u9898\u76EE"}),Re.createElement(Ve,{className:"mt10",data:(Cn=ft==null?void 0:ft.chart_2)==null?void 0:Cn.map((pn={},Hn)=>W(C({},pn),{x_axis:Hn+1,y_axis:Math.round(pn.y_axis*1e4)/100})),ylabel:"\u5F97\u5206\u7387",xlabel:"\u9898\u76EE",itemStyle:{color:"#2EC25B",borderColor:"#2EC25B"}}),Re.createElement("div",{className:"text-500 c-black mb10 mt20"},"\u5177\u4F53\u5F97\u5206\u660E\u7EC6\u5982\u4E0B\u8868\u6240\u793A"),Re.createElement(J.default,{className:"mb20",pagination:!1,dataSource:(ft==null?void 0:ft.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:pn=>`${Math.round(pn*1e4)/100}%`}]},{title:"\u5E73\u5747\u5206",dataIndex:"average_score",align:"center"}]}),Re.createElement(M.Z,{className:"font14 c-grey-333 text-start",value:(ft==null?void 0:ft.question_type_conent)||""}))}),Re.createElement(M.Z,{className:"font14 c-grey-333 text-start",value:((Un=Tt==null?void 0:Tt.condition_analysis)==null?void 0:Un.student_condition_analysis)||""})))),Re.createElement("tr",null,Re.createElement("td",{className:Dt},"\u5B58\u5728\u7684\u95EE\u9898\u53CA\u6539\u8FDB\u63AA\u65BD"),Re.createElement("td",{colSpan:7},Re.createElement(M.Z,{className:"font14 c-grey-333 text-start pr10 pl10",value:((Sn=Tt==null?void 0:Tt.suggestion)==null?void 0:Sn.suggestion_content)||""}))),Re.createElement("tr",null,Re.createElement("td",{colSpan:4,height:200},Re.createElement("div",{className:"flex flex-col justify-between h-full"},Re.createElement("div",{className:"text-start"},"\u4EFB\u8BFE\u6559\u5E08\uFF08\u7B7E\u540D\uFF09"),Re.createElement("div",{className:"text-end"},"\u5E74\xA0\xA0\xA0\xA0\xA0\xA0\xA0\xA0\u6708\xA0\xA0\xA0\xA0\xA0\xA0\xA0\xA0\u65E5"))),Re.createElement("td",{colSpan:4,height:200},Re.createElement("div",{className:"flex flex-col justify-between h-full"},Re.createElement("div",{className:"text-start"},"\u7CFB\uFF08\u6240\u3001\u5BA4\uFF09\u4E3B\u4EFB\uFF08\u7B7E\u540D\uFF09"),Re.createElement("div",{className:"text-end"},"\u5E74\xA0\xA0\xA0\xA0\xA0\xA0\xA0\xA0\u6708\xA0\xA0\xA0\xA0\xA0\xA0\xA0\xA0\u65E5"))))),Re.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 Ct=(0,V.connect)(({exercise:O})=>({exercise:O}))(Ke),Rt=x(41604),Vt=x(44164),rn=x.n(Vt),He=x(98072),ln=x(72664),It=x(59301),cn=Object.defineProperty,xt=Object.getOwnPropertySymbols,ht=Object.prototype.hasOwnProperty,Oe=Object.prototype.propertyIsEnumerable,Fe=(O,ue,De)=>ue in O?cn(O,ue,{enumerable:!0,configurable:!0,writable:!0,value:De}):O[ue]=De,j=(O,ue)=>{for(var De in ue||(ue={}))ht.call(ue,De)&&Fe(O,De,ue[De]);if(xt)for(var De of xt(ue))Oe.call(ue,De)&&Fe(O,De,ue[De]);return O},Ne=(O,ue,De)=>new Promise((Ae,Be)=>{var Se=je=>{try{Xe(De.next(je))}catch(qe){Be(qe)}},ot=je=>{try{Xe(De.throw(je))}catch(qe){Be(qe)}},Xe=je=>je.done?Ae(je.value):Promise.resolve(je.value).then(Se,ot);Xe((De=De.apply(O,ue)).next())});const Ze=({user:O,exercise:ue,dispatch:De})=>{var Ae;const Be=(0,V.useParams)(),[Se]=(0,V.useSearchParams)(),ot=Number(Se.get("template")||"1"),Xe=Se.get("exam_summary_id")&&Number(Se.get("exam_summary_id")),je=Se.getAll("exercise_group_id").map(hn=>hn==="all"?hn:Number(hn)),{userInfo:qe}=O,{commonHeader:kt,SumupDetail:gt}=ue,[_t,Pe]=(0,fe.useState)(1),Wt=(0,fe.useRef)(null),[,St,vt]=(0,He.U)(ln.Ym,{}),dn=()=>Ne(void 0,null,function*(){var hn;De({type:"exercise/getCommonHeader",payload:{categoryId:Be==null?void 0:Be.exerciseId}});const Ot=yield vt({exam_summary_template_id:ot,exam_summary_id:Xe,id:(Be==null?void 0:Be.categoryId)||(Be==null?void 0:Be.exerciseId),exercise_group_id:je.includes("all")?[]:je});(Ot==null?void 0:Ot.status)===0&&(Se.set("exam_summary_id",(hn=Ot==null?void 0:Ot.data)==null?void 0:hn.exam_summary_id),De({type:"exercise/save",payload:{SumupDetail:j({exercise_group_id:je},Ot==null?void 0:Ot.data)}}))});return(0,fe.useEffect)(()=>{ot&&Pe(ot||1),dn()},[Se]),It.createElement(Ce.Z,{spinning:St},It.createElement("section",{className:"edu-container"},It.createElement(ge.Z,{className:"mt10",separator:">",items:[{title:(Ae=qe==null?void 0:qe.course)==null?void 0:Ae.course_name,href:`/classrooms/${Be.coursesId}/exercise`},{title:"\u5728\u7EBF\u8003\u8BD5",href:`/classrooms/${Be.coursesId}/exercise`},{title:"\u8BD5\u5377\u8BE6\u60C5",href:`/classrooms/${Be.coursesId}/exercise/${Be==null?void 0:Be.exerciseId}/detail`},{title:kt==null?void 0:kt.exercise_name}]}),It.createElement("div",{className:"flex mt20 justify-between"},It.createElement("div",{className:"flex item-center"},It.createElement("a",{href:`/classrooms/${Be.coursesId}/exercise/${Be==null?void 0:Be.exerciseId}/sumup?template=${_t}`},It.createElement(g.Z,{className:"font16 c-black",rev:void 0})),(0,o.vB)(kt==null?void 0:kt.exercise_status,kt==null?void 0:kt.appraise_label),It.createElement("strong",{className:"font20 ml5"},kt==null?void 0:kt.exercise_name)),It.createElement("div",{className:"flex gap-20px"},It.createElement(G.ZP,{icon:It.createElement("i",{className:"iconfont icon-bianjizuoye"}),onClick:()=>{V.history.push(`/classrooms/${Be==null?void 0:Be.coursesId}/exercise/${Be==null?void 0:Be.exerciseId}/sumup/edit?${Se.toString()}`)}},"\u7F16\u8F91"),It.createElement(G.ZP,{type:"primary",icon:It.createElement(ye.Z,{rev:void 0}),onClick:()=>Ne(void 0,null,function*(){yield rn()().set({margin:10,image:{type:"jpeg",quality:.95},jsPDF:{unit:"pt",format:"a4",orientation:"landscape"},filename:`${gt==null?void 0:gt.big_title}.pdf`,html2canvas:{letterRendering:!0,useCORS:!0,allowTaint:!1,scale:1,dpi:300},pagebreak:{mode:["avoid-all","css"]}}).from(Wt.current).save()})},"\u5BFC\u51FA"),It.createElement(G.ZP,{icon:It.createElement(le.Z,{rev:void 0}),onClick:()=>{De({type:"exercise/setActionTabs",payload:{title:"\u8003\u8BD5\u603B\u7ED3\u8BBE\u7F6E",isEdit:!0}})}},"\u5BFC\u51FA\u8BBE\u7F6E"))),It.createElement("div",{className:"mt20 bg-white pt40 pb40 pr30 pl30"},It.createElement("section",{ref:Wt,className:""},_t===1&&It.createElement(Te,null),_t===2&&It.createElement(Ct,null))),It.createElement(Rt.Z,null)))};var ee=(0,V.connect)(({user:O,exercise:ue})=>({user:O,exercise:ue}))(Ze)},98072:function(Vn,ct,x){"use strict";x.d(ct,{U:function(){return o}});var V=x(59301),fe=Object.defineProperty,Ce=Object.getOwnPropertySymbols,ge=Object.prototype.hasOwnProperty,G=Object.prototype.propertyIsEnumerable,g=(S,U,_)=>U in S?fe(S,U,{enumerable:!0,configurable:!0,writable:!0,value:_}):S[U]=_,ye=(S,U)=>{for(var _ in U||(U={}))ge.call(U,_)&&g(S,_,U[_]);if(Ce)for(var _ of Ce(U))G.call(U,_)&&g(S,_,U[_]);return S},le=(S,U,_)=>new Promise((w,b)=>{var R=J=>{try{H(_.next(J))}catch(T){b(T)}},M=J=>{try{H(_.throw(J))}catch(T){b(T)}},H=J=>J.done?w(J.value):Promise.resolve(J.value).then(R,M);H((_=_.apply(S,U)).next())});function o(S,U){const[_,w]=(0,V.useState)(U),[b,R]=(0,V.useState)(!1),[M,H]=(0,V.useState)();return[_,b,(T,N=!1)=>le(this,null,function*(){const P=N?U:ye(ye({},_),T);R(!0),w(P);const k=yield S(P);return R(!1),H(k),k}),M,H]}},90290:function(Vn,ct,x){"use strict";x.d(ct,{AL:function(){return P},Iy:function(){return U},Qv:function(){return b},ez:function(){return N},jb:function(){return _}});var V=x(32834),fe=x.n(V),Ce=x(11690),ge=x.n(Ce);let G=1;function g(ae,we){const Te=ae.match(/^(\s+)(?:```)/);if(Te===null)return we;const Re=Te[1];return we.split(`
|
|
`).map(Y=>{const $=Y.match(/^\s+/);if($===null)return Y;const[te]=$;return te.length>=Re.length?Y.slice(Re.length):Y}).join(`
|
|
`)}let ye=[],le=["<ul>"];const o=new(fe()).Renderer,S=/^ *(#{1,6}) *([^\n]+?) *(?:#+ *)?(?:\n+|$)/;function U(){ye.length=0,le=["<ul>"]}const _={overflow:"hidden",WebkitBoxOrient:"vertical",display:"-webkit-box",WebkitLineClamp:2};function w(ae,we,Te,Re){if(we>=ae.length||ae[we].level<=Te)return we;var Y=ae[we];Re.push("<li><a href='#"+G+Y.anchor+"'>"+Y.text+"</a>"),we++;var $=[];return we=w(ae,we,Y.level,$),$.length>0&&(Re.push("<ul>"),$.forEach(function(te){Re.push(te)}),Re.push("</ul>")),Re.push("</li>"),we=w(ae,we,Te,Re),we}function b(){return w(ye,0,0,le),le.push("</ul>"),le.join("")}const R={heading(ae){const we=S.exec(ae);if(G+=1,we)return{type:"heading",raw:we[0],depth:we[1].length,text:we[2]}},fences(ae){const we=this.rules.block.fences.exec(ae);if(we){const Te=we[0];let Re=g(Te,we[3]||"");const Y=we[2]?we[2].trim():we[2];if(["latex","katex","math"].indexOf(Y)>=0){const $=J(),te=Re;Re=$,T[$]={type:"block",expression:te}}return{type:"code",raw:Te,lang:Y,text:Re}}}},M=/(?:\${2})([^\n`]+?)(?:\${2})/gi;let H=0;const J=()=>`__special_katext_id_${H++}__`;let T={};function N(){return T}function P(){H=0,T={}}function k(ae){return ae=ae.replace(M,(we,Te)=>{const Re=J();return T[Re]={type:"inline",expression:Te},Re}),ae}const oe=o.listitem;o.listitem=function(ae){return oe(k(ae))};const de=o.paragraph;o.paragraph=function(ae){return de(k(ae))};const ie=o.tablecell;o.tablecell=function(ae,we){return ie(k(ae),we)},o.code=function(ae,we,Te){const Re=(we||"").match(/\S*/)[0];return Re?["latex","katex","math"].indexOf(Re)>=0?`<p class='editormd-tex'>${ae}</p>`:`<pre class="prettyprint linenums"><code class="language-${we}">${Te?ae:(0,Ce.escape)(ae,!0)}</code></pre>
|
|
`:'<pre class="prettyprint linenums"><code>'+(Te?ae:(0,Ce.escape)(ae,!0))+"</code></pre>"},o.heading=function(ae,we,Te){let Re=this.options.headerPrefix+Te.toLowerCase().replace(/[^\w\\u4e00-\\u9fa5]]+/g,"-");return ye.push({anchor:Re,level:we,text:ae}),"<h"+we+' id="'+G+Re+'">'+ae+"</h"+we+">"},fe().setOptions({silent:!0,gfm:!0,pedantic:!1}),fe().use({tokenizer:R,renderer:o}),ct.ZP=fe()},64018:function(){var Vn,ct,x,V=!1,fe,Ce;window.PR_SHOULD_USE_CONTINUATION=!0;var ge,G;(function(){var g=window,ye=["break,continue,do,else,for,if,return,while"],le=[ye,"auto,case,char,const,default,double,enum,extern,float,goto,inline,int,long,register,restrict,short,signed,sizeof,static,struct,switch,typedef,union,unsigned,void,volatile"],o=[le,"catch,class,delete,false,import,new,operator,private,protected,public,this,throw,true,try,typeof"],S=[o,"alignas,alignof,align_union,asm,axiom,bool,concept,concept_map,const_cast,constexpr,decltype,delegate,dynamic_cast,explicit,export,friend,generic,late_check,mutable,namespace,noexcept,noreturn,nullptr,property,reinterpret_cast,static_assert,static_cast,template,typeid,typename,using,virtual,where"],U=[o,"abstract,assert,boolean,byte,extends,finally,final,implements,import,instanceof,interface,null,native,package,strictfp,super,synchronized,throws,transient"],_=[o,"abstract,add,alias,as,ascending,async,await,base,bool,by,byte,checked,decimal,delegate,descending,dynamic,event,finally,fixed,foreach,from,get,global,group,implicit,in,interface,internal,into,is,join,let,lock,null,object,out,override,orderby,params,partial,readonly,ref,remove,sbyte,sealed,select,set,stackalloc,string,select,uint,ulong,unchecked,unsafe,ushort,value,var,virtual,where,yield"],w="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",b=[o,"abstract,async,await,constructor,debugger,enum,eval,export,function,get,implements,instanceof,interface,let,null,set,undefined,var,with,yield,Infinity,NaN"],R="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",M=[ye,"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"],H=[ye,"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"],J=[ye,"case,done,elif,esac,eval,fi,function,in,local,set,then,until"],T=[S,_,U,b,R,M,H,J],N=/^(DIR|FILE|array|vector|(de|priority_)?queue|(forward_)?list|stack|(const_)?(reverse_)?iterator|(unordered_)?(multi)?(set|map)|bitset|u?(int|float)\d*)\b/,P="str",k="kwd",oe="com",de="typ",ie="lit",ae="pun",we="pln",Te="tag",Re="dec",Y="src",$="atn",te="atv",q="nocode",he="(?:^^\\.?|[+-]|[!=]=?=?|\\#|%=?|&&?=?|\\(|\\*=?|[+\\-]=|->|\\/=?|::?|<<?=?|>>?>?=?|,|;|\\?|@|\\[|~|{|\\^\\^?=?|\\|\\|?=?|break|case|continue|delete|do|else|finally|instanceof|return|throw|try|typeof)\\s*";function re(Fe){for(var j=0,Ne=!1,Ze=!1,ee=0,O=Fe.length;ee<O;++ee){var ue=Fe[ee];if(ue.ignoreCase)Ze=!0;else if(/[a-z]/i.test(ue.source.replace(/\\u[0-9a-f]{4}|\\x[0-9a-f]{2}|\\[^ux]/gi,""))){Ne=!0,Ze=!1;break}}var De={b:8,t:9,n:10,v:11,f:12,r:13};function Ae(je){var qe=je.charCodeAt(0);if(qe!==92)return qe;var kt=je.charAt(1);return qe=De[kt],qe||("0"<=kt&&kt<="7"?parseInt(je.substring(1),8):kt==="u"||kt==="x"?parseInt(je.substring(2),16):je.charCodeAt(1))}function Be(je){if(je<32)return(je<16?"\\x0":"\\x")+je.toString(16);var qe=String.fromCharCode(je);return qe==="\\"||qe==="-"||qe==="]"||qe==="^"?"\\"+qe:qe}function Se(je){var qe=je.substring(1,je.length-1).match(new RegExp("\\\\u[0-9A-Fa-f]{4}|\\\\x[0-9A-Fa-f]{2}|\\\\[0-3][0-7]{0,2}|\\\\[0-7]{1,2}|\\\\[\\s\\S]|-|[^-\\\\]","g")),kt=[],gt=qe[0]==="^",_t=["["];gt&&_t.push("^");for(var Pe=gt?1:0,Wt=qe.length;Pe<Wt;++Pe){var St=qe[Pe];if(/\\[bdsw]/i.test(St))_t.push(St);else{var vt=Ae(St),dn;Pe+2<Wt&&qe[Pe+1]==="-"?(dn=Ae(qe[Pe+2]),Pe+=2):dn=vt,kt.push([vt,dn]),dn<65||vt>122||(dn<65||vt>90||kt.push([Math.max(65,vt)|32,Math.min(dn,90)|32]),dn<97||vt>122||kt.push([Math.max(97,vt)&-33,Math.min(dn,122)&-33]))}}kt.sort(function(qn,sn){return qn[0]-sn[0]||sn[1]-qn[1]});for(var hn=[],Ot=[],Pe=0;Pe<kt.length;++Pe){var Ln=kt[Pe];Ln[0]<=Ot[1]+1?Ot[1]=Math.max(Ot[1],Ln[1]):hn.push(Ot=Ln)}for(var Pe=0;Pe<hn.length;++Pe){var Ln=hn[Pe];_t.push(Be(Ln[0])),Ln[1]>Ln[0]&&(Ln[1]+1>Ln[0]&&_t.push("-"),_t.push(Be(Ln[1])))}return _t.push("]"),_t.join("")}function ot(je){for(var qe=je.source.match(new RegExp("(?:\\[(?:[^\\x5C\\x5D]|\\\\[\\s\\S])*\\]|\\\\u[A-Fa-f0-9]{4}|\\\\x[A-Fa-f0-9]{2}|\\\\[0-9]+|\\\\[^ux0-9]|\\(\\?[:!=]|[\\(\\)\\^]|[^\\x5B\\x5C\\(\\)\\^]+)","g")),kt=qe.length,gt=[],_t=0,Pe=0;_t<kt;++_t){var Wt=qe[_t];if(Wt==="(")++Pe;else if(Wt.charAt(0)==="\\"){var St=+Wt.substring(1);St&&(St<=Pe?gt[St]=-1:qe[_t]=Be(St))}}for(var _t=1;_t<gt.length;++_t)gt[_t]===-1&&(gt[_t]=++j);for(var _t=0,Pe=0;_t<kt;++_t){var Wt=qe[_t];if(Wt==="(")++Pe,gt[Pe]||(qe[_t]="(?:");else if(Wt.charAt(0)==="\\"){var St=+Wt.substring(1);St&&St<=Pe&&(qe[_t]="\\"+gt[St])}}for(var _t=0;_t<kt;++_t)qe[_t]==="^"&&qe[_t+1]!=="^"&&(qe[_t]="");if(je.ignoreCase&&Ne)for(var _t=0;_t<kt;++_t){var Wt=qe[_t],vt=Wt.charAt(0);Wt.length>=2&&vt==="["?qe[_t]=Se(Wt):vt!=="\\"&&(qe[_t]=Wt.replace(/[a-zA-Z]/g,function(Ot){var Ln=Ot.charCodeAt(0);return"["+String.fromCharCode(Ln&-33,Ln|32)+"]"}))}return qe.join("")}for(var Xe=[],ee=0,O=Fe.length;ee<O;++ee){var ue=Fe[ee];if(ue.global||ue.multiline)throw new Error(""+ue);Xe.push("(?:"+ot(ue)+")")}return new RegExp(Xe.join("|"),Ze?"gi":"g")}function E(Fe,j){var Ne=/(?:^|\s)nocode(?:\s|$)/,Ze=[],ee=0,O=[],ue=0;function De(Ae){var Be=Ae.nodeType;if(Be==1){if(Ne.test(Ae.className))return;for(var Se=Ae.firstChild;Se;Se=Se.nextSibling)De(Se);var ot=Ae.nodeName.toLowerCase();(ot==="br"||ot==="li")&&(Ze[ue]=`
|
|
`,O[ue<<1]=ee++,O[ue++<<1|1]=Ae)}else if(Be==3||Be==4){var Xe=Ae.nodeValue;Xe.length&&(j?Xe=Xe.replace(/\r\n?/g,`
|
|
`):Xe=Xe.replace(/[ \t\r\n]+/g," "),Ze[ue]=Xe,O[ue<<1]=ee,ee+=Xe.length,O[ue++<<1|1]=Ae)}}return De(Fe),{sourceCode:Ze.join("").replace(/\n$/,""),spans:O}}function C(Fe,j,Ne,Ze,ee){if(Ne){var O={sourceNode:Fe,pre:1,langExtension:null,numberLines:null,sourceCode:Ne,spans:null,basePos:j,decorations:null};Ze(O),ee.push.apply(ee,O.decorations)}}var W=/\S/;function be(Fe){for(var j=void 0,Ne=Fe.firstChild;Ne;Ne=Ne.nextSibling){var Ze=Ne.nodeType;j=Ze===1?j?Fe:Ne:Ze===3&&W.test(Ne.nodeValue)?Fe:j}return j===Fe?void 0:j}function Ve(Fe,j){var Ne={},Ze;(function(){for(var ue=Fe.concat(j),De=[],Ae={},Be=0,Se=ue.length;Be<Se;++Be){var ot=ue[Be],Xe=ot[3];if(Xe)for(var je=Xe.length;--je>=0;)Ne[Xe.charAt(je)]=ot;var qe=ot[1],kt=""+qe;Ae.hasOwnProperty(kt)||(De.push(qe),Ae[kt]=null)}De.push(/[\0-\uffff]/),Ze=re(De)})();var ee=j.length,O=function(ue){for(var De=ue.sourceCode,Ae=ue.basePos,Be=ue.sourceNode,Se=[Ae,we],ot=0,Xe=De.match(Ze)||[],je={},qe=0,kt=Xe.length;qe<kt;++qe){var gt=Xe[qe],_t=je[gt],Pe=void 0,Wt;if(typeof _t=="string")Wt=!1;else{var St=Ne[gt.charAt(0)];if(St)Pe=gt.match(St[1]),_t=St[0];else{for(var vt=0;vt<ee;++vt)if(St=j[vt],Pe=gt.match(St[1]),Pe){_t=St[0];break}Pe||(_t=we)}Wt=_t.length>=5&&_t.substring(0,5)==="lang-",Wt&&!(Pe&&typeof Pe[1]=="string")&&(Wt=!1,_t=Y),Wt||(je[gt]=_t)}var dn=ot;if(ot+=gt.length,!Wt)Se.push(Ae+dn,_t);else{var hn=Pe[1],Ot=gt.indexOf(hn),Ln=Ot+hn.length;Pe[2]&&(Ln=gt.length-Pe[2].length,Ot=Ln-hn.length);var qn=_t.substring(5);C(Be,Ae+dn,gt.substring(0,Ot),O,Se),C(Be,Ae+dn+Ot,hn,ln(qn,hn),Se),C(Be,Ae+dn+Ln,gt.substring(Ln),O,Se)}}ue.decorations=Se};return O}function Ke(Fe){var j=[],Ne=[];Fe.tripleQuotedStrings?j.push([P,/^(?:\'\'\'(?:[^\'\\]|\\[\s\S]|\'{1,2}(?=[^\']))*(?:\'\'\'|$)|\"\"\"(?:[^\"\\]|\\[\s\S]|\"{1,2}(?=[^\"]))*(?:\"\"\"|$)|\'(?:[^\\\']|\\[\s\S])*(?:\'|$)|\"(?:[^\\\"]|\\[\s\S])*(?:\"|$))/,null,`'"`]):Fe.multiLineStrings?j.push([P,/^(?:\'(?:[^\\\']|\\[\s\S])*(?:\'|$)|\"(?:[^\\\"]|\\[\s\S])*(?:\"|$)|\`(?:[^\\\`]|\\[\s\S])*(?:\`|$))/,null,"'\"`"]):j.push([P,/^(?:\'(?:[^\\\'\r\n]|\\.)*(?:\'|$)|\"(?:[^\\\"\r\n]|\\.)*(?:\"|$))/,null,`"'`]),Fe.verbatimStrings&&Ne.push([P,/^@\"(?:[^\"]|\"\")*(?:\"|$)/,null]);var Ze=Fe.hashComments;Ze&&(Fe.cStyleComments?(Ze>1?j.push([oe,/^#(?:##(?:[^#]|#(?!##))*(?:###|$)|.*)/,null,"#"]):j.push([oe,/^#(?:(?:define|e(?:l|nd)if|else|error|ifn?def|include|line|pragma|undef|warning)\b|[^\r\n]*)/,null,"#"]),Ne.push([P,/^<(?:(?:(?:\.\.\/)*|\/?)(?:[\w-]+(?:\/[\w-]+)+)?[\w-]+\.h(?:h|pp|\+\+)?|[a-z]\w*)>/,null])):j.push([oe,/^#[^\r\n]*/,null,"#"])),Fe.cStyleComments&&(Ne.push([oe,/^\/\/[^\r\n]*/,null]),Ne.push([oe,/^\/\*[\s\S]*?(?:\*\/|$)/,null]));var ee=Fe.regexLiterals;if(ee){var O=ee>1?"":`
|
|
\r`,ue=O?".":"[\\S\\s]",De="/(?=[^/*"+O+"])(?:[^/\\x5B\\x5C"+O+"]|\\x5C"+ue+"|\\x5B(?:[^\\x5C\\x5D"+O+"]|\\x5C"+ue+")*(?:\\x5D|$))+/";Ne.push(["lang-regex",RegExp("^"+he+"("+De+")")])}var Ae=Fe.types;Ae&&Ne.push([de,Ae]);var Be=(""+Fe.keywords).replace(/^ | $/g,"");Be.length&&Ne.push([k,new RegExp("^(?:"+Be.replace(/[\s,]+/g,"|")+")\\b"),null]),j.push([we,/^\s+/,null,` \r
|
|
\xA0`]);var Se="^.[^\\s\\w.$@'\"`/\\\\]*";return Fe.regexLiterals&&(Se+="(?!s*/)"),Ne.push([ie,/^@[a-z_$][a-z_$@0-9]*/i,null],[de,/^(?:[@_]?[A-Z]+[a-z][A-Za-z_$@0-9]*|\w+_t\b)/,null],[we,/^[a-z_$][a-z_$@0-9]*/i,null],[ie,new RegExp("^(?:0x[a-f0-9]+|(?:\\d(?:_\\d+)*\\d*(?:\\.\\d*)?|\\.\\d\\+)(?:e[+\\-]?\\d+)?)[a-z]*","i"),null,"0123456789"],[we,/^\\[\s\S]?/,null],[ae,new RegExp(Se),null]),Ve(j,Ne)}var Ct=Ke({keywords:T,hashComments:!0,cStyleComments:!0,multiLineStrings:!0,regexLiterals:!0});function Rt(Fe,j,Ne){for(var Ze=/(?:^|\s)nocode(?:\s|$)/,ee=/\r\n?|\n/,O=Fe.ownerDocument,ue=O.createElement("li");Fe.firstChild;)ue.appendChild(Fe.firstChild);var De=[ue];function Ae(qe){var kt=qe.nodeType;if(kt==1&&!Ze.test(qe.className))if(qe.nodeName==="br")Be(qe),qe.parentNode&&qe.parentNode.removeChild(qe);else for(var gt=qe.firstChild;gt;gt=gt.nextSibling)Ae(gt);else if((kt==3||kt==4)&&Ne){var _t=qe.nodeValue,Pe=_t.match(ee);if(Pe){var Wt=_t.substring(0,Pe.index);qe.nodeValue=Wt;var St=_t.substring(Pe.index+Pe[0].length);if(St){var vt=qe.parentNode;vt.insertBefore(O.createTextNode(St),qe.nextSibling)}Be(qe),Wt||qe.parentNode.removeChild(qe)}}}function Be(qe){for(;!qe.nextSibling;)if(qe=qe.parentNode,!qe)return;function kt(Pe,Wt){var St=Wt?Pe.cloneNode(!1):Pe,vt=Pe.parentNode;if(vt){var dn=kt(vt,1),hn=Pe.nextSibling;dn.appendChild(St);for(var Ot=hn;Ot;Ot=hn)hn=Ot.nextSibling,dn.appendChild(Ot)}return St}for(var gt=kt(qe.nextSibling,0),_t;(_t=gt.parentNode)&&_t.nodeType===1;)gt=_t;De.push(gt)}for(var Se=0;Se<De.length;++Se)Ae(De[Se]);j===(j|0)&&De[0].setAttribute("value",j);var ot=O.createElement("ol");ot.className="linenums";for(var Xe=Math.max(0,j-1|0)||0,Se=0,je=De.length;Se<je;++Se)ue=De[Se],ue.className="L"+(Se+Xe)%10,ue.firstChild||ue.appendChild(O.createTextNode("\xA0")),ot.appendChild(ue);Fe.appendChild(ot)}function Vt(Fe){var j=/\bMSIE\s(\d+)/.exec(navigator.userAgent);j=j&&+j[1]<=8;var Ne=/\n/g,Ze=Fe.sourceCode,ee=Ze.length,O=0,ue=Fe.spans,De=ue.length,Ae=0,Be=Fe.decorations,Se=Be.length,ot=0;Be[Se]=ee;var Xe,je;for(je=Xe=0;je<Se;)Be[je]!==Be[je+2]?(Be[Xe++]=Be[je++],Be[Xe++]=Be[je++]):je+=2;for(Se=Xe,je=Xe=0;je<Se;){for(var qe=Be[je],kt=Be[je+1],gt=je+2;gt+2<=Se&&Be[gt+1]===kt;)gt+=2;Be[Xe++]=qe,Be[Xe++]=kt,je=gt}Se=Be.length=Xe;var _t=Fe.sourceNode,Pe="";_t&&(Pe=_t.style.display,_t.style.display="none");try{for(var Wt=null;Ae<De;){var St=ue[Ae],vt=ue[Ae+2]||ee,dn=Be[ot+2]||ee,gt=Math.min(vt,dn),hn=ue[Ae+1],Ot;if(hn.nodeType!==1&&(Ot=Ze.substring(O,gt))){j&&(Ot=Ot.replace(Ne,"\r")),hn.nodeValue=Ot;var Ln=hn.ownerDocument,qn=Ln.createElement("span");qn.className=Be[ot+1];var sn=hn.parentNode;sn.replaceChild(qn,hn),qn.appendChild(hn),O<vt&&(ue[Ae+1]=hn=Ln.createTextNode(Ze.substring(gt,vt)),sn.insertBefore(hn,qn.nextSibling))}O=gt,O>=vt&&(Ae+=2),O>=dn&&(ot+=2)}}finally{_t&&(_t.style.display=Pe)}}var rn={};function He(Fe,j){for(var Ne=j.length;--Ne>=0;){var Ze=j[Ne];rn.hasOwnProperty(Ze)?g.console&&console.warn("cannot override language handler %s",Ze):rn[Ze]=Fe}}function ln(Fe,j){return Fe&&rn.hasOwnProperty(Fe)||(Fe=/^\s*</.test(j)?"default-markup":"default-code"),rn[Fe]}He(Ct,["default-code"]),He(Ve([],[[we,/^[^<?]+/],[Re,/^<!\w[^>]*(?:>|$)/],[oe,/^<\!--[\s\S]*?(?:-\->|$)/],["lang-",/^<\?([\s\S]+?)(?:\?>|$)/],["lang-",/^<%([\s\S]+?)(?:%>|$)/],[ae,/^(?:<[%?]|[%?]>)/],["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"]),He(Ve([[we,/^[\s]+/,null,` \r
|
|
`],[te,/^(?:\"[^\"]*\"?|\'[^\']*\'?)/,null,`"'`]],[[Te,/^^<\/?[a-z](?:[\w.:-]*\w)?|\/?>$/i],[$,/^(?!style[\s=]|on)[a-z](?:[\w:-]*\w)?/i],["lang-uq.val",/^=\s*([^>\'\"\s]*(?:[^>\'\"\s\/]|\/(?=\s)))/],[ae,/^[=<>\/]+/],["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"]),He(Ve([],[[te,/^[\s\S]+/]]),["uq.val"]),He(Ke({keywords:S,hashComments:!0,cStyleComments:!0,types:N}),["c","cc","cpp","cxx","cyc","m"]),He(Ke({keywords:"null,true,false"}),["json"]),He(Ke({keywords:_,hashComments:!0,cStyleComments:!0,verbatimStrings:!0,types:N}),["cs"]),He(Ke({keywords:U,cStyleComments:!0}),["java"]),He(Ke({keywords:J,hashComments:!0,multiLineStrings:!0}),["bash","bsh","csh","sh"]),He(Ke({keywords:M,hashComments:!0,multiLineStrings:!0,tripleQuotedStrings:!0}),["cv","py","python"]),He(Ke({keywords:R,hashComments:!0,multiLineStrings:!0,regexLiterals:2}),["perl","pl","pm"]),He(Ke({keywords:H,hashComments:!0,multiLineStrings:!0,regexLiterals:!0}),["rb","ruby"]),He(Ke({keywords:b,cStyleComments:!0,regexLiterals:!0}),["javascript","js","ts","typescript"]),He(Ke({keywords:w,hashComments:3,cStyleComments:!0,multilineStrings:!0,tripleQuotedStrings:!0,regexLiterals:!0}),["coffee"]),He(Ve([],[[P,/^[\s\S]+/]]),["regex"]);function It(Fe){var j=Fe.langExtension;try{var Ne=E(Fe.sourceNode,Fe.pre),Ze=Ne.sourceCode;Fe.sourceCode=Ze,Fe.spans=Ne.spans,Fe.basePos=0,ln(j,Ze)(Fe),Vt(Fe)}catch(ee){g.console&&console.log(ee&&ee.stack||ee)}}function cn(Fe,j,Ne){var Ze=Ne||!1,ee=j||null,O=document.createElement("div");O.innerHTML="<pre>"+Fe+"</pre>",O=O.firstChild,Ze&&Rt(O,Ze,!0);var ue={langExtension:ee,numberLines:Ze,sourceNode:O,pre:1,sourceCode:null,basePos:null,spans:null,decorations:null};return It(ue),O.innerHTML}function xt(Fe,j){var Ne=j||document.body,Ze=Ne.ownerDocument||document;function ee(St){return Ne.getElementsByTagName(St)}for(var O=[ee("pre"),ee("code"),ee("xmp")],ue=[],De=0;De<O.length;++De)for(var Ae=0,Be=O[De].length;Ae<Be;++Ae)ue.push(O[De][Ae]);O=null;var Se=Date;Se.now||(Se={now:function(){return+new Date}});var ot=0,Xe=/\blang(?:uage)?-([\w.]+)(?!\S)/,je=/\bprettyprint\b/,qe=/\bprettyprinted\b/,kt=/pre|xmp/i,gt=/^code$/i,_t=/^(?:pre|code|xmp)$/i,Pe={};function Wt(){for(var St=g.PR_SHOULD_USE_CONTINUATION?Se.now()+250:1/0;ot<ue.length&&Se.now()<St;ot++){for(var vt=ue[ot],dn=Pe,hn=vt;hn=hn.previousSibling;){var Ot=hn.nodeType,Ln=(Ot===7||Ot===8)&&hn.nodeValue;if(Ln?!/^\??prettify\b/.test(Ln):Ot!==3||/\S/.test(hn.nodeValue))break;if(Ln){dn={},Ln.replace(/\b(\w+)=([\w:.%+-]+)/g,function(_n,wn,$n){dn[wn]=$n});break}}var qn=vt.className;if((dn!==Pe||je.test(qn))&&!qe.test(qn)){for(var sn=!1,Mn=vt.parentNode;Mn;Mn=Mn.parentNode){var ut=Mn.tagName;if(_t.test(ut)&&Mn.className&&je.test(Mn.className)){sn=!0;break}}if(!sn){vt.className+=" prettyprinted";var nt=dn.lang;if(!nt){nt=qn.match(Xe);var ze;!nt&&(ze=be(vt))&>.test(ze.tagName)&&(nt=ze.className.match(Xe)),nt&&(nt=nt[1])}var ne;if(kt.test(vt.tagName))ne=1;else{var me=vt.currentStyle,Ie=Ze.defaultView,Ue=me?me.whiteSpace:Ie&&Ie.getComputedStyle?Ie.getComputedStyle(vt,null).getPropertyValue("white-space"):0;ne=Ue&&Ue.substring(0,3)==="pre"}var ke=dn.linenums;(ke=ke==="true"||+ke)||(ke=qn.match(/\blinenums\b(?::(\d+))?/),ke=ke?ke[1]&&ke[1].length?+ke[1]:!0:!1),ke&&Rt(vt,ke,ne);var Gt={langExtension:nt,sourceNode:vt,numberLines:ke,pre:ne,sourceCode:null,basePos:null,spans:null,decorations:null};It(Gt)}}}ot<ue.length?g.setTimeout(Wt,250):typeof Fe=="function"&&Fe()}Wt()}var ht=g.PR={createSimpleLexer:Ve,registerLangHandler:He,sourceDecorator:Ke,PR_ATTRIB_NAME:$,PR_ATTRIB_VALUE:te,PR_COMMENT:oe,PR_DECLARATION:Re,PR_KEYWORD:k,PR_LITERAL:ie,PR_NOCODE:q,PR_PLAIN:we,PR_PUNCTUATION:ae,PR_SOURCE:Y,PR_STRING:P,PR_TAG:Te,PR_TYPE:de,prettyPrintOne:V?g.prettyPrintOne=cn:ge=cn,prettyPrint:G=V?g.prettyPrint=xt:G=xt},Oe=g.define;typeof Oe=="function"&&Oe.amd&&Oe("google-code-prettify",[],function(){return ht})})()},25769:function(Vn,ct,x){"use strict";var V=x(98040),fe={"text/plain":"Text","text/html":"Url",default:"Text"},Ce="Copy to clipboard: #{key}, Enter";function ge(g){var ye=(/mac os x/i.test(navigator.userAgent)?"\u2318":"Ctrl")+"+C";return g.replace(/#{\s*key\s*}/g,ye)}function G(g,ye){var le,o,S,U,_,w,b=!1;ye||(ye={}),le=ye.debug||!1;try{S=V(),U=document.createRange(),_=document.getSelection(),w=document.createElement("span"),w.textContent=g,w.ariaHidden="true",w.style.all="unset",w.style.position="fixed",w.style.top=0,w.style.clip="rect(0, 0, 0, 0)",w.style.whiteSpace="pre",w.style.webkitUserSelect="text",w.style.MozUserSelect="text",w.style.msUserSelect="text",w.style.userSelect="text",w.addEventListener("copy",function(M){if(M.stopPropagation(),ye.format)if(M.preventDefault(),typeof M.clipboardData=="undefined"){le&&console.warn("unable to use e.clipboardData"),le&&console.warn("trying IE specific stuff"),window.clipboardData.clearData();var H=fe[ye.format]||fe.default;window.clipboardData.setData(H,g)}else M.clipboardData.clearData(),M.clipboardData.setData(ye.format,g);ye.onCopy&&(M.preventDefault(),ye.onCopy(M.clipboardData))}),document.body.appendChild(w),U.selectNodeContents(w),_.addRange(U);var R=document.execCommand("copy");if(!R)throw new Error("copy command was unsuccessful");b=!0}catch(M){le&&console.error("unable to copy using execCommand: ",M),le&&console.warn("trying IE specific stuff");try{window.clipboardData.setData(ye.format||"text",g),ye.onCopy&&ye.onCopy(window.clipboardData),b=!0}catch(H){le&&console.error("unable to copy using clipboardData: ",H),le&&console.error("falling back to prompt"),o=ge("message"in ye?ye.message:Ce),window.prompt(o,g)}}finally{_&&(typeof _.removeRange=="function"?_.removeRange(U):_.removeAllRanges()),w&&document.body.removeChild(w),S()}return b}Vn.exports=G},97774:function(Vn,ct,x){"use strict";Object.defineProperty(ct,"__esModule",{value:!0}),ct.default=void 0;var V=Object.assign||function(M){for(var H=1;H<arguments.length;H++){var J=arguments[H];for(var T in J)Object.prototype.hasOwnProperty.call(J,T)&&(M[T]=J[T])}return M},fe=function(){function M(H,J){for(var T=0;T<J.length;T++){var N=J[T];N.enumerable=N.enumerable||!1,N.configurable=!0,"value"in N&&(N.writable=!0),Object.defineProperty(H,N.key,N)}}return function(H,J,T){return J&&M(H.prototype,J),T&&M(H,T),H}}(),Ce=x(59301),ge=U(Ce),G=x(12708),g=U(G),ye=x(53291),le=U(ye),o=x(47242),S=x(65429);function U(M){return M&&M.__esModule?M:{default:M}}function _(M,H){if(!(M instanceof H))throw new TypeError("Cannot call a class as a function")}function w(M,H){if(!M)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return H&&(typeof H=="object"||typeof H=="function")?H:M}function b(M,H){if(typeof H!="function"&&H!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof H);M.prototype=Object.create(H&&H.prototype,{constructor:{value:M,enumerable:!1,writable:!0,configurable:!0}}),H&&(Object.setPrototypeOf?Object.setPrototypeOf(M,H):M.__proto__=H)}var R=function(M){b(H,M);function H(J){_(this,H);var T=w(this,(H.__proto__||Object.getPrototypeOf(H)).call(this,J));return T.getEchartsInstance=function(){return T.echartsLib.getInstanceByDom(T.echartsElement)||T.echartsLib.init(T.echartsElement,T.props.theme,T.props.opts)},T.dispose=function(){if(T.echartsElement){try{(0,o.clear)(T.echartsElement)}catch(N){console.warn(N)}T.echartsLib.dispose(T.echartsElement)}},T.rerender=function(){var N=T.props,P=N.onEvents,k=N.onChartReady,oe=T.renderEchartDom();T.bindEvents(oe,P||{}),typeof k=="function"&&T.props.onChartReady(oe),T.echartsElement&&(0,o.bind)(T.echartsElement,function(){try{oe.resize()}catch(de){console.warn(de)}})},T.bindEvents=function(N,P){var k=function(ie,ae){typeof ie=="string"&&typeof ae=="function"&&N.on(ie,function(we){ae(we,N)})};for(var oe in P)Object.prototype.hasOwnProperty.call(P,oe)&&k(oe,P[oe])},T.renderEchartDom=function(){var N=T.getEchartsInstance();return N.setOption(T.props.option,T.props.notMerge||!1,T.props.lazyUpdate||!1),T.props.showLoading?N.showLoading(T.props.loadingOption||null):N.hideLoading(),N},T.echartsLib=J.echarts,T.echartsElement=null,T}return fe(H,[{key:"componentDidMount",value:function(){this.rerender()}},{key:"componentDidUpdate",value:function(T){if(!(typeof this.props.shouldSetOption=="function"&&!this.props.shouldSetOption(T,this.props))){if(!(0,le.default)(T.theme,this.props.theme)||!(0,le.default)(T.opts,this.props.opts)||!(0,le.default)(T.onEvents,this.props.onEvents)){this.dispose(),this.rerender();return}var N=["option","notMerge","lazyUpdate","showLoading","loadingOption"];if(!(0,le.default)((0,S.pick)(this.props,N),(0,S.pick)(T,N))){var P=this.renderEchartDom();if(!(0,le.default)(T.style,this.props.style)||!(0,le.default)(T.className,this.props.className))try{P.resize()}catch(k){console.warn(k)}}}}},{key:"componentWillUnmount",value:function(){this.dispose()}},{key:"render",value:function(){var T=this,N=this.props,P=N.style,k=N.className,oe=V({height:300},P);return ge.default.createElement("div",{ref:function(ie){T.echartsElement=ie},style:oe,className:"echarts-for-react "+k})}}]),H}(Ce.Component);ct.default=R,R.propTypes={option:g.default.object.isRequired,echarts:g.default.object,notMerge:g.default.bool,lazyUpdate:g.default.bool,style:g.default.object,className:g.default.string,theme:g.default.oneOfType([g.default.string,g.default.object]),onChartReady:g.default.func,showLoading:g.default.bool,loadingOption:g.default.object,onEvents:g.default.object,opts:g.default.shape({devicePixelRatio:g.default.number,renderer:g.default.oneOf(["canvas","svg"]),width:g.default.oneOfType([g.default.number,g.default.oneOf([null,void 0,"auto"])]),height:g.default.oneOfType([g.default.number,g.default.oneOf([null,void 0,"auto"])])}),shouldSetOption:g.default.func},R.defaultProps={echarts:{},notMerge:!1,lazyUpdate:!1,style:{},className:"",theme:null,onChartReady:function(){},showLoading:!1,loadingOption:null,onEvents:{},opts:{},shouldSetOption:function(){return!0}}},42441:function(Vn,ct,x){"use strict";var V;V={value:!0},ct.Z=void 0;var fe=x(76411),Ce=g(fe),ge=x(97774),G=g(ge);function g(U){return U&&U.__esModule?U:{default:U}}function ye(U,_){if(!(U instanceof _))throw new TypeError("Cannot call a class as a function")}function le(U,_){if(!U)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return _&&(typeof _=="object"||typeof _=="function")?_:U}function o(U,_){if(typeof _!="function"&&_!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof _);U.prototype=Object.create(_&&_.prototype,{constructor:{value:U,enumerable:!1,writable:!0,configurable:!0}}),_&&(Object.setPrototypeOf?Object.setPrototypeOf(U,_):U.__proto__=_)}var S=function(U){o(_,U);function _(w){ye(this,_);var b=le(this,(_.__proto__||Object.getPrototypeOf(_)).call(this,w));return b.echartsLib=Ce.default,b}return _}(G.default);ct.Z=S},65429:function(Vn,ct){"use strict";Object.defineProperty(ct,"__esModule",{value:!0});var x=ct.pick=function(fe,Ce){var ge={};return Ce.forEach(function(G){ge[G]=fe[G]}),ge}},53291:function(Vn){"use strict";var ct=Array.isArray,x=Object.keys,V=Object.prototype.hasOwnProperty;Vn.exports=function fe(Ce,ge){if(Ce===ge)return!0;if(Ce&&ge&&typeof Ce=="object"&&typeof ge=="object"){var G=ct(Ce),g=ct(ge),ye,le,o;if(G&&g){if(le=Ce.length,le!=ge.length)return!1;for(ye=le;ye--!==0;)if(!fe(Ce[ye],ge[ye]))return!1;return!0}if(G!=g)return!1;var S=Ce instanceof Date,U=ge instanceof Date;if(S!=U)return!1;if(S&&U)return Ce.getTime()==ge.getTime();var _=Ce instanceof RegExp,w=ge instanceof RegExp;if(_!=w)return!1;if(_&&w)return Ce.toString()==ge.toString();var b=x(Ce);if(le=b.length,le!==x(ge).length)return!1;for(ye=le;ye--!==0;)if(!V.call(ge,b[ye]))return!1;for(ye=le;ye--!==0;)if(o=b[ye],!fe(Ce[o],ge[o]))return!1;return!0}return Ce!==Ce&&ge!==ge}},6341:function(Vn,ct,x){"use strict";x.d(ct,{Jx:function(){return fa}});function V(l,I="utf8"){return new TextDecoder(I).decode(l)}const fe=new TextEncoder;function Ce(l){return fe.encode(l)}const ge=1024*8,G=(()=>{const l=new Uint8Array(4),I=new Uint32Array(l.buffer);return!((I[0]=1)&l[0])})(),g={int8:globalThis.Int8Array,uint8:globalThis.Uint8Array,int16:globalThis.Int16Array,uint16:globalThis.Uint16Array,int32:globalThis.Int32Array,uint32:globalThis.Uint32Array,uint64:globalThis.BigUint64Array,int64:globalThis.BigInt64Array,float32:globalThis.Float32Array,float64:globalThis.Float64Array};class ye{constructor(I=ge,v={}){qi(this,"buffer");qi(this,"byteLength");qi(this,"byteOffset");qi(this,"length");qi(this,"offset");qi(this,"lastWrittenByte");qi(this,"littleEndian");qi(this,"_data");qi(this,"_mark");qi(this,"_marks");let z=!1;typeof I=="number"?I=new ArrayBuffer(I):(z=!0,this.lastWrittenByte=I.byteLength);const ce=v.offset?v.offset>>>0:0,_e=I.byteLength-ce;let Pt=ce;(ArrayBuffer.isView(I)||I instanceof ye)&&(I.byteLength!==I.buffer.byteLength&&(Pt=I.byteOffset+ce),I=I.buffer),z?this.lastWrittenByte=_e:this.lastWrittenByte=0,this.buffer=I,this.length=_e,this.byteLength=_e,this.byteOffset=Pt,this.offset=0,this.littleEndian=!0,this._data=new DataView(this.buffer,Pt,_e),this._mark=0,this._marks=[]}available(I=1){return this.offset+I<=this.length}isLittleEndian(){return this.littleEndian}setLittleEndian(){return this.littleEndian=!0,this}isBigEndian(){return!this.littleEndian}setBigEndian(){return this.littleEndian=!1,this}skip(I=1){return this.offset+=I,this}back(I=1){return this.offset-=I,this}seek(I){return this.offset=I,this}mark(){return this._mark=this.offset,this}reset(){return this.offset=this._mark,this}pushMark(){return this._marks.push(this.offset),this}popMark(){const I=this._marks.pop();if(I===void 0)throw new Error("Mark stack empty");return this.seek(I),this}rewind(){return this.offset=0,this}ensureAvailable(I=1){if(!this.available(I)){const z=(this.offset+I)*2,ce=new Uint8Array(z);ce.set(new Uint8Array(this.buffer)),this.buffer=ce.buffer,this.length=z,this.byteLength=z,this._data=new DataView(this.buffer)}return this}readBoolean(){return this.readUint8()!==0}readInt8(){return this._data.getInt8(this.offset++)}readUint8(){return this._data.getUint8(this.offset++)}readByte(){return this.readUint8()}readBytes(I=1){return this.readArray(I,"uint8")}readArray(I,v){const z=g[v].BYTES_PER_ELEMENT*I,ce=this.byteOffset+this.offset,_e=this.buffer.slice(ce,ce+z);if(this.littleEndian===G&&v!=="uint8"&&v!=="int8"){const Et=new Uint8Array(this.buffer.slice(ce,ce+z));Et.reverse();const er=new g[v](Et.buffer);return this.offset+=z,er.reverse(),er}const Pt=new g[v](_e);return this.offset+=z,Pt}readInt16(){const I=this._data.getInt16(this.offset,this.littleEndian);return this.offset+=2,I}readUint16(){const I=this._data.getUint16(this.offset,this.littleEndian);return this.offset+=2,I}readInt32(){const I=this._data.getInt32(this.offset,this.littleEndian);return this.offset+=4,I}readUint32(){const I=this._data.getUint32(this.offset,this.littleEndian);return this.offset+=4,I}readFloat32(){const I=this._data.getFloat32(this.offset,this.littleEndian);return this.offset+=4,I}readFloat64(){const I=this._data.getFloat64(this.offset,this.littleEndian);return this.offset+=8,I}readBigInt64(){const I=this._data.getBigInt64(this.offset,this.littleEndian);return this.offset+=8,I}readBigUint64(){const I=this._data.getBigUint64(this.offset,this.littleEndian);return this.offset+=8,I}readChar(){return String.fromCharCode(this.readInt8())}readChars(I=1){let v="";for(let z=0;z<I;z++)v+=this.readChar();return v}readUtf8(I=1){return V(this.readBytes(I))}decodeText(I=1,v="utf8"){return V(this.readBytes(I),v)}writeBoolean(I){return this.writeUint8(I?255:0),this}writeInt8(I){return this.ensureAvailable(1),this._data.setInt8(this.offset++,I),this._updateLastWrittenByte(),this}writeUint8(I){return this.ensureAvailable(1),this._data.setUint8(this.offset++,I),this._updateLastWrittenByte(),this}writeByte(I){return this.writeUint8(I)}writeBytes(I){this.ensureAvailable(I.length);for(let v=0;v<I.length;v++)this._data.setUint8(this.offset++,I[v]);return this._updateLastWrittenByte(),this}writeInt16(I){return this.ensureAvailable(2),this._data.setInt16(this.offset,I,this.littleEndian),this.offset+=2,this._updateLastWrittenByte(),this}writeUint16(I){return this.ensureAvailable(2),this._data.setUint16(this.offset,I,this.littleEndian),this.offset+=2,this._updateLastWrittenByte(),this}writeInt32(I){return this.ensureAvailable(4),this._data.setInt32(this.offset,I,this.littleEndian),this.offset+=4,this._updateLastWrittenByte(),this}writeUint32(I){return this.ensureAvailable(4),this._data.setUint32(this.offset,I,this.littleEndian),this.offset+=4,this._updateLastWrittenByte(),this}writeFloat32(I){return this.ensureAvailable(4),this._data.setFloat32(this.offset,I,this.littleEndian),this.offset+=4,this._updateLastWrittenByte(),this}writeFloat64(I){return this.ensureAvailable(8),this._data.setFloat64(this.offset,I,this.littleEndian),this.offset+=8,this._updateLastWrittenByte(),this}writeBigInt64(I){return this.ensureAvailable(8),this._data.setBigInt64(this.offset,I,this.littleEndian),this.offset+=8,this._updateLastWrittenByte(),this}writeBigUint64(I){return this.ensureAvailable(8),this._data.setBigUint64(this.offset,I,this.littleEndian),this.offset+=8,this._updateLastWrittenByte(),this}writeChar(I){return this.writeUint8(I.charCodeAt(0))}writeChars(I){for(let v=0;v<I.length;v++)this.writeUint8(I.charCodeAt(v));return this}writeUtf8(I){return this.writeBytes(Ce(I))}toArray(){return new Uint8Array(this.buffer,this.byteOffset,this.lastWrittenByte)}getWrittenByteLength(){return this.lastWrittenByte-this.byteOffset}_updateLastWrittenByte(){this.offset>this.lastWrittenByte&&(this.lastWrittenByte=this.offset)}}const le=4,o=0,S=1,U=2;function _(l){let I=l.length;for(;--I>=0;)l[I]=0}const w=0,b=1,R=2,M=3,H=258,J=29,T=256,N=T+1+J,P=30,k=19,oe=2*N+1,de=15,ie=16,ae=7,we=256,Te=16,Re=17,Y=18,$=new Uint8Array([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]),te=new Uint8Array([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]),q=new Uint8Array([0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,3,7]),he=new Uint8Array([16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15]),re=512,E=new Array((N+2)*2);_(E);const C=new Array(P*2);_(C);const W=new Array(re);_(W);const be=new Array(H-M+1);_(be);const Ve=new Array(J);_(Ve);const Ke=new Array(P);_(Ke);function Ct(l,I,v,z,ce){this.static_tree=l,this.extra_bits=I,this.extra_base=v,this.elems=z,this.max_length=ce,this.has_stree=l&&l.length}let Rt,Vt,rn;function He(l,I){this.dyn_tree=l,this.max_code=0,this.stat_desc=I}const ln=l=>l<256?W[l]:W[256+(l>>>7)],It=(l,I)=>{l.pending_buf[l.pending++]=I&255,l.pending_buf[l.pending++]=I>>>8&255},cn=(l,I,v)=>{l.bi_valid>ie-v?(l.bi_buf|=I<<l.bi_valid&65535,It(l,l.bi_buf),l.bi_buf=I>>ie-l.bi_valid,l.bi_valid+=v-ie):(l.bi_buf|=I<<l.bi_valid&65535,l.bi_valid+=v)},xt=(l,I,v)=>{cn(l,v[I*2],v[I*2+1])},ht=(l,I)=>{let v=0;do v|=l&1,l>>>=1,v<<=1;while(--I>0);return v>>>1},Oe=l=>{l.bi_valid===16?(It(l,l.bi_buf),l.bi_buf=0,l.bi_valid=0):l.bi_valid>=8&&(l.pending_buf[l.pending++]=l.bi_buf&255,l.bi_buf>>=8,l.bi_valid-=8)},Fe=(l,I)=>{const v=I.dyn_tree,z=I.max_code,ce=I.stat_desc.static_tree,_e=I.stat_desc.has_stree,Pt=I.stat_desc.extra_bits,Et=I.stat_desc.extra_base,er=I.stat_desc.max_length;let pt,Zt,Pr,Ar,Gn,zr,Yi=0;for(Ar=0;Ar<=de;Ar++)l.bl_count[Ar]=0;for(v[l.heap[l.heap_max]*2+1]=0,pt=l.heap_max+1;pt<oe;pt++)Zt=l.heap[pt],Ar=v[v[Zt*2+1]*2+1]+1,Ar>er&&(Ar=er,Yi++),v[Zt*2+1]=Ar,!(Zt>z)&&(l.bl_count[Ar]++,Gn=0,Zt>=Et&&(Gn=Pt[Zt-Et]),zr=v[Zt*2],l.opt_len+=zr*(Ar+Gn),_e&&(l.static_len+=zr*(ce[Zt*2+1]+Gn)));if(Yi!==0){do{for(Ar=er-1;l.bl_count[Ar]===0;)Ar--;l.bl_count[Ar]--,l.bl_count[Ar+1]+=2,l.bl_count[er]--,Yi-=2}while(Yi>0);for(Ar=er;Ar!==0;Ar--)for(Zt=l.bl_count[Ar];Zt!==0;)Pr=l.heap[--pt],!(Pr>z)&&(v[Pr*2+1]!==Ar&&(l.opt_len+=(Ar-v[Pr*2+1])*v[Pr*2],v[Pr*2+1]=Ar),Zt--)}},j=(l,I,v)=>{const z=new Array(de+1);let ce=0,_e,Pt;for(_e=1;_e<=de;_e++)ce=ce+v[_e-1]<<1,z[_e]=ce;for(Pt=0;Pt<=I;Pt++){let Et=l[Pt*2+1];Et!==0&&(l[Pt*2]=ht(z[Et]++,Et))}},Ne=()=>{let l,I,v,z,ce;const _e=new Array(de+1);for(v=0,z=0;z<J-1;z++)for(Ve[z]=v,l=0;l<1<<$[z];l++)be[v++]=z;for(be[v-1]=z,ce=0,z=0;z<16;z++)for(Ke[z]=ce,l=0;l<1<<te[z];l++)W[ce++]=z;for(ce>>=7;z<P;z++)for(Ke[z]=ce<<7,l=0;l<1<<te[z]-7;l++)W[256+ce++]=z;for(I=0;I<=de;I++)_e[I]=0;for(l=0;l<=143;)E[l*2+1]=8,l++,_e[8]++;for(;l<=255;)E[l*2+1]=9,l++,_e[9]++;for(;l<=279;)E[l*2+1]=7,l++,_e[7]++;for(;l<=287;)E[l*2+1]=8,l++,_e[8]++;for(j(E,N+1,_e),l=0;l<P;l++)C[l*2+1]=5,C[l*2]=ht(l,5);Rt=new Ct(E,$,T+1,N,de),Vt=new Ct(C,te,0,P,de),rn=new Ct(new Array(0),q,0,k,ae)},Ze=l=>{let I;for(I=0;I<N;I++)l.dyn_ltree[I*2]=0;for(I=0;I<P;I++)l.dyn_dtree[I*2]=0;for(I=0;I<k;I++)l.bl_tree[I*2]=0;l.dyn_ltree[we*2]=1,l.opt_len=l.static_len=0,l.sym_next=l.matches=0},ee=l=>{l.bi_valid>8?It(l,l.bi_buf):l.bi_valid>0&&(l.pending_buf[l.pending++]=l.bi_buf),l.bi_buf=0,l.bi_valid=0},O=(l,I,v,z)=>{const ce=I*2,_e=v*2;return l[ce]<l[_e]||l[ce]===l[_e]&&z[I]<=z[v]},ue=(l,I,v)=>{const z=l.heap[v];let ce=v<<1;for(;ce<=l.heap_len&&(ce<l.heap_len&&O(I,l.heap[ce+1],l.heap[ce],l.depth)&&ce++,!O(I,z,l.heap[ce],l.depth));)l.heap[v]=l.heap[ce],v=ce,ce<<=1;l.heap[v]=z},De=(l,I,v)=>{let z,ce,_e=0,Pt,Et;if(l.sym_next!==0)do z=l.pending_buf[l.sym_buf+_e++]&255,z+=(l.pending_buf[l.sym_buf+_e++]&255)<<8,ce=l.pending_buf[l.sym_buf+_e++],z===0?xt(l,ce,I):(Pt=be[ce],xt(l,Pt+T+1,I),Et=$[Pt],Et!==0&&(ce-=Ve[Pt],cn(l,ce,Et)),z--,Pt=ln(z),xt(l,Pt,v),Et=te[Pt],Et!==0&&(z-=Ke[Pt],cn(l,z,Et)));while(_e<l.sym_next);xt(l,we,I)},Ae=(l,I)=>{const v=I.dyn_tree,z=I.stat_desc.static_tree,ce=I.stat_desc.has_stree,_e=I.stat_desc.elems;let Pt,Et,er=-1,pt;for(l.heap_len=0,l.heap_max=oe,Pt=0;Pt<_e;Pt++)v[Pt*2]!==0?(l.heap[++l.heap_len]=er=Pt,l.depth[Pt]=0):v[Pt*2+1]=0;for(;l.heap_len<2;)pt=l.heap[++l.heap_len]=er<2?++er:0,v[pt*2]=1,l.depth[pt]=0,l.opt_len--,ce&&(l.static_len-=z[pt*2+1]);for(I.max_code=er,Pt=l.heap_len>>1;Pt>=1;Pt--)ue(l,v,Pt);pt=_e;do Pt=l.heap[1],l.heap[1]=l.heap[l.heap_len--],ue(l,v,1),Et=l.heap[1],l.heap[--l.heap_max]=Pt,l.heap[--l.heap_max]=Et,v[pt*2]=v[Pt*2]+v[Et*2],l.depth[pt]=(l.depth[Pt]>=l.depth[Et]?l.depth[Pt]:l.depth[Et])+1,v[Pt*2+1]=v[Et*2+1]=pt,l.heap[1]=pt++,ue(l,v,1);while(l.heap_len>=2);l.heap[--l.heap_max]=l.heap[1],Fe(l,I),j(v,er,l.bl_count)},Be=(l,I,v)=>{let z,ce=-1,_e,Pt=I[0*2+1],Et=0,er=7,pt=4;for(Pt===0&&(er=138,pt=3),I[(v+1)*2+1]=65535,z=0;z<=v;z++)_e=Pt,Pt=I[(z+1)*2+1],!(++Et<er&&_e===Pt)&&(Et<pt?l.bl_tree[_e*2]+=Et:_e!==0?(_e!==ce&&l.bl_tree[_e*2]++,l.bl_tree[Te*2]++):Et<=10?l.bl_tree[Re*2]++:l.bl_tree[Y*2]++,Et=0,ce=_e,Pt===0?(er=138,pt=3):_e===Pt?(er=6,pt=3):(er=7,pt=4))},Se=(l,I,v)=>{let z,ce=-1,_e,Pt=I[0*2+1],Et=0,er=7,pt=4;for(Pt===0&&(er=138,pt=3),z=0;z<=v;z++)if(_e=Pt,Pt=I[(z+1)*2+1],!(++Et<er&&_e===Pt)){if(Et<pt)do xt(l,_e,l.bl_tree);while(--Et!==0);else _e!==0?(_e!==ce&&(xt(l,_e,l.bl_tree),Et--),xt(l,Te,l.bl_tree),cn(l,Et-3,2)):Et<=10?(xt(l,Re,l.bl_tree),cn(l,Et-3,3)):(xt(l,Y,l.bl_tree),cn(l,Et-11,7));Et=0,ce=_e,Pt===0?(er=138,pt=3):_e===Pt?(er=6,pt=3):(er=7,pt=4)}},ot=l=>{let I;for(Be(l,l.dyn_ltree,l.l_desc.max_code),Be(l,l.dyn_dtree,l.d_desc.max_code),Ae(l,l.bl_desc),I=k-1;I>=3&&l.bl_tree[he[I]*2+1]===0;I--);return l.opt_len+=3*(I+1)+5+5+4,I},Xe=(l,I,v,z)=>{let ce;for(cn(l,I-257,5),cn(l,v-1,5),cn(l,z-4,4),ce=0;ce<z;ce++)cn(l,l.bl_tree[he[ce]*2+1],3);Se(l,l.dyn_ltree,I-1),Se(l,l.dyn_dtree,v-1)},je=l=>{let I=4093624447,v;for(v=0;v<=31;v++,I>>>=1)if(I&1&&l.dyn_ltree[v*2]!==0)return o;if(l.dyn_ltree[9*2]!==0||l.dyn_ltree[10*2]!==0||l.dyn_ltree[13*2]!==0)return S;for(v=32;v<T;v++)if(l.dyn_ltree[v*2]!==0)return S;return o};let qe=!1;const kt=l=>{qe||(Ne(),qe=!0),l.l_desc=new He(l.dyn_ltree,Rt),l.d_desc=new He(l.dyn_dtree,Vt),l.bl_desc=new He(l.bl_tree,rn),l.bi_buf=0,l.bi_valid=0,Ze(l)},gt=(l,I,v,z)=>{cn(l,(w<<1)+(z?1:0),3),ee(l),It(l,v),It(l,~v),v&&l.pending_buf.set(l.window.subarray(I,I+v),l.pending),l.pending+=v},_t=l=>{cn(l,b<<1,3),xt(l,we,E),Oe(l)},Pe=(l,I,v,z)=>{let ce,_e,Pt=0;l.level>0?(l.strm.data_type===U&&(l.strm.data_type=je(l)),Ae(l,l.l_desc),Ae(l,l.d_desc),Pt=ot(l),ce=l.opt_len+3+7>>>3,_e=l.static_len+3+7>>>3,_e<=ce&&(ce=_e)):ce=_e=v+5,v+4<=ce&&I!==-1?gt(l,I,v,z):l.strategy===le||_e===ce?(cn(l,(b<<1)+(z?1:0),3),De(l,E,C)):(cn(l,(R<<1)+(z?1:0),3),Xe(l,l.l_desc.max_code+1,l.d_desc.max_code+1,Pt+1),De(l,l.dyn_ltree,l.dyn_dtree)),Ze(l),z&&ee(l)},Wt=(l,I,v)=>(l.pending_buf[l.sym_buf+l.sym_next++]=I,l.pending_buf[l.sym_buf+l.sym_next++]=I>>8,l.pending_buf[l.sym_buf+l.sym_next++]=v,I===0?l.dyn_ltree[v*2]++:(l.matches++,I--,l.dyn_ltree[(be[v]+T+1)*2]++,l.dyn_dtree[ln(I)*2]++),l.sym_next===l.sym_end);var St=kt,vt=gt,dn=Pe,hn=Wt,Ot=_t,Ln={_tr_init:St,_tr_stored_block:vt,_tr_flush_block:dn,_tr_tally:hn,_tr_align:Ot},sn=(l,I,v,z)=>{let ce=l&65535|0,_e=l>>>16&65535|0,Pt=0;for(;v!==0;){Pt=v>2e3?2e3:v,v-=Pt;do ce=ce+I[z++]|0,_e=_e+ce|0;while(--Pt);ce%=65521,_e%=65521}return ce|_e<<16|0};const Mn=()=>{let l,I=[];for(var v=0;v<256;v++){l=v;for(var z=0;z<8;z++)l=l&1?3988292384^l>>>1:l>>>1;I[v]=l}return I},ut=new Uint32Array(Mn());var ze=(l,I,v,z)=>{const ce=ut,_e=z+v;l^=-1;for(let Pt=z;Pt<_e;Pt++)l=l>>>8^ce[(l^I[Pt])&255];return l^-1},ne={2:"need dictionary",1:"stream end",0:"","-1":"file error","-2":"stream error","-3":"data error","-4":"insufficient memory","-5":"buffer error","-6":"incompatible version"},me={Z_NO_FLUSH:0,Z_PARTIAL_FLUSH:1,Z_SYNC_FLUSH:2,Z_FULL_FLUSH:3,Z_FINISH:4,Z_BLOCK:5,Z_TREES:6,Z_OK:0,Z_STREAM_END:1,Z_NEED_DICT:2,Z_ERRNO:-1,Z_STREAM_ERROR:-2,Z_DATA_ERROR:-3,Z_MEM_ERROR:-4,Z_BUF_ERROR:-5,Z_NO_COMPRESSION:0,Z_BEST_SPEED:1,Z_BEST_COMPRESSION:9,Z_DEFAULT_COMPRESSION:-1,Z_FILTERED:1,Z_HUFFMAN_ONLY:2,Z_RLE:3,Z_FIXED:4,Z_DEFAULT_STRATEGY:0,Z_BINARY:0,Z_TEXT:1,Z_UNKNOWN:2,Z_DEFLATED:8};const{_tr_init:Ie,_tr_stored_block:Ue,_tr_flush_block:ke,_tr_tally:Gt,_tr_align:_n}=Ln,{Z_NO_FLUSH:wn,Z_PARTIAL_FLUSH:$n,Z_FULL_FLUSH:mr,Z_FINISH:sr,Z_BLOCK:lr,Z_OK:zn,Z_STREAM_END:Lr,Z_STREAM_ERROR:Sr,Z_DATA_ERROR:xr,Z_BUF_ERROR:Zr,Z_DEFAULT_COMPRESSION:Tn,Z_FILTERED:fn,Z_HUFFMAN_ONLY:Zn,Z_RLE:vr,Z_FIXED:Hr,Z_DEFAULT_STRATEGY:it,Z_UNKNOWN:tt,Z_DEFLATED:mn}=me,Jt=9,Bn=15,xn=8,Qn=256+1+29,bn=30,Un=19,Sn=2*Qn+1,Tt=15,Dt=3,$e=258,ft=$e+Dt+1,Qt=32,Lt=42,on=57,Cn=69,pn=73,Hn=91,Xn=103,Jn=113,yt=666,On=1,Kn=2,Q=3,K=4,Ee=3,Le=(l,I)=>(l.msg=ne[I],I),st=l=>l*2-(l>4?9:0),rt=l=>{let I=l.length;for(;--I>=0;)l[I]=0},Ft=l=>{let I,v,z,ce=l.w_size;I=l.hash_size,z=I;do v=l.head[--z],l.head[z]=v>=ce?v-ce:0;while(--I);I=ce,z=I;do v=l.prev[--z],l.prev[z]=v>=ce?v-ce:0;while(--I)};let an=(l,I,v)=>(I<<l.hash_shift^v)&l.hash_mask;const Xt=l=>{const I=l.state;let v=I.pending;v>l.avail_out&&(v=l.avail_out),v!==0&&(l.output.set(I.pending_buf.subarray(I.pending_out,I.pending_out+v),l.next_out),l.next_out+=v,I.pending_out+=v,l.total_out+=v,l.avail_out-=v,I.pending-=v,I.pending===0&&(I.pending_out=0))},Kt=(l,I)=>{ke(l,l.block_start>=0?l.block_start:-1,l.strstart-l.block_start,I),l.block_start=l.strstart,Xt(l.strm)},en=(l,I)=>{l.pending_buf[l.pending++]=I},pe=(l,I)=>{l.pending_buf[l.pending++]=I>>>8&255,l.pending_buf[l.pending++]=I&255},Ye=(l,I,v,z)=>{let ce=l.avail_in;return ce>z&&(ce=z),ce===0?0:(l.avail_in-=ce,I.set(l.input.subarray(l.next_in,l.next_in+ce),v),l.state.wrap===1?l.adler=sn(l.adler,I,ce,v):l.state.wrap===2&&(l.adler=ze(l.adler,I,ce,v)),l.next_in+=ce,l.total_in+=ce,ce)},Ge=(l,I)=>{let v=l.max_chain_length,z=l.strstart,ce,_e,Pt=l.prev_length,Et=l.nice_match;const er=l.strstart>l.w_size-ft?l.strstart-(l.w_size-ft):0,pt=l.window,Zt=l.w_mask,Pr=l.prev,Ar=l.strstart+$e;let Gn=pt[z+Pt-1],zr=pt[z+Pt];l.prev_length>=l.good_match&&(v>>=2),Et>l.lookahead&&(Et=l.lookahead);do if(ce=I,!(pt[ce+Pt]!==zr||pt[ce+Pt-1]!==Gn||pt[ce]!==pt[z]||pt[++ce]!==pt[z+1])){z+=2,ce++;do;while(pt[++z]===pt[++ce]&&pt[++z]===pt[++ce]&&pt[++z]===pt[++ce]&&pt[++z]===pt[++ce]&&pt[++z]===pt[++ce]&&pt[++z]===pt[++ce]&&pt[++z]===pt[++ce]&&pt[++z]===pt[++ce]&&z<Ar);if(_e=$e-(Ar-z),z=Ar-$e,_e>Pt){if(l.match_start=I,Pt=_e,_e>=Et)break;Gn=pt[z+Pt-1],zr=pt[z+Pt]}}while((I=Pr[I&Zt])>er&&--v!==0);return Pt<=l.lookahead?Pt:l.lookahead},et=l=>{const I=l.w_size;let v,z,ce;do{if(z=l.window_size-l.lookahead-l.strstart,l.strstart>=I+(I-ft)&&(l.window.set(l.window.subarray(I,I+I-z),0),l.match_start-=I,l.strstart-=I,l.block_start-=I,l.insert>l.strstart&&(l.insert=l.strstart),Ft(l),z+=I),l.strm.avail_in===0)break;if(v=Ye(l.strm,l.window,l.strstart+l.lookahead,z),l.lookahead+=v,l.lookahead+l.insert>=Dt)for(ce=l.strstart-l.insert,l.ins_h=l.window[ce],l.ins_h=an(l,l.ins_h,l.window[ce+1]);l.insert&&(l.ins_h=an(l,l.ins_h,l.window[ce+Dt-1]),l.prev[ce&l.w_mask]=l.head[l.ins_h],l.head[l.ins_h]=ce,ce++,l.insert--,!(l.lookahead+l.insert<Dt)););}while(l.lookahead<ft&&l.strm.avail_in!==0)},lt=(l,I)=>{let v=l.pending_buf_size-5>l.w_size?l.w_size:l.pending_buf_size-5,z,ce,_e,Pt=0,Et=l.strm.avail_in;do{if(z=65535,_e=l.bi_valid+42>>3,l.strm.avail_out<_e||(_e=l.strm.avail_out-_e,ce=l.strstart-l.block_start,z>ce+l.strm.avail_in&&(z=ce+l.strm.avail_in),z>_e&&(z=_e),z<v&&(z===0&&I!==sr||I===wn||z!==ce+l.strm.avail_in)))break;Pt=I===sr&&z===ce+l.strm.avail_in?1:0,Ue(l,0,0,Pt),l.pending_buf[l.pending-4]=z,l.pending_buf[l.pending-3]=z>>8,l.pending_buf[l.pending-2]=~z,l.pending_buf[l.pending-1]=~z>>8,Xt(l.strm),ce&&(ce>z&&(ce=z),l.strm.output.set(l.window.subarray(l.block_start,l.block_start+ce),l.strm.next_out),l.strm.next_out+=ce,l.strm.avail_out-=ce,l.strm.total_out+=ce,l.block_start+=ce,z-=ce),z&&(Ye(l.strm,l.strm.output,l.strm.next_out,z),l.strm.next_out+=z,l.strm.avail_out-=z,l.strm.total_out+=z)}while(Pt===0);return Et-=l.strm.avail_in,Et&&(Et>=l.w_size?(l.matches=2,l.window.set(l.strm.input.subarray(l.strm.next_in-l.w_size,l.strm.next_in),0),l.strstart=l.w_size,l.insert=l.strstart):(l.window_size-l.strstart<=Et&&(l.strstart-=l.w_size,l.window.set(l.window.subarray(l.w_size,l.w_size+l.strstart),0),l.matches<2&&l.matches++,l.insert>l.strstart&&(l.insert=l.strstart)),l.window.set(l.strm.input.subarray(l.strm.next_in-Et,l.strm.next_in),l.strstart),l.strstart+=Et,l.insert+=Et>l.w_size-l.insert?l.w_size-l.insert:Et),l.block_start=l.strstart),l.high_water<l.strstart&&(l.high_water=l.strstart),Pt?K:I!==wn&&I!==sr&&l.strm.avail_in===0&&l.strstart===l.block_start?Kn:(_e=l.window_size-l.strstart,l.strm.avail_in>_e&&l.block_start>=l.w_size&&(l.block_start-=l.w_size,l.strstart-=l.w_size,l.window.set(l.window.subarray(l.w_size,l.w_size+l.strstart),0),l.matches<2&&l.matches++,_e+=l.w_size,l.insert>l.strstart&&(l.insert=l.strstart)),_e>l.strm.avail_in&&(_e=l.strm.avail_in),_e&&(Ye(l.strm,l.window,l.strstart,_e),l.strstart+=_e,l.insert+=_e>l.w_size-l.insert?l.w_size-l.insert:_e),l.high_water<l.strstart&&(l.high_water=l.strstart),_e=l.bi_valid+42>>3,_e=l.pending_buf_size-_e>65535?65535:l.pending_buf_size-_e,v=_e>l.w_size?l.w_size:_e,ce=l.strstart-l.block_start,(ce>=v||(ce||I===sr)&&I!==wn&&l.strm.avail_in===0&&ce<=_e)&&(z=ce>_e?_e:ce,Pt=I===sr&&l.strm.avail_in===0&&z===ce?1:0,Ue(l,l.block_start,z,Pt),l.block_start+=z,Xt(l.strm)),Pt?Q:On)},dt=(l,I)=>{let v,z;for(;;){if(l.lookahead<ft){if(et(l),l.lookahead<ft&&I===wn)return On;if(l.lookahead===0)break}if(v=0,l.lookahead>=Dt&&(l.ins_h=an(l,l.ins_h,l.window[l.strstart+Dt-1]),v=l.prev[l.strstart&l.w_mask]=l.head[l.ins_h],l.head[l.ins_h]=l.strstart),v!==0&&l.strstart-v<=l.w_size-ft&&(l.match_length=Ge(l,v)),l.match_length>=Dt)if(z=Gt(l,l.strstart-l.match_start,l.match_length-Dt),l.lookahead-=l.match_length,l.match_length<=l.max_lazy_match&&l.lookahead>=Dt){l.match_length--;do l.strstart++,l.ins_h=an(l,l.ins_h,l.window[l.strstart+Dt-1]),v=l.prev[l.strstart&l.w_mask]=l.head[l.ins_h],l.head[l.ins_h]=l.strstart;while(--l.match_length!==0);l.strstart++}else l.strstart+=l.match_length,l.match_length=0,l.ins_h=l.window[l.strstart],l.ins_h=an(l,l.ins_h,l.window[l.strstart+1]);else z=Gt(l,0,l.window[l.strstart]),l.lookahead--,l.strstart++;if(z&&(Kt(l,!1),l.strm.avail_out===0))return On}return l.insert=l.strstart<Dt-1?l.strstart:Dt-1,I===sr?(Kt(l,!0),l.strm.avail_out===0?Q:K):l.sym_next&&(Kt(l,!1),l.strm.avail_out===0)?On:Kn},jt=(l,I)=>{let v,z,ce;for(;;){if(l.lookahead<ft){if(et(l),l.lookahead<ft&&I===wn)return On;if(l.lookahead===0)break}if(v=0,l.lookahead>=Dt&&(l.ins_h=an(l,l.ins_h,l.window[l.strstart+Dt-1]),v=l.prev[l.strstart&l.w_mask]=l.head[l.ins_h],l.head[l.ins_h]=l.strstart),l.prev_length=l.match_length,l.prev_match=l.match_start,l.match_length=Dt-1,v!==0&&l.prev_length<l.max_lazy_match&&l.strstart-v<=l.w_size-ft&&(l.match_length=Ge(l,v),l.match_length<=5&&(l.strategy===fn||l.match_length===Dt&&l.strstart-l.match_start>4096)&&(l.match_length=Dt-1)),l.prev_length>=Dt&&l.match_length<=l.prev_length){ce=l.strstart+l.lookahead-Dt,z=Gt(l,l.strstart-1-l.prev_match,l.prev_length-Dt),l.lookahead-=l.prev_length-1,l.prev_length-=2;do++l.strstart<=ce&&(l.ins_h=an(l,l.ins_h,l.window[l.strstart+Dt-1]),v=l.prev[l.strstart&l.w_mask]=l.head[l.ins_h],l.head[l.ins_h]=l.strstart);while(--l.prev_length!==0);if(l.match_available=0,l.match_length=Dt-1,l.strstart++,z&&(Kt(l,!1),l.strm.avail_out===0))return On}else if(l.match_available){if(z=Gt(l,0,l.window[l.strstart-1]),z&&Kt(l,!1),l.strstart++,l.lookahead--,l.strm.avail_out===0)return On}else l.match_available=1,l.strstart++,l.lookahead--}return l.match_available&&(z=Gt(l,0,l.window[l.strstart-1]),l.match_available=0),l.insert=l.strstart<Dt-1?l.strstart:Dt-1,I===sr?(Kt(l,!0),l.strm.avail_out===0?Q:K):l.sym_next&&(Kt(l,!1),l.strm.avail_out===0)?On:Kn},Nt=(l,I)=>{let v,z,ce,_e;const Pt=l.window;for(;;){if(l.lookahead<=$e){if(et(l),l.lookahead<=$e&&I===wn)return On;if(l.lookahead===0)break}if(l.match_length=0,l.lookahead>=Dt&&l.strstart>0&&(ce=l.strstart-1,z=Pt[ce],z===Pt[++ce]&&z===Pt[++ce]&&z===Pt[++ce])){_e=l.strstart+$e;do;while(z===Pt[++ce]&&z===Pt[++ce]&&z===Pt[++ce]&&z===Pt[++ce]&&z===Pt[++ce]&&z===Pt[++ce]&&z===Pt[++ce]&&z===Pt[++ce]&&ce<_e);l.match_length=$e-(_e-ce),l.match_length>l.lookahead&&(l.match_length=l.lookahead)}if(l.match_length>=Dt?(v=Gt(l,1,l.match_length-Dt),l.lookahead-=l.match_length,l.strstart+=l.match_length,l.match_length=0):(v=Gt(l,0,l.window[l.strstart]),l.lookahead--,l.strstart++),v&&(Kt(l,!1),l.strm.avail_out===0))return On}return l.insert=0,I===sr?(Kt(l,!0),l.strm.avail_out===0?Q:K):l.sym_next&&(Kt(l,!1),l.strm.avail_out===0)?On:Kn},wt=(l,I)=>{let v;for(;;){if(l.lookahead===0&&(et(l),l.lookahead===0)){if(I===wn)return On;break}if(l.match_length=0,v=Gt(l,0,l.window[l.strstart]),l.lookahead--,l.strstart++,v&&(Kt(l,!1),l.strm.avail_out===0))return On}return l.insert=0,I===sr?(Kt(l,!0),l.strm.avail_out===0?Q:K):l.sym_next&&(Kt(l,!1),l.strm.avail_out===0)?On:Kn};function Je(l,I,v,z,ce){this.good_length=l,this.max_lazy=I,this.nice_length=v,this.max_chain=z,this.func=ce}const At=[new Je(0,0,0,0,lt),new Je(4,4,8,4,dt),new Je(4,5,16,8,dt),new Je(4,6,32,32,dt),new Je(4,4,16,16,jt),new Je(8,16,32,32,jt),new Je(8,16,128,128,jt),new Je(8,32,128,256,jt),new Je(32,128,258,1024,jt),new Je(32,258,258,4096,jt)],Bt=l=>{l.window_size=2*l.w_size,rt(l.head),l.max_lazy_match=At[l.level].max_lazy,l.good_match=At[l.level].good_length,l.nice_match=At[l.level].nice_length,l.max_chain_length=At[l.level].max_chain,l.strstart=0,l.block_start=0,l.lookahead=0,l.insert=0,l.match_length=l.prev_length=Dt-1,l.match_available=0,l.ins_h=0};function mt(){this.strm=null,this.status=0,this.pending_buf=null,this.pending_buf_size=0,this.pending_out=0,this.pending=0,this.wrap=0,this.gzhead=null,this.gzindex=0,this.method=mn,this.last_flush=-1,this.w_size=0,this.w_bits=0,this.w_mask=0,this.window=null,this.window_size=0,this.prev=null,this.head=null,this.ins_h=0,this.hash_size=0,this.hash_bits=0,this.hash_mask=0,this.hash_shift=0,this.block_start=0,this.match_length=0,this.prev_match=0,this.match_available=0,this.strstart=0,this.match_start=0,this.lookahead=0,this.prev_length=0,this.max_chain_length=0,this.max_lazy_match=0,this.level=0,this.strategy=0,this.good_match=0,this.nice_match=0,this.dyn_ltree=new Uint16Array(Sn*2),this.dyn_dtree=new Uint16Array((2*bn+1)*2),this.bl_tree=new Uint16Array((2*Un+1)*2),rt(this.dyn_ltree),rt(this.dyn_dtree),rt(this.bl_tree),this.l_desc=null,this.d_desc=null,this.bl_desc=null,this.bl_count=new Uint16Array(Tt+1),this.heap=new Uint16Array(2*Qn+1),rt(this.heap),this.heap_len=0,this.heap_max=0,this.depth=new Uint16Array(2*Qn+1),rt(this.depth),this.sym_buf=0,this.lit_bufsize=0,this.sym_next=0,this.sym_end=0,this.opt_len=0,this.static_len=0,this.matches=0,this.insert=0,this.bi_buf=0,this.bi_valid=0}const bt=l=>{if(!l)return 1;const I=l.state;return!I||I.strm!==l||I.status!==Lt&&I.status!==on&&I.status!==Cn&&I.status!==pn&&I.status!==Hn&&I.status!==Xn&&I.status!==Jn&&I.status!==yt?1:0},An=l=>{if(bt(l))return Le(l,Sr);l.total_in=l.total_out=0,l.data_type=tt;const I=l.state;return I.pending=0,I.pending_out=0,I.wrap<0&&(I.wrap=-I.wrap),I.status=I.wrap===2?on:I.wrap?Lt:Jn,l.adler=I.wrap===2?0:1,I.last_flush=-2,Ie(I),zn},En=l=>{const I=An(l);return I===zn&&Bt(l.state),I},In=(l,I)=>bt(l)||l.state.wrap!==2?Sr:(l.state.gzhead=I,zn),jn=(l,I,v,z,ce,_e)=>{if(!l)return Sr;let Pt=1;if(I===Tn&&(I=6),z<0?(Pt=0,z=-z):z>15&&(Pt=2,z-=16),ce<1||ce>Jt||v!==mn||z<8||z>15||I<0||I>9||_e<0||_e>Hr||z===8&&Pt!==1)return Le(l,Sr);z===8&&(z=9);const Et=new mt;return l.state=Et,Et.strm=l,Et.status=Lt,Et.wrap=Pt,Et.gzhead=null,Et.w_bits=z,Et.w_size=1<<Et.w_bits,Et.w_mask=Et.w_size-1,Et.hash_bits=ce+7,Et.hash_size=1<<Et.hash_bits,Et.hash_mask=Et.hash_size-1,Et.hash_shift=~~((Et.hash_bits+Dt-1)/Dt),Et.window=new Uint8Array(Et.w_size*2),Et.head=new Uint16Array(Et.hash_size),Et.prev=new Uint16Array(Et.w_size),Et.lit_bufsize=1<<ce+6,Et.pending_buf_size=Et.lit_bufsize*4,Et.pending_buf=new Uint8Array(Et.pending_buf_size),Et.sym_buf=Et.lit_bufsize,Et.sym_end=(Et.lit_bufsize-1)*3,Et.level=I,Et.strategy=_e,Et.method=v,En(l)},tr=(l,I)=>jn(l,I,mn,Bn,xn,it),Yn=(l,I)=>{if(bt(l)||I>lr||I<0)return l?Le(l,Sr):Sr;const v=l.state;if(!l.output||l.avail_in!==0&&!l.input||v.status===yt&&I!==sr)return Le(l,l.avail_out===0?Zr:Sr);const z=v.last_flush;if(v.last_flush=I,v.pending!==0){if(Xt(l),l.avail_out===0)return v.last_flush=-1,zn}else if(l.avail_in===0&&st(I)<=st(z)&&I!==sr)return Le(l,Zr);if(v.status===yt&&l.avail_in!==0)return Le(l,Zr);if(v.status===Lt&&v.wrap===0&&(v.status=Jn),v.status===Lt){let ce=mn+(v.w_bits-8<<4)<<8,_e=-1;if(v.strategy>=Zn||v.level<2?_e=0:v.level<6?_e=1:v.level===6?_e=2:_e=3,ce|=_e<<6,v.strstart!==0&&(ce|=Qt),ce+=31-ce%31,pe(v,ce),v.strstart!==0&&(pe(v,l.adler>>>16),pe(v,l.adler&65535)),l.adler=1,v.status=Jn,Xt(l),v.pending!==0)return v.last_flush=-1,zn}if(v.status===on){if(l.adler=0,en(v,31),en(v,139),en(v,8),v.gzhead)en(v,(v.gzhead.text?1:0)+(v.gzhead.hcrc?2:0)+(v.gzhead.extra?4:0)+(v.gzhead.name?8:0)+(v.gzhead.comment?16:0)),en(v,v.gzhead.time&255),en(v,v.gzhead.time>>8&255),en(v,v.gzhead.time>>16&255),en(v,v.gzhead.time>>24&255),en(v,v.level===9?2:v.strategy>=Zn||v.level<2?4:0),en(v,v.gzhead.os&255),v.gzhead.extra&&v.gzhead.extra.length&&(en(v,v.gzhead.extra.length&255),en(v,v.gzhead.extra.length>>8&255)),v.gzhead.hcrc&&(l.adler=ze(l.adler,v.pending_buf,v.pending,0)),v.gzindex=0,v.status=Cn;else if(en(v,0),en(v,0),en(v,0),en(v,0),en(v,0),en(v,v.level===9?2:v.strategy>=Zn||v.level<2?4:0),en(v,Ee),v.status=Jn,Xt(l),v.pending!==0)return v.last_flush=-1,zn}if(v.status===Cn){if(v.gzhead.extra){let ce=v.pending,_e=(v.gzhead.extra.length&65535)-v.gzindex;for(;v.pending+_e>v.pending_buf_size;){let Et=v.pending_buf_size-v.pending;if(v.pending_buf.set(v.gzhead.extra.subarray(v.gzindex,v.gzindex+Et),v.pending),v.pending=v.pending_buf_size,v.gzhead.hcrc&&v.pending>ce&&(l.adler=ze(l.adler,v.pending_buf,v.pending-ce,ce)),v.gzindex+=Et,Xt(l),v.pending!==0)return v.last_flush=-1,zn;ce=0,_e-=Et}let Pt=new Uint8Array(v.gzhead.extra);v.pending_buf.set(Pt.subarray(v.gzindex,v.gzindex+_e),v.pending),v.pending+=_e,v.gzhead.hcrc&&v.pending>ce&&(l.adler=ze(l.adler,v.pending_buf,v.pending-ce,ce)),v.gzindex=0}v.status=pn}if(v.status===pn){if(v.gzhead.name){let ce=v.pending,_e;do{if(v.pending===v.pending_buf_size){if(v.gzhead.hcrc&&v.pending>ce&&(l.adler=ze(l.adler,v.pending_buf,v.pending-ce,ce)),Xt(l),v.pending!==0)return v.last_flush=-1,zn;ce=0}v.gzindex<v.gzhead.name.length?_e=v.gzhead.name.charCodeAt(v.gzindex++)&255:_e=0,en(v,_e)}while(_e!==0);v.gzhead.hcrc&&v.pending>ce&&(l.adler=ze(l.adler,v.pending_buf,v.pending-ce,ce)),v.gzindex=0}v.status=Hn}if(v.status===Hn){if(v.gzhead.comment){let ce=v.pending,_e;do{if(v.pending===v.pending_buf_size){if(v.gzhead.hcrc&&v.pending>ce&&(l.adler=ze(l.adler,v.pending_buf,v.pending-ce,ce)),Xt(l),v.pending!==0)return v.last_flush=-1,zn;ce=0}v.gzindex<v.gzhead.comment.length?_e=v.gzhead.comment.charCodeAt(v.gzindex++)&255:_e=0,en(v,_e)}while(_e!==0);v.gzhead.hcrc&&v.pending>ce&&(l.adler=ze(l.adler,v.pending_buf,v.pending-ce,ce))}v.status=Xn}if(v.status===Xn){if(v.gzhead.hcrc){if(v.pending+2>v.pending_buf_size&&(Xt(l),v.pending!==0))return v.last_flush=-1,zn;en(v,l.adler&255),en(v,l.adler>>8&255),l.adler=0}if(v.status=Jn,Xt(l),v.pending!==0)return v.last_flush=-1,zn}if(l.avail_in!==0||v.lookahead!==0||I!==wn&&v.status!==yt){let ce=v.level===0?lt(v,I):v.strategy===Zn?wt(v,I):v.strategy===vr?Nt(v,I):At[v.level].func(v,I);if((ce===Q||ce===K)&&(v.status=yt),ce===On||ce===Q)return l.avail_out===0&&(v.last_flush=-1),zn;if(ce===Kn&&(I===$n?_n(v):I!==lr&&(Ue(v,0,0,!1),I===mr&&(rt(v.head),v.lookahead===0&&(v.strstart=0,v.block_start=0,v.insert=0))),Xt(l),l.avail_out===0))return v.last_flush=-1,zn}return I!==sr?zn:v.wrap<=0?Lr:(v.wrap===2?(en(v,l.adler&255),en(v,l.adler>>8&255),en(v,l.adler>>16&255),en(v,l.adler>>24&255),en(v,l.total_in&255),en(v,l.total_in>>8&255),en(v,l.total_in>>16&255),en(v,l.total_in>>24&255)):(pe(v,l.adler>>>16),pe(v,l.adler&65535)),Xt(l),v.wrap>0&&(v.wrap=-v.wrap),v.pending!==0?zn:Lr)},ar=l=>{if(bt(l))return Sr;const I=l.state.status;return l.state=null,I===Jn?Le(l,xr):zn},Pn=(l,I)=>{let v=I.length;if(bt(l))return Sr;const z=l.state,ce=z.wrap;if(ce===2||ce===1&&z.status!==Lt||z.lookahead)return Sr;if(ce===1&&(l.adler=sn(l.adler,I,v,0)),z.wrap=0,v>=z.w_size){ce===0&&(rt(z.head),z.strstart=0,z.block_start=0,z.insert=0);let er=new Uint8Array(z.w_size);er.set(I.subarray(v-z.w_size,v),0),I=er,v=z.w_size}const _e=l.avail_in,Pt=l.next_in,Et=l.input;for(l.avail_in=v,l.next_in=0,l.input=I,et(z);z.lookahead>=Dt;){let er=z.strstart,pt=z.lookahead-(Dt-1);do z.ins_h=an(z,z.ins_h,z.window[er+Dt-1]),z.prev[er&z.w_mask]=z.head[z.ins_h],z.head[z.ins_h]=er,er++;while(--pt);z.strstart=er,z.lookahead=Dt-1,et(z)}return z.strstart+=z.lookahead,z.block_start=z.strstart,z.insert=z.lookahead,z.lookahead=0,z.match_length=z.prev_length=Dt-1,z.match_available=0,l.next_in=Pt,l.input=Et,l.avail_in=_e,z.wrap=ce,zn};var yr=tr,ir=jn,Kr=En,fr=An,hr=In,Tr=Yn,kn=ar,pr=Pn,cr="pako deflate (from Nodeca project)",Wn={deflateInit:yr,deflateInit2:ir,deflateReset:Kr,deflateResetKeep:fr,deflateSetHeader:hr,deflate:Tr,deflateEnd:kn,deflateSetDictionary:pr,deflateInfo:cr};const ur=(l,I)=>Object.prototype.hasOwnProperty.call(l,I);var Ir=function(l){const I=Array.prototype.slice.call(arguments,1);for(;I.length;){const v=I.shift();if(v){if(typeof v!="object")throw new TypeError(v+"must be non-object");for(const z in v)ur(v,z)&&(l[z]=v[z])}}return l},Vr=l=>{let I=0;for(let z=0,ce=l.length;z<ce;z++)I+=l[z].length;const v=new Uint8Array(I);for(let z=0,ce=0,_e=l.length;z<_e;z++){let Pt=l[z];v.set(Pt,ce),ce+=Pt.length}return v},Ur={assign:Ir,flattenChunks:Vr};let or=!0;try{String.fromCharCode.apply(null,new Uint8Array(1))}catch(l){or=!1}const hi=new Uint8Array(256);for(let l=0;l<256;l++)hi[l]=l>=252?6:l>=248?5:l>=240?4:l>=224?3:l>=192?2:1;hi[254]=hi[254]=1;var Ki=l=>{if(typeof TextEncoder=="function"&&TextEncoder.prototype.encode)return new TextEncoder().encode(l);let I,v,z,ce,_e,Pt=l.length,Et=0;for(ce=0;ce<Pt;ce++)v=l.charCodeAt(ce),(v&64512)===55296&&ce+1<Pt&&(z=l.charCodeAt(ce+1),(z&64512)===56320&&(v=65536+(v-55296<<10)+(z-56320),ce++)),Et+=v<128?1:v<2048?2:v<65536?3:4;for(I=new Uint8Array(Et),_e=0,ce=0;_e<Et;ce++)v=l.charCodeAt(ce),(v&64512)===55296&&ce+1<Pt&&(z=l.charCodeAt(ce+1),(z&64512)===56320&&(v=65536+(v-55296<<10)+(z-56320),ce++)),v<128?I[_e++]=v:v<2048?(I[_e++]=192|v>>>6,I[_e++]=128|v&63):v<65536?(I[_e++]=224|v>>>12,I[_e++]=128|v>>>6&63,I[_e++]=128|v&63):(I[_e++]=240|v>>>18,I[_e++]=128|v>>>12&63,I[_e++]=128|v>>>6&63,I[_e++]=128|v&63);return I};const Ji=(l,I)=>{if(I<65534&&l.subarray&&or)return String.fromCharCode.apply(null,l.length===I?l:l.subarray(0,I));let v="";for(let z=0;z<I;z++)v+=String.fromCharCode(l[z]);return v};var ds=(l,I)=>{const v=I||l.length;if(typeof TextDecoder=="function"&&TextDecoder.prototype.decode)return new TextDecoder().decode(l.subarray(0,I));let z,ce;const _e=new Array(v*2);for(ce=0,z=0;z<v;){let Pt=l[z++];if(Pt<128){_e[ce++]=Pt;continue}let Et=hi[Pt];if(Et>4){_e[ce++]=65533,z+=Et-1;continue}for(Pt&=Et===2?31:Et===3?15:7;Et>1&&z<v;)Pt=Pt<<6|l[z++]&63,Et--;if(Et>1){_e[ce++]=65533;continue}Pt<65536?_e[ce++]=Pt:(Pt-=65536,_e[ce++]=55296|Pt>>10&1023,_e[ce++]=56320|Pt&1023)}return Ji(_e,ce)},ss=(l,I)=>{I=I||l.length,I>l.length&&(I=l.length);let v=I-1;for(;v>=0&&(l[v]&192)===128;)v--;return v<0||v===0?I:v+hi[l[v]]>I?v:I},zi={string2buf:Ki,buf2string:ds,utf8border:ss};function ii(){this.input=null,this.next_in=0,this.avail_in=0,this.total_in=0,this.output=null,this.next_out=0,this.avail_out=0,this.total_out=0,this.msg="",this.state=null,this.data_type=2,this.adler=0}var ci=ii;const Pi=Object.prototype.toString,{Z_NO_FLUSH:ai,Z_SYNC_FLUSH:si,Z_FULL_FLUSH:li,Z_FINISH:gr,Z_OK:Fr,Z_STREAM_END:Gr,Z_DEFAULT_COMPRESSION:$r,Z_DEFAULT_STRATEGY:Dr,Z_DEFLATED:Xr}=me;function ti(l){this.options=Ur.assign({level:$r,method:Xr,chunkSize:16384,windowBits:15,memLevel:8,strategy:Dr},l||{});let I=this.options;I.raw&&I.windowBits>0?I.windowBits=-I.windowBits:I.gzip&&I.windowBits>0&&I.windowBits<16&&(I.windowBits+=16),this.err=0,this.msg="",this.ended=!1,this.chunks=[],this.strm=new ci,this.strm.avail_out=0;let v=Wn.deflateInit2(this.strm,I.level,I.method,I.windowBits,I.memLevel,I.strategy);if(v!==Fr)throw new Error(ne[v]);if(I.header&&Wn.deflateSetHeader(this.strm,I.header),I.dictionary){let z;if(typeof I.dictionary=="string"?z=zi.string2buf(I.dictionary):Pi.call(I.dictionary)==="[object ArrayBuffer]"?z=new Uint8Array(I.dictionary):z=I.dictionary,v=Wn.deflateSetDictionary(this.strm,z),v!==Fr)throw new Error(ne[v]);this._dict_set=!0}}ti.prototype.push=function(l,I){const v=this.strm,z=this.options.chunkSize;let ce,_e;if(this.ended)return!1;for(I===~~I?_e=I:_e=I===!0?gr:ai,typeof l=="string"?v.input=zi.string2buf(l):Pi.call(l)==="[object ArrayBuffer]"?v.input=new Uint8Array(l):v.input=l,v.next_in=0,v.avail_in=v.input.length;;){if(v.avail_out===0&&(v.output=new Uint8Array(z),v.next_out=0,v.avail_out=z),(_e===si||_e===li)&&v.avail_out<=6){this.onData(v.output.subarray(0,v.next_out)),v.avail_out=0;continue}if(ce=Wn.deflate(v,_e),ce===Gr)return v.next_out>0&&this.onData(v.output.subarray(0,v.next_out)),ce=Wn.deflateEnd(this.strm),this.onEnd(ce),this.ended=!0,ce===Fr;if(v.avail_out===0){this.onData(v.output);continue}if(_e>0&&v.next_out>0){this.onData(v.output.subarray(0,v.next_out)),v.avail_out=0;continue}if(v.avail_in===0)break}return!0},ti.prototype.onData=function(l){this.chunks.push(l)},ti.prototype.onEnd=function(l){l===Fr&&(this.result=Ur.flattenChunks(this.chunks)),this.chunks=[],this.err=l,this.msg=this.strm.msg};function rr(l,I){const v=new ti(I);if(v.push(l,!0),v.err)throw v.msg||ne[v.err];return v.result}function _r(l,I){return I=I||{},I.raw=!0,rr(l,I)}function Er(l,I){return I=I||{},I.gzip=!0,rr(l,I)}var ui=ti,fi=rr,Gi=_r,as=Er,Bi=me,ls={Deflate:ui,deflate:fi,deflateRaw:Gi,gzip:as,constants:Bi};const gi=16209,la=16191;var Ms=function(I,v){let z,ce,_e,Pt,Et,er,pt,Zt,Pr,Ar,Gn,zr,Yi,Ei,pi,Ri,di,nr,bi,As,ri,Xi,Ti,yi;const ki=I.state;z=I.next_in,Ti=I.input,ce=z+(I.avail_in-5),_e=I.next_out,yi=I.output,Pt=_e-(v-I.avail_out),Et=_e+(I.avail_out-257),er=ki.dmax,pt=ki.wsize,Zt=ki.whave,Pr=ki.wnext,Ar=ki.window,Gn=ki.hold,zr=ki.bits,Yi=ki.lencode,Ei=ki.distcode,pi=(1<<ki.lenbits)-1,Ri=(1<<ki.distbits)-1;e:do{zr<15&&(Gn+=Ti[z++]<<zr,zr+=8,Gn+=Ti[z++]<<zr,zr+=8),di=Yi[Gn&pi];t:for(;;){if(nr=di>>>24,Gn>>>=nr,zr-=nr,nr=di>>>16&255,nr===0)yi[_e++]=di&65535;else if(nr&16){bi=di&65535,nr&=15,nr&&(zr<nr&&(Gn+=Ti[z++]<<zr,zr+=8),bi+=Gn&(1<<nr)-1,Gn>>>=nr,zr-=nr),zr<15&&(Gn+=Ti[z++]<<zr,zr+=8,Gn+=Ti[z++]<<zr,zr+=8),di=Ei[Gn&Ri];n:for(;;){if(nr=di>>>24,Gn>>>=nr,zr-=nr,nr=di>>>16&255,nr&16){if(As=di&65535,nr&=15,zr<nr&&(Gn+=Ti[z++]<<zr,zr+=8,zr<nr&&(Gn+=Ti[z++]<<zr,zr+=8)),As+=Gn&(1<<nr)-1,As>er){I.msg="invalid distance too far back",ki.mode=gi;break e}if(Gn>>>=nr,zr-=nr,nr=_e-Pt,As>nr){if(nr=As-nr,nr>Zt&&ki.sane){I.msg="invalid distance too far back",ki.mode=gi;break e}if(ri=0,Xi=Ar,Pr===0){if(ri+=pt-nr,nr<bi){bi-=nr;do yi[_e++]=Ar[ri++];while(--nr);ri=_e-As,Xi=yi}}else if(Pr<nr){if(ri+=pt+Pr-nr,nr-=Pr,nr<bi){bi-=nr;do yi[_e++]=Ar[ri++];while(--nr);if(ri=0,Pr<bi){nr=Pr,bi-=nr;do yi[_e++]=Ar[ri++];while(--nr);ri=_e-As,Xi=yi}}}else if(ri+=Pr-nr,nr<bi){bi-=nr;do yi[_e++]=Ar[ri++];while(--nr);ri=_e-As,Xi=yi}for(;bi>2;)yi[_e++]=Xi[ri++],yi[_e++]=Xi[ri++],yi[_e++]=Xi[ri++],bi-=3;bi&&(yi[_e++]=Xi[ri++],bi>1&&(yi[_e++]=Xi[ri++]))}else{ri=_e-As;do yi[_e++]=yi[ri++],yi[_e++]=yi[ri++],yi[_e++]=yi[ri++],bi-=3;while(bi>2);bi&&(yi[_e++]=yi[ri++],bi>1&&(yi[_e++]=yi[ri++]))}}else if(nr&64){I.msg="invalid distance code",ki.mode=gi;break e}else{di=Ei[(di&65535)+(Gn&(1<<nr)-1)];continue n}break}}else if(nr&64)if(nr&32){ki.mode=la;break e}else{I.msg="invalid literal/length code",ki.mode=gi;break e}else{di=Yi[(di&65535)+(Gn&(1<<nr)-1)];continue t}break}}while(z<ce&&_e<Et);bi=zr>>3,z-=bi,zr-=bi<<3,Gn&=(1<<zr)-1,I.next_in=z,I.next_out=_e,I.avail_in=z<ce?5+(ce-z):5-(z-ce),I.avail_out=_e<Et?257+(Et-_e):257-(_e-Et),ki.hold=Gn,ki.bits=zr};const ws=15,Fi=852,ra=592,Es=0,Ws=1,Qs=2,js=new Uint16Array([3,4,5,6,7,8,9,10,11,13,15,17,19,23,27,31,35,43,51,59,67,83,99,115,131,163,195,227,258,0,0]),Ys=new Uint8Array([16,16,16,16,16,16,16,16,17,17,17,17,18,18,18,18,19,19,19,19,20,20,20,20,21,21,21,21,16,72,78]),pa=new Uint16Array([1,2,3,4,5,7,9,13,17,25,33,49,65,97,129,193,257,385,513,769,1025,1537,2049,3073,4097,6145,8193,12289,16385,24577,0,0]),ms=new Uint8Array([16,16,16,16,17,17,18,18,19,19,20,20,21,21,22,22,23,23,24,24,25,25,26,26,27,27,28,28,29,29,64,64]);var vs=(l,I,v,z,ce,_e,Pt,Et)=>{const er=Et.bits;let pt=0,Zt=0,Pr=0,Ar=0,Gn=0,zr=0,Yi=0,Ei=0,pi=0,Ri=0,di,nr,bi,As,ri,Xi=null,Ti;const yi=new Uint16Array(ws+1),ki=new Uint16Array(ws+1);let Wa=null,pA,ta,fs;for(pt=0;pt<=ws;pt++)yi[pt]=0;for(Zt=0;Zt<z;Zt++)yi[I[v+Zt]]++;for(Gn=er,Ar=ws;Ar>=1&&yi[Ar]===0;Ar--);if(Gn>Ar&&(Gn=Ar),Ar===0)return ce[_e++]=1<<24|64<<16|0,ce[_e++]=1<<24|64<<16|0,Et.bits=1,0;for(Pr=1;Pr<Ar&&yi[Pr]===0;Pr++);for(Gn<Pr&&(Gn=Pr),Ei=1,pt=1;pt<=ws;pt++)if(Ei<<=1,Ei-=yi[pt],Ei<0)return-1;if(Ei>0&&(l===Es||Ar!==1))return-1;for(ki[1]=0,pt=1;pt<ws;pt++)ki[pt+1]=ki[pt]+yi[pt];for(Zt=0;Zt<z;Zt++)I[v+Zt]!==0&&(Pt[ki[I[v+Zt]]++]=Zt);if(l===Es?(Xi=Wa=Pt,Ti=20):l===Ws?(Xi=js,Wa=Ys,Ti=257):(Xi=pa,Wa=ms,Ti=0),Ri=0,Zt=0,pt=Pr,ri=_e,zr=Gn,Yi=0,bi=-1,pi=1<<Gn,As=pi-1,l===Ws&&pi>Fi||l===Qs&&pi>ra)return 1;for(;;){pA=pt-Yi,Pt[Zt]+1<Ti?(ta=0,fs=Pt[Zt]):Pt[Zt]>=Ti?(ta=Wa[Pt[Zt]-Ti],fs=Xi[Pt[Zt]-Ti]):(ta=96,fs=0),di=1<<pt-Yi,nr=1<<zr,Pr=nr;do nr-=di,ce[ri+(Ri>>Yi)+nr]=pA<<24|ta<<16|fs|0;while(nr!==0);for(di=1<<pt-1;Ri&di;)di>>=1;if(di!==0?(Ri&=di-1,Ri+=di):Ri=0,Zt++,--yi[pt]===0){if(pt===Ar)break;pt=I[v+Pt[Zt]]}if(pt>Gn&&(Ri&As)!==bi){for(Yi===0&&(Yi=Gn),ri+=Pr,zr=pt-Yi,Ei=1<<zr;zr+Yi<Ar&&(Ei-=yi[zr+Yi],!(Ei<=0));)zr++,Ei<<=1;if(pi+=1<<zr,l===Ws&&pi>Fi||l===Qs&&pi>ra)return 1;bi=Ri&As,ce[bi]=Gn<<24|zr<<16|ri-_e|0}}return Ri!==0&&(ce[ri+Ri]=pt-Yi<<24|64<<16|0),Et.bits=Gn,0};const cs=0,Os=1,Ds=2,{Z_FINISH:Js,Z_BLOCK:hs,Z_TREES:os,Z_OK:oi,Z_STREAM_END:Ai,Z_NEED_DICT:Mi,Z_STREAM_ERROR:Si,Z_DATA_ERROR:es,Z_MEM_ERROR:Wi,Z_BUF_ERROR:Rs,Z_DEFLATED:Ls}=me,Ps=16180,Ui=16181,xs=16182,Gs=16183,$s=16184,ia=16185,ua=16186,ts=16187,Di=16188,$i=16189,_s=16190,ji=16191,Ts=16192,gs=16193,ys=16194,Ga=16195,Fn=16196,sa=16197,ma=16198,Zs=16199,$a=16200,Za=16201,Xa=16202,co=16203,Uo=16204,Ja=16205,Ca=16206,Ns=16207,Va=16208,ns=16209,xa=16210,fo=16211,ho=852,qa=592,va=15,go=l=>(l>>>24&255)+(l>>>8&65280)+((l&65280)<<8)+((l&255)<<24);function to(){this.strm=null,this.mode=0,this.last=!1,this.wrap=0,this.havedict=!1,this.flags=0,this.dmax=0,this.check=0,this.total=0,this.head=null,this.wbits=0,this.wsize=0,this.whave=0,this.wnext=0,this.window=null,this.hold=0,this.bits=0,this.length=0,this.offset=0,this.extra=0,this.lencode=null,this.distcode=null,this.lenbits=0,this.distbits=0,this.ncode=0,this.nlen=0,this.ndist=0,this.have=0,this.next=null,this.lens=new Uint16Array(320),this.work=new Uint16Array(288),this.lendyn=null,this.distdyn=null,this.sane=0,this.back=0,this.was=0}const ca=l=>{if(!l)return 1;const I=l.state;return!I||I.strm!==l||I.mode<Ps||I.mode>fo?1:0},La=l=>{if(ca(l))return Si;const I=l.state;return l.total_in=l.total_out=I.total=0,l.msg="",I.wrap&&(l.adler=I.wrap&1),I.mode=Ps,I.last=0,I.havedict=0,I.flags=-1,I.dmax=32768,I.head=null,I.hold=0,I.bits=0,I.lencode=I.lendyn=new Int32Array(ho),I.distcode=I.distdyn=new Int32Array(qa),I.sane=1,I.back=-1,oi},Ua=l=>{if(ca(l))return Si;const I=l.state;return I.wsize=0,I.whave=0,I.wnext=0,La(l)},za=(l,I)=>{let v;if(ca(l))return Si;const z=l.state;return I<0?(v=0,I=-I):(v=(I>>4)+5,I<48&&(I&=15)),I&&(I<8||I>15)?Si:(z.window!==null&&z.wbits!==I&&(z.window=null),z.wrap=v,z.wbits=I,Ua(l))},wi=(l,I)=>{if(!l)return Si;const v=new to;l.state=v,v.strm=l,v.window=null,v.mode=Ps;const z=za(l,I);return z!==oi&&(l.state=null),z},Ci=l=>wi(l,va);let Bs=!0,Ss,bs;const Sa=l=>{if(Bs){Ss=new Int32Array(512),bs=new Int32Array(32);let I=0;for(;I<144;)l.lens[I++]=8;for(;I<256;)l.lens[I++]=9;for(;I<280;)l.lens[I++]=7;for(;I<288;)l.lens[I++]=8;for(vs(Os,l.lens,0,288,Ss,0,l.work,{bits:9}),I=0;I<32;)l.lens[I++]=5;vs(Ds,l.lens,0,32,bs,0,l.work,{bits:5}),Bs=!1}l.lencode=Ss,l.lenbits=9,l.distcode=bs,l.distbits=5},_a=(l,I,v,z)=>{let ce;const _e=l.state;return _e.window===null&&(_e.wsize=1<<_e.wbits,_e.wnext=0,_e.whave=0,_e.window=new Uint8Array(_e.wsize)),z>=_e.wsize?(_e.window.set(I.subarray(v-_e.wsize,v),0),_e.wnext=0,_e.whave=_e.wsize):(ce=_e.wsize-_e.wnext,ce>z&&(ce=z),_e.window.set(I.subarray(v-z,v-z+ce),_e.wnext),z-=ce,z?(_e.window.set(I.subarray(v-z,v),0),_e.wnext=z,_e.whave=_e.wsize):(_e.wnext+=ce,_e.wnext===_e.wsize&&(_e.wnext=0),_e.whave<_e.wsize&&(_e.whave+=ce))),0},Ta=(l,I)=>{let v,z,ce,_e,Pt,Et,er,pt,Zt,Pr,Ar,Gn,zr,Yi,Ei=0,pi,Ri,di,nr,bi,As,ri,Xi;const Ti=new Uint8Array(4);let yi,ki;const Wa=new Uint8Array([16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15]);if(ca(l)||!l.output||!l.input&&l.avail_in!==0)return Si;v=l.state,v.mode===ji&&(v.mode=Ts),Pt=l.next_out,ce=l.output,er=l.avail_out,_e=l.next_in,z=l.input,Et=l.avail_in,pt=v.hold,Zt=v.bits,Pr=Et,Ar=er,Xi=oi;e:for(;;)switch(v.mode){case Ps:if(v.wrap===0){v.mode=Ts;break}for(;Zt<16;){if(Et===0)break e;Et--,pt+=z[_e++]<<Zt,Zt+=8}if(v.wrap&2&&pt===35615){v.wbits===0&&(v.wbits=15),v.check=0,Ti[0]=pt&255,Ti[1]=pt>>>8&255,v.check=ze(v.check,Ti,2,0),pt=0,Zt=0,v.mode=Ui;break}if(v.head&&(v.head.done=!1),!(v.wrap&1)||(((pt&255)<<8)+(pt>>8))%31){l.msg="incorrect header check",v.mode=ns;break}if((pt&15)!==Ls){l.msg="unknown compression method",v.mode=ns;break}if(pt>>>=4,Zt-=4,ri=(pt&15)+8,v.wbits===0&&(v.wbits=ri),ri>15||ri>v.wbits){l.msg="invalid window size",v.mode=ns;break}v.dmax=1<<v.wbits,v.flags=0,l.adler=v.check=1,v.mode=pt&512?$i:ji,pt=0,Zt=0;break;case Ui:for(;Zt<16;){if(Et===0)break e;Et--,pt+=z[_e++]<<Zt,Zt+=8}if(v.flags=pt,(v.flags&255)!==Ls){l.msg="unknown compression method",v.mode=ns;break}if(v.flags&57344){l.msg="unknown header flags set",v.mode=ns;break}v.head&&(v.head.text=pt>>8&1),v.flags&512&&v.wrap&4&&(Ti[0]=pt&255,Ti[1]=pt>>>8&255,v.check=ze(v.check,Ti,2,0)),pt=0,Zt=0,v.mode=xs;case xs:for(;Zt<32;){if(Et===0)break e;Et--,pt+=z[_e++]<<Zt,Zt+=8}v.head&&(v.head.time=pt),v.flags&512&&v.wrap&4&&(Ti[0]=pt&255,Ti[1]=pt>>>8&255,Ti[2]=pt>>>16&255,Ti[3]=pt>>>24&255,v.check=ze(v.check,Ti,4,0)),pt=0,Zt=0,v.mode=Gs;case Gs:for(;Zt<16;){if(Et===0)break e;Et--,pt+=z[_e++]<<Zt,Zt+=8}v.head&&(v.head.xflags=pt&255,v.head.os=pt>>8),v.flags&512&&v.wrap&4&&(Ti[0]=pt&255,Ti[1]=pt>>>8&255,v.check=ze(v.check,Ti,2,0)),pt=0,Zt=0,v.mode=$s;case $s:if(v.flags&1024){for(;Zt<16;){if(Et===0)break e;Et--,pt+=z[_e++]<<Zt,Zt+=8}v.length=pt,v.head&&(v.head.extra_len=pt),v.flags&512&&v.wrap&4&&(Ti[0]=pt&255,Ti[1]=pt>>>8&255,v.check=ze(v.check,Ti,2,0)),pt=0,Zt=0}else v.head&&(v.head.extra=null);v.mode=ia;case ia:if(v.flags&1024&&(Gn=v.length,Gn>Et&&(Gn=Et),Gn&&(v.head&&(ri=v.head.extra_len-v.length,v.head.extra||(v.head.extra=new Uint8Array(v.head.extra_len)),v.head.extra.set(z.subarray(_e,_e+Gn),ri)),v.flags&512&&v.wrap&4&&(v.check=ze(v.check,z,Gn,_e)),Et-=Gn,_e+=Gn,v.length-=Gn),v.length))break e;v.length=0,v.mode=ua;case ua:if(v.flags&2048){if(Et===0)break e;Gn=0;do ri=z[_e+Gn++],v.head&&ri&&v.length<65536&&(v.head.name+=String.fromCharCode(ri));while(ri&&Gn<Et);if(v.flags&512&&v.wrap&4&&(v.check=ze(v.check,z,Gn,_e)),Et-=Gn,_e+=Gn,ri)break e}else v.head&&(v.head.name=null);v.length=0,v.mode=ts;case ts:if(v.flags&4096){if(Et===0)break e;Gn=0;do ri=z[_e+Gn++],v.head&&ri&&v.length<65536&&(v.head.comment+=String.fromCharCode(ri));while(ri&&Gn<Et);if(v.flags&512&&v.wrap&4&&(v.check=ze(v.check,z,Gn,_e)),Et-=Gn,_e+=Gn,ri)break e}else v.head&&(v.head.comment=null);v.mode=Di;case Di:if(v.flags&512){for(;Zt<16;){if(Et===0)break e;Et--,pt+=z[_e++]<<Zt,Zt+=8}if(v.wrap&4&&pt!==(v.check&65535)){l.msg="header crc mismatch",v.mode=ns;break}pt=0,Zt=0}v.head&&(v.head.hcrc=v.flags>>9&1,v.head.done=!0),l.adler=v.check=0,v.mode=ji;break;case $i:for(;Zt<32;){if(Et===0)break e;Et--,pt+=z[_e++]<<Zt,Zt+=8}l.adler=v.check=go(pt),pt=0,Zt=0,v.mode=_s;case _s:if(v.havedict===0)return l.next_out=Pt,l.avail_out=er,l.next_in=_e,l.avail_in=Et,v.hold=pt,v.bits=Zt,Mi;l.adler=v.check=1,v.mode=ji;case ji:if(I===hs||I===os)break e;case Ts:if(v.last){pt>>>=Zt&7,Zt-=Zt&7,v.mode=Ca;break}for(;Zt<3;){if(Et===0)break e;Et--,pt+=z[_e++]<<Zt,Zt+=8}switch(v.last=pt&1,pt>>>=1,Zt-=1,pt&3){case 0:v.mode=gs;break;case 1:if(Sa(v),v.mode=Zs,I===os){pt>>>=2,Zt-=2;break e}break;case 2:v.mode=Fn;break;case 3:l.msg="invalid block type",v.mode=ns}pt>>>=2,Zt-=2;break;case gs:for(pt>>>=Zt&7,Zt-=Zt&7;Zt<32;){if(Et===0)break e;Et--,pt+=z[_e++]<<Zt,Zt+=8}if((pt&65535)!==(pt>>>16^65535)){l.msg="invalid stored block lengths",v.mode=ns;break}if(v.length=pt&65535,pt=0,Zt=0,v.mode=ys,I===os)break e;case ys:v.mode=Ga;case Ga:if(Gn=v.length,Gn){if(Gn>Et&&(Gn=Et),Gn>er&&(Gn=er),Gn===0)break e;ce.set(z.subarray(_e,_e+Gn),Pt),Et-=Gn,_e+=Gn,er-=Gn,Pt+=Gn,v.length-=Gn;break}v.mode=ji;break;case Fn:for(;Zt<14;){if(Et===0)break e;Et--,pt+=z[_e++]<<Zt,Zt+=8}if(v.nlen=(pt&31)+257,pt>>>=5,Zt-=5,v.ndist=(pt&31)+1,pt>>>=5,Zt-=5,v.ncode=(pt&15)+4,pt>>>=4,Zt-=4,v.nlen>286||v.ndist>30){l.msg="too many length or distance symbols",v.mode=ns;break}v.have=0,v.mode=sa;case sa:for(;v.have<v.ncode;){for(;Zt<3;){if(Et===0)break e;Et--,pt+=z[_e++]<<Zt,Zt+=8}v.lens[Wa[v.have++]]=pt&7,pt>>>=3,Zt-=3}for(;v.have<19;)v.lens[Wa[v.have++]]=0;if(v.lencode=v.lendyn,v.lenbits=7,yi={bits:v.lenbits},Xi=vs(cs,v.lens,0,19,v.lencode,0,v.work,yi),v.lenbits=yi.bits,Xi){l.msg="invalid code lengths set",v.mode=ns;break}v.have=0,v.mode=ma;case ma:for(;v.have<v.nlen+v.ndist;){for(;Ei=v.lencode[pt&(1<<v.lenbits)-1],pi=Ei>>>24,Ri=Ei>>>16&255,di=Ei&65535,!(pi<=Zt);){if(Et===0)break e;Et--,pt+=z[_e++]<<Zt,Zt+=8}if(di<16)pt>>>=pi,Zt-=pi,v.lens[v.have++]=di;else{if(di===16){for(ki=pi+2;Zt<ki;){if(Et===0)break e;Et--,pt+=z[_e++]<<Zt,Zt+=8}if(pt>>>=pi,Zt-=pi,v.have===0){l.msg="invalid bit length repeat",v.mode=ns;break}ri=v.lens[v.have-1],Gn=3+(pt&3),pt>>>=2,Zt-=2}else if(di===17){for(ki=pi+3;Zt<ki;){if(Et===0)break e;Et--,pt+=z[_e++]<<Zt,Zt+=8}pt>>>=pi,Zt-=pi,ri=0,Gn=3+(pt&7),pt>>>=3,Zt-=3}else{for(ki=pi+7;Zt<ki;){if(Et===0)break e;Et--,pt+=z[_e++]<<Zt,Zt+=8}pt>>>=pi,Zt-=pi,ri=0,Gn=11+(pt&127),pt>>>=7,Zt-=7}if(v.have+Gn>v.nlen+v.ndist){l.msg="invalid bit length repeat",v.mode=ns;break}for(;Gn--;)v.lens[v.have++]=ri}}if(v.mode===ns)break;if(v.lens[256]===0){l.msg="invalid code -- missing end-of-block",v.mode=ns;break}if(v.lenbits=9,yi={bits:v.lenbits},Xi=vs(Os,v.lens,0,v.nlen,v.lencode,0,v.work,yi),v.lenbits=yi.bits,Xi){l.msg="invalid literal/lengths set",v.mode=ns;break}if(v.distbits=6,v.distcode=v.distdyn,yi={bits:v.distbits},Xi=vs(Ds,v.lens,v.nlen,v.ndist,v.distcode,0,v.work,yi),v.distbits=yi.bits,Xi){l.msg="invalid distances set",v.mode=ns;break}if(v.mode=Zs,I===os)break e;case Zs:v.mode=$a;case $a:if(Et>=6&&er>=258){l.next_out=Pt,l.avail_out=er,l.next_in=_e,l.avail_in=Et,v.hold=pt,v.bits=Zt,Ms(l,Ar),Pt=l.next_out,ce=l.output,er=l.avail_out,_e=l.next_in,z=l.input,Et=l.avail_in,pt=v.hold,Zt=v.bits,v.mode===ji&&(v.back=-1);break}for(v.back=0;Ei=v.lencode[pt&(1<<v.lenbits)-1],pi=Ei>>>24,Ri=Ei>>>16&255,di=Ei&65535,!(pi<=Zt);){if(Et===0)break e;Et--,pt+=z[_e++]<<Zt,Zt+=8}if(Ri&&!(Ri&240)){for(nr=pi,bi=Ri,As=di;Ei=v.lencode[As+((pt&(1<<nr+bi)-1)>>nr)],pi=Ei>>>24,Ri=Ei>>>16&255,di=Ei&65535,!(nr+pi<=Zt);){if(Et===0)break e;Et--,pt+=z[_e++]<<Zt,Zt+=8}pt>>>=nr,Zt-=nr,v.back+=nr}if(pt>>>=pi,Zt-=pi,v.back+=pi,v.length=di,Ri===0){v.mode=Ja;break}if(Ri&32){v.back=-1,v.mode=ji;break}if(Ri&64){l.msg="invalid literal/length code",v.mode=ns;break}v.extra=Ri&15,v.mode=Za;case Za:if(v.extra){for(ki=v.extra;Zt<ki;){if(Et===0)break e;Et--,pt+=z[_e++]<<Zt,Zt+=8}v.length+=pt&(1<<v.extra)-1,pt>>>=v.extra,Zt-=v.extra,v.back+=v.extra}v.was=v.length,v.mode=Xa;case Xa:for(;Ei=v.distcode[pt&(1<<v.distbits)-1],pi=Ei>>>24,Ri=Ei>>>16&255,di=Ei&65535,!(pi<=Zt);){if(Et===0)break e;Et--,pt+=z[_e++]<<Zt,Zt+=8}if(!(Ri&240)){for(nr=pi,bi=Ri,As=di;Ei=v.distcode[As+((pt&(1<<nr+bi)-1)>>nr)],pi=Ei>>>24,Ri=Ei>>>16&255,di=Ei&65535,!(nr+pi<=Zt);){if(Et===0)break e;Et--,pt+=z[_e++]<<Zt,Zt+=8}pt>>>=nr,Zt-=nr,v.back+=nr}if(pt>>>=pi,Zt-=pi,v.back+=pi,Ri&64){l.msg="invalid distance code",v.mode=ns;break}v.offset=di,v.extra=Ri&15,v.mode=co;case co:if(v.extra){for(ki=v.extra;Zt<ki;){if(Et===0)break e;Et--,pt+=z[_e++]<<Zt,Zt+=8}v.offset+=pt&(1<<v.extra)-1,pt>>>=v.extra,Zt-=v.extra,v.back+=v.extra}if(v.offset>v.dmax){l.msg="invalid distance too far back",v.mode=ns;break}v.mode=Uo;case Uo:if(er===0)break e;if(Gn=Ar-er,v.offset>Gn){if(Gn=v.offset-Gn,Gn>v.whave&&v.sane){l.msg="invalid distance too far back",v.mode=ns;break}Gn>v.wnext?(Gn-=v.wnext,zr=v.wsize-Gn):zr=v.wnext-Gn,Gn>v.length&&(Gn=v.length),Yi=v.window}else Yi=ce,zr=Pt-v.offset,Gn=v.length;Gn>er&&(Gn=er),er-=Gn,v.length-=Gn;do ce[Pt++]=Yi[zr++];while(--Gn);v.length===0&&(v.mode=$a);break;case Ja:if(er===0)break e;ce[Pt++]=v.length,er--,v.mode=$a;break;case Ca:if(v.wrap){for(;Zt<32;){if(Et===0)break e;Et--,pt|=z[_e++]<<Zt,Zt+=8}if(Ar-=er,l.total_out+=Ar,v.total+=Ar,v.wrap&4&&Ar&&(l.adler=v.check=v.flags?ze(v.check,ce,Ar,Pt-Ar):sn(v.check,ce,Ar,Pt-Ar)),Ar=er,v.wrap&4&&(v.flags?pt:go(pt))!==v.check){l.msg="incorrect data check",v.mode=ns;break}pt=0,Zt=0}v.mode=Ns;case Ns:if(v.wrap&&v.flags){for(;Zt<32;){if(Et===0)break e;Et--,pt+=z[_e++]<<Zt,Zt+=8}if(v.wrap&4&&pt!==(v.total&4294967295)){l.msg="incorrect length check",v.mode=ns;break}pt=0,Zt=0}v.mode=Va;case Va:Xi=Ai;break e;case ns:Xi=es;break e;case xa:return Wi;case fo:default:return Si}return l.next_out=Pt,l.avail_out=er,l.next_in=_e,l.avail_in=Et,v.hold=pt,v.bits=Zt,(v.wsize||Ar!==l.avail_out&&v.mode<ns&&(v.mode<Ca||I!==Js))&&_a(l,l.output,l.next_out,Ar-l.avail_out),Pr-=l.avail_in,Ar-=l.avail_out,l.total_in+=Pr,l.total_out+=Ar,v.total+=Ar,v.wrap&4&&Ar&&(l.adler=v.check=v.flags?ze(v.check,ce,Ar,l.next_out-Ar):sn(v.check,ce,Ar,l.next_out-Ar)),l.data_type=v.bits+(v.last?64:0)+(v.mode===ji?128:0)+(v.mode===Zs||v.mode===ys?256:0),(Pr===0&&Ar===0||I===Js)&&Xi===oi&&(Xi=Rs),Xi},Ia=l=>{if(ca(l))return Si;let I=l.state;return I.window&&(I.window=null),l.state=null,oi},po=(l,I)=>{if(ca(l))return Si;const v=l.state;return v.wrap&2?(v.head=I,I.done=!1,oi):Si},Al=(l,I)=>{const v=I.length;let z,ce,_e;return ca(l)||(z=l.state,z.wrap!==0&&z.mode!==_s)?Si:z.mode===_s&&(ce=1,ce=sn(ce,I,v,0),ce!==z.check)?es:(_e=_a(l,I,v,v),_e?(z.mode=xa,Wi):(z.havedict=1,oi))};var ll=Ua,ul=za,cl=La,ko=Ci,fl=wi,dl=Ta,xA=Ia,Oo=po,hl=Al,Po="pako inflate (from Nodeca project)",qs={inflateReset:ll,inflateReset2:ul,inflateResetKeep:cl,inflateInit:ko,inflateInit2:fl,inflate:dl,inflateEnd:xA,inflateGetHeader:Oo,inflateSetDictionary:hl,inflateInfo:Po};function gl(){this.text=0,this.time=0,this.xflags=0,this.os=0,this.extra=null,this.extra_len=0,this.name="",this.comment="",this.hcrc=0,this.done=!1}var iA=gl;const Vs=Object.prototype.toString,{Z_NO_FLUSH:ya,Z_FINISH:sA,Z_OK:mo,Z_STREAM_END:Fa,Z_NEED_DICT:aA,Z_STREAM_ERROR:pl,Z_DATA_ERROR:SA,Z_MEM_ERROR:ml}=me;function no(l){this.options=Ur.assign({chunkSize:1024*64,windowBits:15,to:""},l||{});const I=this.options;I.raw&&I.windowBits>=0&&I.windowBits<16&&(I.windowBits=-I.windowBits,I.windowBits===0&&(I.windowBits=-15)),I.windowBits>=0&&I.windowBits<16&&!(l&&l.windowBits)&&(I.windowBits+=32),I.windowBits>15&&I.windowBits<48&&(I.windowBits&15||(I.windowBits|=15)),this.err=0,this.msg="",this.ended=!1,this.chunks=[],this.strm=new ci,this.strm.avail_out=0;let v=qs.inflateInit2(this.strm,I.windowBits);if(v!==mo)throw new Error(ne[v]);if(this.header=new iA,qs.inflateGetHeader(this.strm,this.header),I.dictionary&&(typeof I.dictionary=="string"?I.dictionary=zi.string2buf(I.dictionary):Vs.call(I.dictionary)==="[object ArrayBuffer]"&&(I.dictionary=new Uint8Array(I.dictionary)),I.raw&&(v=qs.inflateSetDictionary(this.strm,I.dictionary),v!==mo)))throw new Error(ne[v])}no.prototype.push=function(l,I){const v=this.strm,z=this.options.chunkSize,ce=this.options.dictionary;let _e,Pt,Et;if(this.ended)return!1;for(I===~~I?Pt=I:Pt=I===!0?sA:ya,Vs.call(l)==="[object ArrayBuffer]"?v.input=new Uint8Array(l):v.input=l,v.next_in=0,v.avail_in=v.input.length;;){for(v.avail_out===0&&(v.output=new Uint8Array(z),v.next_out=0,v.avail_out=z),_e=qs.inflate(v,Pt),_e===aA&&ce&&(_e=qs.inflateSetDictionary(v,ce),_e===mo?_e=qs.inflate(v,Pt):_e===SA&&(_e=aA));v.avail_in>0&&_e===Fa&&v.state.wrap>0&&l[v.next_in]!==0;)qs.inflateReset(v),_e=qs.inflate(v,Pt);switch(_e){case pl:case SA:case aA:case ml:return this.onEnd(_e),this.ended=!0,!1}if(Et=v.avail_out,v.next_out&&(v.avail_out===0||_e===Fa))if(this.options.to==="string"){let er=zi.utf8border(v.output,v.next_out),pt=v.next_out-er,Zt=zi.buf2string(v.output,er);v.next_out=pt,v.avail_out=z-pt,pt&&v.output.set(v.output.subarray(er,er+pt),0),this.onData(Zt)}else this.onData(v.output.length===v.next_out?v.output:v.output.subarray(0,v.next_out));if(!(_e===mo&&Et===0)){if(_e===Fa)return _e=qs.inflateEnd(this.strm),this.onEnd(_e),this.ended=!0,!0;if(v.avail_in===0)break}}return!0},no.prototype.onData=function(l){this.chunks.push(l)},no.prototype.onEnd=function(l){l===mo&&(this.options.to==="string"?this.result=this.chunks.join(""):this.result=Ur.flattenChunks(this.chunks)),this.chunks=[],this.err=l,this.msg=this.strm.msg};function Mo(l,I){const v=new no(I);if(v.push(l),v.err)throw v.msg||ne[v.err];return v.result}function oA(l,I){return I=I||{},I.raw=!0,Mo(l,I)}var TA=no,vl=Mo,IA=oA,_l=Mo,FA=me,DA={Inflate:TA,inflate:vl,inflateRaw:IA,ungzip:_l,constants:FA};const{Deflate:RA,deflate:yl,deflateRaw:wl,gzip:vo}=ls,{Inflate:LA,inflate:El,inflateRaw:AA,ungzip:_o}=DA;var Bl=RA,bl=yl,Us=wl,ka=vo,yo=LA,UA=El,Cl=AA,Cs=_o,lA=me,wo={Deflate:Bl,deflate:bl,deflateRaw:Us,gzip:ka,Inflate:yo,inflate:UA,inflateRaw:Cl,ungzip:Cs,constants:lA};const kA=[];for(let l=0;l<256;l++){let I=l;for(let v=0;v<8;v++)I&1?I=3988292384^I>>>1:I=I>>>1;kA[l]=I}const Da=4294967295;function tn(l,I,v){let z=l;for(let ce=0;ce<v;ce++)z=kA[(z^I[ce])&255]^z>>>8;return z}function Qo(l,I){return(tn(Da,l,I)^Da)>>>0}function No(l,I,v){const z=l.readUint32(),ce=Qo(new Uint8Array(l.buffer,l.byteOffset+l.offset-I-4,I),I);if(ce!==z)throw new Error(`CRC mismatch for chunk ${v}. Expected ${z}, found ${ce}`)}function jl(l,I){l.writeUint32(Qo(new Uint8Array(l.buffer,l.byteOffset+l.offset-I,I),I))}function ro(l,I,v){for(let z=0;z<v;z++)I[z]=l[z]}function OA(l,I,v,z){let ce=0;for(;ce<z;ce++)I[ce]=l[ce];for(;ce<v;ce++)I[ce]=l[ce]+I[ce-z]&255}function PA(l,I,v,z){let ce=0;if(v.length===0)for(;ce<z;ce++)I[ce]=l[ce];else for(;ce<z;ce++)I[ce]=l[ce]+v[ce]&255}function MA(l,I,v,z,ce){let _e=0;if(v.length===0){for(;_e<ce;_e++)I[_e]=l[_e];for(;_e<z;_e++)I[_e]=l[_e]+(I[_e-ce]>>1)&255}else{for(;_e<ce;_e++)I[_e]=l[_e]+(v[_e]>>1)&255;for(;_e<z;_e++)I[_e]=l[_e]+(I[_e-ce]+v[_e]>>1)&255}}function uA(l,I,v,z,ce){let _e=0;if(v.length===0){for(;_e<ce;_e++)I[_e]=l[_e];for(;_e<z;_e++)I[_e]=l[_e]+I[_e-ce]&255}else{for(;_e<ce;_e++)I[_e]=l[_e]+v[_e]&255;for(;_e<z;_e++)I[_e]=l[_e]+Mr(I[_e-ce],v[_e],v[_e-ce])&255}}function Mr(l,I,v){const z=l+I-v,ce=Math.abs(z-l),_e=Math.abs(z-I),Pt=Math.abs(z-v);return ce<=_e&&ce<=Pt?l:_e<=Pt?I:v}function io(l,I,v,z,ce,_e){switch(l){case 0:ro(I,v,ce);break;case 1:OA(I,v,ce,_e);break;case 2:PA(I,v,z,ce);break;case 3:MA(I,v,z,ce,_e);break;case 4:uA(I,v,z,ce,_e);break;default:throw new Error(`Unsupported filter: ${l}`)}}const cA=new Uint16Array([255]),ea=new Uint8Array(cA.buffer)[0]===255;function aa(l){const{data:I,width:v,height:z,channels:ce,depth:_e}=l,Pt=[{x:0,y:0,xStep:8,yStep:8},{x:4,y:0,xStep:8,yStep:8},{x:0,y:4,xStep:4,yStep:8},{x:2,y:0,xStep:4,yStep:4},{x:0,y:2,xStep:2,yStep:4},{x:1,y:0,xStep:2,yStep:2},{x:0,y:1,xStep:1,yStep:2}],Et=Math.ceil(_e/8)*ce,er=new Uint8Array(z*v*Et);let pt=0;for(let Zt=0;Zt<7;Zt++){const Pr=Pt[Zt],Ar=Math.ceil((v-Pr.x)/Pr.xStep),Gn=Math.ceil((z-Pr.y)/Pr.yStep);if(Ar<=0||Gn<=0)continue;const zr=Ar*Et,Yi=new Uint8Array(zr);for(let Ei=0;Ei<Gn;Ei++){const pi=I[pt++],Ri=I.subarray(pt,pt+zr);pt+=zr;const di=new Uint8Array(zr);io(pi,Ri,di,Yi,zr,Et),Yi.set(di);for(let nr=0;nr<Ar;nr++){const bi=Pr.x+nr*Pr.xStep,As=Pr.y+Ei*Pr.yStep;if(!(bi>=v||As>=z))for(let ri=0;ri<Et;ri++)er[(As*v+bi)*Et+ri]=di[nr*Et+ri]}}}if(_e===16){const Zt=new Uint16Array(er.buffer);if(ea)for(let Pr=0;Pr<Zt.length;Pr++)Zt[Pr]=QA(Zt[Pr]);return Zt}else return er}function QA(l){return(l&255)<<8|l>>8&255}const so=new Uint16Array([255]),xl=new Uint8Array(so.buffer)[0]===255,Ko=new Uint8Array(0);function NA(l){const{data:I,width:v,height:z,channels:ce,depth:_e}=l,Pt=Math.ceil(_e/8)*ce,Et=Math.ceil(_e/8*ce*v),er=new Uint8Array(z*Et);let pt=Ko,Zt=0,Pr,Ar;for(let Gn=0;Gn<z;Gn++){switch(Pr=I.subarray(Zt+1,Zt+1+Et),Ar=er.subarray(Gn*Et,(Gn+1)*Et),I[Zt]){case 0:ro(Pr,Ar,Et);break;case 1:OA(Pr,Ar,Et,Pt);break;case 2:PA(Pr,Ar,pt,Et);break;case 3:MA(Pr,Ar,pt,Et,Pt);break;case 4:uA(Pr,Ar,pt,Et,Pt);break;default:throw new Error(`Unsupported filter: ${I[Zt]}`)}pt=Ar,Zt+=Et+1}if(_e===16){const Gn=new Uint16Array(er.buffer);if(xl)for(let zr=0;zr<Gn.length;zr++)Gn[zr]=Oa(Gn[zr]);return Gn}else return er}function Oa(l){return(l&255)<<8|l>>8&255}const Hs=Uint8Array.of(137,80,78,71,13,10,26,10);function Eo(l){l.writeBytes(Hs)}function dA(l){if(!HA(l.readBytes(Hs.length)))throw new Error("wrong PNG signature")}function HA(l){if(l.length<Hs.length)return!1;for(let I=0;I<Hs.length;I++)if(l[I]!==Hs[I])return!1;return!0}const Go="tEXt",Pa=0,KA=new TextDecoder("latin1");function GA(l){if(hA(l),l.length===0||l.length>79)throw new Error("keyword length must be between 1 and 79")}const $A=/^[\u0000-\u00FF]*$/;function hA(l){if(!$A.test(l))throw new Error("invalid latin1 text")}function ZA(l,I,v){const z=$o(I);l[z]=VA(I,v-z.length-1)}function Yl(l,I,v){GA(I),hA(v);const z=I.length+1+v.length;l.writeUint32(z),l.writeChars(Go),l.writeChars(I),l.writeByte(Pa),l.writeChars(v),writeCrc(l,z+4)}function $o(l){for(l.mark();l.readByte()!==Pa;);const I=l.offset;l.reset();const v=KA.decode(l.readBytes(I-l.offset-1));return l.skip(1),GA(v),v}function VA(l,I){return KA.decode(l.readBytes(I))}const ks={UNKNOWN:-1,GREYSCALE:0,TRUECOLOUR:2,INDEXED_COLOUR:3,GREYSCALE_ALPHA:4,TRUECOLOUR_ALPHA:6},Bo={UNKNOWN:-1,DEFLATE:0},zA={UNKNOWN:-1,ADAPTIVE:0},gA={UNKNOWN:-1,NO_INTERLACE:0,ADAM7:1},ao={NONE:0,BACKGROUND:1,PREVIOUS:2},Zo={SOURCE:0,OVER:1};class Vo extends ye{constructor(v,z={}){super(v);qi(this,"_checkCrc");qi(this,"_inflator");qi(this,"_png");qi(this,"_apng");qi(this,"_end");qi(this,"_hasPalette");qi(this,"_palette");qi(this,"_hasTransparency");qi(this,"_transparency");qi(this,"_compressionMethod");qi(this,"_filterMethod");qi(this,"_interlaceMethod");qi(this,"_colorType");qi(this,"_isAnimated");qi(this,"_numberOfFrames");qi(this,"_numberOfPlays");qi(this,"_frames");qi(this,"_writingDataChunks");const{checkCrc:ce=!1}=z;this._checkCrc=ce,this._inflator=new yo,this._png={width:-1,height:-1,channels:-1,data:new Uint8Array(0),depth:1,text:{}},this._apng={width:-1,height:-1,channels:-1,depth:1,numberOfFrames:1,numberOfPlays:0,text:{},frames:[]},this._end=!1,this._hasPalette=!1,this._palette=[],this._hasTransparency=!1,this._transparency=new Uint16Array(0),this._compressionMethod=Bo.UNKNOWN,this._filterMethod=zA.UNKNOWN,this._interlaceMethod=gA.UNKNOWN,this._colorType=ks.UNKNOWN,this._isAnimated=!1,this._numberOfFrames=1,this._numberOfPlays=0,this._frames=[],this._writingDataChunks=!1,this.setBigEndian()}decode(){for(dA(this);!this._end;){const v=this.readUint32(),z=this.readChars(4);this.decodeChunk(v,z)}return this.decodeImage(),this._png}decodeApng(){for(dA(this);!this._end;){const v=this.readUint32(),z=this.readChars(4);this.decodeApngChunk(v,z)}return this.decodeApngImage(),this._apng}decodeChunk(v,z){const ce=this.offset;switch(z){case"IHDR":this.decodeIHDR();break;case"PLTE":this.decodePLTE(v);break;case"IDAT":this.decodeIDAT(v);break;case"IEND":this._end=!0;break;case"tRNS":this.decodetRNS(v);break;case"iCCP":this.decodeiCCP(v);break;case Go:ZA(this._png.text,this,v);break;case"pHYs":this.decodepHYs();break;default:this.skip(v);break}if(this.offset-ce!==v)throw new Error(`Length mismatch while decoding chunk ${z}`);this._checkCrc?No(this,v+4,z):this.skip(4)}decodeApngChunk(v,z){const ce=this.offset;switch(z!=="fdAT"&&z!=="IDAT"&&this._writingDataChunks&&this.pushDataToFrame(),z){case"acTL":this.decodeACTL();break;case"fcTL":this.decodeFCTL();break;case"fdAT":this.decodeFDAT(v);break;default:this.decodeChunk(v,z),this.offset=ce+v;break}if(this.offset-ce!==v)throw new Error(`Length mismatch while decoding chunk ${z}`);this._checkCrc?No(this,v+4,z):this.skip(4)}decodeIHDR(){const v=this._png;v.width=this.readUint32(),v.height=this.readUint32(),v.depth=Sl(this.readUint8());const z=this.readUint8();this._colorType=z;let ce;switch(z){case ks.GREYSCALE:ce=1;break;case ks.TRUECOLOUR:ce=3;break;case ks.INDEXED_COLOUR:ce=1;break;case ks.GREYSCALE_ALPHA:ce=2;break;case ks.TRUECOLOUR_ALPHA:ce=4;break;case ks.UNKNOWN:default:throw new Error(`Unknown color type: ${z}`)}if(this._png.channels=ce,this._compressionMethod=this.readUint8(),this._compressionMethod!==Bo.DEFLATE)throw new Error(`Unsupported compression method: ${this._compressionMethod}`);this._filterMethod=this.readUint8(),this._interlaceMethod=this.readUint8()}decodeACTL(){this._numberOfFrames=this.readUint32(),this._numberOfPlays=this.readUint32(),this._isAnimated=!0}decodeFCTL(){const v={sequenceNumber:this.readUint32(),width:this.readUint32(),height:this.readUint32(),xOffset:this.readUint32(),yOffset:this.readUint32(),delayNumber:this.readUint16(),delayDenominator:this.readUint16(),disposeOp:this.readUint8(),blendOp:this.readUint8(),data:new Uint8Array(0)};this._frames.push(v)}decodePLTE(v){if(v%3!==0)throw new RangeError(`PLTE field length must be a multiple of 3. Got ${v}`);const z=v/3;this._hasPalette=!0;const ce=[];this._palette=ce;for(let _e=0;_e<z;_e++)ce.push([this.readUint8(),this.readUint8(),this.readUint8()])}decodeIDAT(v){this._writingDataChunks=!0;const z=v,ce=this.offset+this.byteOffset;if(this._inflator.push(new Uint8Array(this.buffer,ce,z)),this._inflator.err)throw new Error(`Error while decompressing the data: ${this._inflator.err}`);this.skip(v)}decodeFDAT(v){this._writingDataChunks=!0;let z=v,ce=this.offset+this.byteOffset;if(ce+=4,z-=4,this._inflator.push(new Uint8Array(this.buffer,ce,z)),this._inflator.err)throw new Error(`Error while decompressing the data: ${this._inflator.err}`);this.skip(v)}decodetRNS(v){switch(this._colorType){case ks.GREYSCALE:case ks.TRUECOLOUR:{if(v%2!==0)throw new RangeError(`tRNS chunk length must be a multiple of 2. Got ${v}`);if(v/2>this._png.width*this._png.height)throw new Error(`tRNS chunk contains more alpha values than there are pixels (${v/2} vs ${this._png.width*this._png.height})`);this._hasTransparency=!0,this._transparency=new Uint16Array(v/2);for(let z=0;z<v/2;z++)this._transparency[z]=this.readUint16();break}case ks.INDEXED_COLOUR:{if(v>this._palette.length)throw new Error(`tRNS chunk contains more alpha values than there are palette colors (${v} vs ${this._palette.length})`);let z=0;for(;z<v;z++){const ce=this.readByte();this._palette[z].push(ce)}for(;z<this._palette.length;z++)this._palette[z].push(255);break}case ks.UNKNOWN:case ks.GREYSCALE_ALPHA:case ks.TRUECOLOUR_ALPHA:default:throw new Error(`tRNS chunk is not supported for color type ${this._colorType}`)}}decodeiCCP(v){const z=$o(this),ce=this.readUint8();if(ce!==Bo.DEFLATE)throw new Error(`Unsupported iCCP compression method: ${ce}`);const _e=this.readBytes(v-z.length-2);this._png.iccEmbeddedProfile={name:z,profile:UA(_e)}}decodepHYs(){const v=this.readUint32(),z=this.readUint32(),ce=this.readByte();this._png.resolution={x:v,y:z,unit:ce}}decodeApngImage(){this._apng.width=this._png.width,this._apng.height=this._png.height,this._apng.channels=this._png.channels,this._apng.depth=this._png.depth,this._apng.numberOfFrames=this._numberOfFrames,this._apng.numberOfPlays=this._numberOfPlays,this._apng.text=this._png.text,this._apng.resolution=this._png.resolution;for(let v=0;v<this._numberOfFrames;v++){const z={sequenceNumber:this._frames[v].sequenceNumber,delayNumber:this._frames[v].delayNumber,delayDenominator:this._frames[v].delayDenominator,data:this._apng.depth===8?new Uint8Array(this._apng.width*this._apng.height*this._apng.channels):new Uint16Array(this._apng.width*this._apng.height*this._apng.channels)},ce=this._frames.at(v);if(ce){if(ce.data=NA({data:ce.data,width:ce.width,height:ce.height,channels:this._apng.channels,depth:this._apng.depth}),this._hasPalette&&(this._apng.palette=this._palette),this._hasTransparency&&(this._apng.transparency=this._transparency),v===0||ce.xOffset===0&&ce.yOffset===0&&ce.width===this._png.width&&ce.height===this._png.height)z.data=ce.data;else{const _e=this._apng.frames.at(v-1);this.disposeFrame(ce,_e,z),this.addFrameDataToCanvas(z,ce)}this._apng.frames.push(z)}}return this._apng}disposeFrame(v,z,ce){switch(v.disposeOp){case ao.NONE:break;case ao.BACKGROUND:for(let _e=0;_e<this._png.height;_e++)for(let Pt=0;Pt<this._png.width;Pt++){const Et=(_e*v.width+Pt)*this._png.channels;for(let er=0;er<this._png.channels;er++)ce.data[Et+er]=0}break;case ao.PREVIOUS:ce.data.set(z.data);break;default:throw new Error("Unknown disposeOp")}}addFrameDataToCanvas(v,z){const ce=1<<this._png.depth,_e=(Pt,Et)=>{const er=((Pt+z.yOffset)*this._png.width+z.xOffset+Et)*this._png.channels,pt=(Pt*z.width+Et)*this._png.channels;return{index:er,frameIndex:pt}};switch(z.blendOp){case Zo.SOURCE:for(let Pt=0;Pt<z.height;Pt++)for(let Et=0;Et<z.width;Et++){const{index:er,frameIndex:pt}=_e(Pt,Et);for(let Zt=0;Zt<this._png.channels;Zt++)v.data[er+Zt]=z.data[pt+Zt]}break;case Zo.OVER:for(let Pt=0;Pt<z.height;Pt++)for(let Et=0;Et<z.width;Et++){const{index:er,frameIndex:pt}=_e(Pt,Et);for(let Zt=0;Zt<this._png.channels;Zt++){const Pr=z.data[pt+this._png.channels-1]/ce,Ar=Zt%(this._png.channels-1)===0?1:z.data[pt+Zt],Gn=Math.floor(Pr*Ar+(1-Pr)*v.data[er+Zt]);v.data[er+Zt]+=Gn}}break;default:throw new Error("Unknown blendOp")}}decodeImage(){var z;if(this._inflator.err)throw new Error(`Error while decompressing the data: ${this._inflator.err}`);const v=this._isAnimated?((z=this._frames)==null?void 0:z.at(0)).data:this._inflator.result;if(this._filterMethod!==zA.ADAPTIVE)throw new Error(`Filter method ${this._filterMethod} not supported`);if(this._interlaceMethod===gA.NO_INTERLACE)this._png.data=NA({data:v,width:this._png.width,height:this._png.height,channels:this._png.channels,depth:this._png.depth});else if(this._interlaceMethod===gA.ADAM7)this._png.data=aa({data:v,width:this._png.width,height:this._png.height,channels:this._png.channels,depth:this._png.depth});else throw new Error(`Interlace method ${this._interlaceMethod} not supported`);this._hasPalette&&(this._png.palette=this._palette),this._hasTransparency&&(this._png.transparency=this._transparency)}pushDataToFrame(){const v=this._inflator.result,z=this._frames.at(-1);z?z.data=v:this._frames.push({sequenceNumber:0,width:this._png.width,height:this._png.height,xOffset:0,yOffset:0,delayNumber:0,delayDenominator:0,disposeOp:ao.NONE,blendOp:Zo.SOURCE,data:v}),this._inflator=new yo,this._writingDataChunks=!1}}function Sl(l){if(l!==1&&l!==2&&l!==4&&l!==8&&l!==16)throw new Error(`invalid bit depth: ${l}`);return l}const zo={level:3};class WA extends null{constructor(v,z={}){var ce;super();qi(this,"_png");qi(this,"_zlibOptions");qi(this,"_colorType");qi(this,"_interlaceMethod");this._colorType=ColorType.UNKNOWN,this._zlibOptions=Tc(Tc({},zo),z.zlib),this._png=this._checkData(v),this._interlaceMethod=(ce=z.interlace==="Adam7"?InterlaceMethod.ADAM7:InterlaceMethod.NO_INTERLACE)!=null?ce:InterlaceMethod.NO_INTERLACE,this.setBigEndian()}encode(){if(writeSignature(this),this.encodeIHDR(),this._png.palette&&(this.encodePLTE(),this._png.palette[0].length===4&&this.encodeTRNS()),this.encodeData(),this._png.text)for(const[v,z]of Object.entries(this._png.text))encodetEXt(this,v,z);return this.encodeIEND(),this.toArray()}encodeIHDR(){this.writeUint32(13),this.writeChars("IHDR"),this.writeUint32(this._png.width),this.writeUint32(this._png.height),this.writeByte(this._png.depth),this.writeByte(this._colorType),this.writeByte(CompressionMethod.DEFLATE),this.writeByte(FilterMethod.ADAPTIVE),this.writeByte(this._interlaceMethod),writeCrc(this,17)}encodeIEND(){this.writeUint32(0),this.writeChars("IEND"),writeCrc(this,4)}encodePLTE(){var z;const v=((z=this._png.palette)==null?void 0:z.length)*3;this.writeUint32(v),this.writeChars("PLTE");for(const ce of this._png.palette)this.writeByte(ce[0]),this.writeByte(ce[1]),this.writeByte(ce[2]);writeCrc(this,4+v)}encodeTRNS(){const v=this._png.palette.filter(z=>z.at(-1)!==255);this.writeUint32(v.length),this.writeChars("tRNS");for(const z of v)this.writeByte(z.at(-1));writeCrc(this,4+v.length)}encodeIDAT(v){this.writeUint32(v.length),this.writeChars("IDAT"),this.writeBytes(v),writeCrc(this,v.length+4)}encodeData(){const{width:v,height:z,channels:ce,depth:_e,data:Pt}=this._png,Et=_e<=8?Math.ceil(v*_e/8)*ce:Math.ceil(v*_e/8*ce/2),er=new IOBuffer().setBigEndian();let pt=0;if(this._interlaceMethod===InterlaceMethod.NO_INTERLACE)for(let Ar=0;Ar<z;Ar++)er.writeByte(0),_e===16?pt=jA(Pt,er,Et,pt):pt=Xl(Pt,er,Et,pt);else this._interlaceMethod===InterlaceMethod.ADAM7&&(pt=Ks(this._png,Pt,er,pt));const Zt=er.toArray(),Pr=deflate(Zt,this._zlibOptions);this.encodeIDAT(Pr)}_checkData(v){const{colorType:z,channels:ce,depth:_e}=Wo(v,v.palette),Pt={width:bo(v.width,"width"),height:bo(v.height,"height"),channels:ce,data:v.data,depth:_e,text:v.text,palette:v.palette};this._colorType=z;const Et=_e<8?Math.ceil(Pt.width*_e/8)*Pt.height*ce:Pt.width*Pt.height*ce;if(Pt.data.length!==Et)throw new RangeError(`wrong data size. Found ${Pt.data.length}, expected ${Et}`);return Pt}}function bo(l,I){if(Number.isInteger(l)&&l>0)return l;throw new TypeError(`${I} must be a positive integer`)}function Wo(l,I){const{channels:v=4,depth:z=8}=l;if(v!==4&&v!==3&&v!==2&&v!==1)throw new RangeError(`unsupported number of channels: ${v}`);const ce={channels:v,depth:z,colorType:ColorType.UNKNOWN};switch(v){case 4:ce.colorType=ColorType.TRUECOLOUR_ALPHA;break;case 3:ce.colorType=ColorType.TRUECOLOUR;break;case 1:I?ce.colorType=ColorType.INDEXED_COLOUR:ce.colorType=ColorType.GREYSCALE;break;case 2:ce.colorType=ColorType.GREYSCALE_ALPHA;break;default:throw new Error("unsupported number of channels")}return ce}function Xl(l,I,v,z){for(let ce=0;ce<v;ce++)I.writeByte(l[z++]);return z}function Ks(l,I,v,z){const ce=[{x:0,y:0,xStep:8,yStep:8},{x:4,y:0,xStep:8,yStep:8},{x:0,y:4,xStep:4,yStep:8},{x:2,y:0,xStep:4,yStep:4},{x:0,y:2,xStep:2,yStep:4},{x:1,y:0,xStep:2,yStep:2},{x:0,y:1,xStep:1,yStep:2}],{width:_e,height:Pt,channels:Et,depth:er}=l;let pt=0;er===16?pt=Et*er/8/2:pt=Et*er/8;for(let Zt=0;Zt<7;Zt++){const Pr=ce[Zt],Ar=Math.floor((_e-Pr.x+Pr.xStep-1)/Pr.xStep),Gn=Math.floor((Pt-Pr.y+Pr.yStep-1)/Pr.yStep);if(Ar<=0||Gn<=0)continue;const zr=Ar*pt;for(let Yi=0;Yi<Gn;Yi++){const Ei=Pr.y+Yi*Pr.yStep,pi=er<=8?new Uint8Array(zr):new Uint16Array(zr);let Ri=0;for(let di=0;di<Ar;di++){const nr=Pr.x+di*Pr.xStep;if(nr<_e&&Ei<Pt){const bi=(Ei*_e+nr)*pt;for(let As=0;As<pt;As++)pi[Ri++]=I[bi+As]}}if(v.writeByte(0),er===8)v.writeBytes(pi);else if(er===16)for(const di of pi)v.writeByte(di>>8&255),v.writeByte(di&255)}}return z}function jA(l,I,v,z){for(let ce=0;ce<v;ce++)I.writeUint16(l[z++]);return z}var jo;(function(l){l[l.UNKNOWN=0]="UNKNOWN",l[l.METRE=1]="METRE"})(jo||(jo={}));function fa(l,I){return new Vo(l,I).decode()}function Tl(l,I){return new PngEncoder(l,I).encode()}function Il(l,I){return new PngDecoder(l,I).decodeApng()}},6330:function(Vn,ct,x){"use strict";x.d(ct,{iZ:function(){return lr}});var V={},fe=function(Q,K,Ee,Le,st){var rt=new Worker(V[K]||(V[K]=URL.createObjectURL(new Blob([Q+';addEventListener("error",function(e){e=e.error;postMessage({$e$:[e.message,e.code,e.stack]})})'],{type:"text/javascript"}))));return rt.onmessage=function(Ft){var Ht=Ft.data,an=Ht.$e$;if(an){var Xt=new Error(an[0]);Xt.code=an[1],Xt.stack=an[2],st(Xt,null)}else st(null,Ht)},rt.postMessage(Ee,Le),rt},Ce=Uint8Array,ge=Uint16Array,G=Int32Array,g=new Ce([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]),ye=new Ce([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]),le=new Ce([16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15]),o=function(Q,K){for(var Ee=new ge(31),Le=0;Le<31;++Le)Ee[Le]=K+=1<<Q[Le-1];for(var st=new G(Ee[30]),Le=1;Le<30;++Le)for(var rt=Ee[Le];rt<Ee[Le+1];++rt)st[rt]=rt-Ee[Le]<<5|Le;return{b:Ee,r:st}},S=o(g,2),U=S.b,_=S.r;U[28]=258,_[258]=28;for(var w=o(ye,0),b=w.b,R=w.r,M=new ge(32768),H=0;H<32768;++H){var J=(H&43690)>>1|(H&21845)<<1;J=(J&52428)>>2|(J&13107)<<2,J=(J&61680)>>4|(J&3855)<<4,M[H]=((J&65280)>>8|(J&255)<<8)>>1}for(var T=function(Q,K,Ee){for(var Le=Q.length,st=0,rt=new ge(K);st<Le;++st)Q[st]&&++rt[Q[st]-1];var Ft=new ge(K);for(st=1;st<K;++st)Ft[st]=Ft[st-1]+rt[st-1]<<1;var Ht;if(Ee){Ht=new ge(1<<K);var an=15-K;for(st=0;st<Le;++st)if(Q[st])for(var Xt=st<<4|Q[st],Kt=K-Q[st],en=Ft[Q[st]-1]++<<Kt,pe=en|(1<<Kt)-1;en<=pe;++en)Ht[M[en]>>an]=Xt}else for(Ht=new ge(Le),st=0;st<Le;++st)Q[st]&&(Ht[st]=M[Ft[Q[st]-1]++]>>15-Q[st]);return Ht},N=new Ce(288),H=0;H<144;++H)N[H]=8;for(var H=144;H<256;++H)N[H]=9;for(var H=256;H<280;++H)N[H]=7;for(var H=280;H<288;++H)N[H]=8;for(var P=new Ce(32),H=0;H<32;++H)P[H]=5;var k=T(N,9,0),oe=null,de=T(P,5,0),ie=null,ae=function(Q){for(var K=Q[0],Ee=1;Ee<Q.length;++Ee)Q[Ee]>K&&(K=Q[Ee]);return K},we=function(Q,K,Ee){var Le=K/8|0;return(Q[Le]|Q[Le+1]<<8)>>(K&7)&Ee},Te=function(Q,K){var Ee=K/8|0;return(Q[Ee]|Q[Ee+1]<<8|Q[Ee+2]<<16)>>(K&7)},Re=function(Q){return(Q+7)/8|0},Y=function(Q,K,Ee){return(K==null||K<0)&&(K=0),(Ee==null||Ee>Q.length)&&(Ee=Q.length),new Ce(Q.subarray(K,Ee))},$={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},te=["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"],q=function(Q,K,Ee){var Le=new Error(K||te[Q]);if(Le.code=Q,Error.captureStackTrace&&Error.captureStackTrace(Le,q),!Ee)throw Le;return Le},he=function(Q,K,Ee,Le){var st=Q.length,rt=Le?Le.length:0;if(!st||K.f&&!K.l)return Ee||new Ce(0);var Ft=!Ee,Ht=Ft||K.i!=2,an=K.i;Ft&&(Ee=new Ce(st*3));var Xt=function(Ur){var or=Ee.length;if(Ur>or){var hi=new Ce(Math.max(or*2,Ur));hi.set(Ee),Ee=hi}},Kt=K.f||0,en=K.p||0,pe=K.b||0,Ye=K.l,Ge=K.d,et=K.m,lt=K.n,dt=st*8;do{if(!Ye){Kt=we(Q,en,1);var jt=we(Q,en+1,3);if(en+=3,jt)if(jt==1)Ye=oe,Ge=ie,et=9,lt=5;else if(jt==2){var At=we(Q,en,31)+257,Bt=we(Q,en+10,15)+4,mt=At+we(Q,en+5,31)+1;en+=14;for(var bt=new Ce(mt),An=new Ce(19),En=0;En<Bt;++En)An[le[En]]=we(Q,en+En*3,7);en+=Bt*3;for(var In=ae(An),jn=(1<<In)-1,tr=T(An,In,1),En=0;En<mt;){var Yn=tr[we(Q,en,jn)];en+=Yn&15;var Nt=Yn>>4;if(Nt<16)bt[En++]=Nt;else{var ar=0,Pn=0;for(Nt==16?(Pn=3+we(Q,en,3),en+=2,ar=bt[En-1]):Nt==17?(Pn=3+we(Q,en,7),en+=3):Nt==18&&(Pn=11+we(Q,en,127),en+=7);Pn--;)bt[En++]=ar}}var yr=bt.subarray(0,At),ir=bt.subarray(At);et=ae(yr),lt=ae(ir),Ye=T(yr,et,1),Ge=T(ir,lt,1)}else q(1);else{var Nt=Re(en)+4,wt=Q[Nt-4]|Q[Nt-3]<<8,Je=Nt+wt;if(Je>st){an&&q(0);break}Ht&&Xt(pe+wt),Ee.set(Q.subarray(Nt,Je),pe),K.b=pe+=wt,K.p=en=Je*8,K.f=Kt;continue}if(en>dt){an&&q(0);break}}Ht&&Xt(pe+131072);for(var Kr=(1<<et)-1,fr=(1<<lt)-1,hr=en;;hr=en){var ar=Ye[Te(Q,en)&Kr],Tr=ar>>4;if(en+=ar&15,en>dt){an&&q(0);break}if(ar||q(2),Tr<256)Ee[pe++]=Tr;else if(Tr==256){hr=en,Ye=null;break}else{var kn=Tr-254;if(Tr>264){var En=Tr-257,pr=g[En];kn=we(Q,en,(1<<pr)-1)+U[En],en+=pr}var cr=Ge[Te(Q,en)&fr],Wn=cr>>4;cr||q(3),en+=cr&15;var ir=b[Wn];if(Wn>3){var pr=ye[Wn];ir+=Te(Q,en)&(1<<pr)-1,en+=pr}if(en>dt){an&&q(0);break}Ht&&Xt(pe+131072);var ur=pe+kn;if(pe<ir){var Ir=rt-ir,Vr=Math.min(ir,ur);for(Ir+pe<0&&q(3);pe<Vr;++pe)Ee[pe]=Le[Ir+pe]}for(;pe<ur;++pe)Ee[pe]=Ee[pe-ir]}}K.l=Ye,K.p=hr,K.b=pe,K.f=Kt,Ye&&(Kt=1,K.m=et,K.d=Ge,K.n=lt)}while(!Kt);return pe!=Ee.length&&Ft?Y(Ee,0,pe):Ee.subarray(0,pe)},re=function(Q,K,Ee){Ee<<=K&7;var Le=K/8|0;Q[Le]|=Ee,Q[Le+1]|=Ee>>8},E=function(Q,K,Ee){Ee<<=K&7;var Le=K/8|0;Q[Le]|=Ee,Q[Le+1]|=Ee>>8,Q[Le+2]|=Ee>>16},C=function(Q,K){for(var Ee=[],Le=0;Le<Q.length;++Le)Q[Le]&&Ee.push({s:Le,f:Q[Le]});var st=Ee.length,rt=Ee.slice();if(!st)return{t:Vt,l:0};if(st==1){var Ft=new Ce(Ee[0].s+1);return Ft[Ee[0].s]=1,{t:Ft,l:1}}Ee.sort(function(Je,At){return Je.f-At.f}),Ee.push({s:-1,f:25001});var Ht=Ee[0],an=Ee[1],Xt=0,Kt=1,en=2;for(Ee[0]={s:-1,f:Ht.f+an.f,l:Ht,r:an};Kt!=st-1;)Ht=Ee[Ee[Xt].f<Ee[en].f?Xt++:en++],an=Ee[Xt!=Kt&&Ee[Xt].f<Ee[en].f?Xt++:en++],Ee[Kt++]={s:-1,f:Ht.f+an.f,l:Ht,r:an};for(var pe=rt[0].s,Le=1;Le<st;++Le)rt[Le].s>pe&&(pe=rt[Le].s);var Ye=new ge(pe+1),Ge=W(Ee[Kt-1],Ye,0);if(Ge>K){var Le=0,et=0,lt=Ge-K,dt=1<<lt;for(rt.sort(function(At,Bt){return Ye[Bt.s]-Ye[At.s]||At.f-Bt.f});Le<st;++Le){var jt=rt[Le].s;if(Ye[jt]>K)et+=dt-(1<<Ge-Ye[jt]),Ye[jt]=K;else break}for(et>>=lt;et>0;){var Nt=rt[Le].s;Ye[Nt]<K?et-=1<<K-Ye[Nt]++-1:++Le}for(;Le>=0&&et;--Le){var wt=rt[Le].s;Ye[wt]==K&&(--Ye[wt],++et)}Ge=K}return{t:new Ce(Ye),l:Ge}},W=function(Q,K,Ee){return Q.s==-1?Math.max(W(Q.l,K,Ee+1),W(Q.r,K,Ee+1)):K[Q.s]=Ee},be=function(Q){for(var K=Q.length;K&&!Q[--K];);for(var Ee=new ge(++K),Le=0,st=Q[0],rt=1,Ft=function(an){Ee[Le++]=an},Ht=1;Ht<=K;++Ht)if(Q[Ht]==st&&Ht!=K)++rt;else{if(!st&&rt>2){for(;rt>138;rt-=138)Ft(32754);rt>2&&(Ft(rt>10?rt-11<<5|28690:rt-3<<5|12305),rt=0)}else if(rt>3){for(Ft(st),--rt;rt>6;rt-=6)Ft(8304);rt>2&&(Ft(rt-3<<5|8208),rt=0)}for(;rt--;)Ft(st);rt=1,st=Q[Ht]}return{c:Ee.subarray(0,Le),n:K}},Ve=function(Q,K){for(var Ee=0,Le=0;Le<K.length;++Le)Ee+=Q[Le]*K[Le];return Ee},Ke=function(Q,K,Ee){var Le=Ee.length,st=Re(K+2);Q[st]=Le&255,Q[st+1]=Le>>8,Q[st+2]=Q[st]^255,Q[st+3]=Q[st+1]^255;for(var rt=0;rt<Le;++rt)Q[st+rt+4]=Ee[rt];return(st+4+Le)*8},Ct=function(Q,K,Ee,Le,st,rt,Ft,Ht,an,Xt,Kt){re(K,Kt++,Ee),++st[256];for(var en=C(st,15),pe=en.t,Ye=en.l,Ge=C(rt,15),et=Ge.t,lt=Ge.l,dt=be(pe),jt=dt.c,Nt=dt.n,wt=be(et),Je=wt.c,At=wt.n,Bt=new ge(19),mt=0;mt<jt.length;++mt)++Bt[jt[mt]&31];for(var mt=0;mt<Je.length;++mt)++Bt[Je[mt]&31];for(var bt=C(Bt,7),An=bt.t,En=bt.l,In=19;In>4&&!An[le[In-1]];--In);var jn=Xt+5<<3,tr=Ve(st,N)+Ve(rt,P)+Ft,Yn=Ve(st,pe)+Ve(rt,et)+Ft+14+3*In+Ve(Bt,An)+2*Bt[16]+3*Bt[17]+7*Bt[18];if(an>=0&&jn<=tr&&jn<=Yn)return Ke(K,Kt,Q.subarray(an,an+Xt));var ar,Pn,yr,ir;if(re(K,Kt,1+(Yn<tr)),Kt+=2,Yn<tr){ar=T(pe,Ye,0),Pn=pe,yr=T(et,lt,0),ir=et;var Kr=T(An,En,0);re(K,Kt,Nt-257),re(K,Kt+5,At-1),re(K,Kt+10,In-4),Kt+=14;for(var mt=0;mt<In;++mt)re(K,Kt+3*mt,An[le[mt]]);Kt+=3*In;for(var fr=[jt,Je],hr=0;hr<2;++hr)for(var Tr=fr[hr],mt=0;mt<Tr.length;++mt){var kn=Tr[mt]&31;re(K,Kt,Kr[kn]),Kt+=An[kn],kn>15&&(re(K,Kt,Tr[mt]>>5&127),Kt+=Tr[mt]>>12)}}else ar=k,Pn=N,yr=de,ir=P;for(var mt=0;mt<Ht;++mt){var pr=Le[mt];if(pr>255){var kn=pr>>18&31;E(K,Kt,ar[kn+257]),Kt+=Pn[kn+257],kn>7&&(re(K,Kt,pr>>23&31),Kt+=g[kn]);var cr=pr&31;E(K,Kt,yr[cr]),Kt+=ir[cr],cr>3&&(E(K,Kt,pr>>5&8191),Kt+=ye[cr])}else E(K,Kt,ar[pr]),Kt+=Pn[pr]}return E(K,Kt,ar[256]),Kt+Pn[256]},Rt=new G([65540,131080,131088,131104,262176,1048704,1048832,2114560,2117632]),Vt=new Ce(0),rn=function(Q,K,Ee,Le,st,rt){var Ft=rt.z||Q.length,Ht=new Ce(Le+Ft+5*(1+Math.ceil(Ft/7e3))+st),an=Ht.subarray(Le,Ht.length-st),Xt=rt.l,Kt=(rt.r||0)&7;if(K){Kt&&(an[0]=rt.r>>3);for(var en=Rt[K-1],pe=en>>13,Ye=en&8191,Ge=(1<<Ee)-1,et=rt.p||new ge(32768),lt=rt.h||new ge(Ge+1),dt=Math.ceil(Ee/3),jt=2*dt,Nt=function(Ki){return(Q[Ki]^Q[Ki+1]<<dt^Q[Ki+2]<<jt)&Ge},wt=new G(25e3),Je=new ge(288),At=new ge(32),Bt=0,mt=0,bt=rt.i||0,An=0,En=rt.w||0,In=0;bt+2<Ft;++bt){var jn=Nt(bt),tr=bt&32767,Yn=lt[jn];if(et[tr]=Yn,lt[jn]=tr,En<=bt){var ar=Ft-bt;if((Bt>7e3||An>24576)&&(ar>423||!Xt)){Kt=Ct(Q,an,0,wt,Je,At,mt,An,In,bt-In,Kt),An=Bt=mt=0,In=bt;for(var Pn=0;Pn<286;++Pn)Je[Pn]=0;for(var Pn=0;Pn<30;++Pn)At[Pn]=0}var yr=2,ir=0,Kr=Ye,fr=tr-Yn&32767;if(ar>2&&jn==Nt(bt-fr))for(var hr=Math.min(pe,ar)-1,Tr=Math.min(32767,bt),kn=Math.min(258,ar);fr<=Tr&&--Kr&&tr!=Yn;){if(Q[bt+yr]==Q[bt+yr-fr]){for(var pr=0;pr<kn&&Q[bt+pr]==Q[bt+pr-fr];++pr);if(pr>yr){if(yr=pr,ir=fr,pr>hr)break;for(var cr=Math.min(fr,pr-2),Wn=0,Pn=0;Pn<cr;++Pn){var ur=bt-fr+Pn&32767,Ir=et[ur],Vr=ur-Ir&32767;Vr>Wn&&(Wn=Vr,Yn=ur)}}}tr=Yn,Yn=et[tr],fr+=tr-Yn&32767}if(ir){wt[An++]=268435456|_[yr]<<18|R[ir];var Ur=_[yr]&31,or=R[ir]&31;mt+=g[Ur]+ye[or],++Je[257+Ur],++At[or],En=bt+yr,++Bt}else wt[An++]=Q[bt],++Je[Q[bt]]}}for(bt=Math.max(bt,En);bt<Ft;++bt)wt[An++]=Q[bt],++Je[Q[bt]];Kt=Ct(Q,an,Xt,wt,Je,At,mt,An,In,bt-In,Kt),Xt||(rt.r=Kt&7|an[Kt/8|0]<<3,Kt-=7,rt.h=lt,rt.p=et,rt.i=bt,rt.w=En)}else{for(var bt=rt.w||0;bt<Ft+Xt;bt+=65535){var hi=bt+65535;hi>=Ft&&(an[Kt/8|0]=Xt,hi=Ft),Kt=Ke(an,Kt+1,Q.subarray(bt,hi))}rt.i=Ft}return Y(Ht,0,Le+Re(Kt)+st)},He=null,ln=function(){var Q=-1;return{p:function(K){for(var Ee=Q,Le=0;Le<K.length;++Le)Ee=He[Ee&255^K[Le]]^Ee>>>8;Q=Ee},d:function(){return~Q}}},It=function(){var Q=1,K=0;return{p:function(Ee){for(var Le=Q,st=K,rt=Ee.length|0,Ft=0;Ft!=rt;){for(var Ht=Math.min(Ft+2655,rt);Ft<Ht;++Ft)st+=Le+=Ee[Ft];Le=(Le&65535)+15*(Le>>16),st=(st&65535)+15*(st>>16)}Q=Le,K=st},d:function(){return Q%=65521,K%=65521,(Q&255)<<24|(Q&65280)<<8|(K&255)<<8|K>>8}}},cn=function(Q,K,Ee,Le,st){if(!st&&(st={l:1},K.dictionary)){var rt=K.dictionary.subarray(-32768),Ft=new Ce(rt.length+Q.length);Ft.set(rt),Ft.set(Q,rt.length),Q=Ft,st.w=rt.length}return rn(Q,K.level==null?6:K.level,K.mem==null?st.l?Math.ceil(Math.max(8,Math.min(13,Math.log(Q.length)))*1.5):20:12+K.mem,Ee,Le,st)},xt=function(Q,K){var Ee={};for(var Le in Q)Ee[Le]=Q[Le];for(var Le in K)Ee[Le]=K[Le];return Ee},ht=function(Q,K,Ee){for(var Le=Q(),st=Q.toString(),rt=st.slice(st.indexOf("[")+1,st.lastIndexOf("]")).replace(/\s+/g,"").split(","),Ft=0;Ft<Le.length;++Ft){var Ht=Le[Ft],an=rt[Ft];if(typeof Ht=="function"){K+=";"+an+"=";var Xt=Ht.toString();if(Ht.prototype)if(Xt.indexOf("[native code]")!=-1){var Kt=Xt.indexOf(" ",8)+1;K+=Xt.slice(Kt,Xt.indexOf("(",Kt))}else{K+=Xt;for(var en in Ht.prototype)K+=";"+an+".prototype."+en+"="+Ht.prototype[en].toString()}else K+=Xt}else Ee[an]=Ht}return K},Oe=null,Fe=function(Q){var K=[];for(var Ee in Q)Q[Ee].buffer&&K.push((Q[Ee]=new Q[Ee].constructor(Q[Ee])).buffer);return K},j=function(Q,K,Ee,Le){if(!Oe[Ee]){for(var st="",rt={},Ft=Q.length-1,Ht=0;Ht<Ft;++Ht)st=ht(Q[Ht],st,rt);Oe[Ee]={c:ht(Q[Ft],st,rt),e:rt}}var an=xt({},Oe[Ee].e);return fe(Oe[Ee].c+";onmessage=function(e){for(var k in e.data)self[k]=e.data[k];onmessage="+K.toString()+"}",Ee,an,Fe(an),Le)},Ne=function(){return[Ce,ge,G,g,ye,le,U,b,oe,ie,M,te,T,ae,we,Te,Re,Y,q,he,ze,Ae,Be]},Ze=function(){return[Ce,ge,G,g,ye,le,_,R,k,N,de,P,M,Rt,Vt,T,re,E,C,W,be,Ve,Ke,Ct,Re,Y,rn,cn,sn,Ae]},ee=function(){return[_t,St,gt,ln,He]},O=function(){return[Pe,Wt]},ue=function(){return[vt,gt,It]},De=function(){return[dn]},Ae=function(Q){return postMessage(Q,[Q.buffer])},Be=function(Q){return Q&&{out:Q.size&&new Ce(Q.size),dictionary:Q.dictionary}},Se=function(Q,K,Ee,Le,st,rt){var Ft=j(Ee,Le,st,function(Ht,an){Ft.terminate(),rt(Ht,an)});return Ft.postMessage([Q,K],K.consume?[Q.buffer]:[]),function(){Ft.terminate()}},ot=function(Q){return Q.ondata=function(K,Ee){return postMessage([K,Ee],[K.buffer])},function(K){K.data.length?(Q.push(K.data[0],K.data[1]),postMessage([K.data[0].length])):Q.flush()}},Xe=function(Q,K,Ee,Le,st,rt,Ft){var Ht,an=j(Q,Le,st,function(Xt,Kt){Xt?(an.terminate(),K.ondata.call(K,Xt)):Array.isArray(Kt)?Kt.length==1?(K.queuedSize-=Kt[0],K.ondrain&&K.ondrain(Kt[0])):(Kt[1]&&an.terminate(),K.ondata.call(K,Xt,Kt[0],Kt[1])):Ft(Kt)});an.postMessage(Ee),K.queuedSize=0,K.push=function(Xt,Kt){K.ondata||q(5),Ht&&K.ondata(q(4,0,1),null,!!Kt),K.queuedSize+=Xt.length,an.postMessage([Xt,Ht=Kt],[Xt.buffer])},K.terminate=function(){an.terminate()},rt&&(K.flush=function(){an.postMessage([])})},je=function(Q,K){return Q[K]|Q[K+1]<<8},qe=function(Q,K){return(Q[K]|Q[K+1]<<8|Q[K+2]<<16|Q[K+3]<<24)>>>0},kt=function(Q,K){return qe(Q,K)+qe(Q,K+4)*4294967296},gt=function(Q,K,Ee){for(;Ee;++K)Q[K]=Ee,Ee>>>=8},_t=function(Q,K){var Ee=K.filename;if(Q[0]=31,Q[1]=139,Q[2]=8,Q[8]=K.level<2?4:K.level==9?2:0,Q[9]=3,K.mtime!=0&>(Q,4,Math.floor(new Date(K.mtime||Date.now())/1e3)),Ee){Q[3]=8;for(var Le=0;Le<=Ee.length;++Le)Q[Le+10]=Ee.charCodeAt(Le)}},Pe=function(Q){(Q[0]!=31||Q[1]!=139||Q[2]!=8)&&q(6,"invalid gzip data");var K=Q[3],Ee=10;K&4&&(Ee+=(Q[10]|Q[11]<<8)+2);for(var Le=(K>>3&1)+(K>>4&1);Le>0;Le-=!Q[Ee++]);return Ee+(K&2)},Wt=function(Q){var K=Q.length;return(Q[K-4]|Q[K-3]<<8|Q[K-2]<<16|Q[K-1]<<24)>>>0},St=function(Q){return 10+(Q.filename?Q.filename.length+1:0)},vt=function(Q,K){var Ee=K.level,Le=Ee==0?0:Ee<6?1:Ee==9?3:2;if(Q[0]=120,Q[1]=Le<<6|(K.dictionary&&32),Q[1]|=31-(Q[0]<<8|Q[1])%31,K.dictionary){var st=It();st.p(K.dictionary),gt(Q,2,st.d())}},dn=function(Q,K){return((Q[0]&15)!=8||Q[0]>>4>7||(Q[0]<<8|Q[1])%31)&&q(6,"invalid zlib data"),(Q[1]>>5&1)==+!K&&q(6,"invalid zlib data: "+(Q[1]&32?"need":"unexpected")+" dictionary"),(Q[1]>>3&4)+2};function hn(Q,K){return typeof Q=="function"&&(K=Q,Q={}),this.ondata=K,Q}var Ot=null,Ln=null;function qn(Q,K,Ee){return Ee||(Ee=K,K={}),typeof Ee!="function"&&q(7),Se(Q,K,[Ze],function(Le){return Ae(sn(Le.data[0],Le.data[1]))},0,Ee)}function sn(Q,K){return cn(Q,K||{},0,0)}var Mn=null,ut=null;function nt(Q,K,Ee){return Ee||(Ee=K,K={}),typeof Ee!="function"&&q(7),Se(Q,K,[Ne],function(Le){return Ae(ze(Le.data[0],Be(Le.data[1])))},1,Ee)}function ze(Q,K){return he(Q,{i:2},K&&K.out,K&&K.dictionary)}var ne=null,me=null;function Ie(Q,K,Ee){return Ee||(Ee=K,K={}),typeof Ee!="function"&&q(7),Se(Q,K,[Ze,ee,function(){return[Ue]}],function(Le){return Ae(Ue(Le.data[0],Le.data[1]))},2,Ee)}function Ue(Q,K){K||(K={});var Ee=ln(),Le=Q.length;Ee.p(Q);var st=cn(Q,K,St(K),8),rt=st.length;return _t(st,K),gt(st,rt-8,Ee.d()),gt(st,rt-4,Le),st}var ke=null,Gt=null;function _n(Q,K,Ee){return Ee||(Ee=K,K={}),typeof Ee!="function"&&q(7),Se(Q,K,[Ne,O,function(){return[wn]}],function(Le){return Ae(wn(Le.data[0],Le.data[1]))},3,Ee)}function wn(Q,K){var Ee=Pe(Q);return Ee+8>Q.length&&q(6,"invalid gzip data"),he(Q.subarray(Ee,-8),{i:2},K&&K.out||new Ce(Wt(Q)),K&&K.dictionary)}var $n=null,mr=null;function sr(Q,K,Ee){return Ee||(Ee=K,K={}),typeof Ee!="function"&&q(7),Se(Q,K,[Ze,ue,function(){return[lr]}],function(Le){return Ae(lr(Le.data[0],Le.data[1]))},4,Ee)}function lr(Q,K){K||(K={});var Ee=It();Ee.p(Q);var Le=cn(Q,K,K.dictionary?6:2,4);return vt(Le,K),gt(Le,Le.length-4,Ee.d()),Le}var zn=null,Lr=null;function Sr(Q,K,Ee){return Ee||(Ee=K,K={}),typeof Ee!="function"&&q(7),Se(Q,K,[Ne,De,function(){return[xr]}],function(Le){return Ae(xr(Le.data[0],Be(Le.data[1])))},5,Ee)}function xr(Q,K){return he(Q.subarray(dn(Q,K&&K.dictionary),-4),{i:2},K&&K.out,K&&K.dictionary)}var Zr=null,Tn=null;function fn(Q,K,Ee){return Ee||(Ee=K,K={}),typeof Ee!="function"&&q(7),Q[0]==31&&Q[1]==139&&Q[2]==8?_n(Q,K,Ee):(Q[0]&15)!=8||Q[0]>>4>7||(Q[0]<<8|Q[1])%31?nt(Q,K,Ee):Sr(Q,K,Ee)}function Zn(Q,K){return Q[0]==31&&Q[1]==139&&Q[2]==8?wn(Q,K):(Q[0]&15)!=8||Q[0]>>4>7||(Q[0]<<8|Q[1])%31?ze(Q,K):xr(Q,K)}var vr=function(Q,K,Ee,Le){for(var st in Q){var rt=Q[st],Ft=K+st,Ht=Le;Array.isArray(rt)&&(Ht=xt(Le,rt[1]),rt=rt[0]),rt instanceof Ce?Ee[Ft]=[rt,Ht]:(Ee[Ft+="/"]=[new Ce(0),Ht],vr(rt,Ft,Ee,Le))}},Hr=typeof TextEncoder!="undefined"&&new TextEncoder,it=typeof TextDecoder!="undefined"&&new TextDecoder,tt=0;try{it.decode(Vt,{stream:!0}),tt=1}catch(Q){}var mn=function(Q){for(var K="",Ee=0;;){var Le=Q[Ee++],st=(Le>127)+(Le>223)+(Le>239);if(Ee+st>Q.length)return{s:K,r:Y(Q,Ee-1)};st?st==3?(Le=((Le&15)<<18|(Q[Ee++]&63)<<12|(Q[Ee++]&63)<<6|Q[Ee++]&63)-65536,K+=String.fromCharCode(55296|Le>>10,56320|Le&1023)):st&1?K+=String.fromCharCode((Le&31)<<6|Q[Ee++]&63):K+=String.fromCharCode((Le&15)<<12|(Q[Ee++]&63)<<6|Q[Ee++]&63):K+=String.fromCharCode(Le)}},Jt=null,Bn=null;function xn(Q,K){if(K){for(var Ee=new Ce(Q.length),Le=0;Le<Q.length;++Le)Ee[Le]=Q.charCodeAt(Le);return Ee}if(Hr)return Hr.encode(Q);for(var st=Q.length,rt=new Ce(Q.length+(Q.length>>1)),Ft=0,Ht=function(Kt){rt[Ft++]=Kt},Le=0;Le<st;++Le){if(Ft+5>rt.length){var an=new Ce(Ft+8+(st-Le<<1));an.set(rt),rt=an}var Xt=Q.charCodeAt(Le);Xt<128||K?Ht(Xt):Xt<2048?(Ht(192|Xt>>6),Ht(128|Xt&63)):Xt>55295&&Xt<57344?(Xt=65536+(Xt&1047552)|Q.charCodeAt(++Le)&1023,Ht(240|Xt>>18),Ht(128|Xt>>12&63),Ht(128|Xt>>6&63),Ht(128|Xt&63)):(Ht(224|Xt>>12),Ht(128|Xt>>6&63),Ht(128|Xt&63))}return Y(rt,0,Ft)}function vn(Q,K){if(K){for(var Ee="",Le=0;Le<Q.length;Le+=16384)Ee+=String.fromCharCode.apply(null,Q.subarray(Le,Le+16384));return Ee}else{if(it)return it.decode(Q);var st=mn(Q),rt=st.s,Ee=st.r;return Ee.length&&q(8),rt}}var yn=function(Q){return Q==1?3:Q<6?2:Q==9?1:0},Qn=function(Q,K){return K+30+je(Q,K+26)+je(Q,K+28)},bn=function(Q,K,Ee){var Le=je(Q,K+28),st=vn(Q.subarray(K+46,K+46+Le),!(je(Q,K+8)&2048)),rt=K+46+Le,Ft=qe(Q,K+20),Ht=Ee&&Ft==4294967295?Un(Q,rt):[Ft,qe(Q,K+24),qe(Q,K+42)],an=Ht[0],Xt=Ht[1],Kt=Ht[2];return[je(Q,K+10),an,Xt,st,rt+je(Q,K+30)+je(Q,K+32),Kt]},Un=function(Q,K){for(;je(Q,K)!=1;K+=4+je(Q,K+2));return[kt(Q,K+12),kt(Q,K+4),kt(Q,K+20)]},Sn=function(Q){var K=0;if(Q)for(var Ee in Q){var Le=Q[Ee].length;Le>65535&&q(9),K+=Le+4}return K},Tt=function(Q,K,Ee,Le,st,rt,Ft,Ht){var an=Le.length,Xt=Ee.extra,Kt=Ht&&Ht.length,en=Sn(Xt);gt(Q,K,Ft!=null?33639248:67324752),K+=4,Ft!=null&&(Q[K++]=20,Q[K++]=Ee.os),Q[K]=20,K+=2,Q[K++]=Ee.flag<<1|(rt<0&&8),Q[K++]=st&&8,Q[K++]=Ee.compression&255,Q[K++]=Ee.compression>>8;var pe=new Date(Ee.mtime==null?Date.now():Ee.mtime),Ye=pe.getFullYear()-1980;if((Ye<0||Ye>119)&&q(10),gt(Q,K,Ye<<25|pe.getMonth()+1<<21|pe.getDate()<<16|pe.getHours()<<11|pe.getMinutes()<<5|pe.getSeconds()>>1),K+=4,rt!=-1&&(gt(Q,K,Ee.crc),gt(Q,K+4,rt<0?-rt-2:rt),gt(Q,K+8,Ee.size)),gt(Q,K+12,an),gt(Q,K+14,en),K+=16,Ft!=null&&(gt(Q,K,Kt),gt(Q,K+6,Ee.attrs),gt(Q,K+10,Ft),K+=14),Q.set(Le,K),K+=an,en)for(var Ge in Xt){var et=Xt[Ge],lt=et.length;gt(Q,K,+Ge),gt(Q,K+2,lt),Q.set(et,K+4),K+=4+lt}return Kt&&(Q.set(Ht,K),K+=Kt),K},Dt=function(Q,K,Ee,Le,st){gt(Q,K,101010256),gt(Q,K+8,Ee),gt(Q,K+10,Ee),gt(Q,K+12,Le),gt(Q,K+16,st)},$e=null,ft=null,Qt=null,Lt=null;function on(Q,K,Ee){Ee||(Ee=K,K={}),typeof Ee!="function"&&q(7);var Le={};vr(Q,"",Le,K);var st=Object.keys(Le),rt=st.length,Ft=0,Ht=0,an=rt,Xt=new Array(rt),Kt=[],en=function(){for(var lt=0;lt<Kt.length;++lt)Kt[lt]()},pe=function(lt,dt){yt(function(){Ee(lt,dt)})};yt(function(){pe=Ee});var Ye=function(){var lt=new Ce(Ht+22),dt=Ft,jt=Ht-Ft;Ht=0;for(var Nt=0;Nt<an;++Nt){var wt=Xt[Nt];try{var Je=wt.c.length;Tt(lt,Ht,wt,wt.f,wt.u,Je);var At=30+wt.f.length+Sn(wt.extra),Bt=Ht+At;lt.set(wt.c,Bt),Tt(lt,Ft,wt,wt.f,wt.u,Je,Ht,wt.m),Ft+=16+At+(wt.m?wt.m.length:0),Ht=Bt+Je}catch(mt){return pe(mt,null)}}Dt(lt,Ft,Xt.length,jt,dt),pe(null,lt)};rt||Ye();for(var Ge=function(lt){var dt=st[lt],jt=Le[dt],Nt=jt[0],wt=jt[1],Je=ln(),At=Nt.length;Je.p(Nt);var Bt=xn(dt),mt=Bt.length,bt=wt.comment,An=bt&&xn(bt),En=An&&An.length,In=Sn(wt.extra),jn=wt.level==0?0:8,tr=function(Yn,ar){if(Yn)en(),pe(Yn,null);else{var Pn=ar.length;Xt[lt]=xt(wt,{size:At,crc:Je.d(),c:ar,f:Bt,m:An,u:mt!=dt.length||An&&bt.length!=En,compression:jn}),Ft+=30+mt+In+Pn,Ht+=76+2*(mt+In)+(En||0)+Pn,--rt||Ye()}};if(mt>65535&&tr(q(11,0,1),null),!jn)tr(null,Nt);else if(At<16e4)try{tr(null,sn(Nt,wt))}catch(Yn){tr(Yn,null)}else Kt.push(qn(Nt,wt,tr))},et=0;et<an;++et)Ge(et);return en}function Cn(Q,K){K||(K={});var Ee={},Le=[];vr(Q,"",Ee,K);var st=0,rt=0;for(var Ft in Ee){var Ht=Ee[Ft],an=Ht[0],Xt=Ht[1],Kt=Xt.level==0?0:8,en=xn(Ft),pe=en.length,Ye=Xt.comment,Ge=Ye&&xn(Ye),et=Ge&&Ge.length,lt=Sn(Xt.extra);pe>65535&&q(11);var dt=Kt?sn(an,Xt):an,jt=dt.length,Nt=ln();Nt.p(an),Le.push(xt(Xt,{size:an.length,crc:Nt.d(),c:dt,f:en,m:Ge,u:pe!=Ft.length||Ge&&Ye.length!=et,o:st,compression:Kt})),st+=30+pe+lt+jt,rt+=76+2*(pe+lt)+(et||0)+jt}for(var wt=new Ce(rt+22),Je=st,At=rt-st,Bt=0;Bt<Le.length;++Bt){var en=Le[Bt];Tt(wt,en.o,en,en.f,en.u,en.c.length);var mt=30+en.f.length+Sn(en.extra);wt.set(en.c,en.o+mt),Tt(wt,st,en,en.f,en.u,en.c.length,en.o,en.m),st+=16+mt+(en.m?en.m.length:0)}return Dt(wt,st,Le.length,At,Je),wt}var pn=null,Hn=null,Xn=null,Jn=null,yt=typeof queueMicrotask=="function"?queueMicrotask:typeof setTimeout=="function"?setTimeout:function(Q){Q()};function On(Q,K,Ee){Ee||(Ee=K,K={}),typeof Ee!="function"&&q(7);var Le=[],st=function(){for(var lt=0;lt<Le.length;++lt)Le[lt]()},rt={},Ft=function(lt,dt){yt(function(){Ee(lt,dt)})};yt(function(){Ft=Ee});for(var Ht=Q.length-22;qe(Q,Ht)!=101010256;--Ht)if(!Ht||Q.length-Ht>65558)return Ft(q(13,0,1),null),st;var an=je(Q,Ht+8);if(an){var Xt=an,Kt=qe(Q,Ht+16),en=Kt==4294967295||Xt==65535;if(en){var pe=qe(Q,Ht-12);en=qe(Q,pe)==101075792,en&&(Xt=an=qe(Q,pe+32),Kt=qe(Q,pe+48))}for(var Ye=K&&K.filter,Ge=function(lt){var dt=bn(Q,Kt,en),jt=dt[0],Nt=dt[1],wt=dt[2],Je=dt[3],At=dt[4],Bt=dt[5],mt=Qn(Q,Bt);Kt=At;var bt=function(En,In){En?(st(),Ft(En,null)):(In&&(rt[Je]=In),--an||Ft(null,rt))};if(!Ye||Ye({name:Je,size:Nt,originalSize:wt,compression:jt}))if(!jt)bt(null,Y(Q,mt,mt+Nt));else if(jt==8){var An=Q.subarray(mt,mt+Nt);if(wt<524288||Nt>.8*wt)try{bt(null,ze(An,{out:new Ce(wt)}))}catch(En){bt(En,null)}else Le.push(nt(An,{size:wt},bt))}else bt(q(14,"unknown compression type "+jt,1),null);else bt(null,null)},et=0;et<Xt;++et)Ge(et)}else Ft(null,{});return st}function Kn(Q,K){for(var Ee={},Le=Q.length-22;qe(Q,Le)!=101010256;--Le)(!Le||Q.length-Le>65558)&&q(13);var st=je(Q,Le+8);if(!st)return{};var rt=qe(Q,Le+16),Ft=rt==4294967295||st==65535;if(Ft){var Ht=qe(Q,Le-12);Ft=qe(Q,Ht)==101075792,Ft&&(st=qe(Q,Ht+32),rt=qe(Q,Ht+48))}for(var an=K&&K.filter,Xt=0;Xt<st;++Xt){var Kt=bn(Q,rt,Ft),en=Kt[0],pe=Kt[1],Ye=Kt[2],Ge=Kt[3],et=Kt[4],lt=Kt[5],dt=Qn(Q,lt);rt=et,(!an||an({name:Ge,size:pe,originalSize:Ye,compression:en}))&&(en?en==8?Ee[Ge]=ze(Q.subarray(dt,dt+pe),{out:new Ce(Ye)}):q(14,"unknown compression type "+en):Ee[Ge]=Y(Q,dt,dt+pe))}return Ee}},64270:function(Vn){(function(ct,x){Vn.exports=x()})(this,function(){"use strict";var ct=function(d,u){return ct=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(p,h){p.__proto__=h}||function(p,h){for(var F in h)Object.prototype.hasOwnProperty.call(h,F)&&(p[F]=h[F])},ct(d,u)};function x(d,u){if(typeof u!="function"&&u!==null)throw new TypeError("Class extends value "+String(u)+" is not a constructor or null");ct(d,u);function p(){this.constructor=d}d.prototype=u===null?Object.create(u):(p.prototype=u.prototype,new p)}var V=function(){return V=Object.assign||function(u){for(var p,h=1,F=arguments.length;h<F;h++){p=arguments[h];for(var Z in p)Object.prototype.hasOwnProperty.call(p,Z)&&(u[Z]=p[Z])}return u},V.apply(this,arguments)};function fe(d,u,p,h){function F(Z){return Z instanceof p?Z:new p(function(ve){ve(Z)})}return new(p||(p=Promise))(function(Z,ve){function Qe($t){try{Ut(h.next($t))}catch(nn){ve(nn)}}function Me($t){try{Ut(h.throw($t))}catch(nn){ve(nn)}}function Ut($t){$t.done?Z($t.value):F($t.value).then(Qe,Me)}Ut((h=h.apply(d,u||[])).next())})}function Ce(d,u){var p={label:0,sent:function(){if(Z[0]&1)throw Z[1];return Z[1]},trys:[],ops:[]},h,F,Z,ve;return ve={next:Qe(0),throw:Qe(1),return:Qe(2)},typeof Symbol=="function"&&(ve[Symbol.iterator]=function(){return this}),ve;function Qe(Ut){return function($t){return Me([Ut,$t])}}function Me(Ut){if(h)throw new TypeError("Generator is already executing.");for(;p;)try{if(h=1,F&&(Z=Ut[0]&2?F.return:Ut[0]?F.throw||((Z=F.return)&&Z.call(F),0):F.next)&&!(Z=Z.call(F,Ut[1])).done)return Z;switch(F=0,Z&&(Ut=[Ut[0]&2,Z.value]),Ut[0]){case 0:case 1:Z=Ut;break;case 4:return p.label++,{value:Ut[1],done:!1};case 5:p.label++,F=Ut[1],Ut=[0];continue;case 7:Ut=p.ops.pop(),p.trys.pop();continue;default:if(Z=p.trys,!(Z=Z.length>0&&Z[Z.length-1])&&(Ut[0]===6||Ut[0]===2)){p=0;continue}if(Ut[0]===3&&(!Z||Ut[1]>Z[0]&&Ut[1]<Z[3])){p.label=Ut[1];break}if(Ut[0]===6&&p.label<Z[1]){p.label=Z[1],Z=Ut;break}if(Z&&p.label<Z[2]){p.label=Z[2],p.ops.push(Ut);break}Z[2]&&p.ops.pop(),p.trys.pop();continue}Ut=u.call(d,p)}catch($t){Ut=[6,$t],F=0}finally{h=Z=0}if(Ut[0]&5)throw Ut[1];return{value:Ut[0]?Ut[1]:void 0,done:!0}}}function ge(d,u,p){if(p||arguments.length===2)for(var h=0,F=u.length,Z;h<F;h++)(Z||!(h in u))&&(Z||(Z=Array.prototype.slice.call(u,0,h)),Z[h]=u[h]);return d.concat(Z||u)}for(var G=function(){function d(u,p,h,F){this.left=u,this.top=p,this.width=h,this.height=F}return d.prototype.add=function(u,p,h,F){return new d(this.left+u,this.top+p,this.width+h,this.height+F)},d.fromClientRect=function(u,p){return new d(p.left+u.windowBounds.left,p.top+u.windowBounds.top,p.width,p.height)},d.fromDOMRectList=function(u,p){var h=Array.from(p).find(function(F){return F.width!==0});return h?new d(h.left+u.windowBounds.left,h.top+u.windowBounds.top,h.width,h.height):d.EMPTY},d.EMPTY=new d(0,0,0,0),d}(),g=function(d,u){return G.fromClientRect(d,u.getBoundingClientRect())},ye=function(d){var u=d.body,p=d.documentElement;if(!u||!p)throw new Error("Unable to get document size");var h=Math.max(Math.max(u.scrollWidth,p.scrollWidth),Math.max(u.offsetWidth,p.offsetWidth),Math.max(u.clientWidth,p.clientWidth)),F=Math.max(Math.max(u.scrollHeight,p.scrollHeight),Math.max(u.offsetHeight,p.offsetHeight),Math.max(u.clientHeight,p.clientHeight));return new G(0,0,h,F)},le=function(d){for(var u=[],p=0,h=d.length;p<h;){var F=d.charCodeAt(p++);if(F>=55296&&F<=56319&&p<h){var Z=d.charCodeAt(p++);(Z&64512)===56320?u.push(((F&1023)<<10)+(Z&1023)+65536):(u.push(F),p--)}else u.push(F)}return u},o=function(){for(var d=[],u=0;u<arguments.length;u++)d[u]=arguments[u];if(String.fromCodePoint)return String.fromCodePoint.apply(String,d);var p=d.length;if(!p)return"";for(var h=[],F=-1,Z="";++F<p;){var ve=d[F];ve<=65535?h.push(ve):(ve-=65536,h.push((ve>>10)+55296,ve%1024+56320)),(F+1===p||h.length>16384)&&(Z+=String.fromCharCode.apply(String,h),h.length=0)}return Z},S="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",U=typeof Uint8Array=="undefined"?[]:new Uint8Array(256),_=0;_<S.length;_++)U[S.charCodeAt(_)]=_;for(var w="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",b=typeof Uint8Array=="undefined"?[]:new Uint8Array(256),R=0;R<w.length;R++)b[w.charCodeAt(R)]=R;for(var M=function(d){var u=d.length*.75,p=d.length,h,F=0,Z,ve,Qe,Me;d[d.length-1]==="="&&(u--,d[d.length-2]==="="&&u--);var Ut=typeof ArrayBuffer!="undefined"&&typeof Uint8Array!="undefined"&&typeof Uint8Array.prototype.slice!="undefined"?new ArrayBuffer(u):new Array(u),$t=Array.isArray(Ut)?Ut:new Uint8Array(Ut);for(h=0;h<p;h+=4)Z=b[d.charCodeAt(h)],ve=b[d.charCodeAt(h+1)],Qe=b[d.charCodeAt(h+2)],Me=b[d.charCodeAt(h+3)],$t[F++]=Z<<2|ve>>4,$t[F++]=(ve&15)<<4|Qe>>2,$t[F++]=(Qe&3)<<6|Me&63;return Ut},H=function(d){for(var u=d.length,p=[],h=0;h<u;h+=2)p.push(d[h+1]<<8|d[h]);return p},J=function(d){for(var u=d.length,p=[],h=0;h<u;h+=4)p.push(d[h+3]<<24|d[h+2]<<16|d[h+1]<<8|d[h]);return p},T=5,N=11,P=2,k=N-T,oe=65536>>T,de=1<<T,ie=de-1,ae=1024>>T,we=oe+ae,Te=we,Re=32,Y=Te+Re,$=65536>>N,te=1<<k,q=te-1,he=function(d,u,p){return d.slice?d.slice(u,p):new Uint16Array(Array.prototype.slice.call(d,u,p))},re=function(d,u,p){return d.slice?d.slice(u,p):new Uint32Array(Array.prototype.slice.call(d,u,p))},E=function(d,u){var p=M(d),h=Array.isArray(p)?J(p):new Uint32Array(p),F=Array.isArray(p)?H(p):new Uint16Array(p),Z=24,ve=he(F,Z/2,h[4]/2),Qe=h[5]===2?he(F,(Z+h[4])/2):re(h,Math.ceil((Z+h[4])/4));return new C(h[0],h[1],h[2],h[3],ve,Qe)},C=function(){function d(u,p,h,F,Z,ve){this.initialValue=u,this.errorValue=p,this.highStart=h,this.highValueIndex=F,this.index=Z,this.data=ve}return d.prototype.get=function(u){var p;if(u>=0){if(u<55296||u>56319&&u<=65535)return p=this.index[u>>T],p=(p<<P)+(u&ie),this.data[p];if(u<=65535)return p=this.index[oe+(u-55296>>T)],p=(p<<P)+(u&ie),this.data[p];if(u<this.highStart)return p=Y-$+(u>>N),p=this.index[p],p+=u>>T&q,p=this.index[p],p=(p<<P)+(u&ie),this.data[p];if(u<=1114111)return this.data[this.highValueIndex]}return this.errorValue},d}(),W="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",be=typeof Uint8Array=="undefined"?[]:new Uint8Array(256),Ve=0;Ve<W.length;Ve++)be[W.charCodeAt(Ve)]=Ve;var Ke="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==",Ct=50,Rt=1,Vt=2,rn=3,He=4,ln=5,It=7,cn=8,xt=9,ht=10,Oe=11,Fe=12,j=13,Ne=14,Ze=15,ee=16,O=17,ue=18,De=19,Ae=20,Be=21,Se=22,ot=23,Xe=24,je=25,qe=26,kt=27,gt=28,_t=29,Pe=30,Wt=31,St=32,vt=33,dn=34,hn=35,Ot=36,Ln=37,qn=38,sn=39,Mn=40,ut=41,nt=42,ze=43,ne=[9001,65288],me="!",Ie="\xD7",Ue="\xF7",ke=E(Ke),Gt=[Pe,Ot],_n=[Rt,Vt,rn,ln],wn=[ht,cn],$n=[kt,qe],mr=_n.concat(wn),sr=[qn,sn,Mn,dn,hn],lr=[Ze,j],zn=function(d,u){u===void 0&&(u="strict");var p=[],h=[],F=[];return d.forEach(function(Z,ve){var Qe=ke.get(Z);if(Qe>Ct?(F.push(!0),Qe-=Ct):F.push(!1),["normal","auto","loose"].indexOf(u)!==-1&&[8208,8211,12316,12448].indexOf(Z)!==-1)return h.push(ve),p.push(ee);if(Qe===He||Qe===Oe){if(ve===0)return h.push(ve),p.push(Pe);var Me=p[ve-1];return mr.indexOf(Me)===-1?(h.push(h[ve-1]),p.push(Me)):(h.push(ve),p.push(Pe))}if(h.push(ve),Qe===Wt)return p.push(u==="strict"?Be:Ln);if(Qe===nt||Qe===_t)return p.push(Pe);if(Qe===ze)return Z>=131072&&Z<=196605||Z>=196608&&Z<=262141?p.push(Ln):p.push(Pe);p.push(Qe)}),[h,p,F]},Lr=function(d,u,p,h){var F=h[p];if(Array.isArray(d)?d.indexOf(F)!==-1:d===F)for(var Z=p;Z<=h.length;){Z++;var ve=h[Z];if(ve===u)return!0;if(ve!==ht)break}if(F===ht)for(var Z=p;Z>0;){Z--;var Qe=h[Z];if(Array.isArray(d)?d.indexOf(Qe)!==-1:d===Qe)for(var Me=p;Me<=h.length;){Me++;var ve=h[Me];if(ve===u)return!0;if(ve!==ht)break}if(Qe!==ht)break}return!1},Sr=function(d,u){for(var p=d;p>=0;){var h=u[p];if(h===ht)p--;else return h}return 0},xr=function(d,u,p,h,F){if(p[h]===0)return Ie;var Z=h-1;if(Array.isArray(F)&&F[Z]===!0)return Ie;var ve=Z-1,Qe=Z+1,Me=u[Z],Ut=ve>=0?u[ve]:0,$t=u[Qe];if(Me===Vt&&$t===rn)return Ie;if(_n.indexOf(Me)!==-1)return me;if(_n.indexOf($t)!==-1||wn.indexOf($t)!==-1)return Ie;if(Sr(Z,u)===cn)return Ue;if(ke.get(d[Z])===Oe||(Me===St||Me===vt)&&ke.get(d[Qe])===Oe||Me===It||$t===It||Me===xt||[ht,j,Ze].indexOf(Me)===-1&&$t===xt||[O,ue,De,Xe,gt].indexOf($t)!==-1||Sr(Z,u)===Se||Lr(ot,Se,Z,u)||Lr([O,ue],Be,Z,u)||Lr(Fe,Fe,Z,u))return Ie;if(Me===ht)return Ue;if(Me===ot||$t===ot)return Ie;if($t===ee||Me===ee)return Ue;if([j,Ze,Be].indexOf($t)!==-1||Me===Ne||Ut===Ot&&lr.indexOf(Me)!==-1||Me===gt&&$t===Ot||$t===Ae||Gt.indexOf($t)!==-1&&Me===je||Gt.indexOf(Me)!==-1&&$t===je||Me===kt&&[Ln,St,vt].indexOf($t)!==-1||[Ln,St,vt].indexOf(Me)!==-1&&$t===qe||Gt.indexOf(Me)!==-1&&$n.indexOf($t)!==-1||$n.indexOf(Me)!==-1&&Gt.indexOf($t)!==-1||[kt,qe].indexOf(Me)!==-1&&($t===je||[Se,Ze].indexOf($t)!==-1&&u[Qe+1]===je)||[Se,Ze].indexOf(Me)!==-1&&$t===je||Me===je&&[je,gt,Xe].indexOf($t)!==-1)return Ie;if([je,gt,Xe,O,ue].indexOf($t)!==-1)for(var nn=Z;nn>=0;){var Rn=u[nn];if(Rn===je)return Ie;if([gt,Xe].indexOf(Rn)!==-1)nn--;else break}if([kt,qe].indexOf($t)!==-1)for(var nn=[O,ue].indexOf(Me)!==-1?ve:Z;nn>=0;){var Rn=u[nn];if(Rn===je)return Ie;if([gt,Xe].indexOf(Rn)!==-1)nn--;else break}if(qn===Me&&[qn,sn,dn,hn].indexOf($t)!==-1||[sn,dn].indexOf(Me)!==-1&&[sn,Mn].indexOf($t)!==-1||[Mn,hn].indexOf(Me)!==-1&&$t===Mn||sr.indexOf(Me)!==-1&&[Ae,qe].indexOf($t)!==-1||sr.indexOf($t)!==-1&&Me===kt||Gt.indexOf(Me)!==-1&&Gt.indexOf($t)!==-1||Me===Xe&&Gt.indexOf($t)!==-1||Gt.concat(je).indexOf(Me)!==-1&&$t===Se&&ne.indexOf(d[Qe])===-1||Gt.concat(je).indexOf($t)!==-1&&Me===ue)return Ie;if(Me===ut&&$t===ut){for(var Or=p[Z],dr=1;Or>0&&(Or--,u[Or]===ut);)dr++;if(dr%2!==0)return Ie}return Me===St&&$t===vt?Ie:Ue},Zr=function(d,u){u||(u={lineBreak:"normal",wordBreak:"normal"});var p=zn(d,u.lineBreak),h=p[0],F=p[1],Z=p[2];(u.wordBreak==="break-all"||u.wordBreak==="break-word")&&(F=F.map(function(Qe){return[je,Pe,nt].indexOf(Qe)!==-1?Ln:Qe}));var ve=u.wordBreak==="keep-all"?Z.map(function(Qe,Me){return Qe&&d[Me]>=19968&&d[Me]<=40959}):void 0;return[h,F,ve]},Tn=function(){function d(u,p,h,F){this.codePoints=u,this.required=p===me,this.start=h,this.end=F}return d.prototype.slice=function(){return o.apply(void 0,this.codePoints.slice(this.start,this.end))},d}(),fn=function(d,u){var p=le(d),h=Zr(p,u),F=h[0],Z=h[1],ve=h[2],Qe=p.length,Me=0,Ut=0;return{next:function(){if(Ut>=Qe)return{done:!0,value:null};for(var $t=Ie;Ut<Qe&&($t=xr(p,Z,F,++Ut,ve))===Ie;);if($t!==Ie||Ut===Qe){var nn=new Tn(p,$t,Me,Ut);return Me=Ut,{value:nn,done:!1}}return{done:!0,value:null}}}},Zn=1,vr=2,Hr=4,it=8,tt=10,mn=47,Jt=92,Bn=9,xn=32,vn=34,yn=61,Qn=35,bn=36,Un=37,Sn=39,Tt=40,Dt=41,$e=95,ft=45,Qt=33,Lt=60,on=62,Cn=64,pn=91,Hn=93,Xn=61,Jn=123,yt=63,On=125,Kn=124,Q=126,K=128,Ee=65533,Le=42,st=43,rt=44,Ft=58,Ht=59,an=46,Xt=0,Kt=8,en=11,pe=14,Ye=31,Ge=127,et=-1,lt=48,dt=97,jt=101,Nt=102,wt=117,Je=122,At=65,Bt=69,mt=70,bt=85,An=90,En=function(d){return d>=lt&&d<=57},In=function(d){return d>=55296&&d<=57343},jn=function(d){return En(d)||d>=At&&d<=mt||d>=dt&&d<=Nt},tr=function(d){return d>=dt&&d<=Je},Yn=function(d){return d>=At&&d<=An},ar=function(d){return tr(d)||Yn(d)},Pn=function(d){return d>=K},yr=function(d){return d===tt||d===Bn||d===xn},ir=function(d){return ar(d)||Pn(d)||d===$e},Kr=function(d){return ir(d)||En(d)||d===ft},fr=function(d){return d>=Xt&&d<=Kt||d===en||d>=pe&&d<=Ye||d===Ge},hr=function(d,u){return d!==Jt?!1:u!==tt},Tr=function(d,u,p){return d===ft?ir(u)||hr(u,p):ir(d)?!0:!!(d===Jt&&hr(d,u))},kn=function(d,u,p){return d===st||d===ft?En(u)?!0:u===an&&En(p):En(d===an?u:d)},pr=function(d){var u=0,p=1;(d[u]===st||d[u]===ft)&&(d[u]===ft&&(p=-1),u++);for(var h=[];En(d[u]);)h.push(d[u++]);var F=h.length?parseInt(o.apply(void 0,h),10):0;d[u]===an&&u++;for(var Z=[];En(d[u]);)Z.push(d[u++]);var ve=Z.length,Qe=ve?parseInt(o.apply(void 0,Z),10):0;(d[u]===Bt||d[u]===jt)&&u++;var Me=1;(d[u]===st||d[u]===ft)&&(d[u]===ft&&(Me=-1),u++);for(var Ut=[];En(d[u]);)Ut.push(d[u++]);var $t=Ut.length?parseInt(o.apply(void 0,Ut),10):0;return p*(F+Qe*Math.pow(10,-ve))*Math.pow(10,Me*$t)},cr={type:2},Wn={type:3},ur={type:4},Ir={type:13},Vr={type:8},Ur={type:21},or={type:9},hi={type:10},Ki={type:11},Ji={type:12},ds={type:14},ss={type:23},zi={type:1},ii={type:25},ci={type:24},Pi={type:26},ai={type:27},si={type:28},li={type:29},gr={type:31},Fr={type:32},Gr=function(){function d(){this._value=[]}return d.prototype.write=function(u){this._value=this._value.concat(le(u))},d.prototype.read=function(){for(var u=[],p=this.consumeToken();p!==Fr;)u.push(p),p=this.consumeToken();return u},d.prototype.consumeToken=function(){var u=this.consumeCodePoint();switch(u){case vn:return this.consumeStringToken(vn);case Qn:var p=this.peekCodePoint(0),h=this.peekCodePoint(1),F=this.peekCodePoint(2);if(Kr(p)||hr(h,F)){var Z=Tr(p,h,F)?vr:Zn,ve=this.consumeName();return{type:5,value:ve,flags:Z}}break;case bn:if(this.peekCodePoint(0)===yn)return this.consumeCodePoint(),Ir;break;case Sn:return this.consumeStringToken(Sn);case Tt:return cr;case Dt:return Wn;case Le:if(this.peekCodePoint(0)===yn)return this.consumeCodePoint(),ds;break;case st:if(kn(u,this.peekCodePoint(0),this.peekCodePoint(1)))return this.reconsumeCodePoint(u),this.consumeNumericToken();break;case rt:return ur;case ft:var Qe=u,Me=this.peekCodePoint(0),Ut=this.peekCodePoint(1);if(kn(Qe,Me,Ut))return this.reconsumeCodePoint(u),this.consumeNumericToken();if(Tr(Qe,Me,Ut))return this.reconsumeCodePoint(u),this.consumeIdentLikeToken();if(Me===ft&&Ut===on)return this.consumeCodePoint(),this.consumeCodePoint(),ci;break;case an:if(kn(u,this.peekCodePoint(0),this.peekCodePoint(1)))return this.reconsumeCodePoint(u),this.consumeNumericToken();break;case mn:if(this.peekCodePoint(0)===Le)for(this.consumeCodePoint();;){var $t=this.consumeCodePoint();if($t===Le&&($t=this.consumeCodePoint(),$t===mn))return this.consumeToken();if($t===et)return this.consumeToken()}break;case Ft:return Pi;case Ht:return ai;case Lt:if(this.peekCodePoint(0)===Qt&&this.peekCodePoint(1)===ft&&this.peekCodePoint(2)===ft)return this.consumeCodePoint(),this.consumeCodePoint(),ii;break;case Cn:var nn=this.peekCodePoint(0),Rn=this.peekCodePoint(1),Or=this.peekCodePoint(2);if(Tr(nn,Rn,Or)){var ve=this.consumeName();return{type:7,value:ve}}break;case pn:return si;case Jt:if(hr(u,this.peekCodePoint(0)))return this.reconsumeCodePoint(u),this.consumeIdentLikeToken();break;case Hn:return li;case Xn:if(this.peekCodePoint(0)===yn)return this.consumeCodePoint(),Vr;break;case Jn:return Ki;case On:return Ji;case wt:case bt:var dr=this.peekCodePoint(0),Rr=this.peekCodePoint(1);return dr===st&&(jn(Rr)||Rr===yt)&&(this.consumeCodePoint(),this.consumeUnicodeRangeToken()),this.reconsumeCodePoint(u),this.consumeIdentLikeToken();case Kn:if(this.peekCodePoint(0)===yn)return this.consumeCodePoint(),or;if(this.peekCodePoint(0)===Kn)return this.consumeCodePoint(),Ur;break;case Q:if(this.peekCodePoint(0)===yn)return this.consumeCodePoint(),hi;break;case et:return Fr}return yr(u)?(this.consumeWhiteSpace(),gr):En(u)?(this.reconsumeCodePoint(u),this.consumeNumericToken()):ir(u)?(this.reconsumeCodePoint(u),this.consumeIdentLikeToken()):{type:6,value:o(u)}},d.prototype.consumeCodePoint=function(){var u=this._value.shift();return typeof u=="undefined"?-1:u},d.prototype.reconsumeCodePoint=function(u){this._value.unshift(u)},d.prototype.peekCodePoint=function(u){return u>=this._value.length?-1:this._value[u]},d.prototype.consumeUnicodeRangeToken=function(){for(var u=[],p=this.consumeCodePoint();jn(p)&&u.length<6;)u.push(p),p=this.consumeCodePoint();for(var h=!1;p===yt&&u.length<6;)u.push(p),p=this.consumeCodePoint(),h=!0;if(h){var F=parseInt(o.apply(void 0,u.map(function(Me){return Me===yt?lt:Me})),16),Z=parseInt(o.apply(void 0,u.map(function(Me){return Me===yt?mt:Me})),16);return{type:30,start:F,end:Z}}var ve=parseInt(o.apply(void 0,u),16);if(this.peekCodePoint(0)===ft&&jn(this.peekCodePoint(1))){this.consumeCodePoint(),p=this.consumeCodePoint();for(var Qe=[];jn(p)&&Qe.length<6;)Qe.push(p),p=this.consumeCodePoint();var Z=parseInt(o.apply(void 0,Qe),16);return{type:30,start:ve,end:Z}}else return{type:30,start:ve,end:ve}},d.prototype.consumeIdentLikeToken=function(){var u=this.consumeName();return u.toLowerCase()==="url"&&this.peekCodePoint(0)===Tt?(this.consumeCodePoint(),this.consumeUrlToken()):this.peekCodePoint(0)===Tt?(this.consumeCodePoint(),{type:19,value:u}):{type:20,value:u}},d.prototype.consumeUrlToken=function(){var u=[];if(this.consumeWhiteSpace(),this.peekCodePoint(0)===et)return{type:22,value:""};var p=this.peekCodePoint(0);if(p===Sn||p===vn){var h=this.consumeStringToken(this.consumeCodePoint());return h.type===0&&(this.consumeWhiteSpace(),this.peekCodePoint(0)===et||this.peekCodePoint(0)===Dt)?(this.consumeCodePoint(),{type:22,value:h.value}):(this.consumeBadUrlRemnants(),ss)}for(;;){var F=this.consumeCodePoint();if(F===et||F===Dt)return{type:22,value:o.apply(void 0,u)};if(yr(F))return this.consumeWhiteSpace(),this.peekCodePoint(0)===et||this.peekCodePoint(0)===Dt?(this.consumeCodePoint(),{type:22,value:o.apply(void 0,u)}):(this.consumeBadUrlRemnants(),ss);if(F===vn||F===Sn||F===Tt||fr(F))return this.consumeBadUrlRemnants(),ss;if(F===Jt)if(hr(F,this.peekCodePoint(0)))u.push(this.consumeEscapedCodePoint());else return this.consumeBadUrlRemnants(),ss;else u.push(F)}},d.prototype.consumeWhiteSpace=function(){for(;yr(this.peekCodePoint(0));)this.consumeCodePoint()},d.prototype.consumeBadUrlRemnants=function(){for(;;){var u=this.consumeCodePoint();if(u===Dt||u===et)return;hr(u,this.peekCodePoint(0))&&this.consumeEscapedCodePoint()}},d.prototype.consumeStringSlice=function(u){for(var p=5e4,h="";u>0;){var F=Math.min(p,u);h+=o.apply(void 0,this._value.splice(0,F)),u-=F}return this._value.shift(),h},d.prototype.consumeStringToken=function(u){var p="",h=0;do{var F=this._value[h];if(F===et||F===void 0||F===u)return p+=this.consumeStringSlice(h),{type:0,value:p};if(F===tt)return this._value.splice(0,h),zi;if(F===Jt){var Z=this._value[h+1];Z!==et&&Z!==void 0&&(Z===tt?(p+=this.consumeStringSlice(h),h=-1,this._value.shift()):hr(F,Z)&&(p+=this.consumeStringSlice(h),p+=o(this.consumeEscapedCodePoint()),h=-1))}h++}while(!0)},d.prototype.consumeNumber=function(){var u=[],p=Hr,h=this.peekCodePoint(0);for((h===st||h===ft)&&u.push(this.consumeCodePoint());En(this.peekCodePoint(0));)u.push(this.consumeCodePoint());h=this.peekCodePoint(0);var F=this.peekCodePoint(1);if(h===an&&En(F))for(u.push(this.consumeCodePoint(),this.consumeCodePoint()),p=it;En(this.peekCodePoint(0));)u.push(this.consumeCodePoint());h=this.peekCodePoint(0),F=this.peekCodePoint(1);var Z=this.peekCodePoint(2);if((h===Bt||h===jt)&&((F===st||F===ft)&&En(Z)||En(F)))for(u.push(this.consumeCodePoint(),this.consumeCodePoint()),p=it;En(this.peekCodePoint(0));)u.push(this.consumeCodePoint());return[pr(u),p]},d.prototype.consumeNumericToken=function(){var u=this.consumeNumber(),p=u[0],h=u[1],F=this.peekCodePoint(0),Z=this.peekCodePoint(1),ve=this.peekCodePoint(2);if(Tr(F,Z,ve)){var Qe=this.consumeName();return{type:15,number:p,flags:h,unit:Qe}}return F===Un?(this.consumeCodePoint(),{type:16,number:p,flags:h}):{type:17,number:p,flags:h}},d.prototype.consumeEscapedCodePoint=function(){var u=this.consumeCodePoint();if(jn(u)){for(var p=o(u);jn(this.peekCodePoint(0))&&p.length<6;)p+=o(this.consumeCodePoint());yr(this.peekCodePoint(0))&&this.consumeCodePoint();var h=parseInt(p,16);return h===0||In(h)||h>1114111?Ee:h}return u===et?Ee:u},d.prototype.consumeName=function(){for(var u="";;){var p=this.consumeCodePoint();if(Kr(p))u+=o(p);else if(hr(p,this.peekCodePoint(0)))u+=o(this.consumeEscapedCodePoint());else return this.reconsumeCodePoint(p),u}},d}(),$r=function(){function d(u){this._tokens=u}return d.create=function(u){var p=new Gr;return p.write(u),new d(p.read())},d.parseValue=function(u){return d.create(u).parseComponentValue()},d.parseValues=function(u){return d.create(u).parseComponentValues()},d.prototype.parseComponentValue=function(){for(var u=this.consumeToken();u.type===31;)u=this.consumeToken();if(u.type===32)throw new SyntaxError("Error parsing CSS component value, unexpected EOF");this.reconsumeToken(u);var p=this.consumeComponentValue();do u=this.consumeToken();while(u.type===31);if(u.type===32)return p;throw new SyntaxError("Error parsing CSS component value, multiple values found when expecting only one")},d.prototype.parseComponentValues=function(){for(var u=[];;){var p=this.consumeComponentValue();if(p.type===32)return u;u.push(p),u.push()}},d.prototype.consumeComponentValue=function(){var u=this.consumeToken();switch(u.type){case 11:case 28:case 2:return this.consumeSimpleBlock(u.type);case 19:return this.consumeFunction(u)}return u},d.prototype.consumeSimpleBlock=function(u){for(var p={type:u,values:[]},h=this.consumeToken();;){if(h.type===32||Gi(h,u))return p;this.reconsumeToken(h),p.values.push(this.consumeComponentValue()),h=this.consumeToken()}},d.prototype.consumeFunction=function(u){for(var p={name:u.value,values:[],type:18};;){var h=this.consumeToken();if(h.type===32||h.type===3)return p;this.reconsumeToken(h),p.values.push(this.consumeComponentValue())}},d.prototype.consumeToken=function(){var u=this._tokens.shift();return typeof u=="undefined"?Fr:u},d.prototype.reconsumeToken=function(u){this._tokens.unshift(u)},d}(),Dr=function(d){return d.type===15},Xr=function(d){return d.type===17},ti=function(d){return d.type===20},rr=function(d){return d.type===0},_r=function(d,u){return ti(d)&&d.value===u},Er=function(d){return d.type!==31},ui=function(d){return d.type!==31&&d.type!==4},fi=function(d){var u=[],p=[];return d.forEach(function(h){if(h.type===4){if(p.length===0)throw new Error("Error parsing function args, zero tokens for arg");u.push(p),p=[];return}h.type!==31&&p.push(h)}),p.length&&u.push(p),u},Gi=function(d,u){return u===11&&d.type===12||u===28&&d.type===29?!0:u===2&&d.type===3},as=function(d){return d.type===17||d.type===15},Bi=function(d){return d.type===16||as(d)},ls=function(d){return d.length>1?[d[0],d[1]]:[d[0]]},gi={type:17,number:0,flags:Hr},la={type:16,number:50,flags:Hr},Ms={type:16,number:100,flags:Hr},ws=function(d,u,p){var h=d[0],F=d[1];return[Fi(h,u),Fi(typeof F!="undefined"?F:h,p)]},Fi=function(d,u){if(d.type===16)return d.number/100*u;if(Dr(d))switch(d.unit){case"rem":case"em":return 16*d.number;case"px":default:return d.number}return d.number},ra="deg",Es="grad",Ws="rad",Qs="turn",js={name:"angle",parse:function(d,u){if(u.type===15)switch(u.unit){case ra:return Math.PI*u.number/180;case Es:return Math.PI/200*u.number;case Ws:return u.number;case Qs:return Math.PI*2*u.number}throw new Error("Unsupported angle type")}},Ys=function(d){return d.type===15&&(d.unit===ra||d.unit===Es||d.unit===Ws||d.unit===Qs)},pa=function(d){var u=d.filter(ti).map(function(p){return p.value}).join(" ");switch(u){case"to bottom right":case"to right bottom":case"left top":case"top left":return[gi,gi];case"to top":case"bottom":return ms(0);case"to bottom left":case"to left bottom":case"right top":case"top right":return[gi,Ms];case"to right":case"left":return ms(90);case"to top left":case"to left top":case"right bottom":case"bottom right":return[Ms,Ms];case"to bottom":case"top":return ms(180);case"to top right":case"to right top":case"left bottom":case"bottom left":return[Ms,gi];case"to left":case"right":return ms(270)}return 0},ms=function(d){return Math.PI*d/180},Xs={name:"color",parse:function(d,u){if(u.type===18){var p=oi[u.name];if(typeof p=="undefined")throw new Error('Attempting to parse an unsupported color function "'+u.name+'"');return p(d,u.values)}if(u.type===5){if(u.value.length===3){var h=u.value.substring(0,1),F=u.value.substring(1,2),Z=u.value.substring(2,3);return Os(parseInt(h+h,16),parseInt(F+F,16),parseInt(Z+Z,16),1)}if(u.value.length===4){var h=u.value.substring(0,1),F=u.value.substring(1,2),Z=u.value.substring(2,3),ve=u.value.substring(3,4);return Os(parseInt(h+h,16),parseInt(F+F,16),parseInt(Z+Z,16),parseInt(ve+ve,16)/255)}if(u.value.length===6){var h=u.value.substring(0,2),F=u.value.substring(2,4),Z=u.value.substring(4,6);return Os(parseInt(h,16),parseInt(F,16),parseInt(Z,16),1)}if(u.value.length===8){var h=u.value.substring(0,2),F=u.value.substring(2,4),Z=u.value.substring(4,6),ve=u.value.substring(6,8);return Os(parseInt(h,16),parseInt(F,16),parseInt(Z,16),parseInt(ve,16)/255)}}if(u.type===20){var Qe=Mi[u.value.toUpperCase()];if(typeof Qe!="undefined")return Qe}return Mi.TRANSPARENT}},vs=function(d){return(255&d)===0},cs=function(d){var u=255&d,p=255&d>>8,h=255&d>>16,F=255&d>>24;return u<255?"rgba("+F+","+h+","+p+","+u/255+")":"rgb("+F+","+h+","+p+")"},Os=function(d,u,p,h){return(d<<24|u<<16|p<<8|Math.round(h*255)<<0)>>>0},Ds=function(d,u){if(d.type===17)return d.number;if(d.type===16){var p=u===3?1:255;return u===3?d.number/100*p:Math.round(d.number/100*p)}return 0},Js=function(d,u){var p=u.filter(ui);if(p.length===3){var h=p.map(Ds),F=h[0],Z=h[1],ve=h[2];return Os(F,Z,ve,1)}if(p.length===4){var Qe=p.map(Ds),F=Qe[0],Z=Qe[1],ve=Qe[2],Me=Qe[3];return Os(F,Z,ve,Me)}return 0};function hs(d,u,p){return p<0&&(p+=1),p>=1&&(p-=1),p<1/6?(u-d)*p*6+d:p<1/2?u:p<2/3?(u-d)*6*(2/3-p)+d:d}var os=function(d,u){var p=u.filter(ui),h=p[0],F=p[1],Z=p[2],ve=p[3],Qe=(h.type===17?ms(h.number):js.parse(d,h))/(Math.PI*2),Me=Bi(F)?F.number/100:0,Ut=Bi(Z)?Z.number/100:0,$t=typeof ve!="undefined"&&Bi(ve)?Fi(ve,1):1;if(Me===0)return Os(Ut*255,Ut*255,Ut*255,1);var nn=Ut<=.5?Ut*(Me+1):Ut+Me-Ut*Me,Rn=Ut*2-nn,Or=hs(Rn,nn,Qe+1/3),dr=hs(Rn,nn,Qe),Rr=hs(Rn,nn,Qe-1/3);return Os(Or*255,dr*255,Rr*255,$t)},oi={hsl:os,hsla:os,rgb:Js,rgba:Js},Ai=function(d,u){return Xs.parse(d,$r.create(u).parseComponentValue())},Mi={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},Si={name:"background-clip",initialValue:"border-box",prefix:!1,type:1,parse:function(d,u){return u.map(function(p){if(ti(p))switch(p.value){case"padding-box":return 1;case"content-box":return 2}return 0})}},es={name:"background-color",initialValue:"transparent",prefix:!1,type:3,format:"color"},Wi=function(d,u){var p=Xs.parse(d,u[0]),h=u[1];return h&&Bi(h)?{color:p,stop:h}:{color:p,stop:null}},Rs=function(d,u){var p=d[0],h=d[d.length-1];p.stop===null&&(p.stop=gi),h.stop===null&&(h.stop=Ms);for(var F=[],Z=0,ve=0;ve<d.length;ve++){var Qe=d[ve].stop;if(Qe!==null){var Me=Fi(Qe,u);Me>Z?F.push(Me):F.push(Z),Z=Me}else F.push(null)}for(var Ut=null,ve=0;ve<F.length;ve++){var $t=F[ve];if($t===null)Ut===null&&(Ut=ve);else if(Ut!==null){for(var nn=ve-Ut,Rn=F[Ut-1],Or=($t-Rn)/(nn+1),dr=1;dr<=nn;dr++)F[Ut+dr-1]=Or*dr;Ut=null}}return d.map(function(Rr,xi){var Jr=Rr.color;return{color:Jr,stop:Math.max(Math.min(1,F[xi]/u),0)}})},Ls=function(d,u,p){var h=u/2,F=p/2,Z=Fi(d[0],u)-h,ve=F-Fi(d[1],p);return(Math.atan2(ve,Z)+Math.PI*2)%(Math.PI*2)},Ps=function(d,u,p){var h=typeof d=="number"?d:Ls(d,u,p),F=Math.abs(u*Math.sin(h))+Math.abs(p*Math.cos(h)),Z=u/2,ve=p/2,Qe=F/2,Me=Math.sin(h-Math.PI/2)*Qe,Ut=Math.cos(h-Math.PI/2)*Qe;return[F,Z-Ut,Z+Ut,ve-Me,ve+Me]},Ui=function(d,u){return Math.sqrt(d*d+u*u)},xs=function(d,u,p,h,F){var Z=[[0,0],[0,u],[d,0],[d,u]];return Z.reduce(function(ve,Qe){var Me=Qe[0],Ut=Qe[1],$t=Ui(p-Me,h-Ut);return(F?$t<ve.optimumDistance:$t>ve.optimumDistance)?{optimumCorner:Qe,optimumDistance:$t}:ve},{optimumDistance:F?1/0:-1/0,optimumCorner:null}).optimumCorner},Gs=function(d,u,p,h,F){var Z=0,ve=0;switch(d.size){case 0:d.shape===0?Z=ve=Math.min(Math.abs(u),Math.abs(u-h),Math.abs(p),Math.abs(p-F)):d.shape===1&&(Z=Math.min(Math.abs(u),Math.abs(u-h)),ve=Math.min(Math.abs(p),Math.abs(p-F)));break;case 2:if(d.shape===0)Z=ve=Math.min(Ui(u,p),Ui(u,p-F),Ui(u-h,p),Ui(u-h,p-F));else if(d.shape===1){var Qe=Math.min(Math.abs(p),Math.abs(p-F))/Math.min(Math.abs(u),Math.abs(u-h)),Me=xs(h,F,u,p,!0),Ut=Me[0],$t=Me[1];Z=Ui(Ut-u,($t-p)/Qe),ve=Qe*Z}break;case 1:d.shape===0?Z=ve=Math.max(Math.abs(u),Math.abs(u-h),Math.abs(p),Math.abs(p-F)):d.shape===1&&(Z=Math.max(Math.abs(u),Math.abs(u-h)),ve=Math.max(Math.abs(p),Math.abs(p-F)));break;case 3:if(d.shape===0)Z=ve=Math.max(Ui(u,p),Ui(u,p-F),Ui(u-h,p),Ui(u-h,p-F));else if(d.shape===1){var Qe=Math.max(Math.abs(p),Math.abs(p-F))/Math.max(Math.abs(u),Math.abs(u-h)),nn=xs(h,F,u,p,!1),Ut=nn[0],$t=nn[1];Z=Ui(Ut-u,($t-p)/Qe),ve=Qe*Z}break}return Array.isArray(d.size)&&(Z=Fi(d.size[0],h),ve=d.size.length===2?Fi(d.size[1],F):Z),[Z,ve]},$s=function(d,u){var p=ms(180),h=[];return fi(u).forEach(function(F,Z){if(Z===0){var ve=F[0];if(ve.type===20&&ve.value==="to"){p=pa(F);return}else if(Ys(ve)){p=js.parse(d,ve);return}}var Qe=Wi(d,F);h.push(Qe)}),{angle:p,stops:h,type:1}},ia=function(d,u){var p=ms(180),h=[];return fi(u).forEach(function(F,Z){if(Z===0){var ve=F[0];if(ve.type===20&&["top","left","right","bottom"].indexOf(ve.value)!==-1){p=pa(F);return}else if(Ys(ve)){p=(js.parse(d,ve)+ms(270))%ms(360);return}}var Qe=Wi(d,F);h.push(Qe)}),{angle:p,stops:h,type:1}},ua=function(d,u){var p=ms(180),h=[],F=1,Z=0,ve=3,Qe=[];return fi(u).forEach(function(Me,Ut){var $t=Me[0];if(Ut===0){if(ti($t)&&$t.value==="linear"){F=1;return}else if(ti($t)&&$t.value==="radial"){F=2;return}}if($t.type===18){if($t.name==="from"){var nn=Xs.parse(d,$t.values[0]);h.push({stop:gi,color:nn})}else if($t.name==="to"){var nn=Xs.parse(d,$t.values[0]);h.push({stop:Ms,color:nn})}else if($t.name==="color-stop"){var Rn=$t.values.filter(ui);if(Rn.length===2){var nn=Xs.parse(d,Rn[1]),Or=Rn[0];Xr(Or)&&h.push({stop:{type:16,number:Or.number*100,flags:Or.flags},color:nn})}}}}),F===1?{angle:(p+ms(180))%ms(360),stops:h,type:F}:{size:ve,shape:Z,stops:h,position:Qe,type:F}},ts="closest-side",Di="farthest-side",$i="closest-corner",_s="farthest-corner",ji="circle",Ts="ellipse",gs="cover",ys="contain",Ga=function(d,u){var p=0,h=3,F=[],Z=[];return fi(u).forEach(function(ve,Qe){var Me=!0;if(Qe===0){var Ut=!1;Me=ve.reduce(function(nn,Rn){if(Ut)if(ti(Rn))switch(Rn.value){case"center":return Z.push(la),nn;case"top":case"left":return Z.push(gi),nn;case"right":case"bottom":return Z.push(Ms),nn}else(Bi(Rn)||as(Rn))&&Z.push(Rn);else if(ti(Rn))switch(Rn.value){case ji:return p=0,!1;case Ts:return p=1,!1;case"at":return Ut=!0,!1;case ts:return h=0,!1;case gs:case Di:return h=1,!1;case ys:case $i:return h=2,!1;case _s:return h=3,!1}else if(as(Rn)||Bi(Rn))return Array.isArray(h)||(h=[]),h.push(Rn),!1;return nn},Me)}if(Me){var $t=Wi(d,ve);F.push($t)}}),{size:h,shape:p,stops:F,position:Z,type:2}},Fn=function(d,u){var p=0,h=3,F=[],Z=[];return fi(u).forEach(function(ve,Qe){var Me=!0;if(Qe===0?Me=ve.reduce(function($t,nn){if(ti(nn))switch(nn.value){case"center":return Z.push(la),!1;case"top":case"left":return Z.push(gi),!1;case"right":case"bottom":return Z.push(Ms),!1}else if(Bi(nn)||as(nn))return Z.push(nn),!1;return $t},Me):Qe===1&&(Me=ve.reduce(function($t,nn){if(ti(nn))switch(nn.value){case ji:return p=0,!1;case Ts:return p=1,!1;case ys:case ts:return h=0,!1;case Di:return h=1,!1;case $i:return h=2,!1;case gs:case _s:return h=3,!1}else if(as(nn)||Bi(nn))return Array.isArray(h)||(h=[]),h.push(nn),!1;return $t},Me)),Me){var Ut=Wi(d,ve);F.push(Ut)}}),{size:h,shape:p,stops:F,position:Z,type:2}},sa=function(d){return d.type===1},ma=function(d){return d.type===2},Zs={name:"image",parse:function(d,u){if(u.type===22){var p={url:u.value,type:0};return d.cache.addImage(u.value),p}if(u.type===18){var h=Za[u.name];if(typeof h=="undefined")throw new Error('Attempting to parse an unsupported image function "'+u.name+'"');return h(d,u.values)}throw new Error("Unsupported image type "+u.type)}};function $a(d){return!(d.type===20&&d.value==="none")&&(d.type!==18||!!Za[d.name])}var Za={"linear-gradient":$s,"-moz-linear-gradient":ia,"-ms-linear-gradient":ia,"-o-linear-gradient":ia,"-webkit-linear-gradient":ia,"radial-gradient":Ga,"-moz-radial-gradient":Fn,"-ms-radial-gradient":Fn,"-o-radial-gradient":Fn,"-webkit-radial-gradient":Fn,"-webkit-gradient":ua},Xa={name:"background-image",initialValue:"none",type:1,prefix:!1,parse:function(d,u){if(u.length===0)return[];var p=u[0];return p.type===20&&p.value==="none"?[]:u.filter(function(h){return ui(h)&&$a(h)}).map(function(h){return Zs.parse(d,h)})}},co={name:"background-origin",initialValue:"border-box",prefix:!1,type:1,parse:function(d,u){return u.map(function(p){if(ti(p))switch(p.value){case"padding-box":return 1;case"content-box":return 2}return 0})}},Uo={name:"background-position",initialValue:"0% 0%",type:1,prefix:!1,parse:function(d,u){return fi(u).map(function(p){return p.filter(Bi)}).map(ls)}},Ja={name:"background-repeat",initialValue:"repeat",prefix:!1,type:1,parse:function(d,u){return fi(u).map(function(p){return p.filter(ti).map(function(h){return h.value}).join(" ")}).map(Ca)}},Ca=function(d){switch(d){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}},Ns;(function(d){d.AUTO="auto",d.CONTAIN="contain",d.COVER="cover"})(Ns||(Ns={}));var Va={name:"background-size",initialValue:"0",prefix:!1,type:1,parse:function(d,u){return fi(u).map(function(p){return p.filter(ns)})}},ns=function(d){return ti(d)||Bi(d)},xa=function(d){return{name:"border-"+d+"-color",initialValue:"transparent",prefix:!1,type:3,format:"color"}},fo=xa("top"),ho=xa("right"),qa=xa("bottom"),eo=xa("left"),va=function(d){return{name:"border-radius-"+d,initialValue:"0 0",prefix:!1,type:1,parse:function(u,p){return ls(p.filter(Bi))}}},go=va("top-left"),to=va("top-right"),ca=va("bottom-right"),La=va("bottom-left"),Ua=function(d){return{name:"border-"+d+"-style",initialValue:"solid",prefix:!1,type:2,parse:function(u,p){switch(p){case"none":return 0;case"dashed":return 2;case"dotted":return 3;case"double":return 4}return 1}}},za=Ua("top"),wi=Ua("right"),Ci=Ua("bottom"),Bs=Ua("left"),Ss=function(d){return{name:"border-"+d+"-width",initialValue:"0",type:0,prefix:!1,parse:function(u,p){return Dr(p)?p.number:0}}},bs=Ss("top"),Sa=Ss("right"),_a=Ss("bottom"),Ta=Ss("left"),Ia={name:"color",initialValue:"transparent",prefix:!1,type:3,format:"color"},po={name:"direction",initialValue:"ltr",prefix:!1,type:2,parse:function(d,u){switch(u){case"rtl":return 1;case"ltr":default:return 0}}},Al={name:"display",initialValue:"inline-block",prefix:!1,type:1,parse:function(d,u){return u.filter(ti).reduce(function(p,h){return p|ll(h.value)},0)}},ll=function(d){switch(d){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},ul={name:"float",initialValue:"none",prefix:!1,type:2,parse:function(d,u){switch(u){case"left":return 1;case"right":return 2;case"inline-start":return 3;case"inline-end":return 4}return 0}},cl={name:"letter-spacing",initialValue:"0",prefix:!1,type:0,parse:function(d,u){return u.type===20&&u.value==="normal"?0:u.type===17||u.type===15?u.number:0}},ko;(function(d){d.NORMAL="normal",d.STRICT="strict"})(ko||(ko={}));var fl={name:"line-break",initialValue:"normal",prefix:!1,type:2,parse:function(d,u){switch(u){case"strict":return ko.STRICT;case"normal":default:return ko.NORMAL}}},dl={name:"line-height",initialValue:"normal",prefix:!1,type:4},xA=function(d,u){return ti(d)&&d.value==="normal"?1.2*u:d.type===17?u*d.number:Bi(d)?Fi(d,u):u},Oo={name:"list-style-image",initialValue:"none",type:0,prefix:!1,parse:function(d,u){return u.type===20&&u.value==="none"?null:Zs.parse(d,u)}},hl={name:"list-style-position",initialValue:"outside",prefix:!1,type:2,parse:function(d,u){switch(u){case"inside":return 0;case"outside":default:return 1}}},Po={name:"list-style-type",initialValue:"none",prefix:!1,type:2,parse:function(d,u){switch(u){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}}},qs=function(d){return{name:"margin-"+d,initialValue:"0",prefix:!1,type:4}},gl=qs("top"),iA=qs("right"),Vs=qs("bottom"),ya=qs("left"),sA={name:"overflow",initialValue:"visible",prefix:!1,type:1,parse:function(d,u){return u.filter(ti).map(function(p){switch(p.value){case"hidden":return 1;case"scroll":return 2;case"clip":return 3;case"auto":return 4;case"visible":default:return 0}})}},mo={name:"overflow-wrap",initialValue:"normal",prefix:!1,type:2,parse:function(d,u){switch(u){case"break-word":return"break-word";case"normal":default:return"normal"}}},Fa=function(d){return{name:"padding-"+d,initialValue:"0",prefix:!1,type:3,format:"length-percentage"}},aA=Fa("top"),pl=Fa("right"),SA=Fa("bottom"),ml=Fa("left"),no={name:"text-align",initialValue:"left",prefix:!1,type:2,parse:function(d,u){switch(u){case"right":return 2;case"center":case"justify":return 1;case"left":default:return 0}}},Mo={name:"position",initialValue:"static",prefix:!1,type:2,parse:function(d,u){switch(u){case"relative":return 1;case"absolute":return 2;case"fixed":return 3;case"sticky":return 4}return 0}},oA={name:"text-shadow",initialValue:"none",type:1,prefix:!1,parse:function(d,u){return u.length===1&&_r(u[0],"none")?[]:fi(u).map(function(p){for(var h={color:Mi.TRANSPARENT,offsetX:gi,offsetY:gi,blur:gi},F=0,Z=0;Z<p.length;Z++){var ve=p[Z];as(ve)?(F===0?h.offsetX=ve:F===1?h.offsetY=ve:h.blur=ve,F++):h.color=Xs.parse(d,ve)}return h})}},TA={name:"text-transform",initialValue:"none",prefix:!1,type:2,parse:function(d,u){switch(u){case"uppercase":return 2;case"lowercase":return 1;case"capitalize":return 3}return 0}},vl={name:"transform",initialValue:"none",prefix:!0,type:0,parse:function(d,u){if(u.type===20&&u.value==="none")return null;if(u.type===18){var p=FA[u.name];if(typeof p=="undefined")throw new Error('Attempting to parse an unsupported transform function "'+u.name+'"');return p(u.values)}return null}},IA=function(d){var u=d.filter(function(p){return p.type===17}).map(function(p){return p.number});return u.length===6?u:null},_l=function(d){var u=d.filter(function(Me){return Me.type===17}).map(function(Me){return Me.number}),p=u[0],h=u[1];u[2],u[3];var F=u[4],Z=u[5];u[6],u[7],u[8],u[9],u[10],u[11];var ve=u[12],Qe=u[13];return u[14],u[15],u.length===16?[p,h,F,Z,ve,Qe]:null},FA={matrix:IA,matrix3d:_l},DA={type:16,number:50,flags:Hr},RA=[DA,DA],yl={name:"transform-origin",initialValue:"50% 50%",prefix:!0,type:1,parse:function(d,u){var p=u.filter(Bi);return p.length!==2?RA:[p[0],p[1]]}},wl={name:"visible",initialValue:"none",prefix:!1,type:2,parse:function(d,u){switch(u){case"hidden":return 1;case"collapse":return 2;case"visible":default:return 0}}},vo;(function(d){d.NORMAL="normal",d.BREAK_ALL="break-all",d.KEEP_ALL="keep-all"})(vo||(vo={}));for(var LA={name:"word-break",initialValue:"normal",prefix:!1,type:2,parse:function(d,u){switch(u){case"break-all":return vo.BREAK_ALL;case"keep-all":return vo.KEEP_ALL;case"normal":default:return vo.NORMAL}}},El={name:"z-index",initialValue:"auto",prefix:!1,type:0,parse:function(d,u){if(u.type===20)return{auto:!0,order:0};if(Xr(u))return{auto:!1,order:u.number};throw new Error("Invalid z-index number parsed")}},AA={name:"time",parse:function(d,u){if(u.type===15)switch(u.unit.toLowerCase()){case"s":return 1e3*u.number;case"ms":return u.number}throw new Error("Unsupported time type")}},_o={name:"opacity",initialValue:"1",type:0,prefix:!1,parse:function(d,u){return Xr(u)?u.number:1}},Bl={name:"text-decoration-color",initialValue:"transparent",prefix:!1,type:3,format:"color"},bl={name:"text-decoration-line",initialValue:"none",prefix:!1,type:1,parse:function(d,u){return u.filter(ti).map(function(p){switch(p.value){case"underline":return 1;case"overline":return 2;case"line-through":return 3;case"none":return 4}return 0}).filter(function(p){return p!==0})}},Us={name:"font-family",initialValue:"",prefix:!1,type:1,parse:function(d,u){var p=[],h=[];return u.forEach(function(F){switch(F.type){case 20:case 0:p.push(F.value);break;case 17:p.push(F.number.toString());break;case 4:h.push(p.join(" ")),p.length=0;break}}),p.length&&h.push(p.join(" ")),h.map(function(F){return F.indexOf(" ")===-1?F:"'"+F+"'"})}},ka={name:"font-size",initialValue:"0",prefix:!1,type:3,format:"length"},yo={name:"font-weight",initialValue:"normal",type:0,prefix:!1,parse:function(d,u){if(Xr(u))return u.number;if(ti(u))switch(u.value){case"bold":return 700;case"normal":default:return 400}return 400}},UA={name:"font-variant",initialValue:"none",type:1,prefix:!1,parse:function(d,u){return u.filter(ti).map(function(p){return p.value})}},Cl={name:"font-style",initialValue:"normal",prefix:!1,type:2,parse:function(d,u){switch(u){case"oblique":return"oblique";case"italic":return"italic";case"normal":default:return"normal"}}},Cs=function(d,u){return(d&u)!==0},lA={name:"content",initialValue:"none",type:1,prefix:!1,parse:function(d,u){if(u.length===0)return[];var p=u[0];return p.type===20&&p.value==="none"?[]:u}},wo={name:"counter-increment",initialValue:"none",prefix:!0,type:1,parse:function(d,u){if(u.length===0)return null;var p=u[0];if(p.type===20&&p.value==="none")return null;for(var h=[],F=u.filter(Er),Z=0;Z<F.length;Z++){var ve=F[Z],Qe=F[Z+1];if(ve.type===20){var Me=Qe&&Xr(Qe)?Qe.number:1;h.push({counter:ve.value,increment:Me})}}return h}},kA={name:"counter-reset",initialValue:"none",prefix:!0,type:1,parse:function(d,u){if(u.length===0)return[];for(var p=[],h=u.filter(Er),F=0;F<h.length;F++){var Z=h[F],ve=h[F+1];if(ti(Z)&&Z.value!=="none"){var Qe=ve&&Xr(ve)?ve.number:0;p.push({counter:Z.value,reset:Qe})}}return p}},Da={name:"duration",initialValue:"0s",prefix:!1,type:1,parse:function(d,u){return u.filter(Dr).map(function(p){return AA.parse(d,p)})}},tn={name:"quotes",initialValue:"none",prefix:!0,type:1,parse:function(d,u){if(u.length===0)return null;var p=u[0];if(p.type===20&&p.value==="none")return null;var h=[],F=u.filter(rr);if(F.length%2!==0)return null;for(var Z=0;Z<F.length;Z+=2){var ve=F[Z].value,Qe=F[Z+1].value;h.push({open:ve,close:Qe})}return h}},Qo=function(d,u,p){if(!d)return"";var h=d[Math.min(u,d.length-1)];return h?p?h.open:h.close:""},No={name:"box-shadow",initialValue:"none",type:1,prefix:!1,parse:function(d,u){return u.length===1&&_r(u[0],"none")?[]:fi(u).map(function(p){for(var h={color:255,offsetX:gi,offsetY:gi,blur:gi,spread:gi,inset:!1},F=0,Z=0;Z<p.length;Z++){var ve=p[Z];_r(ve,"inset")?h.inset=!0:as(ve)?(F===0?h.offsetX=ve:F===1?h.offsetY=ve:F===2?h.blur=ve:h.spread=ve,F++):h.color=Xs.parse(d,ve)}return h})}},jl={name:"paint-order",initialValue:"normal",prefix:!1,type:1,parse:function(d,u){var p=[0,1,2],h=[];return u.filter(ti).forEach(function(F){switch(F.value){case"stroke":h.push(1);break;case"fill":h.push(0);break;case"markers":h.push(2);break}}),p.forEach(function(F){h.indexOf(F)===-1&&h.push(F)}),h}},ro={name:"-webkit-text-stroke-color",initialValue:"currentcolor",prefix:!1,type:3,format:"color"},OA={name:"-webkit-text-stroke-width",initialValue:"0",type:0,prefix:!1,parse:function(d,u){return Dr(u)?u.number:0}},PA=function(){function d(u,p){var h,F;this.animationDuration=Mr(u,Da,p.animationDuration),this.backgroundClip=Mr(u,Si,p.backgroundClip),this.backgroundColor=Mr(u,es,p.backgroundColor),this.backgroundImage=Mr(u,Xa,p.backgroundImage),this.backgroundOrigin=Mr(u,co,p.backgroundOrigin),this.backgroundPosition=Mr(u,Uo,p.backgroundPosition),this.backgroundRepeat=Mr(u,Ja,p.backgroundRepeat),this.backgroundSize=Mr(u,Va,p.backgroundSize),this.borderTopColor=Mr(u,fo,p.borderTopColor),this.borderRightColor=Mr(u,ho,p.borderRightColor),this.borderBottomColor=Mr(u,qa,p.borderBottomColor),this.borderLeftColor=Mr(u,eo,p.borderLeftColor),this.borderTopLeftRadius=Mr(u,go,p.borderTopLeftRadius),this.borderTopRightRadius=Mr(u,to,p.borderTopRightRadius),this.borderBottomRightRadius=Mr(u,ca,p.borderBottomRightRadius),this.borderBottomLeftRadius=Mr(u,La,p.borderBottomLeftRadius),this.borderTopStyle=Mr(u,za,p.borderTopStyle),this.borderRightStyle=Mr(u,wi,p.borderRightStyle),this.borderBottomStyle=Mr(u,Ci,p.borderBottomStyle),this.borderLeftStyle=Mr(u,Bs,p.borderLeftStyle),this.borderTopWidth=Mr(u,bs,p.borderTopWidth),this.borderRightWidth=Mr(u,Sa,p.borderRightWidth),this.borderBottomWidth=Mr(u,_a,p.borderBottomWidth),this.borderLeftWidth=Mr(u,Ta,p.borderLeftWidth),this.boxShadow=Mr(u,No,p.boxShadow),this.color=Mr(u,Ia,p.color),this.direction=Mr(u,po,p.direction),this.display=Mr(u,Al,p.display),this.float=Mr(u,ul,p.cssFloat),this.fontFamily=Mr(u,Us,p.fontFamily),this.fontSize=Mr(u,ka,p.fontSize),this.fontStyle=Mr(u,Cl,p.fontStyle),this.fontVariant=Mr(u,UA,p.fontVariant),this.fontWeight=Mr(u,yo,p.fontWeight),this.letterSpacing=Mr(u,cl,p.letterSpacing),this.lineBreak=Mr(u,fl,p.lineBreak),this.lineHeight=Mr(u,dl,p.lineHeight),this.listStyleImage=Mr(u,Oo,p.listStyleImage),this.listStylePosition=Mr(u,hl,p.listStylePosition),this.listStyleType=Mr(u,Po,p.listStyleType),this.marginTop=Mr(u,gl,p.marginTop),this.marginRight=Mr(u,iA,p.marginRight),this.marginBottom=Mr(u,Vs,p.marginBottom),this.marginLeft=Mr(u,ya,p.marginLeft),this.opacity=Mr(u,_o,p.opacity);var Z=Mr(u,sA,p.overflow);this.overflowX=Z[0],this.overflowY=Z[Z.length>1?1:0],this.overflowWrap=Mr(u,mo,p.overflowWrap),this.paddingTop=Mr(u,aA,p.paddingTop),this.paddingRight=Mr(u,pl,p.paddingRight),this.paddingBottom=Mr(u,SA,p.paddingBottom),this.paddingLeft=Mr(u,ml,p.paddingLeft),this.paintOrder=Mr(u,jl,p.paintOrder),this.position=Mr(u,Mo,p.position),this.textAlign=Mr(u,no,p.textAlign),this.textDecorationColor=Mr(u,Bl,(h=p.textDecorationColor)!==null&&h!==void 0?h:p.color),this.textDecorationLine=Mr(u,bl,(F=p.textDecorationLine)!==null&&F!==void 0?F:p.textDecoration),this.textShadow=Mr(u,oA,p.textShadow),this.textTransform=Mr(u,TA,p.textTransform),this.transform=Mr(u,vl,p.transform),this.transformOrigin=Mr(u,yl,p.transformOrigin),this.visibility=Mr(u,wl,p.visibility),this.webkitTextStrokeColor=Mr(u,ro,p.webkitTextStrokeColor),this.webkitTextStrokeWidth=Mr(u,OA,p.webkitTextStrokeWidth),this.wordBreak=Mr(u,LA,p.wordBreak),this.zIndex=Mr(u,El,p.zIndex)}return d.prototype.isVisible=function(){return this.display>0&&this.opacity>0&&this.visibility===0},d.prototype.isTransparent=function(){return vs(this.backgroundColor)},d.prototype.isTransformed=function(){return this.transform!==null},d.prototype.isPositioned=function(){return this.position!==0},d.prototype.isPositionedWithZIndex=function(){return this.isPositioned()&&!this.zIndex.auto},d.prototype.isFloating=function(){return this.float!==0},d.prototype.isInlineLevel=function(){return Cs(this.display,4)||Cs(this.display,33554432)||Cs(this.display,268435456)||Cs(this.display,536870912)||Cs(this.display,67108864)||Cs(this.display,134217728)},d}(),MA=function(){function d(u,p){this.content=Mr(u,lA,p.content),this.quotes=Mr(u,tn,p.quotes)}return d}(),uA=function(){function d(u,p){this.counterIncrement=Mr(u,wo,p.counterIncrement),this.counterReset=Mr(u,kA,p.counterReset)}return d}(),Mr=function(d,u,p){var h=new Gr,F=p!==null&&typeof p!="undefined"?p.toString():u.initialValue;h.write(F);var Z=new $r(h.read());switch(u.type){case 2:var ve=Z.parseComponentValue();return u.parse(d,ti(ve)?ve.value:u.initialValue);case 0:return u.parse(d,Z.parseComponentValue());case 1:return u.parse(d,Z.parseComponentValues());case 4:return Z.parseComponentValue();case 3:switch(u.format){case"angle":return js.parse(d,Z.parseComponentValue());case"color":return Xs.parse(d,Z.parseComponentValue());case"image":return Zs.parse(d,Z.parseComponentValue());case"length":var Qe=Z.parseComponentValue();return as(Qe)?Qe:gi;case"length-percentage":var Me=Z.parseComponentValue();return Bi(Me)?Me:gi;case"time":return AA.parse(d,Z.parseComponentValue())}break}},io="data-html2canvas-debug",cA=function(d){var u=d.getAttribute(io);switch(u){case"all":return 1;case"clone":return 2;case"parse":return 3;case"render":return 4;default:return 0}},fA=function(d,u){var p=cA(d);return p===1||u===p},ea=function(){function d(u,p){if(this.context=u,this.textNodes=[],this.elements=[],this.flags=0,fA(p,3))debugger;this.styles=new PA(u,window.getComputedStyle(p,null)),Ll(p)&&(this.styles.animationDuration.some(function(h){return h>0})&&(p.style.animationDuration="0s"),this.styles.transform!==null&&(p.style.transform="none")),this.bounds=g(this.context,p),fA(p,4)&&(this.flags|=16)}return d}(),aa="AAAAAAAAAAAAEA4AGBkAAFAaAAACAAAAAAAIABAAGAAwADgACAAQAAgAEAAIABAACAAQAAgAEAAIABAACAAQAAgAEAAIABAAQABIAEQATAAIABAACAAQAAgAEAAIABAAVABcAAgAEAAIABAACAAQAGAAaABwAHgAgACIAI4AlgAIABAAmwCjAKgAsAC2AL4AvQDFAMoA0gBPAVYBWgEIAAgACACMANoAYgFkAWwBdAF8AX0BhQGNAZUBlgGeAaMBlQGWAasBswF8AbsBwwF0AcsBYwHTAQgA2wG/AOMBdAF8AekB8QF0AfkB+wHiAHQBfAEIAAMC5gQIAAsCEgIIAAgAFgIeAggAIgIpAggAMQI5AkACygEIAAgASAJQAlgCYAIIAAgACAAKBQoFCgUTBRMFGQUrBSsFCAAIAAgACAAIAAgACAAIAAgACABdAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACABoAmgCrwGvAQgAbgJ2AggAHgEIAAgACADnAXsCCAAIAAgAgwIIAAgACAAIAAgACACKAggAkQKZAggAPADJAAgAoQKkAqwCsgK6AsICCADJAggA0AIIAAgACAAIANYC3gIIAAgACAAIAAgACABAAOYCCAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAkASoB+QIEAAgACAA8AEMCCABCBQgACABJBVAFCAAIAAgACAAIAAgACAAIAAgACABTBVoFCAAIAFoFCABfBWUFCAAIAAgACAAIAAgAbQUIAAgACAAIAAgACABzBXsFfQWFBYoFigWKBZEFigWKBYoFmAWfBaYFrgWxBbkFCAAIAAgACAAIAAgACAAIAAgACAAIAMEFCAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAMgFCADQBQgACAAIAAgACAAIAAgACAAIAAgACAAIAO4CCAAIAAgAiQAIAAgACABAAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAD0AggACAD8AggACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIANYFCAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAMDvwAIAAgAJAIIAAgACAAIAAgACAAIAAgACwMTAwgACAB9BOsEGwMjAwgAKwMyAwsFYgE3A/MEPwMIAEUDTQNRAwgAWQOsAGEDCAAIAAgACAAIAAgACABpAzQFNQU2BTcFOAU5BToFNAU1BTYFNwU4BTkFOgU0BTUFNgU3BTgFOQU6BTQFNQU2BTcFOAU5BToFNAU1BTYFNwU4BTkFOgU0BTUFNgU3BTgFOQU6BTQFNQU2BTcFOAU5BToFNAU1BTYFNwU4BTkFOgU0BTUFNgU3BTgFOQU6BTQFNQU2BTcFOAU5BToFNAU1BTYFNwU4BTkFOgU0BTUFNgU3BTgFOQU6BTQFNQU2BTcFOAU5BToFNAU1BTYFNwU4BTkFOgU0BTUFNgU3BTgFOQU6BTQFNQU2BTcFOAU5BToFNAU1BTYFNwU4BTkFOgU0BTUFNgU3BTgFOQU6BTQFNQU2BTcFOAU5BToFNAU1BTYFNwU4BTkFOgU0BTUFNgU3BTgFOQU6BTQFNQU2BTcFOAU5BToFNAU1BTYFNwU4BTkFOgU0BTUFNgU3BTgFOQU6BTQFNQU2BTcFOAU5BToFNAU1BTYFNwU4BTkFOgU0BTUFNgU3BTgFOQU6BTQFNQU2BTcFOAU5BToFNAU1BTYFNwU4BTkFOgU0BTUFNgU3BTgFOQU6BTQFNQU2BTcFOAU5BToFNAU1BTYFNwU4BTkFOgU0BTUFNgU3BTgFOQU6BTQFNQU2BTcFOAU5BToFNAU1BTYFNwU4BTkFOgU0BTUFNgU3BTgFOQU6BTQFNQU2BTcFOAU5BToFNAU1BTYFNwU4BTkFOgU0BTUFNgU3BTgFOQU6BTQFNQU2BTcFOAU5BToFNAU1BTYFNwU4BTkFOgU0BTUFNgU3BTgFOQU6BTQFNQU2BTcFOAU5BToFNAU1BTYFNwU4BTkFOgU0BTUFNgU3BTgFOQU6BTQFNQU2BTcFOAU5BToFNAU1BTYFNwU4BTkFOgU0BTUFNgU3BTgFOQU6BTQFNQU2BTcFOAU5BToFNAU1BTYFNwU4BTkFIQUoBSwFCAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACABtAwgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACABMAEwACAAIAAgACAAIABgACAAIAAgACAC/AAgACAAyAQgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACACAAIAAwAAgACAAIAAgACAAIAAgACAAIAAAARABIAAgACAAIABQASAAIAAgAIABwAEAAjgCIABsAqAC2AL0AigDQAtwC+IJIQqVAZUBWQqVAZUBlQGVAZUBlQGrC5UBlQGVAZUBlQGVAZUBlQGVAXsKlQGVAbAK6wsrDGUMpQzlDJUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAfAKAAuZA64AtwCJALoC6ADwAAgAuACgA/oEpgO6AqsD+AAIAAgAswMIAAgACAAIAIkAuwP5AfsBwwPLAwgACAAIAAgACADRA9kDCAAIAOED6QMIAAgACAAIAAgACADuA/YDCAAIAP4DyQAIAAgABgQIAAgAXQAOBAgACAAIAAgACAAIABMECAAIAAgACAAIAAgACAD8AAQBCAAIAAgAGgQiBCoECAExBAgAEAEIAAgACAAIAAgACAAIAAgACAAIAAgACAA4BAgACABABEYECAAIAAgATAQYAQgAVAQIAAgACAAIAAgACAAIAAgACAAIAFoECAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgAOQEIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAB+BAcACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAEABhgSMBAgACAAIAAgAlAQIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAwAEAAQABAADAAMAAwADAAQABAAEAAQABAAEAAQABHATAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgAdQMIAAgACAAIAAgACAAIAMkACAAIAAgAfQMIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACACFA4kDCAAIAAgACAAIAOcBCAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAIcDCAAIAAgACAAIAAgACAAIAAgACAAIAJEDCAAIAAgACADFAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACABgBAgAZgQIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgAbAQCBXIECAAIAHkECAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACABAAJwEQACjBKoEsgQIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAC6BMIECAAIAAgACAAIAAgACABmBAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgAxwQIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAGYECAAIAAgAzgQIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgAigWKBYoFigWKBYoFigWKBd0FXwUIAOIF6gXxBYoF3gT5BQAGCAaKBYoFigWKBYoFigWKBYoFigWKBYoFigXWBIoFigWKBYoFigWKBYoFigWKBYsFEAaKBYoFigWKBYoFigWKBRQGCACKBYoFigWKBQgACAAIANEECAAIABgGigUgBggAJgYIAC4GMwaKBYoF0wQ3Bj4GigWKBYoFigWKBYoFigWKBYoFigWKBYoFigUIAAgACAAIAAgACAAIAAgAigWKBYoFigWKBYoFigWKBYoFigWKBYoFigWKBYoFigWKBYoFigWKBYoFigWKBYoFigWKBYoFigWKBYoFigWLBf///////wQABAAEAAQABAAEAAQABAAEAAQAAwAEAAQAAgAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAAAAAAAAAAAAAAAAAAAAAAAAAOAAAAAAAAAAQADgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAFAAUABQAFAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAAAAUAAAAFAAUAAAAFAAUAAAAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABAAEAAQABAAEAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAFAAUABQAFAAUABQAFAAUABQAAAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAFAAUABQAFAAUAAQAAAAUABQAFAAUABQAFAAAAAAAFAAUAAAAFAAUABQAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAEAAAAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAUABQAFAAUABQAFAAUABQAFAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAUABQAFAAUABQAFAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAFAAAAAAAFAAUAAQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABwAFAAUABQAFAAAABwAHAAcAAAAHAAcABwAFAAEAAAAAAAAAAAAAAAAAAAAAAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAHAAcABwAFAAUABQAFAAcABwAFAAUAAAAAAAEAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAHAAAAAQABAAAAAAAAAAAAAAAFAAUABQAFAAAABwAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAHAAcABwAHAAcAAAAHAAcAAAAAAAUABQAHAAUAAQAHAAEABwAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAFAAUABQAFAAUABwABAAUABQAFAAUAAAAAAAAAAAAAAAEAAQABAAEAAQABAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABwAFAAUAAAAAAAAAAAAAAAAABQAFAAUABQAFAAUAAQAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAFAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAQABQANAAQABAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAQABAAEAAQABAAEAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAOAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABAAEAAQABAAEAAQABAAEAAQABAAEAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAEAAQABAAEAAQABAAEAAQABAAAAAAAAAAAAAAAAAAAAAAABQAHAAUABQAFAAAAAAAAAAcABQAFAAUABQAFAAQABAAEAAQABAAEAAQABAAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAFAAUAAAAFAAUABQAFAAUAAAAFAAUABQAAAAUABQAFAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAUABQAAAAAAAAAAAAUABQAFAAcAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAHAAUAAAAHAAcABwAFAAUABQAFAAUABQAFAAUABwAHAAcABwAFAAcABwAAAAUABQAFAAUABQAFAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABwAHAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAAAAUABwAHAAUABQAFAAUAAAAAAAcABwAAAAAABwAHAAUAAAAAAAAAAAAAAAAAAAAAAAAABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAAAAAABQAFAAcAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAAABwAHAAcABQAFAAAAAAAAAAAABQAFAAAAAAAFAAUABQAAAAAAAAAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAAAAAAAAAFAAAAAAAAAAAAAAAAAAAAAAAAAAAABwAFAAUABQAFAAUAAAAFAAUABwAAAAcABwAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAUABQAFAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUAAAAFAAUABwAFAAUABQAFAAAAAAAHAAcAAAAAAAcABwAFAAAAAAAAAAAAAAAAAAAABQAFAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAcABwAAAAAAAAAHAAcABwAAAAcABwAHAAUAAAAAAAAAAAAAAAAAAAAAAAAABQAAAAAAAAAAAAAAAAAAAAAABQAHAAcABwAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABwAHAAcABwAAAAUABQAFAAAABQAFAAUABQAAAAAAAAAAAAAAAAAAAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAAAAcABQAHAAcABQAHAAcAAAAFAAcABwAAAAcABwAFAAUAAAAAAAAAAAAAAAAAAAAFAAUAAAAAAAAAAAAAAAAAAAAAAAAABQAFAAcABwAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAAAAUABwAAAAAAAAAAAAAAAAAAAAAAAAAAAAUAAAAAAAAAAAAFAAcABwAFAAUABQAAAAUAAAAHAAcABwAHAAcABwAHAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUAAAAHAAUABQAFAAUABQAFAAUAAAAAAAAAAAAAAAAAAAAAAAUABQAFAAUABQAFAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAAABwAFAAUABQAFAAUABQAFAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAFAAUABQAFAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAAAAUAAAAFAAAAAAAAAAAABwAHAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABwAFAAUABQAFAAUAAAAFAAUAAAAAAAAAAAAAAAUABQAFAAUABQAFAAUABQAFAAUABQAAAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAFAAUABwAFAAUABQAFAAUABQAAAAUABQAHAAcABQAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAHAAcABQAFAAAAAAAAAAAABQAFAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAUABQAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAAAAcABQAFAAAAAAAAAAAAAAAAAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAFAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAHAAUABQAFAAUABQAFAAUABwAHAAcABwAHAAcABwAHAAUABwAHAAUABQAFAAUABQAFAAUABQAFAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAFAAUABwAHAAcABwAFAAUABwAHAAcAAAAAAAAAAAAHAAcABQAHAAcABwAHAAcABwAFAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAFAAcABwAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAcABQAHAAUABQAFAAUABQAFAAUAAAAFAAAABQAAAAAABQAFAAUABQAFAAUABQAFAAcABwAHAAcABwAHAAUABQAFAAUABQAFAAUABQAFAAUAAAAAAAUABQAFAAUABQAHAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAFAAUABQAFAAUABwAFAAcABwAHAAcABwAFAAcABwAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAUABQAFAAUABQAFAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAUABwAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAHAAUABQAFAAUABwAHAAUABQAHAAUABQAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAcABQAFAAcABwAHAAUABwAFAAUABQAHAAcAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABwAHAAcABwAHAAcABwAHAAUABQAFAAUABQAFAAUABQAHAAcABQAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAFAAUAAAAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAcABQAFAAUABQAFAAUABQAAAAAAAAAAAAUAAAAAAAAAAAAAAAAABQAAAAAABwAFAAUAAAAAAAAAAAAAAAAABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAAABQAFAAUABQAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAFAAUABQAFAAUADgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAOAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAFAAUAAAAFAAUABQAFAAUABQAFAAUABQAFAAAAAAAAAAAABQAAAAAAAAAFAAAAAAAAAAAABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABwAHAAUABQAHAAAAAAAAAAAABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAcABwAHAAcABQAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUAAAAAAAAAAAAAAAAABQAFAAUABQAFAAUABQAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAFAAUABQAFAAUABQAFAAUABQAHAAcAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAcABwAFAAUABQAFAAcABwAFAAUABwAHAAAAAAAAAAAAAAAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAFAAUABQAFAAcABwAFAAUABwAHAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAAAAAAAAAAAAAAAAAAAAAAFAAcAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUAAAAFAAUABQAAAAAABQAFAAAAAAAAAAAAAAAFAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAcABQAFAAcABwAAAAAAAAAAAAAABwAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAcABwAFAAcABwAFAAcABwAAAAcABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAFAAUABQAAAAAAAAAAAAAAAAAFAAUABQAAAAUABQAAAAAAAAAAAAAABQAFAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAUABQAAAAAAAAAAAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAcABQAHAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAUABQAFAAUABwAFAAUABQAFAAUABQAFAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABwAHAAcABQAFAAUABQAFAAUABQAFAAUABwAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAHAAcABwAFAAUABQAHAAcABQAHAAUABQAAAAAAAAAAAAAAAAAFAAAABwAHAAcABQAFAAUABQAFAAUABQAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABwAHAAcABwAAAAAABwAHAAAAAAAHAAcABwAAAAAAAAAAAAAAAAAAAAAAAAAFAAAAAAAAAAAAAAAAAAAAAAAAAAAABwAHAAAAAAAFAAUABQAFAAUABQAFAAAAAAAAAAUABQAFAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAHAAcABwAFAAUABQAFAAUABQAFAAUABwAHAAUABQAFAAcABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAHAAcABQAFAAUABQAFAAUABwAFAAcABwAFAAcABQAFAAcABQAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAHAAcABQAFAAUABQAAAAAABwAHAAcABwAFAAUABwAFAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAcABwAHAAUABQAFAAUABQAFAAUABQAHAAcABQAHAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABwAFAAcABwAFAAUABQAFAAUABQAHAAUAAAAAAAAAAAAAAAAAAAAAAAcABwAFAAUABQAFAAcABQAFAAUABQAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAHAAcABwAFAAUABQAFAAUABQAFAAUABQAHAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAHAAcABwAFAAUABQAFAAAAAAAFAAUABwAHAAcABwAFAAAAAAAAAAcAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAUABQAFAAUABQAFAAUABQAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUAAAAAAAAAAAAAAAAAAAAAAAAABQAFAAUABQAFAAUABwAHAAUABQAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAcABQAFAAUABQAFAAUABQAAAAUABQAFAAUABQAFAAcABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAAAAHAAUABQAFAAUABQAFAAUABwAFAAUABwAFAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAFAAUABQAFAAUAAAAAAAAABQAAAAUABQAAAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAHAAcABwAHAAcAAAAFAAUAAAAHAAcABQAHAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAUABwAHAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAUABQAFAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAUABQAFAAUABQAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAAAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAAAAAAAAAAAAAAAAAAABQAFAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAcABwAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAAAAUABQAFAAAAAAAFAAUABQAFAAUABQAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAFAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAFAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAAAAAAAAAAABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAAAAAAAAAAAAAAAAAAAAAAFAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAFAAUABQAAAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAFAAUABQAFAAUABQAAAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAAAAAABQAFAAUABQAFAAUABQAAAAUABQAAAAUABQAFAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAUABQAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAFAAUABQAFAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAFAAUABQAFAAUADgAOAA4ADgAOAA4ADwAPAA8ADwAPAA8ADwAPAA8ADwAPAA8ADwAPAA8ADwAPAA8ADwAPAA8ADwAPAA8ADwAPAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAcABwAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABwAHAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAAAAAAAAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAKAAoACgAKAAoACgAKAAoACgAKAAoACgAKAAoACgAKAAoACgAKAAoACgAKAAoACgAMAAwADAAMAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkAAAAAAAAAAAAKAAoACgAKAAoACgAKAAoACgAKAAoACgAKAAoACgAKAAoACgAKAAoACgAKAAoACgAKAAoACgAKAAoACgAKAAoACgAAAAAAAAAAAAsADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwACwAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAAAAAADgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA4AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAOAA4ADgAOAA4ADgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAADgAOAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA4ADgAAAAAAAAAAAAAAAAAAAAAADgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAADgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAADgAOAA4ADgAOAA4ADgAOAA4ADgAOAAAAAAAAAAAADgAOAA4AAAAAAAAAAAAAAAAAAAAOAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAADgAOAAAAAAAAAAAAAAAAAAAAAAAAAAAADgAAAAAAAAAAAAAAAAAAAAAAAAAOAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAADgAOAA4ADgAAAA4ADgAOAA4ADgAOAAAADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4AAAAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAAAAAAAAAAAAAAAAAAAAAAAAAAAADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4AAAAAAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAAAA4AAAAOAAAAAAAAAAAAAAAAAA4AAAAAAAAAAAAAAAAADgAAAAAAAAAAAAAAAAAAAAAAAAAAAA4ADgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAADgAAAAAADgAAAAAAAAAAAA4AAAAOAAAAAAAAAAAADgAOAA4AAAAOAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAOAA4ADgAOAA4AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAOAA4ADgAAAAAAAAAAAAAAAAAAAAAAAAAOAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAOAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAOAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAOAA4AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA4ADgAOAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAADgAOAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAADgAAAAAAAAAAAA4AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAOAAAADgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAOAA4ADgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA4ADgAOAA4ADgAOAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA4ADgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAADgAAAAAADgAOAA4ADgAOAA4ADgAOAA4ADgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAAAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAAAAAAAAAAAAAAAAAAAAAAAAAAAADgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA4AAAAAAA4ADgAOAA4ADgAOAA4ADgAOAAAADgAOAA4ADgAAAAAAAAAAAAAAAAAAAAAAAAAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4AAAAAAAAAAAAAAAAADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAOAA4ADgAOAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAADgAOAA4ADgAOAA4ADgAOAAAAAAAAAAAAAAAAAAAAAAAAAAAADgAOAA4ADgAOAA4AAAAAAAAAAAAAAAAAAAAAAA4ADgAOAA4ADgAOAA4ADgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4AAAAOAA4ADgAOAA4ADgAAAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4AAAAAAAAAAAA=",QA="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",so=typeof Uint8Array=="undefined"?[]:new Uint8Array(256),Ho=0;Ho<QA.length;Ho++)so[QA.charCodeAt(Ho)]=Ho;for(var xl=function(d){var u=d.length*.75,p=d.length,h,F=0,Z,ve,Qe,Me;d[d.length-1]==="="&&(u--,d[d.length-2]==="="&&u--);var Ut=typeof ArrayBuffer!="undefined"&&typeof Uint8Array!="undefined"&&typeof Uint8Array.prototype.slice!="undefined"?new ArrayBuffer(u):new Array(u),$t=Array.isArray(Ut)?Ut:new Uint8Array(Ut);for(h=0;h<p;h+=4)Z=so[d.charCodeAt(h)],ve=so[d.charCodeAt(h+1)],Qe=so[d.charCodeAt(h+2)],Me=so[d.charCodeAt(h+3)],$t[F++]=Z<<2|ve>>4,$t[F++]=(ve&15)<<4|Qe>>2,$t[F++]=(Qe&3)<<6|Me&63;return Ut},Ko=function(d){for(var u=d.length,p=[],h=0;h<u;h+=2)p.push(d[h+1]<<8|d[h]);return p},NA=function(d){for(var u=d.length,p=[],h=0;h<u;h+=4)p.push(d[h+3]<<24|d[h+2]<<16|d[h+1]<<8|d[h]);return p},Oa=5,Hs=11,Eo=2,dA=Hs-Oa,HA=65536>>Oa,Go=1<<Oa,Pa=Go-1,KA=1024>>Oa,GA=HA+KA,$A=GA,hA=32,ZA=$A+hA,Yl=65536>>Hs,$o=1<<dA,VA=$o-1,ks=function(d,u,p){return d.slice?d.slice(u,p):new Uint16Array(Array.prototype.slice.call(d,u,p))},Bo=function(d,u,p){return d.slice?d.slice(u,p):new Uint32Array(Array.prototype.slice.call(d,u,p))},zA=function(d,u){var p=xl(d),h=Array.isArray(p)?NA(p):new Uint32Array(p),F=Array.isArray(p)?Ko(p):new Uint16Array(p),Z=24,ve=ks(F,Z/2,h[4]/2),Qe=h[5]===2?ks(F,(Z+h[4])/2):Bo(h,Math.ceil((Z+h[4])/4));return new gA(h[0],h[1],h[2],h[3],ve,Qe)},gA=function(){function d(u,p,h,F,Z,ve){this.initialValue=u,this.errorValue=p,this.highStart=h,this.highValueIndex=F,this.index=Z,this.data=ve}return d.prototype.get=function(u){var p;if(u>=0){if(u<55296||u>56319&&u<=65535)return p=this.index[u>>Oa],p=(p<<Eo)+(u&Pa),this.data[p];if(u<=65535)return p=this.index[HA+(u-55296>>Oa)],p=(p<<Eo)+(u&Pa),this.data[p];if(u<this.highStart)return p=ZA-Yl+(u>>Hs),p=this.index[p],p+=u>>Oa&VA,p=this.index[p],p=(p<<Eo)+(u&Pa),this.data[p];if(u<=1114111)return this.data[this.highValueIndex]}return this.errorValue},d}(),ao="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",Zo=typeof Uint8Array=="undefined"?[]:new Uint8Array(256),Vo=0;Vo<ao.length;Vo++)Zo[ao.charCodeAt(Vo)]=Vo;var Sl=1,zo=2,WA=3,bo=4,Wo=5,Xl=7,Ks=8,jA=9,jo=10,fa=11,Tl=12,Il=13,l=14,I=15,v=function(d){for(var u=[],p=0,h=d.length;p<h;){var F=d.charCodeAt(p++);if(F>=55296&&F<=56319&&p<h){var Z=d.charCodeAt(p++);(Z&64512)===56320?u.push(((F&1023)<<10)+(Z&1023)+65536):(u.push(F),p--)}else u.push(F)}return u},z=function(){for(var d=[],u=0;u<arguments.length;u++)d[u]=arguments[u];if(String.fromCodePoint)return String.fromCodePoint.apply(String,d);var p=d.length;if(!p)return"";for(var h=[],F=-1,Z="";++F<p;){var ve=d[F];ve<=65535?h.push(ve):(ve-=65536,h.push((ve>>10)+55296,ve%1024+56320)),(F+1===p||h.length>16384)&&(Z+=String.fromCharCode.apply(String,h),h.length=0)}return Z},ce=zA(aa),_e="\xD7",Pt="\xF7",Et=function(d){return ce.get(d)},er=function(d,u,p){var h=p-2,F=u[h],Z=u[p-1],ve=u[p];if(Z===zo&&ve===WA)return _e;if(Z===zo||Z===WA||Z===bo||ve===zo||ve===WA||ve===bo)return Pt;if(Z===Ks&&[Ks,jA,fa,Tl].indexOf(ve)!==-1||(Z===fa||Z===jA)&&(ve===jA||ve===jo)||(Z===Tl||Z===jo)&&ve===jo||ve===Il||ve===Wo||ve===Xl||Z===Sl)return _e;if(Z===Il&&ve===l){for(;F===Wo;)F=u[--h];if(F===l)return _e}if(Z===I&&ve===I){for(var Qe=0;F===I;)Qe++,F=u[--h];if(Qe%2===0)return _e}return Pt},pt=function(d){var u=v(d),p=u.length,h=0,F=0,Z=u.map(Et);return{next:function(){if(h>=p)return{done:!0,value:null};for(var ve=_e;h<p&&(ve=er(u,Z,++h))===_e;);if(ve!==_e||h===p){var Qe=z.apply(null,u.slice(F,h));return F=h,{value:Qe,done:!1}}return{done:!0,value:null}}}},Zt=function(d){for(var u=pt(d),p=[],h;!(h=u.next()).done;)h.value&&p.push(h.value.slice());return p},Pr=function(d){var u=123;if(d.createRange){var p=d.createRange();if(p.getBoundingClientRect){var h=d.createElement("boundtest");h.style.height=u+"px",h.style.display="block",d.body.appendChild(h),p.selectNode(h);var F=p.getBoundingClientRect(),Z=Math.round(F.height);if(d.body.removeChild(h),Z===u)return!0}}return!1},Ar=function(d){var u=d.createElement("boundtest");u.style.width="50px",u.style.display="block",u.style.fontSize="12px",u.style.letterSpacing="0px",u.style.wordSpacing="0px",d.body.appendChild(u);var p=d.createRange();u.innerHTML=typeof"".repeat=="function"?"👨".repeat(10):"";var h=u.firstChild,F=le(h.data).map(function(Me){return o(Me)}),Z=0,ve={},Qe=F.every(function(Me,Ut){p.setStart(h,Z),p.setEnd(h,Z+Me.length);var $t=p.getBoundingClientRect();Z+=Me.length;var nn=$t.x>ve.x||$t.y>ve.y;return ve=$t,Ut===0?!0:nn});return d.body.removeChild(u),Qe},Gn=function(){return typeof new Image().crossOrigin!="undefined"},zr=function(){return typeof new XMLHttpRequest().responseType=="string"},Yi=function(d){var u=new Image,p=d.createElement("canvas"),h=p.getContext("2d");if(!h)return!1;u.src="data:image/svg+xml,<svg xmlns='http://www.w3.org/2000/svg'></svg>";try{h.drawImage(u,0,0),p.toDataURL()}catch(F){return!1}return!0},Ei=function(d){return d[0]===0&&d[1]===255&&d[2]===0&&d[3]===255},pi=function(d){var u=d.createElement("canvas"),p=100;u.width=p,u.height=p;var h=u.getContext("2d");if(!h)return Promise.reject(!1);h.fillStyle="rgb(0, 255, 0)",h.fillRect(0,0,p,p);var F=new Image,Z=u.toDataURL();F.src=Z;var ve=Ri(p,p,0,0,F);return h.fillStyle="red",h.fillRect(0,0,p,p),di(ve).then(function(Qe){h.drawImage(Qe,0,0);var Me=h.getImageData(0,0,p,p).data;h.fillStyle="red",h.fillRect(0,0,p,p);var Ut=d.createElement("div");return Ut.style.backgroundImage="url("+Z+")",Ut.style.height=p+"px",Ei(Me)?di(Ri(p,p,0,0,Ut)):Promise.reject(!1)}).then(function(Qe){return h.drawImage(Qe,0,0),Ei(h.getImageData(0,0,p,p).data)}).catch(function(){return!1})},Ri=function(d,u,p,h,F){var Z="http://www.w3.org/2000/svg",ve=document.createElementNS(Z,"svg"),Qe=document.createElementNS(Z,"foreignObject");return ve.setAttributeNS(null,"width",d.toString()),ve.setAttributeNS(null,"height",u.toString()),Qe.setAttributeNS(null,"width","100%"),Qe.setAttributeNS(null,"height","100%"),Qe.setAttributeNS(null,"x",p.toString()),Qe.setAttributeNS(null,"y",h.toString()),Qe.setAttributeNS(null,"externalResourcesRequired","true"),ve.appendChild(Qe),Qe.appendChild(F),ve},di=function(d){return new Promise(function(u,p){var h=new Image;h.onload=function(){return u(h)},h.onerror=p,h.src="data:image/svg+xml;charset=utf-8,"+encodeURIComponent(new XMLSerializer().serializeToString(d))})},nr={get SUPPORT_RANGE_BOUNDS(){var d=Pr(document);return Object.defineProperty(nr,"SUPPORT_RANGE_BOUNDS",{value:d}),d},get SUPPORT_WORD_BREAKING(){var d=nr.SUPPORT_RANGE_BOUNDS&&Ar(document);return Object.defineProperty(nr,"SUPPORT_WORD_BREAKING",{value:d}),d},get SUPPORT_SVG_DRAWING(){var d=Yi(document);return Object.defineProperty(nr,"SUPPORT_SVG_DRAWING",{value:d}),d},get SUPPORT_FOREIGNOBJECT_DRAWING(){var d=typeof Array.from=="function"&&typeof window.fetch=="function"?pi(document):Promise.resolve(!1);return Object.defineProperty(nr,"SUPPORT_FOREIGNOBJECT_DRAWING",{value:d}),d},get SUPPORT_CORS_IMAGES(){var d=Gn();return Object.defineProperty(nr,"SUPPORT_CORS_IMAGES",{value:d}),d},get SUPPORT_RESPONSE_TYPE(){var d=zr();return Object.defineProperty(nr,"SUPPORT_RESPONSE_TYPE",{value:d}),d},get SUPPORT_CORS_XHR(){var d="withCredentials"in new XMLHttpRequest;return Object.defineProperty(nr,"SUPPORT_CORS_XHR",{value:d}),d},get SUPPORT_NATIVE_TEXT_SEGMENTATION(){var d=!!(typeof Intl!="undefined"&&Intl.Segmenter);return Object.defineProperty(nr,"SUPPORT_NATIVE_TEXT_SEGMENTATION",{value:d}),d}},bi=function(){function d(u,p){this.text=u,this.bounds=p}return d}(),As=function(d,u,p,h){var F=ki(u,p),Z=[],ve=0;return F.forEach(function(Qe){if(p.textDecorationLine.length||Qe.trim().length>0)if(nr.SUPPORT_RANGE_BOUNDS){var Me=Xi(h,ve,Qe.length).getClientRects();if(Me.length>1){var Ut=Ti(Qe),$t=0;Ut.forEach(function(Rn){Z.push(new bi(Rn,G.fromDOMRectList(d,Xi(h,$t+ve,Rn.length).getClientRects()))),$t+=Rn.length})}else Z.push(new bi(Qe,G.fromDOMRectList(d,Me)))}else{var nn=h.splitText(Qe.length);Z.push(new bi(Qe,ri(d,h))),h=nn}else nr.SUPPORT_RANGE_BOUNDS||(h=h.splitText(Qe.length));ve+=Qe.length}),Z},ri=function(d,u){var p=u.ownerDocument;if(p){var h=p.createElement("html2canvaswrapper");h.appendChild(u.cloneNode(!0));var F=u.parentNode;if(F){F.replaceChild(h,u);var Z=g(d,h);return h.firstChild&&F.replaceChild(h.firstChild,h),Z}}return G.EMPTY},Xi=function(d,u,p){var h=d.ownerDocument;if(!h)throw new Error("Node has no owner document");var F=h.createRange();return F.setStart(d,u),F.setEnd(d,u+p),F},Ti=function(d){if(nr.SUPPORT_NATIVE_TEXT_SEGMENTATION){var u=new Intl.Segmenter(void 0,{granularity:"grapheme"});return Array.from(u.segment(d)).map(function(p){return p.segment})}return Zt(d)},yi=function(d,u){if(nr.SUPPORT_NATIVE_TEXT_SEGMENTATION){var p=new Intl.Segmenter(void 0,{granularity:"word"});return Array.from(p.segment(d)).map(function(h){return h.segment})}return pA(d,u)},ki=function(d,u){return u.letterSpacing!==0?Ti(d):yi(d,u)},Wa=[32,160,4961,65792,65793,4153,4241],pA=function(d,u){for(var p=fn(d,{lineBreak:u.lineBreak,wordBreak:u.overflowWrap==="break-word"?"break-word":u.wordBreak}),h=[],F,Z=function(){if(F.value){var ve=F.value.slice(),Qe=le(ve),Me="";Qe.forEach(function(Ut){Wa.indexOf(Ut)===-1?Me+=o(Ut):(Me.length&&h.push(Me),h.push(o(Ut)),Me="")}),Me.length&&h.push(Me)}};!(F=p.next()).done;)Z();return h},ta=function(){function d(u,p,h){this.text=fs(p.data,h.textTransform),this.textBounds=As(u,this.text,h,p)}return d}(),fs=function(d,u){switch(u){case 1:return d.toLowerCase();case 3:return d.replace(Co,oo);case 2:return d.toUpperCase();default:return d}},Co=/(^|\s|:|-|\(|\))([a-z])/g,oo=function(d,u,p){return d.length>0?u+p.toUpperCase():d},Jl=function(d){x(u,d);function u(p,h){var F=d.call(this,p,h)||this;return F.src=h.currentSrc||h.src,F.intrinsicWidth=h.naturalWidth,F.intrinsicHeight=h.naturalHeight,F.context.cache.addImage(F.src),F}return u}(ea),ql=function(d){x(u,d);function u(p,h){var F=d.call(this,p,h)||this;return F.canvas=h,F.intrinsicWidth=h.width,F.intrinsicHeight=h.height,F}return u}(ea),eu=function(d){x(u,d);function u(p,h){var F=d.call(this,p,h)||this,Z=new XMLSerializer,ve=g(p,h);return h.setAttribute("width",ve.width+"px"),h.setAttribute("height",ve.height+"px"),F.svg="data:image/svg+xml,"+encodeURIComponent(Z.serializeToString(h)),F.intrinsicWidth=h.width.baseVal.value,F.intrinsicHeight=h.height.baseVal.value,F.context.cache.addImage(F.svg),F}return u}(ea),tu=function(d){x(u,d);function u(p,h){var F=d.call(this,p,h)||this;return F.value=h.value,F}return u}(ea),Fl=function(d){x(u,d);function u(p,h){var F=d.call(this,p,h)||this;return F.start=h.start,F.reversed=typeof h.reversed=="boolean"&&h.reversed===!0,F}return u}(ea),Hu=[{type:15,flags:0,unit:"px",number:3}],nu=[{type:16,flags:0,number:50}],Ku=function(d){return d.width>d.height?new G(d.left+(d.width-d.height)/2,d.top,d.height,d.height):d.width<d.height?new G(d.left,d.top+(d.height-d.width)/2,d.width,d.width):d},YA=function(d){var u=d.type===Ic?new Array(d.value.length+1).join("\u2022"):d.value;return u.length===0?d.placeholder||"":u},Yo="checkbox",xo="radio",Ic="password",ru=707406591,XA=function(d){x(u,d);function u(p,h){var F=d.call(this,p,h)||this;switch(F.type=h.type.toLowerCase(),F.checked=h.checked,F.value=YA(h),(F.type===Yo||F.type===xo)&&(F.styles.backgroundColor=3739148031,F.styles.borderTopColor=F.styles.borderRightColor=F.styles.borderBottomColor=F.styles.borderLeftColor=2779096575,F.styles.borderTopWidth=F.styles.borderRightWidth=F.styles.borderBottomWidth=F.styles.borderLeftWidth=1,F.styles.borderTopStyle=F.styles.borderRightStyle=F.styles.borderBottomStyle=F.styles.borderLeftStyle=1,F.styles.backgroundClip=[0],F.styles.backgroundOrigin=[0],F.bounds=Ku(F.bounds)),F.type){case Yo:F.styles.borderTopRightRadius=F.styles.borderTopLeftRadius=F.styles.borderBottomRightRadius=F.styles.borderBottomLeftRadius=Hu;break;case xo:F.styles.borderTopRightRadius=F.styles.borderTopLeftRadius=F.styles.borderBottomRightRadius=F.styles.borderBottomLeftRadius=nu;break}return F}return u}(ea),Dl=function(d){x(u,d);function u(p,h){var F=d.call(this,p,h)||this,Z=h.options[h.selectedIndex||0];return F.value=Z&&Z.text||"",F}return u}(ea),JA=function(d){x(u,d);function u(p,h){var F=d.call(this,p,h)||this;return F.value=h.value,F}return u}(ea),iu=function(d){x(u,d);function u(p,h){var F=d.call(this,p,h)||this;F.src=h.src,F.width=parseInt(h.width,10)||0,F.height=parseInt(h.height,10)||0,F.backgroundColor=F.styles.backgroundColor;try{if(h.contentWindow&&h.contentWindow.document&&h.contentWindow.document.documentElement){F.tree=Rl(p,h.contentWindow.document.documentElement);var Z=h.contentWindow.document.documentElement?Ai(p,getComputedStyle(h.contentWindow.document.documentElement).backgroundColor):Mi.TRANSPARENT,ve=h.contentWindow.document.body?Ai(p,getComputedStyle(h.contentWindow.document.body).backgroundColor):Mi.TRANSPARENT;F.backgroundColor=vs(Z)?vs(ve)?F.styles.backgroundColor:ve:Z}}catch(Qe){}return F}return u}(ea),Gu=["OL","UL","MENU"],So=function(d,u,p,h){for(var F=u.firstChild,Z=void 0;F;F=Z)if(Z=F.nextSibling,au(F)&&F.data.trim().length>0)p.textNodes.push(new ta(d,F,p.styles));else if(Xo(F))if(To(F)&&F.assignedNodes)F.assignedNodes().forEach(function(Qe){return So(d,Qe,p,h)});else{var ve=su(d,F);ve.styles.isVisible()&&($u(F,ve,h)?ve.flags|=4:Zu(ve.styles)&&(ve.flags|=2),Gu.indexOf(F.tagName)!==-1&&(ve.flags|=8),p.elements.push(ve),F.slot,F.shadowRoot?So(d,F.shadowRoot,ve,h):!mA(F)&&!Au(F)&&!vA(F)&&So(d,F,ve,h))}},su=function(d,u){return Ol(u)?new Jl(d,u):lu(u)?new ql(d,u):Au(u)?new eu(d,u):ou(u)?new tu(d,u):Vu(u)?new Fl(d,u):zu(u)?new XA(d,u):vA(u)?new Dl(d,u):mA(u)?new JA(d,u):uu(u)?new iu(d,u):new ea(d,u)},Rl=function(d,u){var p=su(d,u);return p.flags|=4,So(d,u,p,p),p},$u=function(d,u,p){return u.styles.isPositionedWithZIndex()||u.styles.opacity<1||u.styles.isTransformed()||Ul(d)&&p.styles.isTransparent()},Zu=function(d){return d.isPositioned()||d.isFloating()},au=function(d){return d.nodeType===Node.TEXT_NODE},Xo=function(d){return d.nodeType===Node.ELEMENT_NODE},Ll=function(d){return Xo(d)&&typeof d.style!="undefined"&&!qA(d)},qA=function(d){return typeof d.className=="object"},ou=function(d){return d.tagName==="LI"},Vu=function(d){return d.tagName==="OL"},zu=function(d){return d.tagName==="INPUT"},Wu=function(d){return d.tagName==="HTML"},Au=function(d){return d.tagName==="svg"},Ul=function(d){return d.tagName==="BODY"},lu=function(d){return d.tagName==="CANVAS"},kl=function(d){return d.tagName==="VIDEO"},Ol=function(d){return d.tagName==="IMG"},uu=function(d){return d.tagName==="IFRAME"},cu=function(d){return d.tagName==="STYLE"},ju=function(d){return d.tagName==="SCRIPT"},mA=function(d){return d.tagName==="TEXTAREA"},vA=function(d){return d.tagName==="SELECT"},To=function(d){return d.tagName==="SLOT"},wa=function(d){return d.tagName.indexOf("-")>0},fu=function(){function d(){this.counters={}}return d.prototype.getCounterValue=function(u){var p=this.counters[u];return p&&p.length?p[p.length-1]:1},d.prototype.getCounterValues=function(u){var p=this.counters[u];return p||[]},d.prototype.pop=function(u){var p=this;u.forEach(function(h){return p.counters[h].pop()})},d.prototype.parse=function(u){var p=this,h=u.counterIncrement,F=u.counterReset,Z=!0;h!==null&&h.forEach(function(Qe){var Me=p.counters[Qe.counter];Me&&Qe.increment!==0&&(Z=!1,Me.length||Me.push(1),Me[Math.max(0,Me.length-1)]+=Qe.increment)});var ve=[];return Z&&F.forEach(function(Qe){var Me=p.counters[Qe.counter];ve.push(Qe.counter),Me||(Me=p.counters[Qe.counter]=[]),Me.push(Qe.reset)}),ve},d}(),du={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"]},Pl={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"]},hu={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"]},Jo={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"]},Ao=function(d,u,p,h,F,Z){return d<u||d>p?Io(d,F,Z.length>0):h.integers.reduce(function(ve,Qe,Me){for(;d>=Qe;)d-=Qe,ve+=h.values[Me];return ve},"")+Z},gu=function(d,u,p,h){var F="";do p||d--,F=h(d)+F,d/=u;while(d*u>=u);return F},Is=function(d,u,p,h,F){var Z=p-u+1;return(d<0?"-":"")+(gu(Math.abs(d),Z,h,function(ve){return o(Math.floor(ve%Z)+u)})+F)},Ma=function(d,u,p){p===void 0&&(p=". ");var h=u.length;return gu(Math.abs(d),h,!1,function(F){return u[Math.floor(F%h)]})+p},qo=1,lo=2,Ea=4,Qa=8,Ba=function(d,u,p,h,F,Z){if(d<-9999||d>9999)return Io(d,4,F.length>0);var ve=Math.abs(d),Qe=F;if(ve===0)return u[0]+Qe;for(var Me=0;ve>0&&Me<=4;Me++){var Ut=ve%10;Ut===0&&Cs(Z,qo)&&Qe!==""?Qe=u[Ut]+Qe:Ut>1||Ut===1&&Me===0||Ut===1&&Me===1&&Cs(Z,lo)||Ut===1&&Me===1&&Cs(Z,Ea)&&d>100||Ut===1&&Me>1&&Cs(Z,Qa)?Qe=u[Ut]+(Me>0?p[Me-1]:"")+Qe:Ut===1&&Me>0&&(Qe=p[Me-1]+Qe),ve=Math.floor(ve/10)}return(d<0?h:"")+Qe},pu="\u5341\u767E\u5343\u842C",mu="\u62FE\u4F70\u4EDF\u842C",el="\u30DE\u30A4\u30CA\u30B9",tl="\uB9C8\uC774\uB108\uC2A4",Io=function(d,u,p){var h=p?". ":"",F=p?"\u3001":"",Z=p?", ":"",ve=p?" ":"";switch(u){case 0:return"\u2022"+ve;case 1:return"\u25E6"+ve;case 2:return"\u25FE"+ve;case 5:var Qe=Is(d,48,57,!0,h);return Qe.length<4?"0"+Qe:Qe;case 4:return Ma(d,"\u3007\u4E00\u4E8C\u4E09\u56DB\u4E94\u516D\u4E03\u516B\u4E5D",F);case 6:return Ao(d,1,3999,du,3,h).toLowerCase();case 7:return Ao(d,1,3999,du,3,h);case 8:return Is(d,945,969,!1,h);case 9:return Is(d,97,122,!1,h);case 10:return Is(d,65,90,!1,h);case 11:return Is(d,1632,1641,!0,h);case 12:case 49:return Ao(d,1,9999,Pl,3,h);case 35:return Ao(d,1,9999,Pl,3,h).toLowerCase();case 13:return Is(d,2534,2543,!0,h);case 14:case 30:return Is(d,6112,6121,!0,h);case 15:return Ma(d,"\u5B50\u4E11\u5BC5\u536F\u8FB0\u5DF3\u5348\u672A\u7533\u9149\u620C\u4EA5",F);case 16:return Ma(d,"\u7532\u4E59\u4E19\u4E01\u620A\u5DF1\u5E9A\u8F9B\u58EC\u7678",F);case 17:case 48:return Ba(d,"\u96F6\u4E00\u4E8C\u4E09\u56DB\u4E94\u516D\u4E03\u516B\u4E5D",pu,"\u8CA0",F,lo|Ea|Qa);case 47:return Ba(d,"\u96F6\u58F9\u8CB3\u53C3\u8086\u4F0D\u9678\u67D2\u634C\u7396",mu,"\u8CA0",F,qo|lo|Ea|Qa);case 42:return Ba(d,"\u96F6\u4E00\u4E8C\u4E09\u56DB\u4E94\u516D\u4E03\u516B\u4E5D",pu,"\u8D1F",F,lo|Ea|Qa);case 41:return Ba(d,"\u96F6\u58F9\u8D30\u53C1\u8086\u4F0D\u9646\u67D2\u634C\u7396",mu,"\u8D1F",F,qo|lo|Ea|Qa);case 26:return Ba(d,"\u3007\u4E00\u4E8C\u4E09\u56DB\u4E94\u516D\u4E03\u516B\u4E5D","\u5341\u767E\u5343\u4E07",el,F,0);case 25:return Ba(d,"\u96F6\u58F1\u5F10\u53C2\u56DB\u4F0D\u516D\u4E03\u516B\u4E5D","\u62FE\u767E\u5343\u4E07",el,F,qo|lo|Ea);case 31:return Ba(d,"\uC601\uC77C\uC774\uC0BC\uC0AC\uC624\uC721\uCE60\uD314\uAD6C","\uC2ED\uBC31\uCC9C\uB9CC",tl,Z,qo|lo|Ea);case 33:return Ba(d,"\u96F6\u4E00\u4E8C\u4E09\u56DB\u4E94\u516D\u4E03\u516B\u4E5D","\u5341\u767E\u5343\u842C",tl,Z,0);case 32:return Ba(d,"\u96F6\u58F9\u8CB3\u53C3\u56DB\u4E94\u516D\u4E03\u516B\u4E5D","\u62FE\u767E\u5343",tl,Z,qo|lo|Ea);case 18:return Is(d,2406,2415,!0,h);case 20:return Ao(d,1,19999,Jo,3,h);case 21:return Is(d,2790,2799,!0,h);case 22:return Is(d,2662,2671,!0,h);case 22:return Ao(d,1,10999,hu,3,h);case 23:return Ma(d,"\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 Ma(d,"\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 Is(d,3302,3311,!0,h);case 28:return Ma(d,"\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",F);case 29:return Ma(d,"\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",F);case 34:return Is(d,3792,3801,!0,h);case 37:return Is(d,6160,6169,!0,h);case 38:return Is(d,4160,4169,!0,h);case 39:return Is(d,2918,2927,!0,h);case 40:return Is(d,1776,1785,!0,h);case 43:return Is(d,3046,3055,!0,h);case 44:return Is(d,3174,3183,!0,h);case 45:return Is(d,3664,3673,!0,h);case 46:return Is(d,3872,3881,!0,h);case 3:default:return Is(d,48,57,!0,h)}},vu="data-html2canvas-ignore",Fo=function(){function d(u,p,h){if(this.context=u,this.options=h,this.scrolledElements=[],this.referenceElement=p,this.counters=new fu,this.quoteDepth=0,!p.ownerDocument)throw new Error("Cloned element does not have an owner document");this.documentElement=this.cloneNode(p.ownerDocument.documentElement,!1)}return d.prototype.toIFrame=function(u,p){var h=this,F=_u(u,p);if(!F.contentWindow)return Promise.reject("Unable to find iframe window");var Z=u.defaultView.pageXOffset,ve=u.defaultView.pageYOffset,Qe=F.contentWindow,Me=Qe.document,Ut=Xu(F).then(function(){return fe(h,void 0,void 0,function(){var $t,nn;return Ce(this,function(Rn){switch(Rn.label){case 0:return this.scrolledElements.forEach(qu),Qe&&(Qe.scrollTo(p.left,p.top),/(iPad|iPhone|iPod)/g.test(navigator.userAgent)&&(Qe.scrollY!==p.top||Qe.scrollX!==p.left)&&(this.context.logger.warn("Unable to restore scroll position for cloned document"),this.context.windowBounds=this.context.windowBounds.add(Qe.scrollX-p.left,Qe.scrollY-p.top,0,0))),$t=this.options.onclone,nn=this.clonedReferenceElement,typeof nn=="undefined"?[2,Promise.reject("Error finding the "+this.referenceElement.nodeName+" in the cloned document")]:Me.fonts&&Me.fonts.ready?[4,Me.fonts.ready]:[3,2];case 1:Rn.sent(),Rn.label=2;case 2:return/(AppleWebKit)/g.test(navigator.userAgent)?[4,Ra(Me)]:[3,4];case 3:Rn.sent(),Rn.label=4;case 4:return typeof $t=="function"?[2,Promise.resolve().then(function(){return $t(Me,nn)}).then(function(){return F})]:[2,F]}})})});return Me.open(),Me.write(Ju(document.doctype)+"<html></html>"),wu(this.referenceElement.ownerDocument,Z,ve),Me.replaceChild(Me.adoptNode(this.documentElement),Me.documentElement),Me.close(),Ut},d.prototype.createElementClone=function(u){if(fA(u,2))debugger;if(lu(u))return this.createCanvasClone(u);if(kl(u))return this.createVideoClone(u);if(cu(u))return this.createStyleClone(u);var p=u.cloneNode(!1);return Ol(p)&&(Ol(u)&&u.currentSrc&&u.currentSrc!==u.src&&(p.src=u.currentSrc,p.srcset=""),p.loading==="lazy"&&(p.loading="eager")),wa(p)?this.createCustomElementClone(p):p},d.prototype.createCustomElementClone=function(u){var p=document.createElement("html2canvascustomelement");return eA(u.style,p),p},d.prototype.createStyleClone=function(u){try{var p=u.sheet;if(p&&p.cssRules){var h=[].slice.call(p.cssRules,0).reduce(function(Z,ve){return ve&&typeof ve.cssText=="string"?Z+ve.cssText:Z},""),F=u.cloneNode(!1);return F.textContent=h,F}}catch(Z){if(this.context.logger.error("Unable to access cssRules property",Z),Z.name!=="SecurityError")throw Z}return u.cloneNode(!1)},d.prototype.createCanvasClone=function(u){var p;if(this.options.inlineImages&&u.ownerDocument){var h=u.ownerDocument.createElement("img");try{return h.src=u.toDataURL(),h}catch(Ut){this.context.logger.info("Unable to inline canvas contents, canvas is tainted",u)}}var F=u.cloneNode(!1);try{F.width=u.width,F.height=u.height;var Z=u.getContext("2d"),ve=F.getContext("2d");if(ve)if(!this.options.allowTaint&&Z)ve.putImageData(Z.getImageData(0,0,u.width,u.height),0,0);else{var Qe=(p=u.getContext("webgl2"))!==null&&p!==void 0?p:u.getContext("webgl");if(Qe){var Me=Qe.getContextAttributes();(Me==null?void 0:Me.preserveDrawingBuffer)===!1&&this.context.logger.warn("Unable to clone WebGL context as it has preserveDrawingBuffer=false",u)}ve.drawImage(u,0,0)}return F}catch(Ut){this.context.logger.info("Unable to clone canvas as it is tainted",u)}return F},d.prototype.createVideoClone=function(u){var p=u.ownerDocument.createElement("canvas");p.width=u.offsetWidth,p.height=u.offsetHeight;var h=p.getContext("2d");try{return h&&(h.drawImage(u,0,0,p.width,p.height),this.options.allowTaint||h.getImageData(0,0,p.width,p.height)),p}catch(Z){this.context.logger.info("Unable to clone video as it is tainted",u)}var F=u.ownerDocument.createElement("canvas");return F.width=u.offsetWidth,F.height=u.offsetHeight,F},d.prototype.appendChildNode=function(u,p,h){(!Xo(p)||!ju(p)&&!p.hasAttribute(vu)&&(typeof this.options.ignoreElements!="function"||!this.options.ignoreElements(p)))&&(!this.options.copyStyles||!Xo(p)||!cu(p))&&u.appendChild(this.cloneNode(p,h))},d.prototype.cloneChildNodes=function(u,p,h){for(var F=this,Z=u.shadowRoot?u.shadowRoot.firstChild:u.firstChild;Z;Z=Z.nextSibling)if(Xo(Z)&&To(Z)&&typeof Z.assignedNodes=="function"){var ve=Z.assignedNodes();ve.length&&ve.forEach(function(Qe){return F.appendChildNode(p,Qe,h)})}else this.appendChildNode(p,Z,h)},d.prototype.cloneNode=function(u,p){if(au(u))return document.createTextNode(u.data);if(!u.ownerDocument)return u.cloneNode(!1);var h=u.ownerDocument.defaultView;if(h&&Xo(u)&&(Ll(u)||qA(u))){var F=this.createElementClone(u);F.style.transitionProperty="none";var Z=h.getComputedStyle(u),ve=h.getComputedStyle(u,":before"),Qe=h.getComputedStyle(u,":after");this.referenceElement===u&&Ll(F)&&(this.clonedReferenceElement=F),Ul(F)&&nc(F);var Me=this.counters.parse(new uA(this.context,Z)),Ut=this.resolvePseudoContent(u,F,ve,_A.BEFORE);wa(u)&&(p=!0),kl(u)||this.cloneChildNodes(u,F,p),Ut&&F.insertBefore(Ut,F.firstChild);var $t=this.resolvePseudoContent(u,F,Qe,_A.AFTER);return $t&&F.appendChild($t),this.counters.pop(Me),(Z&&(this.options.copyStyles||qA(u))&&!uu(u)||p)&&eA(Z,F),(u.scrollTop!==0||u.scrollLeft!==0)&&this.scrolledElements.push([F,u.scrollLeft,u.scrollTop]),(mA(u)||vA(u))&&(mA(F)||vA(F))&&(F.value=u.value),F}return u.cloneNode(!1)},d.prototype.resolvePseudoContent=function(u,p,h,F){var Z=this;if(h){var ve=h.content,Qe=p.ownerDocument;if(!(!Qe||!ve||ve==="none"||ve==="-moz-alt-content"||h.display==="none")){this.counters.parse(new uA(this.context,h));var Me=new MA(this.context,h),Ut=Qe.createElement("html2canvaspseudoelement");eA(h,Ut),Me.content.forEach(function(nn){if(nn.type===0)Ut.appendChild(Qe.createTextNode(nn.value));else if(nn.type===22){var Rn=Qe.createElement("img");Rn.src=nn.value,Rn.style.opacity="1",Ut.appendChild(Rn)}else if(nn.type===18){if(nn.name==="attr"){var Or=nn.values.filter(ti);Or.length&&Ut.appendChild(Qe.createTextNode(u.getAttribute(Or[0].value)||""))}else if(nn.name==="counter"){var dr=nn.values.filter(ui),Rr=dr[0],xi=dr[1];if(Rr&&ti(Rr)){var Jr=Z.counters.getCounterValue(Rr.value),Wr=xi&&ti(xi)?Po.parse(Z.context,xi.value):3;Ut.appendChild(Qe.createTextNode(Io(Jr,Wr,!1)))}}else if(nn.name==="counters"){var Zi=nn.values.filter(ui),Rr=Zi[0],Ii=Zi[1],xi=Zi[2];if(Rr&&ti(Rr)){var vi=Z.counters.getCounterValues(Rr.value),Qr=xi&&ti(xi)?Po.parse(Z.context,xi.value):3,Ni=Ii&&Ii.type===0?Ii.value:"",Hi=vi.map(function(zs){return Io(zs,Qr,!1)}).join(Ni);Ut.appendChild(Qe.createTextNode(Hi))}}}else if(nn.type===20)switch(nn.value){case"open-quote":Ut.appendChild(Qe.createTextNode(Qo(Me.quotes,Z.quoteDepth++,!0)));break;case"close-quote":Ut.appendChild(Qe.createTextNode(Qo(Me.quotes,--Z.quoteDepth,!1)));break;default:Ut.appendChild(Qe.createTextNode(nn.value))}}),Ut.className=nl+" "+da;var $t=F===_A.BEFORE?" "+nl:" "+da;return qA(p)?p.className.baseValue+=$t:p.className+=$t,Ut}}},d.destroy=function(u){return u.parentNode?(u.parentNode.removeChild(u),!0):!1},d}(),_A;(function(d){d[d.BEFORE=0]="BEFORE",d[d.AFTER=1]="AFTER"})(_A||(_A={}));var _u=function(d,u){var p=d.createElement("iframe");return p.className="html2canvas-container",p.style.visibility="hidden",p.style.position="fixed",p.style.left="-10000px",p.style.top="0px",p.style.border="0",p.width=u.width.toString(),p.height=u.height.toString(),p.scrolling="no",p.setAttribute(vu,"true"),d.body.appendChild(p),p},Yu=function(d){return new Promise(function(u){if(d.complete){u();return}if(!d.src){u();return}d.onload=u,d.onerror=u})},Ra=function(d){return Promise.all([].slice.call(d.images,0).map(Yu))},Xu=function(d){return new Promise(function(u,p){var h=d.contentWindow;if(!h)return p("No window assigned for iframe");var F=h.document;h.onload=d.onload=function(){h.onload=d.onload=null;var Z=setInterval(function(){F.body.childNodes.length>0&&F.readyState==="complete"&&(clearInterval(Z),u(d))},50)}})},yu=["all","d","content"],eA=function(d,u){for(var p=d.length-1;p>=0;p--){var h=d.item(p);yu.indexOf(h)===-1&&u.style.setProperty(h,d.getPropertyValue(h))}return u},Ju=function(d){var u="";return d&&(u+="<!DOCTYPE ",d.name&&(u+=d.name),d.internalSubset&&(u+=d.internalSubset),d.publicId&&(u+='"'+d.publicId+'"'),d.systemId&&(u+='"'+d.systemId+'"'),u+=">"),u},wu=function(d,u,p){d&&d.defaultView&&(u!==d.defaultView.pageXOffset||p!==d.defaultView.pageYOffset)&&d.defaultView.scrollTo(u,p)},qu=function(d){var u=d[0],p=d[1],h=d[2];u.scrollLeft=p,u.scrollTop=h},ec=":before",tc=":after",nl="___html2canvas___pseudoelement_before",da="___html2canvas___pseudoelement_after",Na=`{
|
|
content: "" !important;
|
|
display: none !important;
|
|
}`,nc=function(d){rc(d,"."+nl+ec+Na+`
|
|
.`+da+tc+Na)},rc=function(d,u){var p=d.ownerDocument;if(p){var h=p.createElement("style");h.textContent=u,d.appendChild(h)}},Eu=function(){function d(){}return d.getOrigin=function(u){var p=d._link;return p?(p.href=u,p.href=p.href,p.protocol+p.hostname+p.port):"about:blank"},d.isSameOrigin=function(u){return d.getOrigin(u)===d._origin},d.setContext=function(u){d._link=u.document.createElement("a"),d._origin=d.getOrigin(u.location.href)},d._origin="about:blank",d}(),ic=function(){function d(u,p){this.context=u,this._options=p,this._cache={}}return d.prototype.addImage=function(u){var p=Promise.resolve();return this.has(u)||(yA(u)||Bu(u))&&(this._cache[u]=this.loadImage(u)).catch(function(){}),p},d.prototype.match=function(u){return this._cache[u]},d.prototype.loadImage=function(u){return fe(this,void 0,void 0,function(){var p,h,F,Z,ve=this;return Ce(this,function(Qe){switch(Qe.label){case 0:return p=Eu.isSameOrigin(u),h=!Ml(u)&&this._options.useCORS===!0&&nr.SUPPORT_CORS_IMAGES&&!p,F=!Ml(u)&&!p&&!yA(u)&&typeof this._options.proxy=="string"&&nr.SUPPORT_CORS_XHR&&!h,!p&&this._options.allowTaint===!1&&!Ml(u)&&!yA(u)&&!F&&!h?[2]:(Z=u,F?[4,this.proxy(Z)]:[3,2]);case 1:Z=Qe.sent(),Qe.label=2;case 2:return this.context.logger.debug("Added image "+u.substring(0,256)),[4,new Promise(function(Me,Ut){var $t=new Image;$t.onload=function(){return Me($t)},$t.onerror=Ut,(oc(Z)||h)&&($t.crossOrigin="anonymous"),$t.src=Z,$t.complete===!0&&setTimeout(function(){return Me($t)},500),ve._options.imageTimeout>0&&setTimeout(function(){return Ut("Timed out ("+ve._options.imageTimeout+"ms) loading image")},ve._options.imageTimeout)})];case 3:return[2,Qe.sent()]}})})},d.prototype.has=function(u){return typeof this._cache[u]!="undefined"},d.prototype.keys=function(){return Promise.resolve(Object.keys(this._cache))},d.prototype.proxy=function(u){var p=this,h=this._options.proxy;if(!h)throw new Error("No proxy defined");var F=u.substring(0,256);return new Promise(function(Z,ve){var Qe=nr.SUPPORT_RESPONSE_TYPE?"blob":"text",Me=new XMLHttpRequest;Me.onload=function(){if(Me.status===200)if(Qe==="text")Z(Me.response);else{var nn=new FileReader;nn.addEventListener("load",function(){return Z(nn.result)},!1),nn.addEventListener("error",function(Rn){return ve(Rn)},!1),nn.readAsDataURL(Me.response)}else ve("Failed to proxy resource "+F+" with status code "+Me.status)},Me.onerror=ve;var Ut=h.indexOf("?")>-1?"&":"?";if(Me.open("GET",""+h+Ut+"url="+encodeURIComponent(u)+"&responseType="+Qe),Qe!=="text"&&Me instanceof XMLHttpRequest&&(Me.responseType=Qe),p._options.imageTimeout){var $t=p._options.imageTimeout;Me.timeout=$t,Me.ontimeout=function(){return ve("Timed out ("+$t+"ms) proxying "+F)}}Me.send()})},d}(),sc=/^data:image\/svg\+xml/i,ac=/^data:image\/.*;base64,/i,Do=/^data:image\/.*/i,Bu=function(d){return nr.SUPPORT_SVG_DRAWING||!bu(d)},Ml=function(d){return Do.test(d)},oc=function(d){return ac.test(d)},yA=function(d){return d.substr(0,4)==="blob"},bu=function(d){return d.substr(-3).toLowerCase()==="svg"||sc.test(d)},kr=function(){function d(u,p){this.type=0,this.x=u,this.y=p}return d.prototype.add=function(u,p){return new d(this.x+u,this.y+p)},d}(),ja=function(d,u,p){return new kr(d.x+(u.x-d.x)*p,d.y+(u.y-d.y)*p)},rl=function(){function d(u,p,h,F){this.type=1,this.start=u,this.startControl=p,this.endControl=h,this.end=F}return d.prototype.subdivide=function(u,p){var h=ja(this.start,this.startControl,u),F=ja(this.startControl,this.endControl,u),Z=ja(this.endControl,this.end,u),ve=ja(h,F,u),Qe=ja(F,Z,u),Me=ja(ve,Qe,u);return p?new d(this.start,h,ve,Me):new d(Me,Qe,Z,this.end)},d.prototype.add=function(u,p){return new d(this.start.add(u,p),this.startControl.add(u,p),this.endControl.add(u,p),this.end.add(u,p))},d.prototype.reverse=function(){return new d(this.end,this.endControl,this.startControl,this.start)},d}(),ba=function(d){return d.type===1},Ql=function(){function d(u){var p=u.styles,h=u.bounds,F=ws(p.borderTopLeftRadius,h.width,h.height),Z=F[0],ve=F[1],Qe=ws(p.borderTopRightRadius,h.width,h.height),Me=Qe[0],Ut=Qe[1],$t=ws(p.borderBottomRightRadius,h.width,h.height),nn=$t[0],Rn=$t[1],Or=ws(p.borderBottomLeftRadius,h.width,h.height),dr=Or[0],Rr=Or[1],xi=[];xi.push((Z+Me)/h.width),xi.push((dr+nn)/h.width),xi.push((ve+Rr)/h.height),xi.push((Ut+Rn)/h.height);var Jr=Math.max.apply(Math,xi);Jr>1&&(Z/=Jr,ve/=Jr,Me/=Jr,Ut/=Jr,nn/=Jr,Rn/=Jr,dr/=Jr,Rr/=Jr);var Wr=h.width-Me,Zi=h.height-Rn,Ii=h.width-nn,vi=h.height-Rr,Qr=p.borderTopWidth,Ni=p.borderRightWidth,Hi=p.borderBottomWidth,mi=p.borderLeftWidth,Fs=Fi(p.paddingTop,u.bounds.width),zs=Fi(p.paddingRight,u.bounds.width),ga=Fi(p.paddingBottom,u.bounds.width),Qi=Fi(p.paddingLeft,u.bounds.width);this.topLeftBorderDoubleOuterBox=Z>0||ve>0?ps(h.left+mi/3,h.top+Qr/3,Z-mi/3,ve-Qr/3,rs.TOP_LEFT):new kr(h.left+mi/3,h.top+Qr/3),this.topRightBorderDoubleOuterBox=Z>0||ve>0?ps(h.left+Wr,h.top+Qr/3,Me-Ni/3,Ut-Qr/3,rs.TOP_RIGHT):new kr(h.left+h.width-Ni/3,h.top+Qr/3),this.bottomRightBorderDoubleOuterBox=nn>0||Rn>0?ps(h.left+Ii,h.top+Zi,nn-Ni/3,Rn-Hi/3,rs.BOTTOM_RIGHT):new kr(h.left+h.width-Ni/3,h.top+h.height-Hi/3),this.bottomLeftBorderDoubleOuterBox=dr>0||Rr>0?ps(h.left+mi/3,h.top+vi,dr-mi/3,Rr-Hi/3,rs.BOTTOM_LEFT):new kr(h.left+mi/3,h.top+h.height-Hi/3),this.topLeftBorderDoubleInnerBox=Z>0||ve>0?ps(h.left+mi*2/3,h.top+Qr*2/3,Z-mi*2/3,ve-Qr*2/3,rs.TOP_LEFT):new kr(h.left+mi*2/3,h.top+Qr*2/3),this.topRightBorderDoubleInnerBox=Z>0||ve>0?ps(h.left+Wr,h.top+Qr*2/3,Me-Ni*2/3,Ut-Qr*2/3,rs.TOP_RIGHT):new kr(h.left+h.width-Ni*2/3,h.top+Qr*2/3),this.bottomRightBorderDoubleInnerBox=nn>0||Rn>0?ps(h.left+Ii,h.top+Zi,nn-Ni*2/3,Rn-Hi*2/3,rs.BOTTOM_RIGHT):new kr(h.left+h.width-Ni*2/3,h.top+h.height-Hi*2/3),this.bottomLeftBorderDoubleInnerBox=dr>0||Rr>0?ps(h.left+mi*2/3,h.top+vi,dr-mi*2/3,Rr-Hi*2/3,rs.BOTTOM_LEFT):new kr(h.left+mi*2/3,h.top+h.height-Hi*2/3),this.topLeftBorderStroke=Z>0||ve>0?ps(h.left+mi/2,h.top+Qr/2,Z-mi/2,ve-Qr/2,rs.TOP_LEFT):new kr(h.left+mi/2,h.top+Qr/2),this.topRightBorderStroke=Z>0||ve>0?ps(h.left+Wr,h.top+Qr/2,Me-Ni/2,Ut-Qr/2,rs.TOP_RIGHT):new kr(h.left+h.width-Ni/2,h.top+Qr/2),this.bottomRightBorderStroke=nn>0||Rn>0?ps(h.left+Ii,h.top+Zi,nn-Ni/2,Rn-Hi/2,rs.BOTTOM_RIGHT):new kr(h.left+h.width-Ni/2,h.top+h.height-Hi/2),this.bottomLeftBorderStroke=dr>0||Rr>0?ps(h.left+mi/2,h.top+vi,dr-mi/2,Rr-Hi/2,rs.BOTTOM_LEFT):new kr(h.left+mi/2,h.top+h.height-Hi/2),this.topLeftBorderBox=Z>0||ve>0?ps(h.left,h.top,Z,ve,rs.TOP_LEFT):new kr(h.left,h.top),this.topRightBorderBox=Me>0||Ut>0?ps(h.left+Wr,h.top,Me,Ut,rs.TOP_RIGHT):new kr(h.left+h.width,h.top),this.bottomRightBorderBox=nn>0||Rn>0?ps(h.left+Ii,h.top+Zi,nn,Rn,rs.BOTTOM_RIGHT):new kr(h.left+h.width,h.top+h.height),this.bottomLeftBorderBox=dr>0||Rr>0?ps(h.left,h.top+vi,dr,Rr,rs.BOTTOM_LEFT):new kr(h.left,h.top+h.height),this.topLeftPaddingBox=Z>0||ve>0?ps(h.left+mi,h.top+Qr,Math.max(0,Z-mi),Math.max(0,ve-Qr),rs.TOP_LEFT):new kr(h.left+mi,h.top+Qr),this.topRightPaddingBox=Me>0||Ut>0?ps(h.left+Math.min(Wr,h.width-Ni),h.top+Qr,Wr>h.width+Ni?0:Math.max(0,Me-Ni),Math.max(0,Ut-Qr),rs.TOP_RIGHT):new kr(h.left+h.width-Ni,h.top+Qr),this.bottomRightPaddingBox=nn>0||Rn>0?ps(h.left+Math.min(Ii,h.width-mi),h.top+Math.min(Zi,h.height-Hi),Math.max(0,nn-Ni),Math.max(0,Rn-Hi),rs.BOTTOM_RIGHT):new kr(h.left+h.width-Ni,h.top+h.height-Hi),this.bottomLeftPaddingBox=dr>0||Rr>0?ps(h.left+mi,h.top+Math.min(vi,h.height-Hi),Math.max(0,dr-mi),Math.max(0,Rr-Hi),rs.BOTTOM_LEFT):new kr(h.left+mi,h.top+h.height-Hi),this.topLeftContentBox=Z>0||ve>0?ps(h.left+mi+Qi,h.top+Qr+Fs,Math.max(0,Z-(mi+Qi)),Math.max(0,ve-(Qr+Fs)),rs.TOP_LEFT):new kr(h.left+mi+Qi,h.top+Qr+Fs),this.topRightContentBox=Me>0||Ut>0?ps(h.left+Math.min(Wr,h.width+mi+Qi),h.top+Qr+Fs,Wr>h.width+mi+Qi?0:Me-mi+Qi,Ut-(Qr+Fs),rs.TOP_RIGHT):new kr(h.left+h.width-(Ni+zs),h.top+Qr+Fs),this.bottomRightContentBox=nn>0||Rn>0?ps(h.left+Math.min(Ii,h.width-(mi+Qi)),h.top+Math.min(Zi,h.height+Qr+Fs),Math.max(0,nn-(Ni+zs)),Rn-(Hi+ga),rs.BOTTOM_RIGHT):new kr(h.left+h.width-(Ni+zs),h.top+h.height-(Hi+ga)),this.bottomLeftContentBox=dr>0||Rr>0?ps(h.left+mi+Qi,h.top+vi,Math.max(0,dr-(mi+Qi)),Rr-(Hi+ga),rs.BOTTOM_LEFT):new kr(h.left+mi+Qi,h.top+h.height-(Hi+ga))}return d}(),rs;(function(d){d[d.TOP_LEFT=0]="TOP_LEFT",d[d.TOP_RIGHT=1]="TOP_RIGHT",d[d.BOTTOM_RIGHT=2]="BOTTOM_RIGHT",d[d.BOTTOM_LEFT=3]="BOTTOM_LEFT"})(rs||(rs={}));var ps=function(d,u,p,h,F){var Z=4*((Math.sqrt(2)-1)/3),ve=p*Z,Qe=h*Z,Me=d+p,Ut=u+h;switch(F){case rs.TOP_LEFT:return new rl(new kr(d,Ut),new kr(d,Ut-Qe),new kr(Me-ve,u),new kr(Me,u));case rs.TOP_RIGHT:return new rl(new kr(d,u),new kr(d+ve,u),new kr(Me,Ut-Qe),new kr(Me,Ut));case rs.BOTTOM_RIGHT:return new rl(new kr(Me,u),new kr(Me,u+Qe),new kr(d+ve,Ut),new kr(d,Ut));case rs.BOTTOM_LEFT:default:return new rl(new kr(Me,Ut),new kr(Me-ve,Ut),new kr(d,u+Qe),new kr(d,u))}},il=function(d){return[d.topLeftBorderBox,d.topRightBorderBox,d.bottomRightBorderBox,d.bottomLeftBorderBox]},Cu=function(d){return[d.topLeftContentBox,d.topRightContentBox,d.bottomRightContentBox,d.bottomLeftContentBox]},tA=function(d){return[d.topLeftPaddingBox,d.topRightPaddingBox,d.bottomRightPaddingBox,d.bottomLeftPaddingBox]},sl=function(){function d(u,p,h){this.offsetX=u,this.offsetY=p,this.matrix=h,this.type=0,this.target=6}return d}(),al=function(){function d(u,p){this.path=u,this.target=p,this.type=1}return d}(),xu=function(){function d(u){this.opacity=u,this.type=2,this.target=6}return d}(),Ac=function(d){return d.type===0},Su=function(d){return d.type===1},Nl=function(d){return d.type===2},Tu=function(d,u){return d.length===u.length?d.some(function(p,h){return p===u[h]}):!1},Hl=function(d,u,p,h,F){return d.map(function(Z,ve){switch(ve){case 0:return Z.add(u,p);case 1:return Z.add(u+h,p);case 2:return Z.add(u+h,p+F);case 3:return Z.add(u,p+F)}return Z})},Iu=function(){function d(u){this.element=u,this.inlineLevel=[],this.nonInlineLevel=[],this.negativeZIndex=[],this.zeroOrAutoZIndexOrTransformedOrOpacity=[],this.positiveZIndex=[],this.nonPositionedFloats=[],this.nonPositionedInlineLevel=[]}return d}(),Fu=function(){function d(u,p){if(this.container=u,this.parent=p,this.effects=[],this.curves=new Ql(this.container),this.container.styles.opacity<1&&this.effects.push(new xu(this.container.styles.opacity)),this.container.styles.transform!==null){var h=this.container.bounds.left+this.container.styles.transformOrigin[0].number,F=this.container.bounds.top+this.container.styles.transformOrigin[1].number,Z=this.container.styles.transform;this.effects.push(new sl(h,F,Z))}if(this.container.styles.overflowX!==0){var ve=il(this.curves),Qe=tA(this.curves);Tu(ve,Qe)?this.effects.push(new al(ve,6)):(this.effects.push(new al(ve,2)),this.effects.push(new al(Qe,4)))}}return d.prototype.getEffects=function(u){for(var p=[2,3].indexOf(this.container.styles.position)===-1,h=this.parent,F=this.effects.slice(0);h;){var Z=h.effects.filter(function(Me){return!Su(Me)});if(p||h.container.styles.position!==0||!h.parent){if(F.unshift.apply(F,Z),p=[2,3].indexOf(h.container.styles.position)===-1,h.container.styles.overflowX!==0){var ve=il(h.curves),Qe=tA(h.curves);Tu(ve,Qe)||F.unshift(new al(Qe,6))}}else F.unshift.apply(F,Z);h=h.parent}return F.filter(function(Me){return Cs(Me.target,u)})},d}(),wA=function(d,u,p,h){d.container.elements.forEach(function(F){var Z=Cs(F.flags,4),ve=Cs(F.flags,2),Qe=new Fu(F,d);Cs(F.styles.display,2048)&&h.push(Qe);var Me=Cs(F.flags,8)?[]:h;if(Z||ve){var Ut=Z||F.styles.isPositioned()?p:u,$t=new Iu(Qe);if(F.styles.isPositioned()||F.styles.opacity<1||F.styles.isTransformed()){var nn=F.styles.zIndex.order;if(nn<0){var Rn=0;Ut.negativeZIndex.some(function(dr,Rr){return nn>dr.element.container.styles.zIndex.order?(Rn=Rr,!1):Rn>0}),Ut.negativeZIndex.splice(Rn,0,$t)}else if(nn>0){var Or=0;Ut.positiveZIndex.some(function(dr,Rr){return nn>=dr.element.container.styles.zIndex.order?(Or=Rr+1,!1):Or>0}),Ut.positiveZIndex.splice(Or,0,$t)}else Ut.zeroOrAutoZIndexOrTransformedOrOpacity.push($t)}else F.styles.isFloating()?Ut.nonPositionedFloats.push($t):Ut.nonPositionedInlineLevel.push($t);wA(Qe,$t,Z?$t:p,Me)}else F.styles.isInlineLevel()?u.inlineLevel.push(Qe):u.nonInlineLevel.push(Qe),wA(Qe,u,p,Me);Cs(F.flags,8)&&Kl(F,Me)})},Kl=function(d,u){for(var p=d instanceof Fl?d.start:1,h=d instanceof Fl?d.reversed:!1,F=0;F<u.length;F++){var Z=u[F];Z.container instanceof tu&&typeof Z.container.value=="number"&&Z.container.value!==0&&(p=Z.container.value),Z.listValue=Io(p,Z.container.styles.listStyleType,!0),p+=h?-1:1}},Du=function(d){var u=new Fu(d,null),p=new Iu(u),h=[];return wA(u,p,p,h),Kl(u.container,h),p},Ru=function(d,u){switch(u){case 0:return ha(d.topLeftBorderBox,d.topLeftPaddingBox,d.topRightBorderBox,d.topRightPaddingBox);case 1:return ha(d.topRightBorderBox,d.topRightPaddingBox,d.bottomRightBorderBox,d.bottomRightPaddingBox);case 2:return ha(d.bottomRightBorderBox,d.bottomRightPaddingBox,d.bottomLeftBorderBox,d.bottomLeftPaddingBox);case 3:default:return ha(d.bottomLeftBorderBox,d.bottomLeftPaddingBox,d.topLeftBorderBox,d.topLeftPaddingBox)}},Lu=function(d,u){switch(u){case 0:return ha(d.topLeftBorderBox,d.topLeftBorderDoubleOuterBox,d.topRightBorderBox,d.topRightBorderDoubleOuterBox);case 1:return ha(d.topRightBorderBox,d.topRightBorderDoubleOuterBox,d.bottomRightBorderBox,d.bottomRightBorderDoubleOuterBox);case 2:return ha(d.bottomRightBorderBox,d.bottomRightBorderDoubleOuterBox,d.bottomLeftBorderBox,d.bottomLeftBorderDoubleOuterBox);case 3:default:return ha(d.bottomLeftBorderBox,d.bottomLeftBorderDoubleOuterBox,d.topLeftBorderBox,d.topLeftBorderDoubleOuterBox)}},lc=function(d,u){switch(u){case 0:return ha(d.topLeftBorderDoubleInnerBox,d.topLeftPaddingBox,d.topRightBorderDoubleInnerBox,d.topRightPaddingBox);case 1:return ha(d.topRightBorderDoubleInnerBox,d.topRightPaddingBox,d.bottomRightBorderDoubleInnerBox,d.bottomRightPaddingBox);case 2:return ha(d.bottomRightBorderDoubleInnerBox,d.bottomRightPaddingBox,d.bottomLeftBorderDoubleInnerBox,d.bottomLeftPaddingBox);case 3:default:return ha(d.bottomLeftBorderDoubleInnerBox,d.bottomLeftPaddingBox,d.topLeftBorderDoubleInnerBox,d.topLeftPaddingBox)}},Gl=function(d,u){switch(u){case 0:return EA(d.topLeftBorderStroke,d.topRightBorderStroke);case 1:return EA(d.topRightBorderStroke,d.bottomRightBorderStroke);case 2:return EA(d.bottomRightBorderStroke,d.bottomLeftBorderStroke);case 3:default:return EA(d.bottomLeftBorderStroke,d.topLeftBorderStroke)}},EA=function(d,u){var p=[];return ba(d)?p.push(d.subdivide(.5,!1)):p.push(d),ba(u)?p.push(u.subdivide(.5,!0)):p.push(u),p},ha=function(d,u,p,h){var F=[];return ba(d)?F.push(d.subdivide(.5,!1)):F.push(d),ba(p)?F.push(p.subdivide(.5,!0)):F.push(p),ba(h)?F.push(h.subdivide(.5,!0).reverse()):F.push(h),ba(u)?F.push(u.subdivide(.5,!1).reverse()):F.push(u),F},Uu=function(d){var u=d.bounds,p=d.styles;return u.add(p.borderLeftWidth,p.borderTopWidth,-(p.borderRightWidth+p.borderLeftWidth),-(p.borderTopWidth+p.borderBottomWidth))},nA=function(d){var u=d.styles,p=d.bounds,h=Fi(u.paddingLeft,p.width),F=Fi(u.paddingRight,p.width),Z=Fi(u.paddingTop,p.width),ve=Fi(u.paddingBottom,p.width);return p.add(h+u.borderLeftWidth,Z+u.borderTopWidth,-(u.borderRightWidth+u.borderLeftWidth+h+F),-(u.borderTopWidth+u.borderBottomWidth+Z+ve))},ku=function(d,u){return d===0?u.bounds:d===2?nA(u):Uu(u)},$l=function(d,u){return d===0?u.bounds:d===2?nA(u):Uu(u)},Zl=function(d,u,p){var h=ku(Lo(d.styles.backgroundOrigin,u),d),F=$l(Lo(d.styles.backgroundClip,u),d),Z=uc(Lo(d.styles.backgroundSize,u),p,h),ve=Z[0],Qe=Z[1],Me=ws(Lo(d.styles.backgroundPosition,u),h.width-ve,h.height-Qe),Ut=Ou(Lo(d.styles.backgroundRepeat,u),Me,Z,h,F),$t=Math.round(h.left+Me[0]),nn=Math.round(h.top+Me[1]);return[Ut,$t,nn,ve,Qe]},rA=function(d){return ti(d)&&d.value===Ns.AUTO},Ro=function(d){return typeof d=="number"},uc=function(d,u,p){var h=u[0],F=u[1],Z=u[2],ve=d[0],Qe=d[1];if(!ve)return[0,0];if(Bi(ve)&&Qe&&Bi(Qe))return[Fi(ve,p.width),Fi(Qe,p.height)];var Me=Ro(Z);if(ti(ve)&&(ve.value===Ns.CONTAIN||ve.value===Ns.COVER)){if(Ro(Z)){var Ut=p.width/p.height;return Ut<Z!=(ve.value===Ns.COVER)?[p.width,p.width/Z]:[p.height*Z,p.height]}return[p.width,p.height]}var $t=Ro(h),nn=Ro(F),Rn=$t||nn;if(rA(ve)&&(!Qe||rA(Qe))){if($t&&nn)return[h,F];if(!Me&&!Rn)return[p.width,p.height];if(Rn&&Me){var Or=$t?h:F*Z,dr=nn?F:h/Z;return[Or,dr]}var Rr=$t?h:p.width,xi=nn?F:p.height;return[Rr,xi]}if(Me){var Jr=0,Wr=0;return Bi(ve)?Jr=Fi(ve,p.width):Bi(Qe)&&(Wr=Fi(Qe,p.height)),rA(ve)?Jr=Wr*Z:(!Qe||rA(Qe))&&(Wr=Jr/Z),[Jr,Wr]}var Zi=null,Ii=null;if(Bi(ve)?Zi=Fi(ve,p.width):Qe&&Bi(Qe)&&(Ii=Fi(Qe,p.height)),Zi!==null&&(!Qe||rA(Qe))&&(Ii=$t&&nn?Zi/h*F:p.height),Ii!==null&&rA(ve)&&(Zi=$t&&nn?Ii/F*h:p.width),Zi!==null&&Ii!==null)return[Zi,Ii];throw new Error("Unable to calculate background-size for element")},Lo=function(d,u){var p=d[u];return typeof p=="undefined"?d[0]:p},Ou=function(d,u,p,h,F){var Z=u[0],ve=u[1],Qe=p[0],Me=p[1];switch(d){case 2:return[new kr(Math.round(h.left),Math.round(h.top+ve)),new kr(Math.round(h.left+h.width),Math.round(h.top+ve)),new kr(Math.round(h.left+h.width),Math.round(Me+h.top+ve)),new kr(Math.round(h.left),Math.round(Me+h.top+ve))];case 3:return[new kr(Math.round(h.left+Z),Math.round(h.top)),new kr(Math.round(h.left+Z+Qe),Math.round(h.top)),new kr(Math.round(h.left+Z+Qe),Math.round(h.height+h.top)),new kr(Math.round(h.left+Z),Math.round(h.height+h.top))];case 1:return[new kr(Math.round(h.left+Z),Math.round(h.top+ve)),new kr(Math.round(h.left+Z+Qe),Math.round(h.top+ve)),new kr(Math.round(h.left+Z+Qe),Math.round(h.top+ve+Me)),new kr(Math.round(h.left+Z),Math.round(h.top+ve+Me))];default:return[new kr(Math.round(F.left),Math.round(F.top)),new kr(Math.round(F.left+F.width),Math.round(F.top)),new kr(Math.round(F.left+F.width),Math.round(F.height+F.top)),new kr(Math.round(F.left),Math.round(F.height+F.top))]}},cc="data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7",Vl="Hidden Text",fc=function(){function d(u){this._data={},this._document=u}return d.prototype.parseMetrics=function(u,p){var h=this._document.createElement("div"),F=this._document.createElement("img"),Z=this._document.createElement("span"),ve=this._document.body;h.style.visibility="hidden",h.style.fontFamily=u,h.style.fontSize=p,h.style.margin="0",h.style.padding="0",h.style.whiteSpace="nowrap",ve.appendChild(h),F.src=cc,F.width=1,F.height=1,F.style.margin="0",F.style.padding="0",F.style.verticalAlign="baseline",Z.style.fontFamily=u,Z.style.fontSize=p,Z.style.margin="0",Z.style.padding="0",Z.appendChild(this._document.createTextNode(Vl)),h.appendChild(Z),h.appendChild(F);var Qe=F.offsetTop-Z.offsetTop+2;h.removeChild(Z),h.appendChild(this._document.createTextNode(Vl)),h.style.lineHeight="normal",F.style.verticalAlign="super";var Me=F.offsetTop-h.offsetTop+2;return ve.removeChild(h),{baseline:Qe,middle:Me}},d.prototype.getMetrics=function(u,p){var h=u+" "+p;return typeof this._data[h]=="undefined"&&(this._data[h]=this.parseMetrics(u,p)),this._data[h]},d}(),Pu=function(){function d(u,p){this.context=u,this.options=p}return d}(),dc=1e4,hc=function(d){x(u,d);function u(p,h){var F=d.call(this,p,h)||this;return F._activeEffects=[],F.canvas=h.canvas?h.canvas:document.createElement("canvas"),F.ctx=F.canvas.getContext("2d"),h.canvas||(F.canvas.width=Math.floor(h.width*h.scale),F.canvas.height=Math.floor(h.height*h.scale),F.canvas.style.width=h.width+"px",F.canvas.style.height=h.height+"px"),F.fontMetrics=new fc(document),F.ctx.scale(F.options.scale,F.options.scale),F.ctx.translate(-h.x,-h.y),F.ctx.textBaseline="bottom",F._activeEffects=[],F.context.logger.debug("Canvas renderer initialized ("+h.width+"x"+h.height+") with scale "+h.scale),F}return u.prototype.applyEffects=function(p){for(var h=this;this._activeEffects.length;)this.popEffect();p.forEach(function(F){return h.applyEffect(F)})},u.prototype.applyEffect=function(p){this.ctx.save(),Nl(p)&&(this.ctx.globalAlpha=p.opacity),Ac(p)&&(this.ctx.translate(p.offsetX,p.offsetY),this.ctx.transform(p.matrix[0],p.matrix[1],p.matrix[2],p.matrix[3],p.matrix[4],p.matrix[5]),this.ctx.translate(-p.offsetX,-p.offsetY)),Su(p)&&(this.path(p.path),this.ctx.clip()),this._activeEffects.push(p)},u.prototype.popEffect=function(){this._activeEffects.pop(),this.ctx.restore()},u.prototype.renderStack=function(p){return fe(this,void 0,void 0,function(){var h;return Ce(this,function(F){switch(F.label){case 0:return h=p.element.container.styles,h.isVisible()?[4,this.renderStackContent(p)]:[3,2];case 1:F.sent(),F.label=2;case 2:return[2]}})})},u.prototype.renderNode=function(p){return fe(this,void 0,void 0,function(){return Ce(this,function(h){switch(h.label){case 0:if(Cs(p.container.flags,16))debugger;return p.container.styles.isVisible()?[4,this.renderNodeBackgroundAndBorders(p)]:[3,3];case 1:return h.sent(),[4,this.renderNodeContent(p)];case 2:h.sent(),h.label=3;case 3:return[2]}})})},u.prototype.renderTextWithLetterSpacing=function(p,h,F){var Z=this;if(h===0)this.ctx.fillText(p.text,p.bounds.left,p.bounds.top+F);else{var ve=Ti(p.text);ve.reduce(function(Qe,Me){return Z.ctx.fillText(Me,Qe,p.bounds.top+F),Qe+Z.ctx.measureText(Me).width},p.bounds.left)}},u.prototype.createFontStyle=function(p){var h=p.fontVariant.filter(function(ve){return ve==="normal"||ve==="small-caps"}).join(""),F=vc(p.fontFamily).join(", "),Z=Dr(p.fontSize)?""+p.fontSize.number+p.fontSize.unit:p.fontSize.number+"px";return[[p.fontStyle,h,p.fontWeight,Z,F].join(" "),F,Z]},u.prototype.renderTextNode=function(p,h){return fe(this,void 0,void 0,function(){var F,Z,ve,Qe,Me,Ut,$t,nn,Rn=this;return Ce(this,function(Or){return F=this.createFontStyle(h),Z=F[0],ve=F[1],Qe=F[2],this.ctx.font=Z,this.ctx.direction=h.direction===1?"rtl":"ltr",this.ctx.textAlign="left",this.ctx.textBaseline="alphabetic",Me=this.fontMetrics.getMetrics(ve,Qe),Ut=Me.baseline,$t=Me.middle,nn=h.paintOrder,p.textBounds.forEach(function(dr){nn.forEach(function(Rr){switch(Rr){case 0:Rn.ctx.fillStyle=cs(h.color),Rn.renderTextWithLetterSpacing(dr,h.letterSpacing,Ut);var xi=h.textShadow;xi.length&&dr.text.trim().length&&(xi.slice(0).reverse().forEach(function(Jr){Rn.ctx.shadowColor=cs(Jr.color),Rn.ctx.shadowOffsetX=Jr.offsetX.number*Rn.options.scale,Rn.ctx.shadowOffsetY=Jr.offsetY.number*Rn.options.scale,Rn.ctx.shadowBlur=Jr.blur.number,Rn.renderTextWithLetterSpacing(dr,h.letterSpacing,Ut)}),Rn.ctx.shadowColor="",Rn.ctx.shadowOffsetX=0,Rn.ctx.shadowOffsetY=0,Rn.ctx.shadowBlur=0),h.textDecorationLine.length&&(Rn.ctx.fillStyle=cs(h.textDecorationColor||h.color),h.textDecorationLine.forEach(function(Jr){switch(Jr){case 1:Rn.ctx.fillRect(dr.bounds.left,Math.round(dr.bounds.top+Ut),dr.bounds.width,1);break;case 2:Rn.ctx.fillRect(dr.bounds.left,Math.round(dr.bounds.top),dr.bounds.width,1);break;case 3:Rn.ctx.fillRect(dr.bounds.left,Math.ceil(dr.bounds.top+$t),dr.bounds.width,1);break}}));break;case 1:h.webkitTextStrokeWidth&&dr.text.trim().length&&(Rn.ctx.strokeStyle=cs(h.webkitTextStrokeColor),Rn.ctx.lineWidth=h.webkitTextStrokeWidth,Rn.ctx.lineJoin=window.chrome?"miter":"round",Rn.ctx.strokeText(dr.text,dr.bounds.left,dr.bounds.top+Ut)),Rn.ctx.strokeStyle="",Rn.ctx.lineWidth=0,Rn.ctx.lineJoin="miter";break}})}),[2]})})},u.prototype.renderReplacedElement=function(p,h,F){if(F&&p.intrinsicWidth>0&&p.intrinsicHeight>0){var Z=nA(p),ve=tA(h);this.path(ve),this.ctx.save(),this.ctx.clip(),this.ctx.drawImage(F,0,0,p.intrinsicWidth,p.intrinsicHeight,Z.left,Z.top,Z.width,Z.height),this.ctx.restore()}},u.prototype.renderNodeContent=function(p){return fe(this,void 0,void 0,function(){var h,F,Z,ve,Qe,Me,Wr,Wr,Ut,$t,nn,Rn,Ii,Or,dr,vi,Rr,xi,Jr,Wr,Zi,Ii,vi;return Ce(this,function(Qr){switch(Qr.label){case 0:this.applyEffects(p.getEffects(4)),h=p.container,F=p.curves,Z=h.styles,ve=0,Qe=h.textNodes,Qr.label=1;case 1:return ve<Qe.length?(Me=Qe[ve],[4,this.renderTextNode(Me,Z)]):[3,4];case 2:Qr.sent(),Qr.label=3;case 3:return ve++,[3,1];case 4:if(!(h instanceof Jl))return[3,8];Qr.label=5;case 5:return Qr.trys.push([5,7,,8]),[4,this.context.cache.match(h.src)];case 6:return Wr=Qr.sent(),this.renderReplacedElement(h,F,Wr),[3,8];case 7:return Qr.sent(),this.context.logger.error("Error loading image "+h.src),[3,8];case 8:if(h instanceof ql&&this.renderReplacedElement(h,F,h.canvas),!(h instanceof eu))return[3,12];Qr.label=9;case 9:return Qr.trys.push([9,11,,12]),[4,this.context.cache.match(h.svg)];case 10:return Wr=Qr.sent(),this.renderReplacedElement(h,F,Wr),[3,12];case 11:return Qr.sent(),this.context.logger.error("Error loading svg "+h.svg.substring(0,255)),[3,12];case 12:return h instanceof iu&&h.tree?(Ut=new u(this.context,{scale:this.options.scale,backgroundColor:h.backgroundColor,x:0,y:0,width:h.width,height:h.height}),[4,Ut.render(h.tree)]):[3,14];case 13:$t=Qr.sent(),h.width&&h.height&&this.ctx.drawImage($t,0,0,h.width,h.height,h.bounds.left,h.bounds.top,h.bounds.width,h.bounds.height),Qr.label=14;case 14:if(h instanceof XA&&(nn=Math.min(h.bounds.width,h.bounds.height),h.type===Yo?h.checked&&(this.ctx.save(),this.path([new kr(h.bounds.left+nn*.39363,h.bounds.top+nn*.79),new kr(h.bounds.left+nn*.16,h.bounds.top+nn*.5549),new kr(h.bounds.left+nn*.27347,h.bounds.top+nn*.44071),new kr(h.bounds.left+nn*.39694,h.bounds.top+nn*.5649),new kr(h.bounds.left+nn*.72983,h.bounds.top+nn*.23),new kr(h.bounds.left+nn*.84,h.bounds.top+nn*.34085),new kr(h.bounds.left+nn*.39363,h.bounds.top+nn*.79)]),this.ctx.fillStyle=cs(ru),this.ctx.fill(),this.ctx.restore()):h.type===xo&&h.checked&&(this.ctx.save(),this.ctx.beginPath(),this.ctx.arc(h.bounds.left+nn/2,h.bounds.top+nn/2,nn/4,0,Math.PI*2,!0),this.ctx.fillStyle=cs(ru),this.ctx.fill(),this.ctx.restore())),Mu(h)&&h.value.length){switch(Rn=this.createFontStyle(Z),Ii=Rn[0],Or=Rn[1],dr=this.fontMetrics.getMetrics(Ii,Or).baseline,this.ctx.font=Ii,this.ctx.fillStyle=cs(Z.color),this.ctx.textBaseline="alphabetic",this.ctx.textAlign=pc(h.styles.textAlign),vi=nA(h),Rr=0,h.styles.textAlign){case 1:Rr+=vi.width/2;break;case 2:Rr+=vi.width;break}xi=vi.add(Rr,0,0,-vi.height/2+1),this.ctx.save(),this.path([new kr(vi.left,vi.top),new kr(vi.left+vi.width,vi.top),new kr(vi.left+vi.width,vi.top+vi.height),new kr(vi.left,vi.top+vi.height)]),this.ctx.clip(),this.renderTextWithLetterSpacing(new bi(h.value,xi),Z.letterSpacing,dr),this.ctx.restore(),this.ctx.textBaseline="alphabetic",this.ctx.textAlign="left"}if(!Cs(h.styles.display,2048))return[3,20];if(h.styles.listStyleImage===null)return[3,19];if(Jr=h.styles.listStyleImage,Jr.type!==0)return[3,18];Wr=void 0,Zi=Jr.url,Qr.label=15;case 15:return Qr.trys.push([15,17,,18]),[4,this.context.cache.match(Zi)];case 16:return Wr=Qr.sent(),this.ctx.drawImage(Wr,h.bounds.left-(Wr.width+10),h.bounds.top),[3,18];case 17:return Qr.sent(),this.context.logger.error("Error loading list-style-image "+Zi),[3,18];case 18:return[3,20];case 19:p.listValue&&h.styles.listStyleType!==-1&&(Ii=this.createFontStyle(Z)[0],this.ctx.font=Ii,this.ctx.fillStyle=cs(Z.color),this.ctx.textBaseline="middle",this.ctx.textAlign="right",vi=new G(h.bounds.left,h.bounds.top+Fi(h.styles.paddingTop,h.bounds.width),h.bounds.width,xA(Z.lineHeight,Z.fontSize.number)/2+1),this.renderTextWithLetterSpacing(new bi(p.listValue,vi),Z.letterSpacing,xA(Z.lineHeight,Z.fontSize.number)/2+2),this.ctx.textBaseline="bottom",this.ctx.textAlign="left"),Qr.label=20;case 20:return[2]}})})},u.prototype.renderStackContent=function(p){return fe(this,void 0,void 0,function(){var h,F,Jr,Z,ve,Jr,Qe,Me,Jr,Ut,$t,Jr,nn,Rn,Jr,Or,dr,Jr,Rr,xi,Jr;return Ce(this,function(Wr){switch(Wr.label){case 0:if(Cs(p.element.container.flags,16))debugger;return[4,this.renderNodeBackgroundAndBorders(p.element)];case 1:Wr.sent(),h=0,F=p.negativeZIndex,Wr.label=2;case 2:return h<F.length?(Jr=F[h],[4,this.renderStack(Jr)]):[3,5];case 3:Wr.sent(),Wr.label=4;case 4:return h++,[3,2];case 5:return[4,this.renderNodeContent(p.element)];case 6:Wr.sent(),Z=0,ve=p.nonInlineLevel,Wr.label=7;case 7:return Z<ve.length?(Jr=ve[Z],[4,this.renderNode(Jr)]):[3,10];case 8:Wr.sent(),Wr.label=9;case 9:return Z++,[3,7];case 10:Qe=0,Me=p.nonPositionedFloats,Wr.label=11;case 11:return Qe<Me.length?(Jr=Me[Qe],[4,this.renderStack(Jr)]):[3,14];case 12:Wr.sent(),Wr.label=13;case 13:return Qe++,[3,11];case 14:Ut=0,$t=p.nonPositionedInlineLevel,Wr.label=15;case 15:return Ut<$t.length?(Jr=$t[Ut],[4,this.renderStack(Jr)]):[3,18];case 16:Wr.sent(),Wr.label=17;case 17:return Ut++,[3,15];case 18:nn=0,Rn=p.inlineLevel,Wr.label=19;case 19:return nn<Rn.length?(Jr=Rn[nn],[4,this.renderNode(Jr)]):[3,22];case 20:Wr.sent(),Wr.label=21;case 21:return nn++,[3,19];case 22:Or=0,dr=p.zeroOrAutoZIndexOrTransformedOrOpacity,Wr.label=23;case 23:return Or<dr.length?(Jr=dr[Or],[4,this.renderStack(Jr)]):[3,26];case 24:Wr.sent(),Wr.label=25;case 25:return Or++,[3,23];case 26:Rr=0,xi=p.positiveZIndex,Wr.label=27;case 27:return Rr<xi.length?(Jr=xi[Rr],[4,this.renderStack(Jr)]):[3,30];case 28:Wr.sent(),Wr.label=29;case 29:return Rr++,[3,27];case 30:return[2]}})})},u.prototype.mask=function(p){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(p.slice(0).reverse()),this.ctx.closePath()},u.prototype.path=function(p){this.ctx.beginPath(),this.formatPath(p),this.ctx.closePath()},u.prototype.formatPath=function(p){var h=this;p.forEach(function(F,Z){var ve=ba(F)?F.start:F;Z===0?h.ctx.moveTo(ve.x,ve.y):h.ctx.lineTo(ve.x,ve.y),ba(F)&&h.ctx.bezierCurveTo(F.startControl.x,F.startControl.y,F.endControl.x,F.endControl.y,F.end.x,F.end.y)})},u.prototype.renderRepeat=function(p,h,F,Z){this.path(p),this.ctx.fillStyle=h,this.ctx.translate(F,Z),this.ctx.fill(),this.ctx.translate(-F,-Z)},u.prototype.resizeImage=function(p,h,F){var Z;if(p.width===h&&p.height===F)return p;var ve=(Z=this.canvas.ownerDocument)!==null&&Z!==void 0?Z:document,Qe=ve.createElement("canvas");Qe.width=Math.max(1,h),Qe.height=Math.max(1,F);var Me=Qe.getContext("2d");return Me.drawImage(p,0,0,p.width,p.height,0,0,h,F),Qe},u.prototype.renderBackgroundImage=function(p){return fe(this,void 0,void 0,function(){var h,F,Z,ve,Qe,Me;return Ce(this,function(Ut){switch(Ut.label){case 0:h=p.styles.backgroundImage.length-1,F=function($t){var nn,Rn,Or,Fs,t,n,Qi,a,Hi,dr,Fs,t,n,Qi,a,Rr,xi,Jr,Wr,Zi,Ii,vi,Qr,Ni,Hi,mi,Fs,zs,ga,Qi,a,e,t,n,r,i,s,A,f,c,m,y;return Ce(this,function(B){switch(B.label){case 0:if($t.type!==0)return[3,5];nn=void 0,Rn=$t.url,B.label=1;case 1:return B.trys.push([1,3,,4]),[4,Z.context.cache.match(Rn)];case 2:return nn=B.sent(),[3,4];case 3:return B.sent(),Z.context.logger.error("Error loading background-image "+Rn),[3,4];case 4:return nn&&(Or=Zl(p,h,[nn.width,nn.height,nn.width/nn.height]),Fs=Or[0],t=Or[1],n=Or[2],Qi=Or[3],a=Or[4],Hi=Z.ctx.createPattern(Z.resizeImage(nn,Qi,a),"repeat"),Z.renderRepeat(Fs,Hi,t,n)),[3,6];case 5:sa($t)?(dr=Zl(p,h,[null,null,null]),Fs=dr[0],t=dr[1],n=dr[2],Qi=dr[3],a=dr[4],Rr=Ps($t.angle,Qi,a),xi=Rr[0],Jr=Rr[1],Wr=Rr[2],Zi=Rr[3],Ii=Rr[4],vi=document.createElement("canvas"),vi.width=Qi,vi.height=a,Qr=vi.getContext("2d"),Ni=Qr.createLinearGradient(Jr,Zi,Wr,Ii),Rs($t.stops,xi).forEach(function(D){return Ni.addColorStop(D.stop,cs(D.color))}),Qr.fillStyle=Ni,Qr.fillRect(0,0,Qi,a),Qi>0&&a>0&&(Hi=Z.ctx.createPattern(vi,"repeat"),Z.renderRepeat(Fs,Hi,t,n))):ma($t)&&(mi=Zl(p,h,[null,null,null]),Fs=mi[0],zs=mi[1],ga=mi[2],Qi=mi[3],a=mi[4],e=$t.position.length===0?[la]:$t.position,t=Fi(e[0],Qi),n=Fi(e[e.length-1],a),r=Gs($t,t,n,Qi,a),i=r[0],s=r[1],i>0&&s>0&&(A=Z.ctx.createRadialGradient(zs+t,ga+n,0,zs+t,ga+n,i),Rs($t.stops,i*2).forEach(function(D){return A.addColorStop(D.stop,cs(D.color))}),Z.path(Fs),Z.ctx.fillStyle=A,i!==s?(f=p.bounds.left+.5*p.bounds.width,c=p.bounds.top+.5*p.bounds.height,m=s/i,y=1/m,Z.ctx.save(),Z.ctx.translate(f,c),Z.ctx.transform(1,0,0,m,0,0),Z.ctx.translate(-f,-c),Z.ctx.fillRect(zs,y*(ga-c)+c,Qi,a*y),Z.ctx.restore()):Z.ctx.fill())),B.label=6;case 6:return h--,[2]}})},Z=this,ve=0,Qe=p.styles.backgroundImage.slice(0).reverse(),Ut.label=1;case 1:return ve<Qe.length?(Me=Qe[ve],[5,F(Me)]):[3,4];case 2:Ut.sent(),Ut.label=3;case 3:return ve++,[3,1];case 4:return[2]}})})},u.prototype.renderSolidBorder=function(p,h,F){return fe(this,void 0,void 0,function(){return Ce(this,function(Z){return this.path(Ru(F,h)),this.ctx.fillStyle=cs(p),this.ctx.fill(),[2]})})},u.prototype.renderDoubleBorder=function(p,h,F,Z){return fe(this,void 0,void 0,function(){var ve,Qe;return Ce(this,function(Me){switch(Me.label){case 0:return h<3?[4,this.renderSolidBorder(p,F,Z)]:[3,2];case 1:return Me.sent(),[2];case 2:return ve=Lu(Z,F),this.path(ve),this.ctx.fillStyle=cs(p),this.ctx.fill(),Qe=lc(Z,F),this.path(Qe),this.ctx.fill(),[2]}})})},u.prototype.renderNodeBackgroundAndBorders=function(p){return fe(this,void 0,void 0,function(){var h,F,Z,ve,Qe,Me,Ut,$t,nn=this;return Ce(this,function(Rn){switch(Rn.label){case 0:return this.applyEffects(p.getEffects(2)),h=p.container.styles,F=!vs(h.backgroundColor)||h.backgroundImage.length,Z=[{style:h.borderTopStyle,color:h.borderTopColor,width:h.borderTopWidth},{style:h.borderRightStyle,color:h.borderRightColor,width:h.borderRightWidth},{style:h.borderBottomStyle,color:h.borderBottomColor,width:h.borderBottomWidth},{style:h.borderLeftStyle,color:h.borderLeftColor,width:h.borderLeftWidth}],ve=gc(Lo(h.backgroundClip,0),p.curves),F||h.boxShadow.length?(this.ctx.save(),this.path(ve),this.ctx.clip(),vs(h.backgroundColor)||(this.ctx.fillStyle=cs(h.backgroundColor),this.ctx.fill()),[4,this.renderBackgroundImage(p.container)]):[3,2];case 1:Rn.sent(),this.ctx.restore(),h.boxShadow.slice(0).reverse().forEach(function(Or){nn.ctx.save();var dr=il(p.curves),Rr=Or.inset?0:dc,xi=Hl(dr,-Rr+(Or.inset?1:-1)*Or.spread.number,(Or.inset?1:-1)*Or.spread.number,Or.spread.number*(Or.inset?-2:2),Or.spread.number*(Or.inset?-2:2));Or.inset?(nn.path(dr),nn.ctx.clip(),nn.mask(xi)):(nn.mask(dr),nn.ctx.clip(),nn.path(xi)),nn.ctx.shadowOffsetX=Or.offsetX.number+Rr,nn.ctx.shadowOffsetY=Or.offsetY.number,nn.ctx.shadowColor=cs(Or.color),nn.ctx.shadowBlur=Or.blur.number,nn.ctx.fillStyle=Or.inset?cs(Or.color):"rgba(0,0,0,1)",nn.ctx.fill(),nn.ctx.restore()}),Rn.label=2;case 2:Qe=0,Me=0,Ut=Z,Rn.label=3;case 3:return Me<Ut.length?($t=Ut[Me],$t.style!==0&&!vs($t.color)&&$t.width>0?$t.style!==2?[3,5]:[4,this.renderDashedDottedBorder($t.color,$t.width,Qe,p.curves,2)]:[3,11]):[3,13];case 4:return Rn.sent(),[3,11];case 5:return $t.style!==3?[3,7]:[4,this.renderDashedDottedBorder($t.color,$t.width,Qe,p.curves,3)];case 6:return Rn.sent(),[3,11];case 7:return $t.style!==4?[3,9]:[4,this.renderDoubleBorder($t.color,$t.width,Qe,p.curves)];case 8:return Rn.sent(),[3,11];case 9:return[4,this.renderSolidBorder($t.color,Qe,p.curves)];case 10:Rn.sent(),Rn.label=11;case 11:Qe++,Rn.label=12;case 12:return Me++,[3,3];case 13:return[2]}})})},u.prototype.renderDashedDottedBorder=function(p,h,F,Z,ve){return fe(this,void 0,void 0,function(){var Qe,Me,Ut,$t,nn,Rn,Or,dr,Rr,xi,Jr,Wr,Zi,Ii,vi,Qr,vi,Qr;return Ce(this,function(Ni){return this.ctx.save(),Qe=Gl(Z,F),Me=Ru(Z,F),ve===2&&(this.path(Me),this.ctx.clip()),ba(Me[0])?(Ut=Me[0].start.x,$t=Me[0].start.y):(Ut=Me[0].x,$t=Me[0].y),ba(Me[1])?(nn=Me[1].end.x,Rn=Me[1].end.y):(nn=Me[1].x,Rn=Me[1].y),F===0||F===2?Or=Math.abs(Ut-nn):Or=Math.abs($t-Rn),this.ctx.beginPath(),ve===3?this.formatPath(Qe):this.formatPath(Me.slice(0,2)),dr=h<3?h*3:h*2,Rr=h<3?h*2:h,ve===3&&(dr=h,Rr=h),xi=!0,Or<=dr*2?xi=!1:Or<=dr*2+Rr?(Jr=Or/(2*dr+Rr),dr*=Jr,Rr*=Jr):(Wr=Math.floor((Or+Rr)/(dr+Rr)),Zi=(Or-Wr*dr)/(Wr-1),Ii=(Or-(Wr+1)*dr)/Wr,Rr=Ii<=0||Math.abs(Rr-Zi)<Math.abs(Rr-Ii)?Zi:Ii),xi&&(ve===3?this.ctx.setLineDash([0,dr+Rr]):this.ctx.setLineDash([dr,Rr])),ve===3?(this.ctx.lineCap="round",this.ctx.lineWidth=h):this.ctx.lineWidth=h*2+1.1,this.ctx.strokeStyle=cs(p),this.ctx.stroke(),this.ctx.setLineDash([]),ve===2&&(ba(Me[0])&&(vi=Me[3],Qr=Me[0],this.ctx.beginPath(),this.formatPath([new kr(vi.end.x,vi.end.y),new kr(Qr.start.x,Qr.start.y)]),this.ctx.stroke()),ba(Me[1])&&(vi=Me[1],Qr=Me[2],this.ctx.beginPath(),this.formatPath([new kr(vi.end.x,vi.end.y),new kr(Qr.start.x,Qr.start.y)]),this.ctx.stroke())),this.ctx.restore(),[2]})})},u.prototype.render=function(p){return fe(this,void 0,void 0,function(){var h;return Ce(this,function(F){switch(F.label){case 0:return this.options.backgroundColor&&(this.ctx.fillStyle=cs(this.options.backgroundColor),this.ctx.fillRect(this.options.x,this.options.y,this.options.width,this.options.height)),h=Du(p),[4,this.renderStack(h)];case 1:return F.sent(),this.applyEffects([]),[2,this.canvas]}})})},u}(Pu),Mu=function(d){return d instanceof JA||d instanceof Dl?!0:d instanceof XA&&d.type!==xo&&d.type!==Yo},gc=function(d,u){switch(d){case 0:return il(u);case 2:return Cu(u);case 1:default:return tA(u)}},pc=function(d){switch(d){case 1:return"center";case 2:return"right";case 0:default:return"left"}},mc=["-apple-system","system-ui"],vc=function(d){return/iPhone OS 15_(0|1)/.test(window.navigator.userAgent)?d.filter(function(u){return mc.indexOf(u)===-1}):d},_c=function(d){x(u,d);function u(p,h){var F=d.call(this,p,h)||this;return F.canvas=h.canvas?h.canvas:document.createElement("canvas"),F.ctx=F.canvas.getContext("2d"),F.options=h,F.canvas.width=Math.floor(h.width*h.scale),F.canvas.height=Math.floor(h.height*h.scale),F.canvas.style.width=h.width+"px",F.canvas.style.height=h.height+"px",F.ctx.scale(F.options.scale,F.options.scale),F.ctx.translate(-h.x,-h.y),F.context.logger.debug("EXPERIMENTAL ForeignObject renderer initialized ("+h.width+"x"+h.height+" at "+h.x+","+h.y+") with scale "+h.scale),F}return u.prototype.render=function(p){return fe(this,void 0,void 0,function(){var h,F;return Ce(this,function(Z){switch(Z.label){case 0:return h=Ri(this.options.width*this.options.scale,this.options.height*this.options.scale,this.options.scale,this.options.scale,p),[4,yc(h)];case 1:return F=Z.sent(),this.options.backgroundColor&&(this.ctx.fillStyle=cs(this.options.backgroundColor),this.ctx.fillRect(0,0,this.options.width*this.options.scale,this.options.height*this.options.scale)),this.ctx.drawImage(F,-this.options.x*this.options.scale,-this.options.y*this.options.scale),[2,this.canvas]}})})},u}(Pu),yc=function(d){return new Promise(function(u,p){var h=new Image;h.onload=function(){u(h)},h.onerror=p,h.src="data:image/svg+xml;charset=utf-8,"+encodeURIComponent(new XMLSerializer().serializeToString(d))})},Qu=function(){function d(u){var p=u.id,h=u.enabled;this.id=p,this.enabled=h,this.start=Date.now()}return d.prototype.debug=function(){for(var u=[],p=0;p<arguments.length;p++)u[p]=arguments[p];this.enabled&&(typeof window!="undefined"&&window.console&&typeof console.debug=="function"?console.debug.apply(console,ge([this.id,this.getTime()+"ms"],u)):this.info.apply(this,u))},d.prototype.getTime=function(){return Date.now()-this.start},d.prototype.info=function(){for(var u=[],p=0;p<arguments.length;p++)u[p]=arguments[p];this.enabled&&typeof window!="undefined"&&window.console&&typeof console.info=="function"&&console.info.apply(console,ge([this.id,this.getTime()+"ms"],u))},d.prototype.warn=function(){for(var u=[],p=0;p<arguments.length;p++)u[p]=arguments[p];this.enabled&&(typeof window!="undefined"&&window.console&&typeof console.warn=="function"?console.warn.apply(console,ge([this.id,this.getTime()+"ms"],u)):this.info.apply(this,u))},d.prototype.error=function(){for(var u=[],p=0;p<arguments.length;p++)u[p]=arguments[p];this.enabled&&(typeof window!="undefined"&&window.console&&typeof console.error=="function"?console.error.apply(console,ge([this.id,this.getTime()+"ms"],u)):this.info.apply(this,u))},d.instances={},d}(),wc=function(){function d(u,p){var h;this.windowBounds=p,this.instanceName="#"+d.instanceCount++,this.logger=new Qu({id:this.instanceName,enabled:u.logging}),this.cache=(h=u.cache)!==null&&h!==void 0?h:new ic(this,u)}return d.instanceCount=1,d}(),Ec=function(d,u){return u===void 0&&(u={}),Bc(d,u)};typeof window!="undefined"&&Eu.setContext(window);var Bc=function(d,u){return fe(void 0,void 0,void 0,function(){var p,h,F,Z,ve,Qe,Me,Ut,$t,nn,Rn,Or,dr,Rr,xi,Jr,Wr,Zi,Ii,vi,Ni,Qr,Ni,Hi,mi,Fs,zs,ga,Qi,a,e,t,n,r,i,s,A,f,c,m;return Ce(this,function(y){switch(y.label){case 0:if(!d||typeof d!="object")return[2,Promise.reject("Invalid element provided as first argument")];if(p=d.ownerDocument,!p)throw new Error("Element is not attached to a Document");if(h=p.defaultView,!h)throw new Error("Document is not attached to a Window");return F={allowTaint:(Hi=u.allowTaint)!==null&&Hi!==void 0?Hi:!1,imageTimeout:(mi=u.imageTimeout)!==null&&mi!==void 0?mi:15e3,proxy:u.proxy,useCORS:(Fs=u.useCORS)!==null&&Fs!==void 0?Fs:!1},Z=V({logging:(zs=u.logging)!==null&&zs!==void 0?zs:!0,cache:u.cache},F),ve={windowWidth:(ga=u.windowWidth)!==null&&ga!==void 0?ga:h.innerWidth,windowHeight:(Qi=u.windowHeight)!==null&&Qi!==void 0?Qi:h.innerHeight,scrollX:(a=u.scrollX)!==null&&a!==void 0?a:h.pageXOffset,scrollY:(e=u.scrollY)!==null&&e!==void 0?e:h.pageYOffset},Qe=new G(ve.scrollX,ve.scrollY,ve.windowWidth,ve.windowHeight),Me=new wc(Z,Qe),Ut=(t=u.foreignObjectRendering)!==null&&t!==void 0?t:!1,$t={allowTaint:(n=u.allowTaint)!==null&&n!==void 0?n:!1,onclone:u.onclone,ignoreElements:u.ignoreElements,inlineImages:Ut,copyStyles:Ut},Me.logger.debug("Starting document clone with size "+Qe.width+"x"+Qe.height+" scrolled to "+-Qe.left+","+-Qe.top),nn=new Fo(Me,d,$t),Rn=nn.clonedReferenceElement,Rn?[4,nn.toIFrame(p,Qe)]:[2,Promise.reject("Unable to find element in cloned iframe")];case 1:return Or=y.sent(),dr=Ul(Rn)||Wu(Rn)?ye(Rn.ownerDocument):g(Me,Rn),Rr=dr.width,xi=dr.height,Jr=dr.left,Wr=dr.top,Zi=bc(Me,Rn,u.backgroundColor),Ii={canvas:u.canvas,backgroundColor:Zi,scale:(i=(r=u.scale)!==null&&r!==void 0?r:h.devicePixelRatio)!==null&&i!==void 0?i:1,x:((s=u.x)!==null&&s!==void 0?s:0)+Jr,y:((A=u.y)!==null&&A!==void 0?A:0)+Wr,width:(f=u.width)!==null&&f!==void 0?f:Math.ceil(Rr),height:(c=u.height)!==null&&c!==void 0?c:Math.ceil(xi)},Ut?(Me.logger.debug("Document cloned, using foreign object rendering"),Ni=new _c(Me,Ii),[4,Ni.render(Rn)]):[3,3];case 2:return vi=y.sent(),[3,5];case 3:return Me.logger.debug("Document cloned, element located at "+Jr+","+Wr+" with size "+Rr+"x"+xi+" using computed rendering"),Me.logger.debug("Starting DOM parsing"),Qr=Rl(Me,Rn),Zi===Qr.styles.backgroundColor&&(Qr.styles.backgroundColor=Mi.TRANSPARENT),Me.logger.debug("Starting renderer for element at "+Ii.x+","+Ii.y+" with size "+Ii.width+"x"+Ii.height),Ni=new hc(Me,Ii),[4,Ni.render(Qr)];case 4:vi=y.sent(),y.label=5;case 5:return(!((m=u.removeContainer)!==null&&m!==void 0)||m)&&(Fo.destroy(Or)||Me.logger.error("Cannot detach cloned iframe as it is not in the DOM anymore")),Me.logger.debug("Finished rendering"),[2,vi]}})})},bc=function(d,u,p){var h=u.ownerDocument,F=h.documentElement?Ai(d,getComputedStyle(h.documentElement).backgroundColor):Mi.TRANSPARENT,Z=h.body?Ai(d,getComputedStyle(h.body).backgroundColor):Mi.TRANSPARENT,ve=typeof p=="string"?Ai(d,p):p===null?Mi.TRANSPARENT:4294967295;return u===h.documentElement?vs(F)?vs(Z)?ve:Z:F:ve};return Ec})},53184:function(Vn,ct,x){"use strict";var V,fe;function Ce(ge,G,g){var ye=function(le,o){return ge.js_beautify(le,o)};return ye.js=ge.js_beautify,ye.css=G.css_beautify,ye.html=g.html_beautify,ye.js_beautify=ge.js_beautify,ye.css_beautify=G.css_beautify,ye.html_beautify=g.html_beautify,ye}V=[x(58553),x(87804),x(40998)],fe=function(ge,G,g){return Ce(ge,G,g)}.apply(ct,V),fe!==void 0&&(Vn.exports=fe)},87804:function(Vn,ct){var x,V;(function(){var fe;(function(){"use strict";var ge=[,,function(le){function o(_){this.__parent=_,this.__character_count=0,this.__indent_count=-1,this.__alignment_count=0,this.__wrap_point_index=0,this.__wrap_point_character_count=0,this.__wrap_point_indent_count=-1,this.__wrap_point_alignment_count=0,this.__items=[]}o.prototype.clone_empty=function(){var _=new o(this.__parent);return _.set_indent(this.__indent_count,this.__alignment_count),_},o.prototype.item=function(_){return _<0?this.__items[this.__items.length+_]:this.__items[_]},o.prototype.has_match=function(_){for(var w=this.__items.length-1;w>=0;w--)if(this.__items[w].match(_))return!0;return!1},o.prototype.set_indent=function(_,w){this.is_empty()&&(this.__indent_count=_||0,this.__alignment_count=w||0,this.__character_count=this.__parent.get_indent_size(this.__indent_count,this.__alignment_count))},o.prototype._set_wrap_point=function(){this.__parent.wrap_line_length&&(this.__wrap_point_index=this.__items.length,this.__wrap_point_character_count=this.__character_count,this.__wrap_point_indent_count=this.__parent.next_line.__indent_count,this.__wrap_point_alignment_count=this.__parent.next_line.__alignment_count)},o.prototype._should_wrap=function(){return this.__wrap_point_index&&this.__character_count>this.__parent.wrap_line_length&&this.__wrap_point_character_count>this.__parent.next_line.__character_count},o.prototype._allow_wrap=function(){if(this._should_wrap()){this.__parent.add_new_line();var _=this.__parent.current_line;return _.set_indent(this.__wrap_point_indent_count,this.__wrap_point_alignment_count),_.__items=this.__items.slice(this.__wrap_point_index),this.__items=this.__items.slice(0,this.__wrap_point_index),_.__character_count+=this.__character_count-this.__wrap_point_character_count,this.__character_count=this.__wrap_point_character_count,_.__items[0]===" "&&(_.__items.splice(0,1),_.__character_count-=1),!0}return!1},o.prototype.is_empty=function(){return this.__items.length===0},o.prototype.last=function(){return this.is_empty()?null:this.__items[this.__items.length-1]},o.prototype.push=function(_){this.__items.push(_);var w=_.lastIndexOf(`
|
|
`);w!==-1?this.__character_count=_.length-w:this.__character_count+=_.length},o.prototype.pop=function(){var _=null;return this.is_empty()||(_=this.__items.pop(),this.__character_count-=_.length),_},o.prototype._remove_indent=function(){this.__indent_count>0&&(this.__indent_count-=1,this.__character_count-=this.__parent.indent_size)},o.prototype._remove_wrap_indent=function(){this.__wrap_point_indent_count>0&&(this.__wrap_point_indent_count-=1)},o.prototype.trim=function(){for(;this.last()===" ";)this.__items.pop(),this.__character_count-=1},o.prototype.toString=function(){var _="";return this.is_empty()?this.__parent.indent_empty_lines&&(_=this.__parent.get_indent_string(this.__indent_count)):(_=this.__parent.get_indent_string(this.__indent_count,this.__alignment_count),_+=this.__items.join("")),_};function S(_,w){this.__cache=[""],this.__indent_size=_.indent_size,this.__indent_string=_.indent_char,_.indent_with_tabs||(this.__indent_string=new Array(_.indent_size+1).join(_.indent_char)),w=w||"",_.indent_level>0&&(w=new Array(_.indent_level+1).join(this.__indent_string)),this.__base_string=w,this.__base_string_length=w.length}S.prototype.get_indent_size=function(_,w){var b=this.__base_string_length;return w=w||0,_<0&&(b=0),b+=_*this.__indent_size,b+=w,b},S.prototype.get_indent_string=function(_,w){var b=this.__base_string;return w=w||0,_<0&&(_=0,b=""),w+=_*this.__indent_size,this.__ensure_cache(w),b+=this.__cache[w],b},S.prototype.__ensure_cache=function(_){for(;_>=this.__cache.length;)this.__add_column()},S.prototype.__add_column=function(){var _=this.__cache.length,w=0,b="";this.__indent_size&&_>=this.__indent_size&&(w=Math.floor(_/this.__indent_size),_-=w*this.__indent_size,b=new Array(w+1).join(this.__indent_string)),_&&(b+=new Array(_+1).join(" ")),this.__cache.push(b)};function U(_,w){this.__indent_cache=new S(_,w),this.raw=!1,this._end_with_newline=_.end_with_newline,this.indent_size=_.indent_size,this.wrap_line_length=_.wrap_line_length,this.indent_empty_lines=_.indent_empty_lines,this.__lines=[],this.previous_line=null,this.current_line=null,this.next_line=new o(this),this.space_before_token=!1,this.non_breaking_space=!1,this.previous_token_wrapped=!1,this.__add_outputline()}U.prototype.__add_outputline=function(){this.previous_line=this.current_line,this.current_line=this.next_line.clone_empty(),this.__lines.push(this.current_line)},U.prototype.get_line_number=function(){return this.__lines.length},U.prototype.get_indent_string=function(_,w){return this.__indent_cache.get_indent_string(_,w)},U.prototype.get_indent_size=function(_,w){return this.__indent_cache.get_indent_size(_,w)},U.prototype.is_empty=function(){return!this.previous_line&&this.current_line.is_empty()},U.prototype.add_new_line=function(_){return this.is_empty()||!_&&this.just_added_newline()?!1:(this.raw||this.__add_outputline(),!0)},U.prototype.get_code=function(_){this.trim(!0);var w=this.current_line.pop();w&&(w[w.length-1]===`
|
|
`&&(w=w.replace(/\n+$/g,"")),this.current_line.push(w)),this._end_with_newline&&this.__add_outputline();var b=this.__lines.join(`
|
|
`);return _!==`
|
|
`&&(b=b.replace(/[\n]/g,_)),b},U.prototype.set_wrap_point=function(){this.current_line._set_wrap_point()},U.prototype.set_indent=function(_,w){return _=_||0,w=w||0,this.next_line.set_indent(_,w),this.__lines.length>1?(this.current_line.set_indent(_,w),!0):(this.current_line.set_indent(),!1)},U.prototype.add_raw_token=function(_){for(var w=0;w<_.newlines;w++)this.__add_outputline();this.current_line.set_indent(-1),this.current_line.push(_.whitespace_before),this.current_line.push(_.text),this.space_before_token=!1,this.non_breaking_space=!1,this.previous_token_wrapped=!1},U.prototype.add_token=function(_){this.__add_space_before_token(),this.current_line.push(_),this.space_before_token=!1,this.non_breaking_space=!1,this.previous_token_wrapped=this.current_line._allow_wrap()},U.prototype.__add_space_before_token=function(){this.space_before_token&&!this.just_added_newline()&&(this.non_breaking_space||this.set_wrap_point(),this.current_line.push(" "))},U.prototype.remove_indent=function(_){for(var w=this.__lines.length;_<w;)this.__lines[_]._remove_indent(),_++;this.current_line._remove_wrap_indent()},U.prototype.trim=function(_){for(_=_===void 0?!1:_,this.current_line.trim();_&&this.__lines.length>1&&this.current_line.is_empty();)this.__lines.pop(),this.current_line=this.__lines[this.__lines.length-1],this.current_line.trim();this.previous_line=this.__lines.length>1?this.__lines[this.__lines.length-2]:null},U.prototype.just_added_newline=function(){return this.current_line.is_empty()},U.prototype.just_added_blankline=function(){return this.is_empty()||this.current_line.is_empty()&&this.previous_line.is_empty()},U.prototype.ensure_empty_line_above=function(_,w){for(var b=this.__lines.length-2;b>=0;){var R=this.__lines[b];if(R.is_empty())break;if(R.item(0).indexOf(_)!==0&&R.item(-1)!==w){this.__lines.splice(b+1,0,new o(this)),this.previous_line=this.__lines[this.__lines.length-2];break}b--}},le.exports.Output=U},,,,function(le){function o(_,w){this.raw_options=S(_,w),this.disabled=this._get_boolean("disabled"),this.eol=this._get_characters("eol","auto"),this.end_with_newline=this._get_boolean("end_with_newline"),this.indent_size=this._get_number("indent_size",4),this.indent_char=this._get_characters("indent_char"," "),this.indent_level=this._get_number("indent_level"),this.preserve_newlines=this._get_boolean("preserve_newlines",!0),this.max_preserve_newlines=this._get_number("max_preserve_newlines",32786),this.preserve_newlines||(this.max_preserve_newlines=0),this.indent_with_tabs=this._get_boolean("indent_with_tabs",this.indent_char===" "),this.indent_with_tabs&&(this.indent_char=" ",this.indent_size===1&&(this.indent_size=4)),this.wrap_line_length=this._get_number("wrap_line_length",this._get_number("max_char")),this.indent_empty_lines=this._get_boolean("indent_empty_lines"),this.templating=this._get_selection_list("templating",["auto","none","angular","django","erb","handlebars","php","smarty"],["auto"])}o.prototype._get_array=function(_,w){var b=this.raw_options[_],R=w||[];return typeof b=="object"?b!==null&&typeof b.concat=="function"&&(R=b.concat()):typeof b=="string"&&(R=b.split(/[^a-zA-Z0-9_\/\-]+/)),R},o.prototype._get_boolean=function(_,w){var b=this.raw_options[_],R=b===void 0?!!w:!!b;return R},o.prototype._get_characters=function(_,w){var b=this.raw_options[_],R=w||"";return typeof b=="string"&&(R=b.replace(/\\r/,"\r").replace(/\\n/,`
|
|
`).replace(/\\t/," ")),R},o.prototype._get_number=function(_,w){var b=this.raw_options[_];w=parseInt(w,10),isNaN(w)&&(w=0);var R=parseInt(b,10);return isNaN(R)&&(R=w),R},o.prototype._get_selection=function(_,w,b){var R=this._get_selection_list(_,w,b);if(R.length!==1)throw new Error("Invalid Option Value: The option '"+_+`' can only be one of the following values:
|
|
`+w+`
|
|
You passed in: '`+this.raw_options[_]+"'");return R[0]},o.prototype._get_selection_list=function(_,w,b){if(!w||w.length===0)throw new Error("Selection list cannot be empty.");if(b=b||[w[0]],!this._is_valid_selection(b,w))throw new Error("Invalid Default Value!");var R=this._get_array(_,b);if(!this._is_valid_selection(R,w))throw new Error("Invalid Option Value: The option '"+_+`' can contain only the following values:
|
|
`+w+`
|
|
You passed in: '`+this.raw_options[_]+"'");return R},o.prototype._is_valid_selection=function(_,w){return _.length&&w.length&&!_.some(function(b){return w.indexOf(b)===-1})};function S(_,w){var b={};_=U(_);var R;for(R in _)R!==w&&(b[R]=_[R]);if(w&&_[w])for(R in _[w])b[R]=_[w][R];return b}function U(_){var w={},b;for(b in _){var R=b.replace(/-/g,"_");w[R]=_[b]}return w}le.exports.Options=o,le.exports.normalizeOpts=U,le.exports.mergeOpts=S},,function(le){var o=RegExp.prototype.hasOwnProperty("sticky");function S(U){this.__input=U||"",this.__input_length=this.__input.length,this.__position=0}S.prototype.restart=function(){this.__position=0},S.prototype.back=function(){this.__position>0&&(this.__position-=1)},S.prototype.hasNext=function(){return this.__position<this.__input_length},S.prototype.next=function(){var U=null;return this.hasNext()&&(U=this.__input.charAt(this.__position),this.__position+=1),U},S.prototype.peek=function(U){var _=null;return U=U||0,U+=this.__position,U>=0&&U<this.__input_length&&(_=this.__input.charAt(U)),_},S.prototype.__match=function(U,_){U.lastIndex=_;var w=U.exec(this.__input);return w&&!(o&&U.sticky)&&w.index!==_&&(w=null),w},S.prototype.test=function(U,_){return _=_||0,_+=this.__position,_>=0&&_<this.__input_length?!!this.__match(U,_):!1},S.prototype.testChar=function(U,_){var w=this.peek(_);return U.lastIndex=0,w!==null&&U.test(w)},S.prototype.match=function(U){var _=this.__match(U,this.__position);return _?this.__position+=_[0].length:_=null,_},S.prototype.read=function(U,_,w){var b="",R;return U&&(R=this.match(U),R&&(b+=R[0])),_&&(R||!U)&&(b+=this.readUntil(_,w)),b},S.prototype.readUntil=function(U,_){var w="",b=this.__position;U.lastIndex=this.__position;var R=U.exec(this.__input);return R?(b=R.index,_&&(b+=R[0].length)):b=this.__input_length,w=this.__input.substring(this.__position,b),this.__position=b,w},S.prototype.readUntilAfter=function(U){return this.readUntil(U,!0)},S.prototype.get_regexp=function(U,_){var w=null,b="g";return _&&o&&(b="y"),typeof U=="string"&&U!==""?w=new RegExp(U,b):U&&(w=new RegExp(U.source,b)),w},S.prototype.get_literal_regexp=function(U){return RegExp(U.replace(/[-\/\\^$*+?.()|[\]{}]/g,"\\$&"))},S.prototype.peekUntilAfter=function(U){var _=this.__position,w=this.readUntilAfter(U);return this.__position=_,w},S.prototype.lookBack=function(U){var _=this.__position-1;return _>=U.length&&this.__input.substring(_-U.length,_).toLowerCase()===U},le.exports.InputScanner=S},,,,,function(le){function o(S,U){S=typeof S=="string"?S:S.source,U=typeof U=="string"?U:U.source,this.__directives_block_pattern=new RegExp(S+/ beautify( \w+[:]\w+)+ /.source+U,"g"),this.__directive_pattern=/ (\w+)[:](\w+)/g,this.__directives_end_ignore_pattern=new RegExp(S+/\sbeautify\signore:end\s/.source+U,"g")}o.prototype.get_directives=function(S){if(!S.match(this.__directives_block_pattern))return null;var U={};this.__directive_pattern.lastIndex=0;for(var _=this.__directive_pattern.exec(S);_;)U[_[1]]=_[2],_=this.__directive_pattern.exec(S);return U},o.prototype.readIgnored=function(S){return S.readUntilAfter(this.__directives_end_ignore_pattern)},le.exports.Directives=o},,function(le,o,S){var U=S(16).Beautifier,_=S(17).Options;function w(b,R){var M=new U(b,R);return M.beautify()}le.exports=w,le.exports.defaultOptions=function(){return new _}},function(le,o,S){var U=S(17).Options,_=S(2).Output,w=S(8).InputScanner,b=S(13).Directives,R=new b(/\/\*/,/\*\//),M=/\r\n|[\r\n]/,H=/\r\n|[\r\n]/g,J=/\s/,T=/(?:\s|\n)+/g,N=/\/\*(?:[\s\S]*?)((?:\*\/)|$)/g,P=/\/\/(?:[^\n\r\u2028\u2029]*)/g;function k(oe,de){this._source_text=oe||"",this._options=new U(de),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"]}k.prototype.eatString=function(oe){var de="";for(this._ch=this._input.next();this._ch;){if(de+=this._ch,this._ch==="\\")de+=this._input.next();else if(oe.indexOf(this._ch)!==-1||this._ch===`
|
|
`)break;this._ch=this._input.next()}return de},k.prototype.eatWhitespace=function(oe){for(var de=J.test(this._input.peek()),ie=0;J.test(this._input.peek());)this._ch=this._input.next(),oe&&this._ch===`
|
|
`&&(ie===0||ie<this._options.max_preserve_newlines)&&(ie++,this._output.add_new_line(!0));return de},k.prototype.foundNestedPseudoClass=function(){for(var oe=0,de=1,ie=this._input.peek(de);ie;){if(ie==="{")return!0;if(ie==="(")oe+=1;else if(ie===")"){if(oe===0)return!1;oe-=1}else if(ie===";"||ie==="}")return!1;de++,ie=this._input.peek(de)}return!1},k.prototype.print_string=function(oe){this._output.set_indent(this._indentLevel),this._output.non_breaking_space=!0,this._output.add_token(oe)},k.prototype.preserveSingleSpace=function(oe){oe&&(this._output.space_before_token=!0)},k.prototype.indent=function(){this._indentLevel++},k.prototype.outdent=function(){this._indentLevel>0&&this._indentLevel--},k.prototype.beautify=function(){if(this._options.disabled)return this._source_text;var oe=this._source_text,de=this._options.eol;de==="auto"&&(de=`
|
|
`,oe&&M.test(oe||"")&&(de=oe.match(M)[0])),oe=oe.replace(H,`
|
|
`);var ie=oe.match(/^[\t ]*/)[0];this._output=new _(this._options,ie),this._input=new w(oe),this._indentLevel=0,this._nestedLevel=0,this._ch=null;for(var ae=0,we=!1,Te=!1,Re=!1,Y=!1,$=!1,te=this._ch,q=!1,he,re,E;he=this._input.read(T),re=he!=="",E=te,this._ch=this._input.next(),this._ch==="\\"&&this._input.hasNext()&&(this._ch+=this._input.next()),te=this._ch,this._ch;)if(this._ch==="/"&&this._input.peek()==="*"){this._output.add_new_line(),this._input.back();var C=this._input.read(N),W=R.get_directives(C);W&&W.ignore==="start"&&(C+=R.readIgnored(this._input)),this.print_string(C),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(P)),this.eatWhitespace(!0);else if(this._ch==="$"){this.preserveSingleSpace(re),this.print_string(this._ch);var be=this._input.peekUntilAfter(/[: ,;{}()[\]\/='"]/g);be.match(/[ :]$/)&&(be=this.eatString(": ").replace(/\s+$/,""),this.print_string(be),this._output.space_before_token=!0),ae===0&&be.indexOf(":")!==-1&&(Te=!0,this.indent())}else if(this._ch==="@")if(this.preserveSingleSpace(re),this._input.peek()==="{")this.print_string(this._ch+this.eatString("}"));else{this.print_string(this._ch);var Ve=this._input.peekUntilAfter(/[: ,;{}()[\]\/='"]/g);Ve.match(/[ :]$/)&&(Ve=this.eatString(": ").replace(/\s+$/,""),this.print_string(Ve),this._output.space_before_token=!0),ae===0&&Ve.indexOf(":")!==-1?(Te=!0,this.indent()):Ve in this.NESTED_AT_RULE?(this._nestedLevel+=1,Ve in this.CONDITIONAL_GROUP_RULE&&(Re=!0)):ae===0&&!Te&&(Y=!0)}else if(this._ch==="#"&&this._input.peek()==="{")this.preserveSingleSpace(re),this.print_string(this._ch+this.eatString("}"));else if(this._ch==="{")Te&&(Te=!1,this.outdent()),Y=!1,Re?(Re=!1,we=this._indentLevel>=this._nestedLevel):we=this._indentLevel>=this._nestedLevel-1,this._options.newline_between_rules&&we&&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)):(E==="("?this._output.space_before_token=!1:E!==","&&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(),E==="{"&&this._output.trim(!0),Te&&(this.outdent(),Te=!1),this.print_string(this._ch),we=!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 Ke=0;Ke<this.NON_SEMICOLON_NEWLINE_PROPERTY.length;Ke++)if(this._input.lookBack(this.NON_SEMICOLON_NEWLINE_PROPERTY[Ke])){q=!0;break}(we||Re)&&!(this._input.lookBack("&")||this.foundNestedPseudoClass())&&!this._input.lookBack("(")&&!Y&&ae===0?(this.print_string(":"),Te||(Te=!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 Ct=E==='"'||E==="'";this.preserveSingleSpace(Ct||re),this.print_string(this._ch+this.eatString(this._ch)),this.eatWhitespace(!0)}else if(this._ch===";")q=!1,ae===0?(Te&&(this.outdent(),Te=!1),Y=!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(),ae++,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(")")),ae&&(ae--,this.outdent()));else{var Rt=!1;this._input.lookBack("with")&&(Rt=!0),this.preserveSingleSpace(re||Rt),this.print_string(this._ch),Te&&E==="$"&&this._options.selector_separator_newline?(this._output.add_new_line(),$=!0):(this.eatWhitespace(),ae++,this.indent())}else if(this._ch===")")ae&&(ae--,this.outdent()),$&&this._input.peek()===";"&&this._options.selector_separator_newline&&($=!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&&(!Te||$)&&ae===0&&!Y?this._output.add_new_line():this._output.space_before_token=!0;else if((this._ch===">"||this._ch==="+"||this._ch==="~")&&!Te&&ae===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&&J.test(this._ch)&&(this._ch=""));else if(this._ch==="]")this.print_string(this._ch);else if(this._ch==="[")this.preserveSingleSpace(re),this.print_string(this._ch);else if(this._ch==="=")this.eatWhitespace(),this.print_string("="),J.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 Vt=E==='"'||E==="'";this.preserveSingleSpace(Vt||re),this.print_string(this._ch),!this._output.just_added_newline()&&this._input.peek()===`
|
|
`&&q&&this._output.add_new_line()}var rn=this._output.get_code(de);return rn},le.exports.Beautifier=k},function(le,o,S){var U=S(6).Options;function _(w){U.call(this,w,"css"),this.selector_separator_newline=this._get_boolean("selector_separator_newline",!0),this.newline_between_rules=this._get_boolean("newline_between_rules",!0);var b=this._get_boolean("space_around_selector_separator");this.space_around_combinator=this._get_boolean("space_around_combinator")||b;var R=this._get_selection_list("brace_style",["collapse","expand","end-expand","none","preserve-inline"]);this.brace_style="collapse";for(var M=0;M<R.length;M++)R[M]!=="expand"?this.brace_style="collapse":this.brace_style=R[M]}_.prototype=new U,le.exports.Options=_}],G={};function g(le){var o=G[le];if(o!==void 0)return o.exports;var S=G[le]={exports:{}};return ge[le](S,S.exports,g),S.exports}var ye=g(15);fe=ye})();var Ce=fe;x=[],V=function(){return{css_beautify:Ce}}.apply(ct,x),V!==void 0&&(Vn.exports=V)})()},40998:function(Vn,ct,x){var V,fe;(function(){var Ce;(function(){"use strict";var ye=[,,function(U){function _(R){this.__parent=R,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=[]}_.prototype.clone_empty=function(){var R=new _(this.__parent);return R.set_indent(this.__indent_count,this.__alignment_count),R},_.prototype.item=function(R){return R<0?this.__items[this.__items.length+R]:this.__items[R]},_.prototype.has_match=function(R){for(var M=this.__items.length-1;M>=0;M--)if(this.__items[M].match(R))return!0;return!1},_.prototype.set_indent=function(R,M){this.is_empty()&&(this.__indent_count=R||0,this.__alignment_count=M||0,this.__character_count=this.__parent.get_indent_size(this.__indent_count,this.__alignment_count))},_.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)},_.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},_.prototype._allow_wrap=function(){if(this._should_wrap()){this.__parent.add_new_line();var R=this.__parent.current_line;return R.set_indent(this.__wrap_point_indent_count,this.__wrap_point_alignment_count),R.__items=this.__items.slice(this.__wrap_point_index),this.__items=this.__items.slice(0,this.__wrap_point_index),R.__character_count+=this.__character_count-this.__wrap_point_character_count,this.__character_count=this.__wrap_point_character_count,R.__items[0]===" "&&(R.__items.splice(0,1),R.__character_count-=1),!0}return!1},_.prototype.is_empty=function(){return this.__items.length===0},_.prototype.last=function(){return this.is_empty()?null:this.__items[this.__items.length-1]},_.prototype.push=function(R){this.__items.push(R);var M=R.lastIndexOf(`
|
|
`);M!==-1?this.__character_count=R.length-M:this.__character_count+=R.length},_.prototype.pop=function(){var R=null;return this.is_empty()||(R=this.__items.pop(),this.__character_count-=R.length),R},_.prototype._remove_indent=function(){this.__indent_count>0&&(this.__indent_count-=1,this.__character_count-=this.__parent.indent_size)},_.prototype._remove_wrap_indent=function(){this.__wrap_point_indent_count>0&&(this.__wrap_point_indent_count-=1)},_.prototype.trim=function(){for(;this.last()===" ";)this.__items.pop(),this.__character_count-=1},_.prototype.toString=function(){var R="";return this.is_empty()?this.__parent.indent_empty_lines&&(R=this.__parent.get_indent_string(this.__indent_count)):(R=this.__parent.get_indent_string(this.__indent_count,this.__alignment_count),R+=this.__items.join("")),R};function w(R,M){this.__cache=[""],this.__indent_size=R.indent_size,this.__indent_string=R.indent_char,R.indent_with_tabs||(this.__indent_string=new Array(R.indent_size+1).join(R.indent_char)),M=M||"",R.indent_level>0&&(M=new Array(R.indent_level+1).join(this.__indent_string)),this.__base_string=M,this.__base_string_length=M.length}w.prototype.get_indent_size=function(R,M){var H=this.__base_string_length;return M=M||0,R<0&&(H=0),H+=R*this.__indent_size,H+=M,H},w.prototype.get_indent_string=function(R,M){var H=this.__base_string;return M=M||0,R<0&&(R=0,H=""),M+=R*this.__indent_size,this.__ensure_cache(M),H+=this.__cache[M],H},w.prototype.__ensure_cache=function(R){for(;R>=this.__cache.length;)this.__add_column()},w.prototype.__add_column=function(){var R=this.__cache.length,M=0,H="";this.__indent_size&&R>=this.__indent_size&&(M=Math.floor(R/this.__indent_size),R-=M*this.__indent_size,H=new Array(M+1).join(this.__indent_string)),R&&(H+=new Array(R+1).join(" ")),this.__cache.push(H)};function b(R,M){this.__indent_cache=new w(R,M),this.raw=!1,this._end_with_newline=R.end_with_newline,this.indent_size=R.indent_size,this.wrap_line_length=R.wrap_line_length,this.indent_empty_lines=R.indent_empty_lines,this.__lines=[],this.previous_line=null,this.current_line=null,this.next_line=new _(this),this.space_before_token=!1,this.non_breaking_space=!1,this.previous_token_wrapped=!1,this.__add_outputline()}b.prototype.__add_outputline=function(){this.previous_line=this.current_line,this.current_line=this.next_line.clone_empty(),this.__lines.push(this.current_line)},b.prototype.get_line_number=function(){return this.__lines.length},b.prototype.get_indent_string=function(R,M){return this.__indent_cache.get_indent_string(R,M)},b.prototype.get_indent_size=function(R,M){return this.__indent_cache.get_indent_size(R,M)},b.prototype.is_empty=function(){return!this.previous_line&&this.current_line.is_empty()},b.prototype.add_new_line=function(R){return this.is_empty()||!R&&this.just_added_newline()?!1:(this.raw||this.__add_outputline(),!0)},b.prototype.get_code=function(R){this.trim(!0);var M=this.current_line.pop();M&&(M[M.length-1]===`
|
|
`&&(M=M.replace(/\n+$/g,"")),this.current_line.push(M)),this._end_with_newline&&this.__add_outputline();var H=this.__lines.join(`
|
|
`);return R!==`
|
|
`&&(H=H.replace(/[\n]/g,R)),H},b.prototype.set_wrap_point=function(){this.current_line._set_wrap_point()},b.prototype.set_indent=function(R,M){return R=R||0,M=M||0,this.next_line.set_indent(R,M),this.__lines.length>1?(this.current_line.set_indent(R,M),!0):(this.current_line.set_indent(),!1)},b.prototype.add_raw_token=function(R){for(var M=0;M<R.newlines;M++)this.__add_outputline();this.current_line.set_indent(-1),this.current_line.push(R.whitespace_before),this.current_line.push(R.text),this.space_before_token=!1,this.non_breaking_space=!1,this.previous_token_wrapped=!1},b.prototype.add_token=function(R){this.__add_space_before_token(),this.current_line.push(R),this.space_before_token=!1,this.non_breaking_space=!1,this.previous_token_wrapped=this.current_line._allow_wrap()},b.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(" "))},b.prototype.remove_indent=function(R){for(var M=this.__lines.length;R<M;)this.__lines[R]._remove_indent(),R++;this.current_line._remove_wrap_indent()},b.prototype.trim=function(R){for(R=R===void 0?!1:R,this.current_line.trim();R&&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},b.prototype.just_added_newline=function(){return this.current_line.is_empty()},b.prototype.just_added_blankline=function(){return this.is_empty()||this.current_line.is_empty()&&this.previous_line.is_empty()},b.prototype.ensure_empty_line_above=function(R,M){for(var H=this.__lines.length-2;H>=0;){var J=this.__lines[H];if(J.is_empty())break;if(J.item(0).indexOf(R)!==0&&J.item(-1)!==M){this.__lines.splice(H+1,0,new _(this)),this.previous_line=this.__lines[this.__lines.length-2];break}H--}},U.exports.Output=b},function(U){function _(w,b,R,M){this.type=w,this.text=b,this.comments_before=null,this.newlines=R||0,this.whitespace_before=M||"",this.parent=null,this.next=null,this.previous=null,this.opened=null,this.closed=null,this.directives=null}U.exports.Token=_},,,function(U){function _(R,M){this.raw_options=w(R,M),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"])}_.prototype._get_array=function(R,M){var H=this.raw_options[R],J=M||[];return typeof H=="object"?H!==null&&typeof H.concat=="function"&&(J=H.concat()):typeof H=="string"&&(J=H.split(/[^a-zA-Z0-9_\/\-]+/)),J},_.prototype._get_boolean=function(R,M){var H=this.raw_options[R],J=H===void 0?!!M:!!H;return J},_.prototype._get_characters=function(R,M){var H=this.raw_options[R],J=M||"";return typeof H=="string"&&(J=H.replace(/\\r/,"\r").replace(/\\n/,`
|
|
`).replace(/\\t/," ")),J},_.prototype._get_number=function(R,M){var H=this.raw_options[R];M=parseInt(M,10),isNaN(M)&&(M=0);var J=parseInt(H,10);return isNaN(J)&&(J=M),J},_.prototype._get_selection=function(R,M,H){var J=this._get_selection_list(R,M,H);if(J.length!==1)throw new Error("Invalid Option Value: The option '"+R+`' can only be one of the following values:
|
|
`+M+`
|
|
You passed in: '`+this.raw_options[R]+"'");return J[0]},_.prototype._get_selection_list=function(R,M,H){if(!M||M.length===0)throw new Error("Selection list cannot be empty.");if(H=H||[M[0]],!this._is_valid_selection(H,M))throw new Error("Invalid Default Value!");var J=this._get_array(R,H);if(!this._is_valid_selection(J,M))throw new Error("Invalid Option Value: The option '"+R+`' can contain only the following values:
|
|
`+M+`
|
|
You passed in: '`+this.raw_options[R]+"'");return J},_.prototype._is_valid_selection=function(R,M){return R.length&&M.length&&!R.some(function(H){return M.indexOf(H)===-1})};function w(R,M){var H={};R=b(R);var J;for(J in R)J!==M&&(H[J]=R[J]);if(M&&R[M])for(J in R[M])H[J]=R[M][J];return H}function b(R){var M={},H;for(H in R){var J=H.replace(/-/g,"_");M[J]=R[H]}return M}U.exports.Options=_,U.exports.normalizeOpts=b,U.exports.mergeOpts=w},,function(U){var _=RegExp.prototype.hasOwnProperty("sticky");function w(b){this.__input=b||"",this.__input_length=this.__input.length,this.__position=0}w.prototype.restart=function(){this.__position=0},w.prototype.back=function(){this.__position>0&&(this.__position-=1)},w.prototype.hasNext=function(){return this.__position<this.__input_length},w.prototype.next=function(){var b=null;return this.hasNext()&&(b=this.__input.charAt(this.__position),this.__position+=1),b},w.prototype.peek=function(b){var R=null;return b=b||0,b+=this.__position,b>=0&&b<this.__input_length&&(R=this.__input.charAt(b)),R},w.prototype.__match=function(b,R){b.lastIndex=R;var M=b.exec(this.__input);return M&&!(_&&b.sticky)&&M.index!==R&&(M=null),M},w.prototype.test=function(b,R){return R=R||0,R+=this.__position,R>=0&&R<this.__input_length?!!this.__match(b,R):!1},w.prototype.testChar=function(b,R){var M=this.peek(R);return b.lastIndex=0,M!==null&&b.test(M)},w.prototype.match=function(b){var R=this.__match(b,this.__position);return R?this.__position+=R[0].length:R=null,R},w.prototype.read=function(b,R,M){var H="",J;return b&&(J=this.match(b),J&&(H+=J[0])),R&&(J||!b)&&(H+=this.readUntil(R,M)),H},w.prototype.readUntil=function(b,R){var M="",H=this.__position;b.lastIndex=this.__position;var J=b.exec(this.__input);return J?(H=J.index,R&&(H+=J[0].length)):H=this.__input_length,M=this.__input.substring(this.__position,H),this.__position=H,M},w.prototype.readUntilAfter=function(b){return this.readUntil(b,!0)},w.prototype.get_regexp=function(b,R){var M=null,H="g";return R&&_&&(H="y"),typeof b=="string"&&b!==""?M=new RegExp(b,H):b&&(M=new RegExp(b.source,H)),M},w.prototype.get_literal_regexp=function(b){return RegExp(b.replace(/[-\/\\^$*+?.()|[\]{}]/g,"\\$&"))},w.prototype.peekUntilAfter=function(b){var R=this.__position,M=this.readUntilAfter(b);return this.__position=R,M},w.prototype.lookBack=function(b){var R=this.__position-1;return R>=b.length&&this.__input.substring(R-b.length,R).toLowerCase()===b},U.exports.InputScanner=w},function(U,_,w){var b=w(8).InputScanner,R=w(3).Token,M=w(10).TokenStream,H=w(11).WhitespacePattern,J={START:"TK_START",RAW:"TK_RAW",EOF:"TK_EOF"},T=function(N,P){this._input=new b(N),this._options=P||{},this.__tokens=null,this._patterns={},this._patterns.whitespace=new H(this._input)};T.prototype.tokenize=function(){this._input.restart(),this.__tokens=new M,this._reset();for(var N,P=new R(J.START,""),k=null,oe=[],de=new M;P.type!==J.EOF;){for(N=this._get_next_token(P,k);this._is_comment(N);)de.add(N),N=this._get_next_token(P,k);de.isEmpty()||(N.comments_before=de,de=new M),N.parent=k,this._is_opening(N)?(oe.push(k),k=N):k&&this._is_closing(N,k)&&(N.opened=k,k.closed=N,k=oe.pop(),N.parent=k),N.previous=P,P.next=N,this.__tokens.add(N),P=N}return this.__tokens},T.prototype._is_first_token=function(){return this.__tokens.isEmpty()},T.prototype._reset=function(){},T.prototype._get_next_token=function(N,P){this._readWhitespace();var k=this._input.read(/.+/g);return k?this._create_token(J.RAW,k):this._create_token(J.EOF,"")},T.prototype._is_comment=function(N){return!1},T.prototype._is_opening=function(N){return!1},T.prototype._is_closing=function(N,P){return!1},T.prototype._create_token=function(N,P){var k=new R(N,P,this._patterns.whitespace.newline_count,this._patterns.whitespace.whitespace_before_token);return k},T.prototype._readWhitespace=function(){return this._patterns.whitespace.read()},U.exports.Tokenizer=T,U.exports.TOKEN=J},function(U){function _(w){this.__tokens=[],this.__tokens_length=this.__tokens.length,this.__position=0,this.__parent_token=w}_.prototype.restart=function(){this.__position=0},_.prototype.isEmpty=function(){return this.__tokens_length===0},_.prototype.hasNext=function(){return this.__position<this.__tokens_length},_.prototype.next=function(){var w=null;return this.hasNext()&&(w=this.__tokens[this.__position],this.__position+=1),w},_.prototype.peek=function(w){var b=null;return w=w||0,w+=this.__position,w>=0&&w<this.__tokens_length&&(b=this.__tokens[w]),b},_.prototype.add=function(w){this.__parent_token&&(w.parent=this.__parent_token),this.__tokens.push(w),this.__tokens_length+=1},U.exports.TokenStream=_},function(U,_,w){var b=w(12).Pattern;function R(M,H){b.call(this,M,H),H?this._line_regexp=this._input.get_regexp(H._line_regexp):this.__set_whitespace_patterns("",""),this.newline_count=0,this.whitespace_before_token=""}R.prototype=new b,R.prototype.__set_whitespace_patterns=function(M,H){M+="\\t ",H+="\\n\\r",this._match_pattern=this._input.get_regexp("["+M+H+"]+",!0),this._newline_regexp=this._input.get_regexp("\\r\\n|["+H+"]")},R.prototype.read=function(){this.newline_count=0,this.whitespace_before_token="";var M=this._input.read(this._match_pattern);if(M===" ")this.whitespace_before_token=" ";else if(M){var H=this.__split(this._newline_regexp,M);this.newline_count=H.length-1,this.whitespace_before_token=H[this.newline_count]}return M},R.prototype.matching=function(M,H){var J=this._create();return J.__set_whitespace_patterns(M,H),J._update(),J},R.prototype._create=function(){return new R(this._input,this)},R.prototype.__split=function(M,H){M.lastIndex=0;for(var J=0,T=[],N=M.exec(H);N;)T.push(H.substring(J,N.index)),J=N.index+N[0].length,N=M.exec(H);return J<H.length?T.push(H.substring(J,H.length)):T.push(""),T},U.exports.WhitespacePattern=R},function(U){function _(w,b){this._input=w,this._starting_pattern=null,this._match_pattern=null,this._until_pattern=null,this._until_after=!1,b&&(this._starting_pattern=this._input.get_regexp(b._starting_pattern,!0),this._match_pattern=this._input.get_regexp(b._match_pattern,!0),this._until_pattern=this._input.get_regexp(b._until_pattern),this._until_after=b._until_after)}_.prototype.read=function(){var w=this._input.read(this._starting_pattern);return(!this._starting_pattern||w)&&(w+=this._input.read(this._match_pattern,this._until_pattern,this._until_after)),w},_.prototype.read_match=function(){return this._input.match(this._match_pattern)},_.prototype.until_after=function(w){var b=this._create();return b._until_after=!0,b._until_pattern=this._input.get_regexp(w),b._update(),b},_.prototype.until=function(w){var b=this._create();return b._until_after=!1,b._until_pattern=this._input.get_regexp(w),b._update(),b},_.prototype.starting_with=function(w){var b=this._create();return b._starting_pattern=this._input.get_regexp(w,!0),b._update(),b},_.prototype.matching=function(w){var b=this._create();return b._match_pattern=this._input.get_regexp(w,!0),b._update(),b},_.prototype._create=function(){return new _(this._input,this)},_.prototype._update=function(){},U.exports.Pattern=_},function(U){function _(w,b){w=typeof w=="string"?w:w.source,b=typeof b=="string"?b:b.source,this.__directives_block_pattern=new RegExp(w+/ beautify( \w+[:]\w+)+ /.source+b,"g"),this.__directive_pattern=/ (\w+)[:](\w+)/g,this.__directives_end_ignore_pattern=new RegExp(w+/\sbeautify\signore:end\s/.source+b,"g")}_.prototype.get_directives=function(w){if(!w.match(this.__directives_block_pattern))return null;var b={};this.__directive_pattern.lastIndex=0;for(var R=this.__directive_pattern.exec(w);R;)b[R[1]]=R[2],R=this.__directive_pattern.exec(w);return b},_.prototype.readIgnored=function(w){return w.readUntilAfter(this.__directives_end_ignore_pattern)},U.exports.Directives=_},function(U,_,w){var b=w(12).Pattern,R={django:!1,erb:!1,handlebars:!1,php:!1,smarty:!1,angular:!1};function M(H,J){b.call(this,H,J),this.__template_pattern=null,this._disabled=Object.assign({},R),this._excluded=Object.assign({},R),J&&(this.__template_pattern=this._input.get_regexp(J.__template_pattern),this._excluded=Object.assign(this._excluded,J._excluded),this._disabled=Object.assign(this._disabled,J._disabled));var T=new b(H);this.__patterns={handlebars_comment:T.starting_with(/{{!--/).until_after(/--}}/),handlebars_unescaped:T.starting_with(/{{{/).until_after(/}}}/),handlebars:T.starting_with(/{{/).until_after(/}}/),php:T.starting_with(/<\?(?:[= ]|php)/).until_after(/\?>/),erb:T.starting_with(/<%[^%]/).until_after(/[^%]%>/),django:T.starting_with(/{%/).until_after(/%}/),django_value:T.starting_with(/{{/).until_after(/}}/),django_comment:T.starting_with(/{#/).until_after(/#}/),smarty:T.starting_with(/{(?=[^}{\s\n])/).until_after(/[^\s\n]}/),smarty_comment:T.starting_with(/{\*/).until_after(/\*}/),smarty_literal:T.starting_with(/{literal}/).until_after(/{\/literal}/)}}M.prototype=new b,M.prototype._create=function(){return new M(this._input,this)},M.prototype._update=function(){this.__set_templated_pattern()},M.prototype.disable=function(H){var J=this._create();return J._disabled[H]=!0,J._update(),J},M.prototype.read_options=function(H){var J=this._create();for(var T in R)J._disabled[T]=H.templating.indexOf(T)===-1;return J._update(),J},M.prototype.exclude=function(H){var J=this._create();return J._excluded[H]=!0,J._update(),J},M.prototype.read=function(){var H="";this._match_pattern?H=this._input.read(this._starting_pattern):H=this._input.read(this._starting_pattern,this.__template_pattern);for(var J=this._read_template();J;)this._match_pattern?J+=this._input.read(this._match_pattern):J+=this._input.readUntil(this.__template_pattern),H+=J,J=this._read_template();return this._until_after&&(H+=this._input.readUntilAfter(this._until_pattern)),H},M.prototype.__set_templated_pattern=function(){var H=[];this._disabled.php||H.push(this.__patterns.php._starting_pattern.source),this._disabled.handlebars||H.push(this.__patterns.handlebars._starting_pattern.source),this._disabled.angular||H.push(this.__patterns.handlebars._starting_pattern.source),this._disabled.erb||H.push(this.__patterns.erb._starting_pattern.source),this._disabled.django||(H.push(this.__patterns.django._starting_pattern.source),H.push(this.__patterns.django_value._starting_pattern.source),H.push(this.__patterns.django_comment._starting_pattern.source)),this._disabled.smarty||H.push(this.__patterns.smarty._starting_pattern.source),this._until_pattern&&H.push(this._until_pattern.source),this.__template_pattern=this._input.get_regexp("(?:"+H.join("|")+")")},M.prototype._read_template=function(){var H="",J=this._input.peek();if(J==="<"){var T=this._input.peek(1);!this._disabled.php&&!this._excluded.php&&T==="?"&&(H=H||this.__patterns.php.read()),!this._disabled.erb&&!this._excluded.erb&&T==="%"&&(H=H||this.__patterns.erb.read())}else J==="{"&&(!this._disabled.handlebars&&!this._excluded.handlebars&&(H=H||this.__patterns.handlebars_comment.read(),H=H||this.__patterns.handlebars_unescaped.read(),H=H||this.__patterns.handlebars.read()),this._disabled.django||(!this._excluded.django&&!this._excluded.handlebars&&(H=H||this.__patterns.django_value.read()),this._excluded.django||(H=H||this.__patterns.django_comment.read(),H=H||this.__patterns.django.read())),this._disabled.smarty||this._disabled.django&&this._disabled.handlebars&&(H=H||this.__patterns.smarty_comment.read(),H=H||this.__patterns.smarty_literal.read(),H=H||this.__patterns.smarty.read()));return H},U.exports.TemplatablePattern=M},,,,function(U,_,w){var b=w(19).Beautifier,R=w(20).Options;function M(H,J,T,N){var P=new b(H,J,T,N);return P.beautify()}U.exports=M,U.exports.defaultOptions=function(){return new R}},function(U,_,w){var b=w(20).Options,R=w(2).Output,M=w(21).Tokenizer,H=w(21).TOKEN,J=/\r\n|[\r\n]/,T=/\r\n|[\r\n]/g,N=function(Y,$){this.indent_level=0,this.alignment_size=0,this.max_preserve_newlines=Y.max_preserve_newlines,this.preserve_newlines=Y.preserve_newlines,this._output=new R(Y,$)};N.prototype.current_line_has_match=function(Y){return this._output.current_line.has_match(Y)},N.prototype.set_space_before_token=function(Y,$){this._output.space_before_token=Y,this._output.non_breaking_space=$},N.prototype.set_wrap_point=function(){this._output.set_indent(this.indent_level,this.alignment_size),this._output.set_wrap_point()},N.prototype.add_raw_token=function(Y){this._output.add_raw_token(Y)},N.prototype.print_preserved_newlines=function(Y){var $=0;Y.type!==H.TEXT&&Y.previous.type!==H.TEXT&&($=Y.newlines?1:0),this.preserve_newlines&&($=Y.newlines<this.max_preserve_newlines+1?Y.newlines:this.max_preserve_newlines+1);for(var te=0;te<$;te++)this.print_newline(te>0);return $!==0},N.prototype.traverse_whitespace=function(Y){return Y.whitespace_before||Y.newlines?(this.print_preserved_newlines(Y)||(this._output.space_before_token=!0),!0):!1},N.prototype.previous_token_wrapped=function(){return this._output.previous_token_wrapped},N.prototype.print_newline=function(Y){this._output.add_new_line(Y)},N.prototype.print_token=function(Y){Y.text&&(this._output.set_indent(this.indent_level,this.alignment_size),this._output.add_token(Y.text))},N.prototype.indent=function(){this.indent_level++},N.prototype.deindent=function(){this.indent_level>0&&(this.indent_level--,this._output.set_indent(this.indent_level,this.alignment_size))},N.prototype.get_full_indent=function(Y){return Y=this.indent_level+(Y||0),Y<1?"":this._output.get_indent_string(Y)};var P=function(Y){for(var $=null,te=Y.next;te.type!==H.EOF&&Y.closed!==te;){if(te.type===H.ATTRIBUTE&&te.text==="type"){te.next&&te.next.type===H.EQUALS&&te.next.next&&te.next.next.type===H.VALUE&&($=te.next.next.text);break}te=te.next}return $},k=function(Y,$){var te=null,q=null;return $.closed?(Y==="script"?te="text/javascript":Y==="style"&&(te="text/css"),te=P($)||te,te.search("text/css")>-1?q="css":te.search(/module|((text|application|dojo)\/(x-)?(javascript|ecmascript|jscript|livescript|(ld\+)?json|method|aspect))/)>-1?q="javascript":te.search(/(text|application|dojo)\/(x-)?(html)/)>-1?q="html":te.search(/test\/null/)>-1&&(q="null"),q):null};function oe(Y,$){return $.indexOf(Y)!==-1}function de(Y,$,te){this.parent=Y||null,this.tag=$?$.tag_name:"",this.indent_level=te||0,this.parser_token=$||null}function ie(Y){this._printer=Y,this._current_frame=null}ie.prototype.get_parser_token=function(){return this._current_frame?this._current_frame.parser_token:null},ie.prototype.record_tag=function(Y){var $=new de(this._current_frame,Y,this._printer.indent_level);this._current_frame=$},ie.prototype._try_pop_frame=function(Y){var $=null;return Y&&($=Y.parser_token,this._printer.indent_level=Y.indent_level,this._current_frame=Y.parent),$},ie.prototype._get_frame=function(Y,$){for(var te=this._current_frame;te&&Y.indexOf(te.tag)===-1;){if($&&$.indexOf(te.tag)!==-1){te=null;break}te=te.parent}return te},ie.prototype.try_pop=function(Y,$){var te=this._get_frame([Y],$);return this._try_pop_frame(te)},ie.prototype.indent_to_tag=function(Y){var $=this._get_frame(Y);$&&(this._printer.indent_level=$.indent_level)};function ae(Y,$,te,q){this._source_text=Y||"",$=$||{},this._js_beautify=te,this._css_beautify=q,this._tag_stack=null;var he=new b($,"html");this._options=he,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"}ae.prototype.beautify=function(){if(this._options.disabled)return this._source_text;var Y=this._source_text,$=this._options.eol;this._options.eol==="auto"&&($=`
|
|
`,Y&&J.test(Y)&&($=Y.match(J)[0])),Y=Y.replace(T,`
|
|
`);var te=Y.match(/^[\t ]*/)[0],q={text:"",type:""},he=new we(this._options),re=new N(this._options,te),E=new M(Y,this._options).tokenize();this._tag_stack=new ie(re);for(var C=null,W=E.next();W.type!==H.EOF;)W.type===H.TAG_OPEN||W.type===H.COMMENT?(C=this._handle_tag_open(re,W,he,q,E),he=C):W.type===H.ATTRIBUTE||W.type===H.EQUALS||W.type===H.VALUE||W.type===H.TEXT&&!he.tag_complete?C=this._handle_inside_tag(re,W,he,q):W.type===H.TAG_CLOSE?C=this._handle_tag_close(re,W,he):W.type===H.TEXT?C=this._handle_text(re,W,he):W.type===H.CONTROL_FLOW_OPEN?C=this._handle_control_flow_open(re,W):W.type===H.CONTROL_FLOW_CLOSE?C=this._handle_control_flow_close(re,W):re.add_raw_token(W),q=C,W=E.next();var be=re._output.get_code($);return be},ae.prototype._handle_control_flow_open=function(Y,$){var te={text:$.text,type:$.type};return Y.set_space_before_token($.newlines||$.whitespace_before!=="",!0),$.newlines?Y.print_preserved_newlines($):Y.set_space_before_token($.newlines||$.whitespace_before!=="",!0),Y.print_token($),Y.indent(),te},ae.prototype._handle_control_flow_close=function(Y,$){var te={text:$.text,type:$.type};return Y.deindent(),$.newlines?Y.print_preserved_newlines($):Y.set_space_before_token($.newlines||$.whitespace_before!=="",!0),Y.print_token($),te},ae.prototype._handle_tag_close=function(Y,$,te){var q={text:$.text,type:$.type};return Y.alignment_size=0,te.tag_complete=!0,Y.set_space_before_token($.newlines||$.whitespace_before!=="",!0),te.is_unformatted?Y.add_raw_token($):(te.tag_start_char==="<"&&(Y.set_space_before_token($.text[0]==="/",!0),this._is_wrap_attributes_force_expand_multiline&&te.has_wrapped_attrs&&Y.print_newline(!1)),Y.print_token($)),te.indent_content&&!(te.is_unformatted||te.is_content_unformatted)&&(Y.indent(),te.indent_content=!1),!te.is_inline_element&&!(te.is_unformatted||te.is_content_unformatted)&&Y.set_wrap_point(),q},ae.prototype._handle_inside_tag=function(Y,$,te,q){var he=te.has_wrapped_attrs,re={text:$.text,type:$.type};return Y.set_space_before_token($.newlines||$.whitespace_before!=="",!0),te.is_unformatted?Y.add_raw_token($):te.tag_start_char==="{"&&$.type===H.TEXT?Y.print_preserved_newlines($)?($.newlines=0,Y.add_raw_token($)):Y.print_token($):($.type===H.ATTRIBUTE?Y.set_space_before_token(!0):($.type===H.EQUALS||$.type===H.VALUE&&$.previous.type===H.EQUALS)&&Y.set_space_before_token(!1),$.type===H.ATTRIBUTE&&te.tag_start_char==="<"&&((this._is_wrap_attributes_preserve||this._is_wrap_attributes_preserve_aligned)&&(Y.traverse_whitespace($),he=he||$.newlines!==0),this._is_wrap_attributes_force&&te.attr_count>=this._options.wrap_attributes_min_attrs&&(q.type!==H.TAG_OPEN||this._is_wrap_attributes_force_expand_multiline)&&(Y.print_newline(!1),he=!0)),Y.print_token($),he=he||Y.previous_token_wrapped(),te.has_wrapped_attrs=he),re},ae.prototype._handle_text=function(Y,$,te){var q={text:$.text,type:"TK_CONTENT"};return te.custom_beautifier_name?this._print_custom_beatifier_text(Y,$,te):te.is_unformatted||te.is_content_unformatted?Y.add_raw_token($):(Y.traverse_whitespace($),Y.print_token($)),q},ae.prototype._print_custom_beatifier_text=function(Y,$,te){var q=this;if($.text!==""){var he=$.text,re,E=1,C="",W="";te.custom_beautifier_name==="javascript"&&typeof this._js_beautify=="function"?re=this._js_beautify:te.custom_beautifier_name==="css"&&typeof this._css_beautify=="function"?re=this._css_beautify:te.custom_beautifier_name==="html"&&(re=function(Vt,rn){var He=new ae(Vt,rn,q._js_beautify,q._css_beautify);return He.beautify()}),this._options.indent_scripts==="keep"?E=0:this._options.indent_scripts==="separate"&&(E=-Y.indent_level);var be=Y.get_full_indent(E);if(he=he.replace(/\n[ \t]*$/,""),te.custom_beautifier_name!=="html"&&he[0]==="<"&&he.match(/^(<!--|<!\[CDATA\[)/)){var Ve=/^(<!--[^\n]*|<!\[CDATA\[)(\n?)([ \t\n]*)([\s\S]*)(-->|]]>)$/.exec(he);if(!Ve){Y.add_raw_token($);return}C=be+Ve[1]+`
|
|
`,he=Ve[4],Ve[5]&&(W=be+Ve[5]),he=he.replace(/\n[ \t]*$/,""),(Ve[2]||Ve[3].indexOf(`
|
|
`)!==-1)&&(Ve=Ve[3].match(/[ \t]+$/),Ve&&($.whitespace_before=Ve[0]))}if(he)if(re){var Ke=function(){this.eol=`
|
|
`};Ke.prototype=this._options.raw_options;var Ct=new Ke;he=re(be+he,Ct)}else{var Rt=$.whitespace_before;Rt&&(he=he.replace(new RegExp(`
|
|
(`+Rt+")?","g"),`
|
|
`)),he=be+he.replace(/\n/g,`
|
|
`+be)}C&&(he?he=C+he+`
|
|
`+W:he=C+W),Y.print_newline(!1),he&&($.text=he,$.whitespace_before="",$.newlines=0,Y.add_raw_token($),Y.print_newline(!0))}},ae.prototype._handle_tag_open=function(Y,$,te,q,he){var re=this._get_tag_open_token($);if((te.is_unformatted||te.is_content_unformatted)&&!te.is_empty_element&&$.type===H.TAG_OPEN&&!re.is_start_tag?(Y.add_raw_token($),re.start_tag_token=this._tag_stack.try_pop(re.tag_name)):(Y.traverse_whitespace($),this._set_tag_position(Y,$,re,te,q),re.is_inline_element||Y.set_wrap_point(),Y.print_token($)),re.is_start_tag&&this._is_wrap_attributes_force){var E=0,C;do C=he.peek(E),C.type===H.ATTRIBUTE&&(re.attr_count+=1),E+=1;while(C.type!==H.EOF&&C.type!==H.TAG_CLOSE)}return(this._is_wrap_attributes_force_aligned||this._is_wrap_attributes_aligned_multiple||this._is_wrap_attributes_preserve_aligned)&&(re.alignment_size=$.text.length+1),!re.tag_complete&&!re.is_unformatted&&(Y.alignment_size=re.alignment_size),re};var we=function(Y,$,te){if(this.parent=$||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="",!te)this.tag_complete=!0;else{var q;this.tag_start_char=te.text[0],this.text=te.text,this.tag_start_char==="<"?(q=te.text.match(/^<([^\s>]*)/),this.tag_check=q?q[1]:""):(q=te.text.match(/^{{~?(?:[\^]|#\*?)?([^\s}]+)/),this.tag_check=q?q[1]:"",(te.text.startsWith("{{#>")||te.text.startsWith("{{~#>"))&&this.tag_check[0]===">"&&(this.tag_check===">"&&te.next!==null?this.tag_check=te.next.text.split(" ")[0]:this.tag_check=te.text.split(">")[1])),this.tag_check=this.tag_check.toLowerCase(),te.type===H.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||te.closed&&te.closed.text==="/>";var he=2;this.tag_start_char==="{"&&this.text.length>=3&&this.text.charAt(2)==="~"&&(he=3),this.is_end_tag=this.is_end_tag||this.tag_start_char==="{"&&(!Y.indent_handlebars||this.text.length<3||/[^#\^]/.test(this.text.charAt(he)))}};ae.prototype._get_tag_open_token=function(Y){var $=new we(this._options,this._tag_stack.get_parser_token(),Y);return $.alignment_size=this._options.wrap_attributes_indent_size,$.is_end_tag=$.is_end_tag||oe($.tag_check,this._options.void_elements),$.is_empty_element=$.tag_complete||$.is_start_tag&&$.is_end_tag,$.is_unformatted=!$.tag_complete&&oe($.tag_check,this._options.unformatted),$.is_content_unformatted=!$.is_empty_element&&oe($.tag_check,this._options.content_unformatted),$.is_inline_element=oe($.tag_name,this._options.inline)||this._options.inline_custom_elements&&$.tag_name.includes("-")||$.tag_start_char==="{",$},ae.prototype._set_tag_position=function(Y,$,te,q,he){if(te.is_empty_element||(te.is_end_tag?te.start_tag_token=this._tag_stack.try_pop(te.tag_name):(this._do_optional_end_element(te)&&(te.is_inline_element||Y.print_newline(!1)),this._tag_stack.record_tag(te),(te.tag_name==="script"||te.tag_name==="style")&&!(te.is_unformatted||te.is_content_unformatted)&&(te.custom_beautifier_name=k(te.tag_check,$)))),oe(te.tag_check,this._options.extra_liners)&&(Y.print_newline(!1),Y._output.just_added_blankline()||Y.print_newline(!0)),te.is_empty_element){if(te.tag_start_char==="{"&&te.tag_check==="else"){this._tag_stack.indent_to_tag(["if","unless","each"]),te.indent_content=!0;var re=Y.current_line_has_match(/{{#if/);re||Y.print_newline(!1)}te.tag_name==="!--"&&he.type===H.TAG_CLOSE&&q.is_end_tag&&te.text.indexOf(`
|
|
`)===-1||(te.is_inline_element||te.is_unformatted||Y.print_newline(!1),this._calcluate_parent_multiline(Y,te))}else if(te.is_end_tag){var E=!1;E=te.start_tag_token&&te.start_tag_token.multiline_content,E=E||!te.is_inline_element&&!(q.is_inline_element||q.is_unformatted)&&!(he.type===H.TAG_CLOSE&&te.start_tag_token===q)&&he.type!=="TK_CONTENT",(te.is_content_unformatted||te.is_unformatted)&&(E=!1),E&&Y.print_newline(!1)}else te.indent_content=!te.custom_beautifier_name,te.tag_start_char==="<"&&(te.tag_name==="html"?te.indent_content=this._options.indent_inner_html:te.tag_name==="head"?te.indent_content=this._options.indent_head_inner_html:te.tag_name==="body"&&(te.indent_content=this._options.indent_body_inner_html)),!(te.is_inline_element||te.is_unformatted)&&(he.type!=="TK_CONTENT"||te.is_content_unformatted)&&Y.print_newline(!1),this._calcluate_parent_multiline(Y,te)},ae.prototype._calcluate_parent_multiline=function(Y,$){$.parent&&Y._output.just_added_newline()&&!(($.is_inline_element||$.is_unformatted)&&$.parent.is_inline_element)&&($.parent.multiline_content=!0)};var Te=["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"],Re=["a","audio","del","ins","map","noscript","video"];ae.prototype._do_optional_end_element=function(Y){var $=null;if(!(Y.is_empty_element||!Y.is_start_tag||!Y.parent)){if(Y.tag_name==="body")$=$||this._tag_stack.try_pop("head");else if(Y.tag_name==="li")$=$||this._tag_stack.try_pop("li",["ol","ul","menu"]);else if(Y.tag_name==="dd"||Y.tag_name==="dt")$=$||this._tag_stack.try_pop("dt",["dl"]),$=$||this._tag_stack.try_pop("dd",["dl"]);else if(Y.parent.tag_name==="p"&&Te.indexOf(Y.tag_name)!==-1){var te=Y.parent.parent;(!te||Re.indexOf(te.tag_name)===-1)&&($=$||this._tag_stack.try_pop("p"))}else Y.tag_name==="rp"||Y.tag_name==="rt"?($=$||this._tag_stack.try_pop("rt",["ruby","rtc"]),$=$||this._tag_stack.try_pop("rp",["ruby","rtc"])):Y.tag_name==="optgroup"?$=$||this._tag_stack.try_pop("optgroup",["select"]):Y.tag_name==="option"?$=$||this._tag_stack.try_pop("option",["select","datalist","optgroup"]):Y.tag_name==="colgroup"?$=$||this._tag_stack.try_pop("caption",["table"]):Y.tag_name==="thead"?($=$||this._tag_stack.try_pop("caption",["table"]),$=$||this._tag_stack.try_pop("colgroup",["table"])):Y.tag_name==="tbody"||Y.tag_name==="tfoot"?($=$||this._tag_stack.try_pop("caption",["table"]),$=$||this._tag_stack.try_pop("colgroup",["table"]),$=$||this._tag_stack.try_pop("thead",["table"]),$=$||this._tag_stack.try_pop("tbody",["table"])):Y.tag_name==="tr"?($=$||this._tag_stack.try_pop("caption",["table"]),$=$||this._tag_stack.try_pop("colgroup",["table"]),$=$||this._tag_stack.try_pop("tr",["table","thead","tbody","tfoot"])):(Y.tag_name==="th"||Y.tag_name==="td")&&($=$||this._tag_stack.try_pop("td",["table","thead","tbody","tfoot","tr"]),$=$||this._tag_stack.try_pop("th",["table","thead","tbody","tfoot","tr"]));return Y.parent=this._tag_stack.get_parser_token(),$}},U.exports.Beautifier=ae},function(U,_,w){var b=w(6).Options;function R(M){b.call(this,M,"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"])}R.prototype=new b,U.exports.Options=R},function(U,_,w){var b=w(9).Tokenizer,R=w(9).TOKEN,M=w(13).Directives,H=w(14).TemplatablePattern,J=w(12).Pattern,T={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:R.START,RAW:R.RAW,EOF:R.EOF},N=new M(/<\!--/,/-->/),P=function(k,oe){b.call(this,k,oe),this._current_tag_name="";var de=new H(this._input).read_options(this._options),ie=new J(this._input);if(this.__patterns={word:de.until(/[\n\r\t <]/),word_control_flow_close_excluded:de.until(/[\n\r\t <}]/),single_quote:de.until_after(/'/),double_quote:de.until_after(/"/),attribute:de.until(/[\n\r\t =>]|\/>/),element_name:de.until(/[\n\r\t >\/]/),angular_control_flow_start:ie.matching(/\@[a-zA-Z]+[^({]*[({]/),handlebars_comment:ie.starting_with(/{{!--/).until_after(/--}}/),handlebars:ie.starting_with(/{{/).until_after(/}}/),handlebars_open:ie.until(/[\n\r\t }]/),handlebars_raw_close:ie.until(/}}/),comment:ie.starting_with(/<!--/).until_after(/-->/),cdata:ie.starting_with(/<!\[CDATA\[/).until_after(/]]>/),conditional_comment:ie.starting_with(/<!\[/).until_after(/]>/),processing:ie.starting_with(/<\?/).until_after(/\?>/)},this._options.indent_handlebars&&(this.__patterns.word=this.__patterns.word.exclude("handlebars"),this.__patterns.word_control_flow_close_excluded=this.__patterns.word_control_flow_close_excluded.exclude("handlebars")),this._unformatted_content_delimiter=null,this._options.unformatted_content_delimiter){var ae=this._input.get_literal_regexp(this._options.unformatted_content_delimiter);this.__patterns.unformatted_content_delimiter=ie.matching(ae).until_after(ae)}};P.prototype=new b,P.prototype._is_comment=function(k){return!1},P.prototype._is_opening=function(k){return k.type===T.TAG_OPEN||k.type===T.CONTROL_FLOW_OPEN},P.prototype._is_closing=function(k,oe){return k.type===T.TAG_CLOSE&&oe&&((k.text===">"||k.text==="/>")&&oe.text[0]==="<"||k.text==="}}"&&oe.text[0]==="{"&&oe.text[1]==="{")||k.type===T.CONTROL_FLOW_CLOSE&&k.text==="}"&&oe.text.endsWith("{")},P.prototype._reset=function(){this._current_tag_name=""},P.prototype._get_next_token=function(k,oe){var de=null;this._readWhitespace();var ie=this._input.peek();return ie===null?this._create_token(T.EOF,""):(de=de||this._read_open_handlebars(ie,oe),de=de||this._read_attribute(ie,k,oe),de=de||this._read_close(ie,oe),de=de||this._read_script_and_style(ie,k),de=de||this._read_control_flows(ie,oe),de=de||this._read_raw_content(ie,k,oe),de=de||this._read_content_word(ie,oe),de=de||this._read_comment_or_cdata(ie),de=de||this._read_processing(ie),de=de||this._read_open(ie,oe),de=de||this._create_token(T.UNKNOWN,this._input.next()),de)},P.prototype._read_comment_or_cdata=function(k){var oe=null,de=null,ie=null;if(k==="<"){var ae=this._input.peek(1);ae==="!"&&(de=this.__patterns.comment.read(),de?(ie=N.get_directives(de),ie&&ie.ignore==="start"&&(de+=N.readIgnored(this._input))):de=this.__patterns.cdata.read()),de&&(oe=this._create_token(T.COMMENT,de),oe.directives=ie)}return oe},P.prototype._read_processing=function(k){var oe=null,de=null,ie=null;if(k==="<"){var ae=this._input.peek(1);(ae==="!"||ae==="?")&&(de=this.__patterns.conditional_comment.read(),de=de||this.__patterns.processing.read()),de&&(oe=this._create_token(T.COMMENT,de),oe.directives=ie)}return oe},P.prototype._read_open=function(k,oe){var de=null,ie=null;return(!oe||oe.type===T.CONTROL_FLOW_OPEN)&&k==="<"&&(de=this._input.next(),this._input.peek()==="/"&&(de+=this._input.next()),de+=this.__patterns.element_name.read(),ie=this._create_token(T.TAG_OPEN,de)),ie},P.prototype._read_open_handlebars=function(k,oe){var de=null,ie=null;return(!oe||oe.type===T.CONTROL_FLOW_OPEN)&&(this._options.templating.includes("angular")||this._options.indent_handlebars)&&k==="{"&&this._input.peek(1)==="{"&&(this._options.indent_handlebars&&this._input.peek(2)==="!"?(de=this.__patterns.handlebars_comment.read(),de=de||this.__patterns.handlebars.read(),ie=this._create_token(T.COMMENT,de)):(de=this.__patterns.handlebars_open.read(),ie=this._create_token(T.TAG_OPEN,de))),ie},P.prototype._read_control_flows=function(k,oe){var de="",ie=null;if(!this._options.templating.includes("angular"))return ie;if(k==="@"){if(de=this.__patterns.angular_control_flow_start.read(),de==="")return ie;for(var ae=de.endsWith("(")?1:0,we=0;!(de.endsWith("{")&&ae===we);){var Te=this._input.next();if(Te===null)break;Te==="("?ae++:Te===")"&&we++,de+=Te}ie=this._create_token(T.CONTROL_FLOW_OPEN,de)}else k==="}"&&oe&&oe.type===T.CONTROL_FLOW_OPEN&&(de=this._input.next(),ie=this._create_token(T.CONTROL_FLOW_CLOSE,de));return ie},P.prototype._read_close=function(k,oe){var de=null,ie=null;return oe&&oe.type===T.TAG_OPEN&&(oe.text[0]==="<"&&(k===">"||k==="/"&&this._input.peek(1)===">")?(de=this._input.next(),k==="/"&&(de+=this._input.next()),ie=this._create_token(T.TAG_CLOSE,de)):oe.text[0]==="{"&&k==="}"&&this._input.peek(1)==="}"&&(this._input.next(),this._input.next(),ie=this._create_token(T.TAG_CLOSE,"}}"))),ie},P.prototype._read_attribute=function(k,oe,de){var ie=null,ae="";if(de&&de.text[0]==="<")if(k==="=")ie=this._create_token(T.EQUALS,this._input.next());else if(k==='"'||k==="'"){var we=this._input.next();k==='"'?we+=this.__patterns.double_quote.read():we+=this.__patterns.single_quote.read(),ie=this._create_token(T.VALUE,we)}else ae=this.__patterns.attribute.read(),ae&&(oe.type===T.EQUALS?ie=this._create_token(T.VALUE,ae):ie=this._create_token(T.ATTRIBUTE,ae));return ie},P.prototype._is_content_unformatted=function(k){return this._options.void_elements.indexOf(k)===-1&&(this._options.content_unformatted.indexOf(k)!==-1||this._options.unformatted.indexOf(k)!==-1)},P.prototype._read_raw_content=function(k,oe,de){var ie="";if(de&&de.text[0]==="{")ie=this.__patterns.handlebars_raw_close.read();else if(oe.type===T.TAG_CLOSE&&oe.opened.text[0]==="<"&&oe.text[0]!=="/"){var ae=oe.opened.text.substr(1).toLowerCase();this._is_content_unformatted(ae)&&(ie=this._input.readUntil(new RegExp("</"+ae+"[\\n\\r\\t ]*?>","ig")))}return ie?this._create_token(T.TEXT,ie):null},P.prototype._read_script_and_style=function(k,oe){if(oe.type===T.TAG_CLOSE&&oe.opened.text[0]==="<"&&oe.text[0]!=="/"){var de=oe.opened.text.substr(1).toLowerCase();if(de==="script"||de==="style"){var ie=this._read_comment_or_cdata(k);if(ie)return ie.type=T.TEXT,ie;var ae=this._input.readUntil(new RegExp("</"+de+"[\\n\\r\\t ]*?>","ig"));if(ae)return this._create_token(T.TEXT,ae)}}return null},P.prototype._read_content_word=function(k,oe){var de="";return this._options.unformatted_content_delimiter&&k===this._options.unformatted_content_delimiter[0]&&(de=this.__patterns.unformatted_content_delimiter.read()),de||(de=oe&&oe.type===T.CONTROL_FLOW_OPEN?this.__patterns.word_control_flow_close_excluded.read():this.__patterns.word.read()),de?this._create_token(T.TEXT,de):null},U.exports.Tokenizer=P,U.exports.TOKEN=T}],le={};function o(U){var _=le[U];if(_!==void 0)return _.exports;var w=le[U]={exports:{}};return ye[U](w,w.exports,o),w.exports}var S=o(18);Ce=S})();var ge=Ce;if(1)V=[x,x(58553),x(87804)],fe=function(ye){var le=x(58553),o=x(87804);return{html_beautify:function(S,U){return ge(S,U,le.js_beautify,o.css_beautify)}}}.apply(ct,V),fe!==void 0&&(Vn.exports=fe);else var G,g})()},58553:function(Vn,ct){var x,V;(function(){var fe;(function(){"use strict";var ge=[function(le,o,S){var U=S(1).Beautifier,_=S(5).Options;function w(b,R){var M=new U(b,R);return M.beautify()}le.exports=w,le.exports.defaultOptions=function(){return new _}},function(le,o,S){var U=S(2).Output,_=S(3).Token,w=S(4),b=S(5).Options,R=S(7).Tokenizer,M=S(7).line_starters,H=S(7).positionable_operators,J=S(7).TOKEN;function T(C,W){return W.indexOf(C)!==-1}function N(C){return C.replace(/^\s+/g,"")}function P(C){for(var W={},be=0;be<C.length;be++)W[C[be].replace(/-/g,"_")]=C[be];return W}function k(C,W){return C&&C.type===J.RESERVED&&C.text===W}function oe(C,W){return C&&C.type===J.RESERVED&&T(C.text,W)}var de=["case","return","do","if","throw","else","await","break","continue","async"],ie=["before-newline","after-newline","preserve-newline"],ae=P(ie),we=[ae.before_newline,ae.preserve_newline],Te={BlockStatement:"BlockStatement",Statement:"Statement",ObjectLiteral:"ObjectLiteral",ArrayLiteral:"ArrayLiteral",ForInitializer:"ForInitializer",Conditional:"Conditional",Expression:"Expression"};function Re(C,W){W.multiline_frame||W.mode===Te.ForInitializer||W.mode===Te.Conditional||C.remove_indent(W.start_line_index)}function Y(C){C=C.replace(w.allLineBreaks,`
|
|
`);for(var W=[],be=C.indexOf(`
|
|
`);be!==-1;)W.push(C.substring(0,be)),C=C.substring(be+1),be=C.indexOf(`
|
|
`);return C.length&&W.push(C),W}function $(C){return C===Te.ArrayLiteral}function te(C){return T(C,[Te.Expression,Te.ForInitializer,Te.Conditional])}function q(C,W){for(var be=0;be<C.length;be++){var Ve=C[be].trim();if(Ve.charAt(0)!==W)return!1}return!0}function he(C,W){for(var be=0,Ve=C.length,Ke;be<Ve;be++)if(Ke=C[be],Ke&&Ke.indexOf(W)!==0)return!1;return!0}function re(C,W){W=W||{},this._source_text=C||"",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 b(W)}re.prototype.create_flags=function(C,W){var be=0;C&&(be=C.indentation_level,!this._output.just_added_newline()&&C.line_indent_level>be&&(be=C.line_indent_level));var Ve={mode:W,parent:C,last_token:C?C.last_token:new _(J.START_BLOCK,""),last_word:C?C.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:be,alignment:0,line_indent_level:C?C.line_indent_level:be,start_line_index:this._output.get_line_number(),ternary_depth:0};return Ve},re.prototype._reset=function(C){var W=C.match(/^[\t ]*/)[0];this._last_last_text="",this._output=new U(this._options,W),this._output.raw=this._options.test_output_raw,this._flag_store=[],this.set_mode(Te.BlockStatement);var be=new R(C,this._options);return this._tokens=be.tokenize(),C},re.prototype.beautify=function(){if(this._options.disabled)return this._source_text;var C,W=this._reset(this._source_text),be=this._options.eol;this._options.eol==="auto"&&(be=`
|
|
`,W&&w.lineBreak.test(W||"")&&(be=W.match(w.lineBreak)[0]));for(var Ve=this._tokens.next();Ve;)this.handle_token(Ve),this._last_last_text=this._flags.last_token.text,this._flags.last_token=Ve,Ve=this._tokens.next();return C=this._output.get_code(be),C},re.prototype.handle_token=function(C,W){C.type===J.START_EXPR?this.handle_start_expr(C):C.type===J.END_EXPR?this.handle_end_expr(C):C.type===J.START_BLOCK?this.handle_start_block(C):C.type===J.END_BLOCK?this.handle_end_block(C):C.type===J.WORD?this.handle_word(C):C.type===J.RESERVED?this.handle_word(C):C.type===J.SEMICOLON?this.handle_semicolon(C):C.type===J.STRING?this.handle_string(C):C.type===J.EQUALS?this.handle_equals(C):C.type===J.OPERATOR?this.handle_operator(C):C.type===J.COMMA?this.handle_comma(C):C.type===J.BLOCK_COMMENT?this.handle_block_comment(C,W):C.type===J.COMMENT?this.handle_comment(C,W):C.type===J.DOT?this.handle_dot(C):C.type===J.EOF?this.handle_eof(C):C.type===J.UNKNOWN?this.handle_unknown(C,W):this.handle_unknown(C,W)},re.prototype.handle_whitespace_and_comments=function(C,W){var be=C.newlines,Ve=this._options.keep_array_indentation&&$(this._flags.mode);if(C.comments_before)for(var Ke=C.comments_before.next();Ke;)this.handle_whitespace_and_comments(Ke,W),this.handle_token(Ke,W),Ke=C.comments_before.next();if(Ve)for(var Ct=0;Ct<be;Ct+=1)this.print_newline(Ct>0,W);else if(this._options.max_preserve_newlines&&be>this._options.max_preserve_newlines&&(be=this._options.max_preserve_newlines),this._options.preserve_newlines&&be>1){this.print_newline(!1,W);for(var Rt=1;Rt<be;Rt+=1)this.print_newline(!0,W)}};var E=["async","break","continue","return","throw","yield"];re.prototype.allow_wrap_or_preserved_newline=function(C,W){if(W=W===void 0?!1:W,!this._output.just_added_newline()){var be=this._options.preserve_newlines&&C.newlines||W,Ve=T(this._flags.last_token.text,H)||T(C.text,H);if(Ve){var Ke=T(this._flags.last_token.text,H)&&T(this._options.operator_position,we)||T(C.text,H);be=be&&Ke}if(be)this.print_newline(!1,!0);else if(this._options.wrap_line_length){if(oe(this._flags.last_token,E))return;this._output.set_wrap_point()}}},re.prototype.print_newline=function(C,W){if(!W&&this._flags.last_token.text!==";"&&this._flags.last_token.text!==","&&this._flags.last_token.text!=="="&&(this._flags.last_token.type!==J.OPERATOR||this._flags.last_token.text==="--"||this._flags.last_token.text==="++"))for(var be=this._tokens.peek();this._flags.mode===Te.Statement&&!(this._flags.if_block&&k(be,"else"))&&!this._flags.do_block;)this.restore_mode();this._output.add_new_line(C)&&(this._flags.multiline_frame=!0)},re.prototype.print_token_line_indentation=function(C){this._output.just_added_newline()&&(this._options.keep_array_indentation&&C.newlines&&(C.text==="["||$(this._flags.mode))?(this._output.current_line.set_indent(-1),this._output.current_line.push(C.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))},re.prototype.print_token=function(C){if(this._output.raw){this._output.add_raw_token(C);return}if(this._options.comma_first&&C.previous&&C.previous.type===J.COMMA&&this._output.just_added_newline()&&this._output.previous_line.last()===","){var W=this._output.previous_line.pop();this._output.previous_line.is_empty()&&(this._output.previous_line.push(W),this._output.trim(!0),this._output.current_line.pop(),this._output.trim()),this.print_token_line_indentation(C),this._output.add_token(","),this._output.space_before_token=!0}this.print_token_line_indentation(C),this._output.non_breaking_space=!0,this._output.add_token(C.text),this._output.previous_token_wrapped&&(this._flags.multiline_frame=!0)},re.prototype.indent=function(){this._flags.indentation_level+=1,this._output.set_indent(this._flags.indentation_level,this._flags.alignment)},re.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))},re.prototype.set_mode=function(C){this._flags?(this._flag_store.push(this._flags),this._previous_flags=this._flags):this._previous_flags=this.create_flags(null,C),this._flags=this.create_flags(this._previous_flags,C),this._output.set_indent(this._flags.indentation_level,this._flags.alignment)},re.prototype.restore_mode=function(){this._flag_store.length>0&&(this._previous_flags=this._flags,this._flags=this._flag_store.pop(),this._previous_flags.mode===Te.Statement&&Re(this._output,this._previous_flags),this._output.set_indent(this._flags.indentation_level,this._flags.alignment))},re.prototype.start_of_object_property=function(){return this._flags.parent.mode===Te.ObjectLiteral&&this._flags.mode===Te.Statement&&(this._flags.last_token.text===":"&&this._flags.ternary_depth===0||oe(this._flags.last_token,["get","set"]))},re.prototype.start_of_statement=function(C){var W=!1;return W=W||oe(this._flags.last_token,["var","let","const"])&&C.type===J.WORD,W=W||k(this._flags.last_token,"do"),W=W||!(this._flags.parent.mode===Te.ObjectLiteral&&this._flags.mode===Te.Statement)&&oe(this._flags.last_token,E)&&!C.newlines,W=W||k(this._flags.last_token,"else")&&!(k(C,"if")&&!C.comments_before),W=W||this._flags.last_token.type===J.END_EXPR&&(this._previous_flags.mode===Te.ForInitializer||this._previous_flags.mode===Te.Conditional),W=W||this._flags.last_token.type===J.WORD&&this._flags.mode===Te.BlockStatement&&!this._flags.in_case&&!(C.text==="--"||C.text==="++")&&this._last_last_text!=="function"&&C.type!==J.WORD&&C.type!==J.RESERVED,W=W||this._flags.mode===Te.ObjectLiteral&&(this._flags.last_token.text===":"&&this._flags.ternary_depth===0||oe(this._flags.last_token,["get","set"])),W?(this.set_mode(Te.Statement),this.indent(),this.handle_whitespace_and_comments(C,!0),this.start_of_object_property()||this.allow_wrap_or_preserved_newline(C,oe(C,["do","for","if","while"])),!0):!1},re.prototype.handle_start_expr=function(C){this.start_of_statement(C)||this.handle_whitespace_and_comments(C);var W=Te.Expression;if(C.text==="["){if(this._flags.last_token.type===J.WORD||this._flags.last_token.text===")"){oe(this._flags.last_token,M)&&(this._output.space_before_token=!0),this.print_token(C),this.set_mode(W),this.indent(),this._options.space_in_paren&&(this._output.space_before_token=!0);return}W=Te.ArrayLiteral,$(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()),T(this._flags.last_token.type,[J.START_EXPR,J.END_EXPR,J.WORD,J.OPERATOR,J.DOT])||(this._output.space_before_token=!0)}else{if(this._flags.last_token.type===J.RESERVED)this._flags.last_token.text==="for"?(this._output.space_before_token=this._options.space_before_conditional,W=Te.ForInitializer):T(this._flags.last_token.text,["if","while","switch"])?(this._output.space_before_token=this._options.space_before_conditional,W=Te.Conditional):T(this._flags.last_word,["await","async"])?this._output.space_before_token=!0:this._flags.last_token.text==="import"&&C.whitespace_before===""?this._output.space_before_token=!1:(T(this._flags.last_token.text,M)||this._flags.last_token.text==="catch")&&(this._output.space_before_token=!0);else if(this._flags.last_token.type===J.EQUALS||this._flags.last_token.type===J.OPERATOR)this.start_of_object_property()||this.allow_wrap_or_preserved_newline(C);else if(this._flags.last_token.type===J.WORD){this._output.space_before_token=!1;var be=this._tokens.peek(-3);if(this._options.space_after_named_function&&be){var Ve=this._tokens.peek(-4);oe(be,["async","function"])||be.text==="*"&&oe(Ve,["async","function"])?this._output.space_before_token=!0:this._flags.mode===Te.ObjectLiteral?(be.text==="{"||be.text===","||be.text==="*"&&(Ve.text==="{"||Ve.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(C);(this._flags.last_token.type===J.RESERVED&&(this._flags.last_word==="function"||this._flags.last_word==="typeof")||this._flags.last_token.text==="*"&&(T(this._last_last_text,["function","yield"])||this._flags.mode===Te.ObjectLiteral&&T(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===J.START_BLOCK?this.print_newline():(this._flags.last_token.type===J.END_EXPR||this._flags.last_token.type===J.START_EXPR||this._flags.last_token.type===J.END_BLOCK||this._flags.last_token.text==="."||this._flags.last_token.type===J.COMMA)&&this.allow_wrap_or_preserved_newline(C,C.newlines),this.print_token(C),this.set_mode(W),this._options.space_in_paren&&(this._output.space_before_token=!0),this.indent()},re.prototype.handle_end_expr=function(C){for(;this._flags.mode===Te.Statement;)this.restore_mode();this.handle_whitespace_and_comments(C),this._flags.multiline_frame&&this.allow_wrap_or_preserved_newline(C,C.text==="]"&&$(this._flags.mode)&&!this._options.keep_array_indentation),this._options.space_in_paren&&(this._flags.last_token.type===J.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(C),this.restore_mode(),Re(this._output,this._previous_flags),this._flags.do_while&&this._previous_flags.mode===Te.Conditional&&(this._previous_flags.mode=Te.Expression,this._flags.do_block=!1,this._flags.do_while=!1)},re.prototype.handle_start_block=function(C){this.handle_whitespace_and_comments(C);var W=this._tokens.peek(),be=this._tokens.peek(1);this._flags.last_word==="switch"&&this._flags.last_token.type===J.END_EXPR?(this.set_mode(Te.BlockStatement),this._flags.in_case_statement=!0):this._flags.case_body?this.set_mode(Te.BlockStatement):be&&(T(be.text,[":",","])&&T(W.type,[J.STRING,J.WORD,J.RESERVED])||T(W.text,["get","set","..."])&&T(be.type,[J.WORD,J.RESERVED]))?T(this._last_last_text,["class","interface"])&&!T(be.text,[":",","])?this.set_mode(Te.BlockStatement):this.set_mode(Te.ObjectLiteral):this._flags.last_token.type===J.OPERATOR&&this._flags.last_token.text==="=>"?this.set_mode(Te.BlockStatement):T(this._flags.last_token.type,[J.EQUALS,J.START_EXPR,J.COMMA,J.OPERATOR])||oe(this._flags.last_token,["return","throw","import","default"])?this.set_mode(Te.ObjectLiteral):this.set_mode(Te.BlockStatement),this._flags.last_token&&oe(this._flags.last_token.previous,["class","extends"])&&(this._flags.class_start_block=!0);var Ve=!W.comments_before&&W.text==="}",Ke=Ve&&this._flags.last_word==="function"&&this._flags.last_token.type===J.END_EXPR;if(this._options.brace_preserve_inline){var Ct=0,Rt=null;this._flags.inline_frame=!0;do if(Ct+=1,Rt=this._tokens.peek(Ct-1),Rt.newlines){this._flags.inline_frame=!1;break}while(Rt.type!==J.EOF&&!(Rt.type===J.END_BLOCK&&Rt.opened===C))}(this._options.brace_style==="expand"||this._options.brace_style==="none"&&C.newlines)&&!this._flags.inline_frame?this._flags.last_token.type!==J.OPERATOR&&(Ke||this._flags.last_token.type===J.EQUALS||oe(this._flags.last_token,de)&&this._flags.last_token.text!=="else")?this._output.space_before_token=!0:this.print_newline(!1,!0):($(this._previous_flags.mode)&&(this._flags.last_token.type===J.START_EXPR||this._flags.last_token.type===J.COMMA)&&((this._flags.last_token.type===J.COMMA||this._options.space_in_paren)&&(this._output.space_before_token=!0),(this._flags.last_token.type===J.COMMA||this._flags.last_token.type===J.START_EXPR&&this._flags.inline_frame)&&(this.allow_wrap_or_preserved_newline(C),this._previous_flags.multiline_frame=this._previous_flags.multiline_frame||this._flags.multiline_frame,this._flags.multiline_frame=!1)),this._flags.last_token.type!==J.OPERATOR&&this._flags.last_token.type!==J.START_EXPR&&(T(this._flags.last_token.type,[J.START_BLOCK,J.SEMICOLON])&&!this._flags.inline_frame?this.print_newline():this._output.space_before_token=!0)),this.print_token(C),this.indent(),!Ve&&!(this._options.brace_preserve_inline&&this._flags.inline_frame)&&this.print_newline()},re.prototype.handle_end_block=function(C){for(this.handle_whitespace_and_comments(C);this._flags.mode===Te.Statement;)this.restore_mode();var W=this._flags.last_token.type===J.START_BLOCK;this._flags.inline_frame&&!W?this._output.space_before_token=!0:this._options.brace_style==="expand"?W||this.print_newline():W||($(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(C)},re.prototype.handle_word=function(C){if(C.type===J.RESERVED){if(T(C.text,["set","get"])&&this._flags.mode!==Te.ObjectLiteral)C.type=J.WORD;else if(C.text==="import"&&T(this._tokens.peek().text,["(","."]))C.type=J.WORD;else if(T(C.text,["as","from"])&&!this._flags.import_block)C.type=J.WORD;else if(this._flags.mode===Te.ObjectLiteral){var W=this._tokens.peek();W.text===":"&&(C.type=J.WORD)}}if(this.start_of_statement(C)?oe(this._flags.last_token,["var","let","const"])&&C.type===J.WORD&&(this._flags.declaration_statement=!0):C.newlines&&!te(this._flags.mode)&&(this._flags.last_token.type!==J.OPERATOR||this._flags.last_token.text==="--"||this._flags.last_token.text==="++")&&this._flags.last_token.type!==J.EQUALS&&(this._options.preserve_newlines||!oe(this._flags.last_token,["var","let","const","set","get"]))?(this.handle_whitespace_and_comments(C),this.print_newline()):this.handle_whitespace_and_comments(C),this._flags.do_block&&!this._flags.do_while)if(k(C,"while")){this._output.space_before_token=!0,this.print_token(C),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&&k(C,"else"))this._flags.else_block=!0;else{for(;this._flags.mode===Te.Statement;)this.restore_mode();this._flags.if_block=!1,this._flags.else_block=!1}if(this._flags.in_case_statement&&oe(C,["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(C),this._flags.in_case=!0;return}if((this._flags.last_token.type===J.COMMA||this._flags.last_token.type===J.START_EXPR||this._flags.last_token.type===J.EQUALS||this._flags.last_token.type===J.OPERATOR)&&!this.start_of_object_property()&&!(T(this._flags.last_token.text,["+","-"])&&this._last_last_text===":"&&this._flags.parent.mode===Te.ObjectLiteral)&&this.allow_wrap_or_preserved_newline(C),k(C,"function")){(T(this._flags.last_token.text,["}",";"])||this._output.just_added_newline()&&!(T(this._flags.last_token.text,["(","[","{",":","=",","])||this._flags.last_token.type===J.OPERATOR))&&!this._output.just_added_blankline()&&!C.comments_before&&(this.print_newline(),this.print_newline(!0)),this._flags.last_token.type===J.RESERVED||this._flags.last_token.type===J.WORD?oe(this._flags.last_token,["get","set","new","export"])||oe(this._flags.last_token,E)?this._output.space_before_token=!0:k(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===J.OPERATOR||this._flags.last_token.text==="="?this._output.space_before_token=!0:!this._flags.multiline_frame&&(te(this._flags.mode)||$(this._flags.mode))||this.print_newline(),this.print_token(C),this._flags.last_word=C.text;return}var be="NONE";if(this._flags.last_token.type===J.END_BLOCK?this._previous_flags.inline_frame?be="SPACE":oe(C,["else","catch","finally","from"])?this._options.brace_style==="expand"||this._options.brace_style==="end-expand"||this._options.brace_style==="none"&&C.newlines?be="NEWLINE":(be="SPACE",this._output.space_before_token=!0):be="NEWLINE":this._flags.last_token.type===J.SEMICOLON&&this._flags.mode===Te.BlockStatement?be="NEWLINE":this._flags.last_token.type===J.SEMICOLON&&te(this._flags.mode)?be="SPACE":this._flags.last_token.type===J.STRING?be="NEWLINE":this._flags.last_token.type===J.RESERVED||this._flags.last_token.type===J.WORD||this._flags.last_token.text==="*"&&(T(this._last_last_text,["function","yield"])||this._flags.mode===Te.ObjectLiteral&&T(this._last_last_text,["{",","]))?be="SPACE":this._flags.last_token.type===J.START_BLOCK?this._flags.inline_frame?be="SPACE":be="NEWLINE":this._flags.last_token.type===J.END_EXPR&&(this._output.space_before_token=!0,be="NEWLINE"),oe(C,M)&&this._flags.last_token.text!==")"&&(this._flags.inline_frame||this._flags.last_token.text==="else"||this._flags.last_token.text==="export"?be="SPACE":be="NEWLINE"),oe(C,["else","catch","finally"]))if((!(this._flags.last_token.type===J.END_BLOCK&&this._previous_flags.mode===Te.BlockStatement)||this._options.brace_style==="expand"||this._options.brace_style==="end-expand"||this._options.brace_style==="none"&&C.newlines)&&!this._flags.inline_frame)this.print_newline();else{this._output.trim(!0);var Ve=this._output.current_line;Ve.last()!=="}"&&this.print_newline(),this._output.space_before_token=!0}else be==="NEWLINE"?oe(this._flags.last_token,de)?this._output.space_before_token=!0:this._flags.last_token.text==="declare"&&oe(C,["var","let","const"])?this._output.space_before_token=!0:this._flags.last_token.type!==J.END_EXPR?(this._flags.last_token.type!==J.START_EXPR||!oe(C,["var","let","const"]))&&this._flags.last_token.text!==":"&&(k(C,"if")&&k(C.previous,"else")?this._output.space_before_token=!0:this.print_newline()):oe(C,M)&&this._flags.last_token.text!==")"&&this.print_newline():this._flags.multiline_frame&&$(this._flags.mode)&&this._flags.last_token.text===","&&this._last_last_text==="}"?this.print_newline():be==="SPACE"&&(this._output.space_before_token=!0);C.previous&&(C.previous.type===J.WORD||C.previous.type===J.RESERVED)&&(this._output.space_before_token=!0),this.print_token(C),this._flags.last_word=C.text,C.type===J.RESERVED&&(C.text==="do"?this._flags.do_block=!0:C.text==="if"?this._flags.if_block=!0:C.text==="import"?this._flags.import_block=!0:this._flags.import_block&&k(C,"from")&&(this._flags.import_block=!1))},re.prototype.handle_semicolon=function(C){this.start_of_statement(C)?this._output.space_before_token=!1:this.handle_whitespace_and_comments(C);for(var W=this._tokens.peek();this._flags.mode===Te.Statement&&!(this._flags.if_block&&k(W,"else"))&&!this._flags.do_block;)this.restore_mode();this._flags.import_block&&(this._flags.import_block=!1),this.print_token(C)},re.prototype.handle_string=function(C){C.text.startsWith("`")&&C.newlines===0&&C.whitespace_before===""&&(C.previous.text===")"||this._flags.last_token.type===J.WORD)||(this.start_of_statement(C)?this._output.space_before_token=!0:(this.handle_whitespace_and_comments(C),this._flags.last_token.type===J.RESERVED||this._flags.last_token.type===J.WORD||this._flags.inline_frame?this._output.space_before_token=!0:this._flags.last_token.type===J.COMMA||this._flags.last_token.type===J.START_EXPR||this._flags.last_token.type===J.EQUALS||this._flags.last_token.type===J.OPERATOR?this.start_of_object_property()||this.allow_wrap_or_preserved_newline(C):C.text.startsWith("`")&&this._flags.last_token.type===J.END_EXPR&&(C.previous.text==="]"||C.previous.text===")")&&C.newlines===0?this._output.space_before_token=!0:this.print_newline())),this.print_token(C)},re.prototype.handle_equals=function(C){this.start_of_statement(C)||this.handle_whitespace_and_comments(C),this._flags.declaration_statement&&(this._flags.declaration_assignment=!0),this._output.space_before_token=!0,this.print_token(C),this._output.space_before_token=!0},re.prototype.handle_comma=function(C){this.handle_whitespace_and_comments(C,!0),this.print_token(C),this._output.space_before_token=!0,this._flags.declaration_statement?(te(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(C)):this._flags.mode===Te.ObjectLiteral||this._flags.mode===Te.Statement&&this._flags.parent.mode===Te.ObjectLiteral?(this._flags.mode===Te.Statement&&this.restore_mode(),this._flags.inline_frame||this.print_newline()):this._options.comma_first&&this.allow_wrap_or_preserved_newline(C)},re.prototype.handle_operator=function(C){var W=C.text==="*"&&(oe(this._flags.last_token,["function","yield"])||T(this._flags.last_token.type,[J.START_BLOCK,J.COMMA,J.END_BLOCK,J.SEMICOLON])),be=T(C.text,["-","+"])&&(T(this._flags.last_token.type,[J.START_BLOCK,J.START_EXPR,J.EQUALS,J.OPERATOR])||T(this._flags.last_token.text,M)||this._flags.last_token.text===",");if(!this.start_of_statement(C)){var Ve=!W;this.handle_whitespace_and_comments(C,Ve)}if(C.text==="*"&&this._flags.last_token.type===J.DOT){this.print_token(C);return}if(C.text==="::"){this.print_token(C);return}if(T(C.text,["-","+"])&&this.start_of_object_property()){this.print_token(C);return}if(this._flags.last_token.type===J.OPERATOR&&T(this._options.operator_position,we)&&this.allow_wrap_or_preserved_newline(C),C.text===":"&&this._flags.in_case){this.print_token(C),this._flags.in_case=!1,this._flags.case_body=!0,this._tokens.peek().type!==J.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 Ke=!0,Ct=!0,Rt=!1;if(C.text===":"?this._flags.ternary_depth===0?Ke=!1:(this._flags.ternary_depth-=1,Rt=!0):C.text==="?"&&(this._flags.ternary_depth+=1),!be&&!W&&this._options.preserve_newlines&&T(C.text,H)){var Vt=C.text===":",rn=Vt&&Rt,He=Vt&&!Rt;switch(this._options.operator_position){case ae.before_newline:this._output.space_before_token=!He,this.print_token(C),(!Vt||rn)&&this.allow_wrap_or_preserved_newline(C),this._output.space_before_token=!0;return;case ae.after_newline:this._output.space_before_token=!0,!Vt||rn?this._tokens.peek().newlines?this.print_newline(!1,!0):this.allow_wrap_or_preserved_newline(C):this._output.space_before_token=!1,this.print_token(C),this._output.space_before_token=!0;return;case ae.preserve_newline:He||this.allow_wrap_or_preserved_newline(C),Ke=!(this._output.just_added_newline()||He),this._output.space_before_token=Ke,this.print_token(C),this._output.space_before_token=!0;return}}if(W){this.allow_wrap_or_preserved_newline(C),Ke=!1;var ln=this._tokens.peek();Ct=ln&&T(ln.type,[J.WORD,J.RESERVED])}else if(C.text==="...")this.allow_wrap_or_preserved_newline(C),Ke=this._flags.last_token.type===J.START_BLOCK,Ct=!1;else if(T(C.text,["--","++","!","~"])||be){if((this._flags.last_token.type===J.COMMA||this._flags.last_token.type===J.START_EXPR)&&this.allow_wrap_or_preserved_newline(C),Ke=!1,Ct=!1,C.newlines&&(C.text==="--"||C.text==="++"||C.text==="~")){var It=oe(this._flags.last_token,de)&&C.newlines;It&&(this._previous_flags.if_block||this._previous_flags.else_block)&&this.restore_mode(),this.print_newline(It,!0)}this._flags.last_token.text===";"&&te(this._flags.mode)&&(Ke=!0),this._flags.last_token.type===J.RESERVED?Ke=!0:this._flags.last_token.type===J.END_EXPR?Ke=!(this._flags.last_token.text==="]"&&(C.text==="--"||C.text==="++")):this._flags.last_token.type===J.OPERATOR&&(Ke=T(C.text,["--","-","++","+"])&&T(this._flags.last_token.text,["--","-","++","+"]),T(C.text,["+","-"])&&T(this._flags.last_token.text,["--","++"])&&(Ct=!0)),(this._flags.mode===Te.BlockStatement&&!this._flags.inline_frame||this._flags.mode===Te.Statement)&&(this._flags.last_token.text==="{"||this._flags.last_token.text===";")&&this.print_newline()}this._output.space_before_token=this._output.space_before_token||Ke,this.print_token(C),this._output.space_before_token=Ct},re.prototype.handle_block_comment=function(C,W){if(this._output.raw){this._output.add_raw_token(C),C.directives&&C.directives.preserve==="end"&&(this._output.raw=this._options.test_output_raw);return}if(C.directives){this.print_newline(!1,W),this.print_token(C),C.directives.preserve==="start"&&(this._output.raw=!0),this.print_newline(!1,!0);return}if(!w.newline.test(C.text)&&!C.newlines){this._output.space_before_token=!0,this.print_token(C),this._output.space_before_token=!0;return}else this.print_block_commment(C,W)},re.prototype.print_block_commment=function(C,W){var be=Y(C.text),Ve,Ke=!1,Ct=!1,Rt=C.whitespace_before,Vt=Rt.length;if(this.print_newline(!1,W),this.print_token_line_indentation(C),this._output.add_token(be[0]),this.print_newline(!1,W),be.length>1){for(be=be.slice(1),Ke=q(be,"*"),Ct=he(be,Rt),Ke&&(this._flags.alignment=1),Ve=0;Ve<be.length;Ve++)Ke?(this.print_token_line_indentation(C),this._output.add_token(N(be[Ve]))):Ct&&be[Ve]?(this.print_token_line_indentation(C),this._output.add_token(be[Ve].substring(Vt))):(this._output.current_line.set_indent(-1),this._output.add_token(be[Ve])),this.print_newline(!1,W);this._flags.alignment=0}},re.prototype.handle_comment=function(C,W){C.newlines?this.print_newline(!1,W):this._output.trim(!0),this._output.space_before_token=!0,this.print_token(C),this.print_newline(!1,W)},re.prototype.handle_dot=function(C){this.start_of_statement(C)||this.handle_whitespace_and_comments(C,!0),this._flags.last_token.text.match("^[0-9]+$")&&(this._output.space_before_token=!0),oe(this._flags.last_token,de)?this._output.space_before_token=!1:this.allow_wrap_or_preserved_newline(C,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(C)},re.prototype.handle_unknown=function(C,W){this.print_token(C),C.text[C.text.length-1]===`
|
|
`&&this.print_newline(!1,W)},re.prototype.handle_eof=function(C){for(;this._flags.mode===Te.Statement;)this.restore_mode();this.handle_whitespace_and_comments(C)},le.exports.Beautifier=re},function(le){function o(_){this.__parent=_,this.__character_count=0,this.__indent_count=-1,this.__alignment_count=0,this.__wrap_point_index=0,this.__wrap_point_character_count=0,this.__wrap_point_indent_count=-1,this.__wrap_point_alignment_count=0,this.__items=[]}o.prototype.clone_empty=function(){var _=new o(this.__parent);return _.set_indent(this.__indent_count,this.__alignment_count),_},o.prototype.item=function(_){return _<0?this.__items[this.__items.length+_]:this.__items[_]},o.prototype.has_match=function(_){for(var w=this.__items.length-1;w>=0;w--)if(this.__items[w].match(_))return!0;return!1},o.prototype.set_indent=function(_,w){this.is_empty()&&(this.__indent_count=_||0,this.__alignment_count=w||0,this.__character_count=this.__parent.get_indent_size(this.__indent_count,this.__alignment_count))},o.prototype._set_wrap_point=function(){this.__parent.wrap_line_length&&(this.__wrap_point_index=this.__items.length,this.__wrap_point_character_count=this.__character_count,this.__wrap_point_indent_count=this.__parent.next_line.__indent_count,this.__wrap_point_alignment_count=this.__parent.next_line.__alignment_count)},o.prototype._should_wrap=function(){return this.__wrap_point_index&&this.__character_count>this.__parent.wrap_line_length&&this.__wrap_point_character_count>this.__parent.next_line.__character_count},o.prototype._allow_wrap=function(){if(this._should_wrap()){this.__parent.add_new_line();var _=this.__parent.current_line;return _.set_indent(this.__wrap_point_indent_count,this.__wrap_point_alignment_count),_.__items=this.__items.slice(this.__wrap_point_index),this.__items=this.__items.slice(0,this.__wrap_point_index),_.__character_count+=this.__character_count-this.__wrap_point_character_count,this.__character_count=this.__wrap_point_character_count,_.__items[0]===" "&&(_.__items.splice(0,1),_.__character_count-=1),!0}return!1},o.prototype.is_empty=function(){return this.__items.length===0},o.prototype.last=function(){return this.is_empty()?null:this.__items[this.__items.length-1]},o.prototype.push=function(_){this.__items.push(_);var w=_.lastIndexOf(`
|
|
`);w!==-1?this.__character_count=_.length-w:this.__character_count+=_.length},o.prototype.pop=function(){var _=null;return this.is_empty()||(_=this.__items.pop(),this.__character_count-=_.length),_},o.prototype._remove_indent=function(){this.__indent_count>0&&(this.__indent_count-=1,this.__character_count-=this.__parent.indent_size)},o.prototype._remove_wrap_indent=function(){this.__wrap_point_indent_count>0&&(this.__wrap_point_indent_count-=1)},o.prototype.trim=function(){for(;this.last()===" ";)this.__items.pop(),this.__character_count-=1},o.prototype.toString=function(){var _="";return this.is_empty()?this.__parent.indent_empty_lines&&(_=this.__parent.get_indent_string(this.__indent_count)):(_=this.__parent.get_indent_string(this.__indent_count,this.__alignment_count),_+=this.__items.join("")),_};function S(_,w){this.__cache=[""],this.__indent_size=_.indent_size,this.__indent_string=_.indent_char,_.indent_with_tabs||(this.__indent_string=new Array(_.indent_size+1).join(_.indent_char)),w=w||"",_.indent_level>0&&(w=new Array(_.indent_level+1).join(this.__indent_string)),this.__base_string=w,this.__base_string_length=w.length}S.prototype.get_indent_size=function(_,w){var b=this.__base_string_length;return w=w||0,_<0&&(b=0),b+=_*this.__indent_size,b+=w,b},S.prototype.get_indent_string=function(_,w){var b=this.__base_string;return w=w||0,_<0&&(_=0,b=""),w+=_*this.__indent_size,this.__ensure_cache(w),b+=this.__cache[w],b},S.prototype.__ensure_cache=function(_){for(;_>=this.__cache.length;)this.__add_column()},S.prototype.__add_column=function(){var _=this.__cache.length,w=0,b="";this.__indent_size&&_>=this.__indent_size&&(w=Math.floor(_/this.__indent_size),_-=w*this.__indent_size,b=new Array(w+1).join(this.__indent_string)),_&&(b+=new Array(_+1).join(" ")),this.__cache.push(b)};function U(_,w){this.__indent_cache=new S(_,w),this.raw=!1,this._end_with_newline=_.end_with_newline,this.indent_size=_.indent_size,this.wrap_line_length=_.wrap_line_length,this.indent_empty_lines=_.indent_empty_lines,this.__lines=[],this.previous_line=null,this.current_line=null,this.next_line=new o(this),this.space_before_token=!1,this.non_breaking_space=!1,this.previous_token_wrapped=!1,this.__add_outputline()}U.prototype.__add_outputline=function(){this.previous_line=this.current_line,this.current_line=this.next_line.clone_empty(),this.__lines.push(this.current_line)},U.prototype.get_line_number=function(){return this.__lines.length},U.prototype.get_indent_string=function(_,w){return this.__indent_cache.get_indent_string(_,w)},U.prototype.get_indent_size=function(_,w){return this.__indent_cache.get_indent_size(_,w)},U.prototype.is_empty=function(){return!this.previous_line&&this.current_line.is_empty()},U.prototype.add_new_line=function(_){return this.is_empty()||!_&&this.just_added_newline()?!1:(this.raw||this.__add_outputline(),!0)},U.prototype.get_code=function(_){this.trim(!0);var w=this.current_line.pop();w&&(w[w.length-1]===`
|
|
`&&(w=w.replace(/\n+$/g,"")),this.current_line.push(w)),this._end_with_newline&&this.__add_outputline();var b=this.__lines.join(`
|
|
`);return _!==`
|
|
`&&(b=b.replace(/[\n]/g,_)),b},U.prototype.set_wrap_point=function(){this.current_line._set_wrap_point()},U.prototype.set_indent=function(_,w){return _=_||0,w=w||0,this.next_line.set_indent(_,w),this.__lines.length>1?(this.current_line.set_indent(_,w),!0):(this.current_line.set_indent(),!1)},U.prototype.add_raw_token=function(_){for(var w=0;w<_.newlines;w++)this.__add_outputline();this.current_line.set_indent(-1),this.current_line.push(_.whitespace_before),this.current_line.push(_.text),this.space_before_token=!1,this.non_breaking_space=!1,this.previous_token_wrapped=!1},U.prototype.add_token=function(_){this.__add_space_before_token(),this.current_line.push(_),this.space_before_token=!1,this.non_breaking_space=!1,this.previous_token_wrapped=this.current_line._allow_wrap()},U.prototype.__add_space_before_token=function(){this.space_before_token&&!this.just_added_newline()&&(this.non_breaking_space||this.set_wrap_point(),this.current_line.push(" "))},U.prototype.remove_indent=function(_){for(var w=this.__lines.length;_<w;)this.__lines[_]._remove_indent(),_++;this.current_line._remove_wrap_indent()},U.prototype.trim=function(_){for(_=_===void 0?!1:_,this.current_line.trim();_&&this.__lines.length>1&&this.current_line.is_empty();)this.__lines.pop(),this.current_line=this.__lines[this.__lines.length-1],this.current_line.trim();this.previous_line=this.__lines.length>1?this.__lines[this.__lines.length-2]:null},U.prototype.just_added_newline=function(){return this.current_line.is_empty()},U.prototype.just_added_blankline=function(){return this.is_empty()||this.current_line.is_empty()&&this.previous_line.is_empty()},U.prototype.ensure_empty_line_above=function(_,w){for(var b=this.__lines.length-2;b>=0;){var R=this.__lines[b];if(R.is_empty())break;if(R.item(0).indexOf(_)!==0&&R.item(-1)!==w){this.__lines.splice(b+1,0,new o(this)),this.previous_line=this.__lines[this.__lines.length-2];break}b--}},le.exports.Output=U},function(le){function o(S,U,_,w){this.type=S,this.text=U,this.comments_before=null,this.newlines=_||0,this.whitespace_before=w||"",this.parent=null,this.next=null,this.previous=null,this.opened=null,this.closed=null,this.directives=null}le.exports.Token=o},function(le,o){var S="\\x23\\x24\\x40\\x41-\\x5a\\x5f\\x61-\\x7a",U="\\x24\\x30-\\x39\\x41-\\x5a\\x5f\\x61-\\x7a",_="\\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",w="\\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",b="\\\\u[0-9a-fA-F]{4}|\\\\u\\{[0-9a-fA-F]+\\}",R="(?:"+b+"|["+S+_+"])",M="(?:"+b+"|["+U+_+w+"])*";o.identifier=new RegExp(R+M,"g"),o.identifierStart=new RegExp(R),o.identifierMatch=new RegExp("(?:"+b+"|["+U+_+w+"])+");var H=/[\u1680\u180e\u2000-\u200a\u202f\u205f\u3000\ufeff]/;o.newline=/[\n\r\u2028\u2029]/,o.lineBreak=new RegExp(`\r
|
|
|`+o.newline.source),o.allLineBreaks=new RegExp(o.lineBreak.source,"g")},function(le,o,S){var U=S(6).Options,_=["before-newline","after-newline","preserve-newline"];function w(b){U.call(this,b,"js");var R=this.raw_options.brace_style||null;R==="expand-strict"?this.raw_options.brace_style="expand":R==="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 M=this._get_selection_list("brace_style",["collapse","expand","end-expand","none","preserve-inline"]);this.brace_preserve_inline=!1,this.brace_style="collapse";for(var H=0;H<M.length;H++)M[H]==="preserve-inline"?this.brace_preserve_inline=!0:this.brace_style=M[H];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",_),this.test_output_raw=this._get_boolean("test_output_raw"),this.jslint_happy&&(this.space_after_anon_function=!0)}w.prototype=new U,le.exports.Options=w},function(le){function o(_,w){this.raw_options=S(_,w),this.disabled=this._get_boolean("disabled"),this.eol=this._get_characters("eol","auto"),this.end_with_newline=this._get_boolean("end_with_newline"),this.indent_size=this._get_number("indent_size",4),this.indent_char=this._get_characters("indent_char"," "),this.indent_level=this._get_number("indent_level"),this.preserve_newlines=this._get_boolean("preserve_newlines",!0),this.max_preserve_newlines=this._get_number("max_preserve_newlines",32786),this.preserve_newlines||(this.max_preserve_newlines=0),this.indent_with_tabs=this._get_boolean("indent_with_tabs",this.indent_char===" "),this.indent_with_tabs&&(this.indent_char=" ",this.indent_size===1&&(this.indent_size=4)),this.wrap_line_length=this._get_number("wrap_line_length",this._get_number("max_char")),this.indent_empty_lines=this._get_boolean("indent_empty_lines"),this.templating=this._get_selection_list("templating",["auto","none","angular","django","erb","handlebars","php","smarty"],["auto"])}o.prototype._get_array=function(_,w){var b=this.raw_options[_],R=w||[];return typeof b=="object"?b!==null&&typeof b.concat=="function"&&(R=b.concat()):typeof b=="string"&&(R=b.split(/[^a-zA-Z0-9_\/\-]+/)),R},o.prototype._get_boolean=function(_,w){var b=this.raw_options[_],R=b===void 0?!!w:!!b;return R},o.prototype._get_characters=function(_,w){var b=this.raw_options[_],R=w||"";return typeof b=="string"&&(R=b.replace(/\\r/,"\r").replace(/\\n/,`
|
|
`).replace(/\\t/," ")),R},o.prototype._get_number=function(_,w){var b=this.raw_options[_];w=parseInt(w,10),isNaN(w)&&(w=0);var R=parseInt(b,10);return isNaN(R)&&(R=w),R},o.prototype._get_selection=function(_,w,b){var R=this._get_selection_list(_,w,b);if(R.length!==1)throw new Error("Invalid Option Value: The option '"+_+`' can only be one of the following values:
|
|
`+w+`
|
|
You passed in: '`+this.raw_options[_]+"'");return R[0]},o.prototype._get_selection_list=function(_,w,b){if(!w||w.length===0)throw new Error("Selection list cannot be empty.");if(b=b||[w[0]],!this._is_valid_selection(b,w))throw new Error("Invalid Default Value!");var R=this._get_array(_,b);if(!this._is_valid_selection(R,w))throw new Error("Invalid Option Value: The option '"+_+`' can contain only the following values:
|
|
`+w+`
|
|
You passed in: '`+this.raw_options[_]+"'");return R},o.prototype._is_valid_selection=function(_,w){return _.length&&w.length&&!_.some(function(b){return w.indexOf(b)===-1})};function S(_,w){var b={};_=U(_);var R;for(R in _)R!==w&&(b[R]=_[R]);if(w&&_[w])for(R in _[w])b[R]=_[w][R];return b}function U(_){var w={},b;for(b in _){var R=b.replace(/-/g,"_");w[R]=_[b]}return w}le.exports.Options=o,le.exports.normalizeOpts=U,le.exports.mergeOpts=S},function(le,o,S){var U=S(8).InputScanner,_=S(9).Tokenizer,w=S(9).TOKEN,b=S(13).Directives,R=S(4),M=S(12).Pattern,H=S(14).TemplatablePattern;function J(q,he){return he.indexOf(q)!==-1}var T={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:w.START,RAW:w.RAW,EOF:w.EOF},N=new b(/\/\*/,/\*\//),P=/0[xX][0123456789abcdefABCDEF_]*n?|0[oO][01234567_]*n?|0[bB][01_]*n?|\d[\d_]*n|(?:\.\d[\d_]*|\d[\d_]*\.?[\d_]*)(?:[eE][+-]?[\d_]+)?/,k=/[0-9]/,oe=/[^\d\.]/,de=">>> === !== &&= ??= ||= << && >= ** != == <= >> || ?? |> < / - + > : & % ? ^ | *".split(" "),ie=">>>= ... >>= <<= === >>> !== **= &&= ??= ||= => ^= :: /= << <= == && -= >= >> != -- += ** || ?? ++ %= &= *= |= |> = ! ? > < : / ^ - + * & % ~ |";ie=ie.replace(/[-[\]{}()*+?.,\\^$|#]/g,"\\$&"),ie="\\?\\.(?!\\d) "+ie,ie=ie.replace(/ /g,"|");var ae=new RegExp(ie),we="continue,try,throw,return,var,let,const,if,switch,case,default,for,while,break,function,import,export".split(","),Te=we.concat(["do","in","of","else","get","set","new","catch","finally","typeof","yield","async","await","from","as","class","extends"]),Re=new RegExp("^(?:"+Te.join("|")+")$"),Y,$=function(q,he){_.call(this,q,he),this._patterns.whitespace=this._patterns.whitespace.matching(/\u00A0\u1680\u180e\u2000-\u200a\u202f\u205f\u3000\ufeff/.source,/\u2028\u2029/.source);var re=new M(this._input),E=new H(this._input).read_options(this._options);this.__patterns={template:E,identifier:E.starting_with(R.identifier).matching(R.identifierMatch),number:re.matching(P),punct:re.matching(ae),comment:re.starting_with(/\/\//).until(/[\n\r\u2028\u2029]/),block_comment:re.starting_with(/\/\*/).until_after(/\*\//),html_comment_start:re.matching(/<!--/),html_comment_end:re.matching(/-->/),include:re.starting_with(/#include/).until_after(R.lineBreak),shebang:re.starting_with(/#!/).until_after(R.lineBreak),xml:re.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:E.until(/['\\\n\r\u2028\u2029]/),double_quote:E.until(/["\\\n\r\u2028\u2029]/),template_text:E.until(/[`\\$]/),template_expression:E.until(/[`}\\]/)}};$.prototype=new _,$.prototype._is_comment=function(q){return q.type===T.COMMENT||q.type===T.BLOCK_COMMENT||q.type===T.UNKNOWN},$.prototype._is_opening=function(q){return q.type===T.START_BLOCK||q.type===T.START_EXPR},$.prototype._is_closing=function(q,he){return(q.type===T.END_BLOCK||q.type===T.END_EXPR)&&he&&(q.text==="]"&&he.text==="["||q.text===")"&&he.text==="("||q.text==="}"&&he.text==="{")},$.prototype._reset=function(){Y=!1},$.prototype._get_next_token=function(q,he){var re=null;this._readWhitespace();var E=this._input.peek();return E===null?this._create_token(T.EOF,""):(re=re||this._read_non_javascript(E),re=re||this._read_string(E),re=re||this._read_pair(E,this._input.peek(1)),re=re||this._read_word(q),re=re||this._read_singles(E),re=re||this._read_comment(E),re=re||this._read_regexp(E,q),re=re||this._read_xml(E,q),re=re||this._read_punctuation(),re=re||this._create_token(T.UNKNOWN,this._input.next()),re)},$.prototype._read_word=function(q){var he;if(he=this.__patterns.identifier.read(),he!=="")return he=he.replace(R.allLineBreaks,`
|
|
`),!(q.type===T.DOT||q.type===T.RESERVED&&(q.text==="set"||q.text==="get"))&&Re.test(he)?(he==="in"||he==="of")&&(q.type===T.WORD||q.type===T.STRING)?this._create_token(T.OPERATOR,he):this._create_token(T.RESERVED,he):this._create_token(T.WORD,he);if(he=this.__patterns.number.read(),he!=="")return this._create_token(T.WORD,he)},$.prototype._read_singles=function(q){var he=null;return q==="("||q==="["?he=this._create_token(T.START_EXPR,q):q===")"||q==="]"?he=this._create_token(T.END_EXPR,q):q==="{"?he=this._create_token(T.START_BLOCK,q):q==="}"?he=this._create_token(T.END_BLOCK,q):q===";"?he=this._create_token(T.SEMICOLON,q):q==="."&&oe.test(this._input.peek(1))?he=this._create_token(T.DOT,q):q===","&&(he=this._create_token(T.COMMA,q)),he&&this._input.next(),he},$.prototype._read_pair=function(q,he){var re=null;return q==="#"&&he==="{"&&(re=this._create_token(T.START_BLOCK,q+he)),re&&(this._input.next(),this._input.next()),re},$.prototype._read_punctuation=function(){var q=this.__patterns.punct.read();if(q!=="")return q==="="?this._create_token(T.EQUALS,q):q==="?."?this._create_token(T.DOT,q):this._create_token(T.OPERATOR,q)},$.prototype._read_non_javascript=function(q){var he="";if(q==="#"){if(this._is_first_token()&&(he=this.__patterns.shebang.read(),he))return this._create_token(T.UNKNOWN,he.trim()+`
|
|
`);if(he=this.__patterns.include.read(),he)return this._create_token(T.UNKNOWN,he.trim()+`
|
|
`);q=this._input.next();var re="#";if(this._input.hasNext()&&this._input.testChar(k)){do q=this._input.next(),re+=q;while(this._input.hasNext()&&q!=="#"&&q!=="=");return q==="#"||(this._input.peek()==="["&&this._input.peek(1)==="]"?(re+="[]",this._input.next(),this._input.next()):this._input.peek()==="{"&&this._input.peek(1)==="}"&&(re+="{}",this._input.next(),this._input.next())),this._create_token(T.WORD,re)}this._input.back()}else if(q==="<"&&this._is_first_token()){if(he=this.__patterns.html_comment_start.read(),he){for(;this._input.hasNext()&&!this._input.testChar(R.newline);)he+=this._input.next();return Y=!0,this._create_token(T.COMMENT,he)}}else if(Y&&q==="-"&&(he=this.__patterns.html_comment_end.read(),he))return Y=!1,this._create_token(T.COMMENT,he);return null},$.prototype._read_comment=function(q){var he=null;if(q==="/"){var re="";if(this._input.peek(1)==="*"){re=this.__patterns.block_comment.read();var E=N.get_directives(re);E&&E.ignore==="start"&&(re+=N.readIgnored(this._input)),re=re.replace(R.allLineBreaks,`
|
|
`),he=this._create_token(T.BLOCK_COMMENT,re),he.directives=E}else this._input.peek(1)==="/"&&(re=this.__patterns.comment.read(),he=this._create_token(T.COMMENT,re))}return he},$.prototype._read_string=function(q){if(q==="`"||q==="'"||q==='"'){var he=this._input.next();return this.has_char_escapes=!1,q==="`"?he+=this._read_string_recursive("`",!0,"${"):he+=this._read_string_recursive(q),this.has_char_escapes&&this._options.unescape_strings&&(he=te(he)),this._input.peek()===q&&(he+=this._input.next()),he=he.replace(R.allLineBreaks,`
|
|
`),this._create_token(T.STRING,he)}return null},$.prototype._allow_regexp_or_xml=function(q){return q.type===T.RESERVED&&J(q.text,["return","case","throw","else","do","typeof","yield"])||q.type===T.END_EXPR&&q.text===")"&&q.opened.previous.type===T.RESERVED&&J(q.opened.previous.text,["if","while","for"])||J(q.type,[T.COMMENT,T.START_EXPR,T.START_BLOCK,T.START,T.END_BLOCK,T.OPERATOR,T.EQUALS,T.EOF,T.SEMICOLON,T.COMMA])},$.prototype._read_regexp=function(q,he){if(q==="/"&&this._allow_regexp_or_xml(he)){for(var re=this._input.next(),E=!1,C=!1;this._input.hasNext()&&(E||C||this._input.peek()!==q)&&!this._input.testChar(R.newline);)re+=this._input.peek(),E?E=!1:(E=this._input.peek()==="\\",this._input.peek()==="["?C=!0:this._input.peek()==="]"&&(C=!1)),this._input.next();return this._input.peek()===q&&(re+=this._input.next(),re+=this._input.read(R.identifier)),this._create_token(T.STRING,re)}return null},$.prototype._read_xml=function(q,he){if(this._options.e4x&&q==="<"&&this._allow_regexp_or_xml(he)){var re="",E=this.__patterns.xml.read_match();if(E){for(var C=E[2].replace(/^{\s+/,"{").replace(/\s+}$/,"}"),W=C.indexOf("{")===0,be=0;E;){var Ve=!!E[1],Ke=E[2],Ct=!!E[E.length-1]||Ke.slice(0,8)==="![CDATA[";if(!Ct&&(Ke===C||W&&Ke.replace(/^{\s+/,"{").replace(/\s+}$/,"}"))&&(Ve?--be:++be),re+=E[0],be<=0)break;E=this.__patterns.xml.read_match()}return E||(re+=this._input.match(/[\s\S]*/g)[0]),re=re.replace(R.allLineBreaks,`
|
|
`),this._create_token(T.STRING,re)}}return null};function te(q){for(var he="",re=0,E=new U(q),C=null;E.hasNext();)if(C=E.match(/([\s]|[^\\]|\\\\)+/g),C&&(he+=C[0]),E.peek()==="\\"){if(E.next(),E.peek()==="x")C=E.match(/x([0-9A-Fa-f]{2})/g);else if(E.peek()==="u")C=E.match(/u([0-9A-Fa-f]{4})/g),C||(C=E.match(/u\{([0-9A-Fa-f]+)\}/g));else{he+="\\",E.hasNext()&&(he+=E.next());continue}if(!C||(re=parseInt(C[1],16),re>126&&re<=255&&C[0].indexOf("x")===0))return q;re>=0&&re<32||re>1114111?he+="\\"+C[0]:re===34||re===39||re===92?he+="\\"+String.fromCharCode(re):he+=String.fromCharCode(re)}return he}$.prototype._read_string_recursive=function(q,he,re){var E,C;q==="'"?C=this.__patterns.single_quote:q==='"'?C=this.__patterns.double_quote:q==="`"?C=this.__patterns.template_text:q==="}"&&(C=this.__patterns.template_expression);for(var W=C.read(),be="";this._input.hasNext();){if(be=this._input.next(),be===q||!he&&R.newline.test(be)){this._input.back();break}else be==="\\"&&this._input.hasNext()?(E=this._input.peek(),E==="x"||E==="u"?this.has_char_escapes=!0:E==="\r"&&this._input.peek(1)===`
|
|
`&&this._input.next(),be+=this._input.next()):re&&(re==="${"&&be==="$"&&this._input.peek()==="{"&&(be+=this._input.next()),re===be&&(q==="`"?be+=this._read_string_recursive("}",he,"`"):be+=this._read_string_recursive("`",he,"${"),this._input.hasNext()&&(be+=this._input.next())));be+=C.read(),W+=be}return W},le.exports.Tokenizer=$,le.exports.TOKEN=T,le.exports.positionable_operators=de.slice(),le.exports.line_starters=we.slice()},function(le){var o=RegExp.prototype.hasOwnProperty("sticky");function S(U){this.__input=U||"",this.__input_length=this.__input.length,this.__position=0}S.prototype.restart=function(){this.__position=0},S.prototype.back=function(){this.__position>0&&(this.__position-=1)},S.prototype.hasNext=function(){return this.__position<this.__input_length},S.prototype.next=function(){var U=null;return this.hasNext()&&(U=this.__input.charAt(this.__position),this.__position+=1),U},S.prototype.peek=function(U){var _=null;return U=U||0,U+=this.__position,U>=0&&U<this.__input_length&&(_=this.__input.charAt(U)),_},S.prototype.__match=function(U,_){U.lastIndex=_;var w=U.exec(this.__input);return w&&!(o&&U.sticky)&&w.index!==_&&(w=null),w},S.prototype.test=function(U,_){return _=_||0,_+=this.__position,_>=0&&_<this.__input_length?!!this.__match(U,_):!1},S.prototype.testChar=function(U,_){var w=this.peek(_);return U.lastIndex=0,w!==null&&U.test(w)},S.prototype.match=function(U){var _=this.__match(U,this.__position);return _?this.__position+=_[0].length:_=null,_},S.prototype.read=function(U,_,w){var b="",R;return U&&(R=this.match(U),R&&(b+=R[0])),_&&(R||!U)&&(b+=this.readUntil(_,w)),b},S.prototype.readUntil=function(U,_){var w="",b=this.__position;U.lastIndex=this.__position;var R=U.exec(this.__input);return R?(b=R.index,_&&(b+=R[0].length)):b=this.__input_length,w=this.__input.substring(this.__position,b),this.__position=b,w},S.prototype.readUntilAfter=function(U){return this.readUntil(U,!0)},S.prototype.get_regexp=function(U,_){var w=null,b="g";return _&&o&&(b="y"),typeof U=="string"&&U!==""?w=new RegExp(U,b):U&&(w=new RegExp(U.source,b)),w},S.prototype.get_literal_regexp=function(U){return RegExp(U.replace(/[-\/\\^$*+?.()|[\]{}]/g,"\\$&"))},S.prototype.peekUntilAfter=function(U){var _=this.__position,w=this.readUntilAfter(U);return this.__position=_,w},S.prototype.lookBack=function(U){var _=this.__position-1;return _>=U.length&&this.__input.substring(_-U.length,_).toLowerCase()===U},le.exports.InputScanner=S},function(le,o,S){var U=S(8).InputScanner,_=S(3).Token,w=S(10).TokenStream,b=S(11).WhitespacePattern,R={START:"TK_START",RAW:"TK_RAW",EOF:"TK_EOF"},M=function(H,J){this._input=new U(H),this._options=J||{},this.__tokens=null,this._patterns={},this._patterns.whitespace=new b(this._input)};M.prototype.tokenize=function(){this._input.restart(),this.__tokens=new w,this._reset();for(var H,J=new _(R.START,""),T=null,N=[],P=new w;J.type!==R.EOF;){for(H=this._get_next_token(J,T);this._is_comment(H);)P.add(H),H=this._get_next_token(J,T);P.isEmpty()||(H.comments_before=P,P=new w),H.parent=T,this._is_opening(H)?(N.push(T),T=H):T&&this._is_closing(H,T)&&(H.opened=T,T.closed=H,T=N.pop(),H.parent=T),H.previous=J,J.next=H,this.__tokens.add(H),J=H}return this.__tokens},M.prototype._is_first_token=function(){return this.__tokens.isEmpty()},M.prototype._reset=function(){},M.prototype._get_next_token=function(H,J){this._readWhitespace();var T=this._input.read(/.+/g);return T?this._create_token(R.RAW,T):this._create_token(R.EOF,"")},M.prototype._is_comment=function(H){return!1},M.prototype._is_opening=function(H){return!1},M.prototype._is_closing=function(H,J){return!1},M.prototype._create_token=function(H,J){var T=new _(H,J,this._patterns.whitespace.newline_count,this._patterns.whitespace.whitespace_before_token);return T},M.prototype._readWhitespace=function(){return this._patterns.whitespace.read()},le.exports.Tokenizer=M,le.exports.TOKEN=R},function(le){function o(S){this.__tokens=[],this.__tokens_length=this.__tokens.length,this.__position=0,this.__parent_token=S}o.prototype.restart=function(){this.__position=0},o.prototype.isEmpty=function(){return this.__tokens_length===0},o.prototype.hasNext=function(){return this.__position<this.__tokens_length},o.prototype.next=function(){var S=null;return this.hasNext()&&(S=this.__tokens[this.__position],this.__position+=1),S},o.prototype.peek=function(S){var U=null;return S=S||0,S+=this.__position,S>=0&&S<this.__tokens_length&&(U=this.__tokens[S]),U},o.prototype.add=function(S){this.__parent_token&&(S.parent=this.__parent_token),this.__tokens.push(S),this.__tokens_length+=1},le.exports.TokenStream=o},function(le,o,S){var U=S(12).Pattern;function _(w,b){U.call(this,w,b),b?this._line_regexp=this._input.get_regexp(b._line_regexp):this.__set_whitespace_patterns("",""),this.newline_count=0,this.whitespace_before_token=""}_.prototype=new U,_.prototype.__set_whitespace_patterns=function(w,b){w+="\\t ",b+="\\n\\r",this._match_pattern=this._input.get_regexp("["+w+b+"]+",!0),this._newline_regexp=this._input.get_regexp("\\r\\n|["+b+"]")},_.prototype.read=function(){this.newline_count=0,this.whitespace_before_token="";var w=this._input.read(this._match_pattern);if(w===" ")this.whitespace_before_token=" ";else if(w){var b=this.__split(this._newline_regexp,w);this.newline_count=b.length-1,this.whitespace_before_token=b[this.newline_count]}return w},_.prototype.matching=function(w,b){var R=this._create();return R.__set_whitespace_patterns(w,b),R._update(),R},_.prototype._create=function(){return new _(this._input,this)},_.prototype.__split=function(w,b){w.lastIndex=0;for(var R=0,M=[],H=w.exec(b);H;)M.push(b.substring(R,H.index)),R=H.index+H[0].length,H=w.exec(b);return R<b.length?M.push(b.substring(R,b.length)):M.push(""),M},le.exports.WhitespacePattern=_},function(le){function o(S,U){this._input=S,this._starting_pattern=null,this._match_pattern=null,this._until_pattern=null,this._until_after=!1,U&&(this._starting_pattern=this._input.get_regexp(U._starting_pattern,!0),this._match_pattern=this._input.get_regexp(U._match_pattern,!0),this._until_pattern=this._input.get_regexp(U._until_pattern),this._until_after=U._until_after)}o.prototype.read=function(){var S=this._input.read(this._starting_pattern);return(!this._starting_pattern||S)&&(S+=this._input.read(this._match_pattern,this._until_pattern,this._until_after)),S},o.prototype.read_match=function(){return this._input.match(this._match_pattern)},o.prototype.until_after=function(S){var U=this._create();return U._until_after=!0,U._until_pattern=this._input.get_regexp(S),U._update(),U},o.prototype.until=function(S){var U=this._create();return U._until_after=!1,U._until_pattern=this._input.get_regexp(S),U._update(),U},o.prototype.starting_with=function(S){var U=this._create();return U._starting_pattern=this._input.get_regexp(S,!0),U._update(),U},o.prototype.matching=function(S){var U=this._create();return U._match_pattern=this._input.get_regexp(S,!0),U._update(),U},o.prototype._create=function(){return new o(this._input,this)},o.prototype._update=function(){},le.exports.Pattern=o},function(le){function o(S,U){S=typeof S=="string"?S:S.source,U=typeof U=="string"?U:U.source,this.__directives_block_pattern=new RegExp(S+/ beautify( \w+[:]\w+)+ /.source+U,"g"),this.__directive_pattern=/ (\w+)[:](\w+)/g,this.__directives_end_ignore_pattern=new RegExp(S+/\sbeautify\signore:end\s/.source+U,"g")}o.prototype.get_directives=function(S){if(!S.match(this.__directives_block_pattern))return null;var U={};this.__directive_pattern.lastIndex=0;for(var _=this.__directive_pattern.exec(S);_;)U[_[1]]=_[2],_=this.__directive_pattern.exec(S);return U},o.prototype.readIgnored=function(S){return S.readUntilAfter(this.__directives_end_ignore_pattern)},le.exports.Directives=o},function(le,o,S){var U=S(12).Pattern,_={django:!1,erb:!1,handlebars:!1,php:!1,smarty:!1,angular:!1};function w(b,R){U.call(this,b,R),this.__template_pattern=null,this._disabled=Object.assign({},_),this._excluded=Object.assign({},_),R&&(this.__template_pattern=this._input.get_regexp(R.__template_pattern),this._excluded=Object.assign(this._excluded,R._excluded),this._disabled=Object.assign(this._disabled,R._disabled));var M=new U(b);this.__patterns={handlebars_comment:M.starting_with(/{{!--/).until_after(/--}}/),handlebars_unescaped:M.starting_with(/{{{/).until_after(/}}}/),handlebars:M.starting_with(/{{/).until_after(/}}/),php:M.starting_with(/<\?(?:[= ]|php)/).until_after(/\?>/),erb:M.starting_with(/<%[^%]/).until_after(/[^%]%>/),django:M.starting_with(/{%/).until_after(/%}/),django_value:M.starting_with(/{{/).until_after(/}}/),django_comment:M.starting_with(/{#/).until_after(/#}/),smarty:M.starting_with(/{(?=[^}{\s\n])/).until_after(/[^\s\n]}/),smarty_comment:M.starting_with(/{\*/).until_after(/\*}/),smarty_literal:M.starting_with(/{literal}/).until_after(/{\/literal}/)}}w.prototype=new U,w.prototype._create=function(){return new w(this._input,this)},w.prototype._update=function(){this.__set_templated_pattern()},w.prototype.disable=function(b){var R=this._create();return R._disabled[b]=!0,R._update(),R},w.prototype.read_options=function(b){var R=this._create();for(var M in _)R._disabled[M]=b.templating.indexOf(M)===-1;return R._update(),R},w.prototype.exclude=function(b){var R=this._create();return R._excluded[b]=!0,R._update(),R},w.prototype.read=function(){var b="";this._match_pattern?b=this._input.read(this._starting_pattern):b=this._input.read(this._starting_pattern,this.__template_pattern);for(var R=this._read_template();R;)this._match_pattern?R+=this._input.read(this._match_pattern):R+=this._input.readUntil(this.__template_pattern),b+=R,R=this._read_template();return this._until_after&&(b+=this._input.readUntilAfter(this._until_pattern)),b},w.prototype.__set_templated_pattern=function(){var b=[];this._disabled.php||b.push(this.__patterns.php._starting_pattern.source),this._disabled.handlebars||b.push(this.__patterns.handlebars._starting_pattern.source),this._disabled.angular||b.push(this.__patterns.handlebars._starting_pattern.source),this._disabled.erb||b.push(this.__patterns.erb._starting_pattern.source),this._disabled.django||(b.push(this.__patterns.django._starting_pattern.source),b.push(this.__patterns.django_value._starting_pattern.source),b.push(this.__patterns.django_comment._starting_pattern.source)),this._disabled.smarty||b.push(this.__patterns.smarty._starting_pattern.source),this._until_pattern&&b.push(this._until_pattern.source),this.__template_pattern=this._input.get_regexp("(?:"+b.join("|")+")")},w.prototype._read_template=function(){var b="",R=this._input.peek();if(R==="<"){var M=this._input.peek(1);!this._disabled.php&&!this._excluded.php&&M==="?"&&(b=b||this.__patterns.php.read()),!this._disabled.erb&&!this._excluded.erb&&M==="%"&&(b=b||this.__patterns.erb.read())}else R==="{"&&(!this._disabled.handlebars&&!this._excluded.handlebars&&(b=b||this.__patterns.handlebars_comment.read(),b=b||this.__patterns.handlebars_unescaped.read(),b=b||this.__patterns.handlebars.read()),this._disabled.django||(!this._excluded.django&&!this._excluded.handlebars&&(b=b||this.__patterns.django_value.read()),this._excluded.django||(b=b||this.__patterns.django_comment.read(),b=b||this.__patterns.django.read())),this._disabled.smarty||this._disabled.django&&this._disabled.handlebars&&(b=b||this.__patterns.smarty_comment.read(),b=b||this.__patterns.smarty_literal.read(),b=b||this.__patterns.smarty.read()));return b},le.exports.TemplatablePattern=w}],G={};function g(le){var o=G[le];if(o!==void 0)return o.exports;var S=G[le]={exports:{}};return ge[le](S,S.exports,g),S.exports}var ye=g(0);fe=ye})();var Ce=fe;x=[],V=function(){return{js_beautify:Ce}}.apply(ct,x),V!==void 0&&(Vn.exports=V)})()},32834:function(Vn){(function(ct,x){Vn.exports=x()})(this,function(){"use strict";function ct(ut,nt){for(var ze=0;ze<nt.length;ze++){var ne=nt[ze];ne.enumerable=ne.enumerable||!1,ne.configurable=!0,"value"in ne&&(ne.writable=!0),Object.defineProperty(ut,ne.key,ne)}}function x(ut,nt,ze){return nt&&ct(ut.prototype,nt),ze&&ct(ut,ze),ut}function V(ut,nt){if(ut){if(typeof ut=="string")return fe(ut,nt);var ze=Object.prototype.toString.call(ut).slice(8,-1);if(ze==="Object"&&ut.constructor&&(ze=ut.constructor.name),ze==="Map"||ze==="Set")return Array.from(ut);if(ze==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(ze))return fe(ut,nt)}}function fe(ut,nt){(nt==null||nt>ut.length)&&(nt=ut.length);for(var ze=0,ne=new Array(nt);ze<nt;ze++)ne[ze]=ut[ze];return ne}function Ce(ut,nt){var ze=typeof Symbol!="undefined"&&ut[Symbol.iterator]||ut["@@iterator"];if(ze)return(ze=ze.call(ut)).next.bind(ze);if(Array.isArray(ut)||(ze=V(ut))||nt&&ut&&typeof ut.length=="number"){ze&&(ut=ze);var ne=0;return function(){return ne>=ut.length?{done:!0}:{done:!1,value:ut[ne++]}}}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 ge={exports:{}};function G(){return{baseUrl:null,breaks:!1,gfm:!0,headerIds:!0,headerPrefix:"",highlight:null,langPrefix:"language-",mangle:!0,pedantic:!1,renderer:null,sanitize:!1,sanitizer:null,silent:!1,smartLists:!1,smartypants:!1,tokenizer:null,walkTokens:null,xhtml:!1}}function g(ut){ge.exports.defaults=ut}ge.exports={defaults:G(),getDefaults:G,changeDefaults:g};var ye=/[&<>"']/,le=/[&<>"']/g,o=/[<>"']|&(?!#?\w+;)/,S=/[<>"']|&(?!#?\w+;)/g,U={"&":"&","<":"<",">":">",'"':""","'":"'"},_=function(nt){return U[nt]};function w(ut,nt){if(nt){if(ye.test(ut))return ut.replace(le,_)}else if(o.test(ut))return ut.replace(S,_);return ut}var b=/&(#(?:\d+)|(?:#x[0-9A-Fa-f]+)|(?:\w+));?/ig;function R(ut){return ut.replace(b,function(nt,ze){return ze=ze.toLowerCase(),ze==="colon"?":":ze.charAt(0)==="#"?ze.charAt(1)==="x"?String.fromCharCode(parseInt(ze.substring(2),16)):String.fromCharCode(+ze.substring(1)):""})}var M=/(^|[^\[])\^/g;function H(ut,nt){ut=ut.source||ut,nt=nt||"";var ze={replace:function(me,Ie){return Ie=Ie.source||Ie,Ie=Ie.replace(M,"$1"),ut=ut.replace(me,Ie),ze},getRegex:function(){return new RegExp(ut,nt)}};return ze}var J=/[^\w:]/g,T=/^$|^[a-z][a-z0-9+.-]*:|^[?#]/i;function N(ut,nt,ze){if(ut){var ne;try{ne=decodeURIComponent(R(ze)).replace(J,"").toLowerCase()}catch(me){return null}if(ne.indexOf("javascript:")===0||ne.indexOf("vbscript:")===0||ne.indexOf("data:")===0)return null}nt&&!T.test(ze)&&(ze=ie(nt,ze));try{ze=encodeURI(ze).replace(/%25/g,"%")}catch(me){return null}return ze}var P={},k=/^[^:]+:\/*[^/]*$/,oe=/^([^:]+:)[\s\S]*$/,de=/^([^:]+:\/*[^/]*)[\s\S]*$/;function ie(ut,nt){P[" "+ut]||(k.test(ut)?P[" "+ut]=ut+"/":P[" "+ut]=Re(ut,"/",!0)),ut=P[" "+ut];var ze=ut.indexOf(":")===-1;return nt.substring(0,2)==="//"?ze?nt:ut.replace(oe,"$1")+nt:nt.charAt(0)==="/"?ze?nt:ut.replace(de,"$1")+nt:ut+nt}var ae={exec:function(){}};function we(ut){for(var nt=1,ze,ne;nt<arguments.length;nt++){ze=arguments[nt];for(ne in ze)Object.prototype.hasOwnProperty.call(ze,ne)&&(ut[ne]=ze[ne])}return ut}function Te(ut,nt){var ze=ut.replace(/\|/g,function(Ie,Ue,ke){for(var Gt=!1,_n=Ue;--_n>=0&&ke[_n]==="\\";)Gt=!Gt;return Gt?"|":" |"}),ne=ze.split(/ \|/),me=0;if(ne.length>nt)ne.splice(nt);else for(;ne.length<nt;)ne.push("");for(;me<ne.length;me++)ne[me]=ne[me].trim().replace(/\\\|/g,"|");return ne}function Re(ut,nt,ze){var ne=ut.length;if(ne===0)return"";for(var me=0;me<ne;){var Ie=ut.charAt(ne-me-1);if(Ie===nt&&!ze)me++;else if(Ie!==nt&&ze)me++;else break}return ut.substr(0,ne-me)}function Y(ut,nt){if(ut.indexOf(nt[1])===-1)return-1;for(var ze=ut.length,ne=0,me=0;me<ze;me++)if(ut[me]==="\\")me++;else if(ut[me]===nt[0])ne++;else if(ut[me]===nt[1]&&(ne--,ne<0))return me;return-1}function $(ut){ut&&ut.sanitize&&!ut.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 te(ut,nt){if(nt<1)return"";for(var ze="";nt>1;)nt&1&&(ze+=ut),nt>>=1,ut+=ut;return ze+ut}var q={escape:w,unescape:R,edit:H,cleanUrl:N,resolveUrl:ie,noopTest:ae,merge:we,splitCells:Te,rtrim:Re,findClosingBracket:Y,checkSanitizeDeprecation:$,repeatString:te},he=ge.exports.defaults,re=q.rtrim,E=q.splitCells,C=q.escape,W=q.findClosingBracket;function be(ut,nt,ze){var ne=nt.href,me=nt.title?C(nt.title):null,Ie=ut[1].replace(/\\([\[\]])/g,"$1");return ut[0].charAt(0)!=="!"?{type:"link",raw:ze,href:ne,title:me,text:Ie}:{type:"image",raw:ze,href:ne,title:me,text:C(Ie)}}function Ve(ut,nt){var ze=ut.match(/^(\s+)(?:```)/);if(ze===null)return nt;var ne=ze[1];return nt.split(`
|
|
`).map(function(me){var Ie=me.match(/^\s+/);if(Ie===null)return me;var Ue=Ie[0];return Ue.length>=ne.length?me.slice(ne.length):me}).join(`
|
|
`)}var Ke=function(){function ut(ze){this.options=ze||he}var nt=ut.prototype;return nt.space=function(ne){var me=this.rules.block.newline.exec(ne);if(me)return me[0].length>1?{type:"space",raw:me[0]}:{raw:`
|
|
`}},nt.code=function(ne){var me=this.rules.block.code.exec(ne);if(me){var Ie=me[0].replace(/^ {1,4}/gm,"");return{type:"code",raw:me[0],codeBlockStyle:"indented",text:this.options.pedantic?Ie:re(Ie,`
|
|
`)}}},nt.fences=function(ne){var me=this.rules.block.fences.exec(ne);if(me){var Ie=me[0],Ue=Ve(Ie,me[3]||"");return{type:"code",raw:Ie,lang:me[2]?me[2].trim():me[2],text:Ue}}},nt.heading=function(ne){var me=this.rules.block.heading.exec(ne);if(me){var Ie=me[2].trim();if(/#$/.test(Ie)){var Ue=re(Ie,"#");(this.options.pedantic||!Ue||/ $/.test(Ue))&&(Ie=Ue.trim())}return{type:"heading",raw:me[0],depth:me[1].length,text:Ie}}},nt.nptable=function(ne){var me=this.rules.block.nptable.exec(ne);if(me){var Ie={type:"table",header:E(me[1].replace(/^ *| *\| *$/g,"")),align:me[2].replace(/^ *|\| *$/g,"").split(/ *\| */),cells:me[3]?me[3].replace(/\n$/,"").split(`
|
|
`):[],raw:me[0]};if(Ie.header.length===Ie.align.length){var Ue=Ie.align.length,ke;for(ke=0;ke<Ue;ke++)/^ *-+: *$/.test(Ie.align[ke])?Ie.align[ke]="right":/^ *:-+: *$/.test(Ie.align[ke])?Ie.align[ke]="center":/^ *:-+ *$/.test(Ie.align[ke])?Ie.align[ke]="left":Ie.align[ke]=null;for(Ue=Ie.cells.length,ke=0;ke<Ue;ke++)Ie.cells[ke]=E(Ie.cells[ke],Ie.header.length);return Ie}}},nt.hr=function(ne){var me=this.rules.block.hr.exec(ne);if(me)return{type:"hr",raw:me[0]}},nt.blockquote=function(ne){var me=this.rules.block.blockquote.exec(ne);if(me){var Ie=me[0].replace(/^ *> ?/gm,"");return{type:"blockquote",raw:me[0],text:Ie}}},nt.list=function(ne){var me=this.rules.block.list.exec(ne);if(me){var Ie=me[0],Ue=me[2],ke=Ue.length>1,Gt={type:"list",raw:Ie,ordered:ke,start:ke?+Ue.slice(0,-1):"",loose:!1,items:[]},_n=me[0].match(this.rules.block.item),wn=!1,$n,mr,sr,lr,zn,Lr,Sr,xr,Zr,Tn=_n.length;sr=this.rules.block.listItemStart.exec(_n[0]);for(var fn=0;fn<Tn;fn++){if($n=_n[fn],Ie=$n,this.options.pedantic||(Zr=$n.match(new RegExp("\\n\\s*\\n {0,"+(sr[0].length-1)+"}\\S")),Zr&&(zn=$n.length-Zr.index+_n.slice(fn+1).join(`
|
|
`).length,Gt.raw=Gt.raw.substring(0,Gt.raw.length-zn),$n=$n.substring(0,Zr.index),Ie=$n,Tn=fn+1)),fn!==Tn-1){if(lr=this.rules.block.listItemStart.exec(_n[fn+1]),this.options.pedantic?lr[1].length>sr[1].length:lr[1].length>=sr[0].length||lr[1].length>3){_n.splice(fn,2,_n[fn]+(!this.options.pedantic&&lr[1].length<sr[0].length&&!_n[fn].match(/\n$/)?"":`
|
|
`)+_n[fn+1]),fn--,Tn--;continue}else(!this.options.pedantic||this.options.smartLists?lr[2][lr[2].length-1]!==Ue[Ue.length-1]:ke===(lr[2].length===1))&&(zn=_n.slice(fn+1).join(`
|
|
`).length,Gt.raw=Gt.raw.substring(0,Gt.raw.length-zn),fn=Tn-1);sr=lr}mr=$n.length,$n=$n.replace(/^ *([*+-]|\d+[.)]) ?/,""),~$n.indexOf(`
|
|
`)&&(mr-=$n.length,$n=this.options.pedantic?$n.replace(/^ {1,4}/gm,""):$n.replace(new RegExp("^ {1,"+mr+"}","gm"),"")),$n=re($n,`
|
|
`),fn!==Tn-1&&(Ie=Ie+`
|
|
`),Lr=wn||/\n\n(?!\s*$)/.test(Ie),fn!==Tn-1&&(wn=Ie.slice(-2)===`
|
|
|
|
`,Lr||(Lr=wn)),Lr&&(Gt.loose=!0),this.options.gfm&&(Sr=/^\[[ xX]\] /.test($n),xr=void 0,Sr&&(xr=$n[1]!==" ",$n=$n.replace(/^\[[ xX]\] +/,""))),Gt.items.push({type:"list_item",raw:Ie,task:Sr,checked:xr,loose:Lr,text:$n})}return Gt}},nt.html=function(ne){var me=this.rules.block.html.exec(ne);if(me)return{type:this.options.sanitize?"paragraph":"html",raw:me[0],pre:!this.options.sanitizer&&(me[1]==="pre"||me[1]==="script"||me[1]==="style"),text:this.options.sanitize?this.options.sanitizer?this.options.sanitizer(me[0]):C(me[0]):me[0]}},nt.def=function(ne){var me=this.rules.block.def.exec(ne);if(me){me[3]&&(me[3]=me[3].substring(1,me[3].length-1));var Ie=me[1].toLowerCase().replace(/\s+/g," ");return{type:"def",tag:Ie,raw:me[0],href:me[2],title:me[3]}}},nt.table=function(ne){var me=this.rules.block.table.exec(ne);if(me){var Ie={type:"table",header:E(me[1].replace(/^ *| *\| *$/g,"")),align:me[2].replace(/^ *|\| *$/g,"").split(/ *\| */),cells:me[3]?me[3].replace(/\n$/,"").split(`
|
|
`):[]};if(Ie.header.length===Ie.align.length){Ie.raw=me[0];var Ue=Ie.align.length,ke;for(ke=0;ke<Ue;ke++)/^ *-+: *$/.test(Ie.align[ke])?Ie.align[ke]="right":/^ *:-+: *$/.test(Ie.align[ke])?Ie.align[ke]="center":/^ *:-+ *$/.test(Ie.align[ke])?Ie.align[ke]="left":Ie.align[ke]=null;for(Ue=Ie.cells.length,ke=0;ke<Ue;ke++)Ie.cells[ke]=E(Ie.cells[ke].replace(/^ *\| *| *\| *$/g,""),Ie.header.length);return Ie}}},nt.lheading=function(ne){var me=this.rules.block.lheading.exec(ne);if(me)return{type:"heading",raw:me[0],depth:me[2].charAt(0)==="="?1:2,text:me[1]}},nt.paragraph=function(ne){var me=this.rules.block.paragraph.exec(ne);if(me)return{type:"paragraph",raw:me[0],text:me[1].charAt(me[1].length-1)===`
|
|
`?me[1].slice(0,-1):me[1]}},nt.text=function(ne){var me=this.rules.block.text.exec(ne);if(me)return{type:"text",raw:me[0],text:me[0]}},nt.escape=function(ne){var me=this.rules.inline.escape.exec(ne);if(me)return{type:"escape",raw:me[0],text:C(me[1])}},nt.tag=function(ne,me,Ie){var Ue=this.rules.inline.tag.exec(ne);if(Ue)return!me&&/^<a /i.test(Ue[0])?me=!0:me&&/^<\/a>/i.test(Ue[0])&&(me=!1),!Ie&&/^<(pre|code|kbd|script)(\s|>)/i.test(Ue[0])?Ie=!0:Ie&&/^<\/(pre|code|kbd|script)(\s|>)/i.test(Ue[0])&&(Ie=!1),{type:this.options.sanitize?"text":"html",raw:Ue[0],inLink:me,inRawBlock:Ie,text:this.options.sanitize?this.options.sanitizer?this.options.sanitizer(Ue[0]):C(Ue[0]):Ue[0]}},nt.link=function(ne){var me=this.rules.inline.link.exec(ne);if(me){var Ie=me[2].trim();if(!this.options.pedantic&&/^</.test(Ie)){if(!/>$/.test(Ie))return;var Ue=re(Ie.slice(0,-1),"\\");if((Ie.length-Ue.length)%2===0)return}else{var ke=W(me[2],"()");if(ke>-1){var Gt=me[0].indexOf("!")===0?5:4,_n=Gt+me[1].length+ke;me[2]=me[2].substring(0,ke),me[0]=me[0].substring(0,_n).trim(),me[3]=""}}var wn=me[2],$n="";if(this.options.pedantic){var mr=/^([^'"]*[^\s])\s+(['"])(.*)\2/.exec(wn);mr&&(wn=mr[1],$n=mr[3])}else $n=me[3]?me[3].slice(1,-1):"";return wn=wn.trim(),/^</.test(wn)&&(this.options.pedantic&&!/>$/.test(Ie)?wn=wn.slice(1):wn=wn.slice(1,-1)),be(me,{href:wn&&wn.replace(this.rules.inline._escapes,"$1"),title:$n&&$n.replace(this.rules.inline._escapes,"$1")},me[0])}},nt.reflink=function(ne,me){var Ie;if((Ie=this.rules.inline.reflink.exec(ne))||(Ie=this.rules.inline.nolink.exec(ne))){var Ue=(Ie[2]||Ie[1]).replace(/\s+/g," ");if(Ue=me[Ue.toLowerCase()],!Ue||!Ue.href){var ke=Ie[0].charAt(0);return{type:"text",raw:ke,text:ke}}return be(Ie,Ue,Ie[0])}},nt.emStrong=function(ne,me,Ie){Ie===void 0&&(Ie="");var Ue=this.rules.inline.emStrong.lDelim.exec(ne);if(Ue&&!(Ue[3]&&Ie.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 ke=Ue[1]||Ue[2]||"";if(!ke||ke&&(Ie===""||this.rules.inline.punctuation.exec(Ie))){var Gt=Ue[0].length-1,_n,wn,$n=Gt,mr=0,sr=Ue[0][0]==="*"?this.rules.inline.emStrong.rDelimAst:this.rules.inline.emStrong.rDelimUnd;for(sr.lastIndex=0,me=me.slice(-1*ne.length+Gt);(Ue=sr.exec(me))!=null;)if(_n=Ue[1]||Ue[2]||Ue[3]||Ue[4]||Ue[5]||Ue[6],!!_n){if(wn=_n.length,Ue[3]||Ue[4]){$n+=wn;continue}else if((Ue[5]||Ue[6])&&Gt%3&&!((Gt+wn)%3)){mr+=wn;continue}if($n-=wn,!($n>0))return wn=Math.min(wn,wn+$n+mr),Math.min(Gt,wn)%2?{type:"em",raw:ne.slice(0,Gt+Ue.index+wn+1),text:ne.slice(1,Gt+Ue.index+wn)}:{type:"strong",raw:ne.slice(0,Gt+Ue.index+wn+1),text:ne.slice(2,Gt+Ue.index+wn-1)}}}}},nt.codespan=function(ne){var me=this.rules.inline.code.exec(ne);if(me){var Ie=me[2].replace(/\n/g," "),Ue=/[^ ]/.test(Ie),ke=/^ /.test(Ie)&&/ $/.test(Ie);return Ue&&ke&&(Ie=Ie.substring(1,Ie.length-1)),Ie=C(Ie,!0),{type:"codespan",raw:me[0],text:Ie}}},nt.br=function(ne){var me=this.rules.inline.br.exec(ne);if(me)return{type:"br",raw:me[0]}},nt.del=function(ne){var me=this.rules.inline.del.exec(ne);if(me)return{type:"del",raw:me[0],text:me[2]}},nt.autolink=function(ne,me){var Ie=this.rules.inline.autolink.exec(ne);if(Ie){var Ue,ke;return Ie[2]==="@"?(Ue=C(this.options.mangle?me(Ie[1]):Ie[1]),ke="mailto:"+Ue):(Ue=C(Ie[1]),ke=Ue),{type:"link",raw:Ie[0],text:Ue,href:ke,tokens:[{type:"text",raw:Ue,text:Ue}]}}},nt.url=function(ne,me){var Ie;if(Ie=this.rules.inline.url.exec(ne)){var Ue,ke;if(Ie[2]==="@")Ue=C(this.options.mangle?me(Ie[0]):Ie[0]),ke="mailto:"+Ue;else{var Gt;do Gt=Ie[0],Ie[0]=this.rules.inline._backpedal.exec(Ie[0])[0];while(Gt!==Ie[0]);Ue=C(Ie[0]),Ie[1]==="www."?ke="http://"+Ue:ke=Ue}return{type:"link",raw:Ie[0],text:Ue,href:ke,tokens:[{type:"text",raw:Ue,text:Ue}]}}},nt.inlineText=function(ne,me,Ie){var Ue=this.rules.inline.text.exec(ne);if(Ue){var ke;return me?ke=this.options.sanitize?this.options.sanitizer?this.options.sanitizer(Ue[0]):C(Ue[0]):Ue[0]:ke=C(this.options.smartypants?Ie(Ue[0]):Ue[0]),{type:"text",raw:Ue[0],text:ke}}},ut}(),Ct=q.noopTest,Rt=q.edit,Vt=q.merge,rn={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:Ct,table:Ct,lheading:/^([^\n]+)\n {0,3}(=+|-+) *(?:\n+|$)/,_paragraph:/^([^\n]+(?:\n(?!hr|heading|lheading|blockquote|fences|list|html| +\n)[^\n]+)*)/,text:/^[^\n]+/};rn._label=/(?!\s*\])(?:\\[\[\]]|[^\[\]])+/,rn._title=/(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/,rn.def=Rt(rn.def).replace("label",rn._label).replace("title",rn._title).getRegex(),rn.bullet=/(?:[*+-]|\d{1,9}[.)])/,rn.item=/^( *)(bull) ?[^\n]*(?:\n(?! *bull ?)[^\n]*)*/,rn.item=Rt(rn.item,"gm").replace(/bull/g,rn.bullet).getRegex(),rn.listItemStart=Rt(/^( *)(bull) */).replace("bull",rn.bullet).getRegex(),rn.list=Rt(rn.list).replace(/bull/g,rn.bullet).replace("hr","\\n+(?=\\1?(?:(?:- *){3,}|(?:_ *){3,}|(?:\\* *){3,})(?:\\n+|$))").replace("def","\\n+(?="+rn.def.source+")").getRegex(),rn._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",rn._comment=/<!--(?!-?>)[\s\S]*?(?:-->|$)/,rn.html=Rt(rn.html,"i").replace("comment",rn._comment).replace("tag",rn._tag).replace("attribute",/ +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex(),rn.paragraph=Rt(rn._paragraph).replace("hr",rn.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",rn._tag).getRegex(),rn.blockquote=Rt(rn.blockquote).replace("paragraph",rn.paragraph).getRegex(),rn.normal=Vt({},rn),rn.gfm=Vt({},rn.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*|$)"}),rn.gfm.nptable=Rt(rn.gfm.nptable).replace("hr",rn.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",rn._tag).getRegex(),rn.gfm.table=Rt(rn.gfm.table).replace("hr",rn.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",rn._tag).getRegex(),rn.pedantic=Vt({},rn.normal,{html:Rt(`^ *(?:comment *(?:\\n|\\s*$)|<(tag)[\\s\\S]+?</\\1> *(?:\\n{2,}|\\s*$)|<tag(?:"[^"]*"|'[^']*'|\\s[^'"/>\\s]*)*?/?> *(?:\\n{2,}|\\s*$))`).replace("comment",rn._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:Ct,paragraph:Rt(rn.normal._paragraph).replace("hr",rn.hr).replace("heading",` *#{1,6} *[^
|
|
]`).replace("lheading",rn.lheading).replace("blockquote"," {0,3}>").replace("|fences","").replace("|list","").replace("|html","").getRegex()});var He={escape:/^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/,autolink:/^<(scheme:[^\s\x00-\x1f<>]*|email)>/,url:Ct,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:Ct,text:/^(`+|[^`])(?:(?= {2,}\n)|[\s\S]*?(?:(?=[\\<!\[`*_]|\b_|$)|[^ ](?= {2,}\n)))/,punctuation:/^([\spunctuation])/};He._punctuation="!\"#$%&'()+\\-.,/:;<=>?@\\[\\]`^{|}~",He.punctuation=Rt(He.punctuation).replace(/punctuation/g,He._punctuation).getRegex(),He.blockSkip=/\[[^\]]*?\]\([^\)]*?\)|`[^`]*?`|<[^>]*?>/g,He.escapedEmSt=/\\\*|\\_/g,He._comment=Rt(rn._comment).replace("(?:-->|$)","-->").getRegex(),He.emStrong.lDelim=Rt(He.emStrong.lDelim).replace(/punct/g,He._punctuation).getRegex(),He.emStrong.rDelimAst=Rt(He.emStrong.rDelimAst,"g").replace(/punct/g,He._punctuation).getRegex(),He.emStrong.rDelimUnd=Rt(He.emStrong.rDelimUnd,"g").replace(/punct/g,He._punctuation).getRegex(),He._escapes=/\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/g,He._scheme=/[a-zA-Z][a-zA-Z0-9+.-]{1,31}/,He._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])?)+(?![-_])/,He.autolink=Rt(He.autolink).replace("scheme",He._scheme).replace("email",He._email).getRegex(),He._attribute=/\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/,He.tag=Rt(He.tag).replace("comment",He._comment).replace("attribute",He._attribute).getRegex(),He._label=/(?:\[(?:\\.|[^\[\]\\])*\]|\\.|`[^`]*`|[^\[\]\\`])*?/,He._href=/<(?:\\.|[^\n<>\\])+>|[^\s\x00-\x1f]*/,He._title=/"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/,He.link=Rt(He.link).replace("label",He._label).replace("href",He._href).replace("title",He._title).getRegex(),He.reflink=Rt(He.reflink).replace("label",He._label).getRegex(),He.reflinkSearch=Rt(He.reflinkSearch,"g").replace("reflink",He.reflink).replace("nolink",He.nolink).getRegex(),He.normal=Vt({},He),He.pedantic=Vt({},He.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:Rt(/^!?\[(label)\]\((.*?)\)/).replace("label",He._label).getRegex(),reflink:Rt(/^!?\[(label)\]\s*\[([^\]]*)\]/).replace("label",He._label).getRegex()}),He.gfm=Vt({},He.normal,{escape:Rt(He.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.!#$%&'*+\/=?_`{\|}~-]+@)))/}),He.gfm.url=Rt(He.gfm.url,"i").replace("email",He.gfm._extended_email).getRegex(),He.breaks=Vt({},He.gfm,{br:Rt(He.br).replace("{2,}","*").getRegex(),text:Rt(He.gfm.text).replace("\\b_","\\b_| {2,}\\n").replace(/\{2,\}/g,"*").getRegex()});var ln={block:rn,inline:He},It=Ke,cn=ge.exports.defaults,xt=ln.block,ht=ln.inline,Oe=q.repeatString;function Fe(ut){return ut.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 j(ut){var nt="",ze,ne,me=ut.length;for(ze=0;ze<me;ze++)ne=ut.charCodeAt(ze),Math.random()>.5&&(ne="x"+ne.toString(16)),nt+="&#"+ne+";";return nt}var Ne=function(){function ut(ze){this.tokens=[],this.tokens.links=Object.create(null),this.options=ze||cn,this.options.tokenizer=this.options.tokenizer||new It,this.tokenizer=this.options.tokenizer,this.tokenizer.options=this.options;var ne={block:xt.normal,inline:ht.normal};this.options.pedantic?(ne.block=xt.pedantic,ne.inline=ht.pedantic):this.options.gfm&&(ne.block=xt.gfm,this.options.breaks?ne.inline=ht.breaks:ne.inline=ht.gfm),this.tokenizer.rules=ne}ut.lex=function(ne,me){var Ie=new ut(me);return Ie.lex(ne)},ut.lexInline=function(ne,me){var Ie=new ut(me);return Ie.inlineTokens(ne)};var nt=ut.prototype;return nt.lex=function(ne){return ne=ne.replace(/\r\n|\r/g,`
|
|
`).replace(/\t/g," "),this.blockTokens(ne,this.tokens,!0),this.inline(this.tokens),this.tokens},nt.blockTokens=function(ne,me,Ie){me===void 0&&(me=[]),Ie===void 0&&(Ie=!0),this.options.pedantic&&(ne=ne.replace(/^ +$/gm,""));for(var Ue,ke,Gt,_n;ne;){if(Ue=this.tokenizer.space(ne)){ne=ne.substring(Ue.raw.length),Ue.type&&me.push(Ue);continue}if(Ue=this.tokenizer.code(ne)){ne=ne.substring(Ue.raw.length),_n=me[me.length-1],_n&&_n.type==="paragraph"?(_n.raw+=`
|
|
`+Ue.raw,_n.text+=`
|
|
`+Ue.text):me.push(Ue);continue}if(Ue=this.tokenizer.fences(ne)){ne=ne.substring(Ue.raw.length),me.push(Ue);continue}if(Ue=this.tokenizer.heading(ne)){ne=ne.substring(Ue.raw.length),me.push(Ue);continue}if(Ue=this.tokenizer.nptable(ne)){ne=ne.substring(Ue.raw.length),me.push(Ue);continue}if(Ue=this.tokenizer.hr(ne)){ne=ne.substring(Ue.raw.length),me.push(Ue);continue}if(Ue=this.tokenizer.blockquote(ne)){ne=ne.substring(Ue.raw.length),Ue.tokens=this.blockTokens(Ue.text,[],Ie),me.push(Ue);continue}if(Ue=this.tokenizer.list(ne)){for(ne=ne.substring(Ue.raw.length),Gt=Ue.items.length,ke=0;ke<Gt;ke++)Ue.items[ke].tokens=this.blockTokens(Ue.items[ke].text,[],!1);me.push(Ue);continue}if(Ue=this.tokenizer.html(ne)){ne=ne.substring(Ue.raw.length),me.push(Ue);continue}if(Ie&&(Ue=this.tokenizer.def(ne))){ne=ne.substring(Ue.raw.length),this.tokens.links[Ue.tag]||(this.tokens.links[Ue.tag]={href:Ue.href,title:Ue.title});continue}if(Ue=this.tokenizer.table(ne)){ne=ne.substring(Ue.raw.length),me.push(Ue);continue}if(Ue=this.tokenizer.lheading(ne)){ne=ne.substring(Ue.raw.length),me.push(Ue);continue}if(Ie&&(Ue=this.tokenizer.paragraph(ne))){ne=ne.substring(Ue.raw.length),me.push(Ue);continue}if(Ue=this.tokenizer.text(ne)){ne=ne.substring(Ue.raw.length),_n=me[me.length-1],_n&&_n.type==="text"?(_n.raw+=`
|
|
`+Ue.raw,_n.text+=`
|
|
`+Ue.text):me.push(Ue);continue}if(ne){var wn="Infinite loop on byte: "+ne.charCodeAt(0);if(this.options.silent){console.error(wn);break}else throw new Error(wn)}}return me},nt.inline=function(ne){var me,Ie,Ue,ke,Gt,_n,wn=ne.length;for(me=0;me<wn;me++)switch(_n=ne[me],_n.type){case"paragraph":case"text":case"heading":{_n.tokens=[],this.inlineTokens(_n.text,_n.tokens);break}case"table":{for(_n.tokens={header:[],cells:[]},ke=_n.header.length,Ie=0;Ie<ke;Ie++)_n.tokens.header[Ie]=[],this.inlineTokens(_n.header[Ie],_n.tokens.header[Ie]);for(ke=_n.cells.length,Ie=0;Ie<ke;Ie++)for(Gt=_n.cells[Ie],_n.tokens.cells[Ie]=[],Ue=0;Ue<Gt.length;Ue++)_n.tokens.cells[Ie][Ue]=[],this.inlineTokens(Gt[Ue],_n.tokens.cells[Ie][Ue]);break}case"blockquote":{this.inline(_n.tokens);break}case"list":{for(ke=_n.items.length,Ie=0;Ie<ke;Ie++)this.inline(_n.items[Ie].tokens);break}}return ne},nt.inlineTokens=function(ne,me,Ie,Ue){me===void 0&&(me=[]),Ie===void 0&&(Ie=!1),Ue===void 0&&(Ue=!1);var ke,Gt,_n=ne,wn,$n,mr;if(this.tokens.links){var sr=Object.keys(this.tokens.links);if(sr.length>0)for(;(wn=this.tokenizer.rules.inline.reflinkSearch.exec(_n))!=null;)sr.includes(wn[0].slice(wn[0].lastIndexOf("[")+1,-1))&&(_n=_n.slice(0,wn.index)+"["+Oe("a",wn[0].length-2)+"]"+_n.slice(this.tokenizer.rules.inline.reflinkSearch.lastIndex))}for(;(wn=this.tokenizer.rules.inline.blockSkip.exec(_n))!=null;)_n=_n.slice(0,wn.index)+"["+Oe("a",wn[0].length-2)+"]"+_n.slice(this.tokenizer.rules.inline.blockSkip.lastIndex);for(;(wn=this.tokenizer.rules.inline.escapedEmSt.exec(_n))!=null;)_n=_n.slice(0,wn.index)+"++"+_n.slice(this.tokenizer.rules.inline.escapedEmSt.lastIndex);for(;ne;){if($n||(mr=""),$n=!1,ke=this.tokenizer.escape(ne)){ne=ne.substring(ke.raw.length),me.push(ke);continue}if(ke=this.tokenizer.tag(ne,Ie,Ue)){ne=ne.substring(ke.raw.length),Ie=ke.inLink,Ue=ke.inRawBlock;var lr=me[me.length-1];lr&&ke.type==="text"&&lr.type==="text"?(lr.raw+=ke.raw,lr.text+=ke.text):me.push(ke);continue}if(ke=this.tokenizer.link(ne)){ne=ne.substring(ke.raw.length),ke.type==="link"&&(ke.tokens=this.inlineTokens(ke.text,[],!0,Ue)),me.push(ke);continue}if(ke=this.tokenizer.reflink(ne,this.tokens.links)){ne=ne.substring(ke.raw.length);var zn=me[me.length-1];ke.type==="link"?(ke.tokens=this.inlineTokens(ke.text,[],!0,Ue),me.push(ke)):zn&&ke.type==="text"&&zn.type==="text"?(zn.raw+=ke.raw,zn.text+=ke.text):me.push(ke);continue}if(ke=this.tokenizer.emStrong(ne,_n,mr)){ne=ne.substring(ke.raw.length),ke.tokens=this.inlineTokens(ke.text,[],Ie,Ue),me.push(ke);continue}if(ke=this.tokenizer.codespan(ne)){ne=ne.substring(ke.raw.length),me.push(ke);continue}if(ke=this.tokenizer.br(ne)){ne=ne.substring(ke.raw.length),me.push(ke);continue}if(ke=this.tokenizer.del(ne)){ne=ne.substring(ke.raw.length),ke.tokens=this.inlineTokens(ke.text,[],Ie,Ue),me.push(ke);continue}if(ke=this.tokenizer.autolink(ne,j)){ne=ne.substring(ke.raw.length),me.push(ke);continue}if(!Ie&&(ke=this.tokenizer.url(ne,j))){ne=ne.substring(ke.raw.length),me.push(ke);continue}if(ke=this.tokenizer.inlineText(ne,Ue,Fe)){ne=ne.substring(ke.raw.length),ke.raw.slice(-1)!=="_"&&(mr=ke.raw.slice(-1)),$n=!0,Gt=me[me.length-1],Gt&&Gt.type==="text"?(Gt.raw+=ke.raw,Gt.text+=ke.text):me.push(ke);continue}if(ne){var Lr="Infinite loop on byte: "+ne.charCodeAt(0);if(this.options.silent){console.error(Lr);break}else throw new Error(Lr)}}return me},x(ut,null,[{key:"rules",get:function(){return{block:xt,inline:ht}}}]),ut}(),Ze=ge.exports.defaults,ee=q.cleanUrl,O=q.escape,ue=function(){function ut(ze){this.options=ze||Ze}var nt=ut.prototype;return nt.code=function(ne,me,Ie){var Ue=(me||"").match(/\S*/)[0];if(this.options.highlight){var ke=this.options.highlight(ne,Ue);ke!=null&&ke!==ne&&(Ie=!0,ne=ke)}return ne=ne.replace(/\n$/,"")+`
|
|
`,Ue?'<pre><code class="'+this.options.langPrefix+O(Ue,!0)+'">'+(Ie?ne:O(ne,!0))+`</code></pre>
|
|
`:"<pre><code>"+(Ie?ne:O(ne,!0))+`</code></pre>
|
|
`},nt.blockquote=function(ne){return`<blockquote>
|
|
`+ne+`</blockquote>
|
|
`},nt.html=function(ne){return ne},nt.heading=function(ne,me,Ie,Ue){return this.options.headerIds?"<h"+me+' id="'+this.options.headerPrefix+Ue.slug(Ie)+'">'+ne+"</h"+me+`>
|
|
`:"<h"+me+">"+ne+"</h"+me+`>
|
|
`},nt.hr=function(){return this.options.xhtml?`<hr/>
|
|
`:`<hr>
|
|
`},nt.list=function(ne,me,Ie){var Ue=me?"ol":"ul",ke=me&&Ie!==1?' start="'+Ie+'"':"";return"<"+Ue+ke+`>
|
|
`+ne+"</"+Ue+`>
|
|
`},nt.listitem=function(ne){return"<li>"+ne+`</li>
|
|
`},nt.checkbox=function(ne){return"<input "+(ne?'checked="" ':"")+'disabled="" type="checkbox"'+(this.options.xhtml?" /":"")+"> "},nt.paragraph=function(ne){return"<p>"+ne+`</p>
|
|
`},nt.table=function(ne,me){return me&&(me="<tbody>"+me+"</tbody>"),`<table>
|
|
<thead>
|
|
`+ne+`</thead>
|
|
`+me+`</table>
|
|
`},nt.tablerow=function(ne){return`<tr>
|
|
`+ne+`</tr>
|
|
`},nt.tablecell=function(ne,me){var Ie=me.header?"th":"td",Ue=me.align?"<"+Ie+' align="'+me.align+'">':"<"+Ie+">";return Ue+ne+"</"+Ie+`>
|
|
`},nt.strong=function(ne){return"<strong>"+ne+"</strong>"},nt.em=function(ne){return"<em>"+ne+"</em>"},nt.codespan=function(ne){return"<code>"+ne+"</code>"},nt.br=function(){return this.options.xhtml?"<br/>":"<br>"},nt.del=function(ne){return"<del>"+ne+"</del>"},nt.link=function(ne,me,Ie){if(ne=ee(this.options.sanitize,this.options.baseUrl,ne),ne===null)return Ie;var Ue='<a href="'+O(ne)+'"';return me&&(Ue+=' title="'+me+'"'),Ue+=">"+Ie+"</a>",Ue},nt.image=function(ne,me,Ie){if(ne=ee(this.options.sanitize,this.options.baseUrl,ne),ne===null)return Ie;var Ue='<img src="'+ne+'" alt="'+Ie+'"';return me&&(Ue+=' title="'+me+'"'),Ue+=this.options.xhtml?"/>":">",Ue},nt.text=function(ne){return ne},ut}(),De=function(){function ut(){}var nt=ut.prototype;return nt.strong=function(ne){return ne},nt.em=function(ne){return ne},nt.codespan=function(ne){return ne},nt.del=function(ne){return ne},nt.html=function(ne){return ne},nt.text=function(ne){return ne},nt.link=function(ne,me,Ie){return""+Ie},nt.image=function(ne,me,Ie){return""+Ie},nt.br=function(){return""},ut}(),Ae=function(){function ut(){this.seen={}}var nt=ut.prototype;return nt.serialize=function(ne){return ne.toLowerCase().trim().replace(/<[!\/a-z].*?>/ig,"").replace(/[\u2000-\u206F\u2E00-\u2E7F\\'!"#$%&()*+,./:;<=>?@[\]^`{|}~]/g,"").replace(/\s/g,"-")},nt.getNextSafeSlug=function(ne,me){var Ie=ne,Ue=0;if(this.seen.hasOwnProperty(Ie)){Ue=this.seen[ne];do Ue++,Ie=ne+"-"+Ue;while(this.seen.hasOwnProperty(Ie))}return me||(this.seen[ne]=Ue,this.seen[Ie]=0),Ie},nt.slug=function(ne,me){me===void 0&&(me={});var Ie=this.serialize(ne);return this.getNextSafeSlug(Ie,me.dryrun)},ut}(),Be=ue,Se=De,ot=Ae,Xe=ge.exports.defaults,je=q.unescape,qe=function(){function ut(ze){this.options=ze||Xe,this.options.renderer=this.options.renderer||new Be,this.renderer=this.options.renderer,this.renderer.options=this.options,this.textRenderer=new Se,this.slugger=new ot}ut.parse=function(ne,me){var Ie=new ut(me);return Ie.parse(ne)},ut.parseInline=function(ne,me){var Ie=new ut(me);return Ie.parseInline(ne)};var nt=ut.prototype;return nt.parse=function(ne,me){me===void 0&&(me=!0);var Ie="",Ue,ke,Gt,_n,wn,$n,mr,sr,lr,zn,Lr,Sr,xr,Zr,Tn,fn,Zn,vr,Hr=ne.length;for(Ue=0;Ue<Hr;Ue++)switch(zn=ne[Ue],zn.type){case"space":continue;case"hr":{Ie+=this.renderer.hr();continue}case"heading":{Ie+=this.renderer.heading(this.parseInline(zn.tokens),zn.depth,je(this.parseInline(zn.tokens,this.textRenderer)),this.slugger);continue}case"code":{Ie+=this.renderer.code(zn.text,zn.lang,zn.escaped);continue}case"table":{for(sr="",mr="",_n=zn.header.length,ke=0;ke<_n;ke++)mr+=this.renderer.tablecell(this.parseInline(zn.tokens.header[ke]),{header:!0,align:zn.align[ke]});for(sr+=this.renderer.tablerow(mr),lr="",_n=zn.cells.length,ke=0;ke<_n;ke++){for($n=zn.tokens.cells[ke],mr="",wn=$n.length,Gt=0;Gt<wn;Gt++)mr+=this.renderer.tablecell(this.parseInline($n[Gt]),{header:!1,align:zn.align[Gt]});lr+=this.renderer.tablerow(mr)}Ie+=this.renderer.table(sr,lr);continue}case"blockquote":{lr=this.parse(zn.tokens),Ie+=this.renderer.blockquote(lr);continue}case"list":{for(Lr=zn.ordered,Sr=zn.start,xr=zn.loose,_n=zn.items.length,lr="",ke=0;ke<_n;ke++)Tn=zn.items[ke],fn=Tn.checked,Zn=Tn.task,Zr="",Tn.task&&(vr=this.renderer.checkbox(fn),xr?Tn.tokens.length>0&&Tn.tokens[0].type==="text"?(Tn.tokens[0].text=vr+" "+Tn.tokens[0].text,Tn.tokens[0].tokens&&Tn.tokens[0].tokens.length>0&&Tn.tokens[0].tokens[0].type==="text"&&(Tn.tokens[0].tokens[0].text=vr+" "+Tn.tokens[0].tokens[0].text)):Tn.tokens.unshift({type:"text",text:vr}):Zr+=vr),Zr+=this.parse(Tn.tokens,xr),lr+=this.renderer.listitem(Zr,Zn,fn);Ie+=this.renderer.list(lr,Lr,Sr);continue}case"html":{Ie+=this.renderer.html(zn.text);continue}case"paragraph":{Ie+=this.renderer.paragraph(this.parseInline(zn.tokens));continue}case"text":{for(lr=zn.tokens?this.parseInline(zn.tokens):zn.text;Ue+1<Hr&&ne[Ue+1].type==="text";)zn=ne[++Ue],lr+=`
|
|
`+(zn.tokens?this.parseInline(zn.tokens):zn.text);Ie+=me?this.renderer.paragraph(lr):lr;continue}default:{var it='Token with "'+zn.type+'" type was not found.';if(this.options.silent){console.error(it);return}else throw new Error(it)}}return Ie},nt.parseInline=function(ne,me){me=me||this.renderer;var Ie="",Ue,ke,Gt=ne.length;for(Ue=0;Ue<Gt;Ue++)switch(ke=ne[Ue],ke.type){case"escape":{Ie+=me.text(ke.text);break}case"html":{Ie+=me.html(ke.text);break}case"link":{Ie+=me.link(ke.href,ke.title,this.parseInline(ke.tokens,me));break}case"image":{Ie+=me.image(ke.href,ke.title,ke.text);break}case"strong":{Ie+=me.strong(this.parseInline(ke.tokens,me));break}case"em":{Ie+=me.em(this.parseInline(ke.tokens,me));break}case"codespan":{Ie+=me.codespan(ke.text);break}case"br":{Ie+=me.br();break}case"del":{Ie+=me.del(this.parseInline(ke.tokens,me));break}case"text":{Ie+=me.text(ke.text);break}default:{var _n='Token with "'+ke.type+'" type was not found.';if(this.options.silent){console.error(_n);return}else throw new Error(_n)}}return Ie},ut}(),kt=Ne,gt=qe,_t=Ke,Pe=ue,Wt=De,St=Ae,vt=q.merge,dn=q.checkSanitizeDeprecation,hn=q.escape,Ot=ge.exports.getDefaults,Ln=ge.exports.changeDefaults,qn=ge.exports.defaults;function sn(ut,nt,ze){if(typeof ut=="undefined"||ut===null)throw new Error("marked(): input parameter is undefined or null");if(typeof ut!="string")throw new Error("marked(): input parameter is of type "+Object.prototype.toString.call(ut)+", string expected");if(typeof nt=="function"&&(ze=nt,nt=null),nt=vt({},sn.defaults,nt||{}),dn(nt),ze){var ne=nt.highlight,me;try{me=kt.lex(ut,nt)}catch(Gt){return ze(Gt)}var Ie=function(_n){var wn;if(!_n)try{nt.walkTokens&&sn.walkTokens(me,nt.walkTokens),wn=gt.parse(me,nt)}catch($n){_n=$n}return nt.highlight=ne,_n?ze(_n):ze(null,wn)};if(!ne||ne.length<3||(delete nt.highlight,!me.length))return Ie();var Ue=0;sn.walkTokens(me,function(Gt){Gt.type==="code"&&(Ue++,setTimeout(function(){ne(Gt.text,Gt.lang,function(_n,wn){if(_n)return Ie(_n);wn!=null&&wn!==Gt.text&&(Gt.text=wn,Gt.escaped=!0),Ue--,Ue===0&&Ie()})},0))}),Ue===0&&Ie();return}try{var ke=kt.lex(ut,nt);return nt.walkTokens&&sn.walkTokens(ke,nt.walkTokens),gt.parse(ke,nt)}catch(Gt){if(Gt.message+=`
|
|
Please report this to https://github.com/markedjs/marked.`,nt.silent)return"<p>An error occurred:</p><pre>"+hn(Gt.message+"",!0)+"</pre>";throw Gt}}sn.options=sn.setOptions=function(ut){return vt(sn.defaults,ut),Ln(sn.defaults),sn},sn.getDefaults=Ot,sn.defaults=qn,sn.use=function(ut){var nt=vt({},ut);if(ut.renderer&&function(){var ne=sn.defaults.renderer||new Pe,me=function(ke){var Gt=ne[ke];ne[ke]=function(){for(var _n=arguments.length,wn=new Array(_n),$n=0;$n<_n;$n++)wn[$n]=arguments[$n];var mr=ut.renderer[ke].apply(ne,wn);return mr===!1&&(mr=Gt.apply(ne,wn)),mr}};for(var Ie in ut.renderer)me(Ie);nt.renderer=ne}(),ut.tokenizer&&function(){var ne=sn.defaults.tokenizer||new _t,me=function(ke){var Gt=ne[ke];ne[ke]=function(){for(var _n=arguments.length,wn=new Array(_n),$n=0;$n<_n;$n++)wn[$n]=arguments[$n];var mr=ut.tokenizer[ke].apply(ne,wn);return mr===!1&&(mr=Gt.apply(ne,wn)),mr}};for(var Ie in ut.tokenizer)me(Ie);nt.tokenizer=ne}(),ut.walkTokens){var ze=sn.defaults.walkTokens;nt.walkTokens=function(ne){ut.walkTokens(ne),ze&&ze(ne)}}sn.setOptions(nt)},sn.walkTokens=function(ut,nt){for(var ze=Ce(ut),ne;!(ne=ze()).done;){var me=ne.value;switch(nt(me),me.type){case"table":{for(var Ie=Ce(me.tokens.header),Ue;!(Ue=Ie()).done;){var ke=Ue.value;sn.walkTokens(ke,nt)}for(var Gt=Ce(me.tokens.cells),_n;!(_n=Gt()).done;)for(var wn=_n.value,$n=Ce(wn),mr;!(mr=$n()).done;){var sr=mr.value;sn.walkTokens(sr,nt)}break}case"list":{sn.walkTokens(me.items,nt);break}default:me.tokens&&sn.walkTokens(me.tokens,nt)}}},sn.parseInline=function(ut,nt){if(typeof ut=="undefined"||ut===null)throw new Error("marked.parseInline(): input parameter is undefined or null");if(typeof ut!="string")throw new Error("marked.parseInline(): input parameter is of type "+Object.prototype.toString.call(ut)+", string expected");nt=vt({},sn.defaults,nt||{}),dn(nt);try{var ze=kt.lexInline(ut,nt);return nt.walkTokens&&sn.walkTokens(ze,nt.walkTokens),gt.parseInline(ze,nt)}catch(ne){if(ne.message+=`
|
|
Please report this to https://github.com/markedjs/marked.`,nt.silent)return"<p>An error occurred:</p><pre>"+hn(ne.message+"",!0)+"</pre>";throw ne}},sn.Parser=gt,sn.parser=gt.parse,sn.Renderer=Pe,sn.TextRenderer=Wt,sn.Lexer=kt,sn.lexer=kt.lex,sn.Tokenizer=_t,sn.Slugger=St,sn.parse=sn;var Mn=sn;return Mn})},11690:function(Vn){const ct=/[&<>"']/,x=/[&<>"']/g,V=/[<>"']|&(?!#?\w+;)/,fe=/[<>"']|&(?!#?\w+;)/g,Ce={"&":"&","<":"<",">":">",'"':""","'":"'"},ge=ie=>Ce[ie];function G(ie,ae){if(ae){if(ct.test(ie))return ie.replace(x,ge)}else if(V.test(ie))return ie.replace(fe,ge);return ie}const g=/&(#(?:\d+)|(?:#x[0-9A-Fa-f]+)|(?:\w+));?/ig;function ye(ie){return ie.replace(g,(ae,we)=>(we=we.toLowerCase(),we==="colon"?":":we.charAt(0)==="#"?we.charAt(1)==="x"?String.fromCharCode(parseInt(we.substring(2),16)):String.fromCharCode(+we.substring(1)):""))}const le=/(^|[^\[])\^/g;function o(ie,ae){ie=ie.source||ie,ae=ae||"";const we={replace:(Te,Re)=>(Re=Re.source||Re,Re=Re.replace(le,"$1"),ie=ie.replace(Te,Re),we),getRegex:()=>new RegExp(ie,ae)};return we}const S=/[^\w:]/g,U=/^$|^[a-z][a-z0-9+.-]*:|^[?#]/i;function _(ie,ae,we){if(ie){let Te;try{Te=decodeURIComponent(ye(we)).replace(S,"").toLowerCase()}catch(Re){return null}if(Te.indexOf("javascript:")===0||Te.indexOf("vbscript:")===0||Te.indexOf("data:")===0)return null}ae&&!U.test(we)&&(we=H(ae,we));try{we=encodeURI(we).replace(/%25/g,"%")}catch(Te){return null}return we}const w={},b=/^[^:]+:\/*[^/]*$/,R=/^([^:]+:)[\s\S]*$/,M=/^([^:]+:\/*[^/]*)[\s\S]*$/;function H(ie,ae){w[" "+ie]||(b.test(ie)?w[" "+ie]=ie+"/":w[" "+ie]=P(ie,"/",!0)),ie=w[" "+ie];const we=ie.indexOf(":")===-1;return ae.substring(0,2)==="//"?we?ae:ie.replace(R,"$1")+ae:ae.charAt(0)==="/"?we?ae:ie.replace(M,"$1")+ae:ie+ae}const J={exec:function(){}};function T(ie){let ae=1,we,Te;for(;ae<arguments.length;ae++){we=arguments[ae];for(Te in we)Object.prototype.hasOwnProperty.call(we,Te)&&(ie[Te]=we[Te])}return ie}function N(ie,ae){const we=ie.replace(/\|/g,(Y,$,te)=>{let q=!1,he=$;for(;--he>=0&&te[he]==="\\";)q=!q;return q?"|":" |"}),Te=we.split(/ \|/);let Re=0;if(Te.length>ae)Te.splice(ae);else for(;Te.length<ae;)Te.push("");for(;Re<Te.length;Re++)Te[Re]=Te[Re].trim().replace(/\\\|/g,"|");return Te}function P(ie,ae,we){const Te=ie.length;if(Te===0)return"";let Re=0;for(;Re<Te;){const Y=ie.charAt(Te-Re-1);if(Y===ae&&!we)Re++;else if(Y!==ae&&we)Re++;else break}return ie.substr(0,Te-Re)}function k(ie,ae){if(ie.indexOf(ae[1])===-1)return-1;const we=ie.length;let Te=0,Re=0;for(;Re<we;Re++)if(ie[Re]==="\\")Re++;else if(ie[Re]===ae[0])Te++;else if(ie[Re]===ae[1]&&(Te--,Te<0))return Re;return-1}function oe(ie){ie&&ie.sanitize&&!ie.silent&&console.warn("marked(): sanitize and sanitizer parameters are deprecated since version 0.7.0, should not be used and will be removed in the future. Read more here: https://marked.js.org/#/USING_ADVANCED.md#options")}function de(ie,ae){if(ae<1)return"";let we="";for(;ae>1;)ae&1&&(we+=ie),ae>>=1,ie+=ie;return we+ie}Vn.exports={escape:G,unescape:ye,edit:o,cleanUrl:_,resolveUrl:H,noopTest:J,merge:T,splitCells:N,rtrim:P,findClosingBracket:k,checkSanitizeDeprecation:oe,repeatString:de}},75918:function(Vn,ct,x){"use strict";x.d(ct,{Wi:function(){return g},Z0:function(){return ye},aU:function(){return G},eZ:function(){return o},wY:function(){return le}});var V=x(4348),fe=x(69323),Ce=x(13268),ge=function(S,U,_,w){function b(R){return R instanceof _?R:new _(function(M){M(R)})}return new(_||(_=Promise))(function(R,M){function H(N){try{T(w.next(N))}catch(P){M(P)}}function J(N){try{T(w.throw(N))}catch(P){M(P)}}function T(N){N.done?R(N.value):b(N.value).then(H,J)}T((w=w.apply(S,U||[])).next())})};class G extends fe.JT{constructor(U,_="",w="",b=!0,R){super(),this._onDidChange=this._register(new V.Q5),this.onDidChange=this._onDidChange.event,this._enabled=!0,this._id=U,this._label=_,this._cssClass=w,this._enabled=b,this._actionCallback=R}get id(){return this._id}get label(){return this._label}set label(U){this._setLabel(U)}_setLabel(U){this._label!==U&&(this._label=U,this._onDidChange.fire({label:U}))}get tooltip(){return this._tooltip||""}set tooltip(U){this._setTooltip(U)}_setTooltip(U){this._tooltip!==U&&(this._tooltip=U,this._onDidChange.fire({tooltip:U}))}get class(){return this._cssClass}set class(U){this._setClass(U)}_setClass(U){this._cssClass!==U&&(this._cssClass=U,this._onDidChange.fire({class:U}))}get enabled(){return this._enabled}set enabled(U){this._setEnabled(U)}_setEnabled(U){this._enabled!==U&&(this._enabled=U,this._onDidChange.fire({enabled:U}))}get checked(){return this._checked}set checked(U){this._setChecked(U)}_setChecked(U){this._checked!==U&&(this._checked=U,this._onDidChange.fire({checked:U}))}run(U,_){return ge(this,void 0,void 0,function*(){this._actionCallback&&(yield this._actionCallback(U))})}}class g extends fe.JT{constructor(){super(...arguments),this._onBeforeRun=this._register(new V.Q5),this.onBeforeRun=this._onBeforeRun.event,this._onDidRun=this._register(new V.Q5),this.onDidRun=this._onDidRun.event}run(U,_){return ge(this,void 0,void 0,function*(){if(!U.enabled)return;this._onBeforeRun.fire({action:U});let w;try{yield this.runAction(U,_)}catch(b){w=b}this._onDidRun.fire({action:U,error:w})})}runAction(U,_){return ge(this,void 0,void 0,function*(){yield U.run(_)})}}class ye extends G{constructor(U){super(ye.ID,U,U?"separator text":"separator"),this.checked=!1,this.enabled=!1}}ye.ID="vs.actions.separator";class le{constructor(U,_,w,b){this.tooltip="",this.enabled=!0,this.checked=!1,this.id=U,this.label=_,this.class=b,this._actions=w}get actions(){return this._actions}dispose(){}run(){return ge(this,void 0,void 0,function*(){})}}class o extends G{constructor(){super(o.ID,Ce.N("submenu.empty","(empty)"),void 0,!1)}}o.ID="vs.actions.empty"},76068:function(Vn,ct,x){"use strict";x.d(ct,{ok:function(){return V}});function V(fe,Ce){if(!fe)throw new Error(Ce?`Assertion failed (${Ce})`:"Assertion Failed")}},52615:function(Vn,ct,x){"use strict";x.d(ct,{CM:function(){return G},JL:function(){return g},dT:function(){return le},fK:function(){return ge},lA:function(){return ye}});var V=x(4348);class fe{constructor(){this._icons=new Map,this._onDidRegister=new V.Q5}add(S){const U=this._icons.get(S.id);U?S.description?U.description=S.description:console.error(`Duplicate registration of codicon ${S.id}`):(this._icons.set(S.id,S),this._onDidRegister.fire(S))}get(S){return this._icons.get(S)}get all(){return this._icons.values()}get onDidRegister(){return this._onDidRegister.event}}const Ce=new fe,ge=Ce;function G(o,S){return new ye(o,S)}function g(o){return o?o.replace(/\$\((.*?)\)/g,(S,U)=>` ${U} `).trim():""}class ye{constructor(S,U,_){this.id=S,this.definition=U,this.description=_,Ce.add(this)}get classNames(){return"codicon codicon-"+this.id}get classNamesArray(){return["codicon","codicon-"+this.id]}get cssSelector(){return".codicon.codicon-"+this.id}}var le;(function(o){o.iconNameSegment="[A-Za-z0-9]+",o.iconNameExpression="[A-Za-z0-9\\-]+",o.iconModifierExpression="~[A-Za-z]+";const S=new RegExp(`^(${o.iconNameExpression})(${o.iconModifierExpression})?$`);function U(b){if(b instanceof ye)return["codicon","codicon-"+b.id];const R=S.exec(b.id);if(!R)return U(ye.error);let[,M,H]=R;const J=["codicon","codicon-"+M];return H&&J.push("codicon-modifier-"+H.substr(1)),J}o.asClassNameArray=U;function _(b){return U(b).join(" ")}o.asClassName=_;function w(b){return"."+U(b).join(".")}o.asCSSSelector=w})(le||(le={})),function(o){o.add=new o("add",{fontCharacter:"\\ea60"}),o.plus=new o("plus",o.add.definition),o.gistNew=new o("gist-new",o.add.definition),o.repoCreate=new o("repo-create",o.add.definition),o.lightbulb=new o("lightbulb",{fontCharacter:"\\ea61"}),o.lightBulb=new o("light-bulb",{fontCharacter:"\\ea61"}),o.repo=new o("repo",{fontCharacter:"\\ea62"}),o.repoDelete=new o("repo-delete",{fontCharacter:"\\ea62"}),o.gistFork=new o("gist-fork",{fontCharacter:"\\ea63"}),o.repoForked=new o("repo-forked",{fontCharacter:"\\ea63"}),o.gitPullRequest=new o("git-pull-request",{fontCharacter:"\\ea64"}),o.gitPullRequestAbandoned=new o("git-pull-request-abandoned",{fontCharacter:"\\ea64"}),o.recordKeys=new o("record-keys",{fontCharacter:"\\ea65"}),o.keyboard=new o("keyboard",{fontCharacter:"\\ea65"}),o.tag=new o("tag",{fontCharacter:"\\ea66"}),o.tagAdd=new o("tag-add",{fontCharacter:"\\ea66"}),o.tagRemove=new o("tag-remove",{fontCharacter:"\\ea66"}),o.person=new o("person",{fontCharacter:"\\ea67"}),o.personFollow=new o("person-follow",{fontCharacter:"\\ea67"}),o.personOutline=new o("person-outline",{fontCharacter:"\\ea67"}),o.personFilled=new o("person-filled",{fontCharacter:"\\ea67"}),o.gitBranch=new o("git-branch",{fontCharacter:"\\ea68"}),o.gitBranchCreate=new o("git-branch-create",{fontCharacter:"\\ea68"}),o.gitBranchDelete=new o("git-branch-delete",{fontCharacter:"\\ea68"}),o.sourceControl=new o("source-control",{fontCharacter:"\\ea68"}),o.mirror=new o("mirror",{fontCharacter:"\\ea69"}),o.mirrorPublic=new o("mirror-public",{fontCharacter:"\\ea69"}),o.star=new o("star",{fontCharacter:"\\ea6a"}),o.starAdd=new o("star-add",{fontCharacter:"\\ea6a"}),o.starDelete=new o("star-delete",{fontCharacter:"\\ea6a"}),o.starEmpty=new o("star-empty",{fontCharacter:"\\ea6a"}),o.comment=new o("comment",{fontCharacter:"\\ea6b"}),o.commentAdd=new o("comment-add",{fontCharacter:"\\ea6b"}),o.alert=new o("alert",{fontCharacter:"\\ea6c"}),o.warning=new o("warning",{fontCharacter:"\\ea6c"}),o.search=new o("search",{fontCharacter:"\\ea6d"}),o.searchSave=new o("search-save",{fontCharacter:"\\ea6d"}),o.logOut=new o("log-out",{fontCharacter:"\\ea6e"}),o.signOut=new o("sign-out",{fontCharacter:"\\ea6e"}),o.logIn=new o("log-in",{fontCharacter:"\\ea6f"}),o.signIn=new o("sign-in",{fontCharacter:"\\ea6f"}),o.eye=new o("eye",{fontCharacter:"\\ea70"}),o.eyeUnwatch=new o("eye-unwatch",{fontCharacter:"\\ea70"}),o.eyeWatch=new o("eye-watch",{fontCharacter:"\\ea70"}),o.circleFilled=new o("circle-filled",{fontCharacter:"\\ea71"}),o.primitiveDot=new o("primitive-dot",{fontCharacter:"\\ea71"}),o.closeDirty=new o("close-dirty",{fontCharacter:"\\ea71"}),o.debugBreakpoint=new o("debug-breakpoint",{fontCharacter:"\\ea71"}),o.debugBreakpointDisabled=new o("debug-breakpoint-disabled",{fontCharacter:"\\ea71"}),o.debugHint=new o("debug-hint",{fontCharacter:"\\ea71"}),o.primitiveSquare=new o("primitive-square",{fontCharacter:"\\ea72"}),o.edit=new o("edit",{fontCharacter:"\\ea73"}),o.pencil=new o("pencil",{fontCharacter:"\\ea73"}),o.info=new o("info",{fontCharacter:"\\ea74"}),o.issueOpened=new o("issue-opened",{fontCharacter:"\\ea74"}),o.gistPrivate=new o("gist-private",{fontCharacter:"\\ea75"}),o.gitForkPrivate=new o("git-fork-private",{fontCharacter:"\\ea75"}),o.lock=new o("lock",{fontCharacter:"\\ea75"}),o.mirrorPrivate=new o("mirror-private",{fontCharacter:"\\ea75"}),o.close=new o("close",{fontCharacter:"\\ea76"}),o.removeClose=new o("remove-close",{fontCharacter:"\\ea76"}),o.x=new o("x",{fontCharacter:"\\ea76"}),o.repoSync=new o("repo-sync",{fontCharacter:"\\ea77"}),o.sync=new o("sync",{fontCharacter:"\\ea77"}),o.clone=new o("clone",{fontCharacter:"\\ea78"}),o.desktopDownload=new o("desktop-download",{fontCharacter:"\\ea78"}),o.beaker=new o("beaker",{fontCharacter:"\\ea79"}),o.microscope=new o("microscope",{fontCharacter:"\\ea79"}),o.vm=new o("vm",{fontCharacter:"\\ea7a"}),o.deviceDesktop=new o("device-desktop",{fontCharacter:"\\ea7a"}),o.file=new o("file",{fontCharacter:"\\ea7b"}),o.fileText=new o("file-text",{fontCharacter:"\\ea7b"}),o.more=new o("more",{fontCharacter:"\\ea7c"}),o.ellipsis=new o("ellipsis",{fontCharacter:"\\ea7c"}),o.kebabHorizontal=new o("kebab-horizontal",{fontCharacter:"\\ea7c"}),o.mailReply=new o("mail-reply",{fontCharacter:"\\ea7d"}),o.reply=new o("reply",{fontCharacter:"\\ea7d"}),o.organization=new o("organization",{fontCharacter:"\\ea7e"}),o.organizationFilled=new o("organization-filled",{fontCharacter:"\\ea7e"}),o.organizationOutline=new o("organization-outline",{fontCharacter:"\\ea7e"}),o.newFile=new o("new-file",{fontCharacter:"\\ea7f"}),o.fileAdd=new o("file-add",{fontCharacter:"\\ea7f"}),o.newFolder=new o("new-folder",{fontCharacter:"\\ea80"}),o.fileDirectoryCreate=new o("file-directory-create",{fontCharacter:"\\ea80"}),o.trash=new o("trash",{fontCharacter:"\\ea81"}),o.trashcan=new o("trashcan",{fontCharacter:"\\ea81"}),o.history=new o("history",{fontCharacter:"\\ea82"}),o.clock=new o("clock",{fontCharacter:"\\ea82"}),o.folder=new o("folder",{fontCharacter:"\\ea83"}),o.fileDirectory=new o("file-directory",{fontCharacter:"\\ea83"}),o.symbolFolder=new o("symbol-folder",{fontCharacter:"\\ea83"}),o.logoGithub=new o("logo-github",{fontCharacter:"\\ea84"}),o.markGithub=new o("mark-github",{fontCharacter:"\\ea84"}),o.github=new o("github",{fontCharacter:"\\ea84"}),o.terminal=new o("terminal",{fontCharacter:"\\ea85"}),o.console=new o("console",{fontCharacter:"\\ea85"}),o.repl=new o("repl",{fontCharacter:"\\ea85"}),o.zap=new o("zap",{fontCharacter:"\\ea86"}),o.symbolEvent=new o("symbol-event",{fontCharacter:"\\ea86"}),o.error=new o("error",{fontCharacter:"\\ea87"}),o.stop=new o("stop",{fontCharacter:"\\ea87"}),o.variable=new o("variable",{fontCharacter:"\\ea88"}),o.symbolVariable=new o("symbol-variable",{fontCharacter:"\\ea88"}),o.array=new o("array",{fontCharacter:"\\ea8a"}),o.symbolArray=new o("symbol-array",{fontCharacter:"\\ea8a"}),o.symbolModule=new o("symbol-module",{fontCharacter:"\\ea8b"}),o.symbolPackage=new o("symbol-package",{fontCharacter:"\\ea8b"}),o.symbolNamespace=new o("symbol-namespace",{fontCharacter:"\\ea8b"}),o.symbolObject=new o("symbol-object",{fontCharacter:"\\ea8b"}),o.symbolMethod=new o("symbol-method",{fontCharacter:"\\ea8c"}),o.symbolFunction=new o("symbol-function",{fontCharacter:"\\ea8c"}),o.symbolConstructor=new o("symbol-constructor",{fontCharacter:"\\ea8c"}),o.symbolBoolean=new o("symbol-boolean",{fontCharacter:"\\ea8f"}),o.symbolNull=new o("symbol-null",{fontCharacter:"\\ea8f"}),o.symbolNumeric=new o("symbol-numeric",{fontCharacter:"\\ea90"}),o.symbolNumber=new o("symbol-number",{fontCharacter:"\\ea90"}),o.symbolStructure=new o("symbol-structure",{fontCharacter:"\\ea91"}),o.symbolStruct=new o("symbol-struct",{fontCharacter:"\\ea91"}),o.symbolParameter=new o("symbol-parameter",{fontCharacter:"\\ea92"}),o.symbolTypeParameter=new o("symbol-type-parameter",{fontCharacter:"\\ea92"}),o.symbolKey=new o("symbol-key",{fontCharacter:"\\ea93"}),o.symbolText=new o("symbol-text",{fontCharacter:"\\ea93"}),o.symbolReference=new o("symbol-reference",{fontCharacter:"\\ea94"}),o.goToFile=new o("go-to-file",{fontCharacter:"\\ea94"}),o.symbolEnum=new o("symbol-enum",{fontCharacter:"\\ea95"}),o.symbolValue=new o("symbol-value",{fontCharacter:"\\ea95"}),o.symbolRuler=new o("symbol-ruler",{fontCharacter:"\\ea96"}),o.symbolUnit=new o("symbol-unit",{fontCharacter:"\\ea96"}),o.activateBreakpoints=new o("activate-breakpoints",{fontCharacter:"\\ea97"}),o.archive=new o("archive",{fontCharacter:"\\ea98"}),o.arrowBoth=new o("arrow-both",{fontCharacter:"\\ea99"}),o.arrowDown=new o("arrow-down",{fontCharacter:"\\ea9a"}),o.arrowLeft=new o("arrow-left",{fontCharacter:"\\ea9b"}),o.arrowRight=new o("arrow-right",{fontCharacter:"\\ea9c"}),o.arrowSmallDown=new o("arrow-small-down",{fontCharacter:"\\ea9d"}),o.arrowSmallLeft=new o("arrow-small-left",{fontCharacter:"\\ea9e"}),o.arrowSmallRight=new o("arrow-small-right",{fontCharacter:"\\ea9f"}),o.arrowSmallUp=new o("arrow-small-up",{fontCharacter:"\\eaa0"}),o.arrowUp=new o("arrow-up",{fontCharacter:"\\eaa1"}),o.bell=new o("bell",{fontCharacter:"\\eaa2"}),o.bold=new o("bold",{fontCharacter:"\\eaa3"}),o.book=new o("book",{fontCharacter:"\\eaa4"}),o.bookmark=new o("bookmark",{fontCharacter:"\\eaa5"}),o.debugBreakpointConditionalUnverified=new o("debug-breakpoint-conditional-unverified",{fontCharacter:"\\eaa6"}),o.debugBreakpointConditional=new o("debug-breakpoint-conditional",{fontCharacter:"\\eaa7"}),o.debugBreakpointConditionalDisabled=new o("debug-breakpoint-conditional-disabled",{fontCharacter:"\\eaa7"}),o.debugBreakpointDataUnverified=new o("debug-breakpoint-data-unverified",{fontCharacter:"\\eaa8"}),o.debugBreakpointData=new o("debug-breakpoint-data",{fontCharacter:"\\eaa9"}),o.debugBreakpointDataDisabled=new o("debug-breakpoint-data-disabled",{fontCharacter:"\\eaa9"}),o.debugBreakpointLogUnverified=new o("debug-breakpoint-log-unverified",{fontCharacter:"\\eaaa"}),o.debugBreakpointLog=new o("debug-breakpoint-log",{fontCharacter:"\\eaab"}),o.debugBreakpointLogDisabled=new o("debug-breakpoint-log-disabled",{fontCharacter:"\\eaab"}),o.briefcase=new o("briefcase",{fontCharacter:"\\eaac"}),o.broadcast=new o("broadcast",{fontCharacter:"\\eaad"}),o.browser=new o("browser",{fontCharacter:"\\eaae"}),o.bug=new o("bug",{fontCharacter:"\\eaaf"}),o.calendar=new o("calendar",{fontCharacter:"\\eab0"}),o.caseSensitive=new o("case-sensitive",{fontCharacter:"\\eab1"}),o.check=new o("check",{fontCharacter:"\\eab2"}),o.checklist=new o("checklist",{fontCharacter:"\\eab3"}),o.chevronDown=new o("chevron-down",{fontCharacter:"\\eab4"}),o.dropDownButton=new o("drop-down-button",o.chevronDown.definition),o.chevronLeft=new o("chevron-left",{fontCharacter:"\\eab5"}),o.chevronRight=new o("chevron-right",{fontCharacter:"\\eab6"}),o.chevronUp=new o("chevron-up",{fontCharacter:"\\eab7"}),o.chromeClose=new o("chrome-close",{fontCharacter:"\\eab8"}),o.chromeMaximize=new o("chrome-maximize",{fontCharacter:"\\eab9"}),o.chromeMinimize=new o("chrome-minimize",{fontCharacter:"\\eaba"}),o.chromeRestore=new o("chrome-restore",{fontCharacter:"\\eabb"}),o.circleOutline=new o("circle-outline",{fontCharacter:"\\eabc"}),o.debugBreakpointUnverified=new o("debug-breakpoint-unverified",{fontCharacter:"\\eabc"}),o.circleSlash=new o("circle-slash",{fontCharacter:"\\eabd"}),o.circuitBoard=new o("circuit-board",{fontCharacter:"\\eabe"}),o.clearAll=new o("clear-all",{fontCharacter:"\\eabf"}),o.clippy=new o("clippy",{fontCharacter:"\\eac0"}),o.closeAll=new o("close-all",{fontCharacter:"\\eac1"}),o.cloudDownload=new o("cloud-download",{fontCharacter:"\\eac2"}),o.cloudUpload=new o("cloud-upload",{fontCharacter:"\\eac3"}),o.code=new o("code",{fontCharacter:"\\eac4"}),o.collapseAll=new o("collapse-all",{fontCharacter:"\\eac5"}),o.colorMode=new o("color-mode",{fontCharacter:"\\eac6"}),o.commentDiscussion=new o("comment-discussion",{fontCharacter:"\\eac7"}),o.compareChanges=new o("compare-changes",{fontCharacter:"\\eafd"}),o.creditCard=new o("credit-card",{fontCharacter:"\\eac9"}),o.dash=new o("dash",{fontCharacter:"\\eacc"}),o.dashboard=new o("dashboard",{fontCharacter:"\\eacd"}),o.database=new o("database",{fontCharacter:"\\eace"}),o.debugContinue=new o("debug-continue",{fontCharacter:"\\eacf"}),o.debugDisconnect=new o("debug-disconnect",{fontCharacter:"\\ead0"}),o.debugPause=new o("debug-pause",{fontCharacter:"\\ead1"}),o.debugRestart=new o("debug-restart",{fontCharacter:"\\ead2"}),o.debugStart=new o("debug-start",{fontCharacter:"\\ead3"}),o.debugStepInto=new o("debug-step-into",{fontCharacter:"\\ead4"}),o.debugStepOut=new o("debug-step-out",{fontCharacter:"\\ead5"}),o.debugStepOver=new o("debug-step-over",{fontCharacter:"\\ead6"}),o.debugStop=new o("debug-stop",{fontCharacter:"\\ead7"}),o.debug=new o("debug",{fontCharacter:"\\ead8"}),o.deviceCameraVideo=new o("device-camera-video",{fontCharacter:"\\ead9"}),o.deviceCamera=new o("device-camera",{fontCharacter:"\\eada"}),o.deviceMobile=new o("device-mobile",{fontCharacter:"\\eadb"}),o.diffAdded=new o("diff-added",{fontCharacter:"\\eadc"}),o.diffIgnored=new o("diff-ignored",{fontCharacter:"\\eadd"}),o.diffModified=new o("diff-modified",{fontCharacter:"\\eade"}),o.diffRemoved=new o("diff-removed",{fontCharacter:"\\eadf"}),o.diffRenamed=new o("diff-renamed",{fontCharacter:"\\eae0"}),o.diff=new o("diff",{fontCharacter:"\\eae1"}),o.discard=new o("discard",{fontCharacter:"\\eae2"}),o.editorLayout=new o("editor-layout",{fontCharacter:"\\eae3"}),o.emptyWindow=new o("empty-window",{fontCharacter:"\\eae4"}),o.exclude=new o("exclude",{fontCharacter:"\\eae5"}),o.extensions=new o("extensions",{fontCharacter:"\\eae6"}),o.eyeClosed=new o("eye-closed",{fontCharacter:"\\eae7"}),o.fileBinary=new o("file-binary",{fontCharacter:"\\eae8"}),o.fileCode=new o("file-code",{fontCharacter:"\\eae9"}),o.fileMedia=new o("file-media",{fontCharacter:"\\eaea"}),o.filePdf=new o("file-pdf",{fontCharacter:"\\eaeb"}),o.fileSubmodule=new o("file-submodule",{fontCharacter:"\\eaec"}),o.fileSymlinkDirectory=new o("file-symlink-directory",{fontCharacter:"\\eaed"}),o.fileSymlinkFile=new o("file-symlink-file",{fontCharacter:"\\eaee"}),o.fileZip=new o("file-zip",{fontCharacter:"\\eaef"}),o.files=new o("files",{fontCharacter:"\\eaf0"}),o.filter=new o("filter",{fontCharacter:"\\eaf1"}),o.flame=new o("flame",{fontCharacter:"\\eaf2"}),o.foldDown=new o("fold-down",{fontCharacter:"\\eaf3"}),o.foldUp=new o("fold-up",{fontCharacter:"\\eaf4"}),o.fold=new o("fold",{fontCharacter:"\\eaf5"}),o.folderActive=new o("folder-active",{fontCharacter:"\\eaf6"}),o.folderOpened=new o("folder-opened",{fontCharacter:"\\eaf7"}),o.gear=new o("gear",{fontCharacter:"\\eaf8"}),o.gift=new o("gift",{fontCharacter:"\\eaf9"}),o.gistSecret=new o("gist-secret",{fontCharacter:"\\eafa"}),o.gist=new o("gist",{fontCharacter:"\\eafb"}),o.gitCommit=new o("git-commit",{fontCharacter:"\\eafc"}),o.gitCompare=new o("git-compare",{fontCharacter:"\\eafd"}),o.gitMerge=new o("git-merge",{fontCharacter:"\\eafe"}),o.githubAction=new o("github-action",{fontCharacter:"\\eaff"}),o.githubAlt=new o("github-alt",{fontCharacter:"\\eb00"}),o.globe=new o("globe",{fontCharacter:"\\eb01"}),o.grabber=new o("grabber",{fontCharacter:"\\eb02"}),o.graph=new o("graph",{fontCharacter:"\\eb03"}),o.gripper=new o("gripper",{fontCharacter:"\\eb04"}),o.heart=new o("heart",{fontCharacter:"\\eb05"}),o.home=new o("home",{fontCharacter:"\\eb06"}),o.horizontalRule=new o("horizontal-rule",{fontCharacter:"\\eb07"}),o.hubot=new o("hubot",{fontCharacter:"\\eb08"}),o.inbox=new o("inbox",{fontCharacter:"\\eb09"}),o.issueClosed=new o("issue-closed",{fontCharacter:"\\eba4"}),o.issueReopened=new o("issue-reopened",{fontCharacter:"\\eb0b"}),o.issues=new o("issues",{fontCharacter:"\\eb0c"}),o.italic=new o("italic",{fontCharacter:"\\eb0d"}),o.jersey=new o("jersey",{fontCharacter:"\\eb0e"}),o.json=new o("json",{fontCharacter:"\\eb0f"}),o.kebabVertical=new o("kebab-vertical",{fontCharacter:"\\eb10"}),o.key=new o("key",{fontCharacter:"\\eb11"}),o.law=new o("law",{fontCharacter:"\\eb12"}),o.lightbulbAutofix=new o("lightbulb-autofix",{fontCharacter:"\\eb13"}),o.linkExternal=new o("link-external",{fontCharacter:"\\eb14"}),o.link=new o("link",{fontCharacter:"\\eb15"}),o.listOrdered=new o("list-ordered",{fontCharacter:"\\eb16"}),o.listUnordered=new o("list-unordered",{fontCharacter:"\\eb17"}),o.liveShare=new o("live-share",{fontCharacter:"\\eb18"}),o.loading=new o("loading",{fontCharacter:"\\eb19"}),o.location=new o("location",{fontCharacter:"\\eb1a"}),o.mailRead=new o("mail-read",{fontCharacter:"\\eb1b"}),o.mail=new o("mail",{fontCharacter:"\\eb1c"}),o.markdown=new o("markdown",{fontCharacter:"\\eb1d"}),o.megaphone=new o("megaphone",{fontCharacter:"\\eb1e"}),o.mention=new o("mention",{fontCharacter:"\\eb1f"}),o.milestone=new o("milestone",{fontCharacter:"\\eb20"}),o.mortarBoard=new o("mortar-board",{fontCharacter:"\\eb21"}),o.move=new o("move",{fontCharacter:"\\eb22"}),o.multipleWindows=new o("multiple-windows",{fontCharacter:"\\eb23"}),o.mute=new o("mute",{fontCharacter:"\\eb24"}),o.noNewline=new o("no-newline",{fontCharacter:"\\eb25"}),o.note=new o("note",{fontCharacter:"\\eb26"}),o.octoface=new o("octoface",{fontCharacter:"\\eb27"}),o.openPreview=new o("open-preview",{fontCharacter:"\\eb28"}),o.package_=new o("package",{fontCharacter:"\\eb29"}),o.paintcan=new o("paintcan",{fontCharacter:"\\eb2a"}),o.pin=new o("pin",{fontCharacter:"\\eb2b"}),o.play=new o("play",{fontCharacter:"\\eb2c"}),o.run=new o("run",{fontCharacter:"\\eb2c"}),o.plug=new o("plug",{fontCharacter:"\\eb2d"}),o.preserveCase=new o("preserve-case",{fontCharacter:"\\eb2e"}),o.preview=new o("preview",{fontCharacter:"\\eb2f"}),o.project=new o("project",{fontCharacter:"\\eb30"}),o.pulse=new o("pulse",{fontCharacter:"\\eb31"}),o.question=new o("question",{fontCharacter:"\\eb32"}),o.quote=new o("quote",{fontCharacter:"\\eb33"}),o.radioTower=new o("radio-tower",{fontCharacter:"\\eb34"}),o.reactions=new o("reactions",{fontCharacter:"\\eb35"}),o.references=new o("references",{fontCharacter:"\\eb36"}),o.refresh=new o("refresh",{fontCharacter:"\\eb37"}),o.regex=new o("regex",{fontCharacter:"\\eb38"}),o.remoteExplorer=new o("remote-explorer",{fontCharacter:"\\eb39"}),o.remote=new o("remote",{fontCharacter:"\\eb3a"}),o.remove=new o("remove",{fontCharacter:"\\eb3b"}),o.replaceAll=new o("replace-all",{fontCharacter:"\\eb3c"}),o.replace=new o("replace",{fontCharacter:"\\eb3d"}),o.repoClone=new o("repo-clone",{fontCharacter:"\\eb3e"}),o.repoForcePush=new o("repo-force-push",{fontCharacter:"\\eb3f"}),o.repoPull=new o("repo-pull",{fontCharacter:"\\eb40"}),o.repoPush=new o("repo-push",{fontCharacter:"\\eb41"}),o.report=new o("report",{fontCharacter:"\\eb42"}),o.requestChanges=new o("request-changes",{fontCharacter:"\\eb43"}),o.rocket=new o("rocket",{fontCharacter:"\\eb44"}),o.rootFolderOpened=new o("root-folder-opened",{fontCharacter:"\\eb45"}),o.rootFolder=new o("root-folder",{fontCharacter:"\\eb46"}),o.rss=new o("rss",{fontCharacter:"\\eb47"}),o.ruby=new o("ruby",{fontCharacter:"\\eb48"}),o.saveAll=new o("save-all",{fontCharacter:"\\eb49"}),o.saveAs=new o("save-as",{fontCharacter:"\\eb4a"}),o.save=new o("save",{fontCharacter:"\\eb4b"}),o.screenFull=new o("screen-full",{fontCharacter:"\\eb4c"}),o.screenNormal=new o("screen-normal",{fontCharacter:"\\eb4d"}),o.searchStop=new o("search-stop",{fontCharacter:"\\eb4e"}),o.server=new o("server",{fontCharacter:"\\eb50"}),o.settingsGear=new o("settings-gear",{fontCharacter:"\\eb51"}),o.settings=new o("settings",{fontCharacter:"\\eb52"}),o.shield=new o("shield",{fontCharacter:"\\eb53"}),o.smiley=new o("smiley",{fontCharacter:"\\eb54"}),o.sortPrecedence=new o("sort-precedence",{fontCharacter:"\\eb55"}),o.splitHorizontal=new o("split-horizontal",{fontCharacter:"\\eb56"}),o.splitVertical=new o("split-vertical",{fontCharacter:"\\eb57"}),o.squirrel=new o("squirrel",{fontCharacter:"\\eb58"}),o.starFull=new o("star-full",{fontCharacter:"\\eb59"}),o.starHalf=new o("star-half",{fontCharacter:"\\eb5a"}),o.symbolClass=new o("symbol-class",{fontCharacter:"\\eb5b"}),o.symbolColor=new o("symbol-color",{fontCharacter:"\\eb5c"}),o.symbolConstant=new o("symbol-constant",{fontCharacter:"\\eb5d"}),o.symbolEnumMember=new o("symbol-enum-member",{fontCharacter:"\\eb5e"}),o.symbolField=new o("symbol-field",{fontCharacter:"\\eb5f"}),o.symbolFile=new o("symbol-file",{fontCharacter:"\\eb60"}),o.symbolInterface=new o("symbol-interface",{fontCharacter:"\\eb61"}),o.symbolKeyword=new o("symbol-keyword",{fontCharacter:"\\eb62"}),o.symbolMisc=new o("symbol-misc",{fontCharacter:"\\eb63"}),o.symbolOperator=new o("symbol-operator",{fontCharacter:"\\eb64"}),o.symbolProperty=new o("symbol-property",{fontCharacter:"\\eb65"}),o.wrench=new o("wrench",{fontCharacter:"\\eb65"}),o.wrenchSubaction=new o("wrench-subaction",{fontCharacter:"\\eb65"}),o.symbolSnippet=new o("symbol-snippet",{fontCharacter:"\\eb66"}),o.tasklist=new o("tasklist",{fontCharacter:"\\eb67"}),o.telescope=new o("telescope",{fontCharacter:"\\eb68"}),o.textSize=new o("text-size",{fontCharacter:"\\eb69"}),o.threeBars=new o("three-bars",{fontCharacter:"\\eb6a"}),o.thumbsdown=new o("thumbsdown",{fontCharacter:"\\eb6b"}),o.thumbsup=new o("thumbsup",{fontCharacter:"\\eb6c"}),o.tools=new o("tools",{fontCharacter:"\\eb6d"}),o.triangleDown=new o("triangle-down",{fontCharacter:"\\eb6e"}),o.triangleLeft=new o("triangle-left",{fontCharacter:"\\eb6f"}),o.triangleRight=new o("triangle-right",{fontCharacter:"\\eb70"}),o.triangleUp=new o("triangle-up",{fontCharacter:"\\eb71"}),o.twitter=new o("twitter",{fontCharacter:"\\eb72"}),o.unfold=new o("unfold",{fontCharacter:"\\eb73"}),o.unlock=new o("unlock",{fontCharacter:"\\eb74"}),o.unmute=new o("unmute",{fontCharacter:"\\eb75"}),o.unverified=new o("unverified",{fontCharacter:"\\eb76"}),o.verified=new o("verified",{fontCharacter:"\\eb77"}),o.versions=new o("versions",{fontCharacter:"\\eb78"}),o.vmActive=new o("vm-active",{fontCharacter:"\\eb79"}),o.vmOutline=new o("vm-outline",{fontCharacter:"\\eb7a"}),o.vmRunning=new o("vm-running",{fontCharacter:"\\eb7b"}),o.watch=new o("watch",{fontCharacter:"\\eb7c"}),o.whitespace=new o("whitespace",{fontCharacter:"\\eb7d"}),o.wholeWord=new o("whole-word",{fontCharacter:"\\eb7e"}),o.window=new o("window",{fontCharacter:"\\eb7f"}),o.wordWrap=new o("word-wrap",{fontCharacter:"\\eb80"}),o.zoomIn=new o("zoom-in",{fontCharacter:"\\eb81"}),o.zoomOut=new o("zoom-out",{fontCharacter:"\\eb82"}),o.listFilter=new o("list-filter",{fontCharacter:"\\eb83"}),o.listFlat=new o("list-flat",{fontCharacter:"\\eb84"}),o.listSelection=new o("list-selection",{fontCharacter:"\\eb85"}),o.selection=new o("selection",{fontCharacter:"\\eb85"}),o.listTree=new o("list-tree",{fontCharacter:"\\eb86"}),o.debugBreakpointFunctionUnverified=new o("debug-breakpoint-function-unverified",{fontCharacter:"\\eb87"}),o.debugBreakpointFunction=new o("debug-breakpoint-function",{fontCharacter:"\\eb88"}),o.debugBreakpointFunctionDisabled=new o("debug-breakpoint-function-disabled",{fontCharacter:"\\eb88"}),o.debugStackframeActive=new o("debug-stackframe-active",{fontCharacter:"\\eb89"}),o.debugStackframeDot=new o("debug-stackframe-dot",{fontCharacter:"\\eb8a"}),o.debugStackframe=new o("debug-stackframe",{fontCharacter:"\\eb8b"}),o.debugStackframeFocused=new o("debug-stackframe-focused",{fontCharacter:"\\eb8b"}),o.debugBreakpointUnsupported=new o("debug-breakpoint-unsupported",{fontCharacter:"\\eb8c"}),o.symbolString=new o("symbol-string",{fontCharacter:"\\eb8d"}),o.debugReverseContinue=new o("debug-reverse-continue",{fontCharacter:"\\eb8e"}),o.debugStepBack=new o("debug-step-back",{fontCharacter:"\\eb8f"}),o.debugRestartFrame=new o("debug-restart-frame",{fontCharacter:"\\eb90"}),o.callIncoming=new o("call-incoming",{fontCharacter:"\\eb92"}),o.callOutgoing=new o("call-outgoing",{fontCharacter:"\\eb93"}),o.menu=new o("menu",{fontCharacter:"\\eb94"}),o.expandAll=new o("expand-all",{fontCharacter:"\\eb95"}),o.feedback=new o("feedback",{fontCharacter:"\\eb96"}),o.groupByRefType=new o("group-by-ref-type",{fontCharacter:"\\eb97"}),o.ungroupByRefType=new o("ungroup-by-ref-type",{fontCharacter:"\\eb98"}),o.account=new o("account",{fontCharacter:"\\eb99"}),o.bellDot=new o("bell-dot",{fontCharacter:"\\eb9a"}),o.debugConsole=new o("debug-console",{fontCharacter:"\\eb9b"}),o.library=new o("library",{fontCharacter:"\\eb9c"}),o.output=new o("output",{fontCharacter:"\\eb9d"}),o.runAll=new o("run-all",{fontCharacter:"\\eb9e"}),o.syncIgnored=new o("sync-ignored",{fontCharacter:"\\eb9f"}),o.pinned=new o("pinned",{fontCharacter:"\\eba0"}),o.githubInverted=new o("github-inverted",{fontCharacter:"\\eba1"}),o.debugAlt=new o("debug-alt",{fontCharacter:"\\eb91"}),o.serverProcess=new o("server-process",{fontCharacter:"\\eba2"}),o.serverEnvironment=new o("server-environment",{fontCharacter:"\\eba3"}),o.pass=new o("pass",{fontCharacter:"\\eba4"}),o.stopCircle=new o("stop-circle",{fontCharacter:"\\eba5"}),o.playCircle=new o("play-circle",{fontCharacter:"\\eba6"}),o.record=new o("record",{fontCharacter:"\\eba7"}),o.debugAltSmall=new o("debug-alt-small",{fontCharacter:"\\eba8"}),o.vmConnect=new o("vm-connect",{fontCharacter:"\\eba9"}),o.cloud=new o("cloud",{fontCharacter:"\\ebaa"}),o.merge=new o("merge",{fontCharacter:"\\ebab"}),o.exportIcon=new o("export",{fontCharacter:"\\ebac"}),o.graphLeft=new o("graph-left",{fontCharacter:"\\ebad"}),o.magnet=new o("magnet",{fontCharacter:"\\ebae"}),o.notebook=new o("notebook",{fontCharacter:"\\ebaf"}),o.redo=new o("redo",{fontCharacter:"\\ebb0"}),o.checkAll=new o("check-all",{fontCharacter:"\\ebb1"}),o.pinnedDirty=new o("pinned-dirty",{fontCharacter:"\\ebb2"}),o.passFilled=new o("pass-filled",{fontCharacter:"\\ebb3"}),o.circleLargeFilled=new o("circle-large-filled",{fontCharacter:"\\ebb4"}),o.circleLargeOutline=new o("circle-large-outline",{fontCharacter:"\\ebb5"}),o.combine=new o("combine",{fontCharacter:"\\ebb6"}),o.gather=new o("gather",{fontCharacter:"\\ebb6"}),o.table=new o("table",{fontCharacter:"\\ebb7"}),o.variableGroup=new o("variable-group",{fontCharacter:"\\ebb8"}),o.typeHierarchy=new o("type-hierarchy",{fontCharacter:"\\ebb9"}),o.typeHierarchySub=new o("type-hierarchy-sub",{fontCharacter:"\\ebba"}),o.typeHierarchySuper=new o("type-hierarchy-super",{fontCharacter:"\\ebbb"}),o.gitPullRequestCreate=new o("git-pull-request-create",{fontCharacter:"\\ebbc"}),o.runAbove=new o("run-above",{fontCharacter:"\\ebbd"}),o.runBelow=new o("run-below",{fontCharacter:"\\ebbe"}),o.notebookTemplate=new o("notebook-template",{fontCharacter:"\\ebbf"}),o.debugRerun=new o("debug-rerun",{fontCharacter:"\\ebc0"}),o.workspaceTrusted=new o("workspace-trusted",{fontCharacter:"\\ebc1"}),o.workspaceUntrusted=new o("workspace-untrusted",{fontCharacter:"\\ebc2"}),o.workspaceUnspecified=new o("workspace-unspecified",{fontCharacter:"\\ebc3"}),o.terminalCmd=new o("terminal-cmd",{fontCharacter:"\\ebc4"}),o.terminalDebian=new o("terminal-debian",{fontCharacter:"\\ebc5"}),o.terminalLinux=new o("terminal-linux",{fontCharacter:"\\ebc6"}),o.terminalPowershell=new o("terminal-powershell",{fontCharacter:"\\ebc7"}),o.terminalTmux=new o("terminal-tmux",{fontCharacter:"\\ebc8"}),o.terminalUbuntu=new o("terminal-ubuntu",{fontCharacter:"\\ebc9"}),o.terminalBash=new o("terminal-bash",{fontCharacter:"\\ebca"}),o.arrowSwap=new o("arrow-swap",{fontCharacter:"\\ebcb"}),o.copy=new o("copy",{fontCharacter:"\\ebcc"}),o.personAdd=new o("person-add",{fontCharacter:"\\ebcd"}),o.filterFilled=new o("filter-filled",{fontCharacter:"\\ebce"}),o.wand=new o("wand",{fontCharacter:"\\ebcf"}),o.debugLineByLine=new o("debug-line-by-line",{fontCharacter:"\\ebd0"}),o.inspect=new o("inspect",{fontCharacter:"\\ebd1"}),o.layers=new o("layers",{fontCharacter:"\\ebd2"}),o.layersDot=new o("layers-dot",{fontCharacter:"\\ebd3"}),o.layersActive=new o("layers-active",{fontCharacter:"\\ebd4"}),o.compass=new o("compass",{fontCharacter:"\\ebd5"}),o.compassDot=new o("compass-dot",{fontCharacter:"\\ebd6"}),o.compassActive=new o("compass-active",{fontCharacter:"\\ebd7"}),o.azure=new o("azure",{fontCharacter:"\\ebd8"}),o.issueDraft=new o("issue-draft",{fontCharacter:"\\ebd9"}),o.gitPullRequestClosed=new o("git-pull-request-closed",{fontCharacter:"\\ebda"}),o.gitPullRequestDraft=new o("git-pull-request-draft",{fontCharacter:"\\ebdb"}),o.debugAll=new o("debug-all",{fontCharacter:"\\ebdc"}),o.debugCoverage=new o("debug-coverage",{fontCharacter:"\\ebdd"}),o.runErrors=new o("run-errors",{fontCharacter:"\\ebde"}),o.folderLibrary=new o("folder-library",{fontCharacter:"\\ebdf"}),o.debugContinueSmall=new o("debug-continue-small",{fontCharacter:"\\ebe0"}),o.beakerStop=new o("beaker-stop",{fontCharacter:"\\ebe1"}),o.graphLine=new o("graph-line",{fontCharacter:"\\ebe2"}),o.graphScatter=new o("graph-scatter",{fontCharacter:"\\ebe3"}),o.pieChart=new o("pie-chart",{fontCharacter:"\\ebe4"}),o.bracket=new o("bracket",o.json.definition),o.bracketDot=new o("bracket-dot",{fontCharacter:"\\ebe5"}),o.bracketError=new o("bracket-error",{fontCharacter:"\\ebe6"}),o.lockSmall=new o("lock-small",{fontCharacter:"\\ebe7"}),o.azureDevops=new o("azure-devops",{fontCharacter:"\\ebe8"}),o.verifiedFilled=new o("verified-filled",{fontCharacter:"\\ebe9"})}(ye||(ye={}))},79881:function(Vn,ct,x){"use strict";x.d(ct,{B8:function(){return U},Cp:function(){return ge},F0:function(){return le},L6:function(){return S},VV:function(){return ye},b1:function(){return o},dL:function(){return Ce},ri:function(){return G}});class V{constructor(){this.listeners=[],this.unexpectedErrorHandler=function(w){setTimeout(()=>{throw w.stack?new Error(w.message+`
|
|
|
|
`+w.stack):w},0)}}emit(w){this.listeners.forEach(b=>{b(w)})}onUnexpectedError(w){this.unexpectedErrorHandler(w),this.emit(w)}onUnexpectedExternalError(w){this.unexpectedErrorHandler(w)}}const fe=new V;function Ce(_){ye(_)||fe.onUnexpectedError(_)}function ge(_){ye(_)||fe.onUnexpectedExternalError(_)}function G(_){if(_ instanceof Error){let{name:w,message:b}=_;const R=_.stacktrace||_.stack;return{$isError:!0,name:w,message:b,stack:R}}return _}const g="Canceled";function ye(_){return _ instanceof Error&&_.name===g&&_.message===g}function le(){const _=new Error(g);return _.name=_.message,_}function o(_){return _?new Error(`Illegal argument: ${_}`):new Error("Illegal argument")}function S(_){return _?new Error(`Illegal state: ${_}`):new Error("Illegal state")}class U extends Error{constructor(w){super("NotSupported"),w&&(this.message=w)}}},4348:function(Vn,ct,x){"use strict";x.d(ct,{D0:function(){return U},E7:function(){return _},K3:function(){return S},Q5:function(){return o},ZD:function(){return w},ju:function(){return G}});var V=x(79881),fe=x(69323),Ce=x(34502),ge=x(95830),G;(function(b){b.None=()=>fe.JT.None;function R(te){return(q,he=null,re)=>{let E=!1,C;return C=te(W=>{if(!E)return C?C.dispose():E=!0,q.call(he,W)},null,re),E&&C.dispose(),C}}b.once=R;function M(te,q){return k((he,re=null,E)=>te(C=>he.call(re,q(C)),null,E))}b.map=M;function H(te,q){return k((he,re=null,E)=>te(C=>{q(C),he.call(re,C)},null,E))}b.forEach=H;function J(te,q){return k((he,re=null,E)=>te(C=>q(C)&&he.call(re,C),null,E))}b.filter=J;function T(te){return te}b.signal=T;function N(...te){return(q,he=null,re)=>(0,fe.F8)(...te.map(E=>E(C=>q.call(he,C),null,re)))}b.any=N;function P(te,q,he){let re=he;return M(te,E=>(re=q(re,E),re))}b.reduce=P;function k(te){let q;const he=new o({onFirstListenerAdd(){q=te(he.fire,he)},onLastListenerRemove(){q.dispose()}});return he.event}function oe(te,q,he=100,re=!1,E){let C,W,be,Ve=0;const Ke=new o({leakWarningThreshold:E,onFirstListenerAdd(){C=te(Ct=>{Ve++,W=q(W,Ct),re&&!be&&(Ke.fire(W),W=void 0),clearTimeout(be),be=setTimeout(()=>{const Rt=W;W=void 0,be=void 0,(!re||Ve>1)&&Ke.fire(Rt),Ve=0},he)})},onLastListenerRemove(){C.dispose()}});return Ke.event}b.debounce=oe;function de(te,q=(he,re)=>he===re){let he=!0,re;return J(te,E=>{const C=he||!q(E,re);return he=!1,re=E,C})}b.latch=de;function ie(te,q){return[b.filter(te,q),b.filter(te,he=>!q(he))]}b.split=ie;function ae(te,q=!1,he=[]){let re=he.slice(),E=te(be=>{re?re.push(be):W.fire(be)});const C=()=>{re&&re.forEach(be=>W.fire(be)),re=null},W=new o({onFirstListenerAdd(){E||(E=te(be=>W.fire(be)))},onFirstListenerDidAdd(){re&&(q?setTimeout(C):C())},onLastListenerRemove(){E&&E.dispose(),E=null}});return W.event}b.buffer=ae;class we{constructor(q){this.event=q}map(q){return new we(M(this.event,q))}forEach(q){return new we(H(this.event,q))}filter(q){return new we(J(this.event,q))}reduce(q,he){return new we(P(this.event,q,he))}latch(){return new we(de(this.event))}debounce(q,he=100,re=!1,E){return new we(oe(this.event,q,he,re,E))}on(q,he,re){return this.event(q,he,re)}once(q,he,re){return R(this.event)(q,he,re)}}function Te(te){return new we(te)}b.chain=Te;function Re(te,q,he=re=>re){const re=(...be)=>W.fire(he(...be)),E=()=>te.on(q,re),C=()=>te.removeListener(q,re),W=new o({onFirstListenerAdd:E,onLastListenerRemove:C});return W.event}b.fromNodeEventEmitter=Re;function Y(te,q,he=re=>re){const re=(...be)=>W.fire(he(...be)),E=()=>te.addEventListener(q,re),C=()=>te.removeEventListener(q,re),W=new o({onFirstListenerAdd:E,onLastListenerRemove:C});return W.event}b.fromDOMEventEmitter=Y;function $(te){return new Promise(q=>R(te)(q))}b.toPromise=$})(G||(G={}));class g{constructor(R){this._listenerCount=0,this._invocationCount=0,this._elapsedOverall=0,this._name=`${R}_${g._idPool++}`}start(R){this._stopWatch=new ge.G(!0),this._listenerCount=R}stop(){if(this._stopWatch){const R=this._stopWatch.elapsed();this._elapsedOverall+=R,this._invocationCount+=1,console.info(`did FIRE ${this._name}: elapsed_ms: ${R.toFixed(5)}, listener: ${this._listenerCount} (elapsed_overall: ${this._elapsedOverall.toFixed(2)}, invocations: ${this._invocationCount})`),this._stopWatch=void 0}}}g._idPool=0;let ye=-1;class le{constructor(R,M=Math.random().toString(18).slice(2,5)){this.customThreshold=R,this.name=M,this._warnCountdown=0}dispose(){this._stacks&&this._stacks.clear()}check(R){let M=ye;if(typeof this.customThreshold=="number"&&(M=this.customThreshold),M<=0||R<M)return;this._stacks||(this._stacks=new Map);const H=new Error().stack.split(`
|
|
`).slice(3).join(`
|
|
`),J=this._stacks.get(H)||0;if(this._stacks.set(H,J+1),this._warnCountdown-=1,this._warnCountdown<=0){this._warnCountdown=M*.5;let T,N=0;for(const[P,k]of this._stacks)(!T||N<k)&&(T=P,N=k);console.warn(`[${this.name}] potential listener LEAK detected, having ${R} listeners already. MOST frequent listener (${N}):`),console.warn(T)}return()=>{const T=this._stacks.get(H)||0;this._stacks.set(H,T-1)}}}class o{constructor(R){var M;this._disposed=!1,this._options=R,this._leakageMon=ye>0?new le(this._options&&this._options.leakWarningThreshold):void 0,this._perfMon=!((M=this._options)===null||M===void 0)&&M._profName?new g(this._options._profName):void 0}get event(){return this._event||(this._event=(R,M,H)=>{var J;this._listeners||(this._listeners=new Ce.S);const T=this._listeners.isEmpty();T&&this._options&&this._options.onFirstListenerAdd&&this._options.onFirstListenerAdd(this);const N=this._listeners.push(M?[R,M]:R);T&&this._options&&this._options.onFirstListenerDidAdd&&this._options.onFirstListenerDidAdd(this),this._options&&this._options.onListenerDidAdd&&this._options.onListenerDidAdd(this,R,M);const P=(J=this._leakageMon)===null||J===void 0?void 0:J.check(this._listeners.size),k=(0,fe.OF)(()=>{P&&P(),this._disposed||(N(),this._options&&this._options.onLastListenerRemove&&(this._listeners&&!this._listeners.isEmpty()||this._options.onLastListenerRemove(this)))});return H instanceof fe.SL?H.add(k):Array.isArray(H)&&H.push(k),k}),this._event}fire(R){var M,H;if(this._listeners){this._deliveryQueue||(this._deliveryQueue=new Ce.S);for(let J of this._listeners)this._deliveryQueue.push([J,R]);for((M=this._perfMon)===null||M===void 0||M.start(this._deliveryQueue.size);this._deliveryQueue.size>0;){const[J,T]=this._deliveryQueue.shift();try{typeof J=="function"?J.call(void 0,T):J[0].call(J[1],T)}catch(N){(0,V.dL)(N)}}(H=this._perfMon)===null||H===void 0||H.stop()}}dispose(){var R,M,H,J,T;this._disposed||(this._disposed=!0,(R=this._listeners)===null||R===void 0||R.clear(),(M=this._deliveryQueue)===null||M===void 0||M.clear(),(J=(H=this._options)===null||H===void 0?void 0:H.onLastListenerRemove)===null||J===void 0||J.call(H),(T=this._leakageMon)===null||T===void 0||T.dispose())}}class S extends o{constructor(R){super(R),this._isPaused=0,this._eventQueue=new Ce.S,this._mergeFn=R==null?void 0:R.merge}pause(){this._isPaused++}resume(){if(this._isPaused!==0&&--this._isPaused===0)if(this._mergeFn){const R=Array.from(this._eventQueue);this._eventQueue.clear(),super.fire(this._mergeFn(R))}else for(;!this._isPaused&&this._eventQueue.size!==0;)super.fire(this._eventQueue.shift())}fire(R){this._listeners&&(this._isPaused!==0?this._eventQueue.push(R):super.fire(R))}}class U extends S{constructor(R){var M;super(R),this._delay=(M=R.delay)!==null&&M!==void 0?M:100}fire(R){this._handle||(this.pause(),this._handle=setTimeout(()=>{this._handle=void 0,this.resume()},this._delay)),super.fire(R)}}class _{constructor(){this.buffers=[]}wrapEvent(R){return(M,H,J)=>R(T=>{const N=this.buffers[this.buffers.length-1];N?N.push(()=>M.call(H,T)):M.call(H,T)},void 0,J)}bufferEvents(R){const M=[];this.buffers.push(M);const H=R();return this.buffers.pop(),M.forEach(J=>J()),H}}class w{constructor(){this.listening=!1,this.inputEvent=G.None,this.inputEventListener=fe.JT.None,this.emitter=new o({onFirstListenerDidAdd:()=>{this.listening=!0,this.inputEventListener=this.inputEvent(this.emitter.fire,this.emitter)},onLastListenerRemove:()=>{this.listening=!1,this.inputEventListener.dispose()}}),this.event=this.emitter.event}set input(R){this.inputEvent=R,this.listening&&(this.inputEventListener.dispose(),this.inputEventListener=R(this.emitter.fire,this.emitter))}dispose(){this.inputEventListener.dispose(),this.emitter.dispose()}}},17845:function(Vn,ct,x){"use strict";x.d(ct,{I:function(){return V}});function V(fe){const Ce=this;let ge=!1,G;return function(){return ge||(ge=!0,G=fe.apply(Ce,arguments)),G}}},88226:function(Vn,ct,x){"use strict";x.d(ct,{$:function(){return V}});var V;(function(fe){function Ce(N){return N&&typeof N=="object"&&typeof N[Symbol.iterator]=="function"}fe.is=Ce;const ge=Object.freeze([]);function G(){return ge}fe.empty=G;function*g(N){yield N}fe.single=g;function ye(N){return N||ge}fe.from=ye;function le(N){return!N||N[Symbol.iterator]().next().done===!0}fe.isEmpty=le;function o(N){return N[Symbol.iterator]().next().value}fe.first=o;function S(N,P){for(const k of N)if(P(k))return!0;return!1}fe.some=S;function U(N,P){for(const k of N)if(P(k))return k}fe.find=U;function*_(N,P){for(const k of N)P(k)&&(yield k)}fe.filter=_;function*w(N,P){let k=0;for(const oe of N)yield P(oe,k++)}fe.map=w;function*b(...N){for(const P of N)for(const k of P)yield k}fe.concat=b;function*R(N){for(const P of N)for(const k of P)yield k}fe.concatNested=R;function M(N,P,k){let oe=k;for(const de of N)oe=P(oe,de);return oe}fe.reduce=M;function*H(N,P,k=N.length){for(P<0&&(P+=N.length),k<0?k+=N.length:k>N.length&&(k=N.length);P<k;P++)yield N[P]}fe.slice=H;function J(N,P=Number.POSITIVE_INFINITY){const k=[];if(P===0)return[k,N];const oe=N[Symbol.iterator]();for(let de=0;de<P;de++){const ie=oe.next();if(ie.done)return[k,fe.empty()];k.push(ie.value)}return[k,{[Symbol.iterator](){return oe}}]}fe.consume=J;function T(N,P,k=(oe,de)=>oe===de){const oe=N[Symbol.iterator](),de=P[Symbol.iterator]();for(;;){const ie=oe.next(),ae=de.next();if(ie.done!==ae.done)return!1;if(ie.done)return!0;if(!k(ie.value,ae.value))return!1}}fe.equals=T})(V||(V={}))},69323:function(Vn,ct,x){"use strict";x.d(ct,{B9:function(){return w},F8:function(){return b},JT:function(){return H},Jz:function(){return T},OF:function(){return R},SL:function(){return M},Wf:function(){return _},XK:function(){return J},dk:function(){return S}});var V=x(17845),fe=x(88226);const Ce=!1;let ge=null;function G(N){ge=N}if(Ce){const N="__is_disposable_tracked__";G(new class{trackDisposable(P){const k=new Error("Potentially leaked disposable").stack;setTimeout(()=>{P[N]||console.log(k)},3e3)}setParent(P,k){if(P&&P!==H.None)try{P[N]=!0}catch(oe){}}markAsDisposed(P){if(P&&P!==H.None)try{P[N]=!0}catch(k){}}markAsSingleton(P){}})}function g(N){return ge==null||ge.trackDisposable(N),N}function ye(N){ge==null||ge.markAsDisposed(N)}function le(N,P){ge==null||ge.setParent(N,P)}function o(N,P){if(ge)for(const k of N)ge.setParent(k,P)}function S(N){return ge==null||ge.markAsSingleton(N),N}class U extends Error{constructor(P){super(`Encountered errors while disposing of store. Errors: [${P.join(", ")}]`),this.errors=P}}function _(N){return typeof N.dispose=="function"&&N.dispose.length===0}function w(N){if(fe.$.is(N)){let P=[];for(const k of N)if(k)try{k.dispose()}catch(oe){P.push(oe)}if(P.length===1)throw P[0];if(P.length>1)throw new U(P);return Array.isArray(N)?[]:N}else if(N)return N.dispose(),N}function b(...N){const P=R(()=>w(N));return o(N,P),P}function R(N){const P=g({dispose:(0,V.I)(()=>{ye(P),N()})});return P}class M{constructor(){this._toDispose=new Set,this._isDisposed=!1,g(this)}dispose(){this._isDisposed||(ye(this),this._isDisposed=!0,this.clear())}clear(){try{w(this._toDispose.values())}finally{this._toDispose.clear()}}add(P){if(!P)return P;if(P===this)throw new Error("Cannot register a disposable on itself!");return le(P,this),this._isDisposed?M.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(P),P}}M.DISABLE_DISPOSED_WARNING=!1;class H{constructor(){this._store=new M,g(this),le(this._store,this)}dispose(){ye(this),this._store.dispose()}_register(P){if(P===this)throw new Error("Cannot register a disposable on itself!");return this._store.add(P)}}H.None=Object.freeze({dispose(){}});class J{constructor(){this._isDisposed=!1,g(this)}get value(){return this._isDisposed?void 0:this._value}set value(P){var k;this._isDisposed||P===this._value||((k=this._value)===null||k===void 0||k.dispose(),P&&le(P,this),this._value=P)}clear(){this.value=void 0}dispose(){var P;this._isDisposed=!0,ye(this),(P=this._value)===null||P===void 0||P.dispose(),this._value=void 0}clearAndLeak(){const P=this._value;return this._value=void 0,P&&le(P,null),P}}class T{constructor(P){this.object=P}dispose(){}}},34502:function(Vn,ct,x){"use strict";x.d(ct,{S:function(){return fe}});class V{constructor(ge){this.element=ge,this.next=V.Undefined,this.prev=V.Undefined}}V.Undefined=new V(void 0);class fe{constructor(){this._first=V.Undefined,this._last=V.Undefined,this._size=0}get size(){return this._size}isEmpty(){return this._first===V.Undefined}clear(){let ge=this._first;for(;ge!==V.Undefined;){const G=ge.next;ge.prev=V.Undefined,ge.next=V.Undefined,ge=G}this._first=V.Undefined,this._last=V.Undefined,this._size=0}unshift(ge){return this._insert(ge,!1)}push(ge){return this._insert(ge,!0)}_insert(ge,G){const g=new V(ge);if(this._first===V.Undefined)this._first=g,this._last=g;else if(G){const le=this._last;this._last=g,g.prev=le,le.next=g}else{const le=this._first;this._first=g,g.next=le,le.prev=g}this._size+=1;let ye=!1;return()=>{ye||(ye=!0,this._remove(g))}}shift(){if(this._first!==V.Undefined){const ge=this._first.element;return this._remove(this._first),ge}}pop(){if(this._last!==V.Undefined){const ge=this._last.element;return this._remove(this._last),ge}}_remove(ge){if(ge.prev!==V.Undefined&&ge.next!==V.Undefined){const G=ge.prev;G.next=ge.next,ge.next.prev=G}else ge.prev===V.Undefined&&ge.next===V.Undefined?(this._first=V.Undefined,this._last=V.Undefined):ge.next===V.Undefined?(this._last=this._last.prev,this._last.next=V.Undefined):ge.prev===V.Undefined&&(this._first=this._first.next,this._first.prev=V.Undefined);this._size-=1}*[Symbol.iterator](){let ge=this._first;for(;ge!==V.Undefined;)yield ge.element,ge=ge.next}}},23345:function(Vn,ct,x){"use strict";x.d(ct,{$L:function(){return oe},ED:function(){return T},IJ:function(){return P},OS:function(){return we},WE:function(){return ie},dz:function(){return N},gn:function(){return de},li:function(){return R},r:function(){return Y},tY:function(){return k},xS:function(){return ae}});var V=x(97671),fe;const Ce="en";let ge=!1,G=!1,g=!1,ye=!1,le=!1,o=!1,S=!1,U,_=null,w=null,b;const R=typeof self=="object"?self:typeof x.g=="object"?x.g:{};let M;typeof R.vscode!="undefined"&&typeof R.vscode.process!="undefined"?M=R.vscode.process:typeof V!="undefined"&&(M=V);const H=typeof((fe=M==null?void 0:M.versions)===null||fe===void 0?void 0:fe.electron)=="string"&&M.type==="renderer";if(typeof navigator=="object"&&!H)b=navigator.userAgent,ge=b.indexOf("Windows")>=0,G=b.indexOf("Macintosh")>=0,S=(b.indexOf("Macintosh")>=0||b.indexOf("iPad")>=0||b.indexOf("iPhone")>=0)&&!!navigator.maxTouchPoints&&navigator.maxTouchPoints>0,g=b.indexOf("Linux")>=0,o=!0,U=navigator.language,_=U;else if(typeof M=="object"){ge=M.platform==="win32",G=M.platform==="darwin",g=M.platform==="linux",ye=g&&!!M.env.SNAP&&!!M.env.SNAP_REVISION,U=Ce,_=Ce;const $=M.env.VSCODE_NLS_CONFIG;if($)try{const te=JSON.parse($),q=te.availableLanguages["*"];U=te.locale,_=q||Ce,w=te._translationsConfigFile}catch(te){}le=!0}else console.error("Unable to resolve platform.");let J=0;G?J=1:ge?J=3:g&&(J=2);const T=ge,N=G,P=g,k=le,oe=o,de=S,ie=b,ae=function(){if(R.setImmediate)return R.setImmediate.bind(R);if(typeof R.postMessage=="function"&&!R.importScripts){let q=[];R.addEventListener("message",re=>{if(re.data&&re.data.vscodeSetImmediateId)for(let E=0,C=q.length;E<C;E++){const W=q[E];if(W.id===re.data.vscodeSetImmediateId){q.splice(E,1),W.callback();return}}});let he=0;return re=>{const E=++he;q.push({id:E,callback:re}),R.postMessage({vscodeSetImmediateId:E},"*")}}if(typeof(M==null?void 0:M.nextTick)=="function")return M.nextTick.bind(M);const te=Promise.resolve();return q=>te.then(q)}(),we=G||S?2:ge?1:3;let Te=!0,Re=!1;function Y(){if(!Re){Re=!0;const $=new Uint8Array(2);$[0]=1,$[1]=2,Te=new Uint16Array($.buffer)[0]===513}return Te}},95830:function(Vn,ct,x){"use strict";x.d(ct,{G:function(){return Ce}});var V=x(23345);const fe=V.li.performance&&typeof V.li.performance.now=="function";class Ce{constructor(G){this._highResolution=fe&&G,this._startTime=this._now(),this._stopTime=-1}static create(G=!0){return new Ce(G)}stop(){this._stopTime=this._now()}elapsed(){return this._stopTime!==-1?this._stopTime-this._startTime:this._now()-this._startTime}_now(){return this._highResolution?V.li.performance.now():Date.now()}}},82983:function(Vn,ct,x){"use strict";x.d(ct,{$i:function(){return Ve},C8:function(){return rn},GF:function(){return U},HO:function(){return he},IO:function(){return _},K7:function(){return Vt},Kw:function(){return It},LC:function(){return R},Mh:function(){return ae},P1:function(){return we},PJ:function(){return cn},Qe:function(){return Ke},R1:function(){return S},RP:function(){return W},S6:function(){return xt},TT:function(){return T},Ut:function(){return E},V8:function(){return M},WU:function(){return Ce},YK:function(){return Re},YU:function(){return ge},ZG:function(){return Te},ZH:function(){return $},ab:function(){return Ct},c1:function(){return He},df:function(){return oe},ec:function(){return G},fi:function(){return ht},fy:function(){return g},j3:function(){return ye},j_:function(){return P},m5:function(){return V},mK:function(){return k},mr:function(){return w},oH:function(){return j},oL:function(){return le},ok:function(){return ie},ow:function(){return H},qq:function(){return de},qu:function(){return J},rL:function(){return Y},uS:function(){return ln},un:function(){return o},uq:function(){return b},vH:function(){return q},xe:function(){return Rt},zY:function(){return N}});function V(O){return!O||typeof O!="string"?!0:O.trim().length===0}const fe=/{(\d+)}/g;function Ce(O,...ue){return ue.length===0?O:O.replace(fe,function(De,Ae){const Be=parseInt(Ae,10);return isNaN(Be)||Be<0||Be>=ue.length?De:ue[Be]})}function ge(O){return O.replace(/[<>&]/g,function(ue){switch(ue){case"<":return"<";case">":return">";case"&":return"&";default:return ue}})}function G(O){return O.replace(/[\\\{\}\*\+\?\|\^\$\.\[\]\(\)]/g,"\\$&")}function g(O,ue=" "){const De=ye(O,ue);return le(De,ue)}function ye(O,ue){if(!O||!ue)return O;const De=ue.length;if(De===0||O.length===0)return O;let Ae=0;for(;O.indexOf(ue,Ae)===Ae;)Ae=Ae+De;return O.substring(Ae)}function le(O,ue){if(!O||!ue)return O;const De=ue.length,Ae=O.length;if(De===0||Ae===0)return O;let Be=Ae,Se=-1;for(;Se=O.lastIndexOf(ue,Be-1),!(Se===-1||Se+De!==Be);){if(Se===0)return"";Be=Se}return O.substring(0,Be)}function o(O){return O.replace(/[\-\\\{\}\+\?\|\^\$\.\,\[\]\(\)\#\s]/g,"\\$&").replace(/[\*]/g,".*")}function S(O){return O.replace(/\*/g,"")}function U(O,ue,De={}){if(!O)throw new Error("Cannot create regex from empty string");ue||(O=G(O)),De.wholeWord&&(/\B/.test(O.charAt(0))||(O="\\b"+O),/\B/.test(O.charAt(O.length-1))||(O=O+"\\b"));let Ae="";return De.global&&(Ae+="g"),De.matchCase||(Ae+="i"),De.multiline&&(Ae+="m"),De.unicode&&(Ae+="u"),new RegExp(O,Ae)}function _(O){return O.source==="^"||O.source==="^$"||O.source==="$"||O.source==="^\\s*$"?!1:!!(O.exec("")&&O.lastIndex===0)}function w(O){return(O.global?"g":"")+(O.ignoreCase?"i":"")+(O.multiline?"m":"")+(O.unicode?"u":"")}function b(O){return O.split(/\r\n|\r|\n/)}function R(O){for(let ue=0,De=O.length;ue<De;ue++){const Ae=O.charCodeAt(ue);if(Ae!==32&&Ae!==9)return ue}return-1}function M(O,ue=0,De=O.length){for(let Ae=ue;Ae<De;Ae++){const Be=O.charCodeAt(Ae);if(Be!==32&&Be!==9)return O.substring(ue,Ae)}return O.substring(ue,De)}function H(O,ue=O.length-1){for(let De=ue;De>=0;De--){const Ae=O.charCodeAt(De);if(Ae!==32&&Ae!==9)return De}return-1}function J(O,ue){return O<ue?-1:O>ue?1:0}function T(O,ue,De=0,Ae=O.length,Be=0,Se=ue.length){for(;De<Ae&&Be<Se;De++,Be++){let je=O.charCodeAt(De),qe=ue.charCodeAt(Be);if(je<qe)return-1;if(je>qe)return 1}const ot=Ae-De,Xe=Se-Be;return ot<Xe?-1:ot>Xe?1:0}function N(O,ue){return P(O,ue,0,O.length,0,ue.length)}function P(O,ue,De=0,Ae=O.length,Be=0,Se=ue.length){for(;De<Ae&&Be<Se;De++,Be++){let je=O.charCodeAt(De),qe=ue.charCodeAt(Be);if(je===qe)continue;if(je>=128||qe>=128)return T(O.toLowerCase(),ue.toLowerCase(),De,Ae,Be,Se);k(je)&&(je-=32),k(qe)&&(qe-=32);const kt=je-qe;if(kt!==0)return kt}const ot=Ae-De,Xe=Se-Be;return ot<Xe?-1:ot>Xe?1:0}function k(O){return O>=97&&O<=122}function oe(O){return O>=65&&O<=90}function de(O,ue){return O.length===ue.length&&P(O,ue)===0}function ie(O,ue){const De=ue.length;return ue.length>O.length?!1:P(O,ue,0,De)===0}function ae(O,ue){let De,Ae=Math.min(O.length,ue.length);for(De=0;De<Ae;De++)if(O.charCodeAt(De)!==ue.charCodeAt(De))return De;return Ae}function we(O,ue){let De,Ae=Math.min(O.length,ue.length);const Be=O.length-1,Se=ue.length-1;for(De=0;De<Ae;De++)if(O.charCodeAt(Be-De)!==ue.charCodeAt(Se-De))return De;return Ae}function Te(O){return 55296<=O&&O<=56319}function Re(O){return 56320<=O&&O<=57343}function Y(O,ue){return(O-55296<<10)+(ue-56320)+65536}function $(O,ue,De){const Ae=O.charCodeAt(De);if(Te(Ae)&&De+1<ue){const Be=O.charCodeAt(De+1);if(Re(Be))return Y(Ae,Be)}return Ae}function te(O,ue){const De=O.charCodeAt(ue-1);if(Re(De)&&ue>1){const Ae=O.charCodeAt(ue-2);if(Te(Ae))return Y(Ae,De)}return De}function q(O,ue){const De=Oe.getInstance(),Ae=ue,Be=O.length,Se=$(O,Be,ue);ue+=Se>=65536?2:1;let ot=De.getGraphemeBreakType(Se);for(;ue<Be;){const Xe=$(O,Be,ue),je=De.getGraphemeBreakType(Xe);if(ht(ot,je))break;ue+=Xe>=65536?2:1,ot=je}return ue-Ae}function he(O,ue){const De=Oe.getInstance(),Ae=ue,Be=te(O,ue);ue-=Be>=65536?2:1;let Se=De.getGraphemeBreakType(Be);for(;ue>0;){const ot=te(O,ue),Xe=De.getGraphemeBreakType(ot);if(ht(Xe,Se))break;ue-=ot>=65536?2:1,Se=Xe}return Ae-ue}const re=/(?:[\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 E(O){return re.test(O)}const C=/(?:[\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 W(O){return C.test(O)}const be=/^[\t\n\r\x20-\x7E]*$/;function Ve(O){return be.test(O)}const Ke=/[\u2028\u2029]/;function Ct(O){return Ke.test(O)}function Rt(O){for(let ue=0,De=O.length;ue<De;ue++)if(Vt(O.charCodeAt(ue)))return!0;return!1}function Vt(O){return O=+O,O>=11904&&O<=55215||O>=63744&&O<=64255||O>=65281&&O<=65374}function rn(O){return O>=127462&&O<=127487||O===8986||O===8987||O===9200||O===9203||O>=9728&&O<=10175||O===11088||O===11093||O>=127744&&O<=128591||O>=128640&&O<=128764||O>=128992&&O<=129003||O>=129280&&O<=129535||O>=129648&&O<=129750}const He="\uFEFF";function ln(O){return!!(O&&O.length>0&&O.charCodeAt(0)===65279)}function It(O,ue=!1){return O?(ue&&(O=O.replace(/\\./g,"")),O.toLowerCase()!==O):!1}function cn(O){return O=O%(2*26),O<26?String.fromCharCode(97+O):String.fromCharCode(65+O-26)}function xt(O){return Oe.getInstance().getGraphemeBreakType(O)}function ht(O,ue){return O===0?ue!==5&&ue!==7:O===2&&ue===3?!1:O===4||O===2||O===3||ue===4||ue===2||ue===3?!0:!(O===8&&(ue===8||ue===9||ue===11||ue===12)||(O===11||O===9)&&(ue===9||ue===10)||(O===12||O===10)&&ue===10||ue===5||ue===13||ue===7||O===1||O===13&&ue===14||O===6&&ue===6)}class Oe{constructor(){this._data=Fe()}static getInstance(){return Oe._INSTANCE||(Oe._INSTANCE=new Oe),Oe._INSTANCE}getGraphemeBreakType(ue){if(ue<32)return ue===10?3:ue===13?2:4;if(ue<127)return 0;const De=this._data,Ae=De.length/3;let Be=1;for(;Be<=Ae;)if(ue<De[3*Be])Be=2*Be;else if(ue>De[3*Be+1])Be=2*Be+1;else return De[3*Be+2];return 0}}Oe._INSTANCE=null;function Fe(){return JSON.parse("[0,0,0,51592,51592,11,44424,44424,11,72251,72254,5,7150,7150,7,48008,48008,11,55176,55176,11,128420,128420,14,3276,3277,5,9979,9980,14,46216,46216,11,49800,49800,11,53384,53384,11,70726,70726,5,122915,122916,5,129320,129327,14,2558,2558,5,5906,5908,5,9762,9763,14,43360,43388,8,45320,45320,11,47112,47112,11,48904,48904,11,50696,50696,11,52488,52488,11,54280,54280,11,70082,70083,1,71350,71350,7,73111,73111,5,127892,127893,14,128726,128727,14,129473,129474,14,2027,2035,5,2901,2902,5,3784,3789,5,6754,6754,5,8418,8420,5,9877,9877,14,11088,11088,14,44008,44008,5,44872,44872,11,45768,45768,11,46664,46664,11,47560,47560,11,48456,48456,11,49352,49352,11,50248,50248,11,51144,51144,11,52040,52040,11,52936,52936,11,53832,53832,11,54728,54728,11,69811,69814,5,70459,70460,5,71096,71099,7,71998,71998,5,72874,72880,5,119149,119149,7,127374,127374,14,128335,128335,14,128482,128482,14,128765,128767,14,129399,129400,14,129680,129685,14,1476,1477,5,2377,2380,7,2759,2760,5,3137,3140,7,3458,3459,7,4153,4154,5,6432,6434,5,6978,6978,5,7675,7679,5,9723,9726,14,9823,9823,14,9919,9923,14,10035,10036,14,42736,42737,5,43596,43596,5,44200,44200,11,44648,44648,11,45096,45096,11,45544,45544,11,45992,45992,11,46440,46440,11,46888,46888,11,47336,47336,11,47784,47784,11,48232,48232,11,48680,48680,11,49128,49128,11,49576,49576,11,50024,50024,11,50472,50472,11,50920,50920,11,51368,51368,11,51816,51816,11,52264,52264,11,52712,52712,11,53160,53160,11,53608,53608,11,54056,54056,11,54504,54504,11,54952,54952,11,68108,68111,5,69933,69940,5,70197,70197,7,70498,70499,7,70845,70845,5,71229,71229,5,71727,71735,5,72154,72155,5,72344,72345,5,73023,73029,5,94095,94098,5,121403,121452,5,126981,127182,14,127538,127546,14,127990,127990,14,128391,128391,14,128445,128449,14,128500,128505,14,128752,128752,14,129160,129167,14,129356,129356,14,129432,129442,14,129648,129651,14,129751,131069,14,173,173,4,1757,1757,1,2274,2274,1,2494,2494,5,2641,2641,5,2876,2876,5,3014,3016,7,3262,3262,7,3393,3396,5,3570,3571,7,3968,3972,5,4228,4228,7,6086,6086,5,6679,6680,5,6912,6915,5,7080,7081,5,7380,7392,5,8252,8252,14,9096,9096,14,9748,9749,14,9784,9786,14,9833,9850,14,9890,9894,14,9938,9938,14,9999,9999,14,10085,10087,14,12349,12349,14,43136,43137,7,43454,43456,7,43755,43755,7,44088,44088,11,44312,44312,11,44536,44536,11,44760,44760,11,44984,44984,11,45208,45208,11,45432,45432,11,45656,45656,11,45880,45880,11,46104,46104,11,46328,46328,11,46552,46552,11,46776,46776,11,47000,47000,11,47224,47224,11,47448,47448,11,47672,47672,11,47896,47896,11,48120,48120,11,48344,48344,11,48568,48568,11,48792,48792,11,49016,49016,11,49240,49240,11,49464,49464,11,49688,49688,11,49912,49912,11,50136,50136,11,50360,50360,11,50584,50584,11,50808,50808,11,51032,51032,11,51256,51256,11,51480,51480,11,51704,51704,11,51928,51928,11,52152,52152,11,52376,52376,11,52600,52600,11,52824,52824,11,53048,53048,11,53272,53272,11,53496,53496,11,53720,53720,11,53944,53944,11,54168,54168,11,54392,54392,11,54616,54616,11,54840,54840,11,55064,55064,11,65438,65439,5,69633,69633,5,69837,69837,1,70018,70018,7,70188,70190,7,70368,70370,7,70465,70468,7,70712,70719,5,70835,70840,5,70850,70851,5,71132,71133,5,71340,71340,7,71458,71461,5,71985,71989,7,72002,72002,7,72193,72202,5,72281,72283,5,72766,72766,7,72885,72886,5,73104,73105,5,92912,92916,5,113824,113827,4,119173,119179,5,121505,121519,5,125136,125142,5,127279,127279,14,127489,127490,14,127570,127743,14,127900,127901,14,128254,128254,14,128369,128370,14,128400,128400,14,128425,128432,14,128468,128475,14,128489,128494,14,128715,128720,14,128745,128745,14,128759,128760,14,129004,129023,14,129296,129304,14,129340,129342,14,129388,129392,14,129404,129407,14,129454,129455,14,129485,129487,14,129659,129663,14,129719,129727,14,917536,917631,5,13,13,2,1160,1161,5,1564,1564,4,1807,1807,1,2085,2087,5,2363,2363,7,2402,2403,5,2507,2508,7,2622,2624,7,2691,2691,7,2786,2787,5,2881,2884,5,3006,3006,5,3072,3072,5,3170,3171,5,3267,3268,7,3330,3331,7,3406,3406,1,3538,3540,5,3655,3662,5,3897,3897,5,4038,4038,5,4184,4185,5,4352,4447,8,6068,6069,5,6155,6157,5,6448,6449,7,6742,6742,5,6783,6783,5,6966,6970,5,7042,7042,7,7143,7143,7,7212,7219,5,7412,7412,5,8206,8207,4,8294,8303,4,8596,8601,14,9410,9410,14,9742,9742,14,9757,9757,14,9770,9770,14,9794,9794,14,9828,9828,14,9855,9855,14,9882,9882,14,9900,9903,14,9929,9933,14,9963,9967,14,9987,9988,14,10006,10006,14,10062,10062,14,10175,10175,14,11744,11775,5,42607,42607,5,43043,43044,7,43263,43263,5,43444,43445,7,43569,43570,5,43698,43700,5,43766,43766,5,44032,44032,11,44144,44144,11,44256,44256,11,44368,44368,11,44480,44480,11,44592,44592,11,44704,44704,11,44816,44816,11,44928,44928,11,45040,45040,11,45152,45152,11,45264,45264,11,45376,45376,11,45488,45488,11,45600,45600,11,45712,45712,11,45824,45824,11,45936,45936,11,46048,46048,11,46160,46160,11,46272,46272,11,46384,46384,11,46496,46496,11,46608,46608,11,46720,46720,11,46832,46832,11,46944,46944,11,47056,47056,11,47168,47168,11,47280,47280,11,47392,47392,11,47504,47504,11,47616,47616,11,47728,47728,11,47840,47840,11,47952,47952,11,48064,48064,11,48176,48176,11,48288,48288,11,48400,48400,11,48512,48512,11,48624,48624,11,48736,48736,11,48848,48848,11,48960,48960,11,49072,49072,11,49184,49184,11,49296,49296,11,49408,49408,11,49520,49520,11,49632,49632,11,49744,49744,11,49856,49856,11,49968,49968,11,50080,50080,11,50192,50192,11,50304,50304,11,50416,50416,11,50528,50528,11,50640,50640,11,50752,50752,11,50864,50864,11,50976,50976,11,51088,51088,11,51200,51200,11,51312,51312,11,51424,51424,11,51536,51536,11,51648,51648,11,51760,51760,11,51872,51872,11,51984,51984,11,52096,52096,11,52208,52208,11,52320,52320,11,52432,52432,11,52544,52544,11,52656,52656,11,52768,52768,11,52880,52880,11,52992,52992,11,53104,53104,11,53216,53216,11,53328,53328,11,53440,53440,11,53552,53552,11,53664,53664,11,53776,53776,11,53888,53888,11,54000,54000,11,54112,54112,11,54224,54224,11,54336,54336,11,54448,54448,11,54560,54560,11,54672,54672,11,54784,54784,11,54896,54896,11,55008,55008,11,55120,55120,11,64286,64286,5,66272,66272,5,68900,68903,5,69762,69762,7,69817,69818,5,69927,69931,5,70003,70003,5,70070,70078,5,70094,70094,7,70194,70195,7,70206,70206,5,70400,70401,5,70463,70463,7,70475,70477,7,70512,70516,5,70722,70724,5,70832,70832,5,70842,70842,5,70847,70848,5,71088,71089,7,71102,71102,7,71219,71226,5,71231,71232,5,71342,71343,7,71453,71455,5,71463,71467,5,71737,71738,5,71995,71996,5,72000,72000,7,72145,72147,7,72160,72160,5,72249,72249,7,72273,72278,5,72330,72342,5,72752,72758,5,72850,72871,5,72882,72883,5,73018,73018,5,73031,73031,5,73109,73109,5,73461,73462,7,94031,94031,5,94192,94193,7,119142,119142,7,119155,119162,4,119362,119364,5,121476,121476,5,122888,122904,5,123184,123190,5,126976,126979,14,127184,127231,14,127344,127345,14,127405,127461,14,127514,127514,14,127561,127567,14,127778,127779,14,127896,127896,14,127985,127986,14,127995,127999,5,128326,128328,14,128360,128366,14,128378,128378,14,128394,128397,14,128405,128406,14,128422,128423,14,128435,128443,14,128453,128464,14,128479,128480,14,128484,128487,14,128496,128498,14,128640,128709,14,128723,128724,14,128736,128741,14,128747,128748,14,128755,128755,14,128762,128762,14,128981,128991,14,129096,129103,14,129292,129292,14,129311,129311,14,129329,129330,14,129344,129349,14,129360,129374,14,129394,129394,14,129402,129402,14,129413,129425,14,129445,129450,14,129466,129471,14,129483,129483,14,129511,129535,14,129653,129655,14,129667,129670,14,129705,129711,14,129731,129743,14,917505,917505,4,917760,917999,5,10,10,3,127,159,4,768,879,5,1471,1471,5,1536,1541,1,1648,1648,5,1767,1768,5,1840,1866,5,2070,2073,5,2137,2139,5,2307,2307,7,2366,2368,7,2382,2383,7,2434,2435,7,2497,2500,5,2519,2519,5,2563,2563,7,2631,2632,5,2677,2677,5,2750,2752,7,2763,2764,7,2817,2817,5,2879,2879,5,2891,2892,7,2914,2915,5,3008,3008,5,3021,3021,5,3076,3076,5,3146,3149,5,3202,3203,7,3264,3265,7,3271,3272,7,3298,3299,5,3390,3390,5,3402,3404,7,3426,3427,5,3535,3535,5,3544,3550,7,3635,3635,7,3763,3763,7,3893,3893,5,3953,3966,5,3981,3991,5,4145,4145,7,4157,4158,5,4209,4212,5,4237,4237,5,4520,4607,10,5970,5971,5,6071,6077,5,6089,6099,5,6277,6278,5,6439,6440,5,6451,6456,7,6683,6683,5,6744,6750,5,6765,6770,7,6846,6846,5,6964,6964,5,6972,6972,5,7019,7027,5,7074,7077,5,7083,7085,5,7146,7148,7,7154,7155,7,7222,7223,5,7394,7400,5,7416,7417,5,8204,8204,5,8233,8233,4,8288,8292,4,8413,8416,5,8482,8482,14,8986,8987,14,9193,9203,14,9654,9654,14,9733,9733,14,9745,9745,14,9752,9752,14,9760,9760,14,9766,9766,14,9774,9775,14,9792,9792,14,9800,9811,14,9825,9826,14,9831,9831,14,9852,9853,14,9872,9873,14,9880,9880,14,9885,9887,14,9896,9897,14,9906,9916,14,9926,9927,14,9936,9936,14,9941,9960,14,9974,9974,14,9982,9985,14,9992,9997,14,10002,10002,14,10017,10017,14,10055,10055,14,10071,10071,14,10145,10145,14,11013,11015,14,11503,11505,5,12334,12335,5,12951,12951,14,42612,42621,5,43014,43014,5,43047,43047,7,43204,43205,5,43335,43345,5,43395,43395,7,43450,43451,7,43561,43566,5,43573,43574,5,43644,43644,5,43710,43711,5,43758,43759,7,44005,44005,5,44012,44012,7,44060,44060,11,44116,44116,11,44172,44172,11,44228,44228,11,44284,44284,11,44340,44340,11,44396,44396,11,44452,44452,11,44508,44508,11,44564,44564,11,44620,44620,11,44676,44676,11,44732,44732,11,44788,44788,11,44844,44844,11,44900,44900,11,44956,44956,11,45012,45012,11,45068,45068,11,45124,45124,11,45180,45180,11,45236,45236,11,45292,45292,11,45348,45348,11,45404,45404,11,45460,45460,11,45516,45516,11,45572,45572,11,45628,45628,11,45684,45684,11,45740,45740,11,45796,45796,11,45852,45852,11,45908,45908,11,45964,45964,11,46020,46020,11,46076,46076,11,46132,46132,11,46188,46188,11,46244,46244,11,46300,46300,11,46356,46356,11,46412,46412,11,46468,46468,11,46524,46524,11,46580,46580,11,46636,46636,11,46692,46692,11,46748,46748,11,46804,46804,11,46860,46860,11,46916,46916,11,46972,46972,11,47028,47028,11,47084,47084,11,47140,47140,11,47196,47196,11,47252,47252,11,47308,47308,11,47364,47364,11,47420,47420,11,47476,47476,11,47532,47532,11,47588,47588,11,47644,47644,11,47700,47700,11,47756,47756,11,47812,47812,11,47868,47868,11,47924,47924,11,47980,47980,11,48036,48036,11,48092,48092,11,48148,48148,11,48204,48204,11,48260,48260,11,48316,48316,11,48372,48372,11,48428,48428,11,48484,48484,11,48540,48540,11,48596,48596,11,48652,48652,11,48708,48708,11,48764,48764,11,48820,48820,11,48876,48876,11,48932,48932,11,48988,48988,11,49044,49044,11,49100,49100,11,49156,49156,11,49212,49212,11,49268,49268,11,49324,49324,11,49380,49380,11,49436,49436,11,49492,49492,11,49548,49548,11,49604,49604,11,49660,49660,11,49716,49716,11,49772,49772,11,49828,49828,11,49884,49884,11,49940,49940,11,49996,49996,11,50052,50052,11,50108,50108,11,50164,50164,11,50220,50220,11,50276,50276,11,50332,50332,11,50388,50388,11,50444,50444,11,50500,50500,11,50556,50556,11,50612,50612,11,50668,50668,11,50724,50724,11,50780,50780,11,50836,50836,11,50892,50892,11,50948,50948,11,51004,51004,11,51060,51060,11,51116,51116,11,51172,51172,11,51228,51228,11,51284,51284,11,51340,51340,11,51396,51396,11,51452,51452,11,51508,51508,11,51564,51564,11,51620,51620,11,51676,51676,11,51732,51732,11,51788,51788,11,51844,51844,11,51900,51900,11,51956,51956,11,52012,52012,11,52068,52068,11,52124,52124,11,52180,52180,11,52236,52236,11,52292,52292,11,52348,52348,11,52404,52404,11,52460,52460,11,52516,52516,11,52572,52572,11,52628,52628,11,52684,52684,11,52740,52740,11,52796,52796,11,52852,52852,11,52908,52908,11,52964,52964,11,53020,53020,11,53076,53076,11,53132,53132,11,53188,53188,11,53244,53244,11,53300,53300,11,53356,53356,11,53412,53412,11,53468,53468,11,53524,53524,11,53580,53580,11,53636,53636,11,53692,53692,11,53748,53748,11,53804,53804,11,53860,53860,11,53916,53916,11,53972,53972,11,54028,54028,11,54084,54084,11,54140,54140,11,54196,54196,11,54252,54252,11,54308,54308,11,54364,54364,11,54420,54420,11,54476,54476,11,54532,54532,11,54588,54588,11,54644,54644,11,54700,54700,11,54756,54756,11,54812,54812,11,54868,54868,11,54924,54924,11,54980,54980,11,55036,55036,11,55092,55092,11,55148,55148,11,55216,55238,9,65056,65071,5,65529,65531,4,68097,68099,5,68159,68159,5,69446,69456,5,69688,69702,5,69808,69810,7,69815,69816,7,69821,69821,1,69888,69890,5,69932,69932,7,69957,69958,7,70016,70017,5,70067,70069,7,70079,70080,7,70089,70092,5,70095,70095,5,70191,70193,5,70196,70196,5,70198,70199,5,70367,70367,5,70371,70378,5,70402,70403,7,70462,70462,5,70464,70464,5,70471,70472,7,70487,70487,5,70502,70508,5,70709,70711,7,70720,70721,7,70725,70725,7,70750,70750,5,70833,70834,7,70841,70841,7,70843,70844,7,70846,70846,7,70849,70849,7,71087,71087,5,71090,71093,5,71100,71101,5,71103,71104,5,71216,71218,7,71227,71228,7,71230,71230,7,71339,71339,5,71341,71341,5,71344,71349,5,71351,71351,5,71456,71457,7,71462,71462,7,71724,71726,7,71736,71736,7,71984,71984,5,71991,71992,7,71997,71997,7,71999,71999,1,72001,72001,1,72003,72003,5,72148,72151,5,72156,72159,7,72164,72164,7,72243,72248,5,72250,72250,1,72263,72263,5,72279,72280,7,72324,72329,1,72343,72343,7,72751,72751,7,72760,72765,5,72767,72767,5,72873,72873,7,72881,72881,7,72884,72884,7,73009,73014,5,73020,73021,5,73030,73030,1,73098,73102,7,73107,73108,7,73110,73110,7,73459,73460,5,78896,78904,4,92976,92982,5,94033,94087,7,94180,94180,5,113821,113822,5,119141,119141,5,119143,119145,5,119150,119154,5,119163,119170,5,119210,119213,5,121344,121398,5,121461,121461,5,121499,121503,5,122880,122886,5,122907,122913,5,122918,122922,5,123628,123631,5,125252,125258,5,126980,126980,14,127183,127183,14,127245,127247,14,127340,127343,14,127358,127359,14,127377,127386,14,127462,127487,6,127491,127503,14,127535,127535,14,127548,127551,14,127568,127569,14,127744,127777,14,127780,127891,14,127894,127895,14,127897,127899,14,127902,127984,14,127987,127989,14,127991,127994,14,128000,128253,14,128255,128317,14,128329,128334,14,128336,128359,14,128367,128368,14,128371,128377,14,128379,128390,14,128392,128393,14,128398,128399,14,128401,128404,14,128407,128419,14,128421,128421,14,128424,128424,14,128433,128434,14,128444,128444,14,128450,128452,14,128465,128467,14,128476,128478,14,128481,128481,14,128483,128483,14,128488,128488,14,128495,128495,14,128499,128499,14,128506,128591,14,128710,128714,14,128721,128722,14,128725,128725,14,128728,128735,14,128742,128744,14,128746,128746,14,128749,128751,14,128753,128754,14,128756,128758,14,128761,128761,14,128763,128764,14,128884,128895,14,128992,129003,14,129036,129039,14,129114,129119,14,129198,129279,14,129293,129295,14,129305,129310,14,129312,129319,14,129328,129328,14,129331,129338,14,129343,129343,14,129351,129355,14,129357,129359,14,129375,129387,14,129393,129393,14,129395,129398,14,129401,129401,14,129403,129403,14,129408,129412,14,129426,129431,14,129443,129444,14,129451,129453,14,129456,129465,14,129472,129472,14,129475,129482,14,129484,129484,14,129488,129510,14,129536,129647,14,129652,129652,14,129656,129658,14,129664,129666,14,129671,129679,14,129686,129704,14,129712,129718,14,129728,129730,14,129744,129750,14,917504,917504,4,917506,917535,4,917632,917759,4,918000,921599,4,0,9,4,11,12,4,14,31,4,169,169,14,174,174,14,1155,1159,5,1425,1469,5,1473,1474,5,1479,1479,5,1552,1562,5,1611,1631,5,1750,1756,5,1759,1764,5,1770,1773,5,1809,1809,5,1958,1968,5,2045,2045,5,2075,2083,5,2089,2093,5,2259,2273,5,2275,2306,5,2362,2362,5,2364,2364,5,2369,2376,5,2381,2381,5,2385,2391,5,2433,2433,5,2492,2492,5,2495,2496,7,2503,2504,7,2509,2509,5,2530,2531,5,2561,2562,5,2620,2620,5,2625,2626,5,2635,2637,5,2672,2673,5,2689,2690,5,2748,2748,5,2753,2757,5,2761,2761,7,2765,2765,5,2810,2815,5,2818,2819,7,2878,2878,5,2880,2880,7,2887,2888,7,2893,2893,5,2903,2903,5,2946,2946,5,3007,3007,7,3009,3010,7,3018,3020,7,3031,3031,5,3073,3075,7,3134,3136,5,3142,3144,5,3157,3158,5,3201,3201,5,3260,3260,5,3263,3263,5,3266,3266,5,3270,3270,5,3274,3275,7,3285,3286,5,3328,3329,5,3387,3388,5,3391,3392,7,3398,3400,7,3405,3405,5,3415,3415,5,3457,3457,5,3530,3530,5,3536,3537,7,3542,3542,5,3551,3551,5,3633,3633,5,3636,3642,5,3761,3761,5,3764,3772,5,3864,3865,5,3895,3895,5,3902,3903,7,3967,3967,7,3974,3975,5,3993,4028,5,4141,4144,5,4146,4151,5,4155,4156,7,4182,4183,7,4190,4192,5,4226,4226,5,4229,4230,5,4253,4253,5,4448,4519,9,4957,4959,5,5938,5940,5,6002,6003,5,6070,6070,7,6078,6085,7,6087,6088,7,6109,6109,5,6158,6158,4,6313,6313,5,6435,6438,7,6441,6443,7,6450,6450,5,6457,6459,5,6681,6682,7,6741,6741,7,6743,6743,7,6752,6752,5,6757,6764,5,6771,6780,5,6832,6845,5,6847,6848,5,6916,6916,7,6965,6965,5,6971,6971,7,6973,6977,7,6979,6980,7,7040,7041,5,7073,7073,7,7078,7079,7,7082,7082,7,7142,7142,5,7144,7145,5,7149,7149,5,7151,7153,5,7204,7211,7,7220,7221,7,7376,7378,5,7393,7393,7,7405,7405,5,7415,7415,7,7616,7673,5,8203,8203,4,8205,8205,13,8232,8232,4,8234,8238,4,8265,8265,14,8293,8293,4,8400,8412,5,8417,8417,5,8421,8432,5,8505,8505,14,8617,8618,14,9000,9000,14,9167,9167,14,9208,9210,14,9642,9643,14,9664,9664,14,9728,9732,14,9735,9741,14,9743,9744,14,9746,9746,14,9750,9751,14,9753,9756,14,9758,9759,14,9761,9761,14,9764,9765,14,9767,9769,14,9771,9773,14,9776,9783,14,9787,9791,14,9793,9793,14,9795,9799,14,9812,9822,14,9824,9824,14,9827,9827,14,9829,9830,14,9832,9832,14,9851,9851,14,9854,9854,14,9856,9861,14,9874,9876,14,9878,9879,14,9881,9881,14,9883,9884,14,9888,9889,14,9895,9895,14,9898,9899,14,9904,9905,14,9917,9918,14,9924,9925,14,9928,9928,14,9934,9935,14,9937,9937,14,9939,9940,14,9961,9962,14,9968,9973,14,9975,9978,14,9981,9981,14,9986,9986,14,9989,9989,14,9998,9998,14,10000,10001,14,10004,10004,14,10013,10013,14,10024,10024,14,10052,10052,14,10060,10060,14,10067,10069,14,10083,10084,14,10133,10135,14,10160,10160,14,10548,10549,14,11035,11036,14,11093,11093,14,11647,11647,5,12330,12333,5,12336,12336,14,12441,12442,5,12953,12953,14,42608,42610,5,42654,42655,5,43010,43010,5,43019,43019,5,43045,43046,5,43052,43052,5,43188,43203,7,43232,43249,5,43302,43309,5,43346,43347,7,43392,43394,5,43443,43443,5,43446,43449,5,43452,43453,5,43493,43493,5,43567,43568,7,43571,43572,7,43587,43587,5,43597,43597,7,43696,43696,5,43703,43704,5,43713,43713,5,43756,43757,5,43765,43765,7,44003,44004,7,44006,44007,7,44009,44010,7,44013,44013,5,44033,44059,12,44061,44087,12,44089,44115,12,44117,44143,12,44145,44171,12,44173,44199,12,44201,44227,12,44229,44255,12,44257,44283,12,44285,44311,12,44313,44339,12,44341,44367,12,44369,44395,12,44397,44423,12,44425,44451,12,44453,44479,12,44481,44507,12,44509,44535,12,44537,44563,12,44565,44591,12,44593,44619,12,44621,44647,12,44649,44675,12,44677,44703,12,44705,44731,12,44733,44759,12,44761,44787,12,44789,44815,12,44817,44843,12,44845,44871,12,44873,44899,12,44901,44927,12,44929,44955,12,44957,44983,12,44985,45011,12,45013,45039,12,45041,45067,12,45069,45095,12,45097,45123,12,45125,45151,12,45153,45179,12,45181,45207,12,45209,45235,12,45237,45263,12,45265,45291,12,45293,45319,12,45321,45347,12,45349,45375,12,45377,45403,12,45405,45431,12,45433,45459,12,45461,45487,12,45489,45515,12,45517,45543,12,45545,45571,12,45573,45599,12,45601,45627,12,45629,45655,12,45657,45683,12,45685,45711,12,45713,45739,12,45741,45767,12,45769,45795,12,45797,45823,12,45825,45851,12,45853,45879,12,45881,45907,12,45909,45935,12,45937,45963,12,45965,45991,12,45993,46019,12,46021,46047,12,46049,46075,12,46077,46103,12,46105,46131,12,46133,46159,12,46161,46187,12,46189,46215,12,46217,46243,12,46245,46271,12,46273,46299,12,46301,46327,12,46329,46355,12,46357,46383,12,46385,46411,12,46413,46439,12,46441,46467,12,46469,46495,12,46497,46523,12,46525,46551,12,46553,46579,12,46581,46607,12,46609,46635,12,46637,46663,12,46665,46691,12,46693,46719,12,46721,46747,12,46749,46775,12,46777,46803,12,46805,46831,12,46833,46859,12,46861,46887,12,46889,46915,12,46917,46943,12,46945,46971,12,46973,46999,12,47001,47027,12,47029,47055,12,47057,47083,12,47085,47111,12,47113,47139,12,47141,47167,12,47169,47195,12,47197,47223,12,47225,47251,12,47253,47279,12,47281,47307,12,47309,47335,12,47337,47363,12,47365,47391,12,47393,47419,12,47421,47447,12,47449,47475,12,47477,47503,12,47505,47531,12,47533,47559,12,47561,47587,12,47589,47615,12,47617,47643,12,47645,47671,12,47673,47699,12,47701,47727,12,47729,47755,12,47757,47783,12,47785,47811,12,47813,47839,12,47841,47867,12,47869,47895,12,47897,47923,12,47925,47951,12,47953,47979,12,47981,48007,12,48009,48035,12,48037,48063,12,48065,48091,12,48093,48119,12,48121,48147,12,48149,48175,12,48177,48203,12,48205,48231,12,48233,48259,12,48261,48287,12,48289,48315,12,48317,48343,12,48345,48371,12,48373,48399,12,48401,48427,12,48429,48455,12,48457,48483,12,48485,48511,12,48513,48539,12,48541,48567,12,48569,48595,12,48597,48623,12,48625,48651,12,48653,48679,12,48681,48707,12,48709,48735,12,48737,48763,12,48765,48791,12,48793,48819,12,48821,48847,12,48849,48875,12,48877,48903,12,48905,48931,12,48933,48959,12,48961,48987,12,48989,49015,12,49017,49043,12,49045,49071,12,49073,49099,12,49101,49127,12,49129,49155,12,49157,49183,12,49185,49211,12,49213,49239,12,49241,49267,12,49269,49295,12,49297,49323,12,49325,49351,12,49353,49379,12,49381,49407,12,49409,49435,12,49437,49463,12,49465,49491,12,49493,49519,12,49521,49547,12,49549,49575,12,49577,49603,12,49605,49631,12,49633,49659,12,49661,49687,12,49689,49715,12,49717,49743,12,49745,49771,12,49773,49799,12,49801,49827,12,49829,49855,12,49857,49883,12,49885,49911,12,49913,49939,12,49941,49967,12,49969,49995,12,49997,50023,12,50025,50051,12,50053,50079,12,50081,50107,12,50109,50135,12,50137,50163,12,50165,50191,12,50193,50219,12,50221,50247,12,50249,50275,12,50277,50303,12,50305,50331,12,50333,50359,12,50361,50387,12,50389,50415,12,50417,50443,12,50445,50471,12,50473,50499,12,50501,50527,12,50529,50555,12,50557,50583,12,50585,50611,12,50613,50639,12,50641,50667,12,50669,50695,12,50697,50723,12,50725,50751,12,50753,50779,12,50781,50807,12,50809,50835,12,50837,50863,12,50865,50891,12,50893,50919,12,50921,50947,12,50949,50975,12,50977,51003,12,51005,51031,12,51033,51059,12,51061,51087,12,51089,51115,12,51117,51143,12,51145,51171,12,51173,51199,12,51201,51227,12,51229,51255,12,51257,51283,12,51285,51311,12,51313,51339,12,51341,51367,12,51369,51395,12,51397,51423,12,51425,51451,12,51453,51479,12,51481,51507,12,51509,51535,12,51537,51563,12,51565,51591,12,51593,51619,12,51621,51647,12,51649,51675,12,51677,51703,12,51705,51731,12,51733,51759,12,51761,51787,12,51789,51815,12,51817,51843,12,51845,51871,12,51873,51899,12,51901,51927,12,51929,51955,12,51957,51983,12,51985,52011,12,52013,52039,12,52041,52067,12,52069,52095,12,52097,52123,12,52125,52151,12,52153,52179,12,52181,52207,12,52209,52235,12,52237,52263,12,52265,52291,12,52293,52319,12,52321,52347,12,52349,52375,12,52377,52403,12,52405,52431,12,52433,52459,12,52461,52487,12,52489,52515,12,52517,52543,12,52545,52571,12,52573,52599,12,52601,52627,12,52629,52655,12,52657,52683,12,52685,52711,12,52713,52739,12,52741,52767,12,52769,52795,12,52797,52823,12,52825,52851,12,52853,52879,12,52881,52907,12,52909,52935,12,52937,52963,12,52965,52991,12,52993,53019,12,53021,53047,12,53049,53075,12,53077,53103,12,53105,53131,12,53133,53159,12,53161,53187,12,53189,53215,12,53217,53243,12,53245,53271,12,53273,53299,12,53301,53327,12,53329,53355,12,53357,53383,12,53385,53411,12,53413,53439,12,53441,53467,12,53469,53495,12,53497,53523,12,53525,53551,12,53553,53579,12,53581,53607,12,53609,53635,12,53637,53663,12,53665,53691,12,53693,53719,12,53721,53747,12,53749,53775,12,53777,53803,12,53805,53831,12,53833,53859,12,53861,53887,12,53889,53915,12,53917,53943,12,53945,53971,12,53973,53999,12,54001,54027,12,54029,54055,12,54057,54083,12,54085,54111,12,54113,54139,12,54141,54167,12,54169,54195,12,54197,54223,12,54225,54251,12,54253,54279,12,54281,54307,12,54309,54335,12,54337,54363,12,54365,54391,12,54393,54419,12,54421,54447,12,54449,54475,12,54477,54503,12,54505,54531,12,54533,54559,12,54561,54587,12,54589,54615,12,54617,54643,12,54645,54671,12,54673,54699,12,54701,54727,12,54729,54755,12,54757,54783,12,54785,54811,12,54813,54839,12,54841,54867,12,54869,54895,12,54897,54923,12,54925,54951,12,54953,54979,12,54981,55007,12,55009,55035,12,55037,55063,12,55065,55091,12,55093,55119,12,55121,55147,12,55149,55175,12,55177,55203,12,55243,55291,10,65024,65039,5,65279,65279,4,65520,65528,4,66045,66045,5,66422,66426,5,68101,68102,5,68152,68154,5,68325,68326,5,69291,69292,5,69632,69632,7,69634,69634,7,69759,69761,5]")}function j(O,ue){if(O===0)return 0;const De=Ne(O,ue);if(De!==void 0)return De;const Ae=te(ue,O);return O-=Ze(Ae),O}function Ne(O,ue){let De=te(ue,O);for(O-=Ze(De);ee(De)||De===65039||De===8419;){if(O===0)return;De=te(ue,O),O-=Ze(De)}if(rn(De)){if(O>=0){const Ae=te(ue,O);Ae===8205&&(O-=Ze(Ae))}return O}}function Ze(O){return O>=65536?2:1}function ee(O){return 127995<=O&&O<=127999}},72999:function(Vn,ct,x){"use strict";x.d(ct,{$E:function(){return R},$K:function(){return ye},D8:function(){return _},HD:function(){return fe},IU:function(){return M},Jp:function(){return le},Kn:function(){return Ce},cW:function(){return S},f6:function(){return H},hj:function(){return ge},jn:function(){return G},kJ:function(){return V},mf:function(){return U},o8:function(){return g},p_:function(){return o},vE:function(){return J}});function V(T){return Array.isArray(T)}function fe(T){return typeof T=="string"}function Ce(T){return typeof T=="object"&&T!==null&&!Array.isArray(T)&&!(T instanceof RegExp)&&!(T instanceof Date)}function ge(T){return typeof T=="number"&&!isNaN(T)}function G(T){return T===!0||T===!1}function g(T){return typeof T=="undefined"}function ye(T){return!le(T)}function le(T){return g(T)||T===null}function o(T,N){if(!T)throw new Error(N?`Unexpected type, expected '${N}'`:"Unexpected type")}function S(T){if(le(T))throw new Error("Assertion Failed: argument is undefined or null");return T}function U(T){return typeof T=="function"}function _(T,N){const P=Math.min(T.length,N.length);for(let k=0;k<P;k++)w(T[k],N[k])}function w(T,N){if(fe(N)){if(typeof T!==N)throw new Error(`argument does not match constraint: typeof ${N}`)}else if(U(N)){try{if(T instanceof N)return}catch(P){}if(!le(T)&&T.constructor===N||N.length===1&&N.call(void 0,T)===!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(T){let N=[],P=Object.getPrototypeOf(T);for(;Object.prototype!==P;)N=N.concat(Object.getOwnPropertyNames(P)),P=Object.getPrototypeOf(P);return N}function R(T){const N=[];for(const P of b(T))typeof T[P]=="function"&&N.push(P);return N}function M(T,N){const P=oe=>function(){const de=Array.prototype.slice.call(arguments,0);return N(oe,de)};let k={};for(const oe of T)k[oe]=P(oe);return k}function H(T){return T===null?void 0:T}function J(T,N="Unreachable"){throw new Error(N)}},13268:function(Vn,ct,x){"use strict";x.d(ct,{N:function(){return fe}});function V(Ce,ge){let G;return ge.length===0?G=Ce:G=Ce.replace(/\{(\d+)\}/g,function(g,ye){const le=ye[0];return typeof ge[le]!="undefined"?ge[le]:g}),G}function fe(Ce,ge,...G){return V(ge,G)}},96236:function(Vn,ct,x){"use strict";x.d(ct,{BH:function(){return M},NZ:function(){return H},U8:function(){return J},co:function(){return R},eH:function(){return b},vr:function(){return w}});var V=x(75918),fe=x(52615),Ce=x(4348),ge=x(88226),G=x(69323),g=x(34502),ye=x(35884),le=x(90689),o=x(16925),S=x(49055),U=function(T,N,P,k){var oe=arguments.length,de=oe<3?N:k===null?k=Object.getOwnPropertyDescriptor(N,P):k,ie;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")de=Reflect.decorate(T,N,P,k);else for(var ae=T.length-1;ae>=0;ae--)(ie=T[ae])&&(de=(oe<3?ie(de):oe>3?ie(N,P,de):ie(N,P))||de);return oe>3&&de&&Object.defineProperty(N,P,de),de},_=function(T,N){return function(P,k){N(P,k,T)}};function w(T){return T.command!==void 0}class b{constructor(N){this.id=b._idPool++,this._debugName=N}}b._idPool=0,b.CommandPalette=new b("CommandPalette"),b.EditorContext=new b("EditorContext"),b.SimpleEditorContext=new b("SimpleEditorContext"),b.EditorContextCopy=new b("EditorContextCopy"),b.EditorContextPeek=new b("EditorContextPeek"),b.MenubarEditMenu=new b("MenubarEditMenu"),b.MenubarCopy=new b("MenubarCopy"),b.MenubarGoMenu=new b("MenubarGoMenu"),b.MenubarSelectionMenu=new b("MenubarSelectionMenu"),b.InlineCompletionsActions=new b("InlineCompletionsActions");const R=(0,o.yh)("menuService"),M=new class{constructor(){this._commands=new Map,this._menuItems=new Map,this._onDidChangeMenu=new Ce.Q5,this.onDidChangeMenu=this._onDidChangeMenu.event,this._commandPaletteChangeEvent={has:T=>T===b.CommandPalette}}addCommand(T){return this.addCommands(ge.$.single(T))}addCommands(T){for(const N of T)this._commands.set(N.id,N);return this._onDidChangeMenu.fire(this._commandPaletteChangeEvent),(0,G.OF)(()=>{let N=!1;for(const P of T)N=this._commands.delete(P.id)||N;N&&this._onDidChangeMenu.fire(this._commandPaletteChangeEvent)})}getCommand(T){return this._commands.get(T)}getCommands(){const T=new Map;return this._commands.forEach((N,P)=>T.set(P,N)),T}appendMenuItem(T,N){return this.appendMenuItems(ge.$.single({id:T,item:N}))}appendMenuItems(T){const N=new Set,P=new g.S;for(const{id:k,item:oe}of T){let de=this._menuItems.get(k);de||(de=new g.S,this._menuItems.set(k,de)),P.push(de.push(oe)),N.add(k)}return this._onDidChangeMenu.fire(N),(0,G.OF)(()=>{if(P.size>0){for(let k of P)k();this._onDidChangeMenu.fire(N),P.clear()}})}getMenuItems(T){let N;return this._menuItems.has(T)?N=[...this._menuItems.get(T)]:N=[],T===b.CommandPalette&&this._appendImplicitItems(N),N}_appendImplicitItems(T){const N=new Set;for(const P of T)w(P)&&(N.add(P.command.id),P.alt&&N.add(P.alt.id));this._commands.forEach((P,k)=>{N.has(k)||T.push({command:P})})}};class H extends V.wY{constructor(N,P,k,oe){super(`submenuitem.${N.submenu.id}`,typeof N.title=="string"?N.title:N.title.value,[],"submenu"),this.item=N,this._menuService=P,this._contextKeyService=k,this._options=oe}get actions(){const N=[],P=this._menuService.createMenu(this.item.submenu,this._contextKeyService),k=P.getActions(this._options);P.dispose();for(const[,oe]of k)oe.length>0&&(N.push(...oe),N.push(new V.Z0));return N.length&&N.pop(),N}}let J=class Mc{constructor(N,P,k,oe,de){var ie,ae;if(this._commandService=de,this.id=N.id,this.label=k!=null&&k.renderShortTitle&&N.shortTitle?typeof N.shortTitle=="string"?N.shortTitle:N.shortTitle.value:typeof N.title=="string"?N.title:N.title.value,this.tooltip=(ae=typeof N.tooltip=="string"?N.tooltip:(ie=N.tooltip)===null||ie===void 0?void 0:ie.value)!==null&&ae!==void 0?ae:"",this.enabled=!N.precondition||oe.contextMatchesRules(N.precondition),this.checked=void 0,N.toggled){const we=N.toggled.condition?N.toggled:{condition:N.toggled};this.checked=oe.contextMatchesRules(we.condition),this.checked&&we.tooltip&&(this.tooltip=typeof we.tooltip=="string"?we.tooltip:we.tooltip.value),we.title&&(this.label=typeof we.title=="string"?we.title:we.title.value)}this.item=N,this.alt=P?new Mc(P,void 0,k,oe,de):void 0,this._options=k,S.kS.isThemeIcon(N.icon)&&(this.class=fe.dT.asClassName(N.icon))}dispose(){}run(...N){var P,k;let oe=[];return!((P=this._options)===null||P===void 0)&&P.arg&&(oe=[...oe,this._options.arg]),!((k=this._options)===null||k===void 0)&&k.shouldForwardArgs&&(oe=[...oe,...N]),this._commandService.executeCommand(this.id,...oe)}};J=U([_(3,le.i6),_(4,ye.H)],J)},35884:function(Vn,ct,x){"use strict";x.d(ct,{H:function(){return ye},P:function(){return le}});var V=x(4348),fe=x(88226),Ce=x(69323),ge=x(34502),G=x(72999),g=x(16925);const ye=(0,g.yh)("commandService"),le=new class{constructor(){this._commands=new Map,this._onDidRegisterCommand=new V.Q5,this.onDidRegisterCommand=this._onDidRegisterCommand.event}registerCommand(o,S){if(!o)throw new Error("invalid command");if(typeof o=="string"){if(!S)throw new Error("invalid command");return this.registerCommand({id:o,handler:S})}if(o.description){const R=[];for(let H of o.description.args)R.push(H.constraint);const M=o.handler;o.handler=function(H,...J){return(0,G.D8)(J,R),M(H,...J)}}const{id:U}=o;let _=this._commands.get(U);_||(_=new ge.S,this._commands.set(U,_));let w=_.unshift(o),b=(0,Ce.OF)(()=>{w();const R=this._commands.get(U);R!=null&&R.isEmpty()&&this._commands.delete(U)});return this._onDidRegisterCommand.fire(U),b}registerCommandAlias(o,S){return le.registerCommand(o,(U,..._)=>U.get(ye).executeCommand(S,..._))}getCommand(o){const S=this._commands.get(o);if(!(!S||S.isEmpty()))return fe.$.first(S)}getCommands(){const o=new Map;for(const S of this._commands.keys()){const U=this.getCommand(S);U&&o.set(S,U)}return o}};le.registerCommand("noop",()=>{})},90689:function(Vn,ct,x){"use strict";x.d(ct,{Ao:function(){return ye},Eq:function(){return Y},Fb:function(){return le},K8:function(){return q},i6:function(){return Re},uy:function(){return Te}});var V=x(23345),fe=x(82983),Ce=x(16925);let ge=V.WE||"";const G=new Map;G.set("false",!1),G.set("true",!0),G.set("isMac",V.dz),G.set("isLinux",V.IJ),G.set("isWindows",V.ED),G.set("isWeb",V.$L),G.set("isMacNative",V.dz&&!V.$L),G.set("isEdge",ge.indexOf("Edg/")>=0),G.set("isFirefox",ge.indexOf("Firefox")>=0),G.set("isChrome",ge.indexOf("Chrome")>=0),G.set("isSafari",ge.indexOf("Safari")>=0);const g=Object.prototype.hasOwnProperty;class ye{static has(E){return _.create(E)}static equals(E,C){return w.create(E,C)}static regex(E,C){return oe.create(E,C)}static not(E){return H.create(E)}static and(...E){return ae.create(E,null)}static or(...E){return we.create(E,null,!0)}static deserialize(E,C=!1){if(E)return this._deserializeOrExpression(E,C)}static _deserializeOrExpression(E,C){let W=E.split("||");return we.create(W.map(be=>this._deserializeAndExpression(be,C)),null,!0)}static _deserializeAndExpression(E,C){let W=E.split("&&");return ae.create(W.map(be=>this._deserializeOne(be,C)),null)}static _deserializeOne(E,C){if(E=E.trim(),E.indexOf("!=")>=0){let W=E.split("!=");return M.create(W[0].trim(),this._deserializeValue(W[1],C))}if(E.indexOf("==")>=0){let W=E.split("==");return w.create(W[0].trim(),this._deserializeValue(W[1],C))}if(E.indexOf("=~")>=0){let W=E.split("=~");return oe.create(W[0].trim(),this._deserializeRegexValue(W[1],C))}if(E.indexOf(" in ")>=0){let W=E.split(" in ");return b.create(W[0].trim(),W[1].trim())}if(/^[^<=>]+>=[^<=>]+$/.test(E)){const W=E.split(">=");return N.create(W[0].trim(),W[1].trim())}if(/^[^<=>]+>[^<=>]+$/.test(E)){const W=E.split(">");return T.create(W[0].trim(),W[1].trim())}if(/^[^<=>]+<=[^<=>]+$/.test(E)){const W=E.split("<=");return k.create(W[0].trim(),W[1].trim())}if(/^[^<=>]+<[^<=>]+$/.test(E)){const W=E.split("<");return P.create(W[0].trim(),W[1].trim())}return/^\!\s*/.test(E)?H.create(E.substr(1).trim()):_.create(E)}static _deserializeValue(E,C){if(E=E.trim(),E==="true")return!0;if(E==="false")return!1;let W=/^'([^']*)'$/.exec(E);return W?W[1].trim():E}static _deserializeRegexValue(E,C){if((0,fe.m5)(E)){if(C)throw new Error("missing regexp-value for =~-expression");return console.warn("missing regexp-value for =~-expression"),null}let W=E.indexOf("/"),be=E.lastIndexOf("/");if(W===be||W<0){if(C)throw new Error(`bad regexp-value '${E}', missing /-enclosure`);return console.warn(`bad regexp-value '${E}', missing /-enclosure`),null}let Ve=E.slice(W+1,be),Ke=E[be+1]==="i"?"i":"";try{return new RegExp(Ve,Ke)}catch(Ct){if(C)throw new Error(`bad regexp-value '${E}', parse error: ${Ct}`);return console.warn(`bad regexp-value '${E}', parse error: ${Ct}`),null}}}function le(re,E){const C=re?re.substituteConstants():void 0,W=E?E.substituteConstants():void 0;return!C&&!W?!0:!C||!W?!1:C.equals(W)}function o(re,E){return re.cmp(E)}class S{constructor(){this.type=0}cmp(E){return this.type-E.type}equals(E){return E.type===this.type}substituteConstants(){return this}evaluate(E){return!1}serialize(){return"false"}keys(){return[]}negate(){return U.INSTANCE}}S.INSTANCE=new S;class U{constructor(){this.type=1}cmp(E){return this.type-E.type}equals(E){return E.type===this.type}substituteConstants(){return this}evaluate(E){return!0}serialize(){return"true"}keys(){return[]}negate(){return S.INSTANCE}}U.INSTANCE=new U;class _{constructor(E,C){this.key=E,this.negated=C,this.type=2}static create(E,C=null){const W=G.get(E);return typeof W=="boolean"?W?U.INSTANCE:S.INSTANCE:new _(E,C)}cmp(E){return E.type!==this.type?this.type-E.type:$(this.key,E.key)}equals(E){return E.type===this.type?this.key===E.key:!1}substituteConstants(){const E=G.get(this.key);return typeof E=="boolean"?E?U.INSTANCE:S.INSTANCE:this}evaluate(E){return!!E.getValue(this.key)}serialize(){return this.key}keys(){return[this.key]}negate(){return this.negated||(this.negated=H.create(this.key,this)),this.negated}}class w{constructor(E,C,W){this.key=E,this.value=C,this.negated=W,this.type=4}static create(E,C,W=null){if(typeof C=="boolean")return C?_.create(E,W):H.create(E,W);const be=G.get(E);return typeof be=="boolean"?C===(be?"true":"false")?U.INSTANCE:S.INSTANCE:new w(E,C,W)}cmp(E){return E.type!==this.type?this.type-E.type:te(this.key,this.value,E.key,E.value)}equals(E){return E.type===this.type?this.key===E.key&&this.value===E.value:!1}substituteConstants(){const E=G.get(this.key);if(typeof E=="boolean"){const C=E?"true":"false";return this.value===C?U.INSTANCE:S.INSTANCE}return this}evaluate(E){return E.getValue(this.key)==this.value}serialize(){return`${this.key} == '${this.value}'`}keys(){return[this.key]}negate(){return this.negated||(this.negated=M.create(this.key,this.value,this)),this.negated}}class b{constructor(E,C){this.key=E,this.valueKey=C,this.type=10,this.negated=null}static create(E,C){return new b(E,C)}cmp(E){return E.type!==this.type?this.type-E.type:te(this.key,this.valueKey,E.key,E.valueKey)}equals(E){return E.type===this.type?this.key===E.key&&this.valueKey===E.valueKey:!1}substituteConstants(){return this}evaluate(E){const C=E.getValue(this.valueKey),W=E.getValue(this.key);return Array.isArray(C)?C.indexOf(W)>=0:typeof W=="string"&&typeof C=="object"&&C!==null?g.call(C,W):!1}serialize(){return`${this.key} in '${this.valueKey}'`}keys(){return[this.key,this.valueKey]}negate(){return this.negated||(this.negated=R.create(this)),this.negated}}class R{constructor(E){this._actual=E,this.type=11}static create(E){return new R(E)}cmp(E){return E.type!==this.type?this.type-E.type:this._actual.cmp(E._actual)}equals(E){return E.type===this.type?this._actual.equals(E._actual):!1}substituteConstants(){return this}evaluate(E){return!this._actual.evaluate(E)}serialize(){throw new Error("Method not implemented.")}keys(){return this._actual.keys()}negate(){return this._actual}}class M{constructor(E,C,W){this.key=E,this.value=C,this.negated=W,this.type=5}static create(E,C,W=null){if(typeof C=="boolean")return C?H.create(E,W):_.create(E,W);const be=G.get(E);return typeof be=="boolean"?C===(be?"true":"false")?S.INSTANCE:U.INSTANCE:new M(E,C,W)}cmp(E){return E.type!==this.type?this.type-E.type:te(this.key,this.value,E.key,E.value)}equals(E){return E.type===this.type?this.key===E.key&&this.value===E.value:!1}substituteConstants(){const E=G.get(this.key);if(typeof E=="boolean"){const C=E?"true":"false";return this.value===C?S.INSTANCE:U.INSTANCE}return this}evaluate(E){return E.getValue(this.key)!=this.value}serialize(){return`${this.key} != '${this.value}'`}keys(){return[this.key]}negate(){return this.negated||(this.negated=w.create(this.key,this.value,this)),this.negated}}class H{constructor(E,C){this.key=E,this.negated=C,this.type=3}static create(E,C=null){const W=G.get(E);return typeof W=="boolean"?W?S.INSTANCE:U.INSTANCE:new H(E,C)}cmp(E){return E.type!==this.type?this.type-E.type:$(this.key,E.key)}equals(E){return E.type===this.type?this.key===E.key:!1}substituteConstants(){const E=G.get(this.key);return typeof E=="boolean"?E?S.INSTANCE:U.INSTANCE:this}evaluate(E){return!E.getValue(this.key)}serialize(){return`!${this.key}`}keys(){return[this.key]}negate(){return this.negated||(this.negated=_.create(this.key,this)),this.negated}}function J(re,E){if(typeof re=="string"){const C=parseFloat(re);isNaN(C)||(re=C)}return typeof re=="string"||typeof re=="number"?E(re):S.INSTANCE}class T{constructor(E,C,W){this.key=E,this.value=C,this.negated=W,this.type=12}static create(E,C,W=null){return J(C,be=>new T(E,be,W))}cmp(E){return E.type!==this.type?this.type-E.type:te(this.key,this.value,E.key,E.value)}equals(E){return E.type===this.type?this.key===E.key&&this.value===E.value:!1}substituteConstants(){return this}evaluate(E){return typeof this.value=="string"?!1:parseFloat(E.getValue(this.key))>this.value}serialize(){return`${this.key} > ${this.value}`}keys(){return[this.key]}negate(){return this.negated||(this.negated=k.create(this.key,this.value,this)),this.negated}}class N{constructor(E,C,W){this.key=E,this.value=C,this.negated=W,this.type=13}static create(E,C,W=null){return J(C,be=>new N(E,be,W))}cmp(E){return E.type!==this.type?this.type-E.type:te(this.key,this.value,E.key,E.value)}equals(E){return E.type===this.type?this.key===E.key&&this.value===E.value:!1}substituteConstants(){return this}evaluate(E){return typeof this.value=="string"?!1:parseFloat(E.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 P{constructor(E,C,W){this.key=E,this.value=C,this.negated=W,this.type=14}static create(E,C,W=null){return J(C,be=>new P(E,be,W))}cmp(E){return E.type!==this.type?this.type-E.type:te(this.key,this.value,E.key,E.value)}equals(E){return E.type===this.type?this.key===E.key&&this.value===E.value:!1}substituteConstants(){return this}evaluate(E){return typeof this.value=="string"?!1:parseFloat(E.getValue(this.key))<this.value}serialize(){return`${this.key} < ${this.value}`}keys(){return[this.key]}negate(){return this.negated||(this.negated=N.create(this.key,this.value,this)),this.negated}}class k{constructor(E,C,W){this.key=E,this.value=C,this.negated=W,this.type=15}static create(E,C,W=null){return J(C,be=>new k(E,be,W))}cmp(E){return E.type!==this.type?this.type-E.type:te(this.key,this.value,E.key,E.value)}equals(E){return E.type===this.type?this.key===E.key&&this.value===E.value:!1}substituteConstants(){return this}evaluate(E){return typeof this.value=="string"?!1:parseFloat(E.getValue(this.key))<=this.value}serialize(){return`${this.key} <= ${this.value}`}keys(){return[this.key]}negate(){return this.negated||(this.negated=T.create(this.key,this.value,this)),this.negated}}class oe{constructor(E,C){this.key=E,this.regexp=C,this.type=7,this.negated=null}static create(E,C){return new oe(E,C)}cmp(E){if(E.type!==this.type)return this.type-E.type;if(this.key<E.key)return-1;if(this.key>E.key)return 1;const C=this.regexp?this.regexp.source:"",W=E.regexp?E.regexp.source:"";return C<W?-1:C>W?1:0}equals(E){if(E.type===this.type){const C=this.regexp?this.regexp.source:"",W=E.regexp?E.regexp.source:"";return this.key===E.key&&C===W}return!1}substituteConstants(){return this}evaluate(E){let C=E.getValue(this.key);return this.regexp?this.regexp.test(C):!1}serialize(){const E=this.regexp?`/${this.regexp.source}/${this.regexp.ignoreCase?"i":""}`:"/invalid/";return`${this.key} =~ ${E}`}keys(){return[this.key]}negate(){return this.negated||(this.negated=de.create(this)),this.negated}}class de{constructor(E){this._actual=E,this.type=8}static create(E){return new de(E)}cmp(E){return E.type!==this.type?this.type-E.type:this._actual.cmp(E._actual)}equals(E){return E.type===this.type?this._actual.equals(E._actual):!1}substituteConstants(){return this}evaluate(E){return!this._actual.evaluate(E)}serialize(){throw new Error("Method not implemented.")}keys(){return this._actual.keys()}negate(){return this._actual}}function ie(re){let E=null;for(let C=0,W=re.length;C<W;C++){const be=re[C].substituteConstants();if(re[C]!==be&&E===null){E=[];for(let Ve=0;Ve<C;Ve++)E[Ve]=re[Ve]}E!==null&&(E[C]=be)}return E===null?re:E}class ae{constructor(E,C){this.expr=E,this.negated=C,this.type=6}static create(E,C){return ae._normalizeArr(E,C)}cmp(E){if(E.type!==this.type)return this.type-E.type;if(this.expr.length<E.expr.length)return-1;if(this.expr.length>E.expr.length)return 1;for(let C=0,W=this.expr.length;C<W;C++){const be=o(this.expr[C],E.expr[C]);if(be!==0)return be}return 0}equals(E){if(E.type===this.type){if(this.expr.length!==E.expr.length)return!1;for(let C=0,W=this.expr.length;C<W;C++)if(!this.expr[C].equals(E.expr[C]))return!1;return!0}return!1}substituteConstants(){const E=ie(this.expr);return E===this.expr?this:ae.create(E,this.negated)}evaluate(E){for(let C=0,W=this.expr.length;C<W;C++)if(!this.expr[C].evaluate(E))return!1;return!0}static _normalizeArr(E,C){const W=[];let be=!1;for(const Ve of E)if(Ve){if(Ve.type===1){be=!0;continue}if(Ve.type===0)return S.INSTANCE;if(Ve.type===6){W.push(...Ve.expr);continue}W.push(Ve)}if(W.length===0&&be)return U.INSTANCE;if(W.length!==0){if(W.length===1)return W[0];W.sort(o);for(let Ve=1;Ve<W.length;Ve++)W[Ve-1].equals(W[Ve])&&(W.splice(Ve,1),Ve--);if(W.length===1)return W[0];for(;W.length>1;){const Ve=W[W.length-1];if(Ve.type!==9)break;W.pop();const Ke=W.pop(),Ct=W.length===0,Rt=we.create(Ve.expr.map(Vt=>ae.create([Vt,Ke],null)),null,Ct);Rt&&(W.push(Rt),W.sort(o))}return W.length===1?W[0]:new ae(W,C)}}serialize(){return this.expr.map(E=>E.serialize()).join(" && ")}keys(){const E=[];for(let C of this.expr)E.push(...C.keys());return E}negate(){if(!this.negated){const E=[];for(let C of this.expr)E.push(C.negate());this.negated=we.create(E,this,!0)}return this.negated}}class we{constructor(E,C){this.expr=E,this.negated=C,this.type=9}static create(E,C,W){return we._normalizeArr(E,C,W)}cmp(E){if(E.type!==this.type)return this.type-E.type;if(this.expr.length<E.expr.length)return-1;if(this.expr.length>E.expr.length)return 1;for(let C=0,W=this.expr.length;C<W;C++){const be=o(this.expr[C],E.expr[C]);if(be!==0)return be}return 0}equals(E){if(E.type===this.type){if(this.expr.length!==E.expr.length)return!1;for(let C=0,W=this.expr.length;C<W;C++)if(!this.expr[C].equals(E.expr[C]))return!1;return!0}return!1}substituteConstants(){const E=ie(this.expr);return E===this.expr?this:we.create(E,this.negated,!1)}evaluate(E){for(let C=0,W=this.expr.length;C<W;C++)if(this.expr[C].evaluate(E))return!0;return!1}static _normalizeArr(E,C,W){let be=[],Ve=!1;if(E){for(let Ke=0,Ct=E.length;Ke<Ct;Ke++){const Rt=E[Ke];if(Rt){if(Rt.type===0){Ve=!0;continue}if(Rt.type===1)return U.INSTANCE;if(Rt.type===9){be=be.concat(Rt.expr);continue}be.push(Rt)}}if(be.length===0&&Ve)return S.INSTANCE;be.sort(o)}if(be.length!==0){if(be.length===1)return be[0];for(let Ke=1;Ke<be.length;Ke++)be[Ke-1].equals(be[Ke])&&(be.splice(Ke,1),Ke--);if(be.length===1)return be[0];if(W){for(let Ke=0;Ke<be.length;Ke++)for(let Ct=Ke+1;Ct<be.length;Ct++)q(be[Ke],be[Ct])&&(be.splice(Ct,1),Ct--);if(be.length===1)return be[0]}return new we(be,C)}}serialize(){return this.expr.map(E=>E.serialize()).join(" || ")}keys(){const E=[];for(let C of this.expr)E.push(...C.keys());return E}negate(){if(!this.negated){let E=[];for(let C of this.expr)E.push(C.negate());for(;E.length>1;){const C=E.shift(),W=E.shift(),be=[];for(const Ke of he(C))for(const Ct of he(W))be.push(ae.create([Ke,Ct],null));const Ve=E.length===0;E.unshift(we.create(be,null,Ve))}this.negated=E[0]}return this.negated}}class Te extends _{constructor(E,C,W){super(E,null),this._defaultValue=C,typeof W=="object"?Te._info.push(Object.assign(Object.assign({},W),{key:E})):W!==!0&&Te._info.push({key:E,description:W,type:C!=null?typeof C:void 0})}static all(){return Te._info.values()}bindTo(E){return E.createKey(this.key,this._defaultValue)}getValue(E){return E.getContextKeyValue(this.key)}toNegated(){return this.negate()}isEqualTo(E){return w.create(this.key,E)}}Te._info=[];const Re=(0,Ce.yh)("contextKeyService"),Y="setContext";function $(re,E){return re<E?-1:re>E?1:0}function te(re,E,C,W){return re<C?-1:re>C?1:E<W?-1:E>W?1:0}function q(re,E){if(E.type===6&&re.type!==9&&re.type!==6){for(const be of E.expr)if(re.equals(be))return!0}const C=re.negate(),W=he(C).concat(he(E));W.sort(o);for(let be=0;be<W.length;be++){const Ke=W[be].negate();for(let Ct=be+1;Ct<W.length;Ct++){const Rt=W[Ct];if(Ke.equals(Rt))return!0}}return!1}function he(re){return re.type===9?re.expr:[re]}},16925:function(Vn,ct,x){"use strict";x.d(ct,{I8:function(){return V},TG:function(){return fe},jt:function(){return G},yh:function(){return ge}});var V;(function(g){g.serviceIds=new Map,g.DI_TARGET="$di$target",g.DI_DEPENDENCIES="$di$dependencies";function ye(le){return le[g.DI_DEPENDENCIES]||[]}g.getServiceDependencies=ye})(V||(V={}));const fe=ge("instantiationService");function Ce(g,ye,le,o){ye[V.DI_TARGET]===ye?ye[V.DI_DEPENDENCIES].push({id:g,index:le,optional:o}):(ye[V.DI_DEPENDENCIES]=[{id:g,index:le,optional:o}],ye[V.DI_TARGET]=ye)}function ge(g){if(V.serviceIds.has(g))return V.serviceIds.get(g);const ye=function(le,o,S){if(arguments.length!==3)throw new Error("@IServiceName-decorator can only be used to decorate a parameter");Ce(ye,le,S,!1)};return ye.toString=()=>g,V.serviceIds.set(g,ye),ye}function G(g){return function(ye,le,o){if(arguments.length!==3)throw new Error("@optional-decorator can only be used to decorate a parameter");Ce(g,ye,o,!0)}}},44650:function(Vn,ct,x){"use strict";x.d(ct,{B:function(){return ge}});var V=x(76068),fe=x(72999);class Ce{constructor(){this.data=new Map}add(g,ye){V.ok(fe.HD(g)),V.ok(fe.Kn(ye)),V.ok(!this.data.has(g),"There is already an extension with this id"),this.data.set(g,ye)}as(g){return this.data.get(g)||null}}const ge=new Ce},66213:function(Vn,ct,x){"use strict";x.d(ct,{e:function(){return V}});var V;(function(fe){fe.DARK="dark",fe.LIGHT="light",fe.HIGH_CONTRAST="hc"})(V||(V={}))},49055:function(Vn,ct,x){"use strict";x.d(ct,{EN:function(){return o},IP:function(){return _},Ic:function(){return R},XE:function(){return ye},bB:function(){return M},kS:function(){return S},m6:function(){return U}});var V=x(52615),fe=x(4348),Ce=x(69323),ge=x(16925),G=x(44650),g=x(66213);const ye=(0,ge.yh)("themeService");var le;(function(H){function J(T){return T&&typeof T=="object"&&typeof T.id=="string"}H.isThemeColor=J})(le||(le={}));function o(H){return{id:H}}var S;(function(H){function J(de){return de&&typeof de=="object"&&typeof de.id=="string"&&(typeof de.color=="undefined"||le.isThemeColor(de.color))}H.isThemeIcon=J;const T=new RegExp(`^\\$\\((${V.dT.iconNameExpression}(?:${V.dT.iconModifierExpression})?)\\)$`);function N(de){const ie=T.exec(de);if(!ie)return;let[,ae]=ie;return{id:ae}}H.fromString=N;function P(de,ie){let ae=de.id;const we=ae.lastIndexOf("~");return we!==-1&&(ae=ae.substring(0,we)),ie&&(ae=`${ae}~${ie}`),{id:ae}}H.modify=P;function k(de,ie){var ae,we;return de.id===ie.id&&((ae=de.color)===null||ae===void 0?void 0:ae.id)===((we=ie.color)===null||we===void 0?void 0:we.id)}H.isEqual=k;function oe(de,ie){return{id:de.id,color:ie?o(ie):void 0}}H.asThemeIcon=oe,H.asClassNameArray=V.dT.asClassNameArray,H.asClassName=V.dT.asClassName,H.asCSSSelector=V.dT.asCSSSelector})(S||(S={}));function U(H){switch(H){case g.e.DARK:return"vs-dark";case g.e.HIGH_CONTRAST:return"hc-black";default:return"vs"}}const _={ThemingContribution:"base.contributions.theming"};class w{constructor(){this.themingParticipants=[],this.themingParticipants=[],this.onThemingParticipantAddedEmitter=new fe.Q5}onColorThemeChange(J){return this.themingParticipants.push(J),this.onThemingParticipantAddedEmitter.fire(J),(0,Ce.OF)(()=>{const T=this.themingParticipants.indexOf(J);this.themingParticipants.splice(T,1)})}getThemingParticipants(){return this.themingParticipants}}let b=new w;G.B.add(_.ThemingContribution,b);function R(H){return b.onColorThemeChange(H)}class M extends Ce.JT{constructor(J){super(),this.themeService=J,this.theme=J.getColorTheme(),this._register(this.themeService.onDidColorThemeChange(T=>this.onThemeChange(T)))}onThemeChange(J){this.theme=J,this.updateStyles()}updateStyles(){}}},16632:function(Vn,ct,x){"use strict";var V=x(32855),fe=x(27247),Ce=x(74430),ge=x(11913),G=x(43079),g=x(92310),ye=x.n(g),le=x(18929),o=x(59301),S=["prefixCls","className","style","checked","disabled","defaultChecked","type","title","onChange"],U=(0,o.forwardRef)(function(_,w){var b=_.prefixCls,R=b===void 0?"rc-checkbox":b,M=_.className,H=_.style,J=_.checked,T=_.disabled,N=_.defaultChecked,P=N===void 0?!1:N,k=_.type,oe=k===void 0?"checkbox":k,de=_.title,ie=_.onChange,ae=(0,G.Z)(_,S),we=(0,o.useRef)(null),Te=(0,o.useRef)(null),Re=(0,le.Z)(P,{value:J}),Y=(0,ge.Z)(Re,2),$=Y[0],te=Y[1];(0,o.useImperativeHandle)(w,function(){return{focus:function(E){var C;(C=we.current)===null||C===void 0||C.focus(E)},blur:function(){var E;(E=we.current)===null||E===void 0||E.blur()},input:we.current,nativeElement:Te.current}});var q=ye()(R,M,(0,Ce.Z)((0,Ce.Z)({},"".concat(R,"-checked"),$),"".concat(R,"-disabled"),T)),he=function(E){T||("checked"in _||te(E.target.checked),ie==null||ie({target:(0,fe.Z)((0,fe.Z)({},_),{},{type:oe,checked:E.target.checked}),stopPropagation:function(){E.stopPropagation()},preventDefault:function(){E.preventDefault()},nativeEvent:E.nativeEvent}))};return o.createElement("span",{className:q,title:de,style:H,ref:Te},o.createElement("input",(0,V.Z)({},ae,{className:"".concat(R,"-input"),ref:we,onChange:he,disabled:T,checked:!!$,type:oe})),o.createElement("span",{className:"".concat(R,"-inner")}))});ct.Z=U},96478:function(Vn,ct,x){"use strict";x.d(ct,{Z:function(){return de}});var V=x(32855),fe=x(74430),Ce=x(11913),ge=x(43079),G=x(65030),g=x(92310),ye=x.n(g),le=x(8654),o=x(59301),S=x(10228),U=x(16089),_=S.Z.ESC,w=S.Z.TAB;function b(ie){var ae=ie.visible,we=ie.triggerRef,Te=ie.onVisibleChange,Re=ie.autoFocus,Y=ie.overlayRef,$=o.useRef(!1),te=function(){if(ae){var E,C;(E=we.current)===null||E===void 0||(C=E.focus)===null||C===void 0||C.call(E),Te==null||Te(!1)}},q=function(){var E;return(E=Y.current)!==null&&E!==void 0&&E.focus?(Y.current.focus(),$.current=!0,!0):!1},he=function(E){switch(E.keyCode){case _:te();break;case w:{var C=!1;$.current||(C=q()),C?E.preventDefault():te();break}}};o.useEffect(function(){return ae?(window.addEventListener("keydown",he),Re&&(0,U.Z)(q,3),function(){window.removeEventListener("keydown",he),$.current=!1}):function(){$.current=!1}},[ae])}var R=(0,o.forwardRef)(function(ie,ae){var we=ie.overlay,Te=ie.arrow,Re=ie.prefixCls,Y=(0,o.useMemo)(function(){var te;return typeof we=="function"?te=we():te=we,te},[we]),$=(0,le.sQ)(ae,(0,le.C4)(Y));return o.createElement(o.Fragment,null,Te&&o.createElement("div",{className:"".concat(Re,"-arrow")}),o.cloneElement(Y,{ref:(0,le.Yr)(Y)?$:void 0}))}),M=R,H={adjustX:1,adjustY:1},J=[0,0],T={topLeft:{points:["bl","tl"],overflow:H,offset:[0,-4],targetOffset:J},top:{points:["bc","tc"],overflow:H,offset:[0,-4],targetOffset:J},topRight:{points:["br","tr"],overflow:H,offset:[0,-4],targetOffset:J},bottomLeft:{points:["tl","bl"],overflow:H,offset:[0,4],targetOffset:J},bottom:{points:["tc","bc"],overflow:H,offset:[0,4],targetOffset:J},bottomRight:{points:["tr","br"],overflow:H,offset:[0,4],targetOffset:J}},N=T,P=["arrow","prefixCls","transitionName","animation","align","placement","placements","getPopupContainer","showAction","hideAction","overlayClassName","overlayStyle","visible","trigger","autoFocus","overlay","children","onVisibleChange"];function k(ie,ae){var we,Te=ie.arrow,Re=Te===void 0?!1:Te,Y=ie.prefixCls,$=Y===void 0?"rc-dropdown":Y,te=ie.transitionName,q=ie.animation,he=ie.align,re=ie.placement,E=re===void 0?"bottomLeft":re,C=ie.placements,W=C===void 0?N:C,be=ie.getPopupContainer,Ve=ie.showAction,Ke=ie.hideAction,Ct=ie.overlayClassName,Rt=ie.overlayStyle,Vt=ie.visible,rn=ie.trigger,He=rn===void 0?["hover"]:rn,ln=ie.autoFocus,It=ie.overlay,cn=ie.children,xt=ie.onVisibleChange,ht=(0,ge.Z)(ie,P),Oe=o.useState(),Fe=(0,Ce.Z)(Oe,2),j=Fe[0],Ne=Fe[1],Ze="visible"in ie?Vt:j,ee=o.useRef(null),O=o.useRef(null),ue=o.useRef(null);o.useImperativeHandle(ae,function(){return ee.current});var De=function(gt){Ne(gt),xt==null||xt(gt)};b({visible:Ze,triggerRef:ue,onVisibleChange:De,autoFocus:ln,overlayRef:O});var Ae=function(gt){var _t=ie.onOverlayClick;Ne(!1),_t&&_t(gt)},Be=function(){return o.createElement(M,{ref:O,overlay:It,prefixCls:$,arrow:Re})},Se=function(){return typeof It=="function"?Be:Be()},ot=function(){var gt=ie.minOverlayWidthMatchTrigger,_t=ie.alignPoint;return"minOverlayWidthMatchTrigger"in ie?gt:!_t},Xe=function(){var gt=ie.openClassName;return gt!==void 0?gt:"".concat($,"-open")},je=o.cloneElement(cn,{className:ye()((we=cn.props)===null||we===void 0?void 0:we.className,Ze&&Xe()),ref:(0,le.Yr)(cn)?(0,le.sQ)(ue,(0,le.C4)(cn)):void 0}),qe=Ke;return!qe&&He.indexOf("contextMenu")!==-1&&(qe=["click"]),o.createElement(G.Z,(0,V.Z)({builtinPlacements:W},ht,{prefixCls:$,ref:ee,popupClassName:ye()(Ct,(0,fe.Z)({},"".concat($,"-show-arrow"),Re)),popupStyle:Rt,action:He,showAction:Ve,hideAction:qe,popupPlacement:E,popupAlign:he,popupTransitionName:te,popupAnimation:q,popupVisible:Ze,stretch:ot()?"minWidth":"",popup:Se(),onPopupVisibleChange:De,onPopupClick:Ae,getPopupContainer:be}),je)}var oe=o.forwardRef(k),de=oe},66003:function(Vn,ct,x){"use strict";x.d(ct,{Z:function(){return ye}});var V=x(43079),fe=x(27247),Ce=x(34666),ge=x(59301),G=["show"];function g(le,o){if(!o.max)return!0;var S=o.strategy(le);return S<=o.max}function ye(le,o){return ge.useMemo(function(){var S={};o&&(S.show=(0,Ce.Z)(o)==="object"&&o.formatter?o.formatter:!!o),S=(0,fe.Z)((0,fe.Z)({},S),le);var U=S,_=U.show,w=(0,V.Z)(U,G);return(0,fe.Z)((0,fe.Z)({},w),{},{show:!!_,showFormatter:typeof _=="function"?_:void 0,strategy:w.strategy||function(b){return b.length}})},[le,o])}},36901:function(Vn,ct,x){"use strict";x.r(ct),x.d(ct,{BaseInput:function(){return S},default:function(){return N}});var V=x(27247),fe=x(32855),Ce=x(74430),ge=x(34666),G=x(92310),g=x.n(G),ye=x(59301),le=x(30292),o=ye.forwardRef(function(P,k){var oe,de,ie,ae=P.inputElement,we=P.children,Te=P.prefixCls,Re=P.prefix,Y=P.suffix,$=P.addonBefore,te=P.addonAfter,q=P.className,he=P.style,re=P.disabled,E=P.readOnly,C=P.focused,W=P.triggerFocus,be=P.allowClear,Ve=P.value,Ke=P.handleReset,Ct=P.hidden,Rt=P.classes,Vt=P.classNames,rn=P.dataAttrs,He=P.styles,ln=P.components,It=P.onClear,cn=we!=null?we:ae,xt=(ln==null?void 0:ln.affixWrapper)||"span",ht=(ln==null?void 0:ln.groupWrapper)||"span",Oe=(ln==null?void 0:ln.wrapper)||"span",Fe=(ln==null?void 0:ln.groupAddon)||"span",j=(0,ye.useRef)(null),Ne=function(Wt){var St;(St=j.current)!==null&&St!==void 0&&St.contains(Wt.target)&&(W==null||W())},Ze=(0,le.X3)(P),ee=(0,ye.cloneElement)(cn,{value:Ve,className:g()((oe=cn.props)===null||oe===void 0?void 0:oe.className,!Ze&&(Vt==null?void 0:Vt.variant))||null}),O=(0,ye.useRef)(null);if(ye.useImperativeHandle(k,function(){return{nativeElement:O.current||j.current}}),Ze){var ue=null;if(be){var De=!re&&!E&&Ve,Ae="".concat(Te,"-clear-icon"),Be=(0,ge.Z)(be)==="object"&&be!==null&&be!==void 0&&be.clearIcon?be.clearIcon:"\u2716";ue=ye.createElement("button",{type:"button",tabIndex:-1,onClick:function(Wt){Ke==null||Ke(Wt),It==null||It()},onMouseDown:function(Wt){return Wt.preventDefault()},className:g()(Ae,(0,Ce.Z)((0,Ce.Z)({},"".concat(Ae,"-hidden"),!De),"".concat(Ae,"-has-suffix"),!!Y))},Be)}var Se="".concat(Te,"-affix-wrapper"),ot=g()(Se,(0,Ce.Z)((0,Ce.Z)((0,Ce.Z)((0,Ce.Z)((0,Ce.Z)({},"".concat(Te,"-disabled"),re),"".concat(Se,"-disabled"),re),"".concat(Se,"-focused"),C),"".concat(Se,"-readonly"),E),"".concat(Se,"-input-with-clear-btn"),Y&&be&&Ve),Rt==null?void 0:Rt.affixWrapper,Vt==null?void 0:Vt.affixWrapper,Vt==null?void 0:Vt.variant),Xe=(Y||be)&&ye.createElement("span",{className:g()("".concat(Te,"-suffix"),Vt==null?void 0:Vt.suffix),style:He==null?void 0:He.suffix},ue,Y);ee=ye.createElement(xt,(0,fe.Z)({className:ot,style:He==null?void 0:He.affixWrapper,onClick:Ne},rn==null?void 0:rn.affixWrapper,{ref:j}),Re&&ye.createElement("span",{className:g()("".concat(Te,"-prefix"),Vt==null?void 0:Vt.prefix),style:He==null?void 0:He.prefix},Re),ee,Xe)}if((0,le.He)(P)){var je="".concat(Te,"-group"),qe="".concat(je,"-addon"),kt="".concat(je,"-wrapper"),gt=g()("".concat(Te,"-wrapper"),je,Rt==null?void 0:Rt.wrapper,Vt==null?void 0:Vt.wrapper),_t=g()(kt,(0,Ce.Z)({},"".concat(kt,"-disabled"),re),Rt==null?void 0:Rt.group,Vt==null?void 0:Vt.groupWrapper);ee=ye.createElement(ht,{className:_t,ref:O},ye.createElement(Oe,{className:gt},$&&ye.createElement(Fe,{className:qe},$),ee,te&&ye.createElement(Fe,{className:qe},te)))}return ye.cloneElement(ee,{className:g()((de=ee.props)===null||de===void 0?void 0:de.className,q)||null,style:(0,V.Z)((0,V.Z)({},(ie=ee.props)===null||ie===void 0?void 0:ie.style),he),hidden:Ct})}),S=o,U=x(3300),_=x(11913),w=x(43079),b=x(18929),R=x(2738),M=x(66003),H=["autoComplete","onChange","onFocus","onBlur","onPressEnter","onKeyDown","onKeyUp","prefixCls","disabled","htmlSize","className","maxLength","suffix","showCount","count","type","classes","classNames","styles","onCompositionStart","onCompositionEnd"],J=(0,ye.forwardRef)(function(P,k){var oe=P.autoComplete,de=P.onChange,ie=P.onFocus,ae=P.onBlur,we=P.onPressEnter,Te=P.onKeyDown,Re=P.onKeyUp,Y=P.prefixCls,$=Y===void 0?"rc-input":Y,te=P.disabled,q=P.htmlSize,he=P.className,re=P.maxLength,E=P.suffix,C=P.showCount,W=P.count,be=P.type,Ve=be===void 0?"text":be,Ke=P.classes,Ct=P.classNames,Rt=P.styles,Vt=P.onCompositionStart,rn=P.onCompositionEnd,He=(0,w.Z)(P,H),ln=(0,ye.useState)(!1),It=(0,_.Z)(ln,2),cn=It[0],xt=It[1],ht=(0,ye.useRef)(!1),Oe=(0,ye.useRef)(!1),Fe=(0,ye.useRef)(null),j=(0,ye.useRef)(null),Ne=function(Mn){Fe.current&&(0,le.nH)(Fe.current,Mn)},Ze=(0,b.Z)(P.defaultValue,{value:P.value}),ee=(0,_.Z)(Ze,2),O=ee[0],ue=ee[1],De=O==null?"":String(O),Ae=(0,ye.useState)(null),Be=(0,_.Z)(Ae,2),Se=Be[0],ot=Be[1],Xe=(0,M.Z)(W,C),je=Xe.max||re,qe=Xe.strategy(De),kt=!!je&&qe>je;(0,ye.useImperativeHandle)(k,function(){var sn;return{focus:Ne,blur:function(){var ut;(ut=Fe.current)===null||ut===void 0||ut.blur()},setSelectionRange:function(ut,nt,ze){var ne;(ne=Fe.current)===null||ne===void 0||ne.setSelectionRange(ut,nt,ze)},select:function(){var ut;(ut=Fe.current)===null||ut===void 0||ut.select()},input:Fe.current,nativeElement:((sn=j.current)===null||sn===void 0?void 0:sn.nativeElement)||Fe.current}}),(0,ye.useEffect)(function(){Oe.current&&(Oe.current=!1),xt(function(sn){return sn&&te?!1:sn})},[te]);var gt=function(Mn,ut,nt){var ze=ut;if(!ht.current&&Xe.exceedFormatter&&Xe.max&&Xe.strategy(ut)>Xe.max){if(ze=Xe.exceedFormatter(ut,{max:Xe.max}),ut!==ze){var ne,me;ot([((ne=Fe.current)===null||ne===void 0?void 0:ne.selectionStart)||0,((me=Fe.current)===null||me===void 0?void 0:me.selectionEnd)||0])}}else if(nt.source==="compositionEnd")return;ue(ze),Fe.current&&(0,le.rJ)(Fe.current,Mn,de,ze)};(0,ye.useEffect)(function(){if(Se){var sn;(sn=Fe.current)===null||sn===void 0||sn.setSelectionRange.apply(sn,(0,U.Z)(Se))}},[Se]);var _t=function(Mn){gt(Mn,Mn.target.value,{source:"change"})},Pe=function(Mn){ht.current=!1,gt(Mn,Mn.currentTarget.value,{source:"compositionEnd"}),rn==null||rn(Mn)},Wt=function(Mn){we&&Mn.key==="Enter"&&!Oe.current&&(Oe.current=!0,we(Mn)),Te==null||Te(Mn)},St=function(Mn){Mn.key==="Enter"&&(Oe.current=!1),Re==null||Re(Mn)},vt=function(Mn){xt(!0),ie==null||ie(Mn)},dn=function(Mn){Oe.current&&(Oe.current=!1),xt(!1),ae==null||ae(Mn)},hn=function(Mn){ue(""),Ne(),Fe.current&&(0,le.rJ)(Fe.current,Mn,de)},Ot=kt&&"".concat($,"-out-of-range"),Ln=function(){var Mn=(0,R.Z)(P,["prefixCls","onPressEnter","addonBefore","addonAfter","prefix","suffix","allowClear","defaultValue","showCount","count","classes","htmlSize","styles","classNames","onClear"]);return ye.createElement("input",(0,fe.Z)({autoComplete:oe},Mn,{onChange:_t,onFocus:vt,onBlur:dn,onKeyDown:Wt,onKeyUp:St,className:g()($,(0,Ce.Z)({},"".concat($,"-disabled"),te),Ct==null?void 0:Ct.input),style:Rt==null?void 0:Rt.input,ref:Fe,size:q,type:Ve,onCompositionStart:function(nt){ht.current=!0,Vt==null||Vt(nt)},onCompositionEnd:Pe}))},qn=function(){var Mn=Number(je)>0;if(E||Xe.show){var ut=Xe.showFormatter?Xe.showFormatter({value:De,count:qe,maxLength:je}):"".concat(qe).concat(Mn?" / ".concat(je):"");return ye.createElement(ye.Fragment,null,Xe.show&&ye.createElement("span",{className:g()("".concat($,"-show-count-suffix"),(0,Ce.Z)({},"".concat($,"-show-count-has-suffix"),!!E),Ct==null?void 0:Ct.count),style:(0,V.Z)({},Rt==null?void 0:Rt.count)},ut),E)}return null};return ye.createElement(S,(0,fe.Z)({},He,{prefixCls:$,className:g()(he,Ot),handleReset:hn,value:De,focused:cn,triggerFocus:Ne,suffix:qn(),disabled:te,classes:Ke,classNames:Ct,styles:Rt}),Ln())}),T=J,N=T},30292:function(Vn,ct,x){"use strict";x.d(ct,{He:function(){return V},X3:function(){return fe},nH:function(){return G},rJ:function(){return ge}});function V(g){return!!(g.addonBefore||g.addonAfter)}function fe(g){return!!(g.prefix||g.suffix||g.allowClear)}function Ce(g,ye,le){var o=ye.cloneNode(!0),S=Object.create(g,{target:{value:o},currentTarget:{value:o}});return o.value=le,typeof ye.selectionStart=="number"&&typeof ye.selectionEnd=="number"&&(o.selectionStart=ye.selectionStart,o.selectionEnd=ye.selectionEnd),o.setSelectionRange=function(){ye.setSelectionRange.apply(ye,arguments)},S}function ge(g,ye,le,o){if(le){var S=ye;if(ye.type==="click"){S=Ce(ye,g,""),le(S);return}if(g.type!=="file"&&o!==void 0){S=Ce(ye,g,o),le(S);return}le(S)}}function G(g,ye){if(g){g.focus(ye);var le=ye||{},o=le.cursor;if(o){var S=g.value.length;switch(o){case"start":g.setSelectionRange(0,0);break;case"end":g.setSelectionRange(S,S);break;default:g.setSelectionRange(0,S)}}}}},28321:function(Vn,ct,x){"use strict";x.d(ct,{iz:function(){return it},ck:function(){return ze},BW:function(){return Bn},sN:function(){return ze},Wd:function(){return vr},ZP:function(){return Dt},Xl:function(){return we}});var V=x(32855),fe=x(74430),Ce=x(27247),ge=x(3300),G=x(11913),g=x(43079),ye=x(92310),le=x.n(ye),o=x(11780),S=x(18929),U=x(13697),_=x(48736),w=x(59301),b=x(4676),R=w.createContext(null);function M($e,ft){return $e===void 0?null:"".concat($e,"-").concat(ft)}function H($e){var ft=w.useContext(R);return M(ft,$e)}var J=x(80547),T=["children","locked"],N=w.createContext(null);function P($e,ft){var Qt=(0,Ce.Z)({},$e);return Object.keys(ft).forEach(function(Lt){var on=ft[Lt];on!==void 0&&(Qt[Lt]=on)}),Qt}function k($e){var ft=$e.children,Qt=$e.locked,Lt=(0,g.Z)($e,T),on=w.useContext(N),Cn=(0,J.Z)(function(){return P(on,Lt)},[on,Lt],function(pn,Hn){return!Qt&&(pn[0]!==Hn[0]||!(0,U.Z)(pn[1],Hn[1],!0))});return w.createElement(N.Provider,{value:Cn},ft)}var oe=[],de=w.createContext(null);function ie(){return w.useContext(de)}var ae=w.createContext(oe);function we($e){var ft=w.useContext(ae);return w.useMemo(function(){return $e!==void 0?[].concat((0,ge.Z)(ft),[$e]):ft},[ft,$e])}var Te=w.createContext(null),Re=w.createContext({}),Y=Re,$=x(29194);function te($e){var ft=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;if((0,$.Z)($e)){var Qt=$e.nodeName.toLowerCase(),Lt=["input","select","textarea","button"].includes(Qt)||$e.isContentEditable||Qt==="a"&&!!$e.getAttribute("href"),on=$e.getAttribute("tabindex"),Cn=Number(on),pn=null;return on&&!Number.isNaN(Cn)?pn=Cn:Lt&&pn===null&&(pn=0),Lt&&$e.disabled&&(pn=null),pn!==null&&(pn>=0||ft&&pn<0)}return!1}function q($e){var ft=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,Qt=(0,ge.Z)($e.querySelectorAll("*")).filter(function(Lt){return te(Lt,ft)});return te($e,ft)&&Qt.unshift($e),Qt}var he=null;function re(){he=document.activeElement}function E(){he=null}function C(){if(he)try{he.focus()}catch($e){}}function W($e,ft){if(ft.keyCode===9){var Qt=q($e),Lt=Qt[ft.shiftKey?0:Qt.length-1],on=Lt===document.activeElement||$e===document.activeElement;if(on){var Cn=Qt[ft.shiftKey?Qt.length-1:0];Cn.focus(),ft.preventDefault()}}}var be=x(10228),Ve=x(16089),Ke=be.Z.LEFT,Ct=be.Z.RIGHT,Rt=be.Z.UP,Vt=be.Z.DOWN,rn=be.Z.ENTER,He=be.Z.ESC,ln=be.Z.HOME,It=be.Z.END,cn=[Rt,Vt,Ke,Ct];function xt($e,ft,Qt,Lt){var on,Cn="prev",pn="next",Hn="children",Xn="parent";if($e==="inline"&&Lt===rn)return{inlineTrigger:!0};var Jn=(0,fe.Z)((0,fe.Z)({},Rt,Cn),Vt,pn),yt=(0,fe.Z)((0,fe.Z)((0,fe.Z)((0,fe.Z)({},Ke,Qt?pn:Cn),Ct,Qt?Cn:pn),Vt,Hn),rn,Hn),On=(0,fe.Z)((0,fe.Z)((0,fe.Z)((0,fe.Z)((0,fe.Z)((0,fe.Z)({},Rt,Cn),Vt,pn),rn,Hn),He,Xn),Ke,Qt?Hn:Xn),Ct,Qt?Xn:Hn),Kn={inline:Jn,horizontal:yt,vertical:On,inlineSub:Jn,horizontalSub:On,verticalSub:On},Q=(on=Kn["".concat($e).concat(ft?"":"Sub")])===null||on===void 0?void 0:on[Lt];switch(Q){case Cn:return{offset:-1,sibling:!0};case pn:return{offset:1,sibling:!0};case Xn:return{offset:-1,sibling:!1};case Hn:return{offset:1,sibling:!1};default:return null}}function ht($e){for(var ft=$e;ft;){if(ft.getAttribute("data-menu-list"))return ft;ft=ft.parentElement}return null}function Oe($e,ft){for(var Qt=$e||document.activeElement;Qt;){if(ft.has(Qt))return Qt;Qt=Qt.parentElement}return null}function Fe($e,ft){var Qt=q($e,!0);return Qt.filter(function(Lt){return ft.has(Lt)})}function j($e,ft,Qt){var Lt=arguments.length>3&&arguments[3]!==void 0?arguments[3]:1;if(!$e)return null;var on=Fe($e,ft),Cn=on.length,pn=on.findIndex(function(Hn){return Qt===Hn});return Lt<0?pn===-1?pn=Cn-1:pn-=1:Lt>0&&(pn+=1),pn=(pn+Cn)%Cn,on[pn]}var Ne=function(ft,Qt){var Lt=new Set,on=new Map,Cn=new Map;return ft.forEach(function(pn){var Hn=document.querySelector("[data-menu-id='".concat(M(Qt,pn),"']"));Hn&&(Lt.add(Hn),Cn.set(Hn,pn),on.set(pn,Hn))}),{elements:Lt,key2element:on,element2key:Cn}};function Ze($e,ft,Qt,Lt,on,Cn,pn,Hn,Xn,Jn){var yt=w.useRef(),On=w.useRef();On.current=ft;var Kn=function(){Ve.Z.cancel(yt.current)};return w.useEffect(function(){return function(){Kn()}},[]),function(Q){var K=Q.which;if([].concat(cn,[rn,He,ln,It]).includes(K)){var Ee=Cn(),Le=Ne(Ee,Lt),st=Le,rt=st.elements,Ft=st.key2element,Ht=st.element2key,an=Ft.get(ft),Xt=Oe(an,rt),Kt=Ht.get(Xt),en=xt($e,pn(Kt,!0).length===1,Qt,K);if(!en&&K!==ln&&K!==It)return;(cn.includes(K)||[ln,It].includes(K))&&Q.preventDefault();var pe=function(wt){if(wt){var Je=wt,At=wt.querySelector("a");At!=null&&At.getAttribute("href")&&(Je=At);var Bt=Ht.get(wt);Hn(Bt),Kn(),yt.current=(0,Ve.Z)(function(){On.current===Bt&&Je.focus()})}};if([ln,It].includes(K)||en.sibling||!Xt){var Ye;!Xt||$e==="inline"?Ye=on.current:Ye=ht(Xt);var Ge,et=Fe(Ye,rt);K===ln?Ge=et[0]:K===It?Ge=et[et.length-1]:Ge=j(Ye,rt,Xt,en.offset),pe(Ge)}else if(en.inlineTrigger)Xn(Kt);else if(en.offset>0)Xn(Kt,!0),Kn(),yt.current=(0,Ve.Z)(function(){Le=Ne(Ee,Lt);var Nt=Xt.getAttribute("aria-controls"),wt=document.getElementById(Nt),Je=j(wt,Le.elements);pe(Je)},5);else if(en.offset<0){var lt=pn(Kt,!0),dt=lt[lt.length-2],jt=Ft.get(dt);Xn(dt,!1),pe(jt)}}Jn==null||Jn(Q)}}function ee($e){Promise.resolve().then($e)}var O="__RC_UTIL_PATH_SPLIT__",ue=function(ft){return ft.join(O)},De=function(ft){return ft.split(O)},Ae="rc-menu-more";function Be(){var $e=w.useState({}),ft=(0,G.Z)($e,2),Qt=ft[1],Lt=(0,w.useRef)(new Map),on=(0,w.useRef)(new Map),Cn=w.useState([]),pn=(0,G.Z)(Cn,2),Hn=pn[0],Xn=pn[1],Jn=(0,w.useRef)(0),yt=(0,w.useRef)(!1),On=function(){yt.current||Qt({})},Kn=(0,w.useCallback)(function(Ft,Ht){var an=ue(Ht);on.current.set(an,Ft),Lt.current.set(Ft,an),Jn.current+=1;var Xt=Jn.current;ee(function(){Xt===Jn.current&&On()})},[]),Q=(0,w.useCallback)(function(Ft,Ht){var an=ue(Ht);on.current.delete(an),Lt.current.delete(Ft)},[]),K=(0,w.useCallback)(function(Ft){Xn(Ft)},[]),Ee=(0,w.useCallback)(function(Ft,Ht){var an=Lt.current.get(Ft)||"",Xt=De(an);return Ht&&Hn.includes(Xt[0])&&Xt.unshift(Ae),Xt},[Hn]),Le=(0,w.useCallback)(function(Ft,Ht){return Ft.filter(function(an){return an!==void 0}).some(function(an){var Xt=Ee(an,!0);return Xt.includes(Ht)})},[Ee]),st=function(){var Ht=(0,ge.Z)(Lt.current.keys());return Hn.length&&Ht.push(Ae),Ht},rt=(0,w.useCallback)(function(Ft){var Ht="".concat(Lt.current.get(Ft)).concat(O),an=new Set;return(0,ge.Z)(on.current.keys()).forEach(function(Xt){Xt.startsWith(Ht)&&an.add(on.current.get(Xt))}),an},[]);return w.useEffect(function(){return function(){yt.current=!0}},[]),{registerPath:Kn,unregisterPath:Q,refreshOverflowKeys:K,isSubPathKey:Le,getKeyPath:Ee,getKeys:st,getSubPathKeys:rt}}function Se($e){var ft=w.useRef($e);ft.current=$e;var Qt=w.useCallback(function(){for(var Lt,on=arguments.length,Cn=new Array(on),pn=0;pn<on;pn++)Cn[pn]=arguments[pn];return(Lt=ft.current)===null||Lt===void 0?void 0:Lt.call.apply(Lt,[ft].concat(Cn))},[]);return $e?Qt:void 0}var ot=Math.random().toFixed(5).toString().slice(2),Xe=0;function je($e){var ft=(0,S.Z)($e,{value:$e}),Qt=(0,G.Z)(ft,2),Lt=Qt[0],on=Qt[1];return w.useEffect(function(){Xe+=1;var Cn="".concat(ot,"-").concat(Xe);on("rc-menu-uuid-".concat(Cn))},[]),Lt}var qe=x(33377),kt=x(93912),gt=x(18881),_t=x(85461),Pe=x(2738),Wt=x(8654);function St($e,ft,Qt,Lt){var on=w.useContext(N),Cn=on.activeKey,pn=on.onActive,Hn=on.onInactive,Xn={active:Cn===$e};return ft||(Xn.onMouseEnter=function(Jn){Qt==null||Qt({key:$e,domEvent:Jn}),pn($e)},Xn.onMouseLeave=function(Jn){Lt==null||Lt({key:$e,domEvent:Jn}),Hn($e)}),Xn}function vt($e){var ft=w.useContext(N),Qt=ft.mode,Lt=ft.rtl,on=ft.inlineIndent;if(Qt!=="inline")return null;var Cn=$e;return Lt?{paddingRight:Cn*on}:{paddingLeft:Cn*on}}function dn($e){var ft=$e.icon,Qt=$e.props,Lt=$e.children,on;return ft===null||ft===!1?null:(typeof ft=="function"?on=w.createElement(ft,(0,Ce.Z)({},Qt)):typeof ft!="boolean"&&(on=ft),on||Lt||null)}var hn=["item"];function Ot($e){var ft=$e.item,Qt=(0,g.Z)($e,hn);return Object.defineProperty(Qt,"item",{get:function(){return(0,_.ZP)(!1,"`info.item` is deprecated since we will move to function component that not provides React Node instance in future."),ft}}),Qt}var Ln=["title","attribute","elementRef"],qn=["style","className","eventKey","warnKey","disabled","itemIcon","children","role","onMouseEnter","onMouseLeave","onClick","onKeyDown","onFocus"],sn=["active"],Mn=function($e){(0,gt.Z)(Qt,$e);var ft=(0,_t.Z)(Qt);function Qt(){return(0,qe.Z)(this,Qt),ft.apply(this,arguments)}return(0,kt.Z)(Qt,[{key:"render",value:function(){var on=this.props,Cn=on.title,pn=on.attribute,Hn=on.elementRef,Xn=(0,g.Z)(on,Ln),Jn=(0,Pe.Z)(Xn,["eventKey","popupClassName","popupOffset","onTitleClick"]);return(0,_.ZP)(!pn,"`attribute` of Menu.Item is deprecated. Please pass attribute directly."),w.createElement(o.Z.Item,(0,V.Z)({},pn,{title:typeof Cn=="string"?Cn:void 0},Jn,{ref:Hn}))}}]),Qt}(w.Component),ut=w.forwardRef(function($e,ft){var Qt=$e.style,Lt=$e.className,on=$e.eventKey,Cn=$e.warnKey,pn=$e.disabled,Hn=$e.itemIcon,Xn=$e.children,Jn=$e.role,yt=$e.onMouseEnter,On=$e.onMouseLeave,Kn=$e.onClick,Q=$e.onKeyDown,K=$e.onFocus,Ee=(0,g.Z)($e,qn),Le=H(on),st=w.useContext(N),rt=st.prefixCls,Ft=st.onItemClick,Ht=st.disabled,an=st.overflowDisabled,Xt=st.itemIcon,Kt=st.selectedKeys,en=st.onActive,pe=w.useContext(Y),Ye=pe._internalRenderMenuItem,Ge="".concat(rt,"-item"),et=w.useRef(),lt=w.useRef(),dt=Ht||pn,jt=(0,Wt.x1)(ft,lt),Nt=we(on),wt=function(Pn){return{key:on,keyPath:(0,ge.Z)(Nt).reverse(),item:et.current,domEvent:Pn}},Je=Hn||Xt,At=St(on,dt,yt,On),Bt=At.active,mt=(0,g.Z)(At,sn),bt=Kt.includes(on),An=vt(Nt.length),En=function(Pn){if(!dt){var yr=wt(Pn);Kn==null||Kn(Ot(yr)),Ft(yr)}},In=function(Pn){if(Q==null||Q(Pn),Pn.which===be.Z.ENTER){var yr=wt(Pn);Kn==null||Kn(Ot(yr)),Ft(yr)}},jn=function(Pn){en(on),K==null||K(Pn)},tr={};$e.role==="option"&&(tr["aria-selected"]=bt);var Yn=w.createElement(Mn,(0,V.Z)({ref:et,elementRef:jt,role:Jn===null?"none":Jn||"menuitem",tabIndex:pn?null:-1,"data-menu-id":an&&Le?null:Le},(0,Pe.Z)(Ee,["extra"]),mt,tr,{component:"li","aria-disabled":pn,style:(0,Ce.Z)((0,Ce.Z)({},An),Qt),className:le()(Ge,(0,fe.Z)((0,fe.Z)((0,fe.Z)({},"".concat(Ge,"-active"),Bt),"".concat(Ge,"-selected"),bt),"".concat(Ge,"-disabled"),dt),Lt),onClick:En,onKeyDown:In,onFocus:jn}),Xn,w.createElement(dn,{props:(0,Ce.Z)((0,Ce.Z)({},$e),{},{isSelected:bt}),icon:Je}));return Ye&&(Yn=Ye(Yn,$e,{selected:bt})),Yn});function nt($e,ft){var Qt=$e.eventKey,Lt=ie(),on=we(Qt);return w.useEffect(function(){if(Lt)return Lt.registerPath(Qt,on),function(){Lt.unregisterPath(Qt,on)}},[on]),Lt?null:w.createElement(ut,(0,V.Z)({},$e,{ref:ft}))}var ze=w.forwardRef(nt),ne=["className","children"],me=function(ft,Qt){var Lt=ft.className,on=ft.children,Cn=(0,g.Z)(ft,ne),pn=w.useContext(N),Hn=pn.prefixCls,Xn=pn.mode,Jn=pn.rtl;return w.createElement("ul",(0,V.Z)({className:le()(Hn,Jn&&"".concat(Hn,"-rtl"),"".concat(Hn,"-sub"),"".concat(Hn,"-").concat(Xn==="inline"?"inline":"vertical"),Lt),role:"menu"},Cn,{"data-menu-list":!0,ref:Qt}),on)},Ie=w.forwardRef(me);Ie.displayName="SubMenuList";var Ue=Ie,ke=x(11592);function Gt($e,ft){return(0,ke.Z)($e).map(function(Qt,Lt){if(w.isValidElement(Qt)){var on,Cn,pn=Qt.key,Hn=(on=(Cn=Qt.props)===null||Cn===void 0?void 0:Cn.eventKey)!==null&&on!==void 0?on:pn,Xn=Hn==null;Xn&&(Hn="tmp_key-".concat([].concat((0,ge.Z)(ft),[Lt]).join("-")));var Jn={key:Hn,eventKey:Hn};return w.cloneElement(Qt,Jn)}return Qt})}var _n=x(65030),wn={adjustX:1,adjustY:1},$n={topLeft:{points:["bl","tl"],overflow:wn},topRight:{points:["br","tr"],overflow:wn},bottomLeft:{points:["tl","bl"],overflow:wn},bottomRight:{points:["tr","br"],overflow:wn},leftTop:{points:["tr","tl"],overflow:wn},leftBottom:{points:["br","bl"],overflow:wn},rightTop:{points:["tl","tr"],overflow:wn},rightBottom:{points:["bl","br"],overflow:wn}},mr={topLeft:{points:["bl","tl"],overflow:wn},topRight:{points:["br","tr"],overflow:wn},bottomLeft:{points:["tl","bl"],overflow:wn},bottomRight:{points:["tr","br"],overflow:wn},rightTop:{points:["tr","tl"],overflow:wn},rightBottom:{points:["br","bl"],overflow:wn},leftTop:{points:["tl","tr"],overflow:wn},leftBottom:{points:["bl","br"],overflow:wn}},sr=null;function lr($e,ft,Qt){if(ft)return ft;if(Qt)return Qt[$e]||Qt.other}var zn={horizontal:"bottomLeft",vertical:"rightTop","vertical-left":"rightTop","vertical-right":"leftTop"};function Lr($e){var ft=$e.prefixCls,Qt=$e.visible,Lt=$e.children,on=$e.popup,Cn=$e.popupStyle,pn=$e.popupClassName,Hn=$e.popupOffset,Xn=$e.disabled,Jn=$e.mode,yt=$e.onVisibleChange,On=w.useContext(N),Kn=On.getPopupContainer,Q=On.rtl,K=On.subMenuOpenDelay,Ee=On.subMenuCloseDelay,Le=On.builtinPlacements,st=On.triggerSubMenuAction,rt=On.forceSubMenuRender,Ft=On.rootClassName,Ht=On.motion,an=On.defaultMotions,Xt=w.useState(!1),Kt=(0,G.Z)(Xt,2),en=Kt[0],pe=Kt[1],Ye=Q?(0,Ce.Z)((0,Ce.Z)({},mr),Le):(0,Ce.Z)((0,Ce.Z)({},$n),Le),Ge=zn[Jn],et=lr(Jn,Ht,an),lt=w.useRef(et);Jn!=="inline"&&(lt.current=et);var dt=(0,Ce.Z)((0,Ce.Z)({},lt.current),{},{leavedClassName:"".concat(ft,"-hidden"),removeOnLeave:!1,motionAppear:!0}),jt=w.useRef();return w.useEffect(function(){return jt.current=(0,Ve.Z)(function(){pe(Qt)}),function(){Ve.Z.cancel(jt.current)}},[Qt]),w.createElement(_n.Z,{prefixCls:ft,popupClassName:le()("".concat(ft,"-popup"),(0,fe.Z)({},"".concat(ft,"-rtl"),Q),pn,Ft),stretch:Jn==="horizontal"?"minWidth":null,getPopupContainer:Kn,builtinPlacements:Ye,popupPlacement:Ge,popupVisible:en,popup:on,popupStyle:Cn,popupAlign:Hn&&{offset:Hn},action:Xn?[]:[st],mouseEnterDelay:K,mouseLeaveDelay:Ee,onPopupVisibleChange:yt,forceRender:rt,popupMotion:dt,fresh:!0},Lt)}var Sr=x(77900);function xr($e){var ft=$e.id,Qt=$e.open,Lt=$e.keyPath,on=$e.children,Cn="inline",pn=w.useContext(N),Hn=pn.prefixCls,Xn=pn.forceSubMenuRender,Jn=pn.motion,yt=pn.defaultMotions,On=pn.mode,Kn=w.useRef(!1);Kn.current=On===Cn;var Q=w.useState(!Kn.current),K=(0,G.Z)(Q,2),Ee=K[0],Le=K[1],st=Kn.current?Qt:!1;w.useEffect(function(){Kn.current&&Le(!1)},[On]);var rt=(0,Ce.Z)({},lr(Cn,Jn,yt));Lt.length>1&&(rt.motionAppear=!1);var Ft=rt.onVisibleChanged;return rt.onVisibleChanged=function(Ht){return!Kn.current&&!Ht&&Le(!0),Ft==null?void 0:Ft(Ht)},Ee?null:w.createElement(k,{mode:Cn,locked:!Kn.current},w.createElement(Sr.default,(0,V.Z)({visible:st},rt,{forceRender:Xn,removeOnLeave:!1,leavedClassName:"".concat(Hn,"-hidden")}),function(Ht){var an=Ht.className,Xt=Ht.style;return w.createElement(Ue,{id:ft,className:an,style:Xt},on)}))}var Zr=["style","className","title","eventKey","warnKey","disabled","internalPopupClose","children","itemIcon","expandIcon","popupClassName","popupOffset","popupStyle","onClick","onMouseEnter","onMouseLeave","onTitleClick","onTitleMouseEnter","onTitleMouseLeave"],Tn=["active"],fn=w.forwardRef(function($e,ft){var Qt=$e.style,Lt=$e.className,on=$e.title,Cn=$e.eventKey,pn=$e.warnKey,Hn=$e.disabled,Xn=$e.internalPopupClose,Jn=$e.children,yt=$e.itemIcon,On=$e.expandIcon,Kn=$e.popupClassName,Q=$e.popupOffset,K=$e.popupStyle,Ee=$e.onClick,Le=$e.onMouseEnter,st=$e.onMouseLeave,rt=$e.onTitleClick,Ft=$e.onTitleMouseEnter,Ht=$e.onTitleMouseLeave,an=(0,g.Z)($e,Zr),Xt=H(Cn),Kt=w.useContext(N),en=Kt.prefixCls,pe=Kt.mode,Ye=Kt.openKeys,Ge=Kt.disabled,et=Kt.overflowDisabled,lt=Kt.activeKey,dt=Kt.selectedKeys,jt=Kt.itemIcon,Nt=Kt.expandIcon,wt=Kt.onItemClick,Je=Kt.onOpenChange,At=Kt.onActive,Bt=w.useContext(Y),mt=Bt._internalRenderSubMenuItem,bt=w.useContext(Te),An=bt.isSubPathKey,En=we(),In="".concat(en,"-submenu"),jn=Ge||Hn,tr=w.useRef(),Yn=w.useRef(),ar=yt!=null?yt:jt,Pn=On!=null?On:Nt,yr=Ye.includes(Cn),ir=!et&&yr,Kr=An(dt,Cn),fr=St(Cn,jn,Ft,Ht),hr=fr.active,Tr=(0,g.Z)(fr,Tn),kn=w.useState(!1),pr=(0,G.Z)(kn,2),cr=pr[0],Wn=pr[1],ur=function(li){jn||Wn(li)},Ir=function(li){ur(!0),Le==null||Le({key:Cn,domEvent:li})},Vr=function(li){ur(!1),st==null||st({key:Cn,domEvent:li})},Ur=w.useMemo(function(){return hr||(pe!=="inline"?cr||An([lt],Cn):!1)},[pe,hr,lt,cr,Cn,An]),or=vt(En.length),hi=function(li){jn||(rt==null||rt({key:Cn,domEvent:li}),pe==="inline"&&Je(Cn,!yr))},Ki=Se(function(si){Ee==null||Ee(Ot(si)),wt(si)}),Ji=function(li){pe!=="inline"&&Je(Cn,li)},ds=function(){At(Cn)},ss=Xt&&"".concat(Xt,"-popup"),zi=w.useMemo(function(){return w.createElement(dn,{icon:pe!=="horizontal"?Pn:void 0,props:(0,Ce.Z)((0,Ce.Z)({},$e),{},{isOpen:ir,isSubMenu:!0})},w.createElement("i",{className:"".concat(In,"-arrow")}))},[pe,Pn,$e,ir,In]),ii=w.createElement("div",(0,V.Z)({role:"menuitem",style:or,className:"".concat(In,"-title"),tabIndex:jn?null:-1,ref:tr,title:typeof on=="string"?on:null,"data-menu-id":et&&Xt?null:Xt,"aria-expanded":ir,"aria-haspopup":!0,"aria-controls":ss,"aria-disabled":jn,onClick:hi,onFocus:ds},Tr),on,zi),ci=w.useRef(pe);if(pe!=="inline"&&En.length>1?ci.current="vertical":ci.current=pe,!et){var Pi=ci.current;ii=w.createElement(Lr,{mode:Pi,prefixCls:In,visible:!Xn&&ir&&pe!=="inline",popupClassName:Kn,popupOffset:Q,popupStyle:K,popup:w.createElement(k,{mode:Pi==="horizontal"?"vertical":Pi},w.createElement(Ue,{id:ss,ref:Yn},Jn)),disabled:jn,onVisibleChange:Ji},ii)}var ai=w.createElement(o.Z.Item,(0,V.Z)({ref:ft,role:"none"},an,{component:"li",style:Qt,className:le()(In,"".concat(In,"-").concat(pe),Lt,(0,fe.Z)((0,fe.Z)((0,fe.Z)((0,fe.Z)({},"".concat(In,"-open"),ir),"".concat(In,"-active"),Ur),"".concat(In,"-selected"),Kr),"".concat(In,"-disabled"),jn)),onMouseEnter:Ir,onMouseLeave:Vr}),ii,!et&&w.createElement(xr,{id:ss,open:ir,keyPath:En},Jn));return mt&&(ai=mt(ai,$e,{selected:Kr,active:Ur,open:ir,disabled:jn})),w.createElement(k,{onItemClick:Ki,mode:pe==="horizontal"?"vertical":pe,itemIcon:ar,expandIcon:Pn},ai)}),Zn=w.forwardRef(function($e,ft){var Qt=$e.eventKey,Lt=$e.children,on=we(Qt),Cn=Gt(Lt,on),pn=ie();w.useEffect(function(){if(pn)return pn.registerPath(Qt,on),function(){pn.unregisterPath(Qt,on)}},[on]);var Hn;return pn?Hn=Cn:Hn=w.createElement(fn,(0,V.Z)({ref:ft},$e),Cn),w.createElement(ae.Provider,{value:on},Hn)}),vr=Zn,Hr=x(34666);function it($e){var ft=$e.className,Qt=$e.style,Lt=w.useContext(N),on=Lt.prefixCls,Cn=ie();return Cn?null:w.createElement("li",{role:"separator",className:le()("".concat(on,"-item-divider"),ft),style:Qt})}var tt=["className","title","eventKey","children"],mn=w.forwardRef(function($e,ft){var Qt=$e.className,Lt=$e.title,on=$e.eventKey,Cn=$e.children,pn=(0,g.Z)($e,tt),Hn=w.useContext(N),Xn=Hn.prefixCls,Jn="".concat(Xn,"-item-group");return w.createElement("li",(0,V.Z)({ref:ft,role:"presentation"},pn,{onClick:function(On){return On.stopPropagation()},className:le()(Jn,Qt)}),w.createElement("div",{role:"presentation",className:"".concat(Jn,"-title"),title:typeof Lt=="string"?Lt:void 0},Lt),w.createElement("ul",{role:"group",className:"".concat(Jn,"-list")},Cn))}),Jt=w.forwardRef(function($e,ft){var Qt=$e.eventKey,Lt=$e.children,on=we(Qt),Cn=Gt(Lt,on),pn=ie();return pn?Cn:w.createElement(mn,(0,V.Z)({ref:ft},(0,Pe.Z)($e,["warnKey"])),Cn)}),Bn=Jt,xn=["label","children","key","type","extra"];function vn($e,ft,Qt){var Lt=ft.item,on=ft.group,Cn=ft.submenu,pn=ft.divider;return($e||[]).map(function(Hn,Xn){if(Hn&&(0,Hr.Z)(Hn)==="object"){var Jn=Hn,yt=Jn.label,On=Jn.children,Kn=Jn.key,Q=Jn.type,K=Jn.extra,Ee=(0,g.Z)(Jn,xn),Le=Kn!=null?Kn:"tmp-".concat(Xn);return On||Q==="group"?Q==="group"?w.createElement(on,(0,V.Z)({key:Le},Ee,{title:yt}),vn(On,ft,Qt)):w.createElement(Cn,(0,V.Z)({key:Le},Ee,{title:yt}),vn(On,ft,Qt)):Q==="divider"?w.createElement(pn,(0,V.Z)({key:Le},Ee)):w.createElement(Lt,(0,V.Z)({key:Le},Ee,{extra:K}),yt,(!!K||K===0)&&w.createElement("span",{className:"".concat(Qt,"-item-extra")},K))}return null}).filter(function(Hn){return Hn})}function yn($e,ft,Qt,Lt,on){var Cn=$e,pn=(0,Ce.Z)({divider:it,item:ze,group:Bn,submenu:vr},Lt);return ft&&(Cn=vn(ft,pn,on)),Gt(Cn,Qt)}var Qn=["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"],bn=[],Un=w.forwardRef(function($e,ft){var Qt,Lt=$e,on=Lt.prefixCls,Cn=on===void 0?"rc-menu":on,pn=Lt.rootClassName,Hn=Lt.style,Xn=Lt.className,Jn=Lt.tabIndex,yt=Jn===void 0?0:Jn,On=Lt.items,Kn=Lt.children,Q=Lt.direction,K=Lt.id,Ee=Lt.mode,Le=Ee===void 0?"vertical":Ee,st=Lt.inlineCollapsed,rt=Lt.disabled,Ft=Lt.disabledOverflow,Ht=Lt.subMenuOpenDelay,an=Ht===void 0?.1:Ht,Xt=Lt.subMenuCloseDelay,Kt=Xt===void 0?.1:Xt,en=Lt.forceSubMenuRender,pe=Lt.defaultOpenKeys,Ye=Lt.openKeys,Ge=Lt.activeKey,et=Lt.defaultActiveFirst,lt=Lt.selectable,dt=lt===void 0?!0:lt,jt=Lt.multiple,Nt=jt===void 0?!1:jt,wt=Lt.defaultSelectedKeys,Je=Lt.selectedKeys,At=Lt.onSelect,Bt=Lt.onDeselect,mt=Lt.inlineIndent,bt=mt===void 0?24:mt,An=Lt.motion,En=Lt.defaultMotions,In=Lt.triggerSubMenuAction,jn=In===void 0?"hover":In,tr=Lt.builtinPlacements,Yn=Lt.itemIcon,ar=Lt.expandIcon,Pn=Lt.overflowedIndicator,yr=Pn===void 0?"...":Pn,ir=Lt.overflowedIndicatorPopupClassName,Kr=Lt.getPopupContainer,fr=Lt.onClick,hr=Lt.onOpenChange,Tr=Lt.onKeyDown,kn=Lt.openAnimation,pr=Lt.openTransitionName,cr=Lt._internalRenderMenuItem,Wn=Lt._internalRenderSubMenuItem,ur=Lt._internalComponents,Ir=(0,g.Z)(Lt,Qn),Vr=w.useMemo(function(){return[yn(Kn,On,bn,ur,Cn),yn(Kn,On,bn,{},Cn)]},[Kn,On,ur]),Ur=(0,G.Z)(Vr,2),or=Ur[0],hi=Ur[1],Ki=w.useState(!1),Ji=(0,G.Z)(Ki,2),ds=Ji[0],ss=Ji[1],zi=w.useRef(),ii=je(K),ci=Q==="rtl",Pi=(0,S.Z)(pe,{value:Ye,postState:function(Di){return Di||bn}}),ai=(0,G.Z)(Pi,2),si=ai[0],li=ai[1],gr=function(Di){var $i=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;function _s(){li(Di),hr==null||hr(Di)}$i?(0,b.flushSync)(_s):_s()},Fr=w.useState(si),Gr=(0,G.Z)(Fr,2),$r=Gr[0],Dr=Gr[1],Xr=w.useRef(!1),ti=w.useMemo(function(){return(Le==="inline"||Le==="vertical")&&st?["vertical",st]:[Le,!1]},[Le,st]),rr=(0,G.Z)(ti,2),_r=rr[0],Er=rr[1],ui=_r==="inline",fi=w.useState(_r),Gi=(0,G.Z)(fi,2),as=Gi[0],Bi=Gi[1],ls=w.useState(Er),gi=(0,G.Z)(ls,2),la=gi[0],Ms=gi[1];w.useEffect(function(){Bi(_r),Ms(Er),Xr.current&&(ui?li($r):gr(bn))},[_r,Er]);var ws=w.useState(0),Fi=(0,G.Z)(ws,2),ra=Fi[0],Es=Fi[1],Ws=ra>=or.length-1||as!=="horizontal"||Ft;w.useEffect(function(){ui&&Dr(si)},[si]),w.useEffect(function(){return Xr.current=!0,function(){Xr.current=!1}},[]);var Qs=Be(),js=Qs.registerPath,Ys=Qs.unregisterPath,pa=Qs.refreshOverflowKeys,ms=Qs.isSubPathKey,Xs=Qs.getKeyPath,vs=Qs.getKeys,cs=Qs.getSubPathKeys,Os=w.useMemo(function(){return{registerPath:js,unregisterPath:Ys}},[js,Ys]),Ds=w.useMemo(function(){return{isSubPathKey:ms}},[ms]);w.useEffect(function(){pa(Ws?bn:or.slice(ra+1).map(function(ts){return ts.key}))},[ra,Ws]);var Js=(0,S.Z)(Ge||et&&((Qt=or[0])===null||Qt===void 0?void 0:Qt.key),{value:Ge}),hs=(0,G.Z)(Js,2),os=hs[0],oi=hs[1],Ai=Se(function(ts){oi(ts)}),Mi=Se(function(){oi(void 0)});(0,w.useImperativeHandle)(ft,function(){return{list:zi.current,focus:function(Di){var $i,_s=vs(),ji=Ne(_s,ii),Ts=ji.elements,gs=ji.key2element,ys=ji.element2key,Ga=Fe(zi.current,Ts),Fn=os!=null?os:Ga[0]?ys.get(Ga[0]):($i=or.find(function(Zs){return!Zs.props.disabled}))===null||$i===void 0?void 0:$i.key,sa=gs.get(Fn);if(Fn&&sa){var ma;sa==null||(ma=sa.focus)===null||ma===void 0||ma.call(sa,Di)}}}});var Si=(0,S.Z)(wt||[],{value:Je,postState:function(Di){return Array.isArray(Di)?Di:Di==null?bn:[Di]}}),es=(0,G.Z)(Si,2),Wi=es[0],Rs=es[1],Ls=function(Di){if(dt){var $i=Di.key,_s=Wi.includes($i),ji;Nt?_s?ji=Wi.filter(function(gs){return gs!==$i}):ji=[].concat((0,ge.Z)(Wi),[$i]):ji=[$i],Rs(ji);var Ts=(0,Ce.Z)((0,Ce.Z)({},Di),{},{selectedKeys:ji});_s?Bt==null||Bt(Ts):At==null||At(Ts)}!Nt&&si.length&&as!=="inline"&&gr(bn)},Ps=Se(function(ts){fr==null||fr(Ot(ts)),Ls(ts)}),Ui=Se(function(ts,Di){var $i=si.filter(function(ji){return ji!==ts});if(Di)$i.push(ts);else if(as!=="inline"){var _s=cs(ts);$i=$i.filter(function(ji){return!_s.has(ji)})}(0,U.Z)(si,$i,!0)||gr($i,!0)}),xs=function(Di,$i){var _s=$i!=null?$i:!si.includes(Di);Ui(Di,_s)},Gs=Ze(as,os,ci,ii,zi,vs,Xs,oi,xs,Tr);w.useEffect(function(){ss(!0)},[]);var $s=w.useMemo(function(){return{_internalRenderMenuItem:cr,_internalRenderSubMenuItem:Wn}},[cr,Wn]),ia=as!=="horizontal"||Ft?or:or.map(function(ts,Di){return w.createElement(k,{key:ts.key,overflowDisabled:Di>ra},ts)}),ua=w.createElement(o.Z,(0,V.Z)({id:K,ref:zi,prefixCls:"".concat(Cn,"-overflow"),component:"ul",itemComponent:ze,className:le()(Cn,"".concat(Cn,"-root"),"".concat(Cn,"-").concat(as),Xn,(0,fe.Z)((0,fe.Z)({},"".concat(Cn,"-inline-collapsed"),la),"".concat(Cn,"-rtl"),ci),pn),dir:Q,style:Hn,role:"menu",tabIndex:yt,data:ia,renderRawItem:function(Di){return Di},renderRawRest:function(Di){var $i=Di.length,_s=$i?or.slice(-$i):null;return w.createElement(vr,{eventKey:Ae,title:yr,disabled:Ws,internalPopupClose:$i===0,popupClassName:ir},_s)},maxCount:as!=="horizontal"||Ft?o.Z.INVALIDATE:o.Z.RESPONSIVE,ssr:"full","data-menu-list":!0,onVisibleChange:function(Di){Es(Di)},onKeyDown:Gs},Ir));return w.createElement(Y.Provider,{value:$s},w.createElement(R.Provider,{value:ii},w.createElement(k,{prefixCls:Cn,rootClassName:pn,mode:as,openKeys:si,rtl:ci,disabled:rt,motion:ds?An:null,defaultMotions:ds?En:null,activeKey:os,onActive:Ai,onInactive:Mi,selectedKeys:Wi,inlineIndent:bt,subMenuOpenDelay:an,subMenuCloseDelay:Kt,forceSubMenuRender:en,builtinPlacements:tr,triggerSubMenuAction:jn,getPopupContainer:Kr,itemIcon:Yn,expandIcon:ar,onItemClick:Ps,onOpenChange:Ui},w.createElement(Te.Provider,{value:Ds},ua),w.createElement("div",{style:{display:"none"},"aria-hidden":!0},w.createElement(de.Provider,{value:Os},hi)))))}),Sn=Un,Tt=Sn;Tt.Item=ze,Tt.SubMenu=vr,Tt.ItemGroup=Bn,Tt.Divider=it;var Dt=Tt},11780:function(Vn,ct,x){"use strict";x.d(ct,{Z:function(){return re}});var V=x(32855),fe=x(27247),Ce=x(11913),ge=x(43079),G=x(59301),g=x(92310),ye=x.n(g),le=x(29301),o=x(34280),S=["prefixCls","invalidate","item","renderItem","responsive","responsiveDisabled","registerSize","itemKey","className","style","children","display","order","component"],U=void 0;function _(E,C){var W=E.prefixCls,be=E.invalidate,Ve=E.item,Ke=E.renderItem,Ct=E.responsive,Rt=E.responsiveDisabled,Vt=E.registerSize,rn=E.itemKey,He=E.className,ln=E.style,It=E.children,cn=E.display,xt=E.order,ht=E.component,Oe=ht===void 0?"div":ht,Fe=(0,ge.Z)(E,S),j=Ct&&!cn;function Ne(De){Vt(rn,De)}G.useEffect(function(){return function(){Ne(null)}},[]);var Ze=Ke&&Ve!==U?Ke(Ve,{index:xt}):It,ee;be||(ee={opacity:j?0:1,height:j?0:U,overflowY:j?"hidden":U,order:Ct?xt:U,pointerEvents:j?"none":U,position:j?"absolute":U});var O={};j&&(O["aria-hidden"]=!0);var ue=G.createElement(Oe,(0,V.Z)({className:ye()(!be&&W,He),style:(0,fe.Z)((0,fe.Z)({},ee),ln)},O,Fe,{ref:C}),Ze);return Ct&&(ue=G.createElement(le.Z,{onResize:function(Ae){var Be=Ae.offsetWidth;Ne(Be)},disabled:Rt},ue)),ue}var w=G.forwardRef(_);w.displayName="Item";var b=w,R=x(6089),M=x(4676),H=x(16089);function J(E){if(typeof MessageChannel=="undefined")(0,H.Z)(E);else{var C=new MessageChannel;C.port1.onmessage=function(){return E()},C.port2.postMessage(void 0)}}function T(){var E=G.useRef(null),C=function(be){E.current||(E.current=[],J(function(){(0,M.unstable_batchedUpdates)(function(){E.current.forEach(function(Ve){Ve()}),E.current=null})})),E.current.push(be)};return C}function N(E,C){var W=G.useState(C),be=(0,Ce.Z)(W,2),Ve=be[0],Ke=be[1],Ct=(0,R.Z)(function(Rt){E(function(){Ke(Rt)})});return[Ve,Ct]}var P=G.createContext(null),k=["component"],oe=["className"],de=["className"],ie=function(C,W){var be=G.useContext(P);if(!be){var Ve=C.component,Ke=Ve===void 0?"div":Ve,Ct=(0,ge.Z)(C,k);return G.createElement(Ke,(0,V.Z)({},Ct,{ref:W}))}var Rt=be.className,Vt=(0,ge.Z)(be,oe),rn=C.className,He=(0,ge.Z)(C,de);return G.createElement(P.Provider,{value:null},G.createElement(b,(0,V.Z)({ref:W,className:ye()(Rt,rn)},Vt,He)))},ae=G.forwardRef(ie);ae.displayName="RawItem";var we=ae,Te=["prefixCls","data","renderItem","renderRawItem","itemKey","itemWidth","ssr","style","className","maxCount","renderRest","renderRawRest","suffix","component","itemComponent","onVisibleChange"],Re="responsive",Y="invalidate";function $(E){return"+ ".concat(E.length," ...")}function te(E,C){var W=E.prefixCls,be=W===void 0?"rc-overflow":W,Ve=E.data,Ke=Ve===void 0?[]:Ve,Ct=E.renderItem,Rt=E.renderRawItem,Vt=E.itemKey,rn=E.itemWidth,He=rn===void 0?10:rn,ln=E.ssr,It=E.style,cn=E.className,xt=E.maxCount,ht=E.renderRest,Oe=E.renderRawRest,Fe=E.suffix,j=E.component,Ne=j===void 0?"div":j,Ze=E.itemComponent,ee=E.onVisibleChange,O=(0,ge.Z)(E,Te),ue=ln==="full",De=T(),Ae=N(De,null),Be=(0,Ce.Z)(Ae,2),Se=Be[0],ot=Be[1],Xe=Se||0,je=N(De,new Map),qe=(0,Ce.Z)(je,2),kt=qe[0],gt=qe[1],_t=N(De,0),Pe=(0,Ce.Z)(_t,2),Wt=Pe[0],St=Pe[1],vt=N(De,0),dn=(0,Ce.Z)(vt,2),hn=dn[0],Ot=dn[1],Ln=N(De,0),qn=(0,Ce.Z)(Ln,2),sn=qn[0],Mn=qn[1],ut=(0,G.useState)(null),nt=(0,Ce.Z)(ut,2),ze=nt[0],ne=nt[1],me=(0,G.useState)(null),Ie=(0,Ce.Z)(me,2),Ue=Ie[0],ke=Ie[1],Gt=G.useMemo(function(){return Ue===null&&ue?Number.MAX_SAFE_INTEGER:Ue||0},[Ue,Se]),_n=(0,G.useState)(!1),wn=(0,Ce.Z)(_n,2),$n=wn[0],mr=wn[1],sr="".concat(be,"-item"),lr=Math.max(Wt,hn),zn=xt===Re,Lr=Ke.length&&zn,Sr=xt===Y,xr=Lr||typeof xt=="number"&&Ke.length>xt,Zr=(0,G.useMemo)(function(){var Tt=Ke;return Lr?Se===null&&ue?Tt=Ke:Tt=Ke.slice(0,Math.min(Ke.length,Xe/He)):typeof xt=="number"&&(Tt=Ke.slice(0,xt)),Tt},[Ke,He,Se,xt,Lr]),Tn=(0,G.useMemo)(function(){return Lr?Ke.slice(Gt+1):Ke.slice(Zr.length)},[Ke,Zr,Lr,Gt]),fn=(0,G.useCallback)(function(Tt,Dt){var $e;return typeof Vt=="function"?Vt(Tt):($e=Vt&&(Tt==null?void 0:Tt[Vt]))!==null&&$e!==void 0?$e:Dt},[Vt]),Zn=(0,G.useCallback)(Ct||function(Tt){return Tt},[Ct]);function vr(Tt,Dt,$e){Ue===Tt&&(Dt===void 0||Dt===ze)||(ke(Tt),$e||(mr(Tt<Ke.length-1),ee==null||ee(Tt)),Dt!==void 0&&ne(Dt))}function Hr(Tt,Dt){ot(Dt.clientWidth)}function it(Tt,Dt){gt(function($e){var ft=new Map($e);return Dt===null?ft.delete(Tt):ft.set(Tt,Dt),ft})}function tt(Tt,Dt){Ot(Dt),St(hn)}function mn(Tt,Dt){Mn(Dt)}function Jt(Tt){return kt.get(fn(Zr[Tt],Tt))}(0,o.Z)(function(){if(Xe&&typeof lr=="number"&&Zr){var Tt=sn,Dt=Zr.length,$e=Dt-1;if(!Dt){vr(0,null);return}for(var ft=0;ft<Dt;ft+=1){var Qt=Jt(ft);if(ue&&(Qt=Qt||0),Qt===void 0){vr(ft-1,void 0,!0);break}if(Tt+=Qt,$e===0&&Tt<=Xe||ft===$e-1&&Tt+Jt($e)<=Xe){vr($e,null);break}else if(Tt+lr>Xe){vr(ft-1,Tt-Qt-sn+hn);break}}Fe&&Jt(0)+sn>Xe&&ne(null)}},[Xe,kt,hn,sn,fn,Zr]);var Bn=$n&&!!Tn.length,xn={};ze!==null&&Lr&&(xn={position:"absolute",left:ze,top:0});var vn={prefixCls:sr,responsive:Lr,component:Ze,invalidate:Sr},yn=Rt?function(Tt,Dt){var $e=fn(Tt,Dt);return G.createElement(P.Provider,{key:$e,value:(0,fe.Z)((0,fe.Z)({},vn),{},{order:Dt,item:Tt,itemKey:$e,registerSize:it,display:Dt<=Gt})},Rt(Tt,Dt))}:function(Tt,Dt){var $e=fn(Tt,Dt);return G.createElement(b,(0,V.Z)({},vn,{order:Dt,key:$e,item:Tt,renderItem:Zn,itemKey:$e,registerSize:it,display:Dt<=Gt}))},Qn={order:Bn?Gt:Number.MAX_SAFE_INTEGER,className:"".concat(sr,"-rest"),registerSize:tt,display:Bn},bn=ht||$,Un=Oe?G.createElement(P.Provider,{value:(0,fe.Z)((0,fe.Z)({},vn),Qn)},Oe(Tn)):G.createElement(b,(0,V.Z)({},vn,Qn),typeof bn=="function"?bn(Tn):bn),Sn=G.createElement(Ne,(0,V.Z)({className:ye()(!Sr&&be,cn),style:It,ref:C},O),Zr.map(yn),xr?Un:null,Fe&&G.createElement(b,(0,V.Z)({},vn,{responsive:zn,responsiveDisabled:!Lr,order:Gt,className:"".concat(sr,"-suffix"),registerSize:mn,display:!0,style:xn}),Fe));return zn?G.createElement(le.Z,{onResize:Hr,disabled:!Lr},Sn):Sn}var q=G.forwardRef(te);q.displayName="Overflow",q.Item=we,q.RESPONSIVE=Re,q.INVALIDATE=Y;var he=q,re=he},23425:function(Vn,ct,x){"use strict";x.d(ct,{Z:function(){return de}});var V=x(74430),fe=x(32855),Ce=x(34666),ge=x(27247),G=x(11913),g=x(92310),ye=x.n(g),le=x(18929),o=x(10228),S=x(26112),U=x(48736),_=x(59301),w=x(17119),b=[10,20,50,100],R=function(ae){var we=ae.pageSizeOptions,Te=we===void 0?b:we,Re=ae.locale,Y=ae.changeSize,$=ae.pageSize,te=ae.goButton,q=ae.quickGo,he=ae.rootPrefixCls,re=ae.disabled,E=ae.buildOptionText,C=ae.showSizeChanger,W=ae.sizeChangerRender,be=_.useState(""),Ve=(0,G.Z)(be,2),Ke=Ve[0],Ct=Ve[1],Rt=function(){return!Ke||Number.isNaN(Ke)?void 0:Number(Ke)},Vt=typeof E=="function"?E:function(Fe){return"".concat(Fe," ").concat(Re.items_per_page)},rn=function(j){Ct(j.target.value)},He=function(j){te||Ke===""||(Ct(""),!(j.relatedTarget&&(j.relatedTarget.className.indexOf("".concat(he,"-item-link"))>=0||j.relatedTarget.className.indexOf("".concat(he,"-item"))>=0))&&(q==null||q(Rt())))},ln=function(j){Ke!==""&&(j.keyCode===o.Z.ENTER||j.type==="click")&&(Ct(""),q==null||q(Rt()))},It=function(){return Te.some(function(j){return j.toString()===$.toString()})?Te:Te.concat([$]).sort(function(j,Ne){var Ze=Number.isNaN(Number(j))?0:Number(j),ee=Number.isNaN(Number(Ne))?0:Number(Ne);return Ze-ee})},cn="".concat(he,"-options");if(!C&&!q)return null;var xt=null,ht=null,Oe=null;return C&&W&&(xt=W({disabled:re,size:$,onSizeChange:function(j){Y==null||Y(Number(j))},"aria-label":Re.page_size,className:"".concat(cn,"-size-changer"),options:It().map(function(Fe){return{label:Vt(Fe),value:Fe}})})),q&&(te&&(Oe=typeof te=="boolean"?_.createElement("button",{type:"button",onClick:ln,onKeyUp:ln,disabled:re,className:"".concat(cn,"-quick-jumper-button")},Re.jump_to_confirm):_.createElement("span",{onClick:ln,onKeyUp:ln},te)),ht=_.createElement("div",{className:"".concat(cn,"-quick-jumper")},Re.jump_to,_.createElement("input",{disabled:re,type:"text",value:Ke,onChange:rn,onKeyUp:ln,onBlur:He,"aria-label":Re.page}),Re.page,Oe)),_.createElement("li",{className:cn},xt,ht)},M=R,H=function(ae){var we=ae.rootPrefixCls,Te=ae.page,Re=ae.active,Y=ae.className,$=ae.showTitle,te=ae.onClick,q=ae.onKeyPress,he=ae.itemRender,re="".concat(we,"-item"),E=ye()(re,"".concat(re,"-").concat(Te),(0,V.Z)((0,V.Z)({},"".concat(re,"-active"),Re),"".concat(re,"-disabled"),!Te),Y),C=function(){te(Te)},W=function(Ke){q(Ke,te,Te)},be=he(Te,"page",_.createElement("a",{rel:"nofollow"},Te));return be?_.createElement("li",{title:$?String(Te):null,className:E,onClick:C,onKeyDown:W,tabIndex:0},be):null},J=H,T=function(ae,we,Te){return Te};function N(){}function P(ie){var ae=Number(ie);return typeof ae=="number"&&!Number.isNaN(ae)&&isFinite(ae)&&Math.floor(ae)===ae}function k(ie,ae,we){var Te=typeof ie=="undefined"?ae:ie;return Math.floor((we-1)/Te)+1}var oe=function(ae){var we=ae.prefixCls,Te=we===void 0?"rc-pagination":we,Re=ae.selectPrefixCls,Y=Re===void 0?"rc-select":Re,$=ae.className,te=ae.current,q=ae.defaultCurrent,he=q===void 0?1:q,re=ae.total,E=re===void 0?0:re,C=ae.pageSize,W=ae.defaultPageSize,be=W===void 0?10:W,Ve=ae.onChange,Ke=Ve===void 0?N:Ve,Ct=ae.hideOnSinglePage,Rt=ae.align,Vt=ae.showPrevNextJumpers,rn=Vt===void 0?!0:Vt,He=ae.showQuickJumper,ln=ae.showLessItems,It=ae.showTitle,cn=It===void 0?!0:It,xt=ae.onShowSizeChange,ht=xt===void 0?N:xt,Oe=ae.locale,Fe=Oe===void 0?w.Z:Oe,j=ae.style,Ne=ae.totalBoundaryShowSizeChanger,Ze=Ne===void 0?50:Ne,ee=ae.disabled,O=ae.simple,ue=ae.showTotal,De=ae.showSizeChanger,Ae=De===void 0?E>Ze:De,Be=ae.sizeChangerRender,Se=ae.pageSizeOptions,ot=ae.itemRender,Xe=ot===void 0?T:ot,je=ae.jumpPrevIcon,qe=ae.jumpNextIcon,kt=ae.prevIcon,gt=ae.nextIcon,_t=_.useRef(null),Pe=(0,le.Z)(10,{value:C,defaultValue:be}),Wt=(0,G.Z)(Pe,2),St=Wt[0],vt=Wt[1],dn=(0,le.Z)(1,{value:te,defaultValue:he,postState:function(Ft){return Math.max(1,Math.min(Ft,k(void 0,St,E)))}}),hn=(0,G.Z)(dn,2),Ot=hn[0],Ln=hn[1],qn=_.useState(Ot),sn=(0,G.Z)(qn,2),Mn=sn[0],ut=sn[1];(0,_.useEffect)(function(){ut(Ot)},[Ot]);var nt=Ke!==N,ze="current"in ae,ne=Math.max(1,Ot-(ln?3:5)),me=Math.min(k(void 0,St,E),Ot+(ln?3:5));function Ie(rt,Ft){var Ht=rt||_.createElement("button",{type:"button","aria-label":Ft,className:"".concat(Te,"-item-link")});return typeof rt=="function"&&(Ht=_.createElement(rt,(0,ge.Z)({},ae))),Ht}function Ue(rt){var Ft=rt.target.value,Ht=k(void 0,St,E),an;return Ft===""?an=Ft:Number.isNaN(Number(Ft))?an=Mn:Ft>=Ht?an=Ht:an=Number(Ft),an}function ke(rt){return P(rt)&&rt!==Ot&&P(E)&&E>0}var Gt=E>St?He:!1;function _n(rt){(rt.keyCode===o.Z.UP||rt.keyCode===o.Z.DOWN)&&rt.preventDefault()}function wn(rt){var Ft=Ue(rt);switch(Ft!==Mn&&ut(Ft),rt.keyCode){case o.Z.ENTER:sr(Ft);break;case o.Z.UP:sr(Ft-1);break;case o.Z.DOWN:sr(Ft+1);break;default:break}}function $n(rt){sr(Ue(rt))}function mr(rt){var Ft=k(rt,St,E),Ht=Ot>Ft&&Ft!==0?Ft:Ot;vt(rt),ut(Ht),ht==null||ht(Ot,rt),Ln(Ht),Ke==null||Ke(Ht,rt)}function sr(rt){if(ke(rt)&&!ee){var Ft=k(void 0,St,E),Ht=rt;return rt>Ft?Ht=Ft:rt<1&&(Ht=1),Ht!==Mn&&ut(Ht),Ln(Ht),Ke==null||Ke(Ht,St),Ht}return Ot}var lr=Ot>1,zn=Ot<k(void 0,St,E);function Lr(){lr&&sr(Ot-1)}function Sr(){zn&&sr(Ot+1)}function xr(){sr(ne)}function Zr(){sr(me)}function Tn(rt,Ft){if(rt.key==="Enter"||rt.charCode===o.Z.ENTER||rt.keyCode===o.Z.ENTER){for(var Ht=arguments.length,an=new Array(Ht>2?Ht-2:0),Xt=2;Xt<Ht;Xt++)an[Xt-2]=arguments[Xt];Ft.apply(void 0,an)}}function fn(rt){Tn(rt,Lr)}function Zn(rt){Tn(rt,Sr)}function vr(rt){Tn(rt,xr)}function Hr(rt){Tn(rt,Zr)}function it(rt){var Ft=Xe(rt,"prev",Ie(kt,"prev page"));return _.isValidElement(Ft)?_.cloneElement(Ft,{disabled:!lr}):Ft}function tt(rt){var Ft=Xe(rt,"next",Ie(gt,"next page"));return _.isValidElement(Ft)?_.cloneElement(Ft,{disabled:!zn}):Ft}function mn(rt){(rt.type==="click"||rt.keyCode===o.Z.ENTER)&&sr(Mn)}var Jt=null,Bn=(0,S.Z)(ae,{aria:!0,data:!0}),xn=ue&&_.createElement("li",{className:"".concat(Te,"-total-text")},ue(E,[E===0?0:(Ot-1)*St+1,Ot*St>E?E:Ot*St])),vn=null,yn=k(void 0,St,E);if(Ct&&E<=St)return null;var Qn=[],bn={rootPrefixCls:Te,onClick:sr,onKeyPress:Tn,showTitle:cn,itemRender:Xe,page:-1},Un=Ot-1>0?Ot-1:0,Sn=Ot+1<yn?Ot+1:yn,Tt=He&&He.goButton,Dt=(0,Ce.Z)(O)==="object"?O.readOnly:!O,$e=Tt,ft=null;O&&(Tt&&(typeof Tt=="boolean"?$e=_.createElement("button",{type:"button",onClick:mn,onKeyUp:mn},Fe.jump_to_confirm):$e=_.createElement("span",{onClick:mn,onKeyUp:mn},Tt),$e=_.createElement("li",{title:cn?"".concat(Fe.jump_to).concat(Ot,"/").concat(yn):null,className:"".concat(Te,"-simple-pager")},$e)),ft=_.createElement("li",{title:cn?"".concat(Ot,"/").concat(yn):null,className:"".concat(Te,"-simple-pager")},Dt?Mn:_.createElement("input",{type:"text","aria-label":Fe.jump_to,value:Mn,disabled:ee,onKeyDown:_n,onKeyUp:wn,onChange:wn,onBlur:$n,size:3}),_.createElement("span",{className:"".concat(Te,"-slash")},"/"),yn));var Qt=ln?1:2;if(yn<=3+Qt*2){yn||Qn.push(_.createElement(J,(0,fe.Z)({},bn,{key:"noPager",page:1,className:"".concat(Te,"-item-disabled")})));for(var Lt=1;Lt<=yn;Lt+=1)Qn.push(_.createElement(J,(0,fe.Z)({},bn,{key:Lt,page:Lt,active:Ot===Lt})))}else{var on=ln?Fe.prev_3:Fe.prev_5,Cn=ln?Fe.next_3:Fe.next_5,pn=Xe(ne,"jump-prev",Ie(je,"prev page")),Hn=Xe(me,"jump-next",Ie(qe,"next page"));rn&&(Jt=pn?_.createElement("li",{title:cn?on:null,key:"prev",onClick:xr,tabIndex:0,onKeyDown:vr,className:ye()("".concat(Te,"-jump-prev"),(0,V.Z)({},"".concat(Te,"-jump-prev-custom-icon"),!!je))},pn):null,vn=Hn?_.createElement("li",{title:cn?Cn:null,key:"next",onClick:Zr,tabIndex:0,onKeyDown:Hr,className:ye()("".concat(Te,"-jump-next"),(0,V.Z)({},"".concat(Te,"-jump-next-custom-icon"),!!qe))},Hn):null);var Xn=Math.max(1,Ot-Qt),Jn=Math.min(Ot+Qt,yn);Ot-1<=Qt&&(Jn=1+Qt*2),yn-Ot<=Qt&&(Xn=yn-Qt*2);for(var yt=Xn;yt<=Jn;yt+=1)Qn.push(_.createElement(J,(0,fe.Z)({},bn,{key:yt,page:yt,active:Ot===yt})));if(Ot-1>=Qt*2&&Ot!==3&&(Qn[0]=_.cloneElement(Qn[0],{className:ye()("".concat(Te,"-item-after-jump-prev"),Qn[0].props.className)}),Qn.unshift(Jt)),yn-Ot>=Qt*2&&Ot!==yn-2){var On=Qn[Qn.length-1];Qn[Qn.length-1]=_.cloneElement(On,{className:ye()("".concat(Te,"-item-before-jump-next"),On.props.className)}),Qn.push(vn)}Xn!==1&&Qn.unshift(_.createElement(J,(0,fe.Z)({},bn,{key:1,page:1}))),Jn!==yn&&Qn.push(_.createElement(J,(0,fe.Z)({},bn,{key:yn,page:yn})))}var Kn=it(Un);if(Kn){var Q=!lr||!yn;Kn=_.createElement("li",{title:cn?Fe.prev_page:null,onClick:Lr,tabIndex:Q?null:0,onKeyDown:fn,className:ye()("".concat(Te,"-prev"),(0,V.Z)({},"".concat(Te,"-disabled"),Q)),"aria-disabled":Q},Kn)}var K=tt(Sn);if(K){var Ee,Le;O?(Ee=!zn,Le=lr?0:null):(Ee=!zn||!yn,Le=Ee?null:0),K=_.createElement("li",{title:cn?Fe.next_page:null,onClick:Sr,tabIndex:Le,onKeyDown:Zn,className:ye()("".concat(Te,"-next"),(0,V.Z)({},"".concat(Te,"-disabled"),Ee)),"aria-disabled":Ee},K)}var st=ye()(Te,$,(0,V.Z)((0,V.Z)((0,V.Z)((0,V.Z)((0,V.Z)({},"".concat(Te,"-start"),Rt==="start"),"".concat(Te,"-center"),Rt==="center"),"".concat(Te,"-end"),Rt==="end"),"".concat(Te,"-simple"),O),"".concat(Te,"-disabled"),ee));return _.createElement("ul",(0,fe.Z)({className:st,style:j,ref:_t},Bn),xn,Kn,O?ft:Qn,K,_.createElement(M,{locale:Fe,rootPrefixCls:Te,disabled:ee,selectPrefixCls:Y,changeSize:mr,pageSize:St,pageSizeOptions:Se,quickGo:Gt?sr:null,goButton:$e,showSizeChanger:Ae,sizeChangerRender:Be}))},de=oe},29301:function(Vn,ct,x){"use strict";x.d(ct,{Z:function(){return Y}});var V=x(32855),fe=x(59301),Ce=x(11592),ge=x(48736),G=x(27247),g=x(34666),ye=x(76846),le=x(8654),o=fe.createContext(null);function S($){var te=$.children,q=$.onBatchResize,he=fe.useRef(0),re=fe.useRef([]),E=fe.useContext(o),C=fe.useCallback(function(W,be,Ve){he.current+=1;var Ke=he.current;re.current.push({size:W,element:be,data:Ve}),Promise.resolve().then(function(){Ke===he.current&&(q==null||q(re.current),re.current=[])}),E==null||E(W,be,Ve)},[q,E]);return fe.createElement(o.Provider,{value:C},te)}var U=x(76374),_=new Map;function w($){$.forEach(function(te){var q,he=te.target;(q=_.get(he))===null||q===void 0||q.forEach(function(re){return re(he)})})}var b=new U.Z(w),R=null,M=null;function H($,te){_.has($)||(_.set($,new Set),b.observe($)),_.get($).add(te)}function J($,te){_.has($)&&(_.get($).delete(te),_.get($).size||(b.unobserve($),_.delete($)))}var T=x(33377),N=x(93912),P=x(18881),k=x(85461),oe=function($){(0,P.Z)(q,$);var te=(0,k.Z)(q);function q(){return(0,T.Z)(this,q),te.apply(this,arguments)}return(0,N.Z)(q,[{key:"render",value:function(){return this.props.children}}]),q}(fe.Component);function de($,te){var q=$.children,he=$.disabled,re=fe.useRef(null),E=fe.useRef(null),C=fe.useContext(o),W=typeof q=="function",be=W?q(re):q,Ve=fe.useRef({width:-1,height:-1,offsetWidth:-1,offsetHeight:-1}),Ke=!W&&fe.isValidElement(be)&&(0,le.Yr)(be),Ct=Ke?(0,le.C4)(be):null,Rt=(0,le.x1)(Ct,re),Vt=function(){var It;return(0,ye.ZP)(re.current)||(re.current&&(0,g.Z)(re.current)==="object"?(0,ye.ZP)((It=re.current)===null||It===void 0?void 0:It.nativeElement):null)||(0,ye.ZP)(E.current)};fe.useImperativeHandle(te,function(){return Vt()});var rn=fe.useRef($);rn.current=$;var He=fe.useCallback(function(ln){var It=rn.current,cn=It.onResize,xt=It.data,ht=ln.getBoundingClientRect(),Oe=ht.width,Fe=ht.height,j=ln.offsetWidth,Ne=ln.offsetHeight,Ze=Math.floor(Oe),ee=Math.floor(Fe);if(Ve.current.width!==Ze||Ve.current.height!==ee||Ve.current.offsetWidth!==j||Ve.current.offsetHeight!==Ne){var O={width:Ze,height:ee,offsetWidth:j,offsetHeight:Ne};Ve.current=O;var ue=j===Math.round(Oe)?Oe:j,De=Ne===Math.round(Fe)?Fe:Ne,Ae=(0,G.Z)((0,G.Z)({},O),{},{offsetWidth:ue,offsetHeight:De});C==null||C(Ae,ln,xt),cn&&Promise.resolve().then(function(){cn(Ae,ln)})}},[]);return fe.useEffect(function(){var ln=Vt();return ln&&!he&&H(ln,He),function(){return J(ln,He)}},[re.current,he]),fe.createElement(oe,{ref:E},Ke?fe.cloneElement(be,{ref:Rt}):be)}var ie=fe.forwardRef(de),ae=ie,we="rc-observer-key";function Te($,te){var q=$.children,he=typeof q=="function"?[q]:(0,Ce.Z)(q);return he.map(function(re,E){var C=(re==null?void 0:re.key)||"".concat(we,"-").concat(E);return fe.createElement(ae,(0,V.Z)({},$,{key:C,ref:E===0?te:void 0}),re)})}var Re=fe.forwardRef(Te);Re.Collection=S;var Y=Re},6551:function(Vn,ct,x){"use strict";x.d(ct,{ZP:function(){return ye}});var V=x(11913),fe=x(59301),Ce=x(47273),ge=0,G=(0,Ce.Z)();function g(){var le;return G?(le=ge,ge+=1):le="TEST_OR_SSR",le}function ye(le){var o=fe.useState(),S=(0,V.Z)(o,2),U=S[0],_=S[1];return fe.useEffect(function(){_("rc_select_".concat(g()))},[]),le||U}},37463:function(Vn,ct,x){"use strict";x.d(ct,{Ac:function(){return Pe},Xo:function(){return St},Wx:function(){return dn},ZP:function(){return Hr},lk:function(){return N}});var V=x(32855),fe=x(3300),Ce=x(74430),ge=x(27247),G=x(11913),g=x(43079),ye=x(34666),le=x(18929),o=x(48736),S=x(59301),U=x(92310),_=x.n(U),w=x(34280),b=x(49658),R=x(8654),M=function(tt){var mn=tt.className,Jt=tt.customizeIcon,Bn=tt.customizeIconProps,xn=tt.children,vn=tt.onMouseDown,yn=tt.onClick,Qn=typeof Jt=="function"?Jt(Bn):Jt;return S.createElement("span",{className:mn,onMouseDown:function(Un){Un.preventDefault(),vn==null||vn(Un)},style:{userSelect:"none",WebkitUserSelect:"none"},unselectable:"on",onClick:yn,"aria-hidden":!0},Qn!==void 0?Qn:S.createElement("span",{className:_()(mn.split(/\s+/).map(function(bn){return"".concat(bn,"-icon")}))},xn))},H=M,J=function(tt,mn,Jt,Bn,xn){var vn=arguments.length>5&&arguments[5]!==void 0?arguments[5]:!1,yn=arguments.length>6?arguments[6]:void 0,Qn=arguments.length>7?arguments[7]:void 0,bn=S.useMemo(function(){if((0,ye.Z)(Bn)==="object")return Bn.clearIcon;if(xn)return xn},[Bn,xn]),Un=S.useMemo(function(){return!!(!vn&&Bn&&(Jt.length||yn)&&!(Qn==="combobox"&&yn===""))},[Bn,vn,Jt.length,yn,Qn]);return{allowClear:Un,clearIcon:S.createElement(H,{className:"".concat(tt,"-clear"),onMouseDown:mn,customizeIcon:bn},"\xD7")}},T=S.createContext(null);function N(){return S.useContext(T)}function P(){var it=arguments.length>0&&arguments[0]!==void 0?arguments[0]:10,tt=S.useState(!1),mn=(0,G.Z)(tt,2),Jt=mn[0],Bn=mn[1],xn=S.useRef(null),vn=function(){window.clearTimeout(xn.current)};S.useEffect(function(){return vn},[]);var yn=function(bn,Un){vn(),xn.current=window.setTimeout(function(){Bn(bn),Un&&Un()},it)};return[Jt,yn,vn]}function k(){var it=arguments.length>0&&arguments[0]!==void 0?arguments[0]:250,tt=S.useRef(null),mn=S.useRef(null);S.useEffect(function(){return function(){window.clearTimeout(mn.current)}},[]);function Jt(Bn){(Bn||tt.current===null)&&(tt.current=Bn),window.clearTimeout(mn.current),mn.current=window.setTimeout(function(){tt.current=null},it)}return[function(){return tt.current},Jt]}function oe(it,tt,mn,Jt){var Bn=S.useRef(null);Bn.current={open:tt,triggerOpen:mn,customizedTrigger:Jt},S.useEffect(function(){function xn(vn){var yn;if(!((yn=Bn.current)!==null&&yn!==void 0&&yn.customizedTrigger)){var Qn=vn.target;Qn.shadowRoot&&vn.composed&&(Qn=vn.composedPath()[0]||Qn),Bn.current.open&&it().filter(function(bn){return bn}).every(function(bn){return!bn.contains(Qn)&&bn!==Qn})&&Bn.current.triggerOpen(!1)}}return window.addEventListener("mousedown",xn),function(){return window.removeEventListener("mousedown",xn)}},[])}var de=x(10228);function ie(it){return it&&![de.Z.ESC,de.Z.SHIFT,de.Z.BACKSPACE,de.Z.TAB,de.Z.WIN_KEY,de.Z.ALT,de.Z.META,de.Z.WIN_KEY_RIGHT,de.Z.CTRL,de.Z.SEMICOLON,de.Z.EQUALS,de.Z.CAPS_LOCK,de.Z.CONTEXT_MENU,de.Z.F1,de.Z.F2,de.Z.F3,de.Z.F4,de.Z.F5,de.Z.F6,de.Z.F7,de.Z.F8,de.Z.F9,de.Z.F10,de.Z.F11,de.Z.F12].includes(it)}var ae=x(26112),we=x(11780);function Te(it,tt,mn){var Jt=(0,ge.Z)((0,ge.Z)({},it),mn?tt:{});return Object.keys(tt).forEach(function(Bn){var xn=tt[Bn];typeof xn=="function"&&(Jt[Bn]=function(){for(var vn,yn=arguments.length,Qn=new Array(yn),bn=0;bn<yn;bn++)Qn[bn]=arguments[bn];return xn.apply(void 0,Qn),(vn=it[Bn])===null||vn===void 0?void 0:vn.call.apply(vn,[it].concat(Qn))})}),Jt}var Re=Te,Y=["prefixCls","id","inputElement","autoFocus","autoComplete","editable","activeDescendantId","value","open","attrs"],$=function(tt,mn){var Jt=tt.prefixCls,Bn=tt.id,xn=tt.inputElement,vn=tt.autoFocus,yn=tt.autoComplete,Qn=tt.editable,bn=tt.activeDescendantId,Un=tt.value,Sn=tt.open,Tt=tt.attrs,Dt=(0,g.Z)(tt,Y),$e=xn||S.createElement("input",null),ft=$e,Qt=ft.ref,Lt=ft.props;return(0,o.Kp)(!("maxLength"in $e.props),"Passing 'maxLength' to input element directly may not work because input in BaseSelect is controlled."),$e=S.cloneElement($e,(0,ge.Z)((0,ge.Z)((0,ge.Z)({type:"search"},Re(Dt,Lt,!0)),{},{id:Bn,ref:(0,R.sQ)(mn,Qt),autoComplete:yn||"off",autoFocus:vn,className:_()("".concat(Jt,"-selection-search-input"),Lt==null?void 0:Lt.className),role:"combobox","aria-expanded":Sn||!1,"aria-haspopup":"listbox","aria-owns":"".concat(Bn,"_list"),"aria-autocomplete":"list","aria-controls":"".concat(Bn,"_list"),"aria-activedescendant":Sn?bn:void 0},Tt),{},{value:Qn?Un:"",readOnly:!Qn,unselectable:Qn?null:"on",style:(0,ge.Z)((0,ge.Z)({},Lt.style),{},{opacity:Qn?null:0})})),$e},te=S.forwardRef($),q=te;function he(it){return Array.isArray(it)?it:it!==void 0?[it]:[]}var re=typeof window!="undefined"&&window.document&&window.document.documentElement,E=re;function C(it){return it!=null}function W(it){return!it&&it!==0}function be(it){return["string","number"].includes((0,ye.Z)(it))}function Ve(it){var tt=void 0;return it&&(be(it.title)?tt=it.title.toString():be(it.label)&&(tt=it.label.toString())),tt}function Ke(it,tt){E?S.useLayoutEffect(it,tt):S.useEffect(it,tt)}function Ct(it){var tt;return(tt=it.key)!==null&&tt!==void 0?tt:it.value}var Rt=function(tt){tt.preventDefault(),tt.stopPropagation()},Vt=function(tt){var mn=tt.id,Jt=tt.prefixCls,Bn=tt.values,xn=tt.open,vn=tt.searchValue,yn=tt.autoClearSearchValue,Qn=tt.inputRef,bn=tt.placeholder,Un=tt.disabled,Sn=tt.mode,Tt=tt.showSearch,Dt=tt.autoFocus,$e=tt.autoComplete,ft=tt.activeDescendantId,Qt=tt.tabIndex,Lt=tt.removeIcon,on=tt.maxTagCount,Cn=tt.maxTagTextLength,pn=tt.maxTagPlaceholder,Hn=pn===void 0?function(Bt){return"+ ".concat(Bt.length," ...")}:pn,Xn=tt.tagRender,Jn=tt.onToggleOpen,yt=tt.onRemove,On=tt.onInputChange,Kn=tt.onInputPaste,Q=tt.onInputKeyDown,K=tt.onInputMouseDown,Ee=tt.onInputCompositionStart,Le=tt.onInputCompositionEnd,st=tt.onInputBlur,rt=S.useRef(null),Ft=(0,S.useState)(0),Ht=(0,G.Z)(Ft,2),an=Ht[0],Xt=Ht[1],Kt=(0,S.useState)(!1),en=(0,G.Z)(Kt,2),pe=en[0],Ye=en[1],Ge="".concat(Jt,"-selection"),et=xn||Sn==="multiple"&&yn===!1||Sn==="tags"?vn:"",lt=Sn==="tags"||Sn==="multiple"&&yn===!1||Tt&&(xn||pe);Ke(function(){Xt(rt.current.scrollWidth)},[et]);var dt=function(mt,bt,An,En,In){return S.createElement("span",{title:Ve(mt),className:_()("".concat(Ge,"-item"),(0,Ce.Z)({},"".concat(Ge,"-item-disabled"),An))},S.createElement("span",{className:"".concat(Ge,"-item-content")},bt),En&&S.createElement(H,{className:"".concat(Ge,"-item-remove"),onMouseDown:Rt,onClick:In,customizeIcon:Lt},"\xD7"))},jt=function(mt,bt,An,En,In,jn){var tr=function(ar){Rt(ar),Jn(!xn)};return S.createElement("span",{onMouseDown:tr},Xn({label:bt,value:mt,disabled:An,closable:En,onClose:In,isMaxTag:!!jn}))},Nt=function(mt){var bt=mt.disabled,An=mt.label,En=mt.value,In=!Un&&!bt,jn=An;if(typeof Cn=="number"&&(typeof An=="string"||typeof An=="number")){var tr=String(jn);tr.length>Cn&&(jn="".concat(tr.slice(0,Cn),"..."))}var Yn=function(Pn){Pn&&Pn.stopPropagation(),yt(mt)};return typeof Xn=="function"?jt(En,jn,bt,In,Yn):dt(mt,jn,bt,In,Yn)},wt=function(mt){if(!Bn.length)return null;var bt=typeof Hn=="function"?Hn(mt):Hn;return typeof Xn=="function"?jt(void 0,bt,!1,!1,void 0,!0):dt({title:bt},bt,!1)},Je=S.createElement("div",{className:"".concat(Ge,"-search"),style:{width:an},onFocus:function(){Ye(!0)},onBlur:function(){Ye(!1)}},S.createElement(q,{ref:Qn,open:xn,prefixCls:Jt,id:mn,inputElement:null,disabled:Un,autoFocus:Dt,autoComplete:$e,editable:lt,activeDescendantId:ft,value:et,onKeyDown:Q,onMouseDown:K,onChange:On,onPaste:Kn,onCompositionStart:Ee,onCompositionEnd:Le,onBlur:st,tabIndex:Qt,attrs:(0,ae.Z)(tt,!0)}),S.createElement("span",{ref:rt,className:"".concat(Ge,"-search-mirror"),"aria-hidden":!0},et,"\xA0")),At=S.createElement(we.Z,{prefixCls:"".concat(Ge,"-overflow"),data:Bn,renderItem:Nt,renderRest:wt,suffix:Je,itemKey:Ct,maxCount:on});return S.createElement("span",{className:"".concat(Ge,"-wrap")},At,!Bn.length&&!et&&S.createElement("span",{className:"".concat(Ge,"-placeholder")},bn))},rn=Vt,He=function(tt){var mn=tt.inputElement,Jt=tt.prefixCls,Bn=tt.id,xn=tt.inputRef,vn=tt.disabled,yn=tt.autoFocus,Qn=tt.autoComplete,bn=tt.activeDescendantId,Un=tt.mode,Sn=tt.open,Tt=tt.values,Dt=tt.placeholder,$e=tt.tabIndex,ft=tt.showSearch,Qt=tt.searchValue,Lt=tt.activeValue,on=tt.maxLength,Cn=tt.onInputKeyDown,pn=tt.onInputMouseDown,Hn=tt.onInputChange,Xn=tt.onInputPaste,Jn=tt.onInputCompositionStart,yt=tt.onInputCompositionEnd,On=tt.onInputBlur,Kn=tt.title,Q=S.useState(!1),K=(0,G.Z)(Q,2),Ee=K[0],Le=K[1],st=Un==="combobox",rt=st||ft,Ft=Tt[0],Ht=Qt||"";st&&Lt&&!Ee&&(Ht=Lt),S.useEffect(function(){st&&Le(!1)},[st,Lt]);var an=Un!=="combobox"&&!Sn&&!ft?!1:!!Ht,Xt=Kn===void 0?Ve(Ft):Kn,Kt=S.useMemo(function(){return Ft?null:S.createElement("span",{className:"".concat(Jt,"-selection-placeholder"),style:an?{visibility:"hidden"}:void 0},Dt)},[Ft,an,Dt,Jt]);return S.createElement("span",{className:"".concat(Jt,"-selection-wrap")},S.createElement("span",{className:"".concat(Jt,"-selection-search")},S.createElement(q,{ref:xn,prefixCls:Jt,id:Bn,open:Sn,inputElement:mn,disabled:vn,autoFocus:yn,autoComplete:Qn,editable:rt,activeDescendantId:bn,value:Ht,onKeyDown:Cn,onMouseDown:pn,onChange:function(pe){Le(!0),Hn(pe)},onPaste:Xn,onCompositionStart:Jn,onCompositionEnd:yt,onBlur:On,tabIndex:$e,attrs:(0,ae.Z)(tt,!0),maxLength:st?on:void 0})),!st&&Ft?S.createElement("span",{className:"".concat(Jt,"-selection-item"),title:Xt,style:an?{visibility:"hidden"}:void 0},Ft.label):null,Kt)},ln=He,It=function(tt,mn){var Jt=(0,S.useRef)(null),Bn=(0,S.useRef)(!1),xn=tt.prefixCls,vn=tt.open,yn=tt.mode,Qn=tt.showSearch,bn=tt.tokenWithEnter,Un=tt.disabled,Sn=tt.prefix,Tt=tt.autoClearSearchValue,Dt=tt.onSearch,$e=tt.onSearchSubmit,ft=tt.onToggleOpen,Qt=tt.onInputKeyDown,Lt=tt.onInputBlur,on=tt.domRef;S.useImperativeHandle(mn,function(){return{focus:function(Xt){Jt.current.focus(Xt)},blur:function(){Jt.current.blur()}}});var Cn=k(0),pn=(0,G.Z)(Cn,2),Hn=pn[0],Xn=pn[1],Jn=function(Xt){var Kt=Xt.which,en=Jt.current instanceof HTMLTextAreaElement;!en&&vn&&(Kt===de.Z.UP||Kt===de.Z.DOWN)&&Xt.preventDefault(),Qt&&Qt(Xt),Kt===de.Z.ENTER&&yn==="tags"&&!Bn.current&&!vn&&($e==null||$e(Xt.target.value)),!(en&&!vn&&~[de.Z.UP,de.Z.DOWN,de.Z.LEFT,de.Z.RIGHT].indexOf(Kt))&&ie(Kt)&&ft(!0)},yt=function(){Xn(!0)},On=(0,S.useRef)(null),Kn=function(Xt){Dt(Xt,!0,Bn.current)!==!1&&ft(!0)},Q=function(){Bn.current=!0},K=function(Xt){Bn.current=!1,yn!=="combobox"&&Kn(Xt.target.value)},Ee=function(Xt){var Kt=Xt.target.value;if(bn&&On.current&&/[\r\n]/.test(On.current)){var en=On.current.replace(/[\r\n]+$/,"").replace(/\r\n/g," ").replace(/[\r\n]/g," ");Kt=Kt.replace(en,On.current)}On.current=null,Kn(Kt)},Le=function(Xt){var Kt=Xt.clipboardData,en=Kt==null?void 0:Kt.getData("text");On.current=en||""},st=function(Xt){var Kt=Xt.target;if(Kt!==Jt.current){var en=document.body.style.msTouchAction!==void 0;en?setTimeout(function(){Jt.current.focus()}):Jt.current.focus()}},rt=function(Xt){var Kt=Hn();Xt.target!==Jt.current&&!Kt&&!(yn==="combobox"&&Un)&&Xt.preventDefault(),(yn!=="combobox"&&(!Qn||!Kt)||!vn)&&(vn&&Tt!==!1&&Dt("",!0,!1),ft())},Ft={inputRef:Jt,onInputKeyDown:Jn,onInputMouseDown:yt,onInputChange:Ee,onInputPaste:Le,onInputCompositionStart:Q,onInputCompositionEnd:K,onInputBlur:Lt},Ht=yn==="multiple"||yn==="tags"?S.createElement(rn,(0,V.Z)({},tt,Ft)):S.createElement(ln,(0,V.Z)({},tt,Ft));return S.createElement("div",{ref:on,className:"".concat(xn,"-selector"),onClick:st,onMouseDown:rt},Sn&&S.createElement("div",{className:"".concat(xn,"-prefix")},Sn),Ht)},cn=S.forwardRef(It),xt=cn,ht=x(65030),Oe=["prefixCls","disabled","visible","children","popupElement","animation","transitionName","dropdownStyle","dropdownClassName","direction","placement","builtinPlacements","dropdownMatchSelectWidth","dropdownRender","dropdownAlign","getPopupContainer","empty","getTriggerDOMNode","onPopupVisibleChange","onPopupMouseEnter"],Fe=function(tt){var mn=tt===!0?0:1;return{bottomLeft:{points:["tl","bl"],offset:[0,4],overflow:{adjustX:mn,adjustY:1},htmlRegion:"scroll"},bottomRight:{points:["tr","br"],offset:[0,4],overflow:{adjustX:mn,adjustY:1},htmlRegion:"scroll"},topLeft:{points:["bl","tl"],offset:[0,-4],overflow:{adjustX:mn,adjustY:1},htmlRegion:"scroll"},topRight:{points:["br","tr"],offset:[0,-4],overflow:{adjustX:mn,adjustY:1},htmlRegion:"scroll"}}},j=function(tt,mn){var Jt=tt.prefixCls,Bn=tt.disabled,xn=tt.visible,vn=tt.children,yn=tt.popupElement,Qn=tt.animation,bn=tt.transitionName,Un=tt.dropdownStyle,Sn=tt.dropdownClassName,Tt=tt.direction,Dt=Tt===void 0?"ltr":Tt,$e=tt.placement,ft=tt.builtinPlacements,Qt=tt.dropdownMatchSelectWidth,Lt=tt.dropdownRender,on=tt.dropdownAlign,Cn=tt.getPopupContainer,pn=tt.empty,Hn=tt.getTriggerDOMNode,Xn=tt.onPopupVisibleChange,Jn=tt.onPopupMouseEnter,yt=(0,g.Z)(tt,Oe),On="".concat(Jt,"-dropdown"),Kn=yn;Lt&&(Kn=Lt(yn));var Q=S.useMemo(function(){return ft||Fe(Qt)},[ft,Qt]),K=Qn?"".concat(On,"-").concat(Qn):bn,Ee=typeof Qt=="number",Le=S.useMemo(function(){return Ee?null:Qt===!1?"minWidth":"width"},[Qt,Ee]),st=Un;Ee&&(st=(0,ge.Z)((0,ge.Z)({},st),{},{width:Qt}));var rt=S.useRef(null);return S.useImperativeHandle(mn,function(){return{getPopupElement:function(){var Ht;return(Ht=rt.current)===null||Ht===void 0?void 0:Ht.popupElement}}}),S.createElement(ht.Z,(0,V.Z)({},yt,{showAction:Xn?["click"]:[],hideAction:Xn?["click"]:[],popupPlacement:$e||(Dt==="rtl"?"bottomRight":"bottomLeft"),builtinPlacements:Q,prefixCls:On,popupTransitionName:K,popup:S.createElement("div",{onMouseEnter:Jn},Kn),ref:rt,stretch:Le,popupAlign:on,popupVisible:xn,getPopupContainer:Cn,popupClassName:_()(Sn,(0,Ce.Z)({},"".concat(On,"-empty"),pn)),popupStyle:st,getTriggerDOMNode:Hn,onPopupVisibleChange:Xn}),vn)},Ne=S.forwardRef(j),Ze=Ne,ee=x(40954);function O(it,tt){var mn=it.key,Jt;return"value"in it&&(Jt=it.value),mn!=null?mn:Jt!==void 0?Jt:"rc-index-key-".concat(tt)}function ue(it){return typeof it!="undefined"&&!Number.isNaN(it)}function De(it,tt){var mn=it||{},Jt=mn.label,Bn=mn.value,xn=mn.options,vn=mn.groupLabel,yn=Jt||(tt?"children":"label");return{label:yn,value:Bn||"value",options:xn||"options",groupLabel:vn||yn}}function Ae(it){var tt=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},mn=tt.fieldNames,Jt=tt.childrenAsData,Bn=[],xn=De(mn,!1),vn=xn.label,yn=xn.value,Qn=xn.options,bn=xn.groupLabel;function Un(Sn,Tt){Array.isArray(Sn)&&Sn.forEach(function(Dt){if(Tt||!(Qn in Dt)){var $e=Dt[yn];Bn.push({key:O(Dt,Bn.length),groupOption:Tt,data:Dt,label:Dt[vn],value:$e})}else{var ft=Dt[bn];ft===void 0&&Jt&&(ft=Dt.label),Bn.push({key:O(Dt,Bn.length),group:!0,data:Dt,label:ft}),Un(Dt[Qn],!0)}})}return Un(it,!1),Bn}function Be(it){var tt=(0,ge.Z)({},it);return"props"in tt||Object.defineProperty(tt,"props",{get:function(){return(0,o.ZP)(!1,"Return type is option instead of Option instance. Please read value directly instead of reading from `props`."),tt}}),tt}var Se=function(tt,mn,Jt){if(!mn||!mn.length)return null;var Bn=!1,xn=function yn(Qn,bn){var Un=(0,ee.Z)(bn),Sn=Un[0],Tt=Un.slice(1);if(!Sn)return[Qn];var Dt=Qn.split(Sn);return Bn=Bn||Dt.length>1,Dt.reduce(function($e,ft){return[].concat((0,fe.Z)($e),(0,fe.Z)(yn(ft,Tt)))},[]).filter(Boolean)},vn=xn(tt,mn);return Bn?typeof Jt!="undefined"?vn.slice(0,Jt):vn:null},ot=S.createContext(null),Xe=ot;function je(it){var tt=it.visible,mn=it.values;if(!tt)return null;var Jt=50;return S.createElement("span",{"aria-live":"polite",style:{width:0,height:0,position:"absolute",overflow:"hidden",opacity:0}},"".concat(mn.slice(0,Jt).map(function(Bn){var xn=Bn.label,vn=Bn.value;return["number","string"].includes((0,ye.Z)(xn))?xn:vn}).join(", ")),mn.length>Jt?", ...":null)}var qe=["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"],kt=["value","onChange","removeIcon","placeholder","autoFocus","maxTagCount","maxTagTextLength","maxTagPlaceholder","choiceTransitionName","onInputKeyDown","onPopupScroll","tabIndex"],gt=function(tt){return tt==="tags"||tt==="multiple"},_t=S.forwardRef(function(it,tt){var mn,Jt=it.id,Bn=it.prefixCls,xn=it.className,vn=it.showSearch,yn=it.tagRender,Qn=it.direction,bn=it.omitDomProps,Un=it.displayValues,Sn=it.onDisplayValuesChange,Tt=it.emptyOptions,Dt=it.notFoundContent,$e=Dt===void 0?"Not Found":Dt,ft=it.onClear,Qt=it.mode,Lt=it.disabled,on=it.loading,Cn=it.getInputElement,pn=it.getRawInputElement,Hn=it.open,Xn=it.defaultOpen,Jn=it.onDropdownVisibleChange,yt=it.activeValue,On=it.onActiveValueChange,Kn=it.activeDescendantId,Q=it.searchValue,K=it.autoClearSearchValue,Ee=it.onSearch,Le=it.onSearchSplit,st=it.tokenSeparators,rt=it.allowClear,Ft=it.prefix,Ht=it.suffixIcon,an=it.clearIcon,Xt=it.OptionList,Kt=it.animation,en=it.transitionName,pe=it.dropdownStyle,Ye=it.dropdownClassName,Ge=it.dropdownMatchSelectWidth,et=it.dropdownRender,lt=it.dropdownAlign,dt=it.placement,jt=it.builtinPlacements,Nt=it.getPopupContainer,wt=it.showAction,Je=wt===void 0?[]:wt,At=it.onFocus,Bt=it.onBlur,mt=it.onKeyUp,bt=it.onKeyDown,An=it.onMouseDown,En=(0,g.Z)(it,qe),In=gt(Qt),jn=(vn!==void 0?vn:In)||Qt==="combobox",tr=(0,ge.Z)({},En);kt.forEach(function(oi){delete tr[oi]}),bn==null||bn.forEach(function(oi){delete tr[oi]});var Yn=S.useState(!1),ar=(0,G.Z)(Yn,2),Pn=ar[0],yr=ar[1];S.useEffect(function(){yr((0,b.Z)())},[]);var ir=S.useRef(null),Kr=S.useRef(null),fr=S.useRef(null),hr=S.useRef(null),Tr=S.useRef(null),kn=S.useRef(!1),pr=P(),cr=(0,G.Z)(pr,3),Wn=cr[0],ur=cr[1],Ir=cr[2];S.useImperativeHandle(tt,function(){var oi,Ai;return{focus:(oi=hr.current)===null||oi===void 0?void 0:oi.focus,blur:(Ai=hr.current)===null||Ai===void 0?void 0:Ai.blur,scrollTo:function(Si){var es;return(es=Tr.current)===null||es===void 0?void 0:es.scrollTo(Si)},nativeElement:ir.current||Kr.current}});var Vr=S.useMemo(function(){var oi;if(Qt!=="combobox")return Q;var Ai=(oi=Un[0])===null||oi===void 0?void 0:oi.value;return typeof Ai=="string"||typeof Ai=="number"?String(Ai):""},[Q,Qt,Un]),Ur=Qt==="combobox"&&typeof Cn=="function"&&Cn()||null,or=typeof pn=="function"&&pn(),hi=(0,R.x1)(Kr,or==null||(mn=or.props)===null||mn===void 0?void 0:mn.ref),Ki=S.useState(!1),Ji=(0,G.Z)(Ki,2),ds=Ji[0],ss=Ji[1];(0,w.Z)(function(){ss(!0)},[]);var zi=(0,le.Z)(!1,{defaultValue:Xn,value:Hn}),ii=(0,G.Z)(zi,2),ci=ii[0],Pi=ii[1],ai=ds?ci:!1,si=!$e&&Tt;(Lt||si&&ai&&Qt==="combobox")&&(ai=!1);var li=si?!1:ai,gr=S.useCallback(function(oi){var Ai=oi!==void 0?oi:!ai;Lt||(Pi(Ai),ai!==Ai&&(Jn==null||Jn(Ai)))},[Lt,ai,Pi,Jn]),Fr=S.useMemo(function(){return(st||[]).some(function(oi){return[`
|
|
`,`\r
|
|
`].includes(oi)})},[st]),Gr=S.useContext(Xe)||{},$r=Gr.maxCount,Dr=Gr.rawValues,Xr=function(Ai,Mi,Si){if(!(In&&ue($r)&&(Dr==null?void 0:Dr.size)>=$r)){var es=!0,Wi=Ai;On==null||On(null);var Rs=Se(Ai,st,ue($r)?$r-Dr.size:void 0),Ls=Si?null:Rs;return Qt!=="combobox"&&Ls&&(Wi="",Le==null||Le(Ls),gr(!1),es=!1),Ee&&Vr!==Wi&&Ee(Wi,{source:Mi?"typing":"effect"}),es}},ti=function(Ai){!Ai||!Ai.trim()||Ee(Ai,{source:"submit"})};S.useEffect(function(){!ai&&!In&&Qt!=="combobox"&&Xr("",!1,!1)},[ai]),S.useEffect(function(){ci&&Lt&&Pi(!1),Lt&&!kn.current&&ur(!1)},[Lt]);var rr=k(),_r=(0,G.Z)(rr,2),Er=_r[0],ui=_r[1],fi=S.useRef(!1),Gi=function(Ai){var Mi=Er(),Si=Ai.key,es=Si==="Enter";if(es&&(Qt!=="combobox"&&Ai.preventDefault(),ai||gr(!0)),ui(!!Vr),Si==="Backspace"&&!Mi&&In&&!Vr&&Un.length){for(var Wi=(0,fe.Z)(Un),Rs=null,Ls=Wi.length-1;Ls>=0;Ls-=1){var Ps=Wi[Ls];if(!Ps.disabled){Wi.splice(Ls,1),Rs=Ps;break}}Rs&&Sn(Wi,{type:"remove",values:[Rs]})}for(var Ui=arguments.length,xs=new Array(Ui>1?Ui-1:0),Gs=1;Gs<Ui;Gs++)xs[Gs-1]=arguments[Gs];if(ai&&(!es||!fi.current)){var $s;es&&(fi.current=!0),($s=Tr.current)===null||$s===void 0||$s.onKeyDown.apply($s,[Ai].concat(xs))}bt==null||bt.apply(void 0,[Ai].concat(xs))},as=function(Ai){for(var Mi=arguments.length,Si=new Array(Mi>1?Mi-1:0),es=1;es<Mi;es++)Si[es-1]=arguments[es];if(ai){var Wi;(Wi=Tr.current)===null||Wi===void 0||Wi.onKeyUp.apply(Wi,[Ai].concat(Si))}Ai.key==="Enter"&&(fi.current=!1),mt==null||mt.apply(void 0,[Ai].concat(Si))},Bi=function(Ai){var Mi=Un.filter(function(Si){return Si!==Ai});Sn(Mi,{type:"remove",values:[Ai]})},ls=function(){fi.current=!1},gi=S.useRef(!1),la=function(){ur(!0),Lt||(At&&!gi.current&&At.apply(void 0,arguments),Je.includes("focus")&&gr(!0)),gi.current=!0},Ms=function(){kn.current=!0,ur(!1,function(){gi.current=!1,kn.current=!1,gr(!1)}),!Lt&&(Vr&&(Qt==="tags"?Ee(Vr,{source:"submit"}):Qt==="multiple"&&Ee("",{source:"blur"})),Bt&&Bt.apply(void 0,arguments))},ws=[];S.useEffect(function(){return function(){ws.forEach(function(oi){return clearTimeout(oi)}),ws.splice(0,ws.length)}},[]);var Fi=function(Ai){var Mi,Si=Ai.target,es=(Mi=fr.current)===null||Mi===void 0?void 0:Mi.getPopupElement();if(es&&es.contains(Si)){var Wi=setTimeout(function(){var Ui=ws.indexOf(Wi);if(Ui!==-1&&ws.splice(Ui,1),Ir(),!Pn&&!es.contains(document.activeElement)){var xs;(xs=hr.current)===null||xs===void 0||xs.focus()}});ws.push(Wi)}for(var Rs=arguments.length,Ls=new Array(Rs>1?Rs-1:0),Ps=1;Ps<Rs;Ps++)Ls[Ps-1]=arguments[Ps];An==null||An.apply(void 0,[Ai].concat(Ls))},ra=S.useState({}),Es=(0,G.Z)(ra,2),Ws=Es[1];function Qs(){Ws({})}var js;or&&(js=function(Ai){gr(Ai)}),oe(function(){var oi;return[ir.current,(oi=fr.current)===null||oi===void 0?void 0:oi.getPopupElement()]},li,gr,!!or);var Ys=S.useMemo(function(){return(0,ge.Z)((0,ge.Z)({},it),{},{notFoundContent:$e,open:ai,triggerOpen:li,id:Jt,showSearch:jn,multiple:In,toggleOpen:gr})},[it,$e,li,ai,Jt,jn,In,gr]),pa=!!Ht||on,ms;pa&&(ms=S.createElement(H,{className:_()("".concat(Bn,"-arrow"),(0,Ce.Z)({},"".concat(Bn,"-arrow-loading"),on)),customizeIcon:Ht,customizeIconProps:{loading:on,searchValue:Vr,open:ai,focused:Wn,showSearch:jn}}));var Xs=function(){var Ai;ft==null||ft(),(Ai=hr.current)===null||Ai===void 0||Ai.focus(),Sn([],{type:"clear",values:Un}),Xr("",!1,!1)},vs=J(Bn,Xs,Un,rt,an,Lt,Vr,Qt),cs=vs.allowClear,Os=vs.clearIcon,Ds=S.createElement(Xt,{ref:Tr}),Js=_()(Bn,xn,(0,Ce.Z)((0,Ce.Z)((0,Ce.Z)((0,Ce.Z)((0,Ce.Z)((0,Ce.Z)((0,Ce.Z)((0,Ce.Z)((0,Ce.Z)((0,Ce.Z)({},"".concat(Bn,"-focused"),Wn),"".concat(Bn,"-multiple"),In),"".concat(Bn,"-single"),!In),"".concat(Bn,"-allow-clear"),rt),"".concat(Bn,"-show-arrow"),pa),"".concat(Bn,"-disabled"),Lt),"".concat(Bn,"-loading"),on),"".concat(Bn,"-open"),ai),"".concat(Bn,"-customize-input"),Ur),"".concat(Bn,"-show-search"),jn)),hs=S.createElement(Ze,{ref:fr,disabled:Lt,prefixCls:Bn,visible:li,popupElement:Ds,animation:Kt,transitionName:en,dropdownStyle:pe,dropdownClassName:Ye,direction:Qn,dropdownMatchSelectWidth:Ge,dropdownRender:et,dropdownAlign:lt,placement:dt,builtinPlacements:jt,getPopupContainer:Nt,empty:Tt,getTriggerDOMNode:function(Ai){return Kr.current||Ai},onPopupVisibleChange:js,onPopupMouseEnter:Qs},or?S.cloneElement(or,{ref:hi}):S.createElement(xt,(0,V.Z)({},it,{domRef:Kr,prefixCls:Bn,inputElement:Ur,ref:hr,id:Jt,prefix:Ft,showSearch:jn,autoClearSearchValue:K,mode:Qt,activeDescendantId:Kn,tagRender:yn,values:Un,open:ai,onToggleOpen:gr,activeValue:yt,searchValue:Vr,onSearch:Xr,onSearchSubmit:ti,onRemove:Bi,tokenWithEnter:Fr,onInputBlur:ls}))),os;return or?os=hs:os=S.createElement("div",(0,V.Z)({className:Js},tr,{ref:ir,onMouseDown:Fi,onKeyDown:Gi,onKeyUp:as,onFocus:la,onBlur:Ms}),S.createElement(je,{visible:Wn&&!ai,values:Un}),hs,ms,cs&&Os),S.createElement(T.Provider,{value:Ys},os)}),Pe=_t,Wt=function(){return null};Wt.isSelectOptGroup=!0;var St=Wt,vt=function(){return null};vt.isSelectOption=!0;var dn=vt,hn=x(80547),Ot=x(2738),Ln=x(6790);function qn(){return/(mac\sos|macintosh)/i.test(navigator.appVersion)}var sn=["disabled","title","children","style","className"];function Mn(it){return typeof it=="string"||typeof it=="number"}var ut=function(tt,mn){var Jt=N(),Bn=Jt.prefixCls,xn=Jt.id,vn=Jt.open,yn=Jt.multiple,Qn=Jt.mode,bn=Jt.searchValue,Un=Jt.toggleOpen,Sn=Jt.notFoundContent,Tt=Jt.onPopupScroll,Dt=S.useContext(Xe),$e=Dt.maxCount,ft=Dt.flattenOptions,Qt=Dt.onActiveValue,Lt=Dt.defaultActiveFirstOption,on=Dt.onSelect,Cn=Dt.menuItemSelectedIcon,pn=Dt.rawValues,Hn=Dt.fieldNames,Xn=Dt.virtual,Jn=Dt.direction,yt=Dt.listHeight,On=Dt.listItemHeight,Kn=Dt.optionRender,Q="".concat(Bn,"-item"),K=(0,hn.Z)(function(){return ft},[vn,ft],function(wt,Je){return Je[0]&&wt[1]!==Je[1]}),Ee=S.useRef(null),Le=S.useMemo(function(){return yn&&ue($e)&&(pn==null?void 0:pn.size)>=$e},[yn,$e,pn==null?void 0:pn.size]),st=function(Je){Je.preventDefault()},rt=function(Je){var At;(At=Ee.current)===null||At===void 0||At.scrollTo(typeof Je=="number"?{index:Je}:Je)},Ft=S.useCallback(function(wt){return Qn==="combobox"?!1:pn.has(wt)},[Qn,(0,fe.Z)(pn).toString(),pn.size]),Ht=function(Je){for(var At=arguments.length>1&&arguments[1]!==void 0?arguments[1]:1,Bt=K.length,mt=0;mt<Bt;mt+=1){var bt=(Je+mt*At+Bt)%Bt,An=K[bt]||{},En=An.group,In=An.data;if(!En&&!(In!=null&&In.disabled)&&(Ft(In.value)||!Le))return bt}return-1},an=S.useState(function(){return Ht(0)}),Xt=(0,G.Z)(an,2),Kt=Xt[0],en=Xt[1],pe=function(Je){var At=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;en(Je);var Bt={source:At?"keyboard":"mouse"},mt=K[Je];if(!mt){Qt(null,-1,Bt);return}Qt(mt.value,Je,Bt)};(0,S.useEffect)(function(){pe(Lt!==!1?Ht(0):-1)},[K.length,bn]);var Ye=S.useCallback(function(wt){return Qn==="combobox"?String(wt).toLowerCase()===bn.toLowerCase():pn.has(wt)},[Qn,bn,(0,fe.Z)(pn).toString(),pn.size]);(0,S.useEffect)(function(){var wt=setTimeout(function(){if(!yn&&vn&&pn.size===1){var At=Array.from(pn)[0],Bt=K.findIndex(function(mt){var bt=mt.data;return bn?String(bt.value).startsWith(bn):bt.value===At});Bt!==-1&&(pe(Bt),rt(Bt))}});if(vn){var Je;(Je=Ee.current)===null||Je===void 0||Je.scrollTo(void 0)}return function(){return clearTimeout(wt)}},[vn,bn]);var Ge=function(Je){Je!==void 0&&on(Je,{selected:!pn.has(Je)}),yn||Un(!1)};if(S.useImperativeHandle(mn,function(){return{onKeyDown:function(Je){var At=Je.which,Bt=Je.ctrlKey;switch(At){case de.Z.N:case de.Z.P:case de.Z.UP:case de.Z.DOWN:{var mt=0;if(At===de.Z.UP?mt=-1:At===de.Z.DOWN?mt=1:qn()&&Bt&&(At===de.Z.N?mt=1:At===de.Z.P&&(mt=-1)),mt!==0){var bt=Ht(Kt+mt,mt);rt(bt),pe(bt,!0)}break}case de.Z.TAB:case de.Z.ENTER:{var An,En=K[Kt];En&&!(En!=null&&(An=En.data)!==null&&An!==void 0&&An.disabled)&&!Le?Ge(En.value):Ge(void 0),vn&&Je.preventDefault();break}case de.Z.ESC:Un(!1),vn&&Je.stopPropagation()}},onKeyUp:function(){},scrollTo:function(Je){rt(Je)}}}),K.length===0)return S.createElement("div",{role:"listbox",id:"".concat(xn,"_list"),className:"".concat(Q,"-empty"),onMouseDown:st},Sn);var et=Object.keys(Hn).map(function(wt){return Hn[wt]}),lt=function(Je){return Je.label};function dt(wt,Je){var At=wt.group;return{role:At?"presentation":"option",id:"".concat(xn,"_list_").concat(Je)}}var jt=function(Je){var At=K[Je];if(!At)return null;var Bt=At.data||{},mt=Bt.value,bt=At.group,An=(0,ae.Z)(Bt,!0),En=lt(At);return At?S.createElement("div",(0,V.Z)({"aria-label":typeof En=="string"&&!bt?En:null},An,{key:Je},dt(At,Je),{"aria-selected":Ye(mt)}),mt):null},Nt={role:"listbox",id:"".concat(xn,"_list")};return S.createElement(S.Fragment,null,Xn&&S.createElement("div",(0,V.Z)({},Nt,{style:{height:0,width:0,overflow:"hidden"}}),jt(Kt-1),jt(Kt),jt(Kt+1)),S.createElement(Ln.Z,{itemKey:"key",ref:Ee,data:K,height:yt,itemHeight:On,fullHeight:!1,onMouseDown:st,onScroll:Tt,virtual:Xn,direction:Jn,innerProps:Xn?null:Nt},function(wt,Je){var At=wt.group,Bt=wt.groupOption,mt=wt.data,bt=wt.label,An=wt.value,En=mt.key;if(At){var In,jn=(In=mt.title)!==null&&In!==void 0?In:Mn(bt)?bt.toString():void 0;return S.createElement("div",{className:_()(Q,"".concat(Q,"-group"),mt.className),title:jn},bt!==void 0?bt:En)}var tr=mt.disabled,Yn=mt.title,ar=mt.children,Pn=mt.style,yr=mt.className,ir=(0,g.Z)(mt,sn),Kr=(0,Ot.Z)(ir,et),fr=Ft(An),hr=tr||!fr&&Le,Tr="".concat(Q,"-option"),kn=_()(Q,Tr,yr,(0,Ce.Z)((0,Ce.Z)((0,Ce.Z)((0,Ce.Z)({},"".concat(Tr,"-grouped"),Bt),"".concat(Tr,"-active"),Kt===Je&&!hr),"".concat(Tr,"-disabled"),hr),"".concat(Tr,"-selected"),fr)),pr=lt(wt),cr=!Cn||typeof Cn=="function"||fr,Wn=typeof pr=="number"?pr:pr||An,ur=Mn(Wn)?Wn.toString():void 0;return Yn!==void 0&&(ur=Yn),S.createElement("div",(0,V.Z)({},(0,ae.Z)(Kr),Xn?{}:dt(wt,Je),{"aria-selected":Ye(An),className:kn,title:ur,onMouseMove:function(){Kt===Je||hr||pe(Je)},onClick:function(){hr||Ge(An)},style:Pn}),S.createElement("div",{className:"".concat(Tr,"-content")},typeof Kn=="function"?Kn(wt,{index:Je}):Wn),S.isValidElement(Cn)||fr,cr&&S.createElement(H,{className:"".concat(Q,"-option-state"),customizeIcon:Cn,customizeIconProps:{value:An,disabled:hr,isSelected:fr}},fr?"\u2713":null))}))},nt=S.forwardRef(ut),ze=nt,ne=function(it,tt){var mn=S.useRef({values:new Map,options:new Map}),Jt=S.useMemo(function(){var xn=mn.current,vn=xn.values,yn=xn.options,Qn=it.map(function(Sn){if(Sn.label===void 0){var Tt;return(0,ge.Z)((0,ge.Z)({},Sn),{},{label:(Tt=vn.get(Sn.value))===null||Tt===void 0?void 0:Tt.label})}return Sn}),bn=new Map,Un=new Map;return Qn.forEach(function(Sn){bn.set(Sn.value,Sn),Un.set(Sn.value,tt.get(Sn.value)||yn.get(Sn.value))}),mn.current.values=bn,mn.current.options=Un,Qn},[it,tt]),Bn=S.useCallback(function(xn){return tt.get(xn)||mn.current.options.get(xn)},[tt]);return[Jt,Bn]};function me(it,tt){return he(it).join("").toUpperCase().includes(tt)}var Ie=function(it,tt,mn,Jt,Bn){return S.useMemo(function(){if(!mn||Jt===!1)return it;var xn=tt.options,vn=tt.label,yn=tt.value,Qn=[],bn=typeof Jt=="function",Un=mn.toUpperCase(),Sn=bn?Jt:function(Dt,$e){return Bn?me($e[Bn],Un):$e[xn]?me($e[vn!=="children"?vn:"label"],Un):me($e[yn],Un)},Tt=bn?function(Dt){return Be(Dt)}:function(Dt){return Dt};return it.forEach(function(Dt){if(Dt[xn]){var $e=Sn(mn,Tt(Dt));if($e)Qn.push(Dt);else{var ft=Dt[xn].filter(function(Qt){return Sn(mn,Tt(Qt))});ft.length&&Qn.push((0,ge.Z)((0,ge.Z)({},Dt),{},(0,Ce.Z)({},xn,ft)))}return}Sn(mn,Tt(Dt))&&Qn.push(Dt)}),Qn},[it,Jt,Bn,mn,tt])},Ue=x(6551),ke=x(11592),Gt=["children","value"],_n=["children"];function wn(it){var tt=it,mn=tt.key,Jt=tt.props,Bn=Jt.children,xn=Jt.value,vn=(0,g.Z)(Jt,Gt);return(0,ge.Z)({key:mn,value:xn!==void 0?xn:mn,children:Bn},vn)}function $n(it){var tt=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;return(0,ke.Z)(it).map(function(mn,Jt){if(!S.isValidElement(mn)||!mn.type)return null;var Bn=mn,xn=Bn.type.isSelectOptGroup,vn=Bn.key,yn=Bn.props,Qn=yn.children,bn=(0,g.Z)(yn,_n);return tt||!xn?wn(mn):(0,ge.Z)((0,ge.Z)({key:"__RC_SELECT_GRP__".concat(vn===null?Jt:vn,"__"),label:vn},bn),{},{options:$n(Qn)})}).filter(function(mn){return mn})}var mr=function(tt,mn,Jt,Bn,xn){return S.useMemo(function(){var vn=tt,yn=!tt;yn&&(vn=$n(mn));var Qn=new Map,bn=new Map,Un=function(Dt,$e,ft){ft&&typeof ft=="string"&&Dt.set($e[ft],$e)},Sn=function Tt(Dt){for(var $e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,ft=0;ft<Dt.length;ft+=1){var Qt=Dt[ft];!Qt[Jt.options]||$e?(Qn.set(Qt[Jt.value],Qt),Un(bn,Qt,Jt.label),Un(bn,Qt,Bn),Un(bn,Qt,xn)):Tt(Qt[Jt.options],!0)}};return Sn(vn),{options:vn,valueOptions:Qn,labelOptions:bn}},[tt,mn,Jt,Bn,xn])},sr=mr;function lr(it){var tt=S.useRef();tt.current=it;var mn=S.useCallback(function(){return tt.current.apply(tt,arguments)},[]);return mn}function zn(it){var tt=it.mode,mn=it.options,Jt=it.children,Bn=it.backfill,xn=it.allowClear,vn=it.placeholder,yn=it.getInputElement,Qn=it.showSearch,bn=it.onSearch,Un=it.defaultOpen,Sn=it.autoFocus,Tt=it.labelInValue,Dt=it.value,$e=it.inputValue,ft=it.optionLabelProp,Qt=isMultiple(tt),Lt=Qn!==void 0?Qn:Qt||tt==="combobox",on=mn||convertChildrenToData(Jt);if(warning(tt!=="tags"||on.every(function(Xn){return!Xn.disabled}),"Please avoid setting option to disabled in tags mode since user can always type text as tag."),tt==="tags"||tt==="combobox"){var Cn=on.some(function(Xn){return Xn.options?Xn.options.some(function(Jn){return typeof("value"in Jn?Jn.value:Jn.key)=="number"}):typeof("value"in Xn?Xn.value:Xn.key)=="number"});warning(!Cn,"`value` of Option should not use number type when `mode` is `tags` or `combobox`.")}if(warning(tt!=="combobox"||!ft,"`combobox` mode not support `optionLabelProp`. Please set `value` on Option directly."),warning(tt==="combobox"||!Bn,"`backfill` only works with `combobox` mode."),warning(tt==="combobox"||!yn,"`getInputElement` only work with `combobox` mode."),noteOnce(tt!=="combobox"||!yn||!xn||!vn,"Customize `getInputElement` should customize clear and placeholder logic instead of configuring `allowClear` and `placeholder`."),bn&&!Lt&&tt!=="combobox"&&tt!=="tags"&&warning(!1,"`onSearch` should work with `showSearch` instead of use alone."),noteOnce(!Un||Sn,"`defaultOpen` makes Select open without focus which means it will not close by click outside. You can set `autoFocus` if needed."),Dt!=null){var pn=toArray(Dt);warning(!Tt||pn.every(function(Xn){return _typeof(Xn)==="object"&&("key"in Xn||"value"in Xn)}),"`value` should in shape of `{ value: string | number, label?: ReactNode }` when you set `labelInValue` to `true`"),warning(!Qt||Array.isArray(Dt),"`value` should be array when `mode` is `multiple` or `tags`")}if(Jt){var Hn=null;toNodeArray(Jt).some(function(Xn){if(!React.isValidElement(Xn)||!Xn.type)return!1;var Jn=Xn,yt=Jn.type;if(yt.isSelectOption)return!1;if(yt.isSelectOptGroup){var On=toNodeArray(Xn.props.children).every(function(Kn){return!React.isValidElement(Kn)||!Xn.type||Kn.type.isSelectOption?!0:(Hn=Kn.type,!1)});return!On}return Hn=yt,!0}),Hn&&warning(!1,"`children` should be `Select.Option` or `Select.OptGroup` instead of `".concat(Hn.displayName||Hn.name||Hn,"`.")),warning($e===void 0,"`inputValue` is deprecated, please use `searchValue` instead.")}}function Lr(it,tt){if(it){var mn=function Jt(Bn){for(var xn=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,vn=0;vn<Bn.length;vn++){var yn=Bn[vn];if(yn[tt==null?void 0:tt.value]===null)return warning(!1,"`value` in Select options should not be `null`."),!0;if(!xn&&Array.isArray(yn[tt==null?void 0:tt.options])&&Jt(yn[tt==null?void 0:tt.options],!0))break}};mn(it)}}var Sr=null,xr=["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"],Zr=["inputValue"];function Tn(it){return!it||(0,ye.Z)(it)!=="object"}var fn=S.forwardRef(function(it,tt){var mn=it.id,Jt=it.mode,Bn=it.prefixCls,xn=Bn===void 0?"rc-select":Bn,vn=it.backfill,yn=it.fieldNames,Qn=it.inputValue,bn=it.searchValue,Un=it.onSearch,Sn=it.autoClearSearchValue,Tt=Sn===void 0?!0:Sn,Dt=it.onSelect,$e=it.onDeselect,ft=it.dropdownMatchSelectWidth,Qt=ft===void 0?!0:ft,Lt=it.filterOption,on=it.filterSort,Cn=it.optionFilterProp,pn=it.optionLabelProp,Hn=it.options,Xn=it.optionRender,Jn=it.children,yt=it.defaultActiveFirstOption,On=it.menuItemSelectedIcon,Kn=it.virtual,Q=it.direction,K=it.listHeight,Ee=K===void 0?200:K,Le=it.listItemHeight,st=Le===void 0?20:Le,rt=it.labelRender,Ft=it.value,Ht=it.defaultValue,an=it.labelInValue,Xt=it.onChange,Kt=it.maxCount,en=(0,g.Z)(it,xr),pe=(0,Ue.ZP)(mn),Ye=gt(Jt),Ge=!!(!Hn&&Jn),et=S.useMemo(function(){return Lt===void 0&&Jt==="combobox"?!1:Lt},[Lt,Jt]),lt=S.useMemo(function(){return De(yn,Ge)},[JSON.stringify(yn),Ge]),dt=(0,le.Z)("",{value:bn!==void 0?bn:Qn,postState:function(Fr){return Fr||""}}),jt=(0,G.Z)(dt,2),Nt=jt[0],wt=jt[1],Je=sr(Hn,Jn,lt,Cn,pn),At=Je.valueOptions,Bt=Je.labelOptions,mt=Je.options,bt=S.useCallback(function(gr){var Fr=he(gr);return Fr.map(function(Gr){var $r,Dr,Xr,ti,rr;if(Tn(Gr))$r=Gr;else{var _r;Xr=Gr.key,Dr=Gr.label,$r=(_r=Gr.value)!==null&&_r!==void 0?_r:Xr}var Er=At.get($r);if(Er){var ui;if(Dr===void 0&&(Dr=Er==null?void 0:Er[pn||lt.label]),Xr===void 0&&(Xr=(ui=Er==null?void 0:Er.key)!==null&&ui!==void 0?ui:$r),ti=Er==null?void 0:Er.disabled,rr=Er==null?void 0:Er.title,0)var fi}return{label:Dr,value:$r,key:Xr,disabled:ti,title:rr}})},[lt,pn,At]),An=(0,le.Z)(Ht,{value:Ft}),En=(0,G.Z)(An,2),In=En[0],jn=En[1],tr=S.useMemo(function(){var gr,Fr=Ye&&In===null?[]:In,Gr=bt(Fr);return Jt==="combobox"&&W((gr=Gr[0])===null||gr===void 0?void 0:gr.value)?[]:Gr},[In,bt,Jt,Ye]),Yn=ne(tr,At),ar=(0,G.Z)(Yn,2),Pn=ar[0],yr=ar[1],ir=S.useMemo(function(){if(!Jt&&Pn.length===1){var gr=Pn[0];if(gr.value===null&&(gr.label===null||gr.label===void 0))return[]}return Pn.map(function(Fr){var Gr;return(0,ge.Z)((0,ge.Z)({},Fr),{},{label:(Gr=typeof rt=="function"?rt(Fr):Fr.label)!==null&&Gr!==void 0?Gr:Fr.value})})},[Jt,Pn,rt]),Kr=S.useMemo(function(){return new Set(Pn.map(function(gr){return gr.value}))},[Pn]);S.useEffect(function(){if(Jt==="combobox"){var gr,Fr=(gr=Pn[0])===null||gr===void 0?void 0:gr.value;wt(C(Fr)?String(Fr):"")}},[Pn]);var fr=lr(function(gr,Fr){var Gr=Fr!=null?Fr:gr;return(0,Ce.Z)((0,Ce.Z)({},lt.value,gr),lt.label,Gr)}),hr=S.useMemo(function(){if(Jt!=="tags")return mt;var gr=(0,fe.Z)(mt),Fr=function($r){return At.has($r)};return(0,fe.Z)(Pn).sort(function(Gr,$r){return Gr.value<$r.value?-1:1}).forEach(function(Gr){var $r=Gr.value;Fr($r)||gr.push(fr($r,Gr.label))}),gr},[fr,mt,At,Pn,Jt]),Tr=Ie(hr,lt,Nt,et,Cn),kn=S.useMemo(function(){return Jt!=="tags"||!Nt||Tr.some(function(gr){return gr[Cn||"value"]===Nt})||Tr.some(function(gr){return gr[lt.value]===Nt})?Tr:[fr(Nt)].concat((0,fe.Z)(Tr))},[fr,Cn,Jt,Tr,Nt,lt]),pr=function gr(Fr){var Gr=(0,fe.Z)(Fr).sort(function($r,Dr){return on($r,Dr,{searchValue:Nt})});return Gr.map(function($r){return Array.isArray($r.options)?(0,ge.Z)((0,ge.Z)({},$r),{},{options:$r.options.length>0?gr($r.options):$r.options}):$r})},cr=S.useMemo(function(){return on?pr(kn):kn},[kn,on,Nt]),Wn=S.useMemo(function(){return Ae(cr,{fieldNames:lt,childrenAsData:Ge})},[cr,lt,Ge]),ur=function(Fr){var Gr=bt(Fr);if(jn(Gr),Xt&&(Gr.length!==Pn.length||Gr.some(function(Xr,ti){var rr;return((rr=Pn[ti])===null||rr===void 0?void 0:rr.value)!==(Xr==null?void 0:Xr.value)}))){var $r=an?Gr:Gr.map(function(Xr){return Xr.value}),Dr=Gr.map(function(Xr){return Be(yr(Xr.value))});Xt(Ye?$r:$r[0],Ye?Dr:Dr[0])}},Ir=S.useState(null),Vr=(0,G.Z)(Ir,2),Ur=Vr[0],or=Vr[1],hi=S.useState(0),Ki=(0,G.Z)(hi,2),Ji=Ki[0],ds=Ki[1],ss=yt!==void 0?yt:Jt!=="combobox",zi=S.useCallback(function(gr,Fr){var Gr=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},$r=Gr.source,Dr=$r===void 0?"keyboard":$r;ds(Fr),vn&&Jt==="combobox"&&gr!==null&&Dr==="keyboard"&&or(String(gr))},[vn,Jt]),ii=function(Fr,Gr,$r){var Dr=function(){var Bi,ls=yr(Fr);return[an?{label:ls==null?void 0:ls[lt.label],value:Fr,key:(Bi=ls==null?void 0:ls.key)!==null&&Bi!==void 0?Bi:Fr}:Fr,Be(ls)]};if(Gr&&Dt){var Xr=Dr(),ti=(0,G.Z)(Xr,2),rr=ti[0],_r=ti[1];Dt(rr,_r)}else if(!Gr&&$e&&$r!=="clear"){var Er=Dr(),ui=(0,G.Z)(Er,2),fi=ui[0],Gi=ui[1];$e(fi,Gi)}},ci=lr(function(gr,Fr){var Gr,$r=Ye?Fr.selected:!0;$r?Gr=Ye?[].concat((0,fe.Z)(Pn),[gr]):[gr]:Gr=Pn.filter(function(Dr){return Dr.value!==gr}),ur(Gr),ii(gr,$r),Jt==="combobox"?or(""):(!gt||Tt)&&(wt(""),or(""))}),Pi=function(Fr,Gr){ur(Fr);var $r=Gr.type,Dr=Gr.values;($r==="remove"||$r==="clear")&&Dr.forEach(function(Xr){ii(Xr.value,!1,$r)})},ai=function(Fr,Gr){if(wt(Fr),or(null),Gr.source==="submit"){var $r=(Fr||"").trim();if($r){var Dr=Array.from(new Set([].concat((0,fe.Z)(Kr),[$r])));ur(Dr),ii($r,!0),wt("")}return}Gr.source!=="blur"&&(Jt==="combobox"&&ur(Fr),Un==null||Un(Fr))},si=function(Fr){var Gr=Fr;Jt!=="tags"&&(Gr=Fr.map(function(Dr){var Xr=Bt.get(Dr);return Xr==null?void 0:Xr.value}).filter(function(Dr){return Dr!==void 0}));var $r=Array.from(new Set([].concat((0,fe.Z)(Kr),(0,fe.Z)(Gr))));ur($r),$r.forEach(function(Dr){ii(Dr,!0)})},li=S.useMemo(function(){var gr=Kn!==!1&&Qt!==!1;return(0,ge.Z)((0,ge.Z)({},Je),{},{flattenOptions:Wn,onActiveValue:zi,defaultActiveFirstOption:ss,onSelect:ci,menuItemSelectedIcon:On,rawValues:Kr,fieldNames:lt,virtual:gr,direction:Q,listHeight:Ee,listItemHeight:st,childrenAsData:Ge,maxCount:Kt,optionRender:Xn})},[Kt,Je,Wn,zi,ss,ci,On,Kr,lt,Kn,Qt,Q,Ee,st,Ge,Xn]);return S.createElement(Xe.Provider,{value:li},S.createElement(Pe,(0,V.Z)({},en,{id:pe,prefixCls:xn,ref:tt,omitDomProps:Zr,mode:Jt,displayValues:ir,onDisplayValuesChange:Pi,direction:Q,searchValue:Nt,onSearch:ai,autoClearSearchValue:Tt,onSearchSplit:si,dropdownMatchSelectWidth:Qt,OptionList:ze,emptyOptions:!Wn.length,activeValue:Ur,activeDescendantId:"".concat(pe,"_list_").concat(Ji)})))}),Zn=fn;Zn.Option=dn,Zn.OptGroup=St;var vr=Zn,Hr=vr},86351:function(Vn,ct,x){"use strict";x.d(ct,{R:function(){return fe},w:function(){return V}});var V={},fe="rc-table-internal-hook"},97347:function(Vn,ct,x){"use strict";x.d(ct,{L:function(){return M},Z:function(){return P}});var V=x(11913),fe=x(74430),Ce=x(3300),ge=x(34666),G=x(27247),g=x(43079),ye=x(11592),le=x(48736),o=x(59301),S=x(86351),U=x(54451);function _(k){var oe=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"";return typeof oe=="number"?oe:oe.endsWith("%")?k*parseFloat(oe)/100:null}function w(k,oe,de){return o.useMemo(function(){if(oe&&oe>0){var ie=0,ae=0;k.forEach(function(he){var re=_(oe,he.width);re?ie+=re:ae+=1});var we=Math.max(oe,de),Te=Math.max(we-ie,ae),Re=ae,Y=Te/ae,$=0,te=k.map(function(he){var re=(0,G.Z)({},he),E=_(oe,re.width);if(E)re.width=E;else{var C=Math.floor(Y);re.width=Re===1?Te:C,Te-=C,Re-=1}return $+=re.width,re});if($<we){var q=we/$;Te=we,te.forEach(function(he,re){var E=Math.floor(he.width*q);he.width=re===te.length-1?Te:E,Te-=E})}return[te,Math.max($,we)]}return[k,oe]},[k,oe,de])}var b=["children"],R=["fixed"];function M(k){return(0,ye.Z)(k).filter(function(oe){return o.isValidElement(oe)}).map(function(oe){var de=oe.key,ie=oe.props,ae=ie.children,we=(0,g.Z)(ie,b),Te=(0,G.Z)({key:de},we);return ae&&(Te.children=M(ae)),Te})}function H(k){return k.filter(function(oe){return oe&&(0,ge.Z)(oe)==="object"&&!oe.hidden}).map(function(oe){var de=oe.children;return de&&de.length>0?(0,G.Z)((0,G.Z)({},oe),{},{children:H(de)}):oe})}function J(k){var oe=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"key";return k.filter(function(de){return de&&(0,ge.Z)(de)==="object"}).reduce(function(de,ie,ae){var we=ie.fixed,Te=we===!0?"left":we,Re="".concat(oe,"-").concat(ae),Y=ie.children;return Y&&Y.length>0?[].concat((0,Ce.Z)(de),(0,Ce.Z)(J(Y,Re).map(function($){return(0,G.Z)({fixed:Te},$)}))):[].concat((0,Ce.Z)(de),[(0,G.Z)((0,G.Z)({key:Re},ie),{},{fixed:Te})])},[])}function T(k){return k.map(function(oe){var de=oe.fixed,ie=(0,g.Z)(oe,R),ae=de;return de==="left"?ae="right":de==="right"&&(ae="left"),(0,G.Z)({fixed:ae},ie)})}function N(k,oe){var de=k.prefixCls,ie=k.columns,ae=k.children,we=k.expandable,Te=k.expandedKeys,Re=k.columnTitle,Y=k.getRowKey,$=k.onTriggerExpand,te=k.expandIcon,q=k.rowExpandable,he=k.expandIconColumnIndex,re=k.direction,E=k.expandRowByClick,C=k.columnWidth,W=k.fixed,be=k.scrollWidth,Ve=k.clientWidth,Ke=o.useMemo(function(){var xt=ie||M(ae)||[];return H(xt.slice())},[ie,ae]),Ct=o.useMemo(function(){if(we){var xt=Ke.slice();if(!xt.includes(S.w)){var ht=he||0;ht>=0&&(ht||W==="left"||!W)&&xt.splice(ht,0,S.w),W==="right"&&xt.splice(Ke.length,0,S.w)}var Oe=xt.indexOf(S.w);xt=xt.filter(function(Ze,ee){return Ze!==S.w||ee===Oe});var Fe=Ke[Oe],j;W?j=W:j=Fe?Fe.fixed:null;var Ne=(0,fe.Z)((0,fe.Z)((0,fe.Z)((0,fe.Z)((0,fe.Z)((0,fe.Z)({},U.v,{className:"".concat(de,"-expand-icon-col"),columnType:"EXPAND_COLUMN"}),"title",Re),"fixed",j),"className","".concat(de,"-row-expand-icon-cell")),"width",C),"render",function(ee,O,ue){var De=Y(O,ue),Ae=Te.has(De),Be=q?q(O):!0,Se=te({prefixCls:de,expanded:Ae,expandable:Be,record:O,onExpand:$});return E?o.createElement("span",{onClick:function(Xe){return Xe.stopPropagation()}},Se):Se});return xt.map(function(Ze){return Ze===S.w?Ne:Ze})}return Ke.filter(function(Ze){return Ze!==S.w})},[we,Ke,Y,Te,te,re]),Rt=o.useMemo(function(){var xt=Ct;return oe&&(xt=oe(xt)),xt.length||(xt=[{render:function(){return null}}]),xt},[oe,Ct,re]),Vt=o.useMemo(function(){return re==="rtl"?T(J(Rt)):J(Rt)},[Rt,re,be]),rn=o.useMemo(function(){for(var xt=-1,ht=Vt.length-1;ht>=0;ht-=1){var Oe=Vt[ht].fixed;if(Oe==="left"||Oe===!0){xt=ht;break}}if(xt>=0)for(var Fe=0;Fe<=xt;Fe+=1){var j=Vt[Fe].fixed;if(j!=="left"&&j!==!0)return!0}var Ne=Vt.findIndex(function(O){var ue=O.fixed;return ue==="right"});if(Ne>=0)for(var Ze=Ne;Ze<Vt.length;Ze+=1){var ee=Vt[Ze].fixed;if(ee!=="right")return!0}return!1},[Vt]),He=w(Vt,be,Ve),ln=(0,V.Z)(He,2),It=ln[0],cn=ln[1];return[Rt,It,cn,rn]}var P=N},4030:function(Vn,ct,x){"use strict";x.d(ct,{w2:function(){return V.w},vP:function(){return Mn.v},RQ:function(){return V.R},ER:function(){return De},Q$:function(){return Lt},TN:function(){return Xt}});var V=x(86351),fe=x(11913),Ce=x(6089),ge=x(34280),G=x(13697),g=x(59301),ye=x(4676);function le(pe){var Ye=g.createContext(void 0),Ge=function(lt){var dt=lt.value,jt=lt.children,Nt=g.useRef(dt);Nt.current=dt;var wt=g.useState(function(){return{getValue:function(){return Nt.current},listeners:new Set}}),Je=(0,fe.Z)(wt,1),At=Je[0];return(0,ge.Z)(function(){(0,ye.unstable_batchedUpdates)(function(){At.listeners.forEach(function(Bt){Bt(dt)})})},[dt]),g.createElement(Ye.Provider,{value:At},jt)};return{Context:Ye,Provider:Ge,defaultValue:pe}}function o(pe,Ye){var Ge=(0,Ce.Z)(typeof Ye=="function"?Ye:function(Bt){if(Ye===void 0)return Bt;if(!Array.isArray(Ye))return Bt[Ye];var mt={};return Ye.forEach(function(bt){mt[bt]=Bt[bt]}),mt}),et=g.useContext(pe==null?void 0:pe.Context),lt=et||{},dt=lt.listeners,jt=lt.getValue,Nt=g.useRef();Nt.current=Ge(et?jt():pe==null?void 0:pe.defaultValue);var wt=g.useState({}),Je=(0,fe.Z)(wt,2),At=Je[1];return(0,ge.Z)(function(){if(!et)return;function Bt(mt){var bt=Ge(mt);(0,G.Z)(Nt.current,bt,!0)||At({})}return dt.add(Bt),function(){dt.delete(Bt)}},[et]),Nt.current}var S=x(32855),U=x(8654);function _(){var pe=g.createContext(null);function Ye(){return g.useContext(pe)}function Ge(lt,dt){var jt=(0,U.Yr)(lt),Nt=function(Je,At){var Bt=jt?{ref:At}:{},mt=g.useRef(0),bt=g.useRef(Je),An=Ye();return An!==null?g.createElement(lt,(0,S.Z)({},Je,Bt)):((!dt||dt(bt.current,Je))&&(mt.current+=1),bt.current=Je,g.createElement(pe.Provider,{value:mt.current},g.createElement(lt,(0,S.Z)({},Je,Bt))))};return jt?g.forwardRef(Nt):Nt}function et(lt,dt){var jt=(0,U.Yr)(lt),Nt=function(Je,At){var Bt=jt?{ref:At}:{};return Ye(),g.createElement(lt,(0,S.Z)({},Je,Bt))};return jt?g.memo(g.forwardRef(Nt),dt):g.memo(Nt,dt)}return{makeImmutable:Ge,responseImmutable:et,useImmutableMark:Ye}}var w=_(),b=w.makeImmutable,R=w.responseImmutable,M=w.useImmutableMark,H=_(),J=H.makeImmutable,T=H.responseImmutable,N=H.useImmutableMark,P=le(),k=P;function oe(pe,Ye){var Ge=React.useRef(0);Ge.current+=1;var et=React.useRef(pe),lt=[];Object.keys(pe||{}).map(function(jt){var Nt;(pe==null?void 0:pe[jt])!==((Nt=et.current)===null||Nt===void 0?void 0:Nt[jt])&<.push(jt)}),et.current=pe;var dt=React.useRef([]);return lt.length&&(dt.current=lt),React.useDebugValue(Ge.current),React.useDebugValue(dt.current.join(", ")),Ye&&console.log("".concat(Ye,":"),Ge.current,dt.current),Ge.current}var de=null,ie=null,ae=x(34666),we=x(27247),Te=x(74430),Re=x(92310),Y=x.n(Re),$=x(80547),te=x(97938),q=x(48736),he=g.createContext({renderWithProps:!1}),re=he,E="RC_TABLE_KEY";function C(pe){return pe==null?[]:Array.isArray(pe)?pe:[pe]}function W(pe){var Ye=[],Ge={};return pe.forEach(function(et){for(var lt=et||{},dt=lt.key,jt=lt.dataIndex,Nt=dt||C(jt).join("-")||E;Ge[Nt];)Nt="".concat(Nt,"_next");Ge[Nt]=!0,Ye.push(Nt)}),Ye}function be(pe){return pe!=null}function Ve(pe){return typeof pe=="number"&&!Number.isNaN(pe)}function Ke(pe){return pe&&(0,ae.Z)(pe)==="object"&&!Array.isArray(pe)&&!g.isValidElement(pe)}function Ct(pe,Ye,Ge,et,lt,dt){var jt=g.useContext(re),Nt=N(),wt=(0,$.Z)(function(){if(be(et))return[et];var Je=Ye==null||Ye===""?[]:Array.isArray(Ye)?Ye:[Ye],At=(0,te.Z)(pe,Je),Bt=At,mt=void 0;if(lt){var bt=lt(At,pe,Ge);Ke(bt)?(Bt=bt.children,mt=bt.props,jt.renderWithProps=!0):Bt=bt}return[Bt,mt]},[Nt,pe,et,Ye,lt,Ge],function(Je,At){if(dt){var Bt=(0,fe.Z)(Je,2),mt=Bt[1],bt=(0,fe.Z)(At,2),An=bt[1];return dt(An,mt)}return jt.renderWithProps?!0:!(0,G.Z)(Je,At,!0)});return wt}function Rt(pe,Ye,Ge,et){var lt=pe+Ye-1;return pe<=et&<>=Ge}function Vt(pe,Ye){return o(k,function(Ge){var et=Rt(pe,Ye||1,Ge.hoverStartRow,Ge.hoverEndRow);return[et,Ge.onHover]})}var rn=x(70425),He=function(Ye){var Ge=Ye.ellipsis,et=Ye.rowType,lt=Ye.children,dt,jt=Ge===!0?{showTitle:!0}:Ge;return jt&&(jt.showTitle||et==="header")&&(typeof lt=="string"||typeof lt=="number"?dt=lt.toString():g.isValidElement(lt)&&typeof lt.props.children=="string"&&(dt=lt.props.children)),dt};function ln(pe){var Ye,Ge,et,lt,dt,jt,Nt,wt,Je=pe.component,At=pe.children,Bt=pe.ellipsis,mt=pe.scope,bt=pe.prefixCls,An=pe.className,En=pe.align,In=pe.record,jn=pe.render,tr=pe.dataIndex,Yn=pe.renderIndex,ar=pe.shouldCellUpdate,Pn=pe.index,yr=pe.rowType,ir=pe.colSpan,Kr=pe.rowSpan,fr=pe.fixLeft,hr=pe.fixRight,Tr=pe.firstFixLeft,kn=pe.lastFixLeft,pr=pe.firstFixRight,cr=pe.lastFixRight,Wn=pe.appendNode,ur=pe.additionalProps,Ir=ur===void 0?{}:ur,Vr=pe.isSticky,Ur="".concat(bt,"-cell"),or=o(k,["supportSticky","allColumnsFixedLeft","rowHoverable"]),hi=or.supportSticky,Ki=or.allColumnsFixedLeft,Ji=or.rowHoverable,ds=Ct(In,tr,Yn,At,jn,ar),ss=(0,fe.Z)(ds,2),zi=ss[0],ii=ss[1],ci={},Pi=typeof fr=="number"&&hi,ai=typeof hr=="number"&&hi;Pi&&(ci.position="sticky",ci.left=fr),ai&&(ci.position="sticky",ci.right=hr);var si=(Ye=(Ge=(et=ii==null?void 0:ii.colSpan)!==null&&et!==void 0?et:Ir.colSpan)!==null&&Ge!==void 0?Ge:ir)!==null&&Ye!==void 0?Ye:1,li=(lt=(dt=(jt=ii==null?void 0:ii.rowSpan)!==null&&jt!==void 0?jt:Ir.rowSpan)!==null&&dt!==void 0?dt:Kr)!==null&<!==void 0?lt:1,gr=Vt(Pn,li),Fr=(0,fe.Z)(gr,2),Gr=Fr[0],$r=Fr[1],Dr=(0,rn.zX)(function(fi){var Gi;In&&$r(Pn,Pn+li-1),Ir==null||(Gi=Ir.onMouseEnter)===null||Gi===void 0||Gi.call(Ir,fi)}),Xr=(0,rn.zX)(function(fi){var Gi;In&&$r(-1,-1),Ir==null||(Gi=Ir.onMouseLeave)===null||Gi===void 0||Gi.call(Ir,fi)});if(si===0||li===0)return null;var ti=(Nt=Ir.title)!==null&&Nt!==void 0?Nt:He({rowType:yr,ellipsis:Bt,children:zi}),rr=Y()(Ur,An,(wt={},(0,Te.Z)((0,Te.Z)((0,Te.Z)((0,Te.Z)((0,Te.Z)((0,Te.Z)((0,Te.Z)((0,Te.Z)((0,Te.Z)((0,Te.Z)(wt,"".concat(Ur,"-fix-left"),Pi&&hi),"".concat(Ur,"-fix-left-first"),Tr&&hi),"".concat(Ur,"-fix-left-last"),kn&&hi),"".concat(Ur,"-fix-left-all"),kn&&Ki&&hi),"".concat(Ur,"-fix-right"),ai&&hi),"".concat(Ur,"-fix-right-first"),pr&&hi),"".concat(Ur,"-fix-right-last"),cr&&hi),"".concat(Ur,"-ellipsis"),Bt),"".concat(Ur,"-with-append"),Wn),"".concat(Ur,"-fix-sticky"),(Pi||ai)&&Vr&&hi),(0,Te.Z)(wt,"".concat(Ur,"-row-hover"),!ii&&Gr)),Ir.className,ii==null?void 0:ii.className),_r={};En&&(_r.textAlign=En);var Er=(0,we.Z)((0,we.Z)((0,we.Z)((0,we.Z)({},ii==null?void 0:ii.style),ci),_r),Ir.style),ui=zi;return(0,ae.Z)(ui)==="object"&&!Array.isArray(ui)&&!g.isValidElement(ui)&&(ui=null),Bt&&(kn||pr)&&(ui=g.createElement("span",{className:"".concat(Ur,"-content")},ui)),g.createElement(Je,(0,S.Z)({},ii,Ir,{className:rr,style:Er,title:ti,scope:mt,onMouseEnter:Ji?Dr:void 0,onMouseLeave:Ji?Xr:void 0,colSpan:si!==1?si:null,rowSpan:li!==1?li:null}),Wn,ui)}var It=g.memo(ln);function cn(pe,Ye,Ge,et,lt){var dt=Ge[pe]||{},jt=Ge[Ye]||{},Nt,wt;dt.fixed==="left"?Nt=et.left[lt==="rtl"?Ye:pe]:jt.fixed==="right"&&(wt=et.right[lt==="rtl"?pe:Ye]);var Je=!1,At=!1,Bt=!1,mt=!1,bt=Ge[Ye+1],An=Ge[pe-1],En=bt&&!bt.fixed||An&&!An.fixed||Ge.every(function(ar){return ar.fixed==="left"});if(lt==="rtl"){if(Nt!==void 0){var In=An&&An.fixed==="left";mt=!In&&En}else if(wt!==void 0){var jn=bt&&bt.fixed==="right";Bt=!jn&&En}}else if(Nt!==void 0){var tr=bt&&bt.fixed==="left";Je=!tr&&En}else if(wt!==void 0){var Yn=An&&An.fixed==="right";At=!Yn&&En}return{fixLeft:Nt,fixRight:wt,lastFixLeft:Je,firstFixRight:At,lastFixRight:Bt,firstFixLeft:mt,isSticky:et.isSticky}}var xt=g.createContext({}),ht=xt;function Oe(pe){var Ye=pe.className,Ge=pe.index,et=pe.children,lt=pe.colSpan,dt=lt===void 0?1:lt,jt=pe.rowSpan,Nt=pe.align,wt=o(k,["prefixCls","direction"]),Je=wt.prefixCls,At=wt.direction,Bt=g.useContext(ht),mt=Bt.scrollColumnIndex,bt=Bt.stickyOffsets,An=Bt.flattenColumns,En=Ge+dt-1,In=En+1===mt?dt+1:dt,jn=cn(Ge,Ge+In-1,An,bt,At);return g.createElement(It,(0,S.Z)({className:Ye,index:Ge,component:"td",prefixCls:Je,record:null,dataIndex:null,align:Nt,colSpan:In,rowSpan:jt,render:function(){return et}},jn))}var Fe=x(43079),j=["children"];function Ne(pe){var Ye=pe.children,Ge=(0,Fe.Z)(pe,j);return g.createElement("tr",Ge,Ye)}function Ze(pe){var Ye=pe.children;return Ye}Ze.Row=Ne,Ze.Cell=Oe;var ee=Ze;function O(pe){var Ye=pe.children,Ge=pe.stickyOffsets,et=pe.flattenColumns,lt=o(k,"prefixCls"),dt=et.length-1,jt=et[dt],Nt=g.useMemo(function(){return{stickyOffsets:Ge,flattenColumns:et,scrollColumnIndex:jt!=null&&jt.scrollbar?dt:null}},[jt,et,dt,Ge]);return g.createElement(ht.Provider,{value:Nt},g.createElement("tfoot",{className:"".concat(lt,"-summary")},Ye))}var ue=T(O),De=ee,Ae=x(29301),Be=x(24514),Se=x(75152),ot=x(26112);function Xe(pe,Ye,Ge,et,lt,dt,jt){pe.push({record:Ye,indent:Ge,index:jt});var Nt=dt(Ye),wt=lt==null?void 0:lt.has(Nt);if(Ye&&Array.isArray(Ye[et])&&wt)for(var Je=0;Je<Ye[et].length;Je+=1)Xe(pe,Ye[et][Je],Ge+1,et,lt,dt,Je)}function je(pe,Ye,Ge,et){var lt=g.useMemo(function(){if(Ge!=null&&Ge.size){for(var dt=[],jt=0;jt<(pe==null?void 0:pe.length);jt+=1){var Nt=pe[jt];Xe(dt,Nt,0,Ye,Ge,et,jt)}return dt}return pe==null?void 0:pe.map(function(wt,Je){return{record:wt,indent:0,index:Je}})},[pe,Ye,Ge,et]);return lt}function qe(pe,Ye,Ge,et){var lt=o(k,["prefixCls","fixedInfoList","flattenColumns","expandableType","expandRowByClick","onTriggerExpand","rowClassName","expandedRowClassName","indentSize","expandIcon","expandedRowRender","expandIconColumnIndex","expandedKeys","childrenColumnName","rowExpandable","onRow"]),dt=lt.flattenColumns,jt=lt.expandableType,Nt=lt.expandedKeys,wt=lt.childrenColumnName,Je=lt.onTriggerExpand,At=lt.rowExpandable,Bt=lt.onRow,mt=lt.expandRowByClick,bt=lt.rowClassName,An=jt==="nest",En=jt==="row"&&(!At||At(pe)),In=En||An,jn=Nt&&Nt.has(Ye),tr=wt&&pe&&pe[wt],Yn=(0,rn.zX)(Je),ar=Bt==null?void 0:Bt(pe,Ge),Pn=ar==null?void 0:ar.onClick,yr=function(hr){mt&&In&&Je(pe,hr);for(var Tr=arguments.length,kn=new Array(Tr>1?Tr-1:0),pr=1;pr<Tr;pr++)kn[pr-1]=arguments[pr];Pn==null||Pn.apply(void 0,[hr].concat(kn))},ir;typeof bt=="string"?ir=bt:typeof bt=="function"&&(ir=bt(pe,Ge,et));var Kr=W(dt);return(0,we.Z)((0,we.Z)({},lt),{},{columnsKey:Kr,nestExpandable:An,expanded:jn,hasNestChildren:tr,record:pe,onTriggerExpand:Yn,rowSupportExpand:En,expandable:In,rowProps:(0,we.Z)((0,we.Z)({},ar),{},{className:Y()(ir,ar==null?void 0:ar.className),onClick:yr})})}function kt(pe){var Ye=pe.prefixCls,Ge=pe.children,et=pe.component,lt=pe.cellComponent,dt=pe.className,jt=pe.expanded,Nt=pe.colSpan,wt=pe.isEmpty,Je=o(k,["scrollbarSize","fixHeader","fixColumn","componentWidth","horizonScroll"]),At=Je.scrollbarSize,Bt=Je.fixHeader,mt=Je.fixColumn,bt=Je.componentWidth,An=Je.horizonScroll,En=Ge;return(wt?An&&bt:mt)&&(En=g.createElement("div",{style:{width:bt-(Bt&&!wt?At:0),position:"sticky",left:0,overflow:"hidden"},className:"".concat(Ye,"-expanded-row-fixed")},En)),g.createElement(et,{className:dt,style:{display:jt?null:"none"}},g.createElement(It,{component:lt,prefixCls:Ye,colSpan:Nt},En))}var gt=kt;function _t(pe){var Ye=pe.prefixCls,Ge=pe.record,et=pe.onExpand,lt=pe.expanded,dt=pe.expandable,jt="".concat(Ye,"-row-expand-icon");if(!dt)return g.createElement("span",{className:Y()(jt,"".concat(Ye,"-row-spaced"))});var Nt=function(Je){et(Ge,Je),Je.stopPropagation()};return g.createElement("span",{className:Y()(jt,(0,Te.Z)((0,Te.Z)({},"".concat(Ye,"-row-expanded"),lt),"".concat(Ye,"-row-collapsed"),!lt)),onClick:Nt})}function Pe(pe,Ye,Ge){var et=[];function lt(dt){(dt||[]).forEach(function(jt,Nt){et.push(Ye(jt,Nt)),lt(jt[Ge])})}return lt(pe),et}function Wt(pe,Ye,Ge,et){return typeof pe=="string"?pe:typeof pe=="function"?pe(Ye,Ge,et):""}function St(pe,Ye,Ge,et,lt){var dt=pe.record,jt=pe.prefixCls,Nt=pe.columnsKey,wt=pe.fixedInfoList,Je=pe.expandIconColumnIndex,At=pe.nestExpandable,Bt=pe.indentSize,mt=pe.expandIcon,bt=pe.expanded,An=pe.hasNestChildren,En=pe.onTriggerExpand,In=Nt[Ge],jn=wt[Ge],tr;Ge===(Je||0)&&At&&(tr=g.createElement(g.Fragment,null,g.createElement("span",{style:{paddingLeft:"".concat(Bt*et,"px")},className:"".concat(jt,"-row-indent indent-level-").concat(et)}),mt({prefixCls:jt,expanded:bt,expandable:An,record:dt,onExpand:En})));var Yn;return Ye.onCell&&(Yn=Ye.onCell(dt,lt)),{key:In,fixedInfo:jn,appendCellNode:tr,additionalCellProps:Yn||{}}}function vt(pe){var Ye=pe.className,Ge=pe.style,et=pe.record,lt=pe.index,dt=pe.renderIndex,jt=pe.rowKey,Nt=pe.indent,wt=Nt===void 0?0:Nt,Je=pe.rowComponent,At=pe.cellComponent,Bt=pe.scopeCellComponent,mt=qe(et,jt,lt,wt),bt=mt.prefixCls,An=mt.flattenColumns,En=mt.expandedRowClassName,In=mt.expandedRowRender,jn=mt.rowProps,tr=mt.expanded,Yn=mt.rowSupportExpand,ar=g.useRef(!1);ar.current||(ar.current=tr);var Pn=Wt(En,et,lt,wt),yr=g.createElement(Je,(0,S.Z)({},jn,{"data-row-key":jt,className:Y()(Ye,"".concat(bt,"-row"),"".concat(bt,"-row-level-").concat(wt),jn==null?void 0:jn.className,(0,Te.Z)({},Pn,wt>=1)),style:(0,we.Z)((0,we.Z)({},Ge),jn==null?void 0:jn.style)}),An.map(function(fr,hr){var Tr=fr.render,kn=fr.dataIndex,pr=fr.className,cr=St(mt,fr,hr,wt,lt),Wn=cr.key,ur=cr.fixedInfo,Ir=cr.appendCellNode,Vr=cr.additionalCellProps;return g.createElement(It,(0,S.Z)({className:pr,ellipsis:fr.ellipsis,align:fr.align,scope:fr.rowScope,component:fr.rowScope?Bt:At,prefixCls:bt,key:Wn,record:et,index:lt,renderIndex:dt,dataIndex:kn,render:Tr,shouldCellUpdate:fr.shouldCellUpdate},ur,{appendNode:Ir,additionalProps:Vr}))})),ir;if(Yn&&(ar.current||tr)){var Kr=In(et,lt,wt+1,tr);ir=g.createElement(gt,{expanded:tr,className:Y()("".concat(bt,"-expanded-row"),"".concat(bt,"-expanded-row-level-").concat(wt+1),Pn),prefixCls:bt,component:Je,cellComponent:At,colSpan:An.length,isEmpty:!1},Kr)}return g.createElement(g.Fragment,null,yr,ir)}var dn=T(vt);function hn(pe){var Ye=pe.columnKey,Ge=pe.onColumnResize,et=g.useRef();return(0,ge.Z)(function(){et.current&&Ge(Ye,et.current.offsetWidth)},[]),g.createElement(Ae.Z,{data:Ye},g.createElement("td",{ref:et,style:{padding:0,border:0,height:0}},g.createElement("div",{style:{height:0,overflow:"hidden"}},"\xA0")))}var Ot=x(29194);function Ln(pe){var Ye=pe.prefixCls,Ge=pe.columnsKey,et=pe.onColumnResize,lt=g.useRef(null);return g.createElement("tr",{"aria-hidden":"true",className:"".concat(Ye,"-measure-row"),style:{height:0,fontSize:0},ref:lt},g.createElement(Ae.Z.Collection,{onBatchResize:function(jt){(0,Ot.Z)(lt.current)&&jt.forEach(function(Nt){var wt=Nt.data,Je=Nt.size;et(wt,Je.offsetWidth)})}},Ge.map(function(dt){return g.createElement(hn,{key:dt,columnKey:dt,onColumnResize:et})})))}function qn(pe){var Ye=pe.data,Ge=pe.measureColumnWidth,et=o(k,["prefixCls","getComponent","onColumnResize","flattenColumns","getRowKey","expandedKeys","childrenColumnName","emptyNode"]),lt=et.prefixCls,dt=et.getComponent,jt=et.onColumnResize,Nt=et.flattenColumns,wt=et.getRowKey,Je=et.expandedKeys,At=et.childrenColumnName,Bt=et.emptyNode,mt=je(Ye,At,Je,wt),bt=g.useRef({renderWithProps:!1}),An=dt(["body","wrapper"],"tbody"),En=dt(["body","row"],"tr"),In=dt(["body","cell"],"td"),jn=dt(["body","cell"],"th"),tr;Ye.length?tr=mt.map(function(ar,Pn){var yr=ar.record,ir=ar.indent,Kr=ar.index,fr=wt(yr,Pn);return g.createElement(dn,{key:fr,rowKey:fr,record:yr,index:Pn,renderIndex:Kr,rowComponent:En,cellComponent:In,scopeCellComponent:jn,indent:ir})}):tr=g.createElement(gt,{expanded:!0,className:"".concat(lt,"-placeholder"),prefixCls:lt,component:En,cellComponent:In,colSpan:Nt.length,isEmpty:!0},Bt);var Yn=W(Nt);return g.createElement(re.Provider,{value:bt.current},g.createElement(An,{className:"".concat(lt,"-tbody")},Ge&&g.createElement(Ln,{prefixCls:lt,columnsKey:Yn,onColumnResize:jt}),tr))}var sn=T(qn),Mn=x(54451),ut=["columnType"];function nt(pe){for(var Ye=pe.colWidths,Ge=pe.columns,et=pe.columCount,lt=o(k,["tableLayout"]),dt=lt.tableLayout,jt=[],Nt=et||Ge.length,wt=!1,Je=Nt-1;Je>=0;Je-=1){var At=Ye[Je],Bt=Ge&&Ge[Je],mt=void 0,bt=void 0;if(Bt&&(mt=Bt[Mn.v],dt==="auto"&&(bt=Bt.minWidth)),At||bt||mt||wt){var An=mt||{},En=An.columnType,In=(0,Fe.Z)(An,ut);jt.unshift(g.createElement("col",(0,S.Z)({key:Je,style:{width:At,minWidth:bt}},In))),wt=!0}}return g.createElement("colgroup",null,jt)}var ze=nt,ne=x(3300),me=["className","noData","columns","flattenColumns","colWidths","columCount","stickyOffsets","direction","fixHeader","stickyTopOffset","stickyBottomOffset","stickyClassName","onScroll","maxContentScroll","children"];function Ie(pe,Ye){return(0,g.useMemo)(function(){for(var Ge=[],et=0;et<Ye;et+=1){var lt=pe[et];if(lt!==void 0)Ge[et]=lt;else return null}return Ge},[pe.join("_"),Ye])}var Ue=g.forwardRef(function(pe,Ye){var Ge=pe.className,et=pe.noData,lt=pe.columns,dt=pe.flattenColumns,jt=pe.colWidths,Nt=pe.columCount,wt=pe.stickyOffsets,Je=pe.direction,At=pe.fixHeader,Bt=pe.stickyTopOffset,mt=pe.stickyBottomOffset,bt=pe.stickyClassName,An=pe.onScroll,En=pe.maxContentScroll,In=pe.children,jn=(0,Fe.Z)(pe,me),tr=o(k,["prefixCls","scrollbarSize","isSticky","getComponent"]),Yn=tr.prefixCls,ar=tr.scrollbarSize,Pn=tr.isSticky,yr=tr.getComponent,ir=yr(["header","table"],"table"),Kr=Pn&&!At?0:ar,fr=g.useRef(null),hr=g.useCallback(function(Vr){(0,U.mH)(Ye,Vr),(0,U.mH)(fr,Vr)},[]);g.useEffect(function(){var Vr;function Ur(or){var hi=or,Ki=hi.currentTarget,Ji=hi.deltaX;Ji&&(An({currentTarget:Ki,scrollLeft:Ki.scrollLeft+Ji}),or.preventDefault())}return(Vr=fr.current)===null||Vr===void 0||Vr.addEventListener("wheel",Ur,{passive:!1}),function(){var or;(or=fr.current)===null||or===void 0||or.removeEventListener("wheel",Ur)}},[]);var Tr=g.useMemo(function(){return dt.every(function(Vr){return Vr.width})},[dt]),kn=dt[dt.length-1],pr={fixed:kn?kn.fixed:null,scrollbar:!0,onHeaderCell:function(){return{className:"".concat(Yn,"-cell-scrollbar")}}},cr=(0,g.useMemo)(function(){return Kr?[].concat((0,ne.Z)(lt),[pr]):lt},[Kr,lt]),Wn=(0,g.useMemo)(function(){return Kr?[].concat((0,ne.Z)(dt),[pr]):dt},[Kr,dt]),ur=(0,g.useMemo)(function(){var Vr=wt.right,Ur=wt.left;return(0,we.Z)((0,we.Z)({},wt),{},{left:Je==="rtl"?[].concat((0,ne.Z)(Ur.map(function(or){return or+Kr})),[0]):Ur,right:Je==="rtl"?Vr:[].concat((0,ne.Z)(Vr.map(function(or){return or+Kr})),[0]),isSticky:Pn})},[Kr,wt,Pn]),Ir=Ie(jt,Nt);return g.createElement("div",{style:(0,we.Z)({overflow:"hidden"},Pn?{top:Bt,bottom:mt}:{}),ref:hr,className:Y()(Ge,(0,Te.Z)({},bt,!!bt))},g.createElement(ir,{style:{tableLayout:"fixed",visibility:et||Ir?null:"hidden"}},(!et||!En||Tr)&&g.createElement(ze,{colWidths:Ir?[].concat((0,ne.Z)(Ir),[Kr]):[],columCount:Nt+1,columns:Wn}),In((0,we.Z)((0,we.Z)({},jn),{},{stickyOffsets:ur,columns:cr,flattenColumns:Wn}))))}),ke=g.memo(Ue),Gt=function(Ye){var Ge=Ye.cells,et=Ye.stickyOffsets,lt=Ye.flattenColumns,dt=Ye.rowComponent,jt=Ye.cellComponent,Nt=Ye.onHeaderRow,wt=Ye.index,Je=o(k,["prefixCls","direction"]),At=Je.prefixCls,Bt=Je.direction,mt;Nt&&(mt=Nt(Ge.map(function(An){return An.column}),wt));var bt=W(Ge.map(function(An){return An.column}));return g.createElement(dt,mt,Ge.map(function(An,En){var In=An.column,jn=cn(An.colStart,An.colEnd,lt,et,Bt),tr;return In&&In.onHeaderCell&&(tr=An.column.onHeaderCell(In)),g.createElement(It,(0,S.Z)({},An,{scope:In.title?An.colSpan>1?"colgroup":"col":null,ellipsis:In.ellipsis,align:In.align,component:jt,prefixCls:At,key:bt[En]},jn,{additionalProps:tr,rowType:"header"}))}))},_n=Gt;function wn(pe){var Ye=[];function Ge(jt,Nt){var wt=arguments.length>2&&arguments[2]!==void 0?arguments[2]:0;Ye[wt]=Ye[wt]||[];var Je=Nt,At=jt.filter(Boolean).map(function(Bt){var mt={key:Bt.key,className:Bt.className||"",children:Bt.title,column:Bt,colStart:Je},bt=1,An=Bt.children;return An&&An.length>0&&(bt=Ge(An,Je,wt+1).reduce(function(En,In){return En+In},0),mt.hasSubColumns=!0),"colSpan"in Bt&&(bt=Bt.colSpan),"rowSpan"in Bt&&(mt.rowSpan=Bt.rowSpan),mt.colSpan=bt,mt.colEnd=mt.colStart+bt-1,Ye[wt].push(mt),Je+=bt,bt});return At}Ge(pe,0);for(var et=Ye.length,lt=function(Nt){Ye[Nt].forEach(function(wt){!("rowSpan"in wt)&&!wt.hasSubColumns&&(wt.rowSpan=et-Nt)})},dt=0;dt<et;dt+=1)lt(dt);return Ye}var $n=function(Ye){var Ge=Ye.stickyOffsets,et=Ye.columns,lt=Ye.flattenColumns,dt=Ye.onHeaderRow,jt=o(k,["prefixCls","getComponent"]),Nt=jt.prefixCls,wt=jt.getComponent,Je=g.useMemo(function(){return wn(et)},[et]),At=wt(["header","wrapper"],"thead"),Bt=wt(["header","row"],"tr"),mt=wt(["header","cell"],"th");return g.createElement(At,{className:"".concat(Nt,"-thead")},Je.map(function(bt,An){var En=g.createElement(_n,{key:An,flattenColumns:lt,cells:bt,stickyOffsets:Ge,rowComponent:Bt,cellComponent:mt,onHeaderRow:dt,index:An});return En}))},mr=T($n),sr=x(97347);function lr(pe,Ye,Ge){var et=(0,Mn.g)(pe),lt=et.expandIcon,dt=et.expandedRowKeys,jt=et.defaultExpandedRowKeys,Nt=et.defaultExpandAllRows,wt=et.expandedRowRender,Je=et.onExpand,At=et.onExpandedRowsChange,Bt=et.childrenColumnName,mt=lt||_t,bt=Bt||"children",An=g.useMemo(function(){return wt?"row":pe.expandable&&pe.internalHooks===V.R&&pe.expandable.__PARENT_RENDER_ICON__||Ye.some(function(Pn){return Pn&&(0,ae.Z)(Pn)==="object"&&Pn[bt]})?"nest":!1},[!!wt,Ye]),En=g.useState(function(){return jt||(Nt?Pe(Ye,Ge,bt):[])}),In=(0,fe.Z)(En,2),jn=In[0],tr=In[1],Yn=g.useMemo(function(){return new Set(dt||jn||[])},[dt,jn]),ar=g.useCallback(function(Pn){var yr=Ge(Pn,Ye.indexOf(Pn)),ir,Kr=Yn.has(yr);Kr?(Yn.delete(yr),ir=(0,ne.Z)(Yn)):ir=[].concat((0,ne.Z)(Yn),[yr]),tr(ir),Je&&Je(!Kr,Pn),At&&At(ir)},[Ge,Yn,Ye,Je,At]);return[et,An,Yn,mt,bt,ar]}function zn(pe,Ye,Ge){var et=pe.map(function(lt,dt){return cn(dt,dt,pe,Ye,Ge)});return(0,$.Z)(function(){return et},[et],function(lt,dt){return!(0,G.Z)(lt,dt)})}function Lr(pe){var Ye=(0,g.useRef)(pe),Ge=(0,g.useState)({}),et=(0,fe.Z)(Ge,2),lt=et[1],dt=(0,g.useRef)(null),jt=(0,g.useRef)([]);function Nt(wt){jt.current.push(wt);var Je=Promise.resolve();dt.current=Je,Je.then(function(){if(dt.current===Je){var At=jt.current,Bt=Ye.current;jt.current=[],At.forEach(function(mt){Ye.current=mt(Ye.current)}),dt.current=null,Bt!==Ye.current&<({})}})}return(0,g.useEffect)(function(){return function(){dt.current=null}},[]),[Ye.current,Nt]}function Sr(pe){var Ye=(0,g.useRef)(pe||null),Ge=(0,g.useRef)();function et(){window.clearTimeout(Ge.current)}function lt(jt){Ye.current=jt,et(),Ge.current=window.setTimeout(function(){Ye.current=null,Ge.current=void 0},100)}function dt(){return Ye.current}return(0,g.useEffect)(function(){return et},[]),[lt,dt]}function xr(){var pe=g.useState(-1),Ye=(0,fe.Z)(pe,2),Ge=Ye[0],et=Ye[1],lt=g.useState(-1),dt=(0,fe.Z)(lt,2),jt=dt[0],Nt=dt[1],wt=g.useCallback(function(Je,At){et(Je),Nt(At)},[]);return[Ge,jt,wt]}var Zr=x(47273),Tn=(0,Zr.Z)()?window:null;function fn(pe,Ye){var Ge=(0,ae.Z)(pe)==="object"?pe:{},et=Ge.offsetHeader,lt=et===void 0?0:et,dt=Ge.offsetSummary,jt=dt===void 0?0:dt,Nt=Ge.offsetScroll,wt=Nt===void 0?0:Nt,Je=Ge.getContainer,At=Je===void 0?function(){return Tn}:Je,Bt=At()||Tn,mt=!!pe;return g.useMemo(function(){return{isSticky:mt,stickyClassName:mt?"".concat(Ye,"-sticky-holder"):"",offsetHeader:lt,offsetSummary:jt,offsetScroll:wt,container:Bt}},[mt,wt,lt,jt,Ye,Bt])}function Zn(pe,Ye,Ge){var et=(0,g.useMemo)(function(){var lt=Ye.length,dt=function(Je,At,Bt){for(var mt=[],bt=0,An=Je;An!==At;An+=Bt)mt.push(bt),Ye[An].fixed&&(bt+=pe[An]||0);return mt},jt=dt(0,lt,1),Nt=dt(lt-1,-1,-1).reverse();return Ge==="rtl"?{left:Nt,right:jt}:{left:jt,right:Nt}},[pe,Ye,Ge]);return et}var vr=Zn;function Hr(pe){var Ye=pe.className,Ge=pe.children;return g.createElement("div",{className:Ye},Ge)}var it=Hr,tt=x(8224),mn=x(16089),Jt=x(76846);function Bn(pe){var Ye=(0,Jt.bn)(pe),Ge=Ye.getBoundingClientRect(),et=document.documentElement;return{left:Ge.left+(window.pageXOffset||et.scrollLeft)-(et.clientLeft||document.body.clientLeft||0),top:Ge.top+(window.pageYOffset||et.scrollTop)-(et.clientTop||document.body.clientTop||0)}}var xn=function(Ye,Ge){var et,lt,dt=Ye.scrollBodyRef,jt=Ye.onScroll,Nt=Ye.offsetScroll,wt=Ye.container,Je=Ye.direction,At=o(k,"prefixCls"),Bt=((et=dt.current)===null||et===void 0?void 0:et.scrollWidth)||0,mt=((lt=dt.current)===null||lt===void 0?void 0:lt.clientWidth)||0,bt=Bt&&mt*(mt/Bt),An=g.useRef(),En=Lr({scrollLeft:0,isHiddenScrollBar:!0}),In=(0,fe.Z)(En,2),jn=In[0],tr=In[1],Yn=g.useRef({delta:0,x:0}),ar=g.useState(!1),Pn=(0,fe.Z)(ar,2),yr=Pn[0],ir=Pn[1],Kr=g.useRef(null);g.useEffect(function(){return function(){mn.Z.cancel(Kr.current)}},[]);var fr=function(){ir(!1)},hr=function(Wn){Wn.persist(),Yn.current.delta=Wn.pageX-jn.scrollLeft,Yn.current.x=0,ir(!0),Wn.preventDefault()},Tr=function(Wn){var ur,Ir=Wn||((ur=window)===null||ur===void 0?void 0:ur.event),Vr=Ir.buttons;if(!yr||Vr===0){yr&&ir(!1);return}var Ur=Yn.current.x+Wn.pageX-Yn.current.x-Yn.current.delta,or=Je==="rtl";Ur=Math.max(or?bt-mt:0,Math.min(or?0:mt-bt,Ur));var hi=!or||Math.abs(Ur)+Math.abs(bt)<mt;hi&&(jt({scrollLeft:Ur/mt*(Bt+2)}),Yn.current.x=Wn.pageX)},kn=function(){mn.Z.cancel(Kr.current),Kr.current=(0,mn.Z)(function(){if(dt.current){var Wn=Bn(dt.current).top,ur=Wn+dt.current.offsetHeight,Ir=wt===window?document.documentElement.scrollTop+window.innerHeight:Bn(wt).top+wt.clientHeight;ur-(0,Se.Z)()<=Ir||Wn>=Ir-Nt?tr(function(Vr){return(0,we.Z)((0,we.Z)({},Vr),{},{isHiddenScrollBar:!0})}):tr(function(Vr){return(0,we.Z)((0,we.Z)({},Vr),{},{isHiddenScrollBar:!1})})}})},pr=function(Wn){tr(function(ur){return(0,we.Z)((0,we.Z)({},ur),{},{scrollLeft:Wn/Bt*mt||0})})};return g.useImperativeHandle(Ge,function(){return{setScrollLeft:pr,checkScrollBarVisible:kn}}),g.useEffect(function(){var cr=(0,tt.Z)(document.body,"mouseup",fr,!1),Wn=(0,tt.Z)(document.body,"mousemove",Tr,!1);return kn(),function(){cr.remove(),Wn.remove()}},[bt,yr]),g.useEffect(function(){if(dt.current){for(var cr=[],Wn=(0,Jt.bn)(dt.current);Wn;)cr.push(Wn),Wn=Wn.parentElement;return cr.forEach(function(ur){return ur.addEventListener("scroll",kn,!1)}),window.addEventListener("resize",kn,!1),window.addEventListener("scroll",kn,!1),wt.addEventListener("scroll",kn,!1),function(){cr.forEach(function(ur){return ur.removeEventListener("scroll",kn)}),window.removeEventListener("resize",kn),window.removeEventListener("scroll",kn),wt.removeEventListener("scroll",kn)}}},[wt]),g.useEffect(function(){jn.isHiddenScrollBar||tr(function(cr){var Wn=dt.current;return Wn?(0,we.Z)((0,we.Z)({},cr),{},{scrollLeft:Wn.scrollLeft/Wn.scrollWidth*Wn.clientWidth}):cr})},[jn.isHiddenScrollBar]),Bt<=mt||!bt||jn.isHiddenScrollBar?null:g.createElement("div",{style:{height:(0,Se.Z)(),width:mt,bottom:Nt},className:"".concat(At,"-sticky-scroll")},g.createElement("div",{onMouseDown:hr,ref:An,className:Y()("".concat(At,"-sticky-scroll-bar"),(0,Te.Z)({},"".concat(At,"-sticky-scroll-bar-active"),yr)),style:{width:"".concat(bt,"px"),transform:"translate3d(".concat(jn.scrollLeft,"px, 0, 0)")}}))},vn=g.forwardRef(xn);function yn(pe){return null}var Qn=yn;function bn(pe){return null}var Un=bn,Sn="rc-table",Tt=[],Dt={};function $e(){return"No Data"}function ft(pe,Ye){var Ge=(0,we.Z)({rowKey:"key",prefixCls:Sn,emptyText:$e},pe),et=Ge.prefixCls,lt=Ge.className,dt=Ge.rowClassName,jt=Ge.style,Nt=Ge.data,wt=Ge.rowKey,Je=Ge.scroll,At=Ge.tableLayout,Bt=Ge.direction,mt=Ge.title,bt=Ge.footer,An=Ge.summary,En=Ge.caption,In=Ge.id,jn=Ge.showHeader,tr=Ge.components,Yn=Ge.emptyText,ar=Ge.onRow,Pn=Ge.onHeaderRow,yr=Ge.onScroll,ir=Ge.internalHooks,Kr=Ge.transformColumns,fr=Ge.internalRefs,hr=Ge.tailor,Tr=Ge.getContainerWidth,kn=Ge.sticky,pr=Ge.rowHoverable,cr=pr===void 0?!0:pr,Wn=Nt||Tt,ur=!!Wn.length,Ir=ir===V.R,Vr=g.useCallback(function(wi,Ci){return(0,te.Z)(tr,wi)||Ci},[tr]),Ur=g.useMemo(function(){return typeof wt=="function"?wt:function(wi){var Ci=wi&&wi[wt];return Ci}},[wt]),or=Vr(["body"]),hi=xr(),Ki=(0,fe.Z)(hi,3),Ji=Ki[0],ds=Ki[1],ss=Ki[2],zi=lr(Ge,Wn,Ur),ii=(0,fe.Z)(zi,6),ci=ii[0],Pi=ii[1],ai=ii[2],si=ii[3],li=ii[4],gr=ii[5],Fr=Je==null?void 0:Je.x,Gr=g.useState(0),$r=(0,fe.Z)(Gr,2),Dr=$r[0],Xr=$r[1],ti=(0,sr.Z)((0,we.Z)((0,we.Z)((0,we.Z)({},Ge),ci),{},{expandable:!!ci.expandedRowRender,columnTitle:ci.columnTitle,expandedKeys:ai,getRowKey:Ur,onTriggerExpand:gr,expandIcon:si,expandIconColumnIndex:ci.expandIconColumnIndex,direction:Bt,scrollWidth:Ir&&hr&&typeof Fr=="number"?Fr:null,clientWidth:Dr}),Ir?Kr:null),rr=(0,fe.Z)(ti,4),_r=rr[0],Er=rr[1],ui=rr[2],fi=rr[3],Gi=ui!=null?ui:Fr,as=g.useMemo(function(){return{columns:_r,flattenColumns:Er}},[_r,Er]),Bi=g.useRef(),ls=g.useRef(),gi=g.useRef(),la=g.useRef();g.useImperativeHandle(Ye,function(){return{nativeElement:Bi.current,scrollTo:function(Ci){var Bs;if(gi.current instanceof HTMLElement){var Ss=Ci.index,bs=Ci.top,Sa=Ci.key;if(Ve(bs)){var _a;(_a=gi.current)===null||_a===void 0||_a.scrollTo({top:bs})}else{var Ta,Ia=Sa!=null?Sa:Ur(Wn[Ss]);(Ta=gi.current.querySelector('[data-row-key="'.concat(Ia,'"]')))===null||Ta===void 0||Ta.scrollIntoView()}}else(Bs=gi.current)!==null&&Bs!==void 0&&Bs.scrollTo&&gi.current.scrollTo(Ci)}}});var Ms=g.useRef(),ws=g.useState(!1),Fi=(0,fe.Z)(ws,2),ra=Fi[0],Es=Fi[1],Ws=g.useState(!1),Qs=(0,fe.Z)(Ws,2),js=Qs[0],Ys=Qs[1],pa=g.useState(new Map),ms=(0,fe.Z)(pa,2),Xs=ms[0],vs=ms[1],cs=W(Er),Os=cs.map(function(wi){return Xs.get(wi)}),Ds=g.useMemo(function(){return Os},[Os.join("_")]),Js=vr(Ds,Er,Bt),hs=Je&&be(Je.y),os=Je&&be(Gi)||!!ci.fixed,oi=os&&Er.some(function(wi){var Ci=wi.fixed;return Ci}),Ai=g.useRef(),Mi=fn(kn,et),Si=Mi.isSticky,es=Mi.offsetHeader,Wi=Mi.offsetSummary,Rs=Mi.offsetScroll,Ls=Mi.stickyClassName,Ps=Mi.container,Ui=g.useMemo(function(){return An==null?void 0:An(Wn)},[An,Wn]),xs=(hs||Si)&&g.isValidElement(Ui)&&Ui.type===ee&&Ui.props.fixed,Gs,$s,ia;hs&&($s={overflowY:ur?"scroll":"auto",maxHeight:Je.y}),os&&(Gs={overflowX:"auto"},hs||($s={overflowY:"hidden"}),ia={width:Gi===!0?"auto":Gi,minWidth:"100%"});var ua=g.useCallback(function(wi,Ci){vs(function(Bs){if(Bs.get(wi)!==Ci){var Ss=new Map(Bs);return Ss.set(wi,Ci),Ss}return Bs})},[]),ts=Sr(null),Di=(0,fe.Z)(ts,2),$i=Di[0],_s=Di[1];function ji(wi,Ci){Ci&&(typeof Ci=="function"?Ci(wi):Ci.scrollLeft!==wi&&(Ci.scrollLeft=wi,Ci.scrollLeft!==wi&&setTimeout(function(){Ci.scrollLeft=wi},0)))}var Ts=(0,Ce.Z)(function(wi){var Ci=wi.currentTarget,Bs=wi.scrollLeft,Ss=Bt==="rtl",bs=typeof Bs=="number"?Bs:Ci.scrollLeft,Sa=Ci||Dt;if(!_s()||_s()===Sa){var _a;$i(Sa),ji(bs,ls.current),ji(bs,gi.current),ji(bs,Ms.current),ji(bs,(_a=Ai.current)===null||_a===void 0?void 0:_a.setScrollLeft)}var Ta=Ci||ls.current;if(Ta){var Ia=Ir&&hr&&typeof Gi=="number"?Gi:Ta.scrollWidth,po=Ta.clientWidth;if(Ia===po){Es(!1),Ys(!1);return}Ss?(Es(-bs<Ia-po),Ys(-bs>0)):(Es(bs>0),Ys(bs<Ia-po))}}),gs=(0,Ce.Z)(function(wi){Ts(wi),yr==null||yr(wi)}),ys=function(){if(os&&gi.current){var Ci;Ts({currentTarget:(0,Jt.bn)(gi.current),scrollLeft:(Ci=gi.current)===null||Ci===void 0?void 0:Ci.scrollLeft})}else Es(!1),Ys(!1)},Ga=function(Ci){var Bs,Ss=Ci.width;(Bs=Ai.current)===null||Bs===void 0||Bs.checkScrollBarVisible();var bs=Bi.current?Bi.current.offsetWidth:Ss;Ir&&Tr&&Bi.current&&(bs=Tr(Bi.current,bs)||bs),bs!==Dr&&(ys(),Xr(bs))},Fn=g.useRef(!1);g.useEffect(function(){Fn.current&&ys()},[os,Nt,_r.length]),g.useEffect(function(){Fn.current=!0},[]);var sa=g.useState(0),ma=(0,fe.Z)(sa,2),Zs=ma[0],$a=ma[1],Za=g.useState(!0),Xa=(0,fe.Z)(Za,2),co=Xa[0],Uo=Xa[1];(0,ge.Z)(function(){(!hr||!Ir)&&(gi.current instanceof Element?$a((0,Se.o)(gi.current).width):$a((0,Se.o)(la.current).width)),Uo((0,Be.G)("position","sticky"))},[]),g.useEffect(function(){Ir&&fr&&(fr.body.current=gi.current)});var Ja=g.useCallback(function(wi){return g.createElement(g.Fragment,null,g.createElement(mr,wi),xs==="top"&&g.createElement(ue,wi,Ui))},[xs,Ui]),Ca=g.useCallback(function(wi){return g.createElement(ue,wi,Ui)},[Ui]),Ns=Vr(["table"],"table"),Va=g.useMemo(function(){return At||(oi?Gi==="max-content"?"auto":"fixed":hs||Si||Er.some(function(wi){var Ci=wi.ellipsis;return Ci})?"fixed":"auto")},[hs,oi,Er,At,Si]),ns,xa={colWidths:Ds,columCount:Er.length,stickyOffsets:Js,onHeaderRow:Pn,fixHeader:hs,scroll:Je},fo=g.useMemo(function(){return ur?null:typeof Yn=="function"?Yn():Yn},[ur,Yn]),ho=g.createElement(sn,{data:Wn,measureColumnWidth:hs||os||Si}),qa=g.createElement(ze,{colWidths:Er.map(function(wi){var Ci=wi.width;return Ci}),columns:Er}),eo=En!=null?g.createElement("caption",{className:"".concat(et,"-caption")},En):void 0,va=(0,ot.Z)(Ge,{data:!0}),go=(0,ot.Z)(Ge,{aria:!0});if(hs||Si){var to;typeof or=="function"?(to=or(Wn,{scrollbarSize:Zs,ref:gi,onScroll:Ts}),xa.colWidths=Er.map(function(wi,Ci){var Bs=wi.width,Ss=Ci===Er.length-1?Bs-Zs:Bs;return typeof Ss=="number"&&!Number.isNaN(Ss)?Ss:0})):to=g.createElement("div",{style:(0,we.Z)((0,we.Z)({},Gs),$s),onScroll:gs,ref:gi,className:Y()("".concat(et,"-body"))},g.createElement(Ns,(0,S.Z)({style:(0,we.Z)((0,we.Z)({},ia),{},{tableLayout:Va})},go),eo,qa,ho,!xs&&Ui&&g.createElement(ue,{stickyOffsets:Js,flattenColumns:Er},Ui)));var ca=(0,we.Z)((0,we.Z)((0,we.Z)({noData:!Wn.length,maxContentScroll:os&&Gi==="max-content"},xa),as),{},{direction:Bt,stickyClassName:Ls,onScroll:Ts});ns=g.createElement(g.Fragment,null,jn!==!1&&g.createElement(ke,(0,S.Z)({},ca,{stickyTopOffset:es,className:"".concat(et,"-header"),ref:ls}),Ja),to,xs&&xs!=="top"&&g.createElement(ke,(0,S.Z)({},ca,{stickyBottomOffset:Wi,className:"".concat(et,"-summary"),ref:Ms}),Ca),Si&&gi.current&&gi.current instanceof Element&&g.createElement(vn,{ref:Ai,offsetScroll:Rs,scrollBodyRef:gi,onScroll:Ts,container:Ps,direction:Bt}))}else ns=g.createElement("div",{style:(0,we.Z)((0,we.Z)({},Gs),$s),className:Y()("".concat(et,"-content")),onScroll:Ts,ref:gi},g.createElement(Ns,(0,S.Z)({style:(0,we.Z)((0,we.Z)({},ia),{},{tableLayout:Va})},go),eo,qa,jn!==!1&&g.createElement(mr,(0,S.Z)({},xa,as)),ho,Ui&&g.createElement(ue,{stickyOffsets:Js,flattenColumns:Er},Ui)));var La=g.createElement("div",(0,S.Z)({className:Y()(et,lt,(0,Te.Z)((0,Te.Z)((0,Te.Z)((0,Te.Z)((0,Te.Z)((0,Te.Z)((0,Te.Z)((0,Te.Z)((0,Te.Z)((0,Te.Z)({},"".concat(et,"-rtl"),Bt==="rtl"),"".concat(et,"-ping-left"),ra),"".concat(et,"-ping-right"),js),"".concat(et,"-layout-fixed"),At==="fixed"),"".concat(et,"-fixed-header"),hs),"".concat(et,"-fixed-column"),oi),"".concat(et,"-fixed-column-gapped"),oi&&fi),"".concat(et,"-scroll-horizontal"),os),"".concat(et,"-has-fix-left"),Er[0]&&Er[0].fixed),"".concat(et,"-has-fix-right"),Er[Er.length-1]&&Er[Er.length-1].fixed==="right")),style:jt,id:In,ref:Bi},va),mt&&g.createElement(it,{className:"".concat(et,"-title")},mt(Wn)),g.createElement("div",{ref:la,className:"".concat(et,"-container")},ns),bt&&g.createElement(it,{className:"".concat(et,"-footer")},bt(Wn)));os&&(La=g.createElement(Ae.Z,{onResize:Ga},La));var Ua=zn(Er,Js,Bt),za=g.useMemo(function(){return{scrollX:Gi,prefixCls:et,getComponent:Vr,scrollbarSize:Zs,direction:Bt,fixedInfoList:Ua,isSticky:Si,supportSticky:co,componentWidth:Dr,fixHeader:hs,fixColumn:oi,horizonScroll:os,tableLayout:Va,rowClassName:dt,expandedRowClassName:ci.expandedRowClassName,expandIcon:si,expandableType:Pi,expandRowByClick:ci.expandRowByClick,expandedRowRender:ci.expandedRowRender,onTriggerExpand:gr,expandIconColumnIndex:ci.expandIconColumnIndex,indentSize:ci.indentSize,allColumnsFixedLeft:Er.every(function(wi){return wi.fixed==="left"}),emptyNode:fo,columns:_r,flattenColumns:Er,onColumnResize:ua,hoverStartRow:Ji,hoverEndRow:ds,onHover:ss,rowExpandable:ci.rowExpandable,onRow:ar,getRowKey:Ur,expandedKeys:ai,childrenColumnName:li,rowHoverable:cr}},[Gi,et,Vr,Zs,Bt,Ua,Si,co,Dr,hs,oi,os,Va,dt,ci.expandedRowClassName,si,Pi,ci.expandRowByClick,ci.expandedRowRender,gr,ci.expandIconColumnIndex,ci.indentSize,fo,_r,Er,ua,Ji,ds,ss,ci.rowExpandable,ar,Ur,ai,li,cr]);return g.createElement(k.Provider,{value:za},La)}var Qt=g.forwardRef(ft);function Lt(pe){return J(Qt,pe)}var on=Lt();on.EXPAND_COLUMN=V.w,on.INTERNAL_HOOKS=V.R,on.Column=Qn,on.ColumnGroup=Un,on.Summary=De;var Cn=on,pn=x(6790),Hn=le(null),Xn=le(null);function Jn(pe,Ye,Ge){var et=Ye||1;return Ge[pe+et]-(Ge[pe]||0)}function yt(pe){var Ye=pe.rowInfo,Ge=pe.column,et=pe.colIndex,lt=pe.indent,dt=pe.index,jt=pe.component,Nt=pe.renderIndex,wt=pe.record,Je=pe.style,At=pe.className,Bt=pe.inverse,mt=pe.getHeight,bt=Ge.render,An=Ge.dataIndex,En=Ge.className,In=Ge.width,jn=o(Xn,["columnsOffset"]),tr=jn.columnsOffset,Yn=St(Ye,Ge,et,lt,dt),ar=Yn.key,Pn=Yn.fixedInfo,yr=Yn.appendCellNode,ir=Yn.additionalCellProps,Kr=ir.style,fr=ir.colSpan,hr=fr===void 0?1:fr,Tr=ir.rowSpan,kn=Tr===void 0?1:Tr,pr=et-1,cr=Jn(pr,hr,tr),Wn=hr>1?In-cr:0,ur=(0,we.Z)((0,we.Z)((0,we.Z)({},Kr),Je),{},{flex:"0 0 ".concat(cr,"px"),width:"".concat(cr,"px"),marginRight:Wn,pointerEvents:"auto"}),Ir=g.useMemo(function(){return Bt?kn<=1:hr===0||kn===0||kn>1},[kn,hr,Bt]);Ir?ur.visibility="hidden":Bt&&(ur.height=mt==null?void 0:mt(kn));var Vr=Ir?function(){return null}:bt,Ur={};return(kn===0||hr===0)&&(Ur.rowSpan=1,Ur.colSpan=1),g.createElement(It,(0,S.Z)({className:Y()(En,At),ellipsis:Ge.ellipsis,align:Ge.align,scope:Ge.rowScope,component:jt,prefixCls:Ye.prefixCls,key:ar,record:wt,index:dt,renderIndex:Nt,dataIndex:An,render:Vr,shouldCellUpdate:Ge.shouldCellUpdate},Pn,{appendNode:yr,additionalProps:(0,we.Z)((0,we.Z)({},ir),{},{style:ur},Ur)}))}var On=yt,Kn=["data","index","className","rowKey","style","extra","getHeight"],Q=g.forwardRef(function(pe,Ye){var Ge=pe.data,et=pe.index,lt=pe.className,dt=pe.rowKey,jt=pe.style,Nt=pe.extra,wt=pe.getHeight,Je=(0,Fe.Z)(pe,Kn),At=Ge.record,Bt=Ge.indent,mt=Ge.index,bt=o(k,["prefixCls","flattenColumns","fixColumn","componentWidth","scrollX"]),An=bt.scrollX,En=bt.flattenColumns,In=bt.prefixCls,jn=bt.fixColumn,tr=bt.componentWidth,Yn=o(Hn,["getComponent"]),ar=Yn.getComponent,Pn=qe(At,dt,et,Bt),yr=ar(["body","row"],"div"),ir=ar(["body","cell"],"div"),Kr=Pn.rowSupportExpand,fr=Pn.expanded,hr=Pn.rowProps,Tr=Pn.expandedRowRender,kn=Pn.expandedRowClassName,pr;if(Kr&&fr){var cr=Tr(At,et,Bt+1,fr),Wn=Wt(kn,At,et,Bt),ur={};jn&&(ur={style:(0,Te.Z)({},"--virtual-width","".concat(tr,"px"))});var Ir="".concat(In,"-expanded-row-cell");pr=g.createElement(yr,{className:Y()("".concat(In,"-expanded-row"),"".concat(In,"-expanded-row-level-").concat(Bt+1),Wn)},g.createElement(It,{component:ir,prefixCls:In,className:Y()(Ir,(0,Te.Z)({},"".concat(Ir,"-fixed"),jn)),additionalProps:ur},cr))}var Vr=(0,we.Z)((0,we.Z)({},jt),{},{width:An});Nt&&(Vr.position="absolute",Vr.pointerEvents="none");var Ur=g.createElement(yr,(0,S.Z)({},hr,Je,{"data-row-key":dt,ref:Kr?null:Ye,className:Y()(lt,"".concat(In,"-row"),hr==null?void 0:hr.className,(0,Te.Z)({},"".concat(In,"-row-extra"),Nt)),style:(0,we.Z)((0,we.Z)({},Vr),hr==null?void 0:hr.style)}),En.map(function(or,hi){return g.createElement(On,{key:hi,component:ir,rowInfo:Pn,column:or,colIndex:hi,indent:Bt,index:et,renderIndex:mt,record:At,inverse:Nt,getHeight:wt})}));return Kr?g.createElement("div",{ref:Ye},Ur,pr):Ur}),K=T(Q),Ee=K,Le=g.forwardRef(function(pe,Ye){var Ge=pe.data,et=pe.onScroll,lt=o(k,["flattenColumns","onColumnResize","getRowKey","prefixCls","expandedKeys","childrenColumnName","scrollX","direction"]),dt=lt.flattenColumns,jt=lt.onColumnResize,Nt=lt.getRowKey,wt=lt.expandedKeys,Je=lt.prefixCls,At=lt.childrenColumnName,Bt=lt.scrollX,mt=lt.direction,bt=o(Hn),An=bt.sticky,En=bt.scrollY,In=bt.listItemHeight,jn=bt.getComponent,tr=bt.onScroll,Yn=g.useRef(),ar=je(Ge,At,wt,Nt),Pn=g.useMemo(function(){var pr=0;return dt.map(function(cr){var Wn=cr.width,ur=cr.key;return pr+=Wn,[ur,Wn,pr]})},[dt]),yr=g.useMemo(function(){return Pn.map(function(pr){return pr[2]})},[Pn]);g.useEffect(function(){Pn.forEach(function(pr){var cr=(0,fe.Z)(pr,2),Wn=cr[0],ur=cr[1];jt(Wn,ur)})},[Pn]),g.useImperativeHandle(Ye,function(){var pr,cr={scrollTo:function(ur){var Ir;(Ir=Yn.current)===null||Ir===void 0||Ir.scrollTo(ur)},nativeElement:(pr=Yn.current)===null||pr===void 0?void 0:pr.nativeElement};return Object.defineProperty(cr,"scrollLeft",{get:function(){var ur;return((ur=Yn.current)===null||ur===void 0?void 0:ur.getScrollInfo().x)||0},set:function(ur){var Ir;(Ir=Yn.current)===null||Ir===void 0||Ir.scrollTo({left:ur})}}),cr});var ir=function(cr,Wn){var ur,Ir=(ur=ar[Wn])===null||ur===void 0?void 0:ur.record,Vr=cr.onCell;if(Vr){var Ur,or=Vr(Ir,Wn);return(Ur=or==null?void 0:or.rowSpan)!==null&&Ur!==void 0?Ur:1}return 1},Kr=function(cr){var Wn=cr.start,ur=cr.end,Ir=cr.getSize,Vr=cr.offsetY;if(ur<0)return null;for(var Ur=dt.filter(function(si){return ir(si,Wn)===0}),or=Wn,hi=function(li){if(Ur=Ur.filter(function(gr){return ir(gr,li)===0}),!Ur.length)return or=li,1},Ki=Wn;Ki>=0&&!hi(Ki);Ki-=1);for(var Ji=dt.filter(function(si){return ir(si,ur)!==1}),ds=ur,ss=function(li){if(Ji=Ji.filter(function(gr){return ir(gr,li)!==1}),!Ji.length)return ds=Math.max(li-1,ur),1},zi=ur;zi<ar.length&&!ss(zi);zi+=1);for(var ii=[],ci=function(li){var gr=ar[li];if(!gr)return 1;dt.some(function(Fr){return ir(Fr,li)>1})&&ii.push(li)},Pi=or;Pi<=ds;Pi+=1)ci(Pi);var ai=ii.map(function(si){var li=ar[si],gr=Nt(li.record,si),Fr=function(Dr){var Xr=si+Dr-1,ti=Nt(ar[Xr].record,Xr),rr=Ir(gr,ti);return rr.bottom-rr.top},Gr=Ir(gr);return g.createElement(Ee,{key:si,data:li,rowKey:gr,index:si,style:{top:-Vr+Gr.top},extra:!0,getHeight:Fr})});return ai},fr=g.useMemo(function(){return{columnsOffset:yr}},[yr]),hr="".concat(Je,"-tbody"),Tr=jn(["body","wrapper"]),kn={};return An&&(kn.position="sticky",kn.bottom=0,(0,ae.Z)(An)==="object"&&An.offsetScroll&&(kn.bottom=An.offsetScroll)),g.createElement(Xn.Provider,{value:fr},g.createElement(pn.Z,{fullHeight:!1,ref:Yn,prefixCls:"".concat(hr,"-virtual"),styles:{horizontalScrollBar:kn},className:hr,height:En,itemHeight:In||24,data:ar,itemKey:function(cr){return Nt(cr.record)},component:Tr,scrollWidth:Bt,direction:mt,onVirtualScroll:function(cr){var Wn,ur=cr.x;et({currentTarget:(Wn=Yn.current)===null||Wn===void 0?void 0:Wn.nativeElement,scrollLeft:ur})},onScroll:tr,extraRender:Kr},function(pr,cr,Wn){var ur=Nt(pr.record,cr);return g.createElement(Ee,{data:pr,rowKey:ur,index:cr,style:Wn.style})}))}),st=T(Le),rt=st,Ft=function(Ye,Ge){var et=Ge.ref,lt=Ge.onScroll;return g.createElement(rt,{ref:et,data:Ye,onScroll:lt})};function Ht(pe,Ye){var Ge=pe.data,et=pe.columns,lt=pe.scroll,dt=pe.sticky,jt=pe.prefixCls,Nt=jt===void 0?Sn:jt,wt=pe.className,Je=pe.listItemHeight,At=pe.components,Bt=pe.onScroll,mt=lt||{},bt=mt.x,An=mt.y;typeof bt!="number"&&(bt=1),typeof An!="number"&&(An=500);var En=(0,rn.zX)(function(tr,Yn){return(0,te.Z)(At,tr)||Yn}),In=(0,rn.zX)(Bt),jn=g.useMemo(function(){return{sticky:dt,scrollY:An,listItemHeight:Je,getComponent:En,onScroll:In}},[dt,An,Je,En,In]);return g.createElement(Hn.Provider,{value:jn},g.createElement(Cn,(0,S.Z)({},pe,{className:Y()(wt,"".concat(Nt,"-virtual")),scroll:(0,we.Z)((0,we.Z)({},lt),{},{x:bt}),components:(0,we.Z)((0,we.Z)({},At),{},{body:Ge!=null&&Ge.length?Ft:void 0}),columns:et,internalHooks:V.R,tailor:!0,ref:Ye})))}var an=g.forwardRef(Ht);function Xt(pe){return J(an,pe)}var Kt=Xt(),en=null},54451:function(Vn,ct,x){"use strict";x.d(ct,{g:function(){return g},v:function(){return G}});var V=x(27247),fe=x(43079),Ce=x(48736),ge=["expandable"],G="RC_TABLE_INTERNAL_COL_DEFINE";function g(ye){var le=ye.expandable,o=(0,fe.Z)(ye,ge),S;return"expandable"in ye?S=(0,V.Z)((0,V.Z)({},o),le):S=o,S.showExpandColumn===!1&&(S.expandIconColumnIndex=-1),S}},22711:function(Vn,ct,x){"use strict";x.r(ct),x.d(ct,{ResizableTextArea:function(){return Re},default:function(){return q}});var V=x(32855),fe=x(74430),Ce=x(27247),ge=x(3300),G=x(11913),g=x(43079),ye=x(92310),le=x.n(ye),o=x(36901),S=x(66003),U=x(30292),_=x(18929),w=x(59301),b=x(34666),R=x(29301),M=x(34280),H=x(16089),J=`
|
|
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;
|
|
`,T=["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"],N={},P;function k(he){var re=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,E=he.getAttribute("id")||he.getAttribute("data-reactid")||he.getAttribute("name");if(re&&N[E])return N[E];var C=window.getComputedStyle(he),W=C.getPropertyValue("box-sizing")||C.getPropertyValue("-moz-box-sizing")||C.getPropertyValue("-webkit-box-sizing"),be=parseFloat(C.getPropertyValue("padding-bottom"))+parseFloat(C.getPropertyValue("padding-top")),Ve=parseFloat(C.getPropertyValue("border-bottom-width"))+parseFloat(C.getPropertyValue("border-top-width")),Ke=T.map(function(Rt){return"".concat(Rt,":").concat(C.getPropertyValue(Rt))}).join(";"),Ct={sizingStyle:Ke,paddingSize:be,borderSize:Ve,boxSizing:W};return re&&E&&(N[E]=Ct),Ct}function oe(he){var re=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,E=arguments.length>2&&arguments[2]!==void 0?arguments[2]:null,C=arguments.length>3&&arguments[3]!==void 0?arguments[3]:null;P||(P=document.createElement("textarea"),P.setAttribute("tab-index","-1"),P.setAttribute("aria-hidden","true"),P.setAttribute("name","hiddenTextarea"),document.body.appendChild(P)),he.getAttribute("wrap")?P.setAttribute("wrap",he.getAttribute("wrap")):P.removeAttribute("wrap");var W=k(he,re),be=W.paddingSize,Ve=W.borderSize,Ke=W.boxSizing,Ct=W.sizingStyle;P.setAttribute("style","".concat(Ct,";").concat(J)),P.value=he.value||he.placeholder||"";var Rt=void 0,Vt=void 0,rn,He=P.scrollHeight;if(Ke==="border-box"?He+=Ve:Ke==="content-box"&&(He-=be),E!==null||C!==null){P.value=" ";var ln=P.scrollHeight-be;E!==null&&(Rt=ln*E,Ke==="border-box"&&(Rt=Rt+be+Ve),He=Math.max(Rt,He)),C!==null&&(Vt=ln*C,Ke==="border-box"&&(Vt=Vt+be+Ve),rn=He>Vt?"":"hidden",He=Math.min(Vt,He))}var It={height:He,overflowY:rn,resize:"none"};return Rt&&(It.minHeight=Rt),Vt&&(It.maxHeight=Vt),It}var de=["prefixCls","defaultValue","value","autoSize","onResize","className","style","disabled","onChange","onInternalAutoSize"],ie=0,ae=1,we=2,Te=w.forwardRef(function(he,re){var E=he,C=E.prefixCls,W=E.defaultValue,be=E.value,Ve=E.autoSize,Ke=E.onResize,Ct=E.className,Rt=E.style,Vt=E.disabled,rn=E.onChange,He=E.onInternalAutoSize,ln=(0,g.Z)(E,de),It=(0,_.Z)(W,{value:be,postState:function(dn){return dn!=null?dn:""}}),cn=(0,G.Z)(It,2),xt=cn[0],ht=cn[1],Oe=function(dn){ht(dn.target.value),rn==null||rn(dn)},Fe=w.useRef();w.useImperativeHandle(re,function(){return{textArea:Fe.current}});var j=w.useMemo(function(){return Ve&&(0,b.Z)(Ve)==="object"?[Ve.minRows,Ve.maxRows]:[]},[Ve]),Ne=(0,G.Z)(j,2),Ze=Ne[0],ee=Ne[1],O=!!Ve,ue=function(){try{if(document.activeElement===Fe.current){var dn=Fe.current,hn=dn.selectionStart,Ot=dn.selectionEnd,Ln=dn.scrollTop;Fe.current.setSelectionRange(hn,Ot),Fe.current.scrollTop=Ln}}catch(qn){}},De=w.useState(we),Ae=(0,G.Z)(De,2),Be=Ae[0],Se=Ae[1],ot=w.useState(),Xe=(0,G.Z)(ot,2),je=Xe[0],qe=Xe[1],kt=function(){Se(ie)};(0,M.Z)(function(){O&&kt()},[be,Ze,ee,O]),(0,M.Z)(function(){if(Be===ie)Se(ae);else if(Be===ae){var vt=oe(Fe.current,!1,Ze,ee);Se(we),qe(vt)}else ue()},[Be]);var gt=w.useRef(),_t=function(){H.Z.cancel(gt.current)},Pe=function(dn){Be===we&&(Ke==null||Ke(dn),Ve&&(_t(),gt.current=(0,H.Z)(function(){kt()})))};w.useEffect(function(){return _t},[]);var Wt=O?je:null,St=(0,Ce.Z)((0,Ce.Z)({},Rt),Wt);return(Be===ie||Be===ae)&&(St.overflowY="hidden",St.overflowX="hidden"),w.createElement(R.Z,{onResize:Pe,disabled:!(Ve||Ke)},w.createElement("textarea",(0,V.Z)({},ln,{ref:Fe,style:St,className:le()(C,Ct,(0,fe.Z)({},"".concat(C,"-disabled"),Vt)),disabled:Vt,value:xt,onChange:Oe})))}),Re=Te,Y=["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"],$=w.forwardRef(function(he,re){var E,C=he.defaultValue,W=he.value,be=he.onFocus,Ve=he.onBlur,Ke=he.onChange,Ct=he.allowClear,Rt=he.maxLength,Vt=he.onCompositionStart,rn=he.onCompositionEnd,He=he.suffix,ln=he.prefixCls,It=ln===void 0?"rc-textarea":ln,cn=he.showCount,xt=he.count,ht=he.className,Oe=he.style,Fe=he.disabled,j=he.hidden,Ne=he.classNames,Ze=he.styles,ee=he.onResize,O=he.onClear,ue=he.onPressEnter,De=he.readOnly,Ae=he.autoSize,Be=he.onKeyDown,Se=(0,g.Z)(he,Y),ot=(0,_.Z)(C,{value:W,defaultValue:C}),Xe=(0,G.Z)(ot,2),je=Xe[0],qe=Xe[1],kt=je==null?"":String(je),gt=w.useState(!1),_t=(0,G.Z)(gt,2),Pe=_t[0],Wt=_t[1],St=w.useRef(!1),vt=w.useState(null),dn=(0,G.Z)(vt,2),hn=dn[0],Ot=dn[1],Ln=(0,w.useRef)(null),qn=(0,w.useRef)(null),sn=function(){var Zn;return(Zn=qn.current)===null||Zn===void 0?void 0:Zn.textArea},Mn=function(){sn().focus()};(0,w.useImperativeHandle)(re,function(){var fn;return{resizableTextArea:qn.current,focus:Mn,blur:function(){sn().blur()},nativeElement:((fn=Ln.current)===null||fn===void 0?void 0:fn.nativeElement)||sn()}}),(0,w.useEffect)(function(){Wt(function(fn){return!Fe&&fn})},[Fe]);var ut=w.useState(null),nt=(0,G.Z)(ut,2),ze=nt[0],ne=nt[1];w.useEffect(function(){if(ze){var fn;(fn=sn()).setSelectionRange.apply(fn,(0,ge.Z)(ze))}},[ze]);var me=(0,S.Z)(xt,cn),Ie=(E=me.max)!==null&&E!==void 0?E:Rt,Ue=Number(Ie)>0,ke=me.strategy(kt),Gt=!!Ie&&ke>Ie,_n=function(Zn,vr){var Hr=vr;!St.current&&me.exceedFormatter&&me.max&&me.strategy(vr)>me.max&&(Hr=me.exceedFormatter(vr,{max:me.max}),vr!==Hr&&ne([sn().selectionStart||0,sn().selectionEnd||0])),qe(Hr),(0,U.rJ)(Zn.currentTarget,Zn,Ke,Hr)},wn=function(Zn){St.current=!0,Vt==null||Vt(Zn)},$n=function(Zn){St.current=!1,_n(Zn,Zn.currentTarget.value),rn==null||rn(Zn)},mr=function(Zn){_n(Zn,Zn.target.value)},sr=function(Zn){Zn.key==="Enter"&&ue&&ue(Zn),Be==null||Be(Zn)},lr=function(Zn){Wt(!0),be==null||be(Zn)},zn=function(Zn){Wt(!1),Ve==null||Ve(Zn)},Lr=function(Zn){qe(""),Mn(),(0,U.rJ)(sn(),Zn,Ke)},Sr=He,xr;me.show&&(me.showFormatter?xr=me.showFormatter({value:kt,count:ke,maxLength:Ie}):xr="".concat(ke).concat(Ue?" / ".concat(Ie):""),Sr=w.createElement(w.Fragment,null,Sr,w.createElement("span",{className:le()("".concat(It,"-data-count"),Ne==null?void 0:Ne.count),style:Ze==null?void 0:Ze.count},xr)));var Zr=function(Zn){var vr;ee==null||ee(Zn),(vr=sn())!==null&&vr!==void 0&&vr.style.height&&Ot(!0)},Tn=!Ae&&!cn&&!Ct;return w.createElement(o.BaseInput,{ref:Ln,value:kt,allowClear:Ct,handleReset:Lr,suffix:Sr,prefixCls:It,classNames:(0,Ce.Z)((0,Ce.Z)({},Ne),{},{affixWrapper:le()(Ne==null?void 0:Ne.affixWrapper,(0,fe.Z)((0,fe.Z)({},"".concat(It,"-show-count"),cn),"".concat(It,"-textarea-allow-clear"),Ct))}),disabled:Fe,focused:Pe,className:le()(ht,Gt&&"".concat(It,"-out-of-range")),style:(0,Ce.Z)((0,Ce.Z)({},Oe),hn&&!Tn?{height:"auto"}:{}),dataAttrs:{affixWrapper:{"data-count":typeof xr=="string"?xr:void 0}},hidden:j,readOnly:De,onClear:O},w.createElement(Re,(0,V.Z)({},Se,{autoSize:Ae,maxLength:Rt,onKeyDown:sr,onChange:mr,onFocus:lr,onBlur:zn,onCompositionStart:wn,onCompositionEnd:$n,className:le()(Ne==null?void 0:Ne.textarea),style:(0,Ce.Z)((0,Ce.Z)({},Ze==null?void 0:Ze.textarea),{},{resize:Oe==null?void 0:Oe.resize}),disabled:Fe,prefixCls:It,onResize:Zr,ref:qn,readOnly:De})))}),te=$,q=te},29125:function(Vn,ct,x){"use strict";x.d(ct,{G:function(){return ge},Z:function(){return J}});var V=x(92310),fe=x.n(V),Ce=x(59301);function ge(T){var N=T.children,P=T.prefixCls,k=T.id,oe=T.overlayInnerStyle,de=T.bodyClassName,ie=T.className,ae=T.style;return Ce.createElement("div",{className:fe()("".concat(P,"-content"),ie),style:ae},Ce.createElement("div",{className:fe()("".concat(P,"-inner"),de),id:k,role:"tooltip",style:oe},typeof N=="function"?N():N))}var G=x(32855),g=x(27247),ye=x(43079),le=x(65030),o={shiftX:64,adjustY:1},S={adjustX:1,shiftY:!0},U=[0,0],_={left:{points:["cr","cl"],overflow:S,offset:[-4,0],targetOffset:U},right:{points:["cl","cr"],overflow:S,offset:[4,0],targetOffset:U},top:{points:["bc","tc"],overflow:o,offset:[0,-4],targetOffset:U},bottom:{points:["tc","bc"],overflow:o,offset:[0,4],targetOffset:U},topLeft:{points:["bl","tl"],overflow:o,offset:[0,-4],targetOffset:U},leftTop:{points:["tr","tl"],overflow:S,offset:[-4,0],targetOffset:U},topRight:{points:["br","tr"],overflow:o,offset:[0,-4],targetOffset:U},rightTop:{points:["tl","tr"],overflow:S,offset:[4,0],targetOffset:U},bottomRight:{points:["tr","br"],overflow:o,offset:[0,4],targetOffset:U},rightBottom:{points:["bl","br"],overflow:S,offset:[4,0],targetOffset:U},bottomLeft:{points:["tl","bl"],overflow:o,offset:[0,4],targetOffset:U},leftBottom:{points:["br","bl"],overflow:S,offset:[-4,0],targetOffset:U}},w=null,b=x(80402),R=["overlayClassName","trigger","mouseEnterDelay","mouseLeaveDelay","overlayStyle","prefixCls","children","onVisibleChange","afterVisibleChange","transitionName","animation","motion","placement","align","destroyTooltipOnHide","defaultVisible","getTooltipContainer","overlayInnerStyle","arrowContent","overlay","id","showArrow","classNames","styles"],M=function(N,P){var k=N.overlayClassName,oe=N.trigger,de=oe===void 0?["hover"]:oe,ie=N.mouseEnterDelay,ae=ie===void 0?0:ie,we=N.mouseLeaveDelay,Te=we===void 0?.1:we,Re=N.overlayStyle,Y=N.prefixCls,$=Y===void 0?"rc-tooltip":Y,te=N.children,q=N.onVisibleChange,he=N.afterVisibleChange,re=N.transitionName,E=N.animation,C=N.motion,W=N.placement,be=W===void 0?"right":W,Ve=N.align,Ke=Ve===void 0?{}:Ve,Ct=N.destroyTooltipOnHide,Rt=Ct===void 0?!1:Ct,Vt=N.defaultVisible,rn=N.getTooltipContainer,He=N.overlayInnerStyle,ln=N.arrowContent,It=N.overlay,cn=N.id,xt=N.showArrow,ht=xt===void 0?!0:xt,Oe=N.classNames,Fe=N.styles,j=(0,ye.Z)(N,R),Ne=(0,b.Z)(cn),Ze=(0,Ce.useRef)(null);(0,Ce.useImperativeHandle)(P,function(){return Ze.current});var ee=(0,g.Z)({},j);"visible"in N&&(ee.popupVisible=N.visible);var O=function(){return Ce.createElement(ge,{key:"content",prefixCls:$,id:Ne,bodyClassName:Oe==null?void 0:Oe.body,overlayInnerStyle:(0,g.Z)((0,g.Z)({},He),Fe==null?void 0:Fe.body)},It)},ue=function(){var Ae=Ce.Children.only(te),Be=(Ae==null?void 0:Ae.props)||{},Se=(0,g.Z)((0,g.Z)({},Be),{},{"aria-describedby":It?Ne:null});return Ce.cloneElement(te,Se)};return Ce.createElement(le.Z,(0,G.Z)({popupClassName:fe()(k,Oe==null?void 0:Oe.root),prefixCls:$,popup:O,action:de,builtinPlacements:_,popupPlacement:be,ref:Ze,popupAlign:Ke,getPopupContainer:rn,onPopupVisibleChange:q,afterPopupVisibleChange:he,popupTransitionName:re,popupAnimation:E,popupMotion:C,defaultPopupVisible:Vt,autoDestroy:Rt,mouseLeaveDelay:Te,popupStyle:(0,g.Z)((0,g.Z)({},Re),Fe==null?void 0:Fe.root),mouseEnterDelay:ae,arrow:ht},ee),ue())},H=(0,Ce.forwardRef)(M),J=H},639:function(Vn,ct,x){"use strict";x.d(ct,{Z:function(){return N}});var V=x(32855),fe=x(74430),Ce=x(27247),ge=x(11913),G=x(43079),g=x(59301),ye=x(92310),le=x.n(ye),o=x(26112),S=x(30699),U=function(k){for(var oe=k.prefixCls,de=k.level,ie=k.isStart,ae=k.isEnd,we="".concat(oe,"-indent-unit"),Te=[],Re=0;Re<de;Re+=1)Te.push(g.createElement("span",{key:Re,className:le()(we,(0,fe.Z)((0,fe.Z)({},"".concat(we,"-start"),ie[Re]),"".concat(we,"-end"),ae[Re]))}));return g.createElement("span",{"aria-hidden":"true",className:"".concat(oe,"-indent")},Te)},_=g.memo(U),w=x(65065),b=x(34061),R=["eventKey","className","style","dragOver","dragOverGapTop","dragOverGapBottom","isLeaf","isStart","isEnd","expanded","selected","checked","halfChecked","loading","domRef","active","data","onMouseMove","selectable"],M="open",H="close",J="---",T=function(k){var oe,de,ie,ae=k.eventKey,we=k.className,Te=k.style,Re=k.dragOver,Y=k.dragOverGapTop,$=k.dragOverGapBottom,te=k.isLeaf,q=k.isStart,he=k.isEnd,re=k.expanded,E=k.selected,C=k.checked,W=k.halfChecked,be=k.loading,Ve=k.domRef,Ke=k.active,Ct=k.data,Rt=k.onMouseMove,Vt=k.selectable,rn=(0,G.Z)(k,R),He=g.useContext(S.k),ln=g.useContext(S.y),It=g.useRef(null),cn=g.useState(!1),xt=(0,ge.Z)(cn,2),ht=xt[0],Oe=xt[1],Fe=!!(He.disabled||k.disabled||(oe=ln.nodeDisabled)!==null&&oe!==void 0&&oe.call(ln,Ct)),j=g.useMemo(function(){return!He.checkable||k.checkable===!1?!1:He.checkable},[He.checkable,k.checkable]),Ne=function(ke){Fe||He.onNodeSelect(ke,(0,b.F)(k))},Ze=function(ke){Fe||!j||k.disableCheckbox||He.onNodeCheck(ke,(0,b.F)(k),!C)},ee=g.useMemo(function(){return typeof Vt=="boolean"?Vt:He.selectable},[Vt,He.selectable]),O=function(ke){He.onNodeClick(ke,(0,b.F)(k)),ee?Ne(ke):Ze(ke)},ue=function(ke){He.onNodeDoubleClick(ke,(0,b.F)(k))},De=function(ke){He.onNodeMouseEnter(ke,(0,b.F)(k))},Ae=function(ke){He.onNodeMouseLeave(ke,(0,b.F)(k))},Be=function(ke){He.onNodeContextMenu(ke,(0,b.F)(k))},Se=g.useMemo(function(){return!!(He.draggable&&(!He.draggable.nodeDraggable||He.draggable.nodeDraggable(Ct)))},[He.draggable,Ct]),ot=function(ke){ke.stopPropagation(),Oe(!0),He.onNodeDragStart(ke,k);try{ke.dataTransfer.setData("text/plain","")}catch(Gt){}},Xe=function(ke){ke.preventDefault(),ke.stopPropagation(),He.onNodeDragEnter(ke,k)},je=function(ke){ke.preventDefault(),ke.stopPropagation(),He.onNodeDragOver(ke,k)},qe=function(ke){ke.stopPropagation(),He.onNodeDragLeave(ke,k)},kt=function(ke){ke.stopPropagation(),Oe(!1),He.onNodeDragEnd(ke,k)},gt=function(ke){ke.preventDefault(),ke.stopPropagation(),Oe(!1),He.onNodeDrop(ke,k)},_t=function(ke){be||He.onNodeExpand(ke,(0,b.F)(k))},Pe=g.useMemo(function(){var Ue=(0,w.Z)(He.keyEntities,ae)||{},ke=Ue.children;return!!(ke||[]).length},[He.keyEntities,ae]),Wt=g.useMemo(function(){return te===!1?!1:te||!He.loadData&&!Pe||He.loadData&&k.loaded&&!Pe},[te,He.loadData,Pe,k.loaded]);g.useEffect(function(){be||typeof He.loadData=="function"&&re&&!Wt&&!k.loaded&&He.onNodeLoad((0,b.F)(k))},[be,He.loadData,He.onNodeLoad,re,Wt,k]);var St=g.useMemo(function(){var Ue;return(Ue=He.draggable)!==null&&Ue!==void 0&&Ue.icon?g.createElement("span",{className:"".concat(He.prefixCls,"-draggable-icon")},He.draggable.icon):null},[He.draggable]),vt=function(ke){var Gt=k.switcherIcon||He.switcherIcon;return typeof Gt=="function"?Gt((0,Ce.Z)((0,Ce.Z)({},k),{},{isLeaf:ke})):Gt},dn=function(){if(Wt){var ke=vt(!0);return ke!==!1?g.createElement("span",{className:le()("".concat(He.prefixCls,"-switcher"),"".concat(He.prefixCls,"-switcher-noop"))},ke):null}var Gt=vt(!1);return Gt!==!1?g.createElement("span",{onClick:_t,className:le()("".concat(He.prefixCls,"-switcher"),"".concat(He.prefixCls,"-switcher_").concat(re?M:H))},Gt):null},hn=g.useMemo(function(){if(!j)return null;var Ue=typeof j!="boolean"?j:null;return g.createElement("span",{className:le()("".concat(He.prefixCls,"-checkbox"),(0,fe.Z)((0,fe.Z)((0,fe.Z)({},"".concat(He.prefixCls,"-checkbox-checked"),C),"".concat(He.prefixCls,"-checkbox-indeterminate"),!C&&W),"".concat(He.prefixCls,"-checkbox-disabled"),Fe||k.disableCheckbox)),onClick:Ze,role:"checkbox","aria-checked":W?"mixed":C,"aria-disabled":Fe||k.disableCheckbox,"aria-label":"Select ".concat(typeof k.title=="string"?k.title:"tree node")},Ue)},[j,C,W,Fe,k.disableCheckbox,k.title]),Ot=g.useMemo(function(){return Wt?null:re?M:H},[Wt,re]),Ln=g.useMemo(function(){return g.createElement("span",{className:le()("".concat(He.prefixCls,"-iconEle"),"".concat(He.prefixCls,"-icon__").concat(Ot||"docu"),(0,fe.Z)({},"".concat(He.prefixCls,"-icon_loading"),be))})},[He.prefixCls,Ot,be]),qn=g.useMemo(function(){var Ue=!!He.draggable,ke=!k.disabled&&Ue&&He.dragOverNodeKey===ae;return ke?He.dropIndicatorRender({dropPosition:He.dropPosition,dropLevelOffset:He.dropLevelOffset,indent:He.indent,prefixCls:He.prefixCls,direction:He.direction}):null},[He.dropPosition,He.dropLevelOffset,He.indent,He.prefixCls,He.direction,He.draggable,He.dragOverNodeKey,He.dropIndicatorRender]),sn=g.useMemo(function(){var Ue=k.title,ke=Ue===void 0?J:Ue,Gt="".concat(He.prefixCls,"-node-content-wrapper"),_n;if(He.showIcon){var wn=k.icon||He.icon;_n=wn?g.createElement("span",{className:le()("".concat(He.prefixCls,"-iconEle"),"".concat(He.prefixCls,"-icon__customize"))},typeof wn=="function"?wn(k):wn):Ln}else He.loadData&&be&&(_n=Ln);var $n;return typeof ke=="function"?$n=ke(Ct):He.titleRender?$n=He.titleRender(Ct):$n=ke,g.createElement("span",{ref:It,title:typeof ke=="string"?ke:"",className:le()(Gt,"".concat(Gt,"-").concat(Ot||"normal"),(0,fe.Z)({},"".concat(He.prefixCls,"-node-selected"),!Fe&&(E||ht))),onMouseEnter:De,onMouseLeave:Ae,onContextMenu:Be,onClick:O,onDoubleClick:ue},_n,g.createElement("span",{className:"".concat(He.prefixCls,"-title")},$n),qn)},[He.prefixCls,He.showIcon,k,He.icon,Ln,He.titleRender,Ct,Ot,De,Ae,Be,O,ue]),Mn=(0,o.Z)(rn,{aria:!0,data:!0}),ut=(0,w.Z)(He.keyEntities,ae)||{},nt=ut.level,ze=he[he.length-1],ne=!Fe&&Se,me=He.draggingNodeKey===ae,Ie=Vt!==void 0?{"aria-selected":!!Vt}:void 0;return g.createElement("div",(0,V.Z)({ref:Ve,role:"treeitem","aria-expanded":te?void 0:re,className:le()(we,"".concat(He.prefixCls,"-treenode"),(ie={},(0,fe.Z)((0,fe.Z)((0,fe.Z)((0,fe.Z)((0,fe.Z)((0,fe.Z)((0,fe.Z)((0,fe.Z)((0,fe.Z)((0,fe.Z)(ie,"".concat(He.prefixCls,"-treenode-disabled"),Fe),"".concat(He.prefixCls,"-treenode-switcher-").concat(re?"open":"close"),!te),"".concat(He.prefixCls,"-treenode-checkbox-checked"),C),"".concat(He.prefixCls,"-treenode-checkbox-indeterminate"),W),"".concat(He.prefixCls,"-treenode-selected"),E),"".concat(He.prefixCls,"-treenode-loading"),be),"".concat(He.prefixCls,"-treenode-active"),Ke),"".concat(He.prefixCls,"-treenode-leaf-last"),ze),"".concat(He.prefixCls,"-treenode-draggable"),Se),"dragging",me),(0,fe.Z)((0,fe.Z)((0,fe.Z)((0,fe.Z)((0,fe.Z)((0,fe.Z)((0,fe.Z)(ie,"drop-target",He.dropTargetKey===ae),"drop-container",He.dropContainerKey===ae),"drag-over",!Fe&&Re),"drag-over-gap-top",!Fe&&Y),"drag-over-gap-bottom",!Fe&&$),"filter-node",(de=He.filterTreeNode)===null||de===void 0?void 0:de.call(He,(0,b.F)(k))),"".concat(He.prefixCls,"-treenode-leaf"),Wt))),style:Te,draggable:ne,onDragStart:ne?ot:void 0,onDragEnter:Se?Xe:void 0,onDragOver:Se?je:void 0,onDragLeave:Se?qe:void 0,onDrop:Se?gt:void 0,onDragEnd:Se?kt:void 0,onMouseMove:Rt},Ie,Mn),g.createElement(_,{prefixCls:He.prefixCls,level:nt,isStart:q,isEnd:he}),St,dn(),hn,sn)};T.isTreeNode=1;var N=T},30699:function(Vn,ct,x){"use strict";x.d(ct,{k:function(){return fe},y:function(){return Ce}});var V=x(59301),fe=V.createContext(null),Ce=V.createContext({})},89149:function(Vn,ct,x){"use strict";x.d(ct,{OF:function(){return ae.Z},y6:function(){return H.y},ZP:function(){return Fe}});var V=x(32855),fe=x(34666),Ce=x(27247),ge=x(3300),G=x(33377),g=x(93912),ye=x(83383),le=x(18881),o=x(85461),S=x(74430),U=x(92310),_=x.n(U),w=x(10228),b=x(26112),R=x(48736),M=x(59301),H=x(30699),J=function(Ne){var Ze=Ne.dropPosition,ee=Ne.dropLevelOffset,O=Ne.indent,ue={pointerEvents:"none",position:"absolute",right:0,backgroundColor:"red",height:2};switch(Ze){case-1:ue.top=0,ue.left=-ee*O;break;case 1:ue.bottom=0,ue.left=-ee*O;break;case 0:ue.bottom=0,ue.left=O;break}return M.createElement("div",{style:ue})},T=J;function N(j){if(j==null)throw new TypeError("Cannot destructure "+j)}var P=x(11913),k=x(43079),oe=x(34280),de=x(6790),ie=x(77900),ae=x(639);function we(j,Ne){var Ze=M.useState(!1),ee=(0,P.Z)(Ze,2),O=ee[0],ue=ee[1];(0,oe.Z)(function(){if(O)return j(),function(){Ne()}},[O]),(0,oe.Z)(function(){return ue(!0),function(){ue(!1)}},[])}var Te=we,Re=x(34061),Y=["className","style","motion","motionNodes","motionType","onMotionStart","onMotionEnd","active","treeNodeRequiredProps"],$=M.forwardRef(function(j,Ne){var Ze=j.className,ee=j.style,O=j.motion,ue=j.motionNodes,De=j.motionType,Ae=j.onMotionStart,Be=j.onMotionEnd,Se=j.active,ot=j.treeNodeRequiredProps,Xe=(0,k.Z)(j,Y),je=M.useState(!0),qe=(0,P.Z)(je,2),kt=qe[0],gt=qe[1],_t=M.useContext(H.k),Pe=_t.prefixCls,Wt=ue&&De!=="hide";(0,oe.Z)(function(){ue&&Wt!==kt&>(Wt)},[ue]);var St=function(){ue&&Ae()},vt=M.useRef(!1),dn=function(){ue&&!vt.current&&(vt.current=!0,Be())};Te(St,dn);var hn=function(Ln){Wt===Ln&&dn()};return ue?M.createElement(ie.default,(0,V.Z)({ref:Ne,visible:kt},O,{motionAppear:De==="show",onVisibleChanged:hn}),function(Ot,Ln){var qn=Ot.className,sn=Ot.style;return M.createElement("div",{ref:Ln,className:_()("".concat(Pe,"-treenode-motion"),qn),style:sn},ue.map(function(Mn){var ut=Object.assign({},(N(Mn.data),Mn.data)),nt=Mn.title,ze=Mn.key,ne=Mn.isStart,me=Mn.isEnd;delete ut.children;var Ie=(0,Re.H8)(ze,ot);return M.createElement(ae.Z,(0,V.Z)({},ut,Ie,{title:nt,active:Se,data:Mn.data,key:ze,isStart:ne,isEnd:me}))}))}):M.createElement(ae.Z,(0,V.Z)({domRef:Ne,className:Ze,style:ee},Xe,{active:Se}))}),te=$;function q(){var j=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[],Ne=arguments.length>1&&arguments[1]!==void 0?arguments[1]:[],Ze=j.length,ee=Ne.length;if(Math.abs(Ze-ee)!==1)return{add:!1,key:null};function O(ue,De){var Ae=new Map;ue.forEach(function(Se){Ae.set(Se,!0)});var Be=De.filter(function(Se){return!Ae.has(Se)});return Be.length===1?Be[0]:null}return Ze<ee?{add:!0,key:O(j,Ne)}:{add:!1,key:O(Ne,j)}}function he(j,Ne,Ze){var ee=j.findIndex(function(Ae){return Ae.key===Ze}),O=j[ee+1],ue=Ne.findIndex(function(Ae){return Ae.key===Ze});if(O){var De=Ne.findIndex(function(Ae){return Ae.key===O.key});return Ne.slice(ue+1,De)}return Ne.slice(ue+1)}var re=["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"],E={width:0,height:0,display:"flex",overflow:"hidden",opacity:0,border:0,padding:0,margin:0},C=function(){},W="RC_TREE_MOTION_".concat(Math.random()),be={key:W},Ve={key:W,level:0,index:0,pos:"0",node:be,nodes:[be]},Ke={parent:null,children:[],pos:Ve.pos,data:be,title:null,key:W,isStart:[],isEnd:[]};function Ct(j,Ne,Ze,ee){return Ne===!1||!Ze?j:j.slice(0,Math.ceil(Ze/ee)+1)}function Rt(j){var Ne=j.key,Ze=j.pos;return(0,Re.km)(Ne,Ze)}function Vt(j){for(var Ne=String(j.data.key),Ze=j;Ze.parent;)Ze=Ze.parent,Ne="".concat(Ze.data.key," > ").concat(Ne);return Ne}var rn=M.forwardRef(function(j,Ne){var Ze=j.prefixCls,ee=j.data,O=j.selectable,ue=j.checkable,De=j.expandedKeys,Ae=j.selectedKeys,Be=j.checkedKeys,Se=j.loadedKeys,ot=j.loadingKeys,Xe=j.halfCheckedKeys,je=j.keyEntities,qe=j.disabled,kt=j.dragging,gt=j.dragOverNodeKey,_t=j.dropPosition,Pe=j.motion,Wt=j.height,St=j.itemHeight,vt=j.virtual,dn=j.scrollWidth,hn=j.focusable,Ot=j.activeItem,Ln=j.focused,qn=j.tabIndex,sn=j.onKeyDown,Mn=j.onFocus,ut=j.onBlur,nt=j.onActiveChange,ze=j.onListChangeStart,ne=j.onListChangeEnd,me=(0,k.Z)(j,re),Ie=M.useRef(null),Ue=M.useRef(null);M.useImperativeHandle(Ne,function(){return{scrollTo:function(yn){Ie.current.scrollTo(yn)},getIndentWidth:function(){return Ue.current.offsetWidth}}});var ke=M.useState(De),Gt=(0,P.Z)(ke,2),_n=Gt[0],wn=Gt[1],$n=M.useState(ee),mr=(0,P.Z)($n,2),sr=mr[0],lr=mr[1],zn=M.useState(ee),Lr=(0,P.Z)(zn,2),Sr=Lr[0],xr=Lr[1],Zr=M.useState([]),Tn=(0,P.Z)(Zr,2),fn=Tn[0],Zn=Tn[1],vr=M.useState(null),Hr=(0,P.Z)(vr,2),it=Hr[0],tt=Hr[1],mn=M.useRef(ee);mn.current=ee;function Jt(){var vn=mn.current;lr(vn),xr(vn),Zn([]),tt(null),ne()}(0,oe.Z)(function(){wn(De);var vn=q(_n,De);if(vn.key!==null)if(vn.add){var yn=sr.findIndex(function(Dt){var $e=Dt.key;return $e===vn.key}),Qn=Ct(he(sr,ee,vn.key),vt,Wt,St),bn=sr.slice();bn.splice(yn+1,0,Ke),xr(bn),Zn(Qn),tt("show")}else{var Un=ee.findIndex(function(Dt){var $e=Dt.key;return $e===vn.key}),Sn=Ct(he(ee,sr,vn.key),vt,Wt,St),Tt=ee.slice();Tt.splice(Un+1,0,Ke),xr(Tt),Zn(Sn),tt("hide")}else sr!==ee&&(lr(ee),xr(ee))},[De,ee]),M.useEffect(function(){kt||Jt()},[kt]);var Bn=Pe?Sr:ee,xn={expandedKeys:De,selectedKeys:Ae,loadedKeys:Se,loadingKeys:ot,checkedKeys:Be,halfCheckedKeys:Xe,dragOverNodeKey:gt,dropPosition:_t,keyEntities:je};return M.createElement(M.Fragment,null,Ln&&Ot&&M.createElement("span",{style:E,"aria-live":"assertive"},Vt(Ot)),M.createElement("div",null,M.createElement("input",{style:E,disabled:hn===!1||qe,tabIndex:hn!==!1?qn:null,onKeyDown:sn,onFocus:Mn,onBlur:ut,value:"",onChange:C,"aria-label":"for screen reader"})),M.createElement("div",{className:"".concat(Ze,"-treenode"),"aria-hidden":!0,style:{position:"absolute",pointerEvents:"none",visibility:"hidden",height:0,overflow:"hidden",border:0,padding:0}},M.createElement("div",{className:"".concat(Ze,"-indent")},M.createElement("div",{ref:Ue,className:"".concat(Ze,"-indent-unit")}))),M.createElement(de.Z,(0,V.Z)({},me,{data:Bn,itemKey:Rt,height:Wt,fullHeight:!1,virtual:vt,itemHeight:St,scrollWidth:dn,prefixCls:"".concat(Ze,"-list"),ref:Ie,role:"tree",onVisibleChange:function(yn){yn.every(function(Qn){return Rt(Qn)!==W})&&Jt()}}),function(vn){var yn=vn.pos,Qn=Object.assign({},(N(vn.data),vn.data)),bn=vn.title,Un=vn.key,Sn=vn.isStart,Tt=vn.isEnd,Dt=(0,Re.km)(Un,yn);delete Qn.key,delete Qn.children;var $e=(0,Re.H8)(Dt,xn);return M.createElement(te,(0,V.Z)({},Qn,$e,{title:bn,active:!!Ot&&Un===Ot.key,pos:yn,data:vn.data,isStart:Sn,isEnd:Tt,motion:Pe,motionNodes:Un===W?fn:null,motionType:it,onMotionStart:ze,onMotionEnd:Jt,treeNodeRequiredProps:xn,onMouseMove:function(){nt(null)}}))}))}),He=rn,ln=x(82661),It=x(34643),cn=x(65065),xt=10,ht=function(j){(0,le.Z)(Ze,j);var Ne=(0,o.Z)(Ze);function Ze(){var ee;(0,G.Z)(this,Ze);for(var O=arguments.length,ue=new Array(O),De=0;De<O;De++)ue[De]=arguments[De];return ee=Ne.call.apply(Ne,[this].concat(ue)),(0,S.Z)((0,ye.Z)(ee),"destroyed",!1),(0,S.Z)((0,ye.Z)(ee),"delayedDragEnterLogic",void 0),(0,S.Z)((0,ye.Z)(ee),"loadingRetryTimes",{}),(0,S.Z)((0,ye.Z)(ee),"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,Re.w$)()}),(0,S.Z)((0,ye.Z)(ee),"dragStartMousePosition",null),(0,S.Z)((0,ye.Z)(ee),"dragNodeProps",null),(0,S.Z)((0,ye.Z)(ee),"currentMouseOverDroppableNodeKey",null),(0,S.Z)((0,ye.Z)(ee),"listRef",M.createRef()),(0,S.Z)((0,ye.Z)(ee),"onNodeDragStart",function(Ae,Be){var Se=ee.state,ot=Se.expandedKeys,Xe=Se.keyEntities,je=ee.props.onDragStart,qe=Be.eventKey;ee.dragNodeProps=Be,ee.dragStartMousePosition={x:Ae.clientX,y:Ae.clientY};var kt=(0,ln._5)(ot,qe);ee.setState({draggingNodeKey:qe,dragChildrenKeys:(0,ln.wA)(qe,Xe),indent:ee.listRef.current.getIndentWidth()}),ee.setExpandedKeys(kt),window.addEventListener("dragend",ee.onWindowDragEnd),je==null||je({event:Ae,node:(0,Re.F)(Be)})}),(0,S.Z)((0,ye.Z)(ee),"onNodeDragEnter",function(Ae,Be){var Se=ee.state,ot=Se.expandedKeys,Xe=Se.keyEntities,je=Se.dragChildrenKeys,qe=Se.flattenNodes,kt=Se.indent,gt=ee.props,_t=gt.onDragEnter,Pe=gt.onExpand,Wt=gt.allowDrop,St=gt.direction,vt=Be.pos,dn=Be.eventKey;if(ee.currentMouseOverDroppableNodeKey!==dn&&(ee.currentMouseOverDroppableNodeKey=dn),!ee.dragNodeProps){ee.resetDragState();return}var hn=(0,ln.OM)(Ae,ee.dragNodeProps,Be,kt,ee.dragStartMousePosition,Wt,qe,Xe,ot,St),Ot=hn.dropPosition,Ln=hn.dropLevelOffset,qn=hn.dropTargetKey,sn=hn.dropContainerKey,Mn=hn.dropTargetPos,ut=hn.dropAllowed,nt=hn.dragOverNodeKey;if(je.includes(qn)||!ut){ee.resetDragState();return}if(ee.delayedDragEnterLogic||(ee.delayedDragEnterLogic={}),Object.keys(ee.delayedDragEnterLogic).forEach(function(ze){clearTimeout(ee.delayedDragEnterLogic[ze])}),ee.dragNodeProps.eventKey!==Be.eventKey&&(Ae.persist(),ee.delayedDragEnterLogic[vt]=window.setTimeout(function(){if(ee.state.draggingNodeKey!==null){var ze=(0,ge.Z)(ot),ne=(0,cn.Z)(Xe,Be.eventKey);ne&&(ne.children||[]).length&&(ze=(0,ln.L0)(ot,Be.eventKey)),ee.props.hasOwnProperty("expandedKeys")||ee.setExpandedKeys(ze),Pe==null||Pe(ze,{node:(0,Re.F)(Be),expanded:!0,nativeEvent:Ae.nativeEvent})}},800)),ee.dragNodeProps.eventKey===qn&&Ln===0){ee.resetDragState();return}ee.setState({dragOverNodeKey:nt,dropPosition:Ot,dropLevelOffset:Ln,dropTargetKey:qn,dropContainerKey:sn,dropTargetPos:Mn,dropAllowed:ut}),_t==null||_t({event:Ae,node:(0,Re.F)(Be),expandedKeys:ot})}),(0,S.Z)((0,ye.Z)(ee),"onNodeDragOver",function(Ae,Be){var Se=ee.state,ot=Se.dragChildrenKeys,Xe=Se.flattenNodes,je=Se.keyEntities,qe=Se.expandedKeys,kt=Se.indent,gt=ee.props,_t=gt.onDragOver,Pe=gt.allowDrop,Wt=gt.direction;if(ee.dragNodeProps){var St=(0,ln.OM)(Ae,ee.dragNodeProps,Be,kt,ee.dragStartMousePosition,Pe,Xe,je,qe,Wt),vt=St.dropPosition,dn=St.dropLevelOffset,hn=St.dropTargetKey,Ot=St.dropContainerKey,Ln=St.dropTargetPos,qn=St.dropAllowed,sn=St.dragOverNodeKey;ot.includes(hn)||!qn||(ee.dragNodeProps.eventKey===hn&&dn===0?ee.state.dropPosition===null&&ee.state.dropLevelOffset===null&&ee.state.dropTargetKey===null&&ee.state.dropContainerKey===null&&ee.state.dropTargetPos===null&&ee.state.dropAllowed===!1&&ee.state.dragOverNodeKey===null||ee.resetDragState():vt===ee.state.dropPosition&&dn===ee.state.dropLevelOffset&&hn===ee.state.dropTargetKey&&Ot===ee.state.dropContainerKey&&Ln===ee.state.dropTargetPos&&qn===ee.state.dropAllowed&&sn===ee.state.dragOverNodeKey||ee.setState({dropPosition:vt,dropLevelOffset:dn,dropTargetKey:hn,dropContainerKey:Ot,dropTargetPos:Ln,dropAllowed:qn,dragOverNodeKey:sn}),_t==null||_t({event:Ae,node:(0,Re.F)(Be)}))}}),(0,S.Z)((0,ye.Z)(ee),"onNodeDragLeave",function(Ae,Be){ee.currentMouseOverDroppableNodeKey===Be.eventKey&&!Ae.currentTarget.contains(Ae.relatedTarget)&&(ee.resetDragState(),ee.currentMouseOverDroppableNodeKey=null);var Se=ee.props.onDragLeave;Se==null||Se({event:Ae,node:(0,Re.F)(Be)})}),(0,S.Z)((0,ye.Z)(ee),"onWindowDragEnd",function(Ae){ee.onNodeDragEnd(Ae,null,!0),window.removeEventListener("dragend",ee.onWindowDragEnd)}),(0,S.Z)((0,ye.Z)(ee),"onNodeDragEnd",function(Ae,Be){var Se=ee.props.onDragEnd;ee.setState({dragOverNodeKey:null}),ee.cleanDragState(),Se==null||Se({event:Ae,node:(0,Re.F)(Be)}),ee.dragNodeProps=null,window.removeEventListener("dragend",ee.onWindowDragEnd)}),(0,S.Z)((0,ye.Z)(ee),"onNodeDrop",function(Ae,Be){var Se,ot=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1,Xe=ee.state,je=Xe.dragChildrenKeys,qe=Xe.dropPosition,kt=Xe.dropTargetKey,gt=Xe.dropTargetPos,_t=Xe.dropAllowed;if(_t){var Pe=ee.props.onDrop;if(ee.setState({dragOverNodeKey:null}),ee.cleanDragState(),kt!==null){var Wt=(0,Ce.Z)((0,Ce.Z)({},(0,Re.H8)(kt,ee.getTreeNodeRequiredProps())),{},{active:((Se=ee.getActiveItem())===null||Se===void 0?void 0:Se.key)===kt,data:(0,cn.Z)(ee.state.keyEntities,kt).node}),St=je.includes(kt);(0,R.ZP)(!St,"Can not drop to dragNode's children node. This is a bug of rc-tree. Please report an issue.");var vt=(0,ln.yx)(gt),dn={event:Ae,node:(0,Re.F)(Wt),dragNode:ee.dragNodeProps?(0,Re.F)(ee.dragNodeProps):null,dragNodesKeys:[ee.dragNodeProps.eventKey].concat(je),dropToGap:qe!==0,dropPosition:qe+Number(vt[vt.length-1])};ot||Pe==null||Pe(dn),ee.dragNodeProps=null}}}),(0,S.Z)((0,ye.Z)(ee),"cleanDragState",function(){var Ae=ee.state.draggingNodeKey;Ae!==null&&ee.setState({draggingNodeKey:null,dropPosition:null,dropContainerKey:null,dropTargetKey:null,dropLevelOffset:null,dropAllowed:!0,dragOverNodeKey:null}),ee.dragStartMousePosition=null,ee.currentMouseOverDroppableNodeKey=null}),(0,S.Z)((0,ye.Z)(ee),"triggerExpandActionExpand",function(Ae,Be){var Se=ee.state,ot=Se.expandedKeys,Xe=Se.flattenNodes,je=Be.expanded,qe=Be.key,kt=Be.isLeaf;if(!(kt||Ae.shiftKey||Ae.metaKey||Ae.ctrlKey)){var gt=Xe.filter(function(Pe){return Pe.key===qe})[0],_t=(0,Re.F)((0,Ce.Z)((0,Ce.Z)({},(0,Re.H8)(qe,ee.getTreeNodeRequiredProps())),{},{data:gt.data}));ee.setExpandedKeys(je?(0,ln._5)(ot,qe):(0,ln.L0)(ot,qe)),ee.onNodeExpand(Ae,_t)}}),(0,S.Z)((0,ye.Z)(ee),"onNodeClick",function(Ae,Be){var Se=ee.props,ot=Se.onClick,Xe=Se.expandAction;Xe==="click"&&ee.triggerExpandActionExpand(Ae,Be),ot==null||ot(Ae,Be)}),(0,S.Z)((0,ye.Z)(ee),"onNodeDoubleClick",function(Ae,Be){var Se=ee.props,ot=Se.onDoubleClick,Xe=Se.expandAction;Xe==="doubleClick"&&ee.triggerExpandActionExpand(Ae,Be),ot==null||ot(Ae,Be)}),(0,S.Z)((0,ye.Z)(ee),"onNodeSelect",function(Ae,Be){var Se=ee.state.selectedKeys,ot=ee.state,Xe=ot.keyEntities,je=ot.fieldNames,qe=ee.props,kt=qe.onSelect,gt=qe.multiple,_t=Be.selected,Pe=Be[je.key],Wt=!_t;Wt?gt?Se=(0,ln.L0)(Se,Pe):Se=[Pe]:Se=(0,ln._5)(Se,Pe);var St=Se.map(function(vt){var dn=(0,cn.Z)(Xe,vt);return dn?dn.node:null}).filter(Boolean);ee.setUncontrolledState({selectedKeys:Se}),kt==null||kt(Se,{event:"select",selected:Wt,node:Be,selectedNodes:St,nativeEvent:Ae.nativeEvent})}),(0,S.Z)((0,ye.Z)(ee),"onNodeCheck",function(Ae,Be,Se){var ot=ee.state,Xe=ot.keyEntities,je=ot.checkedKeys,qe=ot.halfCheckedKeys,kt=ee.props,gt=kt.checkStrictly,_t=kt.onCheck,Pe=Be.key,Wt,St={event:"check",node:Be,checked:Se,nativeEvent:Ae.nativeEvent};if(gt){var vt=Se?(0,ln.L0)(je,Pe):(0,ln._5)(je,Pe),dn=(0,ln._5)(qe,Pe);Wt={checked:vt,halfChecked:dn},St.checkedNodes=vt.map(function(Mn){return(0,cn.Z)(Xe,Mn)}).filter(Boolean).map(function(Mn){return Mn.node}),ee.setUncontrolledState({checkedKeys:vt})}else{var hn=(0,It.S)([].concat((0,ge.Z)(je),[Pe]),!0,Xe),Ot=hn.checkedKeys,Ln=hn.halfCheckedKeys;if(!Se){var qn=new Set(Ot);qn.delete(Pe);var sn=(0,It.S)(Array.from(qn),{checked:!1,halfCheckedKeys:Ln},Xe);Ot=sn.checkedKeys,Ln=sn.halfCheckedKeys}Wt=Ot,St.checkedNodes=[],St.checkedNodesPositions=[],St.halfCheckedKeys=Ln,Ot.forEach(function(Mn){var ut=(0,cn.Z)(Xe,Mn);if(ut){var nt=ut.node,ze=ut.pos;St.checkedNodes.push(nt),St.checkedNodesPositions.push({node:nt,pos:ze})}}),ee.setUncontrolledState({checkedKeys:Ot},!1,{halfCheckedKeys:Ln})}_t==null||_t(Wt,St)}),(0,S.Z)((0,ye.Z)(ee),"onNodeLoad",function(Ae){var Be,Se=Ae.key,ot=ee.state.keyEntities,Xe=(0,cn.Z)(ot,Se);if(!(Xe!=null&&(Be=Xe.children)!==null&&Be!==void 0&&Be.length)){var je=new Promise(function(qe,kt){ee.setState(function(gt){var _t=gt.loadedKeys,Pe=_t===void 0?[]:_t,Wt=gt.loadingKeys,St=Wt===void 0?[]:Wt,vt=ee.props,dn=vt.loadData,hn=vt.onLoad;if(!dn||Pe.includes(Se)||St.includes(Se))return null;var Ot=dn(Ae);return Ot.then(function(){var Ln=ee.state.loadedKeys,qn=(0,ln.L0)(Ln,Se);hn==null||hn(qn,{event:"load",node:Ae}),ee.setUncontrolledState({loadedKeys:qn}),ee.setState(function(sn){return{loadingKeys:(0,ln._5)(sn.loadingKeys,Se)}}),qe()}).catch(function(Ln){if(ee.setState(function(sn){return{loadingKeys:(0,ln._5)(sn.loadingKeys,Se)}}),ee.loadingRetryTimes[Se]=(ee.loadingRetryTimes[Se]||0)+1,ee.loadingRetryTimes[Se]>=xt){var qn=ee.state.loadedKeys;(0,R.ZP)(!1,"Retry for `loadData` many times but still failed. No more retry."),ee.setUncontrolledState({loadedKeys:(0,ln.L0)(qn,Se)}),qe()}kt(Ln)}),{loadingKeys:(0,ln.L0)(St,Se)}})});return je.catch(function(){}),je}}),(0,S.Z)((0,ye.Z)(ee),"onNodeMouseEnter",function(Ae,Be){var Se=ee.props.onMouseEnter;Se==null||Se({event:Ae,node:Be})}),(0,S.Z)((0,ye.Z)(ee),"onNodeMouseLeave",function(Ae,Be){var Se=ee.props.onMouseLeave;Se==null||Se({event:Ae,node:Be})}),(0,S.Z)((0,ye.Z)(ee),"onNodeContextMenu",function(Ae,Be){var Se=ee.props.onRightClick;Se&&(Ae.preventDefault(),Se({event:Ae,node:Be}))}),(0,S.Z)((0,ye.Z)(ee),"onFocus",function(){var Ae=ee.props.onFocus;ee.setState({focused:!0});for(var Be=arguments.length,Se=new Array(Be),ot=0;ot<Be;ot++)Se[ot]=arguments[ot];Ae==null||Ae.apply(void 0,Se)}),(0,S.Z)((0,ye.Z)(ee),"onBlur",function(){var Ae=ee.props.onBlur;ee.setState({focused:!1}),ee.onActiveChange(null);for(var Be=arguments.length,Se=new Array(Be),ot=0;ot<Be;ot++)Se[ot]=arguments[ot];Ae==null||Ae.apply(void 0,Se)}),(0,S.Z)((0,ye.Z)(ee),"getTreeNodeRequiredProps",function(){var Ae=ee.state,Be=Ae.expandedKeys,Se=Ae.selectedKeys,ot=Ae.loadedKeys,Xe=Ae.loadingKeys,je=Ae.checkedKeys,qe=Ae.halfCheckedKeys,kt=Ae.dragOverNodeKey,gt=Ae.dropPosition,_t=Ae.keyEntities;return{expandedKeys:Be||[],selectedKeys:Se||[],loadedKeys:ot||[],loadingKeys:Xe||[],checkedKeys:je||[],halfCheckedKeys:qe||[],dragOverNodeKey:kt,dropPosition:gt,keyEntities:_t}}),(0,S.Z)((0,ye.Z)(ee),"setExpandedKeys",function(Ae){var Be=ee.state,Se=Be.treeData,ot=Be.fieldNames,Xe=(0,Re.oH)(Se,Ae,ot);ee.setUncontrolledState({expandedKeys:Ae,flattenNodes:Xe},!0)}),(0,S.Z)((0,ye.Z)(ee),"onNodeExpand",function(Ae,Be){var Se=ee.state.expandedKeys,ot=ee.state,Xe=ot.listChanging,je=ot.fieldNames,qe=ee.props,kt=qe.onExpand,gt=qe.loadData,_t=Be.expanded,Pe=Be[je.key];if(!Xe){var Wt=Se.includes(Pe),St=!_t;if((0,R.ZP)(_t&&Wt||!_t&&!Wt,"Expand state not sync with index check"),Se=St?(0,ln.L0)(Se,Pe):(0,ln._5)(Se,Pe),ee.setExpandedKeys(Se),kt==null||kt(Se,{node:Be,expanded:St,nativeEvent:Ae.nativeEvent}),St&>){var vt=ee.onNodeLoad(Be);vt&&vt.then(function(){var dn=(0,Re.oH)(ee.state.treeData,Se,je);ee.setUncontrolledState({flattenNodes:dn})}).catch(function(){var dn=ee.state.expandedKeys,hn=(0,ln._5)(dn,Pe);ee.setExpandedKeys(hn)})}}}),(0,S.Z)((0,ye.Z)(ee),"onListChangeStart",function(){ee.setUncontrolledState({listChanging:!0})}),(0,S.Z)((0,ye.Z)(ee),"onListChangeEnd",function(){setTimeout(function(){ee.setUncontrolledState({listChanging:!1})})}),(0,S.Z)((0,ye.Z)(ee),"onActiveChange",function(Ae){var Be=ee.state.activeKey,Se=ee.props,ot=Se.onActiveChange,Xe=Se.itemScrollOffset,je=Xe===void 0?0:Xe;Be!==Ae&&(ee.setState({activeKey:Ae}),Ae!==null&&ee.scrollTo({key:Ae,offset:je}),ot==null||ot(Ae))}),(0,S.Z)((0,ye.Z)(ee),"getActiveItem",function(){var Ae=ee.state,Be=Ae.activeKey,Se=Ae.flattenNodes;return Be===null?null:Se.find(function(ot){var Xe=ot.key;return Xe===Be})||null}),(0,S.Z)((0,ye.Z)(ee),"offsetActiveKey",function(Ae){var Be=ee.state,Se=Be.flattenNodes,ot=Be.activeKey,Xe=Se.findIndex(function(kt){var gt=kt.key;return gt===ot});Xe===-1&&Ae<0&&(Xe=Se.length),Xe=(Xe+Ae+Se.length)%Se.length;var je=Se[Xe];if(je){var qe=je.key;ee.onActiveChange(qe)}else ee.onActiveChange(null)}),(0,S.Z)((0,ye.Z)(ee),"onKeyDown",function(Ae){var Be=ee.state,Se=Be.activeKey,ot=Be.expandedKeys,Xe=Be.checkedKeys,je=Be.fieldNames,qe=ee.props,kt=qe.onKeyDown,gt=qe.checkable,_t=qe.selectable;switch(Ae.which){case w.Z.UP:{ee.offsetActiveKey(-1),Ae.preventDefault();break}case w.Z.DOWN:{ee.offsetActiveKey(1),Ae.preventDefault();break}}var Pe=ee.getActiveItem();if(Pe&&Pe.data){var Wt=ee.getTreeNodeRequiredProps(),St=Pe.data.isLeaf===!1||!!(Pe.data[je.children]||[]).length,vt=(0,Re.F)((0,Ce.Z)((0,Ce.Z)({},(0,Re.H8)(Se,Wt)),{},{data:Pe.data,active:!0}));switch(Ae.which){case w.Z.LEFT:{St&&ot.includes(Se)?ee.onNodeExpand({},vt):Pe.parent&&ee.onActiveChange(Pe.parent.key),Ae.preventDefault();break}case w.Z.RIGHT:{St&&!ot.includes(Se)?ee.onNodeExpand({},vt):Pe.children&&Pe.children.length&&ee.onActiveChange(Pe.children[0].key),Ae.preventDefault();break}case w.Z.ENTER:case w.Z.SPACE:{gt&&!vt.disabled&&vt.checkable!==!1&&!vt.disableCheckbox?ee.onNodeCheck({},vt,!Xe.includes(Se)):!gt&&_t&&!vt.disabled&&vt.selectable!==!1&&ee.onNodeSelect({},vt);break}}}kt==null||kt(Ae)}),(0,S.Z)((0,ye.Z)(ee),"setUncontrolledState",function(Ae){var Be=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,Se=arguments.length>2&&arguments[2]!==void 0?arguments[2]:null;if(!ee.destroyed){var ot=!1,Xe=!0,je={};Object.keys(Ae).forEach(function(qe){if(ee.props.hasOwnProperty(qe)){Xe=!1;return}ot=!0,je[qe]=Ae[qe]}),ot&&(!Be||Xe)&&ee.setState((0,Ce.Z)((0,Ce.Z)({},je),Se))}}),(0,S.Z)((0,ye.Z)(ee),"scrollTo",function(Ae){ee.listRef.current.scrollTo(Ae)}),ee}return(0,g.Z)(Ze,[{key:"componentDidMount",value:function(){this.destroyed=!1,this.onUpdated()}},{key:"componentDidUpdate",value:function(){this.onUpdated()}},{key:"onUpdated",value:function(){var O=this.props,ue=O.activeKey,De=O.itemScrollOffset,Ae=De===void 0?0:De;ue!==void 0&&ue!==this.state.activeKey&&(this.setState({activeKey:ue}),ue!==null&&this.scrollTo({key:ue,offset:Ae}))}},{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 O=this.state,ue=O.focused,De=O.flattenNodes,Ae=O.keyEntities,Be=O.draggingNodeKey,Se=O.activeKey,ot=O.dropLevelOffset,Xe=O.dropContainerKey,je=O.dropTargetKey,qe=O.dropPosition,kt=O.dragOverNodeKey,gt=O.indent,_t=this.props,Pe=_t.prefixCls,Wt=_t.className,St=_t.style,vt=_t.showLine,dn=_t.focusable,hn=_t.tabIndex,Ot=hn===void 0?0:hn,Ln=_t.selectable,qn=_t.showIcon,sn=_t.icon,Mn=_t.switcherIcon,ut=_t.draggable,nt=_t.checkable,ze=_t.checkStrictly,ne=_t.disabled,me=_t.motion,Ie=_t.loadData,Ue=_t.filterTreeNode,ke=_t.height,Gt=_t.itemHeight,_n=_t.scrollWidth,wn=_t.virtual,$n=_t.titleRender,mr=_t.dropIndicatorRender,sr=_t.onContextMenu,lr=_t.onScroll,zn=_t.direction,Lr=_t.rootClassName,Sr=_t.rootStyle,xr=(0,b.Z)(this.props,{aria:!0,data:!0}),Zr;ut&&((0,fe.Z)(ut)==="object"?Zr=ut:typeof ut=="function"?Zr={nodeDraggable:ut}:Zr={});var Tn={prefixCls:Pe,selectable:Ln,showIcon:qn,icon:sn,switcherIcon:Mn,draggable:Zr,draggingNodeKey:Be,checkable:nt,checkStrictly:ze,disabled:ne,keyEntities:Ae,dropLevelOffset:ot,dropContainerKey:Xe,dropTargetKey:je,dropPosition:qe,dragOverNodeKey:kt,indent:gt,direction:zn,dropIndicatorRender:mr,loadData:Ie,filterTreeNode:Ue,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 M.createElement(H.k.Provider,{value:Tn},M.createElement("div",{className:_()(Pe,Wt,Lr,(0,S.Z)((0,S.Z)((0,S.Z)({},"".concat(Pe,"-show-line"),vt),"".concat(Pe,"-focused"),ue),"".concat(Pe,"-active-focused"),Se!==null)),style:Sr},M.createElement(He,(0,V.Z)({ref:this.listRef,prefixCls:Pe,style:St,data:De,disabled:ne,selectable:Ln,checkable:!!nt,motion:me,dragging:Be!==null,height:ke,itemHeight:Gt,virtual:wn,focusable:dn,focused:ue,tabIndex:Ot,activeItem:this.getActiveItem(),onFocus:this.onFocus,onBlur:this.onBlur,onKeyDown:this.onKeyDown,onActiveChange:this.onActiveChange,onListChangeStart:this.onListChangeStart,onListChangeEnd:this.onListChangeEnd,onContextMenu:sr,onScroll:lr,scrollWidth:_n},this.getTreeNodeRequiredProps(),xr))))}}],[{key:"getDerivedStateFromProps",value:function(O,ue){var De=ue.prevProps,Ae={prevProps:O};function Be(Ot){return!De&&O.hasOwnProperty(Ot)||De&&De[Ot]!==O[Ot]}var Se,ot=ue.fieldNames;if(Be("fieldNames")&&(ot=(0,Re.w$)(O.fieldNames),Ae.fieldNames=ot),Be("treeData")?Se=O.treeData:Be("children")&&((0,R.ZP)(!1,"`children` of Tree is deprecated. Please use `treeData` instead."),Se=(0,Re.zn)(O.children)),Se){Ae.treeData=Se;var Xe=(0,Re.I8)(Se,{fieldNames:ot});Ae.keyEntities=(0,Ce.Z)((0,S.Z)({},W,Ve),Xe.keyEntities)}var je=Ae.keyEntities||ue.keyEntities;if(Be("expandedKeys")||De&&Be("autoExpandParent"))Ae.expandedKeys=O.autoExpandParent||!De&&O.defaultExpandParent?(0,ln.r7)(O.expandedKeys,je):O.expandedKeys;else if(!De&&O.defaultExpandAll){var qe=(0,Ce.Z)({},je);delete qe[W];var kt=[];Object.keys(qe).forEach(function(Ot){var Ln=qe[Ot];Ln.children&&Ln.children.length&&kt.push(Ln.key)}),Ae.expandedKeys=kt}else!De&&O.defaultExpandedKeys&&(Ae.expandedKeys=O.autoExpandParent||O.defaultExpandParent?(0,ln.r7)(O.defaultExpandedKeys,je):O.defaultExpandedKeys);if(Ae.expandedKeys||delete Ae.expandedKeys,Se||Ae.expandedKeys){var gt=(0,Re.oH)(Se||ue.treeData,Ae.expandedKeys||ue.expandedKeys,ot);Ae.flattenNodes=gt}if(O.selectable&&(Be("selectedKeys")?Ae.selectedKeys=(0,ln.BT)(O.selectedKeys,O):!De&&O.defaultSelectedKeys&&(Ae.selectedKeys=(0,ln.BT)(O.defaultSelectedKeys,O))),O.checkable){var _t;if(Be("checkedKeys")?_t=(0,ln.E6)(O.checkedKeys)||{}:!De&&O.defaultCheckedKeys?_t=(0,ln.E6)(O.defaultCheckedKeys)||{}:Se&&(_t=(0,ln.E6)(O.checkedKeys)||{checkedKeys:ue.checkedKeys,halfCheckedKeys:ue.halfCheckedKeys}),_t){var Pe=_t,Wt=Pe.checkedKeys,St=Wt===void 0?[]:Wt,vt=Pe.halfCheckedKeys,dn=vt===void 0?[]:vt;if(!O.checkStrictly){var hn=(0,It.S)(St,!0,je);St=hn.checkedKeys,dn=hn.halfCheckedKeys}Ae.checkedKeys=St,Ae.halfCheckedKeys=dn}}return Be("loadedKeys")&&(Ae.loadedKeys=O.loadedKeys),Ae}}]),Ze}(M.Component);(0,S.Z)(ht,"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:T,allowDrop:function(){return!0},expandAction:!1}),(0,S.Z)(ht,"TreeNode",ae.Z);var Oe=ht,Fe=Oe},82661:function(Vn,ct,x){"use strict";x.d(ct,{BT:function(){return M},E6:function(){return T},L0:function(){return S},OM:function(){return R},_5:function(){return o},r7:function(){return N},wA:function(){return _},yx:function(){return U}});var V=x(3300),fe=x(34666),Ce=x(48736),ge=x(59301),G=x(639),g=x(65065),ye=x(34061),le=null;function o(P,k){if(!P)return[];var oe=P.slice(),de=oe.indexOf(k);return de>=0&&oe.splice(de,1),oe}function S(P,k){var oe=(P||[]).slice();return oe.indexOf(k)===-1&&oe.push(k),oe}function U(P){return P.split("-")}function _(P,k){var oe=[],de=(0,g.Z)(k,P);function ie(){var ae=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[];ae.forEach(function(we){var Te=we.key,Re=we.children;oe.push(Te),ie(Re)})}return ie(de.children),oe}function w(P){if(P.parent){var k=U(P.pos);return Number(k[k.length-1])===P.parent.children.length-1}return!1}function b(P){var k=U(P.pos);return Number(k[k.length-1])===0}function R(P,k,oe,de,ie,ae,we,Te,Re,Y){var $,te=P.clientX,q=P.clientY,he=P.target.getBoundingClientRect(),re=he.top,E=he.height,C=(Y==="rtl"?-1:1)*(((ie==null?void 0:ie.x)||0)-te),W=(C-12)/de,be=Re.filter(function(Fe){var j;return(j=Te[Fe])===null||j===void 0||(j=j.children)===null||j===void 0?void 0:j.length}),Ve=(0,g.Z)(Te,oe.eventKey);if(q<re+E/2){var Ke=we.findIndex(function(Fe){return Fe.key===Ve.key}),Ct=Ke<=0?0:Ke-1,Rt=we[Ct].key;Ve=(0,g.Z)(Te,Rt)}var Vt=Ve.key,rn=Ve,He=Ve.key,ln=0,It=0;if(!be.includes(Vt))for(var cn=0;cn<W&&w(Ve);cn+=1)Ve=Ve.parent,It+=1;var xt=k.data,ht=Ve.node,Oe=!0;return b(Ve)&&Ve.level===0&&q<re+E/2&&ae({dragNode:xt,dropNode:ht,dropPosition:-1})&&Ve.key===oe.eventKey?ln=-1:(rn.children||[]).length&&be.includes(He)?ae({dragNode:xt,dropNode:ht,dropPosition:0})?ln=0:Oe=!1:It===0?W>-1.5?ae({dragNode:xt,dropNode:ht,dropPosition:1})?ln=1:Oe=!1:ae({dragNode:xt,dropNode:ht,dropPosition:0})?ln=0:ae({dragNode:xt,dropNode:ht,dropPosition:1})?ln=1:Oe=!1:ae({dragNode:xt,dropNode:ht,dropPosition:1})?ln=1:Oe=!1,{dropPosition:ln,dropLevelOffset:It,dropTargetKey:Ve.key,dropTargetPos:Ve.pos,dragOverNodeKey:He,dropContainerKey:ln===0?null:(($=Ve.parent)===null||$===void 0?void 0:$.key)||null,dropAllowed:Oe}}function M(P,k){if(P){var oe=k.multiple;return oe?P.slice():P.length?[P[0]]:P}}var H=function(k){return k};function J(P,k){if(!P)return[];var oe=k||{},de=oe.processProps,ie=de===void 0?H:de,ae=Array.isArray(P)?P:[P];return ae.map(function(we){var Te=we.children,Re=_objectWithoutProperties(we,le),Y=J(Te,k);return React.createElement(TreeNode,_extends({key:Re.key},ie(Re)),Y)})}function T(P){if(!P)return null;var k;if(Array.isArray(P))k={checkedKeys:P,halfCheckedKeys:void 0};else if((0,fe.Z)(P)==="object")k={checkedKeys:P.checked||void 0,halfCheckedKeys:P.halfChecked||void 0};else return(0,Ce.ZP)(!1,"`checkedKeys` is not an array or an object"),null;return k}function N(P,k){var oe=new Set;function de(ie){if(!oe.has(ie)){var ae=(0,g.Z)(k,ie);if(ae){oe.add(ie);var we=ae.parent,Te=ae.node;Te.disabled||we&&de(we.key)}}}return(P||[]).forEach(function(ie){de(ie)}),(0,V.Z)(oe)}},34643:function(Vn,ct,x){"use strict";x.d(ct,{S:function(){return ye}});var V=x(48736),fe=x(65065);function Ce(le,o){var S=new Set;return le.forEach(function(U){o.has(U)||S.add(U)}),S}function ge(le){var o=le||{},S=o.disabled,U=o.disableCheckbox,_=o.checkable;return!!(S||U)||_===!1}function G(le,o,S,U){for(var _=new Set(le),w=new Set,b=0;b<=S;b+=1){var R=o.get(b)||new Set;R.forEach(function(T){var N=T.key,P=T.node,k=T.children,oe=k===void 0?[]:k;_.has(N)&&!U(P)&&oe.filter(function(de){return!U(de.node)}).forEach(function(de){_.add(de.key)})})}for(var M=new Set,H=S;H>=0;H-=1){var J=o.get(H)||new Set;J.forEach(function(T){var N=T.parent,P=T.node;if(!(U(P)||!T.parent||M.has(T.parent.key))){if(U(T.parent.node)){M.add(N.key);return}var k=!0,oe=!1;(N.children||[]).filter(function(de){return!U(de.node)}).forEach(function(de){var ie=de.key,ae=_.has(ie);k&&!ae&&(k=!1),!oe&&(ae||w.has(ie))&&(oe=!0)}),k&&_.add(N.key),oe&&w.add(N.key),M.add(N.key)}})}return{checkedKeys:Array.from(_),halfCheckedKeys:Array.from(Ce(w,_))}}function g(le,o,S,U,_){for(var w=new Set(le),b=new Set(o),R=0;R<=U;R+=1){var M=S.get(R)||new Set;M.forEach(function(N){var P=N.key,k=N.node,oe=N.children,de=oe===void 0?[]:oe;!w.has(P)&&!b.has(P)&&!_(k)&&de.filter(function(ie){return!_(ie.node)}).forEach(function(ie){w.delete(ie.key)})})}b=new Set;for(var H=new Set,J=U;J>=0;J-=1){var T=S.get(J)||new Set;T.forEach(function(N){var P=N.parent,k=N.node;if(!(_(k)||!N.parent||H.has(N.parent.key))){if(_(N.parent.node)){H.add(P.key);return}var oe=!0,de=!1;(P.children||[]).filter(function(ie){return!_(ie.node)}).forEach(function(ie){var ae=ie.key,we=w.has(ae);oe&&!we&&(oe=!1),!de&&(we||b.has(ae))&&(de=!0)}),oe||w.delete(P.key),de&&b.add(P.key),H.add(P.key)}})}return{checkedKeys:Array.from(w),halfCheckedKeys:Array.from(Ce(b,w))}}function ye(le,o,S,U){var _=[],w;U?w=U:w=ge;var b=new Set(le.filter(function(J){var T=!!(0,fe.Z)(S,J);return T||_.push(J),T})),R=new Map,M=0;Object.keys(S).forEach(function(J){var T=S[J],N=T.level,P=R.get(N);P||(P=new Set,R.set(N,P)),P.add(T),M=Math.max(M,N)}),(0,V.ZP)(!_.length,"Tree missing follow keys: ".concat(_.slice(0,100).map(function(J){return"'".concat(J,"'")}).join(", ")));var H;return o===!0?H=G(b,R,M,w):H=g(b,o.halfCheckedKeys,R,M,w),H}},65065:function(Vn,ct,x){"use strict";x.d(ct,{Z:function(){return V}});function V(fe,Ce){return fe[Ce]}},34061:function(Vn,ct,x){"use strict";x.d(ct,{F:function(){return N},H8:function(){return T},I8:function(){return J},km:function(){return _},oH:function(){return M},w$:function(){return w},zn:function(){return R}});var V=x(34666),fe=x(3300),Ce=x(27247),ge=x(43079),G=x(11592),g=x(2738),ye=x(48736),le=x(65065),o=["children"];function S(P,k){return"".concat(P,"-").concat(k)}function U(P){return P&&P.type&&P.type.isTreeNode}function _(P,k){return P!=null?P:k}function w(P){var k=P||{},oe=k.title,de=k._title,ie=k.key,ae=k.children,we=oe||"title";return{title:we,_title:de||[we],key:ie||"key",children:ae||"children"}}function b(P,k){var oe=new Map;function de(ie){var ae=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"";(ie||[]).forEach(function(we){var Te=we[k.key],Re=we[k.children];warning(Te!=null,"Tree node must have a certain key: [".concat(ae).concat(Te,"]"));var Y=String(Te);warning(!oe.has(Y)||Te===null||Te===void 0,"Same 'key' exist in the Tree: ".concat(Y)),oe.set(Y,!0),de(Re,"".concat(ae).concat(Y," > "))})}de(P)}function R(P){function k(oe){var de=(0,G.Z)(oe);return de.map(function(ie){if(!U(ie))return(0,ye.ZP)(!ie,"Tree/TreeNode can only accept TreeNode as children."),null;var ae=ie.key,we=ie.props,Te=we.children,Re=(0,ge.Z)(we,o),Y=(0,Ce.Z)({key:ae},Re),$=k(Te);return $.length&&(Y.children=$),Y}).filter(function(ie){return ie})}return k(P)}function M(P,k,oe){var de=w(oe),ie=de._title,ae=de.key,we=de.children,Te=new Set(k===!0?[]:k),Re=[];function Y($){var te=arguments.length>1&&arguments[1]!==void 0?arguments[1]:null;return $.map(function(q,he){for(var re=S(te?te.pos:"0",he),E=_(q[ae],re),C,W=0;W<ie.length;W+=1){var be=ie[W];if(q[be]!==void 0){C=q[be];break}}var Ve=Object.assign((0,g.Z)(q,[].concat((0,fe.Z)(ie),[ae,we])),{title:C,key:E,parent:te,pos:re,children:null,data:q,isStart:[].concat((0,fe.Z)(te?te.isStart:[]),[he===0]),isEnd:[].concat((0,fe.Z)(te?te.isEnd:[]),[he===$.length-1])});return Re.push(Ve),k===!0||Te.has(E)?Ve.children=Y(q[we]||[],Ve):Ve.children=[],Ve})}return Y(P),Re}function H(P,k,oe){var de={};(0,V.Z)(oe)==="object"?de=oe:de={externalGetKey:oe},de=de||{};var ie=de,ae=ie.childrenPropName,we=ie.externalGetKey,Te=ie.fieldNames,Re=w(Te),Y=Re.key,$=Re.children,te=ae||$,q;we?typeof we=="string"?q=function(E){return E[we]}:typeof we=="function"&&(q=function(E){return we(E)}):q=function(E,C){return _(E[Y],C)};function he(re,E,C,W){var be=re?re[te]:P,Ve=re?S(C.pos,E):"0",Ke=re?[].concat((0,fe.Z)(W),[re]):[];if(re){var Ct=q(re,Ve),Rt={node:re,index:E,pos:Ve,key:Ct,parentPos:C.node?C.pos:null,level:C.level+1,nodes:Ke};k(Rt)}be&&be.forEach(function(Vt,rn){he(Vt,rn,{node:re,pos:Ve,level:C?C.level+1:-1},Ke)})}he(null)}function J(P){var k=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},oe=k.initWrapper,de=k.processEntity,ie=k.onProcessFinished,ae=k.externalGetKey,we=k.childrenPropName,Te=k.fieldNames,Re=arguments.length>2?arguments[2]:void 0,Y=ae||Re,$={},te={},q={posEntities:$,keyEntities:te};return oe&&(q=oe(q)||q),H(P,function(he){var re=he.node,E=he.index,C=he.pos,W=he.key,be=he.parentPos,Ve=he.level,Ke=he.nodes,Ct={node:re,nodes:Ke,index:E,key:W,pos:C,level:Ve},Rt=_(W,C);$[C]=Ct,te[Rt]=Ct,Ct.parent=$[be],Ct.parent&&(Ct.parent.children=Ct.parent.children||[],Ct.parent.children.push(Ct)),de&&de(Ct,q)},{externalGetKey:Y,childrenPropName:we,fieldNames:Te}),ie&&ie(q),q}function T(P,k){var oe=k.expandedKeys,de=k.selectedKeys,ie=k.loadedKeys,ae=k.loadingKeys,we=k.checkedKeys,Te=k.halfCheckedKeys,Re=k.dragOverNodeKey,Y=k.dropPosition,$=k.keyEntities,te=(0,le.Z)($,P),q={eventKey:P,expanded:oe.indexOf(P)!==-1,selected:de.indexOf(P)!==-1,loaded:ie.indexOf(P)!==-1,loading:ae.indexOf(P)!==-1,checked:we.indexOf(P)!==-1,halfChecked:Te.indexOf(P)!==-1,pos:String(te?te.pos:""),dragOver:Re===P&&Y===0,dragOverGapTop:Re===P&&Y===-1,dragOverGapBottom:Re===P&&Y===1};return q}function N(P){var k=P.data,oe=P.expanded,de=P.selected,ie=P.checked,ae=P.loaded,we=P.loading,Te=P.halfChecked,Re=P.dragOver,Y=P.dragOverGapTop,$=P.dragOverGapBottom,te=P.pos,q=P.active,he=P.eventKey,re=(0,Ce.Z)((0,Ce.Z)({},k),{},{expanded:oe,selected:de,checked:ie,loaded:ae,loading:we,halfChecked:Te,dragOver:Re,dragOverGapTop:Y,dragOverGapBottom:$,pos:te,active:q,key:he});return"props"in re||Object.defineProperty(re,"props",{get:function(){return(0,ye.ZP)(!1,"Second param return from event is node data instead of TreeNode instance. Please read value directly instead of reading from `props`."),P}}),re}},8224:function(Vn,ct,x){"use strict";x.d(ct,{Z:function(){return fe}});var V=x(4676);function fe(Ce,ge,G,g){var ye=V.unstable_batchedUpdates?function(o){V.unstable_batchedUpdates(G,o)}:G;return Ce!=null&&Ce.addEventListener&&Ce.addEventListener(ge,ye,g),{remove:function(){Ce!=null&&Ce.removeEventListener&&Ce.removeEventListener(ge,ye,g)}}}},24514:function(Vn,ct,x){"use strict";x.d(ct,{G:function(){return ge}});var V=x(47273),fe=function(g){if((0,V.Z)()&&window.document.documentElement){var ye=Array.isArray(g)?g:[g],le=window.document.documentElement;return ye.some(function(o){return o in le.style})}return!1},Ce=function(g,ye){if(!fe(g))return!1;var le=document.createElement("div"),o=le.style[g];return le.style[g]=ye,le.style[g]!==o};function ge(G,g){return!Array.isArray(G)&&g!==void 0?Ce(G,g):fe(G)}},49658:function(Vn,ct){"use strict";ct.Z=function(){if(typeof navigator=="undefined"||typeof window=="undefined")return!1;var x=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(x)||/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(x==null?void 0:x.substr(0,4))}},6790:function(Vn,ct,x){"use strict";x.d(ct,{Z:function(){return xt}});var V=x(32855),fe=x(34666),Ce=x(27247),ge=x(74430),G=x(11913),g=x(43079),ye=x(92310),le=x.n(ye),o=x(29301),S=x(70425),U=x(34280),_=x(59301),w=x(4676),b=_.forwardRef(function(ht,Oe){var Fe=ht.height,j=ht.offsetY,Ne=ht.offsetX,Ze=ht.children,ee=ht.prefixCls,O=ht.onInnerResize,ue=ht.innerProps,De=ht.rtl,Ae=ht.extra,Be={},Se={display:"flex",flexDirection:"column"};return j!==void 0&&(Be={height:Fe,position:"relative",overflow:"hidden"},Se=(0,Ce.Z)((0,Ce.Z)({},Se),{},(0,ge.Z)((0,ge.Z)((0,ge.Z)((0,ge.Z)((0,ge.Z)({transform:"translateY(".concat(j,"px)")},De?"marginRight":"marginLeft",-Ne),"position","absolute"),"left",0),"right",0),"top",0))),_.createElement("div",{style:Be},_.createElement(o.Z,{onResize:function(Xe){var je=Xe.offsetHeight;je&&O&&O()}},_.createElement("div",(0,V.Z)({style:Se,className:le()((0,ge.Z)({},"".concat(ee,"-holder-inner"),ee)),ref:Oe},ue),Ze,Ae)))});b.displayName="Filler";var R=b;function M(ht){var Oe=ht.children,Fe=ht.setRef,j=_.useCallback(function(Ne){Fe(Ne)},[]);return _.cloneElement(Oe,{ref:j})}function H(ht,Oe,Fe,j,Ne,Ze,ee,O){var ue=O.getKey;return ht.slice(Oe,Fe+1).map(function(De,Ae){var Be=Oe+Ae,Se=ee(De,Be,{style:{width:j},offsetX:Ne}),ot=ue(De);return _.createElement(M,{key:ot,setRef:function(je){return Ze(De,je)}},Se)})}function J(ht,Oe,Fe,j){var Ne=Fe-ht,Ze=Oe-Fe,ee=Math.min(Ne,Ze)*2;if(j<=ee){var O=Math.floor(j/2);return j%2?Fe+O+1:Fe-O}return Ne>Ze?Fe-(j-Ze):Fe+(j-Ne)}function T(ht,Oe,Fe){var j=ht.length,Ne=Oe.length,Ze,ee;if(j===0&&Ne===0)return null;j<Ne?(Ze=ht,ee=Oe):(Ze=Oe,ee=ht);var O={__EMPTY_ITEM__:!0};function ue(Xe){return Xe!==void 0?Fe(Xe):O}for(var De=null,Ae=Math.abs(j-Ne)!==1,Be=0;Be<ee.length;Be+=1){var Se=ue(Ze[Be]),ot=ue(ee[Be]);if(Se!==ot){De=Be,Ae=Ae||Se!==ue(ee[Be+1]);break}}return De===null?null:{index:De,multiple:Ae}}function N(ht,Oe,Fe){var j=_.useState(ht),Ne=(0,G.Z)(j,2),Ze=Ne[0],ee=Ne[1],O=_.useState(null),ue=(0,G.Z)(O,2),De=ue[0],Ae=ue[1];return _.useEffect(function(){var Be=T(Ze||[],ht||[],Oe);(Be==null?void 0:Be.index)!==void 0&&(Fe==null||Fe(Be.index),Ae(ht[Be.index])),ee(ht)},[ht]),[De]}var P=x(16089),k=(typeof navigator=="undefined"?"undefined":(0,fe.Z)(navigator))==="object"&&/Firefox/i.test(navigator.userAgent),oe=k,de=function(ht,Oe,Fe,j){var Ne=(0,_.useRef)(!1),Ze=(0,_.useRef)(null);function ee(){clearTimeout(Ze.current),Ne.current=!0,Ze.current=setTimeout(function(){Ne.current=!1},50)}var O=(0,_.useRef)({top:ht,bottom:Oe,left:Fe,right:j});return O.current.top=ht,O.current.bottom=Oe,O.current.left=Fe,O.current.right=j,function(ue,De){var Ae=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1,Be=ue?De<0&&O.current.left||De>0&&O.current.right:De<0&&O.current.top||De>0&&O.current.bottom;return Ae&&Be?(clearTimeout(Ze.current),Ne.current=!1):(!Be||Ne.current)&&ee(),!Ne.current&&Be}};function ie(ht,Oe,Fe,j,Ne,Ze,ee){var O=(0,_.useRef)(0),ue=(0,_.useRef)(null),De=(0,_.useRef)(null),Ae=(0,_.useRef)(!1),Be=de(Oe,Fe,j,Ne);function Se(gt,_t){if(P.Z.cancel(ue.current),!Be(!1,_t)){var Pe=gt;if(!Pe._virtualHandled)Pe._virtualHandled=!0;else return;O.current+=_t,De.current=_t,oe||Pe.preventDefault(),ue.current=(0,P.Z)(function(){var Wt=Ae.current?10:1;ee(O.current*Wt,!1),O.current=0})}}function ot(gt,_t){ee(_t,!0),oe||gt.preventDefault()}var Xe=(0,_.useRef)(null),je=(0,_.useRef)(null);function qe(gt){if(ht){P.Z.cancel(je.current),je.current=(0,P.Z)(function(){Xe.current=null},2);var _t=gt.deltaX,Pe=gt.deltaY,Wt=gt.shiftKey,St=_t,vt=Pe;(Xe.current==="sx"||!Xe.current&&Wt&&Pe&&!_t)&&(St=Pe,vt=0,Xe.current="sx");var dn=Math.abs(St),hn=Math.abs(vt);Xe.current===null&&(Xe.current=Ze&&dn>hn?"x":"y"),Xe.current==="y"?Se(gt,vt):ot(gt,St)}}function kt(gt){ht&&(Ae.current=gt.detail===De.current)}return[qe,kt]}function ae(ht,Oe,Fe,j){var Ne=_.useMemo(function(){return[new Map,[]]},[ht,Fe.id,j]),Ze=(0,G.Z)(Ne,2),ee=Ze[0],O=Ze[1],ue=function(Ae){var Be=arguments.length>1&&arguments[1]!==void 0?arguments[1]:Ae,Se=ee.get(Ae),ot=ee.get(Be);if(Se===void 0||ot===void 0)for(var Xe=ht.length,je=O.length;je<Xe;je+=1){var qe,kt=ht[je],gt=Oe(kt);ee.set(gt,je);var _t=(qe=Fe.get(gt))!==null&&qe!==void 0?qe:j;if(O[je]=(O[je-1]||0)+_t,gt===Ae&&(Se=je),gt===Be&&(ot=je),Se!==void 0&&ot!==void 0)break}return{top:O[Se-1]||0,bottom:O[ot]}};return ue}var we=x(33377),Te=x(93912),Re=function(){function ht(){(0,we.Z)(this,ht),(0,ge.Z)(this,"maps",void 0),(0,ge.Z)(this,"id",0),(0,ge.Z)(this,"diffRecords",new Map),this.maps=Object.create(null)}return(0,Te.Z)(ht,[{key:"set",value:function(Fe,j){this.diffRecords.set(Fe,this.maps[Fe]),this.maps[Fe]=j,this.id+=1}},{key:"get",value:function(Fe){return this.maps[Fe]}},{key:"resetRecord",value:function(){this.diffRecords.clear()}},{key:"getRecord",value:function(){return this.diffRecords}}]),ht}(),Y=Re;function $(ht){var Oe=parseFloat(ht);return isNaN(Oe)?0:Oe}function te(ht,Oe,Fe){var j=_.useState(0),Ne=(0,G.Z)(j,2),Ze=Ne[0],ee=Ne[1],O=(0,_.useRef)(new Map),ue=(0,_.useRef)(new Y),De=(0,_.useRef)(0);function Ae(){De.current+=1}function Be(){var ot=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!1;Ae();var Xe=function(){var kt=!1;O.current.forEach(function(gt,_t){if(gt&>.offsetParent){var Pe=gt.offsetHeight,Wt=getComputedStyle(gt),St=Wt.marginTop,vt=Wt.marginBottom,dn=$(St),hn=$(vt),Ot=Pe+dn+hn;ue.current.get(_t)!==Ot&&(ue.current.set(_t,Ot),kt=!0)}}),kt&&ee(function(gt){return gt+1})};if(ot)Xe();else{De.current+=1;var je=De.current;Promise.resolve().then(function(){je===De.current&&Xe()})}}function Se(ot,Xe){var je=ht(ot),qe=O.current.get(je);Xe?(O.current.set(je,Xe),Be()):O.current.delete(je),!qe!=!Xe&&(Xe?Oe==null||Oe(ot):Fe==null||Fe(ot))}return(0,_.useEffect)(function(){return Ae},[]),[Se,Be,ue.current,Ze]}var q=14/15;function he(ht,Oe,Fe){var j=(0,_.useRef)(!1),Ne=(0,_.useRef)(0),Ze=(0,_.useRef)(0),ee=(0,_.useRef)(null),O=(0,_.useRef)(null),ue,De=function(ot){if(j.current){var Xe=Math.ceil(ot.touches[0].pageX),je=Math.ceil(ot.touches[0].pageY),qe=Ne.current-Xe,kt=Ze.current-je,gt=Math.abs(qe)>Math.abs(kt);gt?Ne.current=Xe:Ze.current=je;var _t=Fe(gt,gt?qe:kt,!1,ot);_t&&ot.preventDefault(),clearInterval(O.current),_t&&(O.current=setInterval(function(){gt?qe*=q:kt*=q;var Pe=Math.floor(gt?qe:kt);(!Fe(gt,Pe,!0)||Math.abs(Pe)<=.1)&&clearInterval(O.current)},16))}},Ae=function(){j.current=!1,ue()},Be=function(ot){ue(),ot.touches.length===1&&!j.current&&(j.current=!0,Ne.current=Math.ceil(ot.touches[0].pageX),Ze.current=Math.ceil(ot.touches[0].pageY),ee.current=ot.target,ee.current.addEventListener("touchmove",De,{passive:!1}),ee.current.addEventListener("touchend",Ae,{passive:!0}))};ue=function(){ee.current&&(ee.current.removeEventListener("touchmove",De),ee.current.removeEventListener("touchend",Ae))},(0,U.Z)(function(){return ht&&Oe.current.addEventListener("touchstart",Be,{passive:!0}),function(){var Se;(Se=Oe.current)===null||Se===void 0||Se.removeEventListener("touchstart",Be),ue(),clearInterval(O.current)}},[ht])}function re(ht){return Math.floor(Math.pow(ht,.5))}function E(ht,Oe){var Fe="touches"in ht?ht.touches[0]:ht;return Fe[Oe?"pageX":"pageY"]-window[Oe?"scrollX":"scrollY"]}function C(ht,Oe,Fe){_.useEffect(function(){var j=Oe.current;if(ht&&j){var Ne=!1,Ze,ee,O=function(){P.Z.cancel(Ze)},ue=function Se(){O(),Ze=(0,P.Z)(function(){Fe(ee),Se()})},De=function(ot){if(!(ot.target.draggable||ot.button!==0)){var Xe=ot;Xe._virtualHandled||(Xe._virtualHandled=!0,Ne=!0)}},Ae=function(){Ne=!1,O()},Be=function(ot){if(Ne){var Xe=E(ot,!1),je=j.getBoundingClientRect(),qe=je.top,kt=je.bottom;if(Xe<=qe){var gt=qe-Xe;ee=-re(gt),ue()}else if(Xe>=kt){var _t=Xe-kt;ee=re(_t),ue()}else O()}};return j.addEventListener("mousedown",De),j.ownerDocument.addEventListener("mouseup",Ae),j.ownerDocument.addEventListener("mousemove",Be),function(){j.removeEventListener("mousedown",De),j.ownerDocument.removeEventListener("mouseup",Ae),j.ownerDocument.removeEventListener("mousemove",Be),O()}}},[ht])}var W=10;function be(ht,Oe,Fe,j,Ne,Ze,ee,O){var ue=_.useRef(),De=_.useState(null),Ae=(0,G.Z)(De,2),Be=Ae[0],Se=Ae[1];return(0,U.Z)(function(){if(Be&&Be.times<W){if(!ht.current){Se(function(me){return(0,Ce.Z)({},me)});return}Ze();var ot=Be.targetAlign,Xe=Be.originAlign,je=Be.index,qe=Be.offset,kt=ht.current.clientHeight,gt=!1,_t=ot,Pe=null;if(kt){for(var Wt=ot||Xe,St=0,vt=0,dn=0,hn=Math.min(Oe.length-1,je),Ot=0;Ot<=hn;Ot+=1){var Ln=Ne(Oe[Ot]);vt=St;var qn=Fe.get(Ln);dn=vt+(qn===void 0?j:qn),St=dn}for(var sn=Wt==="top"?qe:kt-qe,Mn=hn;Mn>=0;Mn-=1){var ut=Ne(Oe[Mn]),nt=Fe.get(ut);if(nt===void 0){gt=!0;break}if(sn-=nt,sn<=0)break}switch(Wt){case"top":Pe=vt-qe;break;case"bottom":Pe=dn-kt+qe;break;default:{var ze=ht.current.scrollTop,ne=ze+kt;vt<ze?_t="top":dn>ne&&(_t="bottom")}}Pe!==null&&ee(Pe),Pe!==Be.lastTop&&(gt=!0)}gt&&Se((0,Ce.Z)((0,Ce.Z)({},Be),{},{times:Be.times+1,targetAlign:_t,lastTop:Pe}))}},[Be,ht.current]),function(ot){if(ot==null){O();return}if(P.Z.cancel(ue.current),typeof ot=="number")ee(ot);else if(ot&&(0,fe.Z)(ot)==="object"){var Xe,je=ot.align;"index"in ot?Xe=ot.index:Xe=Oe.findIndex(function(gt){return Ne(gt)===ot.key});var qe=ot.offset,kt=qe===void 0?0:qe;Se({times:0,index:Xe,offset:kt,originAlign:je})}}}var Ve=_.forwardRef(function(ht,Oe){var Fe=ht.prefixCls,j=ht.rtl,Ne=ht.scrollOffset,Ze=ht.scrollRange,ee=ht.onStartMove,O=ht.onStopMove,ue=ht.onScroll,De=ht.horizontal,Ae=ht.spinSize,Be=ht.containerSize,Se=ht.style,ot=ht.thumbStyle,Xe=ht.showScrollBar,je=_.useState(!1),qe=(0,G.Z)(je,2),kt=qe[0],gt=qe[1],_t=_.useState(null),Pe=(0,G.Z)(_t,2),Wt=Pe[0],St=Pe[1],vt=_.useState(null),dn=(0,G.Z)(vt,2),hn=dn[0],Ot=dn[1],Ln=!j,qn=_.useRef(),sn=_.useRef(),Mn=_.useState(Xe),ut=(0,G.Z)(Mn,2),nt=ut[0],ze=ut[1],ne=_.useRef(),me=function(){Xe===!0||Xe===!1||(clearTimeout(ne.current),ze(!0),ne.current=setTimeout(function(){ze(!1)},3e3))},Ie=Ze-Be||0,Ue=Be-Ae||0,ke=_.useMemo(function(){if(Ne===0||Ie===0)return 0;var Lr=Ne/Ie;return Lr*Ue},[Ne,Ie,Ue]),Gt=function(Sr){Sr.stopPropagation(),Sr.preventDefault()},_n=_.useRef({top:ke,dragging:kt,pageY:Wt,startTop:hn});_n.current={top:ke,dragging:kt,pageY:Wt,startTop:hn};var wn=function(Sr){gt(!0),St(E(Sr,De)),Ot(_n.current.top),ee(),Sr.stopPropagation(),Sr.preventDefault()};_.useEffect(function(){var Lr=function(Tn){Tn.preventDefault()},Sr=qn.current,xr=sn.current;return Sr.addEventListener("touchstart",Lr,{passive:!1}),xr.addEventListener("touchstart",wn,{passive:!1}),function(){Sr.removeEventListener("touchstart",Lr),xr.removeEventListener("touchstart",wn)}},[]);var $n=_.useRef();$n.current=Ie;var mr=_.useRef();mr.current=Ue,_.useEffect(function(){if(kt){var Lr,Sr=function(Tn){var fn=_n.current,Zn=fn.dragging,vr=fn.pageY,Hr=fn.startTop;P.Z.cancel(Lr);var it=qn.current.getBoundingClientRect(),tt=Be/(De?it.width:it.height);if(Zn){var mn=(E(Tn,De)-vr)*tt,Jt=Hr;!Ln&&De?Jt-=mn:Jt+=mn;var Bn=$n.current,xn=mr.current,vn=xn?Jt/xn:0,yn=Math.ceil(vn*Bn);yn=Math.max(yn,0),yn=Math.min(yn,Bn),Lr=(0,P.Z)(function(){ue(yn,De)})}},xr=function(){gt(!1),O()};return window.addEventListener("mousemove",Sr,{passive:!0}),window.addEventListener("touchmove",Sr,{passive:!0}),window.addEventListener("mouseup",xr,{passive:!0}),window.addEventListener("touchend",xr,{passive:!0}),function(){window.removeEventListener("mousemove",Sr),window.removeEventListener("touchmove",Sr),window.removeEventListener("mouseup",xr),window.removeEventListener("touchend",xr),P.Z.cancel(Lr)}}},[kt]),_.useEffect(function(){return me(),function(){clearTimeout(ne.current)}},[Ne]),_.useImperativeHandle(Oe,function(){return{delayHidden:me}});var sr="".concat(Fe,"-scrollbar"),lr={position:"absolute",visibility:nt?null:"hidden"},zn={position:"absolute",borderRadius:99,background:"var(--rc-virtual-list-scrollbar-bg, rgba(0, 0, 0, 0.5))",cursor:"pointer",userSelect:"none"};return De?(Object.assign(lr,{height:8,left:0,right:0,bottom:0}),Object.assign(zn,(0,ge.Z)({height:"100%",width:Ae},Ln?"left":"right",ke))):(Object.assign(lr,(0,ge.Z)({width:8,top:0,bottom:0},Ln?"right":"left",0)),Object.assign(zn,{width:"100%",height:Ae,top:ke})),_.createElement("div",{ref:qn,className:le()(sr,(0,ge.Z)((0,ge.Z)((0,ge.Z)({},"".concat(sr,"-horizontal"),De),"".concat(sr,"-vertical"),!De),"".concat(sr,"-visible"),nt)),style:(0,Ce.Z)((0,Ce.Z)({},lr),Se),onMouseDown:Gt,onMouseMove:me},_.createElement("div",{ref:sn,className:le()("".concat(sr,"-thumb"),(0,ge.Z)({},"".concat(sr,"-thumb-moving"),kt)),style:(0,Ce.Z)((0,Ce.Z)({},zn),ot),onMouseDown:wn}))}),Ke=Ve,Ct=20;function Rt(){var ht=arguments.length>0&&arguments[0]!==void 0?arguments[0]:0,Oe=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,Fe=ht/Oe*ht;return isNaN(Fe)&&(Fe=0),Fe=Math.max(Fe,Ct),Math.floor(Fe)}var Vt=["prefixCls","className","height","itemHeight","fullHeight","style","data","children","itemKey","virtual","direction","scrollWidth","component","onScroll","onVirtualScroll","onVisibleChange","innerProps","extraRender","styles","showScrollBar"],rn=[],He={overflowY:"auto",overflowAnchor:"none"};function ln(ht,Oe){var Fe=ht.prefixCls,j=Fe===void 0?"rc-virtual-list":Fe,Ne=ht.className,Ze=ht.height,ee=ht.itemHeight,O=ht.fullHeight,ue=O===void 0?!0:O,De=ht.style,Ae=ht.data,Be=ht.children,Se=ht.itemKey,ot=ht.virtual,Xe=ht.direction,je=ht.scrollWidth,qe=ht.component,kt=qe===void 0?"div":qe,gt=ht.onScroll,_t=ht.onVirtualScroll,Pe=ht.onVisibleChange,Wt=ht.innerProps,St=ht.extraRender,vt=ht.styles,dn=ht.showScrollBar,hn=dn===void 0?"optional":dn,Ot=(0,g.Z)(ht,Vt),Ln=_.useCallback(function(Je){return typeof Se=="function"?Se(Je):Je==null?void 0:Je[Se]},[Se]),qn=te(Ln,null,null),sn=(0,G.Z)(qn,4),Mn=sn[0],ut=sn[1],nt=sn[2],ze=sn[3],ne=!!(ot!==!1&&Ze&&ee),me=_.useMemo(function(){return Object.values(nt.maps).reduce(function(Je,At){return Je+At},0)},[nt.id,nt.maps]),Ie=ne&&Ae&&(Math.max(ee*Ae.length,me)>Ze||!!je),Ue=Xe==="rtl",ke=le()(j,(0,ge.Z)({},"".concat(j,"-rtl"),Ue),Ne),Gt=Ae||rn,_n=(0,_.useRef)(),wn=(0,_.useRef)(),$n=(0,_.useRef)(),mr=(0,_.useState)(0),sr=(0,G.Z)(mr,2),lr=sr[0],zn=sr[1],Lr=(0,_.useState)(0),Sr=(0,G.Z)(Lr,2),xr=Sr[0],Zr=Sr[1],Tn=(0,_.useState)(!1),fn=(0,G.Z)(Tn,2),Zn=fn[0],vr=fn[1],Hr=function(){vr(!0)},it=function(){vr(!1)},tt={getKey:Ln};function mn(Je){zn(function(At){var Bt;typeof Je=="function"?Bt=Je(At):Bt=Je;var mt=yt(Bt);return _n.current.scrollTop=mt,mt})}var Jt=(0,_.useRef)({start:0,end:Gt.length}),Bn=(0,_.useRef)(),xn=N(Gt,Ln),vn=(0,G.Z)(xn,1),yn=vn[0];Bn.current=yn;var Qn=_.useMemo(function(){if(!ne)return{scrollHeight:void 0,start:0,end:Gt.length-1,offset:void 0};if(!Ie){var Je;return{scrollHeight:((Je=wn.current)===null||Je===void 0?void 0:Je.offsetHeight)||0,start:0,end:Gt.length-1,offset:void 0}}for(var At=0,Bt,mt,bt,An=Gt.length,En=0;En<An;En+=1){var In=Gt[En],jn=Ln(In),tr=nt.get(jn),Yn=At+(tr===void 0?ee:tr);Yn>=lr&&Bt===void 0&&(Bt=En,mt=At),Yn>lr+Ze&&bt===void 0&&(bt=En),At=Yn}return Bt===void 0&&(Bt=0,mt=0,bt=Math.ceil(Ze/ee)),bt===void 0&&(bt=Gt.length-1),bt=Math.min(bt+1,Gt.length-1),{scrollHeight:At,start:Bt,end:bt,offset:mt}},[Ie,ne,lr,Gt,ze,Ze]),bn=Qn.scrollHeight,Un=Qn.start,Sn=Qn.end,Tt=Qn.offset;Jt.current.start=Un,Jt.current.end=Sn,_.useLayoutEffect(function(){var Je=nt.getRecord();if(Je.size===1){var At=Array.from(Je.keys())[0],Bt=Je.get(At),mt=Gt[Un];if(mt&&Bt===void 0){var bt=Ln(mt);if(bt===At){var An=nt.get(At),En=An-ee;mn(function(In){return In+En})}}}nt.resetRecord()},[bn]);var Dt=_.useState({width:0,height:Ze}),$e=(0,G.Z)(Dt,2),ft=$e[0],Qt=$e[1],Lt=function(At){Qt({width:At.offsetWidth,height:At.offsetHeight})},on=(0,_.useRef)(),Cn=(0,_.useRef)(),pn=_.useMemo(function(){return Rt(ft.width,je)},[ft.width,je]),Hn=_.useMemo(function(){return Rt(ft.height,bn)},[ft.height,bn]),Xn=bn-Ze,Jn=(0,_.useRef)(Xn);Jn.current=Xn;function yt(Je){var At=Je;return Number.isNaN(Jn.current)||(At=Math.min(At,Jn.current)),At=Math.max(At,0),At}var On=lr<=0,Kn=lr>=Xn,Q=xr<=0,K=xr>=je,Ee=de(On,Kn,Q,K),Le=function(){return{x:Ue?-xr:xr,y:lr}},st=(0,_.useRef)(Le()),rt=(0,S.zX)(function(Je){if(_t){var At=(0,Ce.Z)((0,Ce.Z)({},Le()),Je);(st.current.x!==At.x||st.current.y!==At.y)&&(_t(At),st.current=At)}});function Ft(Je,At){var Bt=Je;At?((0,w.flushSync)(function(){Zr(Bt)}),rt()):mn(Bt)}function Ht(Je){var At=Je.currentTarget.scrollTop;At!==lr&&mn(At),gt==null||gt(Je),rt()}var an=function(At){var Bt=At,mt=je?je-ft.width:0;return Bt=Math.max(Bt,0),Bt=Math.min(Bt,mt),Bt},Xt=(0,S.zX)(function(Je,At){At?((0,w.flushSync)(function(){Zr(function(Bt){var mt=Bt+(Ue?-Je:Je);return an(mt)})}),rt()):mn(function(Bt){var mt=Bt+Je;return mt})}),Kt=ie(ne,On,Kn,Q,K,!!je,Xt),en=(0,G.Z)(Kt,2),pe=en[0],Ye=en[1];he(ne,_n,function(Je,At,Bt,mt){var bt=mt;return Ee(Je,At,Bt)?!1:!bt||!bt._virtualHandled?(bt&&(bt._virtualHandled=!0),pe({preventDefault:function(){},deltaX:Je?At:0,deltaY:Je?0:At}),!0):!1}),C(Ie,_n,function(Je){mn(function(At){return At+Je})}),(0,U.Z)(function(){function Je(Bt){var mt=On&&Bt.detail<0,bt=Kn&&Bt.detail>0;ne&&!mt&&!bt&&Bt.preventDefault()}var At=_n.current;return At.addEventListener("wheel",pe,{passive:!1}),At.addEventListener("DOMMouseScroll",Ye,{passive:!0}),At.addEventListener("MozMousePixelScroll",Je,{passive:!1}),function(){At.removeEventListener("wheel",pe),At.removeEventListener("DOMMouseScroll",Ye),At.removeEventListener("MozMousePixelScroll",Je)}},[ne,On,Kn]),(0,U.Z)(function(){if(je){var Je=an(xr);Zr(Je),rt({x:Je})}},[ft.width,je]);var Ge=function(){var At,Bt;(At=on.current)===null||At===void 0||At.delayHidden(),(Bt=Cn.current)===null||Bt===void 0||Bt.delayHidden()},et=be(_n,Gt,nt,ee,Ln,function(){return ut(!0)},mn,Ge);_.useImperativeHandle(Oe,function(){return{nativeElement:$n.current,getScrollInfo:Le,scrollTo:function(At){function Bt(mt){return mt&&(0,fe.Z)(mt)==="object"&&("left"in mt||"top"in mt)}Bt(At)?(At.left!==void 0&&Zr(an(At.left)),et(At.top)):et(At)}}}),(0,U.Z)(function(){if(Pe){var Je=Gt.slice(Un,Sn+1);Pe(Je,Gt)}},[Un,Sn,Gt]);var lt=ae(Gt,Ln,nt,ee),dt=St==null?void 0:St({start:Un,end:Sn,virtual:Ie,offsetX:xr,offsetY:Tt,rtl:Ue,getSize:lt}),jt=H(Gt,Un,Sn,je,xr,Mn,Be,tt),Nt=null;Ze&&(Nt=(0,Ce.Z)((0,ge.Z)({},ue?"height":"maxHeight",Ze),He),ne&&(Nt.overflowY="hidden",je&&(Nt.overflowX="hidden"),Zn&&(Nt.pointerEvents="none")));var wt={};return Ue&&(wt.dir="rtl"),_.createElement("div",(0,V.Z)({ref:$n,style:(0,Ce.Z)((0,Ce.Z)({},De),{},{position:"relative"}),className:ke},wt,Ot),_.createElement(o.Z,{onResize:Lt},_.createElement(kt,{className:"".concat(j,"-holder"),style:Nt,ref:_n,onScroll:Ht,onMouseEnter:Ge},_.createElement(R,{prefixCls:j,height:bn,offsetX:xr,offsetY:Tt,scrollWidth:je,onInnerResize:ut,ref:wn,innerProps:Wt,rtl:Ue,extra:dt},jt))),Ie&&bn>Ze&&_.createElement(Ke,{ref:on,prefixCls:j,scrollOffset:lr,scrollRange:bn,rtl:Ue,onScroll:Ft,onStartMove:Hr,onStopMove:it,spinSize:Hn,containerSize:ft.height,style:vt==null?void 0:vt.verticalScrollBar,thumbStyle:vt==null?void 0:vt.verticalScrollBarThumb,showScrollBar:hn}),Ie&&je>ft.width&&_.createElement(Ke,{ref:Cn,prefixCls:j,scrollOffset:xr,scrollRange:je,rtl:Ue,onScroll:Ft,onStartMove:Hr,onStopMove:it,spinSize:pn,containerSize:ft.width,horizontal:!0,style:vt==null?void 0:vt.horizontalScrollBar,thumbStyle:vt==null?void 0:vt.horizontalScrollBarThumb,showScrollBar:hn}))}var It=_.forwardRef(ln);It.displayName="List";var cn=It,xt=cn},83145:function(Vn,ct,x){"use strict";Object.defineProperty(ct,"__esModule",{value:!0}),ct.CopyToClipboard=void 0;var V=Ce(x(59301)),fe=Ce(x(25769));function Ce(T){return T&&T.__esModule?T:{default:T}}function ge(T){return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?ge=function(P){return typeof P}:ge=function(P){return P&&typeof Symbol=="function"&&P.constructor===Symbol&&P!==Symbol.prototype?"symbol":typeof P},ge(T)}function G(T,N){var P=Object.keys(T);if(Object.getOwnPropertySymbols){var k=Object.getOwnPropertySymbols(T);N&&(k=k.filter(function(oe){return Object.getOwnPropertyDescriptor(T,oe).enumerable})),P.push.apply(P,k)}return P}function g(T){for(var N=1;N<arguments.length;N++){var P=arguments[N]!=null?arguments[N]:{};N%2?G(P,!0).forEach(function(k){H(T,k,P[k])}):Object.getOwnPropertyDescriptors?Object.defineProperties(T,Object.getOwnPropertyDescriptors(P)):G(P).forEach(function(k){Object.defineProperty(T,k,Object.getOwnPropertyDescriptor(P,k))})}return T}function ye(T,N){if(T==null)return{};var P=le(T,N),k,oe;if(Object.getOwnPropertySymbols){var de=Object.getOwnPropertySymbols(T);for(oe=0;oe<de.length;oe++)k=de[oe],!(N.indexOf(k)>=0)&&Object.prototype.propertyIsEnumerable.call(T,k)&&(P[k]=T[k])}return P}function le(T,N){if(T==null)return{};var P={},k=Object.keys(T),oe,de;for(de=0;de<k.length;de++)oe=k[de],!(N.indexOf(oe)>=0)&&(P[oe]=T[oe]);return P}function o(T,N){if(!(T instanceof N))throw new TypeError("Cannot call a class as a function")}function S(T,N){for(var P=0;P<N.length;P++){var k=N[P];k.enumerable=k.enumerable||!1,k.configurable=!0,"value"in k&&(k.writable=!0),Object.defineProperty(T,k.key,k)}}function U(T,N,P){return N&&S(T.prototype,N),P&&S(T,P),T}function _(T,N){return N&&(ge(N)==="object"||typeof N=="function")?N:b(T)}function w(T){return w=Object.setPrototypeOf?Object.getPrototypeOf:function(P){return P.__proto__||Object.getPrototypeOf(P)},w(T)}function b(T){if(T===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return T}function R(T,N){if(typeof N!="function"&&N!==null)throw new TypeError("Super expression must either be null or a function");T.prototype=Object.create(N&&N.prototype,{constructor:{value:T,writable:!0,configurable:!0}}),N&&M(T,N)}function M(T,N){return M=Object.setPrototypeOf||function(k,oe){return k.__proto__=oe,k},M(T,N)}function H(T,N,P){return N in T?Object.defineProperty(T,N,{value:P,enumerable:!0,configurable:!0,writable:!0}):T[N]=P,T}var J=function(T){R(N,T);function N(){var P,k;o(this,N);for(var oe=arguments.length,de=new Array(oe),ie=0;ie<oe;ie++)de[ie]=arguments[ie];return k=_(this,(P=w(N)).call.apply(P,[this].concat(de))),H(b(k),"onClick",function(ae){var we=k.props,Te=we.text,Re=we.onCopy,Y=we.children,$=we.options,te=V.default.Children.only(Y),q=(0,fe.default)(Te,$);Re&&Re(Te,q),te&&te.props&&typeof te.props.onClick=="function"&&te.props.onClick(ae)}),k}return U(N,[{key:"render",value:function(){var k=this.props,oe=k.text,de=k.onCopy,ie=k.options,ae=k.children,we=ye(k,["text","onCopy","options","children"]),Te=V.default.Children.only(ae);return V.default.cloneElement(Te,g({},we,{onClick:this.onClick}))}}]),N}(V.default.PureComponent);ct.CopyToClipboard=J,H(J,"defaultProps",{onCopy:void 0,options:void 0})},56102:function(Vn,ct,x){"use strict";var V=x(83145),fe=V.CopyToClipboard;fe.CopyToClipboard=fe,Vn.exports=fe},76374:function(Vn,ct,x){"use strict";var V=function(){if(typeof Map!="undefined")return Map;function Y($,te){var q=-1;return $.some(function(he,re){return he[0]===te?(q=re,!0):!1}),q}return function(){function $(){this.__entries__=[]}return Object.defineProperty($.prototype,"size",{get:function(){return this.__entries__.length},enumerable:!0,configurable:!0}),$.prototype.get=function(te){var q=Y(this.__entries__,te),he=this.__entries__[q];return he&&he[1]},$.prototype.set=function(te,q){var he=Y(this.__entries__,te);~he?this.__entries__[he][1]=q:this.__entries__.push([te,q])},$.prototype.delete=function(te){var q=this.__entries__,he=Y(q,te);~he&&q.splice(he,1)},$.prototype.has=function(te){return!!~Y(this.__entries__,te)},$.prototype.clear=function(){this.__entries__.splice(0)},$.prototype.forEach=function(te,q){q===void 0&&(q=null);for(var he=0,re=this.__entries__;he<re.length;he++){var E=re[he];te.call(q,E[1],E[0])}},$}()}(),fe=typeof window!="undefined"&&typeof document!="undefined"&&window.document===document,Ce=function(){return typeof x.g!="undefined"&&x.g.Math===Math?x.g:typeof self!="undefined"&&self.Math===Math?self:typeof window!="undefined"&&window.Math===Math?window:Function("return this")()}(),ge=function(){return typeof requestAnimationFrame=="function"?requestAnimationFrame.bind(Ce):function(Y){return setTimeout(function(){return Y(Date.now())},1e3/60)}}(),G=2;function g(Y,$){var te=!1,q=!1,he=0;function re(){te&&(te=!1,Y()),q&&C()}function E(){ge(re)}function C(){var W=Date.now();if(te){if(W-he<G)return;q=!0}else te=!0,q=!1,setTimeout(E,$);he=W}return C}var ye=20,le=["top","right","bottom","left","width","height","size","weight"],o=typeof MutationObserver!="undefined",S=function(){function Y(){this.connected_=!1,this.mutationEventsAdded_=!1,this.mutationsObserver_=null,this.observers_=[],this.onTransitionEnd_=this.onTransitionEnd_.bind(this),this.refresh=g(this.refresh.bind(this),ye)}return Y.prototype.addObserver=function($){~this.observers_.indexOf($)||this.observers_.push($),this.connected_||this.connect_()},Y.prototype.removeObserver=function($){var te=this.observers_,q=te.indexOf($);~q&&te.splice(q,1),!te.length&&this.connected_&&this.disconnect_()},Y.prototype.refresh=function(){var $=this.updateObservers_();$&&this.refresh()},Y.prototype.updateObservers_=function(){var $=this.observers_.filter(function(te){return te.gatherActive(),te.hasActive()});return $.forEach(function(te){return te.broadcastActive()}),$.length>0},Y.prototype.connect_=function(){!fe||this.connected_||(document.addEventListener("transitionend",this.onTransitionEnd_),window.addEventListener("resize",this.refresh),o?(this.mutationsObserver_=new MutationObserver(this.refresh),this.mutationsObserver_.observe(document,{attributes:!0,childList:!0,characterData:!0,subtree:!0})):(document.addEventListener("DOMSubtreeModified",this.refresh),this.mutationEventsAdded_=!0),this.connected_=!0)},Y.prototype.disconnect_=function(){!fe||!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)},Y.prototype.onTransitionEnd_=function($){var te=$.propertyName,q=te===void 0?"":te,he=le.some(function(re){return!!~q.indexOf(re)});he&&this.refresh()},Y.getInstance=function(){return this.instance_||(this.instance_=new Y),this.instance_},Y.instance_=null,Y}(),U=function(Y,$){for(var te=0,q=Object.keys($);te<q.length;te++){var he=q[te];Object.defineProperty(Y,he,{value:$[he],enumerable:!1,writable:!1,configurable:!0})}return Y},_=function(Y){var $=Y&&Y.ownerDocument&&Y.ownerDocument.defaultView;return $||Ce},w=oe(0,0,0,0);function b(Y){return parseFloat(Y)||0}function R(Y){for(var $=[],te=1;te<arguments.length;te++)$[te-1]=arguments[te];return $.reduce(function(q,he){var re=Y["border-"+he+"-width"];return q+b(re)},0)}function M(Y){for(var $=["top","right","bottom","left"],te={},q=0,he=$;q<he.length;q++){var re=he[q],E=Y["padding-"+re];te[re]=b(E)}return te}function H(Y){var $=Y.getBBox();return oe(0,0,$.width,$.height)}function J(Y){var $=Y.clientWidth,te=Y.clientHeight;if(!$&&!te)return w;var q=_(Y).getComputedStyle(Y),he=M(q),re=he.left+he.right,E=he.top+he.bottom,C=b(q.width),W=b(q.height);if(q.boxSizing==="border-box"&&(Math.round(C+re)!==$&&(C-=R(q,"left","right")+re),Math.round(W+E)!==te&&(W-=R(q,"top","bottom")+E)),!N(Y)){var be=Math.round(C+re)-$,Ve=Math.round(W+E)-te;Math.abs(be)!==1&&(C-=be),Math.abs(Ve)!==1&&(W-=Ve)}return oe(he.left,he.top,C,W)}var T=function(){return typeof SVGGraphicsElement!="undefined"?function(Y){return Y instanceof _(Y).SVGGraphicsElement}:function(Y){return Y instanceof _(Y).SVGElement&&typeof Y.getBBox=="function"}}();function N(Y){return Y===_(Y).document.documentElement}function P(Y){return fe?T(Y)?H(Y):J(Y):w}function k(Y){var $=Y.x,te=Y.y,q=Y.width,he=Y.height,re=typeof DOMRectReadOnly!="undefined"?DOMRectReadOnly:Object,E=Object.create(re.prototype);return U(E,{x:$,y:te,width:q,height:he,top:te,right:$+q,bottom:he+te,left:$}),E}function oe(Y,$,te,q){return{x:Y,y:$,width:te,height:q}}var de=function(){function Y($){this.broadcastWidth=0,this.broadcastHeight=0,this.contentRect_=oe(0,0,0,0),this.target=$}return Y.prototype.isActive=function(){var $=P(this.target);return this.contentRect_=$,$.width!==this.broadcastWidth||$.height!==this.broadcastHeight},Y.prototype.broadcastRect=function(){var $=this.contentRect_;return this.broadcastWidth=$.width,this.broadcastHeight=$.height,$},Y}(),ie=function(){function Y($,te){var q=k(te);U(this,{target:$,contentRect:q})}return Y}(),ae=function(){function Y($,te,q){if(this.activeObservations_=[],this.observations_=new V,typeof $!="function")throw new TypeError("The callback provided as parameter 1 is not a function.");this.callback_=$,this.controller_=te,this.callbackCtx_=q}return Y.prototype.observe=function($){if(!arguments.length)throw new TypeError("1 argument required, but only 0 present.");if(!(typeof Element=="undefined"||!(Element instanceof Object))){if(!($ instanceof _($).Element))throw new TypeError('parameter 1 is not of type "Element".');var te=this.observations_;te.has($)||(te.set($,new de($)),this.controller_.addObserver(this),this.controller_.refresh())}},Y.prototype.unobserve=function($){if(!arguments.length)throw new TypeError("1 argument required, but only 0 present.");if(!(typeof Element=="undefined"||!(Element instanceof Object))){if(!($ instanceof _($).Element))throw new TypeError('parameter 1 is not of type "Element".');var te=this.observations_;te.has($)&&(te.delete($),te.size||this.controller_.removeObserver(this))}},Y.prototype.disconnect=function(){this.clearActive(),this.observations_.clear(),this.controller_.removeObserver(this)},Y.prototype.gatherActive=function(){var $=this;this.clearActive(),this.observations_.forEach(function(te){te.isActive()&&$.activeObservations_.push(te)})},Y.prototype.broadcastActive=function(){if(this.hasActive()){var $=this.callbackCtx_,te=this.activeObservations_.map(function(q){return new ie(q.target,q.broadcastRect())});this.callback_.call($,te,$),this.clearActive()}},Y.prototype.clearActive=function(){this.activeObservations_.splice(0)},Y.prototype.hasActive=function(){return this.activeObservations_.length>0},Y}(),we=typeof WeakMap!="undefined"?new WeakMap:new V,Te=function(){function Y($){if(!(this instanceof Y))throw new TypeError("Cannot call a class as a function.");if(!arguments.length)throw new TypeError("1 argument required, but only 0 present.");var te=S.getInstance(),q=new ae($,te,this);we.set(this,q)}return Y}();["observe","unobserve","disconnect"].forEach(function(Y){Te.prototype[Y]=function(){var $;return($=we.get(this))[Y].apply($,arguments)}});var Re=function(){return typeof Ce.ResizeObserver!="undefined"?Ce.ResizeObserver:Te}();ct.Z=Re},27774:function(Vn,ct){"use strict";Object.defineProperty(ct,"__esModule",{value:!0}),ct.SizeSensorId=ct.SensorTabIndex=ct.SensorClassName=void 0;var x="size-sensor-id";ct.SizeSensorId=x;var V="size-sensor-object";ct.SensorClassName=V;var fe="-1";ct.SensorTabIndex=fe},79301:function(Vn,ct){"use strict";Object.defineProperty(ct,"__esModule",{value:!0}),ct.default=void 0;var x=function(fe){var Ce=arguments.length>1&&arguments[1]!==void 0?arguments[1]:60,ge=null;return function(){for(var G=this,g=arguments.length,ye=new Array(g),le=0;le<g;le++)ye[le]=arguments[le];clearTimeout(ge),ge=setTimeout(function(){fe.apply(G,ye)},Ce)}};ct.default=x},79789:function(Vn,ct){"use strict";Object.defineProperty(ct,"__esModule",{value:!0}),ct.default=void 0;var x=1,V=function(){return"".concat(x++)};ct.default=V},47242:function(Vn,ct,x){"use strict";Object.defineProperty(ct,"__esModule",{value:!0}),ct.ver=ct.clear=ct.bind=void 0;var V=x(16478),fe=function(g,ye){var le=(0,V.getSensor)(g);return le.bind(ye),function(){le.unbind(ye)}};ct.bind=fe;var Ce=function(g){var ye=(0,V.getSensor)(g);(0,V.removeSensor)(ye)};ct.clear=Ce;var ge="1.0.2";ct.ver=ge},16478:function(Vn,ct,x){"use strict";Object.defineProperty(ct,"__esModule",{value:!0}),ct.removeSensor=ct.getSensor=ct.Sensors=void 0;var V=ge(x(79789)),fe=x(57829),Ce=x(27774);function ge(o){return o&&o.__esModule?o:{default:o}}var G={};ct.Sensors=G;function g(o){o&&G[o]&&delete G[o]}var ye=function(S){var U=S.getAttribute(Ce.SizeSensorId);if(U&&G[U])return G[U];var _=(0,V.default)();S.setAttribute(Ce.SizeSensorId,_);var w=(0,fe.createSensor)(S,function(){return g(_)});return G[_]=w,w};ct.getSensor=ye;var le=function(S){var U=S.element.getAttribute(Ce.SizeSensorId);S.destroy(),g(U)};ct.removeSensor=le},57829:function(Vn,ct,x){"use strict";Object.defineProperty(ct,"__esModule",{value:!0}),ct.createSensor=void 0;var V=x(20953),fe=x(55202),Ce=typeof ResizeObserver!="undefined"?fe.createSensor:V.createSensor;ct.createSensor=Ce},20953:function(Vn,ct,x){"use strict";Object.defineProperty(ct,"__esModule",{value:!0}),ct.createSensor=void 0;var V=Ce(x(79301)),fe=x(27774);function Ce(G){return G&&G.__esModule?G:{default:G}}var ge=function(g,ye){var le=void 0,o=[],S=function(){getComputedStyle(g).position==="static"&&(g.style.position="relative");var M=document.createElement("object");return M.onload=function(){M.contentDocument.defaultView.addEventListener("resize",U),U()},M.style.display="block",M.style.position="absolute",M.style.top="0",M.style.left="0",M.style.height="100%",M.style.width="100%",M.style.overflow="hidden",M.style.pointerEvents="none",M.style.zIndex="-1",M.style.opacity="0",M.setAttribute("class",fe.SensorClassName),M.setAttribute("tabindex",fe.SensorTabIndex),M.type="text/html",g.appendChild(M),M.data="about:blank",M},U=(0,V.default)(function(){o.forEach(function(R){R(g)})}),_=function(M){le||(le=S()),o.indexOf(M)===-1&&o.push(M)},w=function(){le&&le.parentNode&&(le.contentDocument&&le.contentDocument.defaultView.removeEventListener("resize",U),le.parentNode.removeChild(le),g.removeAttribute(fe.SizeSensorId),le=void 0,o=[],ye&&ye())},b=function(M){var H=o.indexOf(M);H!==-1&&o.splice(H,1),o.length===0&&le&&w()};return{element:g,bind:_,destroy:w,unbind:b}};ct.createSensor=ge},55202:function(Vn,ct,x){"use strict";Object.defineProperty(ct,"__esModule",{value:!0}),ct.createSensor=void 0;var V=x(27774),fe=Ce(x(79301));function Ce(G){return G&&G.__esModule?G:{default:G}}var ge=function(g,ye){var le=void 0,o=[],S=(0,fe.default)(function(){o.forEach(function(R){R(g)})}),U=function(){var M=new ResizeObserver(S);return M.observe(g),S(),M},_=function(M){le||(le=U()),o.indexOf(M)===-1&&o.push(M)},w=function(){le.disconnect(),o=[],le=void 0,g.removeAttribute(V.SizeSensorId),ye&&ye()},b=function(M){var H=o.indexOf(M);H!==-1&&o.splice(H,1),o.length===0&&le&&w()};return{element:g,bind:_,destroy:w,unbind:b}};ct.createSensor=ge},98040:function(Vn){Vn.exports=function(){var ct=document.getSelection();if(!ct.rangeCount)return function(){};for(var x=document.activeElement,V=[],fe=0;fe<ct.rangeCount;fe++)V.push(ct.getRangeAt(fe));switch(x.tagName.toUpperCase()){case"INPUT":case"TEXTAREA":x.blur();break;default:x=null;break}return ct.removeAllRanges(),function(){ct.type==="Caret"&&ct.removeAllRanges(),ct.rangeCount||V.forEach(function(Ce){ct.addRange(Ce)}),x&&x.focus()}}},93314:function(Vn){"use strict";Vn.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=="},68535:function(Vn,ct,x){"use strict";x.d(ct,{ZP:function(){return Qi}});const V=Number.isFinite||function(a){return typeof a=="number"&&isFinite(a)},fe=Number.isSafeInteger||function(a){return typeof a=="number"&&Math.abs(a)<=Ce},Ce=Number.MAX_SAFE_INTEGER||9007199254740991;let ge=function(a){return a.NETWORK_ERROR="networkError",a.MEDIA_ERROR="mediaError",a.KEY_SYSTEM_ERROR="keySystemError",a.MUX_ERROR="muxError",a.OTHER_ERROR="otherError",a}({}),G=function(a){return a.KEY_SYSTEM_NO_KEYS="keySystemNoKeys",a.KEY_SYSTEM_NO_ACCESS="keySystemNoAccess",a.KEY_SYSTEM_NO_SESSION="keySystemNoSession",a.KEY_SYSTEM_NO_CONFIGURED_LICENSE="keySystemNoConfiguredLicense",a.KEY_SYSTEM_LICENSE_REQUEST_FAILED="keySystemLicenseRequestFailed",a.KEY_SYSTEM_SERVER_CERTIFICATE_REQUEST_FAILED="keySystemServerCertificateRequestFailed",a.KEY_SYSTEM_SERVER_CERTIFICATE_UPDATE_FAILED="keySystemServerCertificateUpdateFailed",a.KEY_SYSTEM_SESSION_UPDATE_FAILED="keySystemSessionUpdateFailed",a.KEY_SYSTEM_STATUS_OUTPUT_RESTRICTED="keySystemStatusOutputRestricted",a.KEY_SYSTEM_STATUS_INTERNAL_ERROR="keySystemStatusInternalError",a.KEY_SYSTEM_DESTROY_MEDIA_KEYS_ERROR="keySystemDestroyMediaKeysError",a.KEY_SYSTEM_DESTROY_CLOSE_SESSION_ERROR="keySystemDestroyCloseSessionError",a.KEY_SYSTEM_DESTROY_REMOVE_SESSION_ERROR="keySystemDestroyRemoveSessionError",a.MANIFEST_LOAD_ERROR="manifestLoadError",a.MANIFEST_LOAD_TIMEOUT="manifestLoadTimeOut",a.MANIFEST_PARSING_ERROR="manifestParsingError",a.MANIFEST_INCOMPATIBLE_CODECS_ERROR="manifestIncompatibleCodecsError",a.LEVEL_EMPTY_ERROR="levelEmptyError",a.LEVEL_LOAD_ERROR="levelLoadError",a.LEVEL_LOAD_TIMEOUT="levelLoadTimeOut",a.LEVEL_PARSING_ERROR="levelParsingError",a.LEVEL_SWITCH_ERROR="levelSwitchError",a.AUDIO_TRACK_LOAD_ERROR="audioTrackLoadError",a.AUDIO_TRACK_LOAD_TIMEOUT="audioTrackLoadTimeOut",a.SUBTITLE_LOAD_ERROR="subtitleTrackLoadError",a.SUBTITLE_TRACK_LOAD_TIMEOUT="subtitleTrackLoadTimeOut",a.FRAG_LOAD_ERROR="fragLoadError",a.FRAG_LOAD_TIMEOUT="fragLoadTimeOut",a.FRAG_DECRYPT_ERROR="fragDecryptError",a.FRAG_PARSING_ERROR="fragParsingError",a.FRAG_GAP="fragGap",a.REMUX_ALLOC_ERROR="remuxAllocError",a.KEY_LOAD_ERROR="keyLoadError",a.KEY_LOAD_TIMEOUT="keyLoadTimeOut",a.BUFFER_ADD_CODEC_ERROR="bufferAddCodecError",a.BUFFER_INCOMPATIBLE_CODECS_ERROR="bufferIncompatibleCodecsError",a.BUFFER_APPEND_ERROR="bufferAppendError",a.BUFFER_APPENDING_ERROR="bufferAppendingError",a.BUFFER_STALLED_ERROR="bufferStalledError",a.BUFFER_FULL_ERROR="bufferFullError",a.BUFFER_SEEK_OVER_HOLE="bufferSeekOverHole",a.BUFFER_NUDGE_ON_STALL="bufferNudgeOnStall",a.ASSET_LIST_LOAD_ERROR="assetListLoadError",a.ASSET_LIST_LOAD_TIMEOUT="assetListLoadTimeout",a.ASSET_LIST_PARSING_ERROR="assetListParsingError",a.INTERSTITIAL_ASSET_ITEM_ERROR="interstitialAssetItemError",a.INTERNAL_EXCEPTION="internalException",a.INTERNAL_ABORTED="aborted",a.ATTACH_MEDIA_ERROR="attachMediaError",a.UNKNOWN="unknown",a}({}),g=function(a){return a.MEDIA_ATTACHING="hlsMediaAttaching",a.MEDIA_ATTACHED="hlsMediaAttached",a.MEDIA_DETACHING="hlsMediaDetaching",a.MEDIA_DETACHED="hlsMediaDetached",a.MEDIA_ENDED="hlsMediaEnded",a.STALL_RESOLVED="hlsStallResolved",a.BUFFER_RESET="hlsBufferReset",a.BUFFER_CODECS="hlsBufferCodecs",a.BUFFER_CREATED="hlsBufferCreated",a.BUFFER_APPENDING="hlsBufferAppending",a.BUFFER_APPENDED="hlsBufferAppended",a.BUFFER_EOS="hlsBufferEos",a.BUFFERED_TO_END="hlsBufferedToEnd",a.BUFFER_FLUSHING="hlsBufferFlushing",a.BUFFER_FLUSHED="hlsBufferFlushed",a.MANIFEST_LOADING="hlsManifestLoading",a.MANIFEST_LOADED="hlsManifestLoaded",a.MANIFEST_PARSED="hlsManifestParsed",a.LEVEL_SWITCHING="hlsLevelSwitching",a.LEVEL_SWITCHED="hlsLevelSwitched",a.LEVEL_LOADING="hlsLevelLoading",a.LEVEL_LOADED="hlsLevelLoaded",a.LEVEL_UPDATED="hlsLevelUpdated",a.LEVEL_PTS_UPDATED="hlsLevelPtsUpdated",a.LEVELS_UPDATED="hlsLevelsUpdated",a.AUDIO_TRACKS_UPDATED="hlsAudioTracksUpdated",a.AUDIO_TRACK_SWITCHING="hlsAudioTrackSwitching",a.AUDIO_TRACK_SWITCHED="hlsAudioTrackSwitched",a.AUDIO_TRACK_LOADING="hlsAudioTrackLoading",a.AUDIO_TRACK_LOADED="hlsAudioTrackLoaded",a.AUDIO_TRACK_UPDATED="hlsAudioTrackUpdated",a.SUBTITLE_TRACKS_UPDATED="hlsSubtitleTracksUpdated",a.SUBTITLE_TRACKS_CLEARED="hlsSubtitleTracksCleared",a.SUBTITLE_TRACK_SWITCH="hlsSubtitleTrackSwitch",a.SUBTITLE_TRACK_LOADING="hlsSubtitleTrackLoading",a.SUBTITLE_TRACK_LOADED="hlsSubtitleTrackLoaded",a.SUBTITLE_TRACK_UPDATED="hlsSubtitleTrackUpdated",a.SUBTITLE_FRAG_PROCESSED="hlsSubtitleFragProcessed",a.CUES_PARSED="hlsCuesParsed",a.NON_NATIVE_TEXT_TRACKS_FOUND="hlsNonNativeTextTracksFound",a.INIT_PTS_FOUND="hlsInitPtsFound",a.FRAG_LOADING="hlsFragLoading",a.FRAG_LOAD_EMERGENCY_ABORTED="hlsFragLoadEmergencyAborted",a.FRAG_LOADED="hlsFragLoaded",a.FRAG_DECRYPTED="hlsFragDecrypted",a.FRAG_PARSING_INIT_SEGMENT="hlsFragParsingInitSegment",a.FRAG_PARSING_USERDATA="hlsFragParsingUserdata",a.FRAG_PARSING_METADATA="hlsFragParsingMetadata",a.FRAG_PARSED="hlsFragParsed",a.FRAG_BUFFERED="hlsFragBuffered",a.FRAG_CHANGED="hlsFragChanged",a.FPS_DROP="hlsFpsDrop",a.FPS_DROP_LEVEL_CAPPING="hlsFpsDropLevelCapping",a.MAX_AUTO_LEVEL_UPDATED="hlsMaxAutoLevelUpdated",a.ERROR="hlsError",a.DESTROYING="hlsDestroying",a.KEY_LOADING="hlsKeyLoading",a.KEY_LOADED="hlsKeyLoaded",a.LIVE_BACK_BUFFER_REACHED="hlsLiveBackBufferReached",a.BACK_BUFFER_REACHED="hlsBackBufferReached",a.STEERING_MANIFEST_LOADED="hlsSteeringManifestLoaded",a.ASSET_LIST_LOADING="hlsAssetListLoading",a.ASSET_LIST_LOADED="hlsAssetListLoaded",a.INTERSTITIALS_UPDATED="hlsInterstitialsUpdated",a.INTERSTITIALS_BUFFERED_TO_BOUNDARY="hlsInterstitialsBufferedToBoundary",a.INTERSTITIAL_ASSET_PLAYER_CREATED="hlsInterstitialAssetPlayerCreated",a.INTERSTITIAL_STARTED="hlsInterstitialStarted",a.INTERSTITIAL_ASSET_STARTED="hlsInterstitialAssetStarted",a.INTERSTITIAL_ASSET_ENDED="hlsInterstitialAssetEnded",a.INTERSTITIAL_ASSET_ERROR="hlsInterstitialAssetError",a.INTERSTITIAL_ENDED="hlsInterstitialEnded",a.INTERSTITIALS_PRIMARY_RESUMED="hlsInterstitialsPrimaryResumed",a.PLAYOUT_LIMIT_REACHED="hlsPlayoutLimitReached",a.EVENT_CUE_ENTER="hlsEventCueEnter",a}({});var ye={MANIFEST:"manifest",LEVEL:"level",AUDIO_TRACK:"audioTrack",SUBTITLE_TRACK:"subtitleTrack"},le={MAIN:"main",AUDIO:"audio",SUBTITLE:"subtitle"};class o{constructor(e,t=0,n=0){this.halfLife=void 0,this.alpha_=void 0,this.estimate_=void 0,this.totalWeight_=void 0,this.halfLife=e,this.alpha_=e?Math.exp(Math.log(.5)/e):0,this.estimate_=t,this.totalWeight_=n}sample(e,t){const n=Math.pow(this.alpha_,e);this.estimate_=t*(1-n)+n*this.estimate_,this.totalWeight_+=e}getTotalWeight(){return this.totalWeight_}getEstimate(){if(this.alpha_){const e=1-Math.pow(this.alpha_,this.totalWeight_);if(e)return this.estimate_/e}return this.estimate_}}class S{constructor(e,t,n,r=100){this.defaultEstimate_=void 0,this.minWeight_=void 0,this.minDelayMs_=void 0,this.slow_=void 0,this.fast_=void 0,this.defaultTTFB_=void 0,this.ttfb_=void 0,this.defaultEstimate_=n,this.minWeight_=.001,this.minDelayMs_=50,this.slow_=new o(e),this.fast_=new o(t),this.defaultTTFB_=r,this.ttfb_=new o(e)}update(e,t){const{slow_:n,fast_:r,ttfb_:i}=this;n.halfLife!==e&&(this.slow_=new o(e,n.getEstimate(),n.getTotalWeight())),r.halfLife!==t&&(this.fast_=new o(t,r.getEstimate(),r.getTotalWeight())),i.halfLife!==e&&(this.ttfb_=new o(e,i.getEstimate(),i.getTotalWeight()))}sample(e,t){e=Math.max(e,this.minDelayMs_);const n=8*t,r=e/1e3,i=n/r;this.fast_.sample(r,i),this.slow_.sample(r,i)}sampleTTFB(e){const t=e/1e3,n=Math.sqrt(2)*Math.exp(-Math.pow(t,2)/2);this.ttfb_.sample(n,Math.max(e,5))}canEstimate(){return this.fast_.getTotalWeight()>=this.minWeight_}getEstimate(){return this.canEstimate()?Math.min(this.fast_.getEstimate(),this.slow_.getEstimate()):this.defaultEstimate_}getEstimateTTFB(){return this.ttfb_.getTotalWeight()>=this.minWeight_?this.ttfb_.getEstimate():this.defaultTTFB_}get defaultEstimate(){return this.defaultEstimate_}destroy(){}}function U(a,e,t){return(e=M(e))in a?Object.defineProperty(a,e,{value:t,enumerable:!0,configurable:!0,writable:!0}):a[e]=t,a}function _(){return _=Object.assign?Object.assign.bind():function(a){for(var e=1;e<arguments.length;e++){var t=arguments[e];for(var n in t)({}).hasOwnProperty.call(t,n)&&(a[n]=t[n])}return a},_.apply(null,arguments)}function w(a,e){var t=Object.keys(a);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(a);e&&(n=n.filter(function(r){return Object.getOwnPropertyDescriptor(a,r).enumerable})),t.push.apply(t,n)}return t}function b(a){for(var e=1;e<arguments.length;e++){var t=arguments[e]!=null?arguments[e]:{};e%2?w(Object(t),!0).forEach(function(n){U(a,n,t[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(a,Object.getOwnPropertyDescriptors(t)):w(Object(t)).forEach(function(n){Object.defineProperty(a,n,Object.getOwnPropertyDescriptor(t,n))})}return a}function R(a,e){if(typeof a!="object"||!a)return a;var t=a[Symbol.toPrimitive];if(t!==void 0){var n=t.call(a,e);if(typeof n!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(a)}function M(a){var e=R(a,"string");return typeof e=="symbol"?e:e+""}class H{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=J,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 J=function(){},T={trace:J,debug:J,log:J,warn:J,info:J,error:J};function N(){return _({},T)}function P(a,e){const t=self.console[a];return t?t.bind(self.console,`${e?"["+e+"] ":""}[${a}] >`):J}function k(a,e,t){return e[a]?e[a].bind(e):P(a,t)}const oe=N();function de(a,e,t){const n=N();if(typeof console=="object"&&a===!0||typeof a=="object"){const r=["debug","log","info","warn","error"];r.forEach(i=>{n[i]=k(i,a,t)});try{n.log(`Debug logs enabled for "${e}" in hls.js version 1.6.11`)}catch(i){return N()}r.forEach(i=>{oe[i]=k(i,a)})}else _(oe,n);return n}const ie=oe;function ae(a=!0){return typeof self=="undefined"?void 0:(a||!self.MediaSource)&&self.ManagedMediaSource||self.MediaSource||self.WebKitMediaSource}function we(a){return typeof self!="undefined"&&a===self.ManagedMediaSource}function Te(a,e){const t=Object.keys(a),n=Object.keys(e),r=t.length,i=n.length;return!r||!i||r===i&&!t.some(s=>n.indexOf(s)===-1)}function Re(a,e=!1){if(typeof TextDecoder!="undefined"){const c=new TextDecoder("utf-8").decode(a);if(e){const m=c.indexOf("\0");return m!==-1?c.substring(0,m):c}return c.replace(/\0/g,"")}const t=a.length;let n,r,i,s="",A=0;for(;A<t;){if(n=a[A++],n===0&&e)return s;if(n===0||n===3)continue;switch(n>>4){case 0:case 1:case 2:case 3:case 4:case 5:case 6:case 7:s+=String.fromCharCode(n);break;case 12:case 13:r=a[A++],s+=String.fromCharCode((n&31)<<6|r&63);break;case 14:r=a[A++],i=a[A++],s+=String.fromCharCode((n&15)<<12|(r&63)<<6|(i&63)<<0);break}}return s}function Y(a){let e="";for(let t=0;t<a.length;t++){let n=a[t].toString(16);n.length<2&&(n="0"+n),e+=n}return e}function $(a){return Uint8Array.from(a.replace(/^0x/,"").replace(/([\da-fA-F]{2}) ?/g,"0x$1 ").replace(/ +$/,"").split(" ")).buffer}function te(a){return a&&a.__esModule&&Object.prototype.hasOwnProperty.call(a,"default")?a.default:a}var q={exports:{}},he;function re(){return he||(he=1,function(a,e){(function(t){var n=/^(?=((?:[a-zA-Z0-9+\-.]+:)?))\1(?=((?:\/\/[^\/?#]*)?))\2(?=((?:(?:[^?#\/]*\/)*[^;?#\/]*)?))\3((?:;[^?#]*)?)(\?[^#]*)?(#[^]*)?$/,r=/^(?=([^\/?#]*))\1([^]*)$/,i=/(?:\/|^)\.(?=\/)/g,s=/(?:\/|^)\.\.\/(?!\.\.\/)[^\/]*(?=\/)/g,A={buildAbsoluteURL:function(f,c,m){if(m=m||{},f=f.trim(),c=c.trim(),!c){if(!m.alwaysNormalize)return f;var y=A.parseURL(f);if(!y)throw new Error("Error trying to parse base URL.");return y.path=A.normalizePath(y.path),A.buildURLFromParts(y)}var B=A.parseURL(c);if(!B)throw new Error("Error trying to parse relative URL.");if(B.scheme)return m.alwaysNormalize?(B.path=A.normalizePath(B.path),A.buildURLFromParts(B)):c;var D=A.parseURL(f);if(!D)throw new Error("Error trying to parse base URL.");if(!D.netLoc&&D.path&&D.path[0]!=="/"){var L=r.exec(D.path);D.netLoc=L[1],D.path=L[2]}D.netLoc&&!D.path&&(D.path="/");var se={scheme:D.scheme,netLoc:B.netLoc,path:null,params:B.params,query:B.query,fragment:B.fragment};if(!B.netLoc&&(se.netLoc=D.netLoc,B.path[0]!=="/"))if(!B.path)se.path=D.path,B.params||(se.params=D.params,B.query||(se.query=D.query));else{var X=D.path,xe=X.substring(0,X.lastIndexOf("/")+1)+B.path;se.path=A.normalizePath(xe)}return se.path===null&&(se.path=m.alwaysNormalize?A.normalizePath(B.path):B.path),A.buildURLFromParts(se)},parseURL:function(f){var c=n.exec(f);return c?{scheme:c[1]||"",netLoc:c[2]||"",path:c[3]||"",params:c[4]||"",query:c[5]||"",fragment:c[6]||""}:null},normalizePath:function(f){for(f=f.split("").reverse().join("").replace(i,"");f.length!==(f=f.replace(s,"")).length;);return f.split("").reverse().join("")},buildURLFromParts:function(f){return f.scheme+f.netLoc+f.path+f.params+f.query+f.fragment}};a.exports=A})()}(q)),q.exports}var E=re();class C{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 W={AUDIO:"audio",VIDEO:"video",AUDIOVIDEO:"audiovideo"};class be{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,Vt(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={[W.AUDIO]:null,[W.VIDEO]:null,[W.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 C),this._stats}set stats(e){this._stats=e}get url(){return!this._url&&this.baseurl&&this.relurl&&(this._url=E.buildAbsoluteURL(this.baseurl,this.relurl,{alwaysNormalize:!0})),this._url||""}set url(e){this._url=e}clearElementaryStreamInfo(){const{elementaryStreams:e}=this;e[W.AUDIO]=null,e[W.VIDEO]=null,e[W.AUDIOVIDEO]=null}}function Ve(a){return a.sn!=="initSegment"}class Ke extends be{constructor(e,t){super(t),this._decryptdata=null,this._programDateTime=null,this._ref=null,this._bitrate=void 0,this.rawProgramDateTime=null,this.tagList=[],this.duration=0,this.sn=0,this.levelkeys=void 0,this.type=void 0,this.loader=null,this.keyLoader=null,this.level=-1,this.cc=0,this.startPTS=void 0,this.endPTS=void 0,this.startDTS=void 0,this.endDTS=void 0,this.start=0,this.playlistOffset=0,this.deltaPTS=void 0,this.maxStartPTS=void 0,this.minEndPTS=void 0,this.data=void 0,this.bitrateTest=!1,this.title=null,this.initSegment=null,this.endList=void 0,this.gap=void 0,this.urlId=0,this.type=e}get byteLength(){if(this.hasStats){const e=this.stats.total;if(e)return e}if(this.byteRange.length){const e=this.byteRange[0],t=this.byteRange[1];if(V(e)&&V(t))return t-e}return null}get bitrate(){return this.byteLength?this.byteLength*8/this.duration:this._bitrate?this._bitrate:null}set bitrate(e){this._bitrate=e}get decryptdata(){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){const r=this._decryptdata=this.levelkeys[n[0]]||null;if(r)return r.getDecryptData(this.sn)}}}return this._decryptdata}get end(){return this.start+this.duration}get endProgramDateTime(){if(this.programDateTime===null)return null;const e=V(this.duration)?this.duration:0;return this.programDateTime+e*1e3}get encrypted(){var e;if((e=this._decryptdata)!=null&&e.encrypted)return!0;if(this.levelkeys){var t;const n=Object.keys(this.levelkeys),r=n.length;if(r>1||r===1&&(t=this.levelkeys[n[0]])!=null&&t.encrypted)return!0}return!1}get programDateTime(){return this._programDateTime===null&&this.rawProgramDateTime&&(this.programDateTime=Date.parse(this.rawProgramDateTime)),this._programDateTime}set programDateTime(e){if(!V(e)){this._programDateTime=this.rawProgramDateTime=null;return}this._programDateTime=e}get ref(){return Ve(this)?(this._ref||(this._ref={base:this.base,start:this.start,duration:this.duration,sn:this.sn,programDateTime:this.programDateTime}),this._ref):null}addStart(e){this.setStart(this.start+e)}setStart(e){this.start=e,this._ref&&(this._ref.start=e)}setDuration(e){this.duration=e,this._ref&&(this._ref.duration=e)}setKeyFormat(e){if(this.levelkeys){const t=this.levelkeys[e];t&&!this._decryptdata&&(this._decryptdata=t.getDecryptData(this.sn))}}abortRequests(){var e,t;(e=this.loader)==null||e.abort(),(t=this.keyLoader)==null||t.abort()}setElementaryStreamInfo(e,t,n,r,i,s=!1){const{elementaryStreams:A}=this,f=A[e];if(!f){A[e]={startPTS:t,endPTS:n,startDTS:r,endDTS:i,partial:s};return}f.startPTS=Math.min(f.startPTS,t),f.endPTS=Math.max(f.endPTS,n),f.startDTS=Math.min(f.startDTS,r),f.endDTS=Math.max(f.endDTS,i)}}class Ct extends be{constructor(e,t,n,r,i){super(n),this.fragOffset=0,this.duration=0,this.gap=!1,this.independent=!1,this.relurl=void 0,this.fragment=void 0,this.index=void 0,this.duration=e.decimalFloatingPoint("DURATION"),this.gap=e.bool("GAP"),this.independent=e.bool("INDEPENDENT"),this.relurl=e.enumeratedString("URI"),this.fragment=t,this.index=r;const s=e.enumeratedString("BYTERANGE");s&&this.setByteRange(s,i),i&&(this.fragOffset=i.fragOffset+i.duration)}get start(){return this.fragment.start+this.fragOffset}get end(){return this.start+this.duration}get loaded(){const{elementaryStreams:e}=this;return!!(e.audio||e.video||e.audiovideo)}}function Rt(a,e){const t=Object.getPrototypeOf(a);if(t){const n=Object.getOwnPropertyDescriptor(t,e);return n||Rt(t,e)}}function Vt(a,e){const t=Rt(a,e);t&&(t.enumerable=!0,Object.defineProperty(a,e,t))}const rn=Math.pow(2,32)-1,He=[].push,ln={video:1,audio:2,id3:3,text:4};function It(a){return String.fromCharCode.apply(null,a)}function cn(a,e){const t=a[e]<<8|a[e+1];return t<0?65536+t:t}function xt(a,e){const t=Oe(a,e);return t<0?4294967296+t:t}function ht(a,e){let t=xt(a,e);return t*=Math.pow(2,32),t+=xt(a,e+4),t}function Oe(a,e){return a[e]<<24|a[e+1]<<16|a[e+2]<<8|a[e+3]}function Fe(a){const e=a.byteLength;for(let t=0;t<e;){const n=xt(a,t);if(n>8&&a[t+4]===109&&a[t+5]===111&&a[t+6]===111&&a[t+7]===102)return!0;t=n>1?t+n:e}return!1}function j(a,e){const t=[];if(!e.length)return t;const n=a.byteLength;for(let r=0;r<n;){const i=xt(a,r),s=It(a.subarray(r+4,r+8)),A=i>1?r+i:n;if(s===e[0])if(e.length===1)t.push(a.subarray(r+8,A));else{const f=j(a.subarray(r+8,A),e.slice(1));f.length&&He.apply(t,f)}r=A}return t}function Ne(a){const e=[],t=a[0];let n=8;const r=xt(a,n);n+=4;let i=0,s=0;t===0?(i=xt(a,n),s=xt(a,n+4),n+=8):(i=ht(a,n),s=ht(a,n+8),n+=16),n+=2;let A=a.length+s;const f=cn(a,n);n+=2;for(let c=0;c<f;c++){let m=n;const y=xt(a,m);m+=4;const B=y&2147483647;if((y&2147483648)>>>31===1)return ie.warn("SIDX has hierarchical references (not supported)"),null;const L=xt(a,m);m+=4,e.push({referenceSize:B,subsegmentDuration:L,info:{duration:L/r,start:A,end:A+B-1}}),A+=B,m+=4,n=m}return{earliestPresentationTime:i,timescale:r,version:t,referencesCount:f,references:e}}function Ze(a){const e=[],t=j(a,["moov","trak"]);for(let r=0;r<t.length;r++){const i=t[r],s=j(i,["tkhd"])[0];if(s){let A=s[0];const f=xt(s,A===0?12:20),c=j(i,["mdia","mdhd"])[0];if(c){A=c[0];const m=xt(c,A===0?12:20),y=j(i,["mdia","hdlr"])[0];if(y){const B=It(y.subarray(8,12)),D={soun:W.AUDIO,vide:W.VIDEO}[B],L=j(i,["mdia","minf","stbl","stsd"])[0],se=ee(L);D?(e[f]={timescale:m,type:D,stsd:se},e[D]=b({timescale:m,id:f},se)):e[f]={timescale:m,type:B,stsd:se}}}}}return j(a,["moov","mvex","trex"]).forEach(r=>{const i=xt(r,4),s=e[i];s&&(s.default={duration:xt(r,12),flags:xt(r,20)})}),e}function ee(a){const e=a.subarray(8),t=e.subarray(86),n=It(e.subarray(4,8));let r=n,i;const s=n==="enca"||n==="encv";if(s){const c=j(e,[n])[0].subarray(n==="enca"?28:78);j(c,["sinf"]).forEach(y=>{const B=j(y,["schm"])[0];if(B){const D=It(B.subarray(4,8));if(D==="cbcs"||D==="cenc"){const L=j(y,["frma"])[0];L&&(r=It(L))}}})}const A=r;switch(r){case"avc1":case"avc2":case"avc3":case"avc4":{const f=j(t,["avcC"])[0];f&&f.length>3&&(r+="."+Ae(f[1])+Ae(f[2])+Ae(f[3]),i=O(A==="avc1"?"dva1":"dvav",t));break}case"mp4a":{const f=j(e,[n])[0],c=j(f.subarray(28),["esds"])[0];if(c&&c.length>7){let m=4;if(c[m++]!==3)break;m=De(c,m),m+=2;const y=c[m++];if(y&128&&(m+=2),y&64&&(m+=c[m++]),c[m++]!==4)break;m=De(c,m);const B=c[m++];if(B===64)r+="."+Ae(B);else break;if(m+=12,c[m++]!==5)break;m=De(c,m);const D=c[m++];let L=(D&248)>>3;L===31&&(L+=1+((D&7)<<3)+((c[m]&224)>>5)),r+="."+L}break}case"hvc1":case"hev1":{const f=j(t,["hvcC"])[0];if(f&&f.length>12){const c=f[1],m=["","A","B","C"][c>>6],y=c&31,B=xt(f,2),D=(c&32)>>5?"H":"L",L=f[12],se=f.subarray(6,12);r+="."+m+y,r+="."+ue(B).toString(16).toUpperCase(),r+="."+D+L;let X="";for(let xe=se.length;xe--;){const at=se[xe];(at||X)&&(X="."+at.toString(16).toUpperCase()+X)}r+=X}i=O(A=="hev1"?"dvhe":"dvh1",t);break}case"dvh1":case"dvhe":case"dvav":case"dva1":case"dav1":{r=O(r,t)||r;break}case"vp09":{const f=j(t,["vpcC"])[0];if(f&&f.length>6){const c=f[4],m=f[5],y=f[6]>>4&15;r+="."+Be(c)+"."+Be(m)+"."+Be(y)}break}case"av01":{const f=j(t,["av1C"])[0];if(f&&f.length>2){const c=f[1]>>>5,m=f[1]&31,y=f[2]>>>7?"H":"M",B=(f[2]&64)>>6,D=(f[2]&32)>>5,L=c===2&&B?D?12:10:B?10:8,se=(f[2]&16)>>4,X=(f[2]&8)>>3,xe=(f[2]&4)>>2,at=f[2]&3;r+="."+c+"."+Be(m)+y+"."+Be(L)+"."+se+"."+X+xe+at+"."+Be(1)+"."+Be(1)+"."+Be(1)+"."+0,i=O("dav1",t)}break}}return{codec:r,encrypted:s,supplemental:i}}function O(a,e){const t=j(e,["dvvC"]),n=t.length?t[0]:j(e,["dvcC"])[0];if(n){const r=n[2]>>1&127,i=n[2]<<5&32|n[3]>>3&31;return a+"."+Be(r)+"."+Be(i)}}function ue(a){let e=0;for(let t=0;t<32;t++)e|=(a>>t&1)<<31-t;return e>>>0}function De(a,e){const t=e+5;for(;a[e++]&128&&e<t;);return e}function Ae(a){return("0"+a.toString(16).toUpperCase()).slice(-2)}function Be(a){return(a<10?"0":"")+a}function Se(a,e){if(!a||!e)return;const t=e.keyId;t&&e.isCommonEncryption&&j(a,["moov","trak"]).forEach(r=>{const s=j(r,["mdia","minf","stbl","stsd"])[0].subarray(8);let A=j(s,["enca"]);const f=A.length>0;f||(A=j(s,["encv"])),A.forEach(c=>{const m=f?c.subarray(28):c.subarray(78);j(m,["sinf"]).forEach(B=>{const D=ot(B);if(D){const L=D.subarray(8,24);L.some(se=>se!==0)||(ie.log(`[eme] Patching keyId in 'enc${f?"a":"v"}>sinf>>tenc' box: ${Y(L)} -> ${Y(t)}`),D.set(t,8))}})})})}function ot(a){const e=j(a,["schm"])[0];if(e){const t=It(e.subarray(4,8));if(t==="cbcs"||t==="cenc")return j(a,["schi","tenc"])[0]}return null}function Xe(a,e,t){const n={},r=j(a,["moof","traf"]);for(let i=0;i<r.length;i++){const s=r[i],A=j(s,["tfhd"])[0],f=xt(A,4),c=e[f];if(!c)continue;n[f]||(n[f]={start:NaN,duration:0,sampleCount:0,timescale:c.timescale,type:c.type});const m=n[f],y=j(s,["tfdt"])[0];if(y){const We=y[0];let Mt=xt(y,4);We===1&&(Mt===rn?t.warn("[mp4-demuxer]: Ignoring assumed invalid signed 64-bit track fragment decode time"):(Mt*=rn+1,Mt+=xt(y,8))),V(Mt)&&(!V(m.start)||Mt<m.start)&&(m.start=Mt)}const B=c.default,D=xt(A,0)|(B==null?void 0:B.flags);let L=(B==null?void 0:B.duration)||0;D&8&&(D&2?L=xt(A,12):L=xt(A,8));const se=j(s,["trun"]);let X=m.start||0,xe=0,at=L;for(let We=0;We<se.length;We++){const Mt=se[We],qt=xt(Mt,4),Dn=m.sampleCount;m.sampleCount+=qt;const zt=Mt[3]&1,un=Mt[3]&4,gn=Mt[2]&1,Yt=Mt[2]&2,Nn=Mt[2]&4,Cr=Mt[2]&8;let jr=8,ni=qt;for(zt&&(jr+=4),un&&qt&&(!(Mt[jr+1]&1)&&m.keyFrameIndex===void 0&&(m.keyFrameIndex=Dn),jr+=4,gn?(at=xt(Mt,jr),jr+=4):at=L,Yt&&(jr+=4),Cr&&(jr+=4),X+=at,xe+=at,ni--);ni--;)gn?(at=xt(Mt,jr),jr+=4):at=L,Yt&&(jr+=4),Nn&&(Mt[jr+1]&1||m.keyFrameIndex===void 0&&(m.keyFrameIndex=m.sampleCount-(ni+1),m.keyFrameStart=X),jr+=4),Cr&&(jr+=4),X+=at,xe+=at;!xe&&L&&(xe+=L*qt)}m.duration+=xe}if(!Object.keys(n).some(i=>n[i].duration)){let i=1/0,s=0;const A=j(a,["sidx"]);for(let f=0;f<A.length;f++){const c=Ne(A[f]);if(c!=null&&c.references){i=Math.min(i,c.earliestPresentationTime/c.timescale);const m=c.references.reduce((y,B)=>y+B.info.duration||0,0);s=Math.max(s,m+c.earliestPresentationTime/c.timescale)}}s&&V(s)&&Object.keys(n).forEach(f=>{n[f].duration||(n[f].duration=s*n[f].timescale-n[f].start)})}return n}function je(a){const e={valid:null,remainder:null},t=j(a,["moof"]);if(t.length<2)return e.remainder=a,e;const n=t[t.length-1];return e.valid=a.slice(0,n.byteOffset-8),e.remainder=a.slice(n.byteOffset-8),e}function qe(a,e){const t=new Uint8Array(a.length+e.length);return t.set(a),t.set(e,a.length),t}function kt(a,e){const t=[],n=e.samples,r=e.timescale,i=e.id;let s=!1;return j(n,["moof"]).map(f=>{const c=f.byteOffset-8;j(f,["traf"]).map(y=>{const B=j(y,["tfdt"]).map(D=>{const L=D[0];let se=xt(D,4);return L===1&&(se*=Math.pow(2,32),se+=xt(D,8)),se/r})[0];return B!==void 0&&(a=B),j(y,["tfhd"]).map(D=>{const L=xt(D,4),se=xt(D,0)&16777215,X=(se&1)!==0,xe=(se&2)!==0,at=(se&8)!==0;let We=0;const Mt=(se&16)!==0;let qt=0;const Dn=(se&32)!==0;let zt=8;L===i&&(X&&(zt+=8),xe&&(zt+=4),at&&(We=xt(D,zt),zt+=4),Mt&&(qt=xt(D,zt),zt+=4),Dn&&(zt+=4),e.type==="video"&&(s=gt(e.codec)),j(y,["trun"]).map(un=>{const gn=un[0],Yt=xt(un,0)&16777215,Nn=(Yt&1)!==0;let Cr=0;const jr=(Yt&4)!==0,ni=(Yt&256)!==0;let Yr=0;const wr=(Yt&512)!==0;let qr=0;const Nr=(Yt&1024)!==0,ei=(Yt&2048)!==0;let _i=0;const Br=xt(un,4);let br=8;Nn&&(Cr=xt(un,br),br+=4),jr&&(br+=4);let Li=Cr+c;for(let us=0;us<Br;us++){if(ni?(Yr=xt(un,br),br+=4):Yr=We,wr?(qr=xt(un,br),br+=4):qr=qt,Nr&&(br+=4),ei&&(gn===0?_i=xt(un,br):_i=Oe(un,br),br+=4),e.type===W.VIDEO){let Oi=0;for(;Oi<qr;){const Vi=xt(n,Li);if(Li+=4,_t(s,n[Li])){const oa=n.subarray(Li,Li+Vi);Pe(oa,s?2:1,a+_i/r,t)}Li+=Vi,Oi+=Vi+4}}a+=Yr/r}}))})})}),t}function gt(a){if(!a)return!1;const e=a.substring(0,4);return e==="hvc1"||e==="hev1"||e==="dvh1"||e==="dvhe"}function _t(a,e){if(a){const t=e>>1&63;return t===39||t===40}else return(e&31)===6}function Pe(a,e,t,n){const r=Wt(a);let i=0;i+=e;let s=0,A=0,f=0;for(;i<r.length;){s=0;do{if(i>=r.length)break;f=r[i++],s+=f}while(f===255);A=0;do{if(i>=r.length)break;f=r[i++],A+=f}while(f===255);const c=r.length-i;let m=i;if(A<c)i+=A;else if(A>c){ie.error(`Malformed SEI payload. ${A} is too small, only ${c} bytes left to parse.`);break}if(s===4){if(r[m++]===181){const B=cn(r,m);if(m+=2,B===49){const D=xt(r,m);if(m+=4,D===1195456820){const L=r[m++];if(L===3){const se=r[m++],X=31&se,xe=64&se,at=xe?2+X*3:0,We=new Uint8Array(at);if(xe){We[0]=se;for(let Mt=1;Mt<at;Mt++)We[Mt]=r[m++]}n.push({type:L,payloadType:s,pts:t,bytes:We})}}}}}else if(s===5&&A>16){const y=[];for(let L=0;L<16;L++){const se=r[m++].toString(16);y.push(se.length==1?"0"+se:se),(L===3||L===5||L===7||L===9)&&y.push("-")}const B=A-16,D=new Uint8Array(B);for(let L=0;L<B;L++)D[L]=r[m++];n.push({payloadType:s,pts:t,uuid:y.join(""),userData:Re(D),userDataBytes:D})}}}function Wt(a){const e=a.byteLength,t=[];let n=1;for(;n<e-2;)a[n]===0&&a[n+1]===0&&a[n+2]===3?(t.push(n+2),n+=2):n++;if(t.length===0)return a;const r=e-t.length,i=new Uint8Array(r);let s=0;for(n=0;n<r;s++,n++)s===t[0]&&(s++,t.shift()),i[n]=a[s];return i}function St(a){const e=a[0];let t="",n="",r=0,i=0,s=0,A=0,f=0,c=0;if(e===0){for(;It(a.subarray(c,c+1))!=="\0";)t+=It(a.subarray(c,c+1)),c+=1;for(t+=It(a.subarray(c,c+1)),c+=1;It(a.subarray(c,c+1))!=="\0";)n+=It(a.subarray(c,c+1)),c+=1;n+=It(a.subarray(c,c+1)),c+=1,r=xt(a,12),i=xt(a,16),A=xt(a,20),f=xt(a,24),c=28}else if(e===1){c+=4,r=xt(a,c),c+=4;const y=xt(a,c);c+=4;const B=xt(a,c);for(c+=4,s=Oc(2,32)*y+B,fe(s)||(s=Number.MAX_SAFE_INTEGER,ie.warn("Presentation time exceeds safe integer limit and wrapped to max safe integer in parsing emsg box")),A=xt(a,c),c+=4,f=xt(a,c),c+=4;It(a.subarray(c,c+1))!=="\0";)t+=It(a.subarray(c,c+1)),c+=1;for(t+=It(a.subarray(c,c+1)),c+=1;It(a.subarray(c,c+1))!=="\0";)n+=It(a.subarray(c,c+1)),c+=1;n+=It(a.subarray(c,c+1)),c+=1}const m=a.subarray(c,a.byteLength);return{schemeIdUri:t,value:n,timeScale:r,presentationTime:s,presentationTimeDelta:i,eventDuration:A,id:f,payload:m}}function vt(a,...e){const t=e.length;let n=8,r=t;for(;r--;)n+=e[r].byteLength;const i=new Uint8Array(n);for(i[0]=n>>24&255,i[1]=n>>16&255,i[2]=n>>8&255,i[3]=n&255,i.set(a,4),r=0,n=8;r<t;r++)i.set(e[r],n),n+=e[r].byteLength;return i}function dn(a,e,t){if(a.byteLength!==16)throw new RangeError("Invalid system id");let n,r;n=0,r=new Uint8Array;let i;n>0?(i=new Uint8Array(4),e.length>0&&new DataView(i.buffer).setUint32(0,e.length,!1)):i=new Uint8Array;const s=new Uint8Array(4);return t.byteLength>0&&new DataView(s.buffer).setUint32(0,t.byteLength,!1),vt([112,115,115,104],new Uint8Array([n,0,0,0]),a,i,r,s,t)}const hn=()=>/\(Windows.+Firefox\//i.test(navigator.userAgent),Ot={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 Ln(a,e){const t=Ot[e];return!!t&&!!t[a.slice(0,4)]}function qn(a,e,t=!0){return!a.split(",").some(n=>!sn(n,e,t))}function sn(a,e,t=!0){var n;const r=ae(t);return(n=r==null?void 0:r.isTypeSupported(Mn(a,e)))!=null?n:!1}function Mn(a,e){return`${e}/mp4;codecs=${a}`}function ut(a){if(a){const e=a.substring(0,4);return Ot.video[e]}return 2}function nt(a){const e=hn();return a.split(",").reduce((t,n)=>{const i=e&>(n)?9:Ot.video[n];return i?(i*2+t)/(t?3:2):(Ot.audio[n]+t)/(t?2:1)},0)}const ze={};function ne(a,e=!0){if(ze[a])return ze[a];const t={flac:["flac","fLaC","FLAC"],opus:["opus","Opus"],"mp4a.40.34":["mp3"]}[a];for(let r=0;r<t.length;r++){var n;if(sn(t[r],"audio",e))return ze[a]=t[r],t[r];if(t[r]==="mp3"&&(n=ae(e))!=null&&n.isTypeSupported("audio/mpeg"))return""}return a}const me=/flac|opus|mp4a\.40\.34/i;function Ie(a,e=!0){return a.replace(me,t=>ne(t.toLowerCase(),e))}function Ue(a,e){const t=[];if(a){const n=a.split(",");for(let r=0;r<n.length;r++)Ln(n[r],"video")||t.push(n[r])}return e&&t.push(e),t.join(",")}function ke(a,e){if(a&&(a.length>4||["ac-3","ec-3","alac","fLaC","Opus"].indexOf(a)!==-1)&&(Gt(a,"audio")||Gt(a,"video")))return a;if(e){const t=e.split(",");if(t.length>1){if(a){for(let n=t.length;n--;)if(t[n].substring(0,4)===a.substring(0,4))return t[n]}return t[0]}}return e||a}function Gt(a,e){return Ln(a,e)&&sn(a,e)}function _n(a){const e=a.split(",");for(let t=0;t<e.length;t++){const n=e[t].split(".");n.length>2&&n[0]==="avc1"&&(e[t]=`avc1.${parseInt(n[1]).toString(16)}${("000"+parseInt(n[2]).toString(16)).slice(-4)}`)}return e.join(",")}function wn(a){if(a.startsWith("av01.")){const e=a.split("."),t=["0","111","01","01","01","0"];for(let n=e.length;n>4&&n<10;n++)e[n]=t[n-4];return e.join(".")}return a}function $n(a){const e=ae(a)||{isTypeSupported:()=>!1};return{mpeg:e.isTypeSupported("audio/mpeg"),mp3:e.isTypeSupported('audio/mp4; codecs="mp3"'),ac3:e.isTypeSupported('audio/mp4; codecs="ac-3"')}}function mr(a){return a.replace(/^.+codecs=["']?([^"']+).*$/,"$1")}const sr={supported:!0,powerEfficient:!0,smooth:!0},lr={supported:!1,smooth:!1,powerEfficient:!1},zn={supported:!0,configurations:[],decodingInfoResults:[sr]};function Lr(a,e){return{supported:!1,configurations:e,decodingInfoResults:[lr],error:a}}function Sr(a,e,t,n,r,i){const s=a.videoCodec,A=a.audioCodec?a.audioGroups:null,f=i==null?void 0:i.audioCodec,c=i==null?void 0:i.channels,m=c?parseInt(c):f?1/0:2;let y=null;if(A!=null&&A.length)try{A.length===1&&A[0]?y=e.groups[A[0]].channels:y=A.reduce((B,D)=>{if(D){const L=e.groups[D];if(!L)throw new Error(`Audio track group ${D} not found`);Object.keys(L.channels).forEach(se=>{B[se]=(B[se]||0)+L.channels[se]})}return B},{2:0})}catch(B){return!0}return s!==void 0&&(s.split(",").some(B=>gt(B))||a.width>1920&&a.height>1088||a.height>1920&&a.width>1088||a.frameRate>Math.max(n,30)||a.videoRange!=="SDR"&&a.videoRange!==t||a.bitrate>Math.max(r,8e6))||!!y&&V(m)&&Object.keys(y).some(B=>parseInt(B)>m)}function xr(a,e,t,n={}){const r=a.videoCodec;if(!r&&!a.audioCodec||!t)return Promise.resolve(zn);const i=[],s=Zr(a),A=s.length,f=Tn(a,e,A>0),c=f.length;for(let m=A||1*c||1;m--;){const y={type:"media-source"};if(A&&(y.video=s[m%A]),c){y.audio=f[m%c];const B=y.audio.bitrate;y.video&&B&&(y.video.bitrate-=B)}i.push(y)}if(r){const m=navigator.userAgent;if(r.split(",").some(y=>gt(y))&&hn())return Promise.resolve(Lr(new Error(`Overriding Windows Firefox HEVC MediaCapabilities result based on user-agent string: (${m})`),i))}return Promise.all(i.map(m=>{const y=vr(m);return n[y]||(n[y]=t.decodingInfo(m))})).then(m=>({supported:!m.some(y=>!y.supported),configurations:i,decodingInfoResults:m})).catch(m=>({supported:!1,configurations:i,decodingInfoResults:[],error:m}))}function Zr(a){var e;const t=(e=a.videoCodec)==null?void 0:e.split(","),n=Zn(a),r=a.width||640,i=a.height||480,s=a.frameRate||30,A=a.videoRange.toLowerCase();return t?t.map(f=>{const c={contentType:Mn(wn(f),"video"),width:r,height:i,bitrate:n,framerate:s};return A!=="sdr"&&(c.transferFunction=A),c}):[]}function Tn(a,e,t){var n;const r=(n=a.audioCodec)==null?void 0:n.split(","),i=Zn(a);return r&&a.audioGroups?a.audioGroups.reduce((s,A)=>{var f;const c=A?(f=e.groups[A])==null?void 0:f.tracks:null;return c?c.reduce((m,y)=>{if(y.groupId===A){const B=parseFloat(y.channels||"");r.forEach(D=>{const L={contentType:Mn(D,"audio"),bitrate:t?fn(D,i):i};B&&(L.channels=""+B),m.push(L)})}return m},s):s},[]):[]}function fn(a,e){if(e<=1)return 1;let t=128e3;return a==="ec-3"?t=768e3:a==="ac-3"&&(t=64e4),Math.min(e/2,t)}function Zn(a){return Math.ceil(Math.max(a.bitrate*.9,a.averageBitrate)/1e3)*1e3||1}function vr(a){let e="";const{audio:t,video:n}=a;if(n){const r=mr(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=mr(t.contentType);e+=`${n?"_":""}${r}_c${t.channels}`}return e}const Hr=["NONE","TYPE-0","TYPE-1",null];function it(a){return Hr.indexOf(a)>-1}const tt=["SDR","PQ","HLG"];function mn(a){return!!a&&tt.indexOf(a)>-1}var Jt={No:"",Yes:"YES",v2:"v2"};function Bn(a){const{canSkipUntil:e,canSkipDateRanges:t,age:n}=a,r=n<e/2;return e&&r?t?Jt.v2:Jt.Yes:Jt.No}class xn{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 vn{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 yn(this._audioGroups,e)}hasSubtitleGroup(e){return yn(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 yn(a,e){return!e||!a?!1:a.indexOf(e)!==-1}function Qn(){if(typeof matchMedia=="function"){const a=matchMedia("(dynamic-range: high)"),e=matchMedia("bad query");if(a.media!==e.media)return a.matches===!0}return!1}function bn(a,e){let t=!1,n=[];if(a&&(t=a!=="SDR",n=[a]),e){n=e.allowedVideoRanges||tt.slice(0);const r=n.join("")!=="SDR"&&!e.videoCodec;t=e.preferHDR!==void 0?e.preferHDR:r&&Qn(),t||(n=["SDR"])}return{preferHDR:t,allowedVideoRanges:n}}const Un=a=>{const e=new WeakSet;return(t,n)=>{if(a&&(n=a(t,n)),typeof n=="object"&&n!==null){if(e.has(n))return;e.add(n)}return n}},Sn=(a,e)=>JSON.stringify(a,Un(e));function Tt(a,e,t,n,r){const i=Object.keys(a),s=n==null?void 0:n.channels,A=n==null?void 0:n.audioCodec,f=r==null?void 0:r.videoCodec,c=s&&parseInt(s)===2;let m=!1,y=!1,B=1/0,D=1/0,L=1/0,se=1/0,X=0,xe=[];const{preferHDR:at,allowedVideoRanges:We}=bn(e,r);for(let un=i.length;un--;){const gn=a[i[un]];m||(m=gn.channels[2]>0),B=Math.min(B,gn.minHeight),D=Math.min(D,gn.minFramerate),L=Math.min(L,gn.minBitrate),We.filter(Nn=>gn.videoRanges[Nn]>0).length>0&&(y=!0)}B=V(B)?B:0,D=V(D)?D:0;const Mt=Math.max(1080,B),qt=Math.max(30,D);L=V(L)?L:t,t=Math.max(L,t),y||(e=void 0);const Dn=i.length>1;return{codecSet:i.reduce((un,gn)=>{const Yt=a[gn];if(gn===un)return un;if(xe=y?We.filter(Nn=>Yt.videoRanges[Nn]>0):[],Dn){if(Yt.minBitrate>t)return Dt(gn,`min bitrate of ${Yt.minBitrate} > current estimate of ${t}`),un;if(!Yt.hasDefaultAudio)return Dt(gn,"no renditions with default or auto-select sound found"),un;if(A&&gn.indexOf(A.substring(0,4))%5!==0)return Dt(gn,`audio codec preference "${A}" not found`),un;if(s&&!c){if(!Yt.channels[s])return Dt(gn,`no renditions with ${s} channel sound found (channels options: ${Object.keys(Yt.channels)})`),un}else if((!A||c)&&m&&Yt.channels[2]===0)return Dt(gn,"no renditions with stereo sound found"),un;if(Yt.minHeight>Mt)return Dt(gn,`min resolution of ${Yt.minHeight} > maximum of ${Mt}`),un;if(Yt.minFramerate>qt)return Dt(gn,`min framerate of ${Yt.minFramerate} > maximum of ${qt}`),un;if(!xe.some(Nn=>Yt.videoRanges[Nn]>0))return Dt(gn,`no variants with VIDEO-RANGE of ${Sn(xe)} found`),un;if(f&&gn.indexOf(f.substring(0,4))%5!==0)return Dt(gn,`video codec preference "${f}" not found`),un;if(Yt.maxScore<X)return Dt(gn,`max score of ${Yt.maxScore} < selected max of ${X}`),un}return un&&(nt(gn)>=nt(un)||Yt.fragmentError>a[un].fragmentError)?un:(se=Yt.minIndex,X=Yt.maxScore,gn)},void 0),videoRanges:xe,preferHDR:at,minFramerate:D,minBitrate:L,minIndex:se}}function Dt(a,e){ie.log(`[abr] start candidates with "${a}" ignored because ${e}`)}function $e(a){return a.reduce((e,t)=>{let n=e.groups[t.groupId];n||(n=e.groups[t.groupId]={tracks:[],channels:{2:0},hasDefault:!1,hasAutoSelect:!1}),n.tracks.push(t);const r=t.channels||"2";return n.channels[r]=(n.channels[r]||0)+1,n.hasDefault=n.hasDefault||t.default,n.hasAutoSelect=n.hasAutoSelect||t.autoselect,n.hasDefault&&(e.hasDefaultAudio=!0),n.hasAutoSelect&&(e.hasAutoSelectAudio=!0),e},{hasDefaultAudio:!1,hasAutoSelectAudio:!1,groups:{}})}function ft(a,e,t,n){return a.slice(t,n+1).reduce((r,i,s)=>{if(!i.codecSet)return r;const A=i.audioGroups;let f=r[i.codecSet];f||(r[i.codecSet]=f={minBitrate:1/0,minHeight:1/0,minFramerate:1/0,minIndex:s,maxScore:0,videoRanges:{SDR:0},channels:{2:0},hasDefaultAudio:!A,fragmentError:0}),f.minBitrate=Math.min(f.minBitrate,i.bitrate);const c=Math.min(i.height,i.width);return f.minHeight=Math.min(f.minHeight,c),f.minFramerate=Math.min(f.minFramerate,i.frameRate),f.minIndex=Math.min(f.minIndex,s),f.maxScore=Math.max(f.maxScore,i.score),f.fragmentError+=i.fragmentError,f.videoRanges[i.videoRange]=(f.videoRanges[i.videoRange]||0)+1,A&&A.forEach(m=>{if(!m)return;const y=e.groups[m];y&&(f.hasDefaultAudio=f.hasDefaultAudio||e.hasDefaultAudio?y.hasDefault:y.hasAutoSelect||!e.hasDefaultAudio&&!e.hasAutoSelectAudio,Object.keys(y.channels).forEach(B=>{f.channels[B]=(f.channels[B]||0)+y.channels[B]}))}),r},{})}function Qt(a){if(!a)return a;const{lang:e,assocLang:t,characteristics:n,channels:r,audioCodec:i}=a;return{lang:e,assocLang:t,characteristics:n,channels:r,audioCodec:i}}function Lt(a,e,t){if("attrs"in a){const n=e.indexOf(a);if(n!==-1)return n}for(let n=0;n<e.length;n++){const r=e[n];if(on(a,r,t))return n}return-1}function on(a,e,t){const{groupId:n,name:r,lang:i,assocLang:s,default:A}=a,f=a.forced;return(n===void 0||e.groupId===n)&&(r===void 0||e.name===r)&&(i===void 0||Cn(i,e.lang))&&(i===void 0||e.assocLang===s)&&(A===void 0||e.default===A)&&(f===void 0||e.forced===f)&&(!("characteristics"in a)||pn(a.characteristics||"",e.characteristics))&&(t===void 0||t(a,e))}function Cn(a,e="--"){return a.length===e.length?a===e:a.startsWith(e)||e.startsWith(a)}function pn(a,e=""){const t=a.split(","),n=e.split(",");return t.length===n.length&&!t.some(r=>n.indexOf(r)===-1)}function Hn(a,e){const{audioCodec:t,channels:n}=a;return(t===void 0||(e.audioCodec||"").substring(0,4)===t.substring(0,4))&&(n===void 0||n===(e.channels||"2"))}function Xn(a,e,t,n,r){const i=e[n],A=e.reduce((B,D,L)=>{const se=D.uri;return(B[se]||(B[se]=[])).push(L),B},{})[i.uri];A.length>1&&(n=Math.max.apply(Math,A));const f=i.videoRange,c=i.frameRate,m=i.codecSet.substring(0,4),y=Jn(e,n,B=>{if(B.videoRange!==f||B.frameRate!==c||B.codecSet.substring(0,4)!==m)return!1;const D=B.audioGroups,L=t.filter(se=>!D||D.indexOf(se.groupId)!==-1);return Lt(a,L,r)>-1});return y>-1?y:Jn(e,n,B=>{const D=B.audioGroups,L=t.filter(se=>!D||D.indexOf(se.groupId)!==-1);return Lt(a,L,r)>-1})}function Jn(a,e,t){for(let n=e;n>-1;n--)if(t(a[n]))return n;for(let n=e+1;n<a.length;n++)if(t(a[n]))return n;return-1}function yt(a,e){var t;return!!a&&a!==((t=e.loadLevelObj)==null?void 0:t.uri)}class On extends H{constructor(e){super("abr",e.logger),this.hls=void 0,this.lastLevelLoadSec=0,this.lastLoadedFragLevel=-1,this.firstSelection=-1,this._nextAutoLevel=-1,this.nextAutoLevelKey="",this.audioTracksByGroup=null,this.codecTiers=null,this.timer=-1,this.fragCurrent=null,this.partCurrent=null,this.bitrateTestDelay=0,this.rebufferNotice=-1,this.supportedCache={},this.bwEstimator=void 0,this._abandonRulesCheck=t=>{var n;const{fragCurrent:r,partCurrent:i,hls:s}=this,{autoLevelEnabled:A,media:f}=s;if(!r||!f)return;const c=performance.now(),m=i?i.stats:r.stats,y=i?i.duration:r.duration,B=c-m.loading.start,D=s.minAutoLevel,L=r.level,se=this._nextAutoLevel;if(m.aborted||m.loaded&&m.loaded===m.total||L<=D){this.clearTimer(),this._nextAutoLevel=-1;return}if(!A)return;const X=se>-1&&se!==L,xe=!!t||X;if(!xe&&(f.paused||!f.playbackRate||!f.readyState))return;const at=s.mainForwardBufferInfo;if(!xe&&at===null)return;const We=this.bwEstimator.getEstimateTTFB(),Mt=Math.abs(f.playbackRate);if(B<=Math.max(We,1e3*(y/(Mt*2))))return;const qt=at?at.len/Mt:0,Dn=m.loading.first?m.loading.first-m.loading.start:-1,zt=m.loaded&&Dn>-1,un=this.getBwEstimate(),gn=s.levels,Yt=gn[L],Nn=Math.max(m.loaded,Math.round(y*(r.bitrate||Yt.averageBitrate)/8));let Cr=zt?B-Dn:B;Cr<1&&zt&&(Cr=Math.min(B,m.loaded*8/un));const jr=zt?m.loaded*1e3/Cr:0,ni=We/1e3,Yr=jr?(Nn-m.loaded)/jr:Nn*8/un+ni;if(Yr<=qt)return;const wr=jr?jr*8:un,qr=((n=(t==null?void 0:t.details)||this.hls.latestLevelDetails)==null?void 0:n.live)===!0,Nr=this.hls.config.abrBandWidthUpFactor;let ei=Number.POSITIVE_INFINITY,_i;for(_i=L-1;_i>D;_i--){const us=gn[_i].maxBitrate,Oi=!gn[_i].details||qr;if(ei=this.getTimeToLoadFrag(ni,wr,y*us,Oi),ei<Math.min(qt,y+ni))break}if(ei>=Yr||ei>y*10)return;zt?this.bwEstimator.sample(B-Math.min(We,Dn),m.loaded):this.bwEstimator.sampleTTFB(B);const Br=gn[_i].maxBitrate;this.getBwEstimate()*Nr>Br&&this.resetEstimator(Br);const br=this.findBestLevel(Br,D,_i,0,qt,1,1);br>-1&&(_i=br),this.warn(`Fragment ${r.sn}${i?" part "+i.index:""} of level ${L} is loading too slowly;
|
|
Fragment duration: ${r.duration.toFixed(3)}
|
|
Time to underbuffer: ${qt.toFixed(3)} s
|
|
Estimated load time for current fragment: ${Yr.toFixed(3)} s
|
|
Estimated load time for down switch fragment: ${ei.toFixed(3)} s
|
|
TTFB estimate: ${Dn|0} ms
|
|
Current BW estimate: ${V(un)?un|0:"Unknown"} bps
|
|
New BW estimate: ${this.getBwEstimate()|0} bps
|
|
Switching to level ${_i} @ ${Br|0} bps`),s.nextLoadLevel=s.nextAutoLevel=_i,this.clearTimer();const Li=()=>{if(this.clearTimer(),this.fragCurrent===r&&this.hls.loadLevel===_i&&_i>0){const us=this.getStarvationDelay();if(this.warn(`Aborting inflight request ${_i>0?"and switching down":""}
|
|
Fragment duration: ${r.duration.toFixed(3)} s
|
|
Time to underbuffer: ${us.toFixed(3)} s`),r.abortRequests(),this.fragCurrent=this.partCurrent=null,_i>D){let Oi=this.findBestLevel(this.hls.levels[D].bitrate,D,_i,0,us,1,1);Oi===-1&&(Oi=D),this.hls.nextLoadLevel=this.hls.nextAutoLevel=Oi,this.resetEstimator(this.hls.levels[Oi].bitrate)}}};X||Yr>ei*2?Li():this.timer=self.setInterval(Li,ei*1e3),s.trigger(g.FRAG_LOAD_EMERGENCY_ABORTED,{frag:r,part:i,stats:m})},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 S(e.abrEwmaSlowVoD,e.abrEwmaFastVoD,e.abrEwmaDefaultEstimate)}registerListeners(){const{hls:e}=this;e.on(g.MANIFEST_LOADING,this.onManifestLoading,this),e.on(g.FRAG_LOADING,this.onFragLoading,this),e.on(g.FRAG_LOADED,this.onFragLoaded,this),e.on(g.FRAG_BUFFERED,this.onFragBuffered,this),e.on(g.LEVEL_SWITCHING,this.onLevelSwitching,this),e.on(g.LEVEL_LOADED,this.onLevelLoaded,this),e.on(g.LEVELS_UPDATED,this.onLevelsUpdated,this),e.on(g.MAX_AUTO_LEVEL_UPDATED,this.onMaxAutoLevelUpdated,this),e.on(g.ERROR,this.onError,this)}unregisterListeners(){const{hls:e}=this;e&&(e.off(g.MANIFEST_LOADING,this.onManifestLoading,this),e.off(g.FRAG_LOADING,this.onFragLoading,this),e.off(g.FRAG_LOADED,this.onFragLoaded,this),e.off(g.FRAG_BUFFERED,this.onFragBuffered,this),e.off(g.LEVEL_SWITCHING,this.onLevelSwitching,this),e.off(g.LEVEL_LOADED,this.onLevelLoaded,this),e.off(g.LEVELS_UPDATED,this.onLevelsUpdated,this),e.off(g.MAX_AUTO_LEVEL_UPDATED,this.onMaxAutoLevelUpdated,this),e.off(g.ERROR,this.onError,this))}destroy(){this.unregisterListeners(),this.clearTimer(),this.hls=this._abandonRulesCheck=this.supportedCache=null,this.fragCurrent=this.partCurrent=null}onManifestLoading(e,t){this.lastLoadedFragLevel=-1,this.firstSelection=-1,this.lastLevelLoadSec=0,this.supportedCache={},this.fragCurrent=this.partCurrent=null,this.onLevelsUpdated(),this.clearTimer()}onLevelsUpdated(){this.lastLoadedFragLevel>-1&&this.fragCurrent&&(this.lastLoadedFragLevel=this.fragCurrent.level),this._nextAutoLevel=-1,this.onMaxAutoLevelUpdated(),this.codecTiers=null,this.audioTracksByGroup=null}onMaxAutoLevelUpdated(){this.firstSelection=-1,this.nextAutoLevelKey=""}onFragLoading(e,t){const n=t.frag;if(!this.ignoreFragment(n)){if(!n.bitrateTest){var r;this.fragCurrent=n,this.partCurrent=(r=t.part)!=null?r:null}this.clearTimer(),this.timer=self.setInterval(this._abandonRulesCheck,100)}}onLevelSwitching(e,t){this.clearTimer()}onError(e,t){if(!t.fatal)switch(t.details){case G.BUFFER_ADD_CODEC_ERROR:case G.BUFFER_APPEND_ERROR:this.lastLoadedFragLevel=-1,this.firstSelection=-1;break;case G.FRAG_LOAD_TIMEOUT:{const n=t.frag,{fragCurrent:r,partCurrent:i}=this;if(n&&r&&n.sn===r.sn&&n.level===r.level){const s=performance.now(),A=i?i.stats:n.stats,f=s-A.loading.start,c=A.loading.first?A.loading.first-A.loading.start:-1;if(A.loaded&&c>-1){const y=this.bwEstimator.getEstimateTTFB();this.bwEstimator.sample(f-Math.min(y,c),A.loaded)}else this.bwEstimator.sampleTTFB(f)}break}}}getTimeToLoadFrag(e,t,n,r){const i=e+n/t,s=r?e+this.lastLevelLoadSec:0;return i+s}onLevelLoaded(e,t){const n=this.hls.config,{loading:r}=t.stats,i=r.end-r.first;V(i)&&(this.lastLevelLoadSec=i/1e3),t.details.live?this.bwEstimator.update(n.abrEwmaSlowLive,n.abrEwmaFastLive):this.bwEstimator.update(n.abrEwmaSlowVoD,n.abrEwmaFastVoD),this.timer>-1&&this._abandonRulesCheck(t.levelInfo)}onFragLoaded(e,{frag:t,part:n}){const r=n?n.stats:t.stats;if(t.type===le.MAIN&&this.bwEstimator.sampleTTFB(r.loading.first-r.loading.start),!this.ignoreFragment(t)){if(this.clearTimer(),t.level===this._nextAutoLevel&&(this._nextAutoLevel=-1),this.firstSelection=-1,this.hls.config.abrMaxWithRealBitrate){const i=n?n.duration:t.duration,s=this.hls.levels[t.level],A=(s.loaded?s.loaded.bytes:0)+r.loaded,f=(s.loaded?s.loaded.duration:0)+i;s.loaded={bytes:A,duration:f},s.realBitrate=Math.round(8*A/f)}if(t.bitrateTest){const i={stats:r,frag:t,part:n,id:t.type};this.onFragBuffered(g.FRAG_BUFFERED,i),t.bitrateTest=!1}else this.lastLoadedFragLevel=t.level}}onFragBuffered(e,t){const{frag:n,part:r}=t,i=r!=null&&r.stats.loaded?r.stats:n.stats;if(i.aborted||this.ignoreFragment(n))return;const s=i.parsing.end-i.loading.start-Math.min(i.loading.first-i.loading.start,this.bwEstimator.getEstimateTTFB());this.bwEstimator.sample(s,i.loaded),i.bwEstimate=this.getBwEstimate(),n.bitrateTest?this.bitrateTestDelay=s/1e3:this.bitrateTestDelay=0}ignoreFragment(e){return e.type!==le.MAIN||e.sn==="initSegment"}clearTimer(){this.timer>-1&&(self.clearInterval(this.timer),this.timer=-1)}get firstAutoLevel(){const{maxAutoLevel:e,minAutoLevel:t}=this.hls,n=this.getBwEstimate(),r=this.hls.config.maxStarvationDelay,i=this.findBestLevel(n,t,e,0,r,1,1);if(i>-1)return i;const s=this.hls.firstLevel,A=Math.min(Math.max(s,t),e);return this.warn(`Could not find best starting auto level. Defaulting to first in playlist ${s} clamped to ${A}`),A}get forcedAutoLevel(){return this.nextAutoLevelKey?-1:this._nextAutoLevel}get nextAutoLevel(){const e=this.forcedAutoLevel,n=this.bwEstimator.canEstimate(),r=this.lastLoadedFragLevel>-1;if(e!==-1&&(!n||!r||this.nextAutoLevelKey===this.getAutoLevelKey()))return e;const i=n&&r?this.getNextABRAutoLevel():this.firstAutoLevel;if(e!==-1){const s=this.hls.levels;if(s.length>Math.max(e,i)&&s[e].loadError<=s[i].loadError)return e}return this._nextAutoLevel=i,this.nextAutoLevelKey=this.getAutoLevelKey(),i}getAutoLevelKey(){return`${this.getBwEstimate()}_${this.getStarvationDelay().toFixed(2)}`}getNextABRAutoLevel(){const{fragCurrent:e,partCurrent:t,hls:n}=this;if(n.levels.length<=1)return n.loadLevel;const{maxAutoLevel:r,config:i,minAutoLevel:s}=n,A=t?t.duration:e?e.duration:0,f=this.getBwEstimate(),c=this.getStarvationDelay();let m=i.abrBandWidthFactor,y=i.abrBandWidthUpFactor;if(c){const X=this.findBestLevel(f,s,r,c,0,m,y);if(X>=0)return this.rebufferNotice=-1,X}let B=A?Math.min(A,i.maxStarvationDelay):i.maxStarvationDelay;if(!c){const X=this.bitrateTestDelay;X&&(B=(A?Math.min(A,i.maxLoadingDelay):i.maxLoadingDelay)-X,this.info(`bitrate test took ${Math.round(1e3*X)}ms, set first fragment max fetchDuration to ${Math.round(1e3*B)} ms`),m=y=1)}const D=this.findBestLevel(f,s,r,c,B,m,y);if(this.rebufferNotice!==D&&(this.rebufferNotice=D,this.info(`${c?"rebuffering expected":"buffer is empty"}, optimal quality level ${D}`)),D>-1)return D;const L=n.levels[s],se=n.loadLevelObj;return se&&(L==null?void 0:L.bitrate)<se.bitrate?s:n.loadLevel}getStarvationDelay(){const e=this.hls,t=e.media;if(!t)return 1/0;const n=t&&t.playbackRate!==0?Math.abs(t.playbackRate):1,r=e.mainForwardBufferInfo;return(r?r.len:0)/n}getBwEstimate(){return this.bwEstimator.canEstimate()?this.bwEstimator.getEstimate():this.hls.config.abrEwmaDefaultEstimate}findBestLevel(e,t,n,r,i,s,A){var f;const c=r+i,m=this.lastLoadedFragLevel,y=m===-1?this.hls.firstLevel:m,{fragCurrent:B,partCurrent:D}=this,{levels:L,allAudioTracks:se,loadLevel:X,config:xe}=this.hls;if(L.length===1)return 0;const at=L[y],We=!!((f=this.hls.latestLevelDetails)!=null&&f.live),Mt=X===-1||m===-1;let qt,Dn="SDR",zt=(at==null?void 0:at.frameRate)||0;const{audioPreference:un,videoPreference:gn}=xe,Yt=this.audioTracksByGroup||(this.audioTracksByGroup=$e(se));let Nn=-1;if(Mt){if(this.firstSelection!==-1)return this.firstSelection;const wr=this.codecTiers||(this.codecTiers=ft(L,Yt,t,n)),qr=Tt(wr,Dn,e,un,gn),{codecSet:Nr,videoRanges:ei,minFramerate:_i,minBitrate:Br,minIndex:br,preferHDR:Li}=qr;Nn=br,qt=Nr,Dn=Li?ei[ei.length-1]:ei[0],zt=_i,e=Math.max(e,Br),this.log(`picked start tier ${Sn(qr)}`)}else qt=at==null?void 0:at.codecSet,Dn=at==null?void 0:at.videoRange;const Cr=D?D.duration:B?B.duration:0,jr=this.bwEstimator.getEstimateTTFB()/1e3,ni=[];for(let wr=n;wr>=t;wr--){var Yr;const qr=L[wr],Nr=wr>y;if(!qr)continue;if(xe.useMediaCapabilities&&!qr.supportedResult&&!qr.supportedPromise){const Oi=navigator.mediaCapabilities;typeof(Oi==null?void 0:Oi.decodingInfo)=="function"&&Sr(qr,Yt,Dn,zt,e,un)?(qr.supportedPromise=xr(qr,Yt,Oi,this.supportedCache),qr.supportedPromise.then(Vi=>{if(!this.hls)return;qr.supportedResult=Vi;const oa=this.hls.levels,na=oa.indexOf(qr);Vi.error?this.warn(`MediaCapabilities decodingInfo error: "${Vi.error}" for level ${na} ${Sn(Vi)}`):Vi.supported?Vi.decodingInfoResults.some(Ha=>Ha.smooth===!1||Ha.powerEfficient===!1)&&this.log(`MediaCapabilities decodingInfo for level ${na} not smooth or powerEfficient: ${Sn(Vi)}`):(this.warn(`Unsupported MediaCapabilities decodingInfo result for level ${na} ${Sn(Vi)}`),na>-1&&oa.length>1&&(this.log(`Removing unsupported level ${na}`),this.hls.removeLevel(na),this.hls.loadLevel===-1&&(this.hls.nextLoadLevel=0)))}).catch(Vi=>{this.warn(`Error handling MediaCapabilities decodingInfo: ${Vi}`)})):qr.supportedResult=zn}if((qt&&qr.codecSet!==qt||Dn&&qr.videoRange!==Dn||Nr&&zt>qr.frameRate||!Nr&&zt>0&&zt<qr.frameRate||(Yr=qr.supportedResult)!=null&&(Yr=Yr.decodingInfoResults)!=null&&Yr.some(Oi=>Oi.smooth===!1))&&(!Mt||wr!==Nn)){ni.push(wr);continue}const ei=qr.details,_i=(D?ei==null?void 0:ei.partTarget:ei==null?void 0:ei.averagetargetduration)||Cr;let Br;Nr?Br=A*e:Br=s*e;const br=Cr&&r>=Cr*2&&i===0?qr.averageBitrate:qr.maxBitrate,Li=this.getTimeToLoadFrag(jr,Br,br*_i,ei===void 0);if(Br>=br&&(wr===m||qr.loadError===0&&qr.fragmentError===0)&&(Li<=jr||!V(Li)||We&&!this.bitrateTestDelay||Li<c)){const Oi=this.forcedAutoLevel;return wr!==X&&(Oi===-1||Oi!==X)&&(ni.length&&this.trace(`Skipped level(s) ${ni.join(",")} of ${n} max with CODECS and VIDEO-RANGE:"${L[ni[0]].codecs}" ${L[ni[0]].videoRange}; not compatible with "${qt}" ${Dn}`),this.info(`switch candidate:${y}->${wr} adjustedbw(${Math.round(Br)})-bitrate=${Math.round(Br-br)} ttfb:${jr.toFixed(1)} avgDuration:${_i.toFixed(1)} maxFetchDuration:${c.toFixed(1)} fetchDuration:${Li.toFixed(1)} firstSelection:${Mt} codecSet:${qr.codecSet} videoRange:${qr.videoRange} hls.loadLevel:${X}`)),Mt&&(this.firstSelection=wr),wr}}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 Kn={search:function(a,e){let t=0,n=a.length-1,r=null,i=null;for(;t<=n;){r=(t+n)/2|0,i=a[r];const s=e(i);if(s>0)t=r+1;else if(s<0)n=r-1;else return i}return null}};function Q(a,e,t){if(e===null||!Array.isArray(a)||!a.length||!V(e))return null;const n=a[0].programDateTime;if(e<(n||0))return null;const r=a[a.length-1].endProgramDateTime;if(e>=(r||0))return null;for(let i=0;i<a.length;++i){const s=a[i];if(st(e,t,s))return s}return null}function K(a,e,t=0,n=0,r=.005){let i=null;if(a){i=e[1+a.sn-e[0].sn]||null;const A=a.endDTS-t;A>0&&A<15e-7&&(t+=15e-7),i&&a.level!==i.level&&i.end<=a.end&&(i=e[2+a.sn-e[0].sn]||null)}else t===0&&e[0].start===0&&(i=e[0]);if(i&&((!a||a.level===i.level)&&Le(t,n,i)===0||Ee(i,a,Math.min(r,n))))return i;const s=Kn.search(e,Le.bind(null,t,n));return s&&(s!==a||!i)?s:i}function Ee(a,e,t){if(e&&e.start===0&&e.level<a.level&&(e.endPTS||0)>0){const n=e.tagList.reduce((r,i)=>(i[0]==="INF"&&(r+=parseFloat(i[1])),r),t);return a.start<=n}return!1}function Le(a=0,e=0,t){if(t.start<=a&&t.start+t.duration>a)return 0;const n=Math.min(e,t.duration+(t.deltaPTS?t.deltaPTS:0));return t.start+t.duration-n<=a?1:t.start-n>a&&t.start?-1:0}function st(a,e,t){const n=Math.min(e,t.duration+(t.deltaPTS?t.deltaPTS:0))*1e3;return(t.endProgramDateTime||0)-n>a}function rt(a,e,t){if(a&&a.startCC<=e&&a.endCC>=e){let n=a.fragments;const{fragmentHint:r}=a;r&&(n=n.concat(r));let i;return Kn.search(n,s=>s.cc<e?1:s.cc>e?-1:(i=s,s.end<=t?1:s.start>t?-1:0)),i||null}return null}function Ft(a){switch(a.details){case G.FRAG_LOAD_TIMEOUT:case G.KEY_LOAD_TIMEOUT:case G.LEVEL_LOAD_TIMEOUT:case G.MANIFEST_LOAD_TIMEOUT:return!0}return!1}function Ht(a,e){const t=Ft(e);return a.default[`${t?"timeout":"error"}Retry`]}function an(a,e){const t=a.backoff==="linear"?1:Math.pow(2,e);return Math.min(t*a.retryDelayMs,a.maxRetryDelayMs)}function Xt(a){return b(b({},a),{errorRetry:null,timeoutRetry:null})}function Kt(a,e,t,n){if(!a)return!1;const r=n==null?void 0:n.code,i=e<a.maxNumRetry&&(en(r)||!!t);return a.shouldRetry?a.shouldRetry(a,e,t,n,i):i}function en(a){return pe(a)||!!a&&(a<400||a>499)}function pe(a){return a===0&&navigator.onLine===!1}var Ye={DoNothing:0,SendEndCallback:1,SendAlternateToPenaltyBox:2,RemoveAlternatePermanently:3,InsertDiscontinuity:4,RetryRequest:5},Ge={None:0,MoveAllAlternatesMatchingHost:1,MoveAllAlternatesMatchingHDCP:2,MoveAllAlternatesMatchingKey:4,SwitchToSDR:8};class et extends H{constructor(e){super("error-controller",e.logger),this.hls=void 0,this.playlistError=0,this.hls=e,this.registerListeners()}registerListeners(){const e=this.hls;e.on(g.ERROR,this.onError,this),e.on(g.MANIFEST_LOADING,this.onManifestLoading,this),e.on(g.LEVEL_UPDATED,this.onLevelUpdated,this)}unregisterListeners(){const e=this.hls;e&&(e.off(g.ERROR,this.onError,this),e.off(g.ERROR,this.onErrorOut,this),e.off(g.MANIFEST_LOADING,this.onManifestLoading,this),e.off(g.LEVEL_UPDATED,this.onLevelUpdated,this))}destroy(){this.unregisterListeners(),this.hls=null}startLoad(e){}stopLoad(){this.playlistError=0}getVariantLevelIndex(e){return(e==null?void 0:e.type)===le.MAIN?e.level:this.getVariantIndex()}getVariantIndex(){var e;const t=this.hls,n=t.currentLevel;return(e=t.loadLevelObj)!=null&&e.details||n===-1?t.loadLevel:n}variantHasKey(e,t){if(e){var n;if((n=e.details)!=null&&n.hasKey(t))return!0;const r=e.audioGroups;if(r)return this.hls.allAudioTracks.filter(s=>r.indexOf(s.groupId)>=0).some(s=>{var A;return(A=s.details)==null?void 0:A.hasKey(t)})}return!1}onManifestLoading(){this.playlistError=0}onLevelUpdated(){this.playlistError=0}onError(e,t){var n;if(t.fatal)return;const r=this.hls,i=t.context;switch(t.details){case G.FRAG_LOAD_ERROR:case G.FRAG_LOAD_TIMEOUT:case G.KEY_LOAD_ERROR:case G.KEY_LOAD_TIMEOUT:t.errorAction=this.getFragRetryOrSwitchAction(t);return;case G.FRAG_PARSING_ERROR:if((n=t.frag)!=null&&n.gap){t.errorAction=lt();return}case G.FRAG_GAP:case G.FRAG_DECRYPT_ERROR:{t.errorAction=this.getFragRetryOrSwitchAction(t),t.errorAction.action=Ye.SendAlternateToPenaltyBox;return}case G.LEVEL_EMPTY_ERROR:case G.LEVEL_PARSING_ERROR:{var s;const f=t.parent===le.MAIN?t.level:r.loadLevel;t.details===G.LEVEL_EMPTY_ERROR&&((s=t.context)!=null&&(s=s.levelDetails)!=null&&s.live)?t.errorAction=this.getPlaylistRetryOrSwitchAction(t,f):(t.levelRetry=!1,t.errorAction=this.getLevelSwitchAction(t,f))}return;case G.LEVEL_LOAD_ERROR:case G.LEVEL_LOAD_TIMEOUT:typeof(i==null?void 0:i.level)=="number"&&(t.errorAction=this.getPlaylistRetryOrSwitchAction(t,i.level));return;case G.AUDIO_TRACK_LOAD_ERROR:case G.AUDIO_TRACK_LOAD_TIMEOUT:case G.SUBTITLE_LOAD_ERROR:case G.SUBTITLE_TRACK_LOAD_TIMEOUT:if(i){const f=r.loadLevelObj;if(f&&(i.type===ye.AUDIO_TRACK&&f.hasAudioGroup(i.groupId)||i.type===ye.SUBTITLE_TRACK&&f.hasSubtitleGroup(i.groupId))){t.errorAction=this.getPlaylistRetryOrSwitchAction(t,r.loadLevel),t.errorAction.action=Ye.SendAlternateToPenaltyBox,t.errorAction.flags=Ge.MoveAllAlternatesMatchingHost;return}}return;case G.KEY_SYSTEM_STATUS_OUTPUT_RESTRICTED:t.errorAction={action:Ye.SendAlternateToPenaltyBox,flags:Ge.MoveAllAlternatesMatchingHDCP};return;case G.KEY_SYSTEM_SESSION_UPDATE_FAILED:case G.KEY_SYSTEM_STATUS_INTERNAL_ERROR:case G.KEY_SYSTEM_NO_SESSION:t.errorAction={action:Ye.SendAlternateToPenaltyBox,flags:Ge.MoveAllAlternatesMatchingKey};return;case G.BUFFER_ADD_CODEC_ERROR:case G.REMUX_ALLOC_ERROR:case G.BUFFER_APPEND_ERROR:if(!t.errorAction){var A;t.errorAction=this.getLevelSwitchAction(t,(A=t.level)!=null?A:r.loadLevel)}return;case G.INTERNAL_EXCEPTION:case G.BUFFER_APPENDING_ERROR:case G.BUFFER_FULL_ERROR:case G.LEVEL_SWITCH_ERROR:case G.BUFFER_STALLED_ERROR:case G.BUFFER_SEEK_OVER_HOLE:case G.BUFFER_NUDGE_ON_STALL:t.errorAction=lt();return}t.type===ge.KEY_SYSTEM_ERROR&&(t.levelRetry=!1,t.errorAction=lt())}getPlaylistRetryOrSwitchAction(e,t){const n=this.hls,r=Ht(n.config.playlistLoadPolicy,e),i=this.playlistError++;if(Kt(r,i,Ft(e),e.response))return{action:Ye.RetryRequest,flags:Ge.None,retryConfig:r,retryCount:i};const A=this.getLevelSwitchAction(e,t);return r&&(A.retryConfig=r,A.retryCount=i),A}getFragRetryOrSwitchAction(e){const t=this.hls,n=this.getVariantLevelIndex(e.frag),r=t.levels[n],{fragLoadPolicy:i,keyLoadPolicy:s}=t.config,A=Ht(e.details.startsWith("key")?s:i,e),f=t.levels.reduce((m,y)=>m+y.fragmentError,0);if(r&&(e.details!==G.FRAG_GAP&&r.fragmentError++,Kt(A,f,Ft(e),e.response)))return{action:Ye.RetryRequest,flags:Ge.None,retryConfig:A,retryCount:f};const c=this.getLevelSwitchAction(e,n);return A&&(c.retryConfig=A,c.retryCount=f),c}getLevelSwitchAction(e,t){const n=this.hls;t==null&&(t=n.loadLevel);const r=this.hls.levels[t];if(r){var i,s;const c=e.details;r.loadError++,c===G.BUFFER_APPEND_ERROR&&r.fragmentError++;let m=-1;const{levels:y,loadLevel:B,minAutoLevel:D,maxAutoLevel:L}=n;!n.autoLevelEnabled&&!n.config.preserveManualLevelOnError&&(n.loadLevel=-1);const se=(i=e.frag)==null?void 0:i.type,xe=(se===le.AUDIO&&c===G.FRAG_PARSING_ERROR||e.sourceBufferName==="audio"&&(c===G.BUFFER_ADD_CODEC_ERROR||c===G.BUFFER_APPEND_ERROR))&&y.some(({audioCodec:Dn})=>r.audioCodec!==Dn),We=e.sourceBufferName==="video"&&(c===G.BUFFER_ADD_CODEC_ERROR||c===G.BUFFER_APPEND_ERROR)&&y.some(({codecSet:Dn,audioCodec:zt})=>r.codecSet!==Dn&&r.audioCodec===zt),{type:Mt,groupId:qt}=(s=e.context)!=null?s:{};for(let Dn=y.length;Dn--;){const zt=(Dn+B)%y.length;if(zt!==B&&zt>=D&&zt<=L&&y[zt].loadError===0){var A,f;const un=y[zt];if(c===G.FRAG_GAP&&se===le.MAIN&&e.frag){const gn=y[zt].details;if(gn){const Yt=K(e.frag,gn.fragments,e.frag.start);if(Yt!=null&&Yt.gap)continue}}else{if(Mt===ye.AUDIO_TRACK&&un.hasAudioGroup(qt)||Mt===ye.SUBTITLE_TRACK&&un.hasSubtitleGroup(qt))continue;if(se===le.AUDIO&&(A=r.audioGroups)!=null&&A.some(gn=>un.hasAudioGroup(gn))||se===le.SUBTITLE&&(f=r.subtitleGroups)!=null&&f.some(gn=>un.hasSubtitleGroup(gn))||xe&&r.audioCodec===un.audioCodec||We&&r.codecSet===un.codecSet||!xe&&r.codecSet!==un.codecSet)continue}m=zt;break}}if(m>-1&&n.loadLevel!==m)return e.levelRetry=!0,this.playlistError=0,{action:Ye.SendAlternateToPenaltyBox,flags:Ge.None,nextAutoLevel:m}}return{action:Ye.SendAlternateToPenaltyBox,flags:Ge.MoveAllAlternatesMatchingHost}}onErrorOut(e,t){var n;switch((n=t.errorAction)==null?void 0:n.action){case Ye.DoNothing:break;case Ye.SendAlternateToPenaltyBox:this.sendAlternateToPenaltyBox(t),!t.errorAction.resolved&&t.details!==G.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 Ye.RetryRequest:break}if(t.fatal){this.hls.stopLoad();return}}sendAlternateToPenaltyBox(e){const t=this.hls,n=e.errorAction;if(!n)return;const{flags:r}=n,i=n.nextAutoLevel;switch(r){case Ge.None:this.switchLevel(e,i);break;case Ge.MoveAllAlternatesMatchingHDCP:{const f=this.getVariantLevelIndex(e.frag),c=t.levels[f],m=c==null?void 0:c.attrs["HDCP-LEVEL"];if(n.hdcpLevel=m,m){t.maxHdcpLevel=Hr[Hr.indexOf(m)-1],n.resolved=!0,this.warn(`Restricting playback to HDCP-LEVEL of "${t.maxHdcpLevel}" or lower`);break}}case Ge.MoveAllAlternatesMatchingKey:{const f=e.decryptdata;if(f){const c=this.hls.levels;for(let m=c.length;m--;)if(this.variantHasKey(c[m],f)){var s,A;this.log(`Banned key found in level ${m} (${c[m].bitrate}bps) or audio group "${(s=c[m].audioGroups)==null?void 0:s.join(",")}" (${(A=e.frag)==null?void 0:A.type} fragment) ${Y(f.keyId||[])}`),c[m].fragmentError++,c[m].loadError++,this.log(`Removing level ${m} with key error (${e.error})`),this.hls.removeLevel(m)}c.length&&(n.resolved=!0)}break}}n.resolved||this.switchLevel(e,i)}switchLevel(e,t){if(t!==void 0&&e.errorAction&&(this.warn(`switching to level ${t} after ${e.details}`),this.hls.nextAutoLevel=t,e.errorAction.resolved=!0,this.hls.nextLoadLevel=this.hls.nextAutoLevel,e.details===G.BUFFER_ADD_CODEC_ERROR&&e.mimeType&&e.sourceBufferName!=="audiovideo")){const n=mr(e.mimeType),r=this.hls.levels;for(let i=r.length;i--;)r[i][`${e.sourceBufferName}Codec`]===n&&(this.log(`Removing level ${i} for ${e.details} ("${n}" not supported)`),this.hls.removeLevel(i))}}}function lt(a){const e={action:Ye.DoNothing,flags:Ge.None};return a&&(e.resolved=!0),e}var dt={NOT_LOADED:"NOT_LOADED",APPENDING:"APPENDING",PARTIAL:"PARTIAL",OK:"OK"};class jt{constructor(e){this.activePartLists=Object.create(null),this.endListFragments=Object.create(null),this.fragments=Object.create(null),this.timeRanges=Object.create(null),this.bufferPadding=.2,this.hls=void 0,this.hasGaps=!1,this.hls=e,this._registerListeners()}_registerListeners(){const{hls:e}=this;e&&(e.on(g.MANIFEST_LOADING,this.onManifestLoading,this),e.on(g.BUFFER_APPENDED,this.onBufferAppended,this),e.on(g.FRAG_BUFFERED,this.onFragBuffered,this),e.on(g.FRAG_LOADED,this.onFragLoaded,this))}_unregisterListeners(){const{hls:e}=this;e&&(e.off(g.MANIFEST_LOADING,this.onManifestLoading,this),e.off(g.BUFFER_APPENDED,this.onBufferAppended,this),e.off(g.FRAG_BUFFERED,this.onFragBuffered,this),e.off(g.FRAG_LOADED,this.onFragLoaded,this))}destroy(){this._unregisterListeners(),this.hls=this.fragments=this.activePartLists=this.endListFragments=this.timeRanges=null}getAppendedFrag(e,t){const n=this.activePartLists[t];if(n)for(let r=n.length;r--;){const i=n[r];if(!i)break;if(i.start<=e&&e<=i.end&&i.loaded)return i}return this.getBufferedFrag(e,t)}getBufferedFrag(e,t){return this.getFragAtPos(e,t,!0)}getFragAtPos(e,t,n){const{fragments:r}=this,i=Object.keys(r);for(let s=i.length;s--;){const A=r[i[s]];if((A==null?void 0:A.body.type)===t&&(!n||A.buffered)){const f=A.body;if(f.start<=e&&e<=f.end)return f}}return null}detectEvictedFragments(e,t,n,r,i){this.timeRanges&&(this.timeRanges[e]=t);const s=(r==null?void 0:r.fragment.sn)||-1;Object.keys(this.fragments).forEach(A=>{const f=this.fragments[A];if(!f||s>=f.body.sn)return;if(!f.buffered&&(!f.loaded||i)){f.body.type===n&&this.removeFragment(f.body);return}const c=f.range[e];if(c){if(c.time.length===0){this.removeFragment(f.body);return}c.time.some(m=>{const y=!this.isTimeBuffered(m.startPTS,m.endPTS,t);return y&&this.removeFragment(f.body),y})}})}detectPartialFragments(e){const t=this.timeRanges;if(!t||e.frag.sn==="initSegment")return;const n=e.frag,r=wt(n),i=this.fragments[r];if(!i||i.buffered&&n.gap)return;const s=!n.relurl;Object.keys(t).forEach(A=>{const f=n.elementaryStreams[A];if(!f)return;const c=t[A],m=s||f.partial===!0;i.range[A]=this.getBufferedTimes(n,e.part,m,c)}),i.loaded=null,Object.keys(i.range).length?(i.buffered=!0,(i.body.endList=n.endList||i.body.endList)&&(this.endListFragments[i.body.type]=i),Nt(i)||this.removeParts(n.sn-1,n.type)):this.removeFragment(i.body)}removeParts(e,t){const n=this.activePartLists[t];n&&(this.activePartLists[t]=Je(n,r=>r.fragment.sn>=e))}fragBuffered(e,t){const n=wt(e);let r=this.fragments[n];!r&&t&&(r=this.fragments[n]={body:e,appendedPTS:null,loaded:null,buffered:!1,range:Object.create(null)},e.gap&&(this.hasGaps=!0)),r&&(r.loaded=null,r.buffered=!0)}getBufferedTimes(e,t,n,r){const i={time:[],partial:n},s=e.start,A=e.end,f=e.minEndPTS||A,c=e.maxStartPTS||s;for(let m=0;m<r.length;m++){const y=r.start(m)-this.bufferPadding,B=r.end(m)+this.bufferPadding;if(c>=y&&f<=B){i.time.push({startPTS:Math.max(s,r.start(m)),endPTS:Math.min(A,r.end(m))});break}else if(s<B&&A>y){const D=Math.max(s,r.start(m)),L=Math.min(A,r.end(m));L>D&&(i.partial=!0,i.time.push({startPTS:D,endPTS:L}))}else if(A<=y)break}return i}getPartialFragment(e){let t=null,n,r,i,s=0;const{bufferPadding:A,fragments:f}=this;return Object.keys(f).forEach(c=>{const m=f[c];m&&Nt(m)&&(r=m.body.start-A,i=m.body.end+A,e>=r&&e<=i&&(n=Math.min(e-r,i-e),s<=n&&(t=m.body,s=n)))}),t}isEndListAppended(e){const t=this.endListFragments[e];return t!==void 0&&(t.buffered||Nt(t))}getState(e){const t=wt(e),n=this.fragments[t];return n?n.buffered?Nt(n)?dt.PARTIAL:dt.OK:dt.APPENDING:dt.NOT_LOADED}isTimeBuffered(e,t,n){let r,i;for(let s=0;s<n.length;s++){if(r=n.start(s)-this.bufferPadding,i=n.end(s)+this.bufferPadding,e>=r&&t<=i)return!0;if(t<=r)return!1}return!1}onManifestLoading(){this.removeAllFragments()}onFragLoaded(e,t){if(t.frag.sn==="initSegment"||t.frag.bitrateTest)return;const n=t.frag,r=t.part?null:t,i=wt(n);this.fragments[i]={body:n,appendedPTS:null,loaded:r,buffered:!1,range:Object.create(null)}}onBufferAppended(e,t){const{frag:n,part:r,timeRanges:i,type:s}=t;if(n.sn==="initSegment")return;const A=n.type;if(r){let c=this.activePartLists[A];c||(this.activePartLists[A]=c=[]),c.push(r)}this.timeRanges=i;const f=i[s];this.detectEvictedFragments(s,f,A,r)}onFragBuffered(e,t){this.detectPartialFragments(t)}hasFragment(e){const t=wt(e);return!!this.fragments[t]}hasFragments(e){const{fragments:t}=this,n=Object.keys(t);if(!e)return n.length>0;for(let r=n.length;r--;){const i=t[n[r]];if((i==null?void 0:i.body.type)===e)return!0}return!1}hasParts(e){var t;return!!((t=this.activePartLists[e])!=null&&t.length)}removeFragmentsInRange(e,t,n,r,i){r&&!this.hasGaps||Object.keys(this.fragments).forEach(s=>{const A=this.fragments[s];if(!A)return;const f=A.body;f.type!==n||r&&!f.gap||f.start<t&&f.end>e&&(A.buffered||i)&&this.removeFragment(f)})}removeFragment(e){const t=wt(e);e.clearElementaryStreamInfo();const n=this.activePartLists[e.type];if(n){const r=e.sn;this.activePartLists[e.type]=Je(n,i=>i.fragment.sn!==r)}delete this.fragments[t],e.endList&&delete this.endListFragments[e.type]}removeAllFragments(){var e;this.fragments=Object.create(null),this.endListFragments=Object.create(null),this.activePartLists=Object.create(null),this.hasGaps=!1;const t=(e=this.hls)==null||(e=e.latestLevelDetails)==null?void 0:e.partList;t&&t.forEach(n=>n.clearElementaryStreamInfo())}}function Nt(a){var e,t,n;return a.buffered&&!!(a.body.gap||(e=a.range.video)!=null&&e.partial||(t=a.range.audio)!=null&&t.partial||(n=a.range.audiovideo)!=null&&n.partial)}function wt(a){return`${a.type}_${a.level}_${a.sn}`}function Je(a,e){return a.filter(t=>{const n=e(t);return n||t.clearElementaryStreamInfo(),n})}var At={cbc:0,ctr:1};class Bt{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 At.cbc:return this.subtle.decrypt({name:"AES-CBC",iv:this.aesIV},t,e);case At.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 mt(a){const e=a.byteLength,t=e&&new DataView(a.buffer).getUint8(e-1);return t?a.slice(0,e-t):a}class bt{constructor(){this.rcon=[0,1,2,4,8,16,32,64,128,27,54],this.subMix=[new Uint32Array(256),new Uint32Array(256),new Uint32Array(256),new Uint32Array(256)],this.invSubMix=[new Uint32Array(256),new Uint32Array(256),new Uint32Array(256),new Uint32Array(256)],this.sBox=new Uint32Array(256),this.invSBox=new Uint32Array(256),this.key=new Uint32Array(0),this.ksRows=0,this.keySize=0,this.keySchedule=void 0,this.invKeySchedule=void 0,this.initTable()}uint8ArrayToUint32Array_(e){const t=new DataView(e),n=new Uint32Array(4);for(let r=0;r<4;r++)n[r]=t.getUint32(r*4);return n}initTable(){const e=this.sBox,t=this.invSBox,n=this.subMix,r=n[0],i=n[1],s=n[2],A=n[3],f=this.invSubMix,c=f[0],m=f[1],y=f[2],B=f[3],D=new Uint32Array(256);let L=0,se=0,X=0;for(X=0;X<256;X++)X<128?D[X]=X<<1:D[X]=X<<1^283;for(X=0;X<256;X++){let xe=se^se<<1^se<<2^se<<3^se<<4;xe=xe>>>8^xe&255^99,e[L]=xe,t[xe]=L;const at=D[L],We=D[at],Mt=D[We];let qt=D[xe]*257^xe*16843008;r[L]=qt<<24|qt>>>8,i[L]=qt<<16|qt>>>16,s[L]=qt<<8|qt>>>24,A[L]=qt,qt=Mt*16843009^We*65537^at*257^L*16843008,c[xe]=qt<<24|qt>>>8,m[xe]=qt<<16|qt>>>16,y[xe]=qt<<8|qt>>>24,B[xe]=qt,L?(L=at^D[D[D[Mt^at]]],se^=D[D[se]]):L=se=1}}expandKey(e){const t=this.uint8ArrayToUint32Array_(e);let n=!0,r=0;for(;r<t.length&&n;)n=t[r]===this.key[r],r++;if(n)return;this.key=t;const i=this.keySize=t.length;if(i!==4&&i!==6&&i!==8)throw new Error("Invalid aes key size="+i);const s=this.ksRows=(i+6+1)*4;let A,f;const c=this.keySchedule=new Uint32Array(s),m=this.invKeySchedule=new Uint32Array(s),y=this.sBox,B=this.rcon,D=this.invSubMix,L=D[0],se=D[1],X=D[2],xe=D[3];let at,We;for(A=0;A<s;A++){if(A<i){at=c[A]=t[A];continue}We=at,A%i===0?(We=We<<8|We>>>24,We=y[We>>>24]<<24|y[We>>>16&255]<<16|y[We>>>8&255]<<8|y[We&255],We^=B[A/i|0]<<24):i>6&&A%i===4&&(We=y[We>>>24]<<24|y[We>>>16&255]<<16|y[We>>>8&255]<<8|y[We&255]),c[A]=at=(c[A-i]^We)>>>0}for(f=0;f<s;f++)A=s-f,f&3?We=c[A]:We=c[A-4],f<4||A<=4?m[f]=We:m[f]=L[y[We>>>24]]^se[y[We>>>16&255]]^X[y[We>>>8&255]]^xe[y[We&255]],m[f]=m[f]>>>0}networkToHostOrderSwap(e){return e<<24|(e&65280)<<8|(e&16711680)>>8|e>>>24}decrypt(e,t,n){const r=this.keySize+6,i=this.invKeySchedule,s=this.invSBox,A=this.invSubMix,f=A[0],c=A[1],m=A[2],y=A[3],B=this.uint8ArrayToUint32Array_(n);let D=B[0],L=B[1],se=B[2],X=B[3];const xe=new Int32Array(e),at=new Int32Array(xe.length);let We,Mt,qt,Dn,zt,un,gn,Yt,Nn,Cr,jr,ni,Yr,wr;const qr=this.networkToHostOrderSwap;for(;t<xe.length;){for(Nn=qr(xe[t]),Cr=qr(xe[t+1]),jr=qr(xe[t+2]),ni=qr(xe[t+3]),zt=Nn^i[0],un=ni^i[1],gn=jr^i[2],Yt=Cr^i[3],Yr=4,wr=1;wr<r;wr++)We=f[zt>>>24]^c[un>>16&255]^m[gn>>8&255]^y[Yt&255]^i[Yr],Mt=f[un>>>24]^c[gn>>16&255]^m[Yt>>8&255]^y[zt&255]^i[Yr+1],qt=f[gn>>>24]^c[Yt>>16&255]^m[zt>>8&255]^y[un&255]^i[Yr+2],Dn=f[Yt>>>24]^c[zt>>16&255]^m[un>>8&255]^y[gn&255]^i[Yr+3],zt=We,un=Mt,gn=qt,Yt=Dn,Yr=Yr+4;We=s[zt>>>24]<<24^s[un>>16&255]<<16^s[gn>>8&255]<<8^s[Yt&255]^i[Yr],Mt=s[un>>>24]<<24^s[gn>>16&255]<<16^s[Yt>>8&255]<<8^s[zt&255]^i[Yr+1],qt=s[gn>>>24]<<24^s[Yt>>16&255]<<16^s[zt>>8&255]<<8^s[un&255]^i[Yr+2],Dn=s[Yt>>>24]<<24^s[zt>>16&255]<<16^s[un>>8&255]<<8^s[gn&255]^i[Yr+3],at[t]=qr(We^D),at[t+1]=qr(Dn^L),at[t+2]=qr(qt^se),at[t+3]=qr(Mt^X),D=Nn,L=Cr,se=jr,X=ni,t=t+4}return at.buffer}}class An{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=En(this.aesMode);return this.subtle.importKey("raw",this.key,{name:e},!1,["encrypt","decrypt"])}}function En(a){switch(a){case At.cbc:return"AES-CBC";case At.ctr:return"AES-CTR";default:throw new Error(`[FastAESKey] invalid aes mode ${a}`)}}const In=16;class jn{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?mt(n):n}reset(){this.currentResult=null,this.currentIV=null,this.remainderData=null,this.softwareDecrypter&&(this.softwareDecrypter=null)}decrypt(e,t,n,r){return this.useSoftware?new Promise((i,s)=>{const A=ArrayBuffer.isView(e)?e:new Uint8Array(e);this.softwareDecrypt(A,t,n,r);const f=this.flush();f?i(f.buffer):s(new Error("[softwareDecrypt] Failed to decrypt data"))}):this.webCryptoDecrypt(new Uint8Array(e),t,n,r)}softwareDecrypt(e,t,n,r){const{currentIV:i,currentResult:s,remainderData:A}=this;if(r!==At.cbc||t.byteLength!==16)return ie.warn("SoftwareDecrypt: can only handle AES-128-CBC"),null;this.logOnce("JS AES decrypt"),A&&(e=qe(A,e),this.remainderData=null);const f=this.getValidChunk(e);if(!f.length)return null;i&&(n=i);let c=this.softwareDecrypter;c||(c=this.softwareDecrypter=new bt),c.expandKey(t);const m=s;return this.currentResult=c.decrypt(f.buffer,0,n),this.currentIV=f.slice(-16).buffer,m||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 An(this.subtle,t,r)}return this.fastAesKey.expandKey().then(i=>this.subtle?(this.logOnce("WebCrypto AES decrypt"),new Bt(this.subtle,new Uint8Array(n),r).decrypt(e.buffer,i)):Promise.reject(new Error("web crypto not initialized"))).catch(i=>(ie.warn(`[decrypter]: WebCrypto Error, disable WebCrypto API, ${i.name}: ${i.message}`),this.onWebCryptoError(e,t,n,r)))}onWebCryptoError(e,t,n,r){const i=this.enableSoftwareAES;if(i){this.useSoftware=!0,this.logEnabled=!0,this.softwareDecrypt(e,t,n,r);const s=this.flush();if(s)return s.buffer}throw new Error("WebCrypto"+(i?" and softwareDecrypt":"")+": failed to decrypt data")}getValidChunk(e){let t=e;const n=e.length-e.length%In;return n!==e.length&&(t=e.slice(0,n),this.remainderData=e.slice(n)),t}logOnce(e){this.logEnabled&&(ie.log(`[decrypter]: ${e}`),this.logEnabled=!1)}}const tr=Math.pow(2,17);class Yn{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 ir({type:ge.NETWORK_ERROR,details:G.FRAG_LOAD_ERROR,fatal:!1,frag:e,error:new Error(`Fragment does not have a ${n?"part list":"url"}`),networkDetails:null}));this.abort();const r=this.config,i=r.fLoader,s=r.loader;return new Promise((A,f)=>{if(this.loader&&this.loader.destroy(),e.gap)if(e.tagList.some(L=>L[0]==="GAP")){f(Pn(e));return}else e.gap=!1;const c=this.loader=i?new i(r):new s(r),m=ar(e);e.loader=c;const y=Xt(r.fragLoadPolicy.default),B={loadPolicy:y,timeout:y.maxLoadTimeMs,maxRetry:0,retryDelay:0,maxRetryDelay:0,highWaterMark:e.sn==="initSegment"?1/0:tr};e.stats=c.stats;const D={onSuccess:(L,se,X,xe)=>{this.resetLoader(e,c);let at=L.data;X.resetIV&&e.decryptdata&&(e.decryptdata.iv=new Uint8Array(at.slice(0,16)),at=at.slice(16)),A({frag:e,part:null,payload:at,networkDetails:xe})},onError:(L,se,X,xe)=>{this.resetLoader(e,c),f(new ir({type:ge.NETWORK_ERROR,details:G.FRAG_LOAD_ERROR,fatal:!1,frag:e,response:b({url:n,data:void 0},L),error:new Error(`HTTP Error ${L.code} ${L.text}`),networkDetails:X,stats:xe}))},onAbort:(L,se,X)=>{this.resetLoader(e,c),f(new ir({type:ge.NETWORK_ERROR,details:G.INTERNAL_ABORTED,fatal:!1,frag:e,error:new Error("Aborted"),networkDetails:X,stats:L}))},onTimeout:(L,se,X)=>{this.resetLoader(e,c),f(new ir({type:ge.NETWORK_ERROR,details:G.FRAG_LOAD_TIMEOUT,fatal:!1,frag:e,error:new Error(`Timeout after ${B.timeout}ms`),networkDetails:X,stats:L}))}};t&&(D.onProgress=(L,se,X,xe)=>t({frag:e,part:null,payload:X,networkDetails:xe})),c.load(m,B,D)})}loadPart(e,t,n){this.abort();const r=this.config,i=r.fLoader,s=r.loader;return new Promise((A,f)=>{if(this.loader&&this.loader.destroy(),e.gap||t.gap){f(Pn(e,t));return}const c=this.loader=i?new i(r):new s(r),m=ar(e,t);e.loader=c;const y=Xt(r.fragLoadPolicy.default),B={loadPolicy:y,timeout:y.maxLoadTimeMs,maxRetry:0,retryDelay:0,maxRetryDelay:0,highWaterMark:tr};t.stats=c.stats,c.load(m,B,{onSuccess:(D,L,se,X)=>{this.resetLoader(e,c),this.updateStatsFromPart(e,t);const xe={frag:e,part:t,payload:D.data,networkDetails:X};n(xe),A(xe)},onError:(D,L,se,X)=>{this.resetLoader(e,c),f(new ir({type:ge.NETWORK_ERROR,details:G.FRAG_LOAD_ERROR,fatal:!1,frag:e,part:t,response:b({url:m.url,data:void 0},D),error:new Error(`HTTP Error ${D.code} ${D.text}`),networkDetails:se,stats:X}))},onAbort:(D,L,se)=>{e.stats.aborted=t.stats.aborted,this.resetLoader(e,c),f(new ir({type:ge.NETWORK_ERROR,details:G.INTERNAL_ABORTED,fatal:!1,frag:e,part:t,error:new Error("Aborted"),networkDetails:se,stats:D}))},onTimeout:(D,L,se)=>{this.resetLoader(e,c),f(new ir({type:ge.NETWORK_ERROR,details:G.FRAG_LOAD_TIMEOUT,fatal:!1,frag:e,part:t,error:new Error(`Timeout after ${B.timeout}ms`),networkDetails:se,stats:D}))}})})}updateStatsFromPart(e,t){const n=e.stats,r=t.stats,i=r.total;if(n.loaded+=r.loaded,i){const f=Math.round(e.duration/t.duration),c=Math.min(Math.round(n.loaded/i),f),y=(f-c)*Math.round(n.loaded/c);n.total=n.loaded+y}else n.total=Math.max(n.loaded,n.total);const s=n.loading,A=r.loading;s.start?s.first+=A.first-A.start:(s.start=A.start,s.first=A.first),s.end=A.end}resetLoader(e,t){e.loader=null,this.loader===t&&(self.clearTimeout(this.partLoadTimeout),this.loader=null),t.destroy()}}function ar(a,e=null){const t=e||a,n={frag:a,part:e,responseType:"arraybuffer",url:t.url,headers:{},rangeStart:0,rangeEnd:0},r=t.byteRangeStartOffset,i=t.byteRangeEndOffset;if(V(r)&&V(i)){var s;let A=r,f=i;if(a.sn==="initSegment"&&yr((s=a.decryptdata)==null?void 0:s.method)){const c=i-r;c%16&&(f=i+(16-c%16)),r!==0&&(n.resetIV=!0,A=r-16)}n.rangeStart=A,n.rangeEnd=f}return n}function Pn(a,e){const t=new Error(`GAP ${a.gap?"tag":"attribute"} found`),n={type:ge.MEDIA_ERROR,details:G.FRAG_GAP,fatal:!1,frag:a,error:t,networkDetails:null};return e&&(n.part=e),(e||a).stats.aborted=!0,new ir(n)}function yr(a){return a==="AES-128"||a==="AES-256"}class ir extends Error{constructor(e){super(e.error.message),this.data=void 0,this.data=e}}class Kr extends H{constructor(e,t){super(e,t),this._boundTick=void 0,this._tickTimer=null,this._tickInterval=null,this._tickCallCount=0,this._boundTick=this.tick.bind(this)}destroy(){this.onHandlerDestroying(),this.onHandlerDestroyed()}onHandlerDestroying(){this.clearNextTick(),this.clearInterval()}onHandlerDestroyed(){}hasInterval(){return!!this._tickInterval}hasNextTick(){return!!this._tickTimer}setInterval(e){return this._tickInterval?!1:(this._tickCallCount=0,this._tickInterval=self.setInterval(this._boundTick,e),!0)}clearInterval(){return this._tickInterval?(self.clearInterval(this._tickInterval),this._tickInterval=null,!0):!1}clearNextTick(){return this._tickTimer?(self.clearTimeout(this._tickTimer),this._tickTimer=null,!0):!1}tick(){this._tickCallCount++,this._tickCallCount===1&&(this.doTick(),this._tickCallCount>1&&this.tickImmediate(),this._tickCallCount=0)}tickImmediate(){this.clearNextTick(),this._tickTimer=self.setTimeout(this._boundTick,0)}doTick(){}}class fr{constructor(e,t,n,r=0,i=-1,s=!1){this.level=void 0,this.sn=void 0,this.part=void 0,this.id=void 0,this.size=void 0,this.partial=void 0,this.transmuxing=hr(),this.buffering={audio:hr(),video:hr(),audiovideo:hr()},this.level=e,this.sn=t,this.id=n,this.size=r,this.part=i,this.partial=s}}function hr(){return{start:0,executeStart:0,executeEnd:0,end:0}}const Tr={length:0,start:()=>0,end:()=>0};class kn{static isBuffered(e,t){if(e){const n=kn.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=kn.getBuffered(e);return kn.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=kn.bufferedRanges(e);if(r.length)return kn.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((m,y)=>m.start-y.start||y.end-m.end);let r=-1,i=[];if(n)for(let m=0;m<e.length;m++){t>=e[m].start&&t<=e[m].end&&(r=m);const y=i.length;if(y){const B=i[y-1].end;e[m].start-B<n?e[m].end>B&&(i[y-1].end=e[m].end):i.push(e[m])}else i.push(e[m])}else i=e;let s=0,A,f=t,c=t;for(let m=0;m<i.length;m++){const y=i[m].start,B=i[m].end;if(r===-1&&t>=y&&t<=B&&(r=m),t+n>=y&&t<B)f=y,c=B,s=c-t;else if(t+n<y){A=y;break}}return{len:s,start:f||0,end:c||0,nextStart:A,buffered:e,bufferedIndex:r}}static getBuffered(e){try{return e.buffered||Tr}catch(t){return ie.log("failed to get media.buffered",t),Tr}}}const pr=/\{\$([a-zA-Z0-9-_]+)\}/g;function cr(a){return pr.test(a)}function Wn(a,e){if(a.variableList!==null||a.hasVariableRefs){const t=a.variableList;return e.replace(pr,n=>{const r=n.substring(2,n.length-1),i=t==null?void 0:t[r];return i===void 0?(a.playlistParsingError||(a.playlistParsingError=new Error(`Missing preceding EXT-X-DEFINE tag for Variable Reference: "${r}"`)),n):i})}return e}function ur(a,e,t){let n=a.variableList;n||(a.variableList=n={});let r,i;if("QUERYPARAM"in e){r=e.QUERYPARAM;try{const s=new self.URL(t).searchParams;if(s.has(r))i=s.get(r);else throw new Error(`"${r}" does not match any query parameter in URI: "${t}"`)}catch(s){a.playlistParsingError||(a.playlistParsingError=new Error(`EXT-X-DEFINE QUERYPARAM: ${s.message}`))}}else r=e.NAME,i=e.VALUE;r in n?a.playlistParsingError||(a.playlistParsingError=new Error(`EXT-X-DEFINE duplicate Variable Name declarations: "${r}"`)):n[r]=i||""}function Ir(a,e,t){const n=e.IMPORT;if(t&&n in t){let r=a.variableList;r||(a.variableList=r={}),r[n]=t[n]}else a.playlistParsingError||(a.playlistParsingError=new Error(`EXT-X-DEFINE IMPORT attribute not found in Multivariant Playlist: "${n}"`))}const Vr=/^(\d+)x(\d+)$/,Ur=/(.+?)=(".*?"|.*?)(?:,|$)/g;class or{constructor(e,t){typeof e=="string"&&(e=or.parseAttrList(e,t)),_(this,e)}get clientAttrs(){return Object.keys(this).filter(e=>e.substring(0,2)==="X-")}decimalInteger(e){const t=parseInt(this[e],10);return t>Number.MAX_SAFE_INTEGER?1/0:t}hexadecimalInteger(e){if(this[e]){let t=(this[e]||"0x").slice(2);t=(t.length&1?"0":"")+t;const n=new Uint8Array(t.length/2);for(let r=0;r<t.length/2;r++)n[r]=parseInt(t.slice(r*2,r*2+2),16);return n}return null}hexadecimalIntegerAsNumber(e){const t=parseInt(this[e],16);return t>Number.MAX_SAFE_INTEGER?1/0:t}decimalFloatingPoint(e){return parseFloat(this[e])}optionalFloat(e,t){const n=this[e];return n?parseFloat(n):t}enumeratedString(e){return this[e]}enumeratedStringList(e,t){const n=this[e];return(n?n.split(/[ ,]+/):[]).reduce((r,i)=>(r[i.toLowerCase()]=!0,r),t)}bool(e){return this[e]==="YES"}decimalResolution(e){const t=Vr.exec(this[e]);if(t!==null)return{width:parseInt(t[1],10),height:parseInt(t[2],10)}}static parseAttrList(e,t){let n;const r={},i='"';for(Ur.lastIndex=0;(n=Ur.exec(e))!==null;){const s=n[1].trim();let A=n[2];const f=A.indexOf(i)===0&&A.lastIndexOf(i)===A.length-1;let c=!1;if(f)A=A.slice(1,-1);else switch(s){case"IV":case"SCTE35-CMD":case"SCTE35-IN":case"SCTE35-OUT":c=!0}if(t&&(f||c))A=Wn(t,A);else if(!c&&!f)switch(s){case"CLOSED-CAPTIONS":if(A==="NONE")break;case"ALLOWED-CPC":case"CLASS":case"ASSOC-LANGUAGE":case"AUDIO":case"BYTERANGE":case"CHANNELS":case"CHARACTERISTICS":case"CODECS":case"DATA-ID":case"END-DATE":case"GROUP-ID":case"ID":case"IMPORT":case"INSTREAM-ID":case"KEYFORMAT":case"KEYFORMATVERSIONS":case"LANGUAGE":case"NAME":case"PATHWAY-ID":case"QUERYPARAM":case"RECENTLY-REMOVED-DATERANGES":case"SERVER-URI":case"STABLE-RENDITION-ID":case"STABLE-VARIANT-ID":case"START-DATE":case"SUBTITLES":case"SUPPLEMENTAL-CODECS":case"URI":case"VALUE":case"VIDEO":case"X-ASSET-LIST":case"X-ASSET-URI":ie.warn(`${e}: attribute ${s} is missing quotes`)}r[s]=A}return r}}const hi="com.apple.hls.interstitial";function Ki(a){return a!=="ID"&&a!=="CLASS"&&a!=="CUE"&&a!=="START-DATE"&&a!=="DURATION"&&a!=="END-DATE"&&a!=="END-ON-NEXT"}function Ji(a){return a==="SCTE35-OUT"||a==="SCTE35-IN"||a==="SCTE35-CMD"}class ds{constructor(e,t,n=0){var r;if(this.attr=void 0,this.tagAnchor=void 0,this.tagOrder=void 0,this._startDate=void 0,this._endDate=void 0,this._dateAtEnd=void 0,this._cue=void 0,this._badValueForSameId=void 0,this.tagAnchor=(t==null?void 0:t.tagAnchor)||null,this.tagOrder=(r=t==null?void 0:t.tagOrder)!=null?r:n,t){const i=t.attr;for(const s in i)if(Object.prototype.hasOwnProperty.call(e,s)&&e[s]!==i[s]){ie.warn(`DATERANGE tag attribute: "${s}" does not match for tags with ID: "${e.ID}"`),this._badValueForSameId=s;break}e=_(new or({}),i,e)}if(this.attr=e,t?(this._startDate=t._startDate,this._cue=t._cue,this._endDate=t._endDate,this._dateAtEnd=t._dateAtEnd):this._startDate=new Date(e["START-DATE"]),"END-DATE"in this.attr){const i=(t==null?void 0:t.endDate)||new Date(this.attr["END-DATE"]);V(i.getTime())&&(this._endDate=i)}}get id(){return this.attr.ID}get class(){return this.attr.CLASS}get cue(){const e=this._cue;return e===void 0?this._cue=this.attr.enumeratedStringList(this.attr.CUE?"CUE":"X-CUE",{pre:!1,post:!1,once:!1}):e}get startTime(){const{tagAnchor:e}=this;return e===null||e.programDateTime===null?(ie.warn(`Expected tagAnchor Fragment with PDT set for DateRange "${this.id}": ${e}`),NaN):e.start+(this.startDate.getTime()-e.programDateTime)/1e3}get startDate(){return this._startDate}get endDate(){const e=this._endDate||this._dateAtEnd;if(e)return e;const t=this.duration;return t!==null?this._dateAtEnd=new Date(this._startDate.getTime()+t*1e3):null}get duration(){if("DURATION"in this.attr){const e=this.attr.decimalFloatingPoint("DURATION");if(V(e))return e}else if(this._endDate)return(this._endDate.getTime()-this._startDate.getTime())/1e3;return null}get plannedDuration(){return"PLANNED-DURATION"in this.attr?this.attr.decimalFloatingPoint("PLANNED-DURATION"):null}get endOnNext(){return this.attr.bool("END-ON-NEXT")}get isInterstitial(){return this.class===hi}get isValid(){return!!this.id&&!this._badValueForSameId&&V(this.startDate.getTime())&&(this.duration===null||this.duration>=0)&&(!this.endOnNext||!!this.class)&&(!this.attr.CUE||!this.cue.pre&&!this.cue.post||this.cue.pre!==this.cue.post)&&(!this.isInterstitial||"X-ASSET-URI"in this.attr||"X-ASSET-LIST"in this.attr)}}const ss=10;class zi{constructor(e){this.PTSKnown=!1,this.alignedSliding=!1,this.averagetargetduration=void 0,this.endCC=0,this.endSN=0,this.fragments=void 0,this.fragmentHint=void 0,this.partList=null,this.dateRanges=void 0,this.dateRangeTagCount=0,this.live=!0,this.requestScheduled=-1,this.ageHeader=0,this.advancedDateTime=void 0,this.updated=!0,this.advanced=!0,this.misses=0,this.startCC=0,this.startSN=0,this.startTimeOffset=null,this.targetduration=0,this.totalduration=0,this.type=null,this.url=void 0,this.m3u8="",this.version=null,this.canBlockReload=!1,this.canSkipUntil=0,this.canSkipDateRanges=!1,this.skippedSegments=0,this.recentlyRemovedDateranges=void 0,this.partHoldBack=0,this.holdBack=0,this.partTarget=0,this.preloadHint=void 0,this.renditionReports=void 0,this.tuneInGoal=0,this.deltaUpdateFailed=void 0,this.driftStartTime=0,this.driftEndTime=0,this.driftStart=0,this.driftEnd=0,this.encryptedFragments=void 0,this.playlistParsingError=null,this.variableList=null,this.hasVariableRefs=!1,this.appliedTimelineOffset=void 0,this.fragments=[],this.encryptedFragments=[],this.dateRanges={},this.url=e}reloaded(e){if(!e){this.advanced=!0,this.updated=!0;return}const t=this.lastPartSn-e.lastPartSn,n=this.lastPartIndex-e.lastPartIndex;this.updated=this.endSN!==e.endSN||!!n||!!t||!this.live,this.advanced=this.endSN>e.endSN||t>0||t===0&&n>0,this.updated||this.advanced?this.misses=Math.floor(e.misses*.6):this.misses=e.misses+1}hasKey(e){return this.encryptedFragments.some(t=>{let n=t.decryptdata;return n||(t.setKeyFormat(e.keyFormat),n=t.decryptdata),!!n&&e.matches(n)})}get hasProgramDateTime(){return this.fragments.length?V(this.fragments[this.fragments.length-1].programDateTime):!1}get levelTargetDuration(){return this.averagetargetduration||this.targetduration||ss}get drift(){const e=this.driftEndTime-this.driftStartTime;return e>0?(this.driftEnd-this.driftStart)*1e3/e:1}get edge(){return this.partEnd||this.fragmentEnd}get partEnd(){var e;return(e=this.partList)!=null&&e.length?this.partList[this.partList.length-1].end:this.fragmentEnd}get fragmentEnd(){return this.fragments.length?this.fragments[this.fragments.length-1].end:0}get fragmentStart(){return this.fragments.length?this.fragments[0].start:0}get age(){return this.advancedDateTime?Math.max(Date.now()-this.advancedDateTime,0)/1e3:0}get lastPartIndex(){var e;return(e=this.partList)!=null&&e.length?this.partList[this.partList.length-1].index:-1}get maxPartIndex(){const e=this.partList;if(e){const t=this.lastPartIndex;if(t!==-1){for(let n=e.length;n--;)if(e[n].index>t)return e[n].index;return t}}return 0}get lastPartSn(){var e;return(e=this.partList)!=null&&e.length?this.partList[this.partList.length-1].fragment.sn:this.endSN}get expired(){if(this.live&&this.age&&this.misses<3){const e=this.partEnd-this.fragmentStart;return this.age>Math.max(e,this.totalduration)+this.levelTargetDuration}return!1}}function ii(a,e){return a.length===e.length?!a.some((t,n)=>t!==e[n]):!1}function ci(a,e){return!a&&!e?!0:!a||!e?!1:ii(a,e)}function Pi(a){return a==="AES-128"||a==="AES-256"||a==="AES-256-CTR"}function ai(a){switch(a){case"AES-128":case"AES-256":return At.cbc;case"AES-256-CTR":return At.ctr;default:throw new Error(`invalid full segment method ${a}`)}}function si(a){return Uint8Array.from(atob(a),e=>e.charCodeAt(0))}function li(a){return Uint8Array.from(unescape(encodeURIComponent(a)),e=>e.charCodeAt(0))}function gr(a){const e=li(a).subarray(0,16),t=new Uint8Array(16);return t.set(e,16-e.length),t}function Fr(a){const e=function(n,r,i){const s=n[r];n[r]=n[i],n[i]=s};e(a,0,3),e(a,1,2),e(a,4,5),e(a,6,7)}function Gr(a){const e=a.split(":");let t=null;if(e[0]==="data"&&e.length===2){const n=e[1].split(";"),r=n[n.length-1].split(",");if(r.length===2){const i=r[0]==="base64",s=r[1];i?(n.splice(-1,1),t=si(s)):t=gr(s)}}return t}const $r=typeof self!="undefined"?self:void 0;var Dr={CLEARKEY:"org.w3.clearkey",FAIRPLAY:"com.apple.fps",PLAYREADY:"com.microsoft.playready",WIDEVINE:"com.widevine.alpha"},Xr={CLEARKEY:"org.w3.clearkey",FAIRPLAY:"com.apple.streamingkeydelivery",PLAYREADY:"com.microsoft.playready",WIDEVINE:"urn:uuid:edef8ba9-79d6-4ace-a3c8-27dcd51d21ed"};function ti(a){switch(a){case Xr.FAIRPLAY:return Dr.FAIRPLAY;case Xr.PLAYREADY:return Dr.PLAYREADY;case Xr.WIDEVINE:return Dr.WIDEVINE;case Xr.CLEARKEY:return Dr.CLEARKEY}}function rr(a){switch(a){case Dr.FAIRPLAY:return Xr.FAIRPLAY;case Dr.PLAYREADY:return Xr.PLAYREADY;case Dr.WIDEVINE:return Xr.WIDEVINE;case Dr.CLEARKEY:return Xr.CLEARKEY}}function _r(a){const{drmSystems:e,widevineLicenseUrl:t}=a,n=e?[Dr.FAIRPLAY,Dr.WIDEVINE,Dr.PLAYREADY,Dr.CLEARKEY].filter(r=>!!e[r]):[];return!n[Dr.WIDEVINE]&&t&&n.push(Dr.WIDEVINE),n}const Er=function(a){return $r!=null&&(a=$r.navigator)!=null&&a.requestMediaKeySystemAccess?self.navigator.requestMediaKeySystemAccess.bind(self.navigator):null}();function ui(a,e,t,n){let r;switch(a){case Dr.FAIRPLAY:r=["cenc","sinf"];break;case Dr.WIDEVINE:case Dr.PLAYREADY:r=["cenc"];break;case Dr.CLEARKEY:r=["cenc","keyids"];break;default:throw new Error(`Unknown key-system: ${a}`)}return fi(r,e,t,n)}function fi(a,e,t,n){return[{initDataTypes:a,persistentState:n.persistentState||"optional",distinctiveIdentifier:n.distinctiveIdentifier||"optional",sessionTypes:n.sessionTypes||[n.sessionType||"temporary"],audioCapabilities:e.map(i=>({contentType:`audio/mp4; codecs=${i}`,robustness:n.audioRobustness||"",encryptionScheme:n.audioEncryptionScheme||null})),videoCapabilities:t.map(i=>({contentType:`video/mp4; codecs=${i}`,robustness:n.videoRobustness||"",encryptionScheme:n.videoEncryptionScheme||null}))}]}function Gi(a){var e;return!!a&&(a.sessionType==="persistent-license"||!!((e=a.sessionTypes)!=null&&e.some(t=>t==="persistent-license")))}function as(a){const e=new Uint16Array(a.buffer,a.byteOffset,a.byteLength/2),t=String.fromCharCode.apply(null,Array.from(e)),n=t.substring(t.indexOf("<"),t.length),s=new DOMParser().parseFromString(n,"text/xml").getElementsByTagName("KID")[0];if(s){const A=s.childNodes[0]?s.childNodes[0].nodeValue:s.getAttribute("VALUE");if(A){const f=si(A).subarray(0,16);return Fr(f),f}}return null}let Bi={};class ls{static clearKeyUriToKeyIdMap(){Bi={}}constructor(e,t,n,r=[1],i=null,s){this.uri=void 0,this.method=void 0,this.keyFormat=void 0,this.keyFormatVersions=void 0,this.encrypted=void 0,this.isCommonEncryption=void 0,this.iv=null,this.key=null,this.keyId=null,this.pssh=null,this.method=e,this.uri=t,this.keyFormat=n,this.keyFormatVersions=r,this.iv=i,this.encrypted=e?e!=="NONE":!1,this.isCommonEncryption=this.encrypted&&!Pi(e),s!=null&&s.startsWith("0x")&&(this.keyId=new Uint8Array($(s)))}matches(e){return e.uri===this.uri&&e.method===this.method&&e.encrypted===this.encrypted&&e.keyFormat===this.keyFormat&&ii(e.keyFormatVersions,this.keyFormatVersions)&&ci(e.iv,this.iv)&&ci(e.keyId,this.keyId)}isSupported(){if(this.method){if(Pi(this.method)||this.method==="NONE")return!0;if(this.keyFormat==="identity")return this.method==="SAMPLE-AES";switch(this.keyFormat){case Xr.FAIRPLAY:case Xr.WIDEVINE:case Xr.PLAYREADY:case Xr.CLEARKEY:return["SAMPLE-AES","SAMPLE-AES-CENC","SAMPLE-AES-CTR"].indexOf(this.method)!==-1}}return!1}getDecryptData(e){if(!this.encrypted||!this.uri)return null;if(Pi(this.method)&&this.uri&&!this.iv){typeof e!="number"&&(ie.warn(`missing IV for initialization segment with method="${this.method}" - compliance issue`),e=0);const n=gi(e);return new ls(this.method,this.uri,"identity",this.keyFormatVersions,n)}if(this.pssh&&this.keyId)return this;const t=Gr(this.uri);if(t)switch(this.keyFormat){case Xr.WIDEVINE:if(this.pssh=t,!this.keyId&&t.length>=22){const n=t.length-22;this.keyId=t.subarray(n,n+16)}break;case Xr.PLAYREADY:{const n=new Uint8Array([154,4,240,121,152,64,66,134,171,146,230,91,224,136,95,149]);this.pssh=dn(n,null,t),this.keyId=as(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=Bi[this.uri];if(!n){const r=Object.keys(Bi).length%Number.MAX_SAFE_INTEGER;n=new Uint8Array(16),new DataView(n.buffer,12,4).setUint32(0,r),Bi[this.uri]=n}this.keyId=n}return this}}function gi(a){const e=new Uint8Array(16);for(let t=12;t<16;t++)e[t]=a>>8*(15-t)&255;return e}const la=/#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,Ms=/#EXT-X-MEDIA:(.*)/g,ws=/^#EXT(?:INF|-X-TARGETDURATION):/m,Fi=new RegExp([/#EXTINF:\s*(\d*(?:\.\d+)?)(?:,(.*)\s+)?/.source,/(?!#) *(\S[^\r\n]*)/.source,/#.*/.source].join("|"),"g"),ra=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 Es{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 E.buildAbsoluteURL(t,e,{alwaysNormalize:!0})}static isMediaPlaylist(e){return ws.test(e)}static parseMasterPlaylist(e,t){const n=cr(e),r={contentSteering:null,levels:[],playlistParsingError:null,sessionData:null,sessionKeys:null,startTimeOffset:null,variableList:null,hasVariableRefs:n},i=[];la.lastIndex=0;let s;for(;(s=la.exec(e))!=null;)if(s[1]){var A;const c=new or(s[1],r),m=Wn(r,s[2]),y={attrs:c,bitrate:c.decimalInteger("BANDWIDTH")||c.decimalInteger("AVERAGE-BANDWIDTH"),name:c.NAME,url:Es.resolve(m,t)},B=c.decimalResolution("RESOLUTION");B&&(y.width=B.width,y.height=B.height),pa(c.CODECS,y);const D=c["SUPPLEMENTAL-CODECS"];D&&(y.supplemental={},pa(D,y.supplemental)),(A=y.unknownCodecs)!=null&&A.length||i.push(y),r.levels.push(y)}else if(s[3]){const c=s[3],m=s[4];switch(c){case"SESSION-DATA":{const y=new or(m,r),B=y["DATA-ID"];B&&(r.sessionData===null&&(r.sessionData={}),r.sessionData[B]=y);break}case"SESSION-KEY":{const y=js(m,t,r);y.encrypted&&y.isSupported()?(r.sessionKeys===null&&(r.sessionKeys=[]),r.sessionKeys.push(y)):ie.warn(`[Keys] Ignoring invalid EXT-X-SESSION-KEY tag: "${m}"`);break}case"DEFINE":{{const y=new or(m,r);ur(r,y,t)}break}case"CONTENT-STEERING":{const y=new or(m,r);r.contentSteering={uri:Es.resolve(y["SERVER-URI"],t),pathwayId:y["PATHWAY-ID"]||"."};break}case"START":{r.startTimeOffset=Ys(m);break}}}const f=i.length>0&&i.length<r.levels.length;return r.levels=f?i:r.levels,r.levels.length===0&&(r.playlistParsingError=new Error("no levels found in manifest")),r}static parseMasterPlaylistMedia(e,t,n){let r;const i={},s=n.levels,A={AUDIO:s.map(c=>({id:c.attrs.AUDIO,audioCodec:c.audioCodec})),SUBTITLES:s.map(c=>({id:c.attrs.SUBTITLES,textCodec:c.textCodec})),"CLOSED-CAPTIONS":[]};let f=0;for(Ms.lastIndex=0;(r=Ms.exec(e))!==null;){const c=new or(r[1],n),m=c.TYPE;if(m){const y=A[m],B=i[m]||[];i[m]=B;const D=c.LANGUAGE,L=c["ASSOC-LANGUAGE"],se=c.CHANNELS,X=c.CHARACTERISTICS,xe=c["INSTREAM-ID"],at={attrs:c,bitrate:0,id:f++,groupId:c["GROUP-ID"]||"",name:c.NAME||D||"",type:m,default:c.bool("DEFAULT"),autoselect:c.bool("AUTOSELECT"),forced:c.bool("FORCED"),lang:D,url:c.URI?Es.resolve(c.URI,t):""};if(L&&(at.assocLang=L),se&&(at.channels=se),X&&(at.characteristics=X),xe&&(at.instreamId=xe),y!=null&&y.length){const We=Es.findGroup(y,at.groupId)||y[0];ms(at,We,"audioCodec"),ms(at,We,"textCodec")}B.push(at)}}return i}static parseLevelPlaylist(e,t,n,r,i,s){var A;const f={url:t},c=new zi(t),m=c.fragments,y=[];let B=null,D=0,L=0,se=0,X=0,xe=0,at=null,We=new Ke(r,f),Mt,qt,Dn,zt=-1,un=!1,gn=null,Yt;if(Fi.lastIndex=0,c.m3u8=e,c.hasVariableRefs=cr(e),((A=Fi.exec(e))==null?void 0:A[0])!=="#EXTM3U")return c.playlistParsingError=new Error("Missing format identifier #EXTM3U"),c;for(;(Mt=Fi.exec(e))!==null;){un&&(un=!1,We=new Ke(r,f),We.playlistOffset=se,We.setStart(se),We.sn=D,We.cc=X,xe&&(We.bitrate=xe),We.level=n,B&&(We.initSegment=B,B.rawProgramDateTime&&(We.rawProgramDateTime=B.rawProgramDateTime,B.rawProgramDateTime=null),gn&&(We.setByteRange(gn),gn=null)));const ni=Mt[1];if(ni){We.duration=parseFloat(ni);const Yr=(" "+Mt[2]).slice(1);We.title=Yr||null,We.tagList.push(Yr?["INF",ni,Yr]:["INF",ni])}else if(Mt[3]){if(V(We.duration)){We.playlistOffset=se,We.setStart(se),Dn&&Os(We,Dn,c),We.sn=D,We.level=n,We.cc=X,m.push(We);const Yr=(" "+Mt[3]).slice(1);We.relurl=Wn(c,Yr),vs(We,at,y),at=We,se+=We.duration,D++,L=0,un=!0}}else{if(Mt=Mt[0].match(ra),!Mt){ie.warn("No matches on slow regex match for level playlist!");continue}for(qt=1;qt<Mt.length&&Mt[qt]===void 0;qt++);const Yr=(" "+Mt[qt]).slice(1),wr=(" "+Mt[qt+1]).slice(1),qr=Mt[qt+2]?(" "+Mt[qt+2]).slice(1):null;switch(Yr){case"BYTERANGE":at?We.setByteRange(wr,at):We.setByteRange(wr);break;case"PROGRAM-DATE-TIME":We.rawProgramDateTime=wr,We.tagList.push(["PROGRAM-DATE-TIME",wr]),zt===-1&&(zt=m.length);break;case"PLAYLIST-TYPE":c.type&&Ds(c,Yr,Mt),c.type=wr.toUpperCase();break;case"MEDIA-SEQUENCE":c.startSN!==0?Ds(c,Yr,Mt):m.length>0&&Js(c,Yr,Mt),D=c.startSN=parseInt(wr);break;case"SKIP":{c.skippedSegments&&Ds(c,Yr,Mt);const Nr=new or(wr,c),ei=Nr.decimalInteger("SKIPPED-SEGMENTS");if(V(ei)){c.skippedSegments+=ei;for(let Br=ei;Br--;)m.push(null);D+=ei}const _i=Nr.enumeratedString("RECENTLY-REMOVED-DATERANGES");_i&&(c.recentlyRemovedDateranges=(c.recentlyRemovedDateranges||[]).concat(_i.split(" ")));break}case"TARGETDURATION":c.targetduration!==0&&Ds(c,Yr,Mt),c.targetduration=Math.max(parseInt(wr),1);break;case"VERSION":c.version!==null&&Ds(c,Yr,Mt),c.version=parseInt(wr);break;case"INDEPENDENT-SEGMENTS":break;case"ENDLIST":c.live||Ds(c,Yr,Mt),c.live=!1;break;case"#":(wr||qr)&&We.tagList.push(qr?[wr,qr]:[wr]);break;case"DISCONTINUITY":X++,We.tagList.push(["DIS"]);break;case"GAP":We.gap=!0,We.tagList.push([Yr]);break;case"BITRATE":We.tagList.push([Yr,wr]),xe=parseInt(wr)*1e3,V(xe)?We.bitrate=xe:xe=0;break;case"DATERANGE":{const Nr=new or(wr,c),ei=new ds(Nr,c.dateRanges[Nr.ID],c.dateRangeTagCount);c.dateRangeTagCount++,ei.isValid||c.skippedSegments?c.dateRanges[ei.id]=ei:ie.warn(`Ignoring invalid DATERANGE tag: "${wr}"`),We.tagList.push(["EXT-X-DATERANGE",wr]);break}case"DEFINE":{{const Nr=new or(wr,c);"IMPORT"in Nr?Ir(c,Nr,s):ur(c,Nr,t)}break}case"DISCONTINUITY-SEQUENCE":c.startCC!==0?Ds(c,Yr,Mt):m.length>0&&Js(c,Yr,Mt),c.startCC=X=parseInt(wr);break;case"KEY":{const Nr=js(wr,t,c);if(Nr.isSupported()){if(Nr.method==="NONE"){Dn=void 0;break}Dn||(Dn={});const ei=Dn[Nr.keyFormat];ei!=null&&ei.matches(Nr)||(ei&&(Dn=_({},Dn)),Dn[Nr.keyFormat]=Nr)}else ie.warn(`[Keys] Ignoring invalid EXT-X-KEY tag: "${wr}"`);break}case"START":c.startTimeOffset=Ys(wr);break;case"MAP":{const Nr=new or(wr,c);if(We.duration){const ei=new Ke(r,f);cs(ei,Nr,n,Dn),B=ei,We.initSegment=B,B.rawProgramDateTime&&!We.rawProgramDateTime&&(We.rawProgramDateTime=B.rawProgramDateTime)}else{const ei=We.byteRangeEndOffset;if(ei){const _i=We.byteRangeStartOffset;gn=`${ei-_i}@${_i}`}else gn=null;cs(We,Nr,n,Dn),B=We,un=!0}B.cc=X;break}case"SERVER-CONTROL":{Yt&&Ds(c,Yr,Mt),Yt=new or(wr),c.canBlockReload=Yt.bool("CAN-BLOCK-RELOAD"),c.canSkipUntil=Yt.optionalFloat("CAN-SKIP-UNTIL",0),c.canSkipDateRanges=c.canSkipUntil>0&&Yt.bool("CAN-SKIP-DATERANGES"),c.partHoldBack=Yt.optionalFloat("PART-HOLD-BACK",0),c.holdBack=Yt.optionalFloat("HOLD-BACK",0);break}case"PART-INF":{c.partTarget&&Ds(c,Yr,Mt);const Nr=new or(wr);c.partTarget=Nr.decimalFloatingPoint("PART-TARGET");break}case"PART":{let Nr=c.partList;Nr||(Nr=c.partList=[]);const ei=L>0?Nr[Nr.length-1]:void 0,_i=L++,Br=new or(wr,c),br=new Ct(Br,We,f,_i,ei);Nr.push(br),We.duration+=br.duration;break}case"PRELOAD-HINT":{const Nr=new or(wr,c);c.preloadHint=Nr;break}case"RENDITION-REPORT":{const Nr=new or(wr,c);c.renditionReports=c.renditionReports||[],c.renditionReports.push(Nr);break}default:ie.warn(`line parsed but not handled: ${Mt}`);break}}}at&&!at.relurl?(m.pop(),se-=at.duration,c.partList&&(c.fragmentHint=at)):c.partList&&(vs(We,at,y),We.cc=X,c.fragmentHint=We,Dn&&Os(We,Dn,c)),c.targetduration||(c.playlistParsingError=new Error("#EXT-X-TARGETDURATION is required"));const Nn=m.length,Cr=m[0],jr=m[Nn-1];if(se+=c.skippedSegments*c.targetduration,se>0&&Nn&&jr){c.averagetargetduration=se/Nn;const ni=jr.sn;c.endSN=ni!=="initSegment"?ni:0,c.live||(jr.endList=!0),zt>0&&(Xs(m,zt),Cr&&y.unshift(Cr))}return c.fragmentHint&&(se+=c.fragmentHint.duration),c.totalduration=se,y.length&&c.dateRangeTagCount&&Cr&&Ws(y,c),c.endCC=X,c}}function Ws(a,e){let t=a.length;if(!t)if(e.hasProgramDateTime){const A=e.fragments[e.fragments.length-1];a.push(A),t++}else return;const n=a[t-1],r=e.live?1/0:e.totalduration,i=Object.keys(e.dateRanges);for(let A=i.length;A--;){const f=e.dateRanges[i[A]],c=f.startDate.getTime();f.tagAnchor=n.ref;for(let m=t;m--;){var s;if(((s=a[m])==null?void 0:s.sn)<e.startSN)break;const y=Qs(e,c,a,m,r);if(y!==-1){f.tagAnchor=e.fragments[y].ref;break}}}}function Qs(a,e,t,n,r){const i=t[n];if(i){const A=i.programDateTime;if(e>=A||n===0){var s;const f=(((s=t[n+1])==null?void 0:s.start)||r)-i.start;if(e<=A+f*1e3){const c=t[n].sn-a.startSN;if(c<0)return-1;const m=a.fragments;if(m.length>t.length){const B=(t[n+1]||m[m.length-1]).sn-a.startSN;for(let D=B;D>c;D--){const L=m[D].programDateTime;if(e>=L&&e<L+m[D].duration*1e3)return D}}return c}}}return-1}function js(a,e,t){var n,r;const i=new or(a,t),s=(n=i.METHOD)!=null?n:"",A=i.URI,f=i.hexadecimalInteger("IV"),c=i.KEYFORMATVERSIONS,m=(r=i.KEYFORMAT)!=null?r:"identity";A&&i.IV&&!f&&ie.error(`Invalid IV: ${i.IV}`);const y=A?Es.resolve(A,e):"",B=(c||"1").split("/").map(Number).filter(Number.isFinite);return new ls(s,y,m,B,f,i.KEYID)}function Ys(a){const t=new or(a).decimalFloatingPoint("TIME-OFFSET");return V(t)?t:null}function pa(a,e){let t=(a||"").split(/[ ,]+/).filter(n=>n);["video","audio","text"].forEach(n=>{const r=t.filter(i=>Ln(i,n));r.length&&(e[`${n}Codec`]=r.map(i=>i.split("/")[0]).join(","),t=t.filter(i=>r.indexOf(i)===-1))}),e.unknownCodecs=t}function ms(a,e,t){const n=e[t];n&&(a[t]=n)}function Xs(a,e){let t=a[e];for(let n=e;n--;){const r=a[n];if(!r)return;r.programDateTime=t.programDateTime-r.duration*1e3,t=r}}function vs(a,e,t){a.rawProgramDateTime?t.push(a):e!=null&&e.programDateTime&&(a.programDateTime=e.endProgramDateTime)}function cs(a,e,t,n){a.relurl=e.URI,e.BYTERANGE&&a.setByteRange(e.BYTERANGE),a.level=t,a.sn="initSegment",n&&(a.levelkeys=n),a.initSegment=null}function Os(a,e,t){a.levelkeys=e;const{encryptedFragments:n}=t;(!n.length||n[n.length-1].levelkeys!==e)&&Object.keys(e).some(r=>e[r].isCommonEncryption)&&n.push(a)}function Ds(a,e,t){a.playlistParsingError=new Error(`#EXT-X-${e} must not appear more than once (${t[0]})`)}function Js(a,e,t){a.playlistParsingError=new Error(`#EXT-X-${e} must appear before the first Media Segment (${t[0]})`)}function hs(a,e){const t=e.startPTS;if(V(t)){let n=0,r;e.sn>a.sn?(n=t-a.start,r=a):(n=a.start-t,r=e),r.duration!==n&&r.setDuration(n)}else e.sn>a.sn?a.cc===e.cc&&a.minEndPTS?e.setStart(a.start+(a.minEndPTS-a.start)):e.setStart(a.start+a.duration):e.setStart(Math.max(a.start-e.duration,0))}function os(a,e,t,n,r,i,s){n-t<=0&&(s.warn("Fragment should have a positive duration",e),n=t+e.duration,i=r+e.duration);let f=t,c=n;const m=e.startPTS,y=e.endPTS;if(V(m)){const xe=Math.abs(m-t);a&&xe>a.totalduration?s.warn(`media timestamps and playlist times differ by ${xe}s for level ${e.level} ${a.url}`):V(e.deltaPTS)?e.deltaPTS=Math.max(xe,e.deltaPTS):e.deltaPTS=xe,f=Math.max(t,m),t=Math.min(t,m),r=e.startDTS!==void 0?Math.min(r,e.startDTS):r,c=Math.min(n,y),n=Math.max(n,y),i=e.endDTS!==void 0?Math.max(i,e.endDTS):i}const B=t-e.start;e.start!==0&&e.setStart(t),e.setDuration(n-e.start),e.startPTS=t,e.maxStartPTS=f,e.startDTS=r,e.endPTS=n,e.minEndPTS=c,e.endDTS=i;const D=e.sn;if(!a||D<a.startSN||D>a.endSN)return 0;let L;const se=D-a.startSN,X=a.fragments;for(X[se]=e,L=se;L>0;L--)hs(X[L],X[L-1]);for(L=se;L<X.length-1;L++)hs(X[L],X[L+1]);return a.fragmentHint&&hs(X[X.length-1],a.fragmentHint),a.PTSKnown=a.alignedSliding=!0,B}function oi(a,e,t){if(a===e)return;let n=null;const r=a.fragments;for(let m=r.length-1;m>=0;m--){const y=r[m].initSegment;if(y){n=y;break}}a.fragmentHint&&delete a.fragmentHint.endPTS;let i;Si(a,e,(m,y,B,D)=>{if((!e.startCC||e.skippedSegments)&&y.cc!==m.cc){const L=m.cc-y.cc;for(let se=B;se<D.length;se++)D[se].cc+=L;e.endCC=D[D.length-1].cc}V(m.startPTS)&&V(m.endPTS)&&(y.setStart(y.startPTS=m.startPTS),y.startDTS=m.startDTS,y.maxStartPTS=m.maxStartPTS,y.endPTS=m.endPTS,y.endDTS=m.endDTS,y.minEndPTS=m.minEndPTS,y.setDuration(m.endPTS-m.startPTS),y.duration&&(i=y),e.PTSKnown=e.alignedSliding=!0),m.hasStreams&&(y.elementaryStreams=m.elementaryStreams),y.loader=m.loader,m.hasStats&&(y.stats=m.stats),m.initSegment&&(y.initSegment=m.initSegment,n=m.initSegment)});const s=e.fragments,A=e.fragmentHint?s.concat(e.fragmentHint):s;if(n&&A.forEach(m=>{var y;m&&(!m.initSegment||m.initSegment.relurl===((y=n)==null?void 0:y.relurl))&&(m.initSegment=n)}),e.skippedSegments){if(e.deltaUpdateFailed=s.some(m=>!m),e.deltaUpdateFailed){t.warn("[level-helper] Previous playlist missing segments skipped in delta playlist");for(let m=e.skippedSegments;m--;)s.shift();e.startSN=s[0].sn}else{e.canSkipDateRanges&&(e.dateRanges=Ai(a.dateRanges,e,t));const m=a.fragments.filter(y=>y.rawProgramDateTime);if(a.hasProgramDateTime&&!e.hasProgramDateTime)for(let y=1;y<A.length;y++)A[y].programDateTime===null&&vs(A[y],A[y-1],m);Ws(m,e)}e.endCC=s[s.length-1].cc}if(!e.startCC){var f;const m=Ps(a,e.startSN-1);e.startCC=(f=m==null?void 0:m.cc)!=null?f:s[0].cc}Mi(a.partList,e.partList,(m,y)=>{y.elementaryStreams=m.elementaryStreams,y.stats=m.stats}),i?os(e,i,i.startPTS,i.endPTS,i.startDTS,i.endDTS,t):Wi(a,e),s.length&&(e.totalduration=e.edge-s[0].start),e.driftStartTime=a.driftStartTime,e.driftStart=a.driftStart;const c=e.advancedDateTime;if(e.advanced&&c){const m=e.edge;e.driftStart||(e.driftStartTime=c,e.driftStart=m),e.driftEndTime=c,e.driftEnd=m}else e.driftEndTime=a.driftEndTime,e.driftEnd=a.driftEnd,e.advancedDateTime=a.advancedDateTime;e.requestScheduled===-1&&(e.requestScheduled=a.requestScheduled)}function Ai(a,e,t){const{dateRanges:n,recentlyRemovedDateranges:r}=e,i=_({},a);r&&r.forEach(f=>{delete i[f]});const A=Object.keys(i).length;return A?(Object.keys(n).forEach(f=>{const c=i[f],m=new ds(n[f].attr,c);m.isValid?(i[f]=m,c||(m.tagOrder+=A)):t.warn(`Ignoring invalid Playlist Delta Update DATERANGE tag: "${Sn(n[f].attr)}"`)}),i):n}function Mi(a,e,t){if(a&&e){let n=0;for(let r=0,i=a.length;r<=i;r++){const s=a[r],A=e[r+n];s&&A&&s.index===A.index&&s.fragment.sn===A.fragment.sn?t(s,A):n--}}}function Si(a,e,t){const n=e.skippedSegments,r=Math.max(a.startSN,e.startSN)-e.startSN,i=(a.fragmentHint?1:0)+(n?e.endSN:Math.min(a.endSN,e.endSN))-e.startSN,s=e.startSN-a.startSN,A=e.fragmentHint?e.fragments.concat(e.fragmentHint):e.fragments,f=a.fragmentHint?a.fragments.concat(a.fragmentHint):a.fragments;for(let c=r;c<=i;c++){const m=f[s+c];let y=A[c];if(n&&!y&&m&&(y=e.fragments[c]=m),m&&y){t(m,y,c,A);const B=m.relurl,D=y.relurl;if(B&&$s(B,D)){e.playlistParsingError=es(`media sequence mismatch ${y.sn}:`,a,e,m,y);return}else if(m.cc!==y.cc){e.playlistParsingError=es(`discontinuity sequence mismatch (${m.cc}!=${y.cc})`,a,e,m,y);return}}}}function es(a,e,t,n,r){return new Error(`${a} ${r.url}
|
|
Playlist starting @${e.startSN}
|
|
${e.m3u8}
|
|
|
|
Playlist starting @${t.startSN}
|
|
${t.m3u8}`)}function Wi(a,e,t=!0){const n=e.startSN+e.skippedSegments-a.startSN,r=a.fragments,i=n>=0;let s=0;if(i&&n<r.length)s=r[n].start;else if(i&&e.startSN===a.endSN+1)s=a.fragmentEnd;else if(i&&t)s=a.fragmentStart+n*e.levelTargetDuration;else if(!e.skippedSegments&&e.fragmentStart===0)s=a.fragmentStart;else return;Rs(e,s)}function Rs(a,e){if(e){const t=a.fragments;for(let n=a.skippedSegments;n<t.length;n++)t[n].addStart(e);a.fragmentHint&&a.fragmentHint.addStart(e)}}function Ls(a,e=1/0){let t=1e3*a.targetduration;if(a.updated){const n=a.fragments;if(n.length&&t*4>e){const i=n[n.length-1].duration*1e3;i<t&&(t=i)}}else t/=2;return Math.round(t)}function Ps(a,e,t){if(!a)return null;let n=a.fragments[e-a.startSN];return n||(n=a.fragmentHint,n&&n.sn===e)?n:e<a.startSN&&t&&t.sn===e?t:null}function Ui(a,e,t){return a?xs(a.partList,e,t):null}function xs(a,e,t){if(a)for(let n=a.length;n--;){const r=a[n];if(r.index===t&&r.fragment.sn===e)return r}return null}function Gs(a){a.forEach((e,t)=>{var n;(n=e.details)==null||n.fragments.forEach(r=>{r.level=t,r.initSegment&&(r.initSegment.level=t)})})}function $s(a,e){return a!==e&&e?ia(a)!==ia(e):!1}function ia(a){return a.replace(/\?[^?]*$/,"")}function ua(a,e){for(let n=0,r=a.length;n<r;n++){var t;if(((t=a[n])==null?void 0:t.cc)===e)return a[n]}return null}function ts(a,e){return!!(a&&e.startCC<a.endCC&&e.endCC>a.startCC)}function Di(a,e){const t=a.start+e;a.startPTS=t,a.setStart(t),a.endPTS=t+a.duration}function $i(a,e){const t=e.fragments;for(let n=0,r=t.length;n<r;n++)Di(t[n],a);e.fragmentHint&&Di(e.fragmentHint,a),e.alignedSliding=!0}function _s(a,e){a&&(ji(e,a),e.alignedSliding||Ts(e,a),!e.alignedSliding&&!e.skippedSegments&&Wi(a,e,!1))}function ji(a,e){if(!ts(e,a))return;const t=Math.min(e.endCC,a.endCC),n=ua(e.fragments,t),r=ua(a.fragments,t);if(!n||!r)return;ie.log(`Aligning playlist at start of dicontinuity sequence ${t}`);const i=n.start-r.start;$i(i,a)}function Ts(a,e){if(!a.hasProgramDateTime||!e.hasProgramDateTime)return;const t=a.fragments,n=e.fragments;if(!t.length||!n.length)return;let r,i;const s=Math.min(e.endCC,a.endCC);e.startCC<s&&a.startCC<s&&(r=ua(n,s),i=ua(t,s)),(!r||!i)&&(r=n[Math.floor(n.length/2)],i=ua(t,r.cc)||t[Math.floor(t.length/2)]);const A=r.programDateTime,f=i.programDateTime;if(!A||!f)return;const c=(f-A)/1e3-(i.start-r.start);$i(c,a)}function gs(a,e,t){ys(a,e,t),a.addEventListener(e,t)}function ys(a,e,t){a.removeEventListener(e,t)}const Ga={toString:function(a){let e="";const t=a.length;for(let n=0;n<t;n++)e+=`[${a.start(n).toFixed(3)}-${a.end(n).toFixed(3)}]`;return e}},Fn={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 sa extends Kr{constructor(e,t,n,r,i){super(r,e.logger),this.hls=void 0,this.fragPrevious=null,this.fragCurrent=null,this.fragmentTracker=void 0,this.transmuxer=null,this._state=Fn.STOPPED,this.playlistType=void 0,this.media=null,this.mediaBuffer=null,this.config=void 0,this.bitrateTest=!1,this.lastCurrentTime=0,this.nextLoadPosition=0,this.startPosition=0,this.startTimeOffset=null,this.retryDate=0,this.levels=null,this.fragmentLoader=void 0,this.keyLoader=void 0,this.levelLastLoaded=null,this.startFragRequested=!1,this.decrypter=void 0,this.initPTS=[],this.buffering=!0,this.loadingParts=!1,this.loopSn=void 0,this.onMediaSeeking=()=>{const{config:s,fragCurrent:A,media:f,mediaBuffer:c,state:m}=this,y=f?f.currentTime:0,B=kn.bufferInfo(c||f,y,s.maxBufferHole),D=!B.len;if(this.log(`Media seeking to ${V(y)?y.toFixed(3):y}, state: ${m}, ${D?"out of":"in"} buffer`),this.state===Fn.ENDED)this.resetLoadingState();else if(A){const L=s.maxFragLookUpTolerance,se=A.start-L,X=A.start+A.duration+L;if(D||X<B.start||se>B.end){const xe=y>X;(y<se||xe)&&(xe&&A.loader&&(this.log(`Cancelling fragment load for seek (sn: ${A.sn})`),A.abortRequests(),this.resetLoadingState()),this.fragPrevious=null)}}if(f){this.fragmentTracker.removeFragmentsInRange(y,1/0,this.playlistType,!0);const L=this.lastCurrentTime;if(y>L&&(this.lastCurrentTime=y),!this.loadingParts){const se=Math.max(B.end,y),X=this.shouldLoadParts(this.getLevelDetails(),se);X&&(this.log(`LL-Part loading ON after seeking to ${y.toFixed(2)} with buffer @${se.toFixed(2)}`),this.loadingParts=X)}}this.hls.hasEnoughToStart||(this.log(`Setting ${D?"startPosition":"nextLoadPosition"} to ${y} for seek without enough to start`),this.nextLoadPosition=y,D&&(this.startPosition=y)),D&&this.state===Fn.IDLE&&this.tickImmediate()},this.onMediaEnded=()=>{this.log("setting startPosition to 0 because media ended"),this.startPosition=this.lastCurrentTime=0},this.playlistType=i,this.hls=e,this.fragmentLoader=new Yn(e.config),this.keyLoader=n,this.fragmentTracker=t,this.config=e.config,this.decrypter=new jn(e.config)}registerListeners(){const{hls:e}=this;e.on(g.MEDIA_ATTACHED,this.onMediaAttached,this),e.on(g.MEDIA_DETACHING,this.onMediaDetaching,this),e.on(g.MANIFEST_LOADING,this.onManifestLoading,this),e.on(g.MANIFEST_LOADED,this.onManifestLoaded,this),e.on(g.ERROR,this.onError,this)}unregisterListeners(){const{hls:e}=this;e.off(g.MEDIA_ATTACHED,this.onMediaAttached,this),e.off(g.MEDIA_DETACHING,this.onMediaDetaching,this),e.off(g.MANIFEST_LOADING,this.onManifestLoading,this),e.off(g.MANIFEST_LOADED,this.onManifestLoaded,this),e.off(g.ERROR,this.onError,this)}doTick(){this.onTickEnd()}onTickEnd(){}startLoad(e){}stopLoad(){if(this.state===Fn.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=Fn.STOPPED}get startPositionValue(){const{nextLoadPosition:e,startPosition:t}=this;return t===-1&&e?e:t}get bufferingEnabled(){return this.buffering}pauseBuffering(){this.buffering=!1}resumeBuffering(){this.buffering=!0}get inFlightFrag(){return{frag:this.fragCurrent,state:this.state}}_streamEnded(e,t){if(t.live||!this.media)return!1;const n=e.end||0,r=this.config.timelineOffset||0;if(n<=r)return!1;const i=e.buffered;this.config.maxBufferHole&&i&&i.length>1&&(e=kn.bufferedInfo(i,e.start,0));const s=e.nextStart;if(s&&s>r&&s<t.edge||this.media.currentTime<e.start)return!1;const f=t.partList;if(f!=null&&f.length){const m=f[f.length-1];return kn.isBuffered(this.media,m.start+m.duration/2)}const c=t.fragments[t.fragments.length-1].type;return this.fragmentTracker.isEndListAppended(c)}getLevelDetails(){if(this.levels&&this.levelLastLoaded!==null)return this.levelLastLoaded.details}get timelineOffset(){const e=this.config.timelineOffset;if(e){var t;return((t=this.getLevelDetails())==null?void 0:t.appliedTimelineOffset)||e}return 0}onMediaAttached(e,t){const n=this.media=this.mediaBuffer=t.media;gs(n,"seeking",this.onMediaSeeking),gs(n,"ended",this.onMediaEnded);const r=this.config;this.levels&&r.autoStartLoad&&this.state===Fn.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),ys(r,"seeking",this.onMediaSeeking),ys(r,"ended",this.onMediaEnded),this.keyLoader&&!n&&this.keyLoader.detach(),this.media=this.mediaBuffer=null,this.loopSn=void 0,n){this.resetLoadingState(),this.resetTransmuxer();return}this.loadingParts=!1,this.fragmentTracker.removeAllFragments(),this.stopLoad()}}onManifestLoading(){this.initPTS=[],this.levels=this.levelLastLoaded=this.fragCurrent=null,this.lastCurrentTime=this.startPosition=0,this.startFragRequested=!1}onError(e,t){}onManifestLoaded(e,t){this.startTimeOffset=t.startTimeOffset}onHandlerDestroying(){this.stopLoad(),this.transmuxer&&(this.transmuxer.destroy(),this.transmuxer=null),super.onHandlerDestroying(),this.hls=this.onMediaSeeking=this.onMediaEnded=null}onHandlerDestroyed(){this.state=Fn.STOPPED,this.fragmentLoader&&this.fragmentLoader.destroy(),this.keyLoader&&this.keyLoader.destroy(),this.decrypter&&this.decrypter.destroy(),this.hls=this.log=this.warn=this.decrypter=this.keyLoader=this.fragmentLoader=this.fragmentTracker=null,super.onHandlerDestroyed()}loadFragment(e,t,n){this.startFragRequested=!0,this._loadFragForPlayback(e,t,n)}_loadFragForPlayback(e,t,n){const r=i=>{const s=i.frag;if(this.fragContextChanged(s)){this.warn(`${s.type} sn: ${s.sn}${i.part?" part: "+i.part.index:""} of ${this.fragInfo(s,!1,i.part)}) was dropped during download.`),this.fragmentTracker.removeFragment(s);return}s.stats.chunkCount++,this._handleFragmentLoadProgress(i)};this._doFragLoad(e,t,n,r).then(i=>{if(!i)return;const s=this.state,A=i.frag;if(this.fragContextChanged(A)){(s===Fn.FRAG_LOADING||!this.fragCurrent&&s===Fn.PARSING)&&(this.fragmentTracker.removeFragment(A),this.state=Fn.IDLE);return}"payload"in i&&(this.log(`Loaded ${A.type} sn: ${A.sn} of ${this.playlistLabel()} ${A.level}`),this.hls.trigger(g.FRAG_LOADED,i)),this._handleFragmentLoadComplete(i)}).catch(i=>{this.state===Fn.STOPPED||this.state===Fn.ERROR||(this.warn(`Frag error: ${(i==null?void 0:i.message)||i}`),this.resetFragmentLoading(e))})}clearTrackerIfNeeded(e){var t;const{fragmentTracker:n}=this;if(n.getState(e)===dt.APPENDING){const i=e.type,s=this.getFwdBufferInfo(this.mediaBuffer,i),A=Math.max(e.duration,s?s.len:this.config.maxBufferLength),f=this.backtrackFragment;((f?e.sn-f.sn:0)===1||this.reduceMaxBufferLength(A,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)===dt.PARTIAL&&n.removeFragment(e))}checkLiveUpdate(e){if(e.updated&&!e.live){const t=e.fragments[e.fragments.length-1];this.fragmentTracker.detectPartialFragments({frag:t,part:null,stats:t.stats,id:t.type})}e.fragments[0]||(e.deltaUpdateFailed=!0)}waitForLive(e){const t=e.details;return(t==null?void 0:t.live)&&t.type!=="EVENT"&&(this.levelLastLoaded!==e||t.expired)}flushMainBuffer(e,t,n=null){if(!(e-t))return;const r={startOffset:e,endOffset:t,type:n};this.hls.trigger(g.BUFFER_FLUSHING,r)}_loadInitSegment(e,t){this._doFragLoad(e,t).then(n=>{const r=n==null?void 0:n.frag;if(!r||this.fragContextChanged(r)||!this.levels)throw new Error("init load aborted");return n}).then(n=>{const{hls:r}=this,{frag:i,payload:s}=n,A=i.decryptdata;if(s&&s.byteLength>0&&A!=null&&A.key&&A.iv&&Pi(A.method)){const f=self.performance.now();return this.decrypter.decrypt(new Uint8Array(s),A.key.buffer,A.iv.buffer,ai(A.method)).catch(c=>{throw r.trigger(g.ERROR,{type:ge.MEDIA_ERROR,details:G.FRAG_DECRYPT_ERROR,fatal:!1,error:c,reason:c.message,frag:i}),c}).then(c=>{const m=self.performance.now();return r.trigger(g.FRAG_DECRYPTED,{frag:i,payload:c,stats:{tstart:f,tdecrypt:m}}),n.payload=c,this.completeInitSegmentLoad(n)})}return this.completeInitSegmentLoad(n)}).catch(n=>{this.state===Fn.STOPPED||this.state===Fn.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!==Fn.STOPPED&&(this.state=Fn.IDLE),e.frag.data=new Uint8Array(e.payload),n.parsing.start=n.buffering.start=self.performance.now(),n.parsing.end=n.buffering.end=self.performance.now(),this.tick()}unhandledEncryptionError(e,t){var n,r;const i=e.tracks;if(i&&!t.encrypted&&((n=i.audio)!=null&&n.encrypted||(r=i.video)!=null&&r.encrypted)&&(!this.config.emeEnabled||!this.keyLoader.emeController)){const s=this.media,A=new Error(`Encrypted track with no key in ${this.fragInfo(t)} (media ${s?"attached mediaKeys: "+s.mediaKeys:"detached"})`);return this.warn(A.message),!s||s.mediaKeys?!1:(this.hls.trigger(g.ERROR,{type:ge.KEY_SYSTEM_ERROR,details:G.KEY_SYSTEM_NO_KEYS,fatal:!1,error:A,frag:t}),this.resetTransmuxer(),!0)}return!1}fragContextChanged(e){const{fragCurrent:t}=this;return!e||!t||e.sn!==t.sn||e.level!==t.level}fragBufferedComplete(e,t){const n=this.mediaBuffer?this.mediaBuffer:this.media;if(this.log(`Buffered ${e.type} sn: ${e.sn}${t?" part: "+t.index:""} of ${this.fragInfo(e,!1,t)} > buffer:${n?Ga.toString(kn.getBuffered(n)):"(detached)"})`),Ve(e)){var r;if(e.type!==le.SUBTITLE){const s=e.elementaryStreams;if(!Object.keys(s).some(A=>!!s[A])){this.state=Fn.IDLE;return}}const i=(r=this.levels)==null?void 0:r[e.level];i!=null&&i.fragmentError&&(this.log(`Resetting level fragment error count of ${i.fragmentError} on frag buffered`),i.fragmentError=0)}this.state=Fn.IDLE}_handleFragmentLoadComplete(e){const{transmuxer:t}=this;if(!t)return;const{frag:n,part:r,partsLoaded:i}=e,s=!i||i.length===0||i.some(f=>!f),A=new fr(n.level,n.sn,n.stats.chunkCount+1,0,r?r.index:-1,!s);t.flush(A)}_handleFragmentLoadProgress(e){}_doFragLoad(e,t,n=null,r){var i;this.fragCurrent=e;const s=t.details;if(!this.levels||!s)throw new Error(`frag load aborted, missing level${s?"":" detail"}s`);let A=null;if(e.encrypted&&!((i=e.decryptdata)!=null&&i.key)){if(this.log(`Loading key for ${e.sn} of [${s.startSN}-${s.endSN}], ${this.playlistLabel()} ${e.level}`),this.state=Fn.KEY_LOADING,this.fragCurrent=e,A=this.keyLoader.load(e).then(B=>{if(!this.fragContextChanged(B.frag))return this.hls.trigger(g.KEY_LOADED,B),this.state===Fn.KEY_LOADING&&(this.state=Fn.IDLE),B}),this.hls.trigger(g.KEY_LOADING,{frag:e}),this.fragCurrent===null)return this.log("context changed in KEY_LOADING"),Promise.resolve(null)}else e.encrypted||(A=this.keyLoader.loadClear(e,s.encryptedFragments,this.startFragRequested),A&&this.log("[eme] blocking frag load until media-keys acquired"));const f=this.fragPrevious;if(Ve(e)&&(!f||e.sn!==f.sn)){const B=this.shouldLoadParts(t.details,e.end);B!==this.loadingParts&&(this.log(`LL-Part loading ${B?"ON":"OFF"} loading sn ${f==null?void 0:f.sn}->${e.sn}`),this.loadingParts=B)}if(n=Math.max(e.start,n||0),this.loadingParts&&Ve(e)){const B=s.partList;if(B&&r){n>s.fragmentEnd&&s.fragmentHint&&(e=s.fragmentHint);const D=this.getNextPart(B,e,n);if(D>-1){const L=B[D];e=this.fragCurrent=L.fragment,this.log(`Loading ${e.type} sn: ${e.sn} part: ${L.index} (${D}/${B.length-1}) of ${this.fragInfo(e,!1,L)}) cc: ${e.cc} [${s.startSN}-${s.endSN}], target: ${parseFloat(n.toFixed(3))}`),this.nextLoadPosition=L.start+L.duration,this.state=Fn.FRAG_LOADING;let se;return A?se=A.then(X=>!X||this.fragContextChanged(X.frag)?null:this.doFragPartsLoad(e,L,t,r)).catch(X=>this.handleFragLoadError(X)):se=this.doFragPartsLoad(e,L,t,r).catch(X=>this.handleFragLoadError(X)),this.hls.trigger(g.FRAG_LOADING,{frag:e,part:L,targetBufferTime:n}),this.fragCurrent===null?Promise.reject(new Error("frag load aborted, context changed in FRAG_LOADING parts")):se}else if(!e.url||this.loadedEndOfParts(B,n))return Promise.resolve(null)}}if(Ve(e)&&this.loadingParts){var c;this.log(`LL-Part loading OFF after next part miss @${n.toFixed(2)} Check buffer at sn: ${e.sn} loaded parts: ${(c=s.partList)==null?void 0:c.filter(B=>B.loaded).map(B=>`[${B.start}-${B.end}]`)}`),this.loadingParts=!1}else if(!e.url)return Promise.resolve(null);this.log(`Loading ${e.type} sn: ${e.sn} of ${this.fragInfo(e,!1)}) cc: ${e.cc} ${"["+s.startSN+"-"+s.endSN+"]"}, target: ${parseFloat(n.toFixed(3))}`),V(e.sn)&&!this.bitrateTest&&(this.nextLoadPosition=e.start+e.duration),this.state=Fn.FRAG_LOADING;const m=this.config.progressive;let y;return m&&A?y=A.then(B=>!B||this.fragContextChanged(B.frag)?null:this.fragmentLoader.load(e,r)).catch(B=>this.handleFragLoadError(B)):y=Promise.all([this.fragmentLoader.load(e,m?r:void 0),A]).then(([B])=>(!m&&r&&r(B),B)).catch(B=>this.handleFragLoadError(B)),this.hls.trigger(g.FRAG_LOADING,{frag:e,targetBufferTime:n}),this.fragCurrent===null?Promise.reject(new Error("frag load aborted, context changed in FRAG_LOADING")):y}doFragPartsLoad(e,t,n,r){return new Promise((i,s)=>{var A;const f=[],c=(A=n.details)==null?void 0:A.partList,m=y=>{this.fragmentLoader.loadPart(e,y,r).then(B=>{f[y.index]=B;const D=B.part;this.hls.trigger(g.FRAG_LOADED,B);const L=Ui(n.details,e.sn,y.index+1)||xs(c,e.sn,y.index+1);if(L)m(L);else return i({frag:e,part:D,partsLoaded:f})}).catch(s)};m(t)})}handleFragLoadError(e){if("data"in e){const t=e.data;t.frag&&t.details===G.INTERNAL_ABORTED?this.handleFragLoadAborted(t.frag,t.part):t.frag&&t.type===ge.KEY_SYSTEM_ERROR?(t.frag.abortRequests(),this.resetFragmentLoading(t.frag)):this.hls.trigger(g.ERROR,t)}else this.hls.trigger(g.ERROR,{type:ge.OTHER_ERROR,details:G.INTERNAL_EXCEPTION,err:e,error:e,fatal:!0});return null}_handleTransmuxerFlush(e){const t=this.getCurrentContext(e);if(!t||this.state!==Fn.PARSING){!this.fragCurrent&&this.state!==Fn.STOPPED&&this.state!==Fn.ERROR&&(this.state=Fn.IDLE);return}const{frag:n,part:r,level:i}=t,s=self.performance.now();n.stats.parsing.end=s,r&&(r.stats.parsing.end=s);const A=this.getLevelDetails(),c=A&&n.sn>A.endSN||this.shouldLoadParts(A,n.end);c!==this.loadingParts&&(this.log(`LL-Part loading ${c?"ON":"OFF"} after parsing segment ending @${n.end.toFixed(2)}`),this.loadingParts=c),this.updateLevelTiming(n,r,i,e.partial)}shouldLoadParts(e,t){if(this.config.lowLatencyMode){if(!e)return this.loadingParts;if(e.partList){var n;const i=e.partList[0];if(i.fragment.type===le.SUBTITLE)return!1;const s=i.end+(((n=e.fragmentHint)==null?void 0:n.duration)||0);if(t>=s){var r;if((this.hls.hasEnoughToStart?((r=this.media)==null?void 0:r.currentTime)||this.lastCurrentTime:this.getLoadPosition())>i.start-i.fragment.duration)return!0}}}return!1}getCurrentContext(e){const{levels:t,fragCurrent:n}=this,{level:r,sn:i,part:s}=e;if(!(t!=null&&t[r]))return this.warn(`Levels object was unset while buffering fragment ${i} of ${this.playlistLabel()} ${r}. The current chunk will not be buffered.`),null;const A=t[r],f=A.details,c=s>-1?Ui(f,i,s):null,m=c?c.fragment:Ps(f,i,n);return m?(n&&n!==m&&(m.stats=n.stats),{frag:m,part:c,level:A}):null}bufferFragmentData(e,t,n,r,i){if(this.state!==Fn.PARSING)return;const{data1:s,data2:A}=e;let f=s;if(A&&(f=qe(s,A)),!f.length)return;const c=this.initPTS[t.cc],m=c?-c.baseTime/c.timescale:void 0,y={type:e.type,frag:t,part:n,chunkMeta:r,offset:m,parent:t.type,data:f};if(this.hls.trigger(g.BUFFER_APPENDING,y),e.dropped&&e.independent&&!n){if(i)return;this.flushBufferGap(t)}}flushBufferGap(e){const t=this.media;if(!t)return;if(!kn.isBuffered(t,t.currentTime)){this.flushMainBuffer(0,e.start);return}const n=t.currentTime,r=kn.bufferInfo(t,n,0),i=e.duration,s=Math.min(this.config.maxFragLookUpTolerance*2,i*.25),A=Math.max(Math.min(e.start-s,r.end-s),n+s);e.start-A>s&&this.flushMainBuffer(A,e.start)}getFwdBufferInfo(e,t){var n;const r=this.getLoadPosition();if(!V(r))return null;const s=this.lastCurrentTime>r||(n=this.media)!=null&&n.paused?0:this.config.maxBufferHole;return this.getFwdBufferInfoAtPos(e,r,t,s)}getFwdBufferInfoAtPos(e,t,n,r){const i=kn.bufferInfo(e,t,r);if(i.len===0&&i.nextStart!==void 0){const s=this.fragmentTracker.getBufferedFrag(t,n);if(s&&(i.nextStart<=s.end||s.gap)){const A=Math.max(Math.min(i.nextStart,s.end)-t,r);return kn.bufferInfo(e,t,A)}}return i}getMaxBufferLength(e){const{config:t}=this;let n;return e?n=Math.max(8*t.maxBufferSize/e,t.maxBufferLength):n=t.maxBufferLength,Math.min(n,t.maxMaxBufferLength)}reduceMaxBufferLength(e,t){const n=this.config,r=Math.max(Math.min(e-t,n.maxBufferLength),t),i=Math.max(e-t*3,n.maxMaxBufferLength/2,r);return i>=r?(n.maxMaxBufferLength=i,this.warn(`Reduce max buffer length to ${i}s`),!0):!1}getAppendedFrag(e,t=le.MAIN){const n=this.fragmentTracker?this.fragmentTracker.getAppendedFrag(e,t):null;return n&&"fragment"in n?n.fragment:n}getNextFragment(e,t){const n=t.fragments,r=n.length;if(!r)return null;const{config:i}=this,s=n[0].start,A=i.lowLatencyMode&&!!t.partList;let f=null;if(t.live){const y=i.initialLiveManifestSize;if(r<y)return this.warn(`Not enough fragments to start playback (have: ${r}, need: ${y})`),null;if(!t.PTSKnown&&!this.startFragRequested&&this.startPosition===-1||e<s){var c;A&&!this.loadingParts&&(this.log("LL-Part loading ON for initial live fragment"),this.loadingParts=!0),f=this.getInitialLiveFragment(t);const B=this.hls.startPosition,D=this.hls.liveSyncPosition,L=f?(B!==-1&&B>=s?B:D)||f.start:e;this.log(`Setting startPosition to ${L} to match start frag at live edge. mainStart: ${B} liveSyncPosition: ${D} frag.start: ${(c=f)==null?void 0:c.start}`),this.startPosition=this.nextLoadPosition=L}}else e<=s&&(f=n[0]);if(!f){const y=this.loadingParts?t.partEnd:t.fragmentEnd;f=this.getFragmentAtPosition(e,y,t)}let m=this.filterReplacedPrimary(f,t);if(!m&&f){const y=f.sn-t.startSN;m=this.filterReplacedPrimary(n[y+1]||null,t)}return this.mapToInitFragWhenRequired(m)}isLoopLoading(e,t){const n=this.fragmentTracker.getState(e);return(n===dt.OK||n===dt.PARTIAL&&!!e.gap)&&this.nextLoadPosition>t}getNextFragmentLoopLoading(e,t,n,r,i){let s=null;if(e.gap&&(s=this.getNextFragment(this.nextLoadPosition,t),s&&!s.gap&&n.nextStart)){const A=this.getFwdBufferInfoAtPos(this.mediaBuffer?this.mediaBuffer:this.media,n.nextStart,r,0);if(A!==null&&n.len+A.len>=i){const f=s.sn;return this.loopSn!==f&&(this.log(`buffer full after gaps in "${r}" playlist starting at sn: ${f}`),this.loopSn=f),null}}return this.loopSn=void 0,s}get primaryPrefetch(){if(ma(this.config)){var e;if((e=this.hls.interstitialsManager)==null||(e=e.playingItem)==null?void 0:e.event)return!0}return!1}filterReplacedPrimary(e,t){if(!e)return e;if(ma(this.config)&&e.type!==le.SUBTITLE){const n=this.hls.interstitialsManager,r=n==null?void 0:n.bufferingItem;if(r){const s=r.event;if(s){if(s.appendInPlace||Math.abs(e.start-r.start)>1||r.start===0)return null}else if(e.end<=r.start&&(t==null?void 0:t.live)===!1||e.start>r.end&&r.nextEvent&&(r.nextEvent.appendInPlace||e.start-r.end>1))return null}const i=n==null?void 0:n.playerQueue;if(i)for(let s=i.length;s--;){const A=i[s].interstitial;if(A.appendInPlace&&e.start>=A.startTime&&e.end<=A.resumeTime)return null}}return e}mapToInitFragWhenRequired(e){return e!=null&&e.initSegment&&!e.initSegment.data&&!this.bitrateTest?e.initSegment:e}getNextPart(e,t,n){let r=-1,i=!1,s=!0;for(let A=0,f=e.length;A<f;A++){const c=e[A];if(s=s&&!c.independent,r>-1&&n<c.start)break;const m=c.loaded;m?r=-1:(i||(c.independent||s)&&c.fragment===t)&&(c.fragment!==t&&this.warn(`Need buffer at ${n} but next unloaded part starts at ${c.start}`),r=A),i=m}return r}loadedEndOfParts(e,t){let n;for(let r=e.length;r--;){if(n=e[r],!n.loaded)return!1;if(t>n.start)return!0}return!1}getInitialLiveFragment(e){const t=e.fragments,n=this.fragPrevious;let r=null;if(n){if(e.hasProgramDateTime&&(this.log(`Live playlist, switching playlist, load frag with same PDT: ${n.programDateTime}`),r=Q(t,n.endProgramDateTime,this.config.maxFragLookUpTolerance)),!r){const i=n.sn+1;if(i>=e.startSN&&i<=e.endSN){const s=t[i-e.startSN];n.cc===s.cc&&(r=s,this.log(`Live playlist, switching playlist, load frag with next SN: ${r.sn}`))}r||(r=rt(e,n.cc,n.end),r&&this.log(`Live playlist, switching playlist, load frag with same CC: ${r.sn}`))}}else{const i=this.hls.liveSyncPosition;i!==null&&(r=this.getFragmentAtPosition(i,this.bitrateTest?e.fragmentEnd:e.edge,e))}return r}getFragmentAtPosition(e,t,n){const{config:r}=this;let{fragPrevious:i}=this,{fragments:s,endSN:A}=n;const{fragmentHint:f}=n,{maxFragLookUpTolerance:c}=r,m=n.partList,y=!!(this.loadingParts&&m!=null&&m.length&&f);y&&!this.bitrateTest&&m[m.length-1].fragment.sn===f.sn&&(s=s.concat(f),A=f.sn);let B;if(e<t){var D;const se=e<this.lastCurrentTime||e>t-c||(D=this.media)!=null&&D.paused||!this.startFragRequested?0:c;B=K(i,s,e,se)}else B=s[s.length-1];if(B){const L=B.sn-n.startSN,se=this.fragmentTracker.getState(B);if((se===dt.OK||se===dt.PARTIAL&&B.gap)&&(i=B),i&&B.sn===i.sn&&(!y||m[0].fragment.sn>B.sn||!n.live)&&B.level===i.level){const xe=s[L+1];B.sn<A&&this.fragmentTracker.getState(xe)!==dt.OK?B=xe:B=null}}return B}alignPlaylists(e,t,n){const r=e.fragments.length;if(!r)return this.warn("No fragments in live playlist"),0;const i=e.fragmentStart,s=!t,A=e.alignedSliding&&V(i);if(s||!A&&!i){_s(n,e);const f=e.fragmentStart;return this.log(`Live playlist sliding: ${f.toFixed(2)} start-sn: ${t?t.startSN:"na"}->${e.startSN} fragments: ${r}`),f}return i}waitForCdnTuneIn(e){return e.live&&e.canBlockReload&&e.partTarget&&e.tuneInGoal>Math.max(e.partHoldBack,e.partTarget*3)}setStartPosition(e,t){let n=this.startPosition;n<t&&(n=-1);const r=this.timelineOffset;if(n===-1){const i=this.startTimeOffset!==null,s=i?this.startTimeOffset:e.startTimeOffset;s!==null&&V(s)?(n=t+s,s<0&&(n+=e.edge),n=Math.min(Math.max(t,n),t+e.totalduration),this.log(`Setting startPosition to ${n} for start time offset ${s} found in ${i?"multivariant":"media"} playlist`),this.startPosition=n):e.live?(n=this.hls.liveSyncPosition||t,this.log(`Setting startPosition to -1 to start at live edge ${n}`),this.startPosition=-1):(this.log("setting startPosition to 0 by default"),this.startPosition=n=0),this.lastCurrentTime=n+r}this.nextLoadPosition=n+r}getLoadPosition(){var e;const{media:t}=this;let n=0;return(e=this.hls)!=null&&e.hasEnoughToStart&&t?n=t.currentTime:this.nextLoadPosition>=0&&(n=this.nextLoadPosition),n}handleFragLoadAborted(e,t){this.transmuxer&&e.type===this.playlistType&&Ve(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!==Fn.FRAG_LOADING_WAITING_RETRY)&&(this.state=Fn.IDLE)}onFragmentOrKeyLoadError(e,t){var n;if(t.chunkMeta&&!t.frag){const xe=this.getCurrentContext(t.chunkMeta);xe&&(t.frag=xe.frag)}const r=t.frag;if(!r||r.type!==e||!this.levels)return;if(this.fragContextChanged(r)){var i;this.warn(`Frag load error must match current frag to retry ${r.url} > ${(i=this.fragCurrent)==null?void 0:i.url}`);return}const s=t.details===G.FRAG_GAP;s&&this.fragmentTracker.fragBuffered(r,!0);const A=t.errorAction;if(!A){this.state=Fn.ERROR;return}const{action:f,flags:c,retryCount:m=0,retryConfig:y}=A,B=!!y,D=B&&f===Ye.RetryRequest,L=B&&!A.resolved&&c===Ge.MoveAllAlternatesMatchingHost,se=(n=this.hls.latestLevelDetails)==null?void 0:n.live;if(!D&&L&&Ve(r)&&!r.endList&&se)this.resetFragmentErrors(e),this.treatAsGap(r),A.resolved=!0;else if((D||L)&&m<y.maxNumRetry){var X;const xe=pe((X=t.response)==null?void 0:X.code),at=an(y,m);if(this.resetStartWhenNotLoaded(),this.retryDate=self.performance.now()+at,this.state=Fn.FRAG_LOADING_WAITING_RETRY,A.resolved=!0,xe){this.log("Waiting for connection (offline)"),this.retryDate=1/0,t.reason="offline";return}this.warn(`Fragment ${r.sn} of ${e} ${r.level} errored with ${t.details}, retrying loading ${m+1}/${y.maxNumRetry} in ${at}ms`)}else if(y)if(this.resetFragmentErrors(e),m<y.maxNumRetry)!s&&f!==Ye.RemoveAlternatePermanently&&(A.resolved=!0);else{this.warn(`${t.details} reached or exceeded max retry (${m})`);return}else f===Ye.SendAlternateToPenaltyBox?this.state=Fn.WAITING_LEVEL:this.state=Fn.ERROR;this.tickImmediate()}checkRetryDate(){const e=self.performance.now(),t=this.retryDate,n=t===1/0;(!t||e>=t||n&&!pe(0))&&(n&&this.log("Connection restored (online)"),this.resetStartWhenNotLoaded(),this.state=Fn.IDLE)}reduceLengthAndFlushBuffer(e){if(this.state===Fn.PARSING||this.state===Fn.PARSED){const t=e.frag,n=e.parent,r=this.getFwdBufferInfo(this.mediaBuffer,n),i=r&&r.len>.5;i&&this.reduceMaxBufferLength(r.len,(t==null?void 0:t.duration)||10);const s=!i;return s&&this.warn(`Buffer full error while media.currentTime (${this.getLoadPosition()}) is not buffered, flush ${n} buffer`),t&&(this.fragmentTracker.removeFragment(t),this.nextLoadPosition=t.start),this.resetLoadingState(),s}return!1}resetFragmentErrors(e){e===le.AUDIO&&(this.fragCurrent=null),this.hls.hasEnoughToStart||(this.startFragRequested=!1),this.state!==Fn.STOPPED&&(this.state=Fn.IDLE)}afterBufferFlushed(e,t,n){if(!e)return;const r=kn.getBuffered(e);this.fragmentTracker.detectEvictedFragments(t,r,n),this.state===Fn.ENDED&&this.resetLoadingState()}resetLoadingState(){this.log("Reset loading state"),this.fragCurrent=null,this.fragPrevious=null,this.state!==Fn.STOPPED&&(this.state=Fn.IDLE)}resetStartWhenNotLoaded(){if(!this.hls.hasEnoughToStart){this.startFragRequested=!1;const e=this.levelLastLoaded,t=e?e.details:null;t!=null&&t.live?(this.log("resetting startPosition for live start"),this.startPosition=-1,this.setStartPosition(t,t.fragmentStart),this.resetLoadingState()):this.nextLoadPosition=this.startPosition}}resetWhenMissingContext(e){this.log(`Loading context changed while buffering sn ${e.sn} of ${this.playlistLabel()} ${e.level===-1?"<removed>":e.level}. This chunk will not be buffered.`),this.removeUnbufferedFrags(),this.resetStartWhenNotLoaded(),this.resetLoadingState()}removeUnbufferedFrags(e=0){this.fragmentTracker.removeFragmentsInRange(e,1/0,this.playlistType,!1,!0)}updateLevelTiming(e,t,n,r){const i=n.details;if(!i){this.warn("level.details undefined");return}if(!Object.keys(e.elementaryStreams).reduce((f,c)=>{const m=e.elementaryStreams[c];if(m){const y=m.endPTS-m.startPTS;if(y<=0)return this.warn(`Could not parse fragment ${e.sn} ${c} duration reliably (${y})`),f||!1;const B=r?0:os(i,e,m.startPTS,m.endPTS,m.startDTS,m.endDTS,this);return this.hls.trigger(g.LEVEL_PTS_UPDATED,{details:i,level:n,drift:B,type:c,frag:e,start:m.startPTS,end:m.endPTS}),!0}return f},!1)){var A;if(n.fragmentError===0&&this.treatAsGap(e,n),((A=this.transmuxer)==null?void 0:A.error)===null){const f=new Error(`Found no media in fragment ${e.sn} of ${this.playlistLabel()} ${e.level} resetting transmuxer to fallback to playlist timing`);if(this.warn(f.message),this.hls.trigger(g.ERROR,{type:ge.MEDIA_ERROR,details:G.FRAG_PARSING_ERROR,fatal:!1,error:f,frag:e,reason:`Found no media in msn ${e.sn} of ${this.playlistLabel()} "${n.url}"`}),!this.hls)return;this.resetTransmuxer()}}this.state=Fn.PARSED,this.log(`Parsed ${e.type} sn: ${e.sn}${t?" part: "+t.index:""} of ${this.fragInfo(e,!1,t)})`),this.hls.trigger(g.FRAG_PARSED,{frag:e,part:t})}playlistLabel(){return this.playlistType===le.MAIN?"level":"track"}fragInfo(e,t=!0,n){var r,i;return`${this.playlistLabel()} ${e.level} (${n?"part":"frag"}:[${((r=t&&!n?e.startPTS:(n||e).start)!=null?r:NaN).toFixed(3)}-${((i=t&&!n?e.endPTS:(n||e).end)!=null?i:NaN).toFixed(3)}]${n&&e.type==="main"?"INDEPENDENT="+(n.independent?"YES":"NO"):""}`}treatAsGap(e,t){t&&t.fragmentError++,e.gap=!0,this.fragmentTracker.removeFragment(e),this.fragmentTracker.fragBuffered(e,!0)}resetTransmuxer(){var e;(e=this.transmuxer)==null||e.reset()}recoverWorkerError(e){e.event==="demuxerWorker"&&(this.fragmentTracker.removeAllFragments(),this.transmuxer&&(this.transmuxer.destroy(),this.transmuxer=null),this.resetStartWhenNotLoaded(),this.resetLoadingState())}set state(e){const t=this._state;t!==e&&(this._state=e,this.log(`${t}->${e}`))}get state(){return this._state}}function ma(a){return!!a.interstitialsController&&a.enableInterstitialPlayback!==!1}class Zs{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=$a(e,t);else return new Uint8Array(0);return this.reset(),n}reset(){this.chunks.length=0,this.dataLength=0}}function $a(a,e){const t=new Uint8Array(e);let n=0;for(let r=0;r<a.length;r++){const i=a[r];t.set(i,n),n+=i.length}return t}var Za={exports:{}},Xa;function co(){return Xa||(Xa=1,function(a){var e=Object.prototype.hasOwnProperty,t="~";function n(){}Object.create&&(n.prototype=Object.create(null),new n().__proto__||(t=!1));function r(f,c,m){this.fn=f,this.context=c,this.once=m||!1}function i(f,c,m,y,B){if(typeof m!="function")throw new TypeError("The listener must be a function");var D=new r(m,y||f,B),L=t?t+c:c;return f._events[L]?f._events[L].fn?f._events[L]=[f._events[L],D]:f._events[L].push(D):(f._events[L]=D,f._eventsCount++),f}function s(f,c){--f._eventsCount===0?f._events=new n:delete f._events[c]}function A(){this._events=new n,this._eventsCount=0}A.prototype.eventNames=function(){var c=[],m,y;if(this._eventsCount===0)return c;for(y in m=this._events)e.call(m,y)&&c.push(t?y.slice(1):y);return Object.getOwnPropertySymbols?c.concat(Object.getOwnPropertySymbols(m)):c},A.prototype.listeners=function(c){var m=t?t+c:c,y=this._events[m];if(!y)return[];if(y.fn)return[y.fn];for(var B=0,D=y.length,L=new Array(D);B<D;B++)L[B]=y[B].fn;return L},A.prototype.listenerCount=function(c){var m=t?t+c:c,y=this._events[m];return y?y.fn?1:y.length:0},A.prototype.emit=function(c,m,y,B,D,L){var se=t?t+c:c;if(!this._events[se])return!1;var X=this._events[se],xe=arguments.length,at,We;if(X.fn){switch(X.once&&this.removeListener(c,X.fn,void 0,!0),xe){case 1:return X.fn.call(X.context),!0;case 2:return X.fn.call(X.context,m),!0;case 3:return X.fn.call(X.context,m,y),!0;case 4:return X.fn.call(X.context,m,y,B),!0;case 5:return X.fn.call(X.context,m,y,B,D),!0;case 6:return X.fn.call(X.context,m,y,B,D,L),!0}for(We=1,at=new Array(xe-1);We<xe;We++)at[We-1]=arguments[We];X.fn.apply(X.context,at)}else{var Mt=X.length,qt;for(We=0;We<Mt;We++)switch(X[We].once&&this.removeListener(c,X[We].fn,void 0,!0),xe){case 1:X[We].fn.call(X[We].context);break;case 2:X[We].fn.call(X[We].context,m);break;case 3:X[We].fn.call(X[We].context,m,y);break;case 4:X[We].fn.call(X[We].context,m,y,B);break;default:if(!at)for(qt=1,at=new Array(xe-1);qt<xe;qt++)at[qt-1]=arguments[qt];X[We].fn.apply(X[We].context,at)}}return!0},A.prototype.on=function(c,m,y){return i(this,c,m,y,!1)},A.prototype.once=function(c,m,y){return i(this,c,m,y,!0)},A.prototype.removeListener=function(c,m,y,B){var D=t?t+c:c;if(!this._events[D])return this;if(!m)return s(this,D),this;var L=this._events[D];if(L.fn)L.fn===m&&(!B||L.once)&&(!y||L.context===y)&&s(this,D);else{for(var se=0,X=[],xe=L.length;se<xe;se++)(L[se].fn!==m||B&&!L[se].once||y&&L[se].context!==y)&&X.push(L[se]);X.length?this._events[D]=X.length===1?X[0]:X:s(this,D)}return this},A.prototype.removeAllListeners=function(c){var m;return c?(m=t?t+c:c,this._events[m]&&s(this,m)):(this._events=new n,this._eventsCount=0),this},A.prototype.off=A.prototype.removeListener,A.prototype.addListener=A.prototype.on,A.prefixed=t,A.EventEmitter=A,a.exports=A}(Za)),Za.exports}var Uo=co(),Ja=te(Uo);const Ca="1.6.11",Ns={};function Va(){return typeof __HLS_WORKER_BUNDLE__=="function"}function ns(){const a=Ns[Ca];if(a)return a.clientCount++,a;const e=new self.Blob([`var exports={};var module={exports:exports};function define(f){f()};define.amd=true;(${__HLS_WORKER_BUNDLE__.toString()})(true);`],{type:"text/javascript"}),t=self.URL.createObjectURL(e),r={worker:new self.Worker(t),objectURL:t,clientCount:1};return Ns[Ca]=r,r}function xa(a){const e=Ns[a];if(e)return e.clientCount++,e;const t=new self.URL(a,self.location.href).href,r={worker:new self.Worker(t),scriptURL:t,clientCount:1};return Ns[a]=r,r}function fo(a){const e=Ns[a||Ca];if(e&&e.clientCount--===1){const{worker:n,objectURL:r}=e;delete Ns[a||Ca],r&&self.URL.revokeObjectURL(r),n.terminate()}}function ho(a,e){return e+10<=a.length&&a[e]===51&&a[e+1]===68&&a[e+2]===73&&a[e+3]<255&&a[e+4]<255&&a[e+6]<128&&a[e+7]<128&&a[e+8]<128&&a[e+9]<128}function qa(a,e){return e+10<=a.length&&a[e]===73&&a[e+1]===68&&a[e+2]===51&&a[e+3]<255&&a[e+4]<255&&a[e+6]<128&&a[e+7]<128&&a[e+8]<128&&a[e+9]<128}function eo(a,e){let t=0;return t=(a[e]&127)<<21,t|=(a[e+1]&127)<<14,t|=(a[e+2]&127)<<7,t|=a[e+3]&127,t}function va(a,e){const t=e;let n=0;for(;qa(a,e);){n+=10;const r=eo(a,e+6);n+=r,ho(a,e+10)&&(n+=10),e+=n}if(n>0)return a.subarray(t,t+n)}function go(a,e,t,n){const r=[96e3,88200,64e3,48e3,44100,32e3,24e3,22050,16e3,12e3,11025,8e3,7350],i=e[t+2],s=i>>2&15;if(s>12){const D=new Error(`invalid ADTS sampling index:${s}`);a.emit(g.ERROR,g.ERROR,{type:ge.MEDIA_ERROR,details:G.FRAG_PARSING_ERROR,fatal:!0,error:D,reason:D.message});return}const A=(i>>6&3)+1,f=e[t+3]>>6&3|(i&1)<<2,c="mp4a.40."+A,m=r[s];let y=s;(A===5||A===29)&&(y-=3);const B=[A<<3|(y&14)>>1,(y&1)<<7|f<<3];return ie.log(`manifest codec:${n}, parsed codec:${c}, channels:${f}, rate:${m} (ADTS object type:${A} sampling index:${s})`),{config:B,samplerate:m,channelCount:f,codec:c,parsedCodec:c,manifestCodec:n}}function to(a,e){return a[e]===255&&(a[e+1]&246)===240}function ca(a,e){return a[e+1]&1?7:9}function La(a,e){return(a[e+3]&3)<<11|a[e+4]<<3|(a[e+5]&224)>>>5}function Ua(a,e){return e+5<a.length}function za(a,e){return e+1<a.length&&to(a,e)}function wi(a,e){return Ua(a,e)&&to(a,e)&&La(a,e)<=a.length-e}function Ci(a,e){if(za(a,e)){const t=ca(a,e);if(e+t>=a.length)return!1;const n=La(a,e);if(n<=t)return!1;const r=e+n;return r===a.length||za(a,r)}return!1}function Bs(a,e,t,n,r){if(!a.samplerate){const i=go(e,t,n,r);if(!i)return;_(a,i)}}function Ss(a){return 1024*9e4/a}function bs(a,e){const t=ca(a,e);if(e+t<=a.length){const n=La(a,e)-t;if(n>0)return{headerLength:t,frameLength:n}}}function Sa(a,e,t,n,r){const i=Ss(a.samplerate),s=n+r*i,A=bs(e,t);let f;if(A){const{frameLength:y,headerLength:B}=A,D=B+y,L=Math.max(0,t+D-e.length);L?(f=new Uint8Array(D-B),f.set(e.subarray(t+B,e.length),0)):f=e.subarray(t+B,t+D);const se={unit:f,pts:s};return L||a.samples.push(se),{sample:se,length:D,missing:L}}const c=e.length-t;return f=new Uint8Array(c),f.set(e.subarray(t,e.length),0),{sample:{unit:f,pts:s},length:c,missing:-1}}function _a(a,e){return qa(a,e)&&eo(a,e+6)+10<=a.length-e}function Ta(a){return a instanceof ArrayBuffer?a:a.byteOffset==0&&a.byteLength==a.buffer.byteLength?a.buffer:new Uint8Array(a).buffer}function Ia(a,e=0,t=1/0){return po(a,e,t,Uint8Array)}function po(a,e,t,n){const r=Al(a);let i=1;"BYTES_PER_ELEMENT"in n&&(i=n.BYTES_PER_ELEMENT);const s=ll(a)?a.byteOffset:0,A=(s+a.byteLength)/i,f=(s+e)/i,c=Math.floor(Math.max(0,Math.min(f,A))),m=Math.floor(Math.min(c+Math.max(t,0),A));return new n(r,c,m-c)}function Al(a){return a instanceof ArrayBuffer?a:a.buffer}function ll(a){return a&&a.buffer instanceof ArrayBuffer&&a.byteLength!==void 0&&a.byteOffset!==void 0}function ul(a){const e={key:a.type,description:"",data:"",mimeType:null,pictureType:null},t=3;if(a.size<2)return;if(a.data[0]!==t){console.log("Ignore frame with unrecognized character encoding");return}const n=a.data.subarray(1).indexOf(0);if(n===-1)return;const r=Re(Ia(a.data,1,n)),i=a.data[2+n],s=a.data.subarray(3+n).indexOf(0);if(s===-1)return;const A=Re(Ia(a.data,3+n,s));let f;return r==="-->"?f=Re(Ia(a.data,4+n+s)):f=Ta(a.data.subarray(4+n+s)),e.mimeType=r,e.pictureType=i,e.description=A,e.data=f,e}function cl(a){if(a.size<2)return;const e=Re(a.data,!0),t=new Uint8Array(a.data.subarray(e.length+1));return{key:a.type,info:e,data:t.buffer}}function ko(a){if(a.size<2)return;if(a.type==="TXXX"){let t=1;const n=Re(a.data.subarray(t),!0);t+=n.length+1;const r=Re(a.data.subarray(t));return{key:a.type,info:n,data:r}}const e=Re(a.data.subarray(1));return{key:a.type,info:"",data:e}}function fl(a){if(a.type==="WXXX"){if(a.size<2)return;let t=1;const n=Re(a.data.subarray(t),!0);t+=n.length+1;const r=Re(a.data.subarray(t));return{key:a.type,info:n,data:r}}const e=Re(a.data);return{key:a.type,info:"",data:e}}function dl(a){return a.type==="PRIV"?cl(a):a.type[0]==="W"?fl(a):a.type==="APIC"?ul(a):ko(a)}function xA(a){const e=String.fromCharCode(a[0],a[1],a[2],a[3]),t=eo(a,4),n=10;return{type:e,size:t,data:a.subarray(n,n+t)}}const Oo=10,hl=10;function Po(a){let e=0;const t=[];for(;qa(a,e);){const n=eo(a,e+6);a[e+5]>>6&1&&(e+=Oo),e+=Oo;const r=e+n;for(;e+hl<r;){const i=xA(a.subarray(e)),s=dl(i);s&&t.push(s),e+=i.size+Oo}ho(a,e)&&(e+=Oo)}return t}function qs(a){return a&&a.key==="PRIV"&&a.info==="com.apple.streaming.transportStreamTimestamp"}function gl(a){if(a.data.byteLength===8){const e=new Uint8Array(a.data),t=e[3]&1;let n=(e[4]<<23)+(e[5]<<15)+(e[6]<<7)+e[7];return n/=45,t&&(n+=4772185884e-2),Math.round(n)}}function iA(a){const e=Po(a);for(let t=0;t<e.length;t++){const n=e[t];if(qs(n))return gl(n)}}let Vs=function(a){return a.audioId3="org.id3",a.dateRange="com.apple.quicktime.HLS",a.emsg="https://aomedia.org/emsg/ID3",a.misbklv="urn:misb:KLV:bin:1910.1",a}({});function ya(a="",e=9e4){return{type:a,id:-1,pid:-1,inputTimeScale:e,sequenceNumber:-1,samples:[],dropped:0}}class sA{constructor(){this._audioTrack=void 0,this._id3Track=void 0,this.frameIndex=0,this.cachedData=null,this.basePTS=null,this.initPTS=null,this.lastPTS=null}resetInitSegment(e,t,n,r){this._id3Track={type:"id3",id:3,pid:-1,inputTimeScale:9e4,sequenceNumber:0,samples:[],dropped:0}}resetTimeStamp(e){this.initPTS=e,this.resetContiguity()}resetContiguity(){this.basePTS=null,this.lastPTS=null,this.frameIndex=0}canParse(e,t){return!1}appendFrame(e,t,n){}demux(e,t){this.cachedData&&(e=qe(this.cachedData,e),this.cachedData=null);let n=va(e,0),r=n?n.length:0,i;const s=this._audioTrack,A=this._id3Track,f=n?iA(n):void 0,c=e.length;for((this.basePTS===null||this.frameIndex===0&&V(f))&&(this.basePTS=mo(f,t,this.initPTS),this.lastPTS=this.basePTS),this.lastPTS===null&&(this.lastPTS=this.basePTS),n&&n.length>0&&A.samples.push({pts:this.lastPTS,dts:this.lastPTS,data:n,type:Vs.audioId3,duration:Number.POSITIVE_INFINITY});r<c;){if(this.canParse(e,r)){const m=this.appendFrame(s,e,r);m?(this.frameIndex++,this.lastPTS=m.sample.pts,r+=m.length,i=r):r=c}else _a(e,r)?(n=va(e,r),A.samples.push({pts:this.lastPTS,dts:this.lastPTS,data:n,type:Vs.audioId3,duration:Number.POSITIVE_INFINITY}),r+=n.length,i=r):r++;if(r===c&&i!==c){const m=e.slice(i);this.cachedData?this.cachedData=qe(this.cachedData,m):this.cachedData=m}}return{audioTrack:s,videoTrack:ya(),id3Track:A,textTrack:ya()}}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:ya(),id3Track:this._id3Track,textTrack:ya()}}destroy(){this.cachedData=null,this._audioTrack=this._id3Track=void 0}}const mo=(a,e,t)=>{if(V(a))return a*90;const n=t?t.baseTime*9e4/t.timescale:0;return e*9e4+n};let Fa=null;const aA=[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],pl=[44100,48e3,32e3,22050,24e3,16e3,11025,12e3,8e3],SA=[[0,72,144,12],[0,0,0,0],[0,72,144,12],[0,144,144,12]],ml=[0,1,1,4];function no(a,e,t,n,r){if(t+24>e.length)return;const i=Mo(e,t);if(i&&t+i.frameLength<=e.length){const s=i.samplesPerFrame*9e4/i.sampleRate,A=n+r*s,f={unit:e.subarray(t,t+i.frameLength),pts:A,dts:A};return a.config=[],a.channelCount=i.channelCount,a.samplerate=i.sampleRate,a.samples.push(f),{sample:f,length:i.frameLength,missing:0}}}function Mo(a,e){const t=a[e+1]>>3&3,n=a[e+1]>>1&3,r=a[e+2]>>4&15,i=a[e+2]>>2&3;if(t!==1&&r!==0&&r!==15&&i!==3){const s=a[e+2]>>1&1,A=a[e+3]>>6,f=t===3?3-n:n===3?3:4,c=aA[f*14+r-1]*1e3,y=pl[(t===3?0:t===2?1:2)*3+i],B=A===3?1:2,D=SA[t][n],L=ml[n],se=D*8*L,X=Math.floor(D*c/y+s)*L;if(Fa===null){const We=(navigator.userAgent||"").match(/Chrome\/(\d+)/i);Fa=We?parseInt(We[1]):0}return!!Fa&&Fa<=87&&n===2&&c>=224e3&&A===0&&(a[e+3]=a[e+3]|128),{sampleRate:y,channelCount:B,frameLength:X,samplesPerFrame:se}}}function oA(a,e){return a[e]===255&&(a[e+1]&224)===224&&(a[e+1]&6)!==0}function TA(a,e){return e+1<a.length&&oA(a,e)}function vl(a,e){return oA(a,e)&&4<=a.length-e}function IA(a,e){if(e+1<a.length&&oA(a,e)){const n=Mo(a,e);let r=4;n!=null&&n.frameLength&&(r=n.frameLength);const i=e+r;return i===a.length||TA(a,i)}return!1}class _l extends sA{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=va(e,0);let r=(n==null?void 0:n.length)||0;if(IA(e,r))return!1;for(let i=e.length;r<i;r++)if(Ci(e,r))return t.log("ADTS sync word found !"),!0;return!1}canParse(e,t){return wi(e,t)}appendFrame(e,t,n){Bs(e,this.observer,t,n,e.manifestCodec);const r=Sa(e,t,n,this.basePTS,this.frameIndex);if(r&&r.missing===0)return r}}const FA=(a,e)=>{let t=0,n=5;e+=n;const r=new Uint32Array(1),i=new Uint32Array(1),s=new Uint8Array(1);for(;n>0;){s[0]=a[e];const A=Math.min(n,8),f=8-A;i[0]=4278190080>>>24+f<<f,r[0]=(s[0]&i[0])>>f,t=t?t<<A|r[0]:r[0],e+=1,n-=A}return t};class DA extends sA{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=RA(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=va(e,0);if(!t)return!1;const n=t.length;return e[n]===11&&e[n+1]===119&&iA(t)!==void 0&&FA(e,n)<16}}function RA(a,e,t,n,r){if(t+8>e.length||e[t]!==11||e[t+1]!==119)return-1;const i=e[t+4]>>6;if(i>=3)return-1;const A=[48e3,44100,32e3][i],f=e[t+4]&63,m=[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][f*3+i]*2;if(t+m>e.length)return-1;const y=e[t+6]>>5;let B=0;y===2?B+=2:(y&1&&y!==1&&(B+=2),y&4&&(B+=2));const D=(e[t+6]<<8|e[t+7])>>12-B&1,se=[2,1,2,3,3,4,4,5][y]+D,X=e[t+5]>>3,xe=e[t+5]&7,at=new Uint8Array([i<<6|X<<1|xe>>2,(xe&3)<<6|y<<3|D<<2|f>>4,f<<4&224]),We=1536/A*9e4,Mt=n+r*We,qt=e.subarray(t,t+m);return a.config=at,a.channelCount=se,a.samplerate=A,a.samples.push({unit:qt,pts:Mt}),m}class yl extends sA{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=va(e,0);let n=(t==null?void 0:t.length)||0;if(t&&e[n]===11&&e[n+1]===119&&iA(t)!==void 0&&FA(e,n)<=16)return!1;for(let r=e.length;n<r;n++)if(IA(e,n))return ie.log("MPEG Audio sync word found !"),!0;return!1}canParse(e,t){return vl(e,t)}appendFrame(e,t,n){if(this.basePTS!==null)return no(e,t,n,this.basePTS,this.frameIndex)}}const wl=/\/emsg[-/]ID3/i;class vo{constructor(e,t){this.remainderData=null,this.timeOffset=0,this.config=void 0,this.videoTrack=void 0,this.audioTrack=void 0,this.id3Track=void 0,this.txtTrack=void 0,this.config=t}resetTimeStamp(){}resetInitSegment(e,t,n,r){const i=this.videoTrack=ya("video",1),s=this.audioTrack=ya("audio",1),A=this.txtTrack=ya("text",1);if(this.id3Track=ya("id3",1),this.timeOffset=0,!(e!=null&&e.byteLength))return;const f=Ze(e);if(f.video){const{id:c,timescale:m,codec:y,supplemental:B}=f.video;i.id=c,i.timescale=A.timescale=m,i.codec=y,i.supplemental=B}if(f.audio){const{id:c,timescale:m,codec:y}=f.audio;s.id=c,s.timescale=m,s.codec=y}A.id=ln.text,i.sampleDuration=0,i.duration=s.duration=r}resetContiguity(){this.remainderData=null}static probe(e){return Fe(e)}demux(e,t){this.timeOffset=t;let n=e;const r=this.videoTrack,i=this.txtTrack;if(this.config.progressive){this.remainderData&&(n=qe(this.remainderData,e));const A=je(n);this.remainderData=A.remainder,r.samples=A.valid||new Uint8Array}else r.samples=n;const s=this.extractID3Track(r,t);return i.samples=kt(t,r),{videoTrack:r,audioTrack:this.audioTrack,id3Track:s,textTrack:this.txtTrack}}flush(){const e=this.timeOffset,t=this.videoTrack,n=this.txtTrack;t.samples=this.remainderData||new Uint8Array,this.remainderData=null;const r=this.extractID3Track(t,this.timeOffset);return n.samples=kt(e,t),{videoTrack:t,audioTrack:ya(),id3Track:r,textTrack:ya()}}extractID3Track(e,t){const n=this.id3Track;if(e.samples.length){const r=j(e.samples,["emsg"]);r&&r.forEach(i=>{const s=St(i);if(wl.test(s.schemeIdUri)){const A=LA(s,t);let f=s.eventDuration===4294967295?Number.POSITIVE_INFINITY:s.eventDuration/s.timeScale;f<=.001&&(f=Number.POSITIVE_INFINITY);const c=s.payload;n.samples.push({data:c,len:c.byteLength,dts:A,pts:A,type:Vs.emsg,duration:f})}else if(this.config.enableEmsgKLVMetadata&&s.schemeIdUri.startsWith("urn:misb:KLV:bin:1910.1")){const A=LA(s,t);n.samples.push({data:s.payload,len:s.payload.byteLength,dts:A,pts:A,type:Vs.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 LA(a,e){return V(a.presentationTime)?a.presentationTime/a.timeScale:e+a.presentationTimeDelta/a.timeScale}class El{constructor(e,t,n){this.keyData=void 0,this.decrypter=void 0,this.keyData=n,this.decrypter=new jn(t,{removePKCS7Padding:!1})}decryptBuffer(e){return this.decrypter.decrypt(e,this.keyData.key.buffer,this.keyData.iv.buffer,At.cbc)}decryptAacSample(e,t,n){const r=e[t].unit;if(r.length<=16)return;const i=r.subarray(16,r.length-r.length%16),s=i.buffer.slice(i.byteOffset,i.byteOffset+i.length);this.decryptBuffer(s).then(A=>{const f=new Uint8Array(A);r.set(f,16),this.decrypter.isSync()||this.decryptAacSamples(e,t+1,n)}).catch(n)}decryptAacSamples(e,t,n){for(;;t++){if(t>=e.length){n();return}if(!(e[t].unit.length<32)&&(this.decryptAacSample(e,t,n),!this.decrypter.isSync()))return}}getAvcEncryptedData(e){const t=Math.floor((e.length-48)/160)*16+16,n=new Int8Array(t);let r=0;for(let i=32;i<e.length-16;i+=160,r+=16)n.set(e.subarray(i,i+16),r);return n}getAvcDecryptedUnit(e,t){const n=new Uint8Array(t);let r=0;for(let i=32;i<e.length-16;i+=160,r+=16)e.set(n.subarray(r,r+16),i);return e}decryptAvcSample(e,t,n,r,i){const s=Wt(i.data),A=this.getAvcEncryptedData(s);this.decryptBuffer(A.buffer).then(f=>{i.data=this.getAvcDecryptedUnit(s,f),this.decrypter.isSync()||this.decryptAvcSamples(e,t,n+1,r)}).catch(r)}decryptAvcSamples(e,t,n,r){if(e instanceof Uint8Array)throw new Error("Cannot decrypt samples of type Uint8Array");for(;;t++,n=0){if(t>=e.length){r();return}const i=e[t].units;for(;!(n>=i.length);n++){const s=i[n];if(!(s.data.length<=48||s.type!==1&&s.type!==5)&&(this.decryptAvcSample(e,t,n,r,s),!this.decrypter.isSync()))return}}}}class AA{constructor(){this.VideoSample=null}createVideoSample(e,t,n){return{key:e,frame:!1,pts:t,dts:n,units:[],length:0}}getLastNalUnit(e){var t;let n=this.VideoSample,r;if((!n||n.units.length===0)&&(n=e[e.length-1]),(t=n)!=null&&t.units){const i=n.units;r=i[i.length-1]}return r}pushAccessUnit(e,t){if(e.units.length&&e.frame){if(e.pts===void 0){const n=t.samples,r=n.length;if(r){const i=n[r-1];e.pts=i.pts,e.dts=i.dts}else{t.dropped++;return}}t.samples.push(e)}}parseNALu(e,t,n){const r=t.byteLength;let i=e.naluState||0;const s=i,A=[];let f=0,c,m,y,B=-1,D=0;for(i===-1&&(B=0,D=this.getNALuType(t,0),i=0,f=1);f<r;){if(c=t[f++],!i){i=c?0:1;continue}if(i===1){i=c?0:2;continue}if(!c)i=3;else if(c===1){if(m=f-i-1,B>=0){const L={data:t.subarray(B,m),type:D};A.push(L)}else{const L=this.getLastNalUnit(e.samples);L&&(s&&f<=4-s&&L.state&&(L.data=L.data.subarray(0,L.data.byteLength-s)),m>0&&(L.data=qe(L.data,t.subarray(0,m)),L.state=0))}f<r?(y=this.getNALuType(t,f),B=f,D=y,i=0):i=-1}else i=0}if(B>=0&&i>=0){const L={data:t.subarray(B,r),type:D,state:i};A.push(L)}if(A.length===0){const L=this.getLastNalUnit(e.samples);L&&(L.data=qe(L.data,t))}return e.naluState=i,A}}class _o{constructor(e){this.data=void 0,this.bytesAvailable=void 0,this.word=void 0,this.bitsAvailable=void 0,this.data=e,this.bytesAvailable=e.byteLength,this.word=0,this.bitsAvailable=0}loadWord(){const e=this.data,t=this.bytesAvailable,n=e.byteLength-t,r=new Uint8Array(4),i=Math.min(4,t);if(i===0)throw new Error("no bytes available");r.set(e.subarray(n,n+i)),this.word=new DataView(r.buffer).getUint32(0),this.bitsAvailable=i*8,this.bytesAvailable-=i}skipBits(e){let t;e=Math.min(e,this.bytesAvailable*8+this.bitsAvailable),this.bitsAvailable>e?(this.word<<=e,this.bitsAvailable-=e):(e-=this.bitsAvailable,t=e>>3,e-=t<<3,this.bytesAvailable-=t,this.loadWord(),this.word<<=e,this.bitsAvailable-=e)}readBits(e){let t=Math.min(this.bitsAvailable,e);const n=this.word>>>32-t;if(e>32&&ie.error("Cannot read more than 32 bits at a time"),this.bitsAvailable-=t,this.bitsAvailable>0)this.word<<=t;else if(this.bytesAvailable>0)this.loadWord();else throw new Error("no bits available");return t=e-t,t>0&&this.bitsAvailable?n<<t|this.readBits(t):n}skipLZ(){let e;for(e=0;e<this.bitsAvailable;++e)if(this.word&2147483648>>>e)return this.word<<=e,this.bitsAvailable-=e,e;return this.loadWord(),e+this.skipLZ()}skipUEG(){this.skipBits(1+this.skipLZ())}skipEG(){this.skipBits(1+this.skipLZ())}readUEG(){const e=this.skipLZ();return this.readBits(e+1)-1}readEG(){const e=this.readUEG();return 1&e?1+e>>>1:-1*(e>>>1)}readBoolean(){return this.readBits(1)===1}readUByte(){return this.readBits(8)}readUShort(){return this.readBits(16)}readUInt(){return this.readBits(32)}}class Bl extends AA{parsePES(e,t,n,r){const i=this.parseNALu(e,n.data,r);let s=this.VideoSample,A,f=!1;n.data=null,s&&i.length&&!e.audFound&&(this.pushAccessUnit(s,e),s=this.VideoSample=this.createVideoSample(!1,n.pts,n.dts)),i.forEach(c=>{var m,y;switch(c.type){case 1:{let se=!1;A=!0;const X=c.data;if(f&&X.length>4){const xe=this.readSliceType(X);(xe===2||xe===4||xe===7||xe===9)&&(se=!0)}if(se){var B;(B=s)!=null&&B.frame&&!s.key&&(this.pushAccessUnit(s,e),s=this.VideoSample=null)}s||(s=this.VideoSample=this.createVideoSample(!0,n.pts,n.dts)),s.frame=!0,s.key=se;break}case 5:A=!0,(m=s)!=null&&m.frame&&!s.key&&(this.pushAccessUnit(s,e),s=this.VideoSample=null),s||(s=this.VideoSample=this.createVideoSample(!0,n.pts,n.dts)),s.key=!0,s.frame=!0;break;case 6:{A=!0,Pe(c.data,1,n.pts,t.samples);break}case 7:{var D,L;A=!0,f=!0;const se=c.data,X=this.readSPS(se);if(!e.sps||e.width!==X.width||e.height!==X.height||((D=e.pixelRatio)==null?void 0:D[0])!==X.pixelRatio[0]||((L=e.pixelRatio)==null?void 0:L[1])!==X.pixelRatio[1]){e.width=X.width,e.height=X.height,e.pixelRatio=X.pixelRatio,e.sps=[se];const xe=se.subarray(1,4);let at="avc1.";for(let We=0;We<3;We++){let Mt=xe[We].toString(16);Mt.length<2&&(Mt="0"+Mt),at+=Mt}e.codec=at}break}case 8:A=!0,e.pps=[c.data];break;case 9:A=!0,e.audFound=!0,(y=s)!=null&&y.frame&&(this.pushAccessUnit(s,e),s=null),s||(s=this.VideoSample=this.createVideoSample(!1,n.pts,n.dts));break;case 12:A=!0;break;default:A=!1;break}s&&A&&s.units.push(c)}),r&&s&&(this.pushAccessUnit(s,e),this.VideoSample=null)}getNALuType(e,t){return e[t]&31}readSliceType(e){const t=new _o(e);return t.readUByte(),t.readUEG(),t.readUEG()}skipScalingList(e,t){let n=8,r=8,i;for(let s=0;s<e;s++)r!==0&&(i=t.readEG(),r=(n+i+256)%256),n=r===0?n:r}readSPS(e){const t=new _o(e);let n=0,r=0,i=0,s=0,A,f,c;const m=t.readUByte.bind(t),y=t.readBits.bind(t),B=t.readUEG.bind(t),D=t.readBoolean.bind(t),L=t.skipBits.bind(t),se=t.skipEG.bind(t),X=t.skipUEG.bind(t),xe=this.skipScalingList.bind(this);m();const at=m();if(y(5),L(3),m(),X(),at===100||at===110||at===122||at===244||at===44||at===83||at===86||at===118||at===128){const un=B();if(un===3&&L(1),X(),X(),L(1),D())for(f=un!==3?8:12,c=0;c<f;c++)D()&&(c<6?xe(16,t):xe(64,t))}X();const We=B();if(We===0)B();else if(We===1)for(L(1),se(),se(),A=B(),c=0;c<A;c++)se();X(),L(1);const Mt=B(),qt=B(),Dn=y(1);Dn===0&&L(1),L(1),D()&&(n=B(),r=B(),i=B(),s=B());let zt=[1,1];if(D()&&D())switch(m()){case 1:zt=[1,1];break;case 2:zt=[12,11];break;case 3:zt=[10,11];break;case 4:zt=[16,11];break;case 5:zt=[40,33];break;case 6:zt=[24,11];break;case 7:zt=[20,11];break;case 8:zt=[32,11];break;case 9:zt=[80,33];break;case 10:zt=[18,11];break;case 11:zt=[15,11];break;case 12:zt=[64,33];break;case 13:zt=[160,99];break;case 14:zt=[4,3];break;case 15:zt=[3,2];break;case 16:zt=[2,1];break;case 255:{zt=[m()<<8|m(),m()<<8|m()];break}}return{width:Math.ceil((Mt+1)*16-n*2-r*2),height:(2-Dn)*(qt+1)*16-(Dn?2:4)*(i+s),pixelRatio:zt}}}class bl extends AA{constructor(...e){super(...e),this.initVPS=null}parsePES(e,t,n,r){const i=this.parseNALu(e,n.data,r);let s=this.VideoSample,A,f=!1;n.data=null,s&&i.length&&!e.audFound&&(this.pushAccessUnit(s,e),s=this.VideoSample=this.createVideoSample(!1,n.pts,n.dts)),i.forEach(c=>{var m,y;switch(c.type){case 0:case 1:case 2:case 3:case 4:case 5:case 6:case 7:case 8:case 9:s||(s=this.VideoSample=this.createVideoSample(!1,n.pts,n.dts)),s.frame=!0,A=!0;break;case 16:case 17:case 18:case 21:if(A=!0,f){var B;(B=s)!=null&&B.frame&&!s.key&&(this.pushAccessUnit(s,e),s=this.VideoSample=null)}s||(s=this.VideoSample=this.createVideoSample(!0,n.pts,n.dts)),s.key=!0,s.frame=!0;break;case 19:case 20:A=!0,(m=s)!=null&&m.frame&&!s.key&&(this.pushAccessUnit(s,e),s=this.VideoSample=null),s||(s=this.VideoSample=this.createVideoSample(!0,n.pts,n.dts)),s.key=!0,s.frame=!0;break;case 39:A=!0,Pe(c.data,2,n.pts,t.samples);break;case 32:A=!0,e.vps||(typeof e.params!="object"&&(e.params={}),e.params=_(e.params,this.readVPS(c.data)),this.initVPS=c.data),e.vps=[c.data];break;case 33:if(A=!0,f=!0,e.vps!==void 0&&e.vps[0]!==this.initVPS&&e.sps!==void 0&&!this.matchSPS(e.sps[0],c.data)&&(this.initVPS=e.vps[0],e.sps=e.pps=void 0),!e.sps){const D=this.readSPS(c.data);e.width=D.width,e.height=D.height,e.pixelRatio=D.pixelRatio,e.codec=D.codecString,e.sps=[],typeof e.params!="object"&&(e.params={});for(const L in D.params)e.params[L]=D.params[L]}this.pushParameterSet(e.sps,c.data,e.vps),s||(s=this.VideoSample=this.createVideoSample(!0,n.pts,n.dts)),s.key=!0;break;case 34:if(A=!0,typeof e.params=="object"){if(!e.pps){e.pps=[];const D=this.readPPS(c.data);for(const L in D)e.params[L]=D[L]}this.pushParameterSet(e.pps,c.data,e.vps)}break;case 35:A=!0,e.audFound=!0,(y=s)!=null&&y.frame&&(this.pushAccessUnit(s,e),s=null),s||(s=this.VideoSample=this.createVideoSample(!1,n.pts,n.dts));break;default:A=!1;break}s&&A&&s.units.push(c)}),r&&s&&(this.pushAccessUnit(s,e),this.VideoSample=null)}pushParameterSet(e,t,n){(n&&n[0]===this.initVPS||!n&&!e.length)&&e.push(t)}getNALuType(e,t){return(e[t]&126)>>>1}ebsp2rbsp(e){const t=new Uint8Array(e.byteLength);let n=0;for(let r=0;r<e.byteLength;r++)r>=2&&e[r]===3&&e[r-1]===0&&e[r-2]===0||(t[n]=e[r],n++);return new Uint8Array(t.buffer,0,n)}pushAccessUnit(e,t){super.pushAccessUnit(e,t),this.initVPS&&(this.initVPS=null)}readVPS(e){const t=new _o(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 _o(this.ebsp2rbsp(e));t.readUByte(),t.readUByte(),t.readBits(4);const n=t.readBits(3);t.readBoolean();const r=t.readBits(2),i=t.readBoolean(),s=t.readBits(5),A=t.readUByte(),f=t.readUByte(),c=t.readUByte(),m=t.readUByte(),y=t.readUByte(),B=t.readUByte(),D=t.readUByte(),L=t.readUByte(),se=t.readUByte(),X=t.readUByte(),xe=t.readUByte(),at=[],We=[];for(let is=0;is<n;is++)at.push(t.readBoolean()),We.push(t.readBoolean());if(n>0)for(let is=n;is<8;is++)t.readBits(2);for(let is=0;is<n;is++)at[is]&&(t.readUByte(),t.readUByte(),t.readUByte(),t.readUByte(),t.readUByte(),t.readUByte(),t.readUByte(),t.readUByte(),t.readUByte(),t.readUByte(),t.readUByte()),We[is]&&t.readUByte();t.readUEG();const Mt=t.readUEG();Mt==3&&t.skipBits(1);const qt=t.readUEG(),Dn=t.readUEG(),zt=t.readBoolean();let un=0,gn=0,Yt=0,Nn=0;zt&&(un+=t.readUEG(),gn+=t.readUEG(),Yt+=t.readUEG(),Nn+=t.readUEG());const Cr=t.readUEG(),jr=t.readUEG(),ni=t.readUEG(),Yr=t.readBoolean();for(let is=Yr?0:n;is<=n;is++)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 Aa=0;Aa<4;Aa++)for(let Ka=0;Ka<(Aa===3?2:6);Ka++)if(!t.readBoolean())t.readUEG();else{const Ya=Math.min(64,1<<4+(Aa<<1));Aa>1&&t.readEG();for(let ol=0;ol<Ya;ol++)t.readEG()}t.readBoolean(),t.readBoolean(),t.readBoolean()&&(t.readUByte(),t.skipUEG(),t.skipUEG(),t.readBoolean());const Nr=t.readUEG();let ei=0;for(let is=0;is<Nr;is++){let Aa=!1;if(is!==0&&(Aa=t.readBoolean()),Aa){is===Nr&&t.readUEG(),t.readBoolean(),t.readUEG();let Ka=0;for(let bA=0;bA<=ei;bA++){const Ya=t.readBoolean();let ol=!1;Ya||(ol=t.readBoolean()),(Ya||ol)&&Ka++}ei=Ka}else{const Ka=t.readUEG(),bA=t.readUEG();ei=Ka+bA;for(let Ya=0;Ya<Ka;Ya++)t.readUEG(),t.readBoolean();for(let Ya=0;Ya<bA;Ya++)t.readUEG(),t.readBoolean()}}if(t.readBoolean()){const is=t.readUEG();for(let Aa=0;Aa<is;Aa++){for(let Ka=0;Ka<ni+4;Ka++)t.readBits(1);t.readBits(1)}}let Br=0,br=1,Li=1,us=!0,Oi=1,Vi=0;t.readBoolean(),t.readBoolean();let oa=!1;if(t.readBoolean()){if(t.readBoolean()){const CA=t.readUByte(),Fc=[1,12,10,16,40,24,20,32,80,18,15,64,160,4,3,2],Nu=[1,11,11,11,33,11,11,11,33,11,11,33,99,3,2,1];CA>0&&CA<16?(br=Fc[CA-1],Li=Nu[CA-1]):CA===255&&(br=t.readBits(16),Li=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(),oa=t.readBoolean(),oa&&(t.skipUEG(),t.skipUEG(),t.skipUEG(),t.skipUEG()),t.readBoolean()&&(Oi=t.readBits(32),Vi=t.readBits(32),t.readBoolean()&&t.readUEG(),t.readBoolean())){const Nu=t.readBoolean(),Dc=t.readBoolean();let zl=!1;(Nu||Dc)&&(zl=t.readBoolean(),zl&&(t.readUByte(),t.readBits(5),t.readBoolean(),t.readBits(5)),t.readBits(4),t.readBits(4),zl&&t.readBits(4),t.readBits(5),t.readBits(5),t.readBits(5));for(let Rc=0;Rc<=n;Rc++){us=t.readBoolean();const Nc=us||t.readBoolean();let Lc=!1;Nc?t.readEG():Lc=t.readBoolean();const Uc=Lc?1:t.readUEG()+1;if(Nu)for(let Wl=0;Wl<Uc;Wl++)t.readUEG(),t.readUEG(),zl&&(t.readUEG(),t.readUEG()),t.skipBits(1);if(Dc)for(let Wl=0;Wl<Uc;Wl++)t.readUEG(),t.readUEG(),zl&&(t.readUEG(),t.readUEG()),t.skipBits(1)}}t.readBoolean()&&(t.readBoolean(),t.readBoolean(),t.readBoolean(),Br=t.readUEG())}let Ha=qt,uo=Dn;if(zt){let is=1,Aa=1;Mt===1?is=Aa=2:Mt==2&&(is=2),Ha=qt-is*gn-is*un,uo=Dn-Aa*Nn-Aa*Yt}const BA=r?["A","B","C"][r]:"",Qc=A<<24|f<<16|c<<8|m;let Cc=0;for(let is=0;is<32;is++)Cc=(Cc|(Qc>>is&1)<<31-is)>>>0;let xc=Cc.toString(16);return s===1&&xc==="2"&&(xc="6"),{codecString:`hvc1.${BA}${s}.${xc}.${i?"H":"L"}${xe}.B0`,params:{general_tier_flag:i,general_profile_idc:s,general_profile_space:r,general_profile_compatibility_flags:[A,f,c,m],general_constraint_indicator_flags:[y,B,D,L,se,X],general_level_idc:xe,bit_depth:Cr+8,bit_depth_luma_minus8:Cr,bit_depth_chroma_minus8:jr,min_spatial_segmentation_idc:Br,chroma_format_idc:Mt,frame_rate:{fixed:us,fps:Vi/Oi}},width:Ha,height:uo,pixelRatio:[br,Li]}}readPPS(e){const t=new _o(this.ebsp2rbsp(e));t.readUByte(),t.readUByte(),t.skipUEG(),t.skipUEG(),t.skipBits(2),t.skipBits(3),t.skipBits(2),t.skipUEG(),t.skipUEG(),t.skipEG(),t.skipBits(2),t.readBoolean()&&t.skipUEG(),t.skipEG(),t.skipEG(),t.skipBits(4);const r=t.readBoolean(),i=t.readBoolean();let s=1;return i&&r?s=0:i?s=3:r&&(s=2),{parallelismType:s}}matchSPS(e,t){return String.fromCharCode.apply(null,e).substr(3)===String.fromCharCode.apply(null,t).substr(3)}}const Us=188;class ka{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=ka.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(Us*5,t-Us)+1,r=0;for(;r<n;){let i=!1,s=-1,A=0;for(let f=r;f<t;f+=Us)if(e[f]===71&&(t-f===Us||e[f+Us]===71)){if(A++,s===-1&&(s=f,s!==0&&(n=Math.min(s+Us*99,e.length-Us)+1)),i||(i=yo(e,f)===0),i&&A>1&&(s===0&&A>2||f+Us>n))return s}else{if(A)return-1;break}r++}return-1}static createTrack(e,t){return{container:e==="video"||e==="audio"?"video/mp2t":void 0,type:e,id:ln[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=ka.createTrack("video"),this._videoTrack.duration=r,this._audioTrack=ka.createTrack("audio",r),this._id3Track=ka.createTrack("id3"),this._txtTrack=ka.createTrack("text"),this._audioTrack.segmentCodec="aac",this.videoParser=null,this.aacOverFlow=null,this.remainderData=null,this.audioCodec=t,this.videoCodec=n}resetTimeStamp(){}resetContiguity(){const{_audioTrack:e,_videoTrack:t,_id3Track:n}=this;e&&(e.pesData=null),t&&(t.pesData=null),n&&(n.pesData=null),this.aacOverFlow=null,this.remainderData=null}demux(e,t,n=!1,r=!1){n||(this.sampleAes=null);let i;const s=this._videoTrack,A=this._audioTrack,f=this._id3Track,c=this._txtTrack;let m=s.pid,y=s.pesData,B=A.pid,D=f.pid,L=A.pesData,se=f.pesData,X=null,xe=this.pmtParsed,at=this._pmtId,We=e.length;if(this.remainderData&&(e=qe(this.remainderData,e),We=e.length,this.remainderData=null),We<Us&&!r)return this.remainderData=e,{audioTrack:A,videoTrack:s,id3Track:f,textTrack:c};const Mt=Math.max(0,ka.syncOffset(e));We-=(We-Mt)%Us,We<e.byteLength&&!r&&(this.remainderData=new Uint8Array(e.buffer,We,e.buffer.byteLength-We));let qt=0;for(let zt=Mt;zt<We;zt+=Us)if(e[zt]===71){const un=!!(e[zt+1]&64),gn=yo(e,zt),Yt=(e[zt+3]&48)>>4;let Nn;if(Yt>1){if(Nn=zt+5+e[zt+4],Nn===zt+Us)continue}else Nn=zt+4;switch(gn){case m:un&&(y&&(i=wo(y,this.logger))&&(this.readyVideoParser(s.segmentCodec),this.videoParser!==null&&this.videoParser.parsePES(s,c,i,!1)),y={data:[],size:0}),y&&(y.data.push(e.subarray(Nn,zt+Us)),y.size+=zt+Us-Nn);break;case B:if(un){if(L&&(i=wo(L,this.logger)))switch(A.segmentCodec){case"aac":this.parseAACPES(A,i);break;case"mp3":this.parseMPEGPES(A,i);break;case"ac3":this.parseAC3PES(A,i);break}L={data:[],size:0}}L&&(L.data.push(e.subarray(Nn,zt+Us)),L.size+=zt+Us-Nn);break;case D:un&&(se&&(i=wo(se,this.logger))&&this.parseID3PES(f,i),se={data:[],size:0}),se&&(se.data.push(e.subarray(Nn,zt+Us)),se.size+=zt+Us-Nn);break;case 0:un&&(Nn+=e[Nn]+1),at=this._pmtId=UA(e,Nn);break;case at:{un&&(Nn+=e[Nn]+1);const Cr=Cl(e,Nn,this.typeSupported,n,this.observer,this.logger);m=Cr.videoPid,m>0&&(s.pid=m,s.segmentCodec=Cr.segmentVideoCodec),B=Cr.audioPid,B>0&&(A.pid=B,A.segmentCodec=Cr.segmentAudioCodec),D=Cr.id3Pid,D>0&&(f.pid=D),X!==null&&!xe&&(this.logger.warn(`MPEG-TS PMT found at ${zt} after unknown PID '${X}'. Backtracking to sync byte @${Mt} to parse all TS packets.`),X=null,zt=Mt-188),xe=this.pmtParsed=!0;break}case 17:case 8191:break;default:X=gn;break}}else qt++;qt>0&&Cs(this.observer,new Error(`Found ${qt} TS packet/s that do not start with 0x47`),void 0,this.logger),s.pesData=y,A.pesData=L,f.pesData=se;const Dn={audioTrack:A,videoTrack:s,id3Track:f,textTrack:c};return r&&this.extractRemainingSamples(Dn),Dn}flush(){const{remainderData:e}=this;this.remainderData=null;let t;return e?t=this.demux(e,-1,!1,!0):t={videoTrack:this._videoTrack,audioTrack:this._audioTrack,id3Track:this._id3Track,textTrack:this._txtTrack},this.extractRemainingSamples(t),this.sampleAes?this.decrypt(t,this.sampleAes):t}extractRemainingSamples(e){const{audioTrack:t,videoTrack:n,id3Track:r,textTrack:i}=e,s=n.pesData,A=t.pesData,f=r.pesData;let c;if(s&&(c=wo(s,this.logger))?(this.readyVideoParser(n.segmentCodec),this.videoParser!==null&&(this.videoParser.parsePES(n,i,c,!0),n.pesData=null)):n.pesData=s,A&&(c=wo(A,this.logger))){switch(t.segmentCodec){case"aac":this.parseAACPES(t,c);break;case"mp3":this.parseMPEGPES(t,c);break;case"ac3":this.parseAC3PES(t,c);break}t.pesData=null}else A!=null&&A.size&&this.logger.log("last AAC PES packet truncated,might overlap between fragments"),t.pesData=A;f&&(c=wo(f,this.logger))?(this.parseID3PES(r,c),r.pesData=null):r.pesData=f}demuxSampleAes(e,t,n){const r=this.demux(e,n,!0,!this.config.progressive),i=this.sampleAes=new El(this.observer,this.config,t);return this.decrypt(r,i)}readyVideoParser(e){this.videoParser===null&&(e==="avc"?this.videoParser=new Bl:e==="hevc"&&(this.videoParser=new bl))}decrypt(e,t){return new Promise(n=>{const{audioTrack:r,videoTrack:i}=e;r.samples&&r.segmentCodec==="aac"?t.decryptAacSamples(r.samples,0,()=>{i.samples?t.decryptAvcSamples(i.samples,0,0,()=>{n(e)}):n(e)}):i.samples&&t.decryptAvcSamples(i.samples,0,0,()=>{n(e)})})}destroy(){this.observer&&this.observer.removeAllListeners(),this.config=this.logger=this.observer=null,this.aacOverFlow=this.videoParser=this.remainderData=this.sampleAes=null,this._videoTrack=this._audioTrack=this._id3Track=this._txtTrack=void 0}parseAACPES(e,t){let n=0;const r=this.aacOverFlow;let i=t.data;if(r){this.aacOverFlow=null;const y=r.missing,B=r.sample.unit.byteLength;if(y===-1)i=qe(r.sample.unit,i);else{const D=B-y;r.sample.unit.set(i.subarray(0,y),D),e.samples.push(r.sample),n=r.missing}}let s,A;for(s=n,A=i.length;s<A-1&&!za(i,s);s++);if(s!==n){let y;const B=s<A-1;if(B?y=`AAC PES did not start with ADTS header,offset:${s}`:y="No ADTS header found in AAC PES",Cs(this.observer,new Error(y),B,this.logger),!B)return}Bs(e,this.observer,i,s,this.audioCodec);let f;if(t.pts!==void 0)f=t.pts;else if(r){const y=Ss(e.samplerate);f=r.sample.pts+y}else{this.logger.warn("[tsdemuxer]: AAC PES unknown PTS");return}let c=0,m;for(;s<A;)if(m=Sa(e,i,s,f,c),s+=m.length,m.missing){this.aacOverFlow=m;break}else for(c++;s<A-1&&!za(i,s);s++);}parseMPEGPES(e,t){const n=t.data,r=n.length;let i=0,s=0;const A=t.pts;if(A===void 0){this.logger.warn("[tsdemuxer]: MPEG PES unknown PTS");return}for(;s<r;)if(TA(n,s)){const f=no(e,n,s,A,i);if(f)s+=f.length,i++;else break}else s++}parseAC3PES(e,t){{const n=t.data,r=t.pts;if(r===void 0){this.logger.warn("[tsdemuxer]: AC3 PES unknown PTS");return}const i=n.length;let s=0,A=0,f;for(;A<i&&(f=RA(e,n,A,r,s++))>0;)A+=f}}parseID3PES(e,t){if(t.pts===void 0){this.logger.warn("[tsdemuxer]: ID3 PES unknown PTS");return}const n=_({},t,{type:this._videoTrack?Vs.emsg:Vs.audioId3,duration:Number.POSITIVE_INFINITY});e.samples.push(n)}}function yo(a,e){return((a[e+1]&31)<<8)+a[e+2]}function UA(a,e){return(a[e+10]&31)<<8|a[e+11]}function Cl(a,e,t,n,r,i){const s={audioPid:-1,videoPid:-1,id3Pid:-1,segmentVideoCodec:"avc",segmentAudioCodec:"aac"},A=(a[e+1]&15)<<8|a[e+2],f=e+3+A-4,c=(a[e+10]&15)<<8|a[e+11];for(e+=12+c;e<f;){const m=yo(a,e),y=(a[e+3]&15)<<8|a[e+4];switch(a[e]){case 207:if(!n){lA("ADTS AAC",i);break}case 15:s.audioPid===-1&&(s.audioPid=m);break;case 21:s.id3Pid===-1&&(s.id3Pid=m);break;case 219:if(!n){lA("H.264",i);break}case 27:s.videoPid===-1&&(s.videoPid=m);break;case 3:case 4:!t.mpeg&&!t.mp3?i.log("MPEG audio found, not supported in this browser"):s.audioPid===-1&&(s.audioPid=m,s.segmentAudioCodec="mp3");break;case 193:if(!n){lA("AC-3",i);break}case 129:t.ac3?s.audioPid===-1&&(s.audioPid=m,s.segmentAudioCodec="ac3"):i.log("AC-3 audio found, not supported in this browser");break;case 6:if(s.audioPid===-1&&y>0){let B=e+5,D=y;for(;D>2;){switch(a[B]){case 106:t.ac3!==!0?i.log("AC-3 audio found, not supported in this browser for now"):(s.audioPid=m,s.segmentAudioCodec="ac3");break}const se=a[B+1]+2;B+=se,D-=se}}break;case 194:case 135:return Cs(r,new Error("Unsupported EC-3 in M2TS found"),void 0,i),s;case 36:s.videoPid===-1&&(s.videoPid=m,s.segmentVideoCodec="hevc",i.log("HEVC in M2TS found"));break}e+=y+5}return s}function Cs(a,e,t,n){n.warn(`parsing error: ${e.message}`),a.emit(g.ERROR,g.ERROR,{type:ge.MEDIA_ERROR,details:G.FRAG_PARSING_ERROR,fatal:!1,levelRetry:t,error:e,reason:e.message})}function lA(a,e){e.log(`${a} with AES-128-CBC encryption found in unencrypted stream`)}function wo(a,e){let t=0,n,r,i,s,A;const f=a.data;if(!a||a.size===0)return null;for(;f[0].length<19&&f.length>1;)f[0]=qe(f[0],f[1]),f.splice(1,1);if(n=f[0],(n[0]<<16)+(n[1]<<8)+n[2]===1){if(r=(n[4]<<8)+n[5],r&&r>a.size-6)return null;const m=n[7];m&192&&(s=(n[9]&14)*536870912+(n[10]&255)*4194304+(n[11]&254)*16384+(n[12]&255)*128+(n[13]&254)/2,m&64?(A=(n[14]&14)*536870912+(n[15]&255)*4194304+(n[16]&254)*16384+(n[17]&255)*128+(n[18]&254)/2,s-A>60*9e4&&(e.warn(`${Math.round((s-A)/9e4)}s delta between PTS and DTS, align them`),s=A)):A=s),i=n[8];let y=i+9;if(a.size<=y)return null;a.size-=y;const B=new Uint8Array(a.size);for(let D=0,L=f.length;D<L;D++){n=f[D];let se=n.byteLength;if(y)if(y>se){y-=se;continue}else n=n.subarray(y),se-=y,y=0;B.set(n,t),t+=se}return r&&(r-=i+3),{data:B,pts:s,dts:A,len:r}}return null}class kA{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 Da=Math.pow(2,32)-1;class tn{static init(){tn.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 tn.types)tn.types.hasOwnProperty(e)&&(tn.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]);tn.HDLR_TYPES={video:t,audio:n};const r=new Uint8Array([0,0,0,0,0,0,0,1,0,0,0,12,117,114,108,32,0,0,0,1]),i=new Uint8Array([0,0,0,0,0,0,0,0]);tn.STTS=tn.STSC=tn.STCO=i,tn.STSZ=new Uint8Array([0,0,0,0,0,0,0,0,0,0,0,0]),tn.VMHD=new Uint8Array([0,0,0,1,0,0,0,0,0,0,0,0]),tn.SMHD=new Uint8Array([0,0,0,0,0,0,0,0]),tn.STSD=new Uint8Array([0,0,0,0,0,0,0,1]);const s=new Uint8Array([105,115,111,109]),A=new Uint8Array([97,118,99,49]),f=new Uint8Array([0,0,0,1]);tn.FTYP=tn.box(tn.types.ftyp,s,f,s,A),tn.DINF=tn.box(tn.types.dinf,tn.box(tn.types.dref,r))}static box(e,...t){let n=8,r=t.length;const i=r;for(;r--;)n+=t[r].byteLength;const s=new Uint8Array(n);for(s[0]=n>>24&255,s[1]=n>>16&255,s[2]=n>>8&255,s[3]=n&255,s.set(e,4),r=0,n=8;r<i;r++)s.set(t[r],n),n+=t[r].byteLength;return s}static hdlr(e){return tn.box(tn.types.hdlr,tn.HDLR_TYPES[e])}static mdat(e){return tn.box(tn.types.mdat,e)}static mdhd(e,t){t*=e;const n=Math.floor(t/(Da+1)),r=Math.floor(t%(Da+1));return tn.box(tn.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 tn.box(tn.types.mdia,tn.mdhd(e.timescale||0,e.duration||0),tn.hdlr(e.type),tn.minf(e))}static mfhd(e){return tn.box(tn.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"?tn.box(tn.types.minf,tn.box(tn.types.smhd,tn.SMHD),tn.DINF,tn.stbl(e)):tn.box(tn.types.minf,tn.box(tn.types.vmhd,tn.VMHD),tn.DINF,tn.stbl(e))}static moof(e,t,n){return tn.box(tn.types.moof,tn.mfhd(e),tn.traf(n,t))}static moov(e){let t=e.length;const n=[];for(;t--;)n[t]=tn.trak(e[t]);return tn.box.apply(null,[tn.types.moov,tn.mvhd(e[0].timescale||0,e[0].duration||0)].concat(n).concat(tn.mvex(e)))}static mvex(e){let t=e.length;const n=[];for(;t--;)n[t]=tn.trex(e[t]);return tn.box.apply(null,[tn.types.mvex,...n])}static mvhd(e,t){t*=e;const n=Math.floor(t/(Da+1)),r=Math.floor(t%(Da+1)),i=new Uint8Array([1,0,0,0,0,0,0,0,0,0,0,2,0,0,0,0,0,0,0,3,e>>24&255,e>>16&255,e>>8&255,e&255,n>>24,n>>16&255,n>>8&255,n&255,r>>24,r>>16&255,r>>8&255,r&255,0,1,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,64,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,255,255]);return tn.box(tn.types.mvhd,i)}static sdtp(e){const t=e.samples||[],n=new Uint8Array(4+t.length);let r,i;for(r=0;r<t.length;r++)i=t[r].flags,n[r+4]=i.dependsOn<<4|i.isDependedOn<<2|i.hasRedundancy;return tn.box(tn.types.sdtp,n)}static stbl(e){return tn.box(tn.types.stbl,tn.stsd(e),tn.box(tn.types.stts,tn.STTS),tn.box(tn.types.stsc,tn.STSC),tn.box(tn.types.stsz,tn.STSZ),tn.box(tn.types.stco,tn.STCO))}static avc1(e){let t=[],n=[],r,i,s;for(r=0;r<e.sps.length;r++)i=e.sps[r],s=i.byteLength,t.push(s>>>8&255),t.push(s&255),t=t.concat(Array.prototype.slice.call(i));for(r=0;r<e.pps.length;r++)i=e.pps[r],s=i.byteLength,n.push(s>>>8&255),n.push(s&255),n=n.concat(Array.prototype.slice.call(i));const A=tn.box(tn.types.avcC,new Uint8Array([1,t[3],t[4],t[5],255,224|e.sps.length].concat(t).concat([e.pps.length]).concat(n))),f=e.width,c=e.height,m=e.pixelRatio[0],y=e.pixelRatio[1];return tn.box(tn.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,f>>8&255,f&255,c>>8&255,c&255,0,72,0,0,0,72,0,0,0,0,0,0,0,1,18,100,97,105,108,121,109,111,116,105,111,110,47,104,108,115,46,106,115,0,0,0,0,0,0,0,0,0,0,0,0,0,0,24,17,17]),A,tn.box(tn.types.btrt,new Uint8Array([0,28,156,128,0,45,198,192,0,45,198,192])),tn.box(tn.types.pasp,new Uint8Array([m>>24,m>>16&255,m>>8&255,m&255,y>>24,y>>16&255,y>>8&255,y&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 tn.box(tn.types.mp4a,tn.audioStsd(e),tn.box(tn.types.esds,tn.esds(e)))}static mp3(e){return tn.box(tn.types[".mp3"],tn.audioStsd(e))}static ac3(e){return tn.box(tn.types["ac-3"],tn.audioStsd(e),tn.box(tn.types.dac3,e.config))}static stsd(e){const{segmentCodec:t}=e;if(e.type==="audio"){if(t==="aac")return tn.box(tn.types.stsd,tn.STSD,tn.mp4a(e));if(t==="ac3"&&e.config)return tn.box(tn.types.stsd,tn.STSD,tn.ac3(e));if(t==="mp3"&&e.codec==="mp3")return tn.box(tn.types.stsd,tn.STSD,tn.mp3(e))}else if(e.pps&&e.sps){if(t==="avc")return tn.box(tn.types.stsd,tn.STSD,tn.avc1(e));if(t==="hevc"&&e.vps)return tn.box(tn.types.stsd,tn.STSD,tn.hvc1(e))}else throw new Error("video track missing pps or sps");throw new Error(`unsupported ${e.type} segment codec (${t}/${e.codec})`)}static tkhd(e){const t=e.id,n=(e.duration||0)*(e.timescale||0),r=e.width||0,i=e.height||0,s=Math.floor(n/(Da+1)),A=Math.floor(n%(Da+1));return tn.box(tn.types.tkhd,new Uint8Array([1,0,0,7,0,0,0,0,0,0,0,2,0,0,0,0,0,0,0,3,t>>24&255,t>>16&255,t>>8&255,t&255,0,0,0,0,s>>24,s>>16&255,s>>8&255,s&255,A>>24,A>>16&255,A>>8&255,A&255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,64,0,0,0,r>>8&255,r&255,0,0,i>>8&255,i&255,0,0]))}static traf(e,t){const n=tn.sdtp(e),r=e.id,i=Math.floor(t/(Da+1)),s=Math.floor(t%(Da+1));return tn.box(tn.types.traf,tn.box(tn.types.tfhd,new Uint8Array([0,0,0,0,r>>24,r>>16&255,r>>8&255,r&255])),tn.box(tn.types.tfdt,new Uint8Array([1,0,0,0,i>>24,i>>16&255,i>>8&255,i&255,s>>24,s>>16&255,s>>8&255,s&255])),tn.trun(e,n.length+16+20+8+16+8+8),n)}static trak(e){return e.duration=e.duration||4294967295,tn.box(tn.types.trak,tn.tkhd(e),tn.mdia(e))}static trex(e){const t=e.id;return tn.box(tn.types.trex,new Uint8Array([0,0,0,0,t>>24,t>>16&255,t>>8&255,t&255,0,0,0,1,0,0,0,0,0,0,0,0,0,1,0,1]))}static trun(e,t){const n=e.samples||[],r=n.length,i=12+16*r,s=new Uint8Array(i);let A,f,c,m,y,B;for(t+=8+i,s.set([e.type==="video"?1:0,0,15,1,r>>>24&255,r>>>16&255,r>>>8&255,r&255,t>>>24&255,t>>>16&255,t>>>8&255,t&255],0),A=0;A<r;A++)f=n[A],c=f.duration,m=f.size,y=f.flags,B=f.cts,s.set([c>>>24&255,c>>>16&255,c>>>8&255,c&255,m>>>24&255,m>>>16&255,m>>>8&255,m&255,y.isLeading<<2|y.dependsOn,y.isDependedOn<<6|y.hasRedundancy<<4|y.paddingValue<<1|y.isNonSync,y.degradPrio&61440,y.degradPrio&15,B>>>24&255,B>>>16&255,B>>>8&255,B&255],12+16*A);return tn.box(tn.types.trun,s)}static initSegment(e){tn.types||tn.init();const t=tn.moov(e);return qe(tn.FTYP,t)}static hvc1(e){const t=e.params,n=[e.vps,e.sps,e.pps],r=4,i=new Uint8Array([1,t.general_profile_space<<6|(t.general_tier_flag?32:0)|t.general_profile_idc,t.general_profile_compatibility_flags[0],t.general_profile_compatibility_flags[1],t.general_profile_compatibility_flags[2],t.general_profile_compatibility_flags[3],t.general_constraint_indicator_flags[0],t.general_constraint_indicator_flags[1],t.general_constraint_indicator_flags[2],t.general_constraint_indicator_flags[3],t.general_constraint_indicator_flags[4],t.general_constraint_indicator_flags[5],t.general_level_idc,240|t.min_spatial_segmentation_idc>>8,255&t.min_spatial_segmentation_idc,252|t.parallelismType,252|t.chroma_format_idc,248|t.bit_depth_luma_minus8,248|t.bit_depth_chroma_minus8,0,parseInt(t.frame_rate.fps),r-1|t.temporal_id_nested<<2|t.num_temporal_layers<<3|(t.frame_rate.fixed?64:0),n.length]);let s=i.length;for(let L=0;L<n.length;L+=1){s+=3;for(let se=0;se<n[L].length;se+=1)s+=2+n[L][se].length}const A=new Uint8Array(s);A.set(i,0),s=i.length;const f=n.length-1;for(let L=0;L<n.length;L+=1){A.set(new Uint8Array([32+L|(L===f?128:0),0,n[L].length]),s),s+=3;for(let se=0;se<n[L].length;se+=1)A.set(new Uint8Array([n[L][se].length>>8,n[L][se].length&255]),s),s+=2,A.set(n[L][se],s),s+=n[L][se].length}const c=tn.box(tn.types.hvcC,A),m=e.width,y=e.height,B=e.pixelRatio[0],D=e.pixelRatio[1];return tn.box(tn.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,m>>8&255,m&255,y>>8&255,y&255,0,72,0,0,0,72,0,0,0,0,0,0,0,1,18,100,97,105,108,121,109,111,116,105,111,110,47,104,108,115,46,106,115,0,0,0,0,0,0,0,0,0,0,0,0,0,0,24,17,17]),c,tn.box(tn.types.btrt,new Uint8Array([0,28,156,128,0,45,198,192,0,45,198,192])),tn.box(tn.types.pasp,new Uint8Array([B>>24,B>>16&255,B>>8&255,B&255,D>>24,D>>16&255,D>>8&255,D&255])))}}tn.types=void 0,tn.HDLR_TYPES=void 0,tn.STTS=void 0,tn.STSC=void 0,tn.STCO=void 0,tn.STSZ=void 0,tn.VMHD=void 0,tn.SMHD=void 0,tn.STSD=void 0,tn.FTYP=void 0,tn.DINF=void 0;const Qo=9e4;function No(a,e,t=1,n=!1){const r=a*e*t;return n?Math.round(r):r}function jl(a,e,t=1,n=!1){return No(a,e,1/t,n)}function ro(a,e=!1){return No(a,1e3,1/Qo,e)}function OA(a,e=1){return No(a,Qo,1/e)}const PA=10*1e3,MA=1024,uA=1152,Mr=1536;let io=null,cA=null;function fA(a,e,t,n){return{duration:e,size:t,cts:n,flags:{isLeading:0,isDependedOn:0,hasRedundancy:0,degradPrio:0,dependsOn:a?2:1,isNonSync:a?0:1}}}class ea extends H{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,io===null){const s=(navigator.userAgent||"").match(/Chrome\/(\d+)/i);io=s?parseInt(s[1]):0}if(cA===null){const i=navigator.userAgent.match(/Safari\/(\d+)/i);cA=i?parseInt(i[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((i,s)=>{let A=s.pts,f=A-i;return f<-4294967296&&(t=!0,A=aa(A,n),f=A-i),f>0?i:A},n);return t&&this.debug("PTS rollover detected"),r}remux(e,t,n,r,i,s,A,f){let c,m,y,B,D,L,se=i,X=i;const xe=e.pid>-1,at=t.pid>-1,We=t.samples.length,Mt=e.samples.length>0,qt=A&&We>0||We>1;if((!xe||Mt)&&(!at||qt)||this.ISGenerated||A){if(this.ISGenerated){var zt,un,gn,Yt;const ni=this.videoTrackConfig;(ni&&(t.width!==ni.width||t.height!==ni.height||((zt=t.pixelRatio)==null?void 0:zt[0])!==((un=ni.pixelRatio)==null?void 0:un[0])||((gn=t.pixelRatio)==null?void 0:gn[1])!==((Yt=ni.pixelRatio)==null?void 0:Yt[1]))||!ni&&qt||this.nextAudioTs===null&&Mt)&&this.resetInitSegment()}this.ISGenerated||(y=this.generateIS(e,t,i,s));const Nn=this.isVideoContiguous;let Cr=-1,jr;if(qt&&(Cr=QA(t.samples),!Nn&&this.config.forceKeyFrameOnDiscontinuity))if(L=!0,Cr>0){this.warn(`Dropped ${Cr} out of ${We} video samples due to a missing keyframe`);const ni=this.getVideoStartPts(t.samples);t.samples=t.samples.slice(Cr),t.dropped+=Cr,X+=(t.samples[0].pts-ni)/t.inputTimeScale,jr=X}else Cr===-1&&(this.warn(`No keyframe found out of ${We} video samples`),L=!1);if(this.ISGenerated){if(Mt&&qt){const ni=this.getVideoStartPts(t.samples),wr=(aa(e.samples[0].pts,ni)-ni)/t.inputTimeScale;se+=Math.max(0,wr),X+=Math.max(0,-wr)}if(Mt){if(e.samplerate||(this.warn("regenerate InitSegment as audio detected"),y=this.generateIS(e,t,i,s)),m=this.remuxAudio(e,se,this.isAudioContiguous,s,at||qt||f===le.AUDIO?X:void 0),qt){const ni=m?m.endPTS-m.startPTS:0;t.inputTimeScale||(this.warn("regenerate InitSegment as video detected"),y=this.generateIS(e,t,i,s)),c=this.remuxVideo(t,X,Nn,ni)}}else qt&&(c=this.remuxVideo(t,X,Nn,0));c&&(c.firstKeyFrame=Cr,c.independent=Cr!==-1,c.firstKeyFramePTS=jr)}}return this.ISGenerated&&this._initPTS&&this._initDTS&&(n.samples.length&&(D=so(n,i,this._initPTS,this._initDTS)),r.samples.length&&(B=Ho(r,i,this._initPTS))),{audio:m,video:c,initSegment:y,independent:L,text:B,id3:D}}generateIS(e,t,n,r){const i=e.samples,s=t.samples,A=this.typeSupported,f={},c=this._initPTS;let m=!c||r,y="audio/mp4",B,D,L,se=-1;if(m&&(B=D=1/0),e.config&&i.length){switch(e.timescale=e.samplerate,e.segmentCodec){case"mp3":A.mpeg?(y="audio/mpeg",e.codec=""):A.mp3&&(e.codec="mp3");break;case"ac3":e.codec="ac-3";break}f.audio={id:"audio",container:y,codec:e.codec,initSegment:e.segmentCodec==="mp3"&&A.mpeg?new Uint8Array(0):tn.initSegment([e]),metadata:{channelCount:e.channelCount}},m&&(se=e.id,L=e.inputTimeScale,!c||L!==c.timescale?B=D=i[0].pts-Math.round(L*n):m=!1)}if(t.sps&&t.pps&&s.length){if(t.timescale=t.inputTimeScale,f.video={id:"main",container:"video/mp4",codec:t.codec,initSegment:tn.initSegment([t]),metadata:{width:t.width,height:t.height}},m)if(se=t.id,L=t.inputTimeScale,!c||L!==c.timescale){const X=this.getVideoStartPts(s),xe=Math.round(L*n);D=Math.min(D,aa(s[0].dts,X)-xe),B=Math.min(B,X-xe)}else m=!1;this.videoTrackConfig={width:t.width,height:t.height,pixelRatio:t.pixelRatio}}if(Object.keys(f).length)return this.ISGenerated=!0,m?(c&&this.warn(`Timestamps at playlist time: ${r?"":"~"}${n} ${B/L} != initPTS: ${c.baseTime/c.timescale} (${c.baseTime}/${c.timescale}) trackId: ${c.trackId}`),this.log(`Found initPTS at playlist time: ${n} offset: ${B/L} (${B}/${L}) trackId: ${se}`),this._initPTS={baseTime:B,timescale:L,trackId:se},this._initDTS={baseTime:D,timescale:L,trackId:se}):B=L=void 0,{tracks:f,initPTS:B,timescale:L,trackId:se}}remuxVideo(e,t,n,r){const i=e.inputTimeScale,s=e.samples,A=[],f=s.length,c=this._initPTS,m=c.baseTime*i/c.timescale;let y=this.nextVideoTs,B=8,D=this.videoSampleDuration,L,se,X=Number.POSITIVE_INFINITY,xe=Number.NEGATIVE_INFINITY,at=!1;if(!n||y===null){const Br=m+t*i,br=s[0].pts-aa(s[0].dts,s[0].pts);io&&y!==null&&Math.abs(Br-br-(y+m))<15e3?n=!0:y=Br-br-m}const We=y+m;for(let Br=0;Br<f;Br++){const br=s[Br];br.pts=aa(br.pts,We),br.dts=aa(br.dts,We),br.dts<s[Br>0?Br-1:Br].dts&&(at=!0)}at&&s.sort(function(Br,br){const Li=Br.dts-br.dts,us=Br.pts-br.pts;return Li||us}),L=s[0].dts,se=s[s.length-1].dts;const Mt=se-L,qt=Mt?Math.round(Mt/(f-1)):D||e.inputTimeScale/30;if(n){const Br=L-We,br=Br>qt,Li=Br<-1;if((br||Li)&&(br?this.warn(`${(e.segmentCodec||"").toUpperCase()}: ${ro(Br,!0)} ms (${Br}dts) hole between fragments detected at ${t.toFixed(3)}`):this.warn(`${(e.segmentCodec||"").toUpperCase()}: ${ro(-Br,!0)} ms (${Br}dts) overlapping between fragments detected at ${t.toFixed(3)}`),!Li||We>=s[0].pts||io)){L=We;const us=s[0].pts-Br;if(br)s[0].dts=L,s[0].pts=us;else{let Oi=!0;for(let Vi=0;Vi<s.length&&!(s[Vi].dts>us&&Oi);Vi++){const oa=s[Vi].pts;if(s[Vi].dts-=Br,s[Vi].pts-=Br,Vi<s.length-1){const na=s[Vi+1].pts,Ha=s[Vi].pts,uo=na<=Ha,BA=na<=oa;Oi=uo==BA}}}this.log(`Video: Initial PTS/DTS adjusted: ${ro(us,!0)}/${ro(L,!0)}, delta: ${ro(Br,!0)} ms`)}}L=Math.max(0,L);let Dn=0,zt=0,un=L;for(let Br=0;Br<f;Br++){const br=s[Br],Li=br.units,us=Li.length;let Oi=0;for(let Vi=0;Vi<us;Vi++)Oi+=Li[Vi].data.length;zt+=Oi,Dn+=us,br.length=Oi,br.dts<un?(br.dts=un,un+=qt/4|0||1):un=br.dts,X=Math.min(br.pts,X),xe=Math.max(br.pts,xe)}se=s[f-1].dts;const gn=zt+4*Dn+8;let Yt;try{Yt=new Uint8Array(gn)}catch(Br){this.observer.emit(g.ERROR,g.ERROR,{type:ge.MUX_ERROR,details:G.REMUX_ALLOC_ERROR,fatal:!1,error:Br,bytes:gn,reason:`fail allocating video mdat ${gn}`});return}const Nn=new DataView(Yt.buffer);Nn.setUint32(0,gn),Yt.set(tn.types.mdat,4);let Cr=!1,jr=Number.POSITIVE_INFINITY,ni=Number.POSITIVE_INFINITY,Yr=Number.NEGATIVE_INFINITY,wr=Number.NEGATIVE_INFINITY;for(let Br=0;Br<f;Br++){const br=s[Br],Li=br.units;let us=0;for(let oa=0,na=Li.length;oa<na;oa++){const Ha=Li[oa],uo=Ha.data,BA=Ha.data.byteLength;Nn.setUint32(B,BA),B+=4,Yt.set(uo,B),B+=BA,us+=4+BA}let Oi;if(Br<f-1)D=s[Br+1].dts-br.dts,Oi=s[Br+1].pts-br.pts;else{const oa=this.config,na=Br>0?br.dts-s[Br-1].dts:qt;if(Oi=Br>0?br.pts-s[Br-1].pts:qt,oa.stretchShortVideoTrack&&this.nextAudioTs!==null){const Ha=Math.floor(oa.maxBufferHole*i),uo=(r?X+r*i:this.nextAudioTs+m)-br.pts;uo>Ha?(D=uo-na,D<0?D=na:Cr=!0,this.log(`It is approximately ${uo/90} ms to the next segment; using duration ${D/90} ms for the last video frame.`)):D=na}else D=na}const Vi=Math.round(br.pts-br.dts);jr=Math.min(jr,D),Yr=Math.max(Yr,D),ni=Math.min(ni,Oi),wr=Math.max(wr,Oi),A.push(fA(br.key,D,us,Vi))}if(A.length){if(io){if(io<70){const Br=A[0].flags;Br.dependsOn=2,Br.isNonSync=0}}else if(cA&&wr-ni<Yr-jr&&qt/Yr<.025&&A[0].cts===0){this.warn("Found irregular gaps in sample duration. Using PTS instead of DTS to determine MP4 sample duration.");let Br=L;for(let br=0,Li=A.length;br<Li;br++){const us=Br+A[br].duration,Oi=Br+A[br].cts;if(br<Li-1){const Vi=us+A[br+1].cts;A[br].duration=Vi-Oi}else A[br].duration=br?A[br-1].duration:qt;A[br].cts=0,Br=us}}}D=Cr||!D?qt:D;const qr=se+D;this.nextVideoTs=y=qr-m,this.videoSampleDuration=D,this.isVideoContiguous=!0;const _i={data1:tn.moof(e.sequenceNumber++,L,_(e,{samples:A})),data2:Yt,startPTS:(X-m)/i,endPTS:(xe+D-m)/i,startDTS:(L-m)/i,endDTS:y/i,type:"video",hasAudio:!1,hasVideo:!0,nb:A.length,dropped:e.dropped};return e.samples=[],e.dropped=0,_i}getSamplesPerFrame(e){switch(e.segmentCodec){case"mp3":return uA;case"ac3":return Mr;default:return MA}}remuxAudio(e,t,n,r,i){const s=e.inputTimeScale,A=e.samplerate?e.samplerate:s,f=s/A,c=this.getSamplesPerFrame(e),m=c*f,y=this._initPTS,B=e.segmentCodec==="mp3"&&this.typeSupported.mpeg,D=[],L=i!==void 0;let se=e.samples,X=B?0:8,xe=this.nextAudioTs||-1;const at=y.baseTime*s/y.timescale,We=at+t*s;if(this.isAudioContiguous=n=n||se.length&&xe>0&&(r&&Math.abs(We-(xe+at))<9e3||Math.abs(aa(se[0].pts,We)-(xe+at))<20*m),se.forEach(function(wr){wr.pts=aa(wr.pts,We)}),!n||xe<0){if(se=se.filter(wr=>wr.pts>=0),!se.length)return;i===0?xe=0:r&&!L?xe=Math.max(0,We-at):xe=se[0].pts-at}if(e.segmentCodec==="aac"){const wr=this.config.maxAudioFramesDrift;for(let qr=0,Nr=xe+at;qr<se.length;qr++){const ei=se[qr],_i=ei.pts,Br=_i-Nr,br=Math.abs(1e3*Br/s);if(Br<=-wr*m&&L)qr===0&&(this.warn(`Audio frame @ ${(_i/s).toFixed(3)}s overlaps marker by ${Math.round(1e3*Br/s)} ms.`),this.nextAudioTs=xe=_i-at,Nr=_i);else if(Br>=wr*m&&br<PA&&L){let Li=Math.round(Br/m);for(Nr=_i-Li*m;Nr<0&&Li&&m;)Li--,Nr+=m;qr===0&&(this.nextAudioTs=xe=Nr-at),this.warn(`Injecting ${Li} audio frames @ ${((Nr-at)/s).toFixed(3)}s due to ${Math.round(1e3*Br/s)} ms gap.`);for(let us=0;us<Li;us++){let Oi=kA.getSilentFrame(e.parsedCodec||e.manifestCodec||e.codec,e.channelCount);Oi||(this.log("Unable to get silent frame for given audio codec; duplicating last frame instead."),Oi=ei.unit.subarray()),se.splice(qr,0,{unit:Oi,pts:Nr}),Nr+=m,qr++}}ei.pts=Nr,Nr+=m}}let Mt=null,qt=null,Dn,zt=0,un=se.length;for(;un--;)zt+=se[un].unit.byteLength;for(let wr=0,qr=se.length;wr<qr;wr++){const Nr=se[wr],ei=Nr.unit;let _i=Nr.pts;if(qt!==null){const br=D[wr-1];br.duration=Math.round((_i-qt)/f)}else if(n&&e.segmentCodec==="aac"&&(_i=xe+at),Mt=_i,zt>0){zt+=X;try{Dn=new Uint8Array(zt)}catch(br){this.observer.emit(g.ERROR,g.ERROR,{type:ge.MUX_ERROR,details:G.REMUX_ALLOC_ERROR,fatal:!1,error:br,bytes:zt,reason:`fail allocating audio mdat ${zt}`});return}B||(new DataView(Dn.buffer).setUint32(0,zt),Dn.set(tn.types.mdat,4))}else return;Dn.set(ei,X);const Br=ei.byteLength;X+=Br,D.push(fA(!0,c,Br,0)),qt=_i}const gn=D.length;if(!gn)return;const Yt=D[D.length-1];xe=qt-at,this.nextAudioTs=xe+f*Yt.duration;const Nn=B?new Uint8Array(0):tn.moof(e.sequenceNumber++,Mt/f,_({},e,{samples:D}));e.samples=[];const Cr=(Mt-at)/s,jr=xe/s,Yr={data1:Nn,data2:Dn,startPTS:Cr,endPTS:jr,startDTS:Cr,endDTS:jr,type:"audio",hasAudio:!0,hasVideo:!1,nb:gn};return this.isAudioContiguous=!0,Yr}}function aa(a,e){let t;if(e===null)return a;for(e<a?t=-8589934592:t=8589934592;Math.abs(a-e)>4294967296;)a+=t;return a}function QA(a){for(let e=0;e<a.length;e++)if(a[e].key)return e;return-1}function so(a,e,t,n){const r=a.samples.length;if(!r)return;const i=a.inputTimeScale;for(let A=0;A<r;A++){const f=a.samples[A];f.pts=aa(f.pts-t.baseTime*i/t.timescale,e*i)/i,f.dts=aa(f.dts-n.baseTime*i/n.timescale,e*i)/i}const s=a.samples;return a.samples=[],{samples:s}}function Ho(a,e,t){const n=a.samples.length;if(!n)return;const r=a.inputTimeScale;for(let s=0;s<n;s++){const A=a.samples[s];A.pts=aa(A.pts-t.baseTime*r/t.timescale,e*r)/r}a.samples.sort((s,A)=>s.pts-A.pts);const i=a.samples;return a.samples=[],{samples:i}}class xl extends H{constructor(e,t,n,r){super("passthrough-remuxer",r),this.emitInitSegment=!1,this.audioCodec=void 0,this.videoCodec=void 0,this.initData=void 0,this.initPTS=null,this.initTracks=void 0,this.lastEndTime=null,this.isVideoContiguous=!1}destroy(){}resetTimeStamp(e){this.lastEndTime=null;const t=this.initPTS;t&&e&&t.baseTime===e.baseTime&&t.timescale===e.timescale||(this.initPTS=e)}resetNextTimestamp(){this.isVideoContiguous=!1,this.lastEndTime=null}resetInitSegment(e,t,n,r){this.audioCodec=t,this.videoCodec=n,this.generateInitSegment(e,r),this.emitInitSegment=!0}generateInitSegment(e,t){let{audioCodec:n,videoCodec:r}=this;if(!(e!=null&&e.byteLength)){this.initTracks=void 0,this.initData=void 0;return}const{audio:i,video:s}=this.initData=Ze(e);if(t)Se(e,t);else{const f=i||s;f!=null&&f.encrypted&&this.warn(`Init segment with encrypted track with has no key ("${f.codec}")!`)}i&&(n=Oa(i,W.AUDIO,this)),s&&(r=Oa(s,W.VIDEO,this));const A={};i&&s?A.audiovideo={container:"video/mp4",codec:n+","+r,supplemental:s.supplemental,encrypted:s.encrypted,initSegment:e,id:"main"}:i?A.audio={container:"audio/mp4",codec:n,encrypted:i.encrypted,initSegment:e,id:"audio"}:s?A.video={container:"video/mp4",codec:r,supplemental:s.supplemental,encrypted:s.encrypted,initSegment:e,id:"main"}:this.warn("initSegment does not contain moov or trak boxes."),this.initTracks=A}remux(e,t,n,r,i,s){var A,f;let{initPTS:c,lastEndTime:m}=this;const y={audio:void 0,video:void 0,text:r,id3:n,initSegment:void 0};V(m)||(m=this.lastEndTime=i||0);const B=t.samples;if(!B.length)return y;const D={initPTS:void 0,timescale:void 0,trackId:void 0};let L=this.initData;if((A=L)!=null&&A.length||(this.generateInitSegment(B),L=this.initData),!((f=L)!=null&&f.length))return this.warn("Failed to generate initSegment."),y;this.emitInitSegment&&(D.tracks=this.initTracks,this.emitInitSegment=!1);const se=Xe(B,L,this),X=L.audio?se[L.audio.id]:null,xe=L.video?se[L.video.id]:null,at=Ko(xe,1/0),We=Ko(X,1/0),Mt=Ko(xe,0,!0),qt=Ko(X,0,!0);let Dn=i,zt=0;const un=X&&(!xe||!c&&We<at||c&&c.trackId===L.audio.id),gn=un?X:xe;if(gn){const Nr=gn.timescale,ei=gn.start-i*Nr,_i=un?L.audio.id:L.video.id;Dn=gn.start/Nr,zt=un?qt-We:Mt-at,(s||!c)&&(NA(c,Dn,i,zt)||Nr!==c.timescale)&&(c&&this.warn(`Timestamps at playlist time: ${s?"":"~"}${i} ${ei/Nr} != initPTS: ${c.baseTime/c.timescale} (${c.baseTime}/${c.timescale}) trackId: ${c.trackId}`),this.log(`Found initPTS at playlist time: ${i} offset: ${Dn-i} (${ei}/${Nr}) trackId: ${_i}`),c=null,D.initPTS=ei,D.timescale=Nr,D.trackId=_i)}else this.warn(`No audio or video samples found for initPTS at playlist time: ${i}`);c?(D.initPTS=c.baseTime,D.timescale=c.timescale,D.trackId=c.trackId):((!D.timescale||D.trackId===void 0||D.initPTS===void 0)&&(this.warn("Could not set initPTS"),D.initPTS=Dn,D.timescale=1,D.trackId=-1),this.initPTS=c={baseTime:D.initPTS,timescale:D.timescale,trackId:D.trackId});const Yt=Dn-c.baseTime/c.timescale,Nn=Yt+zt;zt>0?this.lastEndTime=Nn:(this.warn("Duration parsed from mp4 should be greater than zero"),this.resetNextTimestamp());const Cr=!!L.audio,jr=!!L.video;let ni="";Cr&&(ni+="audio"),jr&&(ni+="video");const Yr=(L.audio?L.audio.encrypted:!1)||(L.video?L.video.encrypted:!1),wr={data1:B,startPTS:Yt,startDTS:Yt,endPTS:Nn,endDTS:Nn,type:ni,hasAudio:Cr,hasVideo:jr,nb:1,dropped:0,encrypted:Yr};y.audio=Cr&&!jr?wr:void 0,y.video=jr?wr:void 0;const qr=xe==null?void 0:xe.sampleCount;if(qr){const Nr=xe.keyFrameIndex,ei=Nr!==-1;wr.nb=qr,wr.dropped=Nr===0||this.isVideoContiguous?0:ei?Nr:qr,wr.independent=ei,wr.firstKeyFrame=Nr,ei&&xe.keyFrameStart&&(wr.firstKeyFramePTS=(xe.keyFrameStart-c.baseTime)/c.timescale),this.isVideoContiguous||(y.independent=ei),this.isVideoContiguous||(this.isVideoContiguous=ei),wr.dropped&&this.warn(`fmp4 does not start with IDR: firstIDR ${Nr}/${qr} dropped: ${wr.dropped} start: ${wr.firstKeyFramePTS||"NA"}`)}return y.initSegment=D,y.id3=so(n,i,c,c),r.samples.length&&(y.text=Ho(r,i,c)),y}}function Ko(a,e,t=!1){return(a==null?void 0:a.start)!==void 0?(a.start+(t?a.duration:0))/a.timescale:e}function NA(a,e,t,n){if(a===null)return!0;const r=Math.max(n,1),i=e-a.baseTime/a.timescale;return Math.abs(i-t)>r}function Oa(a,e,t){const n=a.codec;return n&&n.length>4?n:e===W.AUDIO?n==="ec-3"||n==="ac-3"||n==="alac"?n:n==="fLaC"||n==="Opus"?Ie(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 Hs;try{Hs=self.performance.now.bind(self.performance)}catch(a){Hs=Date.now}const Eo=[{demux:vo,remux:xl},{demux:ka,remux:ea},{demux:_l,remux:ea},{demux:yl,remux:ea}];Eo.splice(2,0,{demux:DA,remux:ea});class dA{constructor(e,t,n,r,i,s){this.asyncResult=!1,this.logger=void 0,this.observer=void 0,this.typeSupported=void 0,this.config=void 0,this.id=void 0,this.demuxer=void 0,this.remuxer=void 0,this.decrypter=void 0,this.probe=void 0,this.decryptionPromise=null,this.transmuxConfig=void 0,this.currentTransmuxState=void 0,this.observer=e,this.typeSupported=t,this.config=n,this.id=i,this.logger=s}configure(e){this.transmuxConfig=e,this.decrypter&&this.decrypter.reset()}push(e,t,n,r){const i=n.transmuxing;i.executeStart=Hs();let s=new Uint8Array(e);const{currentTransmuxState:A,transmuxConfig:f}=this;r&&(this.currentTransmuxState=r);const{contiguous:c,discontinuity:m,trackSwitch:y,accurateTimeOffset:B,timeOffset:D,initSegmentChange:L}=r||A,{audioCodec:se,videoCodec:X,defaultInitPts:xe,duration:at,initSegmentData:We}=f,Mt=HA(s,t);if(Mt&&Pi(Mt.method)){const un=this.getDecrypter(),gn=ai(Mt.method);if(un.isSync()){let Yt=un.softwareDecrypt(s,Mt.key.buffer,Mt.iv.buffer,gn);if(n.part>-1){const Cr=un.flush();Yt=Cr&&Cr.buffer}if(!Yt)return i.executeEnd=Hs(),Go(n);s=new Uint8Array(Yt)}else return this.asyncResult=!0,this.decryptionPromise=un.webCryptoDecrypt(s,Mt.key.buffer,Mt.iv.buffer,gn).then(Yt=>{const Nn=this.push(Yt,null,n);return this.decryptionPromise=null,Nn}),this.decryptionPromise}const qt=this.needsProbing(m,y);if(qt){const un=this.configureTransmuxer(s);if(un)return this.logger.warn(`[transmuxer] ${un.message}`),this.observer.emit(g.ERROR,g.ERROR,{type:ge.MEDIA_ERROR,details:G.FRAG_PARSING_ERROR,fatal:!1,error:un,reason:un.message}),i.executeEnd=Hs(),Go(n)}(m||y||L||qt)&&this.resetInitSegment(We,se,X,at,t),(m||L||qt)&&this.resetInitialTimestamp(xe),c||this.resetContiguity();const Dn=this.transmux(s,Mt,D,B,n);this.asyncResult=Pa(Dn);const zt=this.currentTransmuxState;return zt.contiguous=!0,zt.discontinuity=!1,zt.trackSwitch=!1,i.executeEnd=Hs(),Dn}flush(e){const t=e.transmuxing;t.executeStart=Hs();const{decrypter:n,currentTransmuxState:r,decryptionPromise:i}=this;if(i)return this.asyncResult=!0,i.then(()=>this.flush(e));const s=[],{timeOffset:A}=r;if(n){const y=n.flush();y&&s.push(this.push(y.buffer,null,e))}const{demuxer:f,remuxer:c}=this;if(!f||!c){t.executeEnd=Hs();const y=[Go(e)];return this.asyncResult?Promise.resolve(y):y}const m=f.flush(A);return Pa(m)?(this.asyncResult=!0,m.then(y=>(this.flushRemux(s,y,e),s))):(this.flushRemux(s,m,e),this.asyncResult?Promise.resolve(s):s)}flushRemux(e,t,n){const{audioTrack:r,videoTrack:i,id3Track:s,textTrack:A}=t,{accurateTimeOffset:f,timeOffset:c}=this.currentTransmuxState;this.logger.log(`[transmuxer.ts]: Flushed ${this.id} sn: ${n.sn}${n.part>-1?" part: "+n.part:""} of ${this.id===le.MAIN?"level":"track"} ${n.level}`);const m=this.remuxer.remux(r,i,s,A,c,f,!0,this.id);e.push({remuxResult:m,chunkMeta:n}),n.transmuxing.executeEnd=Hs()}resetInitialTimestamp(e){const{demuxer:t,remuxer:n}=this;!t||!n||(t.resetTimeStamp(e),n.resetTimeStamp(e))}resetContiguity(){const{demuxer:e,remuxer:t}=this;!e||!t||(e.resetContiguity(),t.resetNextTimestamp())}resetInitSegment(e,t,n,r,i){const{demuxer:s,remuxer:A}=this;!s||!A||(s.resetInitSegment(e,t,n,r),A.resetInitSegment(e,t,n,i))}destroy(){this.demuxer&&(this.demuxer.destroy(),this.demuxer=void 0),this.remuxer&&(this.remuxer.destroy(),this.remuxer=void 0)}transmux(e,t,n,r,i){let s;return t&&t.method==="SAMPLE-AES"?s=this.transmuxSampleAes(e,t,n,r,i):s=this.transmuxUnencrypted(e,n,r,i),s}transmuxUnencrypted(e,t,n,r){const{audioTrack:i,videoTrack:s,id3Track:A,textTrack:f}=this.demuxer.demux(e,t,!1,!this.config.progressive);return{remuxResult:this.remuxer.remux(i,s,A,f,t,n,!1,this.id),chunkMeta:r}}transmuxSampleAes(e,t,n,r,i){return this.demuxer.demuxSampleAes(e,t,n).then(s=>({remuxResult:this.remuxer.remux(s.audioTrack,s.videoTrack,s.id3Track,s.textTrack,n,r,!1,this.id),chunkMeta:i}))}configureTransmuxer(e){const{config:t,observer:n,typeSupported:r}=this;let i;for(let y=0,B=Eo.length;y<B;y++){var s;if((s=Eo[y].demux)!=null&&s.probe(e,this.logger)){i=Eo[y];break}}if(!i)return new Error("Failed to find demuxer by probing fragment data");const A=this.demuxer,f=this.remuxer,c=i.remux,m=i.demux;(!f||!(f instanceof c))&&(this.remuxer=new c(n,t,r,this.logger)),(!A||!(A instanceof m))&&(this.demuxer=new m(n,t,r,this.logger),this.probe=m.probe)}needsProbing(e,t){return!this.demuxer||!this.remuxer||e||t}getDecrypter(){let e=this.decrypter;return e||(e=this.decrypter=new jn(this.config)),e}}function HA(a,e){let t=null;return a.byteLength>0&&(e==null?void 0:e.key)!=null&&e.iv!==null&&e.method!=null&&(t=e),t}const Go=a=>({remuxResult:{},chunkMeta:a});function Pa(a){return"then"in a&&a.then instanceof Function}class KA{constructor(e,t,n,r,i){this.audioCodec=void 0,this.videoCodec=void 0,this.initSegmentData=void 0,this.duration=void 0,this.defaultInitPts=void 0,this.audioCodec=e,this.videoCodec=t,this.initSegmentData=n,this.duration=r,this.defaultInitPts=i||null}}class GA{constructor(e,t,n,r,i,s){this.discontinuity=void 0,this.contiguous=void 0,this.accurateTimeOffset=void 0,this.trackSwitch=void 0,this.timeOffset=void 0,this.initSegmentChange=void 0,this.discontinuity=e,this.contiguous=t,this.accurateTimeOffset=n,this.trackSwitch=r,this.timeOffset=i,this.initSegmentChange=s}}let $A=0;class hA{constructor(e,t,n,r){this.error=null,this.hls=void 0,this.id=void 0,this.instanceNo=$A++,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=f=>{const c=f.data,m=this.hls;if(!(!m||!(c!=null&&c.event)||c.instanceNo!==this.instanceNo))switch(c.event){case"init":{var y;const B=(y=this.workerContext)==null?void 0:y.objectURL;B&&self.URL.revokeObjectURL(B);break}case"transmuxComplete":{this.handleTransmuxComplete(c.data);break}case"flush":{this.onFlush(c.data);break}case"workerLog":{m.logger[c.data.logType]&&m.logger[c.data.logType](c.data.message);break}default:{c.data=c.data||{},c.data.frag=this.frag,c.data.part=this.part,c.data.id=this.id,m.trigger(c.event,c.data);break}}},this.onWorkerError=f=>{if(!this.hls)return;const c=new Error(`${f.message} (${f.filename}:${f.lineno})`);this.hls.config.enableWorker=!1,this.hls.logger.warn(`Error in "${this.id}" Web Worker, fallback to inline`),this.hls.trigger(g.ERROR,{type:ge.OTHER_ERROR,details:G.INTERNAL_EXCEPTION,fatal:!1,event:"demuxerWorker",error:c})};const i=e.config;this.hls=e,this.id=t,this.useWorker=!!i.enableWorker,this.onTransmuxComplete=n,this.onFlush=r;const s=(f,c)=>{c=c||{},c.frag=this.frag||void 0,f===g.ERROR&&(c=c,c.parent=this.id,c.part=this.part,this.error=c.error),this.hls.trigger(f,c)};this.observer=new Ja,this.observer.on(g.FRAG_DECRYPTED,s),this.observer.on(g.ERROR,s);const A=$n(i.preferManagedMediaSource);if(this.useWorker&&typeof Worker!="undefined"){const f=this.hls.logger;if(i.workerPath||Va()){try{i.workerPath?(f.log(`loading Web Worker ${i.workerPath} for "${t}"`),this.workerContext=xa(i.workerPath)):(f.log(`injecting Web Worker for "${t}"`),this.workerContext=ns());const{worker:m}=this.workerContext;m.addEventListener("message",this.onWorkerMessage),m.addEventListener("error",this.onWorkerError),m.postMessage({instanceNo:this.instanceNo,cmd:"init",typeSupported:A,id:t,config:Sn(i)})}catch(m){f.warn(`Error setting up "${t}" Web Worker, fallback to inline`,m),this.terminateWorker(),this.error=null,this.transmuxer=new dA(this.observer,A,i,"",t,e.logger)}return}}this.transmuxer=new dA(this.observer,A,i,"",t,e.logger)}reset(){if(this.frag=null,this.part=null,this.workerContext){const e=this.instanceNo;this.instanceNo=$A++;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:Sn(t)})}}terminateWorker(){if(this.workerContext){const{worker:e}=this.workerContext;this.workerContext=null,e.removeEventListener("message",this.onWorkerMessage),e.removeEventListener("error",this.onWorkerError),fo(this.hls.config.workerPath)}}destroy(){if(this.workerContext)this.terminateWorker(),this.onWorkerMessage=this.onWorkerError=null;else{const t=this.transmuxer;t&&(t.destroy(),this.transmuxer=null)}const e=this.observer;e&&e.removeAllListeners(),this.frag=null,this.part=null,this.observer=null,this.hls=null}push(e,t,n,r,i,s,A,f,c,m){var y,B;c.transmuxing.start=self.performance.now();const{instanceNo:D,transmuxer:L}=this,se=s?s.start:i.start,X=i.decryptdata,xe=this.frag,at=!(xe&&i.cc===xe.cc),We=!(xe&&c.level===xe.level),Mt=xe?c.sn-xe.sn:-1,qt=this.part?c.part-this.part.index:-1,Dn=Mt===0&&c.id>1&&c.id===(xe==null?void 0:xe.stats.chunkCount),zt=!We&&(Mt===1||Mt===0&&(qt===1||Dn&&qt<=0)),un=self.performance.now();(We||Mt||i.stats.parsing.start===0)&&(i.stats.parsing.start=un),s&&(qt||!zt)&&(s.stats.parsing.start=un);const gn=!(xe&&((y=i.initSegment)==null?void 0:y.url)===((B=xe.initSegment)==null?void 0:B.url)),Yt=new GA(at,zt,f,We,se,gn);if(!zt||at||gn){this.hls.logger.log(`[transmuxer-interface]: Starting new transmux session for ${i.type} sn: ${c.sn}${c.part>-1?" part: "+c.part:""} ${this.id===le.MAIN?"level":"track"}: ${c.level} id: ${c.id}
|
|
discontinuity: ${at}
|
|
trackSwitch: ${We}
|
|
contiguous: ${zt}
|
|
accurateTimeOffset: ${f}
|
|
timeOffset: ${se}
|
|
initSegmentChange: ${gn}`);const Nn=new KA(n,r,t,A,m);this.configureTransmuxer(Nn)}if(this.frag=i,this.part=s,this.workerContext)this.workerContext.worker.postMessage({instanceNo:D,cmd:"demux",data:e,decryptdata:X,chunkMeta:c,state:Yt},e instanceof ArrayBuffer?[e]:[]);else if(L){const Nn=L.push(e,X,c,Yt);Pa(Nn)?Nn.then(Cr=>{this.handleTransmuxComplete(Cr)}).catch(Cr=>{this.transmuxerError(Cr,c,"transmuxer-interface push error")}):this.handleTransmuxComplete(Nn)}}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);Pa(r)?r.then(i=>{this.handleFlushResult(i,e)}).catch(i=>{this.transmuxerError(i,e,"transmuxer-interface flush error")}):this.handleFlushResult(r,e)}}transmuxerError(e,t,n){this.hls&&(this.error=e,this.hls.trigger(g.ERROR,{type:ge.MEDIA_ERROR,details:G.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 ZA=100;class Yl extends sa{constructor(e,t,n){super(e,t,n,"audio-stream-controller",le.AUDIO),this.mainAnchor=null,this.mainFragLoading=null,this.audioOnly=!1,this.bufferedTrack=null,this.switchingTrack=null,this.trackId=-1,this.waitingData=null,this.mainDetails=null,this.flushing=!1,this.bufferFlushed=!1,this.cachedTrackLoadedData=null,this.registerListeners()}onHandlerDestroying(){this.unregisterListeners(),super.onHandlerDestroying(),this.resetItem()}resetItem(){this.mainDetails=this.mainAnchor=this.mainFragLoading=this.bufferedTrack=this.switchingTrack=this.waitingData=this.cachedTrackLoadedData=null}registerListeners(){super.registerListeners();const{hls:e}=this;e.on(g.LEVEL_LOADED,this.onLevelLoaded,this),e.on(g.AUDIO_TRACKS_UPDATED,this.onAudioTracksUpdated,this),e.on(g.AUDIO_TRACK_SWITCHING,this.onAudioTrackSwitching,this),e.on(g.AUDIO_TRACK_LOADED,this.onAudioTrackLoaded,this),e.on(g.BUFFER_RESET,this.onBufferReset,this),e.on(g.BUFFER_CREATED,this.onBufferCreated,this),e.on(g.BUFFER_FLUSHING,this.onBufferFlushing,this),e.on(g.BUFFER_FLUSHED,this.onBufferFlushed,this),e.on(g.INIT_PTS_FOUND,this.onInitPtsFound,this),e.on(g.FRAG_LOADING,this.onFragLoading,this),e.on(g.FRAG_BUFFERED,this.onFragBuffered,this)}unregisterListeners(){const{hls:e}=this;e&&(super.unregisterListeners(),e.off(g.LEVEL_LOADED,this.onLevelLoaded,this),e.off(g.AUDIO_TRACKS_UPDATED,this.onAudioTracksUpdated,this),e.off(g.AUDIO_TRACK_SWITCHING,this.onAudioTrackSwitching,this),e.off(g.AUDIO_TRACK_LOADED,this.onAudioTrackLoaded,this),e.off(g.BUFFER_RESET,this.onBufferReset,this),e.off(g.BUFFER_CREATED,this.onBufferCreated,this),e.off(g.BUFFER_FLUSHING,this.onBufferFlushing,this),e.off(g.BUFFER_FLUSHED,this.onBufferFlushed,this),e.off(g.INIT_PTS_FOUND,this.onInitPtsFound,this),e.off(g.FRAG_LOADING,this.onFragLoading,this),e.off(g.FRAG_BUFFERED,this.onFragBuffered,this))}onInitPtsFound(e,{frag:t,id:n,initPTS:r,timescale:i,trackId:s}){if(n===le.MAIN){const A=t.cc,f=this.fragCurrent;if(this.initPTS[A]={baseTime:r,timescale:i,trackId:s},this.log(`InitPTS for cc: ${A} found from main: ${r/i} (${r}/${i}) trackId: ${s}`),this.mainAnchor=t,this.state===Fn.WAITING_INIT_PTS){const c=this.waitingData;(!c&&!this.loadingParts||c&&c.frag.cc!==A)&&this.syncWithAnchor(t,c==null?void 0:c.frag)}else!this.hls.hasEnoughToStart&&f&&f.cc!==A?(f.abortRequests(),this.syncWithAnchor(t,f)):this.state===Fn.IDLE&&this.tick()}}getLoadPosition(){return!this.startFragRequested&&this.nextLoadPosition>=0?this.nextLoadPosition:super.getLoadPosition()}syncWithAnchor(e,t){var n;const r=((n=this.mainFragLoading)==null?void 0:n.frag)||null;if(t&&(r==null?void 0:r.cc)===t.cc)return;const i=(r||e).cc,s=this.getLevelDetails(),A=this.getLoadPosition(),f=rt(s,i,A);f&&(this.log(`Syncing with main frag at ${f.start} cc ${f.cc}`),this.startFragRequested=!1,this.nextLoadPosition=f.start,this.resetLoadingState(),this.state===Fn.IDLE&&this.doTickIdle())}startLoad(e,t){if(!this.levels){this.startPosition=e,this.state=Fn.STOPPED;return}const n=this.lastCurrentTime;this.stopLoad(),this.setInterval(ZA),n>0&&e===-1?(this.log(`Override startPosition with lastCurrentTime @${n.toFixed(3)}`),e=n,this.state=Fn.IDLE):this.state=Fn.WAITING_TRACK,this.nextLoadPosition=this.lastCurrentTime=e+this.timelineOffset,this.startPosition=t?-1:e,this.tick()}doTick(){switch(this.state){case Fn.IDLE:this.doTickIdle();break;case Fn.WAITING_TRACK:{const{levels:e,trackId:t}=this,n=e==null?void 0:e[t],r=n==null?void 0:n.details;if(r&&!this.waitForLive(n)){if(this.waitForCdnTuneIn(r))break;this.state=Fn.WAITING_INIT_PTS}break}case Fn.FRAG_LOADING_WAITING_RETRY:{this.checkRetryDate();break}case Fn.WAITING_INIT_PTS:{const e=this.waitingData;if(e){const{frag:t,part:n,cache:r,complete:i}=e,s=this.mainAnchor;if(this.initPTS[t.cc]!==void 0){this.waitingData=null,this.state=Fn.FRAG_LOADING;const A=r.flush().buffer,f={frag:t,part:n,payload:A,networkDetails:null};this._handleFragmentLoadProgress(f),i&&super._handleFragmentLoadComplete(f)}else s&&s.cc!==e.frag.cc&&this.syncWithAnchor(s,e.frag)}else this.state=Fn.IDLE}}this.onTickEnd()}resetLoadingState(){const e=this.waitingData;e&&(this.fragmentTracker.removeFragment(e.frag),this.waitingData=null),super.resetLoadingState()}onTickEnd(){const{media:e}=this;e!=null&&e.readyState&&(this.lastCurrentTime=e.currentTime)}doTickIdle(){var e;const{hls:t,levels:n,media:r,trackId:i}=this,s=t.config;if(!this.buffering||!r&&!this.primaryPrefetch&&(this.startFragRequested||!s.startFragPrefetch)||!(n!=null&&n[i]))return;const A=n[i],f=A.details;if(!f||this.waitForLive(A)||this.waitForCdnTuneIn(f)){this.state=Fn.WAITING_TRACK,this.startFragRequested=!1;return}const c=this.mediaBuffer?this.mediaBuffer:this.media;this.bufferFlushed&&c&&(this.bufferFlushed=!1,this.afterBufferFlushed(c,W.AUDIO,le.AUDIO));const m=this.getFwdBufferInfo(c,le.AUDIO);if(m===null)return;if(!this.switchingTrack&&this._streamEnded(m,f)){t.trigger(g.BUFFER_EOS,{type:"audio"}),this.state=Fn.ENDED;return}const y=m.len,B=t.maxBufferLength,D=f.fragments,L=D[0].start,se=this.getLoadPosition(),X=this.flushing?se:m.end;if(this.switchingTrack&&r){const We=se;f.PTSKnown&&We<L&&(m.end>L||m.nextStart)&&(this.log("Alt audio track ahead of main track, seek to start of alt audio track"),r.currentTime=L+.05)}if(y>=B&&!this.switchingTrack&&X<D[D.length-1].start)return;let xe=this.getNextFragment(X,f);if(xe&&this.isLoopLoading(xe,X)&&(xe=this.getNextFragmentLoopLoading(xe,f,m,le.MAIN,B)),!xe){this.bufferFlushed=!0;return}let at=((e=this.mainFragLoading)==null?void 0:e.frag)||null;if(!this.audioOnly&&this.startFragRequested&&at&&Ve(xe)&&!xe.endList&&(!f.live||!this.loadingParts&&X<this.hls.liveSyncPosition)&&(this.fragmentTracker.getState(at)===dt.OK&&(this.mainFragLoading=at=null),at&&Ve(at))){if(xe.start>at.end){const Mt=this.fragmentTracker.getFragAtPos(X,le.MAIN);Mt&&Mt.end>at.end&&(at=Mt,this.mainFragLoading={frag:Mt,targetBufferTime:null})}if(xe.start>at.end)return}this.loadFragment(xe,A,X)}onMediaDetaching(e,t){this.bufferFlushed=this.flushing=!1,super.onMediaDetaching(e,t)}onAudioTracksUpdated(e,{audioTracks:t}){this.resetTransmuxer(),this.levels=t.map(n=>new vn(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!==Fn.STOPPED&&(this.setInterval(ZA),this.state=Fn.IDLE,this.tick())):(this.resetTransmuxer(),this.switchingTrack=null,this.bufferedTrack=t,this.clearInterval())}onManifestLoading(){super.onManifestLoading(),this.bufferFlushed=this.flushing=this.audioOnly=!1,this.resetItem(),this.trackId=-1}onLevelLoaded(e,t){this.mainDetails=t.details;const n=this.cachedTrackLoadedData;n&&(this.cachedTrackLoadedData=null,this.onAudioTrackLoaded(g.AUDIO_TRACK_LOADED,n))}onAudioTrackLoaded(e,t){var n;const{levels:r}=this,{details:i,id:s,groupId:A,track:f}=t;if(!r){this.warn(`Audio tracks reset while loading track ${s} "${f.name}" of "${A}"`);return}const c=this.mainDetails;if(!c||i.endCC>c.endCC||c.expired){this.cachedTrackLoadedData=t,this.state!==Fn.STOPPED&&(this.state=Fn.WAITING_TRACK);return}this.cachedTrackLoadedData=null,this.log(`Audio track ${s} "${f.name}" of "${A}" loaded [${i.startSN},${i.endSN}]${i.lastPartSn?`[part-${i.lastPartSn}-${i.lastPartIndex}]`:""},duration:${i.totalduration}`);const m=r[s];let y=0;if(i.live||(n=m.details)!=null&&n.live){if(this.checkLiveUpdate(i),i.deltaUpdateFailed)return;if(m.details){var B;y=this.alignPlaylists(i,m.details,(B=this.levelLastLoaded)==null?void 0:B.details)}i.alignedSliding||(ji(i,c),i.alignedSliding||Ts(i,c),y=i.fragmentStart)}m.details=i,this.levelLastLoaded=m,this.startFragRequested||this.setStartPosition(c,y),this.hls.trigger(g.AUDIO_TRACK_UPDATED,{details:i,id:s,groupId:t.groupId}),this.state===Fn.WAITING_TRACK&&!this.waitForCdnTuneIn(i)&&(this.state=Fn.IDLE),this.tick()}_handleFragmentLoadProgress(e){var t;const n=e.frag,{part:r,payload:i}=e,{config:s,trackId:A,levels:f}=this;if(!f){this.warn(`Audio tracks were reset while fragment load was in progress. Fragment ${n.sn} of level ${n.level} will not be buffered`);return}const c=f[A];if(!c){this.warn("Audio track is undefined on fragment load progress");return}const m=c.details;if(!m){this.warn("Audio track details undefined on fragment load progress"),this.removeUnbufferedFrags(n.start);return}const y=s.defaultAudioCodec||c.audioCodec||"mp4a.40.2";let B=this.transmuxer;B||(B=this.transmuxer=new hA(this.hls,le.AUDIO,this._handleTransmuxComplete.bind(this),this._handleTransmuxerFlush.bind(this)));const D=this.initPTS[n.cc],L=(t=n.initSegment)==null?void 0:t.data;if(D!==void 0){const X=r?r.index:-1,xe=X!==-1,at=new fr(n.level,n.sn,n.stats.chunkCount,i.byteLength,X,xe);B.push(i,L,y,"",n,r,m.totalduration,!1,at,D)}else{this.log(`Unknown video PTS for cc ${n.cc}, waiting for video PTS before demuxing audio frag ${n.sn} of [${m.startSN} ,${m.endSN}],track ${A}`);const{cache:se}=this.waitingData=this.waitingData||{frag:n,part:r,cache:new Zs,complete:!1};se.push(new Uint8Array(i)),this.state!==Fn.STOPPED&&(this.state=Fn.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===le.MAIN&&Ve(t.frag)&&(this.mainFragLoading=t,this.state===Fn.IDLE&&this.tick())}onFragBuffered(e,t){const{frag:n,part:r}=t;if(n.type!==le.AUDIO){!this.audioOnly&&n.type===le.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(Ve(n)){this.fragPrevious=n;const i=this.switchingTrack;i&&(this.bufferedTrack=i,this.switchingTrack=null,this.hls.trigger(g.AUDIO_TRACK_SWITCHED,b({},i)))}this.fragBufferedComplete(n,r),this.media&&this.tick()}onError(e,t){var n;if(t.fatal){this.state=Fn.ERROR;return}switch(t.details){case G.FRAG_GAP:case G.FRAG_PARSING_ERROR:case G.FRAG_DECRYPT_ERROR:case G.FRAG_LOAD_ERROR:case G.FRAG_LOAD_TIMEOUT:case G.KEY_LOAD_ERROR:case G.KEY_LOAD_TIMEOUT:this.onFragmentOrKeyLoadError(le.AUDIO,t);break;case G.AUDIO_TRACK_LOAD_ERROR:case G.AUDIO_TRACK_LOAD_TIMEOUT:case G.LEVEL_PARSING_ERROR:!t.levelRetry&&this.state===Fn.WAITING_TRACK&&((n=t.context)==null?void 0:n.type)===ye.AUDIO_TRACK&&(this.state=Fn.IDLE);break;case G.BUFFER_ADD_CODEC_ERROR:case G.BUFFER_APPEND_ERROR:if(t.parent!=="audio")return;this.reduceLengthAndFlushBuffer(t)||this.resetLoadingState();break;case G.BUFFER_FULL_ERROR:if(t.parent!=="audio")return;this.reduceLengthAndFlushBuffer(t)&&(this.bufferedTrack=null,super.flushMainBuffer(0,Number.POSITIVE_INFINITY,"audio"));break;case G.INTERNAL_EXCEPTION:this.recoverWorkerError(t);break}}onBufferFlushing(e,{type:t}){t!==W.VIDEO&&(this.flushing=!0)}onBufferFlushed(e,{type:t}){if(t!==W.VIDEO){this.flushing=!1,this.bufferFlushed=!0,this.state===Fn.ENDED&&(this.state=Fn.IDLE);const n=this.mediaBuffer||this.media;n&&(this.afterBufferFlushed(n,t,le.AUDIO),this.tick())}}_handleTransmuxComplete(e){var t;const n="audio",{hls:r}=this,{remuxResult:i,chunkMeta:s}=e,A=this.getCurrentContext(s);if(!A){this.resetWhenMissingContext(s);return}const{frag:f,part:c,level:m}=A,{details:y}=m,{audio:B,text:D,id3:L,initSegment:se}=i;if(this.fragContextChanged(f)||!y){this.fragmentTracker.removeFragment(f);return}if(this.state=Fn.PARSING,this.switchingTrack&&B&&this.completeAudioSwitch(this.switchingTrack),se!=null&&se.tracks){const X=f.initSegment||f;if(this.unhandledEncryptionError(se,f))return;this._bufferInitSegment(m,se.tracks,X,s),r.trigger(g.FRAG_PARSING_INIT_SEGMENT,{frag:X,id:n,tracks:se.tracks})}if(B){const{startPTS:X,endPTS:xe,startDTS:at,endDTS:We}=B;c&&(c.elementaryStreams[W.AUDIO]={startPTS:X,endPTS:xe,startDTS:at,endDTS:We}),f.setElementaryStreamInfo(W.AUDIO,X,xe,at,We),this.bufferFragmentData(B,f,c,s)}if(L!=null&&(t=L.samples)!=null&&t.length){const X=_({id:n,frag:f,details:y},L);r.trigger(g.FRAG_PARSING_METADATA,X)}if(D){const X=_({id:n,frag:f,details:y},D);r.trigger(g.FRAG_PARSING_USERDATA,X)}}_bufferInitSegment(e,t,n,r){if(this.state!==Fn.PARSING||(t.video&&delete t.video,t.audiovideo&&delete t.audiovideo,!t.audio))return;const i=t.audio;i.id=le.AUDIO;const s=e.audioCodec;this.log(`Init audio buffer, container:${i.container}, codecs[level/parsed]=[${s}/${i.codec}]`),s&&s.split(",").length===1&&(i.levelCodec=s),this.hls.trigger(g.BUFFER_CODECS,t);const A=i.initSegment;if(A!=null&&A.byteLength){const f={type:"audio",frag:n,part:null,chunkMeta:r,parent:n.type,data:A};this.hls.trigger(g.BUFFER_APPENDING,f)}this.tickImmediate()}loadFragment(e,t,n){const r=this.fragmentTracker.getState(e);if(this.switchingTrack||r===dt.NOT_LOADED||r===dt.PARTIAL){var i;if(!Ve(e))this._loadInitSegment(e,t);else if((i=t.details)!=null&&i.live&&!this.initPTS[e.cc]){this.log(`Waiting for video PTS in continuity counter ${e.cc} of live stream before loading audio fragment ${e.sn} of level ${this.trackId}`),this.state=Fn.WAITING_INIT_PTS;const s=this.mainDetails;s&&s.fragmentStart!==t.details.fragmentStart&&Ts(t.details,s)}else super.loadFragment(e,t,n)}else this.clearTrackerIfNeeded(e)}flushAudioIfNeeded(e){if(this.media&&this.bufferedTrack){const{name:t,lang:n,assocLang:r,characteristics:i,audioCodec:s,channels:A}=this.bufferedTrack;on({name:t,lang:n,assocLang:r,characteristics:i,audioCodec:s,channels:A},e,Hn)||(yt(e.url,this.hls)?(this.log("Switching audio track : flushing all audio"),super.flushMainBuffer(0,Number.POSITIVE_INFINITY,"audio"),this.bufferedTrack=null):this.bufferedTrack=e)}}completeAudioSwitch(e){const{hls:t}=this;this.flushAudioIfNeeded(e),this.bufferedTrack=e,this.switchingTrack=null,t.trigger(g.AUDIO_TRACK_SWITCHED,b({},e))}}class $o extends H{constructor(e,t){super(t,e.logger),this.hls=void 0,this.canLoad=!1,this.timer=-1,this.hls=e}destroy(){this.clearTimer(),this.hls=this.log=this.warn=null}clearTimer(){this.timer!==-1&&(self.clearTimeout(this.timer),this.timer=-1)}startLoad(){this.canLoad=!0,this.loadPlaylist()}stopLoad(){this.canLoad=!1,this.clearTimer()}switchParams(e,t,n){const r=t==null?void 0:t.renditionReports;if(r){let i=-1;for(let s=0;s<r.length;s++){const A=r[s];let f;try{f=new self.URL(A.URI,t.url).href}catch(c){this.warn(`Could not construct new URL for Rendition Report: ${c}`),f=A.URI||""}if(f===e){i=s;break}else f===e.substring(0,f.length)&&(i=s)}if(i!==-1){const s=r[i],A=parseInt(s["LAST-MSN"])||t.lastPartSn;let f=parseInt(s["LAST-PART"])||t.lastPartIndex;if(this.hls.config.lowLatencyMode){const m=Math.min(t.age-t.partTarget,t.targetduration);f>=0&&m>t.partTarget&&(f+=1)}const c=n&&Bn(n);return new xn(A,f>=0?f:void 0,c)}}}loadPlaylist(e){this.clearTimer()}loadingPlaylist(e,t){this.clearTimer()}shouldLoadPlaylist(e){return this.canLoad&&!!e&&!!e.url&&(!e.details||e.details.live)}getUrlWithDirectives(e,t){if(t)try{return t.addDirectives(e)}catch(n){this.warn(`Could not construct new URL with HLS Delivery Directives: ${n}`)}return e}playlistLoaded(e,t,n){const{details:r,stats:i}=t,s=self.performance.now(),A=i.loading.first?Math.max(0,s-i.loading.first):0;r.advancedDateTime=Date.now()-A;const f=this.hls.config.timelineOffset;if(f!==r.appliedTimelineOffset){const m=Math.max(f||0,0);r.appliedTimelineOffset=m,r.fragments.forEach(y=>{y.setStart(y.playlistOffset+m)})}if(r.live||n!=null&&n.live){const m="levelInfo"in t?t.levelInfo:t.track;if(r.reloaded(n),n&&r.fragments.length>0){oi(n,r,this);const at=r.playlistParsingError;if(at){this.warn(at);const We=this.hls;if(!We.config.ignorePlaylistParsingErrors){var c;const{networkDetails:Mt}=t;We.trigger(g.ERROR,{type:ge.NETWORK_ERROR,details:G.LEVEL_PARSING_ERROR,fatal:!1,url:r.url,error:at,reason:at.message,level:t.level||void 0,parent:(c=r.fragments[0])==null?void 0:c.type,networkDetails:Mt,stats:i});return}r.playlistParsingError=null}}r.requestScheduled===-1&&(r.requestScheduled=i.loading.start);const y=this.hls.mainForwardBufferInfo,B=y?y.end-y.len:0,D=(r.edge-B)*1e3,L=Ls(r,D);if(r.requestScheduled+L<s?r.requestScheduled=s:r.requestScheduled+=L,this.log(`live playlist ${e} ${r.advanced?"REFRESHED "+r.lastPartSn+"-"+r.lastPartIndex:r.updated?"UPDATED":"MISSED"}`),!this.canLoad||!r.live)return;let se,X,xe;if(r.canBlockReload&&r.endSN&&r.advanced){const at=this.hls.config.lowLatencyMode,We=r.lastPartSn,Mt=r.endSN,qt=r.lastPartIndex,Dn=qt!==-1,zt=We===Mt;Dn?zt?(X=Mt+1,xe=at?0:qt):(X=We,xe=at?qt+1:r.maxPartIndex):X=Mt+1;const un=r.age,gn=un+r.ageHeader;let Yt=Math.min(gn-r.partTarget,r.targetduration*1.5);if(Yt>0){if(gn>r.targetduration*3)this.log(`Playlist last advanced ${un.toFixed(2)}s ago. Omitting segment and part directives.`),X=void 0,xe=void 0;else if(n!=null&&n.tuneInGoal&&gn-r.partTarget>n.tuneInGoal)this.warn(`CDN Tune-in goal increased from: ${n.tuneInGoal} to: ${Yt} with playlist age: ${r.age}`),Yt=0;else{const Nn=Math.floor(Yt/r.targetduration);if(X+=Nn,xe!==void 0){const Cr=Math.round(Yt%r.targetduration/r.partTarget);xe+=Cr}this.log(`CDN Tune-in age: ${r.ageHeader}s last advanced ${un.toFixed(2)}s goal: ${Yt} skip sn ${Nn} to part ${xe}`)}r.tuneInGoal=Yt}if(se=this.getDeliveryDirectives(r,t.deliveryDirectives,X,xe),at||!zt){r.requestScheduled=s,this.loadingPlaylist(m,se);return}}else(r.canBlockReload||r.canSkipUntil)&&(se=this.getDeliveryDirectives(r,t.deliveryDirectives,X,xe));se&&X!==void 0&&r.canBlockReload&&(r.requestScheduled=i.loading.first+Math.max(L-A*2,L/2)),this.scheduleLoading(m,se,r)}else this.clearTimer()}scheduleLoading(e,t,n){const r=n||e.details;if(!r){this.loadingPlaylist(e,t);return}const i=self.performance.now(),s=r.requestScheduled;if(i>=s){this.loadingPlaylist(e,t);return}const A=s-i;this.log(`reload live playlist ${e.name||e.bitrate+"bps"} in ${Math.round(A)} ms`),this.clearTimer(),this.timer=self.setTimeout(()=>this.loadingPlaylist(e,t),A)}getDeliveryDirectives(e,t,n,r){let i=Bn(e);return t!=null&&t.skip&&e.deltaUpdateFailed&&(n=t.msn,r=t.part,i=Jt.No),new xn(n,r,i)}checkRetry(e){const t=e.details,n=Ft(e),r=e.errorAction,{action:i,retryCount:s=0,retryConfig:A}=r||{},f=!!r&&!!A&&(i===Ye.RetryRequest||!r.resolved&&i===Ye.SendAlternateToPenaltyBox);if(f){var c;if(s>=A.maxNumRetry)return!1;if(n&&(c=e.context)!=null&&c.deliveryDirectives)this.warn(`Retrying playlist loading ${s+1}/${A.maxNumRetry} after "${t}" without delivery-directives`),this.loadPlaylist();else{const m=an(A,s);this.clearTimer(),this.timer=self.setTimeout(()=>this.loadPlaylist(),m),this.warn(`Retrying playlist loading ${s+1}/${A.maxNumRetry} after "${t}" in ${m}ms`)}e.levelRetry=!0,r.resolved=!0}return f}}function VA(a,e){if(a.length!==e.length)return!1;for(let t=0;t<a.length;t++)if(!ks(a[t].attrs,e[t].attrs))return!1;return!0}function ks(a,e,t){const n=a["STABLE-RENDITION-ID"];return n&&!t?n===e["STABLE-RENDITION-ID"]:!(t||["LANGUAGE","NAME","CHARACTERISTICS","AUTOSELECT","DEFAULT","FORCED","ASSOC-LANGUAGE"]).some(r=>a[r]!==e[r])}function Bo(a,e){return e.label.toLowerCase()===a.name.toLowerCase()&&(!e.language||e.language.toLowerCase()===(a.lang||"").toLowerCase())}class zA extends $o{constructor(e){super(e,"audio-track-controller"),this.tracks=[],this.groupIds=null,this.tracksInGroup=[],this.trackId=-1,this.currentTrack=null,this.selectDefaultTrack=!0,this.registerListeners()}registerListeners(){const{hls:e}=this;e.on(g.MANIFEST_LOADING,this.onManifestLoading,this),e.on(g.MANIFEST_PARSED,this.onManifestParsed,this),e.on(g.LEVEL_LOADING,this.onLevelLoading,this),e.on(g.LEVEL_SWITCHING,this.onLevelSwitching,this),e.on(g.AUDIO_TRACK_LOADED,this.onAudioTrackLoaded,this),e.on(g.ERROR,this.onError,this)}unregisterListeners(){const{hls:e}=this;e.off(g.MANIFEST_LOADING,this.onManifestLoading,this),e.off(g.MANIFEST_PARSED,this.onManifestParsed,this),e.off(g.LEVEL_LOADING,this.onLevelLoading,this),e.off(g.LEVEL_SWITCHING,this.onLevelSwitching,this),e.off(g.AUDIO_TRACK_LOADED,this.onAudioTrackLoaded,this),e.off(g.ERROR,this.onError,this)}destroy(){this.unregisterListeners(),this.tracks.length=0,this.tracksInGroup.length=0,this.currentTrack=null,super.destroy()}onManifestLoading(){this.tracks=[],this.tracksInGroup=[],this.groupIds=null,this.currentTrack=null,this.trackId=-1,this.selectDefaultTrack=!0}onManifestParsed(e,t){this.tracks=t.audioTracks||[]}onAudioTrackLoaded(e,t){const{id:n,groupId:r,details:i}=t,s=this.tracksInGroup[n];if(!s||s.groupId!==r){this.warn(`Audio track with id:${n} and group:${r} not found in active group ${s==null?void 0:s.groupId}`);return}const A=s.details;s.details=t.details,this.log(`Audio track ${n} "${s.name}" lang:${s.lang} group:${r} loaded [${i.startSN}-${i.endSN}]`),n===this.trackId&&this.playlistLoaded(n,t,A)}onLevelLoading(e,t){this.switchLevel(t.level)}onLevelSwitching(e,t){this.switchLevel(t.level)}switchLevel(e){const t=this.hls.levels[e];if(!t)return;const n=t.audioGroups||null,r=this.groupIds;let i=this.currentTrack;if(!n||(r==null?void 0:r.length)!==(n==null?void 0:n.length)||n!=null&&n.some(A=>(r==null?void 0:r.indexOf(A))===-1)){this.groupIds=n,this.trackId=-1,this.currentTrack=null;const A=this.tracks.filter(B=>!n||n.indexOf(B.groupId)!==-1);if(A.length)this.selectDefaultTrack&&!A.some(B=>B.default)&&(this.selectDefaultTrack=!1),A.forEach((B,D)=>{B.id=D});else if(!i&&!this.tracksInGroup.length)return;this.tracksInGroup=A;const f=this.hls.config.audioPreference;if(!i&&f){const B=Lt(f,A,Hn);if(B>-1)i=A[B];else{const D=Lt(f,this.tracks);i=this.tracks[D]}}let c=this.findTrackId(i);c===-1&&i&&(c=this.findTrackId(null));const m={audioTracks:A};this.log(`Updating audio tracks, ${A.length} track(s) found in group(s): ${n==null?void 0:n.join(",")}`),this.hls.trigger(g.AUDIO_TRACKS_UPDATED,m);const y=this.trackId;if(c!==-1&&y===-1)this.setAudioTrack(c);else if(A.length&&y===-1){var s;const B=new Error(`No audio track selected for current audio group-ID(s): ${(s=this.groupIds)==null?void 0:s.join(",")} track count: ${A.length}`);this.warn(B.message),this.hls.trigger(g.ERROR,{type:ge.MEDIA_ERROR,details:G.AUDIO_TRACK_LOAD_ERROR,fatal:!0,error:B})}}}onError(e,t){t.fatal||!t.context||t.context.type===ye.AUDIO_TRACK&&t.context.id===this.trackId&&(!this.groupIds||this.groupIds.indexOf(t.context.groupId)!==-1)&&this.checkRetry(t)}get allAudioTracks(){return this.tracks}get audioTracks(){return this.tracksInGroup}get audioTrack(){return this.trackId}set audioTrack(e){this.selectDefaultTrack=!1,this.setAudioTrack(e)}setAudioOption(e){const t=this.hls;if(t.config.audioPreference=e,e){const n=this.allAudioTracks;if(this.selectDefaultTrack=!1,n.length){const r=this.currentTrack;if(r&&on(e,r,Hn))return r;const i=Lt(e,this.tracksInGroup,Hn);if(i>-1){const s=this.tracksInGroup[i];return this.setAudioTrack(i),s}else if(r){let s=t.loadLevel;s===-1&&(s=t.firstAutoLevel);const A=Xn(e,t.levels,n,s,Hn);if(A===-1)return null;t.nextLoadLevel=A}if(e.channels||e.audioCodec){const s=Lt(e,n);if(s>-1)return n[s]}}}return null}setAudioTrack(e){const t=this.tracksInGroup;if(e<0||e>=t.length){this.warn(`Invalid audio track id: ${e}`);return}this.selectDefaultTrack=!1;const n=this.currentTrack,r=t[e],i=r.details&&!r.details.live;if(e===this.trackId&&r===n&&i||(this.log(`Switching to audio-track ${e} "${r.name}" lang:${r.lang} group:${r.groupId} channels:${r.channels}`),this.trackId=e,this.currentTrack=r,this.hls.trigger(g.AUDIO_TRACK_SWITCHING,b({},r)),i))return;const s=this.switchParams(r.url,n==null?void 0:n.details,r.details);this.loadPlaylist(s)}findTrackId(e){const t=this.tracksInGroup;for(let n=0;n<t.length;n++){const r=t[n];if(!(this.selectDefaultTrack&&!r.default)&&(!e||on(e,r,Hn)))return n}if(e){const{name:n,lang:r,assocLang:i,characteristics:s,audioCodec:A,channels:f}=e;for(let c=0;c<t.length;c++){const m=t[c];if(on({name:n,lang:r,assocLang:i,characteristics:s,audioCodec:A,channels:f},m,Hn))return c}for(let c=0;c<t.length;c++){const m=t[c];if(ks(e.attrs,m.attrs,["LANGUAGE","ASSOC-LANGUAGE","CHARACTERISTICS"]))return c}for(let c=0;c<t.length;c++){const m=t[c];if(ks(e.attrs,m.attrs,["LANGUAGE"]))return c}}return-1}loadPlaylist(e){super.loadPlaylist();const t=this.currentTrack;this.shouldLoadPlaylist(t)&&yt(t.url,this.hls)&&this.scheduleLoading(t,e)}loadingPlaylist(e,t){super.loadingPlaylist(e,t);const n=e.id,r=e.groupId,i=this.getUrlWithDirectives(e.url,t),s=e.details,A=s==null?void 0:s.age;this.log(`Loading audio-track ${n} "${e.name}" lang:${e.lang} group:${r}${(t==null?void 0:t.msn)!==void 0?" at sn "+t.msn+" part "+t.part:""}${A&&s.live?" age "+A.toFixed(1)+(s.type?" "+s.type||0:""):""} ${i}`),this.hls.trigger(g.AUDIO_TRACK_LOADING,{url:i,id:n,groupId:r,deliveryDirectives:t||null,track:e})}}class gA{constructor(e){this.tracks=void 0,this.queues={video:[],audio:[],audiovideo:[]},this.tracks=e}destroy(){this.tracks=this.queues=null}append(e,t,n){if(this.queues===null||this.tracks===null)return;const r=this.queues[t];r.push(e),r.length===1&&!n&&this.executeNext(t)}appendBlocker(e){return new Promise(t=>{const n={label:"async-blocker",execute:t,onStart:()=>{},onComplete:()=>{},onError:()=>{}};this.append(n,e)})}prependBlocker(e){return new Promise(t=>{if(this.queues){const n={label:"async-blocker-prepend",execute:t,onStart:()=>{},onComplete:()=>{},onError:()=>{}};this.queues[e].unshift(n)}})}removeBlockers(){this.queues!==null&&[this.queues.video,this.queues.audio,this.queues.audiovideo].forEach(e=>{var t;const n=(t=e[0])==null?void 0:t.label;(n==="async-blocker"||n==="async-blocker-prepend")&&(e[0].execute(),e.splice(0,1))})}unblockAudio(e){if(this.queues===null)return;this.queues.audio[0]===e&&this.shiftAndExecuteNext("audio")}executeNext(e){if(this.queues===null||this.tracks===null)return;const t=this.queues[e];if(t.length){const r=t[0];try{r.execute()}catch(i){var n;if(r.onError(i),this.queues===null||this.tracks===null)return;const s=(n=this.tracks[e])==null?void 0:n.buffer;s!=null&&s.updating||this.shiftAndExecuteNext(e)}}}shiftAndExecuteNext(e){this.queues!==null&&(this.queues[e].shift(),this.executeNext(e))}current(e){var t;return((t=this.queues)==null?void 0:t[e][0])||null}toString(){const{queues:e,tracks:t}=this;return e===null||t===null?"<destroyed>":`
|
|
${this.list("video")}
|
|
${this.list("audio")}
|
|
${this.list("audiovideo")}}`}list(e){var t,n;return(t=this.queues)!=null&&t[e]||(n=this.tracks)!=null&&n[e]?`${e}: (${this.listSbInfo(e)}) ${this.listOps(e)}`:""}listSbInfo(e){var t;const n=(t=this.tracks)==null?void 0:t[e],r=n==null?void 0:n.buffer;return r?`SourceBuffer${r.updating?" updating":""}${n.ended?" ended":""}${n.ending?" ending":""}`:"none"}listOps(e){var t;return((t=this.queues)==null?void 0:t[e].map(n=>n.label).join(", "))||""}}const ao=/(avc[1234]|hvc1|hev1|dvh[1e]|vp09|av01)(?:\.[^.,]+)+/,Zo="HlsJsTrackRemovedError";class Vo extends Error{constructor(e){super(e),this.name=Zo}}class Sl extends H{constructor(e,t){super("buffer-controller",e.logger),this.hls=void 0,this.fragmentTracker=void 0,this.details=null,this._objectUrl=null,this.operationQueue=null,this.bufferCodecEventsTotal=0,this.media=null,this.mediaSource=null,this.lastMpegAudioChunk=null,this.blockedAudioAppend=null,this.lastVideoAppendEnd=0,this.appendSource=void 0,this.transferData=void 0,this.overrides=void 0,this.appendErrors={audio:0,video:0,audiovideo:0},this.tracks={},this.sourceBuffers=[[null,null],[null,null]],this._onEndStreaming=n=>{var r;this.hls&&((r=this.mediaSource)==null?void 0:r.readyState)==="open"&&this.hls.pauseBuffering()},this._onStartStreaming=n=>{this.hls&&this.hls.resumeBuffering()},this._onMediaSourceOpen=n=>{const{media:r,mediaSource:i}=this;n&&this.log("Media source opened"),!(!r||!i)&&(i.removeEventListener("sourceopen",this._onMediaSourceOpen),r.removeEventListener("emptied",this._onMediaEmptied),this.updateDuration(),this.hls.trigger(g.MEDIA_ATTACHED,{media:r,mediaSource:i}),this.mediaSource!==null&&this.checkPendingTracks())},this._onMediaSourceClose=()=>{this.log("Media source closed")},this._onMediaSourceEnded=()=>{this.log("Media source ended")},this._onMediaEmptied=()=>{const{mediaSrc:n,_objectUrl:r}=this;n!==r&&this.error(`Media element src was set while attaching MediaSource (${r} > ${n})`)},this.hls=e,this.fragmentTracker=t,this.appendSource=we(ae(e.config.preferManagedMediaSource)),this.initTracks(),this.registerListeners()}hasSourceTypes(){return Object.keys(this.tracks).length>0}destroy(){this.unregisterListeners(),this.details=null,this.lastMpegAudioChunk=this.blockedAudioAppend=null,this.transferData=this.overrides=void 0,this.operationQueue&&(this.operationQueue.destroy(),this.operationQueue=null),this.hls=this.fragmentTracker=null,this._onMediaSourceOpen=this._onMediaSourceClose=null,this._onMediaSourceEnded=null,this._onStartStreaming=this._onEndStreaming=null}registerListeners(){const{hls:e}=this;e.on(g.MEDIA_ATTACHING,this.onMediaAttaching,this),e.on(g.MEDIA_DETACHING,this.onMediaDetaching,this),e.on(g.MANIFEST_LOADING,this.onManifestLoading,this),e.on(g.MANIFEST_PARSED,this.onManifestParsed,this),e.on(g.BUFFER_RESET,this.onBufferReset,this),e.on(g.BUFFER_APPENDING,this.onBufferAppending,this),e.on(g.BUFFER_CODECS,this.onBufferCodecs,this),e.on(g.BUFFER_EOS,this.onBufferEos,this),e.on(g.BUFFER_FLUSHING,this.onBufferFlushing,this),e.on(g.LEVEL_UPDATED,this.onLevelUpdated,this),e.on(g.FRAG_PARSED,this.onFragParsed,this),e.on(g.FRAG_CHANGED,this.onFragChanged,this),e.on(g.ERROR,this.onError,this)}unregisterListeners(){const{hls:e}=this;e.off(g.MEDIA_ATTACHING,this.onMediaAttaching,this),e.off(g.MEDIA_DETACHING,this.onMediaDetaching,this),e.off(g.MANIFEST_LOADING,this.onManifestLoading,this),e.off(g.MANIFEST_PARSED,this.onManifestParsed,this),e.off(g.BUFFER_RESET,this.onBufferReset,this),e.off(g.BUFFER_APPENDING,this.onBufferAppending,this),e.off(g.BUFFER_CODECS,this.onBufferCodecs,this),e.off(g.BUFFER_EOS,this.onBufferEos,this),e.off(g.BUFFER_FLUSHING,this.onBufferFlushing,this),e.off(g.LEVEL_UPDATED,this.onLevelUpdated,this),e.off(g.FRAG_PARSED,this.onFragParsed,this),e.off(g.FRAG_CHANGED,this.onFragChanged,this),e.off(g.ERROR,this.onError,this)}transferMedia(){const{media:e,mediaSource:t}=this;if(!e)return null;const n={};if(this.operationQueue){const i=this.isUpdating();i||this.operationQueue.removeBlockers();const s=this.isQueued();(i||s)&&this.warn(`Transfering MediaSource with${s?" operations in queue":""}${i?" updating SourceBuffer(s)":""} ${this.operationQueue}`),this.operationQueue.destroy()}const r=this.transferData;return!this.sourceBufferCount&&r&&r.mediaSource===t?_(n,r.tracks):this.sourceBuffers.forEach(i=>{const[s]=i;s&&(n[s]=_({},this.tracks[s]),this.removeBuffer(s)),i[0]=i[1]=null}),{media:e,mediaSource:t,tracks:n}}initTracks(){const e={};this.sourceBuffers=[[null,null],[null,null]],this.tracks=e,this.resetQueue(),this.resetAppendErrors(),this.lastMpegAudioChunk=this.blockedAudioAppend=null,this.lastVideoAppendEnd=0}onManifestLoading(){this.bufferCodecEventsTotal=0,this.details=null}onManifestParsed(e,t){var n;let r=2;(t.audio&&!t.video||!t.altAudio)&&(r=1),this.bufferCodecEventsTotal=r,this.log(`${r} bufferCodec event(s) expected.`),(n=this.transferData)!=null&&n.mediaSource&&this.sourceBufferCount&&r&&this.bufferCreated()}onMediaAttaching(e,t){const n=this.media=t.media;this.transferData=this.overrides=void 0;const r=ae(this.appendSource);if(r){const i=!!t.mediaSource;(i||t.overrides)&&(this.transferData=t,this.overrides=t.overrides);const s=this.mediaSource=t.mediaSource||new r;if(this.assignMediaSource(s),i)this._objectUrl=n.src,this.attachTransferred();else{const A=this._objectUrl=self.URL.createObjectURL(s);if(this.appendSource)try{n.removeAttribute("src");const f=self.ManagedMediaSource;n.disableRemotePlayback=n.disableRemotePlayback||f&&s instanceof f,zo(n),WA(n,A),n.load()}catch(f){n.src=A}else n.src=A}n.addEventListener("emptied",this._onMediaEmptied)}}assignMediaSource(e){var t,n;this.log(`${((t=this.transferData)==null?void 0:t.mediaSource)===e?"transferred":"created"} media source: ${(n=e.constructor)==null?void 0:n.name}`),e.addEventListener("sourceopen",this._onMediaSourceOpen),e.addEventListener("sourceended",this._onMediaSourceEnded),e.addEventListener("sourceclose",this._onMediaSourceClose),this.appendSource&&(e.addEventListener("startstreaming",this._onStartStreaming),e.addEventListener("endstreaming",this._onEndStreaming))}attachTransferred(){const e=this.media,t=this.transferData;if(!t||!e)return;const n=this.tracks,r=t.tracks,i=r?Object.keys(r):null,s=i?i.length:0,A=()=>{Promise.resolve().then(()=>{this.media&&this.mediaSourceOpenOrEnded&&this._onMediaSourceOpen()})};if(r&&i&&s){if(!this.tracksReady){this.hls.config.startFragPrefetch=!0,this.log("attachTransferred: waiting for SourceBuffer track info");return}if(this.log(`attachTransferred: (bufferCodecEventsTotal ${this.bufferCodecEventsTotal})
|
|
required tracks: ${Sn(n,(f,c)=>f==="initSegment"?void 0:c)};
|
|
transfer tracks: ${Sn(r,(f,c)=>f==="initSegment"?void 0:c)}}`),!Te(r,n)){t.mediaSource=null,t.tracks=void 0;const f=e.currentTime,c=this.details,m=Math.max(f,(c==null?void 0:c.fragments[0].start)||0);if(m-f>1){this.log(`attachTransferred: waiting for playback to reach new tracks start time ${f} -> ${m}`);return}this.warn(`attachTransferred: resetting MediaSource for incompatible tracks ("${Object.keys(r)}"->"${Object.keys(n)}") start time: ${m} currentTime: ${f}`),this.onMediaDetaching(g.MEDIA_DETACHING,{}),this.onMediaAttaching(g.MEDIA_ATTACHING,t),e.currentTime=m;return}this.transferData=void 0,i.forEach(f=>{const c=f,m=r[c];if(m){const y=m.buffer;if(y){const B=this.fragmentTracker,D=m.id;if(B.hasFragments(D)||B.hasParts(D)){const X=kn.getBuffered(y);B.detectEvictedFragments(c,X,D,null,!0)}const L=bo(c),se=[c,y];this.sourceBuffers[L]=se,y.updating&&this.operationQueue&&this.operationQueue.prependBlocker(c),this.trackSourceBuffer(c,m)}}}),A(),this.bufferCreated()}else this.log("attachTransferred: MediaSource w/o SourceBuffers"),A()}get mediaSourceOpenOrEnded(){var e;const t=(e=this.mediaSource)==null?void 0:e.readyState;return t==="open"||t==="ended"}onMediaDetaching(e,t){const n=!!t.transferMedia;this.transferData=this.overrides=void 0;const{media:r,mediaSource:i,_objectUrl:s}=this;if(i){if(this.log(`media source ${n?"transferring":"detaching"}`),n)this.sourceBuffers.forEach(([A])=>{A&&this.removeBuffer(A)}),this.resetQueue();else{if(this.mediaSourceOpenOrEnded){const A=i.readyState==="open";try{const f=i.sourceBuffers;for(let c=f.length;c--;)A&&f[c].abort(),i.removeSourceBuffer(f[c]);A&&i.endOfStream()}catch(f){this.warn(`onMediaDetaching: ${f.message} while calling endOfStream`)}}this.sourceBufferCount&&this.onBufferReset()}i.removeEventListener("sourceopen",this._onMediaSourceOpen),i.removeEventListener("sourceended",this._onMediaSourceEnded),i.removeEventListener("sourceclose",this._onMediaSourceClose),this.appendSource&&(i.removeEventListener("startstreaming",this._onStartStreaming),i.removeEventListener("endstreaming",this._onEndStreaming)),this.mediaSource=null,this._objectUrl=null}r&&(r.removeEventListener("emptied",this._onMediaEmptied),n||(s&&self.URL.revokeObjectURL(s),this.mediaSrc===s?(r.removeAttribute("src"),this.appendSource&&zo(r),r.load()):this.warn("media|source.src was changed by a third party - skip cleanup")),this.media=null),this.hls.trigger(g.MEDIA_DETACHED,t)}onBufferReset(){this.sourceBuffers.forEach(([e])=>{e&&this.resetBuffer(e)}),this.initTracks()}resetBuffer(e){var t;const n=(t=this.tracks[e])==null?void 0:t.buffer;if(this.removeBuffer(e),n)try{var r;(r=this.mediaSource)!=null&&r.sourceBuffers.length&&this.mediaSource.removeSourceBuffer(n)}catch(i){this.warn(`onBufferReset ${e}`,i)}delete this.tracks[e]}removeBuffer(e){this.removeBufferListeners(e),this.sourceBuffers[bo(e)]=[null,null];const t=this.tracks[e];t&&(t.buffer=void 0)}resetQueue(){this.operationQueue&&this.operationQueue.destroy(),this.operationQueue=new gA(this.tracks)}onBufferCodecs(e,t){const n=this.tracks,r=Object.keys(t);this.log(`BUFFER_CODECS: "${r}" (current SB count ${this.sourceBufferCount})`);const i="audiovideo"in t&&(n.audio||n.video)||n.audiovideo&&("audio"in t||"video"in t),s=!i&&this.sourceBufferCount&&this.media&&r.some(A=>!n[A]);if(i||s){this.warn(`Unsupported transition between "${Object.keys(n)}" and "${r}" SourceBuffers`);return}r.forEach(A=>{var f,c;const m=t[A],{id:y,codec:B,levelCodec:D,container:L,metadata:se,supplemental:X}=m;let xe=n[A];const at=(f=this.transferData)==null||(f=f.tracks)==null?void 0:f[A],We=at!=null&&at.buffer?at:xe,Mt=(We==null?void 0:We.pendingCodec)||(We==null?void 0:We.codec),qt=We==null?void 0:We.levelCodec;xe||(xe=n[A]={buffer:void 0,listeners:[],codec:B,supplemental:X,container:L,levelCodec:D,metadata:se,id:y});const Dn=ke(Mt,qt),zt=Dn==null?void 0:Dn.replace(ao,"$1");let un=ke(B,D);const gn=(c=un)==null?void 0:c.replace(ao,"$1");un&&Dn&&zt!==gn&&(A.slice(0,5)==="audio"&&(un=Ie(un,this.appendSource)),this.log(`switching codec ${Mt} to ${un}`),un!==(xe.pendingCodec||xe.codec)&&(xe.pendingCodec=un),xe.container=L,this.appendChangeType(A,L,un))}),(this.tracksReady||this.sourceBufferCount)&&(t.tracks=this.sourceBufferTracks),!this.sourceBufferCount&&this.mediaSourceOpenOrEnded&&this.checkPendingTracks()}get sourceBufferTracks(){return Object.keys(this.tracks).reduce((e,t)=>{const n=this.tracks[t];return e[t]={id:n.id,container:n.container,codec:n.codec,levelCodec:n.levelCodec},e},{})}appendChangeType(e,t,n){const r=`${t};codecs=${n}`,i={label:`change-type=${r}`,execute:()=>{const s=this.tracks[e];if(s){const A=s.buffer;A!=null&&A.changeType&&(this.log(`changing ${e} sourceBuffer type to ${r}`),A.changeType(r),s.codec=n,s.container=t)}this.shiftAndExecuteNext(e)},onStart:()=>{},onComplete:()=>{},onError:s=>{this.warn(`Failed to change ${e} SourceBuffer type`,s)}};this.append(i,e,this.isPending(this.tracks[e]))}blockAudio(e){var t;const n=e.start,r=n+e.duration*.05;if(((t=this.fragmentTracker.getAppendedFrag(n,le.MAIN))==null?void 0:t.gap)===!0)return;const s={label:"block-audio",execute:()=>{var A;const f=this.tracks.video;(this.lastVideoAppendEnd>r||f!=null&&f.buffer&&kn.isBuffered(f.buffer,r)||((A=this.fragmentTracker.getAppendedFrag(r,le.MAIN))==null?void 0:A.gap)===!0)&&(this.blockedAudioAppend=null,this.shiftAndExecuteNext("audio"))},onStart:()=>{},onComplete:()=>{},onError:A=>{this.warn("Error executing block-audio operation",A)}};this.blockedAudioAppend={op:s,frag:e},this.append(s,"audio",!0)}unblockAudio(){const{blockedAudioAppend:e,operationQueue:t}=this;e&&t&&(this.blockedAudioAppend=null,t.unblockAudio(e.op))}onBufferAppending(e,t){const{tracks:n}=this,{data:r,type:i,parent:s,frag:A,part:f,chunkMeta:c,offset:m}=t,y=c.buffering[i],{sn:B,cc:D}=A,L=self.performance.now();y.start=L;const se=A.stats.buffering,X=f?f.stats.buffering:null;se.start===0&&(se.start=L),X&&X.start===0&&(X.start=L);const xe=n.audio;let at=!1;i==="audio"&&(xe==null?void 0:xe.container)==="audio/mpeg"&&(at=!this.lastMpegAudioChunk||c.id===1||this.lastMpegAudioChunk.sn!==c.sn,this.lastMpegAudioChunk=c);const We=n.video,Mt=We==null?void 0:We.buffer;if(Mt&&B!=="initSegment"){const zt=f||A,un=this.blockedAudioAppend;if(i==="audio"&&s!=="main"&&!this.blockedAudioAppend&&!(We.ending||We.ended)){const Yt=zt.start+zt.duration*.05,Nn=Mt.buffered,Cr=this.currentOp("video");!Nn.length&&!Cr?this.blockAudio(zt):!Cr&&!kn.isBuffered(Mt,Yt)&&this.lastVideoAppendEnd<Yt&&this.blockAudio(zt)}else if(i==="video"){const gn=zt.end;if(un){const Yt=un.frag.start;(gn>Yt||gn<this.lastVideoAppendEnd||kn.isBuffered(Mt,Yt))&&this.unblockAudio()}this.lastVideoAppendEnd=gn}}const qt=(f||A).start,Dn={label:`append-${i}`,execute:()=>{var zt;y.executeStart=self.performance.now();const un=(zt=this.tracks[i])==null?void 0:zt.buffer;un&&(at?this.updateTimestampOffset(un,qt,.1,i,B,D):m!==void 0&&V(m)&&this.updateTimestampOffset(un,m,1e-6,i,B,D)),this.appendExecutor(r,i)},onStart:()=>{},onComplete:()=>{const zt=self.performance.now();y.executeEnd=y.end=zt,se.first===0&&(se.first=zt),X&&X.first===0&&(X.first=zt);const un={};this.sourceBuffers.forEach(([gn,Yt])=>{gn&&(un[gn]=kn.getBuffered(Yt))}),this.appendErrors[i]=0,i==="audio"||i==="video"?this.appendErrors.audiovideo=0:(this.appendErrors.audio=0,this.appendErrors.video=0),this.hls.trigger(g.BUFFER_APPENDED,{type:i,frag:A,part:f,chunkMeta:c,parent:A.type,timeRanges:un})},onError:zt=>{var un;const gn={type:ge.MEDIA_ERROR,parent:A.type,details:G.BUFFER_APPEND_ERROR,sourceBufferName:i,frag:A,part:f,chunkMeta:c,error:zt,err:zt,fatal:!1},Yt=(un=this.media)==null?void 0:un.error;if(zt.code===DOMException.QUOTA_EXCEEDED_ERR||zt.name=="QuotaExceededError"||"quota"in zt)gn.details=G.BUFFER_FULL_ERROR;else if(zt.code===DOMException.INVALID_STATE_ERR&&this.mediaSourceOpenOrEnded&&!Yt)gn.errorAction=lt(!0);else if(zt.name===Zo&&this.sourceBufferCount===0)gn.errorAction=lt(!0);else{const Nn=++this.appendErrors[i];this.warn(`Failed ${Nn}/${this.hls.config.appendErrorMaxRetry} times to append segment in "${i}" sourceBuffer (${Yt||"no media error"})`),(Nn>=this.hls.config.appendErrorMaxRetry||Yt)&&(gn.fatal=!0)}this.hls.trigger(g.ERROR,gn)}};this.append(Dn,i,this.isPending(this.tracks[i]))}getFlushOp(e,t,n){return this.log(`queuing "${e}" remove ${t}-${n}`),{label:"remove",execute:()=>{this.removeExecutor(e,t,n)},onStart:()=>{},onComplete:()=>{this.hls.trigger(g.BUFFER_FLUSHED,{type:e})},onError:r=>{this.warn(`Failed to remove ${t}-${n} from "${e}" SourceBuffer`,r)}}}onBufferFlushing(e,t){const{type:n,startOffset:r,endOffset:i}=t;n?this.append(this.getFlushOp(n,r,i),n):this.sourceBuffers.forEach(([s])=>{s&&this.append(this.getFlushOp(s,r,i),s)})}onFragParsed(e,t){const{frag:n,part:r}=t,i=[],s=r?r.elementaryStreams:n.elementaryStreams;s[W.AUDIOVIDEO]?i.push("audiovideo"):(s[W.AUDIO]&&i.push("audio"),s[W.VIDEO]&&i.push("video"));const A=()=>{const f=self.performance.now();n.stats.buffering.end=f,r&&(r.stats.buffering.end=f);const c=r?r.stats:n.stats;this.hls.trigger(g.FRAG_BUFFERED,{frag:n,part:r,stats:c,id:n.type})};i.length===0&&this.warn(`Fragments must have at least one ElementaryStreamType set. type: ${n.type} level: ${n.level} sn: ${n.sn}`),this.blockBuffers(A,i).catch(f=>{this.warn(`Fragment buffered callback ${f}`),this.stepOperationQueue(this.sourceBufferTypes)})}onFragChanged(e,t){this.trimBuffers()}get bufferedToEnd(){return this.sourceBufferCount>0&&!this.sourceBuffers.some(([e])=>{if(e){const t=this.tracks[e];if(t)return!t.ended||t.ending}return!1})}onBufferEos(e,t){var n;this.sourceBuffers.forEach(([s])=>{if(s){const A=this.tracks[s];(!t.type||t.type===s)&&(A.ending=!0,A.ended||(A.ended=!0,this.log(`${s} buffer reached EOS`)))}});const r=((n=this.overrides)==null?void 0:n.endOfStream)!==!1;this.sourceBufferCount>0&&!this.sourceBuffers.some(([s])=>{var A;return s&&!((A=this.tracks[s])!=null&&A.ended)})?r?(this.log("Queueing EOS"),this.blockUntilOpen(()=>{this.tracksEnded();const{mediaSource:s}=this;if(!s||s.readyState!=="open"){s&&this.log(`Could not call mediaSource.endOfStream(). mediaSource.readyState: ${s.readyState}`);return}this.log("Calling mediaSource.endOfStream()"),s.endOfStream(),this.hls.trigger(g.BUFFERED_TO_END,void 0)})):(this.tracksEnded(),this.hls.trigger(g.BUFFERED_TO_END,void 0)):t.type==="video"&&this.unblockAudio()}tracksEnded(){this.sourceBuffers.forEach(([e])=>{if(e!==null){const t=this.tracks[e];t&&(t.ending=!1)}})}onLevelUpdated(e,{details:t}){t.fragments.length&&(this.details=t,this.updateDuration())}updateDuration(){this.blockUntilOpen(()=>{const e=this.getDurationAndRange();e&&this.updateMediaSource(e)})}onError(e,t){if(t.details===G.BUFFER_APPEND_ERROR&&t.frag){var n;const r=(n=t.errorAction)==null?void 0:n.nextAutoLevel;V(r)&&r!==t.frag.level&&this.resetAppendErrors()}}resetAppendErrors(){this.appendErrors={audio:0,video:0,audiovideo:0}}trimBuffers(){const{hls:e,details:t,media:n}=this;if(!n||t===null||!this.sourceBufferCount)return;const r=e.config,i=n.currentTime,s=t.levelTargetDuration,A=t.live&&r.liveBackBufferLength!==null?r.liveBackBufferLength:r.backBufferLength;if(V(A)&&A>=0){const c=Math.max(A,s),m=Math.floor(i/s)*s-c;this.flushBackBuffer(i,s,m)}const f=r.frontBufferFlushThreshold;if(V(f)&&f>0){const c=Math.max(r.maxBufferLength,f),m=Math.max(c,s),y=Math.floor(i/s)*s+m;this.flushFrontBuffer(i,s,y)}}flushBackBuffer(e,t,n){this.sourceBuffers.forEach(([r,i])=>{if(i){const A=kn.getBuffered(i);if(A.length>0&&n>A.start(0)){var s;this.hls.trigger(g.BACK_BUFFER_REACHED,{bufferEnd:n});const f=this.tracks[r];if((s=this.details)!=null&&s.live)this.hls.trigger(g.LIVE_BACK_BUFFER_REACHED,{bufferEnd:n});else if(f!=null&&f.ended){this.log(`Cannot flush ${r} back buffer while SourceBuffer is in ended state`);return}this.hls.trigger(g.BUFFER_FLUSHING,{startOffset:0,endOffset:n,type:r})}}})}flushFrontBuffer(e,t,n){this.sourceBuffers.forEach(([r,i])=>{if(i){const s=kn.getBuffered(i),A=s.length;if(A<2)return;const f=s.start(A-1),c=s.end(A-1);if(n>f||e>=f&&e<=c)return;this.hls.trigger(g.BUFFER_FLUSHING,{startOffset:f,endOffset:1/0,type:r})}})}getDurationAndRange(){var e;const{details:t,mediaSource:n}=this;if(!t||!this.media||(n==null?void 0:n.readyState)!=="open")return null;const r=t.edge;if(t.live&&this.hls.config.liveDurationInfinity){if(t.fragments.length&&n.setLiveSeekableRange){const c=Math.max(0,t.fragmentStart),m=Math.max(c,r);return{duration:1/0,start:c,end:m}}return{duration:1/0}}const i=(e=this.overrides)==null?void 0:e.duration;if(i)return V(i)?{duration:i}:null;const s=this.media.duration,A=V(n.duration)?n.duration:0;return r>A&&r>s||!V(s)?{duration:r}:null}updateMediaSource({duration:e,start:t,end:n}){const r=this.mediaSource;!this.media||!r||r.readyState!=="open"||(r.duration!==e&&(V(e)&&this.log(`Updating MediaSource duration to ${e.toFixed(3)}`),r.duration=e),t!==void 0&&n!==void 0&&(this.log(`MediaSource duration is set to ${r.duration}. Setting seekable range to ${t}-${n}.`),r.setLiveSeekableRange(t,n)))}get tracksReady(){const e=this.pendingTrackCount;return e>0&&(e>=this.bufferCodecEventsTotal||this.isPending(this.tracks.audiovideo))}checkPendingTracks(){const{bufferCodecEventsTotal:e,pendingTrackCount:t,tracks:n}=this;if(this.log(`checkPendingTracks (pending: ${t} codec events expected: ${e}) ${Sn(n)}`),this.tracksReady){var r;const i=(r=this.transferData)==null?void 0:r.tracks;i&&Object.keys(i).length?this.attachTransferred():this.createSourceBuffers()}}bufferCreated(){if(this.sourceBufferCount){const e={};this.sourceBuffers.forEach(([t,n])=>{if(t){const r=this.tracks[t];e[t]={buffer:n,container:r.container,codec:r.codec,supplemental:r.supplemental,levelCodec:r.levelCodec,id:r.id,metadata:r.metadata}}}),this.hls.trigger(g.BUFFER_CREATED,{tracks:e}),this.log(`SourceBuffers created. Running queue: ${this.operationQueue}`),this.sourceBuffers.forEach(([t])=>{this.executeNext(t)})}else{const e=new Error("could not create source buffer for media codec(s)");this.hls.trigger(g.ERROR,{type:ge.MEDIA_ERROR,details:G.BUFFER_INCOMPATIBLE_CODECS_ERROR,fatal:!0,error:e,reason:e.message})}}createSourceBuffers(){const{tracks:e,sourceBuffers:t,mediaSource:n}=this;if(!n)throw new Error("createSourceBuffers called when mediaSource was null");for(const i in e){const s=i,A=e[s];if(this.isPending(A)){const f=this.getTrackCodec(A,s),c=`${A.container};codecs=${f}`;A.codec=f,this.log(`creating sourceBuffer(${c})${this.currentOp(s)?" Queued":""} ${Sn(A)}`);try{const m=n.addSourceBuffer(c),y=bo(s),B=[s,m];t[y]=B,A.buffer=m}catch(m){var r;this.error(`error while trying to add sourceBuffer: ${m.message}`),this.shiftAndExecuteNext(s),(r=this.operationQueue)==null||r.removeBlockers(),delete this.tracks[s],this.hls.trigger(g.ERROR,{type:ge.MEDIA_ERROR,details:G.BUFFER_ADD_CODEC_ERROR,fatal:!1,error:m,sourceBufferName:s,mimeType:c,parent:A.id});return}this.trackSourceBuffer(s,A)}}this.bufferCreated()}getTrackCodec(e,t){const n=e.supplemental;let r=e.codec;n&&(t==="video"||t==="audiovideo")&&qn(n,"video")&&(r=Ue(r,n));const i=ke(r,e.levelCodec);return i?t.slice(0,5)==="audio"?Ie(i,this.appendSource):i:""}trackSourceBuffer(e,t){const n=t.buffer;if(!n)return;const r=this.getTrackCodec(t,e);this.tracks[e]={buffer:n,codec:r,container:t.container,levelCodec:t.levelCodec,supplemental:t.supplemental,metadata:t.metadata,id:t.id,listeners:[]},this.removeBufferListeners(e),this.addBufferListener(e,"updatestart",this.onSBUpdateStart),this.addBufferListener(e,"updateend",this.onSBUpdateEnd),this.addBufferListener(e,"error",this.onSBUpdateError),this.appendSource&&this.addBufferListener(e,"bufferedchange",(i,s)=>{const A=s.removedRanges;A!=null&&A.length&&this.hls.trigger(g.BUFFER_FLUSHED,{type:i})})}get mediaSrc(){var e,t;const n=((e=this.media)==null||(t=e.querySelector)==null?void 0:t.call(e,"source"))||this.media;return n==null?void 0:n.src}onSBUpdateStart(e){const t=this.currentOp(e);t&&t.onStart()}onSBUpdateEnd(e){var t;if(((t=this.mediaSource)==null?void 0:t.readyState)==="closed"){this.resetBuffer(e);return}const n=this.currentOp(e);n&&(n.onComplete(),this.shiftAndExecuteNext(e))}onSBUpdateError(e,t){var n;const r=new Error(`${e} SourceBuffer error. MediaSource readyState: ${(n=this.mediaSource)==null?void 0:n.readyState}`);this.error(`${r}`,t),this.hls.trigger(g.ERROR,{type:ge.MEDIA_ERROR,details:G.BUFFER_APPENDING_ERROR,sourceBufferName:e,error:r,fatal:!1});const i=this.currentOp(e);i&&i.onError(r)}updateTimestampOffset(e,t,n,r,i,s){const A=t-e.timestampOffset;Math.abs(A)>=n&&(this.log(`Updating ${r} SourceBuffer timestampOffset to ${t} (sn: ${i} cc: ${s})`),e.timestampOffset=t)}removeExecutor(e,t,n){const{media:r,mediaSource:i}=this,s=this.tracks[e],A=s==null?void 0:s.buffer;if(!r||!i||!A){this.warn(`Attempting to remove from the ${e} SourceBuffer, but it does not exist`),this.shiftAndExecuteNext(e);return}const f=V(r.duration)?r.duration:1/0,c=V(i.duration)?i.duration:1/0,m=Math.max(0,t),y=Math.min(n,f,c);y>m&&(!s.ending||s.ended)?(s.ended=!1,this.log(`Removing [${m},${y}] from the ${e} SourceBuffer`),A.remove(m,y)):this.shiftAndExecuteNext(e)}appendExecutor(e,t){const n=this.tracks[t],r=n==null?void 0:n.buffer;if(!r)throw new Vo(`Attempting to append to the ${t} SourceBuffer, but it does not exist`);n.ending=!1,n.ended=!1,r.appendBuffer(e)}blockUntilOpen(e){if(this.isUpdating()||this.isQueued())this.blockBuffers(e).catch(t=>{this.warn(`SourceBuffer blocked callback ${t}`),this.stepOperationQueue(this.sourceBufferTypes)});else try{e()}catch(t){this.warn(`Callback run without blocking ${this.operationQueue} ${t}`)}}isUpdating(){return this.sourceBuffers.some(([e,t])=>e&&t.updating)}isQueued(){return this.sourceBuffers.some(([e])=>e&&!!this.currentOp(e))}isPending(e){return!!e&&!e.buffer}blockBuffers(e,t=this.sourceBufferTypes){if(!t.length)return this.log("Blocking operation requested, but no SourceBuffers exist"),Promise.resolve().then(e);const{operationQueue:n}=this,r=t.map(s=>this.appendBlocker(s));return t.length>1&&!!this.blockedAudioAppend&&this.unblockAudio(),Promise.all(r).then(s=>{n===this.operationQueue&&(e(),this.stepOperationQueue(this.sourceBufferTypes))})}stepOperationQueue(e){e.forEach(t=>{var n;const r=(n=this.tracks[t])==null?void 0:n.buffer;!r||r.updating||this.shiftAndExecuteNext(t)})}append(e,t,n){this.operationQueue&&this.operationQueue.append(e,t,n)}appendBlocker(e){if(this.operationQueue)return this.operationQueue.appendBlocker(e)}currentOp(e){return this.operationQueue?this.operationQueue.current(e):null}executeNext(e){e&&this.operationQueue&&this.operationQueue.executeNext(e)}shiftAndExecuteNext(e){this.operationQueue&&this.operationQueue.shiftAndExecuteNext(e)}get pendingTrackCount(){return Object.keys(this.tracks).reduce((e,t)=>e+(this.isPending(this.tracks[t])?1:0),0)}get sourceBufferCount(){return this.sourceBuffers.reduce((e,[t])=>e+(t?1:0),0)}get sourceBufferTypes(){return this.sourceBuffers.map(([e])=>e).filter(e=>!!e)}addBufferListener(e,t,n){const r=this.tracks[e];if(!r)return;const i=r.buffer;if(!i)return;const s=n.bind(this,e);r.listeners.push({event:t,listener:s}),i.addEventListener(t,s)}removeBufferListeners(e){const t=this.tracks[e];if(!t)return;const n=t.buffer;n&&(t.listeners.forEach(r=>{n.removeEventListener(r.event,r.listener)}),t.listeners.length=0)}}function zo(a){const e=a.querySelectorAll("source");[].slice.call(e).forEach(t=>{a.removeChild(t)})}function WA(a,e){const t=self.document.createElement("source");t.type="video/mp4",t.src=e,a.appendChild(t)}function bo(a){return a==="audio"?1:0}class Wo{constructor(e){this.hls=void 0,this.autoLevelCapping=void 0,this.firstLevel=void 0,this.media=void 0,this.restrictedLevels=void 0,this.timer=void 0,this.clientRect=void 0,this.streamController=void 0,this.hls=e,this.autoLevelCapping=Number.POSITIVE_INFINITY,this.firstLevel=-1,this.media=null,this.restrictedLevels=[],this.timer=void 0,this.clientRect=null,this.registerListeners()}setStreamController(e){this.streamController=e}destroy(){this.hls&&this.unregisterListener(),this.timer&&this.stopCapping(),this.media=null,this.clientRect=null,this.hls=this.streamController=null}registerListeners(){const{hls:e}=this;e.on(g.FPS_DROP_LEVEL_CAPPING,this.onFpsDropLevelCapping,this),e.on(g.MEDIA_ATTACHING,this.onMediaAttaching,this),e.on(g.MANIFEST_PARSED,this.onManifestParsed,this),e.on(g.LEVELS_UPDATED,this.onLevelsUpdated,this),e.on(g.BUFFER_CODECS,this.onBufferCodecs,this),e.on(g.MEDIA_DETACHING,this.onMediaDetaching,this)}unregisterListener(){const{hls:e}=this;e.off(g.FPS_DROP_LEVEL_CAPPING,this.onFpsDropLevelCapping,this),e.off(g.MEDIA_ATTACHING,this.onMediaAttaching,this),e.off(g.MANIFEST_PARSED,this.onManifestParsed,this),e.off(g.LEVELS_UPDATED,this.onLevelsUpdated,this),e.off(g.BUFFER_CODECS,this.onBufferCodecs,this),e.off(g.MEDIA_DETACHING,this.onMediaDetaching,this)}onFpsDropLevelCapping(e,t){const n=this.hls.levels[t.droppedLevel];this.isLevelAllowed(n)&&this.restrictedLevels.push({bitrate:n.bitrate,height:n.height,width:n.width})}onMediaAttaching(e,t){this.media=t.media instanceof HTMLVideoElement?t.media:null,this.clientRect=null,this.timer&&this.hls.levels.length&&this.detectPlayerSize()}onManifestParsed(e,t){const n=this.hls;this.restrictedLevels=[],this.firstLevel=t.firstLevel,n.config.capLevelToPlayerSize&&t.video&&this.startCapping()}onLevelsUpdated(e,t){this.timer&&V(this.autoLevelCapping)&&this.detectPlayerSize()}onBufferCodecs(e,t){this.hls.config.capLevelToPlayerSize&&t.video&&this.startCapping()}onMediaDetaching(){this.stopCapping(),this.media=null}detectPlayerSize(){if(this.media){if(this.mediaHeight<=0||this.mediaWidth<=0){this.clientRect=null;return}const e=this.hls.levels;if(e.length){const t=this.hls,n=this.getMaxLevel(e.length-1);n!==this.autoLevelCapping&&t.logger.log(`Setting autoLevelCapping to ${n}: ${e[n].height}p@${e[n].bitrate} for media ${this.mediaWidth}x${this.mediaHeight}`),t.autoLevelCapping=n,t.autoLevelEnabled&&t.autoLevelCapping>this.autoLevelCapping&&this.streamController&&this.streamController.nextLevelSwitch(),this.autoLevelCapping=t.autoLevelCapping}}}getMaxLevel(e){const t=this.hls.levels;if(!t.length)return-1;const n=t.filter((r,i)=>this.isLevelAllowed(r)&&i<=e);return this.clientRect=null,Wo.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=(A,f)=>f?A.width!==f.width||A.height!==f.height:!0;let i=e.length-1;const s=Math.max(t,n);for(let A=0;A<e.length;A+=1){const f=e[A];if((f.width>=s||f.height>=s)&&r(f,e[A+1])){i=A;break}}return i}}const Ks={MANIFEST:"m",AUDIO:"a",VIDEO:"v",MUXED:"av",INIT:"i",CAPTION:"c",TIMED_TEXT:"tt",KEY:"k",OTHER:"o"},jo={HLS:"h"};class fa{constructor(e,t){Array.isArray(e)&&(e=e.map(n=>n instanceof fa?n:new fa(n))),this.value=e,this.params=t}}const Tl="Dict";function Il(a){return Array.isArray(a)?JSON.stringify(a):a instanceof Map?"Map{}":a instanceof Set?"Set{}":typeof a=="object"?JSON.stringify(a):String(a)}function l(a,e,t,n){return new Error(`failed to ${a} "${Il(e)}" as ${t}`,{cause:n})}function I(a,e,t){return l("serialize",a,e,t)}class v{constructor(e){this.description=e}}const z="Bare Item",ce="Boolean";function _e(a){if(typeof a!="boolean")throw I(a,ce);return a?"?1":"?0"}function Pt(a){return btoa(String.fromCharCode(...a))}const Et="Byte Sequence";function er(a){if(ArrayBuffer.isView(a)===!1)throw I(a,Et);return`:${Pt(a)}:`}const pt="Integer";function Zt(a){return a<-999999999999999||999999999999999<a}function Pr(a){if(Zt(a))throw I(a,pt);return a.toString()}function Ar(a){return`@${Pr(a.getTime()/1e3)}`}function Gn(a,e){if(a<0)return-Gn(-a,e);const t=Math.pow(10,e);if(Math.abs(a*t%1-.5)<Number.EPSILON){const r=Math.floor(a*t);return(r%2===0?r:r+1)/t}else return Math.round(a*t)/t}const zr="Decimal";function Yi(a){const e=Gn(a,3);if(Math.floor(Math.abs(e)).toString().length>12)throw I(a,zr);const t=e.toString();return t.includes(".")?t:`${t}.0`}const Ei="String",pi=/[\x00-\x1f\x7f]+/;function Ri(a){if(pi.test(a))throw I(a,Ei);return`"${a.replace(/\\/g,"\\\\").replace(/"/g,'\\"')}"`}function di(a){return a.description||a.toString().slice(7,-1)}const nr="Token";function bi(a){const e=di(a);if(/^([a-zA-Z*])([!#$%&'*+\-.^_`|~\w:/]*)$/.test(e)===!1)throw I(e,nr);return e}function As(a){switch(typeof a){case"number":if(!V(a))throw I(a,z);return Number.isInteger(a)?Pr(a):Yi(a);case"string":return Ri(a);case"symbol":return bi(a);case"boolean":return _e(a);case"object":if(a instanceof Date)return Ar(a);if(a instanceof Uint8Array)return er(a);if(a instanceof v)return bi(a);default:throw I(a,z)}}const ri="Key";function Xi(a){if(/^[a-z*][a-z0-9\-_.*]*$/.test(a)===!1)throw I(a,ri);return a}function Ti(a){return a==null?"":Object.entries(a).map(([e,t])=>t===!0?`;${Xi(e)}`:`;${Xi(e)}=${As(t)}`).join("")}function yi(a){return a instanceof fa?`${As(a.value)}${Ti(a.params)}`:As(a)}function ki(a){return`(${a.value.map(yi).join(" ")})${Ti(a.params)}`}function Wa(a,e={whitespace:!0}){if(typeof a!="object"||a==null)throw I(a,Tl);const t=a instanceof Map?a.entries():Object.entries(a),n=e!=null&&e.whitespace?" ":"";return Array.from(t).map(([r,i])=>{i instanceof fa||(i=new fa(i));let s=Xi(r);return i.value===!0?s+=Ti(i.params):(s+="=",Array.isArray(i.value)?s+=ki(i):s+=yi(i)),s}).join(`,${n}`)}function pA(a,e){return Wa(a,e)}const ta="CMCD-Object",fs="CMCD-Request",Co="CMCD-Session",oo="CMCD-Status",Jl={br:ta,ab:ta,d:ta,ot:ta,tb:ta,tpb:ta,lb:ta,tab:ta,lab:ta,url:ta,pb:fs,bl:fs,tbl:fs,dl:fs,ltc:fs,mtp:fs,nor:fs,nrr:fs,rc:fs,sn:fs,sta:fs,su:fs,ttfb:fs,ttfbb:fs,ttlb:fs,cmsdd:fs,cmsds:fs,smrt:fs,df:fs,cs:fs,ts:fs,cid:Co,pr:Co,sf:Co,sid:Co,st:Co,v:Co,msd:Co,bs:oo,bsd:oo,cdn:oo,rtp:oo,bg:oo,pt:oo,ec:oo,e:oo},ql={REQUEST:fs};function eu(a){return Object.keys(a).reduce((e,t)=>{var n;return(n=a[t])===null||n===void 0||n.forEach(r=>e[r]=t),e},{})}function tu(a,e){const t={};if(!a)return t;const n=Object.keys(a),r=e?eu(e):{};return n.reduce((i,s)=>{var A;const f=Jl[s]||r[s]||ql.REQUEST,c=(A=i[f])!==null&&A!==void 0?A:i[f]={};return c[s]=a[s],i},t)}function Fl(a){return["ot","sf","st","e","sta"].includes(a)}function Hu(a){return typeof a=="number"?V(a):a!=null&&a!==""&&a!==!1}const nu="event";function Ku(a,e){const t=new URL(a),n=new URL(e);if(t.origin!==n.origin)return a;const r=t.pathname.split("/").slice(1),i=n.pathname.split("/").slice(1,-1);for(;r[0]===i[0];)r.shift(),i.shift();for(;i.length;)i.shift(),r.unshift("..");return r.join("/")+t.search+t.hash}const YA=a=>Math.round(a),Yo=(a,e)=>Array.isArray(a)?a.map(t=>Yo(t,e)):a instanceof fa&&typeof a.value=="string"?new fa(Yo(a.value,e),a.params):(e.baseUrl&&(a=Ku(a,e.baseUrl)),e.version===1?encodeURIComponent(a):a),xo=a=>YA(a/100)*100,ru={br:YA,d:YA,bl:xo,dl:xo,mtp:xo,nor:(a,e)=>{let t=a;return e.version>=2&&(a instanceof fa&&typeof a.value=="string"?t=new fa([a]):typeof a=="string"&&(t=[a])),Yo(t,e)},rtp:xo,tb:YA},XA="request",Dl="response",JA=["ab","bg","bl","br","bs","bsd","cdn","cid","cs","df","ec","lab","lb","ltc","msd","mtp","pb","pr","pt","sf","sid","sn","st","sta","tab","tb","tbl","tpb","ts","v"],iu=["e"],Gu=/^[a-zA-Z0-9-.]+-[a-zA-Z0-9-.]+$/;function So(a){return Gu.test(a)}function su(a){return JA.includes(a)||iu.includes(a)||So(a)}const Rl=["d","dl","nor","ot","rtp","su"];function $u(a){return JA.includes(a)||Rl.includes(a)||So(a)}const Zu=["cmsdd","cmsds","rc","smrt","ttfb","ttfbb","ttlb","url"];function au(a){return JA.includes(a)||Rl.includes(a)||Zu.includes(a)||So(a)}const Xo=["bl","br","bs","cid","d","dl","mtp","nor","nrr","ot","pr","rtp","sf","sid","st","su","tb","v"];function Ll(a){return Xo.includes(a)||So(a)}const qA={[Dl]:au,[nu]:su,[XA]:$u};function ou(a,e={}){const t={};if(a==null||typeof a!="object")return t;const n=e.version||a.v||1,r=e.reportingMode||XA,i=n===1?Ll:qA[r];let s=Object.keys(a).filter(i);const A=e.filter;typeof A=="function"&&(s=s.filter(A));const f=r===Dl||r===nu;f&&!s.includes("ts")&&s.push("ts"),n>1&&!s.includes("v")&&s.push("v");const c=_({},ru,e.formatters),m={version:n,reportingMode:r,baseUrl:e.baseUrl};return s.sort().forEach(y=>{let B=a[y];const D=c[y];if(typeof D=="function"&&(B=D(B,m)),y==="v"){if(n===1)return;B=n}y=="pr"&&B===1||(f&&y==="ts"&&!V(B)&&(B=Date.now()),Hu(B)&&(Fl(y)&&typeof B=="string"&&(B=new v(B)),t[y]=B))}),t}function Vu(a,e={}){const t={};if(!a)return t;const n=ou(a,e),r=tu(n,e==null?void 0:e.customHeaderMap);return Object.entries(r).reduce((i,[s,A])=>{const f=pA(A,{whitespace:!1});return f&&(i[s]=f),i},t)}function zu(a,e,t){return _(a,Vu(e,t))}const Wu="CMCD";function Au(a,e={}){return a?pA(ou(a,e),{whitespace:!1}):""}function Ul(a,e={}){if(!a)return"";const t=Au(a,e);return encodeURIComponent(t)}function lu(a,e={}){if(!a)return"";const t=Ul(a,e);return`${Wu}=${t}`}const kl=/CMCD=[^&#]+/;function Ol(a,e,t){const n=lu(e,t);if(!n)return a;if(kl.test(a))return a.replace(kl,n);const r=a.includes("?")?"&":"?";return`${a}${r}${n}`}class uu{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:Ks.MANIFEST,su:!this.initialized})}catch(i){this.hls.logger.warn("Could not generate manifest CMCD data.",i)}},this.applyFragmentData=r=>{try{const{frag:i,part:s}=r,A=this.hls.levels[i.level],f=this.getObjectType(i),c={d:(s||i).duration*1e3,ot:f};(f===Ks.VIDEO||f===Ks.AUDIO||f==Ks.MUXED)&&(c.br=A.bitrate/1e3,c.tb=this.getTopBandwidth(f)/1e3,c.bl=this.getBufferLength(f));const m=s?this.getNextPart(s):this.getNextFrag(i);m!=null&&m.url&&m.url!==i.url&&(c.nor=m.url),this.apply(r,c)}catch(i){this.hls.logger.warn("Could not generate segment CMCD data.",i)}},this.hls=e;const t=this.config=e.config,{cmcd:n}=t;n!=null&&(t.pLoader=this.createPlaylistLoader(),t.fLoader=this.createFragmentLoader(),this.sid=n.sessionId||e.sessionId,this.cid=n.contentId,this.useHeaders=n.useHeaders===!0,this.includeKeys=n.includeKeys,this.registerListeners())}registerListeners(){const e=this.hls;e.on(g.MEDIA_ATTACHED,this.onMediaAttached,this),e.on(g.MEDIA_DETACHED,this.onMediaDetached,this),e.on(g.BUFFER_CREATED,this.onBufferCreated,this)}unregisterListeners(){const e=this.hls;e.off(g.MEDIA_ATTACHED,this.onMediaAttached,this),e.off(g.MEDIA_DETACHED,this.onMediaDetached,this),e.off(g.BUFFER_CREATED,this.onBufferCreated,this)}destroy(){this.unregisterListeners(),this.onMediaDetached(),this.hls=this.config=this.audioBuffer=this.videoBuffer=null,this.onWaiting=this.onPlaying=this.media=null}onMediaAttached(e,t){this.media=t.media,this.media.addEventListener("waiting",this.onWaiting),this.media.addEventListener("playing",this.onPlaying)}onMediaDetached(){this.media&&(this.media.removeEventListener("waiting",this.onWaiting),this.media.removeEventListener("playing",this.onPlaying),this.media=null)}onBufferCreated(e,t){var n,r;this.audioBuffer=(n=t.tracks.audio)==null?void 0:n.buffer,this.videoBuffer=(r=t.tracks.video)==null?void 0:r.buffer}createData(){var e;return{v:1,sf:jo.HLS,sid:this.sid,cid:this.cid,pr:(e=this.media)==null?void 0:e.playbackRate,mtp:this.hls.bandwidthEstimate/1e3}}apply(e,t={}){_(t,this.createData());const n=t.ot===Ks.INIT||t.ot===Ks.VIDEO||t.ot===Ks.MUXED;this.starved&&n&&(t.bs=!0,t.su=!0,this.starved=!1),t.su==null&&(t.su=this.buffering);const{includeKeys:r}=this;r&&(t=Object.keys(t).reduce((s,A)=>(r.includes(A)&&(s[A]=t[A]),s),{}));const i={baseUrl:e.url};this.useHeaders?(e.headers||(e.headers={}),zu(e.headers,t,i)):e.url=Ol(e.url,t,i)}getNextFrag(e){var t;const n=(t=this.hls.levels[e.level])==null?void 0:t.details;if(n){const r=e.sn-n.startSN;return n.fragments[r+1]}}getNextPart(e){var t;const{index:n,fragment:r}=e,i=(t=this.hls.levels[r.level])==null||(t=t.details)==null?void 0:t.partList;if(i){const{sn:s}=r;for(let A=i.length-1;A>=0;A--){const f=i[A];if(f.index===n&&f.fragment.sn===s)return i[A+1]}}}getObjectType(e){const{type:t}=e;if(t==="subtitle")return Ks.TIMED_TEXT;if(e.sn==="initSegment")return Ks.INIT;if(t==="audio")return Ks.AUDIO;if(t==="main")return this.hls.audioTracks.length?Ks.VIDEO:Ks.MUXED}getTopBandwidth(e){let t=0,n;const r=this.hls;if(e===Ks.AUDIO)n=r.audioTracks;else{const i=r.maxAutoLevel,s=i>-1?i+1:r.levels.length;n=r.levels.slice(0,s)}return n.forEach(i=>{i.bitrate>t&&(t=i.bitrate)}),t>0?t:NaN}getBufferLength(e){const t=this.media,n=e===Ks.AUDIO?this.audioBuffer:this.videoBuffer;return!n||!t?NaN:kn.bufferInfo(n,t.currentTime,this.config.maxBufferHole).len*1e3}createPlaylistLoader(){const{pLoader:e}=this.config,t=this.applyPlaylistData,n=e||this.config.loader;return class{constructor(i){this.loader=void 0,this.loader=new n(i)}get stats(){return this.loader.stats}get context(){return this.loader.context}destroy(){this.loader.destroy()}abort(){this.loader.abort()}load(i,s,A){t(i),this.loader.load(i,s,A)}}}createFragmentLoader(){const{fLoader:e}=this.config,t=this.applyFragmentData,n=e||this.config.loader;return class{constructor(i){this.loader=void 0,this.loader=new n(i)}get stats(){return this.loader.stats}get context(){return this.loader.context}destroy(){this.loader.destroy()}abort(){this.loader.abort()}load(i,s,A){t(i),this.loader.load(i,s,A)}}}}const cu=3e5;class ju extends H{constructor(e){super("content-steering",e.logger),this.hls=void 0,this.loader=null,this.uri=null,this.pathwayId=".",this._pathwayPriority=null,this.timeToLoad=300,this.reloadTimer=-1,this.updated=0,this.started=!1,this.enabled=!0,this.levels=null,this.audioTracks=null,this.subtitleTracks=null,this.penalizedPathways={},this.hls=e,this.registerListeners()}registerListeners(){const e=this.hls;e.on(g.MANIFEST_LOADING,this.onManifestLoading,this),e.on(g.MANIFEST_LOADED,this.onManifestLoaded,this),e.on(g.MANIFEST_PARSED,this.onManifestParsed,this),e.on(g.ERROR,this.onError,this)}unregisterListeners(){const e=this.hls;e&&(e.off(g.MANIFEST_LOADING,this.onManifestLoading,this),e.off(g.MANIFEST_LOADED,this.onManifestLoaded,this),e.off(g.MANIFEST_PARSED,this.onManifestParsed,this),e.off(g.ERROR,this.onError,this))}pathways(){return(this.levels||[]).reduce((e,t)=>(e.indexOf(t.pathwayId)===-1&&e.push(t.pathwayId),e),[])}get pathwayPriority(){return this._pathwayPriority}set pathwayPriority(e){this.updatePathwayPriority(e)}startLoad(){if(this.started=!0,this.clearTimeout(),this.enabled&&this.uri){if(this.updated){const e=this.timeToLoad*1e3-(performance.now()-this.updated);if(e>0){this.scheduleRefresh(this.uri,e);return}}this.loadSteeringManifest(this.uri)}}stopLoad(){this.started=!1,this.loader&&(this.loader.destroy(),this.loader=null),this.clearTimeout()}clearTimeout(){this.reloadTimer!==-1&&(self.clearTimeout(this.reloadTimer),this.reloadTimer=-1)}destroy(){this.unregisterListeners(),this.stopLoad(),this.hls=null,this.levels=this.audioTracks=this.subtitleTracks=null}removeLevel(e){const t=this.levels;t&&(this.levels=t.filter(n=>n!==e))}onManifestLoading(){this.stopLoad(),this.enabled=!0,this.timeToLoad=300,this.updated=0,this.uri=null,this.pathwayId=".",this.levels=this.audioTracks=this.subtitleTracks=null}onManifestLoaded(e,t){const{contentSteering:n}=t;n!==null&&(this.pathwayId=n.pathwayId,this.uri=n.uri,this.started&&this.startLoad())}onManifestParsed(e,t){this.audioTracks=t.audioTracks,this.subtitleTracks=t.subtitleTracks}onError(e,t){const{errorAction:n}=t;if((n==null?void 0:n.action)===Ye.SendAlternateToPenaltyBox&&n.flags===Ge.MoveAllAlternatesMatchingHost){const r=this.levels;let i=this._pathwayPriority,s=this.pathwayId;if(t.context){const{groupId:A,pathwayId:f,type:c}=t.context;A&&r?s=this.getPathwayForGroupId(A,c,s):f&&(s=f)}s in this.penalizedPathways||(this.penalizedPathways[s]=performance.now()),!i&&r&&(i=this.pathways()),i&&i.length>1&&(this.updatePathwayPriority(i),n.resolved=this.pathwayId!==s),t.details===G.BUFFER_APPEND_ERROR&&!t.fatal?n.resolved=!0:n.resolved||this.warn(`Could not resolve ${t.details} ("${t.error.message}") with content-steering for Pathway: ${s} levels: ${r&&r.length} priorities: ${Sn(i)} penalized: ${Sn(this.penalizedPathways)}`)}}filterParsedLevels(e){this.levels=e;let t=this.getLevelsForPathway(this.pathwayId);if(t.length===0){const n=e[0].pathwayId;this.log(`No levels found in Pathway ${this.pathwayId}. Setting initial Pathway to "${n}"`),t=this.getLevelsForPathway(n),this.pathwayId=n}return t.length!==e.length&&this.log(`Found ${t.length}/${e.length} levels in Pathway "${this.pathwayId}"`),t}getLevelsForPathway(e){return this.levels===null?[]:this.levels.filter(t=>e===t.pathwayId)}updatePathwayPriority(e){this._pathwayPriority=e;let t;const n=this.penalizedPathways,r=performance.now();Object.keys(n).forEach(i=>{r-n[i]>cu&&delete n[i]});for(let i=0;i<e.length;i++){const s=e[i];if(s in n)continue;if(s===this.pathwayId)return;const A=this.hls.nextLoadLevel,f=this.hls.levels[A];if(t=this.getLevelsForPathway(s),t.length>0){this.log(`Setting Pathway to "${s}"`),this.pathwayId=s,Gs(t),this.hls.trigger(g.LEVELS_UPDATED,{levels:t});const c=this.hls.levels[A];f&&c&&this.levels&&(c.attrs["STABLE-VARIANT-ID"]!==f.attrs["STABLE-VARIANT-ID"]&&c.bitrate!==f.bitrate&&this.log(`Unstable Pathways change from bitrate ${f.bitrate} to ${c.bitrate}`),this.hls.nextLoadLevel=A);break}}}getPathwayForGroupId(e,t,n){const r=this.getLevelsForPathway(n).concat(this.levels||[]);for(let i=0;i<r.length;i++)if(t===ye.AUDIO_TRACK&&r[i].hasAudioGroup(e)||t===ye.SUBTITLE_TRACK&&r[i].hasSubtitleGroup(e))return r[i].pathwayId;return n}clonePathways(e){const t=this.levels;if(!t)return;const n={},r={};e.forEach(i=>{const{ID:s,"BASE-ID":A,"URI-REPLACEMENT":f}=i;if(t.some(m=>m.pathwayId===s))return;const c=this.getLevelsForPathway(A).map(m=>{const y=new or(m.attrs);y["PATHWAY-ID"]=s;const B=y.AUDIO&&`${y.AUDIO}_clone_${s}`,D=y.SUBTITLES&&`${y.SUBTITLES}_clone_${s}`;B&&(n[y.AUDIO]=B,y.AUDIO=B),D&&(r[y.SUBTITLES]=D,y.SUBTITLES=D);const L=vA(m.uri,y["STABLE-VARIANT-ID"],"PER-VARIANT-URIS",f),se=new vn({attrs:y,audioCodec:m.audioCodec,bitrate:m.bitrate,height:m.height,name:m.name,url:L,videoCodec:m.videoCodec,width:m.width});if(m.audioGroups)for(let X=1;X<m.audioGroups.length;X++)se.addGroupId("audio",`${m.audioGroups[X]}_clone_${s}`);if(m.subtitleGroups)for(let X=1;X<m.subtitleGroups.length;X++)se.addGroupId("text",`${m.subtitleGroups[X]}_clone_${s}`);return se});t.push(...c),mA(this.audioTracks,n,f,s),mA(this.subtitleTracks,r,f,s)})}loadSteeringManifest(e){const t=this.hls.config,n=t.loader;this.loader&&this.loader.destroy(),this.loader=new n(t);let r;try{r=new self.URL(e)}catch(m){this.enabled=!1,this.log(`Failed to parse Steering Manifest URI: ${e}`);return}if(r.protocol!=="data:"){const m=(this.hls.bandwidthEstimate||t.abrEwmaDefaultEstimate)|0;r.searchParams.set("_HLS_pathway",this.pathwayId),r.searchParams.set("_HLS_throughput",""+m)}const i={responseType:"json",url:r.href},s=t.steeringManifestLoadPolicy.default,A=s.errorRetry||s.timeoutRetry||{},f={loadPolicy:s,timeout:s.maxLoadTimeMs,maxRetry:A.maxNumRetry||0,retryDelay:A.retryDelayMs||0,maxRetryDelay:A.maxRetryDelayMs||0},c={onSuccess:(m,y,B,D)=>{this.log(`Loaded steering manifest: "${r}"`);const L=m.data;if((L==null?void 0:L.VERSION)!==1){this.log(`Steering VERSION ${L.VERSION} not supported!`);return}this.updated=performance.now(),this.timeToLoad=L.TTL;const{"RELOAD-URI":se,"PATHWAY-CLONES":X,"PATHWAY-PRIORITY":xe}=L;if(se)try{this.uri=new self.URL(se,r).href}catch(We){this.enabled=!1,this.log(`Failed to parse Steering Manifest RELOAD-URI: ${se}`);return}this.scheduleRefresh(this.uri||B.url),X&&this.clonePathways(X);const at={steeringManifest:L,url:r.toString()};this.hls.trigger(g.STEERING_MANIFEST_LOADED,at),xe&&this.updatePathwayPriority(xe)},onError:(m,y,B,D)=>{if(this.log(`Error loading steering manifest: ${m.code} ${m.text} (${y.url})`),this.stopLoad(),m.code===410){this.enabled=!1,this.log(`Steering manifest ${y.url} no longer available`);return}let L=this.timeToLoad*1e3;if(m.code===429){const se=this.loader;if(typeof(se==null?void 0:se.getResponseHeader)=="function"){const X=se.getResponseHeader("Retry-After");X&&(L=parseFloat(X)*1e3)}this.log(`Steering manifest ${y.url} rate limited`);return}this.scheduleRefresh(this.uri||y.url,L)},onTimeout:(m,y,B)=>{this.log(`Timeout loading steering manifest (${y.url})`),this.scheduleRefresh(this.uri||y.url)}};this.log(`Requesting steering manifest: ${r}`),this.loader.load(i,f,c)}scheduleRefresh(e,t=this.timeToLoad*1e3){this.clearTimeout(),this.reloadTimer=self.setTimeout(()=>{var n;const r=(n=this.hls)==null?void 0:n.media;if(r&&!r.ended){this.loadSteeringManifest(e);return}this.scheduleRefresh(e,this.timeToLoad*1e3)},t)}}function mA(a,e,t,n){a&&Object.keys(e).forEach(r=>{const i=a.filter(s=>s.groupId===r).map(s=>{const A=_({},s);return A.details=void 0,A.attrs=new or(A.attrs),A.url=A.attrs.URI=vA(s.url,s.attrs["STABLE-RENDITION-ID"],"PER-RENDITION-URIS",t),A.groupId=A.attrs["GROUP-ID"]=e[r],A.attrs["PATHWAY-ID"]=n,A});a.push(...i)})}function vA(a,e,t,n){const{HOST:r,PARAMS:i,[t]:s}=n;let A;e&&(A=s==null?void 0:s[e],A&&(a=A));const f=new self.URL(a);return r&&!A&&(f.host=r),i&&Object.keys(i).sort().forEach(c=>{c&&f.searchParams.set(c,i[c])}),f.href}class To extends H{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=To.CDMCleanupPromise?[To.CDMCleanupPromise]:[],this.bannedKeyIds={},this.onMediaEncrypted=t=>{const{initDataType:n,initData:r}=t,i=`"${t.type}" event: init data type: "${n}"`;if(this.debug(i),r!==null){if(!this.keyFormatPromise){let s=Object.keys(this.keySystemAccessPromises);s.length||(s=_r(this.config));const A=s.map(rr).filter(f=>!!f);this.keyFormatPromise=this.getKeyFormatPromise(A)}this.keyFormatPromise.then(s=>{const A=ti(s);if(n!=="sinf"||A!==Dr.FAIRPLAY){this.log(`Ignoring "${t.type}" event with init data type: "${n}" for selected key-system ${A}`);return}let f;try{const D=It(new Uint8Array(r)),L=si(JSON.parse(D).sinf),se=ot(L);if(!se)throw new Error("'schm' box missing or not cbcs/cenc with schi > tenc");f=new Uint8Array(se.subarray(8,24))}catch(D){this.warn(`${i} Failed to parse sinf: ${D}`);return}const c=Y(f),{keyIdToKeySessionPromise:m,mediaKeySessions:y}=this;let B=m[c];for(let D=0;D<y.length;D++){const L=y[D],se=L.decryptdata;if(!se.keyId)continue;const X=Y(se.keyId);if(c===X||se.uri.replace(/-/g,"").indexOf(c)!==-1){if(B=m[X],!B)continue;if(se.pssh)break;delete m[X],se.pssh=new Uint8Array(r),se.keyId=f,B=m[c]=B.then(()=>this.generateRequestWithPreferredKeySession(L,n,r,"encrypted-event-key-match")),B.catch(xe=>this.handleError(xe));break}}B||this.handleError(new Error(`Key ID ${c} not encountered in playlist. Key-system sessions ${y.length}.`))}).catch(s=>this.handleError(s))}},this.onWaitingForKey=t=>{this.log(`"${t.type}" event`)},this.hls=e,this.config=e.config,this.registerListeners()}destroy(){this.onDestroying(),this.onMediaDetached();const e=this.config;e.requestMediaKeySystemAccessFunc=null,e.licenseXhrSetup=e.licenseResponseCallback=void 0,e.drmSystems=e.drmSystemOptions={},this.hls=this.config=this.keyIdToKeySessionPromise=null,this.onMediaEncrypted=this.onWaitingForKey=null}registerListeners(){this.hls.on(g.MEDIA_ATTACHED,this.onMediaAttached,this),this.hls.on(g.MEDIA_DETACHED,this.onMediaDetached,this),this.hls.on(g.MANIFEST_LOADING,this.onManifestLoading,this),this.hls.on(g.MANIFEST_LOADED,this.onManifestLoaded,this),this.hls.on(g.DESTROYING,this.onDestroying,this)}unregisterListeners(){this.hls.off(g.MEDIA_ATTACHED,this.onMediaAttached,this),this.hls.off(g.MEDIA_DETACHED,this.onMediaDetached,this),this.hls.off(g.MANIFEST_LOADING,this.onManifestLoading,this),this.hls.off(g.MANIFEST_LOADED,this.onManifestLoaded,this),this.hls.off(g.DESTROYING,this.onDestroying,this)}getLicenseServerUrl(e){const{drmSystems:t,widevineLicenseUrl:n}=this.config,r=t==null?void 0:t[e];if(r)return r.licenseUrl;if(e===Dr.WIDEVINE&&n)return n}getLicenseServerUrlOrThrow(e){const t=this.getLicenseServerUrl(e);if(t===void 0)throw new Error(`no license server URL configured for key-system "${e}"`);return t}getServerCertificateUrl(e){const{drmSystems:t}=this.config,n=t==null?void 0:t[e];if(n)return n.serverCertificateUrl;this.log(`No Server Certificate in config.drmSystems["${e}"]`)}attemptKeySystemAccess(e){const t=this.hls.levels,n=(s,A,f)=>!!s&&f.indexOf(s)===A,r=t.map(s=>s.audioCodec).filter(n),i=t.map(s=>s.videoCodec).filter(n);return r.length+i.length===0&&i.push("avc1.42e01e"),new Promise((s,A)=>{const f=c=>{const m=c.shift();this.getMediaKeysPromise(m,r,i).then(y=>s({keySystem:m,mediaKeys:y})).catch(y=>{c.length?f(c):y instanceof wa?A(y):A(new wa({type:ge.KEY_SYSTEM_ERROR,details:G.KEY_SYSTEM_NO_ACCESS,error:y,fatal:!0},y.message))})};f(e)})}requestMediaKeySystemAccess(e,t){const{requestMediaKeySystemAccessFunc:n}=this.config;if(typeof n!="function"){let r=`Configured requestMediaKeySystemAccess is not a function ${n}`;return Er===null&&self.location.protocol==="http:"&&(r=`navigator.requestMediaKeySystemAccess is not available over insecure protocol ${location.protocol}`),Promise.reject(new Error(r))}return n(e,t)}getMediaKeysPromise(e,t,n){var r;const i=ui(e,t,n,this.config.drmSystemOptions||{});let s=this.keySystemAccessPromises[e],A=(r=s)==null?void 0:r.keySystemAccess;if(!A){this.log(`Requesting encrypted media "${e}" key-system access with config: ${Sn(i)}`),A=this.requestMediaKeySystemAccess(e,i);const f=s=this.keySystemAccessPromises[e]={keySystemAccess:A};return A.catch(c=>{this.log(`Failed to obtain access to key-system "${e}": ${c}`)}),A.then(c=>{this.log(`Access for key-system "${c.keySystem}" obtained`);const m=this.fetchServerCertificate(e);this.log(`Create media-keys for "${e}"`);const y=f.mediaKeys=c.createMediaKeys().then(B=>(this.log(`Media-keys created for "${e}"`),f.hasMediaKeys=!0,m.then(D=>D?this.setMediaKeysServerCertificate(B,e,D):B)));return y.catch(B=>{this.error(`Failed to create media-keys for "${e}"}: ${B}`)}),y})}return A.then(()=>s.mediaKeys)}createMediaKeySessionContext({decryptdata:e,keySystem:t,mediaKeys:n}){this.log(`Creating key-system session "${t}" keyId: ${Y(e.keyId||[])}`);const r=n.createSession(),i={decryptdata:e,keySystem:t,mediaKeys:n,mediaKeysSession:r,keyStatus:"status-pending"};return this.mediaKeySessions.push(i),i}renewKeySession(e){const t=e.decryptdata;if(t.pssh){const n=this.createMediaKeySessionContext(e),r=this.getKeyIdString(t),i="cenc";this.keyIdToKeySessionPromise[r]=this.generateRequestWithPreferredKeySession(n,i,t.pssh.buffer,"expired")}else this.warn("Could not renew expired session. Missing pssh initData.");this.removeSession(e)}getKeyIdString(e){if(!e)throw new Error("Could not read keyId of undefined decryptdata");if(e.keyId===null)throw new Error("keyId is null");return Y(e.keyId)}updateKeySession(e,t){const n=e.mediaKeysSession;return this.log(`Updating key-session "${n.sessionId}" for keyId ${Y(e.decryptdata.keyId||[])}
|
|
} (data length: ${t.byteLength})`),n.update(t)}getSelectedKeySystemFormats(){return Object.keys(this.keySystemAccessPromises).map(e=>({keySystem:e,hasMediaKeys:this.keySystemAccessPromises[e].hasMediaKeys})).filter(({hasMediaKeys:e})=>!!e).map(({keySystem:e})=>rr(e)).filter(e=>!!e)}getKeySystemAccess(e){return this.getKeySystemSelectionPromise(e).then(({keySystem:t,mediaKeys:n})=>this.attemptSetMediaKeys(t,n))}selectKeySystem(e){return new Promise((t,n)=>{this.getKeySystemSelectionPromise(e).then(({keySystem:r})=>{const i=rr(r);i?t(i):n(new Error(`Unable to find format for key-system "${r}"`))}).catch(n)})}selectKeySystemFormat(e){const t=Object.keys(e.levelkeys||{});return this.keyFormatPromise||(this.log(`Selecting key-system from fragment (sn: ${e.sn} ${e.type}: ${e.level}) key formats ${t.join(", ")}`),this.keyFormatPromise=this.getKeyFormatPromise(t)),this.keyFormatPromise}getKeyFormatPromise(e){const t=_r(this.config),n=e.map(ti).filter(r=>!!r&&t.indexOf(r)!==-1);return this.selectKeySystem(n)}loadKey(e){const t=e.keyInfo.decryptdata,n=this.getKeyIdString(t),r=this.bannedKeyIds[n];if(r){const A=fu(r,t);return this.handleError(A,e.frag),Promise.reject(A)}const i=`(keyId: ${n} format: "${t.keyFormat}" method: ${t.method} uri: ${t.uri})`;this.log(`Starting session for key ${i}`);const s=this.keyIdToKeySessionPromise[n];if(!s){const A=this.getKeySystemForKeyPromise(t).then(({keySystem:f,mediaKeys:c})=>(this.throwIfDestroyed(),this.log(`Handle encrypted media sn: ${e.frag.sn} ${e.frag.type}: ${e.frag.level} using key ${i}`),this.attemptSetMediaKeys(f,c).then(()=>(this.throwIfDestroyed(),this.createMediaKeySessionContext({keySystem:f,mediaKeys:c,decryptdata:t}))))).then(f=>{const c="cenc",m=t.pssh?t.pssh.buffer:null;return this.generateRequestWithPreferredKeySession(f,c,m,"playlist-key")});return A.catch(f=>this.handleError(f,e.frag)),this.keyIdToKeySessionPromise[n]=A,A}return s}throwIfDestroyed(e="Invalid state"){if(!this.hls)throw new Error("invalid state")}handleError(e,t){this.hls&&(this.error(e.message),e instanceof wa?(t&&(e.data.frag=t),this.hls.trigger(g.ERROR,e.data)):this.hls.trigger(g.ERROR,{type:ge.KEY_SYSTEM_ERROR,details:G.KEY_SYSTEM_NO_KEYS,error:e,fatal:!0}))}getKeySystemForKeyPromise(e){const t=this.getKeyIdString(e),n=this.keyIdToKeySessionPromise[t];if(!n){const r=ti(e.keyFormat),i=r?[r]:_r(this.config);return this.attemptKeySystemAccess(i)}return n}getKeySystemSelectionPromise(e){if(e.length||(e=_r(this.config)),e.length===0)throw new wa({type:ge.KEY_SYSTEM_ERROR,details:G.KEY_SYSTEM_NO_CONFIGURED_LICENSE,fatal:!0},`Missing key-system license configuration options ${Sn({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(i=>n.indexOf(i)===-1)})}generateRequestWithPreferredKeySession(e,t,n,r){var i;const s=(i=this.config.drmSystems)==null||(i=i[e.keySystem])==null?void 0:i.generateRequest;if(s)try{const B=s.call(this.hls,t,n,e);if(!B)throw new Error("Invalid response from configured generateRequest filter");t=B.initDataType,n=B.initData?B.initData:null,e.decryptdata.pssh=n?new Uint8Array(n):null}catch(B){if(this.warn(B.message),this.hls&&this.hls.config.debug)throw B}if(n===null)return this.log(`Skipping key-session request for "${r}" (no initData)`),Promise.resolve(e);const A=this.getKeyIdString(e.decryptdata);this.log(`Generating key-session request for "${r}": ${A} (init data type: ${t} length: ${n.byteLength})`);const f=new Ja,c=e._onmessage=B=>{const D=e.mediaKeysSession;if(!D){f.emit("error",new Error("invalid state"));return}const{messageType:L,message:se}=B;this.log(`"${L}" message event for session "${D.sessionId}" message size: ${se.byteLength}`),L==="license-request"||L==="license-renewal"?this.renewLicense(e,se).catch(X=>{f.eventNames().length?f.emit("error",X):this.handleError(X)}):L==="license-release"?e.keySystem===Dr.FAIRPLAY&&(this.updateKeySession(e,li("acknowledged")),this.removeSession(e)):this.warn(`unhandled media key message type "${L}"`)},m=e._onkeystatuseschange=B=>{if(!e.mediaKeysSession){f.emit("error",new Error("invalid state"));return}const L=e.keyStatus;this.onKeyStatusChange(e);const se=e.keyStatus;se!==L&&(f.emit("keyStatus",se,e),se==="expired"&&(this.log(`${e.keySystem} expired for key ${A}`),this.renewKeySession(e)))};gs(e.mediaKeysSession,"message",c),gs(e.mediaKeysSession,"keystatuseschange",m);const y=new Promise((B,D)=>{f.on("error",D),f.on("keyStatus",(L,{decryptdata:se})=>{L.startsWith("usable")?B():L==="internal-error"||L==="output-restricted"?D(fu(L,se)):L==="expired"?D(new Error(`key expired while generating request (keyId: ${A})`)):this.warn(`unhandled key status change "${L}" (keyId: ${A})`)})});return e.mediaKeysSession.generateRequest(t,n).then(()=>{this.log(`Request generated for key-session "${e.mediaKeysSession.sessionId}" keyId: ${A}`)}).catch(B=>{throw new wa({type:ge.KEY_SYSTEM_ERROR,details:G.KEY_SYSTEM_NO_SESSION,error:B,decryptdata:e.decryptdata,fatal:!1},`Error generating key-session request: ${B}`)}).then(()=>y).catch(B=>{throw f.removeAllListeners(),this.removeSession(e),B}).then(()=>(f.removeAllListeners(),e))}onKeyStatusChange(e){const t=Y(new Uint8Array(e.decryptdata.keyId||[]));e.mediaKeysSession.keyStatuses.forEach((n,r)=>{if(typeof r=="string"&&typeof n=="object"){const A=r;r=n,n=A}const i=Y("buffer"in r?new Uint8Array(r.buffer,r.byteOffset,r.byteLength):new Uint8Array(r));n==="internal-error"&&(this.bannedKeyIds[i]=n);const s=i===t;this.log(`${s?"":"un"}matched key status change "${n}" for keyStatuses keyId: ${i} session keyId: ${t} uri: ${e.decryptdata.uri}`),s&&(e.keyStatus=n)})}fetchServerCertificate(e){const t=this.config,n=t.loader,r=new n(t),i=this.getServerCertificateUrl(e);return i?(this.log(`Fetching server certificate for "${e}"`),new Promise((s,A)=>{const f={responseType:"arraybuffer",url:i},c=t.certLoadPolicy.default,m={loadPolicy:c,timeout:c.maxLoadTimeMs,maxRetry:0,retryDelay:0,maxRetryDelay:0},y={onSuccess:(B,D,L,se)=>{s(B.data)},onError:(B,D,L,se)=>{A(new wa({type:ge.KEY_SYSTEM_ERROR,details:G.KEY_SYSTEM_SERVER_CERTIFICATE_REQUEST_FAILED,fatal:!0,networkDetails:L,response:b({url:f.url,data:void 0},B)},`"${e}" certificate request failed (${i}). Status: ${B.code} (${B.text})`))},onTimeout:(B,D,L)=>{A(new wa({type:ge.KEY_SYSTEM_ERROR,details:G.KEY_SYSTEM_SERVER_CERTIFICATE_REQUEST_FAILED,fatal:!0,networkDetails:L,response:{url:f.url,data:void 0}},`"${e}" certificate request timed out (${i})`))},onAbort:(B,D,L)=>{A(new Error("aborted"))}};r.load(f,m,y)})):Promise.resolve()}setMediaKeysServerCertificate(e,t,n){return new Promise((r,i)=>{e.setServerCertificate(n).then(s=>{this.log(`setServerCertificate ${s?"success":"not supported by CDM"} (${n.byteLength}) on "${t}"`),r(e)}).catch(s=>{i(new wa({type:ge.KEY_SYSTEM_ERROR,details:G.KEY_SYSTEM_SERVER_CERTIFICATE_UPDATE_FAILED,error:s,fatal:!0},s.message))})})}renewLicense(e,t){return this.requestLicense(e,new Uint8Array(t)).then(n=>this.updateKeySession(e,new Uint8Array(n)).catch(r=>{throw new wa({type:ge.KEY_SYSTEM_ERROR,details:G.KEY_SYSTEM_SESSION_UPDATE_FAILED,decryptdata:e.decryptdata,error:r,fatal:!1},r.message)}))}unpackPlayReadyKeyMessage(e,t){const n=String.fromCharCode.apply(null,new Uint16Array(t.buffer));if(!n.includes("PlayReadyKeyMessage"))return e.setRequestHeader("Content-Type","text/xml; charset=utf-8"),t;const r=new DOMParser().parseFromString(n,"application/xml"),i=r.querySelectorAll("HttpHeader");if(i.length>0){let m;for(let y=0,B=i.length;y<B;y++){var s,A;m=i[y];const D=(s=m.querySelector("name"))==null?void 0:s.textContent,L=(A=m.querySelector("value"))==null?void 0:A.textContent;D&&L&&e.setRequestHeader(D,L)}}const f=r.querySelector("Challenge"),c=f==null?void 0:f.textContent;if(!c)throw new Error("Cannot find <Challenge> in key message");return li(atob(c))}setupLicenseXHR(e,t,n,r){const i=this.config.licenseXhrSetup;return i?Promise.resolve().then(()=>{if(!n.decryptdata)throw new Error("Key removed");return i.call(this.hls,e,t,n,r)}).catch(s=>{if(!n.decryptdata)throw s;return e.open("POST",t,!0),i.call(this.hls,e,t,n,r)}).then(s=>(e.readyState||e.open("POST",t,!0),{xhr:e,licenseChallenge:s||r})):(e.open("POST",t,!0),Promise.resolve({xhr:e,licenseChallenge:r}))}requestLicense(e,t){const n=this.config.keyLoadPolicy.default;return new Promise((r,i)=>{const s=this.getLicenseServerUrlOrThrow(e.keySystem);this.log(`Sending license request to URL: ${s}`);const A=new XMLHttpRequest;A.responseType="arraybuffer",A.onreadystatechange=()=>{if(!this.hls||!e.mediaKeysSession)return i(new Error("invalid state"));if(A.readyState===4)if(A.status===200){this._requestLicenseFailureCount=0;let f=A.response;this.log(`License received ${f instanceof ArrayBuffer?f.byteLength:f}`);const c=this.config.licenseResponseCallback;if(c)try{f=c.call(this.hls,A,s,e)}catch(m){this.error(m)}r(f)}else{const f=n.errorRetry,c=f?f.maxNumRetry:0;if(this._requestLicenseFailureCount++,this._requestLicenseFailureCount>c||A.status>=400&&A.status<500)i(new wa({type:ge.KEY_SYSTEM_ERROR,details:G.KEY_SYSTEM_LICENSE_REQUEST_FAILED,decryptdata:e.decryptdata,fatal:!0,networkDetails:A,response:{url:s,data:void 0,code:A.status,text:A.statusText}},`License Request XHR failed (${s}). Status: ${A.status} (${A.statusText})`));else{const m=c-this._requestLicenseFailureCount+1;this.warn(`Retrying license request, ${m} attempts left`),this.requestLicense(e,t).then(r,i)}}},e.licenseXhr&&e.licenseXhr.readyState!==XMLHttpRequest.DONE&&e.licenseXhr.abort(),e.licenseXhr=A,this.setupLicenseXHR(A,s,e,t).then(({xhr:f,licenseChallenge:c})=>{e.keySystem==Dr.PLAYREADY&&(c=this.unpackPlayReadyKeyMessage(f,c)),f.send(c)}).catch(i)})}onDestroying(){this.unregisterListeners(),this._clear()}onMediaAttached(e,t){if(!this.config.emeEnabled)return;const n=t.media;this.media=n,gs(n,"encrypted",this.onMediaEncrypted),gs(n,"waitingforkey",this.onWaitingForKey)}onMediaDetached(){const e=this.media;e&&(ys(e,"encrypted",this.onMediaEncrypted),ys(e,"waitingforkey",this.onWaitingForKey),this.media=null,this.mediaKeys=null)}_clear(){var e;if(this._requestLicenseFailureCount=0,this.keyIdToKeySessionPromise={},this.bannedKeyIds={},!this.mediaKeys&&!this.mediaKeySessions.length)return;const t=this.media,n=this.mediaKeySessions.slice();this.mediaKeySessions=[],this.mediaKeys=null,ls.clearKeyUriToKeyIdMap();const r=n.length;To.CDMCleanupPromise=Promise.all(n.map(i=>this.removeSession(i)).concat(t==null||(e=t.setMediaKeys(null))==null?void 0:e.catch(i=>{this.log(`Could not clear media keys: ${i}`),this.hls&&this.hls.trigger(g.ERROR,{type:ge.OTHER_ERROR,details:G.KEY_SYSTEM_DESTROY_MEDIA_KEYS_ERROR,fatal:!1,error:new Error(`Could not clear media keys: ${i}`)})}))).catch(i=>{this.log(`Could not close sessions and clear media keys: ${i}`),this.hls&&this.hls.trigger(g.ERROR,{type:ge.OTHER_ERROR,details:G.KEY_SYSTEM_DESTROY_CLOSE_SESSION_ERROR,fatal:!1,error:new Error(`Could not close sessions and clear media keys: ${i}`)})}).then(()=>{r&&this.log("finished closing key sessions and clearing media keys")})}onManifestLoading(){this.keyFormatPromise=null,this.bannedKeyIds={}}onManifestLoaded(e,{sessionKeys:t}){if(!(!t||!this.config.emeEnabled)&&!this.keyFormatPromise){const n=t.reduce((r,i)=>(r.indexOf(i.keyFormat)===-1&&r.push(i.keyFormat),r),[]);this.log(`Selecting key-system from session-keys ${n.join(", ")}`),this.keyFormatPromise=this.getKeyFormatPromise(n)}}removeSession(e){const{mediaKeysSession:t,licenseXhr:n,decryptdata:r}=e;if(t){this.log(`Remove licenses and keys and close session "${t.sessionId}" keyId: ${Y((r==null?void 0:r.keyId)||[])}`),e._onmessage&&(t.removeEventListener("message",e._onmessage),e._onmessage=void 0),e._onkeystatuseschange&&(t.removeEventListener("keystatuseschange",e._onkeystatuseschange),e._onkeystatuseschange=void 0),n&&n.readyState!==XMLHttpRequest.DONE&&n.abort(),e.mediaKeysSession=e.decryptdata=e.licenseXhr=void 0;const i=this.mediaKeySessions.indexOf(e);i>-1&&this.mediaKeySessions.splice(i,1);const{drmSystemOptions:s}=this.config;return(Gi(s)?new Promise((f,c)=>{self.setTimeout(()=>c(new Error("MediaKeySession.remove() timeout")),8e3),t.remove().then(f).catch(c)}):Promise.resolve()).catch(f=>{this.log(`Could not remove session: ${f}`),this.hls&&this.hls.trigger(g.ERROR,{type:ge.OTHER_ERROR,details:G.KEY_SYSTEM_DESTROY_REMOVE_SESSION_ERROR,fatal:!1,error:new Error(`Could not remove session: ${f}`)})}).then(()=>t.close()).catch(f=>{this.log(`Could not close session: ${f}`),this.hls&&this.hls.trigger(g.ERROR,{type:ge.OTHER_ERROR,details:G.KEY_SYSTEM_DESTROY_CLOSE_SESSION_ERROR,fatal:!1,error:new Error(`Could not close session: ${f}`)})})}}}To.CDMCleanupPromise=void 0;class wa extends Error{constructor(e,t){super(t),this.data=void 0,e.error||(e.error=new Error(t)),this.data=e,e.err=e.error}}function fu(a,e){const t=a==="output-restricted",n=t?G.KEY_SYSTEM_STATUS_OUTPUT_RESTRICTED:G.KEY_SYSTEM_STATUS_INTERNAL_ERROR;return new wa({type:ge.KEY_SYSTEM_ERROR,details:n,fatal:!1,decryptdata:e},t?"HDCP level output restricted":`key status changed to "${a}"`)}class du{constructor(e){this.hls=void 0,this.isVideoPlaybackQualityAvailable=!1,this.timer=void 0,this.media=null,this.lastTime=void 0,this.lastDroppedFrames=0,this.lastDecodedFrames=0,this.streamController=void 0,this.hls=e,this.registerListeners()}setStreamController(e){this.streamController=e}registerListeners(){this.hls.on(g.MEDIA_ATTACHING,this.onMediaAttaching,this),this.hls.on(g.MEDIA_DETACHING,this.onMediaDetaching,this)}unregisterListeners(){this.hls.off(g.MEDIA_ATTACHING,this.onMediaAttaching,this),this.hls.off(g.MEDIA_DETACHING,this.onMediaDetaching,this)}destroy(){this.timer&&clearInterval(this.timer),this.unregisterListeners(),this.isVideoPlaybackQualityAvailable=!1,this.media=null}onMediaAttaching(e,t){const n=this.hls.config;if(n.capLevelOnFPSDrop){const r=t.media instanceof self.HTMLVideoElement?t.media:null;this.media=r,r&&typeof r.getVideoPlaybackQuality=="function"&&(this.isVideoPlaybackQualityAvailable=!0),self.clearInterval(this.timer),this.timer=self.setInterval(this.checkFPSInterval.bind(this),n.fpsDroppedMonitoringPeriod)}}onMediaDetaching(){this.media=null}checkFPS(e,t,n){const r=performance.now();if(t){if(this.lastTime){const i=r-this.lastTime,s=n-this.lastDroppedFrames,A=t-this.lastDecodedFrames,f=1e3*s/i,c=this.hls;if(c.trigger(g.FPS_DROP,{currentDropped:s,currentDecoded:A,totalDroppedFrames:n}),f>0&&s>c.config.fpsDroppedMonitoringThreshold*A){let m=c.currentLevel;c.logger.warn("drop FPS ratio greater than max allowed value for currentLevel: "+m),m>0&&(c.autoLevelCapping===-1||c.autoLevelCapping>=m)&&(m=m-1,c.trigger(g.FPS_DROP_LEVEL_CAPPING,{level:m,droppedLevel:c.currentLevel}),c.autoLevelCapping=m,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 Pl(a,e){let t;try{t=new Event("addtrack")}catch(n){t=document.createEvent("Event"),t.initEvent("addtrack",!1,!1)}t.track=a,e.dispatchEvent(t)}function hu(a,e){const t=a.mode;if(t==="disabled"&&(a.mode="hidden"),a.cues&&!a.cues.getCueById(e.id))try{if(a.addCue(e),!a.cues.getCueById(e.id))throw new Error(`addCue is failed for: ${e}`)}catch(n){ie.debug(`[texttrack-utils]: ${n}`);try{const r=new self.TextTrackCue(e.startTime,e.endTime,e.text);r.id=e.id,a.addCue(r)}catch(r){ie.debug(`[texttrack-utils]: Legacy TextTrackCue fallback failed: ${r}`)}}t==="disabled"&&(a.mode=t)}function Jo(a,e){const t=a.mode;if(t==="disabled"&&(a.mode="hidden"),a.cues)for(let n=a.cues.length;n--;)e&&a.cues[n].removeEventListener("enter",e),a.removeCue(a.cues[n]);t==="disabled"&&(a.mode=t)}function Ao(a,e,t,n){const r=a.mode;if(r==="disabled"&&(a.mode="hidden"),a.cues&&a.cues.length>0){const i=Is(a.cues,e,t);for(let s=0;s<i.length;s++)(!n||n(i[s]))&&a.removeCue(i[s])}r==="disabled"&&(a.mode=r)}function gu(a,e){if(e<=a[0].startTime)return 0;const t=a.length-1;if(e>a[t].endTime)return-1;let n=0,r=t,i;for(;n<=r;)if(i=Math.floor((r+n)/2),e<a[i].startTime)r=i-1;else if(e>a[i].startTime&&n<t)n=i+1;else return i;return a[n].startTime-e<e-a[r].startTime?n:r}function Is(a,e,t){const n=[],r=gu(a,e);if(r>-1)for(let i=r,s=a.length;i<s;i++){const A=a[i];if(A.startTime>=e&&A.endTime<=t)n.push(A);else if(A.startTime>t)return n}return n}function Ma(a){const e=[];for(let t=0;t<a.length;t++){const n=a[t];(n.kind==="subtitles"||n.kind==="captions")&&n.label&&e.push(a[t])}return e}class qo extends $o{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=Ma(this.media.textTracks);for(let i=0;i<n.length;i++)if(n[i].mode==="hidden")t=n[i];else if(n[i].mode==="showing"){t=n[i];break}const r=this.findTrackForTextTrack(t);this.subtitleTrack!==r&&this.setSubtitleTrack(r)},this.registerListeners()}destroy(){this.unregisterListeners(),this.tracks.length=0,this.tracksInGroup.length=0,this.currentTrack=null,this.onTextTracksChanged=this.asyncPollTrackChange=null,super.destroy()}get subtitleDisplay(){return this._subtitleDisplay}set subtitleDisplay(e){this._subtitleDisplay=e,this.trackId>-1&&this.toggleTrackModes()}registerListeners(){const{hls:e}=this;e.on(g.MEDIA_ATTACHED,this.onMediaAttached,this),e.on(g.MEDIA_DETACHING,this.onMediaDetaching,this),e.on(g.MANIFEST_LOADING,this.onManifestLoading,this),e.on(g.MANIFEST_PARSED,this.onManifestParsed,this),e.on(g.LEVEL_LOADING,this.onLevelLoading,this),e.on(g.LEVEL_SWITCHING,this.onLevelSwitching,this),e.on(g.SUBTITLE_TRACK_LOADED,this.onSubtitleTrackLoaded,this),e.on(g.ERROR,this.onError,this)}unregisterListeners(){const{hls:e}=this;e.off(g.MEDIA_ATTACHED,this.onMediaAttached,this),e.off(g.MEDIA_DETACHING,this.onMediaDetaching,this),e.off(g.MANIFEST_LOADING,this.onManifestLoading,this),e.off(g.MANIFEST_PARSED,this.onManifestParsed,this),e.off(g.LEVEL_LOADING,this.onLevelLoading,this),e.off(g.LEVEL_SWITCHING,this.onLevelSwitching,this),e.off(g.SUBTITLE_TRACK_LOADED,this.onSubtitleTrackLoaded,this),e.off(g.ERROR,this.onError,this)}onMediaAttached(e,t){this.media=t.media,this.media&&(this.queuedDefaultTrack>-1&&(this.subtitleTrack=this.queuedDefaultTrack,this.queuedDefaultTrack=-1),this.useTextTrackPolling=!(this.media.textTracks&&"onchange"in this.media.textTracks),this.useTextTrackPolling?this.pollTrackChange(500):this.media.textTracks.addEventListener("change",this.asyncPollTrackChange))}pollTrackChange(e){self.clearInterval(this.subtitlePollingInterval),this.subtitlePollingInterval=self.setInterval(this.onTextTracksChanged,e)}onMediaDetaching(e,t){const n=this.media;if(!n)return;const r=!!t.transferMedia;if(self.clearInterval(this.subtitlePollingInterval),this.useTextTrackPolling||n.textTracks.removeEventListener("change",this.asyncPollTrackChange),this.trackId>-1&&(this.queuedDefaultTrack=this.trackId),this.subtitleTrack=-1,this.media=null,r)return;Ma(n.textTracks).forEach(s=>{Jo(s)})}onManifestLoading(){this.tracks=[],this.groupIds=null,this.tracksInGroup=[],this.trackId=-1,this.currentTrack=null,this.selectDefaultTrack=!0}onManifestParsed(e,t){this.tracks=t.subtitleTracks}onSubtitleTrackLoaded(e,t){const{id:n,groupId:r,details:i}=t,s=this.tracksInGroup[n];if(!s||s.groupId!==r){this.warn(`Subtitle track with id:${n} and group:${r} not found in active group ${s==null?void 0:s.groupId}`);return}const A=s.details;s.details=t.details,this.log(`Subtitle track ${n} "${s.name}" lang:${s.lang} group:${r} loaded [${i.startSN}-${i.endSN}]`),n===this.trackId&&this.playlistLoaded(n,t,A)}onLevelLoading(e,t){this.switchLevel(t.level)}onLevelSwitching(e,t){this.switchLevel(t.level)}switchLevel(e){const t=this.hls.levels[e];if(!t)return;const n=t.subtitleGroups||null,r=this.groupIds;let i=this.currentTrack;if(!n||(r==null?void 0:r.length)!==(n==null?void 0:n.length)||n!=null&&n.some(s=>(r==null?void 0:r.indexOf(s))===-1)){this.groupIds=n,this.trackId=-1,this.currentTrack=null;const s=this.tracks.filter(m=>!n||n.indexOf(m.groupId)!==-1);if(s.length)this.selectDefaultTrack&&!s.some(m=>m.default)&&(this.selectDefaultTrack=!1),s.forEach((m,y)=>{m.id=y});else if(!i&&!this.tracksInGroup.length)return;this.tracksInGroup=s;const A=this.hls.config.subtitlePreference;if(!i&&A){this.selectDefaultTrack=!1;const m=Lt(A,s);if(m>-1)i=s[m];else{const y=Lt(A,this.tracks);i=this.tracks[y]}}let f=this.findTrackId(i);f===-1&&i&&(f=this.findTrackId(null));const c={subtitleTracks:s};this.log(`Updating subtitle tracks, ${s.length} track(s) found in "${n==null?void 0:n.join(",")}" group-id`),this.hls.trigger(g.SUBTITLE_TRACKS_UPDATED,c),f!==-1&&this.trackId===-1&&this.setSubtitleTrack(f)}}findTrackId(e){const t=this.tracksInGroup,n=this.selectDefaultTrack;for(let r=0;r<t.length;r++){const i=t[r];if(!(n&&!i.default||!n&&!e)&&(!e||on(i,e)))return r}if(e){for(let r=0;r<t.length;r++){const i=t[r];if(ks(e.attrs,i.attrs,["LANGUAGE","ASSOC-LANGUAGE","CHARACTERISTICS"]))return r}for(let r=0;r<t.length;r++){const i=t[r];if(ks(e.attrs,i.attrs,["LANGUAGE"]))return r}}return-1}findTrackForTextTrack(e){if(e){const t=this.tracksInGroup;for(let n=0;n<t.length;n++){const r=t[n];if(Bo(r,e))return n}}return-1}onError(e,t){t.fatal||!t.context||t.context.type===ye.SUBTITLE_TRACK&&t.context.id===this.trackId&&(!this.groupIds||this.groupIds.indexOf(t.context.groupId)!==-1)&&this.checkRetry(t)}get allSubtitleTracks(){return this.tracks}get subtitleTracks(){return this.tracksInGroup}get subtitleTrack(){return this.trackId}set subtitleTrack(e){this.selectDefaultTrack=!1,this.setSubtitleTrack(e)}setSubtitleOption(e){if(this.hls.config.subtitlePreference=e,e){if(e.id===-1)return this.setSubtitleTrack(-1),null;const t=this.allSubtitleTracks;if(this.selectDefaultTrack=!1,t.length){const n=this.currentTrack;if(n&&on(e,n))return n;const r=Lt(e,this.tracksInGroup);if(r>-1){const i=this.tracksInGroup[r];return this.setSubtitleTrack(r),i}else{if(n)return null;{const i=Lt(e,t);if(i>-1)return t[i]}}}}return null}loadPlaylist(e){super.loadPlaylist(),this.shouldLoadPlaylist(this.currentTrack)&&this.scheduleLoading(this.currentTrack,e)}loadingPlaylist(e,t){super.loadingPlaylist(e,t);const n=e.id,r=e.groupId,i=this.getUrlWithDirectives(e.url,t),s=e.details,A=s==null?void 0:s.age;this.log(`Loading subtitle ${n} "${e.name}" lang:${e.lang} group:${r}${(t==null?void 0:t.msn)!==void 0?" at sn "+t.msn+" part "+t.part:""}${A&&s.live?" age "+A.toFixed(1)+(s.type?" "+s.type||0:""):""} ${i}`),this.hls.trigger(g.SUBTITLE_TRACK_LOADING,{url:i,id:n,groupId:r,deliveryDirectives:t||null,track:e})}toggleTrackModes(){const{media:e}=this;if(!e)return;const t=Ma(e.textTracks),n=this.currentTrack;let r;if(n&&(r=t.filter(i=>Bo(n,i))[0],r||this.warn(`Unable to find subtitle TextTrack with name "${n.name}" and language "${n.lang}"`)),[].slice.call(t).forEach(i=>{i.mode!=="disabled"&&i!==r&&(i.mode="disabled")}),r){const i=this.subtitleDisplay?"showing":"hidden";r.mode!==i&&(r.mode=i)}}setSubtitleTrack(e){const t=this.tracksInGroup;if(!this.media){this.queuedDefaultTrack=e;return}if(e<-1||e>=t.length||!V(e)){this.warn(`Invalid subtitle track id: ${e}`);return}this.selectDefaultTrack=!1;const n=this.currentTrack,r=t[e]||null;if(this.trackId=e,this.currentTrack=r,this.toggleTrackModes(),!r){this.hls.trigger(g.SUBTITLE_TRACK_SWITCH,{id:e});return}const i=!!r.details&&!r.details.live;if(e===this.trackId&&r===n&&i)return;this.log(`Switching to subtitle-track ${e}`+(r?` "${r.name}" lang:${r.lang} group:${r.groupId}`:""));const{id:s,groupId:A="",name:f,type:c,url:m}=r;this.hls.trigger(g.SUBTITLE_TRACK_SWITCH,{id:s,groupId:A,name:f,type:c,url:m});const y=this.switchParams(r.url,n==null?void 0:n.details,r.details);this.loadPlaylist(y)}}function lo(){try{return crypto.randomUUID()}catch(a){try{const e=URL.createObjectURL(new Blob),t=e.toString();return URL.revokeObjectURL(e),t.slice(t.lastIndexOf("/")+1)}catch(e){let t=new Date().getTime();return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,r=>{const i=(t+Math.random()*16)%16|0;return t=Math.floor(t/16),(r=="x"?i:i&3|8).toString(16)})}}}function Ea(a){let e=5381,t=a.length;for(;t;)e=e*33^a.charCodeAt(--t);return(e>>>0).toString()}const Qa=.025;let Ba=function(a){return a[a.Point=0]="Point",a[a.Range=1]="Range",a}({});function pu(a,e,t){return`${a.identifier}-${t+1}-${Ea(e)}`}class mu{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 el(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=el(t,e);return t-n<.1}return!1}get resumptionOffset(){const e=this.resumeOffset,t=V(e)?e:this.duration;return this.cumulativeDuration+t}get resumeTime(){const e=this.startOffset+this.resumptionOffset;if(this.snapOptions.in){const t=this.resumeAnchor;if(t)return el(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)<Qa))}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"?Ba.Range:Ba.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 vu(this)}}function el(a,e){return a-e.start<e.duration/2&&!(Math.abs(a-(e.start+e.duration))<Qa)?e.start:e.start+e.duration}function tl(a,e,t){const n=new self.URL(a,t);return n.protocol!=="data:"&&n.searchParams.set("_HLS_primary_id",e),n}function Io(a,e){for(;(t=a.assetList[++e])!=null&&t.error;)var t;return e}function vu(a){return`["${a.identifier}" ${a.cue.pre?"<pre>":a.cue.post?"<post>":""}${a.timelineStart.toFixed(2)}-${a.resumeTime.toFixed(2)}]`}function Fo(a){const e=a.timelineStart,t=a.duration||0;return`["${a.identifier}" ${e.toFixed(2)}-${(e+t).toFixed(2)}]`}class _A{constructor(e,t,n,r){this.hls=void 0,this.interstitial=void 0,this.assetItem=void 0,this.tracks=null,this.hasDetails=!1,this.mediaAttached=null,this._currentTime=void 0,this._bufferedEosTime=void 0,this.checkPlayout=()=>{this.reachedPlayout(this.currentTime)&&this.hls&&this.hls.trigger(g.PLAYOUT_LIMIT_REACHED,{})};const i=this.hls=new e(t);this.interstitial=n,this.assetItem=r;const s=()=>{this.hasDetails=!0};i.once(g.LEVEL_LOADED,s),i.once(g.AUDIO_TRACK_LOADED,s),i.once(g.SUBTITLE_TRACK_LOADED,s),i.on(g.MEDIA_ATTACHING,(A,{media:f})=>{this.removeMediaListeners(),this.mediaAttached=f,this.interstitial.playoutLimit&&(f.addEventListener("timeupdate",this.checkPlayout),this.appendInPlace&&i.on(g.BUFFER_APPENDED,()=>{const m=this.bufferedEnd;this.reachedPlayout(m)&&(this._bufferedEosTime=m,i.trigger(g.BUFFERED_TO_END,void 0))}))})}get appendInPlace(){return this.interstitial.appendInPlace}loadSource(){const e=this.hls;if(e)if(e.url)e.levels.length&&!e.started&&e.startLoad(-1,!0);else{let t=this.assetItem.uri;try{t=tl(t,e.config.primarySessionId||"").href}catch(n){}e.loadSource(t)}}bufferedInPlaceToEnd(e){var t;if(!this.appendInPlace)return!1;if((t=this.hls)!=null&&t.bufferedToEnd)return!0;if(!e)return!1;const n=Math.min(this._bufferedEosTime||1/0,this.duration),r=this.timelineOffset,i=kn.bufferInfo(e,r,0);return this.getAssetTime(i.end)>=n-.02}reachedPlayout(e){const n=this.interstitial.playoutLimit;return this.startOffset+e>=n}get destroyed(){var e;return!((e=this.hls)!=null&&e.userConfig)}get assetId(){return this.assetItem.identifier}get interstitialId(){return this.assetItem.parentIdentifier}get media(){var e;return((e=this.hls)==null?void 0:e.media)||null}get bufferedEnd(){const e=this.media||this.mediaAttached;if(!e)return this._bufferedEosTime?this._bufferedEosTime:this.currentTime;const t=kn.bufferInfo(e,e.currentTime,.001);return this.getAssetTime(t.end)}get currentTime(){const e=this.media||this.mediaAttached;return e?this.getAssetTime(e.currentTime):this._currentTime||0}get duration(){const e=this.assetItem.duration;if(!e)return 0;const t=this.interstitial.playoutLimit;if(t){const n=t-this.startOffset;if(n>0&&n<e)return n}return e}get remaining(){const e=this.duration;return e?Math.max(0,e-this.currentTime):0}get startOffset(){return this.assetItem.startOffset}get timelineOffset(){var e;return((e=this.hls)==null?void 0:e.config.timelineOffset)||0}set timelineOffset(e){const t=this.timelineOffset;if(e!==t){const n=e-t;if(Math.abs(n)>1/9e4&&this.hls){if(this.hasDetails)throw new Error("Cannot set timelineOffset after playlists are loaded");this.hls.config.timelineOffset=e}}}getAssetTime(e){const t=this.timelineOffset,n=this.duration;return Math.min(Math.max(0,e-t),n)}removeMediaListeners(){const e=this.mediaAttached;e&&(this._currentTime=e.currentTime,this.bufferSnapShot(),e.removeEventListener("timeupdate",this.checkPlayout))}bufferSnapShot(){if(this.mediaAttached){var e;(e=this.hls)!=null&&e.bufferedToEnd&&(this._bufferedEosTime=this.bufferedEnd)}}destroy(){this.removeMediaListeners(),this.hls&&this.hls.destroy(),this.hls=null,this.tracks=this.mediaAttached=this.checkPlayout=null}attachMedia(e){var t;this.loadSource(),(t=this.hls)==null||t.attachMedia(e)}detachMedia(){var e;this.removeMediaListeners(),this.mediaAttached=null,(e=this.hls)==null||e.detachMedia()}resumeBuffering(){var e;(e=this.hls)==null||e.resumeBuffering()}pauseBuffering(){var e;(e=this.hls)==null||e.pauseBuffering()}transferMedia(){var e;return this.bufferSnapShot(),((e=this.hls)==null?void 0:e.transferMedia())||null}resetDetails(){const e=this.hls;if(e&&this.hasDetails){e.stopLoad();const t=n=>delete n.details;e.levels.forEach(t),e.allAudioTracks.forEach(t),e.allSubtitleTracks.forEach(t),this.hasDetails=!1}}on(e,t,n){var r;(r=this.hls)==null||r.on(e,t)}once(e,t,n){var r;(r=this.hls)==null||r.once(e,t)}off(e,t,n){var r;(r=this.hls)==null||r.off(e,t)}toString(){var e;return`HlsAssetPlayer: ${Fo(this.assetItem)} ${(e=this.hls)==null?void 0:e.sessionId} ${this.appendInPlace?"append-in-place":""}`}}const _u=.033;class Yu extends H{constructor(e,t){super("interstitials-sched",t),this.onScheduleUpdate=void 0,this.eventMap={},this.events=null,this.items=null,this.durations={primary:0,playout:0,integrated:0},this.onScheduleUpdate=e}destroy(){this.reset(),this.onScheduleUpdate=null}reset(){this.eventMap={},this.setDurations(0,0,0),this.events&&this.events.forEach(e=>e.reset()),this.events=this.items=null}resetErrorsInRange(e,t){return this.events?this.events.reduce((n,r)=>e<=r.startOffset&&t>r.startOffset?(delete r.error,n+1):n,0):0}get duration(){const e=this.items;return e?e[e.length-1].end:0}get length(){return this.items?this.items.length:0}getEvent(e){return e&&this.eventMap[e]||null}hasEvent(e){return e in this.eventMap}findItemIndex(e,t){if(e.event)return this.findEventIndex(e.event.identifier);let n=-1;e.nextEvent?n=this.findEventIndex(e.nextEvent.identifier)-1:e.previousEvent&&(n=this.findEventIndex(e.previousEvent.identifier)+1);const r=this.items;if(r)for(r[n]||(t===void 0&&(t=e.start),n=this.findItemIndexAtTime(t));n>=0&&(i=r[n])!=null&&i.event;){var i;n--}return n}findItemIndexAtTime(e,t){const n=this.items;if(n)for(let r=0;r<n.length;r++){let i=n[r];if(t&&t!=="primary"&&(i=i[t]),e===i.start||e>i.start&&e<i.end)return r}return-1}findJumpRestrictedIndex(e,t){const n=this.items;if(n)for(let r=e;r<=t&&n[r];r++){const i=n[r].event;if(i!=null&&i.restrictions.jump&&!i.appendInPlace)return r}return-1}findEventIndex(e){const t=this.items;if(t)for(let r=t.length;r--;){var n;if(((n=t[r].event)==null?void 0:n.identifier)===e)return r}return-1}findAssetIndex(e,t){const n=e.assetList,r=n.length;if(r>1)for(let i=0;i<r;i++){const s=n[i];if(!s.error){const A=s.timelineStart;if(t===A||t>A&&(t<A+(s.duration||0)||i===r-1))return i}}return 0}get assetIdAtEnd(){var e;const t=(e=this.items)==null||(e=e[this.length-1])==null?void 0:e.event;if(t){const n=t.assetList,r=n[n.length-1];if(r)return r.identifier}return null}parseInterstitialDateRanges(e,t){const n=e.main.details,{dateRanges:r}=n,i=this.events,s=this.parseDateRanges(r,{url:n.url},t),A=Object.keys(r),f=i?i.filter(c=>!A.includes(c.identifier)):[];s.length&&s.sort((c,m)=>{const y=c.cue.pre,B=c.cue.post,D=m.cue.pre,L=m.cue.post;if(y&&!D)return-1;if(D&&!y||B&&!L)return 1;if(L&&!B)return-1;if(!y&&!D&&!B&&!L){const se=c.startTime,X=m.startTime;if(se!==X)return se-X}return c.dateRange.tagOrder-m.dateRange.tagOrder}),this.events=s,f.forEach(c=>{this.removeEvent(c)}),this.updateSchedule(e,f)}updateSchedule(e,t=[],n=!1){const r=this.events||[];if(r.length||t.length||this.length<2){const i=this.items,s=this.parseSchedule(r,e);(n||t.length||(i==null?void 0:i.length)!==s.length||s.some((f,c)=>Math.abs(f.playout.start-i[c].playout.start)>.005||Math.abs(f.playout.end-i[c].playout.end)>.005))&&(this.items=s,this.onScheduleUpdate(t,i))}}parseDateRanges(e,t,n){const r=[],i=Object.keys(e);for(let s=0;s<i.length;s++){const A=i[s],f=e[A];if(f.isInterstitial){let c=this.eventMap[A];c?c.setDateRange(f):(c=new mu(f,t),this.eventMap[A]=c,n===!1&&(c.appendInPlace=n)),r.push(c)}}return r}parseSchedule(e,t){const n=[],r=t.main.details,i=r.live?1/0:r.edge;let s=0;if(e=e.filter(f=>!f.error&&!(f.cue.once&&f.hasPlayed)),e.length){this.resolveOffsets(e,t);let f=0,c=0;if(e.forEach((m,y)=>{const B=m.cue.pre,D=m.cue.post,L=e[y-1]||null,se=m.appendInPlace,X=D?i:m.startOffset,xe=m.duration,at=m.timelineOccupancy===Ba.Range?xe:0,We=m.resumptionOffset,Mt=(L==null?void 0:L.startTime)===X,qt=X+m.cumulativeDuration;let Dn=se?qt+xe:X+We;if(B||!D&&X<=0){const un=c;c+=at,m.timelineStart=qt;const gn=s;s+=xe,n.push({event:m,start:qt,end:Dn,playout:{start:gn,end:s},integrated:{start:un,end:c}})}else if(X<=i){if(!Mt){const Yt=X-f;if(Yt>_u){const Nn=f,Cr=c;c+=Yt;const jr=s;s+=Yt;const ni={previousEvent:e[y-1]||null,nextEvent:m,start:Nn,end:Nn+Yt,playout:{start:jr,end:s},integrated:{start:Cr,end:c}};n.push(ni)}else Yt>0&&L&&(L.cumulativeDuration+=Yt,n[n.length-1].end=X)}D&&(Dn=qt),m.timelineStart=qt;const un=c;c+=at;const gn=s;s+=xe,n.push({event:m,start:qt,end:Dn,playout:{start:gn,end:s},integrated:{start:un,end:c}})}else return;const zt=m.resumeTime;D||zt>i?f=i:f=zt}),f<i){var A;const m=f,y=c,B=i-f;c+=B;const D=s;s+=B,n.push({previousEvent:((A=n[n.length-1])==null?void 0:A.event)||null,nextEvent:null,start:f,end:m+B,playout:{start:D,end:s},integrated:{start:y,end:c}})}this.setDurations(i,s,c)}else n.push({previousEvent:null,nextEvent:null,start:0,end:i,playout:{start:0,end:i},integrated:{start:0,end:i}}),this.setDurations(i,i,i);return n}setDurations(e,t,n){this.durations={primary:e,playout:t,integrated:n}}resolveOffsets(e,t){const n=t.main.details,r=n.live?1/0:n.edge;let i=0,s=-1;e.forEach((A,f)=>{const c=A.cue.pre,m=A.cue.post,y=c?0:m?r:A.startTime;this.updateAssetDurations(A),s===y?A.cumulativeDuration=i:(i=0,s=y),!m&&A.snapOptions.in&&(A.resumeAnchor=K(null,n.fragments,A.startOffset+A.resumptionOffset,0,0)||void 0),A.appendInPlace&&!A.appendInPlaceStarted&&(this.primaryCanResumeInPlaceAt(A,t)||(A.appendInPlace=!1)),!A.appendInPlace&&f+1<e.length&&e[f+1].startTime-e[f].resumeTime<_u&&(e[f+1].appendInPlace=!1,e[f+1].appendInPlace&&this.warn(`Could not change append strategy for abutting event ${A}`));const D=V(A.resumeOffset)?A.resumeOffset:A.duration;i+=D})}primaryCanResumeInPlaceAt(e,t){const n=e.resumeTime,r=e.startTime+e.resumptionOffset;return Math.abs(n-r)>Qa?(this.log(`"${e.identifier}" resumption ${n} not aligned with estimated timeline end ${r}`),!1):!Object.keys(t).some(s=>{const A=t[s].details,f=A.edge;if(n>=f)return this.log(`"${e.identifier}" resumption ${n} past ${s} playlist end ${f}`),!1;const c=K(null,A.fragments,n);if(!c)return this.log(`"${e.identifier}" resumption ${n} does not align with any fragments in ${s} playlist (${A.fragStart}-${A.fragmentEnd})`),!0;const m=s==="audio"?.175:0;return Math.abs(c.start-n)<Qa+m||Math.abs(c.end-n)<Qa+m?!1:(this.log(`"${e.identifier}" resumption ${n} not aligned with ${s} fragment bounds (${c.start}-${c.end} sn: ${c.sn} cc: ${c.cc})`),!0)})}updateAssetDurations(e){if(!e.assetListLoaded)return;const t=e.timelineStart;let n=0,r=!1,i=!1;for(let s=0;s<e.assetList.length;s++){const A=e.assetList[s],f=t+n;A.startOffset=n,A.timelineStart=f,r||(r=A.duration===null),i||(i=!!A.error);const c=A.error?0:A.duration||0;n+=c}r&&!i?e.duration=Math.max(n,e.duration):e.duration=n}removeEvent(e){e.reset(),delete this.eventMap[e.identifier]}}function Ra(a){return`[${a.event?'"'+a.event.identifier+'"':"primary"}: ${a.start.toFixed(2)}-${a.end.toFixed(2)}]`}class Xu{constructor(e){this.hls=void 0,this.hls=e}destroy(){this.hls=null}loadAssetList(e,t){const n=e.assetListUrl;let r;try{r=tl(n,this.hls.sessionId,e.baseUrl)}catch(B){const D=this.assignAssetListError(e,G.ASSET_LIST_LOAD_ERROR,B,n);this.hls.trigger(g.ERROR,D);return}t&&r.protocol!=="data:"&&r.searchParams.set("_HLS_start_offset",""+t);const i=this.hls.config,s=i.loader,A=new s(i),f={responseType:"json",url:r.href},c=i.interstitialAssetListLoadPolicy.default,m={loadPolicy:c,timeout:c.maxLoadTimeMs,maxRetry:0,retryDelay:0,maxRetryDelay:0},y={onSuccess:(B,D,L,se)=>{const X=B.data,xe=X==null?void 0:X.ASSETS;if(!Array.isArray(xe)){const at=this.assignAssetListError(e,G.ASSET_LIST_PARSING_ERROR,new Error("Invalid interstitial asset list"),L.url,D,se);this.hls.trigger(g.ERROR,at);return}e.assetListResponse=X,this.hls.trigger(g.ASSET_LIST_LOADED,{event:e,assetListResponse:X,networkDetails:se})},onError:(B,D,L,se)=>{const X=this.assignAssetListError(e,G.ASSET_LIST_LOAD_ERROR,new Error(`Error loading X-ASSET-LIST: HTTP status ${B.code} ${B.text} (${D.url})`),D.url,se,L);this.hls.trigger(g.ERROR,X)},onTimeout:(B,D,L)=>{const se=this.assignAssetListError(e,G.ASSET_LIST_LOAD_TIMEOUT,new Error(`Timeout loading X-ASSET-LIST (${D.url})`),D.url,B,L);this.hls.trigger(g.ERROR,se)}};return A.load(f,m,y),this.hls.trigger(g.ASSET_LIST_LOADING,{event:e}),A}assignAssetListError(e,t,n,r,i,s){return e.error=n,{type:ge.NETWORK_ERROR,details:t,fatal:!1,interstitial:e,url:r,error:n,networkDetails:s,stats:i}}}function yu(a){a==null||a.play().catch(()=>{})}function eA(a,e){return`[${a}] Advancing timeline position to ${e}`}class Ju extends H{constructor(e,t){super("interstitials",e.logger),this.HlsPlayerClass=void 0,this.hls=void 0,this.assetListLoader=void 0,this.mediaSelection=null,this.altSelection=null,this.media=null,this.detachedData=null,this.requiredTracks=null,this.manager=null,this.playerQueue=[],this.bufferedPos=-1,this.timelinePos=-1,this.schedule=void 0,this.playingItem=null,this.bufferingItem=null,this.waitingItem=null,this.endedItem=null,this.playingAsset=null,this.endedAsset=null,this.bufferingAsset=null,this.shouldPlay=!1,this.onPlay=()=>{this.shouldPlay=!0},this.onPause=()=>{this.shouldPlay=!1},this.onSeeking=()=>{const n=this.currentTime;if(n===void 0||this.playbackDisabled||!this.schedule)return;const r=n-this.timelinePos;if(Math.abs(r)<1/7056e5)return;const s=r<=-.01;this.timelinePos=n,this.bufferedPos=n;const A=this.playingItem;if(!A){this.checkBuffer();return}if(s&&this.schedule.resetErrorsInRange(n,n-r)&&this.updateSchedule(!0),this.checkBuffer(),s&&n<A.start||n>=A.end){var f;const D=this.findItemIndex(A);let L=this.schedule.findItemIndexAtTime(n);if(L===-1&&(L=D+(s?-1:1),this.log(`seeked ${s?"back ":""}to position not covered by schedule ${n} (resolving from ${D} to ${L})`)),!this.isInterstitial(A)&&(f=this.media)!=null&&f.paused&&(this.shouldPlay=!1),!s&&L>D){const se=this.schedule.findJumpRestrictedIndex(D+1,L);if(se>D){this.setSchedulePosition(se);return}}this.setSchedulePosition(L);return}const c=this.playingAsset;if(!c){if(this.playingLastItem&&this.isInterstitial(A)){const D=A.event.assetList[0];D&&(this.endedItem=this.playingItem,this.playingItem=null,this.setScheduleToAssetAtTime(n,D))}return}const m=c.timelineStart,y=c.duration||0;if(s&&n<m||n>=m+y){var B;(B=A.event)!=null&&B.appendInPlace&&(this.clearInterstitial(A.event,A),this.flushFrontBuffer(n)),this.setScheduleToAssetAtTime(n,c)}},this.onTimeupdate=()=>{const n=this.currentTime;if(n===void 0||this.playbackDisabled)return;if(n>this.timelinePos)this.timelinePos=n,n>this.bufferedPos&&this.checkBuffer();else return;const r=this.playingItem;if(!r||this.playingLastItem)return;if(n>=r.end){this.timelinePos=r.end;const A=this.findItemIndex(r);this.setSchedulePosition(A+1)}const i=this.playingAsset;if(!i)return;const s=i.timelineStart+(i.duration||0);n>=s&&this.setScheduleToAssetAtTime(n,i)},this.onScheduleUpdate=(n,r)=>{const i=this.schedule;if(!i)return;const s=this.playingItem,A=i.events||[],f=i.items||[],c=i.durations,m=n.map(se=>se.identifier),y=!!(A.length||m.length);(y||r)&&this.log(`INTERSTITIALS_UPDATED (${A.length}): ${A}
|
|
Schedule: ${f.map(se=>Ra(se))} pos: ${this.timelinePos}`),m.length&&this.log(`Removed events ${m}`);let B=null,D=null;s&&(B=this.updateItem(s,this.timelinePos),this.itemsMatch(s,B)?this.playingItem=B:this.waitingItem=this.endedItem=null),this.waitingItem=this.updateItem(this.waitingItem),this.endedItem=this.updateItem(this.endedItem);const L=this.bufferingItem;if(L&&(D=this.updateItem(L,this.bufferedPos),this.itemsMatch(L,D)?this.bufferingItem=D:L.event&&(this.bufferingItem=this.playingItem,this.clearInterstitial(L.event,null))),n.forEach(se=>{se.assetList.forEach(X=>{this.clearAssetPlayer(X.identifier,null)})}),this.playerQueue.forEach(se=>{if(se.interstitial.appendInPlace){const X=se.assetItem.timelineStart,xe=se.timelineOffset-X;if(xe)try{se.timelineOffset=X}catch(at){Math.abs(xe)>Qa&&this.warn(`${at} ("${se.assetId}" ${se.timelineOffset}->${X})`)}}}),y||r){if(this.hls.trigger(g.INTERSTITIALS_UPDATED,{events:A.slice(0),schedule:f.slice(0),durations:c,removedIds:m}),this.isInterstitial(s)&&m.includes(s.event.identifier)){this.warn(`Interstitial "${s.event.identifier}" removed while playing`),this.primaryFallback(s.event);return}s&&this.trimInPlace(B,s),L&&D!==B&&this.trimInPlace(D,L),this.checkBuffer()}},this.hls=e,this.HlsPlayerClass=t,this.assetListLoader=new Xu(e),this.schedule=new Yu(this.onScheduleUpdate,e.logger),this.registerListeners()}registerListeners(){const e=this.hls;e&&(e.on(g.MEDIA_ATTACHING,this.onMediaAttaching,this),e.on(g.MEDIA_ATTACHED,this.onMediaAttached,this),e.on(g.MEDIA_DETACHING,this.onMediaDetaching,this),e.on(g.MANIFEST_LOADING,this.onManifestLoading,this),e.on(g.LEVEL_UPDATED,this.onLevelUpdated,this),e.on(g.AUDIO_TRACK_SWITCHING,this.onAudioTrackSwitching,this),e.on(g.AUDIO_TRACK_UPDATED,this.onAudioTrackUpdated,this),e.on(g.SUBTITLE_TRACK_SWITCH,this.onSubtitleTrackSwitch,this),e.on(g.SUBTITLE_TRACK_UPDATED,this.onSubtitleTrackUpdated,this),e.on(g.EVENT_CUE_ENTER,this.onInterstitialCueEnter,this),e.on(g.ASSET_LIST_LOADED,this.onAssetListLoaded,this),e.on(g.BUFFER_APPENDED,this.onBufferAppended,this),e.on(g.BUFFER_FLUSHED,this.onBufferFlushed,this),e.on(g.BUFFERED_TO_END,this.onBufferedToEnd,this),e.on(g.MEDIA_ENDED,this.onMediaEnded,this),e.on(g.ERROR,this.onError,this),e.on(g.DESTROYING,this.onDestroying,this))}unregisterListeners(){const e=this.hls;e&&(e.off(g.MEDIA_ATTACHING,this.onMediaAttaching,this),e.off(g.MEDIA_ATTACHED,this.onMediaAttached,this),e.off(g.MEDIA_DETACHING,this.onMediaDetaching,this),e.off(g.MANIFEST_LOADING,this.onManifestLoading,this),e.off(g.LEVEL_UPDATED,this.onLevelUpdated,this),e.off(g.AUDIO_TRACK_SWITCHING,this.onAudioTrackSwitching,this),e.off(g.AUDIO_TRACK_UPDATED,this.onAudioTrackUpdated,this),e.off(g.SUBTITLE_TRACK_SWITCH,this.onSubtitleTrackSwitch,this),e.off(g.SUBTITLE_TRACK_UPDATED,this.onSubtitleTrackUpdated,this),e.off(g.EVENT_CUE_ENTER,this.onInterstitialCueEnter,this),e.off(g.ASSET_LIST_LOADED,this.onAssetListLoaded,this),e.off(g.BUFFER_CODECS,this.onBufferCodecs,this),e.off(g.BUFFER_APPENDED,this.onBufferAppended,this),e.off(g.BUFFER_FLUSHED,this.onBufferFlushed,this),e.off(g.BUFFERED_TO_END,this.onBufferedToEnd,this),e.off(g.MEDIA_ENDED,this.onMediaEnded,this),e.off(g.ERROR,this.onError,this),e.off(g.DESTROYING,this.onDestroying,this))}startLoad(){this.resumeBuffering()}stopLoad(){this.pauseBuffering()}resumeBuffering(){var e;(e=this.getBufferingPlayer())==null||e.resumeBuffering()}pauseBuffering(){var e;(e=this.getBufferingPlayer())==null||e.pauseBuffering()}destroy(){this.unregisterListeners(),this.stopLoad(),this.assetListLoader&&this.assetListLoader.destroy(),this.emptyPlayerQueue(),this.clearScheduleState(),this.schedule&&this.schedule.destroy(),this.media=this.detachedData=this.mediaSelection=this.requiredTracks=this.altSelection=this.schedule=this.manager=null,this.hls=this.HlsPlayerClass=this.log=null,this.assetListLoader=null,this.onPlay=this.onPause=this.onSeeking=this.onTimeupdate=null,this.onScheduleUpdate=null}onDestroying(){const e=this.primaryMedia||this.media;e&&this.removeMediaListeners(e)}removeMediaListeners(e){ys(e,"play",this.onPlay),ys(e,"pause",this.onPause),ys(e,"seeking",this.onSeeking),ys(e,"timeupdate",this.onTimeupdate)}onMediaAttaching(e,t){const n=this.media=t.media;gs(n,"seeking",this.onSeeking),gs(n,"timeupdate",this.onTimeupdate),gs(n,"play",this.onPlay),gs(n,"pause",this.onPause)}onMediaAttached(e,t){const n=this.effectivePlayingItem,r=this.detachedData;if(this.detachedData=null,n===null)this.checkStart();else if(!r){this.clearScheduleState();const i=this.findItemIndex(n);this.setSchedulePosition(i)}}clearScheduleState(){this.log("clear schedule state"),this.playingItem=this.bufferingItem=this.waitingItem=this.endedItem=this.playingAsset=this.endedAsset=this.bufferingAsset=null}onMediaDetaching(e,t){const n=!!t.transferMedia,r=this.media;if(this.media=null,!n&&(r&&this.removeMediaListeners(r),this.detachedData)){const i=this.getBufferingPlayer();i&&(this.log(`Removing schedule state for detachedData and ${i}`),this.playingAsset=this.endedAsset=this.bufferingAsset=this.bufferingItem=this.waitingItem=this.detachedData=null,i.detachMedia()),this.shouldPlay=!1}}get interstitialsManager(){if(!this.hls)return null;if(this.manager)return this.manager;const e=this,t=()=>e.bufferingItem||e.waitingItem,n=y=>y&&e.getAssetPlayer(y.identifier),r=(y,B,D,L,se)=>{if(y){let X=y[B].start;const xe=y.event;if(xe){if(B==="playout"||xe.timelineOccupancy!==Ba.Point){const at=n(D);(at==null?void 0:at.interstitial)===xe&&(X+=at.assetItem.startOffset+at[se])}}else{const at=L==="bufferedPos"?s():e[L];X+=at-y.start}return X}return 0},i=(y,B)=>{var D;if(y!==0&&B!=="primary"&&(D=e.schedule)!=null&&D.length){var L;const se=e.schedule.findItemIndexAtTime(y),X=(L=e.schedule.items)==null?void 0:L[se];if(X){const xe=X[B].start-X.start;return y+xe}}return y},s=()=>{const y=e.bufferedPos;return y===Number.MAX_VALUE?A("primary"):Math.max(y,0)},A=y=>{var B,D;return(B=e.primaryDetails)!=null&&B.live?e.primaryDetails.edge:((D=e.schedule)==null?void 0:D.durations[y])||0},f=(y,B)=>{var D,L;const se=e.effectivePlayingItem;if(se!=null&&(D=se.event)!=null&&D.restrictions.skip||!e.schedule)return;e.log(`seek to ${y} "${B}"`);const X=e.effectivePlayingItem,xe=e.schedule.findItemIndexAtTime(y,B),at=(L=e.schedule.items)==null?void 0:L[xe],We=e.getBufferingPlayer(),Mt=We==null?void 0:We.interstitial,qt=Mt==null?void 0:Mt.appendInPlace,Dn=X&&e.itemsMatch(X,at);if(X&&(qt||Dn)){const zt=n(e.playingAsset),un=(zt==null?void 0:zt.media)||e.primaryMedia;if(un){const gn=B==="primary"?un.currentTime:r(X,B,e.playingAsset,"timelinePos","currentTime"),Yt=y-gn,Nn=(qt?gn:un.currentTime)+Yt;if(Nn>=0&&(!zt||qt||Nn<=zt.duration)){un.currentTime=Nn;return}}}if(at){let zt=y;if(B!=="primary"){const gn=at[B].start,Yt=y-gn;zt=at.start+Yt}const un=!e.isInterstitial(at);if((!e.isInterstitial(X)||X.event.appendInPlace)&&(un||at.event.appendInPlace)){const gn=e.media||(qt?We==null?void 0:We.media:null);gn&&(gn.currentTime=zt)}else if(X){const gn=e.findItemIndex(X);if(xe>gn){const Nn=e.schedule.findJumpRestrictedIndex(gn+1,xe);if(Nn>gn){e.setSchedulePosition(Nn);return}}let Yt=0;if(un)e.timelinePos=zt,e.checkBuffer();else{const Nn=at.event.assetList,Cr=y-(at[B]||at).start;for(let jr=Nn.length;jr--;){const ni=Nn[jr];if(ni.duration&&Cr>=ni.startOffset&&Cr<ni.startOffset+ni.duration){Yt=jr;break}}}e.setSchedulePosition(xe,Yt)}}},c=()=>{const y=e.effectivePlayingItem;if(e.isInterstitial(y))return y;const B=t();return e.isInterstitial(B)?B:null},m={get bufferedEnd(){const y=t(),B=e.bufferingItem;if(B&&B===y){var D;return r(B,"playout",e.bufferingAsset,"bufferedPos","bufferedEnd")-B.playout.start||((D=e.bufferingAsset)==null?void 0:D.startOffset)||0}return 0},get currentTime(){const y=c(),B=e.effectivePlayingItem;return B&&B===y?r(B,"playout",e.effectivePlayingAsset,"timelinePos","currentTime")-B.playout.start:0},set currentTime(y){const B=c(),D=e.effectivePlayingItem;D&&D===B&&f(y+D.playout.start,"playout")},get duration(){const y=c();return y?y.playout.end-y.playout.start:0},get assetPlayers(){var y;const B=(y=c())==null?void 0:y.event.assetList;return B?B.map(D=>e.getAssetPlayer(D.identifier)):[]},get playingIndex(){var y;const B=(y=c())==null?void 0:y.event;return B&&e.effectivePlayingAsset?B.findAssetIndex(e.effectivePlayingAsset):-1},get scheduleItem(){return c()}};return this.manager={get events(){var y;return((y=e.schedule)==null||(y=y.events)==null?void 0:y.slice(0))||[]},get schedule(){var y;return((y=e.schedule)==null||(y=y.items)==null?void 0:y.slice(0))||[]},get interstitialPlayer(){return c()?m:null},get playerQueue(){return e.playerQueue.slice(0)},get bufferingAsset(){return e.bufferingAsset},get bufferingItem(){return t()},get bufferingIndex(){const y=t();return e.findItemIndex(y)},get playingAsset(){return e.effectivePlayingAsset},get playingItem(){return e.effectivePlayingItem},get playingIndex(){const y=e.effectivePlayingItem;return e.findItemIndex(y)},primary:{get bufferedEnd(){return s()},get currentTime(){const y=e.timelinePos;return y>0?y:0},set currentTime(y){f(y,"primary")},get duration(){return A("primary")},get seekableStart(){var y;return((y=e.primaryDetails)==null?void 0:y.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(y){f(y,"integrated")},get duration(){return A("integrated")},get seekableStart(){var y;return i(((y=e.primaryDetails)==null?void 0:y.fragmentStart)||0,"integrated")}},skip:()=>{const y=e.effectivePlayingItem,B=y==null?void 0:y.event;if(B&&!B.restrictions.skip){const D=e.findItemIndex(y);if(B.appendInPlace){const L=y.playout.start+y.event.duration;f(L+.001,"playout")}else e.advanceAfterAssetEnded(B,D,1/0)}}}}get effectivePlayingItem(){return this.waitingItem||this.playingItem||this.endedItem}get effectivePlayingAsset(){return this.playingAsset||this.endedAsset}get playingLastItem(){var e;const t=this.playingItem,n=(e=this.schedule)==null?void 0:e.items;return!this.playbackStarted||!t||!n?!1:this.findItemIndex(t)===n.length-1}get playbackStarted(){return this.effectivePlayingItem!==null}get currentTime(){var e,t;if(this.mediaSelection===null)return;const n=this.waitingItem||this.playingItem;if(this.isInterstitial(n)&&!n.event.appendInPlace)return;let r=this.media;!r&&(e=this.bufferingItem)!=null&&(e=e.event)!=null&&e.appendInPlace&&(r=this.primaryMedia);const i=(t=r)==null?void 0:t.currentTime;if(!(i===void 0||!V(i)))return i}get primaryMedia(){var e;return this.media||((e=this.detachedData)==null?void 0:e.media)||null}isInterstitial(e){return!!(e!=null&&e.event)}retreiveMediaSource(e,t){const n=this.getAssetPlayer(e);n&&this.transferMediaFromPlayer(n,t)}transferMediaFromPlayer(e,t){const n=e.interstitial.appendInPlace,r=e.media;if(n&&r===this.primaryMedia){if(this.bufferingAsset=null,(!t||this.isInterstitial(t)&&!t.event.appendInPlace)&&t&&r){this.detachedData={media:r};return}const i=e.transferMedia();this.log(`transfer MediaSource from ${e} ${Sn(i)}`),this.detachedData=i}else t&&r&&(this.shouldPlay||(this.shouldPlay=!r.paused))}transferMediaTo(e,t){var n,r;if(e.media===t)return;let i=null;const s=this.hls,A=e!==s,f=A&&e.interstitial.appendInPlace,c=(n=this.detachedData)==null?void 0:n.mediaSource;let m;if(s.media)f&&(i=s.transferMedia(),this.detachedData=i),m="Primary";else if(c){const L=this.getBufferingPlayer();L?(i=L.transferMedia(),m=`${L}`):m="detached MediaSource"}else m="detached media";if(!i){if(c)i=this.detachedData,this.log(`using detachedData: MediaSource ${Sn(i)}`);else if(!this.detachedData||s.media===t){const L=this.playerQueue;L.length>1&&L.forEach(se=>{if(A&&se.interstitial.appendInPlace!==f){const X=se.interstitial;this.clearInterstitial(se.interstitial,null),X.appendInPlace=!1,X.appendInPlace&&this.warn(`Could not change append strategy for queued assets ${X}`)}}),this.hls.detachMedia(),this.detachedData={media:t}}}const y=i&&"mediaSource"in i&&((r=i.mediaSource)==null?void 0:r.readyState)!=="closed",B=y&&i?i:t;this.log(`${y?"transfering MediaSource":"attaching media"} to ${A?e:"Primary"} from ${m} (media.currentTime: ${t.currentTime})`);const D=this.schedule;if(B===i&&D){const L=A&&e.assetId===D.assetIdAtEnd;B.overrides={duration:D.duration,endOfStream:!A||L,cueRemoval:!A}}e.attachMedia(B)}onInterstitialCueEnter(){this.onTimeupdate()}checkStart(){const e=this.schedule,t=e==null?void 0:e.events;if(!t||this.playbackDisabled||!this.media)return;this.bufferedPos===-1&&(this.bufferedPos=0);const n=this.timelinePos,r=this.effectivePlayingItem;if(n===-1){const i=this.hls.startPosition;if(this.log(eA("checkStart",i)),this.timelinePos=i,t.length&&t[0].cue.pre){const s=e.findEventIndex(t[0].identifier);this.setSchedulePosition(s)}else if(i>=0||!this.primaryLive){const s=this.timelinePos=i>0?i:0,A=e.findItemIndexAtTime(s);this.setSchedulePosition(A)}}else if(r&&!this.playingItem){const i=e.findItemIndex(r);this.setSchedulePosition(i)}}advanceAssetBuffering(e,t){const n=e.event,r=n.findAssetIndex(t),i=Io(n,r);if(!n.isAssetPastPlayoutLimit(i))this.bufferedToEvent(e,i);else if(this.schedule){var s;const A=(s=this.schedule.items)==null?void 0:s[this.findItemIndex(e)+1];A&&this.bufferedToItem(A)}}advanceAfterAssetEnded(e,t,n){const r=Io(e,n);if(e.isAssetPastPlayoutLimit(r)){if(this.schedule){const i=this.schedule.items;if(i){const s=t+1,A=i.length;if(s>=A){this.setSchedulePosition(-1);return}const f=e.resumeTime;this.timelinePos<f&&(this.log(eA("advanceAfterAssetEnded",f)),this.timelinePos=f,e.appendInPlace&&this.advanceInPlace(f),this.checkBuffer(this.bufferedPos<f)),this.setSchedulePosition(s)}}}else{if(e.appendInPlace){const i=e.assetList[r];i&&this.advanceInPlace(i.timelineStart)}this.setSchedulePosition(t,r)}}setScheduleToAssetAtTime(e,t){const n=this.schedule;if(!n)return;const r=t.parentIdentifier,i=n.getEvent(r);if(i){const s=n.findEventIndex(r),A=n.findAssetIndex(i,e);this.advanceAfterAssetEnded(i,s,A-1)}}setSchedulePosition(e,t){var n;const r=(n=this.schedule)==null?void 0:n.items;if(!r||this.playbackDisabled)return;const i=e>=0?r[e]:null;this.log(`setSchedulePosition ${e}, ${t} (${i&&Ra(i)}) pos: ${this.timelinePos}`);const s=this.waitingItem||this.playingItem,A=this.playingLastItem;if(this.isInterstitial(s)){const m=s.event,y=this.playingAsset,B=y==null?void 0:y.identifier,D=B?this.getAssetPlayer(B):null;if(D&&B&&(!this.eventItemsMatch(s,i)||t!==void 0&&B!==m.assetList[t].identifier)){var f;const L=m.findAssetIndex(y);if(this.log(`INTERSTITIAL_ASSET_ENDED ${L+1}/${m.assetList.length} ${Fo(y)}`),this.endedAsset=y,this.playingAsset=null,this.hls.trigger(g.INTERSTITIAL_ASSET_ENDED,{asset:y,assetListIndex:L,event:m,schedule:r.slice(0),scheduleIndex:e,player:D}),s!==this.playingItem){this.itemsMatch(s,this.playingItem)&&!this.playingAsset&&this.advanceAfterAssetEnded(m,this.findItemIndex(this.playingItem),L);return}this.retreiveMediaSource(B,i),D.media&&!((f=this.detachedData)!=null&&f.mediaSource)&&D.detachMedia()}if(!this.eventItemsMatch(s,i)&&(this.endedItem=s,this.playingItem=null,this.log(`INTERSTITIAL_ENDED ${m} ${Ra(s)}`),m.hasPlayed=!0,this.hls.trigger(g.INTERSTITIAL_ENDED,{event:m,schedule:r.slice(0),scheduleIndex:e}),m.cue.once)){var c;this.updateSchedule();const L=(c=this.schedule)==null?void 0:c.items;if(i&&L){const se=this.findItemIndex(i);this.advanceSchedule(se,L,t,s,A)}return}}this.advanceSchedule(e,r,t,s,A)}advanceSchedule(e,t,n,r,i){const s=this.schedule;if(!s)return;const A=t[e]||null,f=this.primaryMedia,c=this.playerQueue;if(c.length&&c.forEach(m=>{const y=m.interstitial,B=s.findEventIndex(y.identifier);(B<e||B>e+1)&&this.clearInterstitial(y,A)}),this.isInterstitial(A)){this.timelinePos=Math.min(Math.max(this.timelinePos,A.start),A.end);const m=A.event;if(n===void 0){n=s.findAssetIndex(m,this.timelinePos);const L=Io(m,n-1);if(m.isAssetPastPlayoutLimit(L)||m.appendInPlace&&this.timelinePos===A.end){this.advanceAfterAssetEnded(m,e,n);return}n=L}const y=this.waitingItem;this.assetsBuffered(A,f)||this.setBufferingItem(A);let B=this.preloadAssets(m,n);if(this.eventItemsMatch(A,y||r)||(this.waitingItem=A,this.log(`INTERSTITIAL_STARTED ${Ra(A)} ${m.appendInPlace?"append in place":""}`),this.hls.trigger(g.INTERSTITIAL_STARTED,{event:m,schedule:t.slice(0),scheduleIndex:e})),!m.assetListLoaded){this.log(`Waiting for ASSET-LIST to complete loading ${m}`);return}if(m.assetListLoader&&(m.assetListLoader.destroy(),m.assetListLoader=void 0),!f){this.log(`Waiting for attachMedia to start Interstitial ${m}`);return}this.waitingItem=this.endedItem=null,this.playingItem=A;const D=m.assetList[n];if(!D){this.advanceAfterAssetEnded(m,e,n||0);return}if(B||(B=this.getAssetPlayer(D.identifier)),B===null||B.destroyed){const L=m.assetList.length;this.warn(`asset ${n+1}/${L} player destroyed ${m}`),B=this.createAssetPlayer(m,D,n),B.loadSource()}if(!this.eventItemsMatch(A,this.bufferingItem)&&m.appendInPlace&&this.isAssetBuffered(D))return;this.startAssetPlayer(B,n,t,e,f),this.shouldPlay&&yu(B.media)}else A?(this.resumePrimary(A,e,r),this.shouldPlay&&yu(this.hls.media)):i&&this.isInterstitial(r)&&(this.endedItem=null,this.playingItem=r,r.event.appendInPlace||this.attachPrimary(s.durations.primary,null))}get playbackDisabled(){return this.hls.config.enableInterstitialPlayback===!1}get primaryDetails(){var e;return(e=this.mediaSelection)==null?void 0:e.main.details}get primaryLive(){var e;return!!((e=this.primaryDetails)!=null&&e.live)}resumePrimary(e,t,n){var r,i;if(this.playingItem=e,this.playingAsset=this.endedAsset=null,this.waitingItem=this.endedItem=null,this.bufferedToItem(e),this.log(`resuming ${Ra(e)}`),!((r=this.detachedData)!=null&&r.mediaSource)){let A=this.timelinePos;(A<e.start||A>=e.end)&&(A=this.getPrimaryResumption(e,t),this.log(eA("resumePrimary",A)),this.timelinePos=A),this.attachPrimary(A,e)}if(!n)return;const s=(i=this.schedule)==null?void 0:i.items;s&&(this.log(`INTERSTITIALS_PRIMARY_RESUMED ${Ra(e)}`),this.hls.trigger(g.INTERSTITIALS_PRIMARY_RESUMED,{schedule:s.slice(0),scheduleIndex:t}),this.checkBuffer())}getPrimaryResumption(e,t){const n=e.start;if(this.primaryLive){const r=this.primaryDetails;if(t===0)return this.hls.startPosition;if(r&&(n<r.fragmentStart||n>r.edge))return this.hls.liveSyncPosition||-1}return n}isAssetBuffered(e){const t=this.getAssetPlayer(e.identifier);return t!=null&&t.hls?t.hls.bufferedToEnd:kn.bufferInfo(this.primaryMedia,this.timelinePos,0).end+1>=e.timelineStart+(e.duration||0)}attachPrimary(e,t,n){t?this.setBufferingItem(t):this.bufferingItem=this.playingItem,this.bufferingAsset=null;const r=this.primaryMedia;if(!r)return;const i=this.hls;i.media?this.checkBuffer():(this.transferMediaTo(i,r),n&&this.startLoadingPrimaryAt(e,n)),n||(this.log(eA("attachPrimary",e)),this.timelinePos=e,this.startLoadingPrimaryAt(e,n))}startLoadingPrimaryAt(e,t){var n;const r=this.hls;!r.loadingEnabled||!r.media||Math.abs((((n=r.mainForwardBufferInfo)==null?void 0:n.start)||r.media.currentTime)-e)>.5?r.startLoad(e,t):r.bufferingEnabled||r.resumeBuffering()}onManifestLoading(){var e;this.stopLoad(),(e=this.schedule)==null||e.reset(),this.emptyPlayerQueue(),this.clearScheduleState(),this.shouldPlay=!1,this.bufferedPos=this.timelinePos=-1,this.mediaSelection=this.altSelection=this.manager=this.requiredTracks=null,this.hls.off(g.BUFFER_CODECS,this.onBufferCodecs,this),this.hls.on(g.BUFFER_CODECS,this.onBufferCodecs,this)}onLevelUpdated(e,t){if(t.level===-1||!this.schedule)return;const n=this.hls.levels[t.level],r=b(b({},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=b(b({},this.altSelection),{},{audio:n});return}const i=b(b({},r),{},{audio:n});this.mediaSelection=i}onSubtitleTrackUpdated(e,t){const n=this.hls.subtitleTracks[t.id],r=this.mediaSelection;if(!r){this.altSelection=b(b({},this.altSelection),{},{subtitles:n});return}const i=b(b({},r),{},{subtitles:n});this.mediaSelection=i}onAudioTrackSwitching(e,t){const n=Qt(t);this.playerQueue.forEach(({hls:r})=>r&&(r.setAudioOption(t)||r.setAudioOption(n)))}onSubtitleTrackSwitch(e,t){const n=Qt(t);this.playerQueue.forEach(({hls:r})=>r&&(r.setSubtitleOption(t)||t.id!==-1&&r.setSubtitleOption(n)))}onBufferCodecs(e,t){const n=t.tracks;n&&(this.requiredTracks=n)}onBufferAppended(e,t){this.checkBuffer()}onBufferFlushed(e,t){const n=this.playingItem;if(n&&!this.itemsMatch(n,this.bufferingItem)&&!this.isInterstitial(n)){const r=this.timelinePos;this.bufferedPos=r,this.checkBuffer()}}onBufferedToEnd(e){if(!this.schedule)return;const t=this.schedule.events;if(this.bufferedPos<Number.MAX_VALUE&&t){for(let r=0;r<t.length;r++){const i=t[r];if(i.cue.post){var n;const s=this.schedule.findEventIndex(i.identifier),A=(n=this.schedule.items)==null?void 0:n[s];this.isInterstitial(A)&&this.eventItemsMatch(A,this.bufferingItem)&&this.bufferedToItem(A,0);break}}this.bufferedPos=Number.MAX_VALUE}}onMediaEnded(e){const t=this.playingItem;if(!this.playingLastItem&&t){const n=this.findItemIndex(t);this.setSchedulePosition(n+1)}else this.shouldPlay=!1}updateItem(e,t){var n;const r=(n=this.schedule)==null?void 0:n.items;if(e&&r){const i=this.findItemIndex(e,t);return r[i]||null}return null}trimInPlace(e,t){if(this.isInterstitial(e)&&e.event.appendInPlace&&t.end-e.end>.25){e.event.assetList.forEach((i,s)=>{e.event.isAssetPastPlayoutLimit(s)&&this.clearAssetPlayer(i.identifier,null)});const n=e.end+.25,r=kn.bufferInfo(this.primaryMedia,n,0);(r.end>n||(r.nextStart||0)>n)&&(this.log(`trim buffered interstitial ${Ra(e)} (was ${Ra(t)})`),this.attachPrimary(n,null,!0),this.flushFrontBuffer(n))}}itemsMatch(e,t){return!!t&&(e===t||e.event&&t.event&&this.eventItemsMatch(e,t)||!e.event&&!t.event&&this.findItemIndex(e)===this.findItemIndex(t))}eventItemsMatch(e,t){var n;return!!t&&(e===t||e.event.identifier===((n=t.event)==null?void 0:n.identifier))}findItemIndex(e,t){return e&&this.schedule?this.schedule.findItemIndex(e,t):-1}updateSchedule(e=!1){var t;const n=this.mediaSelection;n&&((t=this.schedule)==null||t.updateSchedule(n,[],e))}checkBuffer(e){var t;const n=(t=this.schedule)==null?void 0:t.items;if(!n)return;const r=kn.bufferInfo(this.primaryMedia,this.timelinePos,0);e&&(this.bufferedPos=this.timelinePos),e||(e=r.len<1),this.updateBufferedPos(r.end,n,e)}updateBufferedPos(e,t,n){const r=this.schedule,i=this.bufferingItem;if(this.bufferedPos>e||!r)return;if(t.length===1&&this.itemsMatch(t[0],i)){this.bufferedPos=e;return}const s=this.playingItem,A=this.findItemIndex(s);let f=r.findItemIndexAtTime(e);if(this.bufferedPos<e){var c;const m=this.findItemIndex(i),y=Math.min(m+1,t.length-1),B=t[y];if((f===-1&&i&&e>=i.end||(c=B.event)!=null&&c.appendInPlace&&e+.01>=B.start)&&(f=y),this.isInterstitial(i)){const D=i.event;if(y-A>1&&D.appendInPlace===!1||D.assetList.length===0&&D.assetListLoader)return}if(this.bufferedPos=e,f>m&&f>A)this.bufferedToItem(B);else{const D=this.primaryDetails;this.primaryLive&&D&&e>D.edge-D.targetduration&&B.start<D.edge+this.hls.config.interstitialLiveLookAhead&&this.isInterstitial(B)&&this.preloadAssets(B.event,0)}}else n&&s&&!this.itemsMatch(s,i)&&(f===A?this.bufferedToItem(s):f===A+1&&this.bufferedToItem(t[f]))}assetsBuffered(e,t){return e.event.assetList.length===0?!1:!e.event.assetList.some(r=>{const i=this.getAssetPlayer(r.identifier);return!(i!=null&&i.bufferedInPlaceToEnd(t))})}setBufferingItem(e){const t=this.bufferingItem,n=this.schedule;if(!this.itemsMatch(e,t)&&n){const{items:r,events:i}=n;if(!r||!i)return t;const s=this.isInterstitial(e),A=this.getBufferingPlayer();this.bufferingItem=e,this.bufferedPos=Math.max(e.start,Math.min(e.end,this.timelinePos));const f=A?A.remaining:t?t.end-this.timelinePos:0;if(this.log(`INTERSTITIALS_BUFFERED_TO_BOUNDARY ${Ra(e)}`+(t?` (${f.toFixed(2)} remaining)`:"")),!this.playbackDisabled)if(s){const c=n.findAssetIndex(e.event,this.bufferedPos);e.event.assetList.forEach((m,y)=>{const B=this.getAssetPlayer(m.identifier);B&&(y===c&&B.loadSource(),B.resumeBuffering())})}else this.hls.resumeBuffering(),this.playerQueue.forEach(c=>c.pauseBuffering());this.hls.trigger(g.INTERSTITIALS_BUFFERED_TO_BOUNDARY,{events:i.slice(0),schedule:r.slice(0),bufferingIndex:this.findItemIndex(e),playingIndex:this.findItemIndex(this.playingItem)})}else this.bufferingItem!==e&&(this.bufferingItem=e);return t}bufferedToItem(e,t=0){const n=this.setBufferingItem(e);if(!this.playbackDisabled){if(this.isInterstitial(e))this.bufferedToEvent(e,t);else if(n!==null){this.bufferingAsset=null;const r=this.detachedData;r?r.mediaSource?this.attachPrimary(e.start,e,!0):this.preloadPrimary(e):this.preloadPrimary(e)}}}preloadPrimary(e){const t=this.findItemIndex(e),n=this.getPrimaryResumption(e,t);this.startLoadingPrimaryAt(n)}bufferedToEvent(e,t){const n=e.event,r=n.assetList.length===0&&!n.assetListLoader,i=n.cue.once;if(r||!i){const s=this.preloadAssets(n,t);if(s!=null&&s.interstitial.appendInPlace){const A=this.primaryMedia;A&&this.bufferAssetPlayer(s,A)}}}preloadAssets(e,t){const n=e.assetUrl,r=e.assetList.length,i=r===0&&!e.assetListLoader,s=e.cue.once;if(i){const f=e.timelineStart;if(e.appendInPlace){var A;const B=this.playingItem;!this.isInterstitial(B)&&(B==null||(A=B.nextEvent)==null?void 0:A.identifier)===e.identifier&&this.flushFrontBuffer(f+.25)}let c,m=0;if(!this.playingItem&&this.primaryLive&&(m=this.hls.startPosition,m===-1&&(m=this.hls.liveSyncPosition||0)),m&&!(e.cue.pre||e.cue.post)){const B=m-f;B>0&&(c=Math.round(B*1e3)/1e3)}if(this.log(`Load interstitial asset ${t+1}/${n?1:r} ${e}${c?` live-start: ${m} start-offset: ${c}`:""}`),n)return this.createAsset(e,0,0,f,e.duration,n);const y=this.assetListLoader.loadAssetList(e,c);y&&(e.assetListLoader=y)}else if(!s&&r){for(let c=t;c<r;c++){const m=e.assetList[c],y=this.getAssetPlayerQueueIndex(m.identifier);(y===-1||this.playerQueue[y].destroyed)&&!m.error&&this.createAssetPlayer(e,m,c)}const f=e.assetList[t];if(f){const c=this.getAssetPlayer(f.identifier);return c&&c.loadSource(),c}}return null}flushFrontBuffer(e){const t=this.requiredTracks;if(!t)return;this.log(`Removing front buffer starting at ${e}`),Object.keys(t).forEach(r=>{this.hls.trigger(g.BUFFER_FLUSHING,{startOffset:e,endOffset:1/0,type:r})})}getAssetPlayerQueueIndex(e){const t=this.playerQueue;for(let n=0;n<t.length;n++)if(e===t[n].assetId)return n;return-1}getAssetPlayer(e){const t=this.getAssetPlayerQueueIndex(e);return this.playerQueue[t]||null}getBufferingPlayer(){const{playerQueue:e,primaryMedia:t}=this;if(t){for(let n=0;n<e.length;n++)if(e[n].media===t)return e[n]}return null}createAsset(e,t,n,r,i,s){const A={parentIdentifier:e.identifier,identifier:pu(e,s,t),duration:i,startOffset:n,timelineStart:r,uri:s};return this.createAssetPlayer(e,A,t)}createAssetPlayer(e,t,n){const r=this.hls,i=r.userConfig;let s=i.videoPreference;const A=r.loadLevelObj||r.levels[r.currentLevel];(s||A)&&(s=_({},s),A.videoCodec&&(s.videoCodec=A.videoCodec),A.videoRange&&(s.allowedVideoRanges=[A.videoRange]));const f=r.audioTracks[r.audioTrack],c=r.subtitleTracks[r.subtitleTrack];let m=0;if(this.primaryLive||e.appendInPlace){const Mt=this.timelinePos-t.timelineStart;if(Mt>1){const qt=t.duration;qt&&Mt<qt&&(m=Mt)}}const y=t.identifier,B=b(b({},i),{},{maxMaxBufferLength:Math.min(180,r.config.maxMaxBufferLength),autoStartLoad:!0,startFragPrefetch:!0,primarySessionId:r.sessionId,assetPlayerId:y,abrEwmaDefaultEstimate:r.bandwidthEstimate,interstitialsController:void 0,startPosition:m,liveDurationInfinity:!1,testBandwidth:!1,videoPreference:s,audioPreference:f||i.audioPreference,subtitlePreference:c||i.subtitlePreference});e.appendInPlace&&(e.appendInPlaceStarted=!0,t.timelineStart&&(B.timelineOffset=t.timelineStart));const D=B.cmcd;D!=null&&D.sessionId&&D.contentId&&(B.cmcd=_({},D,{contentId:Ea(t.uri)})),this.getAssetPlayer(y)&&this.warn(`Duplicate date range identifier ${e} and asset ${y}`);const L=new _A(this.HlsPlayerClass,B,e,t);this.playerQueue.push(L),e.assetList[n]=t;let se=!0;const X=Mt=>{if(Mt.live){var qt;const un=new Error(`Interstitials MUST be VOD assets ${e}`),gn={fatal:!0,type:ge.OTHER_ERROR,details:G.INTERSTITIAL_ASSET_ITEM_ERROR,error:un},Yt=((qt=this.schedule)==null?void 0:qt.findEventIndex(e.identifier))||-1;this.handleAssetItemError(gn,e,Yt,n,un.message);return}const Dn=Mt.edge-Mt.fragmentStart,zt=t.duration;(se||zt===null||Dn>zt)&&(se=!1,this.log(`Interstitial asset "${y}" duration change ${zt} > ${Dn}`),t.duration=Dn,this.updateSchedule())};L.on(g.LEVEL_UPDATED,(Mt,{details:qt})=>X(qt)),L.on(g.LEVEL_PTS_UPDATED,(Mt,{details:qt})=>X(qt)),L.on(g.EVENT_CUE_ENTER,()=>this.onInterstitialCueEnter());const xe=(Mt,qt)=>{const Dn=this.getAssetPlayer(y);if(Dn&&qt.tracks){Dn.off(g.BUFFER_CODECS,xe),Dn.tracks=qt.tracks;const zt=this.primaryMedia;this.bufferingAsset===Dn.assetItem&&zt&&!Dn.media&&this.bufferAssetPlayer(Dn,zt)}};L.on(g.BUFFER_CODECS,xe);const at=()=>{var Mt;const qt=this.getAssetPlayer(y);if(this.log(`buffered to end of asset ${qt}`),!qt||!this.schedule)return;const Dn=this.schedule.findEventIndex(e.identifier),zt=(Mt=this.schedule.items)==null?void 0:Mt[Dn];this.isInterstitial(zt)&&this.advanceAssetBuffering(zt,t)};L.on(g.BUFFERED_TO_END,at);const We=Mt=>()=>{if(!this.getAssetPlayer(y)||!this.schedule)return;this.shouldPlay=!0;const Dn=this.schedule.findEventIndex(e.identifier);this.advanceAfterAssetEnded(e,Dn,Mt)};return L.once(g.MEDIA_ENDED,We(n)),L.once(g.PLAYOUT_LIMIT_REACHED,We(1/0)),L.on(g.ERROR,(Mt,qt)=>{if(!this.schedule)return;const Dn=this.getAssetPlayer(y);if(qt.details===G.BUFFER_STALLED_ERROR){if(Dn!=null&&Dn.appendInPlace){this.handleInPlaceStall(e);return}this.onTimeupdate(),this.checkBuffer(!0);return}this.handleAssetItemError(qt,e,this.schedule.findEventIndex(e.identifier),n,`Asset player error ${qt.error} ${e}`)}),L.on(g.DESTROYING,()=>{if(!this.getAssetPlayer(y)||!this.schedule)return;const qt=new Error(`Asset player destroyed unexpectedly ${y}`),Dn={fatal:!0,type:ge.OTHER_ERROR,details:G.INTERSTITIAL_ASSET_ITEM_ERROR,error:qt};this.handleAssetItemError(Dn,e,this.schedule.findEventIndex(e.identifier),n,qt.message)}),this.log(`INTERSTITIAL_ASSET_PLAYER_CREATED ${Fo(t)}`),this.hls.trigger(g.INTERSTITIAL_ASSET_PLAYER_CREATED,{asset:t,assetListIndex:n,event:e,player:L}),L}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){const r=this.playerQueue[n];this.log(`clear ${r} toSegment: ${t&&Ra(t)}`),this.transferMediaFromPlayer(r,t),this.playerQueue.splice(n,1),r.destroy()}}emptyPlayerQueue(){let e;for(;e=this.playerQueue.pop();)e.destroy();this.playerQueue=[]}startAssetPlayer(e,t,n,r,i){const{interstitial:s,assetItem:A,assetId:f}=e,c=s.assetList.length,m=this.playingAsset;this.endedAsset=null,this.playingAsset=A,(!m||m.identifier!==f)&&(m&&(this.clearAssetPlayer(m.identifier,n[r]),delete m.error),this.log(`INTERSTITIAL_ASSET_STARTED ${t+1}/${c} ${Fo(A)}`),this.hls.trigger(g.INTERSTITIAL_ASSET_STARTED,{asset:A,assetListIndex:t,event:s,schedule:n.slice(0),scheduleIndex:r,player:e})),this.bufferAssetPlayer(e,i)}bufferAssetPlayer(e,t){var n,r;if(!this.schedule)return;const{interstitial:i,assetItem:s}=e,A=this.schedule.findEventIndex(i.identifier),f=(n=this.schedule.items)==null?void 0:n[A];if(!f)return;e.loadSource(),this.setBufferingItem(f),this.bufferingAsset=s;const c=this.getBufferingPlayer();if(c===e)return;const m=i.appendInPlace;if(m&&(c==null?void 0:c.interstitial.appendInPlace)===!1)return;const y=(c==null?void 0:c.tracks)||((r=this.detachedData)==null?void 0:r.tracks)||this.requiredTracks;if(m&&s!==this.playingAsset){if(!e.tracks){this.log(`Waiting for track info before buffering ${e}`);return}if(y&&!Te(y,e.tracks)){const B=new Error(`Asset ${Fo(s)} SourceBuffer tracks ('${Object.keys(e.tracks)}') are not compatible with primary content tracks ('${Object.keys(y)}')`),D={fatal:!0,type:ge.OTHER_ERROR,details:G.INTERSTITIAL_ASSET_ITEM_ERROR,error:B},L=i.findAssetIndex(s);this.handleAssetItemError(D,i,A,L,B.message);return}}this.transferMediaTo(e,t)}handleInPlaceStall(e){const t=this.schedule,n=this.primaryMedia;if(!t||!n)return;const r=n.currentTime,i=t.findAssetIndex(e,r),s=e.assetList[i];if(s){const A=this.getAssetPlayer(s.identifier);if(A){const f=A.currentTime||r-s.timelineStart,c=A.duration-f;if(this.warn(`Stalled at ${f} of ${f+c} in ${A} ${e} (media.currentTime: ${r})`),f&&(c/n.playbackRate<.5||A.bufferedInPlaceToEnd(n))&&A.hls){const m=t.findEventIndex(e.identifier);this.advanceAfterAssetEnded(e,m,i)}}}}advanceInPlace(e){const t=this.primaryMedia;t&&t.currentTime<e&&(t.currentTime=e)}handleAssetItemError(e,t,n,r,i){if(e.details===G.BUFFER_STALLED_ERROR)return;const s=t.assetList[r]||null;if(this.warn(`INTERSTITIAL_ASSET_ERROR ${s&&Fo(s)} ${e.error}`),!this.schedule)return;const A=(s==null?void 0:s.identifier)||"",f=this.getAssetPlayerQueueIndex(A),c=this.playerQueue[f]||null,m=this.schedule.items,y=_({},e,{fatal:!1,errorAction:lt(!0),asset:s,assetListIndex:r,event:t,schedule:m,scheduleIndex:n,player:c});if(this.hls.trigger(g.INTERSTITIAL_ASSET_ERROR,y),!e.fatal)return;const B=this.playingAsset,D=this.bufferingAsset,L=new Error(i);if(s&&(this.clearAssetPlayer(A,null),s.error=L),!t.assetList.some(se=>!se.error))t.error=L;else for(let se=r;se<t.assetList.length;se++)this.resetAssetPlayer(t.assetList[se].identifier);this.updateSchedule(!0),t.error?this.primaryFallback(t):B&&B.identifier===A?this.advanceAfterAssetEnded(t,n,r):D&&D.identifier===A&&this.isInterstitial(this.bufferingItem)&&this.advanceAssetBuffering(this.bufferingItem,D)}primaryFallback(e){const t=e.timelineStart,n=this.effectivePlayingItem;if(n){this.log(`Fallback to primary from event "${e.identifier}" start: ${t} pos: ${this.timelinePos} playing: ${Ra(n)} error: ${e.error}`);let r=this.timelinePos;r===-1&&(r=this.hls.startPosition);const i=this.updateItem(n,r);if(this.itemsMatch(n,i)&&this.clearInterstitial(e,null),e.appendInPlace&&(this.attachPrimary(t,null),this.flushFrontBuffer(t)),!this.schedule)return;const s=this.schedule.findItemIndexAtTime(r);this.setSchedulePosition(s)}else this.checkStart()}onAssetListLoaded(e,t){var n,r;const i=t.event,s=i.identifier,A=t.assetListResponse.ASSETS;if(!((n=this.schedule)!=null&&n.hasEvent(s)))return;const f=i.timelineStart,c=i.duration;let m=0;A.forEach((se,X)=>{const xe=parseFloat(se.DURATION);this.createAsset(i,X,m,f+m,xe,se.URI),m+=xe}),i.duration=m,this.log(`Loaded asset-list with duration: ${m} (was: ${c}) ${i}`);const y=this.waitingItem,B=(y==null?void 0:y.event.identifier)===s;this.updateSchedule();const D=(r=this.bufferingItem)==null?void 0:r.event;if(B){var L;const se=this.schedule.findEventIndex(s),X=(L=this.schedule.items)==null?void 0:L[se];if(X){if(!this.playingItem&&this.timelinePos>X.end&&this.schedule.findItemIndexAtTime(this.timelinePos)!==se){i.error=new Error(`Interstitial no longer within playback range ${this.timelinePos} ${i}`),this.updateSchedule(!0),this.primaryFallback(i);return}this.setBufferingItem(X)}this.setSchedulePosition(se)}else if((D==null?void 0:D.identifier)===s){const se=i.assetList[0];if(se){const X=this.getAssetPlayer(se.identifier);if(D.appendInPlace){const xe=this.primaryMedia;X&&xe&&this.bufferAssetPlayer(X,xe)}else X&&X.loadSource()}}}onError(e,t){if(this.schedule)switch(t.details){case G.ASSET_LIST_PARSING_ERROR:case G.ASSET_LIST_LOAD_ERROR:case G.ASSET_LIST_LOAD_TIMEOUT:{const n=t.interstitial;n&&(this.updateSchedule(!0),this.primaryFallback(n));break}case G.BUFFER_STALLED_ERROR:{const n=this.endedItem||this.waitingItem||this.playingItem;if(this.isInterstitial(n)&&n.event.appendInPlace){this.handleInPlaceStall(n.event);return}this.log(`Primary player stall @${this.timelinePos} bufferedPos: ${this.bufferedPos}`),this.onTimeupdate(),this.checkBuffer(!0);break}}}}const wu=500;class qu extends sa{constructor(e,t,n){super(e,t,n,"subtitle-stream-controller",le.SUBTITLE),this.currentTrackId=-1,this.tracksBuffered=[],this.mainDetails=null,this.registerListeners()}onHandlerDestroying(){this.unregisterListeners(),super.onHandlerDestroying(),this.mainDetails=null}registerListeners(){super.registerListeners();const{hls:e}=this;e.on(g.LEVEL_LOADED,this.onLevelLoaded,this),e.on(g.SUBTITLE_TRACKS_UPDATED,this.onSubtitleTracksUpdated,this),e.on(g.SUBTITLE_TRACK_SWITCH,this.onSubtitleTrackSwitch,this),e.on(g.SUBTITLE_TRACK_LOADED,this.onSubtitleTrackLoaded,this),e.on(g.SUBTITLE_FRAG_PROCESSED,this.onSubtitleFragProcessed,this),e.on(g.BUFFER_FLUSHING,this.onBufferFlushing,this)}unregisterListeners(){super.unregisterListeners();const{hls:e}=this;e.off(g.LEVEL_LOADED,this.onLevelLoaded,this),e.off(g.SUBTITLE_TRACKS_UPDATED,this.onSubtitleTracksUpdated,this),e.off(g.SUBTITLE_TRACK_SWITCH,this.onSubtitleTrackSwitch,this),e.off(g.SUBTITLE_TRACK_LOADED,this.onSubtitleTrackLoaded,this),e.off(g.SUBTITLE_FRAG_PROCESSED,this.onSubtitleFragProcessed,this),e.off(g.BUFFER_FLUSHING,this.onBufferFlushing,this)}startLoad(e,t){this.stopLoad(),this.state=Fn.IDLE,this.setInterval(wu),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)||(Ve(n)&&(this.fragPrevious=n),this.state=Fn.IDLE),!r)return;const i=this.tracksBuffered[this.currentTrackId];if(!i)return;let s;const A=n.start;for(let c=0;c<i.length;c++)if(A>=i[c].start&&A<=i[c].end){s=i[c];break}const f=n.start+n.duration;s?s.end=f:(s={start:A,end:f},i.push(s)),this.fragmentTracker.fragBuffered(n),this.fragBufferedComplete(n,null),this.media&&this.tick()}onBufferFlushing(e,t){const{startOffset:n,endOffset:r}=t;if(n===0&&r!==Number.POSITIVE_INFINITY){const i=r-1;if(i<=0)return;t.endOffsetSubtitles=Math.max(0,i),this.tracksBuffered.forEach(s=>{for(let A=0;A<s.length;){if(s[A].end<=i){s.shift();continue}else if(s[A].start<i)s[A].start=i;else break;A++}}),this.fragmentTracker.removeFragmentsInRange(n,i,le.SUBTITLE)}}onError(e,t){const n=t.frag;(n==null?void 0:n.type)===le.SUBTITLE&&(t.details===G.FRAG_GAP&&this.fragmentTracker.fragBuffered(n,!0),this.fragCurrent&&this.fragCurrent.abortRequests(),this.state!==Fn.STOPPED&&(this.state=Fn.IDLE))}onSubtitleTracksUpdated(e,{subtitleTracks:t}){if(this.levels&&VA(this.levels,t)){this.levels=t.map(n=>new vn(n));return}this.tracksBuffered=[],this.levels=t.map(n=>{const r=new vn(n);return this.tracksBuffered[r.id]=[],r}),this.fragmentTracker.removeFragmentsInRange(0,Number.POSITIVE_INFINITY,le.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!==Fn.STOPPED&&this.setInterval(wu)}onSubtitleTrackLoaded(e,t){var n;const{currentTrackId:r,levels:i}=this,{details:s,id:A}=t;if(!i){this.warn(`Subtitle tracks were reset while loading level ${A}`);return}const f=i[A];if(A>=i.length||!f)return;this.log(`Subtitle track ${A} loaded [${s.startSN},${s.endSN}]${s.lastPartSn?`[part-${s.lastPartSn}-${s.lastPartIndex}]`:""},duration:${s.totalduration}`),this.mediaBuffer=this.mediaBufferTimeRanges;let c=0;if(s.live||(n=f.details)!=null&&n.live){if(s.deltaUpdateFailed)return;const y=this.mainDetails;if(!y){this.startFragRequested=!1;return}const B=y.fragments[0];if(!f.details)s.hasProgramDateTime&&y.hasProgramDateTime?(Ts(s,y),c=s.fragmentStart):B&&(c=B.start,Rs(s,c));else{var m;c=this.alignPlaylists(s,f.details,(m=this.levelLastLoaded)==null?void 0:m.details),c===0&&B&&(c=B.start,Rs(s,c))}y&&!this.startFragRequested&&this.setStartPosition(y,c)}f.details=s,this.levelLastLoaded=f,A===r&&(this.hls.trigger(g.SUBTITLE_TRACK_UPDATED,{details:s,id:A,groupId:t.groupId}),this.tick(),s.live&&!this.fragCurrent&&this.media&&this.state===Fn.IDLE&&(K(null,s.fragments,this.media.currentTime,0)||(this.warn("Subtitle playlist not aligned with playback"),f.details=void 0)))}_handleFragmentLoadComplete(e){const{frag:t,payload:n}=e,r=t.decryptdata,i=this.hls;if(!this.fragContextChanged(t)&&n&&n.byteLength>0&&r!=null&&r.key&&r.iv&&Pi(r.method)){const s=performance.now();this.decrypter.decrypt(new Uint8Array(n),r.key.buffer,r.iv.buffer,ai(r.method)).catch(A=>{throw i.trigger(g.ERROR,{type:ge.MEDIA_ERROR,details:G.FRAG_DECRYPT_ERROR,fatal:!1,error:A,reason:A.message,frag:t}),A}).then(A=>{const f=performance.now();i.trigger(g.FRAG_DECRYPTED,{frag:t,payload:A,stats:{tstart:s,tdecrypt:f}})}).catch(A=>{this.warn(`${A.name}: ${A.message}`),this.state=Fn.IDLE})}}doTick(){if(!this.media){this.state=Fn.IDLE;return}if(this.state===Fn.IDLE){const{currentTrackId:e,levels:t}=this,n=t==null?void 0:t[e];if(!n||!t.length||!n.details||this.waitForLive(n))return;const{config:r}=this,i=this.getLoadPosition(),s=kn.bufferedInfo(this.tracksBuffered[this.currentTrackId]||[],i,r.maxBufferHole),{end:A,len:f}=s,c=n.details,m=this.hls.maxBufferLength+c.levelTargetDuration;if(f>m)return;const y=c.fragments,B=y.length,D=c.edge;let L=null;const se=this.fragPrevious;if(A<D){const at=r.maxFragLookUpTolerance,We=A>D-at?0:at;L=K(se,y,Math.max(y[0].start,A),We),!L&&se&&se.start<y[0].start&&(L=y[0])}else L=y[B-1];if(L=this.filterReplacedPrimary(L,n.details),!L)return;const X=L.sn-c.startSN,xe=y[X-1];if(xe&&xe.cc===L.cc&&this.fragmentTracker.getState(xe)===dt.NOT_LOADED&&(L=xe),this.fragmentTracker.getState(L)===dt.NOT_LOADED){const at=this.mapToInitFragWhenRequired(L);at&&this.loadFragment(at,n,A)}}}loadFragment(e,t,n){Ve(e)?super.loadFragment(e,t,n):this._loadInitSegment(e,t)}get mediaBufferTimeRanges(){return new ec(this.tracksBuffered[this.currentTrackId]||[])}}class ec{constructor(e){this.buffered=void 0;const t=(n,r,i)=>{if(r=r>>>0,r>i-1)throw new DOMException(`Failed to execute '${n}' on 'TimeRanges': The index provided (${r}) is greater than the maximum bound (${i})`);return e[r][n]};this.buffered={get length(){return e.length},end(n){return t("end",n,e.length)},start(n){return t("start",n,e.length)}}}}const tc={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},nl=a=>String.fromCharCode(tc[a]||a),da=15,Na=100,nc={17:1,18:3,21:5,22:7,23:9,16:11,19:12,20:14},rc={17:2,18:4,21:6,22:8,23:10,19:13,20:15},Eu={25:1,26:3,29:5,30:7,31:9,24:11,27:12,28:14},ic={25:2,26:4,29:6,30:8,31:10,27:13,28:15},sc=["white","green","blue","cyan","red","yellow","magenta","black","transparent"];class ac{constructor(){this.time=null,this.verboseLevel=0}log(e,t){if(this.verboseLevel>=e){const n=typeof t=="function"?t():t;ie.log(`${this.time} [${e}] ${n}`)}}}const Do=function(e){const t=[];for(let n=0;n<e.length;n++)t.push(e[n].toString(16));return t};class Bu{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 Ml{constructor(){this.uchar=" ",this.penState=new Bu}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 oc{constructor(e){this.chars=[],this.pos=0,this.currPenState=new Bu,this.cueStartTime=null,this.logger=void 0;for(let t=0;t<Na;t++)this.chars.push(new Ml);this.logger=e}equals(e){for(let t=0;t<Na;t++)if(!this.chars[t].equals(e.chars[t]))return!1;return!0}copy(e){for(let t=0;t<Na;t++)this.chars[t].copy(e.chars[t])}isEmpty(){let e=!0;for(let t=0;t<Na;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>Na&&(this.logger.log(3,"Too large cursor position "+this.pos),this.pos=Na)}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=nl(e);if(this.pos>=Na){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<Na;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<Na;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 yA{constructor(e){this.rows=[],this.currRow=da-1,this.nrRollUpRows=null,this.lastOutputScreen=null,this.logger=void 0;for(let t=0;t<da;t++)this.rows.push(new oc(e));this.logger=e}reset(){for(let e=0;e<da;e++)this.rows[e].clear();this.currRow=da-1}equals(e){let t=!0;for(let n=0;n<da;n++)if(!this.rows[n].equals(e.rows[n])){t=!1;break}return t}copy(e){for(let t=0;t<da;t++)this.rows[t].copy(e.rows[t])}isEmpty(){let e=!0;for(let t=0;t<da;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 = "+Sn(e));let t=e.row-1;if(this.nrRollUpRows&&t<this.nrRollUpRows-1&&(t=this.nrRollUpRows-1),this.nrRollUpRows&&this.currRow!==t){for(let A=0;A<da;A++)this.rows[A].clear();const i=this.currRow+1-this.nrRollUpRows,s=this.lastOutputScreen;if(s){const A=s.rows[i].cueStartTime,f=this.logger.time;if(A!==null&&f!==null&&A<f)for(let c=0;c<this.nrRollUpRows;c++)this.rows[t-this.nrRollUpRows+c+1].copy(s.rows[i+c])}}this.currRow=t;const n=this.rows[this.currRow];if(e.indent!==null){const i=e.indent,s=Math.max(i-1,0);n.setCursor(e.indent),e.color=n.chars[s].penState.foreground}const r={foreground:e.color,underline:e.underline,italics:e.italics,background:"black",flash:!1};this.setPen(r)}setBkgData(e){this.logger.log(2,()=>"bkgData = "+Sn(e)),this.backSpace(),this.setPen(e),this.insertChar(32)}setRollUpRows(e){this.nrRollUpRows=e}rollUp(){if(this.nrRollUpRows===null){this.logger.log(3,"roll_up but nrRollUpRows not set yet");return}this.logger.log(1,()=>this.getDisplayText());const e=this.currRow+1-this.nrRollUpRows,t=this.rows.splice(e,1)[0];t.clear(),this.rows.splice(this.currRow,0,t),this.logger.log(2,"Rolling up")}getDisplayText(e){e=e||!1;const t=[];let n="",r=-1;for(let i=0;i<da;i++){const s=this.rows[i].getTextString();s&&(r=i+1,e?t.push("Row "+r+": '"+s+"'"):t.push(s.trim()))}return t.length>0&&(e?n="["+t.join(" | ")+"]":n=t.join(`
|
|
`)),n}getTextAndFormat(){return this.rows}}class bu{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 yA(n),this.nonDisplayedMemory=new yA(n),this.lastOutputScreen=new yA(n),this.currRollUpRow=this.displayedMemory.rows[da-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[da-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: "+Sn(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 kr{constructor(e,t,n){this.channels=void 0,this.currentChannel=0,this.cmdHistory=ba(),this.logger=void 0;const r=this.logger=new ac;this.channels=[null,new bu(e,t,r),new bu(e+1,n,r)]}getHandler(e){return this.channels[e].getHandler()}setHandler(e,t){this.channels[e].setHandler(t)}addData(e,t){this.logger.time=e;for(let n=0;n<t.length;n+=2){const r=t[n]&127,i=t[n+1]&127;let s=!1,A=null;if(r===0&&i===0)continue;this.logger.log(3,()=>"["+Do([t[n],t[n+1]])+"] -> ("+Do([r,i])+")");const f=this.cmdHistory;if(r>=16&&r<=31){if(rl(r,i,f)){ja(null,null,f),this.logger.log(3,()=>"Repeated command ("+Do([r,i])+") is dropped");continue}ja(r,i,this.cmdHistory),s=this.parseCmd(r,i),s||(s=this.parseMidrow(r,i)),s||(s=this.parsePAC(r,i)),s||(s=this.parseBackgroundAttributes(r,i))}else ja(null,null,f);if(!s&&(A=this.parseChars(r,i),A)){const m=this.currentChannel;m&&m>0?this.channels[m].insertChars(A):this.logger.log(2,"No channel found yet. TEXT-MODE?")}!s&&!A&&this.logger.log(2,()=>"Couldn't parse cleaned data "+Do([r,i])+" orig: "+Do([t[n],t[n+1]]))}}parseCmd(e,t){const n=(e===20||e===28||e===21||e===29)&&t>=32&&t<=47,r=(e===23||e===31)&&t>=33&&t<=35;if(!(n||r))return!1;const i=e===20||e===21||e===23?1:2,s=this.channels[i];return e===20||e===21||e===28||e===29?t===32?s.ccRCL():t===33?s.ccBS():t===34?s.ccAOF():t===35?s.ccAON():t===36?s.ccDER():t===37?s.ccRU(2):t===38?s.ccRU(3):t===39?s.ccRU(4):t===40?s.ccFON():t===41?s.ccRDC():t===42?s.ccTR():t===43?s.ccRTD():t===44?s.ccEDM():t===45?s.ccCR():t===46?s.ccENM():t===47&&s.ccEOC():s.ccTO(t-32),this.currentChannel=i,!0}parseMidrow(e,t){let n=0;if((e===17||e===25)&&t>=32&&t<=47){if(e===17?n=1:n=2,n!==this.currentChannel)return this.logger.log(0,"Mismatch channel in midrow parsing"),!1;const r=this.channels[n];return r?(r.ccMIDROW(t),this.logger.log(3,()=>"MIDROW ("+Do([e,t])+")"),!0):!1}return!1}parsePAC(e,t){let n;const r=(e>=17&&e<=23||e>=25&&e<=31)&&t>=64&&t<=127,i=(e===16||e===24)&&t>=64&&t<=95;if(!(r||i))return!1;const s=e<=23?1:2;t>=64&&t<=95?n=s===1?nc[e]:Eu[e]:n=s===1?rc[e]:ic[e];const A=this.channels[s];return A?(A.setPAC(this.interpretPAC(n,t)),this.currentChannel=s,!0):!1}interpretPAC(e,t){let n;const r={color:null,italics:!1,indent:null,underline:!1,row:e};return t>95?n=t-96:n=t-64,r.underline=(n&1)===1,n<=13?r.color=["white","green","blue","cyan","red","yellow","magenta","white"][Math.floor(n/2)]:n<=15?(r.italics=!0,r.color="white"):r.indent=Math.floor((n-16)/2)*4,r}parseChars(e,t){let n,r=null,i=null;if(e>=25?(n=2,i=e-8):(n=1,i=e),i>=17&&i<=19){let s;i===17?s=t+80:i===18?s=t+112:s=t+144,this.logger.log(2,()=>"Special char '"+nl(s)+"' in channel "+n),r=[s]}else e>=32&&e<=127&&(r=t===0?[e]:[e,t]);return r&&this.logger.log(3,()=>"Char codes = "+Do(r).join(",")),r}parseBackgroundAttributes(e,t){const n=(e===16||e===24)&&t>=32&&t<=47,r=(e===23||e===31)&&t>=45&&t<=47;if(!(n||r))return!1;let i;const s={};e===16||e===24?(i=Math.floor((t-32)/2),s.background=sc[i],t%2===1&&(s.background=s.background+"_semi")):t===45?s.background="transparent":(s.foreground="black",t===47&&(s.underline=!0));const A=e<=23?1:2;return this.channels[A].setBkgData(s),!0}reset(){for(let e=0;e<Object.keys(this.channels).length;e++){const t=this.channels[e];t&&t.reset()}ja(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 ja(a,e,t){t.a=a,t.b=e}function rl(a,e,t){return t.a===a&&t.b===e}function ba(){return{a:null,b:null}}var Ql=function(){if($r!=null&&$r.VTTCue)return self.VTTCue;const a=["","lr","rl"],e=["start","middle","end","left","right"];function t(A,f){if(typeof f!="string"||!Array.isArray(A))return!1;const c=f.toLowerCase();return~A.indexOf(c)?c:!1}function n(A){return t(a,A)}function r(A){return t(e,A)}function i(A,...f){let c=1;for(;c<arguments.length;c++){const m=arguments[c];for(const y in m)A[y]=m[y]}return A}function s(A,f,c){const m=this,y={enumerable:!0};m.hasBeenReset=!1;let B="",D=!1,L=A,se=f,X=c,xe=null,at="",We=!0,Mt="auto",qt="start",Dn=50,zt="middle",un=50,gn="middle";Object.defineProperty(m,"id",i({},y,{get:function(){return B},set:function(Yt){B=""+Yt}})),Object.defineProperty(m,"pauseOnExit",i({},y,{get:function(){return D},set:function(Yt){D=!!Yt}})),Object.defineProperty(m,"startTime",i({},y,{get:function(){return L},set:function(Yt){if(typeof Yt!="number")throw new TypeError("Start time must be set to a number.");L=Yt,this.hasBeenReset=!0}})),Object.defineProperty(m,"endTime",i({},y,{get:function(){return se},set:function(Yt){if(typeof Yt!="number")throw new TypeError("End time must be set to a number.");se=Yt,this.hasBeenReset=!0}})),Object.defineProperty(m,"text",i({},y,{get:function(){return X},set:function(Yt){X=""+Yt,this.hasBeenReset=!0}})),Object.defineProperty(m,"region",i({},y,{get:function(){return xe},set:function(Yt){xe=Yt,this.hasBeenReset=!0}})),Object.defineProperty(m,"vertical",i({},y,{get:function(){return at},set:function(Yt){const Nn=n(Yt);if(Nn===!1)throw new SyntaxError("An invalid or illegal string was specified.");at=Nn,this.hasBeenReset=!0}})),Object.defineProperty(m,"snapToLines",i({},y,{get:function(){return We},set:function(Yt){We=!!Yt,this.hasBeenReset=!0}})),Object.defineProperty(m,"line",i({},y,{get:function(){return Mt},set:function(Yt){if(typeof Yt!="number"&&Yt!=="auto")throw new SyntaxError("An invalid number or illegal string was specified.");Mt=Yt,this.hasBeenReset=!0}})),Object.defineProperty(m,"lineAlign",i({},y,{get:function(){return qt},set:function(Yt){const Nn=r(Yt);if(!Nn)throw new SyntaxError("An invalid or illegal string was specified.");qt=Nn,this.hasBeenReset=!0}})),Object.defineProperty(m,"position",i({},y,{get:function(){return Dn},set:function(Yt){if(Yt<0||Yt>100)throw new Error("Position must be between 0 and 100.");Dn=Yt,this.hasBeenReset=!0}})),Object.defineProperty(m,"positionAlign",i({},y,{get:function(){return zt},set:function(Yt){const Nn=r(Yt);if(!Nn)throw new SyntaxError("An invalid or illegal string was specified.");zt=Nn,this.hasBeenReset=!0}})),Object.defineProperty(m,"size",i({},y,{get:function(){return un},set:function(Yt){if(Yt<0||Yt>100)throw new Error("Size must be between 0 and 100.");un=Yt,this.hasBeenReset=!0}})),Object.defineProperty(m,"align",i({},y,{get:function(){return gn},set:function(Yt){const Nn=r(Yt);if(!Nn)throw new SyntaxError("An invalid or illegal string was specified.");gn=Nn,this.hasBeenReset=!0}})),m.displayState=void 0}return s.prototype.getCueAsHTML=function(){return self.WebVTT.convertCueToDOMTree(self,this.text)},s}();class rs{decode(e,t){if(!e)return"";if(typeof e!="string")throw new Error("Error - expected string data.");return decodeURIComponent(encodeURIComponent(e))}}function ps(a){function e(n,r,i,s){return(n|0)*3600+(r|0)*60+(i|0)+parseFloat(s||0)}const t=a.match(/^(?:(\d+):)?(\d{2}):(\d{2})(\.\d+)?/);return t?parseFloat(t[2])>59?e(t[2],t[3],0,t[4]):e(t[1],t[2],t[3],t[4]):null}class il{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 Cu(a,e,t,n){const r=n?a.split(n):[a];for(const i in r){if(typeof r[i]!="string")continue;const s=r[i].split(t);if(s.length!==2)continue;const A=s[0],f=s[1];e(A,f)}}const tA=new Ql(0,0,""),sl=tA.align==="middle"?"middle":"center";function al(a,e,t){const n=a;function r(){const A=ps(a);if(A===null)throw new Error("Malformed timestamp: "+n);return a=a.replace(/^[^\sa-zA-Z-]+/,""),A}function i(A,f){const c=new il;Cu(A,function(B,D){let L;switch(B){case"region":for(let se=t.length-1;se>=0;se--)if(t[se].id===D){c.set(B,t[se].region);break}break;case"vertical":c.alt(B,D,["rl","lr"]);break;case"line":L=D.split(","),c.integer(B,L[0]),c.percent(B,L[0])&&c.set("snapToLines",!1),c.alt(B,L[0],["auto"]),L.length===2&&c.alt("lineAlign",L[1],["start",sl,"end"]);break;case"position":L=D.split(","),c.percent(B,L[0]),L.length===2&&c.alt("positionAlign",L[1],["start",sl,"end","line-left","line-right","auto"]);break;case"size":c.percent(B,D);break;case"align":c.alt(B,D,["start",sl,"end","left","right"]);break}},/:/,/\s/),f.region=c.get("region",null),f.vertical=c.get("vertical","");let m=c.get("line","auto");m==="auto"&&tA.line===-1&&(m=-1),f.line=m,f.lineAlign=c.get("lineAlign","start"),f.snapToLines=c.get("snapToLines",!0),f.size=c.get("size",100),f.align=c.get("align",sl);let y=c.get("position","auto");y==="auto"&&tA.position===50&&(y=f.align==="start"||f.align==="left"?0:f.align==="end"||f.align==="right"?100:50),f.position=y}function s(){a=a.replace(/^\s+/,"")}if(s(),e.startTime=r(),s(),a.slice(0,3)!=="-->")throw new Error("Malformed time stamp (time stamps must be separated by '-->'): "+n);a=a.slice(3),s(),e.endTime=r(),s(),i(a,e)}function xu(a){return a.replace(/<br(?: \/)?>/gi,`
|
|
`)}class Ac{constructor(){this.state="INITIAL",this.buffer="",this.decoder=new rs,this.regionList=[],this.cue=null,this.oncue=void 0,this.onparsingerror=void 0,this.onflush=void 0}parse(e){const t=this;e&&(t.buffer+=t.decoder.decode(e,{stream:!0}));function n(){let i=t.buffer,s=0;for(i=xu(i);s<i.length&&i[s]!=="\r"&&i[s]!==`
|
|
`;)++s;const A=i.slice(0,s);return i[s]==="\r"&&++s,i[s]===`
|
|
`&&++s,t.buffer=i.slice(s),A}function r(i){Cu(i,function(s,A){},/:/)}try{let i="";if(t.state==="INITIAL"){if(!/\r\n|\n/.test(t.buffer))return this;i=n();const A=i.match(/^()?WEBVTT([ \t].*)?$/);if(!(A!=null&&A[0]))throw new Error("Malformed WebVTT signature.");t.state="HEADER"}let s=!1;for(;t.buffer;){if(!/\r\n|\n/.test(t.buffer))return this;switch(s?s=!1:i=n(),t.state){case"HEADER":/:/.test(i)?r(i):i||(t.state="ID");continue;case"NOTE":i||(t.state="ID");continue;case"ID":if(/^NOTE($|[ \t])/.test(i)){t.state="NOTE";break}if(!i)continue;if(t.cue=new Ql(0,0,""),t.state="CUE",i.indexOf("-->")===-1){t.cue.id=i;continue}case"CUE":if(!t.cue){t.state="BADCUE";continue}try{al(i,t.cue,t.regionList)}catch(A){t.cue=null,t.state="BADCUE";continue}t.state="CUETEXT";continue;case"CUETEXT":{const A=i.indexOf("-->")!==-1;if(!i||A&&(s=!0)){t.oncue&&t.cue&&t.oncue(t.cue),t.cue=null,t.state="ID";continue}if(t.cue===null)continue;t.cue.text&&(t.cue.text+=`
|
|
`),t.cue.text+=i}continue;case"BADCUE":i||(t.state="ID")}}}catch(i){t.state==="CUETEXT"&&t.cue&&t.oncue&&t.oncue(t.cue),t.cue=null,t.state=t.state==="INITIAL"?"BADWEBVTT":"BADCUE"}return this}flush(){const e=this;try{if((e.cue||e.state==="HEADER")&&(e.buffer+=`
|
|
|
|
`,e.parse()),e.state==="INITIAL"||e.state==="BADWEBVTT")throw new Error("Malformed WebVTT signature.")}catch(t){e.onparsingerror&&e.onparsingerror(t)}return e.onflush&&e.onflush(),this}}const Su=/\r\n|\n\r|\n|\r/g,Nl=function(e,t,n=0){return e.slice(n,n+t.length)===t},Tu=function(e){let t=parseInt(e.slice(-3));const n=parseInt(e.slice(-6,-4)),r=parseInt(e.slice(-9,-7)),i=e.length>9?parseInt(e.substring(0,e.indexOf(":"))):0;if(!V(t)||!V(n)||!V(r)||!V(i))throw Error(`Malformed X-TIMESTAMP-MAP: Local:${e}`);return t+=1e3*n,t+=60*1e3*r,t+=60*60*1e3*i,t};function Hl(a,e,t){return Ea(a.toString())+Ea(e.toString())+Ea(t)}const Iu=function(e,t,n){let r=e[t],i=e[r.prevCC];if(!i||!i.new&&r.new){e.ccOffset=e.presentationOffset=r.start,r.new=!1;return}for(;(s=i)!=null&&s.new;){var s;e.ccOffset+=r.start-i.start,r.new=!1,r=i,i=e[r.prevCC]}e.presentationOffset=n};function Fu(a,e,t,n,r,i,s){const A=new Ac,f=Re(new Uint8Array(a)).trim().replace(Su,`
|
|
`).split(`
|
|
`),c=[],m=e?OA(e.baseTime,e.timescale):0;let y="00:00.000",B=0,D=0,L,se=!0;A.oncue=function(X){const xe=t[n];let at=t.ccOffset;const We=(B-m)/9e4;if(xe!=null&&xe.new&&(D!==void 0?at=t.ccOffset=xe.start:Iu(t,n,We)),We){if(!e){L=new Error("Missing initPTS for VTT MPEGTS");return}at=We-t.presentationOffset}const Mt=X.endTime-X.startTime,qt=aa((X.startTime+at-D)*9e4,r*9e4)/9e4;X.startTime=Math.max(qt,0),X.endTime=Math.max(qt+Mt,0);const Dn=X.text.trim();X.text=decodeURIComponent(encodeURIComponent(Dn)),X.id||(X.id=Hl(X.startTime,X.endTime,Dn)),X.endTime>0&&c.push(X)},A.onparsingerror=function(X){L=X},A.onflush=function(){if(L){s(L);return}i(c)},f.forEach(X=>{if(se)if(Nl(X,"X-TIMESTAMP-MAP=")){se=!1,X.slice(16).split(",").forEach(xe=>{Nl(xe,"LOCAL:")?y=xe.slice(6):Nl(xe,"MPEGTS:")&&(B=parseInt(xe.slice(7)))});try{D=Tu(y)/1e3}catch(xe){L=xe}return}else X===""&&(se=!1);A.parse(X+`
|
|
`)}),A.flush()}const wA="stpp.ttml.im1t",Kl=/^(\d{2,}):(\d{2}):(\d{2}):(\d{2})\.?(\d+)?$/,Du=/^(\d*(?:\.\d*)?)(h|m|s|ms|f|t)$/,Ru={left:"start",center:"center",right:"end",start:"start",end:"end"};function Lu(a,e,t,n){const r=j(new Uint8Array(a),["mdat"]);if(r.length===0){n(new Error("Could not parse IMSC1 mdat"));return}const i=r.map(A=>Re(A)),s=jl(e.baseTime,1,e.timescale);try{i.forEach(A=>t(lc(A,s)))}catch(A){n(A)}}function lc(a,e){const r=new DOMParser().parseFromString(a,"text/xml").getElementsByTagName("tt")[0];if(!r)throw new Error("Invalid ttml");const i={frameRate:30,subFrameRate:1,frameRateMultiplier:0,tickRate:0},s=Object.keys(i).reduce((y,B)=>(y[B]=r.getAttribute(`ttp:${B}`)||i[B],y),{}),A=r.getAttribute("xml:space")!=="preserve",f=EA(Gl(r,"styling","style")),c=EA(Gl(r,"layout","region")),m=Gl(r,"body","[begin]");return[].map.call(m,y=>{const B=ha(y,A);if(!B||!y.hasAttribute("begin"))return null;const D=$l(y.getAttribute("begin"),s),L=$l(y.getAttribute("dur"),s);let se=$l(y.getAttribute("end"),s);if(D===null)throw ku(y);if(se===null){if(L===null)throw ku(y);se=D+L}const X=new Ql(D-e,se-e,B);X.id=Hl(X.startTime,X.endTime,X.text);const xe=c[y.getAttribute("region")],at=f[y.getAttribute("style")],We=Uu(xe,at,f),{textAlign:Mt}=We;if(Mt){const qt=Ru[Mt];qt&&(X.lineAlign=qt),X.align=Mt}return _(X,We),X}).filter(y=>y!==null)}function Gl(a,e,t){const n=a.getElementsByTagName(e)[0];return n?[].slice.call(n.querySelectorAll(t)):[]}function EA(a){return a.reduce((e,t)=>{const n=t.getAttribute("xml:id");return n&&(e[n]=t),e},{})}function ha(a,e){return[].slice.call(a.childNodes).reduce((t,n,r)=>{var i;return n.nodeName==="br"&&r?t+`
|
|
`:(i=n.childNodes)!=null&&i.length?ha(n,e):e?t+n.textContent.trim().replace(/\s+/g," "):t+n.textContent},"")}function Uu(a,e,t){const n="http://www.w3.org/ns/ttml#styling";let r=null;const i=["displayAlign","textAlign","color","backgroundColor","fontSize","fontFamily"],s=a!=null&&a.hasAttribute("style")?a.getAttribute("style"):null;return s&&t.hasOwnProperty(s)&&(r=t[s]),i.reduce((A,f)=>{const c=nA(e,n,f)||nA(a,n,f)||nA(r,n,f);return c&&(A[f]=c),A},{})}function nA(a,e,t){return a&&a.hasAttributeNS(e,t)?a.getAttributeNS(e,t):null}function ku(a){return new Error(`Could not parse ttml timestamp ${a}`)}function $l(a,e){if(!a)return null;let t=ps(a);return t===null&&(Kl.test(a)?t=Zl(a,e):Du.test(a)&&(t=rA(a,e))),t}function Zl(a,e){const t=Kl.exec(a),n=(t[4]|0)+(t[5]|0)/e.subFrameRate;return(t[1]|0)*3600+(t[2]|0)*60+(t[3]|0)+n/e.frameRate}function rA(a,e){const t=Du.exec(a),n=Number(t[1]);switch(t[2]){case"h":return n*3600;case"m":return n*60;case"ms":return n*1e3;case"f":return n/e.frameRate;case"t":return n/e.tickRate}return n}class Ro{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 uc{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=Vl(),this.captionsProperties=void 0,this.hls=e,this.config=e.config,this.Cues=e.config.cueHandler,this.captionsProperties={textTrack1:{label:this.config.captionsTextTrack1Label,languageCode:this.config.captionsTextTrack1LanguageCode},textTrack2:{label:this.config.captionsTextTrack2Label,languageCode:this.config.captionsTextTrack2LanguageCode},textTrack3:{label:this.config.captionsTextTrack3Label,languageCode:this.config.captionsTextTrack3LanguageCode},textTrack4:{label:this.config.captionsTextTrack4Label,languageCode:this.config.captionsTextTrack4LanguageCode}},e.on(g.MEDIA_ATTACHING,this.onMediaAttaching,this),e.on(g.MEDIA_DETACHING,this.onMediaDetaching,this),e.on(g.MANIFEST_LOADING,this.onManifestLoading,this),e.on(g.MANIFEST_LOADED,this.onManifestLoaded,this),e.on(g.SUBTITLE_TRACKS_UPDATED,this.onSubtitleTracksUpdated,this),e.on(g.FRAG_LOADING,this.onFragLoading,this),e.on(g.FRAG_LOADED,this.onFragLoaded,this),e.on(g.FRAG_PARSING_USERDATA,this.onFragParsingUserdata,this),e.on(g.FRAG_DECRYPTED,this.onFragDecrypted,this),e.on(g.INIT_PTS_FOUND,this.onInitPtsFound,this),e.on(g.SUBTITLE_TRACKS_CLEARED,this.onSubtitleTracksCleared,this),e.on(g.BUFFER_FLUSHING,this.onBufferFlushing,this)}destroy(){const{hls:e}=this;e.off(g.MEDIA_ATTACHING,this.onMediaAttaching,this),e.off(g.MEDIA_DETACHING,this.onMediaDetaching,this),e.off(g.MANIFEST_LOADING,this.onManifestLoading,this),e.off(g.MANIFEST_LOADED,this.onManifestLoaded,this),e.off(g.SUBTITLE_TRACKS_UPDATED,this.onSubtitleTracksUpdated,this),e.off(g.FRAG_LOADING,this.onFragLoading,this),e.off(g.FRAG_LOADED,this.onFragLoaded,this),e.off(g.FRAG_PARSING_USERDATA,this.onFragParsingUserdata,this),e.off(g.FRAG_DECRYPTED,this.onFragDecrypted,this),e.off(g.INIT_PTS_FOUND,this.onInitPtsFound,this),e.off(g.SUBTITLE_TRACKS_CLEARED,this.onSubtitleTracksCleared,this),e.off(g.BUFFER_FLUSHING,this.onBufferFlushing,this),this.hls=this.config=this.media=null,this.cea608Parser1=this.cea608Parser2=void 0}initCea608Parsers(){const e=new Ro(this,"textTrack1"),t=new Ro(this,"textTrack2"),n=new Ro(this,"textTrack3"),r=new Ro(this,"textTrack4");this.cea608Parser1=new kr(1,e,t),this.cea608Parser2=new kr(3,n,r)}addCues(e,t,n,r,i){let s=!1;for(let A=i.length;A--;){const f=i[A],c=cc(f[0],f[1],t,n);if(c>=0&&(f[0]=Math.min(f[0],t),f[1]=Math.max(f[1],n),s=!0,c/(n-t)>.5))return}if(s||i.push([t,n]),this.config.renderTextTracksNatively){const A=this.captionsTracks[e];this.Cues.newCue(A,t,n,r)}else{const A=this.Cues.newCue(null,t,n,r);this.hls.trigger(g.CUES_PARSED,{type:"captions",cues:A,track:e})}}onInitPtsFound(e,{frag:t,id:n,initPTS:r,timescale:i,trackId:s}){const{unparsedVttFrags:A}=this;n===le.MAIN&&(this.initPTS[t.cc]={baseTime:r,timescale:i,trackId:s}),A.length&&(this.unparsedVttFrags=[],A.forEach(f=>{this.initPTS[f.frag.cc]?this.onFragLoaded(g.FRAG_LOADED,f):this.hls.trigger(g.SUBTITLE_FRAG_PROCESSED,{success:!1,frag:f.frag,error:new Error("Subtitle discontinuity domain does not match main")})}))}getExistingTrack(e,t){const{media:n}=this;if(n)for(let r=0;r<n.textTracks.length;r++){const i=n.textTracks[r];if(Ou(i,{name:e,lang:t,characteristics:"transcribes-spoken-dialog,describes-music-and-sound"}))return i}return null}createCaptionsTrack(e){this.config.renderTextTracksNatively?this.createNativeTrack(e):this.createNonNativeTrack(e)}createNativeTrack(e){if(this.captionsTracks[e])return;const{captionsProperties:t,captionsTracks:n,media:r}=this,{label:i,languageCode:s}=t[e],A=this.getExistingTrack(i,s);if(A)n[e]=A,Jo(n[e]),Pl(n[e],r);else{const f=this.createTextTrack("captions",i,s);f&&(f[e]=!0,n[e]=f)}}createNonNativeTrack(e){if(this.nonNativeCaptionsTracks[e])return;const t=this.captionsProperties[e];if(!t)return;const n=t.label,r={_id:e,label:n,kind:"captions",default:t.media?!!t.media.default:!1,closedCaptions:t.media};this.nonNativeCaptionsTracks[e]=r,this.hls.trigger(g.NON_NATIVE_TEXT_TRACKS_FOUND,{tracks:[r]})}createTextTrack(e,t,n){const r=this.media;if(r)return r.addTextTrack(e,t,n)}onMediaAttaching(e,t){this.media=t.media,t.mediaSource||this._cleanTracks()}onMediaDetaching(e,t){const n=!!t.transferMedia;if(this.media=null,n)return;const{captionsTracks:r}=this;Object.keys(r).forEach(i=>{Jo(r[i]),delete r[i]}),this.nonNativeCaptionsTracks={}}onManifestLoading(){this.lastCc=-1,this.lastSn=-1,this.lastPartIndex=-1,this.prevCC=-1,this.vttCCs=Vl(),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++)Jo(t[n])}onSubtitleTracksUpdated(e,t){const n=t.subtitleTracks||[],r=n.some(i=>i.textCodec===wA);if(this.config.enableWebVTT||r&&this.config.enableIMSC1){if(VA(this.tracks,n)){this.tracks=n;return}if(this.textTracks=[],this.tracks=n,this.config.renderTextTracksNatively){const s=this.media,A=s?Ma(s.textTracks):null;if(this.tracks.forEach((f,c)=>{let m;if(A){let y=null;for(let B=0;B<A.length;B++)if(A[B]&&Ou(A[B],f)){y=A[B],A[B]=null;break}y&&(m=y)}if(m)Jo(m);else{const y=Lo(f);m=this.createTextTrack(y,f.name,f.lang),m&&(m.mode="disabled")}m&&this.textTracks.push(m)}),A!=null&&A.length){const f=A.filter(c=>c!==null).map(c=>c.label);f.length&&this.hls.logger.warn(`Media element contains unused subtitle tracks: ${f.join(", ")}. Replace media element for each source to clear TextTracks and captions menu.`)}}else if(this.tracks.length){const s=this.tracks.map(A=>({label:A.name,kind:A.type.toLowerCase(),default:A.default,subtitleTrack:A}));this.hls.trigger(g.NON_NATIVE_TEXT_TRACKS_FOUND,{tracks:s})}}}onManifestLoaded(e,t){this.config.enableCEA708Captions&&t.captions&&t.captions.forEach(n=>{const r=/(?:CC|SERVICE)([1-4])/.exec(n.instreamId);if(!r)return;const i=`textTrack${r[1]}`,s=this.captionsProperties[i];s&&(s.label=n.name,n.lang&&(s.languageCode=n.lang),s.media=n)})}closedCaptionsForLevel(e){const t=this.hls.levels[e.level];return t==null?void 0:t.attrs["CLOSED-CAPTIONS"]}onFragLoading(e,t){if(this.enabled&&t.frag.type===le.MAIN){var n,r;const{cea608Parser1:i,cea608Parser2:s,lastSn:A}=this,{cc:f,sn:c}=t.frag,m=(n=(r=t.part)==null?void 0:r.index)!=null?n:-1;i&&s&&(c!==A+1||c===A&&m!==this.lastPartIndex+1||f!==this.lastCc)&&(i.reset(),s.reset()),this.lastCc=f,this.lastSn=c,this.lastPartIndex=m}}onFragLoaded(e,t){const{frag:n,payload:r}=t;if(n.type===le.SUBTITLE)if(r.byteLength){const i=n.decryptdata,s="stats"in t;if(i==null||!i.encrypted||s){const A=this.tracks[n.level],f=this.vttCCs;f[n.cc]||(f[n.cc]={start:n.start,prevCC:this.prevCC,new:!0},this.prevCC=n.cc),A&&A.textCodec===wA?this._parseIMSC1(n,r):this._parseVTTs(t)}}else this.hls.trigger(g.SUBTITLE_FRAG_PROCESSED,{success:!1,frag:n,error:new Error("Empty subtitle payload")})}_parseIMSC1(e,t){const n=this.hls;Lu(t,this.initPTS[e.cc],r=>{this._appendCues(r,e.level),n.trigger(g.SUBTITLE_FRAG_PROCESSED,{success:!0,frag:e})},r=>{n.logger.log(`Failed to parse IMSC1: ${r}`),n.trigger(g.SUBTITLE_FRAG_PROCESSED,{success:!1,frag:e,error:r})})}_parseVTTs(e){var t;const{frag:n,payload:r}=e,{initPTS:i,unparsedVttFrags:s}=this,A=i.length-1;if(!i[n.cc]&&A===-1){s.push(e);return}const f=this.hls,c=(t=n.initSegment)!=null&&t.data?qe(n.initSegment.data,new Uint8Array(r)).buffer:r;Fu(c,this.initPTS[n.cc],this.vttCCs,n.cc,n.start,m=>{this._appendCues(m,n.level),f.trigger(g.SUBTITLE_FRAG_PROCESSED,{success:!0,frag:n})},m=>{const y=m.message==="Missing initPTS for VTT MPEGTS";y?s.push(e):this._fallbackToIMSC1(n,r),f.logger.log(`Failed to parse VTT cue: ${m}`),!(y&&A>n.cc)&&f.trigger(g.SUBTITLE_FRAG_PROCESSED,{success:!1,frag:n,error:m})})}_fallbackToIMSC1(e,t){const n=this.tracks[e.level];n.textCodec||Lu(t,this.initPTS[e.cc],()=>{n.textCodec=wA,this._parseIMSC1(e,t)},()=>{n.textCodec="wvtt"})}_appendCues(e,t){const n=this.hls;if(this.config.renderTextTracksNatively){const r=this.textTracks[t];if(!r||r.mode==="disabled")return;e.forEach(i=>hu(r,i))}else{const r=this.tracks[t];if(!r)return;const i=r.default?"default":"subtitles"+t;n.trigger(g.CUES_PARSED,{type:"subtitles",cues:e,track:i})}}onFragDecrypted(e,t){const{frag:n}=t;n.type===le.SUBTITLE&&this.onFragLoaded(g.FRAG_LOADED,t)}onSubtitleTracksCleared(){this.tracks=[],this.captionsTracks={}}onFragParsingUserdata(e,t){if(!this.enabled||!this.config.enableCEA708Captions)return;const{frag:n,samples:r}=t;if(!(n.type===le.MAIN&&this.closedCaptionsForLevel(n)==="NONE"))for(let i=0;i<r.length;i++){const s=r[i].bytes;if(s){this.cea608Parser1||this.initCea608Parsers();const A=this.extractCea608Data(s);this.cea608Parser1.addData(r[i].pts,A[0]),this.cea608Parser2.addData(r[i].pts,A[1])}}}onBufferFlushing(e,{startOffset:t,endOffset:n,endOffsetSubtitles:r,type:i}){const{media:s}=this;if(!(!s||s.currentTime<n)){if(!i||i==="video"){const{captionsTracks:A}=this;Object.keys(A).forEach(f=>Ao(A[f],t,n))}if(this.config.renderTextTracksNatively&&t===0&&r!==void 0){const{textTracks:A}=this;Object.keys(A).forEach(f=>Ao(A[f],t,r))}}}extractCea608Data(e){const t=[[],[]],n=e[0]&31;let r=2;for(let i=0;i<n;i++){const s=e[r++],A=127&e[r++],f=127&e[r++];if(A===0&&f===0)continue;if((4&s)!==0){const m=3&s;(m===0||m===1)&&(t[m].push(A),t[m].push(f))}}return t}}function Lo(a){return a.characteristics&&/transcribes-spoken-dialog/gi.test(a.characteristics)&&/describes-music-and-sound/gi.test(a.characteristics)?"captions":"subtitles"}function Ou(a,e){return!!a&&a.kind===Lo(e)&&Bo(e,a)}function cc(a,e,t,n){return Math.min(e,n)-Math.max(a,t)}function Vl(){return{ccOffset:0,presentationOffset:0,0:{start:0,prevCC:-1,new:!0}}}const fc=/\s/,Pu={newCue(a,e,t,n){const r=[];let i,s,A,f,c;const m=self.VTTCue||self.TextTrackCue;for(let B=0;B<n.rows.length;B++)if(i=n.rows[B],A=!0,f=0,c="",!i.isEmpty()){var y;for(let se=0;se<i.chars.length;se++)fc.test(i.chars[se].uchar)&&A?f++:(c+=i.chars[se].uchar,A=!1);i.cueStartTime=e,e===t&&(t+=1e-4),f>=16?f--:f++;const D=xu(c.trim()),L=Hl(e,t,D);a!=null&&(y=a.cues)!=null&&y.getCueById(L)||(s=new m(e,t,D),s.id=L,s.line=B+1,s.align="left",s.position=10+Math.min(80,Math.floor(f*8/32)*10),r.push(s))}return a&&r.length&&(r.sort((B,D)=>B.line==="auto"||D.line==="auto"?0:B.line>8&&D.line>8?D.line-B.line:B.line-D.line),r.forEach(B=>hu(a,B))),r}};function dc(){if(self.fetch&&self.AbortController&&self.ReadableStream&&self.Request)try{return new self.ReadableStream({}),!0}catch(a){}return!1}const hc=/(\d+)-(\d+)\/(\d+)/;class Mu{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||vc,this.controller=new self.AbortController,this.stats=new C}destroy(){this.loader=this.callbacks=this.context=this.config=this.request=null,this.abortInternal(),this.response=null,this.fetchSetup=this.controller=this.stats=null}abortInternal(){this.controller&&!this.stats.loading.end&&(this.stats.aborted=!0,this.controller.abort())}abort(){var e;this.abortInternal(),(e=this.callbacks)!=null&&e.onAbort&&this.callbacks.onAbort(this.stats,this.context,this.response)}load(e,t,n){const r=this.stats;if(r.loading.start)throw new Error("Loader can only be used once.");r.loading.start=self.performance.now();const i=gc(e,this.controller.signal),s=e.responseType==="arraybuffer",A=s?"byteLength":"length",{maxTimeToFirstByteMs:f,maxLoadTimeMs:c}=t.loadPolicy;this.context=e,this.config=t,this.callbacks=n,this.request=this.fetchSetup(e,i),self.clearTimeout(this.requestTimeout),t.timeout=f&&V(f)?f:c,this.requestTimeout=self.setTimeout(()=>{this.callbacks&&(this.abortInternal(),this.callbacks.onTimeout(r,e,this.response))},t.timeout),(Pa(this.request)?this.request.then(self.fetch):self.fetch(this.request)).then(y=>{var B;this.response=this.loader=y;const D=Math.max(self.performance.now(),r.loading.start);if(self.clearTimeout(this.requestTimeout),t.timeout=c,this.requestTimeout=self.setTimeout(()=>{this.callbacks&&(this.abortInternal(),this.callbacks.onTimeout(r,e,this.response))},c-(D-r.loading.start)),!y.ok){const{status:se,statusText:X}=y;throw new _c(X||"fetch, bad network response",se,y)}r.loading.first=D,r.total=mc(y.headers)||r.total;const L=(B=this.callbacks)==null?void 0:B.onProgress;return L&&V(t.highWaterMark)?this.loadProgressively(y,r,e,t.highWaterMark,L):s?y.arrayBuffer():e.responseType==="json"?y.json():y.text()}).then(y=>{var B,D;const L=this.response;if(!L)throw new Error("loader destroyed");self.clearTimeout(this.requestTimeout),r.loading.end=Math.max(self.performance.now(),r.loading.first);const se=y[A];se&&(r.loaded=r.total=se);const X={url:L.url,data:y,code:L.status},xe=(B=this.callbacks)==null?void 0:B.onProgress;xe&&!V(t.highWaterMark)&&xe(r,e,y,L),(D=this.callbacks)==null||D.onSuccess(X,r,e,L)}).catch(y=>{var B;if(self.clearTimeout(this.requestTimeout),r.aborted)return;const D=y&&y.code||0,L=y?y.message:null;(B=this.callbacks)==null||B.onError({code:D,text:L},e,y?y.details:null,r)})}getCacheAge(){let e=null;if(this.response){const t=this.response.headers.get("age");e=t?parseFloat(t):null}return e}getResponseHeader(e){return this.response?this.response.headers.get(e):null}loadProgressively(e,t,n,r=0,i){const s=new Zs,A=e.body.getReader(),f=()=>A.read().then(c=>{if(c.done)return s.dataLength&&i(t,n,s.flush().buffer,e),Promise.resolve(new ArrayBuffer(0));const m=c.value,y=m.length;return t.loaded+=y,y<r||s.dataLength?(s.push(m),s.dataLength>=r&&i(t,n,s.flush().buffer,e)):i(t,n,m.buffer,e),f()}).catch(()=>Promise.reject());return f()}}function gc(a,e){const t={method:"GET",mode:"cors",credentials:"same-origin",signal:e,headers:new self.Headers(_({},a.headers))};return a.rangeEnd&&t.headers.set("Range","bytes="+a.rangeStart+"-"+String(a.rangeEnd-1)),t}function pc(a){const e=hc.exec(a);if(e)return parseInt(e[2])-parseInt(e[1])+1}function mc(a){const e=a.get("Content-Range");if(e){const n=pc(e);if(V(n))return n}const t=a.get("Content-Length");if(t)return parseInt(t)}function vc(a,e){return new self.Request(a.url,e)}class _c extends Error{constructor(e,t,n){super(e),this.code=void 0,this.details=void 0,this.code=t,this.details=n}}const yc=/^age:\s*[\d.]+\s*$/im;class Qu{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 C,this.retryDelay=0}destroy(){this.callbacks=null,this.abortInternal(),this.loader=null,this.config=null,this.context=null,this.xhrSetup=null}abortInternal(){const e=this.loader;self.clearTimeout(this.requestTimeout),self.clearTimeout(this.retryTimeout),e&&(e.onreadystatechange=null,e.onprogress=null,e.readyState!==4&&(this.stats.aborted=!0,e.abort()))}abort(){var e;this.abortInternal(),(e=this.callbacks)!=null&&e.onAbort&&this.callbacks.onAbort(this.stats,this.context,this.loader)}load(e,t,n){if(this.stats.loading.start)throw new Error("Loader can only be used once.");this.stats.loading.start=self.performance.now(),this.context=e,this.config=t,this.callbacks=n,this.loadInternal()}loadInternal(){const{config:e,context:t}=this;if(!e||!t)return;const n=this.loader=new self.XMLHttpRequest,r=this.stats;r.loading.first=0,r.loaded=0,r.aborted=!1;const i=this.xhrSetup;i?Promise.resolve().then(()=>{if(!(this.loader!==n||this.stats.aborted))return i(n,t.url)}).catch(s=>{if(!(this.loader!==n||this.stats.aborted))return n.open("GET",t.url,!0),i(n,t.url)}).then(()=>{this.loader!==n||this.stats.aborted||this.openAndSendXhr(n,t,e)}).catch(s=>{var A;(A=this.callbacks)==null||A.onError({code:n.status,text:s.message},t,n,r)}):this.openAndSendXhr(n,t,e)}openAndSendXhr(e,t,n){e.readyState||e.open("GET",t.url,!0);const r=t.headers,{maxTimeToFirstByteMs:i,maxLoadTimeMs:s}=n.loadPolicy;if(r)for(const A in r)e.setRequestHeader(A,r[A]);t.rangeEnd&&e.setRequestHeader("Range","bytes="+t.rangeStart+"-"+(t.rangeEnd-1)),e.onreadystatechange=this.readystatechange.bind(this),e.onprogress=this.loadprogress.bind(this),e.responseType=t.responseType,self.clearTimeout(this.requestTimeout),n.timeout=i&&V(i)?i:s,this.requestTimeout=self.setTimeout(this.loadtimeout.bind(this),n.timeout),e.send()}readystatechange(){const{context:e,loader:t,stats:n}=this;if(!e||!t)return;const r=t.readyState,i=this.config;if(!n.aborted&&r>=2&&(n.loading.first===0&&(n.loading.first=Math.max(self.performance.now(),n.loading.start),i.timeout!==i.loadPolicy.maxLoadTimeMs&&(self.clearTimeout(this.requestTimeout),i.timeout=i.loadPolicy.maxLoadTimeMs,this.requestTimeout=self.setTimeout(this.loadtimeout.bind(this),i.loadPolicy.maxLoadTimeMs-(n.loading.first-n.loading.start)))),r===4)){self.clearTimeout(this.requestTimeout),t.onreadystatechange=null,t.onprogress=null;const c=t.status,m=t.responseType==="text"?t.responseText:null;if(c>=200&&c<300){const L=m!=null?m:t.response;if(L!=null){var s,A;n.loading.end=Math.max(self.performance.now(),n.loading.first);const se=t.responseType==="arraybuffer"?L.byteLength:L.length;n.loaded=n.total=se,n.bwEstimate=n.total*8e3/(n.loading.end-n.loading.first);const X=(s=this.callbacks)==null?void 0:s.onProgress;X&&X(n,e,L,t);const xe={url:t.responseURL,data:L,code:c};(A=this.callbacks)==null||A.onSuccess(xe,n,e,t);return}}const y=i.loadPolicy.errorRetry,B=n.retry,D={url:e.url,data:void 0,code:c};if(Kt(y,B,!1,D))this.retry(y);else{var f;ie.error(`${c} while loading ${e.url}`),(f=this.callbacks)==null||f.onError({code:c,text:t.statusText},e,t,n)}}}loadtimeout(){if(!this.config)return;const e=this.config.loadPolicy.timeoutRetry,t=this.stats.retry;if(Kt(e,t,!0))this.retry(e);else{var n;ie.warn(`timeout while loading ${(n=this.context)==null?void 0:n.url}`);const r=this.callbacks;r&&(this.abortInternal(),r.onTimeout(this.stats,this.context,this.loader))}}retry(e){const{context:t,stats:n}=this;this.retryDelay=an(e,n.retry),n.retry++,ie.warn(`${status?"HTTP Status "+status:"Timeout"} while loading ${t==null?void 0:t.url}, retrying ${n.retry}/${e.maxNumRetry} in ${this.retryDelay}ms`),this.abortInternal(),this.loader=null,self.clearTimeout(this.retryTimeout),this.retryTimeout=self.setTimeout(this.loadInternal.bind(this),this.retryDelay)}loadprogress(e){const t=this.stats;t.loaded=e.loaded,e.lengthComputable&&(t.total=e.total)}getCacheAge(){let e=null;if(this.loader&&yc.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 wc={maxTimeToFirstByteMs:8e3,maxLoadTimeMs:2e4,timeoutRetry:null,errorRetry:null},Ec=b(b({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:Qu,fLoader:void 0,pLoader:void 0,xhrSetup:void 0,licenseXhrSetup:void 0,licenseResponseCallback:void 0,abrController:On,bufferController:Sl,capLevelController:Wo,errorController:et,fpsController:du,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:Er,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:wc},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},Bc()),{},{subtitleStreamController:qu,subtitleTrackController:qo,timelineController:uc,audioStreamController:Yl,audioTrackController:zA,emeController:To,cmcdController:uu,contentSteeringController:ju,interstitialsController:Ju});function Bc(){return{cueHandler:Pu,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 bc(a,e,t){if((e.liveSyncDurationCount||e.liveMaxLatencyDurationCount)&&(e.liveSyncDuration||e.liveMaxLatencyDuration))throw new Error("Illegal hls.js config: don't mix up liveSyncDurationCount/liveMaxLatencyDurationCount and liveSyncDuration/liveMaxLatencyDuration");if(e.liveMaxLatencyDurationCount!==void 0&&(e.liveSyncDurationCount===void 0||e.liveMaxLatencyDurationCount<=e.liveSyncDurationCount))throw new Error('Illegal hls.js config: "liveMaxLatencyDurationCount" must be greater than "liveSyncDurationCount"');if(e.liveMaxLatencyDuration!==void 0&&(e.liveSyncDuration===void 0||e.liveMaxLatencyDuration<=e.liveSyncDuration))throw new Error('Illegal hls.js config: "liveMaxLatencyDuration" must be greater than "liveSyncDuration"');const n=d(a),r=["manifest","level","frag"],i=["TimeOut","MaxRetry","RetryDelay","MaxRetryTimeout"];return r.forEach(s=>{const A=`${s==="level"?"playlist":s}LoadPolicy`,f=e[A]===void 0,c=[];i.forEach(m=>{const y=`${s}Loading${m}`,B=e[y];if(B!==void 0&&f){c.push(y);const D=n[A].default;switch(e[A]={default:D},m){case"TimeOut":D.maxLoadTimeMs=B,D.maxTimeToFirstByteMs=B;break;case"MaxRetry":D.errorRetry.maxNumRetry=B,D.timeoutRetry.maxNumRetry=B;break;case"RetryDelay":D.errorRetry.retryDelayMs=B,D.timeoutRetry.retryDelayMs=B;break;case"MaxRetryTimeout":D.errorRetry.maxRetryDelayMs=B,D.timeoutRetry.maxRetryDelayMs=B;break}}}),c.length&&t.warn(`hls.js config: "${c.join('", "')}" setting(s) are deprecated, use "${A}": ${Sn(e[A])}`)}),b(b({},n),e)}function d(a){return a&&typeof a=="object"?Array.isArray(a)?a.map(d):Object.keys(a).reduce((e,t)=>(e[t]=d(a[t]),e),{}):a}function u(a,e){const t=a.loader;t!==Mu&&t!==Qu?(e.log("[config]: Custom loader detected, cannot enable progressive streaming"),a.progressive=!1):dc()&&(a.loader=Mu,a.progressive=!0,a.enableSoftwareAES=!0,e.log("[config]: Progressive streaming enabled, using FetchLoader"))}const p=2,h=.1,F=.05,Z=100;class ve extends Kr{constructor(e,t){super("gap-controller",e.logger),this.hls=void 0,this.fragmentTracker=void 0,this.media=null,this.mediaSource=void 0,this.nudgeRetry=0,this.stallReported=!1,this.stalled=null,this.moved=!1,this.seeking=!1,this.buffered={},this.lastCurrentTime=0,this.ended=0,this.waiting=0,this.onMediaPlaying=()=>{this.ended=0,this.waiting=0},this.onMediaWaiting=()=>{var n;(n=this.media)!=null&&n.seeking||(this.waiting=self.performance.now(),this.tick())},this.onMediaEnded=()=>{if(this.hls){var n;this.ended=((n=this.media)==null?void 0:n.currentTime)||1,this.hls.trigger(g.MEDIA_ENDED,{stalled:!1})}},this.hls=e,this.fragmentTracker=t,this.registerListeners()}registerListeners(){const{hls:e}=this;e&&(e.on(g.MEDIA_ATTACHED,this.onMediaAttached,this),e.on(g.MEDIA_DETACHING,this.onMediaDetaching,this),e.on(g.BUFFER_APPENDED,this.onBufferAppended,this))}unregisterListeners(){const{hls:e}=this;e&&(e.off(g.MEDIA_ATTACHED,this.onMediaAttached,this),e.off(g.MEDIA_DETACHING,this.onMediaDetaching,this),e.off(g.BUFFER_APPENDED,this.onBufferAppended,this))}destroy(){super.destroy(),this.unregisterListeners(),this.media=this.hls=this.fragmentTracker=null,this.mediaSource=void 0}onMediaAttached(e,t){this.setInterval(Z),this.mediaSource=t.mediaSource;const n=this.media=t.media;gs(n,"playing",this.onMediaPlaying),gs(n,"waiting",this.onMediaWaiting),gs(n,"ended",this.onMediaEnded)}onMediaDetaching(e,t){this.clearInterval();const{media:n}=this;n&&(ys(n,"playing",this.onMediaPlaying),ys(n,"waiting",this.onMediaWaiting),ys(n,"ended",this.onMediaEnded),this.media=null),this.mediaSource=void 0}onBufferAppended(e,t){this.buffered=t.timeRanges}get hasBuffered(){return Object.keys(this.buffered).length>0}tick(){var e;if(!((e=this.media)!=null&&e.readyState)||!this.hasBuffered)return;const t=this.media.currentTime;this.poll(t,this.lastCurrentTime),this.lastCurrentTime=t}poll(e,t){var n,r;const i=(n=this.hls)==null?void 0:n.config;if(!i)return;const s=this.media;if(!s)return;const{seeking:A}=s,f=this.seeking&&!A,c=!this.seeking&&A,m=s.paused&&!A||s.ended||s.playbackRate===0;if(this.seeking=A,e!==t){t&&(this.ended=0),this.moved=!0,A||(this.nudgeRetry=0,i.nudgeOnVideoHole&&!m&&e>t&&this.nudgeOnVideoHole(e,t)),this.waiting===0&&this.stallResolved(e);return}if(c||f){f&&this.stallResolved(e);return}if(m){this.nudgeRetry=0,this.stallResolved(e),!this.ended&&s.ended&&this.hls&&(this.ended=e||1,this.hls.trigger(g.MEDIA_ENDED,{stalled:!1}));return}if(!kn.getBuffered(s).length){this.nudgeRetry=0;return}const y=kn.bufferInfo(s,e,0),B=y.nextStart||0,D=this.fragmentTracker;if(A&&D&&this.hls){const Dn=Qe(this.hls.inFlightFragments,e),zt=y.len>p,un=!B||Dn||B-e>p&&!D.getPartialFragment(e);if(zt||un)return;this.moved=!1}const L=(r=this.hls)==null?void 0:r.latestLevelDetails;if(!this.moved&&this.stalled!==null&&D){if(!(y.len>0)&&!B)return;const zt=Math.max(B,y.start||0)-e,gn=!!(L!=null&&L.live)?L.targetduration*2:p,Yt=Ut(e,D);if(zt>0&&(zt<=gn||Yt)){s.paused||this._trySkipBufferHole(Yt);return}}const se=i.detectStallWithCurrentTimeMs,X=self.performance.now(),xe=this.waiting;let at=this.stalled;if(at===null)if(xe>0&&X-xe<se)at=this.stalled=xe;else{this.stalled=X;return}const We=X-at;if(!A&&(We>=se||xe)&&this.hls){var Mt;if(((Mt=this.mediaSource)==null?void 0:Mt.readyState)==="ended"&&!(L!=null&&L.live)&&Math.abs(e-((L==null?void 0:L.edge)||0))<1){if(this.ended)return;this.ended=e||1,this.hls.trigger(g.MEDIA_ENDED,{stalled:!0});return}if(this._reportStall(y),!this.media||!this.hls)return}const qt=kn.bufferInfo(s,e,i.maxBufferHole);this._tryFixBufferStall(qt,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(g.STALL_RESOLVED,{})}}nudgeOnVideoHole(e,t){var n;const r=this.buffered.video;if(this.hls&&this.media&&this.fragmentTracker&&(n=this.buffered.audio)!=null&&n.length&&r&&r.length>1&&e>r.end(0)){const i=kn.bufferedInfo(kn.timeRangesToArray(this.buffered.audio),e,0);if(i.len>1&&t>=i.start){const s=kn.timeRangesToArray(r),A=kn.bufferedInfo(s,t,0).bufferedIndex;if(A>-1&&A<s.length-1){const f=kn.bufferedInfo(s,e,0).bufferedIndex,c=s[A].end,m=s[A+1].start;if((f===-1||f>A)&&m-c<1&&e-c<2){const y=new Error(`nudging playhead to flush pipeline after video hole. currentTime: ${e} hole: ${c} -> ${m} buffered index: ${f}`);this.warn(y.message),this.media.currentTime+=1e-6;let B=Ut(e,this.fragmentTracker);B&&"fragment"in B?B=B.fragment:B||(B=void 0);const D=kn.bufferInfo(this.media,e,0);this.hls.trigger(g.ERROR,{type:ge.MEDIA_ERROR,details:G.BUFFER_SEEK_OVER_HOLE,fatal:!1,error:y,reason:y.message,frag:B,buffer:D.len,bufferInfo:D})}}}}}_tryFixBufferStall(e,t,n){var r,i;const{fragmentTracker:s,media:A}=this,f=(r=this.hls)==null?void 0:r.config;if(!A||!s||!f)return;const c=(i=this.hls)==null?void 0:i.latestLevelDetails,m=Ut(n,s);if((m||c!=null&&c.live&&n<c.fragmentStart)&&(this._trySkipBufferHole(m)||!this.media))return;const y=e.buffered,B=this.adjacentTraversal(e,n);(y&&y.length>1&&e.len>f.maxBufferHole||e.nextStart&&(e.nextStart-n<f.maxBufferHole||B))&&(t>f.highBufferWatchdogPeriod*1e3||this.waiting)&&(this.warn("Trying to nudge playhead over buffer-hole"),this._tryNudgeBuffer(e))}adjacentTraversal(e,t){const n=this.fragmentTracker,r=e.nextStart;if(n&&r){const i=n.getFragAtPos(t,le.MAIN),s=n.getFragAtPos(r,le.MAIN);if(i&&s)return s.sn-i.sn<2}return!1}_reportStall(e){const{hls:t,media:n,stallReported:r,stalled:i}=this;if(!r&&i!==null&&n&&t){this.stallReported=!0;const s=new Error(`Playback stalling at @${n.currentTime} due to low buffer (${Sn(e)})`);this.warn(s.message),t.trigger(g.ERROR,{type:ge.MEDIA_ERROR,details:G.BUFFER_STALLED_ERROR,fatal:!1,error:s,buffer:e.len,bufferInfo:e,stalled:{start:i}})}}_trySkipBufferHole(e){var t;const{fragmentTracker:n,media:r}=this,i=(t=this.hls)==null?void 0:t.config;if(!r||!n||!i)return 0;const s=r.currentTime,A=kn.bufferInfo(r,s,0),f=s<A.start?A.start:A.nextStart;if(f&&this.hls){const m=A.len<=i.maxBufferHole,y=A.len>0&&A.len<1&&r.readyState<3,B=f-s;if(B>0&&(m||y)){if(B>i.maxBufferHole){let L=!1;if(s===0){const se=n.getAppendedFrag(0,le.MAIN);se&&f<se.end&&(L=!0)}if(!L&&e){var c;if(!((c=this.hls.loadLevelObj)!=null&&c.details)||Qe(this.hls.inFlightFragments,f))return 0;let X=!1,xe=e.end;for(;xe<f;){const at=Ut(xe,n);if(at)xe+=at.duration;else{X=!0;break}}if(X)return 0}}const D=Math.max(f+F,s+h);if(this.warn(`skipping hole, adjusting currentTime from ${s} to ${D}`),this.moved=!0,r.currentTime=D,!(e!=null&&e.gap)){const L=new Error(`fragment loaded with buffer holes, seeking from ${s} to ${D}`),se={type:ge.MEDIA_ERROR,details:G.BUFFER_SEEK_OVER_HOLE,fatal:!1,error:L,reason:L.message,buffer:A.len,bufferInfo:A};e&&("fragment"in e?se.part=e:se.frag=e),this.hls.trigger(g.ERROR,se)}return D}}return 0}_tryNudgeBuffer(e){const{hls:t,media:n,nudgeRetry:r}=this,i=t==null?void 0:t.config;if(!n||!i)return 0;const s=n.currentTime;if(this.nudgeRetry++,r<i.nudgeMaxRetry){const A=s+(r+1)*i.nudgeOffset,f=new Error(`Nudging 'currentTime' from ${s} to ${A}`);this.warn(f.message),n.currentTime=A,t.trigger(g.ERROR,{type:ge.MEDIA_ERROR,details:G.BUFFER_NUDGE_ON_STALL,error:f,fatal:!1,buffer:e.len,bufferInfo:e})}else{const A=new Error(`Playhead still not moving while enough data buffered @${s} after ${i.nudgeMaxRetry} nudges`);this.error(A.message),t.trigger(g.ERROR,{type:ge.MEDIA_ERROR,details:G.BUFFER_STALLED_ERROR,error:A,fatal:!0,buffer:e.len,bufferInfo:e})}}}function Qe(a,e){const t=Me(a.main);if(t&&t.start<=e)return t;const n=Me(a.audio);return n&&n.start<=e?n:null}function Me(a){if(!a)return null;switch(a.state){case Fn.IDLE:case Fn.STOPPED:case Fn.ENDED:case Fn.ERROR:return null}return a.frag}function Ut(a,e){return e.getAppendedFrag(a,le.MAIN)||e.getPartialFragment(a)}const $t=.25;function nn(){if(typeof self!="undefined")return self.VTTCue||self.TextTrackCue}function Rn(a,e,t,n,r){let i=new a(e,t,"");try{i.value=n,r&&(i.type=r)}catch(s){i=new a(e,t,Sn(r?b({type:r},n):n))}return i}const Or=(()=>{const a=nn();try{a&&new a(0,Number.POSITIVE_INFINITY,"")}catch(e){return Number.MAX_VALUE}return Number.POSITIVE_INFINITY})();class dr{constructor(e){this.hls=void 0,this.id3Track=null,this.media=null,this.dateRangeCuesAppended={},this.removeCues=!0,this.assetCue=void 0,this.onEventCueEnter=()=>{this.hls&&this.hls.trigger(g.EVENT_CUE_ENTER,{})},this.hls=e,this._registerListeners()}destroy(){this._unregisterListeners(),this.id3Track=null,this.media=null,this.dateRangeCuesAppended={},this.hls=this.onEventCueEnter=null}_registerListeners(){const{hls:e}=this;e&&(e.on(g.MEDIA_ATTACHING,this.onMediaAttaching,this),e.on(g.MEDIA_ATTACHED,this.onMediaAttached,this),e.on(g.MEDIA_DETACHING,this.onMediaDetaching,this),e.on(g.MANIFEST_LOADING,this.onManifestLoading,this),e.on(g.FRAG_PARSING_METADATA,this.onFragParsingMetadata,this),e.on(g.BUFFER_FLUSHING,this.onBufferFlushing,this),e.on(g.LEVEL_UPDATED,this.onLevelUpdated,this),e.on(g.LEVEL_PTS_UPDATED,this.onLevelPtsUpdated,this))}_unregisterListeners(){const{hls:e}=this;e&&(e.off(g.MEDIA_ATTACHING,this.onMediaAttaching,this),e.off(g.MEDIA_ATTACHED,this.onMediaAttached,this),e.off(g.MEDIA_DETACHING,this.onMediaDetaching,this),e.off(g.MANIFEST_LOADING,this.onManifestLoading,this),e.off(g.FRAG_PARSING_METADATA,this.onFragParsingMetadata,this),e.off(g.BUFFER_FLUSHING,this.onBufferFlushing,this),e.off(g.LEVEL_UPDATED,this.onLevelUpdated,this),e.off(g.LEVEL_PTS_UPDATED,this.onLevelPtsUpdated,this))}onMediaAttaching(e,t){var n;this.media=t.media,((n=t.overrides)==null?void 0:n.cueRemoval)===!1&&(this.removeCues=!1)}onMediaAttached(){var e;const t=(e=this.hls)==null?void 0:e.latestLevelDetails;t&&this.updateDateRangeCues(t)}onMediaDetaching(e,t){this.media=null,!t.transferMedia&&(this.id3Track&&(this.removeCues&&Jo(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 Pl(n,this.media),n}return this.media.addTextTrack("metadata","id3")}}onFragParsingMetadata(e,t){if(!this.media||!this.hls)return;const{enableEmsgMetadataCues:n,enableID3MetadataCues:r}=this.hls.config;if(!n&&!r)return;const{samples:i}=t;this.id3Track||(this.id3Track=this.createTrack(this.media));const s=nn();if(s)for(let A=0;A<i.length;A++){const f=i[A].type;if(f===Vs.emsg&&!n||!r)continue;const c=Po(i[A].data),m=i[A].pts;let y=m+i[A].duration;y>Or&&(y=Or),y-m<=0&&(y=m+$t);for(let D=0;D<c.length;D++){const L=c[D];if(!qs(L)){this.updateId3CueEnds(m,f);const se=Rn(s,m,y,L,f);se&&this.id3Track.addCue(se)}}}}updateId3CueEnds(e,t){var n;const r=(n=this.id3Track)==null?void 0:n.cues;if(r)for(let i=r.length;i--;){const s=r[i];s.type===t&&s.startTime<e&&s.endTime===Or&&(s.endTime=e)}}onBufferFlushing(e,{startOffset:t,endOffset:n,type:r}){const{id3Track:i,hls:s}=this;if(!s)return;const{config:{enableEmsgMetadataCues:A,enableID3MetadataCues:f}}=s;if(i&&(A||f)){let c;r==="audio"?c=m=>m.type===Vs.audioId3&&f:r==="video"?c=m=>m.type===Vs.emsg&&A:c=m=>m.type===Vs.audioId3&&f||m.type===Vs.emsg&&A,Ao(i,t,n,c)}}onLevelUpdated(e,{details:t}){this.updateDateRangeCues(t,!0)}onLevelPtsUpdated(e,t){Math.abs(t.drift)>.01&&this.updateDateRangeCues(t.details)}updateDateRangeCues(e,t){if(!this.hls||!this.media)return;const{assetPlayerId:n,timelineOffset:r,enableDateRangeMetadataCues:i,interstitialsController:s}=this.hls.config;if(!i)return;const A=nn();if(n&&r&&!s){const{fragmentStart:se,fragmentEnd:X}=e;let xe=this.assetCue;xe?(xe.startTime=se,xe.endTime=X):A&&(xe=this.assetCue=Rn(A,se,X,{assetPlayerId:this.hls.config.assetPlayerId},"hlsjs.interstitial.asset"),xe&&(xe.id=n,this.id3Track||(this.id3Track=this.createTrack(this.media)),this.id3Track.addCue(xe),xe.addEventListener("enter",this.onEventCueEnter)))}if(!e.hasProgramDateTime)return;const{id3Track:f}=this,{dateRanges:c}=e,m=Object.keys(c);let y=this.dateRangeCuesAppended;if(f&&t){var B;if((B=f.cues)!=null&&B.length){const se=Object.keys(y).filter(X=>!m.includes(X));for(let X=se.length;X--;){var D;const xe=se[X],at=(D=y[xe])==null?void 0:D.cues;delete y[xe],at&&Object.keys(at).forEach(We=>{const Mt=at[We];if(Mt){Mt.removeEventListener("enter",this.onEventCueEnter);try{f.removeCue(Mt)}catch(qt){}}})}}else y=this.dateRangeCuesAppended={}}const L=e.fragments[e.fragments.length-1];if(!(m.length===0||!V(L==null?void 0:L.programDateTime))){this.id3Track||(this.id3Track=this.createTrack(this.media));for(let se=0;se<m.length;se++){const X=m[se],xe=c[X],at=xe.startTime,We=y[X],Mt=(We==null?void 0:We.cues)||{};let qt=(We==null?void 0:We.durationKnown)||!1,Dn=Or;const{duration:zt,endDate:un}=xe;if(un&&zt!==null)Dn=at+zt,qt=!0;else if(xe.endOnNext&&!qt){const Yt=m.reduce((Nn,Cr)=>{if(Cr!==xe.id){const jr=c[Cr];if(jr.class===xe.class&&jr.startDate>xe.startDate&&(!Nn||xe.startDate<Nn.startDate))return jr}return Nn},null);Yt&&(Dn=Yt.startTime,qt=!0)}const gn=Object.keys(xe.attr);for(let Yt=0;Yt<gn.length;Yt++){const Nn=gn[Yt];if(!Ki(Nn))continue;const Cr=Mt[Nn];if(Cr)qt&&!(We!=null&&We.durationKnown)?Cr.endTime=Dn:Math.abs(Cr.startTime-at)>.01&&(Cr.startTime=at,Cr.endTime=Dn);else if(A){let jr=xe.attr[Nn];Ji(Nn)&&(jr=$(jr));const Yr=Rn(A,at,Dn,{key:Nn,data:jr},Vs.dateRange);Yr&&(Yr.id=X,this.id3Track.addCue(Yr),Mt[Nn]=Yr,s&&(Nn==="X-ASSET-LIST"||Nn==="X-ASSET-URL")&&Yr.addEventListener("enter",this.onEventCueEnter))}}y[X]={cues:Mt,dateRange:xe,durationKnown:qt}}}}}class Rr{constructor(e){this.hls=void 0,this.config=void 0,this.media=null,this.currentTime=0,this.stallCount=0,this._latency=null,this._targetLatencyUpdated=!1,this.onTimeupdate=()=>{const{media:t}=this,n=this.levelDetails;if(!t||!n)return;this.currentTime=t.currentTime;const r=this.computeLatency();if(r===null)return;this._latency=r;const{lowLatencyMode:i,maxLiveSyncPlaybackRate:s}=this.config;if(!i||s===1||!n.live)return;const A=this.targetLatency;if(A===null)return;const f=r-A,c=Math.min(this.maxLatency,A+n.targetduration);if(f<c&&f>.05&&this.forwardBufferLength>1){const y=Math.min(2,Math.max(1,s)),B=Math.round(2/(1+Math.exp(-.75*f-this.edgeStalled))*20)/20,D=Math.min(y,Math.max(1,B));this.changeMediaPlaybackRate(t,D)}else t.playbackRate!==1&&t.playbackRate!==0&&this.changeMediaPlaybackRate(t,1)},this.hls=e,this.config=e.config,this.registerListeners()}get levelDetails(){var e;return((e=this.hls)==null?void 0:e.latestLevelDetails)||null}get latency(){return this._latency||0}get maxLatency(){const{config:e}=this;if(e.liveMaxLatencyDuration!==void 0)return e.liveMaxLatencyDuration;const t=this.levelDetails;return t?e.liveMaxLatencyDurationCount*t.targetduration:0}get targetLatency(){const e=this.levelDetails;if(e===null||this.hls===null)return null;const{holdBack:t,partHoldBack:n,targetduration:r}=e,{liveSyncDuration:i,liveSyncDurationCount:s,lowLatencyMode:A}=this.config,f=this.hls.userConfig;let c=A&&n||t;(this._targetLatencyUpdated||f.liveSyncDuration||f.liveSyncDurationCount||c===0)&&(c=i!==void 0?i:s*r);const m=r;return c+Math.min(this.stallCount*this.config.liveSyncOnStallIncrease,m)}set targetLatency(e){this.stallCount=0,this.config.liveSyncDuration=e,this._targetLatencyUpdated=!0}get liveSyncPosition(){const e=this.estimateLiveEdge(),t=this.targetLatency;if(e===null||t===null)return null;const n=this.levelDetails;if(n===null)return null;const r=n.edge,i=e-t-this.edgeStalled,s=r-n.totalduration,A=r-(this.config.lowLatencyMode&&n.partTarget||n.targetduration);return Math.min(Math.max(s,i),A)}get drift(){const e=this.levelDetails;return e===null?1:e.drift}get edgeStalled(){const e=this.levelDetails;if(e===null)return 0;const t=(this.config.lowLatencyMode&&e.partTarget||e.targetduration)*3;return Math.max(e.age-t,0)}get forwardBufferLength(){const{media:e}=this,t=this.levelDetails;if(!e||!t)return 0;const n=e.buffered.length;return(n?e.buffered.end(n-1):t.edge)-this.currentTime}destroy(){this.unregisterListeners(),this.onMediaDetaching(),this.hls=null}registerListeners(){const{hls:e}=this;e&&(e.on(g.MEDIA_ATTACHED,this.onMediaAttached,this),e.on(g.MEDIA_DETACHING,this.onMediaDetaching,this),e.on(g.MANIFEST_LOADING,this.onManifestLoading,this),e.on(g.LEVEL_UPDATED,this.onLevelUpdated,this),e.on(g.ERROR,this.onError,this))}unregisterListeners(){const{hls:e}=this;e&&(e.off(g.MEDIA_ATTACHED,this.onMediaAttached,this),e.off(g.MEDIA_DETACHING,this.onMediaDetaching,this),e.off(g.MANIFEST_LOADING,this.onManifestLoading,this),e.off(g.LEVEL_UPDATED,this.onLevelUpdated,this),e.off(g.ERROR,this.onError,this))}onMediaAttached(e,t){this.media=t.media,this.media.addEventListener("timeupdate",this.onTimeupdate)}onMediaDetaching(){this.media&&(this.media.removeEventListener("timeupdate",this.onTimeupdate),this.media=null)}onManifestLoading(){this._latency=null,this.stallCount=0}onLevelUpdated(e,{details:t}){t.advanced&&this.onTimeupdate(),!t.live&&this.media&&this.media.removeEventListener("timeupdate",this.onTimeupdate)}onError(e,t){var n;t.details===G.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 xi extends $o{constructor(e,t){super(e,"level-controller"),this._levels=[],this._firstLevel=-1,this._maxAutoLevel=-1,this._startLevel=void 0,this.currentLevel=null,this.currentLevelIndex=-1,this.manualLevelIndex=-1,this.steering=void 0,this.onParsedComplete=void 0,this.steering=t,this._registerListeners()}_registerListeners(){const{hls:e}=this;e.on(g.MANIFEST_LOADING,this.onManifestLoading,this),e.on(g.MANIFEST_LOADED,this.onManifestLoaded,this),e.on(g.LEVEL_LOADED,this.onLevelLoaded,this),e.on(g.LEVELS_UPDATED,this.onLevelsUpdated,this),e.on(g.FRAG_BUFFERED,this.onFragBuffered,this),e.on(g.ERROR,this.onError,this)}_unregisterListeners(){const{hls:e}=this;e.off(g.MANIFEST_LOADING,this.onManifestLoading,this),e.off(g.MANIFEST_LOADED,this.onManifestLoaded,this),e.off(g.LEVEL_LOADED,this.onLevelLoaded,this),e.off(g.LEVELS_UPDATED,this.onLevelsUpdated,this),e.off(g.FRAG_BUFFERED,this.onFragBuffered,this),e.off(g.ERROR,this.onError,this)}destroy(){this._unregisterListeners(),this.steering=null,this.resetLevels(),super.destroy()}stopLoad(){this._levels.forEach(t=>{t.loadError=0,t.fragmentError=0}),super.stopLoad()}resetLevels(){this._startLevel=void 0,this.manualLevelIndex=-1,this.currentLevelIndex=-1,this.currentLevel=null,this._levels=[],this._maxAutoLevel=-1}onManifestLoading(e,t){this.resetLevels()}onManifestLoaded(e,t){const n=this.hls.config.preferManagedMediaSource,r=[],i={},s={};let A=!1,f=!1,c=!1;t.levels.forEach(m=>{const y=m.attrs;let{audioCodec:B,videoCodec:D}=m;B&&(m.audioCodec=B=Ie(B,n)||void 0),D&&(D=m.videoCodec=_n(D));const{width:L,height:se,unknownCodecs:X}=m;let xe=X?X.length:0;if(X)for(let Yt=xe;Yt--;){const Nn=X[Yt];this.isAudioSupported(Nn)?(m.audioCodec=B=B?`${B},${Nn}`:Nn,xe--,Ot.audio[B.substring(0,4)]=2):this.isVideoSupported(Nn)&&(m.videoCodec=D=D?`${D},${Nn}`:Nn,xe--,Ot.video[D.substring(0,4)]=2)}if(A||(A=!!(L&&se)),f||(f=!!D),c||(c=!!B),xe||B&&!this.isAudioSupported(B)||D&&!this.isVideoSupported(D)){this.log(`Some or all CODECS not supported "${y.CODECS}"`);return}const{CODECS:at,"FRAME-RATE":We,"HDCP-LEVEL":Mt,"PATHWAY-ID":qt,RESOLUTION:Dn,"VIDEO-RANGE":zt}=y,gn=`${`${qt||"."}-`}${m.bitrate}-${Dn}-${We}-${at}-${zt}-${Mt}`;if(i[gn])if(i[gn].uri!==m.url&&!m.attrs["PATHWAY-ID"]){const Yt=s[gn]+=1;m.attrs["PATHWAY-ID"]=new Array(Yt+1).join(".");const Nn=this.createLevel(m);i[gn]=Nn,r.push(Nn)}else i[gn].addGroupId("audio",y.AUDIO),i[gn].addGroupId("text",y.SUBTITLES);else{const Yt=this.createLevel(m);i[gn]=Yt,s[gn]=1,r.push(Yt)}}),this.filterAndSortMediaOptions(r,t,A,f,c)}createLevel(e){const t=new vn(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=Lr(r,[])}return t}isAudioSupported(e){return qn(e,"audio",this.hls.config.preferManagedMediaSource)}isVideoSupported(e){return qn(e,"video",this.hls.config.preferManagedMediaSource)}filterAndSortMediaOptions(e,t,n,r,i){let s=[],A=[],f=e;if((n||r)&&i&&(f=f.filter(({videoCodec:X,videoRange:xe,width:at,height:We})=>(!!X||!!(at&&We))&&mn(xe))),f.length===0){Promise.resolve().then(()=>{if(this.hls){let X="no level with compatible codecs found in manifest",xe=X;t.levels.length&&(xe=`one or more CODECS in variant not supported: ${Sn(t.levels.map(We=>We.attrs.CODECS).filter((We,Mt,qt)=>qt.indexOf(We)===Mt))}`,this.warn(xe),X+=` (${xe})`);const at=new Error(X);this.hls.trigger(g.ERROR,{type:ge.MEDIA_ERROR,details:G.MANIFEST_INCOMPATIBLE_CODECS_ERROR,fatal:!0,url:t.url,error:at,reason:xe})}});return}t.audioTracks&&(s=t.audioTracks.filter(X=>!X.audioCodec||this.isAudioSupported(X.audioCodec)),Jr(s)),t.subtitles&&(A=t.subtitles,Jr(A));const c=f.slice(0);f.sort((X,xe)=>{if(X.attrs["HDCP-LEVEL"]!==xe.attrs["HDCP-LEVEL"])return(X.attrs["HDCP-LEVEL"]||"")>(xe.attrs["HDCP-LEVEL"]||"")?1:-1;if(n&&X.height!==xe.height)return X.height-xe.height;if(X.frameRate!==xe.frameRate)return X.frameRate-xe.frameRate;if(X.videoRange!==xe.videoRange)return tt.indexOf(X.videoRange)-tt.indexOf(xe.videoRange);if(X.videoCodec!==xe.videoCodec){const at=ut(X.videoCodec),We=ut(xe.videoCodec);if(at!==We)return We-at}if(X.uri===xe.uri&&X.codecSet!==xe.codecSet){const at=nt(X.codecSet),We=nt(xe.codecSet);if(at!==We)return We-at}return X.averageBitrate!==xe.averageBitrate?X.averageBitrate-xe.averageBitrate:0});let m=c[0];if(this.steering&&(f=this.steering.filterParsedLevels(f),f.length!==c.length)){for(let X=0;X<c.length;X++)if(c[X].pathwayId===f[0].pathwayId){m=c[X];break}}this._levels=f;for(let X=0;X<f.length;X++)if(f[X]===m){var y;this._firstLevel=X;const xe=m.bitrate,at=this.hls.bandwidthEstimate;if(this.log(`manifest loaded, ${f.length} level(s) found, first bitrate: ${xe}`),((y=this.hls.userConfig)==null?void 0:y.abrEwmaDefaultEstimate)===void 0){const We=Math.min(xe,this.hls.config.abrEwmaDefaultEstimateMax);We>at&&at===this.hls.abrEwmaDefaultEstimate&&(this.hls.bandwidthEstimate=We)}break}const B=i&&!r,D=this.hls.config,L=!!(D.audioStreamController&&D.audioTrackController),se={levels:f,audioTracks:s,subtitleTracks:A,sessionData:t.sessionData,sessionKeys:t.sessionKeys,firstLevel:this._firstLevel,stats:t.stats,audio:i,video:r,altAudio:L&&!B&&s.some(X=>!!X.url)};this.hls.trigger(g.MANIFEST_PARSED,se)}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 m=new Error("invalid level idx"),y=e<0;if(this.hls.trigger(g.ERROR,{type:ge.OTHER_ERROR,details:G.LEVEL_SWITCH_ERROR,level:e,fatal:y,error:m,reason:m.message}),y)return;e=Math.min(e,t.length-1)}const n=this.currentLevelIndex,r=this.currentLevel,i=r?r.attrs["PATHWAY-ID"]:void 0,s=t[e],A=s.attrs["PATHWAY-ID"];if(this.currentLevelIndex=e,this.currentLevel=s,n===e&&r&&i===A)return;this.log(`Switching to level ${e} (${s.height?s.height+"p ":""}${s.videoRange?s.videoRange+" ":""}${s.codecSet?s.codecSet+" ":""}@${s.bitrate})${A?" with Pathway "+A:""} from level ${n}${i?" with Pathway "+i:""}`);const f={level:e,attrs:s.attrs,details:s.details,bitrate:s.bitrate,averageBitrate:s.averageBitrate,maxBitrate:s.maxBitrate,realBitrate:s.realBitrate,width:s.width,height:s.height,codecSet:s.codecSet,audioCodec:s.audioCodec,videoCodec:s.videoCodec,audioGroups:s.audioGroups,subtitleGroups:s.subtitleGroups,loaded:s.loaded,loadError:s.loadError,fragmentError:s.fragmentError,name:s.name,id:s.id,uri:s.uri,url:s.url,urlId:0,audioGroupIds:s.audioGroupIds,textGroupIds:s.textGroupIds};this.hls.trigger(g.LEVEL_SWITCHING,f);const c=s.details;if(!c||c.live){const m=this.switchParams(s.uri,r==null?void 0:r.details,c);this.loadPlaylist(m)}}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===ye.LEVEL&&t.context.level===this.level&&this.checkRetry(t)}onFragBuffered(e,{frag:t}){if(t!==void 0&&t.type===le.MAIN){const n=t.elementaryStreams;if(!Object.keys(n).some(i=>!!n[i]))return;const r=this._levels[t.level];r!=null&&r.loadError&&(this.log(`Resetting level error count of ${r.loadError} on frag buffered`),r.loadError=0)}}onLevelLoaded(e,t){var n;const{level:r,details:i}=t,s=t.levelInfo;if(!s){var A;this.warn(`Invalid level index ${r}`),(A=t.deliveryDirectives)!=null&&A.skip&&(i.deltaUpdateFailed=!0);return}if(s===this.currentLevel||t.withoutMultiVariant){s.fragmentError===0&&(s.loadError=0);let f=s.details;f===t.details&&f.advanced&&(f=void 0),this.playlistLoaded(r,t,f)}else(n=t.deliveryDirectives)!=null&&n.skip&&(i.deltaUpdateFailed=!0)}loadPlaylist(e){super.loadPlaylist(),this.shouldLoadPlaylist(this.currentLevel)&&this.scheduleLoading(this.currentLevel,e)}loadingPlaylist(e,t){super.loadingPlaylist(e,t);const n=this.getUrlWithDirectives(e.uri,t),r=this.currentLevelIndex,i=e.attrs["PATHWAY-ID"],s=e.details,A=s==null?void 0:s.age;this.log(`Loading level index ${r}${(t==null?void 0:t.msn)!==void 0?" at sn "+t.msn+" part "+t.part:""}${i?" Pathway "+i:""}${A&&s.live?" age "+A.toFixed(1)+(s.type?" "+s.type||0:""):""} ${n}`),this.hls.trigger(g.LEVEL_LOADING,{url:n,level:r,levelInfo:e,pathwayId:e.attrs["PATHWAY-ID"],id:0,deliveryDirectives:t||null})}get nextLoadLevel(){return this.manualLevelIndex!==-1?this.manualLevelIndex:this.hls.nextAutoLevel}set nextLoadLevel(e){this.level=e,this.manualLevelIndex===-1&&(this.hls.nextAutoLevel=e)}removeLevel(e){var t;if(this._levels.length===1)return;const n=this._levels.filter((i,s)=>s!==e?!0:(this.steering&&this.steering.removeLevel(i),i===this.currentLevel&&(this.currentLevel=null,this.currentLevelIndex=-1,i.details&&i.details.fragments.forEach(A=>A.level=-1)),!1));Gs(n),this._levels=n,this.currentLevelIndex>-1&&(t=this.currentLevel)!=null&&t.details&&(this.currentLevelIndex=this.currentLevel.details.fragments[0].level),this.manualLevelIndex>-1&&(this.manualLevelIndex=this.currentLevelIndex);const r=n.length-1;this._firstLevel=Math.min(this._firstLevel,r),this._startLevel&&(this._startLevel=Math.min(this._startLevel,r)),this.hls.trigger(g.LEVELS_UPDATED,{levels:n})}onLevelsUpdated(e,{levels:t}){this._levels=t}checkMaxAutoUpdated(){const{autoLevelCapping:e,maxAutoLevel:t,maxHdcpLevel:n}=this.hls;this._maxAutoLevel!==t&&(this._maxAutoLevel=t,this.hls.trigger(g.MAX_AUTO_LEVEL_UPDATED,{autoLevelCapping:e,levels:this.levels,maxAutoLevel:t,minAutoLevel:this.hls.minAutoLevel,maxHdcpLevel:n}))}}function Jr(a){const e={};a.forEach(t=>{const n=t.groupId||"";t.id=e[n]=e[n]||0,e[n]++})}function Wr(){return self.SourceBuffer||self.WebKitSourceBuffer}function Zi(){if(!ae())return!1;const e=Wr();return!e||e.prototype&&typeof e.prototype.appendBuffer=="function"&&typeof e.prototype.remove=="function"}function Ii(){if(!Zi())return!1;const a=ae();return typeof(a==null?void 0:a.isTypeSupported)=="function"&&(["avc1.42E01E,mp4a.40.2","av01.0.01M.08","vp09.00.50.08"].some(e=>a.isTypeSupported(Mn(e,"video")))||["mp4a.40.2","fLaC"].some(e=>a.isTypeSupported(Mn(e,"audio"))))}function vi(){var a;const e=Wr();return typeof(e==null||(a=e.prototype)==null?void 0:a.changeType)=="function"}const Qr=100;class Ni extends sa{constructor(e,t,n){super(e,t,n,"stream-controller",le.MAIN),this.audioCodecSwap=!1,this.level=-1,this._forceStartLoad=!1,this._hasEnoughToStart=!1,this.altAudio=0,this.audioOnly=!1,this.fragPlaying=null,this.fragLastKbps=0,this.couldBacktrack=!1,this.backtrackFragment=null,this.audioCodecSwitch=!1,this.videoBuffer=null,this.onMediaPlaying=()=>{this.tick()},this.onMediaSeeked=()=>{const r=this.media,i=r?r.currentTime:null;if(i===null||!V(i)||(this.log(`Media seeked to ${i.toFixed(3)}`),!this.getBufferedFrag(i)))return;const s=this.getFwdBufferInfoAtPos(r,i,le.MAIN,0);if(s===null||s.len===0){this.warn(`Main forward buffer length at ${i} on "seeked" event ${s?s.len:"empty"})`);return}this.tick()},this.registerListeners()}registerListeners(){super.registerListeners();const{hls:e}=this;e.on(g.MANIFEST_PARSED,this.onManifestParsed,this),e.on(g.LEVEL_LOADING,this.onLevelLoading,this),e.on(g.LEVEL_LOADED,this.onLevelLoaded,this),e.on(g.FRAG_LOAD_EMERGENCY_ABORTED,this.onFragLoadEmergencyAborted,this),e.on(g.AUDIO_TRACK_SWITCHING,this.onAudioTrackSwitching,this),e.on(g.AUDIO_TRACK_SWITCHED,this.onAudioTrackSwitched,this),e.on(g.BUFFER_CREATED,this.onBufferCreated,this),e.on(g.BUFFER_FLUSHED,this.onBufferFlushed,this),e.on(g.LEVELS_UPDATED,this.onLevelsUpdated,this),e.on(g.FRAG_BUFFERED,this.onFragBuffered,this)}unregisterListeners(){super.unregisterListeners();const{hls:e}=this;e.off(g.MANIFEST_PARSED,this.onManifestParsed,this),e.off(g.LEVEL_LOADED,this.onLevelLoaded,this),e.off(g.FRAG_LOAD_EMERGENCY_ABORTED,this.onFragLoadEmergencyAborted,this),e.off(g.AUDIO_TRACK_SWITCHING,this.onAudioTrackSwitching,this),e.off(g.AUDIO_TRACK_SWITCHED,this.onAudioTrackSwitched,this),e.off(g.BUFFER_CREATED,this.onBufferCreated,this),e.off(g.BUFFER_FLUSHED,this.onBufferFlushed,this),e.off(g.LEVELS_UPDATED,this.onLevelsUpdated,this),e.off(g.FRAG_BUFFERED,this.onFragBuffered,this)}onHandlerDestroying(){this.onMediaPlaying=this.onMediaSeeked=null,this.unregisterListeners(),super.onHandlerDestroying()}startLoad(e,t){if(this.levels){const{lastCurrentTime:n,hls:r}=this;if(this.stopLoad(),this.setInterval(Qr),this.level=-1,!this.startFragRequested){let i=r.startLevel;i===-1&&(r.config.testBandwidth&&this.levels.length>1?(i=0,this.bitrateTest=!0):i=r.firstAutoLevel),r.nextLoadLevel=i,this.level=r.loadLevel,this._hasEnoughToStart=!!t}n>0&&e===-1&&!t&&(this.log(`Override startPosition with lastCurrentTime @${n.toFixed(3)}`),e=n),this.state=Fn.IDLE,this.nextLoadPosition=this.lastCurrentTime=e+this.timelineOffset,this.startPosition=t?-1:e,this.tick()}else this._forceStartLoad=!0,this.state=Fn.STOPPED}stopLoad(){this._forceStartLoad=!1,super.stopLoad()}doTick(){switch(this.state){case Fn.WAITING_LEVEL:{const{levels:e,level:t}=this,n=e==null?void 0:e[t],r=n==null?void 0:n.details;if(r&&(!r.live||this.levelLastLoaded===n&&!this.waitForLive(n))){if(this.waitForCdnTuneIn(r))break;this.state=Fn.IDLE;break}else if(this.hls.nextLoadLevel!==this.level){this.state=Fn.IDLE;break}break}case Fn.FRAG_LOADING_WAITING_RETRY:this.checkRetryDate();break}this.state===Fn.IDLE&&this.doTickIdle(),this.onTickEnd()}onTickEnd(){var e;super.onTickEnd(),(e=this.media)!=null&&e.readyState&&this.media.seeking===!1&&(this.lastCurrentTime=this.media.currentTime),this.checkFragmentChanged()}doTickIdle(){const{hls:e,levelLastLoaded:t,levels:n,media:r}=this;if(t===null||!r&&!this.primaryPrefetch&&(this.startFragRequested||!e.config.startFragPrefetch)||this.altAudio&&this.audioOnly)return;const i=this.buffering?e.nextLoadLevel:e.loadLevel;if(!(n!=null&&n[i]))return;const s=n[i],A=this.getMainFwdBufferInfo();if(A===null)return;const f=this.getLevelDetails();if(f&&this._streamEnded(A,f)){const se={};this.altAudio===2&&(se.type="video"),this.hls.trigger(g.BUFFER_EOS,se),this.state=Fn.ENDED;return}if(!this.buffering)return;e.loadLevel!==i&&e.manualLevel===-1&&this.log(`Adapting to level ${i} from level ${this.level}`),this.level=e.nextLoadLevel=i;const c=s.details;if(!c||this.state===Fn.WAITING_LEVEL||this.waitForLive(s)){this.level=i,this.state=Fn.WAITING_LEVEL,this.startFragRequested=!1;return}const m=A.len,y=this.getMaxBufferLength(s.maxBitrate);if(m>=y)return;this.backtrackFragment&&this.backtrackFragment.start>A.end&&(this.backtrackFragment=null);const B=this.backtrackFragment?this.backtrackFragment.start:A.end;let D=this.getNextFragment(B,c);if(this.couldBacktrack&&!this.fragPrevious&&D&&Ve(D)&&this.fragmentTracker.getState(D)!==dt.OK){var L;const X=((L=this.backtrackFragment)!=null?L:D).sn-c.startSN,xe=c.fragments[X-1];xe&&D.cc===xe.cc&&(D=xe,this.fragmentTracker.removeFragment(xe))}else this.backtrackFragment&&A.len&&(this.backtrackFragment=null);if(D&&this.isLoopLoading(D,B)){if(!D.gap){const X=this.audioOnly&&!this.altAudio?W.AUDIO:W.VIDEO,xe=(X===W.VIDEO?this.videoBuffer:this.mediaBuffer)||this.media;xe&&this.afterBufferFlushed(xe,X,le.MAIN)}D=this.getNextFragmentLoopLoading(D,c,A,le.MAIN,y)}D&&(D.initSegment&&!D.initSegment.data&&!this.bitrateTest&&(D=D.initSegment),this.loadFragment(D,s,B))}loadFragment(e,t,n){const r=this.fragmentTracker.getState(e);r===dt.NOT_LOADED||r===dt.PARTIAL?Ve(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,le.MAIN)}followingBufferedFrag(e){return e?this.getBufferedFrag(e.end+.5):null}immediateLevelSwitch(){this.abortCurrentFrag(),this.flushMainBuffer(0,Number.POSITIVE_INFINITY)}nextLevelSwitch(){const{levels:e,media:t}=this;if(t!=null&&t.readyState){let n;const r=this.getAppendedFrag(t.currentTime);r&&r.start>1&&this.flushMainBuffer(0,r.start-1);const i=this.getLevelDetails();if(i!=null&&i.live){const A=this.getMainFwdBufferInfo();if(!A||A.len<i.targetduration*2)return}if(!t.paused&&e){const A=this.hls.nextLoadLevel,f=e[A],c=this.fragLastKbps;c&&this.fragCurrent?n=this.fragCurrent.duration*f.maxBitrate/(1e3*c)+1:n=0}else n=0;const s=this.getBufferedFrag(t.currentTime+n);if(s){const A=this.followingBufferedFrag(s);if(A){this.abortCurrentFrag();const f=A.maxStartPTS?A.maxStartPTS:A.start,c=A.duration,m=Math.max(s.end,f+Math.min(Math.max(c-this.config.maxFragLookUpTolerance,c*(this.couldBacktrack?.5:.125)),c*(this.couldBacktrack?.75:.25)));this.flushMainBuffer(m,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 Fn.KEY_LOADING:case Fn.FRAG_LOADING:case Fn.FRAG_LOADING_WAITING_RETRY:case Fn.PARSING:case Fn.PARSED:this.state=Fn.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;gs(n,"playing",this.onMediaPlaying),gs(n,"seeked",this.onMediaSeeked)}onMediaDetaching(e,t){const{media:n}=this;n&&(ys(n,"playing",this.onMediaPlaying),ys(n,"seeked",this.onMediaSeeked)),this.videoBuffer=null,this.fragPlaying=null,super.onMediaDetaching(e,t),!t.transferMedia&&(this._hasEnoughToStart=!1)}onManifestLoading(){super.onManifestLoading(),this.log("Trigger BUFFER_RESET"),this.hls.trigger(g.BUFFER_RESET,void 0),this.couldBacktrack=!1,this.fragLastKbps=0,this.fragPlaying=this.backtrackFragment=null,this.altAudio=0,this.audioOnly=!1}onManifestParsed(e,t){let n=!1,r=!1;for(let i=0;i<t.levels.length;i++){const s=t.levels[i].audioCodec;s&&(n=n||s.indexOf("mp4a.40.2")!==-1,r=r||s.indexOf("mp4a.40.5")!==-1)}this.audioCodecSwitch=n&&r&&!vi(),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!==Fn.IDLE)return;const r=t.levelInfo;(!r.details||r.details.live&&(this.levelLastLoaded!==r||r.details.expired)||this.waitForCdnTuneIn(r.details))&&(this.state=Fn.WAITING_LEVEL)}onLevelLoaded(e,t){var n;const{levels:r,startFragRequested:i}=this,s=t.level,A=t.details,f=A.totalduration;if(!r){this.warn(`Levels were reset while loading level ${s}`);return}this.log(`Level ${s} loaded [${A.startSN},${A.endSN}]${A.lastPartSn?`[part-${A.lastPartSn}-${A.lastPartIndex}]`:""}, cc [${A.startCC}, ${A.endCC}] duration:${f}`);const c=t.levelInfo,m=this.fragCurrent;m&&(this.state===Fn.FRAG_LOADING||this.state===Fn.FRAG_LOADING_WAITING_RETRY)&&m.level!==t.level&&m.loader&&this.abortCurrentFrag();let y=0;if(A.live||(n=c.details)!=null&&n.live){var B;if(this.checkLiveUpdate(A),A.deltaUpdateFailed)return;y=this.alignPlaylists(A,c.details,(B=this.levelLastLoaded)==null?void 0:B.details)}if(c.details=A,this.levelLastLoaded=c,i||this.setStartPosition(A,y),this.hls.trigger(g.LEVEL_UPDATED,{details:A,level:s}),this.state===Fn.WAITING_LEVEL){if(this.waitForCdnTuneIn(A))return;this.state=Fn.IDLE}i&&A.live&&this.synchronizeToLiveEdge(A),this.tick()}synchronizeToLiveEdge(e){const{config:t,media:n}=this;if(!n)return;const r=this.hls.liveSyncPosition,i=this.getLoadPosition(),s=e.fragmentStart,A=e.edge,f=i>=s-t.maxFragLookUpTolerance&&i<=A;if(r!==null&&n.duration>r&&(i<r||!f)){const m=t.liveMaxLatencyDuration!==void 0?t.liveMaxLatencyDuration:t.liveMaxLatencyDurationCount*e.targetduration;if((!f&&n.readyState<4||i<A-m)&&(this._hasEnoughToStart||(this.nextLoadPosition=r),n.readyState))if(this.warn(`Playback: ${i.toFixed(3)} is located too far from the end of live sliding playlist: ${A}, reset currentTime to : ${r.toFixed(3)}`),this.config.liveSyncMode==="buffered"){var c;const y=kn.bufferInfo(n,r,0);if(!((c=y.buffered)!=null&&c.length)){n.currentTime=r;return}if(y.start<=i){n.currentTime=r;return}const{nextStart:D}=kn.bufferedInfo(y.buffered,i,0);D&&(n.currentTime=D)}else n.currentTime=r}}_handleFragmentLoadProgress(e){var t;const n=e.frag,{part:r,payload:i}=e,{levels:s}=this;if(!s){this.warn(`Levels were reset while fragment load was in progress. Fragment ${n.sn} of level ${n.level} will not be buffered`);return}const A=s[n.level];if(!A){this.warn(`Level ${n.level} not found on progress`);return}const f=A.details;if(!f){this.warn(`Dropping fragment ${n.sn} of level ${n.level} after level details were reset`),this.fragmentTracker.removeFragment(n);return}const c=A.videoCodec,m=f.PTSKnown||!f.live,y=(t=n.initSegment)==null?void 0:t.data,B=this._getAudioCodec(A),D=this.transmuxer=this.transmuxer||new hA(this.hls,le.MAIN,this._handleTransmuxComplete.bind(this),this._handleTransmuxerFlush.bind(this)),L=r?r.index:-1,se=L!==-1,X=new fr(n.level,n.sn,n.stats.chunkCount,i.byteLength,L,se),xe=this.initPTS[n.cc];D.push(i,y,B,c,n,r,f.totalduration,m,X,xe)}onAudioTrackSwitching(e,t){const n=this.hls,r=this.altAudio===2;if(yt(t.url,n))this.altAudio=1;else{if(this.mediaBuffer!==this.media){this.log("Switching on main audio, use media.buffered to schedule main fragment loading"),this.mediaBuffer=this.media;const s=this.fragCurrent;s&&(this.log("Switching to main audio track, cancel main fragment load"),s.abortRequests(),this.fragmentTracker.removeFragment(s)),this.resetTransmuxer(),this.resetLoadingState()}else this.audioOnly&&this.resetTransmuxer();if(r){this.fragmentTracker.removeAllFragments(),n.once(g.BUFFER_FLUSHED,()=>{this.hls&&this.hls.trigger(g.AUDIO_TRACK_SWITCHED,t)}),n.trigger(g.BUFFER_FLUSHING,{startOffset:0,endOffset:Number.POSITIVE_INFINITY,type:null});return}n.trigger(g.AUDIO_TRACK_SWITCHED,t)}}onAudioTrackSwitched(e,t){const n=yt(t.url,this.hls);if(n){const r=this.videoBuffer;r&&this.mediaBuffer!==r&&(this.log("Switching on alternate audio, use video.buffered to schedule main fragment loading"),this.mediaBuffer=r)}this.altAudio=n?2:0,this.tick()}onBufferCreated(e,t){const n=t.tracks;let r,i,s=!1;for(const A in n){const f=n[A];if(f.id==="main"){if(i=A,r=f,A==="video"){const c=n[A];c&&(this.videoBuffer=c.buffer)}}else s=!0}s&&r?(this.log(`Alternate track found, use ${i}.buffered to schedule main fragment loading`),this.mediaBuffer=r.buffer):this.mediaBuffer=this.media}onFragBuffered(e,t){const{frag:n,part:r}=t,i=n.type===le.MAIN;if(i){if(this.fragContextChanged(n)){this.warn(`Fragment ${n.sn}${r?" p: "+r.index:""} of level ${n.level} finished buffering, but was aborted. state: ${this.state}`),this.state===Fn.PARSED&&(this.state=Fn.IDLE);return}const A=r?r.stats:n.stats;this.fragLastKbps=Math.round(8*A.total/(A.buffering.end-A.loading.first)),Ve(n)&&(this.fragPrevious=n),this.fragBufferedComplete(n,r)}const s=this.media;s&&(!this._hasEnoughToStart&&kn.getBuffered(s).length&&(this._hasEnoughToStart=!0,this.seekToStartPos()),i&&this.tick())}get hasEnoughToStart(){return this._hasEnoughToStart}onError(e,t){var n;if(t.fatal){this.state=Fn.ERROR;return}switch(t.details){case G.FRAG_GAP:case G.FRAG_PARSING_ERROR:case G.FRAG_DECRYPT_ERROR:case G.FRAG_LOAD_ERROR:case G.FRAG_LOAD_TIMEOUT:case G.KEY_LOAD_ERROR:case G.KEY_LOAD_TIMEOUT:this.onFragmentOrKeyLoadError(le.MAIN,t);break;case G.LEVEL_LOAD_ERROR:case G.LEVEL_LOAD_TIMEOUT:case G.LEVEL_PARSING_ERROR:!t.levelRetry&&this.state===Fn.WAITING_LEVEL&&((n=t.context)==null?void 0:n.type)===ye.LEVEL&&(this.state=Fn.IDLE);break;case G.BUFFER_ADD_CODEC_ERROR:case G.BUFFER_APPEND_ERROR:if(t.parent!=="main")return;this.reduceLengthAndFlushBuffer(t)&&this.resetLoadingState();break;case G.BUFFER_FULL_ERROR:if(t.parent!=="main")return;this.reduceLengthAndFlushBuffer(t)&&(!this.config.interstitialsController&&this.config.assetPlayerId?this._hasEnoughToStart=!0:this.flushMainBuffer(0,Number.POSITIVE_INFINITY));break;case G.INTERNAL_EXCEPTION:this.recoverWorkerError(t);break}}onFragLoadEmergencyAborted(){this.state=Fn.IDLE,this._hasEnoughToStart||(this.startFragRequested=!1,this.nextLoadPosition=this.lastCurrentTime),this.tickImmediate()}onBufferFlushed(e,{type:t}){if(t!==W.AUDIO||!this.altAudio){const n=(t===W.VIDEO?this.videoBuffer:this.mediaBuffer)||this.media;n&&(this.afterBufferFlushed(n,t,le.MAIN),this.tick())}}onLevelsUpdated(e,t){this.level>-1&&this.fragCurrent&&(this.level=this.fragCurrent.level,this.level===-1&&this.resetWhenMissingContext(this.fragCurrent)),this.levels=t.levels}swapAudioCodec(){this.audioCodecSwap=!this.audioCodecSwap}seekToStartPos(){const{media:e}=this;if(!e)return;const t=e.currentTime;let n=this.startPosition;if(n>=0&&t<n){if(e.seeking){this.log(`could not seek to ${n}, already seeking at ${t}`);return}const r=this.timelineOffset;r&&n&&(n+=r);const i=this.getLevelDetails(),s=kn.getBuffered(e),A=s.length?s.start(0):0,f=A-n,c=Math.max(this.config.maxBufferHole,this.config.maxFragLookUpTolerance);(this.config.startOnSegmentBoundary||f>0&&(f<c||this.loadingParts&&f<2*((i==null?void 0:i.partTarget)||0)))&&(this.log(`adjusting start position by ${f} to match buffer start`),n+=f,this.startPosition=n),t<n&&(this.log(`seek to target start position ${n} from current time ${t} buffer start ${A}`),e.currentTime=n)}}_getAudioCodec(e){let t=this.config.defaultAudioCodec||e.audioCodec;return this.audioCodecSwap&&t&&(this.log("Swapping audio codec"),t.indexOf("mp4a.40.5")!==-1?t="mp4a.40.2":t="mp4a.40.5"),t}_loadBitrateTestFrag(e,t){e.bitrateTest=!0,this._doFragLoad(e,t).then(n=>{const{hls:r}=this,i=n==null?void 0:n.frag;if(!i||this.fragContextChanged(i))return;t.fragmentError=0,this.state=Fn.IDLE,this.startFragRequested=!1,this.bitrateTest=!1;const s=i.stats;s.parsing.start=s.parsing.end=s.buffering.start=s.buffering.end=self.performance.now(),r.trigger(g.FRAG_LOADED,n),i.bitrateTest=!1}).catch(n=>{this.state===Fn.STOPPED||this.state===Fn.ERROR||(this.warn(n),this.resetFragmentLoading(e))})}_handleTransmuxComplete(e){const t=this.playlistType,{hls:n}=this,{remuxResult:r,chunkMeta:i}=e,s=this.getCurrentContext(i);if(!s){this.resetWhenMissingContext(i);return}const{frag:A,part:f,level:c}=s,{video:m,text:y,id3:B,initSegment:D}=r,{details:L}=c,se=this.altAudio?void 0:r.audio;if(this.fragContextChanged(A)){this.fragmentTracker.removeFragment(A);return}if(this.state=Fn.PARSING,D){const X=D.tracks;if(X){const Mt=A.initSegment||A;if(this.unhandledEncryptionError(D,A))return;this._bufferInitSegment(c,X,Mt,i),n.trigger(g.FRAG_PARSING_INIT_SEGMENT,{frag:Mt,id:t,tracks:X})}const xe=D.initPTS,at=D.timescale,We=this.initPTS[A.cc];if(V(xe)&&(!We||We.baseTime!==xe||We.timescale!==at)){const Mt=D.trackId;this.initPTS[A.cc]={baseTime:xe,timescale:at,trackId:Mt},n.trigger(g.INIT_PTS_FOUND,{frag:A,id:t,initPTS:xe,timescale:at,trackId:Mt})}}if(m&&L){se&&m.type==="audiovideo"&&this.logMuxedErr(A);const X=L.fragments[A.sn-1-L.startSN],xe=A.sn===L.startSN,at=!X||A.cc>X.cc;if(r.independent!==!1){const{startPTS:We,endPTS:Mt,startDTS:qt,endDTS:Dn}=m;if(f)f.elementaryStreams[m.type]={startPTS:We,endPTS:Mt,startDTS:qt,endDTS:Dn};else if(m.firstKeyFrame&&m.independent&&i.id===1&&!at&&(this.couldBacktrack=!0),m.dropped&&m.independent){const zt=this.getMainFwdBufferInfo(),un=(zt?zt.end:this.getLoadPosition())+this.config.maxBufferHole,gn=m.firstKeyFramePTS?m.firstKeyFramePTS:We;if(!xe&&un<gn-this.config.maxBufferHole&&!at){this.backtrack(A);return}else at&&(A.gap=!0);A.setElementaryStreamInfo(m.type,A.start,Mt,A.start,Dn,!0)}else xe&&We-(L.appliedTimelineOffset||0)>p&&(A.gap=!0);A.setElementaryStreamInfo(m.type,We,Mt,qt,Dn),this.backtrackFragment&&(this.backtrackFragment=A),this.bufferFragmentData(m,A,f,i,xe||at)}else if(xe||at)A.gap=!0;else{this.backtrack(A);return}}if(se){const{startPTS:X,endPTS:xe,startDTS:at,endDTS:We}=se;f&&(f.elementaryStreams[W.AUDIO]={startPTS:X,endPTS:xe,startDTS:at,endDTS:We}),A.setElementaryStreamInfo(W.AUDIO,X,xe,at,We),this.bufferFragmentData(se,A,f,i)}if(L&&B!=null&&B.samples.length){const X={id:t,frag:A,details:L,samples:B.samples};n.trigger(g.FRAG_PARSING_METADATA,X)}if(L&&y){const X={id:t,frag:A,details:L,samples:y.samples};n.trigger(g.FRAG_PARSING_USERDATA,X)}}logMuxedErr(e){this.warn(`${Ve(e)?"Media":"Init"} segment with muxed audiovideo where only video expected: ${e.url}`)}_bufferInitSegment(e,t,n,r){if(this.state!==Fn.PARSING)return;this.audioOnly=!!t.audio&&!t.video,this.altAudio&&!this.audioOnly&&(delete t.audio,t.audiovideo&&this.logMuxedErr(n));const{audio:i,video:s,audiovideo:A}=t;if(i){const c=e.audioCodec;let m=ke(i.codec,c);m==="mp4a"&&(m="mp4a.40.5");const y=navigator.userAgent.toLowerCase();if(this.audioCodecSwitch){m&&(m.indexOf("mp4a.40.5")!==-1?m="mp4a.40.2":m="mp4a.40.5");const B=i.metadata;B&&"channelCount"in B&&(B.channelCount||1)!==1&&y.indexOf("firefox")===-1&&(m="mp4a.40.5")}m&&m.indexOf("mp4a.40.5")!==-1&&y.indexOf("android")!==-1&&i.container!=="audio/mpeg"&&(m="mp4a.40.2",this.log(`Android: force audio codec to ${m}`)),c&&c!==m&&this.log(`Swapping manifest audio codec "${c}" for "${m}"`),i.levelCodec=m,i.id=le.MAIN,this.log(`Init audio buffer, container:${i.container}, codecs[selected/level/parsed]=[${m||""}/${c||""}/${i.codec}]`),delete t.audiovideo}if(s){s.levelCodec=e.videoCodec,s.id=le.MAIN;const c=s.codec;if((c==null?void 0:c.length)===4)switch(c){case"hvc1":case"hev1":s.codec="hvc1.1.6.L120.90";break;case"av01":s.codec="av01.0.04M.08";break;case"avc1":s.codec="avc1.42e01e";break}this.log(`Init video buffer, container:${s.container}, codecs[level/parsed]=[${e.videoCodec||""}/${c}]${s.codec!==c?" parsed-corrected="+s.codec:""}${s.supplemental?" supplemental="+s.supplemental:""}`),delete t.audiovideo}A&&(this.log(`Init audiovideo buffer, container:${A.container}, codecs[level/parsed]=[${e.codecs}/${A.codec}]`),delete t.video,delete t.audio);const f=Object.keys(t);if(f.length){if(this.hls.trigger(g.BUFFER_CODECS,t),!this.hls)return;f.forEach(c=>{const y=t[c].initSegment;y!=null&&y.byteLength&&this.hls.trigger(g.BUFFER_APPENDING,{type:c,data:y,frag:n,part:null,chunkMeta:r,parent:n.type})})}this.tickImmediate()}getMainFwdBufferInfo(){const e=this.mediaBuffer&&this.altAudio===2?this.mediaBuffer:this.media;return this.getFwdBufferInfo(e,le.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=Fn.IDLE}checkFragmentChanged(){const e=this.media;let t=null;if(e&&e.readyState>1&&e.seeking===!1){const n=e.currentTime;if(kn.isBuffered(e,n)?t=this.getAppendedFrag(n):kn.isBuffered(e,n+.1)&&(t=this.getAppendedFrag(n+.1)),t){this.backtrackFragment=null;const r=this.fragPlaying,i=t.level;(!r||t.sn!==r.sn||r.level!==i)&&(this.fragPlaying=t,this.hls.trigger(g.FRAG_CHANGED,{frag:t}),(!r||r.level!==i)&&this.hls.trigger(g.LEVEL_SWITCHED,{level:i}))}}}get nextLevel(){const e=this.nextBufferedFrag;return e?e.level:-1}get currentFrag(){var e;if(this.fragPlaying)return this.fragPlaying;const t=((e=this.media)==null?void 0:e.currentTime)||this.lastCurrentTime;return V(t)?this.getAppendedFrag(t):null}get currentProgramDateTime(){var e;const t=((e=this.media)==null?void 0:e.currentTime)||this.lastCurrentTime;if(V(t)){const n=this.getLevelDetails(),r=this.currentFrag||(n?K(null,n.fragments,t):null);if(r){const i=r.programDateTime;if(i!==null){const s=i+(t-r.start)*1e3;return new Date(s)}}}return null}get currentLevel(){const e=this.currentFrag;return e?e.level:-1}get nextBufferedFrag(){const e=this.currentFrag;return e?this.followingBufferedFrag(e):null}get forceStartLoad(){return this._forceStartLoad}}class Hi extends H{constructor(e,t){super("key-loader",t),this.config=void 0,this.keyIdToKeyInfo={},this.emeController=null,this.config=e}abort(e){for(const n in this.keyIdToKeyInfo){const r=this.keyIdToKeyInfo[n].loader;if(r){var t;if(e&&e!==((t=r.context)==null?void 0:t.frag.type))return;r.abort()}}}detach(){for(const e in this.keyIdToKeyInfo){const t=this.keyIdToKeyInfo[e];(t.mediaKeySessionContext||t.decryptdata.isCommonEncryption)&&delete this.keyIdToKeyInfo[e]}}destroy(){this.detach();for(const e in this.keyIdToKeyInfo){const t=this.keyIdToKeyInfo[e].loader;t&&t.destroy()}this.keyIdToKeyInfo={}}createKeyLoadError(e,t=G.KEY_LOAD_ERROR,n,r,i){return new ir({type:ge.NETWORK_ERROR,details:t,fatal:!1,frag:e,response:i,error:n,networkDetails:r})}loadClear(e,t,n){if(this.emeController&&this.config.emeEnabled&&!this.emeController.getSelectedKeySystemFormats().length){if(t.length)for(let r=0,i=t.length;r<i;r++){const s=t[r];if(e.cc<=s.cc&&(!Ve(e)||!Ve(s)||e.sn<s.sn)||!n&&r==i-1)return this.emeController.selectKeySystemFormat(s).then(A=>{if(!this.emeController)return;s.setKeyFormat(A);const f=ti(A);if(f)return this.emeController.getKeySystemAccess([f])})}if(this.config.requireKeySystemAccessOnStart){const r=_r(this.config);if(r.length)return this.emeController.getKeySystemAccess(r)}}return null}load(e){return!e.decryptdata&&e.encrypted&&this.emeController&&this.config.emeEnabled?this.emeController.selectKeySystemFormat(e).then(t=>this.loadInternal(e,t)):this.loadInternal(e)}loadInternal(e,t){var n,r;t&&e.setKeyFormat(t);const i=e.decryptdata;if(!i){const m=new Error(t?`Expected frag.decryptdata to be defined after setting format ${t}`:"Missing decryption data on fragment in onKeyLoading");return Promise.reject(this.createKeyLoadError(e,G.KEY_LOAD_ERROR,m))}const s=i.uri;if(!s)return Promise.reject(this.createKeyLoadError(e,G.KEY_LOAD_ERROR,new Error(`Invalid key URI: "${s}"`)));const A=mi(i);let f=this.keyIdToKeyInfo[A];if((n=f)!=null&&n.decryptdata.key)return i.key=f.decryptdata.key,Promise.resolve({frag:e,keyInfo:f});if((r=f)!=null&&r.keyLoadPromise){var c;switch((c=f.mediaKeySessionContext)==null?void 0:c.keyStatus){case"usable":case"usable-in-future":return f.keyLoadPromise.then(y=>{const{keyInfo:B}=y;return i.key=B.decryptdata.key,{frag:e,keyInfo:B}})}}switch(this.log(`Loading key ${Y(i.keyId||[])} from ${e.type} ${e.level}`),f=this.keyIdToKeyInfo[A]={decryptdata:i,keyLoadPromise:null,loader:null,mediaKeySessionContext:null},i.method){case"SAMPLE-AES":case"SAMPLE-AES-CENC":case"SAMPLE-AES-CTR":return i.keyFormat==="identity"?this.loadKeyHTTP(f,e):this.loadKeyEME(f,e);case"AES-128":case"AES-256":case"AES-256-CTR":return this.loadKeyHTTP(f,e);default:return Promise.reject(this.createKeyLoadError(e,G.KEY_LOAD_ERROR,new Error(`Key supplied with unsupported METHOD: "${i.method}"`)))}}loadKeyEME(e,t){const n={frag:t,keyInfo:e};if(this.emeController&&this.config.emeEnabled){const r=this.emeController.loadKey(n);return(e.keyLoadPromise=r.then(i=>(e.mediaKeySessionContext=i,n))).catch(i=>{throw e.keyLoadPromise=null,i.data&&(i.data.frag=t),i})}return Promise.resolve(n)}loadKeyHTTP(e,t){const n=this.config,r=n.loader,i=new r(n);return t.keyLoader=e.loader=i,e.keyLoadPromise=new Promise((s,A)=>{const f={keyInfo:e,frag:t,responseType:"arraybuffer",url:e.decryptdata.uri},c=n.keyLoadPolicy.default,m={loadPolicy:c,timeout:c.maxLoadTimeMs,maxRetry:0,retryDelay:0,maxRetryDelay:0},y={onSuccess:(B,D,L,se)=>{const{frag:X,keyInfo:xe,url:at}=L,We=mi(xe.decryptdata)||at;if(!X.decryptdata||xe!==this.keyIdToKeyInfo[We])return A(this.createKeyLoadError(X,G.KEY_LOAD_ERROR,new Error("after key load, decryptdata unset or changed"),se));xe.decryptdata.key=X.decryptdata.key=new Uint8Array(B.data),X.keyLoader=null,xe.loader=null,s({frag:X,keyInfo:xe})},onError:(B,D,L,se)=>{this.resetLoader(D),A(this.createKeyLoadError(t,G.KEY_LOAD_ERROR,new Error(`HTTP Error ${B.code} loading key ${B.text}`),L,b({url:f.url,data:void 0},B)))},onTimeout:(B,D,L)=>{this.resetLoader(D),A(this.createKeyLoadError(t,G.KEY_LOAD_TIMEOUT,new Error("key loading timed out"),L))},onAbort:(B,D,L)=>{this.resetLoader(D),A(this.createKeyLoadError(t,G.INTERNAL_ABORTED,new Error("key loading aborted"),L))}};i.load(f,m,y)})}resetLoader(e){const{frag:t,keyInfo:n,url:r}=e,i=n.loader;t.keyLoader===i&&(t.keyLoader=null,n.loader=null);const s=mi(n.decryptdata)||r;delete this.keyIdToKeyInfo[s],i&&i.destroy()}}function mi(a){const e=a.keyId;return e?Y(e):a.uri}function Fs(a){const{type:e}=a;switch(e){case ye.AUDIO_TRACK:return le.AUDIO;case ye.SUBTITLE_TRACK:return le.SUBTITLE;default:return le.MAIN}}function zs(a,e){let t=a.url;return(t===void 0||t.indexOf("data:")===0)&&(t=e.url),t}class ga{constructor(e){this.hls=void 0,this.loaders=Object.create(null),this.variableList=null,this.onManifestLoaded=this.checkAutostartLoad,this.hls=e,this.registerListeners()}startLoad(e){}stopLoad(){this.destroyInternalLoaders()}registerListeners(){const{hls:e}=this;e.on(g.MANIFEST_LOADING,this.onManifestLoading,this),e.on(g.LEVEL_LOADING,this.onLevelLoading,this),e.on(g.AUDIO_TRACK_LOADING,this.onAudioTrackLoading,this),e.on(g.SUBTITLE_TRACK_LOADING,this.onSubtitleTrackLoading,this),e.on(g.LEVELS_UPDATED,this.onLevelsUpdated,this)}unregisterListeners(){const{hls:e}=this;e.off(g.MANIFEST_LOADING,this.onManifestLoading,this),e.off(g.LEVEL_LOADING,this.onLevelLoading,this),e.off(g.AUDIO_TRACK_LOADING,this.onAudioTrackLoading,this),e.off(g.SUBTITLE_TRACK_LOADING,this.onSubtitleTrackLoading,this),e.off(g.LEVELS_UPDATED,this.onLevelsUpdated,this)}createInternalLoader(e){const t=this.hls.config,n=t.pLoader,r=t.loader,i=n||r,s=new i(t);return this.loaders[e.type]=s,s}getInternalLoader(e){return this.loaders[e.type]}resetInternalLoader(e){this.loaders[e]&&delete this.loaders[e]}destroyInternalLoaders(){for(const e in this.loaders){const t=this.loaders[e];t&&t.destroy(),this.resetInternalLoader(e)}}destroy(){this.variableList=null,this.unregisterListeners(),this.destroyInternalLoaders()}onManifestLoading(e,t){const{url:n}=t;this.variableList=null,this.load({id:null,level:0,responseType:"text",type:ye.MANIFEST,url:n,deliveryDirectives:null,levelOrTrack:null})}onLevelLoading(e,t){const{id:n,level:r,pathwayId:i,url:s,deliveryDirectives:A,levelInfo:f}=t;this.load({id:n,level:r,pathwayId:i,responseType:"text",type:ye.LEVEL,url:s,deliveryDirectives:A,levelOrTrack:f})}onAudioTrackLoading(e,t){const{id:n,groupId:r,url:i,deliveryDirectives:s,track:A}=t;this.load({id:n,groupId:r,level:null,responseType:"text",type:ye.AUDIO_TRACK,url:i,deliveryDirectives:s,levelOrTrack:A})}onSubtitleTrackLoading(e,t){const{id:n,groupId:r,url:i,deliveryDirectives:s,track:A}=t;this.load({id:n,groupId:r,level:null,responseType:"text",type:ye.SUBTITLE_TRACK,url:i,deliveryDirectives:s,levelOrTrack:A})}onLevelsUpdated(e,t){const n=this.loaders[ye.LEVEL];if(n){const r=n.context;r&&!t.levels.some(i=>i===r.levelOrTrack)&&(n.abort(),delete this.loaders[ye.LEVEL])}}load(e){var t;const n=this.hls.config;let r=this.getInternalLoader(e);if(r){const c=this.hls.logger,m=r.context;if(m&&m.levelOrTrack===e.levelOrTrack&&(m.url===e.url||m.deliveryDirectives&&!e.deliveryDirectives)){m.url===e.url?c.log(`[playlist-loader]: ignore ${e.url} ongoing request`):c.log(`[playlist-loader]: ignore ${e.url} in favor of ${m.url}`);return}c.log(`[playlist-loader]: aborting previous loader for type: ${e.type}`),r.abort()}let i;if(e.type===ye.MANIFEST?i=n.manifestLoadPolicy.default:i=_({},n.playlistLoadPolicy.default,{timeoutRetry:null,errorRetry:null}),r=this.createInternalLoader(e),V((t=e.deliveryDirectives)==null?void 0:t.part)){let c;if(e.type===ye.LEVEL&&e.level!==null?c=this.hls.levels[e.level].details:e.type===ye.AUDIO_TRACK&&e.id!==null?c=this.hls.audioTracks[e.id].details:e.type===ye.SUBTITLE_TRACK&&e.id!==null&&(c=this.hls.subtitleTracks[e.id].details),c){const m=c.partTarget,y=c.targetduration;if(m&&y){const B=Math.max(m*3,y*.8)*1e3;i=_({},i,{maxTimeToFirstByteMs:Math.min(B,i.maxTimeToFirstByteMs),maxLoadTimeMs:Math.min(B,i.maxTimeToFirstByteMs)})}}}const s=i.errorRetry||i.timeoutRetry||{},A={loadPolicy:i,timeout:i.maxLoadTimeMs,maxRetry:s.maxNumRetry||0,retryDelay:s.retryDelayMs||0,maxRetryDelay:s.maxRetryDelayMs||0},f={onSuccess:(c,m,y,B)=>{const D=this.getInternalLoader(y);this.resetInternalLoader(y.type);const L=c.data;if(L.indexOf("#EXTM3U")!==0){this.handleManifestParsingError(c,y,new Error("no EXTM3U delimiter"),B||null,m);return}m.parsing.start=performance.now(),Es.isMediaPlaylist(L)||y.type!==ye.MANIFEST?this.handleTrackOrLevelPlaylist(c,m,y,B||null,D):this.handleMasterPlaylist(c,m,y,B)},onError:(c,m,y,B)=>{this.handleNetworkError(m,y,!1,c,B)},onTimeout:(c,m,y)=>{this.handleNetworkError(m,y,!0,void 0,c)}};r.load(e,A,f)}checkAutostartLoad(){if(!this.hls)return;const{config:{autoStartLoad:e,startPosition:t},forceStartLoad:n}=this.hls;(e||n)&&(this.hls.logger.log(`${e?"auto":"force"} startLoad with configured startPosition ${t}`),this.hls.startLoad(t))}handleMasterPlaylist(e,t,n,r){const i=this.hls,s=e.data,A=zs(e,n),f=Es.parseMasterPlaylist(s,A);if(f.playlistParsingError){this.handleManifestParsingError(e,n,f.playlistParsingError,r,t);return}const{contentSteering:c,levels:m,sessionData:y,sessionKeys:B,startTimeOffset:D,variableList:L}=f;this.variableList=L;const{AUDIO:se=[],SUBTITLES:X,"CLOSED-CAPTIONS":xe}=Es.parseMasterPlaylistMedia(s,A,f);se.length&&!se.some(We=>!We.url)&&m[0].audioCodec&&!m[0].attrs.AUDIO&&(this.hls.logger.log("[playlist-loader]: audio codec signaled in quality level, but no embedded audio track signaled, create one"),se.unshift({type:"main",name:"main",groupId:"main",default:!1,autoselect:!1,forced:!1,id:-1,attrs:new or({}),bitrate:0,url:""})),i.trigger(g.MANIFEST_LOADED,{levels:m,audioTracks:se,subtitles:X,captions:xe,contentSteering:c,url:A,stats:t,networkDetails:r,sessionData:y,sessionKeys:B,startTimeOffset:D,variableList:L})}handleTrackOrLevelPlaylist(e,t,n,r,i){const s=this.hls,{id:A,level:f,type:c}=n,m=zs(e,n),y=V(f)?f:V(A)?A:0,B=Fs(n),D=Es.parseLevelPlaylist(e.data,m,y,B,0,this.variableList);if(c===ye.MANIFEST){const L={attrs:new or({}),bitrate:0,details:D,name:"",url:m};D.requestScheduled=t.loading.start+Ls(D,0),s.trigger(g.MANIFEST_LOADED,{levels:[L],audioTracks:[],url:m,stats:t,networkDetails:r,sessionData:null,sessionKeys:null,contentSteering:null,startTimeOffset:null,variableList:null})}t.parsing.end=performance.now(),n.levelDetails=D,this.handlePlaylistLoaded(D,e,t,n,r,i)}handleManifestParsingError(e,t,n,r,i){this.hls.trigger(g.ERROR,{type:ge.NETWORK_ERROR,details:G.MANIFEST_PARSING_ERROR,fatal:t.type===ye.MANIFEST,url:e.url,err:n,error:n,reason:n.message,response:e,context:t,networkDetails:r,stats:i})}handleNetworkError(e,t,n=!1,r,i){let s=`A network ${n?"timeout":"error"+(r?" (status "+r.code+")":"")} occurred while loading ${e.type}`;e.type===ye.LEVEL?s+=`: ${e.level} id: ${e.id}`:(e.type===ye.AUDIO_TRACK||e.type===ye.SUBTITLE_TRACK)&&(s+=` id: ${e.id} group-id: "${e.groupId}"`);const A=new Error(s);this.hls.logger.warn(`[playlist-loader]: ${s}`);let f=G.UNKNOWN,c=!1;const m=this.getInternalLoader(e);switch(e.type){case ye.MANIFEST:f=n?G.MANIFEST_LOAD_TIMEOUT:G.MANIFEST_LOAD_ERROR,c=!0;break;case ye.LEVEL:f=n?G.LEVEL_LOAD_TIMEOUT:G.LEVEL_LOAD_ERROR,c=!1;break;case ye.AUDIO_TRACK:f=n?G.AUDIO_TRACK_LOAD_TIMEOUT:G.AUDIO_TRACK_LOAD_ERROR,c=!1;break;case ye.SUBTITLE_TRACK:f=n?G.SUBTITLE_TRACK_LOAD_TIMEOUT:G.SUBTITLE_LOAD_ERROR,c=!1;break}m&&this.resetInternalLoader(e.type);const y={type:ge.NETWORK_ERROR,details:f,fatal:c,url:e.url,loader:m,context:e,error:A,networkDetails:t,stats:i};if(r){const B=(t==null?void 0:t.url)||e.url;y.response=b({url:B,data:void 0},r)}this.hls.trigger(g.ERROR,y)}handlePlaylistLoaded(e,t,n,r,i,s){const A=this.hls,{type:f,level:c,id:m,groupId:y,deliveryDirectives:B}=r,D=zs(t,r),L=Fs(r),se=typeof r.level=="number"&&L===le.MAIN?c:void 0;if(!e.fragments.length){const xe=e.playlistParsingError=new Error("No Segments found in Playlist");A.trigger(g.ERROR,{type:ge.NETWORK_ERROR,details:G.LEVEL_EMPTY_ERROR,fatal:!1,url:D,error:xe,reason:xe.message,response:t,context:r,level:se,parent:L,networkDetails:i,stats:n});return}e.targetduration||(e.playlistParsingError=new Error("Missing Target Duration"));const X=e.playlistParsingError;if(X){if(this.hls.logger.warn(`${X} ${e.url}`),!A.config.ignorePlaylistParsingErrors){A.trigger(g.ERROR,{type:ge.NETWORK_ERROR,details:G.LEVEL_PARSING_ERROR,fatal:!1,url:D,error:X,reason:X.message,response:t,context:r,level:se,parent:L,networkDetails:i,stats:n});return}e.playlistParsingError=null}switch(e.live&&s&&(s.getCacheAge&&(e.ageHeader=s.getCacheAge()||0),(!s.getCacheAge||isNaN(e.ageHeader))&&(e.ageHeader=0)),f){case ye.MANIFEST:case ye.LEVEL:A.trigger(g.LEVEL_LOADED,{details:e,levelInfo:r.levelOrTrack||A.levels[0],level:se||0,id:m||0,stats:n,networkDetails:i,deliveryDirectives:B,withoutMultiVariant:f===ye.MANIFEST});break;case ye.AUDIO_TRACK:A.trigger(g.AUDIO_TRACK_LOADED,{details:e,track:r.levelOrTrack,id:m||0,groupId:y||"",stats:n,networkDetails:i,deliveryDirectives:B});break;case ye.SUBTITLE_TRACK:A.trigger(g.SUBTITLE_TRACK_LOADED,{details:e,track:r.levelOrTrack,id:m||0,groupId:y||"",stats:n,networkDetails:i,deliveryDirectives:B});break}}}class Qi{static get version(){return Ca}static isMSESupported(){return Zi()}static isSupported(){return Ii()}static getMediaSource(){return ae()}static get Events(){return g}static get MetadataSchema(){return Vs}static get ErrorTypes(){return ge}static get ErrorDetails(){return G}static get DefaultConfig(){return Qi.defaultConfig?Qi.defaultConfig:Ec}static set DefaultConfig(e){Qi.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 Ja,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=de(e.debug||!1,"Hls instance",e.assetPlayerId),n=this.config=bc(Qi.DefaultConfig,e,t);this.userConfig=e,n.progressive&&u(n,t);const{abrController:r,bufferController:i,capLevelController:s,errorController:A,fpsController:f}=n,c=new A(this),m=this.abrController=new r(this),y=new jt(this),B=n.interstitialsController,D=B?this.interstitialsController=new B(this,Qi):null,L=this.bufferController=new i(this,y),se=this.capLevelController=new s(this),X=new f(this),xe=new ga(this),at=n.contentSteeringController,We=at?new at(this):null,Mt=this.levelController=new xi(this,We),qt=new dr(this),Dn=new Hi(this.config,this.logger),zt=this.streamController=new Ni(this,y,Dn),un=this.gapController=new ve(this,y);se.setStreamController(zt),X.setStreamController(zt);const gn=[xe,Mt,zt];D&&gn.splice(1,0,D),We&&gn.splice(1,0,We),this.networkControllers=gn;const Yt=[m,L,un,se,X,qt,y];this.audioTrackController=this.createController(n.audioTrackController,gn);const Nn=n.audioStreamController;Nn&&gn.push(this.audioStreamController=new Nn(this,y,Dn)),this.subtitleTrackController=this.createController(n.subtitleTrackController,gn);const Cr=n.subtitleStreamController;Cr&&gn.push(this.subtititleStreamController=new Cr(this,y,Dn)),this.createController(n.timelineController,Yt),Dn.emeController=this.emeController=this.createController(n.emeController,Yt),this.cmcdController=this.createController(n.cmcdController,Yt),this.latencyController=this.createController(Rr,Yt),this.coreComponents=Yt,gn.push(c);const jr=c.onErrorOut;typeof jr=="function"&&this.on(g.ERROR,jr,c),this.on(g.MANIFEST_LOADED,xe.onManifestLoaded,xe)}createController(e,t){if(e){const n=new e(this);return t&&t.push(n),n}return null}on(e,t,n=this){this._emitter.on(e,t,n)}once(e,t,n=this){this._emitter.once(e,t,n)}removeAllListeners(e){this._emitter.removeAllListeners(e)}off(e,t,n=this,r){this._emitter.off(e,t,n,r)}listeners(e){return this._emitter.listeners(e)}emit(e,t,n){return this._emitter.emit(e,t,n)}trigger(e,t){if(this.config.debug)return this.emit(e,e,t);try{return this.emit(e,e,t)}catch(n){if(this.logger.error("An internal error happened while handling event "+e+'. Error message: "'+n.message+'". Here is a stacktrace:',n),!this.triggeringException){this.triggeringException=!0;const r=e===g.ERROR;this.trigger(g.ERROR,{type:ge.OTHER_ERROR,details:G.INTERNAL_EXCEPTION,fatal:r,event:e,error:n}),this.triggeringException=!1}}return!1}listenerCount(e){return this._emitter.listenerCount(e)}destroy(){this.logger.log("destroy"),this.trigger(g.DESTROYING,void 0),this.detachMedia(),this.removeAllListeners(),this._autoLevelCapping=-1,this._url=null,this.networkControllers.forEach(t=>t.destroy()),this.networkControllers.length=0,this.coreComponents.forEach(t=>t.destroy()),this.coreComponents.length=0;const e=this.config;e.xhrSetup=e.fetchSetup=void 0,this.userConfig=null}attachMedia(e){if(!e||"media"in e&&!e.media){const i=new Error(`attachMedia failed: invalid argument (${e})`);this.trigger(g.ERROR,{type:ge.OTHER_ERROR,details:G.ATTACH_MEDIA_ERROR,fatal:!0,error:i});return}this.logger.log("attachMedia"),this._media&&(this.logger.warn("media must be detached before attaching"),this.detachMedia());const t="media"in e,n=t?e.media:e,r=t?e:{media:n};this._media=n,this.trigger(g.MEDIA_ATTACHING,r)}detachMedia(){this.logger.log("detachMedia"),this.trigger(g.MEDIA_DETACHING,{}),this._media=null}transferMedia(){this._media=null;const e=this.bufferController.transferMedia();return this.trigger(g.MEDIA_DETACHING,{transferMedia:e}),e}loadSource(e){this.stopLoad();const t=this.media,n=this._url,r=this._url=E.buildAbsoluteURL(self.location.href,e,{alwaysNormalize:!0});this._autoLevelCapping=-1,this._maxHdcpLevel=null,this.logger.log(`loadSource:${r}`),t&&n&&(n!==r||this.bufferController.hasSourceTypes())&&(this.detachMedia(),this.attachMedia(t)),this.trigger(g.MANIFEST_LOADING,{url:e})}get url(){return this._url}get hasEnoughToStart(){return this.streamController.hasEnoughToStart}get startPosition(){return this.streamController.startPositionValue}startLoad(e=-1,t){this.logger.log(`startLoad(${e+(t?", <skip seek to start>":"")})`),this.started=!0,this.resumeBuffering();for(let n=0;n<this.networkControllers.length&&(this.networkControllers[n].startLoad(e,t),!(!this.started||!this.networkControllers));n++);}stopLoad(){this.logger.log("stopLoad"),this.started=!1;for(let e=0;e<this.networkControllers.length&&(this.networkControllers[e].stopLoad(),!(this.started||!this.networkControllers));e++);}get loadingEnabled(){return this.started}get bufferingEnabled(){return this.streamController.bufferingEnabled}resumeBuffering(){this.bufferingEnabled||(this.logger.log("resume buffering"),this.networkControllers.forEach(e=>{e.resumeBuffering&&e.resumeBuffering()}))}pauseBuffering(){this.bufferingEnabled&&(this.logger.log("pause buffering"),this.networkControllers.forEach(e=>{e.pauseBuffering&&e.pauseBuffering()}))}get inFlightFragments(){const e={[le.MAIN]:this.streamController.inFlightFrag};return this.audioStreamController&&(e[le.AUDIO]=this.audioStreamController.inFlightFrag),this.subtititleStreamController&&(e[le.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=lo()),e}get levels(){const e=this.levelController.levels;return e||[]}get latestLevelDetails(){return this.streamController.getLevelDetails()||null}get loadLevelObj(){return this.levelController.loadLevelObj}get currentLevel(){return this.streamController.currentLevel}set currentLevel(e){this.logger.log(`set currentLevel:${e}`),this.levelController.manualLevel=e,this.streamController.immediateLevelSwitch()}get nextLevel(){return this.streamController.nextLevel}set nextLevel(e){this.logger.log(`set nextLevel:${e}`),this.levelController.manualLevel=e,this.streamController.nextLevelSwitch()}get loadLevel(){return this.levelController.level}set loadLevel(e){this.logger.log(`set loadLevel:${e}`),this.levelController.manualLevel=e}get nextLoadLevel(){return this.levelController.nextLoadLevel}set nextLoadLevel(e){this.levelController.nextLoadLevel=e}get firstLevel(){return Math.max(this.levelController.firstLevel,this.minAutoLevel)}set firstLevel(e){this.logger.log(`set firstLevel:${e}`),this.levelController.firstLevel=e}get startLevel(){const e=this.levelController.startLevel;return e===-1&&this.abrController.forcedAutoLevel>-1?this.abrController.forcedAutoLevel:e}set startLevel(e){this.logger.log(`set startLevel:${e}`),e!==-1&&(e=Math.max(e,this.minAutoLevel)),this.levelController.startLevel=e}get capLevelToPlayerSize(){return this.config.capLevelToPlayerSize}set capLevelToPlayerSize(e){const t=!!e;t!==this.config.capLevelToPlayerSize&&(t?this.capLevelController.startCapping():(this.capLevelController.stopCapping(),this.autoLevelCapping=-1,this.streamController.nextLevelSwitch()),this.config.capLevelToPlayerSize=t)}get autoLevelCapping(){return this._autoLevelCapping}get bandwidthEstimate(){const{bwEstimator:e}=this.abrController;return e?e.getEstimate():NaN}set bandwidthEstimate(e){this.abrController.resetEstimator(e)}get abrEwmaDefaultEstimate(){const{bwEstimator:e}=this.abrController;return e?e.defaultEstimate:NaN}get ttfbEstimate(){const{bwEstimator:e}=this.abrController;return e?e.getEstimateTTFB():NaN}set autoLevelCapping(e){this._autoLevelCapping!==e&&(this.logger.log(`set autoLevelCapping:${e}`),this._autoLevelCapping=e,this.levelController.checkMaxAutoUpdated())}get maxHdcpLevel(){return this._maxHdcpLevel}set maxHdcpLevel(e){it(e)&&this._maxHdcpLevel!==e&&(this._maxHdcpLevel=e,this.levelController.checkMaxAutoUpdated())}get autoLevelEnabled(){return this.levelController.manualLevel===-1}get manualLevel(){return this.levelController.manualLevel}get minAutoLevel(){const{levels:e,config:{minAutoBitrate:t}}=this;if(!e)return 0;const n=e.length;for(let r=0;r<n;r++)if(e[r].maxBitrate>=t)return r;return 0}get maxAutoLevel(){const{levels:e,autoLevelCapping:t,maxHdcpLevel:n}=this;let r;if(t===-1&&e!=null&&e.length?r=e.length-1:r=t,n)for(let i=r;i--;){const s=e[i].attrs["HDCP-LEVEL"];if(s&&s<=n)return i}return r}get firstAutoLevel(){return this.abrController.firstAutoLevel}get nextAutoLevel(){return this.abrController.nextAutoLevel}set nextAutoLevel(e){this.abrController.nextAutoLevel=e}get playingDate(){return this.streamController.currentProgramDateTime}get mainForwardBufferInfo(){return this.streamController.getMainFwdBufferInfo()}get maxBufferLength(){return this.streamController.maxBufferLength}setAudioOption(e){var t;return((t=this.audioTrackController)==null?void 0:t.setAudioOption(e))||null}setSubtitleOption(e){var t;return((t=this.subtitleTrackController)==null?void 0:t.setSubtitleOption(e))||null}get allAudioTracks(){const e=this.audioTrackController;return e?e.allAudioTracks:[]}get audioTracks(){const e=this.audioTrackController;return e?e.audioTracks:[]}get audioTrack(){const e=this.audioTrackController;return e?e.audioTrack:-1}set audioTrack(e){const t=this.audioTrackController;t&&(t.audioTrack=e)}get allSubtitleTracks(){const e=this.subtitleTrackController;return e?e.allSubtitleTracks:[]}get subtitleTracks(){const e=this.subtitleTrackController;return e?e.subtitleTracks:[]}get subtitleTrack(){const e=this.subtitleTrackController;return e?e.subtitleTrack:-1}get media(){return this._media}set subtitleTrack(e){const t=this.subtitleTrackController;t&&(t.subtitleTrack=e)}get subtitleDisplay(){const e=this.subtitleTrackController;return e?e.subtitleDisplay:!1}set subtitleDisplay(e){const t=this.subtitleTrackController;t&&(t.subtitleDisplay=e)}get lowLatencyMode(){return this.config.lowLatencyMode}set lowLatencyMode(e){this.config.lowLatencyMode=e}get liveSyncPosition(){return this.latencyController.liveSyncPosition}get latency(){return this.latencyController.latency}get maxLatency(){return this.latencyController.maxLatency}get targetLatency(){return this.latencyController.targetLatency}set targetLatency(e){this.latencyController.targetLatency=e}get drift(){return this.latencyController.drift}get forceStartLoad(){return this.streamController.forceStartLoad}get pathways(){return this.levelController.pathways}get pathwayPriority(){return this.levelController.pathwayPriority}set pathwayPriority(e){this.levelController.pathwayPriority=e}get bufferedToEnd(){var e;return!!((e=this.bufferController)!=null&&e.bufferedToEnd)}get interstitialsManager(){var e;return((e=this.interstitialsController)==null?void 0:e.interstitialsManager)||null}getMediaDecodingInfo(e,t=this.allAudioTracks){const n=$e(t);return xr(e,n,navigator.mediaCapabilities)}}Qi.defaultConfig=void 0},16722:function(Vn,ct,x){"use strict";x.d(ct,{Z:function(){return le}});const V=o=>typeof o=="object"&&o!=null&&o.nodeType===1,fe=(o,S)=>(!S||o!=="hidden")&&o!=="visible"&&o!=="clip",Ce=(o,S)=>{if(o.clientHeight<o.scrollHeight||o.clientWidth<o.scrollWidth){const U=getComputedStyle(o,null);return fe(U.overflowY,S)||fe(U.overflowX,S)||(_=>{const w=(b=>{if(!b.ownerDocument||!b.ownerDocument.defaultView)return null;try{return b.ownerDocument.defaultView.frameElement}catch(R){return null}})(_);return!!w&&(w.clientHeight<_.scrollHeight||w.clientWidth<_.scrollWidth)})(o)}return!1},ge=(o,S,U,_,w,b,R,M)=>b<o&&R>S||b>o&&R<S?0:b<=o&&M<=U||R>=S&&M>=U?b-o-_:R>S&&M<U||b<o&&M>U?R-S+w:0,G=o=>{const S=o.parentElement;return S==null?o.getRootNode().host||null:S},g=(o,S)=>{var U,_,w,b;if(typeof document=="undefined")return[];const{scrollMode:R,block:M,inline:H,boundary:J,skipOverflowHiddenElements:T}=S,N=typeof J=="function"?J:Ke=>Ke!==J;if(!V(o))throw new TypeError("Invalid target");const P=document.scrollingElement||document.documentElement,k=[];let oe=o;for(;V(oe)&&N(oe);){if(oe=G(oe),oe===P){k.push(oe);break}oe!=null&&oe===document.body&&Ce(oe)&&!Ce(document.documentElement)||oe!=null&&Ce(oe,T)&&k.push(oe)}const de=(_=(U=window.visualViewport)==null?void 0:U.width)!=null?_:innerWidth,ie=(b=(w=window.visualViewport)==null?void 0:w.height)!=null?b:innerHeight,{scrollX:ae,scrollY:we}=window,{height:Te,width:Re,top:Y,right:$,bottom:te,left:q}=o.getBoundingClientRect(),{top:he,right:re,bottom:E,left:C}=(Ke=>{const Ct=window.getComputedStyle(Ke);return{top:parseFloat(Ct.scrollMarginTop)||0,right:parseFloat(Ct.scrollMarginRight)||0,bottom:parseFloat(Ct.scrollMarginBottom)||0,left:parseFloat(Ct.scrollMarginLeft)||0}})(o);let W=M==="start"||M==="nearest"?Y-he:M==="end"?te+E:Y+Te/2-he+E,be=H==="center"?q+Re/2-C+re:H==="end"?$+re:q-C;const Ve=[];for(let Ke=0;Ke<k.length;Ke++){const Ct=k[Ke],{height:Rt,width:Vt,top:rn,right:He,bottom:ln,left:It}=Ct.getBoundingClientRect();if(R==="if-needed"&&Y>=0&&q>=0&&te<=ie&&$<=de&&(Ct===P&&!Ce(Ct)||Y>=rn&&te<=ln&&q>=It&&$<=He))return Ve;const cn=getComputedStyle(Ct),xt=parseInt(cn.borderLeftWidth,10),ht=parseInt(cn.borderTopWidth,10),Oe=parseInt(cn.borderRightWidth,10),Fe=parseInt(cn.borderBottomWidth,10);let j=0,Ne=0;const Ze="offsetWidth"in Ct?Ct.offsetWidth-Ct.clientWidth-xt-Oe:0,ee="offsetHeight"in Ct?Ct.offsetHeight-Ct.clientHeight-ht-Fe:0,O="offsetWidth"in Ct?Ct.offsetWidth===0?0:Vt/Ct.offsetWidth:0,ue="offsetHeight"in Ct?Ct.offsetHeight===0?0:Rt/Ct.offsetHeight:0;if(P===Ct)j=M==="start"?W:M==="end"?W-ie:M==="nearest"?ge(we,we+ie,ie,ht,Fe,we+W,we+W+Te,Te):W-ie/2,Ne=H==="start"?be:H==="center"?be-de/2:H==="end"?be-de:ge(ae,ae+de,de,xt,Oe,ae+be,ae+be+Re,Re),j=Math.max(0,j+we),Ne=Math.max(0,Ne+ae);else{j=M==="start"?W-rn-ht:M==="end"?W-ln+Fe+ee:M==="nearest"?ge(rn,ln,Rt,ht,Fe+ee,W,W+Te,Te):W-(rn+Rt/2)+ee/2,Ne=H==="start"?be-It-xt:H==="center"?be-(It+Vt/2)+Ze/2:H==="end"?be-He+Oe+Ze:ge(It,He,Vt,xt,Oe+Ze,be,be+Re,Re);const{scrollLeft:De,scrollTop:Ae}=Ct;j=ue===0?0:Math.max(0,Math.min(Ae+j/ue,Ct.scrollHeight-Rt/ue+ee)),Ne=O===0?0:Math.max(0,Math.min(De+Ne/O,Ct.scrollWidth-Vt/O+Ze)),W+=Ae-j,be+=De-Ne}Ve.push({el:Ct,top:j,left:Ne})}return Ve},ye=o=>o===!1?{block:"end",inline:"nearest"}:(S=>S===Object(S)&&Object.keys(S).length!==0)(o)?o:{block:"start",inline:"nearest"};function le(o,S){if(!o.isConnected||!(w=>{let b=w;for(;b&&b.parentNode;){if(b.parentNode===document)return!0;b=b.parentNode instanceof ShadowRoot?b.parentNode.host:b.parentNode}return!1})(o))return;const U=(w=>{const b=window.getComputedStyle(w);return{top:parseFloat(b.scrollMarginTop)||0,right:parseFloat(b.scrollMarginRight)||0,bottom:parseFloat(b.scrollMarginBottom)||0,left:parseFloat(b.scrollMarginLeft)||0}})(o);if((w=>typeof w=="object"&&typeof w.behavior=="function")(S))return S.behavior(g(o,S));const _=typeof S=="boolean"||S==null?void 0:S.behavior;for(const{el:w,top:b,left:R}of g(o,ye(S))){const M=b-U.top+U.bottom,H=R-U.left+U.right;w.scroll({top:M,left:H,behavior:_})}}}}]);
|
|
}()); |